ai-devkit 0.4.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/memory.d.ts +3 -0
- package/dist/commands/memory.d.ts.map +1 -0
- package/dist/commands/memory.js +53 -0
- package/dist/commands/memory.js.map +1 -0
- package/dist/commands/setup.d.ts +6 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +112 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/lib/EnvironmentSelector.d.ts +1 -0
- package/dist/lib/EnvironmentSelector.d.ts.map +1 -1
- package/dist/lib/EnvironmentSelector.js +28 -0
- package/dist/lib/EnvironmentSelector.js.map +1 -1
- package/dist/lib/TemplateManager.d.ts +14 -0
- package/dist/lib/TemplateManager.d.ts.map +1 -1
- package/dist/lib/TemplateManager.js +74 -3
- package/dist/lib/TemplateManager.js.map +1 -1
- package/{templates/commands/capture-knowledge.toml → dist/templates/commands/capture-knowledge.md} +10 -4
- package/{templates/commands/check-implementation.toml → dist/templates/commands/check-implementation.md} +9 -0
- package/{templates/commands/code-review.toml → dist/templates/commands/code-review.md} +11 -4
- package/{templates/commands/debug.toml → dist/templates/commands/debug.md} +11 -5
- package/{templates/commands/execute-plan.toml → dist/templates/commands/execute-plan.md} +11 -5
- package/{templates/commands/new-requirement.toml → dist/templates/commands/new-requirement.md} +11 -4
- package/dist/templates/commands/remember.md +27 -0
- package/dist/templates/commands/review-design.md +21 -0
- package/dist/templates/commands/review-requirements.md +19 -0
- package/dist/templates/commands/simplify-implementation.md +153 -0
- package/{templates/commands/update-planning.toml → dist/templates/commands/update-planning.md} +11 -4
- package/{templates/commands/writing-test.toml → dist/templates/commands/writing-test.md} +10 -3
- package/dist/templates/env/base.md +51 -0
- package/dist/templates/phases/deployment.md +72 -0
- package/dist/templates/phases/design.md +60 -0
- package/dist/templates/phases/implementation.md +65 -0
- package/dist/templates/phases/monitoring.md +80 -0
- package/dist/templates/phases/planning.md +60 -0
- package/dist/templates/phases/requirements.md +51 -0
- package/dist/templates/phases/testing.md +81 -0
- package/dist/templates/templates/commands/capture-knowledge.md +55 -0
- package/dist/templates/templates/commands/check-implementation.md +30 -0
- package/dist/templates/templates/commands/code-review.md +90 -0
- package/dist/templates/templates/commands/debug.md +54 -0
- package/dist/templates/templates/commands/execute-plan.md +80 -0
- package/dist/templates/templates/commands/new-requirement.md +136 -0
- package/dist/templates/templates/commands/remember.md +27 -0
- package/dist/templates/templates/commands/review-design.md +21 -0
- package/dist/templates/templates/commands/review-requirements.md +19 -0
- package/dist/templates/templates/commands/simplify-implementation.md +153 -0
- package/dist/templates/templates/commands/update-planning.md +70 -0
- package/dist/templates/templates/commands/writing-test.md +53 -0
- package/dist/templates/templates/env/base.md +51 -0
- package/dist/templates/templates/phases/deployment.md +72 -0
- package/dist/templates/templates/phases/design.md +60 -0
- package/dist/templates/templates/phases/implementation.md +65 -0
- package/dist/templates/templates/phases/monitoring.md +80 -0
- package/dist/templates/templates/phases/planning.md +60 -0
- package/dist/templates/templates/phases/requirements.md +51 -0
- package/dist/templates/templates/phases/testing.md +81 -0
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/util/env.d.ts +2 -0
- package/dist/util/env.d.ts.map +1 -1
- package/dist/util/env.js +18 -1
- package/dist/util/env.js.map +1 -1
- package/package.json +5 -2
- package/project.json +29 -0
- package/templates/commands/capture-knowledge.md +9 -0
- package/templates/commands/check-implementation.md +9 -0
- package/templates/commands/code-review.md +9 -0
- package/templates/commands/debug.md +9 -0
- package/templates/commands/execute-plan.md +9 -0
- package/templates/commands/new-requirement.md +9 -0
- package/templates/commands/remember.md +27 -0
- package/templates/commands/review-design.md +10 -0
- package/templates/commands/review-requirements.md +10 -0
- package/templates/commands/simplify-implementation.md +153 -0
- package/templates/commands/update-planning.md +9 -0
- package/templates/commands/writing-test.md +9 -0
- package/CHANGELOG.md +0 -87
- package/README.md +0 -297
- package/dist/__tests__/lib/Config.test.d.ts +0 -2
- package/dist/__tests__/lib/Config.test.d.ts.map +0 -1
- package/dist/__tests__/lib/Config.test.js +0 -281
- package/dist/__tests__/lib/Config.test.js.map +0 -1
- package/dist/__tests__/lib/EnvironmentSelector.test.d.ts +0 -2
- package/dist/__tests__/lib/EnvironmentSelector.test.d.ts.map +0 -1
- package/dist/__tests__/lib/EnvironmentSelector.test.js +0 -117
- package/dist/__tests__/lib/EnvironmentSelector.test.js.map +0 -1
- package/dist/__tests__/lib/PhaseSelector.test.d.ts +0 -2
- package/dist/__tests__/lib/PhaseSelector.test.d.ts.map +0 -1
- package/dist/__tests__/lib/PhaseSelector.test.js +0 -77
- package/dist/__tests__/lib/PhaseSelector.test.js.map +0 -1
- package/dist/__tests__/lib/TemplateManager.test.d.ts +0 -2
- package/dist/__tests__/lib/TemplateManager.test.d.ts.map +0 -1
- package/dist/__tests__/lib/TemplateManager.test.js +0 -351
- package/dist/__tests__/lib/TemplateManager.test.js.map +0 -1
- package/dist/__tests__/util/env.test.d.ts +0 -2
- package/dist/__tests__/util/env.test.d.ts.map +0 -1
- package/dist/__tests__/util/env.test.js +0 -166
- package/dist/__tests__/util/env.test.js.map +0 -1
- package/templates/commands/review-design.toml +0 -13
- package/templates/commands/review-requirements.toml +0 -11
- package/web/.nojekyll +0 -2
- package/web/CNAME +0 -1
- package/web/README.md +0 -100
- package/web/app/favicon.ico +0 -0
- package/web/app/globals.css +0 -122
- package/web/app/layout.tsx +0 -106
- package/web/app/page.tsx +0 -119
- package/web/app/roadmap/page.tsx +0 -150
- package/web/app/robots.ts +0 -16
- package/web/app/sitemap.ts +0 -46
- package/web/app/vision/page.tsx +0 -49
- package/web/components/Footer.tsx +0 -81
- package/web/components/GitHubButton.tsx +0 -49
- package/web/components/GitHubStars.tsx +0 -27
- package/web/components/Header.tsx +0 -108
- package/web/components/MarkdownContent.tsx +0 -35
- package/web/components/SkipToContent.tsx +0 -11
- package/web/content/pages/vision.md +0 -44
- package/web/content/roadmap/1-web.md +0 -9
- package/web/content/roadmap/2-integrations.md +0 -7
- package/web/content/roadmap/3-cli-enhancements.md +0 -8
- package/web/content/roadmap/4-local-memory.md +0 -8
- package/web/eslint.config.mjs +0 -18
- package/web/lib/GitHubContext.tsx +0 -57
- package/web/lib/content/loader.ts +0 -152
- package/web/lib/content/types.ts +0 -37
- package/web/lib/utils.ts +0 -12
- package/web/next.config.ts +0 -11
- package/web/package-lock.json +0 -8837
- package/web/package.json +0 -34
- package/web/postcss.config.mjs +0 -7
- package/web/public/file.svg +0 -1
- package/web/public/globe.svg +0 -1
- package/web/public/next.svg +0 -1
- package/web/public/vercel.svg +0 -1
- package/web/public/window.svg +0 -1
package/{templates/commands/new-requirement.toml → dist/templates/commands/new-requirement.md}
RENAMED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
the development workflow from requirements to testing.
|
|
3
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Add new feature/requirement documentation and guide me through the development workflow from requirements to testing.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
I want to add a new feature/requirement. Please guide me through the complete development workflow:
|
|
6
|
+
|
|
7
|
+
## Memory (use when helpful)
|
|
8
|
+
- If you need clarification or project conventions, query `memory.searchKnowledge` with a brief task description, tags, and scope.
|
|
9
|
+
- If I ask to save reusable guidance, run `/remember` (or call `memory.storeKnowledge`).
|
|
10
|
+
- If MCP tools are unavailable, use `ai-devkit memory search` or `ai-devkit memory store`.
|
|
4
11
|
|
|
5
12
|
## Step 1: Capture Requirement
|
|
6
13
|
First, ask me:
|
|
@@ -126,4 +133,4 @@ Then provide the appropriate command:
|
|
|
126
133
|
---
|
|
127
134
|
|
|
128
135
|
**Let's start! Tell me about the feature you want to build.**
|
|
129
|
-
|
|
136
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Store reusable guidance in the knowledge memory service.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Remember Knowledge
|
|
6
|
+
|
|
7
|
+
When I say "remember this" or want to save a reusable rule, help me store it in the knowledge memory service.
|
|
8
|
+
|
|
9
|
+
## Step 1: Capture Knowledge
|
|
10
|
+
Ask me for:
|
|
11
|
+
- A short, explicit title (5-12 words)
|
|
12
|
+
- The detailed content (markdown, examples encouraged)
|
|
13
|
+
- Optional tags (keywords like "api", "testing")
|
|
14
|
+
- Optional scope (`global`, `project:<name>`, `repo:<name>`)
|
|
15
|
+
|
|
16
|
+
If I'm vague, ask follow-ups to make it specific and actionable.
|
|
17
|
+
|
|
18
|
+
## Step 2: Validate Quality
|
|
19
|
+
- Ensure it is specific and reusable (not generic advice).
|
|
20
|
+
- Avoid storing secrets or sensitive data.
|
|
21
|
+
|
|
22
|
+
## Step 3: Store
|
|
23
|
+
Call `memory.storeKnowledge` with title, content, tags, scope.
|
|
24
|
+
If MCP tools are unavailable, use `ai-devkit memory store` instead.
|
|
25
|
+
|
|
26
|
+
## Step 4: Confirm
|
|
27
|
+
Summarize what was saved and offer to store more knowledge if needed.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review the design documentation for a feature to ensure completeness and accuracy.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Review the design documentation in docs/ai/design/feature-{name}.md (and the project-level README if relevant). Summarize:
|
|
6
|
+
|
|
7
|
+
## Memory (use when helpful)
|
|
8
|
+
- If you need clarification or project conventions, query `memory.searchKnowledge` with a brief task description, tags, and scope.
|
|
9
|
+
- If I ask to save reusable guidance, run `/remember` (or call `memory.storeKnowledge`).
|
|
10
|
+
- If MCP tools are unavailable, use `ai-devkit memory search` or `ai-devkit memory store`.
|
|
11
|
+
|
|
12
|
+
- Architecture overview (ensure mermaid diagram is present and accurate)
|
|
13
|
+
- Key components and their responsibilities
|
|
14
|
+
- Technology choices and rationale
|
|
15
|
+
- Data models and relationships
|
|
16
|
+
- API/interface contracts (inputs, outputs, auth)
|
|
17
|
+
- Major design decisions and trade-offs
|
|
18
|
+
- Non-functional requirements that must be preserved
|
|
19
|
+
|
|
20
|
+
Highlight any inconsistencies, missing sections, or diagrams that need updates.
|
|
21
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review the requirements documentation for a feature to ensure completeness and alignment with project standards.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Please review `docs/ai/requirements/feature-{name}.md` and the project-level template `docs/ai/requirements/README.md` to ensure structure and content alignment. Summarize:
|
|
6
|
+
|
|
7
|
+
## Memory (use when helpful)
|
|
8
|
+
- If you need clarification or project conventions, query `memory.searchKnowledge` with a brief task description, tags, and scope.
|
|
9
|
+
- If I ask to save reusable guidance, run `/remember` (or call `memory.storeKnowledge`).
|
|
10
|
+
- If MCP tools are unavailable, use `ai-devkit memory search` or `ai-devkit memory store`.
|
|
11
|
+
|
|
12
|
+
- Core problem statement and affected users
|
|
13
|
+
- Goals, non-goals, and success criteria
|
|
14
|
+
- Primary user stories & critical flows
|
|
15
|
+
- Constraints, assumptions, open questions
|
|
16
|
+
- Any missing sections or deviations from the template
|
|
17
|
+
|
|
18
|
+
Identify gaps or contradictions and suggest clarifications.
|
|
19
|
+
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Analyze and simplify existing implementations to reduce complexity, improve maintainability, and enhance scalability.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Simplify Implementation Assistant
|
|
6
|
+
|
|
7
|
+
You are an expert engineer focused on reducing complexity and improving scalability. Help me simplify an existing implementation while maintaining or improving its functionality.
|
|
8
|
+
|
|
9
|
+
## Memory (use when helpful)
|
|
10
|
+
- If you need clarification or project conventions, query `memory.searchKnowledge` with a brief task description, tags, and scope.
|
|
11
|
+
- If I ask to save reusable guidance, run `/remember` (or call `memory.storeKnowledge`).
|
|
12
|
+
- If MCP tools are unavailable, use `ai-devkit memory search` or `ai-devkit memory store`.
|
|
13
|
+
|
|
14
|
+
## Step 1: Gather Context
|
|
15
|
+
Ask me for:
|
|
16
|
+
- Target file(s) or component(s) to simplify
|
|
17
|
+
- Current pain points (hard to understand, maintain, or extend?)
|
|
18
|
+
- Performance or scalability concerns
|
|
19
|
+
- Any constraints (backward compatibility, API stability, deadlines)
|
|
20
|
+
- Relevant design docs or requirements
|
|
21
|
+
|
|
22
|
+
If available, request the current implementation:
|
|
23
|
+
```bash
|
|
24
|
+
# For a specific file
|
|
25
|
+
cat <file_path>
|
|
26
|
+
|
|
27
|
+
# For recent changes
|
|
28
|
+
git diff HEAD~5 --stat
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Step 2: Analyze Current Complexity
|
|
32
|
+
For each target file or component:
|
|
33
|
+
1. **Identify complexity sources:**
|
|
34
|
+
- Deep nesting or long functions
|
|
35
|
+
- Duplicate or redundant code
|
|
36
|
+
- Unclear abstractions or leaky interfaces
|
|
37
|
+
- Tightly coupled components
|
|
38
|
+
- Over-engineering or premature optimization
|
|
39
|
+
- Magic numbers, hardcoded values, or scattered configuration
|
|
40
|
+
|
|
41
|
+
2. **Measure impact:**
|
|
42
|
+
- Lines of code that could be reduced
|
|
43
|
+
- Number of dependencies that could be removed
|
|
44
|
+
- Cognitive load for future maintainers
|
|
45
|
+
|
|
46
|
+
3. **Assess scalability blockers:**
|
|
47
|
+
- Single points of failure
|
|
48
|
+
- Synchronous operations that should be async
|
|
49
|
+
- Missing caching or memoization opportunities
|
|
50
|
+
- Inefficient data structures or algorithms
|
|
51
|
+
|
|
52
|
+
## Step 3: Apply Readability Principles
|
|
53
|
+
|
|
54
|
+
**Core Philosophy: Good code reads like a good book — naturally, from left to right, top to bottom.**
|
|
55
|
+
|
|
56
|
+
When simplifying, prioritize readability over brevity. The goal is not to write the shortest code, but to write code that communicates intent clearly.
|
|
57
|
+
|
|
58
|
+
### ✅ DO: Embrace Readability
|
|
59
|
+
- **Linear flow:** Code should tell a story. A reader should understand the logic by reading top-to-bottom without jumping around.
|
|
60
|
+
- **Explicit over implicit:** Favor clear, explicit code over clever shortcuts that require mental decoding.
|
|
61
|
+
- **Meaningful names:** Variables, functions, and classes should describe their purpose without needing comments.
|
|
62
|
+
- **Consistent patterns:** Use the same patterns throughout the codebase so readers build familiarity.
|
|
63
|
+
- **Appropriate abstraction level:** Each function should operate at one level of abstraction.
|
|
64
|
+
- **White space and grouping:** Use blank lines to separate logical blocks, like paragraphs in prose.
|
|
65
|
+
|
|
66
|
+
### ❌ AVOID: Over-Optimization for Brevity
|
|
67
|
+
Reducing line count is NOT the goal. These patterns often harm readability:
|
|
68
|
+
|
|
69
|
+
| Anti-Pattern | Problem | Better Alternative |
|
|
70
|
+
|--------------|---------|--------------------|
|
|
71
|
+
| **Nested ternaries** | `a ? b ? c : d : e` is cryptic | Use explicit if/else blocks |
|
|
72
|
+
| **Chained one-liners** | `x.map().filter().reduce().flat()` is hard to debug | Break into named intermediate steps |
|
|
73
|
+
| **Clever bitwise tricks** | `n & 1` instead of `n % 2 === 1` obscures intent | Use readable arithmetic unless performance-critical |
|
|
74
|
+
| **Overly short variable names** | `const x = getData(); const y = x.filter(z => z.a);` | Use descriptive names like `users`, `activeUsers` |
|
|
75
|
+
| **Implicit returns everywhere** | Arrow functions without braces hide complexity | Add braces and explicit returns for complex logic |
|
|
76
|
+
| **Magic one-liners** | Regex or reduce expressions that "do everything" | Split into documented steps |
|
|
77
|
+
| **Premature DRY** | Forcing abstraction to avoid 2-3 lines of duplication | Some duplication is clearer than wrong abstraction |
|
|
78
|
+
|
|
79
|
+
### 📖 The "Reading Test"
|
|
80
|
+
For each simplification, ask:
|
|
81
|
+
1. Can a new team member understand this in under 30 seconds?
|
|
82
|
+
2. Does the code flow naturally without needing to jump to other files?
|
|
83
|
+
3. Are there any "wait, what does this do?" moments?
|
|
84
|
+
4. Would this code still be clear 6 months from now?
|
|
85
|
+
|
|
86
|
+
If the answer is "no" to any of these, the code needs more clarity, not more optimization.
|
|
87
|
+
|
|
88
|
+
## Step 4: Propose Simplifications
|
|
89
|
+
For each identified issue, suggest concrete improvements:
|
|
90
|
+
|
|
91
|
+
| Category | Pattern |
|
|
92
|
+
|----------|---------|
|
|
93
|
+
| **Extract** | Long functions → smaller, focused functions |
|
|
94
|
+
| **Consolidate** | Duplicate code → shared utilities or base classes |
|
|
95
|
+
| **Flatten** | Deep nesting → early returns, guard clauses |
|
|
96
|
+
| **Decouple** | Tight coupling → dependency injection, interfaces |
|
|
97
|
+
| **Remove** | Dead code, unused features, excessive abstractions |
|
|
98
|
+
| **Replace** | Complex logic → built-in language/library features |
|
|
99
|
+
| **Defer** | Premature optimization → measure-first approach |
|
|
100
|
+
|
|
101
|
+
## Step 5: Prioritize Changes
|
|
102
|
+
Rank suggestions by:
|
|
103
|
+
1. **High impact, low risk** — Do first
|
|
104
|
+
2. **High impact, higher risk** — Plan carefully
|
|
105
|
+
3. **Low impact, low risk** — Quick wins if time permits
|
|
106
|
+
4. **Low impact, high risk** — Skip or defer
|
|
107
|
+
|
|
108
|
+
For each change, specify:
|
|
109
|
+
- Before/after code snippets
|
|
110
|
+
- Risk level (breaking change? needs migration?)
|
|
111
|
+
- Testing requirements
|
|
112
|
+
- Estimated effort
|
|
113
|
+
|
|
114
|
+
## Step 6: Create Simplification Plan
|
|
115
|
+
Provide a structured action plan:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
### Simplification Summary
|
|
119
|
+
- Total suggestions: [count]
|
|
120
|
+
- Estimated LOC reduction: [estimate]
|
|
121
|
+
- Complexity score before/after: [if measurable]
|
|
122
|
+
|
|
123
|
+
### Prioritized Actions
|
|
124
|
+
1. **[Component/Function Name]**
|
|
125
|
+
- Issue: ...
|
|
126
|
+
- Solution: ...
|
|
127
|
+
- Risk: Low/Medium/High
|
|
128
|
+
- Effort: S/M/L
|
|
129
|
+
|
|
130
|
+
2. ... (repeat)
|
|
131
|
+
|
|
132
|
+
### Recommended Order
|
|
133
|
+
1. [ ] [First change - safest, unlocks others]
|
|
134
|
+
2. [ ] [Second change]
|
|
135
|
+
3. [ ] ...
|
|
136
|
+
|
|
137
|
+
### Post-Simplification Checklist
|
|
138
|
+
- [ ] Run existing tests to verify no regressions
|
|
139
|
+
- [ ] Add tests for any new helper functions
|
|
140
|
+
- [ ] Update documentation if interfaces changed
|
|
141
|
+
- [ ] Review with team before merging larger refactors
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Step 7: Scalability Recommendations
|
|
145
|
+
Beyond immediate simplification, suggest patterns for future scalability:
|
|
146
|
+
- Modular architecture improvements
|
|
147
|
+
- Caching strategies
|
|
148
|
+
- Async/parallel processing opportunities
|
|
149
|
+
- Configuration externalization
|
|
150
|
+
- Feature flags for gradual rollouts
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
Let me know when you're ready to simplify your implementation.
|
package/{templates/commands/update-planning.toml → dist/templates/commands/update-planning.md}
RENAMED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
implementation progress for a feature.
|
|
3
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Assist in updating planning documentation to reflect current implementation progress for a feature.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Planning Update Assistant
|
|
4
6
|
|
|
5
7
|
Please help me reconcile the current implementation progress with our planning documentation.
|
|
6
8
|
|
|
9
|
+
## Memory (use when helpful)
|
|
10
|
+
- If you need clarification or project conventions, query `memory.searchKnowledge` with a brief task description, tags, and scope.
|
|
11
|
+
- If I ask to save reusable guidance, run `/remember` (or call `memory.storeKnowledge`).
|
|
12
|
+
- If MCP tools are unavailable, use `ai-devkit memory search` or `ai-devkit memory store`.
|
|
13
|
+
|
|
7
14
|
## Step 1: Gather Context
|
|
8
15
|
Ask me for:
|
|
9
16
|
- Feature/branch name and brief status
|
|
@@ -60,4 +67,4 @@ Prepare a summary paragraph to copy into the planning doc, covering:
|
|
|
60
67
|
|
|
61
68
|
---
|
|
62
69
|
Let me know when you're ready to begin the planning update.
|
|
63
|
-
|
|
70
|
+
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Add tests for a new feature.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Review `docs/ai/testing/feature-{name}.md` and ensure it mirrors the base template before writing tests.
|
|
6
|
+
|
|
7
|
+
## Memory (use when helpful)
|
|
8
|
+
- If you need clarification or project conventions, query `memory.searchKnowledge` with a brief task description, tags, and scope.
|
|
9
|
+
- If I ask to save reusable guidance, run `/remember` (or call `memory.storeKnowledge`).
|
|
10
|
+
- If MCP tools are unavailable, use `ai-devkit memory search` or `ai-devkit memory store`.
|
|
3
11
|
|
|
4
12
|
## Step 1: Gather Context
|
|
5
13
|
Ask me for:
|
|
@@ -43,4 +51,3 @@ For each module/function:
|
|
|
43
51
|
- Flag follow-up tasks for deferred tests (with owners/dates)
|
|
44
52
|
|
|
45
53
|
Let me know when you have the latest code changes ready; we'll write tests together until we hit 100% coverage.
|
|
46
|
-
'''
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# AI DevKit Rules
|
|
2
|
+
|
|
3
|
+
## Project Context
|
|
4
|
+
This project uses ai-devkit for structured AI-assisted development. Phase documentation is located in `docs/ai/`.
|
|
5
|
+
|
|
6
|
+
## Documentation Structure
|
|
7
|
+
- `docs/ai/requirements/` - Problem understanding and requirements
|
|
8
|
+
- `docs/ai/design/` - System architecture and design decisions (include mermaid diagrams)
|
|
9
|
+
- `docs/ai/planning/` - Task breakdown and project planning
|
|
10
|
+
- `docs/ai/implementation/` - Implementation guides and notes
|
|
11
|
+
- `docs/ai/testing/` - Testing strategy and test cases
|
|
12
|
+
- `docs/ai/deployment/` - Deployment and infrastructure docs
|
|
13
|
+
- `docs/ai/monitoring/` - Monitoring and observability setup
|
|
14
|
+
|
|
15
|
+
## Code Style & Standards
|
|
16
|
+
- Follow the project's established code style and conventions
|
|
17
|
+
- Write clear, self-documenting code with meaningful variable names
|
|
18
|
+
- Add comments for complex logic or non-obvious decisions
|
|
19
|
+
|
|
20
|
+
## Development Workflow
|
|
21
|
+
- Review phase documentation in `docs/ai/` before implementing features
|
|
22
|
+
- Keep requirements, design, and implementation docs updated as the project evolves
|
|
23
|
+
- Reference the planning doc for task breakdown and priorities
|
|
24
|
+
- Copy the testing template (`docs/ai/testing/README.md`) before creating feature-specific testing docs
|
|
25
|
+
|
|
26
|
+
## AI Interaction Guidelines
|
|
27
|
+
- When implementing features, first check relevant phase documentation
|
|
28
|
+
- For new features, start with requirements clarification
|
|
29
|
+
- Update phase docs when significant changes or decisions are made
|
|
30
|
+
|
|
31
|
+
## Testing & Quality
|
|
32
|
+
- Write tests alongside implementation
|
|
33
|
+
- Follow the testing strategy defined in `docs/ai/testing/`
|
|
34
|
+
- Use `/writing-test` to generate unit and integration tests targeting 100% coverage
|
|
35
|
+
- Ensure code passes all tests before considering it complete
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
- Update phase documentation when requirements or design changes
|
|
39
|
+
- Keep inline code comments focused and relevant
|
|
40
|
+
- Document architectural decisions and their rationale
|
|
41
|
+
- Use mermaid diagrams for any architectural or data-flow visuals (update existing diagrams if needed)
|
|
42
|
+
- Record test coverage results and outstanding gaps in `docs/ai/testing/`
|
|
43
|
+
|
|
44
|
+
## Key Commands
|
|
45
|
+
When working on this project, you can run commands to:
|
|
46
|
+
- Understand project requirements and goals (`review-requirements`)
|
|
47
|
+
- Review architectural decisions (`review-design`)
|
|
48
|
+
- Plan and execute tasks (`execute-plan`)
|
|
49
|
+
- Verify implementation against design (`check-implementation`)
|
|
50
|
+
- Suggest missing tests (`suggest-tests`)
|
|
51
|
+
- Perform structured code reviews (`code-review`)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: deployment
|
|
3
|
+
title: Deployment Strategy
|
|
4
|
+
description: Define deployment process, infrastructure, and release procedures
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Deployment Strategy
|
|
8
|
+
|
|
9
|
+
## Infrastructure
|
|
10
|
+
**Where will the application run?**
|
|
11
|
+
|
|
12
|
+
- Hosting platform (AWS, GCP, Azure, etc.)
|
|
13
|
+
- Infrastructure components (servers, databases, etc.)
|
|
14
|
+
- Environment separation (dev, staging, production)
|
|
15
|
+
|
|
16
|
+
## Deployment Pipeline
|
|
17
|
+
**How do we deploy changes?**
|
|
18
|
+
|
|
19
|
+
### Build Process
|
|
20
|
+
- Build steps and commands
|
|
21
|
+
- Asset compilation/optimization
|
|
22
|
+
- Environment configuration
|
|
23
|
+
|
|
24
|
+
### CI/CD Pipeline
|
|
25
|
+
- Automated testing gates
|
|
26
|
+
- Build automation
|
|
27
|
+
- Deployment automation
|
|
28
|
+
|
|
29
|
+
## Environment Configuration
|
|
30
|
+
**What settings differ per environment?**
|
|
31
|
+
|
|
32
|
+
### Development
|
|
33
|
+
- Configuration details
|
|
34
|
+
- Local setup
|
|
35
|
+
|
|
36
|
+
### Staging
|
|
37
|
+
- Configuration details
|
|
38
|
+
- Testing environment
|
|
39
|
+
|
|
40
|
+
### Production
|
|
41
|
+
- Configuration details
|
|
42
|
+
- Monitoring setup
|
|
43
|
+
|
|
44
|
+
## Deployment Steps
|
|
45
|
+
**What's the release process?**
|
|
46
|
+
|
|
47
|
+
1. Pre-deployment checklist
|
|
48
|
+
2. Deployment execution steps
|
|
49
|
+
3. Post-deployment validation
|
|
50
|
+
4. Rollback procedure (if needed)
|
|
51
|
+
|
|
52
|
+
## Database Migrations
|
|
53
|
+
**How do we handle schema changes?**
|
|
54
|
+
|
|
55
|
+
- Migration strategy
|
|
56
|
+
- Backup procedures
|
|
57
|
+
- Rollback approach
|
|
58
|
+
|
|
59
|
+
## Secrets Management
|
|
60
|
+
**How do we handle sensitive data?**
|
|
61
|
+
|
|
62
|
+
- Environment variables
|
|
63
|
+
- Secret storage solution
|
|
64
|
+
- Key rotation strategy
|
|
65
|
+
|
|
66
|
+
## Rollback Plan
|
|
67
|
+
**What if something goes wrong?**
|
|
68
|
+
|
|
69
|
+
- Rollback triggers
|
|
70
|
+
- Rollback steps
|
|
71
|
+
- Communication plan
|
|
72
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: design
|
|
3
|
+
title: System Design & Architecture
|
|
4
|
+
description: Define the technical architecture, components, and data models
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# System Design & Architecture
|
|
8
|
+
|
|
9
|
+
## Architecture Overview
|
|
10
|
+
**What is the high-level system structure?**
|
|
11
|
+
|
|
12
|
+
- Include a mermaid diagram that captures the main components and their relationships. Example:
|
|
13
|
+
```mermaid
|
|
14
|
+
graph TD
|
|
15
|
+
Client -->|HTTPS| API
|
|
16
|
+
API --> ServiceA
|
|
17
|
+
API --> ServiceB
|
|
18
|
+
ServiceA --> Database[(DB)]
|
|
19
|
+
```
|
|
20
|
+
- Key components and their responsibilities
|
|
21
|
+
- Technology stack choices and rationale
|
|
22
|
+
|
|
23
|
+
## Data Models
|
|
24
|
+
**What data do we need to manage?**
|
|
25
|
+
|
|
26
|
+
- Core entities and their relationships
|
|
27
|
+
- Data schemas/structures
|
|
28
|
+
- Data flow between components
|
|
29
|
+
|
|
30
|
+
## API Design
|
|
31
|
+
**How do components communicate?**
|
|
32
|
+
|
|
33
|
+
- External APIs (if applicable)
|
|
34
|
+
- Internal interfaces
|
|
35
|
+
- Request/response formats
|
|
36
|
+
- Authentication/authorization approach
|
|
37
|
+
|
|
38
|
+
## Component Breakdown
|
|
39
|
+
**What are the major building blocks?**
|
|
40
|
+
|
|
41
|
+
- Frontend components (if applicable)
|
|
42
|
+
- Backend services/modules
|
|
43
|
+
- Database/storage layer
|
|
44
|
+
- Third-party integrations
|
|
45
|
+
|
|
46
|
+
## Design Decisions
|
|
47
|
+
**Why did we choose this approach?**
|
|
48
|
+
|
|
49
|
+
- Key architectural decisions and trade-offs
|
|
50
|
+
- Alternatives considered
|
|
51
|
+
- Patterns and principles applied
|
|
52
|
+
|
|
53
|
+
## Non-Functional Requirements
|
|
54
|
+
**How should the system perform?**
|
|
55
|
+
|
|
56
|
+
- Performance targets
|
|
57
|
+
- Scalability considerations
|
|
58
|
+
- Security requirements
|
|
59
|
+
- Reliability/availability needs
|
|
60
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: implementation
|
|
3
|
+
title: Implementation Guide
|
|
4
|
+
description: Technical implementation notes, patterns, and code guidelines
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implementation Guide
|
|
8
|
+
|
|
9
|
+
## Development Setup
|
|
10
|
+
**How do we get started?**
|
|
11
|
+
|
|
12
|
+
- Prerequisites and dependencies
|
|
13
|
+
- Environment setup steps
|
|
14
|
+
- Configuration needed
|
|
15
|
+
|
|
16
|
+
## Code Structure
|
|
17
|
+
**How is the code organized?**
|
|
18
|
+
|
|
19
|
+
- Directory structure
|
|
20
|
+
- Module organization
|
|
21
|
+
- Naming conventions
|
|
22
|
+
|
|
23
|
+
## Implementation Notes
|
|
24
|
+
**Key technical details to remember:**
|
|
25
|
+
|
|
26
|
+
### Core Features
|
|
27
|
+
- Feature 1: Implementation approach
|
|
28
|
+
- Feature 2: Implementation approach
|
|
29
|
+
- Feature 3: Implementation approach
|
|
30
|
+
|
|
31
|
+
### Patterns & Best Practices
|
|
32
|
+
- Design patterns being used
|
|
33
|
+
- Code style guidelines
|
|
34
|
+
- Common utilities/helpers
|
|
35
|
+
|
|
36
|
+
## Integration Points
|
|
37
|
+
**How do pieces connect?**
|
|
38
|
+
|
|
39
|
+
- API integration details
|
|
40
|
+
- Database connections
|
|
41
|
+
- Third-party service setup
|
|
42
|
+
|
|
43
|
+
## Error Handling
|
|
44
|
+
**How do we handle failures?**
|
|
45
|
+
|
|
46
|
+
- Error handling strategy
|
|
47
|
+
- Logging approach
|
|
48
|
+
- Retry/fallback mechanisms
|
|
49
|
+
|
|
50
|
+
## Performance Considerations
|
|
51
|
+
**How do we keep it fast?**
|
|
52
|
+
|
|
53
|
+
- Optimization strategies
|
|
54
|
+
- Caching approach
|
|
55
|
+
- Query optimization
|
|
56
|
+
- Resource management
|
|
57
|
+
|
|
58
|
+
## Security Notes
|
|
59
|
+
**What security measures are in place?**
|
|
60
|
+
|
|
61
|
+
- Authentication/authorization
|
|
62
|
+
- Input validation
|
|
63
|
+
- Data encryption
|
|
64
|
+
- Secrets management
|
|
65
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: monitoring
|
|
3
|
+
title: Monitoring & Observability
|
|
4
|
+
description: Define monitoring strategy, metrics, alerts, and incident response
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Monitoring & Observability
|
|
8
|
+
|
|
9
|
+
## Key Metrics
|
|
10
|
+
**What do we need to track?**
|
|
11
|
+
|
|
12
|
+
### Performance Metrics
|
|
13
|
+
- Response time/latency
|
|
14
|
+
- Throughput/requests per second
|
|
15
|
+
- Resource utilization (CPU, memory, disk)
|
|
16
|
+
|
|
17
|
+
### Business Metrics
|
|
18
|
+
- User engagement metrics
|
|
19
|
+
- Conversion/success rates
|
|
20
|
+
- Feature usage
|
|
21
|
+
|
|
22
|
+
### Error Metrics
|
|
23
|
+
- Error rates by type
|
|
24
|
+
- Failed requests
|
|
25
|
+
- Exception tracking
|
|
26
|
+
|
|
27
|
+
## Monitoring Tools
|
|
28
|
+
**What tools are we using?**
|
|
29
|
+
|
|
30
|
+
- Application monitoring (APM)
|
|
31
|
+
- Infrastructure monitoring
|
|
32
|
+
- Log aggregation
|
|
33
|
+
- User analytics
|
|
34
|
+
|
|
35
|
+
## Logging Strategy
|
|
36
|
+
**What do we log and how?**
|
|
37
|
+
|
|
38
|
+
- Log levels and categories
|
|
39
|
+
- Structured logging format
|
|
40
|
+
- Log retention policy
|
|
41
|
+
- Sensitive data handling
|
|
42
|
+
|
|
43
|
+
## Alerts & Notifications
|
|
44
|
+
**When and how do we get notified?**
|
|
45
|
+
|
|
46
|
+
### Critical Alerts
|
|
47
|
+
- Alert 1: [Condition] → [Action]
|
|
48
|
+
- Alert 2: [Condition] → [Action]
|
|
49
|
+
|
|
50
|
+
### Warning Alerts
|
|
51
|
+
- Alert 1: [Condition] → [Action]
|
|
52
|
+
- Alert 2: [Condition] → [Action]
|
|
53
|
+
|
|
54
|
+
## Dashboards
|
|
55
|
+
**What do we visualize?**
|
|
56
|
+
|
|
57
|
+
- System health dashboard
|
|
58
|
+
- Business metrics dashboard
|
|
59
|
+
- Custom views per team/role
|
|
60
|
+
|
|
61
|
+
## Incident Response
|
|
62
|
+
**How do we handle issues?**
|
|
63
|
+
|
|
64
|
+
### On-Call Rotation
|
|
65
|
+
- Schedule and contacts
|
|
66
|
+
- Escalation path
|
|
67
|
+
|
|
68
|
+
### Incident Process
|
|
69
|
+
1. Detection and triage
|
|
70
|
+
2. Investigation and diagnosis
|
|
71
|
+
3. Resolution and mitigation
|
|
72
|
+
4. Post-mortem and learning
|
|
73
|
+
|
|
74
|
+
## Health Checks
|
|
75
|
+
**How do we verify system health?**
|
|
76
|
+
|
|
77
|
+
- Endpoint health checks
|
|
78
|
+
- Dependency checks
|
|
79
|
+
- Automated smoke tests
|
|
80
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: planning
|
|
3
|
+
title: Project Planning & Task Breakdown
|
|
4
|
+
description: Break down work into actionable tasks and estimate timeline
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Project Planning & Task Breakdown
|
|
8
|
+
|
|
9
|
+
## Milestones
|
|
10
|
+
**What are the major checkpoints?**
|
|
11
|
+
|
|
12
|
+
- [ ] Milestone 1: [Description]
|
|
13
|
+
- [ ] Milestone 2: [Description]
|
|
14
|
+
- [ ] Milestone 3: [Description]
|
|
15
|
+
|
|
16
|
+
## Task Breakdown
|
|
17
|
+
**What specific work needs to be done?**
|
|
18
|
+
|
|
19
|
+
### Phase 1: Foundation
|
|
20
|
+
- [ ] Task 1.1: [Description]
|
|
21
|
+
- [ ] Task 1.2: [Description]
|
|
22
|
+
|
|
23
|
+
### Phase 2: Core Features
|
|
24
|
+
- [ ] Task 2.1: [Description]
|
|
25
|
+
- [ ] Task 2.2: [Description]
|
|
26
|
+
|
|
27
|
+
### Phase 3: Integration & Polish
|
|
28
|
+
- [ ] Task 3.1: [Description]
|
|
29
|
+
- [ ] Task 3.2: [Description]
|
|
30
|
+
|
|
31
|
+
## Dependencies
|
|
32
|
+
**What needs to happen in what order?**
|
|
33
|
+
|
|
34
|
+
- Task dependencies and blockers
|
|
35
|
+
- External dependencies (APIs, services, etc.)
|
|
36
|
+
- Team/resource dependencies
|
|
37
|
+
|
|
38
|
+
## Timeline & Estimates
|
|
39
|
+
**When will things be done?**
|
|
40
|
+
|
|
41
|
+
- Estimated effort per task/phase
|
|
42
|
+
- Target dates for milestones
|
|
43
|
+
- Buffer for unknowns
|
|
44
|
+
|
|
45
|
+
## Risks & Mitigation
|
|
46
|
+
**What could go wrong?**
|
|
47
|
+
|
|
48
|
+
- Technical risks
|
|
49
|
+
- Resource risks
|
|
50
|
+
- Dependency risks
|
|
51
|
+
- Mitigation strategies
|
|
52
|
+
|
|
53
|
+
## Resources Needed
|
|
54
|
+
**What do we need to succeed?**
|
|
55
|
+
|
|
56
|
+
- Team members and roles
|
|
57
|
+
- Tools and services
|
|
58
|
+
- Infrastructure
|
|
59
|
+
- Documentation/knowledge
|
|
60
|
+
|