feat(harness): workflow.yaml as single source of truth + workflow.py loader (F2)
- workflow.yaml: 8-phase definition, data-driven prerequisites, no hardcoded ladder - workflow.py: load_workflow() reader; max_phase=len(phases), decision_min_phase derived from prerequisites scan (no duplication) - 6 tests: phase count, decision_min_phase derivation, name lookup (incl. F8 presence -- the JS drift bug structurally impossible now), artifacts_out, advance strategy, schema_version. All 8 harness tests pass.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
# 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
|
||||
|
||||
phases:
|
||||
- id: F1
|
||||
name: chiarimento
|
||||
advance: kind:phase
|
||||
prerequisites: []
|
||||
artifacts_out: []
|
||||
- id: F2
|
||||
name: memoria
|
||||
advance: auto_if_empty
|
||||
prerequisites: []
|
||||
artifacts_out: []
|
||||
- id: F3
|
||||
name: riscrittura
|
||||
advance: kind:phase
|
||||
prerequisites:
|
||||
- decision_exists: question_rewritten
|
||||
artifacts_out: [question.md]
|
||||
- id: F4
|
||||
name: schema_linking
|
||||
advance: reviewer_decide
|
||||
prerequisites: []
|
||||
artifacts_out: [schema_linking.json]
|
||||
- id: F5
|
||||
name: sintesi
|
||||
advance: kind:phase
|
||||
prerequisites:
|
||||
- file_validates: [schema_linking.json, SchemaLinking]
|
||||
artifacts_out: []
|
||||
- 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]
|
||||
- id: F7
|
||||
name: sql_finale
|
||||
advance: kind:phase
|
||||
prerequisites:
|
||||
- decision_exists: sql_approved
|
||||
artifacts_out: [sql_final.sql]
|
||||
- id: F8
|
||||
name: datamart
|
||||
advance: reviewer_decide
|
||||
prerequisites:
|
||||
- any:
|
||||
- decision_exists: datamart_requested
|
||||
- decision_exists: datamart_declined
|
||||
artifacts_out: []
|
||||
|
||||
decision_min_phase: auto
|
||||
max_phase: auto
|
||||
Reference in New Issue
Block a user