From 58434f406068887291342dece24a55b0887dd86b Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 31 May 2026 11:04:15 -0500 Subject: feat(scripts): add workflow-integrity checker + tests Startup's drift check catches index-vs-directory mismatches. This goes deeper: scripts/workflow-integrity.py runs six checks over the canonical .ai/workflows/: each file is indexed-or-a-plugin-of-an-indexed-engine, each index entry resolves to a file, each .ai/scripts/ reference resolves, each plugin maps to an indexed parent, each non-plugin workflow has an orientation section, and no trigger phrase is claimed by two workflows. Exit 1 on any finding. scripts/tests/workflow-integrity.bats covers the clean canonical state plus a fixture per breakage class. make test already globs scripts/tests/*.bats, so it's wired in. I calibrated against the 38 current workflows (clean). The orientation check accepts the real heading variety (Overview / Purpose / When to Use|Run / Status) and exempts plugins. --- todo.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'todo.org') diff --git a/todo.org b/todo.org index 5f5597b..2535a36 100644 --- a/todo.org +++ b/todo.org @@ -1288,7 +1288,8 @@ Scope: add a shared =.aiignore= file (or =rulesets-ignore.json= if a more struct Keep the lockfile policy explicit: ignored when a local skill dependency cache, tracked when reproducibility matters. -** TODO [#C] Workflow test harness — drift + integrity tests :feature:solo: +** DONE [#C] Workflow test harness — drift + integrity tests :feature:solo: +CLOSED: [2026-05-31 Sun] :PROPERTIES: :CREATED: [2026-05-28 Thu] :LAST_REVIEWED: 2026-05-28 -- cgit v1.2.3