Monorepo Primary Package AGENTS.md
When a monorepo's primary package is opened directly in Cursor/Copilot/Windsurf (e.g., `packages/cli` instead of the repo root), there's no AGENTS.md present. Users get zero Anatomia context. Generate a minimal AGENTS.md in the primary package directory that provides essential context and points to the root for the full picture.
verdict PASSscore 13 / 13findings 5 (0 risk · 0 debt · 5 obs)duration 1h 21mrejection cycles 0shipped Apr 16, 2026
Pipeline timeline
Intent to proven code in 1h 21m across Think, Plan, Build, and Verify.
Think16m
Plan16m
Build49m
Verify0m
Assertion ledger
13 claims, each independently verified. Showing 8 — show all →
| ID | Says | Matcher | |
|---|---|---|---|
| A001 | Init creates an AGENTS.md inside the primary package directory for monorepos | verified | ok |
| A002 | The generated file starts with the package name as its heading | verified | ok |
| A003 | The file identifies itself as the primary package of the project | verified | ok |
| A004 | The file includes a commands section when commands are available | verified | ok |
| A005 | The test command is included and made non-interactive | verified | ok |
| A006 | The file points readers to the root AGENTS.md for full project context | verified | ok |
| A007 | The relative path to root is correct for the package nesting depth | verified | ok |
| A008 | Single-level package paths produce the correct relative pointer | verified | ok |
Findings 5 total
obspackages/cli/src/commands/init/assets.ts→ closed
Latent edge case with degenerate package paths — assets.ts:575 `pkg.path.split('/').filter(Boolean).length` would produce incorrect relative paths for `"."` (depth 1 → `../AGENTS.md`) or `""` (depth 0 → bare `AGENTS.md`). These values don't occur in practice — monorepo tools always produce subdirectory paths. Not a blocker, but if this function is ever reused for arbitrary paths, it would need a guard.
obspackages/cli/src/commands/init/assets.ts→ closed
Windows path separators in pkg.path — assets.ts:575 splits on `/` only. If `pkg.path` somehow contained backslashes (e.g., from a Windows monorepo tool), the depth calculation would be wrong. Again unlikely in practice since the engine normalizes paths, but worth noting for cross-platform awareness.
obspackages/cli/src/commands/init/assets.ts→ closed
No integration test for call-site wiring — The tests verify `generatePrimaryPackageAgentsMd` directly but don't test that `createClaudeConfiguration` actually calls it. The call sites at assets.ts:193 and 242 are verified by code reading only, not by a test that runs the full init flow. This is consistent with the project's existing pattern (the root `generateAgentsMd` also lacks an integration test for its call sites), so not a deviation — but the wiring is untested.
obsAGENTS.md→ closed
A006 assertion is weak for its contract — The contract says the file "points readers to the root AGENTS.md." The test checks `toContain('AGENTS.md')` and `toContain('Full Project Context')` separately, but doesn't verify they appear together as a markdown link. The implementation does produce a proper link, but the test would pass even if the function just mentioned "AGENTS.md" in a comment. Minor — the A007/A008 tests for relative paths provide stronger evidence.
obsAGENTS.md→ closed
Contract A006 value is overly broad — The contract assertion `matcher: contains, value: "AGENTS.md"` is too permissive. Every assertion in this test suite mentions AGENTS.md in some form. The value should have been `[AGENTS.md](` or similar to verify the markdown link specifically, not just the filename.
Integrity seal
scopesha256:6a9535826961e...
contractsha256:342c507cb3627...
plansha256:2e96efa5b351d...
specsha256:cb110287dabed...
build-reportsha256:0d15c9c5f330b...
audit cmd$ ana proof audit monorepo-primary-agents-md → all hashes match