cohorte 3.1.1 → 3.1.3
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 +50 -2
- package/README.md +5 -3
- package/core/agents/implementer.template.md +1 -1
- package/core/hooks/gate.py +628 -599
- package/core/templates/steps/init-pipeline/02-interview-gaps.md +2 -1
- package/core/templates/steps/init-pipeline/04-write-render.md +10 -7
- package/lib/doctor.js +70 -1
- package/lib/install.js +15 -1
- package/lib/project.js +45 -6
- package/package.json +4 -1
- package/profile/PIPELINE.template.md +1 -1
- package/profile/schema/output-discipline.md +6 -2
- package/profile/schema/profile-block.md +1 -0
- package/profile/schema/reconcile.md +3 -1
- package/scripts/kanban-move.sh +51 -11
- package/scripts/preflight.sh +12 -2
- package/scripts/verify-run.sh +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,54 @@ short, user-facing, most recent first. One `## <version> — <YYYY-MM-DD>` secti
|
|
|
7
7
|
> They are history and are deliberately not rewritten — every command gained a `cohorte-` prefix
|
|
8
8
|
> in 2.0.0.
|
|
9
9
|
|
|
10
|
+
## 3.1.3 — 2026-11-16
|
|
11
|
+
|
|
12
|
+
- **Kanban moves on macOS use a kernel lock.** macOS has no `flock(1)`, so parallel moves on one
|
|
13
|
+
board fell back to a hand-made `mkdir` lock — and a move killed while holding it left a stale
|
|
14
|
+
lock that the waiters broke all at once, letting two writers in: about half the runs with a
|
|
15
|
+
dozen parallel moves lost one. The lock is now a real `flock` taken by `python3` (which the gate
|
|
16
|
+
already requires) on the shell's own file descriptor: the kernel releases it if the move dies, so
|
|
17
|
+
there is nothing stale to break. The `mkdir` lock stays as a last resort (no flock, no python3),
|
|
18
|
+
with stale-lock breaking serialized; all locks are keyed by the board's physical path.
|
|
19
|
+
- **`cohorte doctor` reports folder trust.** Claude Code ignores a project's `permissions.allow`
|
|
20
|
+
until its folder has been trusted (the dialog an interactive `claude` shows once); under
|
|
21
|
+
`claude -p` — CI, francois — every pipeline script then asks or is refused. Doctor now warns and
|
|
22
|
+
says how to fix it. The gate itself runs either way.
|
|
23
|
+
- **The nightly real-model run is gone.** `scripts/ci/llm-e2e.sh` stays, to run by hand.
|
|
24
|
+
- **Internal:** the gate's analyzer is split into modules; no behaviour change.
|
|
25
|
+
|
|
26
|
+
## 3.1.2 — 2026-11-16
|
|
27
|
+
|
|
28
|
+
- **A red test piped into `| tail` no longer passes the preflight.** A quiet variant such as
|
|
29
|
+
`npm test 2>&1 | tail -20` exits with `tail`'s status, so a failing suite stamped the preflight
|
|
30
|
+
GREEN and the review could reach SHIP on red code. `preflight.sh` and `verify-run.sh` now run every
|
|
31
|
+
check with `pipefail`; the doctrine's `| tail -40` fallback is written `set -o pipefail; …`; and
|
|
32
|
+
`cohorte doctor` warns about a stored command that pipes into `tail`/`head` without it. Found by
|
|
33
|
+
the new real-model end-to-end run.
|
|
34
|
+
- **A nightly real-model end-to-end run** (`/cohorte-build` then `/cohorte-review` on a toy repo,
|
|
35
|
+
asserting on the files they write) runs when the `ANTHROPIC_API_KEY` repository secret is set.
|
|
36
|
+
- **`cohorte sync` writes the pipeline's own permissions** (its scripts, read-only git, `git switch`,
|
|
37
|
+
`date`) into `.claude/settings.json`. `/cohorte-update-pipeline` used to Edit that file for them,
|
|
38
|
+
which the gate (rightly) asks about — a hard stop in a headless run. Found by running the update
|
|
39
|
+
on a real 2.x project.
|
|
40
|
+
- **`gate.hook_form: exec`** registers the gate without a shell (`python3` + an argument list), for
|
|
41
|
+
Windows teams without Git Bash. Opt-in: every teammate needs a recent Claude Code.
|
|
42
|
+
- **Ownership covers the workflows too — verified.** A subagent dispatched by a workflow
|
|
43
|
+
(`agent({ agentType })`, as the build, loop and refactor workflows do) reaches the gate with its
|
|
44
|
+
`agent_id` and `agent_type`, exactly like one dispatched by the lead (Claude Code 2.1.325).
|
|
45
|
+
- **The security-scan recipes are checked against the real tools** every week (gitleaks,
|
|
46
|
+
trufflehog, npm/pnpm audit, pip-audit, govulncheck, cargo audit).
|
|
47
|
+
- **Generated project CI runs `cohorte doctor`**, pinned to the project's core version, so a PR that
|
|
48
|
+
breaks the pipeline's wiring fails in CI.
|
|
49
|
+
- **The installed changelog is slimmer** (the current major's sections plus a link: 16 KB instead
|
|
50
|
+
of 127 KB).
|
|
51
|
+
- **Releases:** every publish is followed by an `npx cohorte@<version> install` from the registry;
|
|
52
|
+
Dependabot keeps the pinned actions current.
|
|
53
|
+
- **Internal:** `gate.py` is built from modules; no behaviour change. The source lives in
|
|
54
|
+
`core/hooks/gate/*.py`; `scripts/build-gate.mjs` concatenates it into the single committed
|
|
55
|
+
`core/hooks/gate.py` that installs and `cohorte sync` copy, and validate-core fails if the
|
|
56
|
+
two drift.
|
|
57
|
+
|
|
10
58
|
## 3.1.1 — 2026-11-16
|
|
11
59
|
|
|
12
60
|
- **An install that fails half-way is rolled back.** `cohorte install` / `update` journal every file
|
|
@@ -74,8 +122,8 @@ short, user-facing, most recent first. One `## <version> — <YYYY-MM-DD>` secti
|
|
|
74
122
|
worktree resolve against that worktree, and paths outside the project (`/dev/null`, `$TMPDIR`)
|
|
75
123
|
are not judged. It is **on by default** from the first `cohorte sync` after upgrading (that sync
|
|
76
124
|
also registers the hook for `NotebookEdit`). Verified on Claude Code 2.1.325: a subagent's
|
|
77
|
-
`Write` reaches the hook with its `agent_id` and `agent_type
|
|
78
|
-
dispatched by
|
|
125
|
+
`Write` reaches the hook with its `agent_id` and `agent_type` — and, verified since (3.1.2), so
|
|
126
|
+
does one dispatched by a workflow.
|
|
79
127
|
Before upgrading, check what each surface writes outside its tree (root `tests/`, a generated
|
|
80
128
|
client, the root lockfile): `/cohorte-update-pipeline` proposes them as `owns_also` /
|
|
81
129
|
`ownership.shared_writable`, and `ownership.enforce: false` turns the check off.
|
package/README.md
CHANGED
|
@@ -85,9 +85,10 @@ The core never hardcodes stack facts. Two mechanisms keep it generic:
|
|
|
85
85
|
- **Node ≥ 20 + npm** — for the `cohorte` CLI.
|
|
86
86
|
- **Python ≥ 3.9** as `python3` — the gate hook every project commits runs on it. The hook is
|
|
87
87
|
fail-closed: without Python, Claude Code refuses every Bash call in a Cohorte project.
|
|
88
|
-
**Windows:** the committed hook is `python3 "$CLAUDE_PROJECT_DIR/.claude/hooks/cohorte-gate.py"`,
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
**Windows:** the committed hook is `python3 "$CLAUDE_PROJECT_DIR/.claude/hooks/cohorte-gate.py"`, run
|
|
89
|
+
through a POSIX shell (Git Bash). Without one, set `gate.hook_form: exec` in `PIPELINE.md` and run
|
|
90
|
+
`cohorte sync`: the hook becomes `python3` + an argument list that Claude Code launches directly
|
|
91
|
+
(every teammate then needs a recent Claude Code). `python3` must be on `PATH` either way.
|
|
91
92
|
- **Claude Code** — workflows (the opt-in deterministic runs) need ≥ 2.1.154; the hook's
|
|
92
93
|
fail-closed `onFailure` setting is honoured from 2.1.295 (older clients ignore it and fail open).
|
|
93
94
|
- **[`uv`](https://docs.astral.sh/uv/) + the Serena CLI** — _optional_, the default code-retrieval
|
|
@@ -353,6 +354,7 @@ core/
|
|
|
353
354
|
agents/ # implementer.template.md (rendered per surface) + cohorte-review / -release / -profile-reader
|
|
354
355
|
commands/ # the 16 /cohorte-* commands
|
|
355
356
|
hooks/gate.py # the gate (copied into each project as .claude/hooks/cohorte-gate.py)
|
|
357
|
+
hooks/gate/ # its source modules — gate.py is built from them (scripts/build-gate.mjs)
|
|
356
358
|
templates/ # handoff / brainstorm-return / design-brief / review-feedback / pr-body / spec + step files
|
|
357
359
|
workflows/ # Workflow-runtime scripts: review / audit / refactor (opt-in variants) + loop (workflow-only)
|
|
358
360
|
profile/
|
|
@@ -117,7 +117,7 @@ with its limit and what would trigger the upgrade — not in a comment, and not
|
|
|
117
117
|
|
|
118
118
|
**Run commands bridled — always.** Your surface's `test_quiet_cmd`/`lint_quiet_cmd` in `PIPELINE.md`
|
|
119
119
|
are the forms you execute (dot reporter / failures-only); when a quiet variant is empty or absent,
|
|
120
|
-
run
|
|
120
|
+
run `set -o pipefail; <full cmd> 2>&1 | tail -40` (without `pipefail` a red run through `| tail` exits 0). Never print a full runner log into your context — redirect to a
|
|
121
121
|
file and grep it if you need more than the tail.
|
|
122
122
|
|
|
123
123
|
## Definition of done
|