@yemi33/minions 0.1.2363 → 0.1.2365

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,246 +1,124 @@
1
- # Minions Onboarding Your First 30 Minutes
1
+ # Minions Onboarding: Your First 30 Minutes
2
2
 
3
- A fast, hands-on walkthrough for new contributors. Follow the eight steps below in order. Each step is independent enough that you can stop, take a break, and resume without losing state.
3
+ This condensed operator walkthrough gets one repository from installation to a
4
+ completed first dispatch. For deeper, progressive exercises, use the
5
+ [full tutorial track](tutorials/README.md).
4
6
 
5
- > **Prerequisites:** Node.js 22.5+ (required by `package.json#engines` for the `node:sqlite` runtime backing the state DB), Git, and a working Claude Code CLI (`npm install -g @anthropic-ai/claude-code`) authenticated against your Anthropic API key or Claude Max subscription. See the top-level [README.md](../README.md#prerequisites) for the full list.
7
+ ## Prerequisites
6
8
 
7
- > **Screenshots:** This walkthrough is intentionally text-only on the first pass. If you want annotated dashboard screenshots, run the [`capture-demos`](../README.md#dashboard) skill after Step 5; it drives Playwright over the running dashboard and writes images you can drop alongside each section.
9
+ - Node.js 22.5 or newer
10
+ - Git
11
+ - One supported runtime CLI with working authentication
12
+ - A local Git repository you are comfortable allowing an agent to change
8
13
 
9
- ---
14
+ Minions defaults to GitHub Copilot CLI. Claude Code and Codex are also
15
+ supported.
10
16
 
11
- ## Step 1 Clone the repo
12
-
13
- You only need to clone if you intend to modify Minions itself. End users normally `npm install -g @yemi33/minions` instead, but a checkout is the right starting point for contributors.
14
-
15
- ```bash
16
- git clone https://github.com/yemi33/minions.git ~/minions-dev
17
- cd ~/minions-dev
18
- npm install # installs dev tooling (Playwright, ESLint) only; the engine itself has zero runtime deps (Node built-ins)
19
- ```
20
-
21
- You should now have:
22
-
23
- - `engine.js` — the orchestrator entry point
24
- - `dashboard.js` — the HTTP/UI server (binds `:7331`)
25
- - `minions.js` — the CLI shim that maps `minions <cmd>` to the right script
26
- - `playbooks/`, `agents/`, `prompts/`, `docs/` — content the engine renders into agent prompts
27
- - `test/` — `unit.test.js`, the integration suite, and Playwright specs
28
-
29
- If you cloned to somewhere other than `~/.minions`, the CLI will still work — `minions init` writes runtime state under `~/.minions/` regardless of where the source lives. The `node` scripts under your checkout will use the checkout as the runtime root when invoked directly (e.g. `node ./engine.js start`).
30
-
31
- ---
32
-
33
- ## Step 2 — Run `minions doctor`
34
-
35
- `minions doctor` runs the same preflight checks the engine runs at startup. It is safe to run any time and never mutates state.
17
+ ## 1. Install and initialize
36
18
 
37
19
  ```bash
20
+ npm install -g @yemi33/minions
21
+ minions init
38
22
  minions doctor
39
23
  ```
40
24
 
41
- A healthy Mac/Linux run looks roughly like:
25
+ Resolve every doctor `FAIL` before continuing. To select another runtime:
42
26
 
27
+ ```bash
28
+ minions config set-cli claude
29
+ # or: minions config set-cli codex
43
30
  ```
44
- Runtime:
45
-
46
- ✓ node: v20.11.1 (>= 18 required)
47
- ✓ git: git version 2.45.0
48
- ✓ claude CLI: 1.0.x found on PATH
49
-
50
- Authentication:
51
-
52
- ✓ ANTHROPIC_API_KEY: set
53
- ✓ gh auth: logged in as <you>
54
31
 
55
- Filesystem:
32
+ `minions init` creates `~/.minions/`. Primary migrated runtime state lives in
33
+ `engine/state.db` (SQLite, WAL mode). Files such as `engine/dispatch.json` and
34
+ `engine/metrics.json` are passive diagnostic mirrors; `engine/control.json`
35
+ remains a live JSON control file.
56
36
 
57
- ~/.minions writable
58
- ✓ engine/ writable
37
+ ## 2. Link a project
59
38
 
60
- All checks passed.
39
+ ```bash
40
+ minions add C:\code\sample-project
41
+ minions list
61
42
  ```
62
43
 
63
- What to look for:
64
-
65
- - `✓` (green) means OK. `!` is a warning the engine can usually work around. `✗` (critical) will block dispatch — fix it before continuing.
66
- - The most common failure is `claude CLI: not found` — re-install with `npm install -g @anthropic-ai/claude-code` and re-run.
67
- - On Windows, runtime resolution prefers native `claude.exe` over the POSIX bash shim; if you see runtime-resolution warnings, `gh auth status` and `where.exe claude` are good first stops.
68
-
69
- If `doctor` reports any `✗`, stop and resolve it. The remaining steps assume a clean preflight.
70
-
71
- ---
44
+ Use the corresponding local path on macOS or Linux. Confirm the detected
45
+ repository host, remote, main branch, and project description. Write the
46
+ description as a responsibility, such as "Billing API and webhook ingestion,"
47
+ because agents use it when routing project-agnostic work.
72
48
 
73
- ## Step 3 Bootstrap state with `minions init`
74
-
75
- `minions init` scaffolds `~/.minions/` with a default config, five agent charters, default playbooks, an empty knowledge base, and the engine state files.
49
+ ## 3. Start the engine and dashboard
76
50
 
77
51
  ```bash
78
- minions init
52
+ minions start --open
79
53
  ```
80
54
 
81
- After init you will have (under `~/.minions/`):
55
+ `start` is idempotent and starts both services. If the browser does not open:
82
56
 
83
- - `config.json` — projects, agents, schedules
84
- - `agents/<name>/charter.md` — the personality + boundaries for each of the five default agents (`ripley`, `dallas`, `lambert`, `rebecca`, `ralph`)
85
- - `engine/dispatch.json`, `engine/control.json`, `engine/metrics.json` — empty queues, ready for first dispatch
86
- - `pinned.md`, `notes.md` — empty team-memory surfaces
87
- - `playbooks/`, `prompts/`, `routing.md` — agent prompt scaffolding
57
+ ```bash
58
+ minions dash
59
+ ```
88
60
 
89
- `init` is safe to re-run; existing customizations to `config.json`, charters, notes, knowledge, and routing are preserved. To force overwrites after a major version bump, use `minions init --force`.
61
+ The dashboard normally binds to port 7331 and records the actual port if it has
62
+ to scan for a free one.
90
63
 
91
- ---
64
+ The main pages are **Home**, **Work**, **PRs**, **Plans**, **Inbox**, **Tools**,
65
+ **Schedule**, **Watches**, **Pipelines**, **Meetings**, **QA**, and **Engine**.
66
+ Settings are available from the application controls.
92
67
 
93
- ## Step 4 Link your first project with `minions add`
68
+ ## 4. Dispatch one bounded task
94
69
 
95
- A "project" tells Minions which repo to discover work for and where to spawn worktrees. The CLI auto-detects host (GitHub/ADO), org, repo name, and main branch from the directory's git remote.
70
+ Use a small task with an obvious result:
96
71
 
97
72
  ```bash
98
- minions add ~/code/your-repo
73
+ minions work "Add a Development section to README.md that names the existing test command"
74
+ minions dispatch
75
+ minions queue
99
76
  ```
100
77
 
101
- You will be prompted to confirm or override the auto-detected fields, plus a one-line description. The description is **important** agents read it during routing to decide whether a work item belongs to your repo. Keep it specific (e.g. "Internal billing API and webhook ingestion service") rather than generic ("Backend code").
78
+ For explicit project selection, create the item from **Work** or Command Center
79
+ and choose your project rather than Auto.
102
80
 
103
- After `minions add` returns, `~/.minions/config.json` has a new `projects[]` entry, and `~/.minions/projects/<name>/` holds the per-project `work-items.json` + `pull-requests.json` trackers.
81
+ Watch the assigned agent from **Home**, then open its **Live Output**. A
82
+ mutating dispatch receives an isolated worktree, the matching playbook, project
83
+ context, and the configured runtime.
104
84
 
105
- To link several at once interactively, run `minions scan` (default: scans `~` to depth 3 for git repos and lets you multi-select).
106
-
107
- ---
108
-
109
- ## Step 5 — Start engine + dashboard with `minions restart`
110
-
111
- `minions restart` starts (or restarts) both the engine daemon and the dashboard server. Use `restart` rather than `start` whenever you have edited engine code or playbooks — it ensures the daemon picks up your changes.
85
+ ## 5. Inspect completion
112
86
 
113
87
  ```bash
114
- minions restart
88
+ minions status
89
+ minions queue
115
90
  ```
116
91
 
117
- You should see logs like `Engine started (pid=…)` and `Dashboard listening on http://localhost:7331`. Open the dashboard:
92
+ Open the item on **Work** to inspect its output, branch, artifacts, and linked
93
+ pull request. If the item remains pending, read `_pendingReason`. If it fails,
94
+ inspect the failure class before retrying:
118
95
 
119
96
  ```bash
120
- minions dash # opens http://localhost:7331 in your default browser
97
+ minions wi show <work-item-id>
98
+ minions wi retry <work-item-id>
121
99
  ```
122
100
 
123
- A quick tour of the panels you will use most often during onboarding:
124
-
125
- | Panel | What it shows | When to use it |
126
- |---|---|---|
127
- | **Projects bar** (top) | All linked projects with descriptions | Confirm Step 4 worked |
128
- | **Minions Members** | Five agent cards with status, current task, last result | Watch dispatches happen in real time |
129
- | **Live Output** (per agent) | Streaming `live-output.log` | Tail an agent while it runs — refreshes every 3 s |
130
- | **Command Center** (CC button, top-right) | Conversational chat with Claude over your full Minions state | Ask questions, queue work, draft plans |
131
- | **Work Items** | Paginated table of all work, filterable by project/status | Inspect / retry / archive |
132
- | **Plans & PRD** | Plan markdown drafts and approved PRDs | Approve, discuss-and-revise, or reject plans |
133
- | **Pull Requests** | Cached PR status (build, review, merge) | Track the PRs your agents create |
134
- | **Engine** | Dispatch queue, engine log, LLM call performance | Diagnose timing / token issues |
135
-
136
- The engine ticks every 10 seconds. If the dashboard says "Engine: stopped", run `minions restart` again — the dashboard auto-restarts a dead engine on its next health check, but a manual restart is faster.
137
-
138
- ---
139
-
140
- ## Step 6 — Your first dispatch via the Command Center
101
+ Correct authentication, configuration, workspace-manifest, or checkout
102
+ failures before retrying.
141
103
 
142
- The fastest way to give Minions a task is the Command Center (CC).
104
+ ## 6. Try a plan
143
105
 
144
- 1. Click the **CC** button in the top-right of the dashboard.
145
- 2. In the slide-out chat, type a one-line description, e.g.:
146
- ```
147
- Add a brief comment to README.md explaining what minions doctor does
148
- ```
149
- 3. CC will propose an action (usually `POST /api/work-items` or `POST /api/plan`). Confirm.
106
+ In Command Center:
150
107
 
151
- Within one tick (≤10 s), the engine will:
152
-
153
- 1. Pick an idle agent that matches the work type (per `routing.md`).
154
- 2. Create a git worktree for that agent under `<your-repo>/.worktrees/<work-item-id>/`.
155
- 3. Render the appropriate playbook (`playbooks/implement.md` for an implement task) with your project context, charter, pinned notes, and recent team notes.
156
- 4. Spawn `engine/spawn-agent.js`, which invokes the Claude CLI with the rendered prompt.
157
-
158
- Watch the **Minions Members** card for that agent flip to "working", and click into the **Live Output** tab to tail the streaming agent log.
159
-
160
- You can do the same thing from the CLI: `minions work "Add a brief comment to README.md…"`.
161
-
162
- ---
163
-
164
- ## Step 7 — Your first plan via `/plan`
165
-
166
- For multi-step work, use a plan instead of a one-shot work item. In the Command Center, type:
167
-
168
- ```
169
- /plan Audit our README and propose three concrete improvements with examples
108
+ ```text
109
+ /plan Add a health endpoint, tests, and operator documentation to SampleProject.
110
+ Keep the changes as separately testable items with explicit dependencies.
170
111
  ```
171
112
 
172
- CC will queue a `plan` work item. The plan agent writes a markdown draft to `~/.minions/plans/<project>-<date>.md`, then chains automatically to a `plan-to-prd` agent that produces a structured PRD JSON in `~/.minions/prd/`. The PRD lands with `status: "awaiting-approval"`.
173
-
174
- Open **Plans & PRD** in the dashboard. You will see the new plan with three buttons:
175
-
176
- - **Approve** — materializes one work item per PRD entry, with `depends_on` honored.
177
- - **Discuss & Revise** — opens a doc-chat modal where you can iterate on the plan with Claude.
178
- - **Reject** — closes the plan with a reason.
179
-
180
- After approving, agents start picking up the materialized work items on the next tick. When all PRD items complete, the engine auto-dispatches a `verify` task that builds + tests the changes and writes a manual testing guide. Archiving (after verify) is a manual dashboard action — see [docs/plan-lifecycle.md](plan-lifecycle.md) for the full pipeline.
181
-
182
- ---
183
-
184
- ## Step 8 — Your first PR review
185
-
186
- When an `implement` agent finishes a work item, it pushes a branch and opens a PR. The engine polls PR status every `prPollStatusEvery` ticks (≈12 minutes by default) and dispatches a `review` agent automatically.
187
-
188
- To watch the cycle end-to-end on your first task:
189
-
190
- 1. Open **Pull Requests** in the dashboard. Find the PR your agent just opened.
191
- 2. Wait for the next status poll (or run `minions dispatch` to wake the daemon immediately). The PR's `reviewStatus` will flip from `pending` to `waiting`, then a review agent will spawn.
192
- 3. Click the agent card to watch the live review. The reviewer reads the diff, runs targeted checks, then posts a comment that starts with `VERDICT: APPROVE` or `VERDICT: REQUEST_CHANGES`.
193
- 4. If the verdict is `REQUEST_CHANGES`, the engine queues a `fix` task for the original author with a feedback note. The cycle repeats until approved or capped by the eval-loop config.
194
-
195
- You can also trigger reviews manually by commenting on the PR — see [docs/pr-review-fix-loop.md](pr-review-fix-loop.md).
196
-
197
- > **Note on self-approval:** Minions agents share a single GitHub identity, so `gh pr review --approve` is blocked by GitHub's self-approval rule. Reviewers post a `VERDICT:` **comment** instead, and the engine treats that comment as authoritative.
198
-
199
- ---
200
-
201
- ## Debugging — Where to look when something goes wrong
202
-
203
- When an agent gets stuck, hangs, or produces unexpected output, these files are your first stops. They live under `~/.minions/` (or wherever your runtime root is).
204
-
205
- | File | What it tells you |
206
- |---|---|
207
- | `agents/<id>/live-output.log` | Real-time streaming output from the agent's Claude CLI session — same content the dashboard's Live Output tab shows. Tail this with `tail -f ~/.minions/agents/<id>/live-output.log`. |
208
- | `agents/<id>/last-prompt.txt` | The most recent rendered prompt the agent received (playbook + system prompt + injected context). Inspect this to see exactly what the agent was asked to do, including pinned notes, team notes, charter, and dispatch context. If your install does not surface this file yet, the live equivalents are `engine/tmp/prompt-<dispatch-id>.md` (while the agent is running) and `engine/contexts/<dispatch-id>.md` (when the prompt was sidecarred because it exceeded `maxDispatchPromptBytes`). |
209
- | `agents/<id>/output.log` | The agent's final output after completion (post-mortem read; `live-output.log` is the during-run read). |
210
- | `agents/<id>/history.md` | Last 20 tasks for that agent with timestamps, results, projects, and branches. Useful when a single agent is misbehaving over multiple tasks. |
211
- | `engine/log.json` | Audit trail of engine actions (last 2500 entries, rotated to 2000). Filter with `jq` for a specific agent or work item. |
212
- | `engine/dispatch.json` | Pending / active / completed dispatch queue. If an agent appears idle on the dashboard but the queue says `active`, the engine likely lost process tracking — try `minions restart`. |
213
- | `engine/metrics.json` | Per-agent token usage, runtime, error counts. Useful for spotting agents that are silently retrying. |
214
- | `notes/inbox/` | Raw findings agents drop after each task. Look here for the latest learnings before the consolidator merges them into `notes.md`. |
215
- | `pinned.md` and `notes.md` | Team memory that gets injected into every agent prompt. If an agent keeps making the same mistake, pin a correction here. |
216
-
217
- Other quick debugging knobs:
218
-
219
- - `minions status` — text snapshot of agents, projects, dispatch queue, and quality metrics.
220
- - `minions queue` — focused view of the dispatch queue (pending, active, completed).
221
- - `minions kill` — kills all active agents and resets their dispatches to `pending`. Use when an agent is wedged.
222
- - `minions cleanup` — manually run the temp-file / worktree / zombie sweep that normally runs every 10 ticks.
223
-
224
- For deeper dives: [docs/engine-restart.md](engine-restart.md), [docs/auto-discovery.md](auto-discovery.md), and [docs/self-improvement.md](self-improvement.md).
225
-
226
- ---
227
-
228
- ## What's next
229
-
230
- You have:
231
-
232
- - Linked a project, started the engine, opened the dashboard.
233
- - Dispatched a one-shot task via Command Center.
234
- - Authored a plan, approved it, and watched the PRD materialize into work items.
235
- - Watched an agent open and review a PR.
236
- - Located the files you need to debug a stuck agent.
237
-
238
- From here, sensible next reads are:
113
+ Review the generated PRD on **Plans**. Use **Discuss & Revise** until its
114
+ acceptance criteria and dependencies are concrete, then approve it. Approval
115
+ materializes work items. When all items complete, Minions creates a verification
116
+ item. Archiving remains a manual action after you review the final result.
239
117
 
240
- - [README.md](../README.md) the full feature catalog and CLI reference.
241
- - [CLAUDE.md](../CLAUDE.md) — engineering conventions, tick cycle, locking rules. Read this before editing engine code.
242
- - [docs/plan-lifecycle.md](plan-lifecycle.md) — plan → PRD → implement → verify → archive in detail.
243
- - [docs/command-center.md](command-center.md) — full CC capabilities, including doc-chat and plan steering.
244
- - [docs/pr-review-fix-loop.md](pr-review-fix-loop.md) — how the review/fix cycle is bounded and steered.
118
+ ## Where to go next
245
119
 
246
- Welcome to the team.
120
+ - [Tutorial 2: Ship Your First Task](tutorials/02-first-task.md)
121
+ - [Tutorial 3: Build a Feature from a Plan](tutorials/03-plan-driven-feature.md)
122
+ - [Tutorial 8: Operate and Recover Minions](tutorials/08-operations-and-recovery.md)
123
+ - [Plan Lifecycle](plan-lifecycle.md)
124
+ - [Command Center](command-center.md)
package/docs/preflight.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Preflight & Doctor
2
2
 
3
- `minions doctor` (and the lighter `minions preflight` that runs on every CLI
4
- invocation) inspects the local environment for the conditions Minions needs
5
- to dispatch agents reliably. Every row is one of: `OK`, `WARN`, `FAIL`.
3
+ `minions doctor` is the user-facing environment check. A lighter internal
4
+ preflight also runs during `minions init` and engine startup. Together they
5
+ inspect the conditions Minions needs to dispatch agents reliably. Every row is
6
+ one of: `OK`, `WARN`, `FAIL`.
6
7
 
7
8
  This page documents the rows that are not self-explanatory from their message.
8
9
 
@@ -0,0 +1,87 @@
1
+ # Tutorial 1: Install and Connect a Project
2
+
3
+ You will install Minions, verify the default Copilot runtime, link one Git
4
+ repository, and start the engine and dashboard.
5
+
6
+ ## Prerequisites
7
+
8
+ - Node.js 22.5 or newer
9
+ - Git
10
+ - GitHub Copilot CLI, Claude Code, or Codex CLI with working authentication
11
+ - A local Git repository with an `origin` remote
12
+
13
+ Minions defaults to GitHub Copilot CLI. Install it if you have not selected a
14
+ different runtime:
15
+
16
+ ```bash
17
+ npm install -g @github/copilot
18
+ ```
19
+
20
+ ## 1. Install and initialize
21
+
22
+ ```bash
23
+ npm install -g @yemi33/minions
24
+ minions init
25
+ ```
26
+
27
+ Initialization creates the operator home at `~/.minions/`, including agent
28
+ charters, playbooks, routing, prompts, and the SQLite state database.
29
+
30
+ ## 2. Verify the host
31
+
32
+ ```bash
33
+ minions doctor
34
+ ```
35
+
36
+ Resolve every `FAIL` before dispatching. Warnings are non-blocking but should be
37
+ read: a permission-flag warning can mean that the selected CLI will stop for an
38
+ interactive prompt during a headless dispatch.
39
+
40
+ To choose another runtime:
41
+
42
+ ```bash
43
+ minions config set-cli claude
44
+ # or
45
+ minions config set-cli codex
46
+ ```
47
+
48
+ Run `minions doctor` again after switching.
49
+
50
+ ## 3. Link a repository
51
+
52
+ ```bash
53
+ minions add C:\code\sample-project
54
+ ```
55
+
56
+ On macOS or Linux, use the corresponding path such as
57
+ `~/code/sample-project`. Confirm the detected host, repository, main branch,
58
+ and description. The description helps agents route project-agnostic work, so
59
+ describe the repository's responsibility rather than its implementation
60
+ language.
61
+
62
+ Confirm the result:
63
+
64
+ ```bash
65
+ minions list
66
+ ```
67
+
68
+ ## 4. Start Minions
69
+
70
+ ```bash
71
+ minions start --open
72
+ ```
73
+
74
+ `start` is idempotent and starts both the engine and dashboard. If browser
75
+ launch is blocked, run `minions dash`.
76
+
77
+ ## Checkpoint
78
+
79
+ ```bash
80
+ minions status
81
+ ```
82
+
83
+ You should see the engine running, your project listed, and no failed
84
+ dispatches. In the dashboard, verify that the project appears in the project
85
+ picker and that the agent cards are idle.
86
+
87
+ Next: [ship your first task](02-first-task.md).
@@ -0,0 +1,73 @@
1
+ # Tutorial 2: Ship Your First Task
2
+
3
+ You will queue a small documentation change, observe routing and live output,
4
+ and inspect the resulting work item and pull request.
5
+
6
+ ## 1. Choose a bounded task
7
+
8
+ Start with a task that has one clear result and a cheap validation step:
9
+
10
+ ```bash
11
+ minions work "Add a short Development section to README.md that names the existing test command"
12
+ ```
13
+
14
+ For precise project selection, use the dashboard's **Work** page or Command
15
+ Center and select the linked project instead of Auto. A project-scoped task is
16
+ better than auto-routing while learning the lifecycle.
17
+
18
+ ## 2. Wake and inspect the queue
19
+
20
+ The engine checks for work on its normal tick. You can wake it immediately:
21
+
22
+ ```bash
23
+ minions dispatch
24
+ minions queue
25
+ ```
26
+
27
+ The item normally moves from `pending` to `dispatched`. If it remains pending,
28
+ open its detail view and read `_pendingReason`; common reasons are an unmet
29
+ dependency, no available agent, cooldown, or concurrency limits.
30
+
31
+ ## 3. Follow the agent
32
+
33
+ In the dashboard:
34
+
35
+ 1. Open **Home** and select the working agent.
36
+ 2. Watch **Live Output** for repository exploration, edits, and checks.
37
+ 3. Open **Work** and select the item to inspect its branch, output, and
38
+ artifacts.
39
+
40
+ The engine chooses an agent from `routing.md`, creates an isolated worktree for
41
+ mutating work, renders the work-type playbook, and invokes the configured
42
+ runtime adapter.
43
+
44
+ ## 4. Inspect the outcome
45
+
46
+ ```bash
47
+ minions status
48
+ minions queue
49
+ ```
50
+
51
+ A successful code-changing task should finish with a branch and pull request.
52
+ If the runtime reports success without the required artifact, the work item can
53
+ still be flagged for lifecycle follow-up.
54
+
55
+ If the item fails, read its failure class and output before retrying:
56
+
57
+ ```bash
58
+ minions wi show <work-item-id>
59
+ minions wi retry <work-item-id>
60
+ ```
61
+
62
+ Do not retry authentication, invalid configuration, or workspace-permission
63
+ failures without correcting the cause first.
64
+
65
+ ## Checkpoint
66
+
67
+ You have observed the full path:
68
+
69
+ ```text
70
+ work item -> routing -> worktree -> runtime -> checks -> branch/PR -> completion
71
+ ```
72
+
73
+ Next: [build a feature from a plan](03-plan-driven-feature.md).
@@ -0,0 +1,73 @@
1
+ # Tutorial 3: Build a Feature from a Plan
2
+
3
+ Use a plan when the outcome spans several independently verifiable changes.
4
+ You will create a plan, review its PRD, approve it, and follow dependency-aware
5
+ implementation through verification.
6
+
7
+ ## 1. Draft the request
8
+
9
+ Open Command Center and enter:
10
+
11
+ ```text
12
+ /plan Add a health endpoint to SampleProject, document it, and add automated
13
+ tests. Keep implementation, tests, and documentation as separate items with
14
+ explicit dependencies.
15
+ ```
16
+
17
+ The plan agent writes Markdown under `plans/`. The plan-to-PRD step then creates
18
+ structured items under `prd/` with acceptance criteria and `depends_on`
19
+ relationships.
20
+
21
+ You can also provide plan text from the CLI:
22
+
23
+ ```bash
24
+ minions plan "Add a health endpoint, tests, and operator documentation" SampleProject
25
+ ```
26
+
27
+ ## 2. Review before approval
28
+
29
+ Open **Plans** and inspect:
30
+
31
+ - every item has a concrete deliverable;
32
+ - acceptance criteria can be tested;
33
+ - dependencies use item IDs and are acyclic;
34
+ - each item names the correct project;
35
+ - rejected or out-of-scope ideas are explicit.
36
+
37
+ Use **Discuss & Revise** for corrections. Approval is the human gate that
38
+ materializes work items, so do not approve a vague PRD and expect routing to
39
+ repair it.
40
+
41
+ ## 3. Approve and observe dependency gating
42
+
43
+ Approve the plan, then inspect **Work**. Independent items can dispatch in
44
+ parallel. Dependent items stay pending until their prerequisites are done.
45
+
46
+ At spawn time, Minions resolves completed dependencies to their pull-request
47
+ branches and merges those branches into the dependent item's worktree. This
48
+ lets later items build on code that has not reached the main branch yet.
49
+
50
+ ## 4. Follow verification
51
+
52
+ When all implementation items finish, Minions creates a `verify` work item.
53
+ Verification builds and tests the combined result and must attach a pull
54
+ request when its contract requires one. A completed plan remains visible until
55
+ you archive it manually.
56
+
57
+ Archive only after reviewing the verify result:
58
+
59
+ ```bash
60
+ minions plans list
61
+ minions plans archive <plan-or-prd-id>
62
+ ```
63
+
64
+ Archived PRDs remain retained in place; the source plan Markdown moves to
65
+ `plans/archive/`.
66
+
67
+ ## Checkpoint
68
+
69
+ You should have an approved PRD, materialized work items, dependency-aware
70
+ branches, and a final verification result. See
71
+ [Plan Lifecycle](../plan-lifecycle.md) for status and archive details.
72
+
73
+ Next: [configure runtimes and project tools](04-runtimes-and-harness.md).
@@ -0,0 +1,77 @@
1
+ # Tutorial 4: Choose Runtimes and Propagate Project Tools
2
+
3
+ Minions can dispatch with Copilot CLI, Claude Code, or Codex. This tutorial
4
+ switches the fleet runtime, separates Command Center from agent settings, and
5
+ checks which skills, commands, and MCP configurations reach a worktree.
6
+
7
+ ## 1. Inspect the current fleet
8
+
9
+ ```bash
10
+ minions status
11
+ minions doctor --harness
12
+ ```
13
+
14
+ The harness report is read-only. It lists runtime asset directories, skill
15
+ roots, slash-command roots, and MCP configuration paths.
16
+
17
+ ## 2. Select a fleet runtime
18
+
19
+ ```bash
20
+ minions config set-cli copilot --model gpt-5.4
21
+ minions restart
22
+ ```
23
+
24
+ Use a model ID supported by your installed CLI. Omit `--model` to let the CLI
25
+ choose its default. To clear a persisted model while switching:
26
+
27
+ ```bash
28
+ minions restart --cli claude --model ""
29
+ ```
30
+
31
+ Fleet resolution is:
32
+
33
+ ```text
34
+ agent.cli -> engine.defaultCli -> copilot
35
+ agent.model -> engine.defaultModel -> runtime default
36
+ ```
37
+
38
+ Command Center has independent `engine.ccCli` and `engine.ccModel` overrides.
39
+ Changing CC does not silently switch dispatched agents.
40
+
41
+ ## 3. Add a project-local skill
42
+
43
+ In the linked repository's main checkout, create a committed skill under:
44
+
45
+ ```text
46
+ .claude/skills/<skill-name>/SKILL.md
47
+ ```
48
+
49
+ Describe when the skill applies and provide the exact existing project command
50
+ to run. Commit the skill if every worktree should receive it. Uncommitted
51
+ project-local assets can be propagated from the live checkout when
52
+ `engine.harnessPropagateProjectLocal` is enabled, but committed assets are more
53
+ reproducible.
54
+
55
+ ## 4. Verify propagation
56
+
57
+ ```bash
58
+ minions doctor --harness
59
+ ```
60
+
61
+ Dispatch a small task that clearly matches the skill. The completion report's
62
+ `harnessUsed` section distinguishes assets that were available from those the
63
+ agent reports actually using.
64
+
65
+ For a known-empty execution environment, enable `hermeticHarness` for an agent
66
+ or the fleet. This removes user asset directories and project harness
67
+ propagation; use it for reproducibility tests, not as an MCP process-launch
68
+ control.
69
+
70
+ ## Checkpoint
71
+
72
+ The selected runtime passes doctor, your project asset appears in the harness
73
+ survey, and a matching dispatch reports whether it used that asset.
74
+
75
+ Reference: [Runtime Adapters](../runtime-adapters.md),
76
+ [Harness Propagation](../harness-propagation.md), and
77
+ [Harness Transparency](../harness-transparency.md).