agentcohort 0.1.1 → 0.3.0
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/README.md +88 -12
- package/dist/args.d.ts +1 -0
- package/dist/args.js +9 -0
- package/dist/cli.js +45 -2
- package/dist/config.d.ts +32 -0
- package/dist/config.js +100 -0
- package/dist/configCmd.d.ts +27 -0
- package/dist/configCmd.js +54 -0
- package/dist/defaults.d.ts +21 -0
- package/dist/defaults.js +22 -0
- package/dist/diff.d.ts +24 -0
- package/dist/diff.js +64 -0
- package/dist/installer.d.ts +2 -0
- package/dist/installer.js +5 -1
- package/dist/promptModels.d.ts +13 -0
- package/dist/promptModels.js +66 -0
- package/dist/render.d.ts +11 -0
- package/dist/render.js +35 -0
- package/dist/templates/CLAUDE.section.md +49 -1
- package/dist/templates/agents/bug-fixer.md +14 -0
- package/dist/templates/agents/bug-hunter.md +14 -0
- package/dist/templates/agents/dispatcher.md +130 -0
- package/dist/templates/agents/expert-council.md +14 -0
- package/dist/templates/agents/feature-implementer.md +14 -0
- package/dist/templates/agents/feature-planner.md +14 -0
- package/dist/templates/agents/final-reviewer.md +14 -0
- package/dist/templates/agents/perf-optimizer.md +14 -0
- package/dist/templates/agents/perf-reviewer.md +14 -0
- package/dist/templates/agents/performance-hunter.md +14 -0
- package/dist/templates/agents/regression-guard.md +14 -0
- package/dist/templates/agents/repo-scout.md +14 -0
- package/dist/templates/agents/reproduction-engineer.md +14 -0
- package/dist/templates/agents/root-cause-analyst.md +14 -0
- package/dist/templates/agents/solution-architect.md +14 -0
- package/dist/templates/agents/test-verifier.md +14 -0
- package/dist/templates/commands/auto-flow.md +64 -28
- package/dist/templates/commands/quick-feature.md +55 -0
- package/dist/templates/commands/quick-fix.md +53 -0
- package/package.json +7 -3
|
@@ -1,41 +1,77 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Smart router — dispatcher classifies the task into a tier, prints a plan, and executes only after explicit user approval.
|
|
3
3
|
argument-hint: <describe the task, paste the bug, or point at the diff>
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /auto-flow —
|
|
6
|
+
# /auto-flow — Dispatcher-driven router
|
|
7
7
|
|
|
8
|
-
You are the **orchestrator**. Do not start
|
|
9
|
-
|
|
8
|
+
You are the **orchestrator**. Do **not** start the downstream pipeline
|
|
9
|
+
yet. First classify, then surface the plan, then wait for the user.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Step 1 — Classify (cheap, mandatory)
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
stability / "it's broken" / "wrong output"** (and not yet approved) →
|
|
18
|
-
**BUG AUDIT FLOW** → run `/bug-audit`. *No fixing.*
|
|
19
|
-
3. **Slow / latency / bottleneck / high memory / profiling / "make it
|
|
20
|
-
faster"** → **PERFORMANCE FLOW** → run `/perf-hunt`.
|
|
21
|
-
4. **Review a diff / PR / "is this safe to merge"** → **REVIEW FLOW** →
|
|
22
|
-
run `/review-diff`.
|
|
23
|
-
5. **Feature / new behavior / refactor / "add" / "implement" / "change how X
|
|
24
|
-
works"** → **DEV FLOW** → run `/dev-flow`.
|
|
13
|
+
Invoke the `dispatcher` subagent on `$ARGUMENTS`. The dispatcher
|
|
14
|
+
returns a structured plan with: tier, pipeline, agents involved,
|
|
15
|
+
agents skipped, escalation triggers, cost band, and the exact next
|
|
16
|
+
command to run.
|
|
25
17
|
|
|
26
|
-
If
|
|
27
|
-
|
|
18
|
+
If the dispatcher escalates the tier above the user's intuitive
|
|
19
|
+
expectation, **trust the dispatcher** — escalation keywords (auth,
|
|
20
|
+
schema, migration, payment, security, concurrency, cache, …) are
|
|
21
|
+
non-negotiable.
|
|
22
|
+
|
|
23
|
+
## Step 2 — Surface the plan
|
|
24
|
+
|
|
25
|
+
Print the dispatcher's plan to the user verbatim, plus a single
|
|
26
|
+
question line:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Proceed with this plan? [y / escalate / abort / question]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- `y` → run the next step exactly as planned.
|
|
33
|
+
- `escalate` → move up one tier (e.g. Tier 2b → Tier 3 `/dev-flow`,
|
|
34
|
+
Tier 3 → Tier 4 with forced architect + expert-council) and re-print
|
|
35
|
+
the new plan.
|
|
36
|
+
- `abort` → stop. Do nothing else.
|
|
37
|
+
- `question` → answer the user's question; do not execute the plan
|
|
38
|
+
until you re-confirm.
|
|
39
|
+
|
|
40
|
+
## Step 3 — Execute the chosen next step
|
|
41
|
+
|
|
42
|
+
Only after the user replies `y`:
|
|
43
|
+
|
|
44
|
+
| Tier | Action |
|
|
45
|
+
|---|---|
|
|
46
|
+
| **0** | Answer inline using Read / Glob / Grep. No subagent. |
|
|
47
|
+
| **1** | Invoke `repo-scout` on `$ARGUMENTS`. Return the briefing. Stop. |
|
|
48
|
+
| **2a — quick-fix** | Run `/quick-fix` on `$ARGUMENTS`. |
|
|
49
|
+
| **2b — quick-feature** | Run `/quick-feature` on `$ARGUMENTS`. |
|
|
50
|
+
| **3 — dev** | Run `/dev-flow` on `$ARGUMENTS`. |
|
|
51
|
+
| **3 — bug audit** | Run `/bug-audit` on `$ARGUMENTS`. (No fixing — invariant.) |
|
|
52
|
+
| **3 — perf** | Run `/perf-hunt` on `$ARGUMENTS`. |
|
|
53
|
+
| **3 — review** | Run `/review-diff`. |
|
|
54
|
+
| **3 — bug fix approved** | Run `/bug-fix-approved` on `$ARGUMENTS`. |
|
|
55
|
+
| **4 — escalated** | Run `/dev-flow` (or `/bug-audit`/`/perf-hunt`) and **force** the architect stage + expert-council stage on. |
|
|
28
56
|
|
|
29
57
|
## Hard rules
|
|
30
58
|
|
|
31
|
-
- **Never
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
59
|
+
- **Never run downstream agents before the user replies `y`.** Silent
|
|
60
|
+
routing destroys the value of having a plan.
|
|
61
|
+
- **Bug audit never fixes.** Invariant from `/bug-audit`. The
|
|
62
|
+
dispatcher cannot route a Tier 4 bug into a fix path.
|
|
63
|
+
- **Reviewer is never skipped** for any code change, regardless of
|
|
64
|
+
tier. The mini-commands `/quick-fix` and `/quick-feature` already
|
|
65
|
+
enforce this.
|
|
66
|
+
- **Regression-guard is never skipped** for any bug fix.
|
|
67
|
+
- Respect the model strategy: cheap for scouting/dispatcher, mid for
|
|
68
|
+
implement/test/hunt, premium for architecture/root-cause/council/review.
|
|
69
|
+
- Enforce scope discipline: no unrelated refactors; no API / schema /
|
|
70
|
+
auth / security / persistence semantic changes without explicit
|
|
71
|
+
approval (Tier 4 + architect verdict).
|
|
37
72
|
|
|
38
|
-
##
|
|
73
|
+
## Notes for users skipping the plan
|
|
39
74
|
|
|
40
|
-
|
|
41
|
-
|
|
75
|
+
If your project's CLAUDE.md says "skip dispatcher for trivial questions"
|
|
76
|
+
or similar, honour it — but only for Tier 0 questions. Anything that
|
|
77
|
+
might touch code goes through the dispatcher first.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Tier 2b — small, local feature in 1–3 files with no API / schema / auth surface. Skips architect and planner; keeps review.
|
|
3
|
+
argument-hint: <the small, local feature to add>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /quick-feature — Scout → Implement → Test → Review (no architect, no planner)
|
|
7
|
+
|
|
8
|
+
Use this when the change is small and **clearly local**: a single
|
|
9
|
+
component, a single utility, a small UI addition, a copy change with
|
|
10
|
+
logic, etc. It is the shorter sibling of `/dev-flow` for tasks that do
|
|
11
|
+
not deserve a full architect + planner stage.
|
|
12
|
+
|
|
13
|
+
If the change is **anywhere near** API contract, data model, auth,
|
|
14
|
+
schema, migrations, payment, security, concurrency, caching, or any
|
|
15
|
+
other cross-cutting concern, do **not** use this — use `/dev-flow`.
|
|
16
|
+
|
|
17
|
+
## Pre-flight
|
|
18
|
+
|
|
19
|
+
If `$ARGUMENTS` is vague about scope, **stop and ask** for:
|
|
20
|
+
- the user-visible behavior change,
|
|
21
|
+
- the file(s) you expect to touch (or the surface area you expect).
|
|
22
|
+
|
|
23
|
+
If the surface obviously exceeds 3 files, abort and route to `/dev-flow`.
|
|
24
|
+
|
|
25
|
+
## Pipeline
|
|
26
|
+
|
|
27
|
+
1. **repo-scout** — locate the exact files, confirm scope is local,
|
|
28
|
+
produce a compact briefing. If scope turns out to be larger than
|
|
29
|
+
expected, **stop** and recommend `/dev-flow`.
|
|
30
|
+
2. **feature-implementer** — implement the change with the smallest
|
|
31
|
+
correct edit; add focused tests; targeted verification; no scope
|
|
32
|
+
creep.
|
|
33
|
+
3. **test-verifier** — run tests, typecheck, lint; fix only breakages
|
|
34
|
+
caused by this change; report real output.
|
|
35
|
+
4. **final-reviewer** — review the actual diff: correctness, regression,
|
|
36
|
+
scope creep, security, data consistency, missing tests. Verdict
|
|
37
|
+
required.
|
|
38
|
+
|
|
39
|
+
## Rules
|
|
40
|
+
|
|
41
|
+
- **No scope creep.** Anything found outside the stated change is
|
|
42
|
+
reported, not done.
|
|
43
|
+
- **No architect, no expert-council** at this tier — that is precisely
|
|
44
|
+
what `/dev-flow` is for.
|
|
45
|
+
- **Reviewer is mandatory.** This is the only catch for what the
|
|
46
|
+
skipped stages would have caught.
|
|
47
|
+
- **No API / schema / auth / security / persistence semantic change.**
|
|
48
|
+
If any of those would be touched, abort and switch to `/dev-flow`.
|
|
49
|
+
- If `final-reviewer` returns BLOCK, recommend `/fix-blockers` — do not
|
|
50
|
+
auto-loop.
|
|
51
|
+
|
|
52
|
+
## Output
|
|
53
|
+
|
|
54
|
+
Stage-by-stage summary + reviewer's APPROVE/BLOCK verdict + the
|
|
55
|
+
concrete next step.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Tier 2a — small bug fix where the root cause is already known. Skips audit; keeps regression test + review.
|
|
3
|
+
argument-hint: <the bug + the known root cause + the fix to apply>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /quick-fix — Fix → Regression → Verify → Review (no audit)
|
|
7
|
+
|
|
8
|
+
Use this **only** when the root cause is already established and the
|
|
9
|
+
fix is small (typically 1–2 files, ≤ a few lines). It is a shorter
|
|
10
|
+
sibling of `/bug-fix-approved` for changes where a full audit and an
|
|
11
|
+
explicit human approval gate are overkill.
|
|
12
|
+
|
|
13
|
+
If you are *investigating* a bug, do **not** use this — use `/bug-audit`.
|
|
14
|
+
|
|
15
|
+
## Pre-flight
|
|
16
|
+
|
|
17
|
+
`$ARGUMENTS` must contain:
|
|
18
|
+
1. the bug (symptom),
|
|
19
|
+
2. the stated root cause,
|
|
20
|
+
3. the proposed fix.
|
|
21
|
+
|
|
22
|
+
If any of the three is missing, **stop and ask**. If the dispatcher
|
|
23
|
+
escalated this task (any keyword from auth, schema, migration, payment,
|
|
24
|
+
security, concurrency, cache, …), route to `/bug-fix-approved` instead.
|
|
25
|
+
|
|
26
|
+
## Pipeline
|
|
27
|
+
|
|
28
|
+
1. **bug-fixer** — apply the stated fix at the **root cause**; minimal
|
|
29
|
+
and reversible; strictly within the stated scope.
|
|
30
|
+
2. **regression-guard** — add a regression test that fails on the old
|
|
31
|
+
behavior and passes on the fixed behavior. **Mandatory.**
|
|
32
|
+
3. **test-verifier** — run tests, typecheck, lint; fix only breakages
|
|
33
|
+
caused by this change; report real output.
|
|
34
|
+
4. **final-reviewer** — review the actual diff: correctness, regression,
|
|
35
|
+
scope creep, security, missing tests. Verdict required.
|
|
36
|
+
|
|
37
|
+
## Rules
|
|
38
|
+
|
|
39
|
+
- **No skipping regression-guard or final-reviewer.** Both are cheap
|
|
40
|
+
insurance against re-emergence; both are non-negotiable even at this
|
|
41
|
+
tier.
|
|
42
|
+
- **Only the stated bug.** Other findings are reported, not fixed.
|
|
43
|
+
- **No symptom-only patch.** If the stated "root cause" turns out to be
|
|
44
|
+
a symptom, **stop** and route to `/bug-audit`.
|
|
45
|
+
- **No unapproved API/schema/auth/security/persistence change.** If the
|
|
46
|
+
fix needs one, abort and escalate to `/bug-audit`.
|
|
47
|
+
- If `final-reviewer` returns BLOCK, recommend `/fix-blockers` — do not
|
|
48
|
+
auto-loop.
|
|
49
|
+
|
|
50
|
+
## Output
|
|
51
|
+
|
|
52
|
+
Stage summary + failing→passing regression evidence + reviewer verdict
|
|
53
|
+
+ a one-line confirmation that no out-of-scope changes were made.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentcohort",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Install a principal/staff-level Claude Code AI software engineering organization (agents + workflows + routing rules) into any project with one command.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
46
|
-
"
|
|
46
|
+
"sync-boot": "node scripts/sync-boot-directive.mjs",
|
|
47
|
+
"build": "npm run clean && npm run sync-boot && tsc -p tsconfig.json && node scripts/copy-templates.mjs",
|
|
47
48
|
"test": "vitest run",
|
|
48
49
|
"test:watch": "vitest",
|
|
49
50
|
"prepublishOnly": "npm run build && npm test"
|
|
@@ -52,5 +53,8 @@
|
|
|
52
53
|
"@types/node": "^20.14.0",
|
|
53
54
|
"typescript": "^5.5.0",
|
|
54
55
|
"vitest": "^2.0.0"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@inquirer/prompts": "^7.10.1"
|
|
55
59
|
}
|
|
56
|
-
}
|
|
60
|
+
}
|