Restore generate-project-context workflow#1491
Conversation
📝 WalkthroughWalkthroughThis 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.
| --- | ||
| project_name: '{{project_name}}' | ||
| user_name: '{{user_name}}' | ||
| date: '{{date}}' | ||
| sections_completed: ['technology_stack'] | ||
| existing_patterns_found: { { number_of_patterns_discovered } } | ||
| --- |
There was a problem hiding this comment.
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
| --- | |
| 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.
| - 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 |
There was a problem hiding this comment.
🧩 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 -20Repository: 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
| - 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.
| ```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 | ||
| --- |
There was a problem hiding this comment.
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
| ```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.
Summary
generate-project-contextsharded workflow from git history (deleted in commit37346079), including all 5 source filesproject-context.mdprinciple from quick-flow-solo-dev agent — workflows handle this, not agent principlesTest plan
npm run validate:schemaspassesnpm run testpassesgenerate-project-contextappears in help catalog🤖 Generated with Claude Code