Summary
When agentrc init finishes generating instructions, it should detect APM (Agent Package Manager) and offer to initialize it — enabling developers to distribute their agentrc-generated instructions across teams via apm install.
Motivation
agentrc generates high-quality, repo-aware instructions. APM distributes them. Today, going from "I have instructions" to "my org can install them" requires manually creating apm.yml — a step most developers skip because they do not know about APM or how to set it up.
agentrc init is the natural place to bridge this gap: it already runs interactive prompts (via @inquirer/prompts) and calls out to external tools (git, GitHub API). Adding APM detection follows the same pattern.
Behavior
| APM state |
Interactive mode |
--yes / headless |
apm in PATH + no apm.yml |
Prompt: "Initialize APM for cross-team distribution? (Y/n)" → runs apm init --yes |
Skip |
apm in PATH + apm.yml exists |
Skip |
Skip |
apm not in PATH |
Tip: "💡 Install APM to distribute instructions across your org. See: https://github.com/microsoft/apm" |
Skip (respects --quiet) |
Design principles
- Delegation, not duplication: agentrc never writes
apm.yml — it shells out to apm init --yes. APM owns its manifest.
- Explicit opt-in: the prompt defaults to No.
--yes skips it entirely.
- No new I/O paradigm:
init already uses @inquirer/prompts and respects --yes/--quiet/--json.
- Graceful degradation: when APM is not installed, a single tip line (respecting
--quiet) is the only change.
Implementation
Single file change: src/commands/init.ts — add APM detection and conditional prompt/tip after the generation phase.
Summary
When
agentrc initfinishes generating instructions, it should detect APM (Agent Package Manager) and offer to initialize it — enabling developers to distribute their agentrc-generated instructions across teams viaapm install.Motivation
agentrc generates high-quality, repo-aware instructions. APM distributes them. Today, going from "I have instructions" to "my org can install them" requires manually creating
apm.yml— a step most developers skip because they do not know about APM or how to set it up.agentrc initis the natural place to bridge this gap: it already runs interactive prompts (via@inquirer/prompts) and calls out to external tools (git, GitHub API). Adding APM detection follows the same pattern.Behavior
--yes/ headlessapmin PATH + noapm.ymlapm init --yesapmin PATH +apm.ymlexistsapmnot in PATH--quiet)Design principles
apm.yml— it shells out toapm init --yes. APM owns its manifest.--yesskips it entirely.initalready uses@inquirer/promptsand respects--yes/--quiet/--json.--quiet) is the only change.Implementation
Single file change:
src/commands/init.ts— add APM detection and conditional prompt/tip after the generation phase.