Skip to content

feat(#371): generate and consume AGENTS.md for cross-tool compatibility - #374

Merged
admarble merged 3 commits into
mainfrom
feature/371-generate-and-consume-agents-md-for-cross-tool-comp
Mar 22, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/371-generate-and-consume-agents-md-for-cross-tool-comp

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Add AGENTS.md generation to sequant init, creating a universal agent instructions file compatible with Codex CLI, Cursor, Gemini CLI, Jules, Zed, Aider, and other AI coding agents
  • Integrate AGENTS.md into sync (regeneration), doctor (presence/consistency checks), and conventions (--format agents-md output)
  • Extract portable instructions from CLAUDE.md (stripping Claude-specific sections like Slash Commands and Hooks) into AGENTS.md

AC Coverage

AC Description Status Evidence
AC-1 sequant init generates AGENTS.md ✅ src/commands/init.ts:509-527
AC-2 Content includes standard sections ✅ Template in src/lib/agents-md.ts
AC-3 Standard format ✅ # AGENTS.md, ## Project Overview, etc.
AC-4 Derive from CLAUDE.md ✅ extractPortableInstructions()
AC-5 sequant sync updates AGENTS.md ✅ src/commands/sync.ts:124-148
AC-6 Non-Claude agent prompt context 🔄 Deferred No non-Claude backends exist yet
AC-7 sequant doctor checks ✅ src/commands/doctor.ts:236-280
AC-8 conventions --format agents-md ✅ src/commands/conventions.ts
AC-9 init --no-agents-md ✅ bin/cli.ts + init.ts guard

Test plan

  • npm run build passes
  • npm run lint passes (0 errors, 0 warnings)
  • npm test passes (1557/1557 tests, 58 files)
  • 14 new unit tests for agents-md.ts covering generation, extraction, consistency, and formatting
  • Existing doctor tests updated for new AGENTS.md check

Closes #371

🤖 Generated with Claude Code

Add AGENTS.md generation to make Sequant a good citizen in the AGENTS.md
ecosystem, providing instant compatibility with Codex CLI, Cursor, Gemini
CLI, Jules, Zed, Aider, and other AI coding agents.

- `sequant init` generates AGENTS.md alongside CLAUDE.md
- `sequant sync` regenerates AGENTS.md when templates are updated
- `sequant doctor` checks AGENTS.md presence and consistency with CLAUDE.md
- `sequant conventions --format agents-md` outputs in AGENTS.md format
- `--no-agents-md` flag to skip generation during init
- Core library with portable instruction extraction from CLAUDE.md
- 14 unit tests covering all new functionality

Entire-Checkpoint: 1a1fe2e22637
Add snapshot tests for all 5 stack types (nextjs, rust, python, go,
generic) to catch unintended template regressions. Also add clarifying
comments to empty catch blocks in agents-md.ts.

Entire-Checkpoint: cc5514e9f2bb
Phase executor now reads AGENTS.md and prepends it to the prompt
sent to the agent backend. This ensures non-Claude agents (Aider,
Codex, Gemini CLI) receive project conventions and workflow
instructions during phase execution.
@admarble
admarble merged commit 17b4bc3 into main Mar 22, 2026
5 checks passed
@admarble
admarble deleted the feature/371-generate-and-consume-agents-md-for-cross-tool-comp branch March 22, 2026 02:36
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.

Generate and consume AGENTS.md for cross-tool compatibility

1 participant