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_attribution to false instead of true. 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: false in apm.yml — works for the Source: comments, but doesn't remove the other hardcoded headers/footer, and requires every consumer to opt out manually.
- Post-processing
CLAUDE.md after apm compile — fragile and gets clobbered on every rebuild.
- A separate
--minimal / --no-comments flag — viable, but reusing the existing --verbose / --debug axis 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.
Is your feature request related to a problem? Please describe.
apm compileinjects several hardcoded comments into every generatedCLAUDE.md/AGENTS.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
compilation.source_attributiontofalseinstead oftrue. The current default optimizes for debugging at the cost of every runtime session._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.
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
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.CLAUDE.mdafterapm compile— fragile and gets clobbered on every rebuild.--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). Thesource_attributionflag already exists inCompilationConfig(
agents_compiler.py:56) andapm.ymlschema — the proposal is to flip the default and extend coverage to the other comments.