bmad-method 4.28.0 → 4.29.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.
- package/CHANGELOG.md +14 -0
- package/bmad-core/agents/bmad-master.md +0 -2
- package/bmad-core/agents/bmad-orchestrator.md +0 -3
- package/bmad-core/core-config.yaml +1 -5
- package/bmad-core/data/bmad-kb.md +2 -2
- package/bmad-core/tasks/correct-course.md +9 -12
- package/bmad-core/tasks/create-brownfield-story.md +10 -61
- package/bmad-core/tasks/create-deep-research-prompt.md +5 -17
- package/bmad-core/tasks/create-next-story.md +3 -4
- package/bmad-core/tasks/document-project.md +37 -13
- package/bmad-core/tasks/facilitate-brainstorming-session.md +1 -1
- package/bmad-core/tasks/generate-ai-frontend-prompt.md +1 -1
- package/bmad-core/tasks/kb-mode-interaction.md +8 -3
- package/bmad-core/tasks/review-story.md +3 -3
- package/bmad-core/tasks/shard-doc.md +5 -9
- package/common/tasks/create-doc.md +4 -0
- package/dist/agents/analyst.txt +43 -31
- package/dist/agents/architect.txt +42 -30
- package/dist/agents/bmad-master.txt +61 -602
- package/dist/agents/bmad-orchestrator.txt +7 -548
- package/dist/agents/pm.txt +19 -38
- package/dist/agents/po.txt +14 -21
- package/dist/agents/qa.txt +3 -3
- package/dist/agents/sm.txt +11 -15
- package/dist/agents/ux-expert.txt +6 -18
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +5 -17
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +50 -579
- package/dist/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.txt +5 -17
- package/dist/teams/team-all.txt +70 -607
- package/dist/teams/team-fullstack.txt +65 -601
- package/dist/teams/team-ide-minimal.txt +26 -575
- package/dist/teams/team-no-ui.txt +64 -600
- package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -0
- package/expansion-packs/bmad-creator-tools/config.yaml +1 -0
- package/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -0
- package/package.json +1 -1
- package/tools/installer/lib/ide-setup.js +325 -12
- package/tools/installer/package.json +1 -1
- package/bmad-core/tasks/create-workflow-plan.md +0 -289
- package/bmad-core/tasks/doc-migration-task.md +0 -143
- package/bmad-core/tasks/update-workflow-plan.md +0 -248
- package/docs/template-markup-references.md +0 -86
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# KB Mode Interaction Task
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
|
+
|
|
4
5
|
Provide a user-friendly interface to the BMad knowledge base without overwhelming users with information upfront.
|
|
5
6
|
|
|
6
7
|
## Instructions
|
|
@@ -8,11 +9,11 @@ Provide a user-friendly interface to the BMad knowledge base without overwhelmin
|
|
|
8
9
|
When entering KB mode (*kb-mode), follow these steps:
|
|
9
10
|
|
|
10
11
|
### 1. Welcome and Guide
|
|
11
|
-
Announce entering KB mode with a brief, friendly introduction:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Announce entering KB mode with a brief, friendly introduction.
|
|
14
14
|
|
|
15
15
|
### 2. Present Topic Areas
|
|
16
|
+
|
|
16
17
|
Offer a concise list of main topic areas the user might want to explore:
|
|
17
18
|
|
|
18
19
|
**What would you like to know more about?**
|
|
@@ -29,19 +30,23 @@ Offer a concise list of main topic areas the user might want to explore:
|
|
|
29
30
|
Or ask me about anything else related to BMad-Method!
|
|
30
31
|
|
|
31
32
|
### 3. Respond Contextually
|
|
33
|
+
|
|
32
34
|
- Wait for user's specific question or topic selection
|
|
33
35
|
- Provide focused, relevant information from the knowledge base
|
|
34
36
|
- Offer to dive deeper or explore related topics
|
|
35
37
|
- Keep responses concise unless user asks for detailed explanations
|
|
36
38
|
|
|
37
39
|
### 4. Interactive Exploration
|
|
40
|
+
|
|
38
41
|
- After answering, suggest related topics they might find helpful
|
|
39
42
|
- Maintain conversational flow rather than data dumping
|
|
40
43
|
- Use examples when appropriate
|
|
41
44
|
- Reference specific documentation sections when relevant
|
|
42
45
|
|
|
43
46
|
### 5. Exit Gracefully
|
|
47
|
+
|
|
44
48
|
When user is done or wants to exit KB mode:
|
|
49
|
+
|
|
45
50
|
- Summarize key points discussed if helpful
|
|
46
51
|
- Remind them they can return to KB mode anytime with *kb-mode
|
|
47
52
|
- Suggest next steps based on what was discussed
|
|
@@ -67,4 +72,4 @@ Or ask me about anything else related to BMad-Method!
|
|
|
67
72
|
|
|
68
73
|
**User**: Tell me about workflows
|
|
69
74
|
|
|
70
|
-
**Assistant**: [Provides focused information about workflows from the KB, then offers to explore specific workflow types or related topics]
|
|
75
|
+
**Assistant**: [Provides focused information about workflows from the KB, then offers to explore specific workflow types or related topics]
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# review-story
|
|
2
2
|
|
|
3
|
-
When a developer marks a story as "Ready for Review", perform a comprehensive senior developer code review with the ability to refactor and improve code directly.
|
|
4
|
-
|
|
5
|
-
[[LLM: QA Agent executing review-story task as Senior Developer]]
|
|
3
|
+
When a developer agent marks a story as "Ready for Review", perform a comprehensive senior developer code review with the ability to refactor and improve code directly.
|
|
6
4
|
|
|
7
5
|
## Prerequisites
|
|
8
6
|
|
|
@@ -131,6 +129,7 @@ After review and any refactoring, append your results to the story file in the Q
|
|
|
131
129
|
## Blocking Conditions
|
|
132
130
|
|
|
133
131
|
Stop the review and request clarification if:
|
|
132
|
+
|
|
134
133
|
- Story file is incomplete or missing critical sections
|
|
135
134
|
- File List is empty or clearly incomplete
|
|
136
135
|
- No tests exist when they were required
|
|
@@ -140,6 +139,7 @@ Stop the review and request clarification if:
|
|
|
140
139
|
## Completion
|
|
141
140
|
|
|
142
141
|
After review:
|
|
142
|
+
|
|
143
143
|
1. If all items are checked and approved: Update story status to "Done"
|
|
144
144
|
2. If unchecked items remain: Keep status as "Review" for dev to address
|
|
145
145
|
3. Always provide constructive feedback and explanations for learning
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
|
|
9
9
|
## Primary Method: Automatic with markdown-tree
|
|
10
10
|
|
|
11
|
-
[[LLM: First, check if markdownExploder is set to true in
|
|
11
|
+
[[LLM: First, check if markdownExploder is set to true in {root}/core-config.yaml. If it is, attempt to run the command: `md-tree explode {input file} {output path}`.
|
|
12
12
|
|
|
13
13
|
If the command succeeds, inform the user that the document has been sharded successfully and STOP - do not proceed further.
|
|
14
14
|
|
|
15
15
|
If the command fails (especially with an error indicating the command is not found or not available), inform the user: "The markdownExploder setting is enabled but the md-tree command is not available. Please either:
|
|
16
16
|
|
|
17
17
|
1. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
|
|
18
|
-
2. Or set markdownExploder to false in
|
|
18
|
+
2. Or set markdownExploder to false in {root}/core-config.yaml
|
|
19
19
|
|
|
20
20
|
**IMPORTANT: STOP HERE - do not proceed with manual sharding until one of the above actions is taken.**"
|
|
21
21
|
|
|
22
22
|
If markdownExploder is set to false, inform the user: "The markdownExploder setting is currently false. For better performance and reliability, you should:
|
|
23
23
|
|
|
24
|
-
1. Set markdownExploder to true in
|
|
24
|
+
1. Set markdownExploder to true in {root}/core-config.yaml
|
|
25
25
|
2. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
|
|
26
26
|
|
|
27
27
|
I will now proceed with the manual sharding process."
|
|
@@ -61,8 +61,6 @@ If the user has @kayvan/markdown-tree-parser installed, use it and skip the manu
|
|
|
61
61
|
|
|
62
62
|
## Manual Method (if @kayvan/markdown-tree-parser is not available or user indicated manual method)
|
|
63
63
|
|
|
64
|
-
[[LLM: Only proceed with the manual instructions below if the user cannot or does not want to use @kayvan/markdown-tree-parser.]]
|
|
65
|
-
|
|
66
64
|
### Task Instructions
|
|
67
65
|
|
|
68
66
|
1. Identify Document and Target Location
|
|
@@ -73,7 +71,7 @@ If the user has @kayvan/markdown-tree-parser installed, use it and skip the manu
|
|
|
73
71
|
|
|
74
72
|
2. Parse and Extract Sections
|
|
75
73
|
|
|
76
|
-
|
|
74
|
+
CRITICAL AEGNT SHARDING RULES:
|
|
77
75
|
|
|
78
76
|
1. Read the entire document content
|
|
79
77
|
2. Identify all level 2 sections (## headings)
|
|
@@ -134,8 +132,6 @@ Create an `index.md` file in the sharded folder that:
|
|
|
134
132
|
|
|
135
133
|
### 5. Preserve Special Content
|
|
136
134
|
|
|
137
|
-
[[LLM: Pay special attention to preserving:
|
|
138
|
-
|
|
139
135
|
1. **Code blocks**: Must capture complete blocks including:
|
|
140
136
|
|
|
141
137
|
```language
|
|
@@ -157,7 +153,7 @@ Create an `index.md` file in the sharded folder that:
|
|
|
157
153
|
|
|
158
154
|
6. **Links and references**: Keep all markdown links intact
|
|
159
155
|
|
|
160
|
-
7. **Template markup**: If documents contain {{placeholders}}
|
|
156
|
+
7. **Template markup**: If documents contain {{placeholders}} ,preserve exactly
|
|
161
157
|
|
|
162
158
|
### 6. Validation
|
|
163
159
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Create Document from Template (YAML Driven)
|
|
2
2
|
|
|
3
|
+
## Critical: Template Discovery
|
|
4
|
+
|
|
5
|
+
If a YAML Template has not been provided, list all templates from {root}/templates or ask the user to provide another.
|
|
6
|
+
|
|
3
7
|
## CRITICAL: Mandatory Elicitation Format
|
|
4
8
|
|
|
5
9
|
**When `elicit: true`, ALWAYS use this exact format:**
|
package/dist/agents/analyst.txt
CHANGED
|
@@ -107,7 +107,7 @@ dependencies:
|
|
|
107
107
|
==================== START: .bmad-core/tasks/facilitate-brainstorming-session.md ====================
|
|
108
108
|
---
|
|
109
109
|
docOutputLocation: docs/brainstorming-session-results.md
|
|
110
|
-
template: brainstorming-output-tmpl
|
|
110
|
+
template: ".bmad-core/templates/brainstorming-output-tmpl.md"
|
|
111
111
|
---
|
|
112
112
|
|
|
113
113
|
# Facilitate Brainstorming Session Task
|
|
@@ -260,7 +260,7 @@ Generate well-structured research prompts that:
|
|
|
260
260
|
|
|
261
261
|
## Research Type Selection
|
|
262
262
|
|
|
263
|
-
|
|
263
|
+
CRITICAL: First, help the user select the most appropriate research focus based on their needs and any input documents they've provided.
|
|
264
264
|
|
|
265
265
|
### 1. Research Focus Options
|
|
266
266
|
|
|
@@ -323,15 +323,13 @@ Present these numbered options to the user:
|
|
|
323
323
|
- Consider regulatory and legal implications
|
|
324
324
|
|
|
325
325
|
9. **Custom Research Focus**
|
|
326
|
-
|
|
326
|
+
|
|
327
327
|
- User-defined research objectives
|
|
328
328
|
- Specialized domain investigation
|
|
329
329
|
- Cross-functional research needs
|
|
330
330
|
|
|
331
331
|
### 2. Input Processing
|
|
332
332
|
|
|
333
|
-
[[LLM: Based on the selected research type and any provided inputs (project brief, brainstorming results, etc.), extract relevant context and constraints.]]
|
|
334
|
-
|
|
335
333
|
**If Project Brief provided:**
|
|
336
334
|
|
|
337
335
|
- Extract key product concepts and goals
|
|
@@ -364,11 +362,11 @@ Present these numbered options to the user:
|
|
|
364
362
|
|
|
365
363
|
### 3. Research Prompt Structure
|
|
366
364
|
|
|
367
|
-
|
|
365
|
+
CRITICAL: collaboratively develop a comprehensive research prompt with these components.
|
|
368
366
|
|
|
369
367
|
#### A. Research Objectives
|
|
370
368
|
|
|
371
|
-
|
|
369
|
+
CRITICAL: collaborate with the user to articulate clear, specific objectives for the research.
|
|
372
370
|
|
|
373
371
|
- Primary research goal and purpose
|
|
374
372
|
- Key decisions the research will inform
|
|
@@ -377,7 +375,7 @@ Present these numbered options to the user:
|
|
|
377
375
|
|
|
378
376
|
#### B. Research Questions
|
|
379
377
|
|
|
380
|
-
|
|
378
|
+
CRITICAL: collaborate with the user to develop specific, actionable research questions organized by theme.
|
|
381
379
|
|
|
382
380
|
**Core Questions:**
|
|
383
381
|
|
|
@@ -393,8 +391,6 @@ Present these numbered options to the user:
|
|
|
393
391
|
|
|
394
392
|
#### C. Research Methodology
|
|
395
393
|
|
|
396
|
-
[[LLM: Specify appropriate research methods based on the type and objectives.]]
|
|
397
|
-
|
|
398
394
|
**Data Collection Methods:**
|
|
399
395
|
|
|
400
396
|
- Secondary research sources
|
|
@@ -411,8 +407,6 @@ Present these numbered options to the user:
|
|
|
411
407
|
|
|
412
408
|
#### D. Output Requirements
|
|
413
409
|
|
|
414
|
-
[[LLM: Define how research findings should be structured and presented.]]
|
|
415
|
-
|
|
416
410
|
**Format Specifications:**
|
|
417
411
|
|
|
418
412
|
- Executive summary requirements
|
|
@@ -429,8 +423,6 @@ Present these numbered options to the user:
|
|
|
429
423
|
|
|
430
424
|
### 4. Prompt Generation
|
|
431
425
|
|
|
432
|
-
[[LLM: Synthesize all elements into a comprehensive, ready-to-use research prompt.]]
|
|
433
|
-
|
|
434
426
|
**Research Prompt Template:**
|
|
435
427
|
|
|
436
428
|
```markdown
|
|
@@ -499,8 +491,6 @@ Present these numbered options to the user:
|
|
|
499
491
|
|
|
500
492
|
### 5. Review and Refinement
|
|
501
493
|
|
|
502
|
-
[[LLM: Present the draft research prompt for user review and refinement.]]
|
|
503
|
-
|
|
504
494
|
1. **Present Complete Prompt**
|
|
505
495
|
|
|
506
496
|
- Show the full research prompt
|
|
@@ -522,8 +512,6 @@ Present these numbered options to the user:
|
|
|
522
512
|
|
|
523
513
|
### 6. Next Steps Guidance
|
|
524
514
|
|
|
525
|
-
[[LLM: Provide clear guidance on how to use the research prompt.]]
|
|
526
|
-
|
|
527
515
|
**Execution Options:**
|
|
528
516
|
|
|
529
517
|
1. **Use with AI Research Assistant**: Provide this prompt to an AI model with research capabilities
|
|
@@ -760,9 +748,9 @@ Generate comprehensive documentation for existing projects optimized for AI deve
|
|
|
760
748
|
|
|
761
749
|
### 1. Initial Project Analysis
|
|
762
750
|
|
|
763
|
-
|
|
751
|
+
**CRITICAL:** First, check if a PRD or requirements document exists in context. If yes, use it to focus your documentation efforts on relevant areas only.
|
|
764
752
|
|
|
765
|
-
**IF PRD EXISTS**:
|
|
753
|
+
**IF PRD EXISTS**:
|
|
766
754
|
|
|
767
755
|
- Review the PRD to understand what enhancement/feature is planned
|
|
768
756
|
- Identify which modules, services, or areas will be affected
|
|
@@ -808,11 +796,10 @@ Ask the user these elicitation questions to better understand their needs:
|
|
|
808
796
|
- Are there any existing documentation standards or formats you prefer?
|
|
809
797
|
- What level of technical detail should the documentation target? (junior developers, senior developers, mixed team)
|
|
810
798
|
- Is there a specific feature or enhancement you're planning? (This helps focus documentation)
|
|
811
|
-
]]
|
|
812
799
|
|
|
813
800
|
### 2. Deep Codebase Analysis
|
|
814
801
|
|
|
815
|
-
|
|
802
|
+
CRITICAL: Before generating documentation, conduct extensive analysis of the existing codebase:
|
|
816
803
|
|
|
817
804
|
1. **Explore Key Areas**:
|
|
818
805
|
- Entry points (main files, index files, app initializers)
|
|
@@ -835,13 +822,14 @@ Ask the user these elicitation questions to better understand their needs:
|
|
|
835
822
|
- Document workarounds and technical debt
|
|
836
823
|
- Note areas that differ from standard patterns
|
|
837
824
|
|
|
838
|
-
**IF PRD PROVIDED**: Also analyze what would need to change for the enhancement
|
|
825
|
+
**IF PRD PROVIDED**: Also analyze what would need to change for the enhancement
|
|
839
826
|
|
|
840
827
|
### 3. Core Documentation Generation
|
|
841
828
|
|
|
842
829
|
[[LLM: Generate a comprehensive BROWNFIELD architecture document that reflects the ACTUAL state of the codebase.
|
|
843
830
|
|
|
844
831
|
**CRITICAL**: This is NOT an aspirational architecture document. Document what EXISTS, including:
|
|
832
|
+
|
|
845
833
|
- Technical debt and workarounds
|
|
846
834
|
- Inconsistent patterns between different parts
|
|
847
835
|
- Legacy code that can't be changed
|
|
@@ -853,13 +841,16 @@ Ask the user these elicitation questions to better understand their needs:
|
|
|
853
841
|
# [Project Name] Brownfield Architecture Document
|
|
854
842
|
|
|
855
843
|
## Introduction
|
|
844
|
+
|
|
856
845
|
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.
|
|
857
846
|
|
|
858
847
|
### Document Scope
|
|
848
|
+
|
|
859
849
|
[If PRD provided: "Focused on areas relevant to: {enhancement description}"]
|
|
860
850
|
[If no PRD: "Comprehensive documentation of entire system"]
|
|
861
851
|
|
|
862
852
|
### Change Log
|
|
853
|
+
|
|
863
854
|
| Date | Version | Description | Author |
|
|
864
855
|
|------|---------|-------------|--------|
|
|
865
856
|
| [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
|
|
@@ -867,6 +858,7 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
|
|
|
867
858
|
## Quick Reference - Key Files and Entry Points
|
|
868
859
|
|
|
869
860
|
### Critical Files for Understanding the System
|
|
861
|
+
|
|
870
862
|
- **Main Entry**: `src/index.js` (or actual entry point)
|
|
871
863
|
- **Configuration**: `config/app.config.js`, `.env.example`
|
|
872
864
|
- **Core Business Logic**: `src/services/`, `src/domain/`
|
|
@@ -875,22 +867,25 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
|
|
|
875
867
|
- **Key Algorithms**: [List specific files with complex logic]
|
|
876
868
|
|
|
877
869
|
### If PRD Provided - Enhancement Impact Areas
|
|
870
|
+
|
|
878
871
|
[Highlight which files/modules will be affected by the planned enhancement]
|
|
879
872
|
|
|
880
873
|
## High Level Architecture
|
|
881
874
|
|
|
882
875
|
### Technical Summary
|
|
883
|
-
[Real assessment of architecture - mention if it's well-structured or has issues]
|
|
884
876
|
|
|
885
877
|
### Actual Tech Stack (from package.json/requirements.txt)
|
|
878
|
+
|
|
886
879
|
| Category | Technology | Version | Notes |
|
|
887
880
|
|----------|------------|---------|--------|
|
|
888
881
|
| Runtime | Node.js | 16.x | [Any constraints] |
|
|
889
882
|
| Framework | Express | 4.18.2 | [Custom middleware?] |
|
|
890
883
|
| Database | PostgreSQL | 13 | [Connection pooling setup] |
|
|
891
|
-
|
|
884
|
+
|
|
885
|
+
etc...
|
|
892
886
|
|
|
893
887
|
### Repository Structure Reality Check
|
|
888
|
+
|
|
894
889
|
- Type: [Monorepo/Polyrepo/Hybrid]
|
|
895
890
|
- Package Manager: [npm/yarn/pnpm]
|
|
896
891
|
- Notable: [Any unusual structure decisions]
|
|
@@ -898,7 +893,8 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
|
|
|
898
893
|
## Source Tree and Module Organization
|
|
899
894
|
|
|
900
895
|
### Project Structure (Actual)
|
|
901
|
-
|
|
896
|
+
|
|
897
|
+
```text
|
|
902
898
|
project-root/
|
|
903
899
|
├── src/
|
|
904
900
|
│ ├── controllers/ # HTTP request handlers
|
|
@@ -912,6 +908,7 @@ project-root/
|
|
|
912
908
|
```
|
|
913
909
|
|
|
914
910
|
### Key Modules and Their Purpose
|
|
911
|
+
|
|
915
912
|
- **User Management**: `src/services/userService.js` - Handles all user operations
|
|
916
913
|
- **Authentication**: `src/middleware/auth.js` - JWT-based, custom implementation
|
|
917
914
|
- **Payment Processing**: `src/legacy/payment.js` - CRITICAL: Do not refactor, tightly coupled
|
|
@@ -920,12 +917,14 @@ project-root/
|
|
|
920
917
|
## Data Models and APIs
|
|
921
918
|
|
|
922
919
|
### Data Models
|
|
920
|
+
|
|
923
921
|
Instead of duplicating, reference actual model files:
|
|
924
922
|
- **User Model**: See `src/models/User.js`
|
|
925
923
|
- **Order Model**: See `src/models/Order.js`
|
|
926
924
|
- **Related Types**: TypeScript definitions in `src/types/`
|
|
927
925
|
|
|
928
926
|
### API Specifications
|
|
927
|
+
|
|
929
928
|
- **OpenAPI Spec**: `docs/api/openapi.yaml` (if exists)
|
|
930
929
|
- **Postman Collection**: `docs/api/postman-collection.json`
|
|
931
930
|
- **Manual Endpoints**: [List any undocumented endpoints discovered]
|
|
@@ -933,12 +932,14 @@ Instead of duplicating, reference actual model files:
|
|
|
933
932
|
## Technical Debt and Known Issues
|
|
934
933
|
|
|
935
934
|
### Critical Technical Debt
|
|
935
|
+
|
|
936
936
|
1. **Payment Service**: Legacy code in `src/legacy/payment.js` - tightly coupled, no tests
|
|
937
937
|
2. **User Service**: Different pattern than other services, uses callbacks instead of promises
|
|
938
938
|
3. **Database Migrations**: Manually tracked, no proper migration tool
|
|
939
939
|
4. **[Other significant debt]**
|
|
940
940
|
|
|
941
941
|
### Workarounds and Gotchas
|
|
942
|
+
|
|
942
943
|
- **Environment Variables**: Must set `NODE_ENV=production` even for staging (historical reason)
|
|
943
944
|
- **Database Connections**: Connection pool hardcoded to 10, changing breaks payment service
|
|
944
945
|
- **[Other workarounds developers need to know]**
|
|
@@ -946,13 +947,16 @@ Instead of duplicating, reference actual model files:
|
|
|
946
947
|
## Integration Points and External Dependencies
|
|
947
948
|
|
|
948
949
|
### External Services
|
|
950
|
+
|
|
949
951
|
| Service | Purpose | Integration Type | Key Files |
|
|
950
952
|
|---------|---------|------------------|-----------|
|
|
951
953
|
| Stripe | Payments | REST API | `src/integrations/stripe/` |
|
|
952
954
|
| SendGrid | Emails | SDK | `src/services/emailService.js` |
|
|
953
|
-
|
|
955
|
+
|
|
956
|
+
etc...
|
|
954
957
|
|
|
955
958
|
### Internal Integration Points
|
|
959
|
+
|
|
956
960
|
- **Frontend Communication**: REST API on port 3000, expects specific headers
|
|
957
961
|
- **Background Jobs**: Redis queue, see `src/workers/`
|
|
958
962
|
- **[Other integrations]**
|
|
@@ -960,11 +964,13 @@ Instead of duplicating, reference actual model files:
|
|
|
960
964
|
## Development and Deployment
|
|
961
965
|
|
|
962
966
|
### Local Development Setup
|
|
967
|
+
|
|
963
968
|
1. Actual steps that work (not ideal steps)
|
|
964
969
|
2. Known issues with setup
|
|
965
970
|
3. Required environment variables (see `.env.example`)
|
|
966
971
|
|
|
967
972
|
### Build and Deployment Process
|
|
973
|
+
|
|
968
974
|
- **Build Command**: `npm run build` (webpack config in `webpack.config.js`)
|
|
969
975
|
- **Deployment**: Manual deployment via `scripts/deploy.sh`
|
|
970
976
|
- **Environments**: Dev, Staging, Prod (see `config/environments/`)
|
|
@@ -972,12 +978,14 @@ Instead of duplicating, reference actual model files:
|
|
|
972
978
|
## Testing Reality
|
|
973
979
|
|
|
974
980
|
### Current Test Coverage
|
|
981
|
+
|
|
975
982
|
- Unit Tests: 60% coverage (Jest)
|
|
976
983
|
- Integration Tests: Minimal, in `tests/integration/`
|
|
977
984
|
- E2E Tests: None
|
|
978
985
|
- Manual Testing: Primary QA method
|
|
979
986
|
|
|
980
987
|
### Running Tests
|
|
988
|
+
|
|
981
989
|
```bash
|
|
982
990
|
npm test # Runs unit tests
|
|
983
991
|
npm run test:integration # Runs integration tests (requires local DB)
|
|
@@ -986,6 +994,7 @@ npm run test:integration # Runs integration tests (requires local DB)
|
|
|
986
994
|
## If Enhancement PRD Provided - Impact Analysis
|
|
987
995
|
|
|
988
996
|
### Files That Will Need Modification
|
|
997
|
+
|
|
989
998
|
Based on the enhancement requirements, these files will be affected:
|
|
990
999
|
- `src/services/userService.js` - Add new user fields
|
|
991
1000
|
- `src/models/User.js` - Update schema
|
|
@@ -993,11 +1002,13 @@ Based on the enhancement requirements, these files will be affected:
|
|
|
993
1002
|
- [etc...]
|
|
994
1003
|
|
|
995
1004
|
### New Files/Modules Needed
|
|
1005
|
+
|
|
996
1006
|
- `src/services/newFeatureService.js` - New business logic
|
|
997
1007
|
- `src/models/NewFeature.js` - New data model
|
|
998
1008
|
- [etc...]
|
|
999
1009
|
|
|
1000
1010
|
### Integration Considerations
|
|
1011
|
+
|
|
1001
1012
|
- Will need to integrate with existing auth middleware
|
|
1002
1013
|
- Must follow existing response format in `src/utils/responseFormatter.js`
|
|
1003
1014
|
- [Other integration points]
|
|
@@ -1005,6 +1016,7 @@ Based on the enhancement requirements, these files will be affected:
|
|
|
1005
1016
|
## Appendix - Useful Commands and Scripts
|
|
1006
1017
|
|
|
1007
1018
|
### Frequently Used Commands
|
|
1019
|
+
|
|
1008
1020
|
```bash
|
|
1009
1021
|
npm run dev # Start development server
|
|
1010
1022
|
npm run build # Production build
|
|
@@ -1013,14 +1025,13 @@ npm run seed # Seed test data
|
|
|
1013
1025
|
```
|
|
1014
1026
|
|
|
1015
1027
|
### Debugging and Troubleshooting
|
|
1028
|
+
|
|
1016
1029
|
- **Logs**: Check `logs/app.log` for application logs
|
|
1017
1030
|
- **Debug Mode**: Set `DEBUG=app:*` for verbose logging
|
|
1018
1031
|
- **Common Issues**: See `docs/troubleshooting.md`]]
|
|
1019
1032
|
|
|
1020
1033
|
### 4. Document Delivery
|
|
1021
1034
|
|
|
1022
|
-
[[LLM: After generating the complete architecture document:
|
|
1023
|
-
|
|
1024
1035
|
1. **In Web UI (Gemini, ChatGPT, Claude)**:
|
|
1025
1036
|
- Present the entire document in one response (or multiple if too long)
|
|
1026
1037
|
- Tell user to copy and save as `docs/brownfield-architecture.md` or `docs/project-architecture.md`
|
|
@@ -1032,6 +1043,7 @@ npm run seed # Seed test data
|
|
|
1032
1043
|
- Can be sharded later using PO agent if desired
|
|
1033
1044
|
|
|
1034
1045
|
The document should be comprehensive enough that future agents can understand:
|
|
1046
|
+
|
|
1035
1047
|
- The actual state of the system (not idealized)
|
|
1036
1048
|
- Where to find key files and logic
|
|
1037
1049
|
- What technical debt exists
|
|
@@ -1040,7 +1052,7 @@ The document should be comprehensive enough that future agents can understand:
|
|
|
1040
1052
|
|
|
1041
1053
|
### 5. Quality Assurance
|
|
1042
1054
|
|
|
1043
|
-
|
|
1055
|
+
CRITICAL: Before finalizing the document:
|
|
1044
1056
|
|
|
1045
1057
|
1. **Accuracy Check**: Verify all technical details match the actual codebase
|
|
1046
1058
|
2. **Completeness Review**: Ensure all major system components are documented
|
|
@@ -1048,7 +1060,7 @@ The document should be comprehensive enough that future agents can understand:
|
|
|
1048
1060
|
4. **Clarity Assessment**: Check that explanations are clear for AI agents
|
|
1049
1061
|
5. **Navigation**: Ensure document has clear section structure for easy reference
|
|
1050
1062
|
|
|
1051
|
-
Apply the advanced elicitation task after major sections to refine based on user feedback.
|
|
1063
|
+
Apply the advanced elicitation task after major sections to refine based on user feedback.
|
|
1052
1064
|
|
|
1053
1065
|
## Success Criteria
|
|
1054
1066
|
|