From 1a85069b755559cf754b8add19c9ec834b2bca30 Mon Sep 17 00:00:00 2001 From: Nikolas de Hor Date: Wed, 11 Mar 2026 19:38:13 -0300 Subject: [PATCH] fix: restore validate-workflow as native skill directory The validate-workflow task was accidentally deleted during the XML-to-native-skill refactor in #1864. The schema, handler, and test fixtures still reference it, creating broken invocations. Recreates the task as a native skill directory following the established pattern (SKILL.md + bmad-skill-manifest.yaml + workflow.md), with the original validation logic preserved. Fixes #1530 --- src/core/tasks/validate-workflow/SKILL.md | 6 ++ .../bmad-skill-manifest.yaml | 1 + src/core/tasks/validate-workflow/workflow.md | 88 +++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 src/core/tasks/validate-workflow/SKILL.md create mode 100644 src/core/tasks/validate-workflow/bmad-skill-manifest.yaml create mode 100644 src/core/tasks/validate-workflow/workflow.md diff --git a/src/core/tasks/validate-workflow/SKILL.md b/src/core/tasks/validate-workflow/SKILL.md new file mode 100644 index 000000000..de84743c8 --- /dev/null +++ b/src/core/tasks/validate-workflow/SKILL.md @@ -0,0 +1,6 @@ +--- +name: validate-workflow +description: "Run a checklist against a document with thorough analysis and produce a validation report" +--- + +Follow the instructions in [workflow.md](workflow.md). diff --git a/src/core/tasks/validate-workflow/bmad-skill-manifest.yaml b/src/core/tasks/validate-workflow/bmad-skill-manifest.yaml new file mode 100644 index 000000000..d0f08abdb --- /dev/null +++ b/src/core/tasks/validate-workflow/bmad-skill-manifest.yaml @@ -0,0 +1 @@ +type: skill diff --git a/src/core/tasks/validate-workflow/workflow.md b/src/core/tasks/validate-workflow/workflow.md new file mode 100644 index 000000000..e306c7d46 --- /dev/null +++ b/src/core/tasks/validate-workflow/workflow.md @@ -0,0 +1,88 @@ +# Validate Workflow Output + +**Goal:** Run a checklist against a document with thorough analysis and produce a validation report. + +**Inputs:** + +- **workflow** (required) — Workflow path containing `checklist.md` +- **checklist** (optional) — Checklist to validate against (defaults to the workflow's `checklist.md`) +- **document** (optional) — Document to validate (ask user if not specified) + +## STEPS + +### Step 1: Setup + +- If checklist not provided, load `checklist.md` from the workflow location +- Try to fuzzy-match files similar to the input document name; if document not provided or unsure, ask user: "Which document should I validate?" +- Load both the checklist and document + +### Step 2: Validate (CRITICAL) + +**For EVERY checklist item, WITHOUT SKIPPING ANY:** + +1. Read the requirement carefully +2. Search the document for evidence along with any ancillary loaded documents or artifacts (quotes with line numbers) +3. Analyze deeply — look for explicit AND implied coverage + +**Mark each item as:** + +- **PASS** `✓` — Requirement fully met (provide evidence) +- **PARTIAL** `⚠` — Some coverage but incomplete (explain gaps) +- **FAIL** `✗` — Not met or severely deficient (explain why) +- **N/A** `➖` — Not applicable (explain reason) + +**DO NOT SKIP ANY SECTIONS OR ITEMS.** + +### Step 3: Generate Report + +Create `validation-report-{timestamp}.md` in the document's folder with the following format: + +```markdown +# Validation Report + +**Document:** {document-path} +**Checklist:** {checklist-path} +**Date:** {timestamp} + +## Summary + +- Overall: X/Y passed (Z%) +- Critical Issues: {count} + +## Section Results + +### {Section Name} + +Pass Rate: X/Y (Z%) + +[MARK] {Item description} +Evidence: {Quote with line# or explanation} +{If FAIL/PARTIAL: Impact: {why this matters}} + +## Failed Items + +{All ✗ items with recommendations} + +## Partial Items + +{All ⚠ items with what's missing} + +## Recommendations + +1. Must Fix: {critical failures} +2. Should Improve: {important gaps} +3. Consider: {minor improvements} +``` + +### Step 4: Summary for User + +- Present section-by-section summary +- Highlight all critical issues +- Provide path to saved report +- **HALT** — do not continue unless user asks + +## HALT CONDITIONS + +- HALT after presenting summary in Step 4 +- HALT with error if no checklist is found and none is provided +- HALT with error if no document is found and user does not specify one