Skip to content

Restore generate-project-context workflow#1491

Merged
bmadcode merged 1 commit intobmad-code-org:mainfrom
alexeyv:restore-generate-project-context
Jan 31, 2026
Merged

Restore generate-project-context workflow#1491
bmadcode merged 1 commit intobmad-code-org:mainfrom
alexeyv:restore-generate-project-context

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Jan 31, 2026

Summary

  • Restored the generate-project-context sharded workflow from git history (deleted in commit 37346079), including all 5 source files
  • Added Claude Code command and module-help.csv entry (sequence 15, anytime phase)
  • Removed stale project-context.md principle from quick-flow-solo-dev agent — workflows handle this, not agent principles

Test plan

  • Verify npm run validate:schemas passes
  • Verify npm run test passes
  • Install to a test project and confirm generate-project-context appears in help catalog
  • Run the workflow against a brownfield project to confirm step execution

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

This pull request introduces a new generate-project-context workflow with comprehensive documentation, templates, and step-by-step execution guides for discovering and documenting project context. It also removes outdated guidance from an existing agent configuration file.

Changes

Cohort / File(s) Summary
Workflow Documentation
src/bmm/workflows/generate-project-context/workflow.md
Defines the main workflow blueprint for generating a project-context.md file, including initialization from configuration, path definitions, and sequential step execution with modular micro-file architecture.
Step Execution Files
src/bmm/workflows/generate-project-context/steps/step-01-discover.md, step-02-generate.md, step-03-complete.md
Three sequential step documents outlining discovery and initialization, context rules generation with category-based content, and finalization with review and validation processes. Each includes execution protocols, collaboration menus, and success/failure criteria.
Workflow Template
src/bmm/workflows/generate-project-context/project-context-template.md
Markdown template with YAML frontmatter containing placeholders for project metadata and structured sections for Technology Stack & Versions and Critical Implementation Rules.
Command Documentation
.claude/commands/bmad-bmm-generate-project-context.md
Command reference file with front matter and step-by-step instructions for agents to execute the generate-project-context workflow.
Agent Configuration
src/bmm/agents/quick-flow-solo-dev.agent.yaml
Removed outdated guidance line referencing project-context.md from the principles block.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • Issue #1426: This PR directly addresses the missing generate-project-context workflow and project-context.md by reintroducing the complete workflow with templates and step definitions.

Possibly related PRs

  • PR #1185: Modifies the same agent file (quick-flow-solo-dev.agent.yaml) and introduces step-file-driven workflow patterns, creating parallel architecture for different workflow types.

Suggested reviewers

  • pbean
  • cecil-the-coder
  • bmadcode
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Restore generate-project-context workflow' accurately and concisely describes the primary objective of the changeset—restoring a previously deleted workflow with all its supporting files and configuration updates.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the restoration of the workflow, the files added, the principle removed, and providing a concrete test plan that aligns with the changes made.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@src/bmm/workflows/generate-project-context/project-context-template.md`:
- Around line 1-7: The template's existing_patterns_found placeholder uses
spaced braces "{ { number_of_patterns_discovered } }" which prevents
substitution; update the existing_patterns_found entry to use the same
mustache/Jinja style as the other fields (i.e., replace the spaced braces with
{{number_of_patterns_discovered}}) so the value is rendered instead of left
literal; verify the other placeholders (project_name, user_name, date) follow
the same {{...}} pattern for consistency.

In `@src/bmm/workflows/generate-project-context/steps/step-02-generate.md`:
- Around line 32-34: The "When 'P' selected" path in step-02-generate.md is
missing the /workflow.md suffix; update the bullet that begins "When 'P'
selected:" to reference
{project-root}/_bmad/core/workflows/party-mode/workflow.md so it matches other
references (e.g., tools/cli/lib/agent/compiler.js) and prevents execution
failures when selecting the P option.

In `@src/bmm/workflows/generate-project-context/steps/step-03-complete.md`:
- Around line 189-199: Fix the invalid YAML frontmatter: change
sections_completed from a single bracketed line to a proper YAML sequence using
hyphens for each item (sections_completed: - technology_stack ... -
anti_patterns) and correct the rule_count placeholder by removing the spaced
braces so it reads rule_count: {{total_rules}}; keep other placeholders like
project_name, user_name and date as-is.

Comment on lines +1 to +7
---
project_name: '{{project_name}}'
user_name: '{{user_name}}'
date: '{{date}}'
sections_completed: ['technology_stack']
existing_patterns_found: { { number_of_patterns_discovered } }
---
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix placeholder syntax to avoid literal output.

existing_patterns_found uses { { ... } } while the rest of the template uses {{...}}. This will likely bypass substitution and leave a literal placeholder in the generated context file.

Suggested fix
Suggested change
---
project_name: '{{project_name}}'
user_name: '{{user_name}}'
date: '{{date}}'
sections_completed: ['technology_stack']
existing_patterns_found: { { number_of_patterns_discovered } }
---
existing_patterns_found: {{number_of_patterns_discovered}}
🤖 Prompt for AI Agents
In `@src/bmm/workflows/generate-project-context/project-context-template.md`
around lines 1 - 7, The template's existing_patterns_found placeholder uses
spaced braces "{ { number_of_patterns_discovered } }" which prevents
substitution; update the existing_patterns_found entry to use the same
mustache/Jinja style as the other fields (i.e., replace the spaced braces with
{{number_of_patterns_discovered}}) so the value is rendered instead of left
literal; verify the other placeholders (project_name, user_name, date) follow
the same {{...}} pattern for consistency.

Comment on lines +32 to +34
- When 'A' selected: Execute {project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml
- When 'P' selected: Execute {project-root}/_bmad/core/workflows/party-mode
- PROTOCOLS always return to display this step's A/P/C menu after the A or P have completed
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for party-mode in the _bmad directory
find . -type f -o -type d | grep -i party-mode
echo "---"
# Search for references to party-mode in the codebase
rg -n 'party-mode' --type-list
echo "---"
# Check if the _bmad/core/workflows directory exists and list its contents
ls -la _bmad/core/workflows/ 2>/dev/null | head -20

Repository: bmad-code-org/BMAD-METHOD

Length of output: 830


🏁 Script executed:

#!/bin/bash
# Read the specific file and lines mentioned in the review
cat -n src/bmm/workflows/generate-project-context/steps/step-02-generate.md | sed -n '25,40p'

Repository: bmad-code-org/BMAD-METHOD

Length of output: 910


🏁 Script executed:

#!/bin/bash
# Check the structure of advanced-elicitation
find src/core/workflows/advanced-elicitation -type f | head -20
echo "---"
# Check if _bmad directory exists
ls -la _bmad/ 2>/dev/null || echo "_bmad directory not found"
echo "---"
# Check if there's any reference to _bmad in the codebase
rg '_bmad' --type-list 2>/dev/null || rg '_bmad'

Repository: bmad-code-org/BMAD-METHOD

Length of output: 50381


Add /workflow.md suffix to the party-mode workflow path.

The documented path is incomplete. Throughout the codebase, party-mode is consistently referenced as {project-root}/_bmad/core/workflows/party-mode/workflow.md (see tools/cli/lib/agent/compiler.js and multiple workflow steps). The current documentation at line 33 will cause execution failures.

Suggested fix
Suggested change
- When 'A' selected: Execute {project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml
- When 'P' selected: Execute {project-root}/_bmad/core/workflows/party-mode
- PROTOCOLS always return to display this step's A/P/C menu after the A or P have completed
- When 'P' selected: Execute {project-root}/_bmad/core/workflows/party-mode/workflow.md
🤖 Prompt for AI Agents
In `@src/bmm/workflows/generate-project-context/steps/step-02-generate.md` around
lines 32 - 34, The "When 'P' selected" path in step-02-generate.md is missing
the /workflow.md suffix; update the bullet that begins "When 'P' selected:" to
reference {project-root}/_bmad/core/workflows/party-mode/workflow.md so it
matches other references (e.g., tools/cli/lib/agent/compiler.js) and prevents
execution failures when selecting the P option.

Comment on lines +189 to +199
```yaml
---
project_name: '{{project_name}}'
user_name: '{{user_name}}'
date: '{{date}}'
sections_completed:
['technology_stack', 'language_rules', 'framework_rules', 'testing_rules', 'quality_rules', 'workflow_rules', 'anti_patterns']
status: 'complete'
rule_count: { { total_rules } }
optimized_for_llm: true
---
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix invalid YAML frontmatter and placeholder syntax.

sections_completed is not valid YAML in its current form, and rule_count uses spaced braces that likely won’t substitute.

Suggested fix
Suggested change
```yaml
---
project_name: '{{project_name}}'
user_name: '{{user_name}}'
date: '{{date}}'
sections_completed:
['technology_stack', 'language_rules', 'framework_rules', 'testing_rules', 'quality_rules', 'workflow_rules', 'anti_patterns']
status: 'complete'
rule_count: { { total_rules } }
optimized_for_llm: true
---
sections_completed:
- technology_stack
- language_rules
- framework_rules
- testing_rules
- quality_rules
- workflow_rules
- anti_patterns
status: 'complete'
rule_count: {{total_rules}}
optimized_for_llm: true
🤖 Prompt for AI Agents
In `@src/bmm/workflows/generate-project-context/steps/step-03-complete.md` around
lines 189 - 199, Fix the invalid YAML frontmatter: change sections_completed
from a single bracketed line to a proper YAML sequence using hyphens for each
item (sections_completed: - technology_stack ... - anti_patterns) and correct
the rule_count placeholder by removing the spaced braces so it reads rule_count:
{{total_rules}}; keep other placeholders like project_name, user_name and date
as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants