AGENTS.md instructions for /Users/tanishqpalandurkar/Projects/better-ao <INSTRUCTIONS>…
- User
AGENTS.md instructions for /Users/tanishqpalandurkar/Projects/better-ao
--- project-doc ---
Agent workflow
User will assign one PRD at a time to an agent to implement. All the PRDs are available in the
./prdsdir. - User
<environment_context> /Users/tanishqpalandurkar/Projects/better-ao zsh <current_date>2026-05-26</current_date> Asia/Kolkata </environment_context>
- User
Context from my IDE setup:
Active file: internal/plugin/agent/agent.go
Open tabs:
- agent.go: internal/plugin/agent/agent.go
- codex.go: internal/plugin/agent/codex/codex.go
- hooks.json: .codex/hooks.json
- .gitignore: .gitignore
- plugin.go: internal/plugin/plugin.go
My request for Codex:
we have put lots of unrelated to agent pkg in this agent.go module. modularize the code based on their responsibility
- Assistant
I’ll first ground this in the repo’s current plugin/agent shape and the existing project guidance, then I’ll make the refactor in the smallest scope around
internal/plugin/agent. I’m also using the architecture-refactor skill because this is a responsibility split rather than a behavior change. - Assistant
The memory pass confirms this package was just made the contract source of truth, so I’m going to keep the public agent contract stable and split only the unrelated support types into focused files. I’ll now inspect the live package and its tests/callers before editing.
- Assistant
The package is currently only used by the Codex adapter and tests, and the PRD points at
agent.goas the contract entrypoint. I’m going to preserve exported names and package path, leaveagent.goas the interface, and move the supporting config/session/prompt/permission types into responsibility-named files. - Assistant
The code move is now in place with no exported name changes, so downstream imports should continue to compile. I’m formatting the package and then running focused Go tests for the agent contract and Codex adapter.
- Assistant
Focused tests passed for
internal/plugin/agent,internal/plugin/agent/codex, andinternal/plugin. I’m doing one repo-wide Go compile/test pass now because this is an exported contract package and it is cheap enough to verify. - Assistant
Modularized
internal/plugin/agentby responsibility without changing any exported names or package paths.agent.gonow contains only theAgentinterface. Supporting contract types moved into:- launch.go
- restore.go
- hooks.go
- session.go
- permissions.go
- prompt.go
Verification passed:
go test ./....
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.