bmm-opencode 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/.opencode/agents/bmad-bmad-master.md +11 -0
  2. package/.opencode/agents/bmm-analyst.md +10 -32
  3. package/.opencode/agents/bmm-architect.md +6 -34
  4. package/.opencode/agents/bmm-dev.md +6 -32
  5. package/.opencode/agents/bmm-pm.md +10 -41
  6. package/.opencode/agents/bmm-qa.md +5 -31
  7. package/.opencode/agents/bmm-quick-flow-solo-dev.md +7 -32
  8. package/.opencode/agents/bmm-sm.md +8 -32
  9. package/.opencode/agents/bmm-tech-writer.md +12 -0
  10. package/.opencode/agents/bmm-ux-designer.md +5 -37
  11. package/.opencode/commands/bmad-bmm-check-implementation-readiness.md +7 -0
  12. package/.opencode/commands/bmad-bmm-code-review.md +7 -0
  13. package/.opencode/commands/bmad-bmm-correct-course.md +7 -0
  14. package/.opencode/commands/bmad-bmm-create-architecture.md +7 -0
  15. package/.opencode/commands/bmad-bmm-create-epics-and-stories.md +7 -0
  16. package/.opencode/commands/bmad-bmm-create-prd.md +7 -0
  17. package/.opencode/commands/bmad-bmm-create-product-brief.md +7 -0
  18. package/.opencode/commands/bmad-bmm-create-story.md +7 -0
  19. package/.opencode/commands/bmad-bmm-create-ux-design.md +7 -0
  20. package/.opencode/commands/bmad-bmm-dev-story.md +7 -0
  21. package/.opencode/commands/bmad-bmm-document-project.md +7 -0
  22. package/.opencode/commands/bmad-bmm-domain-research.md +7 -0
  23. package/.opencode/commands/bmad-bmm-edit-prd.md +7 -0
  24. package/.opencode/commands/bmad-bmm-generate-project-context.md +5 -0
  25. package/.opencode/commands/bmad-bmm-market-research.md +7 -0
  26. package/.opencode/commands/bmad-bmm-quick-dev.md +7 -0
  27. package/.opencode/commands/bmad-bmm-quick-spec.md +7 -0
  28. package/.opencode/commands/bmad-bmm-retrospective.md +7 -0
  29. package/.opencode/commands/bmad-bmm-sprint-planning.md +7 -0
  30. package/.opencode/commands/bmad-bmm-sprint-status.md +5 -0
  31. package/.opencode/commands/bmad-bmm-technical-research.md +7 -0
  32. package/.opencode/commands/bmad-bmm-validate-prd.md +7 -0
  33. package/.opencode/commands/bmad-brainstorming.md +7 -0
  34. package/.opencode/commands/bmad-editorial-review-prose.md +5 -0
  35. package/.opencode/commands/bmad-editorial-review-structure.md +5 -0
  36. package/.opencode/commands/bmad-help.md +5 -0
  37. package/.opencode/commands/bmad-index-docs.md +5 -0
  38. package/.opencode/commands/bmad-review-adversarial-general.md +5 -0
  39. package/.opencode/commands/bmad-shard-doc.md +5 -0
  40. package/.opencode/skills/bmad-bmad-master/SKILL.md +56 -0
  41. package/.opencode/skills/bmad-bmm-analyst/SKILL.md +65 -38
  42. package/.opencode/skills/bmad-bmm-architect/SKILL.md +49 -38
  43. package/.opencode/skills/bmad-bmm-check-implementation-readiness/SKILL.md +1092 -24
  44. package/.opencode/skills/bmad-bmm-code-review/SKILL.md +45 -13
  45. package/.opencode/skills/bmad-bmm-correct-course/SKILL.md +56 -94
  46. package/.opencode/skills/bmad-bmm-create-architecture/SKILL.md +2391 -27
  47. package/.opencode/skills/bmad-bmm-create-epics-and-stories/SKILL.md +927 -23
  48. package/.opencode/skills/bmad-bmm-create-prd/SKILL.md +9 -26
  49. package/.opencode/skills/bmad-bmm-create-product-brief/SKILL.md +1358 -22
  50. package/.opencode/skills/bmad-bmm-create-story/SKILL.md +61 -24
  51. package/.opencode/skills/bmad-bmm-create-ux-design/SKILL.md +3275 -26
  52. package/.opencode/skills/bmad-bmm-dev/SKILL.md +57 -43
  53. package/.opencode/skills/bmad-bmm-dev-story/SKILL.md +20 -13
  54. package/.opencode/skills/bmad-bmm-document-project/SKILL.md +22 -81
  55. package/.opencode/skills/bmad-bmm-domain-research/SKILL.md +53 -37
  56. package/.opencode/skills/bmad-bmm-edit-prd/SKILL.md +10 -27
  57. package/.opencode/skills/bmad-bmm-generate-project-context/SKILL.md +797 -28
  58. package/.opencode/skills/bmad-bmm-market-research/SKILL.md +53 -37
  59. package/.opencode/skills/bmad-bmm-pm/SKILL.md +60 -39
  60. package/.opencode/skills/bmad-bmm-qa/SKILL.md +77 -35
  61. package/.opencode/skills/bmad-bmm-qa-automate/SKILL.md +47 -129
  62. package/.opencode/skills/bmad-bmm-quick-dev/SKILL.md +802 -30
  63. package/.opencode/skills/bmad-bmm-quick-flow-solo-dev/SKILL.md +57 -36
  64. package/.opencode/skills/bmad-bmm-quick-spec/SKILL.md +684 -27
  65. package/.opencode/skills/bmad-bmm-retrospective/SKILL.md +55 -200
  66. package/.opencode/skills/bmad-bmm-sm/SKILL.md +57 -36
  67. package/.opencode/skills/bmad-bmm-sprint-planning/SKILL.md +51 -52
  68. package/.opencode/skills/bmad-bmm-sprint-status/SKILL.md +30 -99
  69. package/.opencode/skills/bmad-bmm-tech-writer/SKILL.md +70 -0
  70. package/.opencode/skills/bmad-bmm-technical-research/SKILL.md +53 -37
  71. package/.opencode/skills/bmad-bmm-ux-designer/SKILL.md +48 -37
  72. package/.opencode/skills/bmad-bmm-validate-prd/SKILL.md +10 -27
  73. package/.opencode/skills/bmad-brainstorming/SKILL.md +2048 -0
  74. package/.opencode/skills/bmad-editorial-review-prose/SKILL.md +107 -0
  75. package/.opencode/skills/bmad-editorial-review-structure/SKILL.md +214 -0
  76. package/.opencode/skills/bmad-help/SKILL.md +82 -0
  77. package/.opencode/skills/bmad-index-docs/SKILL.md +70 -0
  78. package/.opencode/skills/bmad-party-mode/SKILL.md +682 -0
  79. package/.opencode/skills/bmad-review-adversarial-general/SKILL.md +53 -0
  80. package/.opencode/skills/bmad-shard-doc/SKILL.md +113 -0
  81. package/README.md +28 -4
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +350 -47
  84. package/package.json +4 -3
  85. package/.opencode/agents/bmm-tech-writer-tech-writer.md +0 -44
  86. package/.opencode/agents/cis-brainstorming-coach.md +0 -38
  87. package/.opencode/agents/cis-creative-problem-solver.md +0 -38
  88. package/.opencode/agents/cis-design-thinking-coach.md +0 -38
  89. package/.opencode/agents/cis-innovation-strategist.md +0 -38
  90. package/.opencode/agents/cis-presentation-master.md +0 -54
  91. package/.opencode/agents/cis-storyteller-storyteller.md +0 -38
  92. package/.opencode/agents/core-bmad-master.md +0 -39
  93. package/.opencode/agents/gen-subagent.md +0 -311
  94. package/.opencode/agents/party-mode.md +0 -812
  95. package/.opencode/agents/tea-tea.md +0 -48
  96. package/.opencode/skills/bmad-bmm-dev-team-mode/SKILL.md +0 -300
  97. package/.opencode/skills/bmad-bmm-tech-writer-tech-writer/SKILL.md +0 -51
  98. package/.opencode/skills/bmad-cis-brainstorming-coach/SKILL.md +0 -46
  99. package/.opencode/skills/bmad-cis-creative-problem-solver/SKILL.md +0 -46
  100. package/.opencode/skills/bmad-cis-design-thinking/SKILL.md +0 -156
  101. package/.opencode/skills/bmad-cis-design-thinking-coach/SKILL.md +0 -46
  102. package/.opencode/skills/bmad-cis-innovation-strategist/SKILL.md +0 -46
  103. package/.opencode/skills/bmad-cis-innovation-strategy/SKILL.md +0 -238
  104. package/.opencode/skills/bmad-cis-presentation-master/SKILL.md +0 -52
  105. package/.opencode/skills/bmad-cis-problem-solving/SKILL.md +0 -212
  106. package/.opencode/skills/bmad-cis-storyteller-storyteller/SKILL.md +0 -48
  107. package/.opencode/skills/bmad-cis-storytelling/SKILL.md +0 -290
  108. package/.opencode/skills/bmad-core-bmad-master/SKILL.md +0 -48
  109. package/.opencode/skills/bmad-core-brainstorming/SKILL.md +0 -74
  110. package/.opencode/skills/bmad-core-party-mode/SKILL.md +0 -241
  111. package/.opencode/skills/bmad-core-task-editorial-review-prose/SKILL.md +0 -74
  112. package/.opencode/skills/bmad-core-task-editorial-review-structure/SKILL.md +0 -151
  113. package/.opencode/skills/bmad-core-task-help/SKILL.md +0 -100
  114. package/.opencode/skills/bmad-core-task-index-docs/SKILL.md +0 -46
  115. package/.opencode/skills/bmad-core-task-review-adversarial-general/SKILL.md +0 -36
  116. package/.opencode/skills/bmad-core-task-shard-doc/SKILL.md +0 -80
  117. package/.opencode/skills/bmad-tea-tea/SKILL.md +0 -57
  118. package/.opencode/skills/bmad-tea-teach-me-testing/SKILL.md +0 -106
  119. package/.opencode/skills/bmad-tea-testarch-atdd/SKILL.md +0 -62
  120. package/.opencode/skills/bmad-tea-testarch-automate/SKILL.md +0 -67
  121. package/.opencode/skills/bmad-tea-testarch-ci/SKILL.md +0 -62
  122. package/.opencode/skills/bmad-tea-testarch-framework/SKILL.md +0 -62
  123. package/.opencode/skills/bmad-tea-testarch-nfr/SKILL.md +0 -60
  124. package/.opencode/skills/bmad-tea-testarch-test-design/SKILL.md +0 -76
  125. package/.opencode/skills/bmad-tea-testarch-test-review/SKILL.md +0 -60
  126. package/.opencode/skills/bmad-tea-testarch-trace/SKILL.md +0 -60
@@ -1,28 +1,11 @@
1
1
  ---
2
2
  name: bmad-bmm-generate-project-context
3
3
  description: "Creates a concise project-context.md file with critical rules and patterns that AI agents must follow when implementing code. Optimized for LLM context efficiency."
4
- license: MIT
5
- compatibility: opencode
6
- metadata:
7
- source: "bmad-method"
8
- module: "bmm"
9
- workflow: "generate-project-context"
10
- standalone: false
11
4
  ---
12
5
 
13
- # generate-project-context Workflow
14
-
15
- Creates a concise project-context.md file with critical rules and patterns that AI agents must follow when implementing code. Optimized for LLM context efficiency.
16
-
17
- ## How to Use
18
-
19
- This skill provides a structured workflow. Follow the steps below:
20
-
21
- ## Instructions
22
-
23
6
  # Generate Project Context Workflow
24
7
 
25
- **Goal:** Create a concise, optimized `project-context.md` file containing critical rules, patterns, and guidelines that AI agents must follow when implementing code. This file focuses on unobvious details that LLMs need to be reminded of.
8
+ **Goal:** Create a concise, optimized `project-context.md` file containing critical rules, patterns, and guidelines that AI agents must follow when implementing code. This file focuses on unobvious details that LLMs need to be reminded of.
26
9
 
27
10
  **Your Role:** You are a technical facilitator working with a peer to capture the essential implementation rules that will ensure consistent, high-quality code generation across all AI agents working on the project.
28
11
 
@@ -44,23 +27,809 @@ This uses **micro-file architecture** for disciplined execution:
44
27
 
45
28
  ### Configuration Loading
46
29
 
47
- Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
30
+ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
48
31
 
49
- - `project_name`, `output_folder`, `user_name`
50
- - `communication_language`, `document_output_language`, `user_skill_level`
51
- - `date` as system-generated current datetime
52
- - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
32
+ - `project_name`, `output_folder`, `user_name`
33
+ - `communication_language`, `document_output_language`, `user_skill_level`
34
+ - `date` as system-generated current datetime
35
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
53
36
 
54
37
  ### Paths
55
38
 
56
- - `installed_path` = `{project-root}/_bmad/bmm/workflows/generate-project-context`
57
- - `template_path` = `{installed_path}/project-context-template.md`
58
- - `output_file` = `{output_folder}/project-context.md`
39
+ - `installed_path` = `{project-root}/_bmad/bmm/workflows/generate-project-context`
40
+ - `template_path` = `{installed_path}/project-context-template.md`
41
+ - `output_file` = `{output_folder}/project-context.md`
59
42
 
60
43
  ---
61
44
 
62
45
  ## EXECUTION
63
46
 
64
- Load and execute `steps/step-01-discover.md` to begin the workflow.
47
+ Load and execute `steps/step-01-discover.md` to begin the workflow.
48
+
49
+ **Note:** Input document discovery and initialization protocols are handled in step-01-discover.md.
50
+
51
+ # Step 1: Context Discovery & Initialization
52
+
53
+ ## MANDATORY EXECUTION RULES (READ FIRST):
54
+
55
+ - 🛑 NEVER generate content without user input
56
+ - ✅ ALWAYS treat this as collaborative discovery between technical peers
57
+ - 📋 YOU ARE A FACILITATOR, not a content generator
58
+ - 💬 FOCUS on discovering existing project context and technology stack
59
+ - 🎯 IDENTIFY critical implementation rules that AI agents need
60
+ - ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed
61
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
62
+
63
+ ## EXECUTION PROTOCOLS:
64
+
65
+ - 🎯 Show your analysis before taking any action
66
+ - 📖 Read existing project files to understand current context
67
+ - 💾 Initialize document and update frontmatter
68
+ - 🚫 FORBIDDEN to load next step until discovery is complete
69
+
70
+ ## CONTEXT BOUNDARIES:
71
+
72
+ - Variables from workflow.md are available in memory
73
+ - Focus on existing project files and architecture decisions
74
+ - Look for patterns, conventions, and unique requirements
75
+ - Prioritize rules that prevent implementation mistakes
76
+
77
+ ## YOUR TASK:
78
+
79
+ Discover the project's technology stack, existing patterns, and critical implementation rules that AI agents must follow when writing code.
80
+
81
+ ## DISCOVERY SEQUENCE:
82
+
83
+ ### 1. Check for Existing Project Context
84
+
85
+ First, check if project context already exists:
86
+
87
+ - Look for file at `{project_knowledge}/project-context.md or {project-root}/**/project-context.md`
88
+ - If exists: Read complete file to understand existing rules
89
+ - Present to user: "Found existing project context with {number_of_sections} sections. Would you like to update this or create a new one?"
90
+
91
+ ### 2. Discover Project Technology Stack
92
+
93
+ Load and analyze project files to identify technologies:
94
+
95
+ **Architecture Document:**
96
+
97
+ - Look for `{planning_artifacts}/architecture.md`
98
+ - Extract technology choices with specific versions
99
+ - Note architectural decisions that affect implementation
100
+
101
+ **Package Files:**
102
+
103
+ - Check for `package.json`, `requirements.txt`, `Cargo.toml`, etc.
104
+ - Extract exact versions of all dependencies
105
+ - Note development vs production dependencies
106
+
107
+ **Configuration Files:**
108
+
109
+ - Look for project language specific configs ( example: `tsconfig.json`)
110
+ - Build tool configs (webpack, vite, next.config.js, etc.)
111
+ - Linting and formatting configs (.eslintrc, .prettierrc, etc.)
112
+ - Testing configurations (jest.config.js, vitest.config.ts, etc.)
113
+
114
+ ### 3. Identify Existing Code Patterns
115
+
116
+ Search through existing codebase for patterns:
117
+
118
+ **Naming Conventions:**
119
+
120
+ - File naming patterns (PascalCase, kebab-case, etc.)
121
+ - Component/function naming conventions
122
+ - Variable naming patterns
123
+ - Test file naming patterns
124
+
125
+ **Code Organization:**
126
+
127
+ - How components are structured
128
+ - Where utilities and helpers are placed
129
+ - How services are organized
130
+ - Test organization patterns
131
+
132
+ **Documentation Patterns:**
133
+
134
+ - Comment styles and conventions
135
+ - Documentation requirements
136
+ - README and API doc patterns
137
+
138
+ ### 4. Extract Critical Implementation Rules
139
+
140
+ Look for rules that AI agents might miss:
141
+
142
+ **Language-Specific Rules:**
143
+
144
+ - TypeScript strict mode requirements
145
+ - Import/export conventions
146
+ - Async/await vs Promise usage patterns
147
+ - Error handling patterns specific to the language
148
+
149
+ **Framework-Specific Rules:**
150
+
151
+ - React hooks usage patterns
152
+ - API route conventions
153
+ - Middleware usage patterns
154
+ - State management patterns
155
+
156
+ **Testing Rules:**
157
+
158
+ - Test structure requirements
159
+ - Mock usage conventions
160
+ - Integration vs unit test boundaries
161
+ - Coverage requirements
162
+
163
+ **Development Workflow Rules:**
164
+
165
+ - Branch naming conventions
166
+ - Commit message patterns
167
+ - PR review requirements
168
+ - Deployment procedures
169
+
170
+ ### 5. Initialize Project Context Document
171
+
172
+ Based on discovery, create or update the context document:
173
+
174
+ #### A. Fresh Document Setup (if no existing context)
175
+
176
+ Copy template from `{installed_path}/project-context-template.md` to `{output_folder}/project-context.md`
177
+ Initialize frontmatter fields.
178
+
179
+ #### B. Existing Document Update
180
+
181
+ Load existing context and prepare for updates
182
+ Set frontmatter `sections_completed` to track what will be updated
183
+
184
+ ### 6. Present Discovery Summary
185
+
186
+ Report findings to user:
187
+
188
+ "Welcome {{user_name}}! I've analyzed your project for {{project_name}} to discover the context that AI agents need.
189
+
190
+ **Technology Stack Discovered:**
191
+ {{list_of_technologies_with_versions}}
192
+
193
+ **Existing Patterns Found:**
194
+
195
+ - {{number_of_patterns}} implementation patterns
196
+ - {{number_of_conventions}} coding conventions
197
+ - {{number_of_rules}} critical rules
198
+
199
+ **Key Areas for Context Rules:**
200
+
201
+ - {{area_1}} (e.g., TypeScript configuration)
202
+ - {{area_2}} (e.g., Testing patterns)
203
+ - {{area_3}} (e.g., Code organization)
204
+
205
+ {if_existing_context}
206
+ **Existing Context:** Found {{sections}} sections already defined. We can update or add to these.
207
+ {/if_existing_context}
208
+
209
+ Ready to create/update your project context. This will help AI agents implement code consistently with your project's standards.
210
+
211
+ [C] Continue to context generation"
212
+
213
+ ## SUCCESS METRICS:
214
+
215
+ ✅ Existing project context properly detected and handled
216
+ ✅ Technology stack accurately identified with versions
217
+ ✅ Critical implementation patterns discovered
218
+ ✅ Project context document properly initialized
219
+ ✅ Discovery findings clearly presented to user
220
+ ✅ User ready to proceed with context generation
221
+
222
+ ## FAILURE MODES:
223
+
224
+ ❌ Not checking for existing project context before creating new one
225
+ ❌ Missing critical technology versions or configurations
226
+ ❌ Overlooking important coding patterns or conventions
227
+ ❌ Not initializing frontmatter properly
228
+ ❌ Not presenting clear discovery summary to user
229
+
230
+ ## NEXT STEP:
231
+
232
+ After user selects [C] to continue, load `./step-02-generate.md` to collaboratively generate the specific project context rules.
233
+
234
+ Remember: Do NOT proceed to step-02 until user explicitly selects [C] from the menu and discovery is confirmed and the initial file has been written as directed in this discovery step!
235
+
236
+
237
+ # Step 2: Context Rules Generation
238
+
239
+ ## MANDATORY EXECUTION RULES (READ FIRST):
240
+
241
+ - 🛑 NEVER generate content without user input
242
+ - ✅ ALWAYS treat this as collaborative discovery between technical peers
243
+ - 📋 YOU ARE A FACILITATOR, not a content generator
244
+ - 💬 FOCUS on unobvious rules that AI agents need to be reminded of
245
+ - 🎯 KEEP CONTENT LEAN - optimize for LLM context efficiency
246
+ - ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed
247
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
248
+
249
+ ## EXECUTION PROTOCOLS:
250
+
251
+ - 🎯 Show your analysis before taking any action
252
+ - 📝 Focus on specific, actionable rules rather than general advice
253
+ - ⚠️ Present A/P/C menu after each major rule category
254
+ - 💾 ONLY save when user chooses C (Continue)
255
+ - 📖 Update frontmatter with completed sections
256
+ - 🚫 FORBIDDEN to load next step until all sections are complete
257
+
258
+ ## COLLABORATION MENUS (A/P/C):
259
+
260
+ This step will generate content and present choices for each rule category:
261
+
262
+ - **A (Advanced Elicitation)**: Use discovery protocols to explore nuanced implementation rules
263
+ - **P (Party Mode)**: Bring multiple perspectives to identify critical edge cases
264
+ - **C (Continue)**: Save the current rules and proceed to next category
265
+
266
+ ## PROTOCOL INTEGRATION:
267
+
268
+ - When 'A' selected: Execute {project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml
269
+ - When 'P' selected: Execute {project-root}/_bmad/core/workflows/party-mode
270
+ - PROTOCOLS always return to display this step's A/P/C menu after the A or P have completed
271
+ - User accepts/rejects protocol changes before proceeding
272
+
273
+ ## CONTEXT BOUNDARIES:
274
+
275
+ - Discovery results from step-1 are available
276
+ - Technology stack and existing patterns are identified
277
+ - Focus on rules that prevent implementation mistakes
278
+ - Prioritize unobvious details that AI agents might miss
279
+
280
+ ## YOUR TASK:
281
+
282
+ Collaboratively generate specific, critical rules that AI agents must follow when implementing code in this project.
283
+
284
+ ## CONTEXT GENERATION SEQUENCE:
285
+
286
+ ### 1. Technology Stack & Versions
287
+
288
+ Document the exact technology stack from discovery:
289
+
290
+ **Core Technologies:**
291
+ Based on user skill level, present findings:
292
+
293
+ **Expert Mode:**
294
+ "Technology stack from your architecture and package files:
295
+ {{exact_technologies_with_versions}}
296
+
297
+ Any critical version constraints I should document for agents?"
298
+
299
+ **Intermediate Mode:**
300
+ "I found your technology stack:
301
+
302
+ **Core Technologies:**
303
+ {{main_technologies_with_versions}}
304
+
305
+ **Key Dependencies:**
306
+ {{important_dependencies_with_versions}}
307
+
308
+ Are there any version constraints or compatibility notes agents should know about?"
309
+
310
+ **Beginner Mode:**
311
+ "Here are the technologies you're using:
312
+
313
+ **Main Technologies:**
314
+ {{friendly_description_of_tech_stack}}
315
+
316
+ **Important Notes:**
317
+ {{key_things_agents_need_to_know_about_versions}}
318
+
319
+ Should I document any special version rules or compatibility requirements?"
320
+
321
+ ### 2. Language-Specific Rules
322
+
323
+ Focus on unobvious language patterns agents might miss:
324
+
325
+ **TypeScript/JavaScript Rules:**
326
+ "Based on your codebase, I notice some specific patterns:
327
+
328
+ **Configuration Requirements:**
329
+ {{typescript_config_rules}}
330
+
331
+ **Import/Export Patterns:**
332
+ {{import_export_conventions}}
333
+
334
+ **Error Handling Patterns:**
335
+ {{error_handling_requirements}}
336
+
337
+ Are these patterns correct? Any other language-specific rules agents should follow?"
338
+
339
+ **Python/Ruby/Other Language Rules:**
340
+ Adapt to the actual language in use with similar focused questions.
341
+
342
+ ### 3. Framework-Specific Rules
343
+
344
+ Document framework-specific patterns:
345
+
346
+ **React Rules (if applicable):**
347
+ "For React development, I see these patterns:
348
+
349
+ **Hooks Usage:**
350
+ {{hooks_usage_patterns}}
351
+
352
+ **Component Structure:**
353
+ {{component_organization_rules}}
354
+
355
+ **State Management:**
356
+ {{state_management_patterns}}
357
+
358
+ **Performance Rules:**
359
+ {{performance_optimization_requirements}}
360
+
361
+ Should I add any other React-specific rules?"
362
+
363
+ **Other Framework Rules:**
364
+ Adapt for Vue, Angular, Next.js, Express, etc.
365
+
366
+ ### 4. Testing Rules
367
+
368
+ Focus on testing patterns that ensure consistency:
369
+
370
+ **Test Structure Rules:**
371
+ "Your testing setup shows these patterns:
372
+
373
+ **Test Organization:**
374
+ {{test_file_organization}}
375
+
376
+ **Mock Usage:**
377
+ {{mock_patterns_and_conventions}}
378
+
379
+ **Test Coverage Requirements:**
380
+ {{coverage_expectations}}
381
+
382
+ **Integration vs Unit Test Rules:**
383
+ {{test_boundary_patterns}}
384
+
385
+ Are there testing rules agents should always follow?"
386
+
387
+ ### 5. Code Quality & Style Rules
388
+
389
+ Document critical style and quality rules:
390
+
391
+ **Linting/Formatting:**
392
+ "Your code style configuration requires:
393
+
394
+ **ESLint/Prettier Rules:**
395
+ {{specific_linting_rules}}
396
+
397
+ **Code Organization:**
398
+ {{file_and_folder_structure_rules}}
399
+
400
+ **Naming Conventions:**
401
+ {{naming_patterns_agents_must_follow}}
402
+
403
+ **Documentation Requirements:**
404
+ {{comment_and_documentation_patterns}}
405
+
406
+ Any additional code quality rules?"
407
+
408
+ ### 6. Development Workflow Rules
409
+
410
+ Document workflow patterns that affect implementation:
411
+
412
+ **Git/Repository Rules:**
413
+ "Your project uses these patterns:
414
+
415
+ **Branch Naming:**
416
+ {{branch_naming_conventions}}
417
+
418
+ **Commit Message Format:**
419
+ {{commit_message_patterns}}
420
+
421
+ **PR Requirements:**
422
+ {{pull_request_checklist}}
423
+
424
+ **Deployment Patterns:**
425
+ {{deployment_considerations}}
426
+
427
+ Should I document any other workflow rules?"
428
+
429
+ ### 7. Critical Don't-Miss Rules
430
+
431
+ Identify rules that prevent common mistakes:
432
+
433
+ **Anti-Patterns to Avoid:**
434
+ "Based on your codebase, here are critical things agents must NOT do:
435
+
436
+ {{critical_anti_patterns_with_examples}}
437
+
438
+ **Edge Cases:**
439
+ {{specific_edge_cases_agents_should_handle}}
440
+
441
+ **Security Rules:**
442
+ {{security_considerations_agents_must_follow}}
443
+
444
+ **Performance Gotchas:**
445
+ {{performance_patterns_to_avoid}}
446
+
447
+ Are there other 'gotchas' agents should know about?"
448
+
449
+ ### 8. Generate Context Content
450
+
451
+ For each category, prepare lean content for the project context file:
452
+
453
+ #### Content Structure:
454
+
455
+ ```markdown
456
+ ## Technology Stack & Versions
457
+
458
+ {{concise_technology_list_with_exact_versions}}
459
+
460
+ ## Critical Implementation Rules
461
+
462
+ ### Language-Specific Rules
463
+
464
+ {{bullet_points_of_critical_language_rules}}
465
+
466
+ ### Framework-Specific Rules
467
+
468
+ {{bullet_points_of_framework_patterns}}
469
+
470
+ ### Testing Rules
471
+
472
+ {{bullet_points_of_testing_requirements}}
473
+
474
+ ### Code Quality & Style Rules
475
+
476
+ {{bullet_points_of_style_and_quality_rules}}
477
+
478
+ ### Development Workflow Rules
479
+
480
+ {{bullet_points_of_workflow_patterns}}
481
+
482
+ ### Critical Don't-Miss Rules
483
+
484
+ {{bullet_points_of_anti_patterns_and_edge_cases}}
485
+ ```
486
+
487
+ ### 9. Present Content and Menu
488
+
489
+ After each category, show the generated rules and present choices:
490
+
491
+ "I've drafted the {{category_name}} rules for your project context.
492
+
493
+ **Here's what I'll add:**
494
+
495
+ [Show the complete markdown content for this category]
496
+
497
+ **What would you like to do?**
498
+ [A] Advanced Elicitation - Explore nuanced rules for this category
499
+ [P] Party Mode - Review from different implementation perspectives
500
+ [C] Continue - Save these rules and move to next category"
501
+
502
+ ### 10. Handle Menu Selection
503
+
504
+ #### If 'A' (Advanced Elicitation):
505
+
506
+ - Execute advanced-elicitation.xml with current category rules
507
+ - Process enhanced rules that come back
508
+ - Ask user: "Accept these enhanced rules for {{category}}? (y/n)"
509
+ - If yes: Update content, then return to A/P/C menu
510
+ - If no: Keep original content, then return to A/P/C menu
511
+
512
+ #### If 'P' (Party Mode):
513
+
514
+ - Execute party-mode workflow with category rules context
515
+ - Process collaborative insights on implementation patterns
516
+ - Ask user: "Accept these changes to {{category}} rules? (y/n)"
517
+ - If yes: Update content, then return to A/P/C menu
518
+ - If no: Keep original content, then return to A/P/C menu
519
+
520
+ #### If 'C' (Continue):
521
+
522
+ - Save the current category content to project context file
523
+ - Update frontmatter: `sections_completed: [...]`
524
+ - Proceed to next category or step-03 if complete
525
+
526
+ ## APPEND TO PROJECT CONTEXT:
527
+
528
+ When user selects 'C' for a category, append the content directly to `{output_folder}/project-context.md` using the structure from step 8.
529
+
530
+ ## SUCCESS METRICS:
531
+
532
+ ✅ All critical technology versions accurately documented
533
+ ✅ Language-specific rules cover unobvious patterns
534
+ ✅ Framework rules capture project-specific conventions
535
+ ✅ Testing rules ensure consistent test quality
536
+ ✅ Code quality rules maintain project standards
537
+ ✅ Workflow rules prevent implementation conflicts
538
+ ✅ Content is lean and optimized for LLM context
539
+ ✅ A/P/C menu presented and handled correctly for each category
540
+
541
+ ## FAILURE MODES:
542
+
543
+ ❌ Including obvious rules that agents already know
544
+ ❌ Making content too verbose for LLM context efficiency
545
+ ❌ Missing critical anti-patterns or edge cases
546
+ ❌ Not getting user validation for each rule category
547
+ ❌ Not documenting exact versions and configurations
548
+ ❌ Not presenting A/P/C menu after content generation
549
+
550
+ ## NEXT STEP:
551
+
552
+ After completing all rule categories and user selects 'C' for the final category, load `./step-03-complete.md` to finalize the project context file.
553
+
554
+ Remember: Do NOT proceed to step-03 until all categories are complete and user explicitly selects 'C' for each!
555
+
556
+
557
+ # Step 3: Context Completion & Finalization
558
+
559
+ ## MANDATORY EXECUTION RULES (READ FIRST):
560
+
561
+ - 🛑 NEVER generate content without user input
562
+ - ✅ ALWAYS treat this as collaborative completion between technical peers
563
+ - 📋 YOU ARE A FACILITATOR, not a content generator
564
+ - 💬 FOCUS on finalizing a lean, LLM-optimized project context
565
+ - 🎯 ENSURE all critical rules are captured and actionable
566
+ - ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed
567
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
568
+
569
+ ## EXECUTION PROTOCOLS:
570
+
571
+ - 🎯 Show your analysis before taking any action
572
+ - 📝 Review and optimize content for LLM context efficiency
573
+ - 📖 Update frontmatter with completion status
574
+ - 🚫 NO MORE STEPS - this is the final step
575
+
576
+ ## CONTEXT BOUNDARIES:
577
+
578
+ - All rule categories from step-2 are complete
579
+ - Technology stack and versions are documented
580
+ - Focus on final review, optimization, and completion
581
+ - Ensure the context file is ready for AI agent consumption
582
+
583
+ ## YOUR TASK:
584
+
585
+ Complete the project context file, optimize it for LLM efficiency, and provide guidance for usage and maintenance.
586
+
587
+ ## COMPLETION SEQUENCE:
588
+
589
+ ### 1. Review Complete Context File
590
+
591
+ Read the entire project context file and analyze:
592
+
593
+ **Content Analysis:**
594
+
595
+ - Total length and readability for LLMs
596
+ - Clarity and specificity of rules
597
+ - Coverage of all critical areas
598
+ - Actionability of each rule
599
+
600
+ **Structure Analysis:**
601
+
602
+ - Logical organization of sections
603
+ - Consistency of formatting
604
+ - Absence of redundant or obvious information
605
+ - Optimization for quick scanning
606
+
607
+ ### 2. Optimize for LLM Context
608
+
609
+ Ensure the file is lean and efficient:
610
+
611
+ **Content Optimization:**
612
+
613
+ - Remove any redundant rules or obvious information
614
+ - Combine related rules into concise bullet points
615
+ - Use specific, actionable language
616
+ - Ensure each rule provides unique value
617
+
618
+ **Formatting Optimization:**
619
+
620
+ - Use consistent markdown formatting
621
+ - Implement clear section hierarchy
622
+ - Ensure scannability with strategic use of bolding
623
+ - Maintain readability while maximizing information density
624
+
625
+ ### 3. Final Content Structure
626
+
627
+ Ensure the final structure follows this optimized format:
628
+
629
+ ```markdown
630
+ # Project Context for AI Agents
631
+
632
+ _This file contains critical rules and patterns that AI agents must follow when implementing code in this project. Focus on unobvious details that agents might otherwise miss._
633
+
634
+ ---
635
+
636
+ ## Technology Stack & Versions
637
+
638
+ {{concise_technology_list}}
639
+
640
+ ## Critical Implementation Rules
641
+
642
+ ### Language-Specific Rules
643
+
644
+ {{specific_language_rules}}
645
+
646
+ ### Framework-Specific Rules
647
+
648
+ {{framework_patterns}}
649
+
650
+ ### Testing Rules
651
+
652
+ {{testing_requirements}}
653
+
654
+ ### Code Quality & Style Rules
655
+
656
+ {{style_and_quality_patterns}}
657
+
658
+ ### Development Workflow Rules
659
+
660
+ {{workflow_patterns}}
661
+
662
+ ### Critical Don't-Miss Rules
663
+
664
+ {{anti_patterns_and_edge_cases}}
665
+
666
+ ---
667
+
668
+ ## Usage Guidelines
669
+
670
+ **For AI Agents:**
671
+
672
+ - Read this file before implementing any code
673
+ - Follow ALL rules exactly as documented
674
+ - When in doubt, prefer the more restrictive option
675
+ - Update this file if new patterns emerge
676
+
677
+ **For Humans:**
678
+
679
+ - Keep this file lean and focused on agent needs
680
+ - Update when technology stack changes
681
+ - Review quarterly for outdated rules
682
+ - Remove rules that become obvious over time
683
+
684
+ Last Updated: {{date}}
685
+ ```
686
+
687
+ ### 4. Present Completion Summary
688
+
689
+ Based on user skill level, present the completion:
690
+
691
+ **Expert Mode:**
692
+ "Project context complete. Optimized for LLM consumption with {{rule_count}} critical rules across {{section_count}} sections.
693
+
694
+ File saved to: `{output_folder}/project-context.md`
695
+
696
+ Ready for AI agent integration."
697
+
698
+ **Intermediate Mode:**
699
+ "Your project context is complete and optimized for AI agents!
700
+
701
+ **What we created:**
702
+
703
+ - {{rule_count}} critical implementation rules
704
+ - Technology stack with exact versions
705
+ - Framework-specific patterns and conventions
706
+ - Testing and quality guidelines
707
+ - Workflow and anti-pattern rules
708
+
709
+ **Key benefits:**
710
+
711
+ - AI agents will implement consistently with your standards
712
+ - Reduced context switching and implementation errors
713
+ - Clear guidance for unobvious project requirements
714
+
715
+ **Next steps:**
716
+
717
+ - AI agents should read this file before implementing
718
+ - Update as your project evolves
719
+ - Review periodically for optimization"
720
+
721
+ **Beginner Mode:**
722
+ "Excellent! Your project context guide is ready! 🎉
723
+
724
+ **What this does:**
725
+ Think of this as a 'rules of the road' guide for AI agents working on your project. It ensures they all follow the same patterns and avoid common mistakes.
726
+
727
+ **What's included:**
728
+
729
+ - Exact technology versions to use
730
+ - Critical coding rules they might miss
731
+ - Testing and quality standards
732
+ - Workflow patterns to follow
733
+
734
+ **How AI agents use it:**
735
+ They read this file before writing any code, ensuring everything they create follows your project's standards perfectly.
736
+
737
+ Your project context is saved and ready to help agents implement consistently!"
738
+
739
+ ### 5. Final File Updates
740
+
741
+ Update the project context file with completion information:
742
+
743
+ **Frontmatter Update:**
744
+
745
+ ```yaml
746
+ ---
747
+ project_name: '{{project_name}}'
748
+ user_name: '{{user_name}}'
749
+ date: '{{date}}'
750
+ sections_completed:
751
+ ['technology_stack', 'language_rules', 'framework_rules', 'testing_rules', 'quality_rules', 'workflow_rules', 'anti_patterns']
752
+ status: 'complete'
753
+ rule_count: { { total_rules } }
754
+ optimized_for_llm: true
755
+ ---
756
+ ```
757
+
758
+ **Add Usage Section:**
759
+ Append the usage guidelines from step 3 to complete the document.
760
+
761
+ ### 6. Completion Validation
762
+
763
+ Final checks before completion:
764
+
765
+ **Content Validation:**
766
+ ✅ All critical technology versions documented
767
+ ✅ Language-specific rules are specific and actionable
768
+ ✅ Framework rules cover project conventions
769
+ ✅ Testing rules ensure consistency
770
+ ✅ Code quality rules maintain standards
771
+ ✅ Workflow rules prevent conflicts
772
+ ✅ Anti-pattern rules prevent common mistakes
773
+
774
+ **Format Validation:**
775
+ ✅ Content is lean and optimized for LLMs
776
+ ✅ Structure is logical and scannable
777
+ ✅ No redundant or obvious information
778
+ ✅ Consistent formatting throughout
779
+
780
+ ### 7. Completion Message
781
+
782
+ Present final completion to user:
783
+
784
+ "✅ **Project Context Generation Complete!**
785
+
786
+ Your optimized project context file is ready at:
787
+ `{output_folder}/project-context.md`
788
+
789
+ **📊 Context Summary:**
790
+
791
+ - {{rule_count}} critical rules for AI agents
792
+ - {{section_count}} comprehensive sections
793
+ - Optimized for LLM context efficiency
794
+ - Ready for immediate agent integration
795
+
796
+ **🎯 Key Benefits:**
797
+
798
+ - Consistent implementation across all AI agents
799
+ - Reduced common mistakes and edge cases
800
+ - Clear guidance for project-specific patterns
801
+ - Minimal LLM context usage
802
+
803
+ **📋 Next Steps:**
804
+
805
+ 1. AI agents will automatically read this file when implementing
806
+ 2. Update this file when your technology stack or patterns evolve
807
+ 3. Review quarterly to optimize and remove outdated rules
808
+
809
+ Your project context will help ensure high-quality, consistent implementation across all development work. Great work capturing your project's critical implementation requirements!"
810
+
811
+ ## SUCCESS METRICS:
812
+
813
+ ✅ Complete project context file with all critical rules
814
+ ✅ Content optimized for LLM context efficiency
815
+ ✅ All technology versions and patterns documented
816
+ ✅ File structure is logical and scannable
817
+ ✅ Usage guidelines included for agents and humans
818
+ ✅ Frontmatter properly updated with completion status
819
+ ✅ User provided with clear next steps and benefits
820
+
821
+ ## FAILURE MODES:
822
+
823
+ ❌ Final content is too verbose for LLM consumption
824
+ ❌ Missing critical implementation rules or patterns
825
+ ❌ Not optimizing content for agent readability
826
+ ❌ Not providing clear usage guidelines
827
+ ❌ Frontmatter not properly updated
828
+ ❌ Not validating file completion before ending
829
+
830
+ ## WORKFLOW COMPLETE:
831
+
832
+ This is the final step of the Generate Project Context workflow. The user now has a comprehensive, optimized project context file that will ensure consistent, high-quality implementation across all AI agents working on the project.
833
+
834
+ The project context file serves as the critical "rules of the road" that agents need to implement code consistently with the project's standards and patterns.
65
835
 
66
- **Note:** Input document discovery and initialization protocols are handled in step-01-discover.md.