@yemi33/minions 0.1.1

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +819 -0
  2. package/LICENSE +21 -0
  3. package/README.md +598 -0
  4. package/agents/dallas/charter.md +56 -0
  5. package/agents/lambert/charter.md +67 -0
  6. package/agents/ralph/charter.md +45 -0
  7. package/agents/rebecca/charter.md +57 -0
  8. package/agents/ripley/charter.md +47 -0
  9. package/bin/minions.js +467 -0
  10. package/config.template.json +28 -0
  11. package/dashboard.html +4822 -0
  12. package/dashboard.js +2623 -0
  13. package/docs/auto-discovery.md +416 -0
  14. package/docs/blog-first-successful-dispatch.md +128 -0
  15. package/docs/command-center.md +156 -0
  16. package/docs/demo/01-dashboard-overview.gif +0 -0
  17. package/docs/demo/02-command-center.gif +0 -0
  18. package/docs/demo/03-work-items.gif +0 -0
  19. package/docs/demo/04-plan-docchat.gif +0 -0
  20. package/docs/demo/05-prd-progress.gif +0 -0
  21. package/docs/demo/06-inbox-metrics.gif +0 -0
  22. package/docs/deprecated.json +83 -0
  23. package/docs/distribution.md +96 -0
  24. package/docs/engine-restart.md +92 -0
  25. package/docs/human-vs-automated.md +108 -0
  26. package/docs/index.html +221 -0
  27. package/docs/plan-lifecycle.md +140 -0
  28. package/docs/self-improvement.md +344 -0
  29. package/engine/ado-mcp-wrapper.js +42 -0
  30. package/engine/ado.js +383 -0
  31. package/engine/check-status.js +23 -0
  32. package/engine/cli.js +754 -0
  33. package/engine/consolidation.js +417 -0
  34. package/engine/github.js +331 -0
  35. package/engine/lifecycle.js +1113 -0
  36. package/engine/llm.js +116 -0
  37. package/engine/queries.js +677 -0
  38. package/engine/shared.js +397 -0
  39. package/engine/spawn-agent.js +151 -0
  40. package/engine.js +3227 -0
  41. package/minions.js +556 -0
  42. package/package.json +48 -0
  43. package/playbooks/ask.md +49 -0
  44. package/playbooks/build-and-test.md +155 -0
  45. package/playbooks/explore.md +64 -0
  46. package/playbooks/fix.md +57 -0
  47. package/playbooks/implement-shared.md +68 -0
  48. package/playbooks/implement.md +95 -0
  49. package/playbooks/plan-to-prd.md +104 -0
  50. package/playbooks/plan.md +99 -0
  51. package/playbooks/review.md +68 -0
  52. package/playbooks/test.md +75 -0
  53. package/playbooks/verify.md +190 -0
  54. package/playbooks/work-item.md +74 -0
@@ -0,0 +1,155 @@
1
+ # Build & Test: PR {{pr_id}}
2
+
3
+ > Agent: {{agent_name}} ({{agent_role}}) | Project: {{project_name}}
4
+
5
+ ## Context
6
+
7
+ Repo: {{repo_name}} | Org: {{ado_org}} | Project: {{ado_project}}
8
+ Team root: {{team_root}}
9
+ Project path: {{project_path}}
10
+
11
+ ## Your Task
12
+
13
+ A new PR has been created: **{{pr_id}}** — "{{pr_title}}"
14
+ Branch: `{{pr_branch}}` | Author: {{pr_author}}
15
+
16
+ Your job is to **check out the branch, build it, run tests, and if it's a webapp, start a local dev server** so the human reviewer can see it running.
17
+
18
+ ## Instructions
19
+
20
+ ### 1. Set up a worktree for the PR branch
21
+
22
+ ```bash
23
+ cd {{project_path}}
24
+ git fetch origin {{pr_branch}}
25
+ git worktree add ../worktrees/bt-{{pr_number}} origin/{{pr_branch}}
26
+ cd ../worktrees/bt-{{pr_number}}
27
+ ```
28
+
29
+ ### 2. Install dependencies
30
+
31
+ Look at the project's build system (package.json, CLAUDE.md, README, Makefile, etc.) and install:
32
+ ```bash
33
+ # Examples — use whatever the project needs:
34
+ yarn install # or npm install
35
+ pip install -r requirements.txt
36
+ dotnet restore
37
+ ```
38
+
39
+ ### 3. Build the project
40
+
41
+ Run the project's build command:
42
+ ```bash
43
+ # Examples:
44
+ yarn build # or npm run build
45
+ dotnet build
46
+ cargo build
47
+ ```
48
+
49
+ If the build **fails**, report the errors clearly and stop. Do NOT attempt to fix the code.
50
+
51
+ ### 4. Run tests
52
+
53
+ ```bash
54
+ # Examples:
55
+ yarn test # or npm test
56
+ pytest
57
+ dotnet test
58
+ ```
59
+
60
+ Report test results: how many passed, failed, skipped.
61
+
62
+ ### 5. Start a local dev server (if applicable)
63
+
64
+ Determine if this project is a **webapp** (has a dev server, serves HTTP, has a UI):
65
+ - Check package.json for `dev`, `start`, `serve` scripts
66
+ - Check for frameworks: Next.js, React, Angular, Vue, Express, Flask, ASP.NET
67
+ - Check CLAUDE.md for run instructions
68
+
69
+ If it IS a webapp:
70
+ 1. Start the dev server
71
+ 2. Wait for it to be ready (watch for "ready on", "listening on", "compiled" messages)
72
+ 3. Note the localhost URL and port
73
+ 4. **Keep the server running** — do NOT kill it
74
+
75
+ If it is NOT a webapp (library, CLI tool, backend service without UI), skip this step.
76
+
77
+ ## Output Format
78
+
79
+ Write your findings to: `{{team_root}}/notes/inbox/{{agent_id}}-bt-{{pr_number}}-{{date}}.md`
80
+
81
+ Structure your report exactly like this:
82
+
83
+ ```markdown
84
+ ## Build & Test Report: {{pr_id}}
85
+
86
+ **Branch:** {{pr_branch}}
87
+ **Author:** {{pr_author}}
88
+ **Project:** {{project_name}}
89
+
90
+ ### Build
91
+ - Status: PASS / FAIL
92
+ - Notes: (any warnings or issues)
93
+
94
+ ### Tests
95
+ - Status: PASS / FAIL / SKIPPED
96
+ - Results: X passed, Y failed, Z skipped
97
+ - Failed tests: (list if any)
98
+
99
+ ### Local Server
100
+ - Status: RUNNING / NOT_APPLICABLE / FAILED
101
+ - URL: http://localhost:XXXX (if running)
102
+ - Run Command: `cd <absolute-path> && <command>`
103
+
104
+ ### Summary
105
+ (1-2 sentence overall assessment — is this PR safe to review?)
106
+ ```
107
+
108
+ ## Auto-file Work Items on Failure
109
+
110
+ If the build OR tests fail, you MUST create a work item so another agent can fix it. Write a JSON entry to the project's work queue:
111
+
112
+ ```bash
113
+ # Read existing items, append new one, write back
114
+ node -e "
115
+ const fs = require('fs');
116
+ const p = '{{project_path}}/.minions/work-items.json';
117
+ const items = JSON.parse(fs.readFileSync(p, 'utf8') || '[]');
118
+ const id = 'W' + String(items.reduce((m,i) => Math.max(m, parseInt((i.id||'').match(/(\d+)$/)?.[1]||0)), 0) + 1).padStart(3, '0');
119
+ items.push({
120
+ id,
121
+ title: 'Fix build/test failure on PR {{pr_id}}: <SHORT DESCRIPTION OF FAILURE>',
122
+ type: 'fix',
123
+ priority: 'high',
124
+ description: '<PASTE THE BUILD/TEST ERROR OUTPUT HERE — keep it under 2000 chars>',
125
+ status: 'pending',
126
+ created: new Date().toISOString(),
127
+ createdBy: '{{agent_id}}',
128
+ pr: '{{pr_id}}',
129
+ branch: '{{pr_branch}}'
130
+ });
131
+ fs.writeFileSync(p, JSON.stringify(items, null, 2));
132
+ console.log('Filed work item:', id);
133
+ "
134
+ ```
135
+
136
+ Replace `<SHORT DESCRIPTION OF FAILURE>` and `<PASTE THE BUILD/TEST ERROR OUTPUT HERE>` with the actual error details. The engine will pick this up on the next tick and dispatch a fix agent.
137
+
138
+ ## Rules
139
+
140
+ - **Do NOT create pull requests** — this is a build/test task only
141
+ - **Do NOT push commits** or modify code
142
+ - **Do NOT attempt to fix build/test failures** — report them and file a work item
143
+ - If starting a dev server, output the **exact run command with absolute paths** so the user can restart it:
144
+ ```
145
+ ## Run Command
146
+ cd <absolute-path-to-worktree> && <exact start command>
147
+ ```
148
+ - Use the worktree path, NOT the main project path, for all commands
149
+ - The worktree will persist after your process ends so the user can inspect it
150
+
151
+ ## IMPORTANT: Do NOT clean up the worktree
152
+
153
+ Leave the worktree in place at `{{project_path}}/../worktrees/bt-{{pr_number}}` — the user needs it to review the running app. The engine will clean it up after the PR is merged or closed.
154
+
155
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
@@ -0,0 +1,64 @@
1
+ # Explore Playbook
2
+
3
+ > Agent: {{agent_name}} | Task: {{task_description}} | ID: {{task_id}}
4
+
5
+ ## Context
6
+
7
+ Repository ID: from `.minions/config.json` under `project.repositoryId`
8
+ Repo: {{repo_name}} | Org: {{ado_org}} | Project: {{ado_project}}
9
+ Team root: {{team_root}}
10
+
11
+ ## Mission
12
+
13
+ Explore the codebase area specified in the task description. Your primary goal is to understand the architecture, patterns, and current state of the code. If the task asks you to produce a deliverable (design doc, architecture doc, analysis report), create it and commit it to the repo via PR.
14
+
15
+ ## Steps
16
+
17
+ ### 1. Read Project Documentation
18
+ - Read `CLAUDE.md` at repo root and in relevant agent/module directories
19
+ - Read `docs/BEST_PRACTICES.md` if it exists
20
+ - Read any README.md files in the target area
21
+
22
+ ### 2. Explore Code Structure
23
+ - Map the directory structure of the target area
24
+ - Identify key files: entry points, registries, configs, tests
25
+ - Note patterns: how agents are structured, how modules connect, how prompts are organized
26
+
27
+ ### 3. Analyze Architecture
28
+ - How does data flow through the system?
29
+ - What are the dependencies between components?
30
+ - Where are the extension points?
31
+ - What conventions are followed?
32
+
33
+ ### 4. Document Findings
34
+ Write your findings to `{{team_root}}/notes/inbox/{{agent_id}}-explore-{{task_id}}-{{date}}.md` with these sections:
35
+ - **Area Explored**: what you looked at
36
+ - **Architecture**: how it works
37
+ - **Patterns**: conventions and patterns found
38
+ - **Dependencies**: what depends on what
39
+ - **Gaps**: anything missing, broken, or unclear
40
+ - **Recommendations**: suggestions for the team
41
+ - **Source References**: for EVERY finding, include the source — file paths, line numbers, PR URLs, API endpoints, config keys. Format: `(source: path/to/file.ts:42)` or `(source: PR-12345)`. This is critical — other agents and humans need to verify your findings.
42
+
43
+ ### 5. Create Deliverable (if the task asks for one)
44
+ If the task asks you to write a design doc, architecture doc, or any durable artifact:
45
+ 1. Create a git worktree: `git worktree add ../worktrees/explore-{{task_id}} -b feat/{{task_id}}-<short-desc> {{main_branch}}`
46
+ 2. Write the document (e.g., `docs/design-<topic>.md`)
47
+ 3. Commit, push, and create a PR:
48
+ {{pr_create_instructions}}
49
+ 4. Clean up worktree when done
50
+
51
+ If the task is purely exploratory (no deliverable requested), skip this step.
52
+
53
+ ### 6. Status
54
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
55
+
56
+ ## Rules
57
+ - Do NOT modify existing code unless the task explicitly asks for it.
58
+ - Use the appropriate MCP tools for PR creation — check available tools before starting.
59
+ - Do NOT checkout branches in the main working tree — use worktrees.
60
+ - Read `notes.md` for all team rules before starting.
61
+ - If you discover a repeatable workflow, output it as a ```skill block (the engine auto-extracts it to ~/.claude/skills/)
62
+
63
+ ## Team Decisions
64
+ {{notes_content}}
@@ -0,0 +1,57 @@
1
+ # Playbook: Fix Review Issues
2
+
3
+ You are {{agent_name}}, the {{agent_role}} on the {{project_name}} project.
4
+ TEAM ROOT: {{team_root}}
5
+
6
+ Repository ID comes from `.minions/config.json` under `project.repositoryId`.
7
+ Repo: {{repo_name}} | Org: {{ado_org}} | Project: {{ado_project}}
8
+
9
+ ## Your Task
10
+
11
+ Fix issues found by {{reviewer}} on **{{pr_id}}**: {{pr_title}}
12
+ Branch: `{{pr_branch}}`
13
+
14
+ ## Review Findings to Address
15
+
16
+ {{review_note}}
17
+
18
+ ## How to Fix
19
+
20
+ 1. Create or enter the worktree (this checks out the existing PR branch, not creating a new one):
21
+ ```bash
22
+ cd {{team_root}}
23
+ git fetch origin {{pr_branch}}
24
+ git worktree add ../worktrees/{{pr_branch}} {{pr_branch}} 2>/dev/null || true
25
+ cd ../worktrees/{{pr_branch}}
26
+ git pull origin {{pr_branch}}
27
+ ```
28
+
29
+ 2. Fix each issue listed above
30
+
31
+ 3. Commit and push:
32
+ ```bash
33
+ git add <specific files>
34
+ git commit -m "fix: address review feedback on {{pr_id}}"
35
+ git push
36
+ ```
37
+
38
+ 4. Clean up:
39
+ ```bash
40
+ cd {{team_root}}
41
+ git worktree remove ../worktrees/{{pr_branch}} --force
42
+ ```
43
+
44
+ ## Handling Merge Conflicts
45
+ If you encounter merge conflicts (e.g., during `git pull` or when the PR shows conflicts):
46
+ 1. Resolve conflicts in the worktree, preferring the PR branch changes. Commit the resolution.
47
+
48
+ ## Post Response on PR
49
+
50
+ {{pr_comment_instructions}}
51
+ - pullRequestId: `{{pr_number}}`
52
+ - content: Explain what was fixed, reference each review finding
53
+ - Sign: `Fixed by Minions ({{agent_name}} — {{agent_role}})`
54
+
55
+ ## Signal Completion
56
+
57
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
@@ -0,0 +1,68 @@
1
+ # Playbook: Implement (Shared Branch)
2
+
3
+ You are {{agent_name}}, the {{agent_role}} on the {{project_name}} project.
4
+ TEAM ROOT: {{team_root}}
5
+
6
+ Repository ID comes from `.minions/config.json` under `project.repositoryId`.
7
+ Repo: {{repo_name}} | Org: {{ado_org}} | Project: {{ado_project}}
8
+
9
+ ## Your Task
10
+
11
+ Implement PRD item **{{item_id}}: {{item_name}}**
12
+ - Priority: {{item_priority}}
13
+ - Complexity: {{item_complexity}}
14
+ - Shared branch: `{{branch_name}}`
15
+
16
+ ## Context
17
+
18
+ This is part of a **shared-branch plan**. Other agents may have already committed work to this branch before you. Your job is to build on top of their work.
19
+
20
+ ## Git Workflow (SHARED BRANCH — CRITICAL)
21
+
22
+ Your worktree is already set up. Pull latest before starting:
23
+
24
+ ```bash
25
+ cd {{worktree_path}}
26
+ git pull origin {{branch_name}} || true
27
+ ```
28
+
29
+ Check what's already on this branch:
30
+ ```bash
31
+ git log --oneline {{main_branch}}..HEAD
32
+ ```
33
+
34
+ Do ALL work in the worktree. When done:
35
+
36
+ ```bash
37
+ git add <specific files>
38
+ git commit -m "{{commit_message}}"
39
+ git push origin {{branch_name}}
40
+ ```
41
+
42
+ **Do NOT:**
43
+ - Create a new branch — use `{{branch_name}}`
44
+ - Create a PR — one will be created automatically when all plan items complete
45
+ - Remove the worktree — the next plan item needs it
46
+ - Create a new worktree — one already exists at `{{worktree_path}}`
47
+
48
+ ## Instructions
49
+
50
+ 1. Read relevant source code and reference implementations before writing anything
51
+ 2. Check what prior plan items already committed on this branch (`git log {{main_branch}}..HEAD`)
52
+ 3. Follow existing patterns exactly — check `CLAUDE.md` for conventions
53
+ 4. Build on existing work — don't duplicate or conflict with prior commits
54
+
55
+ ## Build and Verify
56
+
57
+ After implementation, you MUST:
58
+ 1. Build the project using the repo's build system (check CLAUDE.md, package.json, README)
59
+ 2. Verify the build succeeds with your changes AND all prior commits on this branch
60
+ 3. If the build fails:
61
+ - Read the error output carefully
62
+ - Fix the issue (including issues from prior commits if needed)
63
+ - Re-run the build
64
+ - If it fails 3 times, report the build errors in your findings and stop
65
+
66
+ ## Signal Completion
67
+
68
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
@@ -0,0 +1,95 @@
1
+ # Playbook: Implement
2
+
3
+ You are {{agent_name}}, the {{agent_role}} on the {{project_name}} project.
4
+ TEAM ROOT: {{team_root}}
5
+
6
+ Repository ID comes from `.minions/config.json` under `project.repositoryId`.
7
+ Repo: {{repo_name}} | Org: {{ado_org}} | Project: {{ado_project}}
8
+
9
+ ## Branch Naming Convention
10
+ Branch format: `feat/{{item_id}}-<short-description>`
11
+ Examples: `feat/M001-hr-agent`, `feat/M013-multimodal-input`
12
+ Keep branch names lowercase, use hyphens, max 60 chars.
13
+
14
+ ## Your Task
15
+
16
+ Implement PRD item **{{item_id}}: {{item_name}}**
17
+ - Priority: {{item_priority}}
18
+ - Complexity: {{item_complexity}}
19
+ - Description: {{item_description}}
20
+
21
+ ## Projects
22
+
23
+ Primary repo: **{{repo_name}}** ({{ado_org}}/{{ado_project}}) at `{{project_path}}`
24
+
25
+ If this feature spans multiple projects, you may need to:
26
+ 1. Read code from all listed project paths to understand integration points
27
+ 2. Make changes in the primary project (your worktree)
28
+ 3. If changes are needed in other projects, create separate worktrees and PRs for each
29
+ 4. Note cross-repo dependencies in PR descriptions (e.g., "Requires office-bohemia PR #123")
30
+
31
+ ## Instructions
32
+
33
+ 1. Read relevant source code and reference implementations before writing anything
34
+ 2. Follow existing patterns exactly — check `agents/create-agent/` or the closest comparable agent
35
+ 3. Follow the project's logging and coding conventions (check CLAUDE.md)
36
+
37
+ ## Git Workflow (WORKTREE — CRITICAL)
38
+
39
+ ```bash
40
+ cd {{team_root}}
41
+ git worktree add ../worktrees/{{branch_name}} -b {{branch_name}} {{main_branch}}
42
+ cd ../worktrees/{{branch_name}}
43
+ ```
44
+
45
+ Do ALL work in the worktree. When done:
46
+
47
+ ```bash
48
+ git add <specific files>
49
+ git commit -m "{{commit_message}}"
50
+ git push -u origin {{branch_name}}
51
+ ```
52
+
53
+ Then return and clean up:
54
+ ```bash
55
+ cd {{team_root}}
56
+ git worktree remove ../worktrees/{{branch_name}} --force
57
+ ```
58
+
59
+ ## Create PR
60
+
61
+ {{pr_create_instructions}}
62
+ - sourceRefName: `refs/heads/{{branch_name}}`
63
+ - targetRefName: `refs/heads/{{main_branch}}`
64
+ - title: `{{commit_message}}`
65
+ - labels: `["minions:{{agent_id}}"]`
66
+
67
+ Include in the PR description:
68
+ - What was built and why
69
+ - Files changed
70
+ - How to build and test, browser URL if applicable
71
+ - Test plan
72
+
73
+ ## Post self-review on PR
74
+
75
+ {{pr_comment_instructions}}
76
+ - pullRequestId: `<from PR creation>`
77
+ - Re-read your own diff critically before posting
78
+ - Sign: `Built by Minions ({{agent_name}} — {{agent_role}})`
79
+
80
+ ## Signal Completion
81
+
82
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
83
+
84
+ ## Build and Demo Rule
85
+
86
+ After implementation, you MUST:
87
+ 1. Build the project using the repo's build system (check CLAUDE.md, package.json, README)
88
+ 2. Start if applicable
89
+ 3. Include the browser URL and run instructions in the PR description
90
+
91
+ After building, verify the build succeeded. If the build fails:
92
+ 1. Read the error output carefully
93
+ 2. Fix the issue
94
+ 3. Re-run the build
95
+ 4. If it fails 3 times, report the build errors in your findings file and stop
@@ -0,0 +1,104 @@
1
+ # Playbook: Plan → PRD
2
+
3
+ You are {{agent_name}}, the {{agent_role}} on the {{project_name}} project.
4
+ TEAM ROOT: {{team_root}}
5
+
6
+ ## Your Task
7
+
8
+ A user has provided a plan. Analyze it against the codebase and produce a structured PRD that the minions engine will automatically pick up and dispatch as implementation work.
9
+
10
+ ## The Plan
11
+
12
+ {{plan_content}}
13
+
14
+ ## Instructions
15
+
16
+ 1. **Read the plan carefully** — understand the goals, scope, and requirements
17
+ 2. **Explore the codebase** at `{{project_path}}` — understand the existing structure to write accurate descriptions and acceptance criteria. Do NOT use observations about existing PRs or partial work to set item statuses — all items are always `"missing"` regardless of codebase state
18
+ 3. **Break the plan into discrete, implementable items** — each should be a single PR's worth of work
19
+ 4. **Estimate complexity** — `small` (< 1 file), `medium` (2-5 files), `large` (6+ files or cross-cutting)
20
+ 5. **Order by dependency** — items that others depend on come first
21
+ 6. **Use unique item IDs** — generate a short uuid for each item (e.g. `P-a3f9b2c1`). NEVER use sequential `P001`/`P002` — IDs must be globally unique across all PRDs to avoid collisions
22
+ 7. **Identify open questions** — flag anything ambiguous in the plan that needs user input
23
+
24
+ ## Output
25
+
26
+ Write the PRD to: `{{team_root}}/prd/{{project_name_lower}}-{{date}}.json`
27
+
28
+ **If that file already exists**, append a counter: `{{project_name_lower}}-{{date}}-2.json`, `-3.json`, etc. Do NOT overwrite an existing PRD file — the engine tracks work items by filename.
29
+
30
+ This file is NOT checked into the repo. The engine reads it on every tick and dispatches implementation work automatically.
31
+
32
+ ```json
33
+ {
34
+ "version": "plan-{{date}}",
35
+ "project": "{{project_name}}",
36
+ "source_plan": "{{plan_file}}",
37
+ "generated_by": "{{agent_id}}",
38
+ "generated_at": "{{date}}",
39
+ "plan_summary": "Short title (max ~80 chars, shown in dashboard tiles)",
40
+ "status": "awaiting-approval",
41
+ "requires_approval": true,
42
+ "branch_strategy": "shared-branch|parallel",
43
+ "feature_branch": "feat/plan-short-name",
44
+ "missing_features": [
45
+ {
46
+ "id": "P-<uuid>",
47
+ "name": "Short feature name",
48
+ "description": "What needs to be built and why",
49
+ "project": "ProjectName",
50
+ "status": "missing",
51
+ "estimated_complexity": "small|medium|large",
52
+ "priority": "high|medium|low",
53
+ "depends_on": [],
54
+ "acceptance_criteria": [
55
+ "Criterion 1",
56
+ "Criterion 2"
57
+ ]
58
+ }
59
+ ],
60
+ "open_questions": [
61
+ "Question about ambiguity in the plan"
62
+ ]
63
+ }
64
+ ```
65
+
66
+ ## Branch Strategy
67
+
68
+ Choose one of the following strategies based on how the items relate to each other:
69
+
70
+ - **`shared-branch`** — All items share a single feature branch. Agents work sequentially, respecting `depends_on` order. One PR is created at the end with all changes. **Use this when items build on each other** (most common for feature plans).
71
+ - **`parallel`** — Each item gets its own branch and PR. Items are dispatched independently. **Use this when items are fully independent** and can be reviewed/merged separately.
72
+
73
+ {{branch_strategy_hint}}
74
+
75
+ When using `shared-branch`:
76
+ - Generate a `feature_branch` name: `feat/plan-<short-kebab-description>` (max 60 chars, lowercase)
77
+ - Use `depends_on` to express the ordering — items execute in dependency order
78
+ - Each item should be able to build on the prior items' work
79
+
80
+ When using `parallel`:
81
+ - Omit `feature_branch` (the engine generates per-item branches)
82
+ - `depends_on` is still respected but items can dispatch concurrently if no deps
83
+
84
+ Rules for items:
85
+ - IDs must be `P-<uuid>` format (e.g. `P-a3f9b2c1`) — globally unique, never sequential
86
+ - **`status` MUST always be `"missing"` — no exceptions.** Do NOT set `done`, `complete`, `implemented`, or any other value, even if you observe active PRs or completed work in the codebase. Status is exclusively engine-managed after the PRD is written. Pre-setting any other status causes items to be silently skipped by the engine and breaks dependency resolution for all downstream items.
87
+ - **`project` field is REQUIRED** — set it to the project name where the code changes go (e.g., `"OfficeAgent"`, `"office-bohemia"`). Cross-repo plans must route each item to the correct project. The engine materializes items into that project's work queue.
88
+ - `depends_on` lists IDs of items that must be done first
89
+ - Keep descriptions actionable — an implementing agent should know exactly what to build
90
+ - Include `acceptance_criteria` so reviewers know when it's done
91
+ - Aim for 5-25 items depending on plan scope. If more than 25, group related work
92
+
93
+ ## Important
94
+
95
+ - Write ONLY the single `.json` PRD file to `{{team_root}}/prd/` — do NOT write any `.md` files there
96
+ - Do NOT create a git branch, worktree, or PR — this playbook writes minions-internal state only
97
+ - Do NOT modify any files in the project repo
98
+ - The engine will dispatch implementation agents automatically once the JSON file exists
99
+ - For `shared-branch`: agents commit to a single branch — one PR is created automatically when all items are done
100
+ - For `parallel`: each agent creates its own branch and PR
101
+
102
+ ## Signal Completion
103
+
104
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
@@ -0,0 +1,99 @@
1
+ # Playbook: Feature Plan
2
+
3
+ > Agent: {{agent_name}} | Task: {{task_description}} | ID: {{task_id}}
4
+
5
+ ## Context
6
+
7
+ Repo: {{repo_name}} | Org: {{ado_org}} | Project: {{ado_project}}
8
+ Team root: {{team_root}}
9
+ Project path: {{project_path}}
10
+
11
+ ## Mission
12
+
13
+ A user has described a feature they want built. Your job is to create a detailed implementation plan that a separate agent will later convert into a structured PRD for automatic dispatch to the agent pool.
14
+
15
+ ## The Feature Request
16
+
17
+ {{plan_content}}
18
+
19
+ ## Steps
20
+
21
+ ### 1. Understand the Request
22
+ - Read the feature description carefully
23
+ - Identify the core goal, constraints, and success criteria
24
+ - Note any ambiguities that need to be called out
25
+
26
+ ### 2. Explore the Codebase
27
+ - Read `CLAUDE.md` at repo root and relevant directories
28
+ - Map the areas of code that this feature will touch
29
+ - Identify existing patterns, conventions, and extension points
30
+ - Note dependencies and potential conflicts with in-progress work
31
+
32
+ ### 3. Design the Approach
33
+ - Outline the high-level architecture for the feature
34
+ - Identify what needs to be created vs modified
35
+ - Consider edge cases, error handling, and backwards compatibility
36
+ - Note any prerequisites or migrations needed
37
+
38
+ ### 4. Break Down into Work Items
39
+ - Decompose into discrete, PR-sized chunks of work
40
+ - Order by dependency (foundations first)
41
+ - Estimate complexity: `small` (1 file), `medium` (2-5 files), `large` (6+ files)
42
+ - Each item should be independently testable
43
+
44
+ ### 5. Write the Plan
45
+
46
+ Write the plan to: `{{team_root}}/plans/{{plan_file}}`
47
+
48
+ Use this format:
49
+
50
+ ```markdown
51
+ # Plan: {{plan_title}}
52
+
53
+ **Project:** {{project_name}}
54
+ **Author:** {{agent_name}}
55
+ **Date:** {{date}}
56
+
57
+ ## Goal
58
+ What this feature achieves and why it matters.
59
+
60
+ ## Codebase Analysis
61
+ What exists today, what needs to change, key files involved.
62
+
63
+ ## Approach
64
+ High-level design decisions and rationale.
65
+
66
+ ## Work Breakdown
67
+
68
+ ### Phase 1: Foundation
69
+ 1. **Item name** (complexity: small/medium/large)
70
+ - What to build
71
+ - Files to create/modify
72
+ - Acceptance criteria
73
+
74
+ ### Phase 2: Core Implementation
75
+ 2. **Item name** ...
76
+
77
+ ### Phase 3: Polish & Integration
78
+ 3. **Item name** ...
79
+
80
+ ## Risks & Open Questions
81
+ - Risk or question that needs user input
82
+
83
+ ## Dependencies
84
+ - External dependencies or prerequisites
85
+ ```
86
+
87
+ ## Important
88
+
89
+ - Do NOT create a git branch, worktree, or PR — this playbook writes minions-internal state only
90
+ - Do NOT modify any files in the project repo
91
+ - The engine will automatically chain this plan into a PRD conversion step
92
+ - Focus on being thorough but actionable — the PRD agent needs clear items to convert
93
+
94
+ ## Signal Completion
95
+
96
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
97
+
98
+ ## Team Notes
99
+ {{notes_content}}