cohorte 1.6.0 → 2.0.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.
- package/CHANGELOG.md +117 -2
- package/README.md +57 -57
- package/bin/cli.js +23 -15
- package/core/agents/implementer.template.md +3 -3
- package/core/agents/release.md +1 -1
- package/core/agents/review.md +3 -3
- package/core/commands/{audit.md → cohorte-audit.md} +3 -3
- package/core/commands/{brainstorm.md → cohorte-brainstorm.md} +4 -4
- package/core/commands/{build.md → cohorte-build.md} +15 -15
- package/core/commands/{doctor.md → cohorte-doctor.md} +17 -9
- package/core/commands/{fix.md → cohorte-fix.md} +15 -13
- package/core/commands/{init-pipeline.md → cohorte-init-pipeline.md} +1 -1
- package/core/commands/cohorte-loop.md +110 -0
- package/core/commands/{refactor.md → cohorte-refactor.md} +3 -3
- package/core/commands/{review.md → cohorte-review.md} +20 -19
- package/core/commands/{ship.md → cohorte-ship.md} +5 -5
- package/core/commands/{spec.md → cohorte-spec.md} +13 -13
- package/core/commands/{update-pipeline.md → cohorte-update-pipeline.md} +11 -6
- package/core/hooks/gate.py +101 -6
- package/core/templates/brainstorm-return.md +4 -4
- package/core/templates/decisions.template.md +1 -1
- package/core/templates/design-brief.md +1 -1
- package/core/templates/spec.template.md +7 -7
- package/core/templates/steps/init-pipeline/01-detect-stack.md +1 -1
- package/core/templates/steps/init-pipeline/02-interview-gaps.md +6 -6
- package/core/templates/steps/init-pipeline/03-draft-profile.md +1 -1
- package/core/templates/steps/init-pipeline/04-write-render.md +16 -12
- package/core/templates/steps/init-pipeline/05-report.md +5 -5
- package/core/workflows/audit.js +6 -6
- package/core/workflows/refactor.js +14 -14
- package/core/workflows/review.js +22 -22
- package/dashboard/README.md +2 -2
- package/dashboard/dist/assets/{index-DYyn4p93.js → index-P1I1JGtj.js} +2 -2
- package/dashboard/dist/index.html +1 -1
- package/dashboard/server/doctor.js +69 -19
- package/dashboard/server/index.js +5 -5
- package/dashboard/server/metrics.js +1 -1
- package/install.ps1 +23 -14
- package/install.sh +24 -14
- package/package.json +2 -2
- package/profile/PIPELINE.template.md +17 -16
- package/profile/SCHEMA.md +89 -77
- package/profile/cohorte.config.template.yaml +8 -8
- package/scripts/loop-detach.sh +153 -0
- package/scripts/loop.sh +110 -29
- package/scripts/metrics/collect.mjs +17 -8
- package/scripts/new-feature.sh.template +3 -3
- package/scripts/preflight.sh +40 -4
- package/scripts/remove-feature.sh.template +2 -2
- package/scripts/test-dashboard.mjs +34 -7
- package/scripts/test-gate.mjs +58 -0
- package/scripts/test-loop.mjs +123 -20
- package/scripts/test-metrics.mjs +23 -11
- package/scripts/test-workflows.mjs +7 -7
- package/scripts/validate-core.mjs +45 -23
- package/core/commands/drive.md +0 -80
- /package/core/commands/{align-ds.md → cohorte-align-ds.md} +0 -0
package/core/commands/drive.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
model: sonnet
|
|
3
|
-
description: Autonomous /build → /review → /fix → /review loop for one feature, until no blocking finding remains.
|
|
4
|
-
argument-hint: <feature_id> [--max=N] [--no-build] [--rebuild] [--resume]
|
|
5
|
-
allowed-tools: Bash(bash ~/.claude/pipeline/scripts/loop.sh:*), Bash(bash .claude/pipeline/scripts/loop.sh:*), Bash(test:*), Read(specs/reports/**)
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
You are the **launcher**, not the loop. Run the driver for **$ARGUMENTS** and relay three lines.
|
|
10
|
-
|
|
11
|
-
> **This command was `/drive` until 1.6.0.** Claude Code ships its own built-in `/drive` (run a prompt on
|
|
12
|
-
> a recurring interval), which **shadowed** this one: typing `/drive <id>` started the interval runner
|
|
13
|
-
> with the feature id as its prompt, so the driver below never ran and the session reported a loop that
|
|
14
|
-
> did not exist. The shipped script keeps its `loop.sh` name — nothing about a user's install path
|
|
15
|
-
> changes, only what you type.
|
|
16
|
-
>
|
|
17
|
-
> This command exists because a slash command cannot `/clear` itself. Every phase of the loop runs
|
|
18
|
-
> as a **separate `claude -p` child session** with its own fresh context, driven by a bash script —
|
|
19
|
-
> so the diff, the N review reports and the N contracts never accumulate in YOUR history, which is
|
|
20
|
-
> re-sent at input price on every turn. Running the loop conversationally here would cost more than
|
|
21
|
-
> the loop saves.
|
|
22
|
-
|
|
23
|
-
## 1. Launch
|
|
24
|
-
|
|
25
|
-
Probe the core, then run the script — ONE Bash call, and let it run to completion:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
test -f .claude/pipeline/scripts/loop.sh \
|
|
29
|
-
&& bash .claude/pipeline/scripts/loop.sh $ARGUMENTS \
|
|
30
|
-
|| bash ~/.claude/pipeline/scripts/loop.sh $ARGUMENTS
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Pass `$ARGUMENTS` through untouched — the script owns its own flag parsing (`--max=N`,
|
|
34
|
-
`--no-build`, `--rebuild`, `--resume`) and exits 64 on anything it doesn't know. Don't validate flags
|
|
35
|
-
yourself, don't rewrite them, don't add any.
|
|
36
|
-
|
|
37
|
-
**Resume is the human's call, not yours.** The loop records its position in the spec's front-matter
|
|
38
|
-
(`status: in-progress` · `loop_pass` · `loop_phase` — SCHEMA.md §Spec status), so a run killed by a
|
|
39
|
-
dead session, a ceiling or a `blocked` exit can continue with `--resume` instead of re-paying the
|
|
40
|
-
passes it already made. If the human types `/drive <id>` on a spec whose front-matter says
|
|
41
|
-
`status: in-progress` or `blocked` with `loop_pass` > 1, say so in one line and ask whether to resume
|
|
42
|
-
or restart — never silently add the flag, and never silently restart from pass 1.
|
|
43
|
-
|
|
44
|
-
**Never read `specs/reports/<id>.loop.log`.** It holds the full transcript of every child session —
|
|
45
|
-
the entire diff, every review report, every fix handoff. Pulling it into this session re-imports
|
|
46
|
-
exactly the context the loop was built to keep out, and it is the one mistake that turns this
|
|
47
|
-
command into the most expensive one in the pipeline. Point the human at the path instead; they can
|
|
48
|
-
open it in an editor for free. The same goes for the per-surface `.diff` and `.preflight.txt` files.
|
|
49
|
-
|
|
50
|
-
## 2. Report — three lines, from the exit code
|
|
51
|
-
|
|
52
|
-
The script prints one line per phase and one closing line; that is your raw material. For exit
|
|
53
|
-
**1** or **3** only, also Read `specs/reports/<id>.verdict.json` (small, structured, safe) to name
|
|
54
|
-
the remaining findings — never the markdown report, which is the findings body in full. For exit
|
|
55
|
-
**4**, Read `specs/reports/<id>.readiness.json` instead (also small) and relay its `gaps`. On any
|
|
56
|
-
other exit the closing line already carries the deferred count, so read nothing.
|
|
57
|
-
|
|
58
|
-
| exit | meaning | what to say |
|
|
59
|
-
| ---- | ------- | ----------- |
|
|
60
|
-
| `0` | clean | no blocking findings left; the human can `/ship <id>` |
|
|
61
|
-
| `1` | ceiling hit | the fix was progressing but ran out of passes ⇒ re-run with a higher `--max` |
|
|
62
|
-
| `2` | no usable verdict | `/review` produced nothing, or aborted on a red preflight — the closing line says which; point at `specs/reports/<id>.preflight.txt` |
|
|
63
|
-
| `3` | non-convergent | the same blocking findings survived a fix pass; a higher `--max` will NOT help — the human needs to look at them (list them from the verdict) |
|
|
64
|
-
| `4` | not implementable | `/build`'s readiness gate returned `NOT-READY` — the frozen spec cannot be built and **no agent ran**; Read `specs/reports/<id>.readiness.json` (small, structured) and relay its `gaps`, then point at `/spec <id>`. More passes cannot fix this |
|
|
65
|
-
| `64` | usage | relay the script's own message verbatim |
|
|
66
|
-
|
|
67
|
-
Then print exactly three lines and nothing else — plus a fourth **only when the verdict carries
|
|
68
|
-
`deferred` > 0** (findings that were real but out of this feature's scope, parked in the backlog by
|
|
69
|
-
`/review` §3.5; they are not blocking and never cost a pass, but they are not nothing either):
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
outcome: <one clause — clean / ceiling / no verdict / non-convergent / not implementable / usage>
|
|
73
|
-
iterations: <n> review pass(es)<, m fix pass(es) committed>
|
|
74
|
-
remaining: <blocking count + one short phrase per blocking item, or "none">
|
|
75
|
-
deferred: <n> parked in specs/refactor-backlog.md — /refactor <domain> when you want them
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Add at most one follow-up sentence: the next command to run. Never restate a finding's fix, never
|
|
79
|
-
summarize the log, never open the diff. Each fix pass is already committed
|
|
80
|
-
(`loop(<id>): fix pass <i>`) — say so on a non-zero exit, since those commits are the way back.
|
|
File without changes
|