docs(compile): document targets: to pin the committed generated set (#1342)#1583
docs(compile): document targets: to pin the committed generated set (#1342)#1583danielmeppiel wants to merge 3 commits into
Conversation
…1342) Adds a 'Pinning the committed generated set' section to the apm compile reference page explaining that omitting target: in apm.yml causes the committed generated files to silently track whoever last ran apm compile. The recommended fix -- set target: [claude, cursor] (or whichever agents the team uses) -- is now documented with a concrete example. Also adds a 'Deterministic committed output' callout to the manifest-schema target: section (3.6) with a cross-link to the new compile section. No source code changes. Maintainer-endorsed docs-only resolution of #1342. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Documents how to make apm compile output deterministic for repos that commit generated artifacts by explicitly setting target:/targets: in apm.yml, rather than relying on auto-detection from locally-present harness folders.
Changes:
- Adds a "Pinning the committed generated set" section to the
apm compilereference page describing the drift problem and the recommended configuration. - Adds a "Deterministic committed output" callout to the manifest schema
targetfield reference, linking back to the compile documentation.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/reference/cli/compile.md | Adds guidance on pinning generated outputs by setting target:/targets:. |
| docs/src/content/docs/reference/manifest-schema.md | Adds a callout explaining why explicit target selection is needed for deterministic committed artifacts. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 2
| `apm compile` generates derived files: `AGENTS.md`, `CLAUDE.md`, | ||
| `.claude/commands/`, `.cursor/rules/`, `.github/copilot-instructions.md`, | ||
| `.agents/`, and similar. Teams that commit these files into source | ||
| control face a consistency problem: without `target:` set in `apm.yml`, | ||
| auto-detection decides which files to produce based on which tool folders | ||
| exist on the current machine. A developer with `.github/` and `.claude/` | ||
| locally produces `copilot` + `claude` output; a contributor with only | ||
| `.claude/` produces `claude` output only. The committed set silently | ||
| tracks whoever last ran `apm compile`. | ||
|
|
||
| Set `target:` in `apm.yml` to declare exactly which agent formats the | ||
| project supports. Every run of `apm compile` -- local developer, CI, | ||
| cloud agent -- then writes the same files regardless of which tool | ||
| folders exist on that machine: | ||
|
|
||
| ```yaml | ||
| # apm.yml | ||
| target: [claude, cursor] # compile writes exactly these two sets; nothing else | ||
| ``` | ||
|
|
||
| This makes the committed generated files deterministic for humans, | ||
| cloud agents, and contributors who do not run `apm compile` locally | ||
| and rely on the checked-in artifacts. |
| **Deterministic committed output.** Teams that commit the files `apm compile` | ||
| generates face a consistency problem: without `target:` set, auto-detection | ||
| decides which files to produce based on which tool folders exist on the local | ||
| machine. The committed set silently tracks whoever last ran `apm compile`. | ||
| Setting `target:` makes the output deterministic for every developer, CI | ||
| runner, and cloud agent that relies on the checked-in generated files without | ||
| running `apm compile` locally. See | ||
| [Pinning the committed generated set](./cli/compile/#pinning-the-committed-generated-set). |
…ng section - Correct the auto-detect example: two or more detected tool folders resolve to 'all' (not a copilot+claude union); single folder resolves to that one target only - Remove .claude/commands/, .cursor/rules/, .agents/ from the compile output list -- those are apm install outputs; compile writes only root context files (AGENTS.md, CLAUDE.md, GEMINI.md, .github/copilot-instructions.md) - Switch example from target: to targets: (the preferred spelling per manifest-schema 3.6 guidance) - Add cross-reference to Output layout per target table Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
APM Review Panel AdvisoryPR: docs(compile): document target: to pin the committed generated set (#1342) CEO Synthesis: SHIP_WITH_FOLLOWUPSThe PR addresses a genuine discoverability gap and the content quality is good. Two blocking accuracy errors were found by the doc-writer panel and have already been folded into a follow-up commit (HEAD: 1449db6):
Folded (applied in commit 1449db6)
Deferred (recommended follow-ups, not blocking)
Securitysupply-chain-security-expert: clean pass. Pinning targets: is a net supply-chain hygiene improvement -- it eliminates environment-dependent non-determinism in committed generated artifacts. Ship decision: Advisory SHIP_WITH_FOLLOWUPS. The two blocking accuracy issues have been corrected in the follow-up commit. The deferred items are quality improvements suitable for a follow-on PR after merge. |
|
@copilot act on the recommendations above from the last comment |
- Rename section heading to 'Pin committed output with targets:' for better ToC scannability - Move pinning section after Options (before Examples) to follow CLI reference scan pattern - Replace bold-text callout in manifest-schema.md with Starlight :::tip admonition for visual weight - Update link anchor in manifest-schema.md to match renamed heading - Add breadcrumb in first-package.md step 4 pointing to pinning guidance - Expand 'all' expansion description to explicitly name all root context files (GEMINI.md etc.) Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
All five deferred recommendations folded in the latest commit:
Docs build: 112 pages, all internal links valid. |
Description
Documents how to make
apm compileoutput deterministic for repos that commit generated artifacts by explicitly settingtargets:inapm.yml, rather than relying on auto-detection from locally-present harness folders.What this resolves: Issue #1342 originally proposed three code changes (.gitignore coverage, an
apm add-vcsignorecommand, and compile-refuse-overwrite). The maintainer rejected all three code changes and approved the docs-only resolution. This PR implements exactly that maintainer-endorsed scope.The problem documented: When teams commit the files
apm compilegenerates (AGENTS.md,CLAUDE.md,GEMINI.md,.github/copilot-instructions.md) without settingtargets:inapm.yml, auto-detection governs which files are produced. A contributor with only.claude/locally producesclaudeoutput only; a developer who also has.github/triggers the two-or-more-folders rule and gets the fullallexpansion. The committed set silently tracks whoever last ranapm compile.The fix documented: Set
targets:inapm.yml(preferred spelling per manifest-schema 3.6) to declare exactly which agent formats the project supports:Every invocation of
apm compile-- local developer, CI, cloud agent -- then writes the same files regardless of which tool folders exist on that machine.Pages changed:
docs/src/content/docs/reference/cli/compile.md-- new "Pin committed output with targets:" section placed after Options (before Examples), with corrected file list (AGENTS.md,CLAUDE.md,GEMINI.md,.github/copilot-instructions.mdonly --apm installoutputs excluded) and corrected auto-detect behavior (≥2 folders →all, not a union of detected targets)docs/src/content/docs/reference/manifest-schema.md-- "Deterministic committed output" guidance upgraded to a Starlight:::tipadmonition in section 3.6, with cross-link updated to match renamed section headingdocs/src/content/docs/getting-started/first-package.md-- breadcrumb added in step 4'sapm compilecallout pointing users to the pinning guidance before they hit the committed-set consistency painNo source code (
src/) changes.Docs build validation:
Type of change
Testing
Spec conformance (OpenAPM v0.1)