@yemi33/minions 0.1.1633 → 0.1.1634
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.
- package/CHANGELOG.md +5 -0
- package/dashboard.js +46 -0
- package/engine/copilot-models.json +1 -1
- package/engine/playbook.js +2 -1
- package/package.json +1 -1
- package/playbooks/docs.md +113 -0
- package/prompts/cc-system.md +2 -0
package/CHANGELOG.md
CHANGED
package/dashboard.js
CHANGED
|
@@ -25,6 +25,9 @@ const ado = require('./engine/ado');
|
|
|
25
25
|
const gh = require('./engine/github');
|
|
26
26
|
const issues = require('./engine/issues');
|
|
27
27
|
const watchesMod = require('./engine/watches');
|
|
28
|
+
const routing = require('./engine/routing');
|
|
29
|
+
const playbook = require('./engine/playbook');
|
|
30
|
+
const dispatchMod = require('./engine/dispatch');
|
|
28
31
|
const os = require('os');
|
|
29
32
|
|
|
30
33
|
const { safeRead, safeReadDir, safeWrite, safeJson, safeJsonObj, safeJsonArr, safeUnlink, mutateJsonFileLocked, mutateWorkItems, getProjects: _getProjects, DONE_STATUSES, WI_STATUS, reopenWorkItem } = shared;
|
|
@@ -1238,6 +1241,49 @@ async function executeCCActions(actions) {
|
|
|
1238
1241
|
results.push({ type: action.type, id, ok: true });
|
|
1239
1242
|
break;
|
|
1240
1243
|
}
|
|
1244
|
+
case 'build-and-test': {
|
|
1245
|
+
// Resolve PR by number, ID, or URL — same lookup that drives the link-pr / PR-row paths.
|
|
1246
|
+
const allPrs = getPullRequests().filter(p => !p._ghost);
|
|
1247
|
+
const pr = shared.findPrRecord(allPrs, action.pr) || null;
|
|
1248
|
+
if (!pr) {
|
|
1249
|
+
results.push({ type: 'build-and-test', error: `PR not found: ${action.pr}` });
|
|
1250
|
+
break;
|
|
1251
|
+
}
|
|
1252
|
+
// Resolve project: explicit param wins, else PR's _project, else first configured project as last resort.
|
|
1253
|
+
const projectName = action.project || pr._project || null;
|
|
1254
|
+
const project = projectName
|
|
1255
|
+
? PROJECTS.find(p => p.name?.toLowerCase() === String(projectName).toLowerCase())
|
|
1256
|
+
: null;
|
|
1257
|
+
if (!project) {
|
|
1258
|
+
results.push({ type: 'build-and-test', error: `Project not found for PR ${pr.id}: ${projectName || '(none)'}` });
|
|
1259
|
+
break;
|
|
1260
|
+
}
|
|
1261
|
+
// Pick agent: explicit param wins; else routing for 'test' work type.
|
|
1262
|
+
let agentId = action.agent && CONFIG.agents?.[action.agent] ? action.agent : null;
|
|
1263
|
+
if (!agentId) {
|
|
1264
|
+
agentId = routing.resolveAgent('test', CONFIG, { authorAgent: pr.agent });
|
|
1265
|
+
}
|
|
1266
|
+
if (!agentId) {
|
|
1267
|
+
results.push({ type: 'build-and-test', error: 'No available agent for test routing' });
|
|
1268
|
+
break;
|
|
1269
|
+
}
|
|
1270
|
+
const prNumber = shared.getPrNumber(pr);
|
|
1271
|
+
const dispatchKey = `cc-bt-${project.name}-${pr.id}`;
|
|
1272
|
+
const item = playbook.buildPrDispatch(agentId, CONFIG, project, pr, 'test', {
|
|
1273
|
+
pr_id: pr.id, pr_number: prNumber, pr_title: pr.title || '', pr_branch: pr.branch || '',
|
|
1274
|
+
pr_author: pr.agent || '', pr_url: pr.url || '',
|
|
1275
|
+
project_path: project.localPath || '',
|
|
1276
|
+
task: `Build & test ${pr.id}: ${pr.title || ''}`,
|
|
1277
|
+
}, `Build & test ${pr.id}: ${pr.title || ''}`,
|
|
1278
|
+
{ dispatchKey, source: 'cc-build-and-test', pr, branch: pr.branch, project: { name: project.name, localPath: project.localPath } });
|
|
1279
|
+
if (!item) {
|
|
1280
|
+
results.push({ type: 'build-and-test', error: 'Failed to render build-and-test playbook' });
|
|
1281
|
+
break;
|
|
1282
|
+
}
|
|
1283
|
+
const id = dispatchMod.addToDispatch(item);
|
|
1284
|
+
results.push({ type: 'build-and-test', id, agent: agentId, pr: pr.id, ok: true });
|
|
1285
|
+
break;
|
|
1286
|
+
}
|
|
1241
1287
|
case 'note': {
|
|
1242
1288
|
shared.writeToInbox('command-center', shared.slugify(action.title || 'note'), `# ${action.title || 'Note'}\n\n${action.content || action.description || ''}`);
|
|
1243
1289
|
results.push({ type: 'note', ok: true });
|
package/engine/playbook.js
CHANGED
|
@@ -278,6 +278,7 @@ const PLAYBOOK_REQUIRED_VARS = {
|
|
|
278
278
|
'decompose': ['item_id', 'item_description', 'project_path'],
|
|
279
279
|
'verify': ['task_description'],
|
|
280
280
|
'test': ['item_name'],
|
|
281
|
+
'docs': ['item_id', 'item_name'],
|
|
281
282
|
'work-item': ['item_id', 'item_name'],
|
|
282
283
|
'meeting-investigate': ['meeting_title', 'agenda'],
|
|
283
284
|
'meeting-debate': ['meeting_title', 'agenda'],
|
|
@@ -630,7 +631,7 @@ function selectPlaybook(workType, item) {
|
|
|
630
631
|
if (workType === WORK_TYPE.REVIEW && !item?._pr && !item?.pr_id) {
|
|
631
632
|
return 'work-item';
|
|
632
633
|
}
|
|
633
|
-
const typeSpecificPlaybooks = ['explore', 'review', 'test', 'plan-to-prd', 'plan', 'ask', 'verify', 'decompose', 'meeting-investigate', 'meeting-debate', 'meeting-conclude'];
|
|
634
|
+
const typeSpecificPlaybooks = ['explore', 'review', 'test', 'plan-to-prd', 'plan', 'ask', 'verify', 'decompose', 'docs', 'meeting-investigate', 'meeting-debate', 'meeting-conclude'];
|
|
634
635
|
return typeSpecificPlaybooks.includes(workType) ? workType : 'work-item';
|
|
635
636
|
}
|
|
636
637
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1634",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Docs Playbook
|
|
2
|
+
|
|
3
|
+
> Agent: {{agent_name}} ({{agent_role}}) | Task: {{item_name}} | ID: {{item_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
|
+
Update, expand, or rewrite project documentation. Targets include READMEs, CLAUDE.md,
|
|
14
|
+
files under `docs/`, JSDoc/TSDoc on exported APIs, and inline comments where they add
|
|
15
|
+
real WHY value (not WHAT — the code already says what). Keep voice consistent with the
|
|
16
|
+
project's existing docs.
|
|
17
|
+
|
|
18
|
+
## Task
|
|
19
|
+
|
|
20
|
+
**{{item_name}}**
|
|
21
|
+
|
|
22
|
+
{{item_description}}
|
|
23
|
+
|
|
24
|
+
{{additional_context}}
|
|
25
|
+
|
|
26
|
+
{{references}}
|
|
27
|
+
|
|
28
|
+
{{acceptance_criteria}}
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
### 1. Read the doc(s) and the code they describe
|
|
33
|
+
|
|
34
|
+
- Open the doc(s) being changed end-to-end before writing.
|
|
35
|
+
- Read the source they describe — function signatures, exported symbols, config keys,
|
|
36
|
+
CLI flags, file paths. Don't trust the existing doc; trust the code.
|
|
37
|
+
- For project-level docs (README, CLAUDE.md, /docs/*.md), skim adjacent docs so your
|
|
38
|
+
voice and structure match.
|
|
39
|
+
|
|
40
|
+
### 2. Confirm doc reflects current code
|
|
41
|
+
|
|
42
|
+
For every claim in the doc you're touching, verify it against current code:
|
|
43
|
+
|
|
44
|
+
- Does the function still exist with that signature?
|
|
45
|
+
- Are the file paths correct?
|
|
46
|
+
- Are the listed flags / config keys still accepted?
|
|
47
|
+
- Are removed features still being documented?
|
|
48
|
+
- Are new features (visible in code) missing from the doc?
|
|
49
|
+
|
|
50
|
+
If the doc describes vapor, delete the section. If real features are missing, add them.
|
|
51
|
+
|
|
52
|
+
### 3. Write or update concisely
|
|
53
|
+
|
|
54
|
+
- Match the project's existing voice — read 2-3 nearby docs to calibrate tone.
|
|
55
|
+
- Prefer concrete examples over abstract description.
|
|
56
|
+
- For code comments: follow the project's "Default to writing no comments" rule
|
|
57
|
+
(CLAUDE.md). Add comments only where they explain WHY a non-obvious choice was made,
|
|
58
|
+
never to restate WHAT the code does.
|
|
59
|
+
- For project-level docs: the bar is "would a new contributor understand this?"
|
|
60
|
+
- Keep tables, lists, and code blocks formatted consistently with surrounding docs.
|
|
61
|
+
|
|
62
|
+
### 4. Verify
|
|
63
|
+
|
|
64
|
+
- Re-read the changed doc end-to-end after editing — does it still flow?
|
|
65
|
+
- If the project has doc-validation tests (lint, link-check, snippet-execution), run
|
|
66
|
+
them. Otherwise run `npm test` (or the project's documented test command) to make
|
|
67
|
+
sure nothing else broke.
|
|
68
|
+
- For docs with embedded code samples, mentally execute each sample against current
|
|
69
|
+
code — stale samples are worse than missing ones.
|
|
70
|
+
|
|
71
|
+
## Acceptance
|
|
72
|
+
|
|
73
|
+
- Doc accurately reflects current code (no vapor, no missing features).
|
|
74
|
+
- Voice and structure match the rest of the project's docs.
|
|
75
|
+
- For inline code comments: follow project conventions; add comments only where they
|
|
76
|
+
explain WHY, never WHAT.
|
|
77
|
+
- For project-level docs: a new contributor could read it and understand the topic.
|
|
78
|
+
- Existing tests still pass; any doc-validation tests pass.
|
|
79
|
+
|
|
80
|
+
## Git Workflow
|
|
81
|
+
|
|
82
|
+
You are already running in a git worktree on branch `{{branch_name}}`. Do NOT create
|
|
83
|
+
additional worktrees — the engine pre-created one for you. Do NOT remove the worktree —
|
|
84
|
+
the engine handles cleanup automatically.
|
|
85
|
+
|
|
86
|
+
Commit only the doc files (and any helper assets they reference). Do not bundle
|
|
87
|
+
unrelated code changes into a docs PR.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
git add <doc files>
|
|
91
|
+
git commit -m "{{commit_message}}"
|
|
92
|
+
git push -u origin {{branch_name}}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
PR creation is MANDATORY for docs tasks — docs go through the same review flow as code.
|
|
96
|
+
Use the appropriate repo-host tooling for PR creation. For Azure DevOps, prefer the
|
|
97
|
+
`az` CLI first and use the ADO MCP only as a fallback.
|
|
98
|
+
|
|
99
|
+
## Rules
|
|
100
|
+
|
|
101
|
+
- Do NOT modify product code unless the task explicitly asks for it.
|
|
102
|
+
- Do NOT add comments that restate what the code does.
|
|
103
|
+
- Do NOT invent features that don't exist; verify against current code.
|
|
104
|
+
- Read `notes.md` for all team rules before starting.
|
|
105
|
+
|
|
106
|
+
## When to Stop
|
|
107
|
+
|
|
108
|
+
Your task is complete once the doc accurately reflects current code, the PR is created
|
|
109
|
+
with the changed doc files, and any doc-validation tests pass. Do not continue editing
|
|
110
|
+
adjacent docs that weren't part of the task.
|
|
111
|
+
|
|
112
|
+
## Team Decisions
|
|
113
|
+
{{notes_content}}
|
package/prompts/cc-system.md
CHANGED
|
@@ -77,6 +77,8 @@ Core action types:
|
|
|
77
77
|
workTypes: `explore` (research/report only, NO PR), `ask` (answer/report, NO PR), `implement` (new code, PR REQUIRED), `fix` (bug fix, PR REQUIRED), `review` (code review, NO PR), `test` (tests, PR if new), `verify` (merge/build/maintenance, NO PR)
|
|
78
78
|
If the user wants a design/architecture artifact committed through a PR, dispatch `implement` or `docs` rather than `explore`.
|
|
79
79
|
When the user names a specific agent ("assign this to lambert"), put exactly that one name in `agents` (e.g. `"agents": ["lambert"]`). A single-agent assignment is hard-pinned by the server — it will queue for that agent only and skip the routing table. Use multi-agent arrays only when the user names multiple agents or asks for fan-out.
|
|
80
|
+
- **build-and-test**: pr, project (optional), agent (optional) — Run the build-and-test playbook against a PR. The agent will checkout the PR branch, run the project's build/test commands, and report results. Use when the user asks to "run tests on PR X" or "build PR X" or after a fix to verify nothing regressed.
|
|
81
|
+
Example: user says "run build and test on PR 1834" → `{"type":"build-and-test","pr":"1834"}`
|
|
80
82
|
- **note**: title, content — save to inbox
|
|
81
83
|
- **knowledge**: title, content, category (architecture/conventions/project-notes/build-reports/reviews) — create new KB entry or copy existing doc to KB
|
|
82
84
|
- **pin-to-pinned**: title, content, level (critical/warning) — write to pinned.md, force-injected into ALL agent prompts (rarely needed)
|