@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,68 @@
1
+ # Playbook: Review
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
+ Review **{{pr_id}}**: {{pr_title}}
12
+ Branch: `{{pr_branch}}`
13
+
14
+ ## How to Review
15
+
16
+ 1. Fetch latest and read the diff:
17
+ ```bash
18
+ git fetch origin
19
+ git diff {{main_branch}}...origin/{{pr_branch}}
20
+ ```
21
+
22
+ 2. For each changed file, verify:
23
+ - Does it follow existing patterns?
24
+ - Are file paths and imports correct?
25
+ - Follows the project's logging conventions (check CLAUDE.md)?
26
+ - Types are clean and consistent?
27
+ - Tests cover the important logic?
28
+ - No security issues (injection, unsanitized input)?
29
+
30
+ 3. Do NOT blindly approve. If you find real issues:
31
+ - Verdict: **REQUEST_CHANGES**
32
+ - List specific issues with file paths and line numbers
33
+ - Describe what needs to change
34
+
35
+ 4. If the code is genuinely ready:
36
+ - Verdict: **APPROVE**
37
+ - Note any minor non-blocking suggestions
38
+
39
+ ## Post Review — Comment AND Vote on PR
40
+
41
+ You MUST do both of the following:
42
+
43
+ ### Step 1: Leave a detailed review comment
44
+
45
+ {{pr_comment_instructions}}
46
+ - pullRequestId: `{{pr_number}}`
47
+ - content: Your full review with verdict, findings, and sign-off
48
+ - Sign: `Review by Minions ({{agent_name}} — {{agent_role}})`
49
+
50
+ ### Step 2: Set your vote on the PR
51
+
52
+ {{pr_vote_instructions}}
53
+ - pullRequestId: `{{pr_number}}`
54
+ - If your verdict is **APPROVE**: vote `10` (approved)
55
+ - If your verdict is **REQUEST_CHANGES**: vote `-10` (rejected)
56
+ - If you have minor non-blocking suggestions: vote `5` (approved with suggestions)
57
+
58
+ This vote is visible to human reviewers in the PR UI and helps them understand the minions's assessment.
59
+
60
+ ## Handling Merge Conflicts
61
+ If you encounter merge conflicts (e.g., the PR shows conflicts):
62
+ 1. Note the conflict in your review comment. Do NOT attempt to resolve — flag it for the author.
63
+
64
+ ## CRITICAL: Do NOT run git checkout on the main working tree. Use `git diff` and `git show` only.
65
+
66
+ ## Signal Completion
67
+
68
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
@@ -0,0 +1,75 @@
1
+ # Test / Build / Run: {{item_name}}
2
+
3
+ > Agent: {{agent_name}} ({{agent_role}}) | ID: {{item_id}} | Priority: {{item_priority}}
4
+
5
+ ## Context
6
+
7
+ Repo: {{repo_name}} | Org: {{ado_org}} | Project: {{ado_project}}
8
+ Team root: {{team_root}}
9
+
10
+ {{scope_section}}
11
+
12
+ ## Task Description
13
+
14
+ {{item_description}}
15
+
16
+ {{additional_context}}
17
+
18
+ ## Instructions
19
+
20
+ This is a **test/build/run task**. Your goal is to build, run, test, or verify something — NOT to create new features or PRs.
21
+
22
+ 1. **Navigate** to the correct project directory
23
+ 2. **If the task references a branch or PR**, check it out in a worktree:
24
+ ```bash
25
+ cd {{project_path}}
26
+ git worktree add ../worktrees/test-{{item_id}} <branch-name>
27
+ cd ../worktrees/test-{{item_id}}
28
+ ```
29
+ 3. **Build** the project — follow the repo's build instructions (check CLAUDE.md, package.json, README)
30
+ 4. **Run** if the task asks for it (e.g., `yarn start`, `yarn dev`, docker-compose, etc.)
31
+ 5. **Test** if the task asks for it (e.g., `yarn test`, `pytest`, etc.)
32
+ 6. **Report results** — what worked, what failed, build output, test results, localhost URL if running
33
+
34
+ ## Rules
35
+
36
+ - **Do NOT create pull requests** — this is a test/verification task only
37
+ - **Do NOT push commits** unless the task explicitly asks you to fix something
38
+ - **Do NOT modify code** unless the task explicitly asks for a fix
39
+ - Use PowerShell for build commands on Windows if applicable
40
+ - If a build or test fails, report the error clearly — don't try to fix it unless asked
41
+ - If running a local server, report the URL (e.g., http://localhost:3000)
42
+
43
+ ## Run Command (IMPORTANT)
44
+
45
+ When the build succeeds and the task involves running a server or app, you MUST output a ready-to-paste run command using **absolute paths** so the user can launch it from any terminal. Format it exactly like this:
46
+
47
+ ```
48
+ ## Run Command
49
+ cd <absolute-path-to-project-or-worktree> && <exact command to start the server>
50
+ ```
51
+
52
+ Example: `cd C:/Users/you/my-project && yarn dev`
53
+
54
+ The agent process terminates after completion, so any dev server you start will die with it. The user needs this command to run it themselves.
55
+
56
+ ## After Completion
57
+
58
+ Write your findings to: `{{team_root}}/notes/inbox/{{agent_id}}-{{item_id}}-{{date}}.md`
59
+
60
+ Include:
61
+ - Build status (pass/fail)
62
+ - Test results if applicable
63
+ - Any errors or warnings
64
+ - The run command (absolute paths, copy-pasteable from any terminal)
65
+ - Localhost URL if applicable
66
+
67
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
68
+
69
+ ## Cleanup
70
+
71
+ If you created a worktree, clean it up when done:
72
+ ```bash
73
+ cd {{project_path}}
74
+ git worktree remove ../worktrees/test-{{item_id}} --force
75
+ ```
@@ -0,0 +1,190 @@
1
+ # Plan Verification: {{item_name}}
2
+
3
+ > Agent: {{agent_name}} ({{agent_role}}) | Team root: {{team_root}}
4
+
5
+ ## Context
6
+
7
+ Project: {{project_name}}
8
+ Repo: {{repo_name}} | Org: {{ado_org}} | ADO Project: {{ado_project}}
9
+
10
+ ## Plan Details
11
+
12
+ {{task_description}}
13
+
14
+ ## Your Task
15
+
16
+ Build, test, and verify a set of related changes. Your job is to:
17
+ 1. **Set up one worktree per project** with all PR branches merged in
18
+ 2. **Build and test** from each worktree
19
+ 3. **Start the webapp** on localhost (keep it running — **detached so it survives after your process exits**)
20
+ 4. **Write a manual testing guide**
21
+
22
+ ## Step 1: Set Up Worktrees
23
+
24
+ The description above contains setup commands that create **one worktree per project** and merge all PR branches into it. Run them.
25
+
26
+ If any merge conflicts occur:
27
+ - Resolve them, preferring the PR branch changes
28
+ - Commit the resolution in the worktree
29
+
30
+ After setup, all changes for a project are in a single directory — no switching between branches.
31
+
32
+ ## Step 2: Build Each Project
33
+
34
+ For each project worktree listed above:
35
+ 1. `cd` into the worktree path
36
+ 2. Read its CLAUDE.md / package.json / README for build instructions
37
+ 3. Install dependencies (`yarn install`, `npm install`, etc.)
38
+ 4. Run the build (`yarn build`, `npm run build`, etc.)
39
+ 5. Record: PASS or FAIL with error output
40
+
41
+ If a build fails, **do NOT fix it** — report the error and continue with other projects.
42
+
43
+ ## Step 3: Run Tests
44
+
45
+ For each project that built successfully:
46
+ 1. Run the test suite from the worktree
47
+ 2. Record passed/failed/skipped counts
48
+
49
+ ## Step 4: Start the Webapp
50
+
51
+ Determine which project is the **user-facing webapp** (has a dev server, UI):
52
+ - Check for `dev`, `start`, `serve` scripts in package.json
53
+ - Look for web frameworks (React, Next.js, TanStack, Vite, etc.)
54
+
55
+ If found:
56
+ 1. Start the dev server **detached from your process** so it survives after you exit:
57
+ ```bash
58
+ cd <worktree-path>
59
+ node -e "
60
+ const { spawn } = require('child_process');
61
+ const fs = require('fs');
62
+ const child = spawn('cmd', ['/c', '<start-command>'], {
63
+ cwd: process.cwd(),
64
+ detached: true,
65
+ stdio: ['ignore', fs.openSync('dev-server.log', 'w'), fs.openSync('dev-server.log', 'w')]
66
+ });
67
+ child.unref();
68
+ fs.writeFileSync('dev-server.pid', String(child.pid));
69
+ console.log('Server started, PID:', child.pid);
70
+ "
71
+ ```
72
+ 2. Wait a few seconds, then verify it's responding: `curl -s -o /dev/null -w "%{http_code}" http://localhost:<PORT>`
73
+ 3. Note the localhost URL, port, and PID
74
+ 4. Output the exact restart command with **absolute worktree paths**
75
+ 5. Include stop command: `taskkill //PID <PID> //F`
76
+
77
+ ## Step 5: Write the Manual Testing Guide
78
+
79
+ Create the testing guide in TWO locations:
80
+ 1. **Permanent location** (linked from dashboard): `{{team_root}}/prd/guides/verify-{{date}}.md`
81
+ 2. **Inbox copy** (for team consolidation): `{{team_root}}/notes/inbox/verify-{{date}}.md`
82
+
83
+ Structure:
84
+
85
+ ```markdown
86
+ # Manual Testing Guide
87
+
88
+ **Date:** {{date}}
89
+ **Plan:** <plan file>
90
+ **Local Server:** http://localhost:XXXX (or N/A)
91
+ **Restart Command:** `cd <absolute-worktree-path> && <command>`
92
+
93
+ ## Build Status
94
+
95
+ | Project | Worktree Path | Build | Tests | Notes |
96
+ |---------|--------------|-------|-------|-------|
97
+ | name | path | PASS/FAIL | X pass, Y fail | notes |
98
+
99
+ ## What to Test
100
+
101
+ ### <Feature Name> (Plan Item ID)
102
+ **What changed:** brief description
103
+ **How to test:**
104
+ 1. Navigate to http://localhost:XXXX/path
105
+ 2. Click on / interact with ...
106
+ 3. You should see ...
107
+
108
+ **Expected behavior:**
109
+ - (from acceptance criteria)
110
+ - (from acceptance criteria)
111
+
112
+ ### <Next Feature> ...
113
+
114
+ ## Integration Points
115
+
116
+ Cross-project interactions to verify:
117
+ - e.g., "Bebop sends message via AugLoop → OfficeAgent receives and responds"
118
+ - e.g., "Progression UI updates in real-time as WebSocket messages arrive"
119
+
120
+ ## Known Issues
121
+ - Build warnings, test failures, merge conflicts, unimplemented items
122
+
123
+ ## Quick Smoke Test
124
+ A minimal 5-step checklist to verify the core functionality:
125
+ 1. Open http://localhost:XXXX
126
+ 2. ...
127
+ 3. ...
128
+ 4. ...
129
+ 5. ...
130
+ ```
131
+
132
+ ## Step 6: Create E2E Pull Requests
133
+
134
+ For each project that has changes, create a single **aggregate PR** that combines all the plan's branches into one. This gives the human reviewer a single diff showing the full picture of everything built.
135
+
136
+ For each project worktree:
137
+
138
+ 1. You're already in the worktree with all branches merged. Push this combined branch:
139
+ ```bash
140
+ cd <worktree-path>
141
+ git checkout -b e2e/<plan-slug>
142
+ git push origin e2e/<plan-slug>
143
+ ```
144
+
145
+ 2. Create a PR targeting the project's main branch using `mcp__azure-ado__repo_create_pull_request` (or `gh pr create` for GitHub):
146
+ - **Title:** `[E2E] <plan summary>`
147
+ - **Description:** Include:
148
+ - The plan summary
149
+ - List of all individual PRs that are merged into this branch
150
+ - The testing guide (copy from Step 5)
151
+ - Build/test status from Step 2-3
152
+ - **Target branch:** the project's main branch (e.g., `main` or `master`)
153
+ - **Do NOT auto-complete** — this is for review only
154
+ - **Mark as draft** if the option is available
155
+
156
+ 3. Add the E2E PR to the project's `.minions/pull-requests.json`:
157
+ ```bash
158
+ node -e "
159
+ const fs = require('fs');
160
+ const p = '<project-path>/.minions/pull-requests.json';
161
+ const prs = JSON.parse(fs.readFileSync(p, 'utf8'));
162
+ prs.push({
163
+ id: 'PR-<number>',
164
+ title: '[E2E] <plan summary>',
165
+ agent: '{{agent_name}}',
166
+ branch: 'e2e/<plan-slug>',
167
+ reviewStatus: 'pending',
168
+ status: 'active',
169
+ created: new Date().toISOString().slice(0,10),
170
+ url: '<pr-url>',
171
+ prdItems: []
172
+ });
173
+ fs.writeFileSync(p, JSON.stringify(prs, null, 2));
174
+ "
175
+ ```
176
+
177
+ 4. Note the E2E PR URLs in the testing guide.
178
+
179
+ ## Rules
180
+
181
+ - Base testing steps on the **acceptance criteria** from each plan item
182
+ - Include **concrete steps** — URLs, buttons to click, inputs to type, expected visual results
183
+ - If a project doesn't build, still document what SHOULD be testable once fixed
184
+ - Do NOT fix code — only report issues
185
+ - Leave all worktrees in place for the user to inspect
186
+ - The local server MUST be started **detached** (using `spawn` with `detached: true` + `child.unref()`) so it keeps running after your process exits. Save the PID to `dev-server.pid` in the worktree.
187
+ - Use absolute paths everywhere so the user can copy-paste commands
188
+ - E2E PRs are for review only — do NOT auto-complete or merge them
189
+
190
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
@@ -0,0 +1,74 @@
1
+ # Work Item: {{item_name}}
2
+
3
+ > Agent: {{agent_name}} ({{agent_role}}) | ID: {{item_id}} | Priority: {{item_priority}} | Type: {{work_type}}
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
+ {{scope_section}}
12
+
13
+ ## Task Description
14
+
15
+ {{item_description}}
16
+
17
+ {{additional_context}}
18
+
19
+ ## Branch Naming Convention
20
+ Branch format: `feat/{{item_id}}-<short-description>`
21
+ Keep branch names lowercase, use hyphens, max 60 chars.
22
+
23
+ ## Steps
24
+
25
+ 1. **Understand the task** — read the description carefully, explore relevant code
26
+ 2. **Navigate** to the correct project directory: `{{project_path}}`
27
+ 3. **Create a worktree** for your changes:
28
+ ```bash
29
+ cd {{project_path}}
30
+ git worktree add ../worktrees/feat-{{item_id}} -b feat/{{item_id}}-<short-desc> {{main_branch}}
31
+ cd ../worktrees/feat-{{item_id}}
32
+ ```
33
+ 4. **Implement** the changes
34
+ 5. **Build and verify** — ensure the build passes. If it fails, fix and retry (up to 3 times)
35
+ 6. **Commit and push**:
36
+ ```bash
37
+ git add -A
38
+ git commit -m "feat({{item_id}}): <description>"
39
+ git push -u origin feat/{{item_id}}-<short-desc>
40
+ ```
41
+ 7. **Create a PR:**
42
+ {{pr_create_instructions}}
43
+ - sourceRefName: `refs/heads/feat/{{item_id}}-<short-desc>`
44
+ - targetRefName: `refs/heads/{{main_branch}}`
45
+ - title: `feat({{item_id}}): <description>`
46
+ 8. **Post implementation notes** as a PR thread comment:
47
+ {{pr_comment_instructions}}
48
+ 9. **Add PR to tracker** — append to `{{project_path}}/.minions/pull-requests.json`:
49
+ ```json
50
+ { "id": "PR-<number>", "title": "...", "agent": "{{agent_name}}", "branch": "...", "reviewStatus": "pending", "status": "active", "created": "<date>", "url": "<pr-url>", "prdItems": ["{{item_id}}"] }
51
+ ```
52
+ 10. **Clean up worktree**:
53
+ ```bash
54
+ cd {{project_path}}
55
+ git worktree remove ../worktrees/feat-{{item_id}} --force
56
+ ```
57
+
58
+ ## After Completion
59
+
60
+ Write your findings to: `{{team_root}}/notes/inbox/{{agent_id}}-{{item_id}}-{{date}}.md`
61
+
62
+ **Note:** Do NOT write to `agents/*/status.json` — the engine manages your status automatically.
63
+
64
+ ## Rules
65
+ - NEVER checkout branches in the main working tree — use worktrees
66
+ - Use the repo host's MCP tools for PR creation — check available MCP tools before starting
67
+ - Use PowerShell for build commands on Windows if applicable
68
+ - If you discover a repeatable workflow, output it as a ```skill block (the engine auto-extracts it to ~/.claude/skills/)
69
+
70
+ ## Handling Merge Conflicts
71
+ If you encounter merge conflicts during push or PR creation:
72
+ 1. Resolve conflicts in the worktree, preferring your changes
73
+ 2. Commit the resolution
74
+ 3. Push again