Evaluate retiring agent-compose and AGENTS.codex.md #333
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/agentic-os#333
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The current agent context stack includes
AGENTS.codex.mdas anagent-composeoverride slice. That slice exists to provide Codex-specific load-point behavior, but the broader compose layer may no longer be worth keeping.Evaluate whether
agent-composeshould be retired, simplified, or replaced by a different mechanism.Questions to answer:
agent-composegoes away?Outcome expected:
🔎 ward agent advisor
ward agent advisor --harness codexran a one-shot standard research pass on this question:Recommendation
Replace, not retire.
agent-composeas the host-level composer for per-harness load points, host-class overlays, and the mount-eligibility manifest.AGENTS.<harness>.mdas section-patching overrides of a base file).agent_compose_sourcesand gated with frontmatter likeharnesses: [codex]orharnesses: [claude].That keeps the parts that are clearly earning their keep, and removes the part that looks over-engineered for current usage.
Why
1. The compose layer is still pulling real weight
In the current repo and mounted substrate,
agent-composeis doing more than just splicing a Codex rule intoAGENTS.md:~/.claude/CLAUDE.md,~/.codex/AGENTS.md, and~/.config/opencode/AGENTS.md.mount-eligibility.json), which infrastructure docs explicitly describe as data that ward reads instead of re-deriving scope.~/.config/agent-compose/sources/) for untracked doctrine.check_context_budget.py.If
agent-composedisappeared entirely, those jobs would still need a home. Recreating them elsewhere would mostly be a rename plus migration cost.2. The override subfeature does not appear to justify its complexity
The section-override mechanism in
agentic_os/generators/generate_agent_compose.pyadds bespoke behavior:discover_override()_override_sections()apply_overrides()tests/test_agent_compose.pyBut the real files currently using it do not need section replacement:
AGENTS.codex.mdadds a Codex-only## Reading filessection.AGENTS.claude.mdadds a Claude-only## Ward-managed lockdown filessection./substrate/agentic-os-kai/AGENTS.codex.mdis already implemented as a standalone harness-scoped source, not as a patch over another file.That is the strongest signal in the repo: Codex-specific behavior already works today without the override model.
3. The Codex-specific file is still useful, but not as an override
The public Codex rule in
AGENTS.codex.mdis small, but it addresses a real harness difference: Codex tends to accumulate context through shell output, so the "read slices, not whole files" rule is good eager doctrine.What is not justified is the current mechanism used to attach it.
What breaks if
agent-composegoes away entirelyA full removal would break or force rewrites in at least these areas.
In
agentic-osagentic_os/generators/generate_agent_compose.pytests/test_agent_compose.pyscripts/agent-compose-freshen.shscripts/install-agent-compose-freshen.pyagentic_os/pre_commit/check_agent_compose_drift.pyagentic_os/pre_commit/check_agent_compose_size.pyagentic_os/pre_commit/check_agent_compose_dedup.pyagentic_os/pre_commit/check_context_budget.pyscripts/agent-compat.py.pre-commit-hooks.yamlpyproject.toml.ward/ward.yamlREADME.mddocs/features-agents-sessions.mddocs/context-budget.mddocs/mount-eligibility-manifest.mddocs/FEATURES.mdIn
infrastructureThe mounted infrastructure docs and role files show that
agent-composeis the current convergence point for host setup:/substrate/infrastructure/ansible/roles/agent-compose/defaults/main.yml/substrate/infrastructure/ansible/roles/agent-compose/tasks/main.yml/substrate/infrastructure/ansible/roles/agent-compose/templates/agent-compose.yaml.j2/substrate/infrastructure/ansible/inventory/group_vars/hostclass_personal.yml/substrate/infrastructure/ansible/inventory/group_vars/mac.yml/substrate/infrastructure/docs/ansible-agent-compose-role.md/substrate/infrastructure/docs/FEATURES.mdLikely host impact
Per the infrastructure docs, the affected hosts are:
What should replace the current load-point/override model
Recommended replacement model
Keep this model:
Replace only this part:
AGENTS.<harness>.mddiscovered as an implicit override of a base file)With this:
---\nharnesses: [codex]\n---orharnesses: [claude]in those filesagent_compose_sourcesin the intended orderThat makes the system simpler in two ways:
Why this is better than moving the behavior elsewhere entirely
Moving the Codex rule into a skill or a harness base prompt would make it less versioned alongside the rest of the eager doctrine, and in the skill case it would become lazy-loaded instead of startup-loaded. The current rule is precisely about startup reading discipline, so keeping it in eager context is reasonable.
Migration shape
Phase 1. Replace override files with normal harness-scoped sources
AGENTS.codex.mdandAGENTS.claude.md.AGENTS.md.Phase 2. Simplify the composer
generate_agent_compose.py.Phase 3. Repoint docs and checks
context-budget,agent-compat, and the manifest model unchanged, since they can continue to consume the compose plan.Open questions
mount-eligibility.jsonin code on the active branch, or is infrastructure/docs ahead of ward implementation? The docs clearly treat the manifest as authoritative, so the migration should confirm the live consumer path before changing the file contract.Risks
Bottom line
Do not retire
agent-composeoutright. It still owns enough real behavior to justify existing as the composition layer.Do retire the override mechanism and
AGENTS.codex.md-as-override. Keep the Codex-specific doctrine, but make it a normal harness-scoped source. That captures the current benefit with materially less machinery.Researched and posted automatically by
ward agent advisor --harness codex(ward#179). This is one-shot research, not a carried change - verify before acting on it.— Codex, via
ward agent