Skip to content

Codex init generates an inferior AGENTS.md compared to the repo's canonical guideΒ #1507

@Tovli

Description

@Tovli

Summary

claude-flow init --codex currently generates a much weaker AGENTS.md than the canonical AGENTS.md checked into this repo.

The generated default template misses key operational guidance that the repo version already documents clearly, especially around the Codex/claude-flow execution model.

Reproduction

  1. Clone ruvnet/ruflo.
  2. Run claude-flow init --dual in a clean directory or inspect the Codex generator output.
  3. Compare the generated AGENTS.md against the repository root AGENTS.md.

Actual Behavior

The generated file is a generic template with basic project/setup/security sections, but it omits important guidance already present in the repo copy, including:

  • claude-flow = LEDGER / Codex = EXECUTOR
  • the rule to continue working immediately after coordination commands
  • stronger MCP/memory workflow guidance
  • practical quick commands and richer execution examples

Expected Behavior

The default Codex AGENTS.md template should be at least as strong as the repo's canonical guidance, or derive from the same source so they do not drift.

Likely Root Cause

The Codex init path uses the stale generic default template in:

  • v3/@claude-flow/codex/src/generators/agents-md.ts

The CLI maps claude-flow init --codex to the default template unless --minimal or --full is passed.

Suggested Fix

  • Update the default AGENTS generator content to include the canonical Codex/claude-flow workflow guidance.
  • Add a regression test in v3/@claude-flow/codex/tests/generators.test.ts that checks for the missing execution-model and MCP/memory guidance.
  • Longer term: consider generating the repo AGENTS.md and the init template from a shared canonical source to avoid future drift.

Validation

A useful regression check would assert that the generated default template contains items like:

  • claude-flow = LEDGER
  • Codex = EXECUTOR
  • DON'T STOP AFTER CALLING CLAUDE-FLOW
  • memory_search(query="task keywords")
  • swarm_init(topology="hierarchical")
  • ## MCP Integration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions