Skip to content

v1.38.0: mixed-mode tier (#233) + prompt-hook-fires-once instrumentation (#224) - #243

Merged
BaseInfinity merged 3 commits into
mainfrom
roadmap-233-mixed-mode
Apr 25, 2026
Merged

v1.38.0: mixed-mode tier (#233) + prompt-hook-fires-once instrumentation (#224)#243
BaseInfinity merged 3 commits into
mainfrom
roadmap-233-mixed-mode

Conversation

@BaseInfinity

Copy link
Copy Markdown
Owner

Summary

Tests

  • 11/11 tests/test-repo-complexity.sh (NEW: tier classification, nested stakes, threshold boundary, CLI subcommand, error path)
  • 6/6 tests/test-prompt-hook-fires-once.sh (NEW: counter increment, opt-in, log shape, byte-identical output diff, unwritable tolerance)
  • 128/128 tests/test-hooks.sh
  • 22/22 tests/test-doc-consistency.sh
  • 165/165 tests/test-workflow-triggers.sh

Cross-model review

Test plan

  • CI validate job passes
  • PR review job passes (advisory)
  • Manual: run npx agentic-sdlc-wizard complexity . against this repo → expect tier:complex
  • Manual: set SDLC_HOOK_FIRE_LOG=/tmp/sdlc.log in a fresh CC session, run a few prompts, verify wc -l /tmp/sdlc.log matches prompt count

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.
@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

@BaseInfinity
BaseInfinity merged commit 26bcaff into main Apr 25, 2026
2 of 3 checks passed
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.
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant