Why
APM and agentrc are complementary tools: agentrc generates tailored agent instructions from real code analysis, APM distributes and governs them across teams. The agentrc side already bridges to APM — agentrc init detects APM and offers to run apm init (agentrc PR #94, merged).
The reverse bridge is missing. Developers who discover APM first should learn about agentrc at the right moment: when they just initialized a project and have no agent instructions yet.
What
After apm init creates apm.yml, the "Next Steps" panel should contextually suggest agentrc — not as a prompt or subprocess call, but as an informational next step alongside the existing ones.
Behavior matrix
| State |
What changes |
agentrc in PATH + no instructions exist |
First next step becomes: Generate agent instructions: agentrc init |
agentrc not in PATH + no instructions exist |
Tip line after the panel: Tip: use agentrc to generate tailored agent instructions from your codebase. https://github.com/microsoft/agentrc |
Instructions already exist (.github/copilot-instructions.md, AGENTS.md, etc.) |
No mention — we do not presume how they got there |
--yes mode |
Next step text included in output (informational, no interaction) |
Why "Next Steps" and not a prompt
APM init is fast and deterministic — no LLM calls, no network beyond git config detection. Running agentrc init as a subprocess would take 30-60s (Copilot SDK calls) and break the flow. A next step is a suggestion the user acts on when ready. Same pattern as npm scaffolders printing what to do next.
How
~30 lines in src/apm_cli/commands/init.py:
- Add detection helper:
import shutil
from pathlib import Path
def _detect_agentrc(project_root: Path) -> tuple[bool, bool]:
"""Returns (agentrc_installed, has_instructions)."""
installed = shutil.which("agentrc") is not None
has_instructions = any([
(project_root / ".github" / "copilot-instructions.md").exists(),
(project_root / "AGENTS.md").exists(),
(project_root / ".github" / "instructions").is_dir(),
])
return installed, has_instructions
-
Modify next steps building (around line 134-157) to conditionally prepend the agentrc step.
-
Add tip after the panel when agentrc not installed and no instructions found.
No new dependencies, no prompts, no subprocess calls.
Related
Why
APM and agentrc are complementary tools: agentrc generates tailored agent instructions from real code analysis, APM distributes and governs them across teams. The agentrc side already bridges to APM —
agentrc initdetects APM and offers to runapm init(agentrc PR #94, merged).The reverse bridge is missing. Developers who discover APM first should learn about agentrc at the right moment: when they just initialized a project and have no agent instructions yet.
What
After
apm initcreatesapm.yml, the "Next Steps" panel should contextually suggest agentrc — not as a prompt or subprocess call, but as an informational next step alongside the existing ones.Behavior matrix
agentrcin PATH + no instructions existGenerate agent instructions: agentrc initagentrcnot in PATH + no instructions existTip: use agentrc to generate tailored agent instructions from your codebase. https://github.com/microsoft/agentrc.github/copilot-instructions.md,AGENTS.md, etc.)--yesmodeWhy "Next Steps" and not a prompt
APM init is fast and deterministic — no LLM calls, no network beyond git config detection. Running
agentrc initas a subprocess would take 30-60s (Copilot SDK calls) and break the flow. A next step is a suggestion the user acts on when ready. Same pattern as npm scaffolders printing what to do next.How
~30 lines in
src/apm_cli/commands/init.py:Modify next steps building (around line 134-157) to conditionally prepend the agentrc step.
Add tip after the panel when agentrc not installed and no instructions found.
No new dependencies, no prompts, no subprocess calls.
Related