bmad-method 4.16.0 → 4.16.1

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 (65) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +1 -1
  3. package/tools/installer/package.json +1 -1
  4. package/.bmad-core/agent-teams/team-all.yml +0 -14
  5. package/.bmad-core/agent-teams/team-fullstack.yml +0 -18
  6. package/.bmad-core/agent-teams/team-ide-minimal.yml +0 -10
  7. package/.bmad-core/agent-teams/team-no-ui.yml +0 -13
  8. package/.bmad-core/agents/analyst.md +0 -64
  9. package/.bmad-core/agents/architect.md +0 -64
  10. package/.bmad-core/agents/bmad-master.md +0 -101
  11. package/.bmad-core/agents/bmad-orchestrator.md +0 -126
  12. package/.bmad-core/agents/dev.md +0 -65
  13. package/.bmad-core/agents/pm.md +0 -61
  14. package/.bmad-core/agents/po.md +0 -63
  15. package/.bmad-core/agents/qa.md +0 -50
  16. package/.bmad-core/agents/sm.md +0 -51
  17. package/.bmad-core/agents/ux-expert.md +0 -63
  18. package/.bmad-core/checklists/architect-checklist.md +0 -443
  19. package/.bmad-core/checklists/change-checklist.md +0 -182
  20. package/.bmad-core/checklists/pm-checklist.md +0 -375
  21. package/.bmad-core/checklists/po-master-checklist.md +0 -441
  22. package/.bmad-core/checklists/story-dod-checklist.md +0 -101
  23. package/.bmad-core/checklists/story-draft-checklist.md +0 -156
  24. package/.bmad-core/core-config.yml +0 -20
  25. package/.bmad-core/data/bmad-kb.md +0 -814
  26. package/.bmad-core/data/technical-preferences.md +0 -3
  27. package/.bmad-core/install-manifest.yml +0 -196
  28. package/.bmad-core/tasks/advanced-elicitation.md +0 -92
  29. package/.bmad-core/tasks/brainstorming-techniques.md +0 -238
  30. package/.bmad-core/tasks/brownfield-create-epic.md +0 -160
  31. package/.bmad-core/tasks/brownfield-create-story.md +0 -147
  32. package/.bmad-core/tasks/core-dump.md +0 -74
  33. package/.bmad-core/tasks/correct-course.md +0 -73
  34. package/.bmad-core/tasks/create-deep-research-prompt.md +0 -301
  35. package/.bmad-core/tasks/create-doc.md +0 -74
  36. package/.bmad-core/tasks/create-next-story.md +0 -242
  37. package/.bmad-core/tasks/doc-migration-task.md +0 -151
  38. package/.bmad-core/tasks/document-project.md +0 -350
  39. package/.bmad-core/tasks/execute-checklist.md +0 -97
  40. package/.bmad-core/tasks/generate-ai-frontend-prompt.md +0 -51
  41. package/.bmad-core/tasks/index-docs.md +0 -178
  42. package/.bmad-core/tasks/kb-mode-interaction.md +0 -77
  43. package/.bmad-core/tasks/review-story.md +0 -153
  44. package/.bmad-core/tasks/shard-doc.md +0 -191
  45. package/.bmad-core/templates/architecture-tmpl.md +0 -776
  46. package/.bmad-core/templates/brownfield-architecture-tmpl.md +0 -544
  47. package/.bmad-core/templates/brownfield-prd-tmpl.md +0 -242
  48. package/.bmad-core/templates/competitor-analysis-tmpl.md +0 -291
  49. package/.bmad-core/templates/front-end-architecture-tmpl.md +0 -175
  50. package/.bmad-core/templates/front-end-spec-tmpl.md +0 -413
  51. package/.bmad-core/templates/fullstack-architecture-tmpl.md +0 -1018
  52. package/.bmad-core/templates/market-research-tmpl.md +0 -263
  53. package/.bmad-core/templates/prd-tmpl.md +0 -202
  54. package/.bmad-core/templates/project-brief-tmpl.md +0 -230
  55. package/.bmad-core/templates/story-tmpl.md +0 -69
  56. package/.bmad-core/utils/file-resolution-context.md +0 -10
  57. package/.bmad-core/utils/template-format.md +0 -26
  58. package/.bmad-core/utils/web-agent-startup-instructions.md +0 -39
  59. package/.bmad-core/utils/workflow-management.md +0 -223
  60. package/.bmad-core/workflows/brownfield-fullstack.yml +0 -112
  61. package/.bmad-core/workflows/brownfield-service.yml +0 -113
  62. package/.bmad-core/workflows/brownfield-ui.yml +0 -123
  63. package/.bmad-core/workflows/greenfield-fullstack.yml +0 -166
  64. package/.bmad-core/workflows/greenfield-service.yml +0 -132
  65. package/.bmad-core/workflows/greenfield-ui.yml +0 -161
@@ -1,350 +0,0 @@
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
@@ -1,97 +0,0 @@
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
@@ -1,51 +0,0 @@
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>
@@ -1,178 +0,0 @@
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.