External Publication
Visit Post

How to achieve greater code refactoring automation?

OpenAI Developer Community July 1, 2026
Source

Great thread here.

Personally for refactoring I heavily rely on IDE (PHP storm) calling agents from the console inside the IDE

Also I have released this PHP storm skill which might help your agent to work with IDE:

github.com

GitHub - TechSpokes/skill-ide-phpstorm-mcp: IDE PHPStorm MCP server best practices. Helps AI...

IDE PHPStorm MCP server best practices. Helps AI agents to leverage your IDE tools for better efficiency.

Also what helps a lot is having the architecture overview document created by the agent after the analysis of your code base with weak spots flagged during the analysis.

And some alignment on the documentation is also good to help agent produce better code.

Here are some examples I put in the repository as adopted conventions:

github.com

GitHub - TechSpokes/agency-specifications-files-agents-md: AGENTS.md file guidelines

AGENTS.md file guidelines

github.com

GitHub - TechSpokes/agency-specifications-files-readme-md: Readme.md Specification

Readme.md Specification

gist.github.com

https://gist.github.com/sergeliatko/2e3f2a165797db81337c598e9f5f2c53

code-commenting-specification-v2.md
# Code Commenting Specification

Version 2.0.0

A specification for code commenting in multi-entity codebases where humans, AI agents, and automated tools collaborate.

## 1. Abstract

This specification defines principles, a tag vocabulary, requirement levels, and guidelines for code comments in software projects. It treats code comments as a form of cross-intelligence context transfer: persistent, asynchronous messages embedded in source code that carry information not available from the code itself.

This file has been truncated. show original

Hope that helps.

Discussion in the ATmosphere

Loading comments...