Bug Description
apm compile -t <target> generates output files for ALL supported targets regardless of what is passed to -t. The flag only controls which harness directories get skills deployed to during apm install, not what compile outputs.
Environment
- APM version: 0.11.0
- OS: Linux (NixOS)
Steps to Reproduce
mkdir -p /tmp/apm-compile-bug/.apm/instructions
cd /tmp/apm-compile-bug
cat > apm.yml << 'EOF'
name: test-bug
version: 1.0.0
type: hybrid
target: opencode
EOF
cat > .apm/instructions/test.instructions.md << 'EOF'
---
description: Test instruction
applyTo: "*.md"
---
Test content.
EOF
# Compile with opencode target only
apm compile -t opencode
Expected Behavior
apm compile -t opencode should only generate AGENTS.md (which is what opencode reads). It should not generate CLAUDE.md, GEMINI.md, or any other target-specific output.
Actual Behavior
$ apm compile -t opencode
[*] Starting context compilation...
[i] Compiling for AGENTS.md + CLAUDE.md + GEMINI.md + .github/ + .claude/ +
.cursor/ + .opencode/ + .codex/ + .gemini/ + .agents/ - explicit --target flag
Running ls after the command shows both AGENTS.md and CLAUDE.md (and likely more if the project had matching target files). The -t opencode flag had no effect on which files were generated.
Additional Context
- The
-t flag description in --help says Target platform: copilot (AGENTS.md), claude (CLAUDE.md), cursor, opencode, or all. — implying it controls compile output, but it does not.
- This produces unwanted files (e.g., a
CLAUDE.md in a repo that only uses opencode) that must then be .gitignore\d or manually cleaned.
- Verified on 0.11.0 with a clean Python environment (no PYTHONPATH pollution).
Suspected Location
The compile command likely ignores the -t/--target parameter and always compiles for all registered targets. The flag is only respected by apm install for harness directory deployment.
Bug Description
apm compile -t <target>generates output files for ALL supported targets regardless of what is passed to-t. The flag only controls which harness directories get skills deployed to duringapm install, not whatcompileoutputs.Environment
Steps to Reproduce
Expected Behavior
apm compile -t opencodeshould only generateAGENTS.md(which is what opencode reads). It should not generateCLAUDE.md,GEMINI.md, or any other target-specific output.Actual Behavior
Running
lsafter the command shows bothAGENTS.mdandCLAUDE.md(and likely more if the project had matching target files). The-t opencodeflag had no effect on which files were generated.Additional Context
-tflag description in--helpsaysTarget platform: copilot (AGENTS.md), claude (CLAUDE.md), cursor, opencode, or all.— implying it controls compile output, but it does not.CLAUDE.mdin a repo that only uses opencode) that must then be.gitignore\d or manually cleaned.Suspected Location
The compile command likely ignores the
-t/--targetparameter and always compiles for all registered targets. The flag is only respected byapm installfor harness directory deployment.