From 3640664e0fa11d7eb99c2900df57734b411e2d2b Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 31 May 2026 11:31:44 -0500 Subject: refactor(workflows): restructure startup and triage-intake into reading lanes I split each into lanes so a reader can stop at the level that answers the question: Summary for "what does this do and what does it produce", Execution for the steps to follow, Reference for examples and edge cases, History for old decisions. Both files are large enough that an agent loading them at routing time pays for context it doesn't need yet. startup.org keeps Summary, Execution, and Reference (workflow discovery and common mistakes moved under Reference). triage-intake.org gets all four, including a History lane for its design notes. Every instruction is preserved. The triage reorder ran through a content-preservation check that compared the multiset of content lines before and after, so only heading depth and lane grouping moved. Nothing was dropped or reworded. workflow-integrity.py now counts "Summary" as a valid orientation heading, since that's the new top section both files lead with. This is the pilot from the codex backlog, scoped to the two largest workflows. Whether the lanes actually cut session token use gets evaluated before any wider rollout. --- scripts/workflow-integrity.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'scripts/workflow-integrity.py') diff --git a/scripts/workflow-integrity.py b/scripts/workflow-integrity.py index fa33c4c..3ac1b3d 100755 --- a/scripts/workflow-integrity.py +++ b/scripts/workflow-integrity.py @@ -15,7 +15,7 @@ Checks: to a real file under the canonical scripts dir. 4. plugin-parent every engine.plugin.org maps to an indexed engine. 5. orientation every non-plugin workflow has an orientation section - (Overview / Purpose / When to Use|Run / Status). + (Overview / Summary / Purpose / When to Use|Run / Status). 6. trigger-uniqueness no trigger phrase is claimed by two different workflows. Exit 0 when clean, 1 when any check fails, 2 on bad usage. @@ -36,8 +36,9 @@ CATALOG_RE = re.compile(r"^- =([A-Za-z0-9._-]+\.org)= ", re.M) PLUGIN_RE = re.compile(r"^(.+)\.[^.]+\.org$") # engine.plugin.org SCRIPT_REF_RE = re.compile(r"\.ai/scripts/([A-Za-z0-9][A-Za-z0-9._/-]*)") QUOTED_RE = re.compile(r'"([^"]+)"') -ORIENTATION_RE = re.compile(r"^\* (overview|purpose|when to use|when to run|status)\b", - re.M | re.I) +ORIENTATION_RE = re.compile( + r"^\* (overview|summary|quick contract|purpose|when to use|when to run|status)\b", + re.M | re.I) def catalog_entries(index_text: str) -> set[str]: @@ -124,7 +125,7 @@ def check(workflows_dir: Path) -> list[str]: text = (workflows_dir / w).read_text(encoding="utf-8") if not ORIENTATION_RE.search(text): findings.append(f"[missing-section] {w}: no orientation section " - "(Overview / Purpose / When to Use|Run / Status)") + "(Overview / Summary / Purpose / When to Use|Run / Status)") # 6. trigger-uniqueness for phrase, owners in sorted(trigger_map(index_text).items()): -- cgit v1.2.3