Repository navigation
Description
Is your feature request related to a problem? Please describe.
apm compile injects several hardcoded comments into every generated CLAUDE.md / AGENTS.md:
# CLAUDE.md
<!-- Generated by APM CLI -->
<!-- Build ID: __BUILD_ID__ -->
<!-- APM Version: 0.8.10 -->
...
<!-- Source: dependency:Owner/pkg/ai-packages/foo apm_modules/.../skill-xxx.instructions.md -->These files are loaded into the agent's context on every session, so each comment costs tokens for the entire conversation. Source attribution and build metadata are useful for humans debugging a compile, but the
agent itself does not benefit from knowing which dependency a given instruction came from.
In a project with many dependencies, the <!-- Source: ... --> lines alone can add up to a non-trivial share of the loaded context.
Describe the solution you'd like
- Default
compilation.source_attributiontofalseinstead oftrue. The current default optimizes for debugging at the cost of every runtime session. - Make the other hardcoded comments in
_generate_claude_content(claude_formatter.py:256-267) —Generated by APM CLI,APM Version, and the trailing*This file was generated by APM CLI...*footer —
opt-in as well, behind the same flag or a related one. - Surface attribution via
apm compile --debug(or--verbose/--trace, which already exists), so people who need it can still get it on demand.
Describe alternatives you've considered
- Setting
compilation.source_attribution: falseinapm.yml— works for theSource:comments, but doesn't remove the other hardcoded headers/footer, and requires every consumer to opt out manually. - Post-processing
CLAUDE.mdafterapm compile— fragile and gets clobbered on every rebuild. - A separate
--minimal/--no-commentsflag — viable, but reusing the existing--verbose/--debugaxis seems cleaner.
Additional context
Relevant code: src/apm_cli/compilation/claude_formatter.py:256-267 (header block) and :307 (source attribution line). The source_attribution flag already exists in CompilationConfig
(agents_compiler.py:56) and apm.yml schema — the proposal is to flip the default and extend coverage to the other comments.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
github-actions commentedon May 30, 2026
Triage decision
accept
Proposed labels
Milestone
0.14.0
Suggested next action
Flip
compilation.source_attributiondefault tofalseinCompilationConfigand extend the flag to cover the hardcoded header/footer block inclaude_formatter.py, surfacing attribution via--verbose/--debug.Suggested issue comment
Per-lens notes (collapsed)
DevX UX Expert -- User-Need Reviewer
Token overhead in compiled context files is a real, measurable cost for every agent session with many dependencies. The request correctly identifies that source attribution serves debugging (one-off use), not runtime (every session). The proposal to make debug output opt-in via existing
--verbose/--debugflags is consistent with the APM CLI mental model. Thesource_attributionflag already exists -- this is a default-flip plus scope extension, not a new mechanism.Supply Chain Security Expert -- Risk-Surface Reviewer
No risk-surface implication. This is a compilation output formatting change with no effect on lockfile integrity, marketplace trust, MCP config, or auth. The
source_attributionfield affects human-readable comments only, not the security-relevant parts of compiled output.OSS Growth Hacker -- Contributor-Tone Reviewer
Author has NONE association -- first-time contributor with a well-researched report including specific file and line references. The reply acknowledges the investigation depth and gives a concrete next step (PR path is clear from the analysis). Tone is collegial and action-oriented.
Python Architect -- Architecture Reviewer
Not activated -- the change is contained to
claude_formatter.pyandagents_compiler.pywith an existing config flag; no cross-module design decision is needed. One note: flipping the default is a behavior change that could surprise users who rely on the comments for debugging -- a CHANGELOG entry and a migration note in the docs are warranted but do not require a design phase.Doc Writer -- Documentation Reviewer
Yes, docs work is implied. The
compilation.source_attributionreference in the apm.yml schema docs and the compilation guide will need a short update to document the new default and the--verboseescape hatch. area/docs-site is not added as a secondary label since the doc change is minor and will naturally accompany the PR.APM CEO -- Triage Arbiter
Accept at priority/low. The token savings are real but not urgent -- this is a quality-of-life improvement that does not block any use case. Milestone 0.14.0 keeps it in the active queue without elevating it above bug fixes. The implementation is straightforward and the contributor has done the discovery work.
{ "decision": "accept", "decision_detail": "", "theme": "theme/portability", "areas": ["area/cli"], "type": "type/feature", "status": "status/accepted", "priority": "priority/low", "preserved_labels": [], "milestone": "0.14.0", "next_action": "Flip compilation.source_attribution default to false and extend the flag to cover the hardcoded header/footer block in claude_formatter.py.", "comment_markdown": "Thanks for the detailed investigation, `@vlsi`. The panel accepts this at priority/low." }docs(changelog): add entry for source_attribution default flip (#1341)
feat(compile): make source-attribution comments opt-in to cut token o…