fix: realign workflow advance semantics and phase labels with workflow.yaml
Audit findings 2.1 + 2.2 (high).
2.1 WorkflowBar's static phase list was fiction from F2 on (F2 "Schema
linking" vs memoria, F4 "SQL plan" vs schema_linking, …): every live
session showed the wrong phase name. Both maps now mirror
harness/workflow.yaml (F1 chiarimento … F8 datamart).
2.2 forceAdvance (6ee5bda) let reviewer_decide advance:true bypass the
phase gate on ANY phase, contradicting SKILL.md's "auto-advance only
empty F2 / skipped F6". reviewer_decide is back on advanceIfReady (exit-6
no-op) and tells the model to close via reviewer_confirm; forceAdvance
stays only where selection IS the approval by design: reviewer_schema_linking
(F4) and the F8 promotion close path. SKILL.md now names the three
self-closing gates (F3 rewrite_question, F4 schema-linking advance:true,
F8 memory_promote) so gate and skill state one contract.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,15 +29,17 @@ A phase advances ONLY when a `phase_approved:phase:N` decision is recorded for t
|
||||
phase — written by `reviewer_confirm kind:"phase"`. (F7 is two-step: `kind:"sql"` records
|
||||
`sql_approved`, then `kind:"phase"` advances.) A `reviewer_decide`/
|
||||
`reviewer_select` choice records its OWN decision but does NOT advance the phase. `advance:true`
|
||||
auto-advances only F2 (empty memory) and F6 (skipped/empty) — never a phase that recorded
|
||||
substantive decisions.
|
||||
on `reviewer_decide` auto-advances only F2 (empty memory) and F6 (skipped/empty) — never a
|
||||
phase that recorded substantive decisions. Exactly three gates close their phase themselves,
|
||||
because there the human interaction IS the phase approval: `rewrite_question` (F3),
|
||||
`reviewer_schema_linking` with `advance:true` (F4), and `reviewer_memory_promote` (F8).
|
||||
|
||||
| Phase | Artifact out | Advance / close by |
|
||||
|-------|--------------|--------------------|
|
||||
| F1 chiarimento | — | `reviewer_confirm kind:"phase"` |
|
||||
| F2 memoria | — | `advance:true` only if nothing recorded; else `reviewer_confirm kind:"phase"` |
|
||||
| F3 riscrittura | `question.md` | `rewrite_question` records approval and advances automatically |
|
||||
| F4 schema_linking | `schema_linking.json` | `reviewer_confirm kind:"phase"` (after `reviewer_schema_linking` + `write_schema_linking`). Promoted columns are the reviewer-approved OUTPUT columns — project exactly those in the final SELECT. |
|
||||
| F4 schema_linking | `schema_linking.json` | `reviewer_schema_linking` with `advance:true` closes the phase itself (the curation IS the approval; `reviewer_confirm kind:"phase"` only as fallback if it reports an error). Promoted columns are the reviewer-approved OUTPUT columns — project exactly those in the final SELECT. |
|
||||
| F5 sintesi | — | `reviewer_confirm kind:"phase"` (after `tht session check`) |
|
||||
| F6 cte | `cte_plan.json`, `ctes/`, `cte_tests.json` | approve each CTE `kind:"cte_result"`, then `reviewer_confirm kind:"phase"` |
|
||||
| F7 sql_finale | `sql_final.sql` | `kind:"sql"` records `sql_approved`, then `reviewer_confirm kind:"phase"` |
|
||||
@@ -56,9 +58,10 @@ substantive decisions.
|
||||
`kind:"phase"` to advance), the deliberate "this phase is
|
||||
done" gate. The `advance:true` flag on `reviewer_decide` is a shortcut that auto-advances
|
||||
ONLY F2 when the memory phase recorded nothing and F6 when it is skipped/empty; everywhere
|
||||
else it is a silent no-op, so never rely on it to advance. Do NOT add a `reviewer_confirm`
|
||||
that merely echoes a decision already recorded by a choice — the phase gate is a separate,
|
||||
deliberate step, not an echo of a decision.
|
||||
else it is a silent no-op, so never rely on it to advance. The self-closing gates are the
|
||||
three listed above (F3 `rewrite_question`, F4 `reviewer_schema_linking` `advance:true`,
|
||||
F8 `reviewer_memory_promote`) — after one of those, do NOT add a `reviewer_confirm` that
|
||||
merely echoes it; the phase is already closed.
|
||||
3. **Single pick vs multi-answer.** For a single-pick clarification or decision, use
|
||||
`reviewer_select` and attach a `decision` payload (`{type, subject, detail?,
|
||||
rationale?}`) to each concrete option: picking it persists that decision directly —
|
||||
|
||||
Reference in New Issue
Block a user