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 <critical> blocks
from instruction files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Verkhovsky 2026-03-08 09:21:47 -06:00
parent 0782e291fd
commit 547248ca1b
12 changed files with 131 additions and 96 deletions

View File

@ -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"

View File

@ -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

View File

@ -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",,,

1 module phase name code sequence workflow-file command required agent options description output-location outputs
2 bmm anytime Document Project DP _bmad/bmm/workflows/document-project/workflow.yaml _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 *
3 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
4 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
5 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

View File

@ -1,7 +1,5 @@
# Document Project Workflow Router
<critical>The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {project-root}/_bmad/bmm/workflows/document-project/workflow.yaml</critical>
<critical>Communicate all responses in {communication_language}</critical>
<workflow>
@ -49,11 +47,11 @@
<action>Display: "Resuming {{workflow_mode}} from {{current_step}} with cached project type(s): {{cached_project_types}}"</action>
<check if="workflow_mode == deep_dive">
<action>Read fully and follow: {installed_path}/workflows/deep-dive-instructions.md with resume context</action>
<action>Read fully and follow: {installed_path}/workflows/deep-dive-workflow.md with resume context</action>
</check>
<check if="workflow_mode == initial_scan OR workflow_mode == full_rescan">
<action>Read fully and follow: {installed_path}/workflows/full-scan-instructions.md with resume context</action>
<action>Read fully and follow: {installed_path}/workflows/full-scan-workflow.md with resume context</action>
</check>
</check>
@ -100,7 +98,7 @@ Your choice [1/2/3]:
<check if="user selects 1">
<action>Set workflow_mode = "full_rescan"</action>
<action>Display: "Starting full project rescan..."</action>
<action>Read fully and follow: {installed_path}/workflows/full-scan-instructions.md</action>
<action>Read fully and follow: {installed_path}/workflows/full-scan-workflow.md</action>
<action>After sub-workflow completes, continue to Step 4</action>
</check>
@ -108,7 +106,7 @@ Your choice [1/2/3]:
<action>Set workflow_mode = "deep_dive"</action>
<action>Set scan_level = "exhaustive"</action>
<action>Display: "Starting deep-dive documentation mode..."</action>
<action>Read fully and follow: {installed_path}/workflows/deep-dive-instructions.md</action>
<action>Read fully and follow: {installed_path}/workflows/deep-dive-workflow.md</action>
<action>After sub-workflow completes, continue to Step 4</action>
</check>
@ -121,7 +119,7 @@ Your choice [1/2/3]:
<check if="index.md does not exist">
<action>Set workflow_mode = "initial_scan"</action>
<action>Display: "No existing documentation found. Starting initial project scan..."</action>
<action>Read fully and follow: {installed_path}/workflows/full-scan-instructions.md</action>
<action>Read fully and follow: {installed_path}/workflows/full-scan-workflow.md</action>
<action>After sub-workflow completes, continue to Step 4</action>
</check>

View File

@ -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`

View File

@ -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"

View File

@ -3,7 +3,6 @@
<workflow>
<critical>This workflow performs exhaustive deep-dive documentation of specific areas</critical>
<critical>Called by: ../document-project/instructions.md router</critical>
<critical>Handles: deep_dive mode only</critical>
<step n="13" goal="Deep-dive documentation of specific area" if="workflow_mode == deep_dive">

View File

@ -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`

View File

@ -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

View File

@ -3,7 +3,6 @@
<workflow>
<critical>This workflow performs complete project documentation (Steps 1-12)</critical>
<critical>Called by: document-project/instructions.md router</critical>
<critical>Handles: initial_scan and full_rescan modes</critical>
<step n="0.5" goal="Load documentation requirements data for fresh starts (not needed for resume)" if="resume_mode == false">

View File

@ -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`

View File

@ -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