From 808bdff568e982358e0b700c6ba31574a10853dc Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Wed, 22 Apr 2026 21:46:53 -0500 Subject: [PATCH 1/3] feat(workflows): adopt customize.toml pattern for testarch workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the workflow customization surface to all 9 testarch workflows (8 bmad-testarch-* + bmad-teach-me-testing), mirroring the rollout shipped for the bmad-tea agent and the GDS workflows in bmad-code-org/bmad-module-game-dev-studio#23. For each workflow: - Add customize.toml with [workflow] block exposing activation_steps_prepend / activation_steps_append, persistent_facts (defaults to file:{project-root}/**/project-context.md), and on_complete. - Merge workflow.md into SKILL.md as the single source of truth and delete workflow.md. The new SKILL.md carries Goal/Role, Conventions, a 6-step On Activation block (resolve customization → prepend → persistent_facts → load _bmad/tea/config.yaml → greet → append), Workflow Architecture, Mode Determination, and routing. - Wire the workflow.on_complete resolver into the terminal step file of every mode (steps-c, steps-v, steps-e) so the hook fires regardless of which mode the user runs — same multi-terminal pattern used for gds-sprint-status in the GDS rollout. workflow.yaml is left intact: it carries installation/registry metadata (required_tools, tags, execution_hints) that is a separate concern from the runtime customization surface. Update test/test-installation-components.js to validate the new pattern: customize.toml exists with the expected keys, SKILL.md drives activation through the resolver script, and workflow.md is removed. --- .../testarch/bmad-teach-me-testing/SKILL.md | 122 +++++++++++++++++- .../bmad-teach-me-testing/customize.toml | 41 ++++++ .../steps-c/step-05-completion.md | 6 + .../steps-e/step-e-02-apply-edits.md | 6 + .../steps-v/step-v-01-validate.md | 6 + .../bmad-teach-me-testing/workflow.md | 98 -------------- .../testarch/bmad-testarch-atdd/SKILL.md | 78 ++++++++++- .../bmad-testarch-atdd/customize.toml | 41 ++++++ .../steps-c/step-05-validate-and-complete.md | 6 + .../steps-e/step-02-apply-edit.md | 6 + .../steps-v/step-01-validate.md | 6 + .../testarch/bmad-testarch-atdd/workflow.md | 49 ------- .../testarch/bmad-testarch-automate/SKILL.md | 78 ++++++++++- .../bmad-testarch-automate/customize.toml | 41 ++++++ .../steps-c/step-04-validate-and-summarize.md | 6 + .../steps-e/step-02-apply-edit.md | 6 + .../steps-v/step-01-validate.md | 6 + .../bmad-testarch-automate/workflow.md | 49 ------- .../testarch/bmad-testarch-ci/SKILL.md | 78 ++++++++++- .../testarch/bmad-testarch-ci/customize.toml | 41 ++++++ .../steps-c/step-04-validate-and-summary.md | 6 + .../steps-e/step-02-apply-edit.md | 6 + .../steps-v/step-01-validate.md | 6 + .../testarch/bmad-testarch-ci/workflow.md | 49 ------- .../testarch/bmad-testarch-framework/SKILL.md | 78 ++++++++++- .../bmad-testarch-framework/customize.toml | 41 ++++++ .../steps-c/step-05-validate-and-summary.md | 6 + .../steps-e/step-02-apply-edit.md | 6 + .../steps-v/step-01-validate.md | 6 + .../bmad-testarch-framework/workflow.md | 49 ------- .../testarch/bmad-testarch-nfr/SKILL.md | 78 ++++++++++- .../testarch/bmad-testarch-nfr/customize.toml | 41 ++++++ .../steps-c/step-05-generate-report.md | 6 + .../steps-e/step-02-apply-edit.md | 6 + .../steps-v/step-01-validate.md | 6 + .../testarch/bmad-testarch-nfr/workflow.md | 49 ------- .../bmad-testarch-test-design/SKILL.md | 80 +++++++++++- .../bmad-testarch-test-design/customize.toml | 41 ++++++ .../steps-c/step-05-generate-output.md | 6 + .../steps-e/step-02-apply-edit.md | 6 + .../steps-v/step-01-validate.md | 6 + .../bmad-testarch-test-design/workflow.md | 51 -------- .../bmad-testarch-test-review/SKILL.md | 78 ++++++++++- .../bmad-testarch-test-review/customize.toml | 41 ++++++ .../steps-c/step-04-generate-report.md | 6 + .../steps-e/step-02-apply-edit.md | 6 + .../steps-v/step-01-validate.md | 6 + .../bmad-testarch-test-review/workflow.md | 49 ------- .../testarch/bmad-testarch-trace/SKILL.md | 80 +++++++++++- .../bmad-testarch-trace/customize.toml | 41 ++++++ .../steps-c/step-05-gate-decision.md | 6 + .../steps-e/step-02-apply-edit.md | 6 + .../steps-v/step-01-validate.md | 6 + .../testarch/bmad-testarch-trace/workflow.md | 51 -------- test/test-installation-components.js | 50 ++++--- 55 files changed, 1275 insertions(+), 550 deletions(-) create mode 100644 src/workflows/testarch/bmad-teach-me-testing/customize.toml delete mode 100644 src/workflows/testarch/bmad-teach-me-testing/workflow.md create mode 100644 src/workflows/testarch/bmad-testarch-atdd/customize.toml delete mode 100644 src/workflows/testarch/bmad-testarch-atdd/workflow.md create mode 100644 src/workflows/testarch/bmad-testarch-automate/customize.toml delete mode 100644 src/workflows/testarch/bmad-testarch-automate/workflow.md create mode 100644 src/workflows/testarch/bmad-testarch-ci/customize.toml delete mode 100644 src/workflows/testarch/bmad-testarch-ci/workflow.md create mode 100644 src/workflows/testarch/bmad-testarch-framework/customize.toml delete mode 100644 src/workflows/testarch/bmad-testarch-framework/workflow.md create mode 100644 src/workflows/testarch/bmad-testarch-nfr/customize.toml delete mode 100644 src/workflows/testarch/bmad-testarch-nfr/workflow.md create mode 100644 src/workflows/testarch/bmad-testarch-test-design/customize.toml delete mode 100644 src/workflows/testarch/bmad-testarch-test-design/workflow.md create mode 100644 src/workflows/testarch/bmad-testarch-test-review/customize.toml delete mode 100644 src/workflows/testarch/bmad-testarch-test-review/workflow.md create mode 100644 src/workflows/testarch/bmad-testarch-trace/customize.toml delete mode 100644 src/workflows/testarch/bmad-testarch-trace/workflow.md diff --git a/src/workflows/testarch/bmad-teach-me-testing/SKILL.md b/src/workflows/testarch/bmad-teach-me-testing/SKILL.md index ecfd2d4..fe6338b 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/SKILL.md +++ b/src/workflows/testarch/bmad-teach-me-testing/SKILL.md @@ -3,13 +3,127 @@ name: bmad-teach-me-testing description: 'Teach testing progressively through structured sessions. Use when user says "lets learn testing" or "I want to study test practices"' --- +# Teach Me Testing — TEA Academy + +**Goal:** Provide self-paced, multi-session learning that teaches testing fundamentals through advanced practices, scalable to entire teams without requiring instructor time. + +**Role:** In addition to your name, communication_style, and persona, you are also a Master Test Architect and Teaching Guide collaborating with learners at all levels. This is a partnership, not a lecture. You bring expertise in TEA methodology, testing principles, and teaching pedagogy, while the learner brings their role context, experience, and learning goals. Work together to build their testing knowledge progressively. + +**Meta-Context:** This workflow uses continuable architecture with state persistence across sessions. Users can pause and resume anytime, jump to any session based on experience, and learn at their own pace over 1-2 weeks. + +You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. + ## Conventions -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. +- Bare paths (e.g. `instructions.md`) resolve from the skill root. +- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives). +- `{project-root}`-prefixed paths resolve from the project working directory. +- `{skill-name}` resolves to the skill directory's basename. +- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`. ## On Activation -Read `{skill-root}/workflow.md` and follow it exactly. +### Step 1: Resolve the Workflow Block + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` + +**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: + +1. `{skill-root}/customize.toml` — defaults +2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides +3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides + +Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. + +### Step 2: Execute Prepend Steps + +Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding. + +### Step 3: Load Persistent Facts + +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. + +### Step 4: Load Config + +Load config from `{project-root}/_bmad/tea/config.yaml` and resolve: + +- `user_name` +- `project_name` +- `communication_language` +- `test_artifacts` + +### Step 5: Greet the User + +Greet `{user_name}`, speaking in `{communication_language}`. + +### Step 6: Execute Append Steps + +Execute each entry in `{workflow.activation_steps_append}` in order. + +Activation is complete. Begin the workflow below. + +## Workflow Architecture + +This uses **step-file architecture** for disciplined execution: + +### Core Principles + +- **Micro-file Design**: Each step is a self-contained instruction file that is part of an overall workflow that must be followed exactly +- **Just-In-Time Loading**: Only the current step file is in memory — never load future step files until told to do so +- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed +- **State Tracking**: Document progress in progress file using `stepsCompleted` array and session tracking +- **Continuable Sessions**: Users can pause after any session and resume later with full context preserved +- **Tri-Modal Structure**: Separate step folders for Create (steps-c/), Edit (steps-e/), and Validate (steps-v/) modes + +### Step Processing Rules + +1. **READ COMPLETELY**: Always read the entire step file before taking any action +2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate +3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection +4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue) +5. **SAVE STATE**: Update `stepsCompleted` and session tracking in progress file before loading next step +6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file + +### Critical Rules (NO EXCEPTIONS) + +- 🛑 **NEVER** load multiple step files simultaneously +- 📖 **ALWAYS** read entire step file before execution +- 🚫 **NEVER** skip steps or optimize the sequence +- 💾 **ALWAYS** update progress file after each session completion +- 🎯 **ALWAYS** follow the exact instructions in the step file +- ⏸️ **ALWAYS** halt at menus and wait for user input +- 📋 **NEVER** create mental todo lists from future steps +- ✅ **ALWAYS** communicate in `{communication_language}` + +## Initialization Sequence + +### 1. Mode Determination + +**Check if mode was specified in the command invocation:** + +- If user invoked with "create" or "teach" or "learn" or "start" → Set mode to **create** +- If user invoked with "validate" or "review" or "-v" or "--validate" → Set mode to **validate** +- If user invoked with "edit" or "modify" or "-e" or "--edit" → Set mode to **edit** + +**If mode is still unclear, ask user:** + +"Welcome to TEA Academy! What would you like to do? + +**[C]reate** — Start learning sessions (new or continue existing progress) +**[V]alidate** — Review workflow quality and generate validation report +**[E]dit** — Modify workflow content or structure + +Please select: [C]reate / [V]alidate / [E]dit" + +### 2. Route to First Step + +**IF mode == create:** +Load, read the full file, and then execute `{skill-root}/steps-c/step-01-init.md` to begin the teaching workflow. + +**IF mode == validate:** +Prompt for workflow path (if validating the workflow itself): "Which workflow would you like to validate?" +Then load, read the full file, and then execute `{skill-root}/steps-v/step-v-01-validate.md`. -When `workflow.md`, step files, templates, or checklists reference sibling files with relative paths such as `steps-c/...`, `./instructions.md`, or `templates/...`, resolve them from `{skill-root}`, not from the workspace root. +**IF mode == edit:** +Prompt for what to edit: "What would you like to edit in the teaching workflow?" +Then load, read the full file, and then execute `{skill-root}/steps-e/step-e-01-assess-workflow.md`. diff --git a/src/workflows/testarch/bmad-teach-me-testing/customize.toml b/src/workflows/testarch/bmad-teach-me-testing/customize.toml new file mode 100644 index 0000000..dad3d3e --- /dev/null +++ b/src/workflows/testarch/bmad-teach-me-testing/customize.toml @@ -0,0 +1,41 @@ +# DO NOT EDIT -- overwritten on every update. +# +# Workflow customization surface for bmad-teach-me-testing. Mirrors the +# agent customization shape under the [workflow] namespace. + +[workflow] + +# --- Configurable below. Overrides merge per BMad structural rules: --- +# scalars: override wins • arrays (persistent_facts, activation_steps_*): append +# arrays-of-tables with `code`/`id`: replace matching items, append new ones. + +# Steps to run before the standard activation (config load, greet). +# Overrides append. Use for pre-flight loads, compliance checks, etc. + +activation_steps_prepend = [] + +# Steps to run after greet but before the workflow begins. +# Overrides append. Use for context-heavy setup that should happen +# once the user has been acknowledged. + +activation_steps_append = [] + +# Persistent facts the workflow keeps in mind for the whole run +# (testing standards, framework conventions, learning objectives). +# Distinct from the runtime memory sidecar — these are static context +# loaded on activation. Overrides append. +# +# Each entry is either: +# - a literal sentence, e.g. "Every test must run deterministically in CI." +# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" +# (glob patterns are supported; the file's contents are loaded and treated as facts). + +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] + +# Scalar: executed when the workflow reaches its terminal step in any +# mode (create, validate, edit), after the final outputs are produced. +# Override wins. Leave empty for no custom post-completion behavior. + +on_complete = "" diff --git a/src/workflows/testarch/bmad-teach-me-testing/steps-c/step-05-completion.md b/src/workflows/testarch/bmad-teach-me-testing/steps-c/step-05-completion.md index f030134..64fef7a 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/steps-c/step-05-completion.md +++ b/src/workflows/testarch/bmad-teach-me-testing/steps-c/step-05-completion.md @@ -337,3 +337,9 @@ Workflow ends here. User can run the workflow again to re-take sessions or explo - Proceeding to next step (this is final - no next step) **Master Rule:** Verify completion, generate certificate, celebrate achievement, end workflow. This is the finale. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-02-apply-edits.md b/src/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-02-apply-edits.md index 92555fc..fa30c49 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-02-apply-edits.md +++ b/src/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-02-apply-edits.md @@ -120,3 +120,9 @@ The teach-me-testing workflow has been updated. ✅ Edits applied to approved files only, changes validated, workflow integrity maintained, user informed of modifications. **Master Rule:** Show changes, get approval, apply edits, validate integrity. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-teach-me-testing/steps-v/step-v-01-validate.md b/src/workflows/testarch/bmad-teach-me-testing/steps-v/step-v-01-validate.md index 1ad253b..648ece1 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/steps-v/step-v-01-validate.md +++ b/src/workflows/testarch/bmad-teach-me-testing/steps-v/step-v-01-validate.md @@ -261,3 +261,9 @@ Workflow is usable but could be improved. ✅ All validation checks run, comprehensive report generated, issues identified with remediation guidance, overall status determined. **Master Rule:** Check everything systematically, report findings clearly, provide actionable remediation. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-teach-me-testing/workflow.md b/src/workflows/testarch/bmad-teach-me-testing/workflow.md deleted file mode 100644 index d2db62e..0000000 --- a/src/workflows/testarch/bmad-teach-me-testing/workflow.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -name: bmad-teach-me-testing -description: 'Teach testing progressively through structured sessions. Use when user says "lets learn testing" or "I want to study test practices"' -web_bundle: true ---- - -# Teach Me Testing - TEA Academy - -**Goal:** Provide self-paced, multi-session learning that teaches testing fundamentals through advanced practices, scalable to entire teams without requiring instructor time. - -**Your Role:** In addition to your name, communication_style, and persona, you are also a Master Test Architect and Teaching Guide collaborating with learners at all levels. This is a partnership, not a lecture. You bring expertise in TEA methodology, testing principles, and teaching pedagogy, while the learner brings their role context, experience, and learning goals. Work together to build their testing knowledge progressively. - -**Meta-Context:** This workflow uses continuable architecture with state persistence across sessions. Users can pause and resume anytime, jump to any session based on experience, and learn at their own pace over 1-2 weeks. - ---- - -## PATH RESOLUTION - -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. -- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root. - ---- - -## WORKFLOW ARCHITECTURE - -This uses **step-file architecture** for disciplined execution: - -### Core Principles - -- **Micro-file Design**: Each step is a self-contained instruction file that is part of an overall workflow that must be followed exactly -- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until told to do so -- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed -- **State Tracking**: Document progress in progress file using `stepsCompleted` array and session tracking -- **Continuable Sessions**: Users can pause after any session and resume later with full context preserved -- **Tri-Modal Structure**: Separate step folders for Create (steps-c/), Edit (steps-e/), and Validate (steps-v/) modes - -### Step Processing Rules - -1. **READ COMPLETELY**: Always read the entire step file before taking any action -2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate -3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection -4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue) -5. **SAVE STATE**: Update `stepsCompleted` and session tracking in progress file before loading next step -6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file - -### Critical Rules (NO EXCEPTIONS) - -- 🛑 **NEVER** load multiple step files simultaneously -- 📖 **ALWAYS** read entire step file before execution -- 🚫 **NEVER** skip steps or optimize the sequence -- 💾 **ALWAYS** update progress file after each session completion -- 🎯 **ALWAYS** follow the exact instructions in the step file -- ⏸️ **ALWAYS** halt at menus and wait for user input -- 📋 **NEVER** create mental todo lists from future steps -- ✅ **ALWAYS** communicate in {communication_language} - ---- - -## INITIALIZATION SEQUENCE - -### 1. Configuration Loading - -Load and read full config from {project-root}/\_bmad/tea/config.yaml (or module config if TEA module installed) and resolve: - -- `project_name`, `user_name`, `communication_language`, `test_artifacts` -- TEA module variables: `test_artifacts` (base output folder for test-related artifacts) - -### 2. Mode Determination - -**Check if mode was specified in the command invocation:** - -- If user invoked with "create" or "teach" or "learn" or "start" → Set mode to **create** -- If user invoked with "validate" or "review" or "-v" or "--validate" → Set mode to **validate** -- If user invoked with "edit" or "modify" or "-e" or "--edit" → Set mode to **edit** - -**If mode is still unclear, ask user:** - -"Welcome to TEA Academy! What would you like to do? - -**[C]reate** - Start learning sessions (new or continue existing progress) -**[V]alidate** - Review workflow quality and generate validation report -**[E]dit** - Modify workflow content or structure - -Please select: [C]reate / [V]alidate / [E]dit" - -### 3. Route to First Step - -**IF mode == create:** -Load, read the full file and then execute `{skill-root}/steps-c/step-01-init.md` to begin the teaching workflow. - -**IF mode == validate:** -Prompt for workflow path (if validating the workflow itself): "Which workflow would you like to validate?" -Then load, read the full file and then execute `{skill-root}/steps-v/step-v-01-validate.md` - -**IF mode == edit:** -Prompt for what to edit: "What would you like to edit in the teaching workflow?" -Then load, read the full file and then execute `{skill-root}/steps-e/step-e-01-assess-workflow.md` diff --git a/src/workflows/testarch/bmad-testarch-atdd/SKILL.md b/src/workflows/testarch/bmad-testarch-atdd/SKILL.md index 7559fe3..a9ffdb0 100644 --- a/src/workflows/testarch/bmad-testarch-atdd/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-atdd/SKILL.md @@ -3,13 +3,83 @@ name: bmad-testarch-atdd description: 'Generate red-phase acceptance test scaffolds using the TDD cycle. Use when the user says "lets write acceptance tests" or "I want to do ATDD"' --- +# Acceptance Test-Driven Development (ATDD) + +**Goal:** Generate red-phase acceptance test scaffolds before implementation using TDD red-green-refactor cycle. + +**Role:** You are the Master Test Architect. + +You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. + ## Conventions -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. +- Bare paths (e.g. `instructions.md`) resolve from the skill root. +- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives). +- `{project-root}`-prefixed paths resolve from the project working directory. +- `{skill-name}` resolves to the skill directory's basename. +- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`. ## On Activation -Read `{skill-root}/workflow.md` and follow it exactly. +### Step 1: Resolve the Workflow Block + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` + +**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: + +1. `{skill-root}/customize.toml` — defaults +2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides +3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides + +Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. + +### Step 2: Execute Prepend Steps + +Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding. + +### Step 3: Load Persistent Facts + +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. + +### Step 4: Load Config + +Load config from `{project-root}/_bmad/tea/config.yaml` and resolve: + +- `user_name` +- `communication_language` + +### Step 5: Greet the User + +Greet `{user_name}`, speaking in `{communication_language}`. + +### Step 6: Execute Append Steps + +Execute each entry in `{workflow.activation_steps_append}` in order. + +Activation is complete. Begin the workflow below. + +## Workflow Architecture + +This workflow uses **tri-modal step-file architecture**: + +- **Create mode (steps-c/)**: primary execution flow +- **Validate mode (steps-v/)**: validation against checklist +- **Edit mode (steps-e/)**: revise existing outputs + +## Initialization Sequence + +### 1. Mode Determination + +"Welcome to the workflow. What would you like to do?" + +- **[C] Create** — Run the workflow +- **[R] Resume** — Resume an interrupted workflow +- **[V] Validate** — Validate existing outputs +- **[E] Edit** — Edit existing outputs + +### 2. Route to First Step -When `workflow.md`, step files, templates, or checklists reference sibling files with relative paths such as `steps-c/...`, `./instructions.md`, or `templates/...`, resolve them from `{skill-root}`, not from the workspace root. +- **If C:** Load `{skill-root}/steps-c/step-01-preflight-and-context.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` +- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-atdd/customize.toml b/src/workflows/testarch/bmad-testarch-atdd/customize.toml new file mode 100644 index 0000000..c97c0d7 --- /dev/null +++ b/src/workflows/testarch/bmad-testarch-atdd/customize.toml @@ -0,0 +1,41 @@ +# DO NOT EDIT -- overwritten on every update. +# +# Workflow customization surface for bmad-testarch-atdd. Mirrors the +# agent customization shape under the [workflow] namespace. + +[workflow] + +# --- Configurable below. Overrides merge per BMad structural rules: --- +# scalars: override wins • arrays (persistent_facts, activation_steps_*): append +# arrays-of-tables with `code`/`id`: replace matching items, append new ones. + +# Steps to run before the standard activation (config load, greet). +# Overrides append. Use for pre-flight loads, compliance checks, etc. + +activation_steps_prepend = [] + +# Steps to run after greet but before the workflow begins. +# Overrides append. Use for context-heavy setup that should happen +# once the user has been acknowledged. + +activation_steps_append = [] + +# Persistent facts the workflow keeps in mind for the whole run +# (testing standards, framework conventions, compliance constraints). +# Distinct from the runtime memory sidecar — these are static context +# loaded on activation. Overrides append. +# +# Each entry is either: +# - a literal sentence, e.g. "Every test must run deterministically in CI." +# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" +# (glob patterns are supported; the file's contents are loaded and treated as facts). + +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] + +# Scalar: executed when the workflow reaches its terminal step in any +# mode (create, validate, edit), after the final outputs are produced. +# Override wins. Leave empty for no custom post-completion behavior. + +on_complete = "" diff --git a/src/workflows/testarch/bmad-testarch-atdd/steps-c/step-05-validate-and-complete.md b/src/workflows/testarch/bmad-testarch-atdd/steps-c/step-05-validate-and-complete.md index 8ce2c69..dda6817 100644 --- a/src/workflows/testarch/bmad-testarch-atdd/steps-c/step-05-validate-and-complete.md +++ b/src/workflows/testarch/bmad-testarch-atdd/steps-c/step-05-validate-and-complete.md @@ -113,3 +113,9 @@ Report: - Skipped sequence steps or missing outputs **Master Rule:** Skipping steps is FORBIDDEN. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-atdd/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-atdd/steps-e/step-02-apply-edit.md index 77f808f..2fb0ad0 100644 --- a/src/workflows/testarch/bmad-testarch-atdd/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-atdd/steps-e/step-02-apply-edit.md @@ -58,3 +58,9 @@ Summarize the edits applied. ### ❌ SYSTEM FAILURE: - Unconfirmed edits or missing update + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-atdd/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-atdd/steps-v/step-01-validate.md index ee5fb34..8319fd0 100644 --- a/src/workflows/testarch/bmad-testarch-atdd/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-atdd/steps-v/step-01-validate.md @@ -65,3 +65,9 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. - Skipped checklist items - No report produced + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-atdd/workflow.md b/src/workflows/testarch/bmad-testarch-atdd/workflow.md deleted file mode 100644 index 7382d54..0000000 --- a/src/workflows/testarch/bmad-testarch-atdd/workflow.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: bmad-testarch-atdd -description: Generate red-phase acceptance test scaffolds using TDD cycle. Use when user says 'lets write acceptance tests' or 'I want to do ATDD' -web_bundle: true ---- - -# Acceptance Test-Driven Development (ATDD) - -**Goal:** Generate red-phase acceptance test scaffolds before implementation using TDD red-green-refactor cycle - -**Role:** You are the Master Test Architect. - ---- - -## PATH RESOLUTION - -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. -- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root. - ---- - -## WORKFLOW ARCHITECTURE - -This workflow uses **tri-modal step-file architecture**: - -- **Create mode (steps-c/)**: primary execution flow -- **Validate mode (steps-v/)**: validation against checklist -- **Edit mode (steps-e/)**: revise existing outputs - ---- - -## INITIALIZATION SEQUENCE - -### 1. Mode Determination - -"Welcome to the workflow. What would you like to do?" - -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow -- **[V] Validate** — Validate existing outputs -- **[E] Edit** — Edit existing outputs - -### 2. Route to First Step - -- **If C:** Load `{skill-root}/steps-c/step-01-preflight-and-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` -- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` -- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-automate/SKILL.md b/src/workflows/testarch/bmad-testarch-automate/SKILL.md index e66e2b9..e71677b 100644 --- a/src/workflows/testarch/bmad-testarch-automate/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-automate/SKILL.md @@ -3,13 +3,83 @@ name: bmad-testarch-automate description: 'Expand test automation coverage for codebase. Use when user says "lets expand test coverage" or "I want to automate tests"' --- +# Test Automation Expansion + +**Goal:** Expand test automation coverage after implementation or analyze existing codebase to generate a comprehensive test suite. + +**Role:** You are the Master Test Architect. + +You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. + ## Conventions -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. +- Bare paths (e.g. `instructions.md`) resolve from the skill root. +- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives). +- `{project-root}`-prefixed paths resolve from the project working directory. +- `{skill-name}` resolves to the skill directory's basename. +- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`. ## On Activation -Read `{skill-root}/workflow.md` and follow it exactly. +### Step 1: Resolve the Workflow Block + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` + +**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: + +1. `{skill-root}/customize.toml` — defaults +2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides +3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides + +Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. + +### Step 2: Execute Prepend Steps + +Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding. + +### Step 3: Load Persistent Facts + +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. + +### Step 4: Load Config + +Load config from `{project-root}/_bmad/tea/config.yaml` and resolve: + +- `user_name` +- `communication_language` + +### Step 5: Greet the User + +Greet `{user_name}`, speaking in `{communication_language}`. + +### Step 6: Execute Append Steps + +Execute each entry in `{workflow.activation_steps_append}` in order. + +Activation is complete. Begin the workflow below. + +## Workflow Architecture + +This workflow uses **tri-modal step-file architecture**: + +- **Create mode (steps-c/)**: primary execution flow +- **Validate mode (steps-v/)**: validation against checklist +- **Edit mode (steps-e/)**: revise existing outputs + +## Initialization Sequence + +### 1. Mode Determination + +"Welcome to the workflow. What would you like to do?" + +- **[C] Create** — Run the workflow +- **[R] Resume** — Resume an interrupted workflow +- **[V] Validate** — Validate existing outputs +- **[E] Edit** — Edit existing outputs + +### 2. Route to First Step -When `workflow.md`, step files, templates, or checklists reference sibling files with relative paths such as `steps-c/...`, `./instructions.md`, or `templates/...`, resolve them from `{skill-root}`, not from the workspace root. +- **If C:** Load `{skill-root}/steps-c/step-01-preflight-and-context.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` +- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-automate/customize.toml b/src/workflows/testarch/bmad-testarch-automate/customize.toml new file mode 100644 index 0000000..4d14d99 --- /dev/null +++ b/src/workflows/testarch/bmad-testarch-automate/customize.toml @@ -0,0 +1,41 @@ +# DO NOT EDIT -- overwritten on every update. +# +# Workflow customization surface for bmad-testarch-automate. Mirrors the +# agent customization shape under the [workflow] namespace. + +[workflow] + +# --- Configurable below. Overrides merge per BMad structural rules: --- +# scalars: override wins • arrays (persistent_facts, activation_steps_*): append +# arrays-of-tables with `code`/`id`: replace matching items, append new ones. + +# Steps to run before the standard activation (config load, greet). +# Overrides append. Use for pre-flight loads, compliance checks, etc. + +activation_steps_prepend = [] + +# Steps to run after greet but before the workflow begins. +# Overrides append. Use for context-heavy setup that should happen +# once the user has been acknowledged. + +activation_steps_append = [] + +# Persistent facts the workflow keeps in mind for the whole run +# (testing standards, framework conventions, compliance constraints). +# Distinct from the runtime memory sidecar — these are static context +# loaded on activation. Overrides append. +# +# Each entry is either: +# - a literal sentence, e.g. "Every test must run deterministically in CI." +# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" +# (glob patterns are supported; the file's contents are loaded and treated as facts). + +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] + +# Scalar: executed when the workflow reaches its terminal step in any +# mode (create, validate, edit), after the final outputs are produced. +# Override wins. Leave empty for no custom post-completion behavior. + +on_complete = "" diff --git a/src/workflows/testarch/bmad-testarch-automate/steps-c/step-04-validate-and-summarize.md b/src/workflows/testarch/bmad-testarch-automate/steps-c/step-04-validate-and-summarize.md index e40c51c..ac79d63 100644 --- a/src/workflows/testarch/bmad-testarch-automate/steps-c/step-04-validate-and-summarize.md +++ b/src/workflows/testarch/bmad-testarch-automate/steps-c/step-04-validate-and-summarize.md @@ -104,3 +104,9 @@ Write `{outputFile}` including: - Skipped sequence steps or missing outputs **Master Rule:** Skipping steps is FORBIDDEN. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-automate/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-automate/steps-e/step-02-apply-edit.md index 77f808f..2fb0ad0 100644 --- a/src/workflows/testarch/bmad-testarch-automate/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-automate/steps-e/step-02-apply-edit.md @@ -58,3 +58,9 @@ Summarize the edits applied. ### ❌ SYSTEM FAILURE: - Unconfirmed edits or missing update + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-automate/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-automate/steps-v/step-01-validate.md index 90aa08d..8e9e268 100644 --- a/src/workflows/testarch/bmad-testarch-automate/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-automate/steps-v/step-01-validate.md @@ -65,3 +65,9 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. - Skipped checklist items - No report produced + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-automate/workflow.md b/src/workflows/testarch/bmad-testarch-automate/workflow.md deleted file mode 100644 index 7df92dc..0000000 --- a/src/workflows/testarch/bmad-testarch-automate/workflow.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: bmad-testarch-automate -description: Expand test automation coverage for codebase. Use when user says 'lets expand test coverage' or 'I want to automate tests' -web_bundle: true ---- - -# Test Automation Expansion - -**Goal:** Expand test automation coverage after implementation or analyze existing codebase to generate comprehensive test suite - -**Role:** You are the Master Test Architect. - ---- - -## PATH RESOLUTION - -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. -- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root. - ---- - -## WORKFLOW ARCHITECTURE - -This workflow uses **tri-modal step-file architecture**: - -- **Create mode (steps-c/)**: primary execution flow -- **Validate mode (steps-v/)**: validation against checklist -- **Edit mode (steps-e/)**: revise existing outputs - ---- - -## INITIALIZATION SEQUENCE - -### 1. Mode Determination - -"Welcome to the workflow. What would you like to do?" - -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow -- **[V] Validate** — Validate existing outputs -- **[E] Edit** — Edit existing outputs - -### 2. Route to First Step - -- **If C:** Load `{skill-root}/steps-c/step-01-preflight-and-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` -- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` -- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-ci/SKILL.md b/src/workflows/testarch/bmad-testarch-ci/SKILL.md index 93123d1..7b17cd5 100644 --- a/src/workflows/testarch/bmad-testarch-ci/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-ci/SKILL.md @@ -3,13 +3,83 @@ name: bmad-testarch-ci description: 'Scaffold CI/CD quality pipeline with test execution. Use when the user says "lets setup CI pipeline" or "I want to create quality gates"' --- +# CI/CD Pipeline Setup + +**Goal:** Scaffold CI/CD quality pipeline with test execution, burn-in loops, and artifact collection. + +**Role:** You are the Master Test Architect. + +You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. + ## Conventions -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. +- Bare paths (e.g. `instructions.md`) resolve from the skill root. +- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives). +- `{project-root}`-prefixed paths resolve from the project working directory. +- `{skill-name}` resolves to the skill directory's basename. +- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`. ## On Activation -Read `{skill-root}/workflow.md` and follow it exactly. +### Step 1: Resolve the Workflow Block + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` + +**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: + +1. `{skill-root}/customize.toml` — defaults +2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides +3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides + +Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. + +### Step 2: Execute Prepend Steps + +Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding. + +### Step 3: Load Persistent Facts + +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. + +### Step 4: Load Config + +Load config from `{project-root}/_bmad/tea/config.yaml` and resolve: + +- `user_name` +- `communication_language` + +### Step 5: Greet the User + +Greet `{user_name}`, speaking in `{communication_language}`. + +### Step 6: Execute Append Steps + +Execute each entry in `{workflow.activation_steps_append}` in order. + +Activation is complete. Begin the workflow below. + +## Workflow Architecture + +This workflow uses **tri-modal step-file architecture**: + +- **Create mode (steps-c/)**: primary execution flow +- **Validate mode (steps-v/)**: validation against checklist +- **Edit mode (steps-e/)**: revise existing outputs + +## Initialization Sequence + +### 1. Mode Determination + +"Welcome to the workflow. What would you like to do?" + +- **[C] Create** — Run the workflow +- **[R] Resume** — Resume an interrupted workflow +- **[V] Validate** — Validate existing outputs +- **[E] Edit** — Edit existing outputs + +### 2. Route to First Step -When `workflow.md`, step files, templates, or checklists reference sibling files with relative paths such as `steps-c/...`, `./instructions.md`, or `templates/...`, resolve them from `{skill-root}`, not from the workspace root. +- **If C:** Load `{skill-root}/steps-c/step-01-preflight.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` +- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-ci/customize.toml b/src/workflows/testarch/bmad-testarch-ci/customize.toml new file mode 100644 index 0000000..5f8b6ec --- /dev/null +++ b/src/workflows/testarch/bmad-testarch-ci/customize.toml @@ -0,0 +1,41 @@ +# DO NOT EDIT -- overwritten on every update. +# +# Workflow customization surface for bmad-testarch-ci. Mirrors the +# agent customization shape under the [workflow] namespace. + +[workflow] + +# --- Configurable below. Overrides merge per BMad structural rules: --- +# scalars: override wins • arrays (persistent_facts, activation_steps_*): append +# arrays-of-tables with `code`/`id`: replace matching items, append new ones. + +# Steps to run before the standard activation (config load, greet). +# Overrides append. Use for pre-flight loads, compliance checks, etc. + +activation_steps_prepend = [] + +# Steps to run after greet but before the workflow begins. +# Overrides append. Use for context-heavy setup that should happen +# once the user has been acknowledged. + +activation_steps_append = [] + +# Persistent facts the workflow keeps in mind for the whole run +# (testing standards, framework conventions, compliance constraints). +# Distinct from the runtime memory sidecar — these are static context +# loaded on activation. Overrides append. +# +# Each entry is either: +# - a literal sentence, e.g. "Every test must run deterministically in CI." +# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" +# (glob patterns are supported; the file's contents are loaded and treated as facts). + +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] + +# Scalar: executed when the workflow reaches its terminal step in any +# mode (create, validate, edit), after the final outputs are produced. +# Override wins. Leave empty for no custom post-completion behavior. + +on_complete = "" diff --git a/src/workflows/testarch/bmad-testarch-ci/steps-c/step-04-validate-and-summary.md b/src/workflows/testarch/bmad-testarch-ci/steps-c/step-04-validate-and-summary.md index ae49309..e63ca0e 100644 --- a/src/workflows/testarch/bmad-testarch-ci/steps-c/step-04-validate-and-summary.md +++ b/src/workflows/testarch/bmad-testarch-ci/steps-c/step-04-validate-and-summary.md @@ -90,3 +90,9 @@ Report: - Skipped sequence steps or missing outputs **Master Rule:** Skipping steps is FORBIDDEN. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-ci/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-ci/steps-e/step-02-apply-edit.md index 77f808f..2fb0ad0 100644 --- a/src/workflows/testarch/bmad-testarch-ci/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-ci/steps-e/step-02-apply-edit.md @@ -58,3 +58,9 @@ Summarize the edits applied. ### ❌ SYSTEM FAILURE: - Unconfirmed edits or missing update + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-ci/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-ci/steps-v/step-01-validate.md index 93c9053..ff88961 100644 --- a/src/workflows/testarch/bmad-testarch-ci/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-ci/steps-v/step-01-validate.md @@ -79,3 +79,9 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. - Skipped checklist items - No report produced + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-ci/workflow.md b/src/workflows/testarch/bmad-testarch-ci/workflow.md deleted file mode 100644 index be77a79..0000000 --- a/src/workflows/testarch/bmad-testarch-ci/workflow.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: bmad-testarch-ci -description: Scaffold CI/CD quality pipeline with test execution. Use when user says 'lets setup CI pipeline' or 'I want to create quality gates' -web_bundle: true ---- - -# CI/CD Pipeline Setup - -**Goal:** Scaffold CI/CD quality pipeline with test execution, burn-in loops, and artifact collection - -**Role:** You are the Master Test Architect. - ---- - -## PATH RESOLUTION - -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. -- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root. - ---- - -## WORKFLOW ARCHITECTURE - -This workflow uses **tri-modal step-file architecture**: - -- **Create mode (steps-c/)**: primary execution flow -- **Validate mode (steps-v/)**: validation against checklist -- **Edit mode (steps-e/)**: revise existing outputs - ---- - -## INITIALIZATION SEQUENCE - -### 1. Mode Determination - -"Welcome to the workflow. What would you like to do?" - -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow -- **[V] Validate** — Validate existing outputs -- **[E] Edit** — Edit existing outputs - -### 2. Route to First Step - -- **If C:** Load `{skill-root}/steps-c/step-01-preflight.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` -- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` -- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-framework/SKILL.md b/src/workflows/testarch/bmad-testarch-framework/SKILL.md index a9051d2..c3542ce 100644 --- a/src/workflows/testarch/bmad-testarch-framework/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-framework/SKILL.md @@ -3,13 +3,83 @@ name: bmad-testarch-framework description: 'Initialize test framework with Playwright or Cypress. Use when the user says "lets setup test framework" or "I want to initialize testing framework"' --- +# Test Framework Setup + +**Goal:** Initialize a production-ready test framework architecture (Playwright or Cypress) with fixtures, helpers, and configuration. + +**Role:** You are the Master Test Architect. + +You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. + ## Conventions -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. +- Bare paths (e.g. `instructions.md`) resolve from the skill root. +- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives). +- `{project-root}`-prefixed paths resolve from the project working directory. +- `{skill-name}` resolves to the skill directory's basename. +- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`. ## On Activation -Read `{skill-root}/workflow.md` and follow it exactly. +### Step 1: Resolve the Workflow Block + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` + +**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: + +1. `{skill-root}/customize.toml` — defaults +2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides +3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides + +Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. + +### Step 2: Execute Prepend Steps + +Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding. + +### Step 3: Load Persistent Facts + +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. + +### Step 4: Load Config + +Load config from `{project-root}/_bmad/tea/config.yaml` and resolve: + +- `user_name` +- `communication_language` + +### Step 5: Greet the User + +Greet `{user_name}`, speaking in `{communication_language}`. + +### Step 6: Execute Append Steps + +Execute each entry in `{workflow.activation_steps_append}` in order. + +Activation is complete. Begin the workflow below. + +## Workflow Architecture + +This workflow uses **tri-modal step-file architecture**: + +- **Create mode (steps-c/)**: primary execution flow +- **Validate mode (steps-v/)**: validation against checklist +- **Edit mode (steps-e/)**: revise existing outputs + +## Initialization Sequence + +### 1. Mode Determination + +"Welcome to the workflow. What would you like to do?" + +- **[C] Create** — Run the workflow +- **[R] Resume** — Resume an interrupted workflow +- **[V] Validate** — Validate existing outputs +- **[E] Edit** — Edit existing outputs + +### 2. Route to First Step -When `workflow.md`, step files, templates, or checklists reference sibling files with relative paths such as `steps-c/...`, `./instructions.md`, or `templates/...`, resolve them from `{skill-root}`, not from the workspace root. +- **If C:** Load `{skill-root}/steps-c/step-01-preflight.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` +- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-framework/customize.toml b/src/workflows/testarch/bmad-testarch-framework/customize.toml new file mode 100644 index 0000000..9fad3e1 --- /dev/null +++ b/src/workflows/testarch/bmad-testarch-framework/customize.toml @@ -0,0 +1,41 @@ +# DO NOT EDIT -- overwritten on every update. +# +# Workflow customization surface for bmad-testarch-framework. Mirrors the +# agent customization shape under the [workflow] namespace. + +[workflow] + +# --- Configurable below. Overrides merge per BMad structural rules: --- +# scalars: override wins • arrays (persistent_facts, activation_steps_*): append +# arrays-of-tables with `code`/`id`: replace matching items, append new ones. + +# Steps to run before the standard activation (config load, greet). +# Overrides append. Use for pre-flight loads, compliance checks, etc. + +activation_steps_prepend = [] + +# Steps to run after greet but before the workflow begins. +# Overrides append. Use for context-heavy setup that should happen +# once the user has been acknowledged. + +activation_steps_append = [] + +# Persistent facts the workflow keeps in mind for the whole run +# (testing standards, framework conventions, compliance constraints). +# Distinct from the runtime memory sidecar — these are static context +# loaded on activation. Overrides append. +# +# Each entry is either: +# - a literal sentence, e.g. "Every test must run deterministically in CI." +# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" +# (glob patterns are supported; the file's contents are loaded and treated as facts). + +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] + +# Scalar: executed when the workflow reaches its terminal step in any +# mode (create, validate, edit), after the final outputs are produced. +# Override wins. Leave empty for no custom post-completion behavior. + +on_complete = "" diff --git a/src/workflows/testarch/bmad-testarch-framework/steps-c/step-05-validate-and-summary.md b/src/workflows/testarch/bmad-testarch-framework/steps-c/step-05-validate-and-summary.md index 885a4b0..36e53d2 100644 --- a/src/workflows/testarch/bmad-testarch-framework/steps-c/step-05-validate-and-summary.md +++ b/src/workflows/testarch/bmad-testarch-framework/steps-c/step-05-validate-and-summary.md @@ -91,3 +91,9 @@ Report: - Skipped sequence steps or missing outputs **Master Rule:** Skipping steps is FORBIDDEN. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-framework/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-framework/steps-e/step-02-apply-edit.md index 77f808f..2fb0ad0 100644 --- a/src/workflows/testarch/bmad-testarch-framework/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-framework/steps-e/step-02-apply-edit.md @@ -58,3 +58,9 @@ Summarize the edits applied. ### ❌ SYSTEM FAILURE: - Unconfirmed edits or missing update + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-framework/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-framework/steps-v/step-01-validate.md index a881a5b..7cec477 100644 --- a/src/workflows/testarch/bmad-testarch-framework/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-framework/steps-v/step-01-validate.md @@ -65,3 +65,9 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. - Skipped checklist items - No report produced + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-framework/workflow.md b/src/workflows/testarch/bmad-testarch-framework/workflow.md deleted file mode 100644 index c0ff3fb..0000000 --- a/src/workflows/testarch/bmad-testarch-framework/workflow.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: bmad-testarch-framework -description: Initialize test framework with Playwright or Cypress. Use when user says 'lets setup test framework' or 'I want to initialize testing framework' -web_bundle: true ---- - -# Test Framework Setup - -**Goal:** Initialize production-ready test framework architecture (Playwright or Cypress) with fixtures, helpers, and configuration - -**Role:** You are the Master Test Architect. - ---- - -## PATH RESOLUTION - -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. -- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root. - ---- - -## WORKFLOW ARCHITECTURE - -This workflow uses **tri-modal step-file architecture**: - -- **Create mode (steps-c/)**: primary execution flow -- **Validate mode (steps-v/)**: validation against checklist -- **Edit mode (steps-e/)**: revise existing outputs - ---- - -## INITIALIZATION SEQUENCE - -### 1. Mode Determination - -"Welcome to the workflow. What would you like to do?" - -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow -- **[V] Validate** — Validate existing outputs -- **[E] Edit** — Edit existing outputs - -### 2. Route to First Step - -- **If C:** Load `{skill-root}/steps-c/step-01-preflight.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` -- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` -- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-nfr/SKILL.md b/src/workflows/testarch/bmad-testarch-nfr/SKILL.md index cc57069..5e4b224 100644 --- a/src/workflows/testarch/bmad-testarch-nfr/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-nfr/SKILL.md @@ -3,13 +3,83 @@ name: bmad-testarch-nfr description: 'Assess NFRs like performance security and reliability. Use when the user says "lets assess NFRs" or "I want to evaluate non-functional requirements"' --- +# Non-Functional Requirements Assessment + +**Goal:** Assess non-functional requirements (performance, security, reliability, maintainability) before release with evidence-based validation. + +**Role:** You are the Master Test Architect. + +You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. + ## Conventions -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. +- Bare paths (e.g. `instructions.md`) resolve from the skill root. +- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives). +- `{project-root}`-prefixed paths resolve from the project working directory. +- `{skill-name}` resolves to the skill directory's basename. +- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`. ## On Activation -Read `{skill-root}/workflow.md` and follow it exactly. +### Step 1: Resolve the Workflow Block + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` + +**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: + +1. `{skill-root}/customize.toml` — defaults +2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides +3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides + +Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. + +### Step 2: Execute Prepend Steps + +Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding. + +### Step 3: Load Persistent Facts + +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. + +### Step 4: Load Config + +Load config from `{project-root}/_bmad/tea/config.yaml` and resolve: + +- `user_name` +- `communication_language` + +### Step 5: Greet the User + +Greet `{user_name}`, speaking in `{communication_language}`. + +### Step 6: Execute Append Steps + +Execute each entry in `{workflow.activation_steps_append}` in order. + +Activation is complete. Begin the workflow below. + +## Workflow Architecture + +This workflow uses **tri-modal step-file architecture**: + +- **Create mode (steps-c/)**: primary execution flow +- **Validate mode (steps-v/)**: validation against checklist +- **Edit mode (steps-e/)**: revise existing outputs + +## Initialization Sequence + +### 1. Mode Determination + +"Welcome to the workflow. What would you like to do?" + +- **[C] Create** — Run the workflow +- **[R] Resume** — Resume an interrupted workflow +- **[V] Validate** — Validate existing outputs +- **[E] Edit** — Edit existing outputs + +### 2. Route to First Step -When `workflow.md`, step files, templates, or checklists reference sibling files with relative paths such as `steps-c/...`, `./instructions.md`, or `templates/...`, resolve them from `{skill-root}`, not from the workspace root. +- **If C:** Load `{skill-root}/steps-c/step-01-load-context.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` +- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-nfr/customize.toml b/src/workflows/testarch/bmad-testarch-nfr/customize.toml new file mode 100644 index 0000000..a8b61c7 --- /dev/null +++ b/src/workflows/testarch/bmad-testarch-nfr/customize.toml @@ -0,0 +1,41 @@ +# DO NOT EDIT -- overwritten on every update. +# +# Workflow customization surface for bmad-testarch-nfr. Mirrors the +# agent customization shape under the [workflow] namespace. + +[workflow] + +# --- Configurable below. Overrides merge per BMad structural rules: --- +# scalars: override wins • arrays (persistent_facts, activation_steps_*): append +# arrays-of-tables with `code`/`id`: replace matching items, append new ones. + +# Steps to run before the standard activation (config load, greet). +# Overrides append. Use for pre-flight loads, compliance checks, etc. + +activation_steps_prepend = [] + +# Steps to run after greet but before the workflow begins. +# Overrides append. Use for context-heavy setup that should happen +# once the user has been acknowledged. + +activation_steps_append = [] + +# Persistent facts the workflow keeps in mind for the whole run +# (testing standards, framework conventions, compliance constraints). +# Distinct from the runtime memory sidecar — these are static context +# loaded on activation. Overrides append. +# +# Each entry is either: +# - a literal sentence, e.g. "Every test must run deterministically in CI." +# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" +# (glob patterns are supported; the file's contents are loaded and treated as facts). + +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] + +# Scalar: executed when the workflow reaches its terminal step in any +# mode (create, validate, edit), after the final outputs are produced. +# Override wins. Leave empty for no custom post-completion behavior. + +on_complete = "" diff --git a/src/workflows/testarch/bmad-testarch-nfr/steps-c/step-05-generate-report.md b/src/workflows/testarch/bmad-testarch-nfr/steps-c/step-05-generate-report.md index d8303ae..30f7594 100644 --- a/src/workflows/testarch/bmad-testarch-nfr/steps-c/step-05-generate-report.md +++ b/src/workflows/testarch/bmad-testarch-nfr/steps-c/step-05-generate-report.md @@ -106,3 +106,9 @@ Report: - Skipped sequence steps or missing outputs **Master Rule:** Skipping steps is FORBIDDEN. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-nfr/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-nfr/steps-e/step-02-apply-edit.md index 77f808f..2fb0ad0 100644 --- a/src/workflows/testarch/bmad-testarch-nfr/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-nfr/steps-e/step-02-apply-edit.md @@ -58,3 +58,9 @@ Summarize the edits applied. ### ❌ SYSTEM FAILURE: - Unconfirmed edits or missing update + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-nfr/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-nfr/steps-v/step-01-validate.md index e886c7c..6b98317 100644 --- a/src/workflows/testarch/bmad-testarch-nfr/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-nfr/steps-v/step-01-validate.md @@ -65,3 +65,9 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. - Skipped checklist items - No report produced + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-nfr/workflow.md b/src/workflows/testarch/bmad-testarch-nfr/workflow.md deleted file mode 100644 index 61f1f3f..0000000 --- a/src/workflows/testarch/bmad-testarch-nfr/workflow.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: bmad-testarch-nfr -description: Assess NFRs like performance security and reliability. Use when user says 'lets assess NFRs' or 'I want to evaluate non-functional requirements' -web_bundle: true ---- - -# Non-Functional Requirements Assessment - -**Goal:** Assess non-functional requirements (performance, security, reliability, maintainability) before release with evidence-based validation - -**Role:** You are the Master Test Architect. - ---- - -## PATH RESOLUTION - -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. -- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root. - ---- - -## WORKFLOW ARCHITECTURE - -This workflow uses **tri-modal step-file architecture**: - -- **Create mode (steps-c/)**: primary execution flow -- **Validate mode (steps-v/)**: validation against checklist -- **Edit mode (steps-e/)**: revise existing outputs - ---- - -## INITIALIZATION SEQUENCE - -### 1. Mode Determination - -"Welcome to the workflow. What would you like to do?" - -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow -- **[V] Validate** — Validate existing outputs -- **[E] Edit** — Edit existing outputs - -### 2. Route to First Step - -- **If C:** Load `{skill-root}/steps-c/step-01-load-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` -- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` -- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-test-design/SKILL.md b/src/workflows/testarch/bmad-testarch-test-design/SKILL.md index 6dd0c30..de7b0e2 100644 --- a/src/workflows/testarch/bmad-testarch-test-design/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-test-design/SKILL.md @@ -3,13 +3,85 @@ name: bmad-testarch-test-design description: 'Create system-level or epic-level test plans. Use when the user says "lets design test plan" or "I want to create test strategy"' --- +# Test Design and Risk Assessment + +**Goal:** Produce an epic-level test plan grounded in risk and testability assessment. + +**Role:** You are the Master Test Architect. + +You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. + ## Conventions -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. +- Bare paths (e.g. `instructions.md`) resolve from the skill root. +- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives). +- `{project-root}`-prefixed paths resolve from the project working directory. +- `{skill-name}` resolves to the skill directory's basename. +- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`. ## On Activation -Read `{skill-root}/workflow.md` and follow it exactly. +### Step 1: Resolve the Workflow Block + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` + +**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: + +1. `{skill-root}/customize.toml` — defaults +2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides +3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides + +Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. + +### Step 2: Execute Prepend Steps + +Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding. + +### Step 3: Load Persistent Facts + +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. + +### Step 4: Load Config + +Load config from `{project-root}/_bmad/tea/config.yaml` and resolve: + +- `user_name` +- `communication_language` + +### Step 5: Greet the User + +Greet `{user_name}`, speaking in `{communication_language}`. + +### Step 6: Execute Append Steps + +Execute each entry in `{workflow.activation_steps_append}` in order. + +Activation is complete. Begin the workflow below. + +## Workflow Architecture + +This workflow uses **tri-modal step-file architecture**: + +- **Create mode (steps-c/)**: primary execution flow +- **Validate mode (steps-v/)**: validation against checklist +- **Edit mode (steps-e/)**: revise existing outputs + +## Initialization Sequence + +### 1. Mode Determination + +"Welcome to the workflow. What would you like to do?" + +- **[C] Create** — Run the workflow +- **[R] Resume** — Resume an interrupted workflow +- **[V] Validate** — Validate existing outputs +- **[E] Edit** — Edit existing outputs + +### 2. Route to First Step + +- **If C:** Load `{skill-root}/steps-c/step-01-detect-mode.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` +- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` -When `workflow.md`, step files, templates, or checklists reference sibling files with relative paths such as `steps-c/...`, `./instructions.md`, or `templates/...`, resolve them from `{skill-root}`, not from the workspace root. +Resume mode reads explicit progress metadata from the progress file (`workflowStatus`, `nextStep`, `totalSteps`) and falls back to legacy `lastStep` data when needed. diff --git a/src/workflows/testarch/bmad-testarch-test-design/customize.toml b/src/workflows/testarch/bmad-testarch-test-design/customize.toml new file mode 100644 index 0000000..e9cc226 --- /dev/null +++ b/src/workflows/testarch/bmad-testarch-test-design/customize.toml @@ -0,0 +1,41 @@ +# DO NOT EDIT -- overwritten on every update. +# +# Workflow customization surface for bmad-testarch-test-design. Mirrors the +# agent customization shape under the [workflow] namespace. + +[workflow] + +# --- Configurable below. Overrides merge per BMad structural rules: --- +# scalars: override wins • arrays (persistent_facts, activation_steps_*): append +# arrays-of-tables with `code`/`id`: replace matching items, append new ones. + +# Steps to run before the standard activation (config load, greet). +# Overrides append. Use for pre-flight loads, compliance checks, etc. + +activation_steps_prepend = [] + +# Steps to run after greet but before the workflow begins. +# Overrides append. Use for context-heavy setup that should happen +# once the user has been acknowledged. + +activation_steps_append = [] + +# Persistent facts the workflow keeps in mind for the whole run +# (testing standards, framework conventions, compliance constraints). +# Distinct from the runtime memory sidecar — these are static context +# loaded on activation. Overrides append. +# +# Each entry is either: +# - a literal sentence, e.g. "Every test must run deterministically in CI." +# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" +# (glob patterns are supported; the file's contents are loaded and treated as facts). + +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] + +# Scalar: executed when the workflow reaches its terminal step in any +# mode (create, validate, edit), after the final outputs are produced. +# Override wins. Leave empty for no custom post-completion behavior. + +on_complete = "" diff --git a/src/workflows/testarch/bmad-testarch-test-design/steps-c/step-05-generate-output.md b/src/workflows/testarch/bmad-testarch-test-design/steps-c/step-05-generate-output.md index 2f7977f..5285dc4 100644 --- a/src/workflows/testarch/bmad-testarch-test-design/steps-c/step-05-generate-output.md +++ b/src/workflows/testarch/bmad-testarch-test-design/steps-c/step-05-generate-output.md @@ -226,3 +226,9 @@ Summarize: - Skipped sequence steps or missing outputs **Master Rule:** Skipping steps is FORBIDDEN. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-test-design/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-test-design/steps-e/step-02-apply-edit.md index 77f808f..2fb0ad0 100644 --- a/src/workflows/testarch/bmad-testarch-test-design/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-test-design/steps-e/step-02-apply-edit.md @@ -58,3 +58,9 @@ Summarize the edits applied. ### ❌ SYSTEM FAILURE: - Unconfirmed edits or missing update + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-test-design/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-test-design/steps-v/step-01-validate.md index 454e8eb..81f4dec 100644 --- a/src/workflows/testarch/bmad-testarch-test-design/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-test-design/steps-v/step-01-validate.md @@ -65,3 +65,9 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. - Skipped checklist items - No report produced + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-test-design/workflow.md b/src/workflows/testarch/bmad-testarch-test-design/workflow.md deleted file mode 100644 index 2620336..0000000 --- a/src/workflows/testarch/bmad-testarch-test-design/workflow.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: bmad-testarch-test-design -description: Create system-level or epic-level test plans. Use when user says 'lets design test plan' or 'I want to create test strategy' -web_bundle: true ---- - -# Test Design and Risk Assessment - -**Goal:** Epic-level test plan (Phase 4) - -**Role:** You are the Master Test Architect. - ---- - -## PATH RESOLUTION - -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. -- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root. - ---- - -## WORKFLOW ARCHITECTURE - -This workflow uses **tri-modal step-file architecture**: - -- **Create mode (steps-c/)**: primary execution flow -- **Validate mode (steps-v/)**: validation against checklist -- **Edit mode (steps-e/)**: revise existing outputs - ---- - -## INITIALIZATION SEQUENCE - -### 1. Mode Determination - -"Welcome to the workflow. What would you like to do?" - -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow -- **[V] Validate** — Validate existing outputs -- **[E] Edit** — Edit existing outputs - -### 2. Route to First Step - -- **If C:** Load `{skill-root}/steps-c/step-01-detect-mode.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` -- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` -- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` - -Resume mode reads explicit progress metadata from the progress file (`workflowStatus`, `nextStep`, `totalSteps`) and falls back to legacy `lastStep` data when needed. diff --git a/src/workflows/testarch/bmad-testarch-test-review/SKILL.md b/src/workflows/testarch/bmad-testarch-test-review/SKILL.md index a0b7ff4..97d09ed 100644 --- a/src/workflows/testarch/bmad-testarch-test-review/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-test-review/SKILL.md @@ -3,13 +3,83 @@ name: bmad-testarch-test-review description: 'Review test quality using best practices validation. Use when user says "lets review tests" or "I want to evaluate test quality"' --- +# Test Quality Review + +**Goal:** Review test quality using a comprehensive knowledge base and best-practices validation. + +**Role:** You are the Master Test Architect. + +You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. + ## Conventions -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. +- Bare paths (e.g. `instructions.md`) resolve from the skill root. +- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives). +- `{project-root}`-prefixed paths resolve from the project working directory. +- `{skill-name}` resolves to the skill directory's basename. +- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`. ## On Activation -Read `{skill-root}/workflow.md` and follow it exactly. +### Step 1: Resolve the Workflow Block + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` + +**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: + +1. `{skill-root}/customize.toml` — defaults +2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides +3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides + +Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. + +### Step 2: Execute Prepend Steps + +Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding. + +### Step 3: Load Persistent Facts + +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. + +### Step 4: Load Config + +Load config from `{project-root}/_bmad/tea/config.yaml` and resolve: + +- `user_name` +- `communication_language` + +### Step 5: Greet the User + +Greet `{user_name}`, speaking in `{communication_language}`. + +### Step 6: Execute Append Steps + +Execute each entry in `{workflow.activation_steps_append}` in order. + +Activation is complete. Begin the workflow below. + +## Workflow Architecture + +This workflow uses **tri-modal step-file architecture**: + +- **Create mode (steps-c/)**: primary execution flow +- **Validate mode (steps-v/)**: validation against checklist +- **Edit mode (steps-e/)**: revise existing outputs + +## Initialization Sequence + +### 1. Mode Determination + +"Welcome to the workflow. What would you like to do?" + +- **[C] Create** — Run the workflow +- **[R] Resume** — Resume an interrupted workflow +- **[V] Validate** — Validate existing outputs +- **[E] Edit** — Edit existing outputs + +### 2. Route to First Step -When `workflow.md`, step files, templates, or checklists reference sibling files with relative paths such as `steps-c/...`, `./instructions.md`, or `templates/...`, resolve them from `{skill-root}`, not from the workspace root. +- **If C:** Load `{skill-root}/steps-c/step-01-load-context.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` +- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-test-review/customize.toml b/src/workflows/testarch/bmad-testarch-test-review/customize.toml new file mode 100644 index 0000000..a7e1de7 --- /dev/null +++ b/src/workflows/testarch/bmad-testarch-test-review/customize.toml @@ -0,0 +1,41 @@ +# DO NOT EDIT -- overwritten on every update. +# +# Workflow customization surface for bmad-testarch-test-review. Mirrors the +# agent customization shape under the [workflow] namespace. + +[workflow] + +# --- Configurable below. Overrides merge per BMad structural rules: --- +# scalars: override wins • arrays (persistent_facts, activation_steps_*): append +# arrays-of-tables with `code`/`id`: replace matching items, append new ones. + +# Steps to run before the standard activation (config load, greet). +# Overrides append. Use for pre-flight loads, compliance checks, etc. + +activation_steps_prepend = [] + +# Steps to run after greet but before the workflow begins. +# Overrides append. Use for context-heavy setup that should happen +# once the user has been acknowledged. + +activation_steps_append = [] + +# Persistent facts the workflow keeps in mind for the whole run +# (testing standards, framework conventions, compliance constraints). +# Distinct from the runtime memory sidecar — these are static context +# loaded on activation. Overrides append. +# +# Each entry is either: +# - a literal sentence, e.g. "Every test must run deterministically in CI." +# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" +# (glob patterns are supported; the file's contents are loaded and treated as facts). + +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] + +# Scalar: executed when the workflow reaches its terminal step in any +# mode (create, validate, edit), after the final outputs are produced. +# Override wins. Leave empty for no custom post-completion behavior. + +on_complete = "" diff --git a/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-04-generate-report.md b/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-04-generate-report.md index 10d7005..44048e8 100644 --- a/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-04-generate-report.md +++ b/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-04-generate-report.md @@ -109,3 +109,9 @@ Report: - Skipped sequence steps or missing outputs **Master Rule:** Skipping steps is FORBIDDEN. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-test-review/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-test-review/steps-e/step-02-apply-edit.md index 77f808f..2fb0ad0 100644 --- a/src/workflows/testarch/bmad-testarch-test-review/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-test-review/steps-e/step-02-apply-edit.md @@ -58,3 +58,9 @@ Summarize the edits applied. ### ❌ SYSTEM FAILURE: - Unconfirmed edits or missing update + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-test-review/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-test-review/steps-v/step-01-validate.md index 990a158..416be4e 100644 --- a/src/workflows/testarch/bmad-testarch-test-review/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-test-review/steps-v/step-01-validate.md @@ -65,3 +65,9 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. - Skipped checklist items - No report produced + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-test-review/workflow.md b/src/workflows/testarch/bmad-testarch-test-review/workflow.md deleted file mode 100644 index bda8a0d..0000000 --- a/src/workflows/testarch/bmad-testarch-test-review/workflow.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: bmad-testarch-test-review -description: Review test quality using best practices validation. Use when user says 'lets review tests' or 'I want to evaluate test quality' -web_bundle: true ---- - -# Test Quality Review - -**Goal:** Review test quality using comprehensive knowledge base and best practices validation - -**Role:** You are the Master Test Architect. - ---- - -## PATH RESOLUTION - -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. -- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root. - ---- - -## WORKFLOW ARCHITECTURE - -This workflow uses **tri-modal step-file architecture**: - -- **Create mode (steps-c/)**: primary execution flow -- **Validate mode (steps-v/)**: validation against checklist -- **Edit mode (steps-e/)**: revise existing outputs - ---- - -## INITIALIZATION SEQUENCE - -### 1. Mode Determination - -"Welcome to the workflow. What would you like to do?" - -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow -- **[V] Validate** — Validate existing outputs -- **[E] Edit** — Edit existing outputs - -### 2. Route to First Step - -- **If C:** Load `{skill-root}/steps-c/step-01-load-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` -- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` -- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-trace/SKILL.md b/src/workflows/testarch/bmad-testarch-trace/SKILL.md index 1230d20..53697db 100644 --- a/src/workflows/testarch/bmad-testarch-trace/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-trace/SKILL.md @@ -3,13 +3,85 @@ name: bmad-testarch-trace description: 'Generate traceability matrix and quality gate decision. Use when the user says "lets create traceability matrix" or "I want to analyze test coverage"' --- +# Coverage Traceability & Quality Gate + +**Goal:** Generate a requirements-or-journeys-to-tests traceability matrix, analyze coverage, and make a quality gate decision (PASS / CONCERNS / FAIL / WAIVED). + +**Role:** You are the Master Test Architect. + +You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. + ## Conventions -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. +- Bare paths (e.g. `instructions.md`) resolve from the skill root. +- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives). +- `{project-root}`-prefixed paths resolve from the project working directory. +- `{skill-name}` resolves to the skill directory's basename. +- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`. ## On Activation -Read `{skill-root}/workflow.md` and follow it exactly. +### Step 1: Resolve the Workflow Block + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` + +**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: + +1. `{skill-root}/customize.toml` — defaults +2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides +3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides + +Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. + +### Step 2: Execute Prepend Steps + +Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding. + +### Step 3: Load Persistent Facts + +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. + +### Step 4: Load Config + +Load config from `{project-root}/_bmad/tea/config.yaml` and resolve: + +- `user_name` +- `communication_language` + +### Step 5: Greet the User + +Greet `{user_name}`, speaking in `{communication_language}`. + +### Step 6: Execute Append Steps + +Execute each entry in `{workflow.activation_steps_append}` in order. + +Activation is complete. Begin the workflow below. + +## Workflow Architecture + +This workflow uses **tri-modal step-file architecture**: + +- **Create mode (steps-c/)**: primary execution flow +- **Validate mode (steps-v/)**: validation against checklist +- **Edit mode (steps-e/)**: revise existing outputs + +## Initialization Sequence + +### 1. Mode Determination + +"Welcome to the workflow. What would you like to do?" + +- **[C] Create** — Run the workflow +- **[R] Resume** — Resume an interrupted workflow +- **[V] Validate** — Validate existing outputs +- **[E] Edit** — Edit existing outputs + +### 2. Route to First Step + +- **If C:** Load `{skill-root}/steps-c/step-01-load-context.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` +- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` -When `workflow.md`, step files, templates, or checklists reference sibling files with relative paths such as `steps-c/...`, `./instructions.md`, or `templates/...`, resolve them from `{skill-root}`, not from the workspace root. +Create mode resolves the coverage oracle automatically in this order: formal requirements, contract/spec artifacts, resolvable external pointers (when `allow_external_pointer_resolution` is enabled), then synthetic journeys/requirements inferred from source (when `allow_synthetic_oracle` is enabled and no formal oracle exists). diff --git a/src/workflows/testarch/bmad-testarch-trace/customize.toml b/src/workflows/testarch/bmad-testarch-trace/customize.toml new file mode 100644 index 0000000..f61b3cf --- /dev/null +++ b/src/workflows/testarch/bmad-testarch-trace/customize.toml @@ -0,0 +1,41 @@ +# DO NOT EDIT -- overwritten on every update. +# +# Workflow customization surface for bmad-testarch-trace. Mirrors the +# agent customization shape under the [workflow] namespace. + +[workflow] + +# --- Configurable below. Overrides merge per BMad structural rules: --- +# scalars: override wins • arrays (persistent_facts, activation_steps_*): append +# arrays-of-tables with `code`/`id`: replace matching items, append new ones. + +# Steps to run before the standard activation (config load, greet). +# Overrides append. Use for pre-flight loads, compliance checks, etc. + +activation_steps_prepend = [] + +# Steps to run after greet but before the workflow begins. +# Overrides append. Use for context-heavy setup that should happen +# once the user has been acknowledged. + +activation_steps_append = [] + +# Persistent facts the workflow keeps in mind for the whole run +# (testing standards, framework conventions, compliance constraints). +# Distinct from the runtime memory sidecar — these are static context +# loaded on activation. Overrides append. +# +# Each entry is either: +# - a literal sentence, e.g. "Every test must run deterministically in CI." +# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" +# (glob patterns are supported; the file's contents are loaded and treated as facts). + +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] + +# Scalar: executed when the workflow reaches its terminal step in any +# mode (create, validate, edit), after the final outputs are produced. +# Override wins. Leave empty for no custom post-completion behavior. + +on_complete = "" diff --git a/src/workflows/testarch/bmad-testarch-trace/steps-c/step-05-gate-decision.md b/src/workflows/testarch/bmad-testarch-trace/steps-c/step-05-gate-decision.md index 3269da6..7c616e5 100644 --- a/src/workflows/testarch/bmad-testarch-trace/steps-c/step-05-gate-decision.md +++ b/src/workflows/testarch/bmad-testarch-trace/steps-c/step-05-gate-decision.md @@ -671,3 +671,9 @@ Then append the gate decision summary (from section 5 above) to the end of the e - Report missing or incomplete **Master Rule:** Gate decision MUST be deterministic based on clear criteria (P0 100%, P1 90/80, overall >=80) whenever `allow_gate` is true and `collection_status` is `COLLECTED`. `e2e-trace-summary.json` MUST be written before the workflow terminates. + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-trace/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-trace/steps-e/step-02-apply-edit.md index 77f808f..2fb0ad0 100644 --- a/src/workflows/testarch/bmad-testarch-trace/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-trace/steps-e/step-02-apply-edit.md @@ -58,3 +58,9 @@ Summarize the edits applied. ### ❌ SYSTEM FAILURE: - Unconfirmed edits or missing update + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-trace/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-trace/steps-v/step-01-validate.md index 125ae0b..03ef869 100644 --- a/src/workflows/testarch/bmad-testarch-trace/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-trace/steps-v/step-01-validate.md @@ -65,3 +65,9 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. - Skipped checklist items - No report produced + +## On Complete + +Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` + +If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. diff --git a/src/workflows/testarch/bmad-testarch-trace/workflow.md b/src/workflows/testarch/bmad-testarch-trace/workflow.md deleted file mode 100644 index acce71f..0000000 --- a/src/workflows/testarch/bmad-testarch-trace/workflow.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: bmad-testarch-trace -description: Generate traceability matrix and quality gate decision. Use when user says 'lets create traceability matrix' or 'I want to analyze test coverage' -web_bundle: true ---- - -# Coverage Traceability & Quality Gate - -**Goal:** Generate a requirements-or-journeys-to-tests traceability matrix, analyze coverage, and make quality gate decision (PASS/CONCERNS/FAIL/WAIVED) - -**Role:** You are the Master Test Architect. - ---- - -## PATH RESOLUTION - -- `{skill-root}` resolves to this workflow skill's installed directory. -- `{project-root}` resolves to the repository working directory. -- Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root. - ---- - -## WORKFLOW ARCHITECTURE - -This workflow uses **tri-modal step-file architecture**: - -- **Create mode (steps-c/)**: primary execution flow -- **Validate mode (steps-v/)**: validation against checklist -- **Edit mode (steps-e/)**: revise existing outputs - ---- - -## INITIALIZATION SEQUENCE - -### 1. Mode Determination - -"Welcome to the workflow. What would you like to do?" - -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow -- **[V] Validate** — Validate existing outputs -- **[E] Edit** — Edit existing outputs - -### 2. Route to First Step - -- **If C:** Load `{skill-root}/steps-c/step-01-load-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` -- **If V:** Load `{skill-root}/steps-v/step-01-validate.md` -- **If E:** Load `{skill-root}/steps-e/step-01-assess.md` - -Create mode resolves the coverage oracle automatically in this order: formal requirements, contract/spec artifacts, resolvable external pointers (when `allow_external_pointer_resolution` is enabled), then synthetic journeys/requirements inferred from source (when `allow_synthetic_oracle` is enabled and no formal oracle exists). diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 680ffde..38b4554 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -240,14 +240,14 @@ async function runTests() { // ============================================================ console.log(`${colors.yellow}Test Suite 4: Workflow Structure${colors.reset}\n`); - const teachMeWorkflowPath = path.join(projectRoot, 'src/workflows/testarch/bmad-teach-me-testing/workflow.md'); + const teachMeSkillPath = path.join(projectRoot, 'src/workflows/testarch/bmad-teach-me-testing/SKILL.md'); try { - if (await pathExists(teachMeWorkflowPath)) { - const teachMeContent = await fs.readFile(teachMeWorkflowPath, 'utf8'); - assert(teachMeContent.length > 0, 'bmad-teach-me-testing/workflow.md exists'); + if (await pathExists(teachMeSkillPath)) { + const teachMeContent = await fs.readFile(teachMeSkillPath, 'utf8'); + assert(teachMeContent.length > 0, 'bmad-teach-me-testing/SKILL.md exists'); assert(!teachMeContent.includes('_bmad/bmm/'), 'bmad-teach-me-testing has no _bmad/bmm/ references'); } else { - assert(false, 'bmad-teach-me-testing workflow exists', 'src/workflows/testarch/bmad-teach-me-testing/workflow.md not found'); + assert(false, 'bmad-teach-me-testing workflow exists', 'src/workflows/testarch/bmad-teach-me-testing/SKILL.md not found'); } } catch (error) { assert(false, 'teach-me-testing workflow validates', error.message); @@ -266,7 +266,7 @@ async function runTests() { for (const [dirName, displayName] of Object.entries(workflowDirs)) { const skillMdPath = path.join(projectRoot, `src/workflows/testarch/${dirName}/SKILL.md`); - const workflowMdPath = path.join(projectRoot, `src/workflows/testarch/${dirName}/workflow.md`); + const customizeTomlPath = path.join(projectRoot, `src/workflows/testarch/${dirName}/customize.toml`); const workflowYamlPath = path.join(projectRoot, `src/workflows/testarch/${dirName}/workflow.yaml`); const instructionsMdPath = path.join(projectRoot, `src/workflows/testarch/${dirName}/instructions.md`); @@ -275,13 +275,18 @@ async function runTests() { const skillContent = await fs.readFile(skillMdPath, 'utf8'); assert(skillContent.includes('## On Activation'), `${dirName}/SKILL.md has On Activation section`); assert( - skillContent.includes('Read `{skill-root}/workflow.md` and follow it exactly.'), - `${dirName}/SKILL.md loads workflow.md from {skill-root}`, + skillContent.includes('resolve_customization.py --skill {skill-root} --key workflow'), + `${dirName}/SKILL.md resolves the workflow customization block`, ); + assert(skillContent.includes('{workflow.activation_steps_prepend}'), `${dirName}/SKILL.md executes prepend activation steps`); + assert(skillContent.includes('{workflow.activation_steps_append}'), `${dirName}/SKILL.md executes append activation steps`); + assert(skillContent.includes('{workflow.persistent_facts}'), `${dirName}/SKILL.md loads persistent facts`); assert( - skillContent.includes('resolve them from `{skill-root}`, not from the workspace root'), - `${dirName}/SKILL.md explains workspace-root-safe relative path resolution`, + skillContent.includes('Resolve sibling workflow files such as `instructions.md`'), + `${dirName}/SKILL.md explains sibling workflow path resolution`, ); + assert(/\{skill-root\}\/steps-[cev]\//.test(skillContent), `${dirName}/SKILL.md routes first step from {skill-root}`); + assert(!skillContent.includes('Read `{skill-root}/workflow.md`'), `${dirName}/SKILL.md no longer redirects to workflow.md`); assert(!skillContent.includes('[workflow.md](workflow.md)'), `${dirName}/SKILL.md no longer uses a bare relative workflow link`); } catch (error) { assert(false, `${dirName}/SKILL.md validates`, error.message); @@ -290,24 +295,29 @@ async function runTests() { assert(false, `${dirName}/SKILL.md exists`, `src/workflows/testarch/${dirName}/SKILL.md not found`); } - if (await pathExists(workflowMdPath)) { + if (await pathExists(customizeTomlPath)) { try { - const workflowContent = await fs.readFile(workflowMdPath, 'utf8'); - assert(workflowContent.includes('## PATH RESOLUTION'), `${dirName}/workflow.md documents path resolution`); + const customizeContent = await fs.readFile(customizeTomlPath, 'utf8'); + assert(customizeContent.includes('[workflow]'), `${dirName}/customize.toml has [workflow] section`); + assert(customizeContent.includes('activation_steps_prepend'), `${dirName}/customize.toml defines activation_steps_prepend`); + assert(customizeContent.includes('activation_steps_append'), `${dirName}/customize.toml defines activation_steps_append`); + assert(customizeContent.includes('persistent_facts'), `${dirName}/customize.toml defines persistent_facts`); + assert(customizeContent.includes('on_complete'), `${dirName}/customize.toml defines on_complete`); assert( - workflowContent.includes( - 'Resolve sibling workflow files such as `instructions.md`, `checklist.md`, `steps-c/...`, `steps-e/...`, `steps-v/...`, and templates from `{skill-root}`, not from the workspace root.', - ), - `${dirName}/workflow.md explains sibling workflow path resolution`, + customizeContent.includes('file:{project-root}/**/project-context.md'), + `${dirName}/customize.toml loads project-context.md as a persistent fact`, ); - assert(/\{skill-root\}\/steps-[cev]\//.test(workflowContent), `${dirName}/workflow.md routes first step from {skill-root}`); } catch (error) { - assert(false, `${dirName}/workflow.md validates`, error.message); + assert(false, `${dirName}/customize.toml validates`, error.message); } } else { - assert(false, `${dirName}/workflow.md exists`, `src/workflows/testarch/${dirName}/workflow.md not found`); + assert(false, `${dirName}/customize.toml exists`, `src/workflows/testarch/${dirName}/customize.toml not found`); } + // workflow.md was folded into SKILL.md and removed (PR: workflow customization rollout). + const legacyWorkflowMdPath = path.join(projectRoot, `src/workflows/testarch/${dirName}/workflow.md`); + assert(!(await pathExists(legacyWorkflowMdPath)), `${dirName}/workflow.md is removed (content lives in SKILL.md)`); + if (await pathExists(workflowYamlPath)) { try { const workflowYaml = yaml.load(await fs.readFile(workflowYamlPath, 'utf8')); From 81ca8f1d5e7bb5750bc707f31d88bc52b9e1ed6e Mon Sep 17 00:00:00 2001 From: murat Date: Thu, 23 Apr 2026 07:21:04 -0500 Subject: [PATCH 2/3] fix: addresseed PR comments --- src/workflows/testarch/README.md | 8 ++-- .../testarch/bmad-teach-me-testing/SKILL.md | 4 +- .../bmad-teach-me-testing/checklist.md | 5 ++- .../bmad-teach-me-testing/customize.toml | 3 +- .../bmad-teach-me-testing/instructions.md | 7 ++++ .../steps-c/step-05-completion.md | 4 +- .../steps-e/step-e-02-apply-edits.md | 4 +- .../steps-v/step-v-01-validate.md | 7 +++- .../testarch/bmad-testarch-atdd/SKILL.md | 10 ++--- .../bmad-testarch-atdd/customize.toml | 3 +- .../steps-c/step-05-validate-and-complete.md | 4 +- .../steps-e/step-02-apply-edit.md | 4 +- .../steps-v/step-01-validate.md | 4 +- .../testarch/bmad-testarch-automate/SKILL.md | 10 ++--- .../bmad-testarch-automate/customize.toml | 3 +- .../steps-c/step-04-validate-and-summarize.md | 4 +- .../steps-e/step-02-apply-edit.md | 4 +- .../steps-v/step-01-validate.md | 4 +- .../testarch/bmad-testarch-ci/SKILL.md | 10 ++--- .../testarch/bmad-testarch-ci/customize.toml | 3 +- .../steps-c/step-04-validate-and-summary.md | 4 +- .../steps-e/step-02-apply-edit.md | 4 +- .../steps-v/step-01-validate.md | 4 +- .../testarch/bmad-testarch-framework/SKILL.md | 10 ++--- .../bmad-testarch-framework/customize.toml | 3 +- .../steps-c/step-05-validate-and-summary.md | 4 +- .../steps-e/step-02-apply-edit.md | 4 +- .../steps-v/step-01-validate.md | 4 +- .../testarch/bmad-testarch-nfr/SKILL.md | 10 ++--- .../testarch/bmad-testarch-nfr/customize.toml | 3 +- .../steps-c/step-05-generate-report.md | 4 +- .../steps-e/step-02-apply-edit.md | 4 +- .../steps-v/step-01-validate.md | 4 +- .../bmad-testarch-test-design/SKILL.md | 10 ++--- .../bmad-testarch-test-design/customize.toml | 3 +- .../steps-c/step-05-generate-output.md | 4 +- .../steps-e/step-02-apply-edit.md | 4 +- .../steps-v/step-01-validate.md | 4 +- .../bmad-testarch-test-review/SKILL.md | 10 ++--- .../bmad-testarch-test-review/customize.toml | 3 +- .../steps-c/step-04-generate-report.md | 4 +- .../steps-e/step-02-apply-edit.md | 4 +- .../steps-v/step-01-validate.md | 4 +- .../testarch/bmad-testarch-trace/SKILL.md | 10 ++--- .../bmad-testarch-trace/customize.toml | 3 +- .../steps-c/step-05-gate-decision.md | 4 +- .../steps-e/step-02-apply-edit.md | 4 +- .../steps-v/step-01-validate.md | 4 +- test/test-installation-components.js | 39 +++++++------------ 49 files changed, 163 insertions(+), 118 deletions(-) diff --git a/src/workflows/testarch/README.md b/src/workflows/testarch/README.md index 9c84829..51d2569 100644 --- a/src/workflows/testarch/README.md +++ b/src/workflows/testarch/README.md @@ -1,6 +1,6 @@ # TEA Workflow Step Files -This folder contains the Test Architect (TEA) workflows converted to step-file architecture for strict LLM compliance. Each workflow is tri-modal (create, edit, validate) and uses small, ordered step files instead of a single monolithic instruction file. +This folder contains the Test Architect (TEA) workflows converted to skill-driven step-file architecture for strict LLM compliance. Each workflow is tri-modal (create, edit, validate) and uses small, ordered step files routed from `SKILL.md` instead of a single monolithic instruction file. ## Why Step Files @@ -12,7 +12,8 @@ This folder contains the Test Architect (TEA) workflows converted to step-file a ``` / -├── workflow.md # Mode routing (create / edit / validate) +├── SKILL.md # Canonical entrypoint and mode routing +├── customize.toml # Workflow customization surface ├── workflow-plan.md # Design reference for step order and intent ├── workflow.yaml # Installer metadata ├── instructions.md # Short entrypoint / summary @@ -69,6 +70,7 @@ This folder contains the Test Architect (TEA) workflows converted to step-file a ## Notes -- `workflow.md` is the canonical entrypoint. `instructions.md` is a short summary for quick context. +- `SKILL.md` is the canonical entrypoint. `instructions.md` is a short summary for quick context. +- `customize.toml` defines activation hooks, persistent facts, and the optional `on_complete` hook. - Output files typically use `{test_artifacts}` or `{project-root}` variables. - If a workflow produces multiple artifacts (e.g., system-level vs epic-level), the step file will specify which templates and output paths to use. diff --git a/src/workflows/testarch/bmad-teach-me-testing/SKILL.md b/src/workflows/testarch/bmad-teach-me-testing/SKILL.md index fe6338b..eb4dcad 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/SKILL.md +++ b/src/workflows/testarch/bmad-teach-me-testing/SKILL.md @@ -41,7 +41,7 @@ Execute each entry in `{workflow.activation_steps_prepend}` in order before proc ### Step 3: Load Persistent Facts -Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs resolved from `{project-root}` — expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim. ### Step 4: Load Config @@ -101,7 +101,7 @@ This uses **step-file architecture** for disciplined execution: **Check if mode was specified in the command invocation:** -- If user invoked with "create" or "teach" or "learn" or "start" → Set mode to **create** +- If user invoked with "create" or "teach" or "learn" or "start" or "resume" or "continue" → Set mode to **create** - If user invoked with "validate" or "review" or "-v" or "--validate" → Set mode to **validate** - If user invoked with "edit" or "modify" or "-e" or "--edit" → Set mode to **edit** diff --git a/src/workflows/testarch/bmad-teach-me-testing/checklist.md b/src/workflows/testarch/bmad-teach-me-testing/checklist.md index 5921ff5..a5a6688 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/checklist.md +++ b/src/workflows/testarch/bmad-teach-me-testing/checklist.md @@ -8,10 +8,11 @@ Use this checklist to validate the teaching workflow meets quality standards. ## Foundation Quality -- [ ] **workflow.md** exists with proper frontmatter +- [ ] **SKILL.md** exists with proper frontmatter +- [ ] **customize.toml** defines activation hooks and persistent facts - [ ] Tri-modal routing logic present (Create/Edit/Validate) - [ ] Configuration loading references correct module (TEA) -- [ ] First step path correct (`./steps-c/step-01-init.md`) +- [ ] First step path correct (`{skill-root}/steps-c/step-01-init.md`) - [ ] Folder structure complete (steps-c/, steps-e/, steps-v/, data/, templates/) --- diff --git a/src/workflows/testarch/bmad-teach-me-testing/customize.toml b/src/workflows/testarch/bmad-teach-me-testing/customize.toml index dad3d3e..f7ba00d 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/customize.toml +++ b/src/workflows/testarch/bmad-teach-me-testing/customize.toml @@ -7,7 +7,6 @@ # --- Configurable below. Overrides merge per BMad structural rules: --- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append -# arrays-of-tables with `code`/`id`: replace matching items, append new ones. # Steps to run before the standard activation (config load, greet). # Overrides append. Use for pre-flight loads, compliance checks, etc. @@ -28,7 +27,7 @@ activation_steps_append = [] # Each entry is either: # - a literal sentence, e.g. "Every test must run deterministically in CI." # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" -# (glob patterns are supported; the file's contents are loaded and treated as facts). +# (glob patterns are supported; matching files load in lexical path order as facts). persistent_facts = [ "file:{project-root}/**/project-context.md", diff --git a/src/workflows/testarch/bmad-teach-me-testing/instructions.md b/src/workflows/testarch/bmad-teach-me-testing/instructions.md index 27db78a..15fec77 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/instructions.md +++ b/src/workflows/testarch/bmad-teach-me-testing/instructions.md @@ -38,6 +38,13 @@ The workflow automatically detects existing progress and resumes where you left ## Workflow Structure +### Step Entrypoints + +- Create / start: `{skill-root}/steps-c/step-01-init.md` +- Continue existing progress: `{skill-root}/steps-c/step-01b-continue.md` +- Validate the workflow: `{skill-root}/steps-v/step-v-01-validate.md` +- Edit the workflow: `{skill-root}/steps-e/step-e-01-assess-workflow.md` + ### 7 Sessions 1. **Quick Start (30 min)** - TEA Lite intro, run automate workflow diff --git a/src/workflows/testarch/bmad-teach-me-testing/steps-c/step-05-completion.md b/src/workflows/testarch/bmad-teach-me-testing/steps-c/step-05-completion.md index 64fef7a..a183623 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/steps-c/step-05-completion.md +++ b/src/workflows/testarch/bmad-teach-me-testing/steps-c/step-05-completion.md @@ -342,4 +342,6 @@ Workflow ends here. User can run the workflow again to re-take sessions or explo Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-02-apply-edits.md b/src/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-02-apply-edits.md index fa30c49..1d9f2dd 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-02-apply-edits.md +++ b/src/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-02-apply-edits.md @@ -125,4 +125,6 @@ The teach-me-testing workflow has been updated. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-teach-me-testing/steps-v/step-v-01-validate.md b/src/workflows/testarch/bmad-teach-me-testing/steps-v/step-v-01-validate.md index 648ece1..d930a19 100644 --- a/src/workflows/testarch/bmad-teach-me-testing/steps-v/step-v-01-validate.md +++ b/src/workflows/testarch/bmad-teach-me-testing/steps-v/step-v-01-validate.md @@ -63,7 +63,8 @@ This will validate: **Check:** -- [ ] workflow.md exists with proper frontmatter +- [ ] SKILL.md exists with proper frontmatter +- [ ] customize.toml defines workflow customization surface - [ ] Tri-modal routing logic present - [ ] Configuration loading correct - [ ] First step path correct @@ -266,4 +267,6 @@ Workflow is usable but could be improved. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-atdd/SKILL.md b/src/workflows/testarch/bmad-testarch-atdd/SKILL.md index a9ffdb0..5698d7f 100644 --- a/src/workflows/testarch/bmad-testarch-atdd/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-atdd/SKILL.md @@ -39,7 +39,7 @@ Execute each entry in `{workflow.activation_steps_prepend}` in order before proc ### Step 3: Load Persistent Facts -Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs resolved from `{project-root}` — expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim. ### Step 4: Load Config @@ -62,7 +62,7 @@ Activation is complete. Begin the workflow below. This workflow uses **tri-modal step-file architecture**: -- **Create mode (steps-c/)**: primary execution flow +- **Create mode (steps-c/)**: primary execution flow for new runs and resume continuation - **Validate mode (steps-v/)**: validation against checklist - **Edit mode (steps-e/)**: revise existing outputs @@ -72,14 +72,14 @@ This workflow uses **tri-modal step-file architecture**: "Welcome to the workflow. What would you like to do?" -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow +- **[C] Create** — Run the workflow from the beginning +- **[R] Resume** — Resume an interrupted Create workflow - **[V] Validate** — Validate existing outputs - **[E] Edit** — Edit existing outputs ### 2. Route to First Step - **If C:** Load `{skill-root}/steps-c/step-01-preflight-and-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` (Create-mode continuation) - **If V:** Load `{skill-root}/steps-v/step-01-validate.md` - **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-atdd/customize.toml b/src/workflows/testarch/bmad-testarch-atdd/customize.toml index c97c0d7..cd54e80 100644 --- a/src/workflows/testarch/bmad-testarch-atdd/customize.toml +++ b/src/workflows/testarch/bmad-testarch-atdd/customize.toml @@ -7,7 +7,6 @@ # --- Configurable below. Overrides merge per BMad structural rules: --- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append -# arrays-of-tables with `code`/`id`: replace matching items, append new ones. # Steps to run before the standard activation (config load, greet). # Overrides append. Use for pre-flight loads, compliance checks, etc. @@ -28,7 +27,7 @@ activation_steps_append = [] # Each entry is either: # - a literal sentence, e.g. "Every test must run deterministically in CI." # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" -# (glob patterns are supported; the file's contents are loaded and treated as facts). +# (glob patterns are supported; matching files load in lexical path order as facts). persistent_facts = [ "file:{project-root}/**/project-context.md", diff --git a/src/workflows/testarch/bmad-testarch-atdd/steps-c/step-05-validate-and-complete.md b/src/workflows/testarch/bmad-testarch-atdd/steps-c/step-05-validate-and-complete.md index dda6817..df320d5 100644 --- a/src/workflows/testarch/bmad-testarch-atdd/steps-c/step-05-validate-and-complete.md +++ b/src/workflows/testarch/bmad-testarch-atdd/steps-c/step-05-validate-and-complete.md @@ -118,4 +118,6 @@ Report: Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-atdd/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-atdd/steps-e/step-02-apply-edit.md index 2fb0ad0..c096095 100644 --- a/src/workflows/testarch/bmad-testarch-atdd/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-atdd/steps-e/step-02-apply-edit.md @@ -63,4 +63,6 @@ Summarize the edits applied. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-atdd/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-atdd/steps-v/step-01-validate.md index 8319fd0..bf8522c 100644 --- a/src/workflows/testarch/bmad-testarch-atdd/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-atdd/steps-v/step-01-validate.md @@ -70,4 +70,6 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-automate/SKILL.md b/src/workflows/testarch/bmad-testarch-automate/SKILL.md index e71677b..cebcd85 100644 --- a/src/workflows/testarch/bmad-testarch-automate/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-automate/SKILL.md @@ -39,7 +39,7 @@ Execute each entry in `{workflow.activation_steps_prepend}` in order before proc ### Step 3: Load Persistent Facts -Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs resolved from `{project-root}` — expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim. ### Step 4: Load Config @@ -62,7 +62,7 @@ Activation is complete. Begin the workflow below. This workflow uses **tri-modal step-file architecture**: -- **Create mode (steps-c/)**: primary execution flow +- **Create mode (steps-c/)**: primary execution flow for new runs and resume continuation - **Validate mode (steps-v/)**: validation against checklist - **Edit mode (steps-e/)**: revise existing outputs @@ -72,14 +72,14 @@ This workflow uses **tri-modal step-file architecture**: "Welcome to the workflow. What would you like to do?" -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow +- **[C] Create** — Run the workflow from the beginning +- **[R] Resume** — Resume an interrupted Create workflow - **[V] Validate** — Validate existing outputs - **[E] Edit** — Edit existing outputs ### 2. Route to First Step - **If C:** Load `{skill-root}/steps-c/step-01-preflight-and-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` (Create-mode continuation) - **If V:** Load `{skill-root}/steps-v/step-01-validate.md` - **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-automate/customize.toml b/src/workflows/testarch/bmad-testarch-automate/customize.toml index 4d14d99..6e8fbe4 100644 --- a/src/workflows/testarch/bmad-testarch-automate/customize.toml +++ b/src/workflows/testarch/bmad-testarch-automate/customize.toml @@ -7,7 +7,6 @@ # --- Configurable below. Overrides merge per BMad structural rules: --- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append -# arrays-of-tables with `code`/`id`: replace matching items, append new ones. # Steps to run before the standard activation (config load, greet). # Overrides append. Use for pre-flight loads, compliance checks, etc. @@ -28,7 +27,7 @@ activation_steps_append = [] # Each entry is either: # - a literal sentence, e.g. "Every test must run deterministically in CI." # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" -# (glob patterns are supported; the file's contents are loaded and treated as facts). +# (glob patterns are supported; matching files load in lexical path order as facts). persistent_facts = [ "file:{project-root}/**/project-context.md", diff --git a/src/workflows/testarch/bmad-testarch-automate/steps-c/step-04-validate-and-summarize.md b/src/workflows/testarch/bmad-testarch-automate/steps-c/step-04-validate-and-summarize.md index ac79d63..6154c2b 100644 --- a/src/workflows/testarch/bmad-testarch-automate/steps-c/step-04-validate-and-summarize.md +++ b/src/workflows/testarch/bmad-testarch-automate/steps-c/step-04-validate-and-summarize.md @@ -109,4 +109,6 @@ Write `{outputFile}` including: Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-automate/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-automate/steps-e/step-02-apply-edit.md index 2fb0ad0..c096095 100644 --- a/src/workflows/testarch/bmad-testarch-automate/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-automate/steps-e/step-02-apply-edit.md @@ -63,4 +63,6 @@ Summarize the edits applied. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-automate/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-automate/steps-v/step-01-validate.md index 8e9e268..fcb075d 100644 --- a/src/workflows/testarch/bmad-testarch-automate/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-automate/steps-v/step-01-validate.md @@ -70,4 +70,6 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-ci/SKILL.md b/src/workflows/testarch/bmad-testarch-ci/SKILL.md index 7b17cd5..9a07eb7 100644 --- a/src/workflows/testarch/bmad-testarch-ci/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-ci/SKILL.md @@ -39,7 +39,7 @@ Execute each entry in `{workflow.activation_steps_prepend}` in order before proc ### Step 3: Load Persistent Facts -Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs resolved from `{project-root}` — expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim. ### Step 4: Load Config @@ -62,7 +62,7 @@ Activation is complete. Begin the workflow below. This workflow uses **tri-modal step-file architecture**: -- **Create mode (steps-c/)**: primary execution flow +- **Create mode (steps-c/)**: primary execution flow for new runs and resume continuation - **Validate mode (steps-v/)**: validation against checklist - **Edit mode (steps-e/)**: revise existing outputs @@ -72,14 +72,14 @@ This workflow uses **tri-modal step-file architecture**: "Welcome to the workflow. What would you like to do?" -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow +- **[C] Create** — Run the workflow from the beginning +- **[R] Resume** — Resume an interrupted Create workflow - **[V] Validate** — Validate existing outputs - **[E] Edit** — Edit existing outputs ### 2. Route to First Step - **If C:** Load `{skill-root}/steps-c/step-01-preflight.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` (Create-mode continuation) - **If V:** Load `{skill-root}/steps-v/step-01-validate.md` - **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-ci/customize.toml b/src/workflows/testarch/bmad-testarch-ci/customize.toml index 5f8b6ec..1e522e6 100644 --- a/src/workflows/testarch/bmad-testarch-ci/customize.toml +++ b/src/workflows/testarch/bmad-testarch-ci/customize.toml @@ -7,7 +7,6 @@ # --- Configurable below. Overrides merge per BMad structural rules: --- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append -# arrays-of-tables with `code`/`id`: replace matching items, append new ones. # Steps to run before the standard activation (config load, greet). # Overrides append. Use for pre-flight loads, compliance checks, etc. @@ -28,7 +27,7 @@ activation_steps_append = [] # Each entry is either: # - a literal sentence, e.g. "Every test must run deterministically in CI." # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" -# (glob patterns are supported; the file's contents are loaded and treated as facts). +# (glob patterns are supported; matching files load in lexical path order as facts). persistent_facts = [ "file:{project-root}/**/project-context.md", diff --git a/src/workflows/testarch/bmad-testarch-ci/steps-c/step-04-validate-and-summary.md b/src/workflows/testarch/bmad-testarch-ci/steps-c/step-04-validate-and-summary.md index e63ca0e..73b4fd7 100644 --- a/src/workflows/testarch/bmad-testarch-ci/steps-c/step-04-validate-and-summary.md +++ b/src/workflows/testarch/bmad-testarch-ci/steps-c/step-04-validate-and-summary.md @@ -95,4 +95,6 @@ Report: Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-ci/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-ci/steps-e/step-02-apply-edit.md index 2fb0ad0..c096095 100644 --- a/src/workflows/testarch/bmad-testarch-ci/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-ci/steps-e/step-02-apply-edit.md @@ -63,4 +63,6 @@ Summarize the edits applied. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-ci/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-ci/steps-v/step-01-validate.md index ff88961..a17b8a0 100644 --- a/src/workflows/testarch/bmad-testarch-ci/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-ci/steps-v/step-01-validate.md @@ -84,4 +84,6 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-framework/SKILL.md b/src/workflows/testarch/bmad-testarch-framework/SKILL.md index c3542ce..062d381 100644 --- a/src/workflows/testarch/bmad-testarch-framework/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-framework/SKILL.md @@ -39,7 +39,7 @@ Execute each entry in `{workflow.activation_steps_prepend}` in order before proc ### Step 3: Load Persistent Facts -Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs resolved from `{project-root}` — expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim. ### Step 4: Load Config @@ -62,7 +62,7 @@ Activation is complete. Begin the workflow below. This workflow uses **tri-modal step-file architecture**: -- **Create mode (steps-c/)**: primary execution flow +- **Create mode (steps-c/)**: primary execution flow for new runs and resume continuation - **Validate mode (steps-v/)**: validation against checklist - **Edit mode (steps-e/)**: revise existing outputs @@ -72,14 +72,14 @@ This workflow uses **tri-modal step-file architecture**: "Welcome to the workflow. What would you like to do?" -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow +- **[C] Create** — Run the workflow from the beginning +- **[R] Resume** — Resume an interrupted Create workflow - **[V] Validate** — Validate existing outputs - **[E] Edit** — Edit existing outputs ### 2. Route to First Step - **If C:** Load `{skill-root}/steps-c/step-01-preflight.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` (Create-mode continuation) - **If V:** Load `{skill-root}/steps-v/step-01-validate.md` - **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-framework/customize.toml b/src/workflows/testarch/bmad-testarch-framework/customize.toml index 9fad3e1..1e287b4 100644 --- a/src/workflows/testarch/bmad-testarch-framework/customize.toml +++ b/src/workflows/testarch/bmad-testarch-framework/customize.toml @@ -7,7 +7,6 @@ # --- Configurable below. Overrides merge per BMad structural rules: --- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append -# arrays-of-tables with `code`/`id`: replace matching items, append new ones. # Steps to run before the standard activation (config load, greet). # Overrides append. Use for pre-flight loads, compliance checks, etc. @@ -28,7 +27,7 @@ activation_steps_append = [] # Each entry is either: # - a literal sentence, e.g. "Every test must run deterministically in CI." # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" -# (glob patterns are supported; the file's contents are loaded and treated as facts). +# (glob patterns are supported; matching files load in lexical path order as facts). persistent_facts = [ "file:{project-root}/**/project-context.md", diff --git a/src/workflows/testarch/bmad-testarch-framework/steps-c/step-05-validate-and-summary.md b/src/workflows/testarch/bmad-testarch-framework/steps-c/step-05-validate-and-summary.md index 36e53d2..5b9f08c 100644 --- a/src/workflows/testarch/bmad-testarch-framework/steps-c/step-05-validate-and-summary.md +++ b/src/workflows/testarch/bmad-testarch-framework/steps-c/step-05-validate-and-summary.md @@ -96,4 +96,6 @@ Report: Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-framework/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-framework/steps-e/step-02-apply-edit.md index 2fb0ad0..c096095 100644 --- a/src/workflows/testarch/bmad-testarch-framework/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-framework/steps-e/step-02-apply-edit.md @@ -63,4 +63,6 @@ Summarize the edits applied. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-framework/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-framework/steps-v/step-01-validate.md index 7cec477..9400ce1 100644 --- a/src/workflows/testarch/bmad-testarch-framework/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-framework/steps-v/step-01-validate.md @@ -70,4 +70,6 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-nfr/SKILL.md b/src/workflows/testarch/bmad-testarch-nfr/SKILL.md index 5e4b224..e3cacec 100644 --- a/src/workflows/testarch/bmad-testarch-nfr/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-nfr/SKILL.md @@ -39,7 +39,7 @@ Execute each entry in `{workflow.activation_steps_prepend}` in order before proc ### Step 3: Load Persistent Facts -Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs resolved from `{project-root}` — expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim. ### Step 4: Load Config @@ -62,7 +62,7 @@ Activation is complete. Begin the workflow below. This workflow uses **tri-modal step-file architecture**: -- **Create mode (steps-c/)**: primary execution flow +- **Create mode (steps-c/)**: primary execution flow for new runs and resume continuation - **Validate mode (steps-v/)**: validation against checklist - **Edit mode (steps-e/)**: revise existing outputs @@ -72,14 +72,14 @@ This workflow uses **tri-modal step-file architecture**: "Welcome to the workflow. What would you like to do?" -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow +- **[C] Create** — Run the workflow from the beginning +- **[R] Resume** — Resume an interrupted Create workflow - **[V] Validate** — Validate existing outputs - **[E] Edit** — Edit existing outputs ### 2. Route to First Step - **If C:** Load `{skill-root}/steps-c/step-01-load-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` (Create-mode continuation) - **If V:** Load `{skill-root}/steps-v/step-01-validate.md` - **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-nfr/customize.toml b/src/workflows/testarch/bmad-testarch-nfr/customize.toml index a8b61c7..66bab72 100644 --- a/src/workflows/testarch/bmad-testarch-nfr/customize.toml +++ b/src/workflows/testarch/bmad-testarch-nfr/customize.toml @@ -7,7 +7,6 @@ # --- Configurable below. Overrides merge per BMad structural rules: --- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append -# arrays-of-tables with `code`/`id`: replace matching items, append new ones. # Steps to run before the standard activation (config load, greet). # Overrides append. Use for pre-flight loads, compliance checks, etc. @@ -28,7 +27,7 @@ activation_steps_append = [] # Each entry is either: # - a literal sentence, e.g. "Every test must run deterministically in CI." # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" -# (glob patterns are supported; the file's contents are loaded and treated as facts). +# (glob patterns are supported; matching files load in lexical path order as facts). persistent_facts = [ "file:{project-root}/**/project-context.md", diff --git a/src/workflows/testarch/bmad-testarch-nfr/steps-c/step-05-generate-report.md b/src/workflows/testarch/bmad-testarch-nfr/steps-c/step-05-generate-report.md index 30f7594..e541854 100644 --- a/src/workflows/testarch/bmad-testarch-nfr/steps-c/step-05-generate-report.md +++ b/src/workflows/testarch/bmad-testarch-nfr/steps-c/step-05-generate-report.md @@ -111,4 +111,6 @@ Report: Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-nfr/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-nfr/steps-e/step-02-apply-edit.md index 2fb0ad0..c096095 100644 --- a/src/workflows/testarch/bmad-testarch-nfr/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-nfr/steps-e/step-02-apply-edit.md @@ -63,4 +63,6 @@ Summarize the edits applied. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-nfr/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-nfr/steps-v/step-01-validate.md index 6b98317..2286c33 100644 --- a/src/workflows/testarch/bmad-testarch-nfr/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-nfr/steps-v/step-01-validate.md @@ -70,4 +70,6 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-test-design/SKILL.md b/src/workflows/testarch/bmad-testarch-test-design/SKILL.md index de7b0e2..cfe6853 100644 --- a/src/workflows/testarch/bmad-testarch-test-design/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-test-design/SKILL.md @@ -39,7 +39,7 @@ Execute each entry in `{workflow.activation_steps_prepend}` in order before proc ### Step 3: Load Persistent Facts -Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs resolved from `{project-root}` — expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim. ### Step 4: Load Config @@ -62,7 +62,7 @@ Activation is complete. Begin the workflow below. This workflow uses **tri-modal step-file architecture**: -- **Create mode (steps-c/)**: primary execution flow +- **Create mode (steps-c/)**: primary execution flow for new runs and resume continuation - **Validate mode (steps-v/)**: validation against checklist - **Edit mode (steps-e/)**: revise existing outputs @@ -72,15 +72,15 @@ This workflow uses **tri-modal step-file architecture**: "Welcome to the workflow. What would you like to do?" -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow +- **[C] Create** — Run the workflow from the beginning +- **[R] Resume** — Resume an interrupted Create workflow - **[V] Validate** — Validate existing outputs - **[E] Edit** — Edit existing outputs ### 2. Route to First Step - **If C:** Load `{skill-root}/steps-c/step-01-detect-mode.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` (Create-mode continuation) - **If V:** Load `{skill-root}/steps-v/step-01-validate.md` - **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-test-design/customize.toml b/src/workflows/testarch/bmad-testarch-test-design/customize.toml index e9cc226..571c873 100644 --- a/src/workflows/testarch/bmad-testarch-test-design/customize.toml +++ b/src/workflows/testarch/bmad-testarch-test-design/customize.toml @@ -7,7 +7,6 @@ # --- Configurable below. Overrides merge per BMad structural rules: --- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append -# arrays-of-tables with `code`/`id`: replace matching items, append new ones. # Steps to run before the standard activation (config load, greet). # Overrides append. Use for pre-flight loads, compliance checks, etc. @@ -28,7 +27,7 @@ activation_steps_append = [] # Each entry is either: # - a literal sentence, e.g. "Every test must run deterministically in CI." # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" -# (glob patterns are supported; the file's contents are loaded and treated as facts). +# (glob patterns are supported; matching files load in lexical path order as facts). persistent_facts = [ "file:{project-root}/**/project-context.md", diff --git a/src/workflows/testarch/bmad-testarch-test-design/steps-c/step-05-generate-output.md b/src/workflows/testarch/bmad-testarch-test-design/steps-c/step-05-generate-output.md index 5285dc4..a6a4205 100644 --- a/src/workflows/testarch/bmad-testarch-test-design/steps-c/step-05-generate-output.md +++ b/src/workflows/testarch/bmad-testarch-test-design/steps-c/step-05-generate-output.md @@ -231,4 +231,6 @@ Summarize: Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-test-design/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-test-design/steps-e/step-02-apply-edit.md index 2fb0ad0..c096095 100644 --- a/src/workflows/testarch/bmad-testarch-test-design/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-test-design/steps-e/step-02-apply-edit.md @@ -63,4 +63,6 @@ Summarize the edits applied. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-test-design/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-test-design/steps-v/step-01-validate.md index 81f4dec..846decc 100644 --- a/src/workflows/testarch/bmad-testarch-test-design/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-test-design/steps-v/step-01-validate.md @@ -70,4 +70,6 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-test-review/SKILL.md b/src/workflows/testarch/bmad-testarch-test-review/SKILL.md index 97d09ed..948bb66 100644 --- a/src/workflows/testarch/bmad-testarch-test-review/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-test-review/SKILL.md @@ -39,7 +39,7 @@ Execute each entry in `{workflow.activation_steps_prepend}` in order before proc ### Step 3: Load Persistent Facts -Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs resolved from `{project-root}` — expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim. ### Step 4: Load Config @@ -62,7 +62,7 @@ Activation is complete. Begin the workflow below. This workflow uses **tri-modal step-file architecture**: -- **Create mode (steps-c/)**: primary execution flow +- **Create mode (steps-c/)**: primary execution flow for new runs and resume continuation - **Validate mode (steps-v/)**: validation against checklist - **Edit mode (steps-e/)**: revise existing outputs @@ -72,14 +72,14 @@ This workflow uses **tri-modal step-file architecture**: "Welcome to the workflow. What would you like to do?" -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow +- **[C] Create** — Run the workflow from the beginning +- **[R] Resume** — Resume an interrupted Create workflow - **[V] Validate** — Validate existing outputs - **[E] Edit** — Edit existing outputs ### 2. Route to First Step - **If C:** Load `{skill-root}/steps-c/step-01-load-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` (Create-mode continuation) - **If V:** Load `{skill-root}/steps-v/step-01-validate.md` - **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-test-review/customize.toml b/src/workflows/testarch/bmad-testarch-test-review/customize.toml index a7e1de7..ab9006f 100644 --- a/src/workflows/testarch/bmad-testarch-test-review/customize.toml +++ b/src/workflows/testarch/bmad-testarch-test-review/customize.toml @@ -7,7 +7,6 @@ # --- Configurable below. Overrides merge per BMad structural rules: --- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append -# arrays-of-tables with `code`/`id`: replace matching items, append new ones. # Steps to run before the standard activation (config load, greet). # Overrides append. Use for pre-flight loads, compliance checks, etc. @@ -28,7 +27,7 @@ activation_steps_append = [] # Each entry is either: # - a literal sentence, e.g. "Every test must run deterministically in CI." # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" -# (glob patterns are supported; the file's contents are loaded and treated as facts). +# (glob patterns are supported; matching files load in lexical path order as facts). persistent_facts = [ "file:{project-root}/**/project-context.md", diff --git a/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-04-generate-report.md b/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-04-generate-report.md index 44048e8..852e26d 100644 --- a/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-04-generate-report.md +++ b/src/workflows/testarch/bmad-testarch-test-review/steps-c/step-04-generate-report.md @@ -114,4 +114,6 @@ Report: Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-test-review/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-test-review/steps-e/step-02-apply-edit.md index 2fb0ad0..c096095 100644 --- a/src/workflows/testarch/bmad-testarch-test-review/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-test-review/steps-e/step-02-apply-edit.md @@ -63,4 +63,6 @@ Summarize the edits applied. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-test-review/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-test-review/steps-v/step-01-validate.md index 416be4e..d126373 100644 --- a/src/workflows/testarch/bmad-testarch-test-review/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-test-review/steps-v/step-01-validate.md @@ -70,4 +70,6 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-trace/SKILL.md b/src/workflows/testarch/bmad-testarch-trace/SKILL.md index 53697db..9fdcec4 100644 --- a/src/workflows/testarch/bmad-testarch-trace/SKILL.md +++ b/src/workflows/testarch/bmad-testarch-trace/SKILL.md @@ -39,7 +39,7 @@ Execute each entry in `{workflow.activation_steps_prepend}` in order before proc ### Step 3: Load Persistent Facts -Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. +Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs resolved from `{project-root}` — expand them and load every matching file in lexical path order as facts. All other entries are facts verbatim. ### Step 4: Load Config @@ -62,7 +62,7 @@ Activation is complete. Begin the workflow below. This workflow uses **tri-modal step-file architecture**: -- **Create mode (steps-c/)**: primary execution flow +- **Create mode (steps-c/)**: primary execution flow for new runs and resume continuation - **Validate mode (steps-v/)**: validation against checklist - **Edit mode (steps-e/)**: revise existing outputs @@ -72,15 +72,15 @@ This workflow uses **tri-modal step-file architecture**: "Welcome to the workflow. What would you like to do?" -- **[C] Create** — Run the workflow -- **[R] Resume** — Resume an interrupted workflow +- **[C] Create** — Run the workflow from the beginning +- **[R] Resume** — Resume an interrupted Create workflow - **[V] Validate** — Validate existing outputs - **[E] Edit** — Edit existing outputs ### 2. Route to First Step - **If C:** Load `{skill-root}/steps-c/step-01-load-context.md` -- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` +- **If R:** Load `{skill-root}/steps-c/step-01b-resume.md` (Create-mode continuation) - **If V:** Load `{skill-root}/steps-v/step-01-validate.md` - **If E:** Load `{skill-root}/steps-e/step-01-assess.md` diff --git a/src/workflows/testarch/bmad-testarch-trace/customize.toml b/src/workflows/testarch/bmad-testarch-trace/customize.toml index f61b3cf..6e5236e 100644 --- a/src/workflows/testarch/bmad-testarch-trace/customize.toml +++ b/src/workflows/testarch/bmad-testarch-trace/customize.toml @@ -7,7 +7,6 @@ # --- Configurable below. Overrides merge per BMad structural rules: --- # scalars: override wins • arrays (persistent_facts, activation_steps_*): append -# arrays-of-tables with `code`/`id`: replace matching items, append new ones. # Steps to run before the standard activation (config load, greet). # Overrides append. Use for pre-flight loads, compliance checks, etc. @@ -28,7 +27,7 @@ activation_steps_append = [] # Each entry is either: # - a literal sentence, e.g. "Every test must run deterministically in CI." # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/test-standards.md" -# (glob patterns are supported; the file's contents are loaded and treated as facts). +# (glob patterns are supported; matching files load in lexical path order as facts). persistent_facts = [ "file:{project-root}/**/project-context.md", diff --git a/src/workflows/testarch/bmad-testarch-trace/steps-c/step-05-gate-decision.md b/src/workflows/testarch/bmad-testarch-trace/steps-c/step-05-gate-decision.md index 7c616e5..f22ad56 100644 --- a/src/workflows/testarch/bmad-testarch-trace/steps-c/step-05-gate-decision.md +++ b/src/workflows/testarch/bmad-testarch-trace/steps-c/step-05-gate-decision.md @@ -676,4 +676,6 @@ Then append the gate decision summary (from section 5 above) to the end of the e Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-trace/steps-e/step-02-apply-edit.md b/src/workflows/testarch/bmad-testarch-trace/steps-e/step-02-apply-edit.md index 2fb0ad0..c096095 100644 --- a/src/workflows/testarch/bmad-testarch-trace/steps-e/step-02-apply-edit.md +++ b/src/workflows/testarch/bmad-testarch-trace/steps-e/step-02-apply-edit.md @@ -63,4 +63,6 @@ Summarize the edits applied. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/src/workflows/testarch/bmad-testarch-trace/steps-v/step-01-validate.md b/src/workflows/testarch/bmad-testarch-trace/steps-v/step-01-validate.md index 03ef869..f6b29a1 100644 --- a/src/workflows/testarch/bmad-testarch-trace/steps-v/step-01-validate.md +++ b/src/workflows/testarch/bmad-testarch-trace/steps-v/step-01-validate.md @@ -70,4 +70,6 @@ Write a validation report to `{outputFile}` with PASS/WARN/FAIL per section. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` -If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. +If the resolver succeeds and returns a non-empty `workflow.on_complete`, execute that value as the final terminal instruction before exiting. + +If the resolver fails, returns no output, or resolves an empty value, skip the hook and exit normally. diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 38b4554..503dacc 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -240,31 +240,19 @@ async function runTests() { // ============================================================ console.log(`${colors.yellow}Test Suite 4: Workflow Structure${colors.reset}\n`); - const teachMeSkillPath = path.join(projectRoot, 'src/workflows/testarch/bmad-teach-me-testing/SKILL.md'); - try { - if (await pathExists(teachMeSkillPath)) { - const teachMeContent = await fs.readFile(teachMeSkillPath, 'utf8'); - assert(teachMeContent.length > 0, 'bmad-teach-me-testing/SKILL.md exists'); - assert(!teachMeContent.includes('_bmad/bmm/'), 'bmad-teach-me-testing has no _bmad/bmm/ references'); - } else { - assert(false, 'bmad-teach-me-testing workflow exists', 'src/workflows/testarch/bmad-teach-me-testing/SKILL.md not found'); - } - } catch (error) { - assert(false, 'teach-me-testing workflow validates', error.message); - } - - const workflowDirs = { - 'bmad-testarch-framework': 'framework', - 'bmad-testarch-ci': 'ci', - 'bmad-testarch-test-design': 'test-design', - 'bmad-testarch-atdd': 'atdd', - 'bmad-testarch-automate': 'automate', - 'bmad-testarch-test-review': 'test-review', - 'bmad-testarch-nfr': 'nfr-assess', - 'bmad-testarch-trace': 'trace', - }; - - for (const [dirName, displayName] of Object.entries(workflowDirs)) { + const workflowDirs = [ + 'bmad-teach-me-testing', + 'bmad-testarch-framework', + 'bmad-testarch-ci', + 'bmad-testarch-test-design', + 'bmad-testarch-atdd', + 'bmad-testarch-automate', + 'bmad-testarch-test-review', + 'bmad-testarch-nfr', + 'bmad-testarch-trace', + ]; + + for (const dirName of workflowDirs) { const skillMdPath = path.join(projectRoot, `src/workflows/testarch/${dirName}/SKILL.md`); const customizeTomlPath = path.join(projectRoot, `src/workflows/testarch/${dirName}/customize.toml`); const workflowYamlPath = path.join(projectRoot, `src/workflows/testarch/${dirName}/workflow.yaml`); @@ -273,6 +261,7 @@ async function runTests() { if (await pathExists(skillMdPath)) { try { const skillContent = await fs.readFile(skillMdPath, 'utf8'); + assert(skillContent && skillContent.trim().length > 0, `${dirName}/SKILL.md is not empty`); assert(skillContent.includes('## On Activation'), `${dirName}/SKILL.md has On Activation section`); assert( skillContent.includes('resolve_customization.py --skill {skill-root} --key workflow'), From 467d0a24e68d833769bbb21fe2dfae68e77ad402 Mon Sep 17 00:00:00 2001 From: murat Date: Thu, 23 Apr 2026 07:27:12 -0500 Subject: [PATCH 3/3] docs: readme update --- README.md | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 89a4031..e838064 100644 --- a/README.md +++ b/README.md @@ -28,26 +28,28 @@ BMad is a small **agent + workflow engine**. There is no external orchestrator ### Building Blocks -Each workflow directory contains these files, and each has a specific job: - -| File | What it does | When it loads | -| ----------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `SKILL.md` | Expert persona — identity, principles, critical actions, capabilities table | First — always in context | -| `workflow.yaml` | Machine-readable metadata — config variables, required tools, tags | Second — resolves `{project-root}`, `{config_source}`, `{test_artifacts}` | -| `workflow.md` | Human-readable entry point — goals, mode menu (Create/Edit/Validate), routes to first step | Second — presents mode choice | -| `instructions.md` | Workflow-specific rules and context (optional, supplements workflow.md) | On demand | -| `steps-c/*.md` | **Create** steps — primary execution, 5-9 sequential files | One at a time (just-in-time) | -| `steps-e/*.md` | **Edit** steps — always 2 files: assess target, apply edit | One at a time | -| `steps-v/*.md` | **Validate** steps — always 1 file: evaluate against checklist | On demand | -| `checklist.md` | Validation criteria — what "done" looks like for this workflow | Read by steps-v | -| `*-template.md` | Output skeleton with `{PLACEHOLDER}` vars — steps fill these in to produce the final artifact | Read by steps-c when generating output | -| `tea-index.csv` | Knowledge fragment index — id, name, tags, tier (core/extended/specialized), file path | Read by step-01 to decide which fragments to load | -| `knowledge/*.md` | 40 reusable fragments — standards, patterns, API references (e.g., `data-factories.md`, `pactjs-utils-overview.md`) | Selectively read into context based on tier + config flags | +TEA has two layers of files, and each has a specific job: + +| File / Scope | What it does | When it loads | +| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | +| `src/agents/bmad-tea/SKILL.md` | Murat's persona — identity, principles, critical actions, capabilities table | First — activates the TEA agent | +| `src/agents/bmad-tea/customize.toml` | Agent customization surface — menu items, persistent facts, activation hooks | During agent activation | +| `src/workflows/testarch//SKILL.md` | Workflow entrypoint — resolves workflow customization, picks mode, routes to the first step | When a TEA workflow is invoked | +| `src/workflows/testarch//customize.toml` | Workflow customization surface — activation hooks, persistent facts, optional `on_complete` behavior | During workflow activation | +| `src/workflows/testarch//workflow.yaml` | Machine-readable workflow metadata — descriptions, defaults, tool hints, output paths | Used by installer/tooling and workflow metadata lookups | +| `instructions.md` | Workflow-specific summary and operator notes | On demand | +| `steps-c/*.md` | **Create** steps — primary execution, 5-9 sequential files | One at a time (just-in-time) | +| `steps-e/*.md` | **Edit** steps — always 2 files: assess target, apply edit | One at a time | +| `steps-v/*.md` | **Validate** steps — always 1 file: evaluate against checklist | On demand | +| `checklist.md` | Validation criteria — what "done" looks like for this workflow | Read by steps-v | +| `*-template.md` | Output skeleton with `{PLACEHOLDER}` vars — steps fill these in to produce the final artifact | Read by steps-c when generating output | +| `src/agents/bmad-tea/resources/tea-index.csv` | Knowledge fragment index — id, name, tags, tier (core/extended/specialized), file path | Read to decide which shared TEA fragments to load | +| `resources/knowledge/*.md` | Reusable fragments — standards, patterns, API references | Selectively read into context based on tier + config | ```mermaid flowchart LR U[User] --> A[Agent Persona] - A --> W[Workflow Entry: workflow.md] + A --> W[Workflow Entry: workflow SKILL.md] W --> S[Step Files: steps-c / steps-e / steps-v] S --> K[Knowledge Fragments
tea-index.csv → knowledge/*.md] S --> T[Templates & Checklists
*-template.md, checklist.md] @@ -59,8 +61,8 @@ flowchart LR 1. **Trigger** — Direct commands are `/bmad:tea:automate` (Claude/Cursor/Windsurf) and `$bmad-tea-testarch-automate` (Codex). Load the conversational TEA menu with `$bmad-tea` in Codex. `TA` is an agent-menu trigger available only after TEA is activated; the capabilities table in `SKILL.md` maps `TA` to the `bmad-testarch-automate` skill. 2. **Agent loads** — `SKILL.md` injects the persona (identity, principles, critical actions) into the context window. -3. **Workflow loads** — `workflow.yaml` resolves config variables and `workflow.md` presents the mode menu (Create / Edit / Validate), then routes to the first step file. -4. **Step-by-step execution** — Only the current step file is in context (just-in-time loading). Each step explicitly names the next one (`nextStepFile: './step-02-...'`). The LLM reads, executes, saves output, then loads the next step. No future steps are ever preloaded. +3. **Workflow loads** — The workflow's `SKILL.md` becomes the entrypoint. It resolves the workflow block from `customize.toml`, loads persistent facts and config, decides the mode (Create / Edit / Validate), then routes to the first step file. +4. **Step-by-step execution** — Only the current step file is in context (just-in-time loading). Each step explicitly names the next one with a `{skill-root}`-anchored path. The LLM reads, executes, saves output, then loads the next step. No future steps are ever preloaded. 5. **Knowledge injection** — Step-01 reads `tea-index.csv` and selectively loads fragments by **tier** (core = always, extended = on-demand, specialized = only when relevant) and **config flags** (e.g., `tea_use_pactjs_utils`). This is deliberate context engineering: a backend project loads ~1,800 lines of fragments; a fullstack project loads ~4,500 lines. Conditional loading cuts context usage by 40-50%. 6. **Templates** — When a step produces output (e.g., a traceability matrix or test review report), it reads the `*-template.md` file and fills in the `{PLACEHOLDER}` values with computed results. The template provides consistent structure; the step provides the content. 7. **Subagent isolation** — Heavy workflows (e.g., `automate`) spawn parallel subagents that each run in an isolated context. Subagents write structured JSON to temp files. An aggregation step reads the JSON outputs — only the results enter the main context, not the full subagent history. @@ -84,12 +86,12 @@ BMad workflows and Claude Code Skills solve different problems at different scal The key insight is that there is **no external runtime engine** — the LLM _is_ the engine. BMad workflows are structured markdown that the LLM follows as instructions: "read this file, execute it completely, save your output, load the next file." Skills are a single tool in a toolbox; BMad workflows are a workshop with a process manual. -**How workflows become commands.** When you run `npx bmad-method install`, the installer generates tool-specific artifacts for your runtime (for example, Claude Code uses `.claude/commands/`, while Codex uses `.agents/skills/`). In Claude Code, `bmad-tea-testarch-automate.md` tells the LLM: "load the core workflow engine (`workflow.xml`), pass it this workflow config (`automate/workflow.yaml`), follow the instructions exactly." That launcher artifact is the bridge — it triggers the workflow entry point; the multi-step engine takes over from there. +**How workflows become commands.** When you run `npx bmad-method install`, the installer generates tool-specific artifacts for your runtime (for example, Claude Code uses `.claude/commands/`, while Codex uses `.agents/skills/`). Those launchers bridge into the installed TEA agent or workflow package. Once invoked, the workflow's `SKILL.md` is the conversational entrypoint, and the step-file process takes over from there. ```text .claude/commands/ # Generated by installer ├── bmad-tea.md # /tea → loads agent persona + menu -├── bmad-tea-testarch-automate.md # /automate → loads workflow.xml + workflow.yaml +├── bmad-tea-testarch-automate.md # /automate → invokes the automate workflow package ├── bmad-tea-testarch-test-design.md # /test-design → ... ├── bmad-bmm-create-prd.md # /create-prd → BMM workflow └── ... (61 commands total across all installed modules) @@ -174,7 +176,12 @@ Workflows load only the fragments required for the current task to stay focused src/ ├── module.yaml ├── agents/ -│ └── bmad-tea/ # Native skill: SKILL.md + bmad-skill-manifest.yaml +│ └── bmad-tea/ +│ ├── SKILL.md +│ ├── customize.toml +│ └── resources/ +│ ├── tea-index.csv +│ └── knowledge/ ├── workflows/ │ └── testarch/ │ ├── bmad-teach-me-testing/ @@ -186,11 +193,6 @@ src/ │ ├── bmad-testarch-test-design/ │ ├── bmad-testarch-test-review/ │ └── bmad-testarch-trace/ -└── agents/ - └── bmad-tea/ - └── resources/ - ├── tea-index.csv - └── knowledge/ ``` ## Extending TEA