Install & setup runbook (for agents)
This file is the operating procedure an AI coding agent follows when asked to install, equip or set up ProAgents artifacts (profiles, crews, or a whole environment). It is written so the job is done entirely — installed, verified, and reported — not left half-finished.
Follow it top to bottom. Each section is ordered; do not skip the verification step. When in doubt, dry-run before writing, and report anything blocked instead of forcing it.
0. What "done" means
A job is complete only when:
- The CLI is available (
proagentresolves,--jsonparses cleanly). - The requested artifact is installed and written to disk (path is into
.agents/,CLAUDE.md/AGENTS.md,.claude/settings.json, or.mcp.jsonas appropriate). - Verification passes:
doctorexits0,validatereports no errors, andlist-installedlists the artifact. - Any
limitations[]the CLI reported are surfaced to the user — never hidden. - You report what was written, what could not be enforced, and what you did not do.
1. Make the CLI available
Requires Node.js ≥ 20. Two ways:
# install globally
npm install -g @reposell/proagent
# or run one-off without installing
npx --yes @reposell/proagent --versionVerify it answers deterministically:
proagent --version
proagent detect --json # harness detection + capabilitiesproagent detect --json returns { status, primary: { id, capabilities, evidence[] }, harnesses[] }. The primary harness is what equip will target by default.
2. Figure out what artifact the user actually wants
ProAgents installs three different shapes. Pick the matching flow:
| User wants | Flow | Command |
|---|---|---|
| One profession on an existing agent | Profile | proagent equip <slug> |
| A crew (team of workers) in the repo | Crew | proagent crew install <id> |
| Several professions + crews at once | Environment | proagents.yaml → proagent setup |
| Browse first | List | proagent list --json / proagent crew list --json |
| Install by registry switch | Unified | proagent install <kind:id> |
Browse what exists before installing:
proagent list --json # { profiles: [{ slug, name, version, description, origin, tags }] }
proagent list --kind crew --json # { items: [<MarketplaceItem>] }
proagent inspect <slug> --json # full profile manifest
proagent crew show <id> --json # full crew definition (workers, permissions, MCP)origin is builtin, local or marketplace — a local .proagent/profiles/ copy wins over the packaged snapshot for the same slug.
3. Fly through the decision procedure
Before writing anything, answer these in order:
- Is it a profile, crew, or environment? → Section 4, 5 or 6.
- Which harness? Default is whatever
detectcalledprimary; override explicitly only if the user names one (--target codex,--harness codex). - Dry-run first. Every install command has
--dry-run— run it, read the plan, then run the real command. Never skip the dry-run for the first execution. - Will it compose? Equipping several profiles merges them. Composition conflicts (
PA022/PA023) block the install with non-zero exit — report them, never bypass. - Will it touch
.mcp.json? Crew installs merge MCP servers and never clobber existing entries. ExpectmcpMergedin the result.
4. Profile flow (equip)
proagent equip <slug> [slug…] --dry-run # the plan, nothing written
proagent equip <slug> [slug…] --json # the installExpected --json shape:
{
"status": "ok",
"command": "equip",
"target": "claude-code",
"profile": ["security-engineer"],
"files": [
{ "path": ".agents/skills/security-engineer/SKILL.md", "mechanism": "agent-skill" },
{ "path": "CLAUDE.md", "mechanism": "project-instructions" },
{ "path": ".claude/settings.json", "mechanism": "rule-enforcement" }
],
"limitations": []
}files[]is the proof of install — every written path.limitations[]is the honest report of what the harness could not express or enforce (e.g.ruleEnforcementunsupported). Report it verbatim to the user.- A blocked equip exits non-zero with
{ status: "blocked", conflicts: [{ code, severity, message, suggestion }] }. Surface the conflict + suggestion.
Equip variants
proagent equip staff-engineer security-engineer # compose professions
proagent equip <slug> --target codex # explicit harness
proagent compile <slug> --target claude-code --json # same pipeline, explicit target
proagent profile install <id> --json # registry-equivalent of equip5. Crew flow (crew install)
proagent crew list --json # what crews exist
proagent crew show <id> --json # workers, permissions, MCP
proagent crew install <id> --dry-run # plan first
proagent crew install <id> --json # the installA crew install writes:
.agents/crews/<crew-id>/
├── manifest.json # full definition (source of truth)
├── SKILL.md # crew-level operating skill
└── workers/
├── <worker>/{SKILL.md, agent.json}
└── …
.mcp.json # MCP servers merged (never clobbers existing entries)Expected --json shape:
{ "status": "ok", "installed": { "crewId": "...", "version": "...", "filesWritten": [], "mcpMerged": true } }Alternatives:
proagent crew build <manifest.json> --json— install from a local builder output / folder-standard manifest.proagent install crew:<id> --json— the unified registry form of the same thing.proagent crew install <id> --repo owner/name --ref dev— another catalog.
If the user has a local crew folder instead (e.g. from the Studio builder), proagent crew install <id> --json from inside the folder that contains .proagent/crews/<id>/manifest.json resolves the local copy.
6. Environment flow (proagents.yaml → setup)
When the user wants several profiles + crews resolved together from a spec:
proagent resolve --json # capability → implementation graph
proagent lock --json # persist proagents.lock (checksummed)
proagent validate --spec --json # end-to-end PA5xx check, must be clean
proagent setup --dry-run # the plan, nothing written
proagent setup --json # spec → resolve → validate → equip/installsetupcomposes the spec's profiles, compiles for the target harness, installs crews, merges.mcp.json, and reports what the harness could not enforce inlimitations(orsteps[].ok/findings).- A blocked setup (
status: "blocked") writes nothing. Resolve the PA5xx problem (see table below) and retry.
| Code | Meaning |
|---|---|
PA501 | invalid proagents.yaml schema |
PA502 | unsatisfiable capability |
PA503 | ambiguous capability, no selection |
PA504 | circular artifact dependency |
PA505 | harness incompatibility |
PA510 | lock stale (spec changed after lock) |
PA511 | lock checksum mismatch / unverified |
7. Verify the install — always
Run all three, in order. They are deterministic and make no writes.
proagent validate --profiles --json # PA03x on-installed + profile validation
proagent list-installed --json # provenance inventory
proagent doctor --json # health of installed artifactsvalidate --profiles→{ status, reports: [{ ok, errors, warnings, findings, profile }] }. Anyerrors > 0means the install is not valid — repair or re-equip.list-installed→{ profiles[], crews[], blocks[], summary }. Confirm the artifact you installed appears in the correct category.hasManifest: truemeans the canonical manifest parses;canonical: truemeans a single-profile install is reconstructible.doctor→{ findings[], summary, exit }. Exit0= healthy,1= warnings only,2= errors present. Doctor codesDG001–DG007; aDG00xfinding must be repaired exceptDG005(stale instruction block — expected after aremove) and warnings (DG006/DG007, unparseable settings/MCP json — still worth flagging).
When something is damaged, repair rebuilds canonical installs from the on-disk manifest:
proagent repair --json # recompiles broken canonical installs, idempotently
proagent repair --target codex --jsonIf a compose (dirname == "slug1-slug2") is damaged, repair reports it in limitations — do not try to force repair; re-equip the full profile set instead.
8. Resolving a removal (if asked)
proagent remove profile:<slug> --json # or crew:<id>, agent:<id>, …
proagent list-installed --json # confirm it is gone
proagent doctor --json # DG005 (stale block) may appear — expectedremove cleans the skill dir, its instruction block and (for crews) the merged MCP references. Verify with list-installed and doctor.
9. Rules that are always in force
- Dry-run before first write. Never skip it.
--jsonis the contract. Parse stdout; never scrape terminal prose. Deterministic core — same state, same bytes.- Blocked ≠ forced. A
status: "blocked"orPA0xx/PA5xxerror exits non-zero. Report the code + suggestion; never bypass validation. limitations[]is a deliverable. Markdown is not enforcement — where the target harness cannot enforce a rule, the report says so. Tell the user, don't hide it.- MCP merges, never clobbers. Crew installs add servers to
.mcp.json; existing entries are preserved. - Errors → stderr, non-zero exit. JSON → stdout. On any confusing non-zero exit, re-read stdout/stderr together before retrying.
10. Report — the shape of a finished job
End your summary with three sections, named exactly:
- Installed: artifact slug/id, target harness, and the list of written paths (from
files[]/filesWritten[]). - Verified:
doctorexit code +list-installedsummary line. - Limitations / not done: any
limitations[]entries, anyDG00xwarnings, and any step you deliberately did not take (plus why).
References
- Deterministic JSON shapes: JSON interface
- Fleet of profiles & crews: Registry guide
- Driving the CLI from an agent: Agent operating guide
- Human quickstart: Getting started
