Skip to content

refactor(template): trim multiagent-safety contract 447→171 lines (62%)#607

Merged
NagyVikt merged 1 commit into
mainfrom
agent/claude/trim-multiagent-template-2026-05-27
May 27, 2026
Merged

refactor(template): trim multiagent-safety contract 447→171 lines (62%)#607
NagyVikt merged 1 commit into
mainfrom
agent/claude/trim-multiagent-template-2026-05-27

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Summary

Trim templates/AGENTS.multiagent-safety.md from 447 → 171 lines (62% reduction) while keeping every load-bearing rule. Drop the implicit Colony coupling so the contract reads as generic to any Claude Code / Codex / agent-tool setup, not just Colony-equipped repos.

What's preserved (verbatim — tests + downstream repos depend on these)

  • GUARDEX_ON=0|1 toggle wording
  • "Small tasks stay direct and caveman-only" task-size routing
  • "Promote to full Guardex / OMX orchestration only when scope grows into ..."
  • "final completion/cleanup section" + "PR URL + final MERGED evidence"
  • External approval boundary section + Codex-host bypass guidance
  • "instead of standalone git push / gh pr" finish-flow rule
  • Six-step completion definition
  • Primary-tree lock command list
  • ### Token / context budget and ### Caveman style section headings

What's dropped or condensed

  • ### Colony coordination loop — Colony is optional companion tooling, not gx core. The whole 70-line MCP-tool catalog → moved into a 3-bullet "Optional companion tooling" section (fff/rtk/OpenSpec, no Colony).
  • ### Working-state notes — redundant with the handoff format above it.
  • Verbose RTK command catalogs (~30 lines) → one-line summary in companion tooling.
  • Header "Multi-Agent Execution Contract: Guardex + Colony" → just "Multi-Agent Execution Contract".

Test impact

  • 3 phrase assertions migrated from Colony-specific literals to the new generic wording in test/setup.test.js.
  • Suite: 38 pass / 6 fail = baseline. Zero new failures (the 6 remaining are pre-existing unrelated companion-npm / agent-branch-start / OpenSpec tests).

Net effect on consumer repos

Every repo that runs gx setup after this merges sees their AGENTS.md shrink by ~276 lines on next refresh. No behavior change to gx commands themselves.

🤖 Generated with Claude Code

Drop Colony-specific coupling so the contract is generic to any
Claude Code / Codex / agent-tool setup. Reorganize into a tighter
load-bearing surface plus an "Optional companion tooling" section
for fff/rtk/OpenSpec.

Kept verbatim (tests + downstream repos depend on these):
- Toggle (GUARDEX_ON=0/1)
- "Small tasks stay direct and caveman-only" task-size routing
- "Promote to full Guardex / OMX orchestration only when scope grows into"
- "final completion/cleanup section"
- "PR URL + final `MERGED` evidence"
- External approval boundary section
- "Guardex cannot bypass Codex host approval prompts"
- "request approval for the narrow `gx branch finish ...` command"
- "instead of standalone `git push` / `gh pr`"
- `### Token / context budget` and `### Caveman style` section headings
- Primary-tree lock command list
- Six-step completion definition

Dropped:
- `### Colony coordination loop` block (Colony is optional, not gx core)
- `### Working-state notes` redundant with handoff format
- Verbose RTK/Caveman tool catalogs (now one-line summary in "Optional companion tooling")
- "Multi-Agent Execution Contract: Guardex + Colony" header → just
  "Multi-Agent Execution Contract"

Test updates: 3 phrase assertions migrated from Colony-specific
literals to the new generic wording. 38 pass / 6 fail (= baseline,
zero new failures).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@NagyVikt NagyVikt merged commit bee3180 into main May 27, 2026
1 of 2 checks passed
@NagyVikt NagyVikt deleted the agent/claude/trim-multiagent-template-2026-05-27 branch May 27, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant