v1.38.0: mixed-mode tier (#233) + prompt-hook-fires-once instrumentation (#224) - #243
Merged
Conversation
Codex round 1 review of v1.39.0 surfaced that v1.38.0's new tests weren't wired into ci.yml/CONTRIBUTING.md, so test-workflow-triggers fails on this branch (164/1). - ci.yml: append test-repo-complexity.sh (#233) + test-prompt-hook- fires-once.sh (#224) after test-local-shepherd.sh - CONTRIBUTING.md: add same two entries to the local-test command list (must mirror ci.yml validate steps; test-workflow-triggers enforces this) Verified: bash tests/test-workflow-triggers.sh → 165/165 PASS.
Adds repo-complexity heuristic + 3-way setup prompt so simple repos can opt into Sonnet 4.6 in-session while keeping cross-model review at the flagship tier. - New cli/lib/repo-complexity.js + `npx agentic-sdlc-wizard complexity` subcommand. Classifies via filesystem signals (LOC, tests, hooks, workflows) plus stakes flag (.env / secrets/ / credentials/ at any depth forces complex regardless of size). - Setup Step 9.5 expanded from binary y/N to 3-way (no-pin / mixed / flagship), with the heuristic suggesting a default per repo. - Cross-model review section in skills/sdlc/SKILL.md explicitly notes reviewer always at flagship regardless of coder pin. - Update skill Step 7.5 recognizes sonnet[1m] as a valid mixed-mode pin (no migration prompt). - Reconciles with #198: opt-in per-project; no-pin remains default. Tests: 11/11 in tests/test-repo-complexity.sh including boundary (29 tests/4 hooks/4 workflows/~9K LOC → simple, 30 tests = high threshold → complex) and nested stakes (config/.env, app/secrets/). 128/128 hook regression, 22/22 doc consistency, 70/70 cli, 25/25 plugin, 10/10 compliance. Codex 2-round review: round 1 5/10 NOT CERTIFIED (4 findings — un- runnable doc command, root-only stakes, threshold mismatch with docs, stale 1.37.1 example), round 2 9/10 CERTIFIED.
…8.0) CC 2.1.118 shipped a fix for prompt hooks double-firing when an agent-hook verifier subagent itself made tool calls. We can't unit- test CC's behavior, but we can ship instrumentation so the maintainer can verify the fix holds in real sessions. - hooks/sdlc-prompt-check.sh: opt-in via SDLC_HOOK_FIRE_LOG env var. Each post-dedupe invocation appends one tab-separated record (<ts>\t<pid>\tsdlc-prompt-check). Unwritable paths fail silently. - tests/test-prompt-hook-fires-once.sh: 6 tests asserting counter increment, opt-in semantics, log shape, byte-identical output diff (instrumented vs uninstrumented), and unwritable-path tolerance. Test harness cd's into an isolated workspace so the result is independent of caller cwd. - CLAUDE_CODE_SDLC_WIZARD.md: new "Verifying Prompt-Hook-Fires-Once" subsection with maintainer procedure (set env, run session, count log lines, compare to prompt count). Codex 2-round (rounds 3+4 of the v1.38.0 review): round 3 8/10 (test harness false-green from caller cwd, weak output assertion), round 4 10/10 CERTIFIED.
3 tasks
Contributor
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
BaseInfinity
added a commit
that referenced
this pull request
Apr 27, 2026
All 5 entries had been implemented but their title cells still read OPEN. Adding DONE markers + commit/PR/version references for archaeology: - #218 MCP-tool hook audit → PR #250, v1.41.1 - #221 post-mortem wizard integration → PR #249, v1.41.0 - #224 prompt-hook-fires-once test → PR #243, v1.38.0 (tests/test-prompt-hook-fires-once.sh) - #225 cleanupPeriodDays guidance → PR #248, v1.40.1 - #226 P1 fake-CI honest labeling → commit 13dccc4 (Option B: judge-consistency caveat; Option A true N-trial deferred to ROADMAP #230 / #212 Option 1 follow-up) Same closure-gap pattern just hit on #209 (PR #255). Five stale markers is enough signal that a roadmap-hygiene check would be worth a small piece of automation — track separately.
2 tasks
BaseInfinity
added a commit
that referenced
this pull request
Apr 27, 2026
All 5 entries had been implemented but their title cells still read OPEN. Adding DONE markers + commit/PR/version references for archaeology: - #218 MCP-tool hook audit → PR #250, v1.41.1 - #221 post-mortem wizard integration → PR #249, v1.41.0 - #224 prompt-hook-fires-once test → PR #243, v1.38.0 (tests/test-prompt-hook-fires-once.sh) - #225 cleanupPeriodDays guidance → PR #248, v1.40.1 - #226 P1 fake-CI honest labeling → commit 13dccc4 (Option B: judge-consistency caveat; Option A true N-trial deferred to ROADMAP #230 / #212 Option 1 follow-up) Same closure-gap pattern just hit on #209 (PR #255). Five stale markers is enough signal that a roadmap-hygiene check would be worth a small piece of automation — track separately.
6 tasks
BaseInfinity
added a commit
that referenced
this pull request
May 4, 2026
…243 follow-up (#312) Closes ROADMAP #97 with NO-GO + one validating parallel: April 2026 "Automated Alignment Researchers" paper conceptually parallels our cross- model review pattern (LLM-as-reviewer-of-LLM via "scalable oversight"). Our implementation predates the paper and already mitigates its noted weaknesses (reward hacking, limited generalization) via vendor-diverse adversarial framing + verification checklist. RSP, Transparency, Constitution, Economic Futures audited or skipped as off-topic for third-party tooling. Also closes #243 follow-up: token-spike-check.sh has accumulated 8 rows in .metrics/token-history.jsonl on maintainer machine, well above the 5-record rolling-baseline threshold. SessionStart filter + transcript-dir resolution working as designed. 6/6 external audits NO-GO (continues #76, #77, #95, #99, #235). Trim: condensed 1.65.0 + 1.66.0 changelog entries in skills/update/SKILL.md to keep the file under the 5K-token session-load threshold. Zero code changes.
BaseInfinity
added a commit
that referenced
this pull request
May 5, 2026
* fix(ci): wire #233 + #224 tests into validate (orphan-test fix) Codex round 1 review of v1.39.0 surfaced that v1.38.0's new tests weren't wired into ci.yml/CONTRIBUTING.md, so test-workflow-triggers fails on this branch (164/1). - ci.yml: append test-repo-complexity.sh (#233) + test-prompt-hook- fires-once.sh (#224) after test-local-shepherd.sh - CONTRIBUTING.md: add same two entries to the local-test command list (must mirror ci.yml validate steps; test-workflow-triggers enforces this) Verified: bash tests/test-workflow-triggers.sh → 165/165 PASS. * feat(#233): mixed-mode tier (Sonnet coder + Opus reviewer) — v1.38.0 Adds repo-complexity heuristic + 3-way setup prompt so simple repos can opt into Sonnet 4.6 in-session while keeping cross-model review at the flagship tier. - New cli/lib/repo-complexity.js + `npx agentic-sdlc-wizard complexity` subcommand. Classifies via filesystem signals (LOC, tests, hooks, workflows) plus stakes flag (.env / secrets/ / credentials/ at any depth forces complex regardless of size). - Setup Step 9.5 expanded from binary y/N to 3-way (no-pin / mixed / flagship), with the heuristic suggesting a default per repo. - Cross-model review section in skills/sdlc/SKILL.md explicitly notes reviewer always at flagship regardless of coder pin. - Update skill Step 7.5 recognizes sonnet[1m] as a valid mixed-mode pin (no migration prompt). - Reconciles with #198: opt-in per-project; no-pin remains default. Tests: 11/11 in tests/test-repo-complexity.sh including boundary (29 tests/4 hooks/4 workflows/~9K LOC → simple, 30 tests = high threshold → complex) and nested stakes (config/.env, app/secrets/). 128/128 hook regression, 22/22 doc consistency, 70/70 cli, 25/25 plugin, 10/10 compliance. Codex 2-round review: round 1 5/10 NOT CERTIFIED (4 findings — un- runnable doc command, root-only stakes, threshold mismatch with docs, stale 1.37.1 example), round 2 9/10 CERTIFIED. * feat(#224): prompt-hook-fires-once instrumentation (bundled with v1.38.0) CC 2.1.118 shipped a fix for prompt hooks double-firing when an agent-hook verifier subagent itself made tool calls. We can't unit- test CC's behavior, but we can ship instrumentation so the maintainer can verify the fix holds in real sessions. - hooks/sdlc-prompt-check.sh: opt-in via SDLC_HOOK_FIRE_LOG env var. Each post-dedupe invocation appends one tab-separated record (<ts>\t<pid>\tsdlc-prompt-check). Unwritable paths fail silently. - tests/test-prompt-hook-fires-once.sh: 6 tests asserting counter increment, opt-in semantics, log shape, byte-identical output diff (instrumented vs uninstrumented), and unwritable-path tolerance. Test harness cd's into an isolated workspace so the result is independent of caller cwd. - CLAUDE_CODE_SDLC_WIZARD.md: new "Verifying Prompt-Hook-Fires-Once" subsection with maintainer procedure (set env, run session, count log lines, compare to prompt count). Codex 2-round (rounds 3+4 of the v1.38.0 review): round 3 8/10 (test harness false-green from caller cwd, weak output assertion), round 4 10/10 CERTIFIED.
BaseInfinity
added a commit
that referenced
this pull request
May 5, 2026
All 5 entries had been implemented but their title cells still read OPEN. Adding DONE markers + commit/PR/version references for archaeology: - #218 MCP-tool hook audit → PR #250, v1.41.1 - #221 post-mortem wizard integration → PR #249, v1.41.0 - #224 prompt-hook-fires-once test → PR #243, v1.38.0 (tests/test-prompt-hook-fires-once.sh) - #225 cleanupPeriodDays guidance → PR #248, v1.40.1 - #226 P1 fake-CI honest labeling → commit 13dccc4 (Option B: judge-consistency caveat; Option A true N-trial deferred to ROADMAP #230 / #212 Option 1 follow-up) Same closure-gap pattern just hit on #209 (PR #255). Five stale markers is enough signal that a roadmap-hygiene check would be worth a small piece of automation — track separately.
BaseInfinity
added a commit
that referenced
this pull request
May 5, 2026
…243 follow-up (#312) Closes ROADMAP #97 with NO-GO + one validating parallel: April 2026 "Automated Alignment Researchers" paper conceptually parallels our cross- model review pattern (LLM-as-reviewer-of-LLM via "scalable oversight"). Our implementation predates the paper and already mitigates its noted weaknesses (reward hacking, limited generalization) via vendor-diverse adversarial framing + verification checklist. RSP, Transparency, Constitution, Economic Futures audited or skipped as off-topic for third-party tooling. Also closes #243 follow-up: token-spike-check.sh has accumulated 8 rows in .metrics/token-history.jsonl on maintainer machine, well above the 5-record rolling-baseline threshold. SessionStart filter + transcript-dir resolution working as designed. 6/6 external audits NO-GO (continues #76, #77, #95, #99, #235). Trim: condensed 1.65.0 + 1.66.0 changelog entries in skills/update/SKILL.md to keep the file under the 5K-token session-load threshold. Zero code changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cli/lib/repo-complexity.jsheuristic +npx agentic-sdlc-wizard complexity .CLI subcommand. Setup Step 9.5 expanded from binary y/N → 3-way (no-pin / mixed / flagship). Reviewer always at flagship regardless of coder pin. Reconciles with Defaultmodel: opus[1m]pin (PR #182) silently disables Claude Code model auto-mode #198: mixed-mode is opt-in per-project; no-pin remains the default.hooks/sdlc-prompt-check.shrecords one tab-separated record per post-dedupe invocation whenSDLC_HOOK_FIRE_LOGis set. Maintainer counts lines per prompt to verify CC 2.1.118's double-fire fix.validate(test-workflow-triggers was failing 164/1 without it).Tests
tests/test-repo-complexity.sh(NEW: tier classification, nested stakes, threshold boundary, CLI subcommand, error path)tests/test-prompt-hook-fires-once.sh(NEW: counter increment, opt-in, log shape, byte-identical output diff, unwritable tolerance)tests/test-hooks.shtests/test-doc-consistency.shtests/test-workflow-triggers.shCross-model review
Test plan
validatejob passesnpx agentic-sdlc-wizard complexity .against this repo → expecttier:complexSDLC_HOOK_FIRE_LOG=/tmp/sdlc.login a fresh CC session, run a few prompts, verifywc -l /tmp/sdlc.logmatches prompt count