Commit graph

786 commits

Author SHA1 Message Date
08e8aa1c66
docs(review): stop rule in the plan loop, review loop and critic prompts (decision 217, 220)
/trekplan Phase 9: when --record or the gate reports the stop rule there
is no new round; AskUserQuestion with the class and counts, "Known issue"
(--accept-open, a security finding refused) or "New mechanism" (stop, the
plan stays unapproved); the round-3 blocker path never offers
--extra-round after the stop rule. Phase 10 prints round of
max_rounds + extra_rounds.

/trekexecute Phase 7.2 step 4: after a round-2 BLOCK or fixed-pending,
before any R-step, review-rounds.mjs prepare --dry-run; review-stop-rule:
gives the same question ("Known issue" = /trekreview --answers, a BLOCKER
keeps the merge locked; "New mechanism" = stop). /trekreview Phase 3 tells
the stop rule's exit 1 from the cap's. plan-critic and scope-guardian:
rule_key names the class, never the instance.

New pins in review-loop-docs, critic-severity-rules and review-prose-pins.

Part 1, step 1.4 of the E plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 07:16:05 +01:00
6b44be4c43
feat(review): stop rule in the review rounds (decision 217, 220)
prepare (also --dry-run) judges the previous round's archive and
review.md when it would open round 3: blocking = BLOCKER + counting MAJOR
with the verdict gate's pre-existing reading, new = no carried_from, class
= classOf. Fired -> exit 1, `review-stop-rule: <describeStop line>` and
`stop_rule`, nothing archived. The cap stays. A round with no readable
JSON block gives no summary and the rule is not judged.

countingMajors moves from review-answers.mjs into review-rounds.mjs and is
re-exported by review-answers (as isSecurityFinding is); review-rounds
still imports nothing from review-answers.

Existing test updated for the planned rule: the [CRY] occurrence case adds
a third round-1 MAJOR resolved in round 2, so its round-3 control is not
stopped by "not fewer".

Part 1, step 1.3 of the E plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 07:13:07 +01:00
a576391e28
feat(gate): stop rule in the plan gate (decision 217, 220)
recordVerdict appends each round's summary to a new optional verdict
field `rounds` (carried from the previous verdict; newByClass null for a
round counted in full) and stores `stop_rule`; extractVerdict shape-checks
both. After a fired stop rule --record exits 1 with PLAN_GATE_STOP_RULE
and writes nothing (--extra-round included). The bare gate stops with
PLAN_GATE_STOP_RULE and the operator line in place of the open-blocker and
open-major reasons; --json and --record output carry the decision.
--accept-open after a fired stop rule is allowed with rounds left, covers
open blockers and majors (`under: "stop-rule"`), refuses a counting
security finding (PLAN_GATE_SECURITY_OPEN); the gate then warns.

Known issue fixed: REVIEW_LOG_SECTIONS drops "Adversarial Pass 2 (v5.1.1
high-effort)"; the CHANGELOG known-issue line closes and Handover 4 names
the heading list, the new fields and codes.

Existing tests updated for the planned rule: fixtures that ran a later
round after one with no fewer blocking findings now use a falling count
(plan-gate.test round cap, plan-gate-open-major lastRound, diff-mode
5/18/27 resolve two earlier majors in round 2); the diff-mode CLI pipe
case now expects PLAN_GATE_STOP_RULE (round 3: 2 blocking) after its
clean round 2.

Part 1, step 1.2 of the E plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 07:04:48 +01:00
7e09edb24f
feat(review): one shared stop rule for the plan loop and review rounds (decision 217)
New lib/review/stop-rule.mjs: classOf (catalogue key, else the lower-cased
dimension before the first slash, else unclassified), roundSummary
(blocking = blockers + counting majors; new = no carried_from; null map
for a round counted in full), decideStop (same-class / not-fewer on the
last pair, round 1 alone never fires) and describeStop (one operator line
with the class, the counts per round and the two recommendations).

Part 1, step 1.1 of the E plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 06:58:45 +01:00
e6fb8bc12d
Merge branch 'chore/cleanup-r-b' — cleanup R-b (decisions 175, 189-191, 209)
Removes Voyage's own stats/OTel export (R1), STORM and the --engine
research choice (R2), and profiles, phase signals and the effort dialog
(R3), plus the R-a leftovers. One fixed path per command (209).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 23:58:48 +01:00
b70c37f0e7
fix(cleanup): R-b review round — retired flags in the prose parsers
/code-review high on main..HEAD: the four commands that parse their own
arguments in prose (/trekbrief, /trekplan, /trekresearch, /trekexecute) lost
their --profile handling, and /trekresearch its --engine, so a typed value
became the path or the question. Each now strips a retired flag with its
value; the arg parser retires --profile only for the commands that had it
(not /trekendsession) and --engine for /trekresearch, seen red first.
Stale lines R-b left: architecture's hook row (9 scripts) and bridge agent,
the gap row's removed event ledger, README's contrarian marker, and a
dangling "also" in /trekexecute Phase 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:36:13 +01:00
fdb401d0ab
refactor(cleanup): simplify pass on R-b
The retired --profile is one list the parser drops (with its value, never
an error) instead of a valued flag in six schemas, so the removed-surfaces
check exempts one parser line, not seven; seen red on the old parser.
The empty OPTIONAL_STRING_KEYS machinery, a one-item loop and an unused
plugin-data dir go; the removed-surfaces check reads each file once; the
Phase 8 slice in executor-prose-pins asserts both anchors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:26:25 +01:00
94400c6c3b
docs(cleanup): R-b CHANGELOG, scope-aware full swarm, stale wording
The /trekresearch Phase 4 sentence said contrarian-researcher runs every
time, also under --local; it now runs whenever the scope includes external.
Three stale "sequencing gate" and stats mentions in touched files follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:16:47 +01:00
2a35d067d9
chore(cleanup): R-b R3 — profiles, phase signals and the effort dialog removed, one fixed path per command
The four profiles, the resolver, the profile validator and docs/profiles.md go;
/trekbrief Phase 3.5 and the brief's phase_signals checks go (an older brief's
key is ignored); MANIFEST_PROFILE_DRIFT and profile_used go. Every Profile,
Composition rule, Sequencing gate and High-effort section leaves the commands.
Decision 209: /trekresearch runs the full swarm with contrarian-researcher as
wave 2 every run; /trekreview and the coordinator run all four passes with no
high-effort normalization. Voyage agents are spawned with no model (their own
model: opus applies); the two built-in spawns pass model "opus". --profile
stays in the parser as a retired flag that swallows its value. §Model & effort
moves to docs/architecture.md; the sequencing-gate eval case goes.

Files removed: 44 (43 from the R3 list + tests/commands/trekreview.test.mjs,
whose every test pinned removed text). Files edited: 43.
Tests: 2467 (2466 pass / 0 fail / 1 skipped) before, 2309 (2309 pass / 0 fail /
0 skipped) after. Durable check: all three groups green, none pending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:12:57 +01:00
32621dcb63
chore(cleanup): R-b R2 — STORM loop, cap hook and the --engine research choice removed
/trekresearch loses Phase 4.5, the bounded Phase 5 loop (Phase 5 keeps its
single pass of at most 2 follow-ups), the --engine flag, the deep-research
adapter and its output self-check. hooks.json loses the pre-agent-cap
PreToolUse entry (README: 9 hooks = 9 scripts). The STORM env vars leave the
docs; query-privacy-gate.mjs stays, called by no command, and says so.

Files removed: 13 (4 docs, 1 hook, 1 lib module, 1 script, 5 tests, 1 fixture).
Files edited: 17. Tests: 2600 (2598 pass / 0 fail / 2 skipped) before,
2467 (2466 pass / 0 fail / 1 skipped, R3 pending) after.
Durable check: group R2 green and no longer pending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 20:32:38 +01:00
21480e8627
chore(cleanup): R-b R1 — Voyage's own stats, events and OTel export removed
Removes Voyage's measurement, statistics and export apparatus (decision 189;
condition 175 met in step 1) and the R-a leftovers: lib/stats/, lib/exporters/,
the otel-export and post-bash-stats hooks, yardstick, end-state and comparison
gates, synthesis-measure, gold-scorer, docs/observability.md,
examples/observability/, docs/T1-cc26-delegated-orchestration.md and their
tests and fixtures. The six command stats phases and the /trekexecute
main-merge event blocks go; intent-approval --stamp no longer emits
brief-approved. README and docs point to Claude Code's own OpenTelemetry.

Files removed: 52. Files edited: 37.
npm test: 2930 tests (2928 pass / 0 fail / 2 skipped) before, 2600 tests
(2598 pass / 0 fail / 2 skipped) after. removed-surfaces group R1 green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 20:11:00 +01:00
92010d20de
test(cleanup): removed-surfaces check for R-b, groups pending
Seen red with REMOVED_SURFACES_ALL=1 before any removal: R1 546, R2 251,
R3 606 lines. Each stage of R-b empties its own pending group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 19:37:28 +01:00
f9765049f3
merge: cleanup R-a (R4-R9), with Claude Code's own tools
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 15:11:34 +01:00
5f42bbdb9e
fix(cleanup): the review's defects on the R-a diff
The trekcontinue-stats line_ref follows Phase 5 to 271-275 (the Phase 1.5
cut moved it). gold-eval.test.mjs and its run fixture come back: they
are the one end-to-end check that the review contract keeps every
seeded finding, and they stay with the scorer until R-b. CHANGELOG:
the removed validator leaves the known-issues text; the review's other
findings outside R-a's files are listed as known issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 15:04:19 +01:00
fb937ee306
docs(changelog): cleanup R-a, unreleased, with its doors line
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:35:55 +01:00
efe981f7bc
refactor(cleanup): simplify pass on the R-a diff
engine-compare imports the coordinator's title limit and trim instead
of a copy whose reason went with Arm B; the autonomy gate exports one
parser and its test runs in-process with two CLI runs; one import
scanner in lib-imports; the fenced-section walker shared from
tests/helpers/md-section.mjs instead of six copies; plan-gate hash
in-process; living-paths scans once; routing drops the orchestrator
filter whose files are gone; small leftovers removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:31:30 +01:00
029e83117c
test(r8): move the live tests the move map missed
33 more tests of live behaviour from the deleted round files, each in
the test file named after its source and seen failing under a mutation
of that source (log in the project folder). Two stay dropped: one pinned
the removed gate states, one the old Phase 1.5 file comparison. The two
trekexecute.md sentences that still said /trekcontinue compares the two
prompt files now say it uses the project-folder file (line count kept).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:11:25 +01:00
8295601965
chore(cleanup): remove the June trials, orchestrator docs, dormant agent, caller-less code and the fix-round chain
R4-R7 of the cleanup list (decision 188): the June trial docs and
fixtures, the three orchestrator reference docs, the dormant
synthesis-agent, code with no caller (project-discovery, bash-normalize,
fidelity-diff, test-census, the next-session prompt validator, arm B and
the --workflow flag) and the fix-round chain. Living docs repointed; the
reasons for in-session orchestration and the all-opus pin are now written
in docs/architecture.md and docs/profiles.md.

New tests/lib/living-paths.test.mjs: living tracked text names only
plugin paths that exist (seen red with 22 dead pointers before this
commit). docs/T1-cc26-delegated-orchestration.md and
lib/review/gold-scorer.mjs stay until R-b: the frozen end-state registry
names them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 12:51:54 +01:00
308b149e70
refactor(gates): the autonomy gate is the --gates flag parser
lib/util/autonomy-gate.mjs keeps only gatesValue + parseGatesArgs and the
CLI ({"ok":true,"gates":true|false}; exact usage error on a bad value;
the old --state/--event arguments are a usage error). The four commands
run 'autonomy-gate.mjs --gates [value]' and read gates. Prose (README,
operations, architecture, sdlc-playbook-gap) and the S24, gates-flag
and [#1] tests follow (R9).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:37:03 +01:00
651be3468b
test(r8): move the live tests out of the round files
R8 of cleanup R-a (plan .claude/projects/2026-11-07-cleanup-r-a, appendix A).
The live tests of the round files move into the test named after their
source; each moved test was seen red under a mutation of its source.
New: tests/lib/lib-imports.test.mjs, tests/lib/timing.test.mjs (from
timing-under-load). The [#1] --gates rule and shim-line pins move into
tests/lib/autonomy-gate.test.mjs.

Removed: the round test files (retterunde, retterunde-prose-pins,
trial-mechanical-fixes, trial2-fixes, trial2-minor, trial2-minor-prose-pins,
fix-round-4-5a-prose, fix-round-4-5b2-b-prose, timing-under-load), the 8 R8
e2e scripts, and seven round test files on the R-a removal list that pinned
them (fix-round-4-5b-prose, fix-round-4-5b-part-2/3/4-scripts,
fix-round-4-5b-part-4-prose, fix-round-4-5b2-b/c-scripts). The diff-mode e2e
pin (test 24) and the red-script round-wrapper cases go too.

tests/synthetic/plan-run-C.md becomes tests/fixtures/plan-run-c.md,
regenerated from buildPlan({ version: '1.9' }). The red judge, reporter and
judge test headers now name the shared red script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:19:49 +01:00
fa0d4f036c
docs(changelog): known issues from part B's review, rounds 1 and 2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 12:08:40 +01:00
80bb3a33d8
merge: trekexecute review-gate-4-5b2 part B and part C 2026-11-04 12:03:15 +01:00
9edc998fac
refactor: simplify pass (trekexecute)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:29:46 +01:00
6c8f7377bb
test(red-proof): fix round 4.5b2 part C red proof and changelog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:17:19 +01:00
ff3e20919e
fix(hooks): a command with several merges says its run evidence is not shown
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:54:56 +01:00
29b1fba9fb
fix(hooks): no run evidence for a merged name git reads as a tag or another ref
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:38:39 +01:00
5b9cbeba28
fix(review): the evidence writer takes a verdict only for the branch head
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:27:19 +01:00
d4daa9d787
fix(review): the instruction set holds nested rules files and a link's own name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:16:34 +01:00
d81bd39754
fix(review): an answer after a stopped prepare no longer locks the rounds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:05:04 +01:00
fc252f8d56
fix(review): the verdict gate refuses duplicate finding ids
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 09:40:25 +01:00
f1f5ab5528
refactor: simplify pass (trekexecute)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 12:48:04 +01:00
d38846f61d
test(red-proof): fix round 4.5b2 part B red proof and regression run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 12:27:24 +01:00
3cb3958238
fix(review): a dropped engine finding keeps the gate not measured, round 1 included
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 11:57:30 +01:00
a09e6c96a1
fix(review): scope_sha_start is bound to the fork point from main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 11:23:21 +01:00
57e7eba0a0
fix(review): R6 checks every parent of a commit after the review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 11:07:08 +01:00
03c9f527a3
docs(changelog): review gate 4.5b2 part B, its door and known issues 2026-11-02 21:42:38 +01:00
ec5b6483ec
feat(hooks): the merge question says how the run was tested and how it is undone 2026-11-02 21:23:24 +01:00
fcba232ccd
feat(review): the code-correctness reviewer checks the repo's tracked instruction files 2026-11-02 20:47:15 +01:00
349a4fc789
feat(review): the standard path puts back engine findings the coordinator dropped 2026-11-02 20:12:46 +01:00
8d399fddfb
feat(review): a REVIEW.md policy caps and skips MINOR findings only 2026-11-02 19:43:54 +01:00
9e7e8d1516
feat(trekexecute): every MAJOR answered before merge, fixed runs the fix loop 2026-11-02 18:44:42 +01:00
635003e8aa
feat(review): review rounds carry findings until resolved, one cap of three 2026-11-02 17:44:23 +01:00
1464605e35
feat(review): pre-existing findings marked from git and re-derived by the gate 2026-11-02 16:37:24 +01:00
ce7dbc27a9
feat(review): a WARN opens the lock only when every counting MAJOR is answered 2026-11-02 15:45:37 +01:00
ce64851a0d
fix(review): an append of review answers to the approval log keeps the review current 2026-11-02 15:01:58 +01:00
5709957e10
feat(review): review_version 1.2 with answers, pre-existing, rounds and policy fields 2026-11-02 14:22:35 +01:00
ed67526987
feat(review): two CLAUDE.md rule keys at MINOR, the catalogue counts 17 2026-11-02 13:53:24 +01:00
96fba75996
merge: trekexecute guard-4-5b2-part-a 2026-11-02 11:32:04 +01:00
5c3f7ee296
docs(changelog): fix round 4.5b2 part A, the review's findings as known issues
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 11:24:56 +01:00
cc277c476c
refactor: simplify pass (trekexecute)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 10:58:35 +01:00