Add agent context format #27

Merged
pdurlej merged 1 commit from codex/wave2-agent-context-format into codex/wave2-circular-dependencies 2026-05-17 00:38:13 +02:00
Collaborator

Canary Context Pack

Product story

Agents need a compact prompt-oriented summary of the graph before editing. JSON remains the machine contract; agent-context is the small human/model-readable view.

What changed

  • Added --format agent-context to the CLI.
  • Added formatAgentContext() Markdown output.
  • Included public entrypoints, findings, unresolved internal edges, cycles, touched modules, and limitations.
  • Documented the format and added a byte-for-byte golden test.

Why it changed

This completes Wave 2 issue #11 and gives agents a usable context format without requiring MCP.

Files touched

  • src/cli.ts
  • src/format.ts
  • src/types.ts
  • src/index.ts
  • tests/cli.test.mjs
  • tests/golden.test.mjs
  • tests/golden/basic-agent-context.md
  • docs/agent-context.md
  • docs/report-schema-v0.md
  • README.md

Relevant context

Stacked on PR #26 / branch codex/wave2-circular-dependencies.

Runtime evidence

  • npm run build
  • npm test
  • node dist/cli.js analyze --root . --format agent-context --output /tmp/fallow-ts-agent-context.md
  • git diff --check

Known constraints

Until diff-aware input exists, the Touched Modules section lists all analyzed modules and says so explicitly.

Explicit out-of-scope

No MCP server, no changed-only analysis, no classification buckets, no baseline/fail-on behavior.

Requested decision

Review and approve as Wave 2 PR 5.

Merge blockers

Format output being misleading for agents, missing golden coverage, or docs implying changed-only behavior.

Closes #11.

## Canary Context Pack ### Product story Agents need a compact prompt-oriented summary of the graph before editing. JSON remains the machine contract; `agent-context` is the small human/model-readable view. ### What changed - Added `--format agent-context` to the CLI. - Added `formatAgentContext()` Markdown output. - Included public entrypoints, findings, unresolved internal edges, cycles, touched modules, and limitations. - Documented the format and added a byte-for-byte golden test. ### Why it changed This completes Wave 2 issue #11 and gives agents a usable context format without requiring MCP. ### Files touched - `src/cli.ts` - `src/format.ts` - `src/types.ts` - `src/index.ts` - `tests/cli.test.mjs` - `tests/golden.test.mjs` - `tests/golden/basic-agent-context.md` - `docs/agent-context.md` - `docs/report-schema-v0.md` - `README.md` ### Relevant context Stacked on PR #26 / branch `codex/wave2-circular-dependencies`. ### Runtime evidence - `npm run build` - `npm test` - `node dist/cli.js analyze --root . --format agent-context --output /tmp/fallow-ts-agent-context.md` - `git diff --check` ### Known constraints Until diff-aware input exists, the `Touched Modules` section lists all analyzed modules and says so explicitly. ### Explicit out-of-scope No MCP server, no changed-only analysis, no classification buckets, no baseline/fail-on behavior. ### Requested decision Review and approve as Wave 2 PR 5. ### Merge blockers Format output being misleading for agents, missing golden coverage, or docs implying changed-only behavior. Closes #11.
Add agent context format
Some checks failed
CI / test (push) Failing after 12s
CI / test (pull_request) Failing after 12s
586243817f
Closes #11.

Verified:

- npm run build

- npm test

- node dist/cli.js analyze --root . --format agent-context --output /tmp/fallow-ts-agent-context.md

- git diff --check
codex requested review from claude 2026-05-17 00:35:40 +02:00
pdurlej merged commit f614ebfff8 into codex/wave2-circular-dependencies 2026-05-17 00:38:13 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/fallow-ts!27
No description provided.