| name | agent-biz-provisioning |
| description | Third and final skill of the agent-biz pipeline. Use when both an approved plan.md and a confirmed team-manifest.yaml exist and a company repo needs to be created. Executes the 8-phase provisioning flow — initializes a git repo at ~/.config/agent-biz/companies/{slug}/, writes all canonical files (CONTRACT.md, decisions.md, ledger.md, agents/, policies/, README.md, etc.), and produces the founding commit. After provisioning the skill exits. |
Agent-Biz Provisioning
You are the provisioning skill — the final step of the agent-biz pipeline. Your job is to take an approved plan.md and a confirmed team-manifest.yaml and produce a fully-instantiated company repo on disk, all-or-nothing.
Project resources
The canonical agent-biz design docs live in the user's local agent-biz project directory. The exact location varies per user — do not assume a fixed path. On first use in a session, locate the project root by:
- Checking for an
AGENT_BIZ_ROOT environment variable.
- Looking for an
agent-biz/ directory at common locations (current working directory, parent dirs, ~/dev/, ~/projects/, ~/code/, ~/).
- Asking the user where their agent-biz project root is.
Once $ROOT is known, read these files relative to it:
$ROOT/PROVISIONING_MECHANICS.md — full 8-phase spec (this skill's canonical reference)
$ROOT/BASE_AGENT_CONTRACT.md — the contract template that becomes CONTRACT.md after token substitution
$ROOT/COMPANY_OS.md — filesystem layout
$ROOT/ROLE_CATALOG.md — per-role starter backlogs, scheduled tasks, KPIs, anti-helpfulness rules, and policy domain ownership
- Per-artifact templates live in this skill's
templates/ dir (relative to this SKILL.md)
- Per-role policy starter templates live in
templates/policies/{role}.md
Inputs
Required (passed from chained invocation, or read from default paths):
~/.config/agent-biz/intake/plan.md — approved plan
~/.config/agent-biz/intake/team-manifest.yaml — confirmed team
Optional:
- Founder-specified target directory (overrides default)
Output
A git-initialized directory at ~/.config/agent-biz/companies/{company-slug}/ with the full Company OS layout, a single founding commit, and a hand-off summary printed to the founder.
The 8-phase flow
Execute strictly in order. Any phase failure → rollback (rm -rf the working directory, write ~/.config/agent-biz/intake/provisioning-error.md, exit). No half-provisioned companies.
Phase A — Pre-flight
- Re-validate
plan.md per INTAKE_SCHEMA.md §5 (10 rules). Even though intake validated, do it again — provisioning is the final gate.
- Validate
team-manifest.yaml:
schema_version: 0.1 present.
- Every
role field maps to a known slug from ROLE_CATALOG.md (ceo, finance, product, delivery, sales, marketing, support, design, editorial, security, analytics).
- Every team entry has
name and rationale.
total_agents between 3 and 12.
- Both
ceo and finance present.
- Resolve target directory:
- Founder-specified, OR
~/.config/agent-biz/companies/{slug}/.
- Slug derivation: if plan §1 has a real business name, derive
{slug} from it (lowercase, hyphenated, ASCII, max 40 chars). If §1 is (team to propose) or blank, use unnamed-YYYY-MM-DD as the slug — the team will pick the actual business name post-provisioning, but the directory slug stays stable (renaming a git repo is friction; renaming the business is normal CI/CD).
- If exists and non-empty: refuse. Tell the founder to specify a different path or delete.
- Resolve agent names from manifest. If two agents share a name, surface and ask the founder to disambiguate.
- Note whether the business is unnamed. If §1 is
(team to propose) or blank, set an internal flag business_unnamed = true. This flag changes:
- CONTRACT.md
{{BUSINESS_NAME}} token → render as (name TBD — team to propose).
- Founding
decisions.md entry rationale → mention naming as an open week-1 task.
- CEO's
agents/ceo.md Active Backlog → prepend [ ] **Top priority — propose business name candidates** with Marketing (and Designer if present), present top 3 to founder via CEO Decision Report, ratify the chosen name as an amendment in decisions.md.
- Marketing's
agents/marketing.md (if Marketing is in team) → add [ ] Co-propose business name candidates with CEO; bring channel-fit and ICP-resonance perspective.
- Designer's
agents/design.md (if Designer is in team) → add [ ] Co-propose business name candidates with CEO; bring brand-feel and visual-evocation perspective.
- README.md → add a "Pick a name" callout at the top.
If pre-flight fails: write the issues, surface, exit. Do not roll back (nothing to roll back yet).
Phase B — Repo init
mkdir -p {target-directory}
cd {target-directory} && git init
mkdir status
Phase C — Canonical files (root level)
Write in this order:
-
CONTRACT.md — instantiate BASE_AGENT_CONTRACT.md (read from project root) with token substitution. Tokens to substitute:
{{BUSINESS_NAME}} ← plan §1 name
{{ONE_LINE_MISSION}} ← plan §1 tagline
{{USER_PROVIDED_RULES}} ← plan §9 real-time gates as bullet list (or "(none)" if empty)
{{CEO_NAME}} ← team manifest CEO name
{{AGENT_NAME}}, {{ROLE_TITLE}} — the per-agent values; for CONTRACT.md leave these as {{AGENT_NAME}} and {{ROLE_TITLE}} because they are role-instantiation tokens, not company-level tokens. They get resolved at agent file generation time (Phase D), not here.
{{IDENTITY_PATH}} ← agents/{slug}.md (per-agent; same caveat — leave as token)
- All path tokens in §4 systems-of-record table ← per
COMPANY_OS.md §3.2 defaults (already resolved canonically — decisions.md, ledger.md, etc.)
The status header at the top of the contract becomes:
Status: Instantiated for {{BUSINESS_NAME}} on {{ISO_DATE}} by agent-biz-provisioning skill v0.1.
-
decisions.md — header + founding entry. See templates/decisions-founding.md.
-
ceo-report.md — header + founding key-decision entry. See templates/ceo-report-founding.md.
-
ledger.md — header, cash table with one row for the starting balance from plan §7 Constraints → Budget. See templates/ledger-init.md.
-
contacts.md — header only, empty body. See templates/contacts-init.md.
Phase D — Per-agent files
For each agent in team manifest (CEO first, Finance second, situational roles in slug-alphabetical order):
- Write
agents/{slug}.md per templates/agent.md.
- Substitute tokens with per-agent values from the manifest + role spec (
ROLE_CATALOG.md).
- Identity section is the lookup target for
{{IDENTITY_PATH}} from CONTRACT.md.
- Backlog: pull starter items from the role's spec in
ROLE_CATALOG.md §2 or §3, plus any plan-specific items you can derive.
- Scheduled Tasks: pull from role spec defaults.
- Recent Standups: empty (no standups yet).
Phase E — Per-policy files
For each role's owned policy domain, copy the corresponding policy template from templates/policies/{role}.md (relative to this SKILL.md), substitute tokens, and write to {target-directory}/policies/{file}.md.
Roles → policy files (skip any role not in the team manifest):
| Role | Policy file written | Source template |
|---|
| ceo | (none — CONTRACT.md covers governance) | — |
| finance | policies/finance.md AND policies/ops.md | templates/policies/finance.md, templates/policies/ops.md |
| product | policies/product.md | templates/policies/product.md |
| delivery | policies/delivery.md | templates/policies/delivery.md |
| sales | policies/sales.md | templates/policies/sales.md |
| marketing | policies/marketing.md | templates/policies/marketing.md |
| support | policies/support.md | templates/policies/support.md |
| design | policies/brand.md | templates/policies/brand.md |
| editorial | policies/editorial.md | templates/policies/editorial.md |
| security | policies/security.md | templates/policies/security.md |
| analytics | policies/data.md | templates/policies/data.md |
Token substitutions for each policy template:
{{ROLE_NAME}} (e.g., {{FINANCE_NAME}}, {{SALES_NAME}}) ← team manifest entry name
{{role_slug}} (e.g., {{finance_slug}}) ← lowercase slug
{{ISO_DATE}} ← provisioning date
{{RISK_TIER}} ← plan §8
{{DAILY_CAP}}, {{TXN_MAX}}, {{MARGIN_FLOOR}}, {{DISCOUNT_CAP}} ← derived from risk tier:
- conservative: $50 / $500 / 80% / 5%
- balanced: $500 / $2000 / 50% / 10%
- aggressive: $2000 / $10000 / 30% / 15%
{{PRICE_FROM_PLAN}}, {{PRICE_CADENCE}}, {{VARIABLE_COST}} ← plan §6
{{ICP_FROM_PLAN}} ← plan §3
{{CHANNEL_PROSE_FROM_PLAN}} ← plan §5
{{CADENCE_FROM_PLAN}} ← plan §4 / §11 if editorial publication cadence specified
- Other plan-derived values ← read from plan as needed
Where a template has placeholders like {{HOUSE_RULE_1}} or {{ICP_CRITERION_1}}, infer reasonable starters from the plan. If you can't infer with confidence, leave the placeholder OR replace with (TBD — {{ROLE_NAME}} to draft in week 1).
Each policy file ends with **Last amended:** {{ISO_DATE}} — provisioning founding commit (\decisions.md#provisioning-founding`).` — preserve that line.
Phase F — Onboarding content
messages/{ISO_DATE}-001-onboarding.md — team intro thread, one paragraph per agent. See templates/onboarding.md.
README.md — founder home page. See templates/README.md.
plan.md — copy the approved plan.md from ~/.config/agent-biz/intake/plan.md to the company repo root. Add a comment at the top reminding the founder it's frozen:
<!--
This file is FROZEN. Do not edit post-provisioning.
To change direction, work with your CEO agent or tear down and re-provision.
See CONTRACT.md §4 for the rule.
-->
Phase G — Founding commit
git add .
- Commit with the message format in
templates/commit-message.md. The author and committer use the founder's git config (do not override). The commit message includes the standard Claude Code trailer:
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Practical command:
cd {target-directory} && \
git add . && \
git commit -m "$(cat <<'EOF'
provisioning: company instantiated
Provisioned {N} agents per the standardized plan.
Plan: plan.md (committed; frozen post-provisioning)
Contract: CONTRACT.md (instantiated v0.3)
Agents:
- {CEO_NAME} (CEO)
- {FINANCE_NAME} (Finance / Operations)
...
decisions.md#{founding-anchor}
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
If git commit fails (no user.email configured, hook failure, etc.): roll back, surface the git error to the founder so they can fix their git config.
Phase H — Hand-off
Print the hand-off summary (per PROVISIONING_MECHANICS.md §10) to the founder:
✓ Provisioning complete.
Business: {{BUSINESS_NAME}}
Mission: {{ONE_LINE_MISSION}}
Location: {{TARGET_DIRECTORY}}
Agents: {{N}}
{{CEO_NAME}} CEO
{{FINANCE_NAME}} Finance / Operations
{{...}} ...
Plan: plan.md (committed; frozen)
Contract: CONTRACT.md (instantiated v0.3)
To pause everything: touch {{TARGET_DIRECTORY}}/status/kill-switch
To resume: rm {{TARGET_DIRECTORY}}/status/kill-switch
Suggested first reads:
1. {{TARGET_DIRECTORY}}/README.md
2. {{TARGET_DIRECTORY}}/ceo-report.md
3. {{TARGET_DIRECTORY}}/CONTRACT.md (skim §11.1 — legality and ethics framework)
The skill is now exiting. Configure your runtime to invoke each agent on schedule.
The team is ready.
Exit. Do not invoke another skill — provisioning is the end of the chain.
Validation between phases
After each phase, sanity-check before continuing:
| Phase | Check |
|---|
| A | plan + manifest valid; target directory empty/free |
| B | .git/ exists; status/ exists |
| C | Each canonical file exists, parses as markdown, contains expected anchors |
| D | One file per agent; identity section present; backlog non-empty |
| E | One file per role's owned domain; each ends with **Last amended:** line |
| F | Onboarding thread present and resolved; README contains business name; plan.md copied with frozen comment |
| G | git log shows exactly one commit with the expected message structure |
If any check fails: roll back, write error, exit non-zero.
Critical rules
- All-or-nothing. Founding commit succeeds or no trace remains.
- Refuse if target directory is non-empty. No overwrites.
- Founder is git author. The
Co-Authored-By: Claude trailer attributes the assist; the skill is not an authorial entity.
- plan.md is frozen the moment the founding commit lands. The frozen comment goes in the file as a runtime reminder; the rule is also in CONTRACT.md §4.
- No external SaaS by default. The repo is markdown + git only. Upgrade paths are documented in CONTRACT.md / Company OS but agents pitch for them via the CI/CD spine after operation begins.
- No skill chaining at the end. Provisioning is the terminus. Print the hand-off summary and exit.
References
PROVISIONING_MECHANICS.md (project root) — canonical 8-phase spec
BASE_AGENT_CONTRACT.md (project root) — the contract template that becomes CONTRACT.md
COMPANY_OS.md (project root) — filesystem layout
ROLE_CATALOG.md (project root) — role specs (starter backlogs, policy domains)
templates/ (this directory) — per-artifact content templates