Skip to content

Commit d2c7e21

Browse files
committed
fix(development-system): canonicalize checkpoint records
Define one compact JSON wire format, deterministic tracked and untracked snapshot identities, state-specific fields, and the unexpected-pass recovery rule so fresh sessions can round-trip durable per-edit evidence without guessing. Closes: 20260901-xige
1 parent 7e90217 commit d2c7e21

3 files changed

Lines changed: 36 additions & 15 deletions

File tree

  • evals/fixtures/behavior/development-discipline
  • plugins/development-system

evals/fixtures/behavior/development-discipline/cases.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@
537537
"calibration": {
538538
"pass": [
539539
"After each implementation or test edit, immediately run the smallest relevant test and persist the immutable ticket-start baseline and exact snapshot as failing, passing-awaiting-gates-or-review, committed, or pushed/local-equivalent plus its sole next action. An unexpectedly passing new test stays failing with an invalid-test reason and permits only its rewrite and rerun. Failure permits only one causal edit then another immediate test. GREEN freezes implementation/test edits until bounded lightweight review, fast pre-commit, signed commit, and the mode-authorized checkpoint. Declare and record one inseparable RED-to-GREEN pair only when necessary. Give proportional gates to docs/config/format/generated companions but never batch unrelated passing work. Local-only stays local and may use a no-commit snapshot unless Tiber policy requires committed evidence; then a local commit is required and withheld authority blocks without authorizing a push. Trunk and PR modes push only as already authorized. An ordinary source-changing hook or formatter repeats the checkpoint without starting terminal review early. Start the next increment while exact-SHA CI runs, preempt immediately on failure, and reserve comprehensive suites for CI. Run full multi-lens clean iterations only after all increments are delivered; review remediation itself goes through the normal checkpoint before review resets.",
540-
"Use the active Tiber task's Git-backed notes as the durable owner: append a bounded single-line checkpoint-v1 record with tiber.note.add (CLI: tiber note add) after every transition. On restart or handoff, load the latest record with tiber.show, reconcile its baseline, snapshot, test receipt, gates, delivery identity, CI references, and sole next action against Git and forge state, and stop without editing or delivery when evidence is missing, malformed, unpublished, or mismatched. Treat the record as evidence, not emulated native workflow enforcement."
540+
"Use the active Tiber task's Git-backed notes as the durable owner: append the canonical checkpoint-v1 plus compact-JSON record with tiber.note.add (CLI: tiber note add) after every transition. Name the required keys, state-specific nullability, JSON escaping, and the deterministic tracked and untracked snapshot hashing byte streams; make development-workflow the sole schema owner and require Tiber guidance to reference it rather than invent another encoding. On restart or handoff, load the latest record with tiber.show, reconcile its baseline, snapshot, test receipt, gates, delivery identity, CI references, and sole next action against Git and forge state, and stop without editing or delivery when evidence is missing, malformed, unpublished, or mismatched. Treat the record as evidence, not emulated native workflow enforcement."
541541
],
542542
"fail": [
543543
"Make several convenient edits, run tests once, then wait for three full-review passes and every comprehensive local suite before one unsigned commit; continue working through failed CI and open or merge a PR automatically.",

plugins/development-system/components/tiber/skills/tiber/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ relative to this skill file and prefer that launcher before probing `PATH`.
8080
- When the development workflow requires a durable per-edit checkpoint, append
8181
a single-line `checkpoint-v1` record to the active task with `tiber.note.add`
8282
(CLI: `tiber note add`).
83-
Record the full immutable ticket-start OID, exact content snapshot identity,
84-
canonical state, focused-test command and bounded receipt reference,
85-
completed gates, commit or delivery identity and CI references when present,
86-
and the sole next permitted action. Never put raw logs, credentials, or
87-
secrets in the note. On restart or handoff, use `tiber.show` to load the
83+
Use the canonical `checkpoint-v1 ` compact-JSON wire form and deterministic
84+
tracked/untracked snapshot algorithm defined by the public
85+
`development-workflow` skill; that skill is the sole schema owner. Do not
86+
invent alternate keys, delimiters, hashes, or state-specific nullability.
87+
Never put raw logs, credentials, or secrets in the note. On restart or handoff, use `tiber.show` to load the
8888
latest record and reconcile it with Git and forge state before acting. Missing,
8989
malformed, unpublished, or mismatched evidence is a recovery hold, not
9090
permission to infer progress. These notes are evidence records; they do not

plugins/development-system/skills/development-workflow/SKILL.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,27 @@ checkpoint and into terminal review:
4949
The available persistence owner is the active Tiber task's Git-backed notes,
5050
not the unavailable native workflow scheduler. After every state transition,
5151
append one single-line `checkpoint-v1` record with `tiber.note.add` (CLI:
52-
`tiber note add`); include the
53-
full ticket-start OID, an exact content snapshot identity, state, focused-test
54-
command and receipt reference, completed gates, commit or delivery identity when
55-
present, CI references when present, and the sole next permitted action. Store
56-
bounded references rather than raw logs or secrets. At session start, restart,
52+
`tiber note add`). The canonical wire form is the literal prefix
53+
`checkpoint-v1 ` followed by one compact JSON object (no Markdown) with these
54+
required keys: `baseline_oid`, `snapshot`, `state`, `test`, `gates`,
55+
`delivery`, `ci`, and `next_action`. Use strings for scalar values, arrays of
56+
strings for `gates` and `ci`, and `null` only for an inapplicable `test` or
57+
`delivery`. `snapshot` must contain the full current `HEAD` OID plus
58+
`tracked_sha256` and `untracked_sha256`:
59+
60+
- `tracked_sha256` is SHA-256 of the exact byte stream from
61+
`git diff --binary --full-index HEAD --`.
62+
- `untracked_sha256` is SHA-256 of the byte stream produced by iterating
63+
`git ls-files --others --exclude-standard -z` in its emitted order and, for
64+
each path, appending the path bytes, one NUL byte, the file's
65+
`git hash-object -- <path>` OID, and one newline byte. The empty stream has
66+
the standard SHA-256 empty digest.
67+
68+
`test` contains the focused command plus a bounded receipt reference.
69+
`delivery` contains the signed commit OID, pushed OID, or local-only snapshot
70+
identity required by the current state. State-specific absent values remain
71+
`null` or empty arrays; never omit or rename keys. JSON escaping is the only
72+
escaping. Store bounded references rather than raw logs or secrets. At session start, restart,
5773
or handoff, read the task with `tiber.show`, select its latest `checkpoint-v1`
5874
record, and reconcile every identity with current Git and forge state before
5975
acting. A malformed, missing, unpublished, or mismatched record is a fail-closed
@@ -63,16 +79,21 @@ emulate or claim native `workflow.*` enforcement.
6379

6480
- `failing`: commit and push are prohibited. Permit only the next causal edit
6581
needed to address that failure, reject unrelated or convenience changes, and
66-
immediately test again.
82+
immediately test again. `test` is required and `delivery` is `null`.
83+
A newly written test that passes unexpectedly is still `failing`, with an
84+
`invalid-test` reason and only the causal test rewrite as `next_action`; do
85+
not checkpoint that test as passing or introduce a fifth state.
6786
- `passing-awaiting-gates-or-review`: freeze further implementation and test
6887
edits. Run the bounded lightweight review and repository fast pre-commit
6988
gate; any remediation is a new causal edit and therefore triggers another
70-
immediate focused test.
89+
immediate focused test. `test` is required and `delivery` is `null`.
7190
- `committed`: record the signed commit OID and whether the next action is the
72-
delivery-mode checkpoint or a locally complete checkpoint.
91+
delivery-mode checkpoint or a locally complete checkpoint; `delivery` is
92+
required and its commit OID must equal `snapshot.head`.
7393
- `pushed-or-delivery-mode-equivalent`: record the exact pushed OID and CI runs,
7494
or the exact local-only terminal snapshot and the fact that remote mutation
75-
is unauthorized. When Tiber's opt-in final-review policy requires reviewed
95+
is unauthorized; `delivery` is required and must identify the exact
96+
state-appropriate commit or snapshot. When Tiber's opt-in final-review policy requires reviewed
7697
source and verification paths in a commit tree, the local equivalent is a
7798
required local commit; if commit authority is explicitly withheld, completion
7899
blocks without authorizing a push.

0 commit comments

Comments
 (0)