Gate (tht-gate.js): - Pre-validate decision types against workflow.yaml before showing reviewer widget - Reject decisions emitted by later phases (min-phase check) - Copy top-level `kind` into artifact when model forgets it (prevents loop) - Force-advance on reviewer_decide/schema_linking when advance:true — skip redundant reviewer_confirm gate Backend: - Emit agent_end on clean Pi exit (code 0 + bridge idle) instead of marking failed Frontend: - Strip <think> tags from transcript and activity panel - Fix mermaid render with offscreen container + cleanup - Graceful mermaid error: show source code instead of red error, fall back to table Workflow: - F2 now emits table_promoted and table_excluded (early schema linking decisions) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
75 lines
2.5 KiB
YAML
75 lines
2.5 KiB
YAML
# harness/workflow.yaml — single source of workflow truth (spec F2, §5.3)
|
|
# phase.py, il gate e la skill leggono tutti da qui. Nessuna costante duplicata.
|
|
# Editare questo file per cambiare il workflow (aggiungere/riordinare/fondere/skip fasi).
|
|
|
|
schema_version: 1
|
|
|
|
# `emits` elenca i decision type sostanziali prodotti da ciascuna fase: e' la fonte
|
|
# data-driven di decision_min_phase (la fase minima in cui un tipo e' ammesso),
|
|
# usata da require_phase_or_exit per rifiutare decisioni fuori fase. I tipi meta
|
|
# cross-fase (phase_approved/auto_approved/reopened/skipped, decision_retracted)
|
|
# non vanno elencati: restano ammessi da qualunque fase.
|
|
phases:
|
|
- id: F1
|
|
name: chiarimento
|
|
advance: kind:phase
|
|
prerequisites: []
|
|
artifacts_out: []
|
|
emits: [concept_clarified, ambiguity_open]
|
|
- id: F2
|
|
name: memoria
|
|
advance: auto_if_empty
|
|
prerequisites: []
|
|
artifacts_out: []
|
|
emits: [memory_rejected, table_promoted, table_excluded]
|
|
- id: F3
|
|
name: riscrittura
|
|
advance: kind:phase
|
|
prerequisites:
|
|
- decision_exists: question_rewritten
|
|
artifacts_out: [question.md]
|
|
emits: [question_rewritten]
|
|
- id: F4
|
|
name: schema_linking
|
|
advance: reviewer_decide
|
|
prerequisites: []
|
|
artifacts_out: [schema_linking.json]
|
|
emits: [table_promoted, table_excluded, column_promoted, column_excluded, column_corrected, join_modified,
|
|
evidence_accepted, evidence_rejected, value_grounded,
|
|
concept_formula_approved, concept_formula_rejected]
|
|
- id: F5
|
|
name: sintesi
|
|
advance: kind:phase
|
|
prerequisites:
|
|
- file_validates: [schema_linking.json, SchemaLinking]
|
|
artifacts_out: []
|
|
emits: []
|
|
- id: F6
|
|
name: cte
|
|
advance: auto_if_empty_or_skipped
|
|
prerequisites:
|
|
- any:
|
|
- decision_subject_exists: [phase_skipped, "phase:6"]
|
|
- all_ctes_approved: true
|
|
artifacts_out: [cte_plan.json, ctes/, cte_tests.json]
|
|
emits: [cte_approved, cte_corrected, cte_rejected]
|
|
- id: F7
|
|
name: sql_finale
|
|
advance: kind:phase
|
|
prerequisites:
|
|
- decision_exists: sql_approved
|
|
artifacts_out: [sql_final.sql]
|
|
emits: [sql_revised, sql_approved, sql_rejected]
|
|
- id: F8
|
|
name: datamart
|
|
advance: reviewer_decide
|
|
prerequisites:
|
|
- any:
|
|
- decision_exists: datamart_requested
|
|
- decision_exists: datamart_declined
|
|
artifacts_out: []
|
|
emits: [datamart_requested, datamart_declined, memory_promoted, memory_promotion_declined]
|
|
|
|
decision_min_phase: auto
|
|
max_phase: auto
|