feat(voyage): define high-effort behavior + amend brief Non-Goal/SC1 + coordinator normalization (Decision B)
Wave 6 / Step 10 — autonomy-gated. Operator confirmed: gemini-bridge substitution for plan-critic doubling AND SC1 amendment to resolver-invariant encoding (decisions.local.json recorded). - commands/trekplan.md: gemini-bridge plan-review Pass 2 on post-revision plan in high-effort mode (replaces fragile plan-critic doubling per risk-assessor). - commands/trekresearch.md: full swarm + contrarian-researcher + gemini-bridge always-on. - commands/trekreview.md: skip Pass 3 reasonableness + invoke coordinator normalization rule. - commands/trekexecute.md: gates_mode = closed (strict manifest-audit, main-merge pauses); flag override still wins. - agents/review-coordinator.md: Pass 3 high-effort normalization — substitute unknown rule_key with PLAN_EXECUTE_DRIFT, preserve original in original_rule_key. - .claude/projects/2026-05-13-trekflow-solo-lane/brief.md (gitignored, not committed): Non-Goal amendment locks low/high tiers; SC1 amendment authorizes resolver-invariant interpretation. - tests/lib/doc-consistency.test.mjs: +4 pins for the "### High-effort behavior (v5.1.1)" heading per command. Tests: 578 pass, 0 fail, 2 skipped (+4 from 574). Closes #7 (operator-gated decisions captured + coordinator normalization landed). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
07ae1e30e9
commit
c1b7bad389
6 changed files with 114 additions and 0 deletions
|
|
@ -112,6 +112,18 @@ Drop findings that fail ANY of these tests:
|
|||
In `quick` mode, skip this pass entirely. Note the skip in the
|
||||
Executive Summary so the reader knows reasonableness was not applied.
|
||||
|
||||
**High-effort normalization (v5.1.1):** When the review is invoked
|
||||
under high-effort mode (`phase_signals[review].effort: high`), Pass 3
|
||||
reasonableness filtering is bypassed. To prevent unknown rule_keys
|
||||
from polluting downstream plans, the coordinator MUST substitute any
|
||||
rule_key not exported from `lib/review/rule-catalogue.mjs:RULE_KEYS`
|
||||
with the literal string `PLAN_EXECUTE_DRIFT` (the most general drift
|
||||
category from the 12-entry catalogue). The original rule_key is
|
||||
preserved in the finding's `original_rule_key` field for diagnostic
|
||||
purposes. This normalization happens BEFORE writing review.md,
|
||||
ensuring all `rule_key` values in the final review match the
|
||||
catalogue.
|
||||
|
||||
### Pass 4 — Compute verdict
|
||||
|
||||
Count findings by severity AFTER dedup and filtering. Verdict thresholds:
|
||||
|
|
|
|||
|
|
@ -1555,6 +1555,26 @@ without `phase_signals` or `phase_signals_partial: true`), halt with:
|
|||
/trekbrief to commit them (Phase 3.5).` Enforcement is validator-only;
|
||||
commands surface, don't re-enforce.
|
||||
|
||||
### High-effort behavior (v5.1.1)
|
||||
|
||||
When `phase_signal_result.effort == 'high'` for the `execute` phase,
|
||||
set `gates_mode = 'closed'` automatically (equivalent to passing
|
||||
`--gates closed` on the command line). All autonomy boundaries become
|
||||
operator-stopping points: manifest-audit FAIL halts immediately, the
|
||||
main-merge gate pauses for operator confirm, and Phase 7.5
|
||||
manifest-audit runs in its strictest form (fails on ANY mismatch, not
|
||||
just deltas above threshold). Operator explicit `--gates` flag still
|
||||
wins over the brief signal — if the operator passes `--gates open` on
|
||||
the command line while `phase_signal_result.effort == 'high'`, the
|
||||
flag takes precedence and the override is logged to
|
||||
`${CLAUDE_PLUGIN_DATA}/trekexecute-stats.jsonl` as
|
||||
`{event: 'gates_mode_flag_override', flag: 'open', signal_effort: 'high'}`.
|
||||
|
||||
Standard effort (or absent): use `gates_mode = 'adaptive'` (the
|
||||
default). Low effort: `gates_mode = 'open'` plus sequential-only
|
||||
execution (no parallel waves) — existing `--quick`-equivalent
|
||||
code-path.
|
||||
|
||||
## Hard rules
|
||||
|
||||
1. **No AskUserQuestion for execution decisions.** All execution decisions come
|
||||
|
|
|
|||
|
|
@ -934,6 +934,25 @@ one-line message: `Brief is brief_version 2.1 but does not carry phase_signals
|
|||
— re-run /trekbrief to commit them (Phase 3.5).` Enforcement is
|
||||
validator-only; this surface just makes the friendly hint readable.
|
||||
|
||||
### High-effort behavior (v5.1.1)
|
||||
|
||||
When `phase_signal_result.effort == 'high'` for the `plan` phase, after
|
||||
Phase 9 (plan-critic + scope-guardian dedup pass) runs to completion on
|
||||
the post-revision plan, run an ADDITIONAL `gemini-bridge` plan-review
|
||||
pass on the post-revision plan. Surface its findings as a separate
|
||||
`## Adversarial Pass 2 (gemini-bridge, v5.1.1 high-effort)` section
|
||||
appended to plan.md before the trailing JSON block.
|
||||
|
||||
Rationale (per risk-assessor finding + Decision B substitution
|
||||
2026-05-14): the originally-considered "extra plan-critic-iterasjon"
|
||||
risked a revision-loop because plan-critic dedup keys on
|
||||
`(file, line, rule_key)` triplets and post-revision line numbers shift.
|
||||
The gemini-bridge pass is independent (different agent, different
|
||||
perspective) and does not re-tread the same dedup space — it surfaces
|
||||
genuinely new findings rather than re-emitting closed ones.
|
||||
|
||||
Standard and low effort: do NOT run the additional pass.
|
||||
|
||||
## Hard rules
|
||||
|
||||
- **Brief-driven**: Every plan decision must trace back to a section of the
|
||||
|
|
|
|||
|
|
@ -481,6 +481,24 @@ without `phase_signals` or `phase_signals_partial: true`), halt with:
|
|||
/trekbrief to commit them (Phase 3.5).` Enforcement is validator-only;
|
||||
commands surface, don't re-enforce.
|
||||
|
||||
### High-effort behavior (v5.1.1)
|
||||
|
||||
When `phase_signal_result.effort == 'high'` for the `research` phase,
|
||||
run the FULL swarm regardless of normal triggering rules: 5 local
|
||||
agents + 4 external agents + 1 bridge agent, AND force
|
||||
`contrarian-researcher` AND `gemini-bridge` to always-on. Normally
|
||||
`contrarian-researcher` triggers conditionally when a leading
|
||||
recommendation is emerging from initial agents; in high-effort mode it
|
||||
runs unconditionally so the final brief always carries an adversarial
|
||||
counter-evidence pass. Similarly, `gemini-bridge` normally activates on
|
||||
significant architectural questions or when triangulation value is
|
||||
high; in high-effort mode it runs unconditionally to provide an
|
||||
independent second opinion.
|
||||
|
||||
Standard effort (or absent): use the existing conditional triggers.
|
||||
Low effort: inline research only, no agent swarm (existing
|
||||
`--quick`-equivalent code-path).
|
||||
|
||||
## Hard rules
|
||||
|
||||
- **No planning:** This command produces research briefs, not implementation plans.
|
||||
|
|
|
|||
|
|
@ -398,6 +398,25 @@ phase_signals — re-run /trekbrief to commit them (Phase 3.5).`
|
|||
Enforcement is validator-only; this surface just makes the friendly hint
|
||||
readable.
|
||||
|
||||
### High-effort behavior (v5.1.1)
|
||||
|
||||
When `phase_signal_result.effort == 'high'` for the `review` phase,
|
||||
skip Pass 3 (Cloudflare reasonableness filter) in
|
||||
`agents/review-coordinator.md`. Passes 1, 2, and 4 still run.
|
||||
Rationale: high-effort review trusts the operator to weigh borderline
|
||||
findings rather than have the coordinator drop them. To prevent
|
||||
unknown `rule_key` values from polluting downstream remediation plans
|
||||
(Handover 6), the coordinator applies its v5.1.1 high-effort
|
||||
normalization rule — substituting unknown `rule_key` values with the
|
||||
literal string `PLAN_EXECUTE_DRIFT` (the most general drift category
|
||||
in the 12-entry catalogue) and preserving the original in
|
||||
`original_rule_key`. See `agents/review-coordinator.md` § Pass 3
|
||||
"High-effort normalization (v5.1.1)" for the full normalization spec.
|
||||
|
||||
Standard effort (or absent): run all 4 passes as usual.
|
||||
Low effort: skip the brief-conformance reviewer entirely (existing
|
||||
`--quick`-equivalent code-path).
|
||||
|
||||
## Hard rules
|
||||
|
||||
- **Brief is the contract.** Every finding in the review traces to a
|
||||
|
|
|
|||
|
|
@ -585,3 +585,29 @@ test('v5.1 — voyage README.md mentions phase_signals', () => {
|
|||
assert.ok(t.includes('phase_signals'),
|
||||
'voyage README.md must mention phase_signals (v5.1 "What\'s new" bullet)');
|
||||
});
|
||||
|
||||
// --- v5.1.1 — High-effort behavior sub-section per command (Step 10) ---
|
||||
|
||||
test('v5.1.1 — commands/trekplan.md contains ### High-effort behavior (v5.1.1) sub-section', () => {
|
||||
const t = read('commands/trekplan.md');
|
||||
assert.match(t, /^### High-effort behavior \(v5\.1\.1\)$/m,
|
||||
'trekplan.md must contain ### High-effort behavior (v5.1.1) sub-section under Composition rule (Decision B + gemini-bridge)');
|
||||
});
|
||||
|
||||
test('v5.1.1 — commands/trekresearch.md contains ### High-effort behavior (v5.1.1) sub-section', () => {
|
||||
const t = read('commands/trekresearch.md');
|
||||
assert.match(t, /^### High-effort behavior \(v5\.1\.1\)$/m,
|
||||
'trekresearch.md must contain ### High-effort behavior (v5.1.1) sub-section under Composition rule (contrarian-researcher + gemini-bridge always-on)');
|
||||
});
|
||||
|
||||
test('v5.1.1 — commands/trekreview.md contains ### High-effort behavior (v5.1.1) sub-section', () => {
|
||||
const t = read('commands/trekreview.md');
|
||||
assert.match(t, /^### High-effort behavior \(v5\.1\.1\)$/m,
|
||||
'trekreview.md must contain ### High-effort behavior (v5.1.1) sub-section under Composition rule (skip Pass 3 + coordinator normalization)');
|
||||
});
|
||||
|
||||
test('v5.1.1 — commands/trekexecute.md contains ### High-effort behavior (v5.1.1) sub-section', () => {
|
||||
const t = read('commands/trekexecute.md');
|
||||
assert.match(t, /^### High-effort behavior \(v5\.1\.1\)$/m,
|
||||
'trekexecute.md must contain ### High-effort behavior (v5.1.1) sub-section under Composition rule (gates_mode = closed)');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue