\split analyze workflow
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# Document Project Workflow Templates
|
||||
|
||||
This directory contains template files for the `document-project` workflow.
|
||||
|
||||
## Template Files
|
||||
|
||||
- **index-template.md** - Master index template (adapts for single/multi-part projects)
|
||||
- **project-overview-template.md** - Executive summary and high-level overview
|
||||
- **source-tree-template.md** - Annotated directory structure
|
||||
|
||||
## Template Usage
|
||||
|
||||
The workflow dynamically selects and populates templates based on:
|
||||
|
||||
1. **Project structure** (single part vs multi-part)
|
||||
2. **Project type** (web, backend, mobile, etc.)
|
||||
3. **Documentation requirements** (from documentation-requirements.csv)
|
||||
|
||||
## Variable Naming Convention
|
||||
|
||||
Templates use Handlebars-style variables:
|
||||
|
||||
- `{{variable_name}}` - Simple substitution
|
||||
- `{{#if condition}}...{{/if}}` - Conditional blocks
|
||||
- `{{#each collection}}...{{/each}}` - Iteration
|
||||
|
||||
## Additional Templates
|
||||
|
||||
Architecture-specific templates are dynamically loaded from:
|
||||
`/bmad/bmm/workflows/3-solutioning/templates/`
|
||||
|
||||
Based on the matched architecture type from the registry.
|
||||
|
||||
## Notes
|
||||
|
||||
- Templates support both simple and complex project structures
|
||||
- Multi-part projects get part-specific file naming (e.g., `architecture-{part_id}.md`)
|
||||
- Single-part projects use simplified naming (e.g., `architecture.md`)
|
||||
@@ -0,0 +1,31 @@
|
||||
# {{target_name}} - Deep Dive Documentation
|
||||
|
||||
**Generated:** {{date}}
|
||||
**Scope:** {{target_path}}
|
||||
**Files Analyzed:** {{file_count}}
|
||||
**Lines of Code:** {{total_loc}}
|
||||
**Workflow Mode:** Exhaustive Deep-Dive
|
||||
|
||||
## Overview
|
||||
|
||||
{{target_description}}
|
||||
|
||||
---
|
||||
|
||||
**Note:** The deep-dive documentation structure is defined inline in Step 13e of instructions.md.
|
||||
This template file serves as a reference and placeholder for the deep-dive generation process.
|
||||
|
||||
The actual documentation includes:
|
||||
|
||||
- Complete file inventory with all exports and signatures
|
||||
- Dependency graphs and data flow analysis
|
||||
- Integration points and API contracts
|
||||
- Testing coverage and strategies
|
||||
- Related code and reuse opportunities
|
||||
- Implementation guidance and modification notes
|
||||
|
||||
See Step 13e in instructions.md for the complete template structure.
|
||||
|
||||
---
|
||||
|
||||
_Generated by `document-project` workflow (deep-dive mode)_
|
||||
@@ -0,0 +1,169 @@
|
||||
# {{project_name}} Documentation Index
|
||||
|
||||
**Type:** {{repository_type}}{{#if is_multi_part}} with {{parts_count}} parts{{/if}}
|
||||
**Primary Language:** {{primary_language}}
|
||||
**Architecture:** {{architecture_type}}
|
||||
**Last Updated:** {{date}}
|
||||
|
||||
## Project Overview
|
||||
|
||||
{{project_description}}
|
||||
|
||||
{{#if is_multi_part}}
|
||||
|
||||
## Project Structure
|
||||
|
||||
This project consists of {{parts_count}} parts:
|
||||
|
||||
{{#each project_parts}}
|
||||
|
||||
### {{part_name}} ({{part_id}})
|
||||
|
||||
- **Type:** {{project_type}}
|
||||
- **Location:** `{{root_path}}`
|
||||
- **Tech Stack:** {{tech_stack_summary}}
|
||||
- **Entry Point:** {{entry_point}}
|
||||
{{/each}}
|
||||
|
||||
## Cross-Part Integration
|
||||
|
||||
{{integration_summary}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
## Quick Reference
|
||||
|
||||
{{#if is_single_part}}
|
||||
|
||||
- **Tech Stack:** {{tech_stack_summary}}
|
||||
- **Entry Point:** {{entry_point}}
|
||||
- **Architecture Pattern:** {{architecture_pattern}}
|
||||
- **Database:** {{database}}
|
||||
- **Deployment:** {{deployment_platform}}
|
||||
{{else}}
|
||||
{{#each project_parts}}
|
||||
|
||||
### {{part_name}} Quick Ref
|
||||
|
||||
- **Stack:** {{tech_stack_summary}}
|
||||
- **Entry:** {{entry_point}}
|
||||
- **Pattern:** {{architecture_pattern}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
## Generated Documentation
|
||||
|
||||
### Core Documentation
|
||||
|
||||
- [Project Overview](./project-overview.md) - Executive summary and high-level architecture
|
||||
- [Source Tree Analysis](./source-tree-analysis.md) - Annotated directory structure
|
||||
|
||||
{{#if is_single_part}}
|
||||
|
||||
- [Architecture](./architecture.md) - Detailed technical architecture
|
||||
- [Component Inventory](./component-inventory.md) - Catalog of major components{{#if has_ui_components}} and UI elements{{/if}}
|
||||
- [Development Guide](./development-guide.md) - Local setup and development workflow
|
||||
{{#if has_api_docs}}- [API Contracts](./api-contracts.md) - API endpoints and schemas{{/if}}
|
||||
{{#if has_data_models}}- [Data Models](./data-models.md) - Database schema and models{{/if}}
|
||||
{{else}}
|
||||
|
||||
### Part-Specific Documentation
|
||||
|
||||
{{#each project_parts}}
|
||||
|
||||
#### {{part_name}} ({{part_id}})
|
||||
|
||||
- [Architecture](./architecture-{{part_id}}.md) - Technical architecture for {{part_name}}
|
||||
{{#if has_components}}- [Components](./component-inventory-{{part_id}}.md) - Component catalog{{/if}}
|
||||
- [Development Guide](./development-guide-{{part_id}}.md) - Setup and dev workflow
|
||||
{{#if has_api}}- [API Contracts](./api-contracts-{{part_id}}.md) - API documentation{{/if}}
|
||||
{{#if has_data}}- [Data Models](./data-models-{{part_id}}.md) - Data architecture{{/if}}
|
||||
{{/each}}
|
||||
|
||||
### Integration
|
||||
|
||||
- [Integration Architecture](./integration-architecture.md) - How parts communicate
|
||||
- [Project Parts Metadata](./project-parts.json) - Machine-readable structure
|
||||
{{/if}}
|
||||
|
||||
### Optional Documentation
|
||||
|
||||
{{#if has_deployment_guide}}- [Deployment Guide](./deployment-guide.md) - Deployment process and infrastructure{{/if}}
|
||||
{{#if has_contribution_guide}}- [Contribution Guide](./contribution-guide.md) - Contributing guidelines and standards{{/if}}
|
||||
|
||||
## Existing Documentation
|
||||
|
||||
{{#if has_existing_docs}}
|
||||
{{#each existing_docs}}
|
||||
|
||||
- [{{title}}]({{path}}) - {{description}}
|
||||
{{/each}}
|
||||
{{else}}
|
||||
No existing documentation files were found in the project.
|
||||
{{/if}}
|
||||
|
||||
## Getting Started
|
||||
|
||||
{{#if is_single_part}}
|
||||
|
||||
### Prerequisites
|
||||
|
||||
{{prerequisites}}
|
||||
|
||||
### Setup
|
||||
|
||||
```bash
|
||||
{{setup_commands}}
|
||||
```
|
||||
|
||||
### Run Locally
|
||||
|
||||
```bash
|
||||
{{run_commands}}
|
||||
```
|
||||
|
||||
### Run Tests
|
||||
|
||||
```bash
|
||||
{{test_commands}}
|
||||
```
|
||||
|
||||
{{else}}
|
||||
{{#each project_parts}}
|
||||
|
||||
### {{part_name}} Setup
|
||||
|
||||
**Prerequisites:** {{prerequisites}}
|
||||
|
||||
**Install & Run:**
|
||||
|
||||
```bash
|
||||
cd {{root_path}}
|
||||
{{setup_command}}
|
||||
{{run_command}}
|
||||
```
|
||||
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
## For AI-Assisted Development
|
||||
|
||||
This documentation was generated specifically to enable AI agents to understand and extend this codebase.
|
||||
|
||||
### When Planning New Features:
|
||||
|
||||
**UI-only features:**
|
||||
{{#if is_multi_part}}→ Reference: `architecture-{{ui_part_id}}.md`, `component-inventory-{{ui_part_id}}.md`{{else}}→ Reference: `architecture.md`, `component-inventory.md`{{/if}}
|
||||
|
||||
**API/Backend features:**
|
||||
{{#if is_multi_part}}→ Reference: `architecture-{{api_part_id}}.md`, `api-contracts-{{api_part_id}}.md`, `data-models-{{api_part_id}}.md`{{else}}→ Reference: `architecture.md`{{#if has_api_docs}}, `api-contracts.md`{{/if}}{{#if has_data_models}}, `data-models.md`{{/if}}{{/if}}
|
||||
|
||||
**Full-stack features:**
|
||||
→ Reference: All architecture docs{{#if is_multi_part}} + `integration-architecture.md`{{/if}}
|
||||
|
||||
**Deployment changes:**
|
||||
{{#if has_deployment_guide}}→ Reference: `deployment-guide.md`{{else}}→ Review CI/CD configs in project{{/if}}
|
||||
|
||||
---
|
||||
|
||||
_Documentation generated by BMAD Method `document-project` workflow_
|
||||
@@ -0,0 +1,103 @@
|
||||
# {{project_name}} - Project Overview
|
||||
|
||||
**Date:** {{date}}
|
||||
**Type:** {{project_type}}
|
||||
**Architecture:** {{architecture_type}}
|
||||
|
||||
## Executive Summary
|
||||
|
||||
{{executive_summary}}
|
||||
|
||||
## Project Classification
|
||||
|
||||
- **Repository Type:** {{repository_type}}
|
||||
- **Project Type(s):** {{project_types_list}}
|
||||
- **Primary Language(s):** {{primary_languages}}
|
||||
- **Architecture Pattern:** {{architecture_pattern}}
|
||||
|
||||
{{#if is_multi_part}}
|
||||
|
||||
## Multi-Part Structure
|
||||
|
||||
This project consists of {{parts_count}} distinct parts:
|
||||
|
||||
{{#each project_parts}}
|
||||
|
||||
### {{part_name}}
|
||||
|
||||
- **Type:** {{project_type}}
|
||||
- **Location:** `{{root_path}}`
|
||||
- **Purpose:** {{purpose}}
|
||||
- **Tech Stack:** {{tech_stack}}
|
||||
{{/each}}
|
||||
|
||||
### How Parts Integrate
|
||||
|
||||
{{integration_description}}
|
||||
{{/if}}
|
||||
|
||||
## Technology Stack Summary
|
||||
|
||||
{{#if is_single_part}}
|
||||
{{technology_table}}
|
||||
{{else}}
|
||||
{{#each project_parts}}
|
||||
|
||||
### {{part_name}} Stack
|
||||
|
||||
{{technology_table}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
## Key Features
|
||||
|
||||
{{key_features}}
|
||||
|
||||
## Architecture Highlights
|
||||
|
||||
{{architecture_highlights}}
|
||||
|
||||
## Development Overview
|
||||
|
||||
### Prerequisites
|
||||
|
||||
{{prerequisites}}
|
||||
|
||||
### Getting Started
|
||||
|
||||
{{getting_started_summary}}
|
||||
|
||||
### Key Commands
|
||||
|
||||
{{#if is_single_part}}
|
||||
|
||||
- **Install:** `{{install_command}}`
|
||||
- **Dev:** `{{dev_command}}`
|
||||
- **Build:** `{{build_command}}`
|
||||
- **Test:** `{{test_command}}`
|
||||
{{else}}
|
||||
{{#each project_parts}}
|
||||
|
||||
#### {{part_name}}
|
||||
|
||||
- **Install:** `{{install_command}}`
|
||||
- **Dev:** `{{dev_command}}`
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
## Repository Structure
|
||||
|
||||
{{repository_structure_summary}}
|
||||
|
||||
## Documentation Map
|
||||
|
||||
For detailed information, see:
|
||||
|
||||
- [index.md](./index.md) - Master documentation index
|
||||
- [architecture.md](./architecture{{#if is_multi_part}}-{part_id}{{/if}}.md) - Detailed architecture
|
||||
- [source-tree-analysis.md](./source-tree-analysis.md) - Directory structure
|
||||
- [development-guide.md](./development-guide{{#if is_multi_part}}-{part_id}{{/if}}.md) - Development workflow
|
||||
|
||||
---
|
||||
|
||||
_Generated using BMAD Method `document-project` workflow_
|
||||
@@ -0,0 +1,160 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Project Scan Report Schema",
|
||||
"description": "State tracking file for document-project workflow resumability",
|
||||
"type": "object",
|
||||
"required": ["workflow_version", "timestamps", "mode", "scan_level", "completed_steps", "current_step"],
|
||||
"properties": {
|
||||
"workflow_version": {
|
||||
"type": "string",
|
||||
"description": "Version of document-project workflow",
|
||||
"example": "1.2.0"
|
||||
},
|
||||
"timestamps": {
|
||||
"type": "object",
|
||||
"required": ["started", "last_updated"],
|
||||
"properties": {
|
||||
"started": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "ISO 8601 timestamp when workflow started"
|
||||
},
|
||||
"last_updated": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "ISO 8601 timestamp of last state update"
|
||||
},
|
||||
"completed": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "ISO 8601 timestamp when workflow completed (if finished)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"enum": ["initial_scan", "full_rescan", "deep_dive"],
|
||||
"description": "Workflow execution mode"
|
||||
},
|
||||
"scan_level": {
|
||||
"type": "string",
|
||||
"enum": ["quick", "deep", "exhaustive"],
|
||||
"description": "Scan depth level (deep_dive mode always uses exhaustive)"
|
||||
},
|
||||
"project_root": {
|
||||
"type": "string",
|
||||
"description": "Absolute path to project root directory"
|
||||
},
|
||||
"output_folder": {
|
||||
"type": "string",
|
||||
"description": "Absolute path to output folder"
|
||||
},
|
||||
"completed_steps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["step", "status"],
|
||||
"properties": {
|
||||
"step": {
|
||||
"type": "string",
|
||||
"description": "Step identifier (e.g., 'step_1', 'step_2')"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": ["completed", "partial", "failed"]
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"outputs": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Files written during this step"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "1-2 sentence summary of step outcome"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"current_step": {
|
||||
"type": "string",
|
||||
"description": "Current step identifier for resumption"
|
||||
},
|
||||
"findings": {
|
||||
"type": "object",
|
||||
"description": "High-level summaries only (detailed findings purged after writing)",
|
||||
"properties": {
|
||||
"project_classification": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repository_type": { "type": "string" },
|
||||
"parts_count": { "type": "integer" },
|
||||
"primary_language": { "type": "string" },
|
||||
"architecture_type": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"technology_stack": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"part_id": { "type": "string" },
|
||||
"tech_summary": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"batches_completed": {
|
||||
"type": "array",
|
||||
"description": "For deep/exhaustive scans: subfolders processed",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": { "type": "string" },
|
||||
"files_scanned": { "type": "integer" },
|
||||
"summary": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"outputs_generated": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "List of all output files generated"
|
||||
},
|
||||
"resume_instructions": {
|
||||
"type": "string",
|
||||
"description": "Instructions for resuming from current_step"
|
||||
},
|
||||
"validation_status": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"last_validated": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"validation_errors": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"deep_dive_targets": {
|
||||
"type": "array",
|
||||
"description": "Track deep-dive areas analyzed (for deep_dive mode)",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"target_name": { "type": "string" },
|
||||
"target_path": { "type": "string" },
|
||||
"files_analyzed": { "type": "integer" },
|
||||
"output_file": { "type": "string" },
|
||||
"timestamp": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
# {{project_name}} - Source Tree Analysis
|
||||
|
||||
**Date:** {{date}}
|
||||
|
||||
## Overview
|
||||
|
||||
{{source_tree_overview}}
|
||||
|
||||
{{#if is_multi_part}}
|
||||
|
||||
## Multi-Part Structure
|
||||
|
||||
This project is organized into {{parts_count}} distinct parts:
|
||||
|
||||
{{#each project_parts}}
|
||||
|
||||
- **{{part_name}}** (`{{root_path}}`): {{purpose}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
## Complete Directory Structure
|
||||
|
||||
```
|
||||
{{complete_source_tree}}
|
||||
```
|
||||
|
||||
## Critical Directories
|
||||
|
||||
{{#each critical_folders}}
|
||||
|
||||
### `{{folder_path}}`
|
||||
|
||||
{{description}}
|
||||
|
||||
**Purpose:** {{purpose}}
|
||||
**Contains:** {{contents_summary}}
|
||||
{{#if entry_points}}**Entry Points:** {{entry_points}}{{/if}}
|
||||
{{#if integration_note}}**Integration:** {{integration_note}}{{/if}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
{{#if is_multi_part}}
|
||||
|
||||
## Part-Specific Trees
|
||||
|
||||
{{#each project_parts}}
|
||||
|
||||
### {{part_name}} Structure
|
||||
|
||||
```
|
||||
{{source_tree}}
|
||||
```
|
||||
|
||||
**Key Directories:**
|
||||
{{#each critical_directories}}
|
||||
|
||||
- **`{{path}}`**: {{description}}
|
||||
{{/each}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
## Integration Points
|
||||
|
||||
{{#each integration_points}}
|
||||
|
||||
### {{from_part}} → {{to_part}}
|
||||
|
||||
- **Location:** `{{integration_path}}`
|
||||
- **Type:** {{integration_type}}
|
||||
- **Details:** {{details}}
|
||||
{{/each}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
## Entry Points
|
||||
|
||||
{{#if is_single_part}}
|
||||
|
||||
- **Main Entry:** `{{main_entry_point}}`
|
||||
{{#if additional_entry_points}}
|
||||
- **Additional:**
|
||||
{{#each additional_entry_points}}
|
||||
- `{{path}}`: {{description}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#each project_parts}}
|
||||
|
||||
### {{part_name}}
|
||||
|
||||
- **Entry Point:** `{{entry_point}}`
|
||||
- **Bootstrap:** {{bootstrap_description}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
## File Organization Patterns
|
||||
|
||||
{{file_organization_patterns}}
|
||||
|
||||
## Key File Types
|
||||
|
||||
{{#each file_type_patterns}}
|
||||
|
||||
### {{file_type}}
|
||||
|
||||
- **Pattern:** `{{pattern}}`
|
||||
- **Purpose:** {{purpose}}
|
||||
- **Examples:** {{examples}}
|
||||
{{/each}}
|
||||
|
||||
## Asset Locations
|
||||
|
||||
{{#if has_assets}}
|
||||
{{#each asset_locations}}
|
||||
|
||||
- **{{asset_type}}**: `{{location}}` ({{file_count}} files, {{total_size}})
|
||||
{{/each}}
|
||||
{{else}}
|
||||
No significant assets detected.
|
||||
{{/if}}
|
||||
|
||||
## Configuration Files
|
||||
|
||||
{{#each config_files}}
|
||||
|
||||
- **`{{path}}`**: {{description}}
|
||||
{{/each}}
|
||||
|
||||
## Notes for Development
|
||||
|
||||
{{development_notes}}
|
||||
|
||||
---
|
||||
|
||||
_Generated using BMAD Method `document-project` workflow_
|
||||
Reference in New Issue
Block a user