docs(state): workflow contract hardening landed (F6 fix, schema_linking writer, SKILL contract)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+37
-3
@@ -1,6 +1,6 @@
|
||||
# ThothII — Project State
|
||||
|
||||
> Starting-point snapshot for new sessions. Last updated: 2026-06-30.
|
||||
> Starting-point snapshot for new sessions. Last updated: 2026-07-01.
|
||||
> Point a fresh session here ("read PROJECT_STATE.md") before substantial work.
|
||||
|
||||
## What ThothII is
|
||||
@@ -53,7 +53,7 @@ Opens frontend at http://localhost:5173 → backend :8787.
|
||||
- frontend: `cd frontend && npm run dev` (Vite; `VITE_BACKEND_URL` → backend)
|
||||
- harness install: `cd harness && python -m venv .venv && pip install -e ".[dev]"` → `tht` on PATH
|
||||
|
||||
## How to test (all green as of 2026-06-30: harness 269 / backend 67 / frontend 87)
|
||||
## How to test (all green as of 2026-07-01: harness 281 / backend 67 / frontend 96)
|
||||
- harness: `cd harness && .venv/bin/pytest -q` (5 L2/real-DB tests are deselected by default)
|
||||
- backend: `cd backend && npx vitest run` · typecheck `npx tsc --noEmit -p .`
|
||||
- frontend: `cd frontend && npx vitest run` · typecheck `npx tsc -b` · e2e `npm run e2e` (Playwright)
|
||||
@@ -78,6 +78,36 @@ Opens frontend at http://localhost:5173 → backend :8787.
|
||||
- Global user rules (`~/.claude/CLAUDE.md`): think before coding, simplicity first, surgical
|
||||
changes, goal-driven verification.
|
||||
|
||||
## Workflow contract hardening — COMPLETE (2026-07-01)
|
||||
|
||||
Spec: `docs/superpowers/specs/2026-07-01-workflow-contract-hardening-design.md` · Plan:
|
||||
`docs/superpowers/plans/2026-07-01-workflow-contract-hardening.md`. Merged to `main` @ `3dadc6f`
|
||||
(pushed). Driven by analysis of Pi session `2026-06-30-165708` (GLM 5.2), where the model spent
|
||||
~80% of its tool calls reverse-engineering the harness because `SKILL.md` mis-stated the
|
||||
phase-advance contract — and Phase 6 was a hard dead-end. Three coordinated harness fixes (TDD):
|
||||
|
||||
- **F6 CTE-approval dead-end FIXED.** The gate's `reviewer_confirm kind:"cte_result"` used to
|
||||
register `cte_approved --subject phase:6`, which `decision_cmd` rejects (exit 5 — it needs a
|
||||
real CTE name from the plan) → F6 could never close. New `tht cte next --session <id>` returns
|
||||
the first unapproved plan CTE; the gate now approves **by name**. (`tht/cli/cte_cmd.py`,
|
||||
`.pi/extensions/tht-gate.js`.)
|
||||
- **`schema_linking.json` writer/validator.** `store.set_schema_linking` (validates against the
|
||||
`SchemaLinking` model, THEN writes — no partial file) → CLI `tht session set-schema-linking
|
||||
<id> --file <path|->` (exit 5 on bad JSON / ValidationError) → gate tool `write_schema_linking`
|
||||
(stdin). Replaces the model hand-writing the F4 artifact + ad-hoc python validation.
|
||||
- **`SKILL.md` corrected to match the code.** Only F2-empty / F6-skipped auto-advance
|
||||
(`_AUTO_ADVANCE_PHASES={2,6}`); every substantive phase closes with `reviewer_confirm
|
||||
kind:"phase"` (F7 is **two-step**: `kind:"sql"` records `sql_approved`, then `kind:"phase"`
|
||||
advances). Fixed Discipline 2 + Phase 1/3/4, added a per-phase **cheat-sheet**, documented the
|
||||
`SchemaLinking` shape. The old false "the reviewer_decide already advances" (F3) claim — the
|
||||
exact cause of the observed thrash — is gone.
|
||||
|
||||
Verified: harness pytest **281 passed** / 5 deselected, gate JS **34/34**, changed-files ruff
|
||||
clean (the 36 `ruff check .` errors are pre-existing on `main`). Final whole-branch review
|
||||
(opus): READY TO MERGE, no Critical/Important. Executed via subagent-driven-development
|
||||
(implementer + task-review per task, final opus review). **DEFERRED (needs VPN): live F4/F6
|
||||
end-to-end** — resuming session `2026-06-30-165708` (stuck at F6) is the ideal live probe.
|
||||
|
||||
## UI/UX redesign + Resume — COMPLETE (2026-06-30)
|
||||
|
||||
Plan: **`~/.claude/plans/foamy-forging-dahl.md`**. Memory: `thothii-ui-redesign-inprogress.md`.
|
||||
@@ -234,7 +264,11 @@ Full session management modeled on Claude's UI, all three layers:
|
||||
resume cold-start stall, GLM 5.2 F1 slow≠stuck).
|
||||
|
||||
## Git
|
||||
`main` @ `cbb8e18`, **pushed to `origin`** (github.com/mptyl/ThothII); working tree clean, no stashes.
|
||||
`main` @ `3dadc6f`, **pushed to `origin`** (github.com/mptyl/ThothII); working tree clean, no stashes.
|
||||
Workflow-hardening landed on top of the redesign: `d5af7b5` (spec) · `0193341` (plan) · `47a5217`
|
||||
(cte next) · `160d7f0` (F6 by-name) · `92caaac`+`0077792` (schema_linking store+CLI) · `20bc3de`
|
||||
(write_schema_linking gate) · `01de6f3`+`3dadc6f` (SKILL corrections + F7). Feature branch
|
||||
`feat/workflow-contract-hardening` deleted after the ff-merge.
|
||||
**`main` is the only branch** — the three stale branches (`feat/settings-menu` `bcaf670`,
|
||||
`feat/thothII-debugging` `d67409f`, `feat/ui-redesign-resume` `0eeb3f7`) were fully merged ancestors
|
||||
(no unique work) and were deleted on 2026-06-30 (SHAs recoverable via reflog).
|
||||
|
||||
Reference in New Issue
Block a user