docs: surface compilation.strategy=distributed default in concepts and compile reference (closes #1447)#1551
Open
danielmeppiel wants to merge 1 commit into
Open
Conversation
Add a 'Where compiled context files land' section to the primitives-and-targets concepts page explaining that apm compile defaults to distributed placement (per-directory AGENTS.md/CLAUDE.md driven by applyTo: scopes), and a distributed-layout example to the apm compile reference's Strategy modes section. Default behavior is unchanged. The strategy default and --clean default are deliberately out of scope; flipping them is an RFC. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Docs-only PR to reduce UX surprise by explicitly documenting that apm compile defaults to compilation.strategy: distributed, and showing what “distributed” output looks like in practice.
Changes:
- Document the distributed-by-default compilation strategy and its rationale (Minimal Context Principle) in the concepts ramp.
- Expand
apm compilereference docs with a concrete distributed layout example and a cross-link to the concepts explanation. - Add a Keep-a-Changelog entry under
[Unreleased]for the documentation change.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/reference/cli/compile.md | Expands “Strategy modes” with the distributed default opt-out and a distributed layout example + cross-link. |
| docs/src/content/docs/concepts/primitives-and-targets.md | Adds a new section explaining where compiled context files land and why distributed placement creates subdir outputs. |
| CHANGELOG.md | Adds an Unreleased Documentation entry describing the docs updates. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 3
Comment on lines
+138
to
+140
| working in. If you prefer one combined file at the project root, run | ||
| `apm compile --single-agents` (or set `compilation.single_file: true` | ||
| in `apm.yml`). |
Comment on lines
+210
to
+212
| the Minimal Context Principle. Set `compilation.strategy: | ||
| single-file` (or `compilation.single_file: true`) in `apm.yml` to | ||
| opt out. |
Comment on lines
+14
to
+18
| `apm compile` may add `AGENTS.md` / `CLAUDE.md` files in | ||
| subdirectories driven by `applyTo:` scopes. Adds a new "Where | ||
| compiled context files land" section to the primitives-and-targets | ||
| page and a distributed-layout example in the compile reference. | ||
| Default behavior is unchanged. (closes #1447) -- by @tillig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Pure docs PR. Surfaces the
compilation.strategy: distributeddefault in the two pages where users would actually look for it: the primitives-and-targets concepts ramp and theapm compilereference's Strategy modes section. No behavior change.Closes #1447.
Why
#1447 reports legitimate UX surprise. The user observed:
The default IS distributed (
src/apm_cli/compilation/agents_compiler.py:79) and that is intentional -- it follows the Minimal Context Principle so each agent harness only loads instructions relevant to the directory it is working in. But the default was effectively undocumented in the discoverable surfaces (concepts page, compile reference Strategy modes), buried only in a manifest-schema row and a parenthetical compile note.This PR fixes the docs gap so the next user doesn't get the same shock.
Scope (deliberately narrow)
Per strategic-alignment review on #1447 (verdict: aligned-with-reservations, P4 UX floor), this PR is docs only:
--cleandefault questions are out of scope. Flippingcompilation.strategyfrom distributed to single-file, or flipping--cleanto true by default, would be a silent behavior change that loses trust. Those belong in a separate RFC-style issue with a CHANGELOG BREAKING entry. Not this PR.agents_compiler.py:568-590skips CLAUDE.md instructions when.claude/rules/*.mdalready exists)..github/instructions/exists. Filed as perf/dedup: parity for Copilot AGENTS.md vs .github/instructions/ (sibling of #1445) #1550 for a separate, properly-scoped PR with full TDD; not folded here.What changed
docs/src/content/docs/concepts/primitives-and-targets.md: new "Where compiled context files land" section. Explains distributed placement is driven byapplyTo:globs, that subdirectoryAGENTS.md/CLAUDE.mdfiles are intentional, and links forward to the compile reference and manifest schema. Mentions--single-agentsand--cleanas escape hatches.docs/src/content/docs/reference/cli/compile.md: expanded the existing Strategy modes section with a concrete distributed-layout example (root +scripts/AGENTS.md+tests/AGENTS.md) and a back-link to the concepts section so the user who lands on the reference page from the issue gets the full rationale.CHANGELOG.md:### Documentationentry under[Unreleased], attributed to @tillig.How to test
Then in the local docs site:
apm compileand the manifest schema resolve.grep -nP '[^[:print:][:space:]]' docs/src/content/docs/concepts/primitives-and-targets.md docs/src/content/docs/reference/cli/compile.mdreturns nothing (ASCII-only contract).Out of scope (explicit)
.pychanges. Lint contract not engaged.compilation.strategydefault.--cleandefault.Tracking
compilation.strategydefaulting todistributedis unintuitive, under-documented #1447 -- closed by this PR.