diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 51fdbf1..492670e 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -43,7 +43,7 @@ jobs: with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} claude_args: | - --model claude-sonnet-4-6 + --model claude-sonnet-5 --allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(git diff:*),Bash(git log:*),Read,Grep,Glob,WebFetch" prompt: | REPO: ${{ github.repository }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 25556e9..1153f84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project. Format: [Keep a Changelog](https://keepacha ## Unreleased +- **chore(ci): own-CI reviewer repinned `claude-sonnet-4-6` → `claude-sonnet-5`.** Same tier and list price, so the v2.7.0 cost decision stands unchanged; this is a currency bump, not a re-opening of that call. Landed on its own because `anthropics/claude-code-action@v1` refuses to run when the PR's `review.yml` differs from the copy on the default branch ("Workflow validation failed") — carrying a repin inside a feature branch therefore *silently disables the AI review on that PR and every PR stacked on it*, with no red check to notice. A `review.yml` change has to be its own PR, where verdict-gate's self-bootstrap escape hatch is the designed handling. + - **feat: generate `templates/INDEX.md`, scaffold `.claude/workflows/`, and document teams / channels / routines.** Three gaps the currency audit left open. **(1)** `templates/INDEX.md` was hand-maintained and had gone stale enough to mislead — it still referenced a `configurator.html` that no longer exists and was missing half the modules. It is now **generated** from `MODULES` by `python3 configure.py --write-index`, and `--check` fails when the committed copy and the generator disagree, so it cannot drift again. **(2)** Dynamic workflows have been a first-class Claude Code surface since 2.1.154 and the configurator scaffolded nothing for them. The `multi-agent` module now ships `.claude/workflows/spec-fanout.js` (runs as `/spec-fanout`), which generates N variants of one spec into disjoint slots and then **screens each variant against the spec** before reporting. It is the workflow-native successor to the `/infinite` skill in the same module — same job, but the runtime holds the loop and the intermediate results, the run is resumable, and the screening pass is a real gate rather than a suggestion. Project workflows under `.claude/workflows/` are shared with everyone who clones the repo. `--check` gained a rule validating that every shipped workflow declares a usable `meta` block and uses no `import()` (the runtime rejects both). `workflowSizeGuideline` is stubbed in `settings.local.json.example`. **(3)** `docs/04` gains a table comparing the five ways to run work in parallel (subagent / skill / agent team / workflow / worktree session) by *who holds the plan*, and states plainly why the configurator ships no templates for agent teams, channels or routines: teams are spawned in conversation and live for a session (only `teammateMode` is worth setting, and it's a per-machine terminal preference — stubbed in settings.local); the channel gate keys `channelsEnabled` and `allowedChannelPlugins` are **managed-settings only**, so a project cannot enable them; and routines are scheduled cloud agents that run against a repo rather than from your checkout, where a `Stop` or `SessionStart` hook is the project-scoped equivalent. - **feat(hooks): PowerShell hook variants behind `--hook-shell powershell`.** The `shell: "bash"` fix covers Windows *with* Git Bash; this covers the machines without it, where `"bash"` has nothing to resolve to. Six hooks now ship a `.ps1` sibling — `block-dangerous-bash`, `scan-secrets`, `format-on-write`, `stop-run-checks`, `pre-compact-snapshot`, `microbit-enforcer` — and `--hook-shell powershell` swaps a `.sh` for its sibling **by name, per entry**, setting `"shell": "powershell"` on just those hooks. Everything without a sibling stays bash, which is correct rather than lazy: `check-package-availability` probes apt/brew and `sessionstart-drift-check` is jq-driven, so both are Linux/macOS-shaped by nature. The answer persists to `.claude-config.json` like the rest of the intake; the default is unchanged. **Three Windows-specific traps, each found by running the hooks rather than reading about them:** **(a)** Windows PowerShell 5.1 — still the default — reads `.ps1` as the system ANSI code page unless the file has a BOM. A UTF-8 em-dash decodes to a cp1252 smart quote, which PowerShell accepts as a *string delimiter*: the string terminated mid-line and `microbit-enforcer.ps1` failed to parse. All shipped `.ps1` are ASCII and BOM-free, and `--check` enforces that (plus the `.sh` pairing, since an orphan `.ps1` would never be installed). **(b)** Windows ships execution policy `Restricted`, so naming a `.ps1` directly fails with *"running scripts is disabled on this system"* — a silent, machine-dependent break of exactly the kind this work exists to prevent. The generated command spawns PowerShell with `-ExecutionPolicy Bypass`, which applies only to that child process running a script the user installed deliberately, and never changes machine policy. **(c)** A wrapping `powershell -Command` collapses any non-zero child exit to `1`, which would have turned a `PreToolUse` **block** (exit 2) into a mere non-blocking error — the safety hooks would have appeared to work while silently permitting everything. The command ends with `; exit $LASTEXITCODE`; exit 2 was then verified to survive both a direct `-File` invocation and a `-Command` wrapper. The SessionStart marker-clear is not a script but an inline `rm -f … || true`, which is not valid PowerShell, so it gets an explicit translation. A `target_path_for` routing rule keyed to `.sh` was widened, or `microbit-enforcer.ps1` would have been routed to `.claude/skills/` and silently never installed — caught by asserting that every settings entry resolves to a file on disk. New `test/portability/test-powershell-hooks.sh` checks the wiring on any platform and executes the hooks wherever PowerShell is present (`pwsh` ships on all three GitHub runner images); README and `docs/03` document the flag, the policy tradeoff, and which hooks stay bash.