feat(st2): portable standard + 0.7.0 release cut - #31
Conversation
Promote reference/repo-os-contract.md to the normative spec: stability note and versioning model (§0), artifact/schema table across all 7 published schemas with required keys verbatim from schemas/ (§11), lifecycle vocabulary + terminal-file-iff rule (§12), repair-record vs rollout-record two-shape clarification (§13), and the A1-E1 conformance checklist (§14). - doctor lifecycle line: validate_contract reports lifecycle: planned | running | terminated:<State> | unknown — additive reporting only, never an issue source; DG-3 regressions pin both directions in both validation modes. - scripts/test_template_roundtrip.py: every templates/* artifact, filled with schema-valid values, passes validate_contract with zero issues in both modes (in-flight + terminated scaffolds). - scripts/test_conformance.py: executes checklist A1-E1 in CI against examples/coverage-repair and a fresh template scaffold, incl. additive-key tolerance (D2), lifecycle honesty (E1), and a doc-parity guard binding every checklist ID to the normative doc. - README: pointer subsection for the versioned standard. ST2 spec: docs/superpowers/specs/2026-06-30-st2-portable-contract-spec.md (DG-1/DG-2/DG-3-core/M5/QW11 had already landed via #27-#30). Suite: 372 passed / 10 skipped (jsonschema), 361 / 21 (structural). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CHANGELOG 0.7.0 collects the ST2 standard work, the adoption slices (A1/B1/C1/PR5, previously Unreleased), and the external-review patch set #27-#30 (previously unchangelogged). Version 0.6.1 -> 0.7.0 in pyproject.toml, plugin.json, README badge + Status; docs-version gate updated. The README Adopt-section @v0.7.0 action pin becomes accurate at this release's tag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a761c14fa3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| """ | ||
| state_is_dict = isinstance(state, dict) | ||
| terminal_state_val = state.get("terminal_state") if state_is_dict else None | ||
| if (state_is_dict and terminal_state_val is not None) or terminal_exists: |
There was a problem hiding this comment.
Reject stale terminal files for in-flight state
When state.json still has terminal_state: null but a stale .loop/terminal_state.json remains, this branch treats the contract as terminated and validate_contract() never emits an issue, so the report is ok: true/lifecycle: terminated:<state>. That violates the new terminal-file-iff/B1 rule in this commit, which requires exactly the in-flight arm (terminal_state null and no terminal file) or the terminated arm (non-null terminal state plus terminal file), and lets non-conformant contracts pass doctor.
Useful? React with 👍 / 👎.
0.7.0 — Portable standard (ST2)
Closes the v0.7.0 roadmap milestone: the on-disk contract becomes a documented, versioned, tool-agnostic standard, and the release is cut.
Spec:
docs/superpowers/specs/2026-06-30-st2-portable-contract-spec.md. Most of the spec's findings (DG-1, DG-2, DG-3-core, M5, QW11) already landed via the #27–#30 review patch set; this PR ships the remainder.What's in
reference/repo-os-contract.mdpromoted: stability note + versioning model (§0:loop-engineer/<artifact>@<major>$ids, strictly additive within a major, breaking ⇒ new major side by side), artifact/schema table across all 7 published schemas with required keys verbatim fromschemas/*.schema.json(§11), lifecycle vocabulary + terminal-file-iff rule (§12), repair-record vs rollout-record two-shape clarification (§13), conformance checklist A1–E1 (§14).doctorlifecycle line —validate_contractreportslifecycle: planned | running | terminated:<State> | unknown. Additive reporting only (never an issue source), so an in-flight loop is visibly conformant instead of being pushed to fabricate a terminal file. DG-3 regressions pin both directions in both validation modes.scripts/test_template_roundtrip.py) — everytemplates/*artifact, filled with schema-valid values, passesvalidate_contractwith zero issues in both modes (in-flight + terminated scaffolds). The DG-class drift cannot silently return.scripts/test_conformance.py) — executes A1–E1 in CI againstexamples/coverage-repairand a fresh template scaffold, incl. additive-key tolerance (D2), lifecycle honesty (E1), and a doc-parity guard binding every checklist ID to the normative doc.@v0.7.0action pin becomes accurate at this release's tag.Process
4 parallel opus TDD builders → 4 opus adversarial verifiers (workflow
wf_0f8b597c-f5f), all four verdicts PASS, 0 blockers — non-vacuity of the new tests proven by mutation (e.g. reordering the canonicalterminal_statesin the shipped template flips the round-trip test red). Integration guards tightened post-workflow (E1 + doc-parity now hard-assert).Gates (operator-run)
git archive HEAD): 370 passed / 12 skipped — all skips are the known env-guard / checked-when-present classesself_eval.py13/13 ·validate_frontmatter.py9/9 ·py_compileclean · plugin.json valid JSONschemas/*.schema.json— every$idand required-keys row matches🤖 Generated with Claude Code