bmad-method 4.14.1 → 4.16.0
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.
- package/.bmad-core/agent-teams/team-all.yml +14 -0
- package/.bmad-core/agent-teams/team-fullstack.yml +18 -0
- package/.bmad-core/agent-teams/team-ide-minimal.yml +10 -0
- package/.bmad-core/agent-teams/team-no-ui.yml +13 -0
- package/.bmad-core/agents/analyst.md +64 -0
- package/.bmad-core/agents/architect.md +64 -0
- package/.bmad-core/agents/bmad-master.md +101 -0
- package/.bmad-core/agents/bmad-orchestrator.md +126 -0
- package/.bmad-core/agents/dev.md +65 -0
- package/.bmad-core/agents/pm.md +61 -0
- package/.bmad-core/agents/po.md +63 -0
- package/.bmad-core/agents/qa.md +50 -0
- package/.bmad-core/agents/sm.md +51 -0
- package/.bmad-core/agents/ux-expert.md +63 -0
- package/.bmad-core/checklists/architect-checklist.md +443 -0
- package/.bmad-core/checklists/change-checklist.md +182 -0
- package/.bmad-core/checklists/pm-checklist.md +375 -0
- package/.bmad-core/checklists/po-master-checklist.md +441 -0
- package/.bmad-core/checklists/story-dod-checklist.md +101 -0
- package/.bmad-core/checklists/story-draft-checklist.md +156 -0
- package/.bmad-core/core-config.yml +20 -0
- package/.bmad-core/data/bmad-kb.md +814 -0
- package/.bmad-core/data/technical-preferences.md +3 -0
- package/.bmad-core/install-manifest.yml +196 -0
- package/.bmad-core/tasks/advanced-elicitation.md +92 -0
- package/.bmad-core/tasks/brainstorming-techniques.md +238 -0
- package/.bmad-core/tasks/brownfield-create-epic.md +160 -0
- package/.bmad-core/tasks/brownfield-create-story.md +147 -0
- package/.bmad-core/tasks/core-dump.md +74 -0
- package/.bmad-core/tasks/correct-course.md +73 -0
- package/.bmad-core/tasks/create-deep-research-prompt.md +301 -0
- package/.bmad-core/tasks/create-doc.md +74 -0
- package/.bmad-core/tasks/create-next-story.md +242 -0
- package/.bmad-core/tasks/doc-migration-task.md +151 -0
- package/.bmad-core/tasks/document-project.md +350 -0
- package/.bmad-core/tasks/execute-checklist.md +97 -0
- package/.bmad-core/tasks/generate-ai-frontend-prompt.md +51 -0
- package/.bmad-core/tasks/index-docs.md +178 -0
- package/.bmad-core/tasks/kb-mode-interaction.md +77 -0
- package/.bmad-core/tasks/review-story.md +153 -0
- package/.bmad-core/tasks/shard-doc.md +191 -0
- package/.bmad-core/templates/architecture-tmpl.md +776 -0
- package/.bmad-core/templates/brownfield-architecture-tmpl.md +544 -0
- package/.bmad-core/templates/brownfield-prd-tmpl.md +242 -0
- package/.bmad-core/templates/competitor-analysis-tmpl.md +291 -0
- package/.bmad-core/templates/front-end-architecture-tmpl.md +175 -0
- package/.bmad-core/templates/front-end-spec-tmpl.md +413 -0
- package/.bmad-core/templates/fullstack-architecture-tmpl.md +1018 -0
- package/.bmad-core/templates/market-research-tmpl.md +263 -0
- package/.bmad-core/templates/prd-tmpl.md +202 -0
- package/.bmad-core/templates/project-brief-tmpl.md +230 -0
- package/.bmad-core/templates/story-tmpl.md +69 -0
- package/.bmad-core/utils/file-resolution-context.md +10 -0
- package/.bmad-core/utils/template-format.md +26 -0
- package/.bmad-core/utils/web-agent-startup-instructions.md +39 -0
- package/.bmad-core/utils/workflow-management.md +223 -0
- package/.bmad-core/workflows/brownfield-fullstack.yml +112 -0
- package/.bmad-core/workflows/brownfield-service.yml +113 -0
- package/.bmad-core/workflows/brownfield-ui.yml +123 -0
- package/.bmad-core/workflows/greenfield-fullstack.yml +166 -0
- package/.bmad-core/workflows/greenfield-service.yml +132 -0
- package/.bmad-core/workflows/greenfield-ui.yml +161 -0
- package/.claude/commands/analyst.md +68 -0
- package/.claude/commands/architect.md +68 -0
- package/.claude/commands/bmad-master.md +105 -0
- package/.claude/commands/bmad-orchestrator.md +130 -0
- package/.claude/commands/dev.md +69 -0
- package/.claude/commands/pm.md +65 -0
- package/.claude/commands/po.md +67 -0
- package/.claude/commands/qa.md +54 -0
- package/.claude/commands/sm.md +55 -0
- package/.claude/commands/ux-expert.md +67 -0
- package/.clinerules/01-bmad-master.md +116 -0
- package/.clinerules/02-bmad-orchestrator.md +141 -0
- package/.clinerules/03-pm.md +76 -0
- package/.clinerules/04-analyst.md +79 -0
- package/.clinerules/05-architect.md +79 -0
- package/.clinerules/06-po.md +78 -0
- package/.clinerules/07-sm.md +66 -0
- package/.clinerules/08-dev.md +80 -0
- package/.clinerules/09-qa.md +65 -0
- package/.clinerules/10-ux-expert.md +78 -0
- package/.cursor/rules/analyst.mdc +82 -0
- package/.cursor/rules/architect.mdc +82 -0
- package/.cursor/rules/bmad-master.mdc +119 -0
- package/.cursor/rules/bmad-orchestrator.mdc +144 -0
- package/.cursor/rules/dev.mdc +83 -0
- package/.cursor/rules/pm.mdc +79 -0
- package/.cursor/rules/po.mdc +81 -0
- package/.cursor/rules/qa.mdc +68 -0
- package/.cursor/rules/sm.mdc +69 -0
- package/.cursor/rules/ux-expert.mdc +81 -0
- package/.gemini/agents/analyst.md +64 -0
- package/.gemini/agents/architect.md +64 -0
- package/.gemini/agents/bmad-master.md +101 -0
- package/.gemini/agents/bmad-orchestrator.md +126 -0
- package/.gemini/agents/dev.md +65 -0
- package/.gemini/agents/pm.md +61 -0
- package/.gemini/agents/po.md +63 -0
- package/.gemini/agents/qa.md +50 -0
- package/.gemini/agents/sm.md +51 -0
- package/.gemini/agents/ux-expert.md +63 -0
- package/.gemini/settings.json +14 -0
- package/.roomodes +95 -0
- package/.windsurf/rules/analyst.md +76 -0
- package/.windsurf/rules/architect.md +76 -0
- package/.windsurf/rules/bmad-master.md +113 -0
- package/.windsurf/rules/bmad-orchestrator.md +138 -0
- package/.windsurf/rules/dev.md +77 -0
- package/.windsurf/rules/pm.md +73 -0
- package/.windsurf/rules/po.md +75 -0
- package/.windsurf/rules/qa.md +62 -0
- package/.windsurf/rules/sm.md +63 -0
- package/.windsurf/rules/ux-expert.md +75 -0
- package/CHANGELOG.md +14 -0
- package/README.md +2 -1
- package/package.json +1 -1
- package/tools/installer/bin/bmad.js +3 -2
- package/tools/installer/config/install.config.yml +10 -0
- package/tools/installer/lib/ide-setup.js +59 -0
- package/tools/installer/package.json +1 -1
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
# Document an Existing Project
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Generate comprehensive documentation for existing projects optimized for AI development agents. This task creates structured reference materials that enable AI agents to understand project context, conventions, and patterns for effective contribution to any codebase.
|
|
6
|
+
|
|
7
|
+
## Task Instructions
|
|
8
|
+
|
|
9
|
+
### 1. Initial Project Analysis
|
|
10
|
+
|
|
11
|
+
[[LLM: First, check if a PRD or requirements document exists in context. If yes, use it to focus your documentation efforts on relevant areas only.
|
|
12
|
+
|
|
13
|
+
**IF PRD EXISTS**:
|
|
14
|
+
|
|
15
|
+
- Review the PRD to understand what enhancement/feature is planned
|
|
16
|
+
- Identify which modules, services, or areas will be affected
|
|
17
|
+
- Focus documentation ONLY on these relevant areas
|
|
18
|
+
- Skip unrelated parts of the codebase to keep docs lean
|
|
19
|
+
|
|
20
|
+
**IF NO PRD EXISTS**:
|
|
21
|
+
Ask the user:
|
|
22
|
+
|
|
23
|
+
"I notice you haven't provided a PRD or requirements document. To create more focused and useful documentation, I recommend one of these options:
|
|
24
|
+
|
|
25
|
+
1. **Create a PRD first** - Would you like me to help create a brownfield PRD before documenting? This helps focus documentation on relevant areas.
|
|
26
|
+
|
|
27
|
+
2. **Provide existing requirements** - Do you have a requirements document, epic, or feature description you can share?
|
|
28
|
+
|
|
29
|
+
3. **Describe the focus** - Can you briefly describe what enhancement or feature you're planning? For example:
|
|
30
|
+
|
|
31
|
+
- 'Adding payment processing to the user service'
|
|
32
|
+
- 'Refactoring the authentication module'
|
|
33
|
+
- 'Integrating with a new third-party API'
|
|
34
|
+
|
|
35
|
+
4. **Document everything** - Or should I proceed with comprehensive documentation of the entire codebase? (Note: This may create excessive documentation for large projects)
|
|
36
|
+
|
|
37
|
+
Please let me know your preference, or I can proceed with full documentation if you prefer."
|
|
38
|
+
|
|
39
|
+
Based on their response:
|
|
40
|
+
|
|
41
|
+
- If they choose option 1-3: Use that context to focus documentation
|
|
42
|
+
- If they choose option 4 or decline: Proceed with comprehensive analysis below
|
|
43
|
+
|
|
44
|
+
Begin by conducting analysis of the existing project. Use available tools to:
|
|
45
|
+
|
|
46
|
+
1. **Project Structure Discovery**: Examine the root directory structure, identify main folders, and understand the overall organization
|
|
47
|
+
2. **Technology Stack Identification**: Look for package.json, requirements.txt, Cargo.toml, pom.xml, etc. to identify languages, frameworks, and dependencies
|
|
48
|
+
3. **Build System Analysis**: Find build scripts, CI/CD configurations, and development commands
|
|
49
|
+
4. **Existing Documentation Review**: Check for README files, docs folders, and any existing documentation
|
|
50
|
+
5. **Code Pattern Analysis**: Sample key files to understand coding patterns, naming conventions, and architectural approaches
|
|
51
|
+
|
|
52
|
+
Ask the user these elicitation questions to better understand their needs:
|
|
53
|
+
|
|
54
|
+
- What is the primary purpose of this project?
|
|
55
|
+
- Are there any specific areas of the codebase that are particularly complex or important for agents to understand?
|
|
56
|
+
- What types of tasks do you expect AI agents to perform on this project? (e.g., bug fixes, feature additions, refactoring, testing)
|
|
57
|
+
- Are there any existing documentation standards or formats you prefer?
|
|
58
|
+
- What level of technical detail should the documentation target? (junior developers, senior developers, mixed team)
|
|
59
|
+
- Is there a specific feature or enhancement you're planning? (This helps focus documentation)
|
|
60
|
+
]]
|
|
61
|
+
|
|
62
|
+
### 2. Deep Codebase Analysis
|
|
63
|
+
|
|
64
|
+
[[LLM: Before generating documentation, conduct extensive analysis of the existing codebase:
|
|
65
|
+
|
|
66
|
+
1. **Explore Key Areas**:
|
|
67
|
+
|
|
68
|
+
- Entry points (main files, index files, app initializers)
|
|
69
|
+
- Configuration files and environment setup
|
|
70
|
+
- Package dependencies and versions
|
|
71
|
+
- Build and deployment configurations
|
|
72
|
+
- Test suites and coverage
|
|
73
|
+
|
|
74
|
+
2. **Ask Clarifying Questions**:
|
|
75
|
+
|
|
76
|
+
- "I see you're using [technology X]. Are there any custom patterns or conventions I should document?"
|
|
77
|
+
- "What are the most critical/complex parts of this system that developers struggle with?"
|
|
78
|
+
- "Are there any undocumented 'tribal knowledge' areas I should capture?"
|
|
79
|
+
- "What technical debt or known issues should I document?"
|
|
80
|
+
- "Which parts of the codebase change most frequently?"
|
|
81
|
+
|
|
82
|
+
3. **Map the Reality**:
|
|
83
|
+
- Identify ACTUAL patterns used (not theoretical best practices)
|
|
84
|
+
- Find where key business logic lives
|
|
85
|
+
- Locate integration points and external dependencies
|
|
86
|
+
- Document workarounds and technical debt
|
|
87
|
+
- Note areas that differ from standard patterns
|
|
88
|
+
|
|
89
|
+
**IF PRD PROVIDED**: Also analyze what would need to change for the enhancement]]
|
|
90
|
+
|
|
91
|
+
### 3. Core Documentation Generation
|
|
92
|
+
|
|
93
|
+
[[LLM: Generate a comprehensive BROWNFIELD architecture document that reflects the ACTUAL state of the codebase.
|
|
94
|
+
|
|
95
|
+
**CRITICAL**: This is NOT an aspirational architecture document. Document what EXISTS, including:
|
|
96
|
+
|
|
97
|
+
- Technical debt and workarounds
|
|
98
|
+
- Inconsistent patterns between different parts
|
|
99
|
+
- Legacy code that can't be changed
|
|
100
|
+
- Integration constraints
|
|
101
|
+
- Performance bottlenecks
|
|
102
|
+
|
|
103
|
+
**Document Structure**:
|
|
104
|
+
|
|
105
|
+
# [Project Name] Brownfield Architecture Document
|
|
106
|
+
|
|
107
|
+
## Introduction
|
|
108
|
+
|
|
109
|
+
This document captures the CURRENT STATE of the [Project Name] codebase, including technical debt, workarounds, and real-world patterns. It serves as a reference for AI agents working on enhancements.
|
|
110
|
+
|
|
111
|
+
### Document Scope
|
|
112
|
+
|
|
113
|
+
[If PRD provided: "Focused on areas relevant to: {enhancement description}"]
|
|
114
|
+
[If no PRD: "Comprehensive documentation of entire system"]
|
|
115
|
+
|
|
116
|
+
### Change Log
|
|
117
|
+
|
|
118
|
+
| Date | Version | Description | Author |
|
|
119
|
+
| ------ | ------- | --------------------------- | --------- |
|
|
120
|
+
| [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
|
|
121
|
+
|
|
122
|
+
## Quick Reference - Key Files and Entry Points
|
|
123
|
+
|
|
124
|
+
### Critical Files for Understanding the System
|
|
125
|
+
|
|
126
|
+
- **Main Entry**: `src/index.js` (or actual entry point)
|
|
127
|
+
- **Configuration**: `config/app.config.js`, `.env.example`
|
|
128
|
+
- **Core Business Logic**: `src/services/`, `src/domain/`
|
|
129
|
+
- **API Definitions**: `src/routes/` or link to OpenAPI spec
|
|
130
|
+
- **Database Models**: `src/models/` or link to schema files
|
|
131
|
+
- **Key Algorithms**: [List specific files with complex logic]
|
|
132
|
+
|
|
133
|
+
### If PRD Provided - Enhancement Impact Areas
|
|
134
|
+
|
|
135
|
+
[Highlight which files/modules will be affected by the planned enhancement]
|
|
136
|
+
|
|
137
|
+
## High Level Architecture
|
|
138
|
+
|
|
139
|
+
### Technical Summary
|
|
140
|
+
|
|
141
|
+
[Real assessment of architecture - mention if it's well-structured or has issues]
|
|
142
|
+
|
|
143
|
+
### Actual Tech Stack (from package.json/requirements.txt)
|
|
144
|
+
|
|
145
|
+
| Category | Technology | Version | Notes |
|
|
146
|
+
| --------- | ---------- | ------- | -------------------------- |
|
|
147
|
+
| Runtime | Node.js | 16.x | [Any constraints] |
|
|
148
|
+
| Framework | Express | 4.18.2 | [Custom middleware?] |
|
|
149
|
+
| Database | PostgreSQL | 13 | [Connection pooling setup] |
|
|
150
|
+
| [etc...] |
|
|
151
|
+
|
|
152
|
+
### Repository Structure Reality Check
|
|
153
|
+
|
|
154
|
+
- Type: [Monorepo/Polyrepo/Hybrid]
|
|
155
|
+
- Package Manager: [npm/yarn/pnpm]
|
|
156
|
+
- Notable: [Any unusual structure decisions]
|
|
157
|
+
|
|
158
|
+
## Source Tree and Module Organization
|
|
159
|
+
|
|
160
|
+
### Project Structure (Actual)
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
project-root/
|
|
164
|
+
├── src/
|
|
165
|
+
│ ├── controllers/ # HTTP request handlers
|
|
166
|
+
│ ├── services/ # Business logic (NOTE: inconsistent patterns between user and payment services)
|
|
167
|
+
│ ├── models/ # Database models (Sequelize)
|
|
168
|
+
│ ├── utils/ # Mixed bag - needs refactoring
|
|
169
|
+
│ └── legacy/ # DO NOT MODIFY - old payment system still in use
|
|
170
|
+
├── tests/ # Jest tests (60% coverage)
|
|
171
|
+
├── scripts/ # Build and deployment scripts
|
|
172
|
+
└── config/ # Environment configs
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Key Modules and Their Purpose
|
|
176
|
+
|
|
177
|
+
- **User Management**: `src/services/userService.js` - Handles all user operations
|
|
178
|
+
- **Authentication**: `src/middleware/auth.js` - JWT-based, custom implementation
|
|
179
|
+
- **Payment Processing**: `src/legacy/payment.js` - CRITICAL: Do not refactor, tightly coupled
|
|
180
|
+
- **[List other key modules with their actual files]**
|
|
181
|
+
|
|
182
|
+
## Data Models and APIs
|
|
183
|
+
|
|
184
|
+
### Data Models
|
|
185
|
+
|
|
186
|
+
Instead of duplicating, reference actual model files:
|
|
187
|
+
|
|
188
|
+
- **User Model**: See `src/models/User.js`
|
|
189
|
+
- **Order Model**: See `src/models/Order.js`
|
|
190
|
+
- **Related Types**: TypeScript definitions in `src/types/`
|
|
191
|
+
|
|
192
|
+
### API Specifications
|
|
193
|
+
|
|
194
|
+
- **OpenAPI Spec**: `docs/api/openapi.yaml` (if exists)
|
|
195
|
+
- **Postman Collection**: `docs/api/postman-collection.json`
|
|
196
|
+
- **Manual Endpoints**: [List any undocumented endpoints discovered]
|
|
197
|
+
|
|
198
|
+
## Technical Debt and Known Issues
|
|
199
|
+
|
|
200
|
+
### Critical Technical Debt
|
|
201
|
+
|
|
202
|
+
1. **Payment Service**: Legacy code in `src/legacy/payment.js` - tightly coupled, no tests
|
|
203
|
+
2. **User Service**: Different pattern than other services, uses callbacks instead of promises
|
|
204
|
+
3. **Database Migrations**: Manually tracked, no proper migration tool
|
|
205
|
+
4. **[Other significant debt]**
|
|
206
|
+
|
|
207
|
+
### Workarounds and Gotchas
|
|
208
|
+
|
|
209
|
+
- **Environment Variables**: Must set `NODE_ENV=production` even for staging (historical reason)
|
|
210
|
+
- **Database Connections**: Connection pool hardcoded to 10, changing breaks payment service
|
|
211
|
+
- **[Other workarounds developers need to know]**
|
|
212
|
+
|
|
213
|
+
## Integration Points and External Dependencies
|
|
214
|
+
|
|
215
|
+
### External Services
|
|
216
|
+
|
|
217
|
+
| Service | Purpose | Integration Type | Key Files |
|
|
218
|
+
| -------- | -------- | ---------------- | ------------------------------ |
|
|
219
|
+
| Stripe | Payments | REST API | `src/integrations/stripe/` |
|
|
220
|
+
| SendGrid | Emails | SDK | `src/services/emailService.js` |
|
|
221
|
+
| [etc...] |
|
|
222
|
+
|
|
223
|
+
### Internal Integration Points
|
|
224
|
+
|
|
225
|
+
- **Frontend Communication**: REST API on port 3000, expects specific headers
|
|
226
|
+
- **Background Jobs**: Redis queue, see `src/workers/`
|
|
227
|
+
- **[Other integrations]**
|
|
228
|
+
|
|
229
|
+
## Development and Deployment
|
|
230
|
+
|
|
231
|
+
### Local Development Setup
|
|
232
|
+
|
|
233
|
+
1. Actual steps that work (not ideal steps)
|
|
234
|
+
2. Known issues with setup
|
|
235
|
+
3. Required environment variables (see `.env.example`)
|
|
236
|
+
|
|
237
|
+
### Build and Deployment Process
|
|
238
|
+
|
|
239
|
+
- **Build Command**: `npm run build` (webpack config in `webpack.config.js`)
|
|
240
|
+
- **Deployment**: Manual deployment via `scripts/deploy.sh`
|
|
241
|
+
- **Environments**: Dev, Staging, Prod (see `config/environments/`)
|
|
242
|
+
|
|
243
|
+
## Testing Reality
|
|
244
|
+
|
|
245
|
+
### Current Test Coverage
|
|
246
|
+
|
|
247
|
+
- Unit Tests: 60% coverage (Jest)
|
|
248
|
+
- Integration Tests: Minimal, in `tests/integration/`
|
|
249
|
+
- E2E Tests: None
|
|
250
|
+
- Manual Testing: Primary QA method
|
|
251
|
+
|
|
252
|
+
### Running Tests
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
npm test # Runs unit tests
|
|
256
|
+
npm run test:integration # Runs integration tests (requires local DB)
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## If Enhancement PRD Provided - Impact Analysis
|
|
260
|
+
|
|
261
|
+
### Files That Will Need Modification
|
|
262
|
+
|
|
263
|
+
Based on the enhancement requirements, these files will be affected:
|
|
264
|
+
|
|
265
|
+
- `src/services/userService.js` - Add new user fields
|
|
266
|
+
- `src/models/User.js` - Update schema
|
|
267
|
+
- `src/routes/userRoutes.js` - New endpoints
|
|
268
|
+
- [etc...]
|
|
269
|
+
|
|
270
|
+
### New Files/Modules Needed
|
|
271
|
+
|
|
272
|
+
- `src/services/newFeatureService.js` - New business logic
|
|
273
|
+
- `src/models/NewFeature.js` - New data model
|
|
274
|
+
- [etc...]
|
|
275
|
+
|
|
276
|
+
### Integration Considerations
|
|
277
|
+
|
|
278
|
+
- Will need to integrate with existing auth middleware
|
|
279
|
+
- Must follow existing response format in `src/utils/responseFormatter.js`
|
|
280
|
+
- [Other integration points]
|
|
281
|
+
|
|
282
|
+
## Appendix - Useful Commands and Scripts
|
|
283
|
+
|
|
284
|
+
### Frequently Used Commands
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
npm run dev # Start development server
|
|
288
|
+
npm run build # Production build
|
|
289
|
+
npm run migrate # Run database migrations
|
|
290
|
+
npm run seed # Seed test data
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Debugging and Troubleshooting
|
|
294
|
+
|
|
295
|
+
- **Logs**: Check `logs/app.log` for application logs
|
|
296
|
+
- **Debug Mode**: Set `DEBUG=app:*` for verbose logging
|
|
297
|
+
- **Common Issues**: See `docs/troubleshooting.md`]]
|
|
298
|
+
|
|
299
|
+
### 4. Document Delivery
|
|
300
|
+
|
|
301
|
+
[[LLM: After generating the complete architecture document:
|
|
302
|
+
|
|
303
|
+
1. **In Web UI (Gemini, ChatGPT, Claude)**:
|
|
304
|
+
|
|
305
|
+
- Present the entire document in one response (or multiple if too long)
|
|
306
|
+
- Tell user to copy and save as `docs/brownfield-architecture.md` or `docs/project-architecture.md`
|
|
307
|
+
- Mention it can be sharded later in IDE if needed
|
|
308
|
+
|
|
309
|
+
2. **In IDE Environment**:
|
|
310
|
+
- Create the document as `docs/brownfield-architecture.md`
|
|
311
|
+
- Inform user this single document contains all architectural information
|
|
312
|
+
- Can be sharded later using PO agent if desired
|
|
313
|
+
|
|
314
|
+
The document should be comprehensive enough that future agents can understand:
|
|
315
|
+
|
|
316
|
+
- The actual state of the system (not idealized)
|
|
317
|
+
- Where to find key files and logic
|
|
318
|
+
- What technical debt exists
|
|
319
|
+
- What constraints must be respected
|
|
320
|
+
- If PRD provided: What needs to change for the enhancement]]
|
|
321
|
+
|
|
322
|
+
### 5. Quality Assurance
|
|
323
|
+
|
|
324
|
+
[[LLM: Before finalizing the document:
|
|
325
|
+
|
|
326
|
+
1. **Accuracy Check**: Verify all technical details match the actual codebase
|
|
327
|
+
2. **Completeness Review**: Ensure all major system components are documented
|
|
328
|
+
3. **Focus Validation**: If user provided scope, verify relevant areas are emphasized
|
|
329
|
+
4. **Clarity Assessment**: Check that explanations are clear for AI agents
|
|
330
|
+
5. **Navigation**: Ensure document has clear section structure for easy reference
|
|
331
|
+
|
|
332
|
+
Apply the advanced elicitation task after major sections to refine based on user feedback.]]
|
|
333
|
+
|
|
334
|
+
## Success Criteria
|
|
335
|
+
|
|
336
|
+
- Single comprehensive brownfield architecture document created
|
|
337
|
+
- Document reflects REALITY including technical debt and workarounds
|
|
338
|
+
- Key files and modules are referenced with actual paths
|
|
339
|
+
- Models/APIs reference source files rather than duplicating content
|
|
340
|
+
- If PRD provided: Clear impact analysis showing what needs to change
|
|
341
|
+
- Document enables AI agents to navigate and understand the actual codebase
|
|
342
|
+
- Technical constraints and "gotchas" are clearly documented
|
|
343
|
+
|
|
344
|
+
## Notes
|
|
345
|
+
|
|
346
|
+
- This task creates ONE document that captures the TRUE state of the system
|
|
347
|
+
- References actual files rather than duplicating content when possible
|
|
348
|
+
- Documents technical debt, workarounds, and constraints honestly
|
|
349
|
+
- For brownfield projects with PRD: Provides clear enhancement impact analysis
|
|
350
|
+
- The goal is PRACTICAL documentation for AI agents doing real work
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Checklist Validation Task
|
|
2
|
+
|
|
3
|
+
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
|
|
7
|
+
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
|
8
|
+
|
|
9
|
+
## Available Checklists
|
|
10
|
+
|
|
11
|
+
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
|
12
|
+
|
|
13
|
+
## Instructions
|
|
14
|
+
|
|
15
|
+
1. **Initial Assessment**
|
|
16
|
+
|
|
17
|
+
- If user or the task being run provides a checklist name:
|
|
18
|
+
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
|
19
|
+
- If multiple matches found, ask user to clarify
|
|
20
|
+
- Load the appropriate checklist from bmad-core/checklists/
|
|
21
|
+
- If no checklist specified:
|
|
22
|
+
- Ask the user which checklist they want to use
|
|
23
|
+
- Present the available options from the files in the checklists folder
|
|
24
|
+
- Confirm if they want to work through the checklist:
|
|
25
|
+
- Section by section (interactive mode - very time consuming)
|
|
26
|
+
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
|
|
27
|
+
|
|
28
|
+
2. **Document and Artifact Gathering**
|
|
29
|
+
|
|
30
|
+
- Each checklist will specify its required documents/artifacts at the beginning
|
|
31
|
+
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
|
|
32
|
+
|
|
33
|
+
3. **Checklist Processing**
|
|
34
|
+
|
|
35
|
+
If in interactive mode:
|
|
36
|
+
|
|
37
|
+
- Work through each section of the checklist one at a time
|
|
38
|
+
- For each section:
|
|
39
|
+
- Review all items in the section following instructions for that section embedded in the checklist
|
|
40
|
+
- Check each item against the relevant documentation or artifacts as appropriate
|
|
41
|
+
- Present summary of findings for that section, highlighting warnings, errors and non applicable items (rationale for non-applicability).
|
|
42
|
+
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
|
|
43
|
+
|
|
44
|
+
If in YOLO mode:
|
|
45
|
+
|
|
46
|
+
- Process all sections at once
|
|
47
|
+
- Create a comprehensive report of all findings
|
|
48
|
+
- Present the complete analysis to the user
|
|
49
|
+
|
|
50
|
+
4. **Validation Approach**
|
|
51
|
+
|
|
52
|
+
For each checklist item:
|
|
53
|
+
|
|
54
|
+
- Read and understand the requirement
|
|
55
|
+
- Look for evidence in the documentation that satisfies the requirement
|
|
56
|
+
- Consider both explicit mentions and implicit coverage
|
|
57
|
+
- Aside from this, follow all checklist llm instructions
|
|
58
|
+
- Mark items as:
|
|
59
|
+
- ✅ PASS: Requirement clearly met
|
|
60
|
+
- ❌ FAIL: Requirement not met or insufficient coverage
|
|
61
|
+
- ⚠️ PARTIAL: Some aspects covered but needs improvement
|
|
62
|
+
- N/A: Not applicable to this case
|
|
63
|
+
|
|
64
|
+
5. **Section Analysis**
|
|
65
|
+
|
|
66
|
+
For each section:
|
|
67
|
+
|
|
68
|
+
- think step by step to calculate pass rate
|
|
69
|
+
- Identify common themes in failed items
|
|
70
|
+
- Provide specific recommendations for improvement
|
|
71
|
+
- In interactive mode, discuss findings with user
|
|
72
|
+
- Document any user decisions or explanations
|
|
73
|
+
|
|
74
|
+
6. **Final Report**
|
|
75
|
+
|
|
76
|
+
Prepare a summary that includes:
|
|
77
|
+
|
|
78
|
+
- Overall checklist completion status
|
|
79
|
+
- Pass rates by section
|
|
80
|
+
- List of failed items with context
|
|
81
|
+
- Specific recommendations for improvement
|
|
82
|
+
- Any sections or items marked as N/A with justification
|
|
83
|
+
|
|
84
|
+
## Checklist Execution Methodology
|
|
85
|
+
|
|
86
|
+
Each checklist now contains embedded LLM prompts and instructions that will:
|
|
87
|
+
|
|
88
|
+
1. **Guide thorough thinking** - Prompts ensure deep analysis of each section
|
|
89
|
+
2. **Request specific artifacts** - Clear instructions on what documents/access is needed
|
|
90
|
+
3. **Provide contextual guidance** - Section-specific prompts for better validation
|
|
91
|
+
4. **Generate comprehensive reports** - Final summary with detailed findings
|
|
92
|
+
|
|
93
|
+
The LLM will:
|
|
94
|
+
|
|
95
|
+
- Execute the complete checklist validation
|
|
96
|
+
- Present a final report with pass/fail rates and key findings
|
|
97
|
+
- Offer to provide detailed analysis of any section, especially those with warnings or failures
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Create AI Frontend Prompt Task
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
To generate a masterful, comprehensive, and optimized prompt that can be used with any AI-driven frontend development tool (e.g., Vercel v0, Lovable.ai, or similar) to scaffold or generate significant portions of a frontend application.
|
|
6
|
+
|
|
7
|
+
## Inputs
|
|
8
|
+
|
|
9
|
+
- Completed UI/UX Specification (`front-end-spec`)
|
|
10
|
+
- Completed Frontend Architecture Document (`front-end-architecture`) or a full stack combined architecture such as `architecture.md`
|
|
11
|
+
- Main System Architecture Document (`architecture` - for API contracts and tech stack to give further context)
|
|
12
|
+
|
|
13
|
+
## Key Activities & Instructions
|
|
14
|
+
|
|
15
|
+
### 1. Core Prompting Principles
|
|
16
|
+
|
|
17
|
+
Before generating the prompt, you must understand these core principles for interacting with a generative AI for code.
|
|
18
|
+
|
|
19
|
+
- **Be Explicit and Detailed**: The AI cannot read your mind. Provide as much detail and context as possible. Vague requests lead to generic or incorrect outputs.
|
|
20
|
+
- **Iterate, Don't Expect Perfection**: Generating an entire complex application in one go is rare. The most effective method is to prompt for one component or one section at a time, then build upon the results.
|
|
21
|
+
- **Provide Context First**: Always start by providing the AI with the necessary context, such as the tech stack, existing code snippets, and overall project goals.
|
|
22
|
+
- **Mobile-First Approach**: Frame all UI generation requests with a mobile-first design mindset. Describe the mobile layout first, then provide separate instructions for how it should adapt for tablet and desktop.
|
|
23
|
+
|
|
24
|
+
### 2. The Structured Prompting Framework
|
|
25
|
+
|
|
26
|
+
To ensure the highest quality output, you MUST structure every prompt using the following four-part framework.
|
|
27
|
+
|
|
28
|
+
1. **High-Level Goal**: Start with a clear, concise summary of the overall objective. This orients the AI on the primary task.
|
|
29
|
+
- _Example: "Create a responsive user registration form with client-side validation and API integration."_
|
|
30
|
+
2. **Detailed, Step-by-Step Instructions**: Provide a granular, numbered list of actions the AI should take. Break down complex tasks into smaller, sequential steps. This is the most critical part of the prompt.
|
|
31
|
+
- _Example: "1. Create a new file named `RegistrationForm.js`. 2. Use React hooks for state management. 3. Add styled input fields for 'Name', 'Email', and 'Password'. 4. For the email field, ensure it is a valid email format. 5. On submission, call the API endpoint defined below."_
|
|
32
|
+
3. **Code Examples, Data Structures & Constraints**: Include any relevant snippets of existing code, data structures, or API contracts. This gives the AI concrete examples to work with. Crucially, you must also state what _not_ to do.
|
|
33
|
+
- _Example: "Use this API endpoint: `POST /api/register`. The expected JSON payload is `{ "name": "string", "email": "string", "password": "string" }`. Do NOT include a 'confirm password' field. Use Tailwind CSS for all styling."_
|
|
34
|
+
4. **Define a Strict Scope**: Explicitly define the boundaries of the task. Tell the AI which files it can modify and, more importantly, which files to leave untouched to prevent unintended changes across the codebase.
|
|
35
|
+
- _Example: "You should only create the `RegistrationForm.js` component and add it to the `pages/register.js` file. Do NOT alter the `Navbar.js` component or any other existing page or component."_
|
|
36
|
+
|
|
37
|
+
### 3. Assembling the Master Prompt
|
|
38
|
+
|
|
39
|
+
You will now synthesize the inputs and the above principles into a final, comprehensive prompt.
|
|
40
|
+
|
|
41
|
+
1. **Gather Foundational Context**:
|
|
42
|
+
- Start the prompt with a preamble describing the overall project purpose, the full tech stack (e.g., Next.js, TypeScript, Tailwind CSS), and the primary UI component library being used.
|
|
43
|
+
2. **Describe the Visuals**:
|
|
44
|
+
- If the user has design files (Figma, etc.), instruct them to provide links or screenshots.
|
|
45
|
+
- If not, describe the visual style: color palette, typography, spacing, and overall aesthetic (e.g., "minimalist", "corporate", "playful").
|
|
46
|
+
3. **Build the Prompt using the Structured Framework**:
|
|
47
|
+
- Follow the four-part framework from Section 2 to build out the core request, whether it's for a single component or a full page.
|
|
48
|
+
4. **Present and Refine**:
|
|
49
|
+
- Output the complete, generated prompt in a clear, copy-pasteable format (e.g., a large code block).
|
|
50
|
+
- Explain the structure of the prompt and why certain information was included, referencing the principles above.
|
|
51
|
+
- <important_note>Conclude by reminding the user that all AI-generated code will require careful human review, testing, and refinement to be considered production-ready.</important_note>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Index Documentation Task
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This task maintains the integrity and completeness of the `docs/index.md` file by scanning all documentation files and ensuring they are properly indexed with descriptions. It handles both root-level documents and documents within subfolders, organizing them hierarchically.
|
|
6
|
+
|
|
7
|
+
## Task Instructions
|
|
8
|
+
|
|
9
|
+
You are now operating as a Documentation Indexer. Your goal is to ensure all documentation files are properly cataloged in the central index with proper organization for subfolders.
|
|
10
|
+
|
|
11
|
+
### Required Steps
|
|
12
|
+
|
|
13
|
+
1. First, locate and scan:
|
|
14
|
+
|
|
15
|
+
- The `docs/` directory and all subdirectories
|
|
16
|
+
- The existing `docs/index.md` file (create if absent)
|
|
17
|
+
- All markdown (`.md`) and text (`.txt`) files in the documentation structure
|
|
18
|
+
- Note the folder structure for hierarchical organization
|
|
19
|
+
|
|
20
|
+
2. For the existing `docs/index.md`:
|
|
21
|
+
|
|
22
|
+
- Parse current entries
|
|
23
|
+
- Note existing file references and descriptions
|
|
24
|
+
- Identify any broken links or missing files
|
|
25
|
+
- Keep track of already-indexed content
|
|
26
|
+
- Preserve existing folder sections
|
|
27
|
+
|
|
28
|
+
3. For each documentation file found:
|
|
29
|
+
|
|
30
|
+
- Extract the title (from first heading or filename)
|
|
31
|
+
- Generate a brief description by analyzing the content
|
|
32
|
+
- Create a relative markdown link to the file
|
|
33
|
+
- Check if it's already in the index
|
|
34
|
+
- Note which folder it belongs to (if in a subfolder)
|
|
35
|
+
- If missing or outdated, prepare an update
|
|
36
|
+
|
|
37
|
+
4. For any missing or non-existent files found in index:
|
|
38
|
+
|
|
39
|
+
- Present a list of all entries that reference non-existent files
|
|
40
|
+
- For each entry:
|
|
41
|
+
- Show the full entry details (title, path, description)
|
|
42
|
+
- Ask for explicit confirmation before removal
|
|
43
|
+
- Provide option to update the path if file was moved
|
|
44
|
+
- Log the decision (remove/update/keep) for final report
|
|
45
|
+
|
|
46
|
+
5. Update `docs/index.md`:
|
|
47
|
+
- Maintain existing structure and organization
|
|
48
|
+
- Create level 2 sections (`##`) for each subfolder
|
|
49
|
+
- List root-level documents first
|
|
50
|
+
- Add missing entries with descriptions
|
|
51
|
+
- Update outdated entries
|
|
52
|
+
- Remove only entries that were confirmed for removal
|
|
53
|
+
- Ensure consistent formatting throughout
|
|
54
|
+
|
|
55
|
+
### Index Structure Format
|
|
56
|
+
|
|
57
|
+
The index should be organized as follows:
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
# Documentation Index
|
|
61
|
+
|
|
62
|
+
## Root Documents
|
|
63
|
+
|
|
64
|
+
### [Document Title](./document.md)
|
|
65
|
+
|
|
66
|
+
Brief description of the document's purpose and contents.
|
|
67
|
+
|
|
68
|
+
### [Another Document](./another.md)
|
|
69
|
+
|
|
70
|
+
Description here.
|
|
71
|
+
|
|
72
|
+
## Folder Name
|
|
73
|
+
|
|
74
|
+
Documents within the `folder-name/` directory:
|
|
75
|
+
|
|
76
|
+
### [Document in Folder](./folder-name/document.md)
|
|
77
|
+
|
|
78
|
+
Description of this document.
|
|
79
|
+
|
|
80
|
+
### [Another in Folder](./folder-name/another.md)
|
|
81
|
+
|
|
82
|
+
Description here.
|
|
83
|
+
|
|
84
|
+
## Another Folder
|
|
85
|
+
|
|
86
|
+
Documents within the `another-folder/` directory:
|
|
87
|
+
|
|
88
|
+
### [Nested Document](./another-folder/document.md)
|
|
89
|
+
|
|
90
|
+
Description of nested document.
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Index Entry Format
|
|
94
|
+
|
|
95
|
+
Each entry should follow this format:
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
### [Document Title](relative/path/to/file.md)
|
|
99
|
+
|
|
100
|
+
Brief description of the document's purpose and contents.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Rules of Operation
|
|
104
|
+
|
|
105
|
+
1. NEVER modify the content of indexed files
|
|
106
|
+
2. Preserve existing descriptions in index.md when they are adequate
|
|
107
|
+
3. Maintain any existing categorization or grouping in the index
|
|
108
|
+
4. Use relative paths for all links (starting with `./`)
|
|
109
|
+
5. Ensure descriptions are concise but informative
|
|
110
|
+
6. NEVER remove entries without explicit confirmation
|
|
111
|
+
7. Report any broken links or inconsistencies found
|
|
112
|
+
8. Allow path updates for moved files before considering removal
|
|
113
|
+
9. Create folder sections using level 2 headings (`##`)
|
|
114
|
+
10. Sort folders alphabetically, with root documents listed first
|
|
115
|
+
11. Within each section, sort documents alphabetically by title
|
|
116
|
+
|
|
117
|
+
### Process Output
|
|
118
|
+
|
|
119
|
+
The task will provide:
|
|
120
|
+
|
|
121
|
+
1. A summary of changes made to index.md
|
|
122
|
+
2. List of newly indexed files (organized by folder)
|
|
123
|
+
3. List of updated entries
|
|
124
|
+
4. List of entries presented for removal and their status:
|
|
125
|
+
- Confirmed removals
|
|
126
|
+
- Updated paths
|
|
127
|
+
- Kept despite missing file
|
|
128
|
+
5. Any new folders discovered
|
|
129
|
+
6. Any other issues or inconsistencies found
|
|
130
|
+
|
|
131
|
+
### Handling Missing Files
|
|
132
|
+
|
|
133
|
+
For each file referenced in the index but not found in the filesystem:
|
|
134
|
+
|
|
135
|
+
1. Present the entry:
|
|
136
|
+
|
|
137
|
+
```markdown
|
|
138
|
+
Missing file detected:
|
|
139
|
+
Title: [Document Title]
|
|
140
|
+
Path: relative/path/to/file.md
|
|
141
|
+
Description: Existing description
|
|
142
|
+
Section: [Root Documents | Folder Name]
|
|
143
|
+
|
|
144
|
+
Options:
|
|
145
|
+
|
|
146
|
+
1. Remove this entry
|
|
147
|
+
2. Update the file path
|
|
148
|
+
3. Keep entry (mark as temporarily unavailable)
|
|
149
|
+
|
|
150
|
+
Please choose an option (1/2/3):
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
2. Wait for user confirmation before taking any action
|
|
154
|
+
3. Log the decision for the final report
|
|
155
|
+
|
|
156
|
+
### Special Cases
|
|
157
|
+
|
|
158
|
+
1. **Sharded Documents**: If a folder contains an `index.md` file, treat it as a sharded document:
|
|
159
|
+
|
|
160
|
+
- Use the folder's `index.md` title as the section title
|
|
161
|
+
- List the folder's documents as subsections
|
|
162
|
+
- Note in the description that this is a multi-part document
|
|
163
|
+
|
|
164
|
+
2. **README files**: Convert `README.md` to more descriptive titles based on content
|
|
165
|
+
|
|
166
|
+
3. **Nested Subfolders**: For deeply nested folders, maintain the hierarchy but limit to 2 levels in the main index. Deeper structures should have their own index files.
|
|
167
|
+
|
|
168
|
+
## Required Input
|
|
169
|
+
|
|
170
|
+
Please provide:
|
|
171
|
+
|
|
172
|
+
1. Location of the `docs/` directory (default: `./docs`)
|
|
173
|
+
2. Confirmation of write access to `docs/index.md`
|
|
174
|
+
3. Any specific categorization preferences
|
|
175
|
+
4. Any files or directories to exclude from indexing (e.g., `.git`, `node_modules`)
|
|
176
|
+
5. Whether to include hidden files/folders (starting with `.`)
|
|
177
|
+
|
|
178
|
+
Would you like to proceed with documentation indexing? Please provide the required input above.
|