From 547248ca1b919fe036c46b63fa0187433cca8793 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Sun, 8 Mar 2026 09:21:47 -0600 Subject: [PATCH] refactor: convert document-project workflow.yaml to workflow.md (step 9) Convert main workflow and both sub-workflows (deep-dive, full-scan) from legacy .yaml entry point format to unified .md format. Update agent files and module-help.csv references. Clean engine-scaffolding blocks from instruction files. Co-Authored-By: Claude Opus 4.6 --- src/bmm/agents/analyst.agent.yaml | 2 +- .../agents/tech-writer/tech-writer.agent.yaml | 2 +- src/bmm/module-help.csv | 2 +- .../document-project/instructions.md | 12 +++--- .../workflows/document-project/workflow.md | 39 +++++++++++++++++ .../workflows/document-project/workflow.yaml | 22 ---------- .../workflows/deep-dive-instructions.md | 1 - .../workflows/deep-dive-workflow.md | 42 +++++++++++++++++++ .../document-project/workflows/deep-dive.yaml | 31 -------------- .../workflows/full-scan-instructions.md | 1 - .../workflows/full-scan-workflow.md | 42 +++++++++++++++++++ .../document-project/workflows/full-scan.yaml | 31 -------------- 12 files changed, 131 insertions(+), 96 deletions(-) create mode 100644 src/bmm/workflows/document-project/workflow.md delete mode 100644 src/bmm/workflows/document-project/workflow.yaml create mode 100644 src/bmm/workflows/document-project/workflows/deep-dive-workflow.md delete mode 100644 src/bmm/workflows/document-project/workflows/deep-dive.yaml create mode 100644 src/bmm/workflows/document-project/workflows/full-scan-workflow.md delete mode 100644 src/bmm/workflows/document-project/workflows/full-scan.yaml diff --git a/src/bmm/agents/analyst.agent.yaml b/src/bmm/agents/analyst.agent.yaml index 28120d098..7814ee609 100644 --- a/src/bmm/agents/analyst.agent.yaml +++ b/src/bmm/agents/analyst.agent.yaml @@ -39,5 +39,5 @@ agent: description: "[CB] Create Brief: A guided experience to nail down your product idea into an executive brief" - trigger: DP or fuzzy match on document-project - workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.yaml" + workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.md" description: "[DP] Document Project: Analyze an existing project to produce useful documentation for both human and LLM" diff --git a/src/bmm/agents/tech-writer/tech-writer.agent.yaml b/src/bmm/agents/tech-writer/tech-writer.agent.yaml index 555bd7981..da3fe9c91 100644 --- a/src/bmm/agents/tech-writer/tech-writer.agent.yaml +++ b/src/bmm/agents/tech-writer/tech-writer.agent.yaml @@ -22,7 +22,7 @@ agent: menu: - trigger: DP or fuzzy match on document-project - workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.yaml" + workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.md" description: "[DP] Document Project: Generate comprehensive project documentation (brownfield analysis, architecture scanning)" - trigger: WD or fuzzy match on write-document diff --git a/src/bmm/module-help.csv b/src/bmm/module-help.csv index 5872c20dd..73482ae56 100644 --- a/src/bmm/module-help.csv +++ b/src/bmm/module-help.csv @@ -1,5 +1,5 @@ module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs, -bmm,anytime,Document Project,DP,,_bmad/bmm/workflows/document-project/workflow.yaml,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze an existing project to produce useful documentation",project-knowledge,*, +bmm,anytime,Document Project,DP,,_bmad/bmm/workflows/document-project/workflow.md,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze an existing project to produce useful documentation",project-knowledge,*, bmm,anytime,Generate Project Context,GPC,,_bmad/bmm/workflows/generate-project-context/workflow.md,bmad-bmm-generate-project-context,false,analyst,Create Mode,"Scan existing codebase to generate a lean LLM-optimized project-context.md containing critical implementation rules patterns and conventions for AI agents. Essential for brownfield projects and quick-flow.",output_folder,"project context", bmm,anytime,Quick Spec,QS,,_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md,bmad-bmm-quick-spec,false,quick-flow-solo-dev,Create Mode,"Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method. Quick one-off tasks small changes simple apps brownfield additions to well established patterns utilities without extensive planning",planning_artifacts,"tech spec", bmm,anytime,Quick Dev,QD,,_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md,bmad-bmm-quick-dev,false,quick-flow-solo-dev,Create Mode,"Quick one-off tasks small changes simple apps utilities without extensive planning - Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method, unless the user is already working through the implementation phase and just requests a 1 off things not already in the plan",,, diff --git a/src/bmm/workflows/document-project/instructions.md b/src/bmm/workflows/document-project/instructions.md index 0354be610..64f652247 100644 --- a/src/bmm/workflows/document-project/instructions.md +++ b/src/bmm/workflows/document-project/instructions.md @@ -1,7 +1,5 @@ # Document Project Workflow Router -The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml -You MUST have already loaded and processed: {project-root}/_bmad/bmm/workflows/document-project/workflow.yaml Communicate all responses in {communication_language} @@ -49,11 +47,11 @@ Display: "Resuming {{workflow_mode}} from {{current_step}} with cached project type(s): {{cached_project_types}}" - Read fully and follow: {installed_path}/workflows/deep-dive-instructions.md with resume context + Read fully and follow: {installed_path}/workflows/deep-dive-workflow.md with resume context - Read fully and follow: {installed_path}/workflows/full-scan-instructions.md with resume context + Read fully and follow: {installed_path}/workflows/full-scan-workflow.md with resume context @@ -100,7 +98,7 @@ Your choice [1/2/3]: Set workflow_mode = "full_rescan" Display: "Starting full project rescan..." - Read fully and follow: {installed_path}/workflows/full-scan-instructions.md + Read fully and follow: {installed_path}/workflows/full-scan-workflow.md After sub-workflow completes, continue to Step 4 @@ -108,7 +106,7 @@ Your choice [1/2/3]: Set workflow_mode = "deep_dive" Set scan_level = "exhaustive" Display: "Starting deep-dive documentation mode..." - Read fully and follow: {installed_path}/workflows/deep-dive-instructions.md + Read fully and follow: {installed_path}/workflows/deep-dive-workflow.md After sub-workflow completes, continue to Step 4 @@ -121,7 +119,7 @@ Your choice [1/2/3]: Set workflow_mode = "initial_scan" Display: "No existing documentation found. Starting initial project scan..." - Read fully and follow: {installed_path}/workflows/full-scan-instructions.md + Read fully and follow: {installed_path}/workflows/full-scan-workflow.md After sub-workflow completes, continue to Step 4 diff --git a/src/bmm/workflows/document-project/workflow.md b/src/bmm/workflows/document-project/workflow.md new file mode 100644 index 000000000..cd7d9d33d --- /dev/null +++ b/src/bmm/workflows/document-project/workflow.md @@ -0,0 +1,39 @@ +--- +name: document-project +description: 'Document brownfield projects for AI context. Use when the user says "document this project" or "generate project docs"' +--- + +# Document Project Workflow + +**Goal:** Document brownfield projects for AI context. + +**Your Role:** Project documentation specialist. +- Communicate all responses in {communication_language} + +--- + +## INITIALIZATION + +### Configuration Loading + +Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + +- `project_knowledge` +- `user_name` +- `communication_language` +- `document_output_language` +- `user_skill_level` +- `date` as system-generated current datetime + +### Paths + +- `installed_path` = `{project-root}/_bmad/bmm/workflows/document-project` +- `instructions` = `{installed_path}/instructions.md` +- `validation` = `{installed_path}/checklist.md` +- `documentation_requirements_csv` = `{installed_path}/documentation-requirements.csv` + +--- + +## EXECUTION + +Read fully and follow: `{installed_path}/instructions.md` diff --git a/src/bmm/workflows/document-project/workflow.yaml b/src/bmm/workflows/document-project/workflow.yaml deleted file mode 100644 index a47acf090..000000000 --- a/src/bmm/workflows/document-project/workflow.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Document Project Workflow Configuration -name: "document-project" -version: "1.2.0" -description: 'Document brownfield projects for AI context. Use when the user says "document this project" or "generate project docs"' -author: "BMad" - -# Critical variables -config_source: "{project-root}/_bmad/bmm/config.yaml" -project_knowledge: "{config_source}:project_knowledge" -user_name: "{config_source}:user_name" -communication_language: "{config_source}:communication_language" -document_output_language: "{config_source}:document_output_language" -user_skill_level: "{config_source}:user_skill_level" -date: system-generated - -# Module path and component files -installed_path: "{project-root}/_bmad/bmm/workflows/document-project" -instructions: "{installed_path}/instructions.md" -validation: "{installed_path}/checklist.md" - -# Required data files - CRITICAL for project type detection and documentation requirements -documentation_requirements_csv: "{installed_path}/documentation-requirements.csv" diff --git a/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md b/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md index 637621c4c..396a2e43a 100644 --- a/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md +++ b/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md @@ -3,7 +3,6 @@ This workflow performs exhaustive deep-dive documentation of specific areas -Called by: ../document-project/instructions.md router Handles: deep_dive mode only diff --git a/src/bmm/workflows/document-project/workflows/deep-dive-workflow.md b/src/bmm/workflows/document-project/workflows/deep-dive-workflow.md new file mode 100644 index 000000000..1b1f95fbb --- /dev/null +++ b/src/bmm/workflows/document-project/workflows/deep-dive-workflow.md @@ -0,0 +1,42 @@ +--- +name: document-project-deep-dive +description: 'Exhaustive deep-dive documentation of specific project areas' +--- + +# Deep-Dive Documentation Sub-Workflow + +**Goal:** Exhaustive deep-dive documentation of specific project areas. + +**Your Role:** Deep-dive documentation specialist. +- Deep-dive mode requires literal full-file review. Sampling, guessing, or relying solely on tooling output is FORBIDDEN. + +--- + +## INITIALIZATION + +### Configuration Loading + +Load config from `{project-root}/_bmad/bmb/config.yaml` and resolve: + +- `project_knowledge` +- `user_name` +- `date` as system-generated current datetime + +### Paths + +- `installed_path` = `{project-root}/_bmad/bmm/workflows/document-project/workflows` +- `instructions` = `{installed_path}/deep-dive-instructions.md` +- `validation` = `{project-root}/_bmad/bmm/workflows/document-project/checklist.md` +- `deep_dive_template` = `{project-root}/_bmad/bmm/workflows/document-project/templates/deep-dive-template.md` + +### Runtime Inputs + +- `workflow_mode` = `deep_dive` +- `scan_level` = `exhaustive` +- `autonomous` = `false` (requires user input to select target area) + +--- + +## EXECUTION + +Read fully and follow: `{installed_path}/deep-dive-instructions.md` diff --git a/src/bmm/workflows/document-project/workflows/deep-dive.yaml b/src/bmm/workflows/document-project/workflows/deep-dive.yaml deleted file mode 100644 index c7b85c031..000000000 --- a/src/bmm/workflows/document-project/workflows/deep-dive.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Deep-Dive Documentation Workflow Configuration -name: "document-project-deep-dive" -description: "Exhaustive deep-dive documentation of specific project areas" -author: "BMad" - -# This is a sub-workflow called by document-project/workflow.yaml -parent_workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.yaml" - -# Critical variables inherited from parent -config_source: "{project-root}/_bmad/bmb/config.yaml" -project_knowledge: "{config_source}:project_knowledge" -user_name: "{config_source}:user_name" -date: system-generated - -# Module path and component files -installed_path: "{project-root}/_bmad/bmm/workflows/document-project/workflows" -template: false # Action workflow -instructions: "{installed_path}/deep-dive-instructions.md" -validation: "{project-root}/_bmad/bmm/workflows/document-project/checklist.md" - -# Templates -deep_dive_template: "{project-root}/_bmad/bmm/workflows/document-project/templates/deep-dive-template.md" - -# Runtime inputs (passed from parent workflow) -workflow_mode: "deep_dive" -scan_level: "exhaustive" # Deep-dive always uses exhaustive scan -project_root_path: "" -existing_index_path: "" # Path to existing index.md - -# Configuration -autonomous: false # Requires user input to select target area diff --git a/src/bmm/workflows/document-project/workflows/full-scan-instructions.md b/src/bmm/workflows/document-project/workflows/full-scan-instructions.md index 8a3621d21..d2a8a1e79 100644 --- a/src/bmm/workflows/document-project/workflows/full-scan-instructions.md +++ b/src/bmm/workflows/document-project/workflows/full-scan-instructions.md @@ -3,7 +3,6 @@ This workflow performs complete project documentation (Steps 1-12) -Called by: document-project/instructions.md router Handles: initial_scan and full_rescan modes diff --git a/src/bmm/workflows/document-project/workflows/full-scan-workflow.md b/src/bmm/workflows/document-project/workflows/full-scan-workflow.md new file mode 100644 index 000000000..53595d48d --- /dev/null +++ b/src/bmm/workflows/document-project/workflows/full-scan-workflow.md @@ -0,0 +1,42 @@ +--- +name: document-project-full-scan +description: 'Complete project documentation workflow (initial scan or full rescan)' +--- + +# Full Project Scan Sub-Workflow + +**Goal:** Complete project documentation (initial scan or full rescan). + +**Your Role:** Full project scan documentation specialist. + +--- + +## INITIALIZATION + +### Configuration Loading + +Load config from `{project-root}/_bmad/bmb/config.yaml` and resolve: + +- `project_knowledge` +- `user_name` +- `date` as system-generated current datetime + +### Paths + +- `installed_path` = `{project-root}/_bmad/bmm/workflows/document-project/workflows` +- `instructions` = `{installed_path}/full-scan-instructions.md` +- `validation` = `{project-root}/_bmad/bmm/workflows/document-project/checklist.md` +- `documentation_requirements_csv` = `{project-root}/_bmad/bmm/workflows/document-project/documentation-requirements.csv` + +### Runtime Inputs + +- `workflow_mode` = `""` (set by parent: `initial_scan` or `full_rescan`) +- `scan_level` = `""` (set by parent: `quick`, `deep`, or `exhaustive`) +- `resume_mode` = `false` +- `autonomous` = `false` (requires user input at key decision points) + +--- + +## EXECUTION + +Read fully and follow: `{installed_path}/full-scan-instructions.md` diff --git a/src/bmm/workflows/document-project/workflows/full-scan.yaml b/src/bmm/workflows/document-project/workflows/full-scan.yaml deleted file mode 100644 index 272baedda..000000000 --- a/src/bmm/workflows/document-project/workflows/full-scan.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Full Project Scan Workflow Configuration -name: "document-project-full-scan" -description: "Complete project documentation workflow (initial scan or full rescan)" -author: "BMad" - -# This is a sub-workflow called by document-project/workflow.yaml -parent_workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.yaml" - -# Critical variables inherited from parent -config_source: "{project-root}/_bmad/bmb/config.yaml" -project_knowledge: "{config_source}:project_knowledge" -user_name: "{config_source}:user_name" -date: system-generated - -# Data files -documentation_requirements_csv: "{project-root}/_bmad/bmm/workflows/document-project/documentation-requirements.csv" - -# Module path and component files -installed_path: "{project-root}/_bmad/bmm/workflows/document-project/workflows" -template: false # Action workflow -instructions: "{installed_path}/full-scan-instructions.md" -validation: "{project-root}/_bmad/bmm/workflows/document-project/checklist.md" - -# Runtime inputs (passed from parent workflow) -workflow_mode: "" # "initial_scan" or "full_rescan" -scan_level: "" # "quick", "deep", or "exhaustive" -resume_mode: false -project_root_path: "" - -# Configuration -autonomous: false # Requires user input at key decision points