You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(compile): honor compilation.strategy=single-file for CLAUDE.md (closes#1445) (#1514)
* fix(compile): honor compilation.strategy=single-file for CLAUDE.md
_compile_claude_md ignored config.strategy and config.single_agents,
unconditionally building a DistributedAgentsCompiler placement map and
emitting per-subdirectory CLAUDE.md files. This made compilation.strategy
single-file silently no-op for the Claude target while AGENTS.md correctly
collapsed to a single root file.
Mirror the gate from _compile_agents_md: when strategy != distributed or
single_agents is True, collapse the placement_map to {base_dir: all
instructions} so ClaudeFormatter emits only the root CLAUDE.md. Distributed
behavior is preserved for the default path.
Closes#1445
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(compile): address wave-1 advisory follow-ups for #1514
Folds the convergent CHANGELOG ask, the python-architect placement
nit, the cli-logging single-file success-log nit, the devx-ux doc
wording nit, and the test-coverage parametrization nit from the
apm-review-panel CEO ship_with_followups verdict on PR #1514.
- CHANGELOG.md: add Unreleased/Fixed bullet for #1445 (closes the
doc-writer + oss-growth-hacker convergence; required by
.apm/instructions/changelog.instructions.md).
- src/apm_cli/compilation/agents_compiler.py: move
DistributedAgentsCompiler import and instantiation into the
distributed else-branch so single-file mode does not construct
an unused analyzer; guard the later display block on
distributed_compiler is not None. Add a minimal success
progress log on the single-file CLAUDE.md path so users get a
confirmation that single-file strategy took effect (mirrors the
display gap the panel flagged on this new code path).
- docs/src/content/docs/reference/cli/compile.md: replace the
AGENTS.md-centric wording of --single-agents with target-neutral
phrasing now that the flag truly applies to CLAUDE.md too.
- tests/unit/compilation/test_compile_target_flag.py: collapse the
two single-file positive-case tests into one parametrized test
(ids=strategy-single-file, single-agents-flag). Mutation-break
gate confirmed: replacing the gate with 'if False' makes both
parametrized cases fail; restoring the gate makes them pass.
Full tests/unit/compilation/ suite: 1047 passed.
Lint chain (ruff check, ruff format --check, pylint R0801,
auth-signals) all silent.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs+log: address iteration-2 advisory nits for #1514
Folds the five small wording-and-drift nits surfaced by the iteration-2
apm-review-panel pass on PR #1514:
- src/apm_cli/compilation/agents_compiler.py: drop the
', single-file strategy' qualifier from the single-file CLAUDE.md
success log so the message stays user-facing (cli-logging nit).
- CHANGELOG.md: rephrase the trailing maintainer-internal phrase
('Restores multi-harness parity with the AGENTS.md gate.') into a
user-outcome sentence (oss-growth nit).
- docs/src/content/docs/reference/cli/compile.md: drop the explicit
'(AGENTS.md, CLAUDE.md)' parenthetical so the help row does not need
updating when a future target adopts distributed placement
(devx-ux nit).
- docs/src/content/docs/reference/manifest-schema.md: update the
'strategy' row description to target-neutral wording now that the
distributed branch genuinely produces per-directory files for both
AGENTS.md and CLAUDE.md (doc-writer nit; doc drift caused by #1514).
- docs/src/content/docs/producer/compile.md: update the --dry-run
description on the same target-neutral axis (doc-writer nit; doc
drift caused by #1514).
Full tests/unit/compilation/ suite: 1047 passed.
Lint chain (ruff check, ruff format --check, pylint R0801,
auth-signals): silent.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs: target-neutral wording for Strategy modes prose (#1514)
Folds the iteration-3 doc-writer nit on cli/compile.md:205 -- the
'Distributed (default)' bullet still said 'a tree of focused
AGENTS.md files', the same target-naming drift class as the
manifest-schema and producer/compile.md rows already folded.
Mirrors the wording across the three pages so the single source of
truth on the strategy/target axis stays consistent now that the
distributed branch genuinely produces per-directory CLAUDE.md files
too (PR scope).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: danielmeppiel <danielmeppiel@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
24
25
25
### Fixed
26
26
27
+
-`apm compile --target claude` (and the `claude_md` target generally) now honors `compilation.strategy: single-file` and `--single-agents`, collapsing into a single root `CLAUDE.md` instead of silently emitting per-subdirectory `CLAUDE.md` files. Single-file compilation now behaves consistently across all supported targets. (closes #1445) (#1514)
27
28
-`apm install git@gitlab.com:owner/repo.git#ref` now succeeds for users with an SSH key and no `GITLAB_APM_PAT` / `GITLAB_TOKEN`. The validator previously ignored the explicit SSH transport on GitLab refs and demanded an HTTPS-token probe, which raised `Authentication failed for gitlab.com / No token available` even though the matching `dependencies.apm` entry in `apm.yml` installed cleanly via SSH. The validation path now mirrors the clone path (and the existing generic-host explicit-ssh arm) and honors `APM_ALLOW_PROTOCOL_FALLBACK=1` with SSH-first ordering. GitLab SSH-key users get the same frictionless install experience GitHub SSH users already had, matching `apm.yml` end-to-end. (closes #1501)
28
29
-`apm install -g` now correctly integrates hook JSON files authored in the "naked" Claude settings-slice format (event names at top-level, no outer `hooks:` wrap) into `.claude/settings.json`, `.cursor/hooks.json`, and the copilot per-event layout. Previously the file parsed cleanly but produced an empty merge while the user-facing summary still reported `1 hook(s) integrated`. The integrated-hook counter now only increments for files that actually contributed entries, malformed shapes where `hooks` is not a dict fail closed with a warning, and files that contribute zero entries log a warning instead of silently skipping. (closes #1499) (#1516)
29
30
- `apm install` against a registry proxy now works for GitLab nested-group repos (3+ path segments, e.g. `group/subgroup/project`). Previously the proxy resolver guessed `owner/repo` from the first two path segments and treated the rest as an in-repo virtual sub-path, so the downloader requested the wrong archive URL and the install failed with HTTP 404. The new install-time probe HEAD-walks candidate splits against the proxy and locks in the first one whose archive responds, so nested shorthand (`apm install <host>/artifactory/<key>/<group>/<subgroup>/<project>` or the bare-shorthand form under `PROXY_REGISTRY_URL` + `PROXY_REGISTRY_ONLY=1`) just works. The probe distinguishes auth (401/403) from missing-repo (4xx) so a misconfigured token surfaces as an auth problem instead of a "missing repo", and runs with `allow_redirects=False` so the bearer token cannot follow a redirect off the proxy host. When the proxy is unreachable, the `//` notation can mark the repo/virtual boundary explicitly as an escape hatch. (#1472)
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/cli/compile.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ include it in `--target` lists when you also want shared
75
75
| Flag | Description |
76
76
|------|-------------|
77
77
|`-o, --output PATH`| Output file path. Only applies in single-file mode (`--single-agents`). Default: `AGENTS.md`. |
78
-
|`--single-agents`| Force single-file compilation (legacy). Writes one combined file at `--output` instead of distributed AGENTS.md tree. |
78
+
|`--single-agents`| Force single-file compilation (legacy). Writes one combined file at `--output` instead of a distributed per-directory target-file tree. Applies to every target that uses distributed placement. |
79
79
|`--clean`| Remove orphaned AGENTS.md files no longer produced by the current primitive set. |
80
80
81
81
### Content
@@ -202,9 +202,10 @@ file) and re-run `apm compile`.
202
202
203
203
There is no `--strategy` flag. Compilation runs in one of two modes:
204
204
205
-
-**Distributed (default)** -- writes a tree of focused AGENTS.md files
206
-
next to the code they apply to, plus per-target subdirectories. This
207
-
is the recommended mode and follows the Minimal Context Principle.
205
+
-**Distributed (default)** -- writes a tree of focused target files
206
+
(e.g. `AGENTS.md`, `CLAUDE.md`) next to the code they apply to, plus
207
+
per-target subdirectories. This is the recommended mode and follows
208
+
the Minimal Context Principle.
208
209
-**Single-file (`--single-agents`)** -- writes one combined file at
209
210
`--output` (default `AGENTS.md`). Use when a harness or workflow
0 commit comments