Thirteen source-backed interactive diagrams in docs/architecture with an index page (thothii-diagrams.html): runtime and deployment architecture, module tree, F1-F8 workflow, session and catalog-sync lifecycles, new-question, gate round-trip, resume and OIDC sequences, session runtime classes, metadata dataflow and Metadata Catalog ERD. Replaces the old thothii-core sequence diagram. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
105 lines
5.9 KiB
JSON
105 lines
5.9 KiB
JSON
{
|
|
"schema_version": 2,
|
|
"diagram_type": "workflow",
|
|
"meta": {
|
|
"title": "ThothII — workflow NL→SQL in 8 fasi",
|
|
"locale": "it",
|
|
"output": "docs/architecture/thothii-phases.html",
|
|
"quality_profile": "showcase",
|
|
"repository": {
|
|
"url": "https://git.tylconsulting.it/mptyl/ThothII.git",
|
|
"link_mode": "local-only",
|
|
"revision": "31e6d3a162e9e5ac71fc2d8da4fe44b16c06aae3"
|
|
}
|
|
},
|
|
"lanes": [
|
|
{ "id": "domanda", "label": "Domanda" },
|
|
{ "id": "schema", "label": "Schema e sintesi" },
|
|
{ "id": "sql", "label": "SQL" },
|
|
{ "id": "chiusura", "label": "Chiusura" },
|
|
{ "id": "eccezioni", "label": "Ritorno indietro", "variant": "exception" }
|
|
],
|
|
"mainPath": ["f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "finalizzata"],
|
|
"nodes": [
|
|
{ "id": "f1", "lane": "domanda", "col": 0, "type": "frontend", "label": "F1 chiarimento", "sublabel": "concetti e ambiguità", "tag": "gate fase",
|
|
"sources": [
|
|
{ "path": "harness/workflow.yaml", "line": 13, "end_line": 18 },
|
|
{ "path": "harness/.pi/skills/tht-sessione/SKILL.md", "line": 57, "end_line": 57 }
|
|
] },
|
|
{ "id": "f2", "lane": "domanda", "col": 1, "type": "database", "label": "F2 memoria", "sublabel": "memorie e esempi risolti", "tag": "auto se vuota",
|
|
"sources": [
|
|
{ "path": "harness/workflow.yaml", "line": 19, "end_line": 24 },
|
|
{ "path": "harness/.pi/skills/tht-sessione/SKILL.md", "line": 58, "end_line": 58 }
|
|
] },
|
|
{ "id": "f3", "lane": "domanda", "col": 2, "type": "frontend", "label": "F3 riscrittura", "sublabel": "question.md", "tag": "si chiude da sola",
|
|
"sources": [
|
|
{ "path": "harness/workflow.yaml", "line": 25, "end_line": 31 },
|
|
{ "path": "harness/.pi/skills/tht-sessione/SKILL.md", "line": 59, "end_line": 59 }
|
|
] },
|
|
{ "id": "f4", "lane": "schema", "col": 2, "type": "frontend", "label": "F4 schema linking", "sublabel": "schema_linking.json", "tag": "reviewer_decide",
|
|
"sources": [
|
|
{ "path": "harness/workflow.yaml", "line": 32, "end_line": 39 },
|
|
{ "path": "harness/.pi/skills/tht-sessione/SKILL.md", "line": 60, "end_line": 60 }
|
|
] },
|
|
{ "id": "f5", "lane": "schema", "col": 3, "type": "frontend", "label": "F5 sintesi", "sublabel": "valida SchemaLinking", "tag": "gate fase",
|
|
"sources": [
|
|
{ "path": "harness/workflow.yaml", "line": 40, "end_line": 46 },
|
|
{ "path": "harness/.pi/skills/tht-sessione/SKILL.md", "line": 61, "end_line": 61 }
|
|
] },
|
|
{ "id": "f6", "lane": "sql", "col": 3, "type": "backend", "label": "F6 CTE", "sublabel": "piano, CTE e test", "tag": "ultima CTE chiude",
|
|
"sources": [
|
|
{ "path": "harness/workflow.yaml", "line": 47, "end_line": 55 },
|
|
{ "path": "harness/.pi/skills/tht-sessione/SKILL.md", "line": 62, "end_line": 62 }
|
|
] },
|
|
{ "id": "f7", "lane": "sql", "col": 4, "type": "backend", "label": "F7 SQL finale", "sublabel": "sql_final.sql", "tag": "kind sql chiude",
|
|
"sources": [
|
|
{ "path": "harness/workflow.yaml", "line": 56, "end_line": 62 },
|
|
{ "path": "harness/.pi/skills/tht-sessione/SKILL.md", "line": 63, "end_line": 63 }
|
|
] },
|
|
{ "id": "f8", "lane": "chiusura", "col": 4, "type": "database", "label": "F8 datamart", "sublabel": "promozione memorie", "tag": "si chiude da sola",
|
|
"sources": [
|
|
{ "path": "harness/workflow.yaml", "line": 63, "end_line": 72 },
|
|
{ "path": "harness/.pi/skills/tht-sessione/SKILL.md", "line": 64, "end_line": 64 }
|
|
] },
|
|
{ "id": "finalizzata", "lane": "chiusura", "col": 5, "type": "external", "label": "Sessione finalizzata", "sublabel": "tht session finalize",
|
|
"sources": [
|
|
{ "path": "harness/.pi/extensions/tht-gate.js", "line": 1650, "end_line": 1666, "label": "advancePhaseAndFinalize" }
|
|
] },
|
|
{ "id": "riapertura", "lane": "eccezioni", "col": 1, "type": "security", "label": "Riapertura fase", "sublabel": "/torna → phase reopen", "tag": "phase_reopened",
|
|
"sources": [
|
|
{ "path": "harness/.pi/extensions/tht-gate.js", "line": 1775, "end_line": 1814, "label": "comando /torna" },
|
|
{ "path": "harness/tht/phase.py", "line": 60, "end_line": 79, "label": "fold con reopen" }
|
|
] }
|
|
],
|
|
"edges": [
|
|
{ "id": "f1-f2", "from": "f1", "to": "f2", "variant": "emphasis" },
|
|
{ "id": "f2-f3", "from": "f2", "to": "f3", "variant": "emphasis" },
|
|
{ "id": "f3-f4", "from": "f3", "to": "f4", "variant": "emphasis" },
|
|
{ "id": "f4-f5", "from": "f4", "to": "f5", "variant": "emphasis" },
|
|
{ "id": "f5-f6", "from": "f5", "to": "f6", "variant": "emphasis" },
|
|
{ "id": "f6-f7", "from": "f6", "to": "f7", "variant": "emphasis" },
|
|
{ "id": "f7-f8", "from": "f7", "to": "f8", "variant": "emphasis" },
|
|
{ "id": "f8-fin", "from": "f8", "to": "finalizzata", "label": "finalize", "variant": "emphasis" },
|
|
{ "id": "torna", "from": "f7", "to": "riapertura", "label": "/torna", "variant": "dashed", "role": "error" },
|
|
{ "id": "riapre", "from": "riapertura", "to": "f1", "label": "fase N < corrente", "variant": "dashed", "role": "return" }
|
|
],
|
|
"cards": [
|
|
{ "dot": "cyan", "title": "Chi decide", "items": [
|
|
"Il modello propone, il reviewer decide tramite widget, tht persiste",
|
|
"Gate fase (F1, F2 con memorie, F5): il reviewer conferma che la fase è completa",
|
|
"F3, F4, ultima CTE di F6, F7 e F8: l'approvazione sostanziale chiude la fase da sola"
|
|
] },
|
|
{ "dot": "emerald", "title": "Fase corrente", "items": [
|
|
"Non è salvata: si calcola ripercorrendo il ledger review_decisions.jsonl",
|
|
"phase_approved avanza solo la fase corrente; phase_reopened riporta indietro"
|
|
] },
|
|
{ "dot": "amber", "title": "Salti automatici", "items": [
|
|
"F2 avanza da sola se non ci sono memorie pertinenti",
|
|
"F6 può essere saltata (phase_skipped) o essere vuota"
|
|
] },
|
|
{ "dot": "rose", "title": "Ritorno indietro", "items": [
|
|
"/torna è disponibile da qualunque fase verso una fase precedente; qui è mostrato da F7 come esempio"
|
|
] }
|
|
]
|
|
}
|