Skip to content

[BUG] --target opencode still writes to .github/prompts/ and .github/agents #488

Description

@tr4l

Describe the bug

When running apm install --target opencode, APM correctly restricts skill deployment
to .opencode/skills/ but unconditionally writes prompts to .github/prompts/ and
agents to .github/agents/, creating a .github/ directory even when the user never
requested it.

To Reproduce

  1. Create a fresh directory with only .opencode/ present
  2. Run apm install some/package --target opencode
  3. Observe .github/prompts/ and .github/agents/ created alongside .opencode/

Expected behavior

With --target opencode, only .opencode/ should be written to.
No .github/ directory should be created or modified.

Root cause (identified)

In src/apm_cli/commands/install.py, _integrate_package_primitives() runs
prompt_integrator.integrate_package_prompts() and
agent_integrator.integrate_package_agents() unconditionally. The integrate_vscode
guard is only applied to instructions and hooks, not to prompts and .github/agents/.

# No integrate_vscode guard — always writes to .github/prompts/
prompt_result = prompt_integrator.integrate_package_prompts(...)
# No integrate_vscode guard — always writes to .github/agents/
agent_result = agent_integrator.integrate_package_agents(...)
# Correctly guarded
if integrate_vscode:
    instruction_result = ...

Fix: guard both calls behind if integrate_vscode:.
Environment

  • OS: Linux/WSL2
  • Python Version: 3.12
  • APM Version: main@b56c537cf5a23807b01ca7ea434968981bdded36

Metadata

Metadata

Labels

acceptedDeprecated: use status/accepted. Kept for issue history; will be removed in milestone 0.10.0.bugDeprecated: use type/bug. Kept for issue history; will be removed in milestone 0.10.0.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions