appiq-solution 1.4.2 → 1.4.4
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/#Tools/APPIQ-METHOD/.cursor/commands/analyze.md +1 -1
- package/#Tools/APPIQ-METHOD/.cursor/commands/appiq.md +1 -1
- package/#Tools/APPIQ-METHOD/.cursor/commands/help.md +1 -1
- package/#Tools/APPIQ-METHOD/.cursor/commands/story.md +1 -1
- package/#Tools/APPIQ-METHOD/bmad-core/agents/init-flow-po.md +219 -0
- package/#Tools/APPIQ-METHOD/commands/analyze.md +1 -1
- package/#Tools/APPIQ-METHOD/commands/appiq.md +1 -1
- package/#Tools/APPIQ-METHOD/commands/help.md +1 -1
- package/#Tools/APPIQ-METHOD/commands/story.md +1 -1
- package/#Tools/APPIQ-METHOD/package.json +1 -1
- package/#Tools/APPIQ-METHOD/tools/appiq-installer.js +196 -104
- package/#Tools/APPIQ-METHOD/tools/cli.js +1 -1
- package/#Tools/APPIQ-METHOD/tools/setup-ide-commands.js +40 -37
- package/#Tools/APPIQ-METHOD/tools/smart-installer.js +16 -13
- package/bmad-core/agent-teams/team-all.yaml +14 -0
- package/bmad-core/agent-teams/team-flutter-mobile.yaml +114 -0
- package/bmad-core/agent-teams/team-fullstack.yaml +28 -0
- package/bmad-core/agent-teams/team-ide-minimal.yaml +10 -0
- package/bmad-core/agent-teams/team-no-ui.yaml +13 -0
- package/bmad-core/agents/analyst.md +85 -0
- package/bmad-core/agents/architect.md +90 -0
- package/bmad-core/agents/bmad-master.md +108 -0
- package/bmad-core/agents/bmad-orchestrator.md +150 -0
- package/bmad-core/agents/bmad-smart-launcher.md +170 -0
- package/bmad-core/agents/dev.md +95 -0
- package/bmad-core/agents/init-flow-po.md +219 -0
- package/bmad-core/agents/pm.md +85 -0
- package/bmad-core/agents/po.md +76 -0
- package/bmad-core/agents/qa.md +86 -0
- package/bmad-core/agents/sm.md +67 -0
- package/bmad-core/agents/ux-expert.md +71 -0
- package/bmad-core/bmad-core/user-guide.md +0 -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/security-validation-checklist.md +332 -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.yaml +20 -0
- package/bmad-core/core-config.yaml.bak +20 -0
- package/bmad-core/data/backend-services-integration.md +686 -0
- package/bmad-core/data/bmad-kb.md +803 -0
- package/bmad-core/data/brainstorming-techniques.md +36 -0
- package/bmad-core/data/elicitation-methods.md +134 -0
- package/bmad-core/data/shadcn-ui-integration.md +388 -0
- package/bmad-core/data/technical-preferences.md +149 -0
- package/bmad-core/enhanced-ide-development-workflow.md +43 -0
- package/bmad-core/tasks/advanced-elicitation.md +117 -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/correct-course.md +70 -0
- package/bmad-core/tasks/create-brownfield-story.md +304 -0
- package/bmad-core/tasks/create-deep-research-prompt.md +289 -0
- package/bmad-core/tasks/create-flutter-story.md +197 -0
- package/bmad-core/tasks/create-next-story.md +112 -0
- package/bmad-core/tasks/document-project.md +341 -0
- package/bmad-core/tasks/facilitate-brainstorming-session.md +136 -0
- package/bmad-core/tasks/generate-ai-frontend-prompt.md +51 -0
- package/bmad-core/tasks/index-docs.md +179 -0
- package/bmad-core/tasks/intelligent-epic-creation.md +234 -0
- package/bmad-core/tasks/kb-mode-interaction.md +75 -0
- package/bmad-core/tasks/review-story.md +145 -0
- package/bmad-core/tasks/shard-doc.md +187 -0
- package/bmad-core/tasks/smart-project-analysis.md +289 -0
- package/bmad-core/tasks/validate-next-story.md +134 -0
- package/bmad-core/templates/architecture-tmpl.yaml +650 -0
- package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
- package/bmad-core/templates/brownfield-architecture-tmpl.yaml +476 -0
- package/bmad-core/templates/brownfield-prd-tmpl.yaml +280 -0
- package/bmad-core/templates/competitor-analysis-tmpl.yaml +293 -0
- package/bmad-core/templates/flutter-mobile-prd-tmpl.yaml +330 -0
- package/bmad-core/templates/flutter-story-tmpl.yaml +376 -0
- package/bmad-core/templates/flutter-ui-spec-tmpl.yaml +415 -0
- package/bmad-core/templates/front-end-architecture-tmpl.yaml +206 -0
- package/bmad-core/templates/front-end-spec-tmpl.yaml +349 -0
- package/bmad-core/templates/fullstack-architecture-tmpl.yaml +812 -0
- package/bmad-core/templates/market-research-tmpl.yaml +252 -0
- package/bmad-core/templates/prd-tmpl.yaml +202 -0
- package/bmad-core/templates/project-brief-tmpl.yaml +221 -0
- package/bmad-core/templates/story-tmpl.yaml +137 -0
- package/bmad-core/user-guide.md +251 -0
- package/bmad-core/workflows/brownfield-fullstack.yaml +311 -0
- package/bmad-core/workflows/brownfield-service.yaml +187 -0
- package/bmad-core/workflows/brownfield-ui.yaml +197 -0
- package/bmad-core/workflows/greenfield-fullstack.yaml +284 -0
- package/bmad-core/workflows/greenfield-service.yaml +206 -0
- package/bmad-core/workflows/greenfield-ui.yaml +235 -0
- package/bmad-core/working-in-the-brownfield.md +373 -0
- package/package.json +1 -1
- package/tools/appiq-installer.js +196 -104
- package/tools/cli.js +1 -1
- package/tools/setup-ide-commands.js +40 -37
- package/tools/smart-installer.js +16 -13
@@ -0,0 +1,145 @@
|
|
1
|
+
# review-story
|
2
|
+
|
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.
|
4
|
+
|
5
|
+
## Prerequisites
|
6
|
+
|
7
|
+
- Story status must be "Review"
|
8
|
+
- Developer has completed all tasks and updated the File List
|
9
|
+
- All automated tests are passing
|
10
|
+
|
11
|
+
## Review Process
|
12
|
+
|
13
|
+
1. **Read the Complete Story**
|
14
|
+
- Review all acceptance criteria
|
15
|
+
- Understand the dev notes and requirements
|
16
|
+
- Note any completion notes from the developer
|
17
|
+
|
18
|
+
2. **Verify Implementation Against Dev Notes Guidance**
|
19
|
+
- Review the "Dev Notes" section for specific technical guidance provided to the developer
|
20
|
+
- Verify the developer's implementation follows the architectural patterns specified in Dev Notes
|
21
|
+
- Check that file locations match the project structure guidance in Dev Notes
|
22
|
+
- Confirm any specified libraries, frameworks, or technical approaches were used correctly
|
23
|
+
- Validate that security considerations mentioned in Dev Notes were implemented
|
24
|
+
|
25
|
+
3. **Focus on the File List**
|
26
|
+
- Verify all files listed were actually created/modified
|
27
|
+
- Check for any missing files that should have been updated
|
28
|
+
- Ensure file locations align with the project structure guidance from Dev Notes
|
29
|
+
|
30
|
+
4. **Senior Developer Code Review**
|
31
|
+
- Review code with the eye of a senior developer
|
32
|
+
- If changes form a cohesive whole, review them together
|
33
|
+
- If changes are independent, review incrementally file by file
|
34
|
+
- Focus on:
|
35
|
+
- Code architecture and design patterns
|
36
|
+
- Refactoring opportunities
|
37
|
+
- Code duplication or inefficiencies
|
38
|
+
- Performance optimizations
|
39
|
+
- Security concerns
|
40
|
+
- Best practices and patterns
|
41
|
+
|
42
|
+
5. **Active Refactoring**
|
43
|
+
- As a senior developer, you CAN and SHOULD refactor code where improvements are needed
|
44
|
+
- When refactoring:
|
45
|
+
- Make the changes directly in the files
|
46
|
+
- Explain WHY you're making the change
|
47
|
+
- Describe HOW the change improves the code
|
48
|
+
- Ensure all tests still pass after refactoring
|
49
|
+
- Update the File List if you modify additional files
|
50
|
+
|
51
|
+
6. **Standards Compliance Check**
|
52
|
+
- Verify adherence to `docs/coding-standards.md`
|
53
|
+
- Check compliance with `docs/unified-project-structure.md`
|
54
|
+
- Validate testing approach against `docs/testing-strategy.md`
|
55
|
+
- Ensure all guidelines mentioned in the story are followed
|
56
|
+
|
57
|
+
7. **Acceptance Criteria Validation**
|
58
|
+
- Verify each AC is fully implemented
|
59
|
+
- Check for any missing functionality
|
60
|
+
- Validate edge cases are handled
|
61
|
+
|
62
|
+
8. **Test Coverage Review**
|
63
|
+
- Ensure unit tests cover edge cases
|
64
|
+
- Add missing tests if critical coverage is lacking
|
65
|
+
- Verify integration tests (if required) are comprehensive
|
66
|
+
- Check that test assertions are meaningful
|
67
|
+
- Look for missing test scenarios
|
68
|
+
|
69
|
+
9. **Documentation and Comments**
|
70
|
+
- Verify code is self-documenting where possible
|
71
|
+
- Add comments for complex logic if missing
|
72
|
+
- Ensure any API changes are documented
|
73
|
+
|
74
|
+
## Update Story File - QA Results Section ONLY
|
75
|
+
|
76
|
+
**CRITICAL**: You are ONLY authorized to update the "QA Results" section of the story file. DO NOT modify any other sections.
|
77
|
+
|
78
|
+
After review and any refactoring, append your results to the story file in the QA Results section:
|
79
|
+
|
80
|
+
```markdown
|
81
|
+
## QA Results
|
82
|
+
|
83
|
+
### Review Date: [Date]
|
84
|
+
### Reviewed By: Quinn (Senior Developer QA)
|
85
|
+
|
86
|
+
### Code Quality Assessment
|
87
|
+
[Overall assessment of implementation quality]
|
88
|
+
|
89
|
+
### Refactoring Performed
|
90
|
+
[List any refactoring you performed with explanations]
|
91
|
+
- **File**: [filename]
|
92
|
+
- **Change**: [what was changed]
|
93
|
+
- **Why**: [reason for change]
|
94
|
+
- **How**: [how it improves the code]
|
95
|
+
|
96
|
+
### Compliance Check
|
97
|
+
- Coding Standards: [✓/✗] [notes if any]
|
98
|
+
- Project Structure: [✓/✗] [notes if any]
|
99
|
+
- Testing Strategy: [✓/✗] [notes if any]
|
100
|
+
- All ACs Met: [✓/✗] [notes if any]
|
101
|
+
|
102
|
+
### Improvements Checklist
|
103
|
+
[Check off items you handled yourself, leave unchecked for dev to address]
|
104
|
+
|
105
|
+
- [x] Refactored user service for better error handling (services/user.service.ts)
|
106
|
+
- [x] Added missing edge case tests (services/user.service.test.ts)
|
107
|
+
- [ ] Consider extracting validation logic to separate validator class
|
108
|
+
- [ ] Add integration test for error scenarios
|
109
|
+
- [ ] Update API documentation for new error codes
|
110
|
+
|
111
|
+
### Security Review
|
112
|
+
[Any security concerns found and whether addressed]
|
113
|
+
|
114
|
+
### Performance Considerations
|
115
|
+
[Any performance issues found and whether addressed]
|
116
|
+
|
117
|
+
### Final Status
|
118
|
+
[✓ Approved - Ready for Done] / [✗ Changes Required - See unchecked items above]
|
119
|
+
```
|
120
|
+
|
121
|
+
## Key Principles
|
122
|
+
|
123
|
+
- You are a SENIOR developer reviewing junior/mid-level work
|
124
|
+
- You have the authority and responsibility to improve code directly
|
125
|
+
- Always explain your changes for learning purposes
|
126
|
+
- Balance between perfection and pragmatism
|
127
|
+
- Focus on significant improvements, not nitpicks
|
128
|
+
|
129
|
+
## Blocking Conditions
|
130
|
+
|
131
|
+
Stop the review and request clarification if:
|
132
|
+
|
133
|
+
- Story file is incomplete or missing critical sections
|
134
|
+
- File List is empty or clearly incomplete
|
135
|
+
- No tests exist when they were required
|
136
|
+
- Code changes don't align with story requirements
|
137
|
+
- Critical architectural issues that require discussion
|
138
|
+
|
139
|
+
## Completion
|
140
|
+
|
141
|
+
After review:
|
142
|
+
|
143
|
+
1. If all items are checked and approved: Update story status to "Done"
|
144
|
+
2. If unchecked items remain: Keep status as "Review" for dev to address
|
145
|
+
3. Always provide constructive feedback and explanations for learning
|
@@ -0,0 +1,187 @@
|
|
1
|
+
# Document Sharding Task
|
2
|
+
|
3
|
+
## Purpose
|
4
|
+
|
5
|
+
- Split a large document into multiple smaller documents based on level 2 sections
|
6
|
+
- Create a folder structure to organize the sharded documents
|
7
|
+
- Maintain all content integrity including code blocks, diagrams, and markdown formatting
|
8
|
+
|
9
|
+
## Primary Method: Automatic with markdown-tree
|
10
|
+
|
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
|
+
|
13
|
+
If the command succeeds, inform the user that the document has been sharded successfully and STOP - do not proceed further.
|
14
|
+
|
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
|
+
|
17
|
+
1. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
|
18
|
+
2. Or set markdownExploder to false in {root}/core-config.yaml
|
19
|
+
|
20
|
+
**IMPORTANT: STOP HERE - do not proceed with manual sharding until one of the above actions is taken.**"
|
21
|
+
|
22
|
+
If markdownExploder is set to false, inform the user: "The markdownExploder setting is currently false. For better performance and reliability, you should:
|
23
|
+
|
24
|
+
1. Set markdownExploder to true in {root}/core-config.yaml
|
25
|
+
2. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
|
26
|
+
|
27
|
+
I will now proceed with the manual sharding process."
|
28
|
+
|
29
|
+
Then proceed with the manual method below ONLY if markdownExploder is false.]]
|
30
|
+
|
31
|
+
### Installation and Usage
|
32
|
+
|
33
|
+
1. **Install globally**:
|
34
|
+
|
35
|
+
```bash
|
36
|
+
npm install -g @kayvan/markdown-tree-parser
|
37
|
+
```
|
38
|
+
|
39
|
+
2. **Use the explode command**:
|
40
|
+
|
41
|
+
```bash
|
42
|
+
# For PRD
|
43
|
+
md-tree explode docs/prd.md docs/prd
|
44
|
+
|
45
|
+
# For Architecture
|
46
|
+
md-tree explode docs/architecture.md docs/architecture
|
47
|
+
|
48
|
+
# For any document
|
49
|
+
md-tree explode [source-document] [destination-folder]
|
50
|
+
```
|
51
|
+
|
52
|
+
3. **What it does**:
|
53
|
+
- Automatically splits the document by level 2 sections
|
54
|
+
- Creates properly named files
|
55
|
+
- Adjusts heading levels appropriately
|
56
|
+
- Handles all edge cases with code blocks and special markdown
|
57
|
+
|
58
|
+
If the user has @kayvan/markdown-tree-parser installed, use it and skip the manual process below.
|
59
|
+
|
60
|
+
---
|
61
|
+
|
62
|
+
## Manual Method (if @kayvan/markdown-tree-parser is not available or user indicated manual method)
|
63
|
+
|
64
|
+
### Task Instructions
|
65
|
+
|
66
|
+
1. Identify Document and Target Location
|
67
|
+
|
68
|
+
- Determine which document to shard (user-provided path)
|
69
|
+
- Create a new folder under `docs/` with the same name as the document (without extension)
|
70
|
+
- Example: `docs/prd.md` → create folder `docs/prd/`
|
71
|
+
|
72
|
+
2. Parse and Extract Sections
|
73
|
+
|
74
|
+
CRITICAL AEGNT SHARDING RULES:
|
75
|
+
|
76
|
+
1. Read the entire document content
|
77
|
+
2. Identify all level 2 sections (## headings)
|
78
|
+
3. For each level 2 section:
|
79
|
+
- Extract the section heading and ALL content until the next level 2 section
|
80
|
+
- Include all subsections, code blocks, diagrams, lists, tables, etc.
|
81
|
+
- Be extremely careful with:
|
82
|
+
- Fenced code blocks (```) - ensure you capture the full block including closing backticks and account for potential misleading level 2's that are actually part of a fenced section example
|
83
|
+
- Mermaid diagrams - preserve the complete diagram syntax
|
84
|
+
- Nested markdown elements
|
85
|
+
- Multi-line content that might contain ## inside code blocks
|
86
|
+
|
87
|
+
CRITICAL: Use proper parsing that understands markdown context. A ## inside a code block is NOT a section header.]]
|
88
|
+
|
89
|
+
### 3. Create Individual Files
|
90
|
+
|
91
|
+
For each extracted section:
|
92
|
+
|
93
|
+
1. **Generate filename**: Convert the section heading to lowercase-dash-case
|
94
|
+
|
95
|
+
- Remove special characters
|
96
|
+
- Replace spaces with dashes
|
97
|
+
- Example: "## Tech Stack" → `tech-stack.md`
|
98
|
+
|
99
|
+
2. **Adjust heading levels**:
|
100
|
+
|
101
|
+
- The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
|
102
|
+
- All subsection levels decrease by 1:
|
103
|
+
|
104
|
+
```txt
|
105
|
+
- ### → ##
|
106
|
+
- #### → ###
|
107
|
+
- ##### → ####
|
108
|
+
- etc.
|
109
|
+
```
|
110
|
+
|
111
|
+
3. **Write content**: Save the adjusted content to the new file
|
112
|
+
|
113
|
+
### 4. Create Index File
|
114
|
+
|
115
|
+
Create an `index.md` file in the sharded folder that:
|
116
|
+
|
117
|
+
1. Contains the original level 1 heading and any content before the first level 2 section
|
118
|
+
2. Lists all the sharded files with links:
|
119
|
+
|
120
|
+
```markdown
|
121
|
+
# Original Document Title
|
122
|
+
|
123
|
+
[Original introduction content if any]
|
124
|
+
|
125
|
+
## Sections
|
126
|
+
|
127
|
+
- [Section Name 1](./section-name-1.md)
|
128
|
+
- [Section Name 2](./section-name-2.md)
|
129
|
+
- [Section Name 3](./section-name-3.md)
|
130
|
+
...
|
131
|
+
```
|
132
|
+
|
133
|
+
### 5. Preserve Special Content
|
134
|
+
|
135
|
+
1. **Code blocks**: Must capture complete blocks including:
|
136
|
+
|
137
|
+
```language
|
138
|
+
content
|
139
|
+
```
|
140
|
+
|
141
|
+
2. **Mermaid diagrams**: Preserve complete syntax:
|
142
|
+
|
143
|
+
```mermaid
|
144
|
+
graph TD
|
145
|
+
...
|
146
|
+
```
|
147
|
+
|
148
|
+
3. **Tables**: Maintain proper markdown table formatting
|
149
|
+
|
150
|
+
4. **Lists**: Preserve indentation and nesting
|
151
|
+
|
152
|
+
5. **Inline code**: Preserve backticks
|
153
|
+
|
154
|
+
6. **Links and references**: Keep all markdown links intact
|
155
|
+
|
156
|
+
7. **Template markup**: If documents contain {{placeholders}} ,preserve exactly
|
157
|
+
|
158
|
+
### 6. Validation
|
159
|
+
|
160
|
+
After sharding:
|
161
|
+
|
162
|
+
1. Verify all sections were extracted
|
163
|
+
2. Check that no content was lost
|
164
|
+
3. Ensure heading levels were properly adjusted
|
165
|
+
4. Confirm all files were created successfully
|
166
|
+
|
167
|
+
### 7. Report Results
|
168
|
+
|
169
|
+
Provide a summary:
|
170
|
+
|
171
|
+
```text
|
172
|
+
Document sharded successfully:
|
173
|
+
- Source: [original document path]
|
174
|
+
- Destination: docs/[folder-name]/
|
175
|
+
- Files created: [count]
|
176
|
+
- Sections:
|
177
|
+
- section-name-1.md: "Section Title 1"
|
178
|
+
- section-name-2.md: "Section Title 2"
|
179
|
+
...
|
180
|
+
```
|
181
|
+
|
182
|
+
## Important Notes
|
183
|
+
|
184
|
+
- Never modify the actual content, only adjust heading levels
|
185
|
+
- Preserve ALL formatting, including whitespace where significant
|
186
|
+
- Handle edge cases like sections with code blocks containing ## symbols
|
187
|
+
- Ensure the sharding is reversible (could reconstruct the original from shards)
|
@@ -0,0 +1,289 @@
|
|
1
|
+
# Smart Project Analysis Task
|
2
|
+
|
3
|
+
## 📋 Overview
|
4
|
+
This task provides intelligent analysis of existing projects to understand their structure, tech stack, and optimal BMAD integration approach.
|
5
|
+
|
6
|
+
## 🎯 Task Objectives
|
7
|
+
- Analyze project structure and detect tech stack
|
8
|
+
- Identify existing architecture patterns
|
9
|
+
- Assess BMAD integration opportunities
|
10
|
+
- Recommend optimal workflow and agent configuration
|
11
|
+
- Generate actionable improvement suggestions
|
12
|
+
|
13
|
+
## 🔍 Analysis Framework
|
14
|
+
|
15
|
+
### Phase 1: Project Structure Analysis
|
16
|
+
|
17
|
+
#### File System Scanning
|
18
|
+
```bash
|
19
|
+
# Analyze project root structure
|
20
|
+
- Check for configuration files (package.json, pubspec.yaml, etc.)
|
21
|
+
- Identify source code organization
|
22
|
+
- Detect build and deployment configurations
|
23
|
+
- Analyze documentation structure
|
24
|
+
- Check for existing BMAD installation
|
25
|
+
```
|
26
|
+
|
27
|
+
#### Configuration Detection
|
28
|
+
```typescript
|
29
|
+
interface ProjectConfig {
|
30
|
+
// Package managers and dependencies
|
31
|
+
packageManager: 'npm' | 'yarn' | 'pnpm' | 'pub' | 'pip' | 'cargo' | 'go mod';
|
32
|
+
dependencies: string[];
|
33
|
+
devDependencies: string[];
|
34
|
+
|
35
|
+
// Build and development tools
|
36
|
+
buildTool: 'vite' | 'webpack' | 'rollup' | 'flutter build' | 'cargo' | 'go build';
|
37
|
+
linting: 'eslint' | 'tslint' | 'dart analyze' | 'clippy';
|
38
|
+
formatting: 'prettier' | 'dart format' | 'rustfmt';
|
39
|
+
|
40
|
+
// Testing frameworks
|
41
|
+
testing: 'jest' | 'vitest' | 'cypress' | 'playwright' | 'flutter test';
|
42
|
+
}
|
43
|
+
```
|
44
|
+
|
45
|
+
### Phase 2: Tech Stack Detection
|
46
|
+
|
47
|
+
#### Frontend Framework Detection
|
48
|
+
```typescript
|
49
|
+
const detectFrontendFramework = (dependencies: string[]) => {
|
50
|
+
if (dependencies.includes('flutter')) return 'flutter';
|
51
|
+
if (dependencies.includes('react')) return 'react';
|
52
|
+
if (dependencies.includes('vue')) return 'vue';
|
53
|
+
if (dependencies.includes('@angular/core')) return 'angular';
|
54
|
+
if (dependencies.includes('svelte')) return 'svelte';
|
55
|
+
return 'vanilla';
|
56
|
+
};
|
57
|
+
```
|
58
|
+
|
59
|
+
#### Backend Service Detection
|
60
|
+
```typescript
|
61
|
+
const detectBackendServices = (dependencies: string[], files: string[]) => {
|
62
|
+
const services = [];
|
63
|
+
|
64
|
+
// Firebase detection
|
65
|
+
if (dependencies.includes('firebase') || files.includes('firebase.json')) {
|
66
|
+
services.push('firebase');
|
67
|
+
}
|
68
|
+
|
69
|
+
// Supabase detection
|
70
|
+
if (dependencies.includes('@supabase/supabase-js')) {
|
71
|
+
services.push('supabase');
|
72
|
+
}
|
73
|
+
|
74
|
+
// Traditional backend
|
75
|
+
if (dependencies.includes('express') || dependencies.includes('fastify')) {
|
76
|
+
services.push('node-backend');
|
77
|
+
}
|
78
|
+
|
79
|
+
return services;
|
80
|
+
};
|
81
|
+
```
|
82
|
+
|
83
|
+
#### State Management Detection
|
84
|
+
```typescript
|
85
|
+
const detectStateManagement = (dependencies: string[], framework: string) => {
|
86
|
+
switch (framework) {
|
87
|
+
case 'flutter':
|
88
|
+
if (dependencies.includes('flutter_bloc')) return 'cubit/bloc';
|
89
|
+
if (dependencies.includes('riverpod')) return 'riverpod';
|
90
|
+
break;
|
91
|
+
case 'react':
|
92
|
+
if (dependencies.includes('@reduxjs/toolkit')) return 'redux-toolkit';
|
93
|
+
if (dependencies.includes('zustand')) return 'zustand';
|
94
|
+
if (dependencies.includes('valtio')) return 'valtio';
|
95
|
+
break;
|
96
|
+
case 'vue':
|
97
|
+
if (dependencies.includes('vuex')) return 'vuex';
|
98
|
+
if (dependencies.includes('pinia')) return 'pinia';
|
99
|
+
break;
|
100
|
+
}
|
101
|
+
return 'default';
|
102
|
+
};
|
103
|
+
```
|
104
|
+
|
105
|
+
### Phase 3: Architecture Pattern Analysis
|
106
|
+
|
107
|
+
#### Code Structure Analysis
|
108
|
+
```typescript
|
109
|
+
interface ArchitectureAnalysis {
|
110
|
+
pattern: 'clean-architecture' | 'mvc' | 'layered' | 'component-based' | 'mixed';
|
111
|
+
layerSeparation: 'strict' | 'loose' | 'none';
|
112
|
+
dependencyDirection: 'correct' | 'violated' | 'unclear';
|
113
|
+
testCoverage: 'high' | 'medium' | 'low' | 'none';
|
114
|
+
documentation: 'comprehensive' | 'partial' | 'minimal' | 'none';
|
115
|
+
}
|
116
|
+
```
|
117
|
+
|
118
|
+
#### Flutter-Specific Analysis
|
119
|
+
```dart
|
120
|
+
// Analyze Flutter project structure
|
121
|
+
final flutterAnalysis = {
|
122
|
+
'architecture': detectCleanArchitecture(),
|
123
|
+
'stateManagement': detectStatePattern(),
|
124
|
+
'localization': hasLocalization(),
|
125
|
+
'responsiveDesign': hasResponsiveDesign(),
|
126
|
+
'testing': analyzeTestStructure(),
|
127
|
+
};
|
128
|
+
```
|
129
|
+
|
130
|
+
### Phase 4: BMAD Integration Assessment
|
131
|
+
|
132
|
+
#### Current BMAD Status
|
133
|
+
```typescript
|
134
|
+
interface BMADStatus {
|
135
|
+
installed: boolean;
|
136
|
+
version: string | null;
|
137
|
+
configuration: 'complete' | 'partial' | 'none';
|
138
|
+
agents: string[];
|
139
|
+
workflows: string[];
|
140
|
+
expansionPacks: string[];
|
141
|
+
}
|
142
|
+
```
|
143
|
+
|
144
|
+
#### Integration Opportunities
|
145
|
+
```typescript
|
146
|
+
interface IntegrationOpportunities {
|
147
|
+
// Missing BMAD components
|
148
|
+
missingAgents: string[];
|
149
|
+
missingWorkflows: string[];
|
150
|
+
missingTemplates: string[];
|
151
|
+
|
152
|
+
// Improvement opportunities
|
153
|
+
architectureUpgrades: string[];
|
154
|
+
qualityImprovements: string[];
|
155
|
+
securityEnhancements: string[];
|
156
|
+
performanceOptimizations: string[];
|
157
|
+
}
|
158
|
+
```
|
159
|
+
|
160
|
+
## 📊 Analysis Output
|
161
|
+
|
162
|
+
### Comprehensive Project Report
|
163
|
+
```markdown
|
164
|
+
# Project Analysis Report
|
165
|
+
|
166
|
+
## 📋 Project Overview
|
167
|
+
- **Name**: [Project Name]
|
168
|
+
- **Type**: [Greenfield/Brownfield]
|
169
|
+
- **Structure**: [Monorepo/Multi-repo/Single-app]
|
170
|
+
- **Size**: [Small/Medium/Large] ([LOC count])
|
171
|
+
|
172
|
+
## 🛠️ Tech Stack Analysis
|
173
|
+
- **Frontend**: [Framework] ([Version])
|
174
|
+
- **Backend**: [Service/Framework] ([Version])
|
175
|
+
- **Database**: [Type] ([Version])
|
176
|
+
- **State Management**: [Pattern/Library]
|
177
|
+
- **Testing**: [Frameworks and coverage]
|
178
|
+
- **Build Tools**: [Tools and configuration]
|
179
|
+
|
180
|
+
## 🏗️ Architecture Assessment
|
181
|
+
- **Pattern**: [Architecture pattern]
|
182
|
+
- **Quality Score**: [Score/10]
|
183
|
+
- **Maintainability**: [High/Medium/Low]
|
184
|
+
- **Scalability**: [High/Medium/Low]
|
185
|
+
- **Test Coverage**: [Percentage]
|
186
|
+
|
187
|
+
## 🎯 BMAD Integration Status
|
188
|
+
- **Current Status**: [Not installed/Partially configured/Fully configured]
|
189
|
+
- **Compatible Agents**: [List of applicable agents]
|
190
|
+
- **Recommended Workflow**: [Workflow type]
|
191
|
+
- **Expansion Packs**: [Recommended packs]
|
192
|
+
|
193
|
+
## 🚀 Recommendations
|
194
|
+
|
195
|
+
### Immediate Actions
|
196
|
+
1. [Priority 1 recommendation]
|
197
|
+
2. [Priority 2 recommendation]
|
198
|
+
3. [Priority 3 recommendation]
|
199
|
+
|
200
|
+
### Architecture Improvements
|
201
|
+
- [Architecture improvement 1]
|
202
|
+
- [Architecture improvement 2]
|
203
|
+
|
204
|
+
### Quality Enhancements
|
205
|
+
- [Quality enhancement 1]
|
206
|
+
- [Quality enhancement 2]
|
207
|
+
|
208
|
+
### Security Considerations
|
209
|
+
- [Security recommendation 1]
|
210
|
+
- [Security recommendation 2]
|
211
|
+
|
212
|
+
## 📋 Next Steps
|
213
|
+
1. **BMAD Setup**: [Setup instructions if needed]
|
214
|
+
2. **Agent Configuration**: [Agent setup recommendations]
|
215
|
+
3. **Workflow Selection**: [Recommended workflow]
|
216
|
+
4. **Documentation**: [Documentation tasks]
|
217
|
+
```
|
218
|
+
|
219
|
+
## 🤖 Execution Steps
|
220
|
+
|
221
|
+
### Step 1: Initialize Analysis
|
222
|
+
> 🔍 **Starting Project Analysis**
|
223
|
+
>
|
224
|
+
> I'm analyzing your project to understand its structure and recommend the best BMAD integration approach.
|
225
|
+
>
|
226
|
+
> This will take a moment...
|
227
|
+
|
228
|
+
### Step 2: Present Findings
|
229
|
+
> 📊 **Analysis Complete**
|
230
|
+
>
|
231
|
+
> **Project Type**: [Detected type]
|
232
|
+
> **Tech Stack**: [Primary technologies]
|
233
|
+
> **Architecture**: [Current pattern]
|
234
|
+
> **BMAD Status**: [Current status]
|
235
|
+
>
|
236
|
+
> **Quality Score**: [Score]/10
|
237
|
+
>
|
238
|
+
> Would you like to see the detailed report? (Y/n)
|
239
|
+
|
240
|
+
### Step 3: Provide Recommendations
|
241
|
+
> 🎯 **Recommendations**
|
242
|
+
>
|
243
|
+
> Based on my analysis, here are my top recommendations:
|
244
|
+
>
|
245
|
+
> **Priority 1**: [Most important recommendation]
|
246
|
+
> **Priority 2**: [Second priority]
|
247
|
+
> **Priority 3**: [Third priority]
|
248
|
+
>
|
249
|
+
> **Optimal BMAD Configuration**:
|
250
|
+
> - **Agents**: [Recommended agents]
|
251
|
+
> - **Workflow**: [Recommended workflow]
|
252
|
+
> - **Expansion Packs**: [If applicable]
|
253
|
+
>
|
254
|
+
> Would you like me to:
|
255
|
+
> 1. **Set up BMAD** with recommended configuration
|
256
|
+
> 2. **Create improvement plan** with detailed steps
|
257
|
+
> 3. **Generate documentation** for current architecture
|
258
|
+
> 4. **Start with specific recommendation**
|
259
|
+
>
|
260
|
+
> What would you prefer? (1/2/3/4)
|
261
|
+
|
262
|
+
### Step 4: Action Execution
|
263
|
+
Based on user choice, execute the selected action with intelligent guidance and validation.
|
264
|
+
|
265
|
+
## 🔧 Implementation Details
|
266
|
+
|
267
|
+
### Analysis Algorithms
|
268
|
+
- **Dependency Graph Analysis**: Understand component relationships
|
269
|
+
- **Code Complexity Metrics**: Assess maintainability and scalability
|
270
|
+
- **Pattern Recognition**: Identify architectural patterns and anti-patterns
|
271
|
+
- **Quality Metrics**: Calculate code quality scores
|
272
|
+
- **Security Scanning**: Identify potential security issues
|
273
|
+
|
274
|
+
### Intelligence Features
|
275
|
+
- **Context Awareness**: Understand project domain and requirements
|
276
|
+
- **Best Practice Validation**: Check against industry standards
|
277
|
+
- **Performance Analysis**: Identify performance bottlenecks
|
278
|
+
- **Scalability Assessment**: Evaluate scaling potential
|
279
|
+
- **Maintainability Review**: Assess long-term maintainability
|
280
|
+
|
281
|
+
## 📋 Success Criteria
|
282
|
+
- [ ] Complete project structure analyzed
|
283
|
+
- [ ] Tech stack accurately detected
|
284
|
+
- [ ] Architecture pattern identified
|
285
|
+
- [ ] Quality metrics calculated
|
286
|
+
- [ ] BMAD integration opportunities identified
|
287
|
+
- [ ] Actionable recommendations provided
|
288
|
+
- [ ] Clear next steps outlined
|
289
|
+
- [ ] User guided to optimal solution
|