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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: requirements
|
|
3
|
+
title: Requirements & Problem Understanding
|
|
4
|
+
description: Clarify the problem space, gather requirements, and define success criteria
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Requirements & Problem Understanding
|
|
8
|
+
|
|
9
|
+
## Problem Statement
|
|
10
|
+
**What problem are we solving?**
|
|
11
|
+
|
|
12
|
+
- Describe the core problem or pain point
|
|
13
|
+
- Who is affected by this problem?
|
|
14
|
+
- What is the current situation/workaround?
|
|
15
|
+
|
|
16
|
+
## Goals & Objectives
|
|
17
|
+
**What do we want to achieve?**
|
|
18
|
+
|
|
19
|
+
- Primary goals
|
|
20
|
+
- Secondary goals
|
|
21
|
+
- Non-goals (what's explicitly out of scope)
|
|
22
|
+
|
|
23
|
+
## User Stories & Use Cases
|
|
24
|
+
**How will users interact with the solution?**
|
|
25
|
+
|
|
26
|
+
- As a [user type], I want to [action] so that [benefit]
|
|
27
|
+
- Key workflows and scenarios
|
|
28
|
+
- Edge cases to consider
|
|
29
|
+
|
|
30
|
+
## Success Criteria
|
|
31
|
+
**How will we know when we're done?**
|
|
32
|
+
|
|
33
|
+
- Measurable outcomes
|
|
34
|
+
- Acceptance criteria
|
|
35
|
+
- Performance benchmarks (if applicable)
|
|
36
|
+
|
|
37
|
+
## Constraints & Assumptions
|
|
38
|
+
**What limitations do we need to work within?**
|
|
39
|
+
|
|
40
|
+
- Technical constraints
|
|
41
|
+
- Business constraints
|
|
42
|
+
- Time/budget constraints
|
|
43
|
+
- Assumptions we're making
|
|
44
|
+
|
|
45
|
+
## Questions & Open Items
|
|
46
|
+
**What do we still need to clarify?**
|
|
47
|
+
|
|
48
|
+
- Unresolved questions
|
|
49
|
+
- Items requiring stakeholder input
|
|
50
|
+
- Research needed
|
|
51
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: testing
|
|
3
|
+
title: Testing Strategy
|
|
4
|
+
description: Define testing approach, test cases, and quality assurance
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Testing Strategy
|
|
8
|
+
|
|
9
|
+
## Test Coverage Goals
|
|
10
|
+
**What level of testing do we aim for?**
|
|
11
|
+
|
|
12
|
+
- Unit test coverage target (default: 100% of new/changed code)
|
|
13
|
+
- Integration test scope (critical paths + error handling)
|
|
14
|
+
- End-to-end test scenarios (key user journeys)
|
|
15
|
+
- Alignment with requirements/design acceptance criteria
|
|
16
|
+
|
|
17
|
+
## Unit Tests
|
|
18
|
+
**What individual components need testing?**
|
|
19
|
+
|
|
20
|
+
### Component/Module 1
|
|
21
|
+
- [ ] Test case 1: [Description] (covers scenario / branch)
|
|
22
|
+
- [ ] Test case 2: [Description] (covers edge case / error handling)
|
|
23
|
+
- [ ] Additional coverage: [Description]
|
|
24
|
+
|
|
25
|
+
### Component/Module 2
|
|
26
|
+
- [ ] Test case 1: [Description]
|
|
27
|
+
- [ ] Test case 2: [Description]
|
|
28
|
+
- [ ] Additional coverage: [Description]
|
|
29
|
+
|
|
30
|
+
## Integration Tests
|
|
31
|
+
**How do we test component interactions?**
|
|
32
|
+
|
|
33
|
+
- [ ] Integration scenario 1
|
|
34
|
+
- [ ] Integration scenario 2
|
|
35
|
+
- [ ] API endpoint tests
|
|
36
|
+
- [ ] Integration scenario 3 (failure mode / rollback)
|
|
37
|
+
|
|
38
|
+
## End-to-End Tests
|
|
39
|
+
**What user flows need validation?**
|
|
40
|
+
|
|
41
|
+
- [ ] User flow 1: [Description]
|
|
42
|
+
- [ ] User flow 2: [Description]
|
|
43
|
+
- [ ] Critical path testing
|
|
44
|
+
- [ ] Regression of adjacent features
|
|
45
|
+
|
|
46
|
+
## Test Data
|
|
47
|
+
**What data do we use for testing?**
|
|
48
|
+
|
|
49
|
+
- Test fixtures and mocks
|
|
50
|
+
- Seed data requirements
|
|
51
|
+
- Test database setup
|
|
52
|
+
|
|
53
|
+
## Test Reporting & Coverage
|
|
54
|
+
**How do we verify and communicate test results?**
|
|
55
|
+
|
|
56
|
+
- Coverage commands and thresholds (`npm run test -- --coverage`)
|
|
57
|
+
- Coverage gaps (files/functions below 100% and rationale)
|
|
58
|
+
- Links to test reports or dashboards
|
|
59
|
+
- Manual testing outcomes and sign-off
|
|
60
|
+
|
|
61
|
+
## Manual Testing
|
|
62
|
+
**What requires human validation?**
|
|
63
|
+
|
|
64
|
+
- UI/UX testing checklist (include accessibility)
|
|
65
|
+
- Browser/device compatibility
|
|
66
|
+
- Smoke tests after deployment
|
|
67
|
+
|
|
68
|
+
## Performance Testing
|
|
69
|
+
**How do we validate performance?**
|
|
70
|
+
|
|
71
|
+
- Load testing scenarios
|
|
72
|
+
- Stress testing approach
|
|
73
|
+
- Performance benchmarks
|
|
74
|
+
|
|
75
|
+
## Bug Tracking
|
|
76
|
+
**How do we manage issues?**
|
|
77
|
+
|
|
78
|
+
- Issue tracking process
|
|
79
|
+
- Bug severity levels
|
|
80
|
+
- Regression testing strategy
|
|
81
|
+
|
package/dist/types.d.ts
CHANGED
|
@@ -7,8 +7,9 @@ export interface EnvironmentDefinition {
|
|
|
7
7
|
description?: string;
|
|
8
8
|
isCustomCommandPath?: boolean;
|
|
9
9
|
customCommandExtension?: string;
|
|
10
|
+
globalCommandPath?: string;
|
|
10
11
|
}
|
|
11
|
-
export type EnvironmentCode = 'cursor' | 'claude' | 'github' | 'gemini' | 'codex' | 'windsurf' | 'kilocode' | 'amp' | 'opencode' | 'roo';
|
|
12
|
+
export type EnvironmentCode = 'cursor' | 'claude' | 'github' | 'gemini' | 'codex' | 'windsurf' | 'kilocode' | 'amp' | 'opencode' | 'roo' | 'antigravity';
|
|
12
13
|
export interface DevKitConfig {
|
|
13
14
|
version: string;
|
|
14
15
|
environments: EnvironmentCode[];
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GACb,cAAc,GACd,QAAQ,GACR,UAAU,GACV,gBAAgB,GAChB,SAAS,GACT,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GACb,cAAc,GACd,QAAQ,GACR,UAAU,GACV,gBAAgB,GAChB,SAAS,GACT,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,GAAG,KAAK,GAAG,aAAa,CAAC;AAEzJ,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,iBAAiB,EAAE,KAAK,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,EAQnC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAQrD,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAoCa,QAAA,gBAAgB,GAAY;IACvC,cAAc;IACd,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,SAAS;IACT,YAAY;IACZ,YAAY;CACb,CAAC;AAEW,QAAA,mBAAmB,GAA0B;IACxD,YAAY,EAAE,sCAAsC;IACpD,MAAM,EAAE,8BAA8B;IACtC,QAAQ,EAAE,mCAAmC;IAC7C,cAAc,EAAE,sBAAsB;IACtC,OAAO,EAAE,kBAAkB;IAC3B,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,4BAA4B;CACzC,CAAC"}
|
package/dist/util/env.d.ts
CHANGED
|
@@ -8,4 +8,6 @@ export declare function getEnvironmentsByCodes(codes: EnvironmentCode[]): Enviro
|
|
|
8
8
|
export declare function isValidEnvironmentCode(value: string): value is EnvironmentCode;
|
|
9
9
|
export declare function getEnvironmentDisplayName(envCode: EnvironmentCode): string;
|
|
10
10
|
export declare function validateEnvironmentCodes(envCodes: string[]): EnvironmentCode[];
|
|
11
|
+
export declare function getGlobalCapableEnvironments(): EnvironmentDefinition[];
|
|
12
|
+
export declare function hasGlobalSupport(envCode: EnvironmentCode): boolean;
|
|
11
13
|
//# sourceMappingURL=env.d.ts.map
|
package/dist/util/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/util/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAErE,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,eAAe,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/util/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAErE,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAuElF,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAAe,EAA8D,CAAC;AAElH,wBAAgB,kBAAkB,IAAI,qBAAqB,EAAE,CAE5D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,qBAAqB,GAAG,SAAS,CAE1F;AAED,wBAAgB,sBAAsB,IAAI,eAAe,EAAE,CAE1D;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,qBAAqB,EAAE,CAExF;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,eAAe,CAE9E;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAG1E;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAiB9E;AAED,wBAAgB,4BAA4B,IAAI,qBAAqB,EAAE,CAEtE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAGlE"}
|
package/dist/util/env.js
CHANGED
|
@@ -8,6 +8,8 @@ exports.getEnvironmentsByCodes = getEnvironmentsByCodes;
|
|
|
8
8
|
exports.isValidEnvironmentCode = isValidEnvironmentCode;
|
|
9
9
|
exports.getEnvironmentDisplayName = getEnvironmentDisplayName;
|
|
10
10
|
exports.validateEnvironmentCodes = validateEnvironmentCodes;
|
|
11
|
+
exports.getGlobalCapableEnvironments = getGlobalCapableEnvironments;
|
|
12
|
+
exports.hasGlobalSupport = hasGlobalSupport;
|
|
11
13
|
exports.ENVIRONMENT_DEFINITIONS = {
|
|
12
14
|
cursor: {
|
|
13
15
|
code: 'cursor',
|
|
@@ -31,7 +33,7 @@ exports.ENVIRONMENT_DEFINITIONS = {
|
|
|
31
33
|
gemini: {
|
|
32
34
|
code: 'gemini',
|
|
33
35
|
name: 'Google Gemini',
|
|
34
|
-
contextFileName: '
|
|
36
|
+
contextFileName: 'GEMINI.md',
|
|
35
37
|
commandPath: '.gemini/commands',
|
|
36
38
|
isCustomCommandPath: true,
|
|
37
39
|
},
|
|
@@ -40,6 +42,7 @@ exports.ENVIRONMENT_DEFINITIONS = {
|
|
|
40
42
|
name: 'OpenAI Codex',
|
|
41
43
|
contextFileName: 'AGENTS.md',
|
|
42
44
|
commandPath: '.codex/commands',
|
|
45
|
+
globalCommandPath: '.codex/prompts',
|
|
43
46
|
},
|
|
44
47
|
windsurf: {
|
|
45
48
|
code: 'windsurf',
|
|
@@ -70,6 +73,13 @@ exports.ENVIRONMENT_DEFINITIONS = {
|
|
|
70
73
|
name: 'Roo Code',
|
|
71
74
|
contextFileName: 'AGENTS.md',
|
|
72
75
|
commandPath: '.roo/commands',
|
|
76
|
+
},
|
|
77
|
+
antigravity: {
|
|
78
|
+
code: 'antigravity',
|
|
79
|
+
name: 'Antigravity',
|
|
80
|
+
contextFileName: 'AGENTS.md',
|
|
81
|
+
commandPath: '.agent/workflows',
|
|
82
|
+
globalCommandPath: '.gemini/antigravity/global_workflows',
|
|
73
83
|
}
|
|
74
84
|
};
|
|
75
85
|
exports.ALL_ENVIRONMENT_CODES = Object.keys(exports.ENVIRONMENT_DEFINITIONS);
|
|
@@ -108,4 +118,11 @@ function validateEnvironmentCodes(envCodes) {
|
|
|
108
118
|
}
|
|
109
119
|
return validCodes;
|
|
110
120
|
}
|
|
121
|
+
function getGlobalCapableEnvironments() {
|
|
122
|
+
return getAllEnvironments().filter(env => env.globalCommandPath !== undefined);
|
|
123
|
+
}
|
|
124
|
+
function hasGlobalSupport(envCode) {
|
|
125
|
+
const env = getEnvironment(envCode);
|
|
126
|
+
return env !== undefined && env.globalCommandPath !== undefined;
|
|
127
|
+
}
|
|
111
128
|
//# sourceMappingURL=env.js.map
|
package/dist/util/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/util/env.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/util/env.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-devkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "A CLI toolkit for AI-assisted software development with phase templates and environment setup",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"bin": {
|
|
7
8
|
"ai-devkit": "dist/cli.js"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
|
-
"build": "tsc",
|
|
11
|
+
"build": "tsc && cp -R templates dist/templates",
|
|
11
12
|
"dev": "ts-node src/cli.ts",
|
|
12
13
|
"lint": "eslint src --ext .ts",
|
|
13
14
|
"test": "jest",
|
|
@@ -26,9 +27,11 @@
|
|
|
26
27
|
"author": "",
|
|
27
28
|
"license": "MIT",
|
|
28
29
|
"dependencies": {
|
|
30
|
+
"@ai-devkit/memory": "^0.2.0",
|
|
29
31
|
"chalk": "^4.1.2",
|
|
30
32
|
"commander": "^11.1.0",
|
|
31
33
|
"fs-extra": "^11.2.0",
|
|
34
|
+
"gray-matter": "^4.0.3",
|
|
32
35
|
"inquirer": "^8.2.6",
|
|
33
36
|
"yaml": "^2.3.4"
|
|
34
37
|
},
|
package/project.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cli",
|
|
3
|
+
"root": "packages/cli",
|
|
4
|
+
"sourceRoot": "packages/cli/src",
|
|
5
|
+
"projectType": "library",
|
|
6
|
+
"targets": {
|
|
7
|
+
"build": {
|
|
8
|
+
"executor": "nx:run-commands",
|
|
9
|
+
"options": {
|
|
10
|
+
"command": "npm run build",
|
|
11
|
+
"cwd": "packages/cli"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"test": {
|
|
15
|
+
"executor": "nx:run-commands",
|
|
16
|
+
"options": {
|
|
17
|
+
"command": "npm run test",
|
|
18
|
+
"cwd": "packages/cli"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"lint": {
|
|
22
|
+
"executor": "nx:run-commands",
|
|
23
|
+
"options": {
|
|
24
|
+
"command": "npm run lint",
|
|
25
|
+
"cwd": "packages/cli"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Capture structured knowledge about a code entry point and save it to the knowledge docs.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Knowledge Capture Assistant
|
|
2
6
|
|
|
3
7
|
Guide me through creating a structured understanding of a code entry point and saving it to the knowledge docs.
|
|
4
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
|
+
|
|
5
14
|
## Step 1: Gather Context
|
|
6
15
|
- Entry point (file, folder, function, API)
|
|
7
16
|
- Why this entry point matters (feature, bug, investigation)
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Compare implementation with design and requirements docs to ensure alignment.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
Compare the current implementation with the design in docs/ai/design/ and requirements in docs/ai/requirements/. Please follow this structured review:
|
|
2
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
|
+
|
|
3
12
|
1. Ask me for:
|
|
4
13
|
- Feature/branch description
|
|
5
14
|
- List of modified files
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Perform a local code review before pushing changes, ensuring alignment with design docs and best practices.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Local Code Review Assistant
|
|
2
6
|
|
|
3
7
|
You are helping me perform a local code review **before** I push changes. Please follow this structured workflow.
|
|
4
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
|
+
|
|
5
14
|
## Step 1: Gather Context
|
|
6
15
|
Ask me for:
|
|
7
16
|
- Brief feature/branch description
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Guide me through debugging a code issue by clarifying expectations, identifying gaps, and agreeing on a fix plan before changing code.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Local Debugging Assistant
|
|
2
6
|
|
|
3
7
|
Help me debug an issue by clarifying expectations, identifying gaps, and agreeing on a fix plan before changing code.
|
|
4
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
|
+
|
|
5
14
|
## Step 1: Gather Context
|
|
6
15
|
Ask me for:
|
|
7
16
|
- Brief issue description (what is happening?)
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute a feature plan interactively, guiding me through each task while referencing relevant docs and updating status.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Feature Plan Execution Assistant
|
|
2
6
|
|
|
3
7
|
Help me work through a feature plan one task at a time.
|
|
4
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
|
+
|
|
5
14
|
## Step 1: Gather Context
|
|
6
15
|
Ask me for:
|
|
7
16
|
- Feature name (kebab-case, e.g., `user-authentication`)
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Add new feature/requirement documentation and guide me through the development workflow from requirements to testing.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
I want to add a new feature/requirement. Please guide me through the complete development workflow:
|
|
2
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
|
+
|
|
3
12
|
## Step 1: Capture Requirement
|
|
4
13
|
First, ask me:
|
|
5
14
|
- What is the feature name? (e.g., "user-authentication", "payment-integration")
|
|
@@ -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.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review the design documentation for a feature to ensure completeness and accuracy.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
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
|
+
|
|
2
12
|
- Architecture overview (ensure mermaid diagram is present and accurate)
|
|
3
13
|
- Key components and their responsibilities
|
|
4
14
|
- Technology choices and rationale
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review the requirements documentation for a feature to ensure completeness and alignment with project standards.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
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
|
+
|
|
2
12
|
- Core problem statement and affected users
|
|
3
13
|
- Goals, non-goals, and success criteria
|
|
4
14
|
- Primary user stories & critical flows
|
|
@@ -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.
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Assist in updating planning documentation to reflect current implementation progress for a feature.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Planning Update Assistant
|
|
2
6
|
|
|
3
7
|
Please help me reconcile the current implementation progress with our planning documentation.
|
|
4
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
|
+
|
|
5
14
|
## Step 1: Gather Context
|
|
6
15
|
Ask me for:
|
|
7
16
|
- Feature/branch name and brief status
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Add tests for a new feature.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
Review `docs/ai/testing/feature-{name}.md` and ensure it mirrors the base template before writing tests.
|
|
2
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
|
+
|
|
3
12
|
## Step 1: Gather Context
|
|
4
13
|
Ask me for:
|
|
5
14
|
- Feature name and branch
|