From c63731fb0e95d0e2707edbe2c5e76b65dbe33826 Mon Sep 17 00:00:00 2001 From: akku Date: Thu, 26 Nov 2026 00:34:31 +0100 Subject: [PATCH 1/2] TASK-0: commit-msg hook accepts subtask IDs TASK-. --- docs/agent/OPERATING_MODEL.md | 2 +- scripts/githooks/commit-msg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/agent/OPERATING_MODEL.md b/docs/agent/OPERATING_MODEL.md index 4a019a0..8893210 100644 --- a/docs/agent/OPERATING_MODEL.md +++ b/docs/agent/OPERATING_MODEL.md @@ -504,7 +504,7 @@ Useful principles: - keep code and closely related task-state changes coherent in commits according to project convention; - check the working tree before committing and before ending a session so unrelated or forgotten changes are visible; - parallel sessions on one repository work in separate worktrees (the app's worktree feature or `git worktree add`) and stage explicit paths, never `git add -A` or `git add .`; -- commit message: first line `TASK-: ` (several tasks: `TASK-1, TASK-2: `); merge, revert, fixup, `Release`, `Handoff` (also `Release:`, `Handoff:`), `Initial commit` and `Set up` commits are exempt. The `commit-msg` hook in `scripts/githooks` enforces it; `--no-verify` is denied for the agent; +- commit message: first line `TASK-: ` (subtask IDs `TASK-.` also match; several tasks: `TASK-1, TASK-2: `); merge, revert, fixup, `Release`, `Handoff` (also `Release:`, `Handoff:`), `Initial commit` and `Set up` commits are exempt. The `commit-msg` hook in `scripts/githooks` enforces it; `--no-verify` is denied for the agent; - do not treat "CI green" as sufficient when required manual or environment-specific evidence is still missing; - summarize verbose CI/GitHub output using the same compact-output discipline as local tests. diff --git a/scripts/githooks/commit-msg b/scripts/githooks/commit-msg index 26da294..b313e37 100755 --- a/scripts/githooks/commit-msg +++ b/scripts/githooks/commit-msg @@ -7,7 +7,7 @@ first=$(grep -v -E '^(#|[[:space:]]*$)' "$1" | head -n 1) case "$first" in Merge\ *|Revert\ *|fixup!\ *|squash!\ *|amend!\ *|Release\ *|Release:\ *|Handoff\ *|Handoff:\ *|retro:\ *|Tron\ run:\ *|baseline:\ *|Initial\ commit*|Set\ up\ *) exit 0 ;; esac -if printf '%s\n' "$first" | grep -E -q '^TASK-[0-9]+(, TASK-[0-9]+)*: .+'; then exit 0; fi +if printf '%s\n' "$first" | grep -E -q '^TASK-[0-9]+(\.[0-9]+)?(, TASK-[0-9]+(\.[0-9]+)?)*: .+'; then exit 0; fi echo "commit-msg: first line must start with 'TASK-: ' (R-STATE-COHERENCE), got: $first" >&2 echo "Allowed without a task: Merge, Revert, fixup!, Release, Handoff, Initial commit, Set up, retro:/Tron run:/baseline: (Tron mode)." >&2 exit 1 From 3602cb616815210dd5c88befa180844896df7baa Mon Sep 17 00:00:00 2001 From: akku Date: Thu, 26 Nov 2026 00:34:36 +0100 Subject: [PATCH 2/2] TASK-0: changelog entry for subtask IDs in commit-msg --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a6f60a..5c4f19e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Newest first. Projects read the entries newer than their `STEM_VERSION` (see `stem-update` skill). Each entry: what changed and who benefits; renames and removals get a `Migration:` line (what to rename or delete) that `stem-update` carries out. ## Unreleased +- **`commit-msg` hook accepts subtask IDs:** the first line may now start with `TASK-.` (also in comma lists, e.g. `TASK-1, TASK-8.2: ...`), because Backlog.md subtasks carry IDs like `TASK-8.2` and the hook rejected their commits. `R-STATE-COHERENCE` mentions it. Benefits: projects with subtasks need no local hook change. Migration: copy `scripts/githooks/commit-msg` (executable); update the commit-message bullet of `R-STATE-COHERENCE`. - **Tron runs decide inside the frame instead of stopping:** `R-AUTONOMY` (and `AGENTS.md` rule 6), `R-LIFECYCLE` 1.2, `R-DESIGN`, `R-REVIEW` and `R-DECISION` each state their Tron variant (one line each, inserted by the `tron` module's refs, so it leaves with the module): the decision frame comes before stop-and-ask, the approved milestone plus the answered sweep are plan approval, additive internal compatible interfaces are decided with a `Decision:` line that the report lists for review (the default `DECISION_FRAME.md` gains that line under 'May decide alone' and names breaking or public interfaces, ownership and permission models under 'Must come back'), the evaluator counts as review only when its brief covers the trigger and the full diff (the report names cut or shortened briefs), decisions stay task notes until the user reviewed the run. The gate accepts an open usage probe AC (`[probe: TASK-n#k]` with its one `probe.py fire` call, as `check-backlog.sh` does) and the report lists it under 'Probe ACs left open'. Benefits: fewer stalled tasks in unattended runs. Migration: none. - **Context notice knows 1M windows:** `scripts/context-check.py` treats Claude 5.x and Opus 4.7+ models as 1M windows (they have it without a `[1m]` marker); before it assumed 200k, so on these models the first notice was capped at 180k and the urgent notice never fired. Migration: copy `scripts/context-check.py`. - **Context notice later, once plus once urgent:** `scripts/context-check.py` now gives the first notice at the larger of 130k and the session's first-turn context + 50k (at most 90 % of a known window; before: the smaller of first-turn + 50k and half the window, i.e. 100k on 200k-window models), and one urgent notice at the larger of 200k and 1.5x that threshold, each once per session (before: repeated every +30k). `CONTEXT_WARN_TOKENS` now sets the 130k floor. Benefits: no notice before quality loss shows. Migration: copy `scripts/context-check.py`, `docs/agent/OPERATING_MODEL.md` (`R-BATCHING`) and the `Session length` row of `docs/agent/EXPERIMENTS.md`.