Files
pig-farm-controller/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md
2025-11-01 19:22:39 +08:00

8.9 KiB

PRD Workflow - Small Projects (Level 0-1)

The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {installed_path}/workflow.yaml Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level} Generate all documents in {document_output_language} This is the SMALL instruction set for Level 0-1 projects - tech-spec with story generation Level 0: tech-spec + single user story | Level 1: tech-spec + epic/stories Project analysis already completed - proceeding directly to technical specification NO PRD generated - uses tech_spec_template + story templates

DOCUMENT OUTPUT: Technical, precise, definitive. Specific versions only. User skill level ({user_skill_level}) affects conversation style ONLY, not document content.

Check if {output_folder}/bmm-workflow-status.yaml exists No workflow status file found. Tech-spec workflow can run standalone or as part of BMM workflow path. **Recommended:** Run `workflow-init` first for project context tracking and workflow sequencing. Continue in standalone mode or exit to run workflow-init? (continue/exit) Set standalone_mode = true Exit workflow Load the FULL file: {output_folder}/bmm-workflow-status.yaml Parse workflow_status section Check status of "tech-spec" workflow Get project_level from YAML metadata Find first non-completed workflow (next expected workflow) **Incorrect Workflow for Level {{project_level}}**

Tech-spec is for Level 0-1 projects. Level 2-4 should use PRD workflow.

Correct workflow: prd (PM agent) Exit and redirect to prd

⚠️ Tech-spec already completed: {{tech-spec status}} Re-running will overwrite the existing tech-spec. Continue? (y/n) Exiting. Use workflow-status to see your next step. Exit workflow ⚠️ Next expected workflow: {{next_workflow}}. Tech-spec is out of sequence. Continue with tech-spec anyway? (y/n) Exiting. Run {{next_workflow}} instead. Exit workflow

Set standalone_mode = false

Use {{project_level}} from status data

Update Workflow Status: current_workflow Set to: "tech-spec (Level 0 - generating tech spec)" Set to: "tech-spec (Level 1 - generating tech spec)"

progress_percentage Set to: 20%

Save {{status_file_path}}

Confirm Level 0 - Single atomic change Please describe the specific change/fix you need to implement: Confirm Level 1 - Coherent feature Please describe the feature you need to implement:

Generate tech-spec.md - this is the TECHNICAL SOURCE OF TRUTH ALL TECHNICAL DECISIONS MUST BE DEFINITIVE - NO AMBIGUITY ALLOWED

Update progress: progress_percentage Set to: 40% Save {{status_file_path}}

Initialize and write out tech-spec.md using tech_spec_template

DEFINITIVE DECISIONS REQUIRED:

BAD Examples (NEVER DO THIS):

  • "Python 2 or 3"
  • "Use a logger like pino or winston"

GOOD Examples (ALWAYS DO THIS):

  • "Python 3.11"
  • "winston v3.8.2 for logging"

Source Tree Structure: EXACT file changes needed source_tree

Technical Approach: SPECIFIC implementation for the change technical_approach

Implementation Stack: DEFINITIVE tools and versions implementation_stack

Technical Details: PRECISE change details technical_details

Testing Approach: How to verify the change testing_approach

Deployment Strategy: How to deploy the change deployment_strategy

{project-root}/bmad/core/tasks/adv-elicit.xml

Offer to run cohesion validation

Tech-spec complete! Before proceeding to implementation, would you like to validate project cohesion?

Cohesion Validation checks:

  • Tech spec completeness and definitiveness
  • Feature sequencing and dependencies
  • External dependencies properly planned
  • User/agent responsibilities clear
  • Greenfield/brownfield-specific considerations

Run cohesion validation? (y/n)

Load {installed_path}/checklist.md Review tech-spec.md against "Cohesion Validation (All Levels)" section Focus on Section A (Tech Spec), Section D (Feature Sequencing) Apply Section B (Greenfield) or Section C (Brownfield) based on field_type Generate validation report with findings

Use {{project_level}} from status data

Invoke instructions-level0-story.md to generate single user story Story will be saved to user-story.md Story links to tech-spec.md for technical implementation details Invoke instructions-level1-stories.md to generate epic and stories Epic and stories will be saved to epics.md Stories link to tech-spec.md implementation tasks

Confirm tech-spec is complete and definitive

Confirm user-story.md generated successfully Confirm epics.md generated successfully

Summary

- **Level 0 Output**: tech-spec.md + user-story.md - **No PRD required** - **Direct to implementation with story tracking** - **Level 1 Output**: tech-spec.md + epics.md - **No PRD required** - **Ready for sprint planning with epic/story breakdown**

Next Steps

Load the FULL file: {output_folder}/bmm-workflow-status.yaml Find workflow_status key "tech-spec" ONLY write the file path as the status value - no other text, notes, or metadata Update workflow_status["tech-spec"] = "{output_folder}/bmm-tech-spec-{{date}}.md" Save file, preserving ALL comments and structure including STATUS DEFINITIONS

Find first non-completed workflow in workflow_status (next workflow to do) Determine next agent from path file based on next workflow

Tech-Spec Complete, {user_name}!

Deliverables Created:

- tech-spec.md - Technical specification - user-story.md - Single user story - tech-spec.md - Technical specification - epics.md - Epic and story breakdown

Next Steps:

  • Next required: {{next_workflow}} ({{next_agent}} agent)
  • Optional: Create test plan or document UI changes if applicable

Check status anytime with: workflow-status