@jadeit/forge-ai 0.0.0 → 1.4.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/agents/build-agent.md +206 -0
- package/agents/deploy-agent.md +256 -0
- package/agents/design-agent.md +261 -0
- package/agents/feature-dev/approach.md +169 -0
- package/agents/feature-dev/clarify.md +131 -0
- package/agents/feature-dev/discover.md +113 -0
- package/agents/feature-dev/explore.md +124 -0
- package/agents/feature-dev/implement.md +211 -0
- package/agents/feature-dev/review.md +208 -0
- package/agents/feature-dev/summarise.md +199 -0
- package/agents/feature-dev/validate.md +211 -0
- package/agents/forge-orchestrator.md +188 -0
- package/agents/maintain-agent.md +251 -0
- package/agents/plan-agent.md +192 -0
- package/agents/test-agent.md +215 -0
- package/commands/forge-1-plan.md +48 -0
- package/commands/forge-2-design.md +51 -0
- package/commands/forge-3-build-1-discover.md +34 -0
- package/commands/forge-3-build-2-explore.md +30 -0
- package/commands/forge-3-build-3-clarify.md +39 -0
- package/commands/forge-3-build-4-approach.md +38 -0
- package/commands/forge-3-build-5-implement.md +38 -0
- package/commands/forge-3-build-6-review.md +50 -0
- package/commands/forge-3-build-7-validate.md +49 -0
- package/commands/forge-3-build-8-summarise.md +49 -0
- package/commands/forge-3-build.md +54 -0
- package/commands/forge-4-test.md +45 -0
- package/commands/forge-5-deploy.md +50 -0
- package/commands/forge-6-maintain.md +66 -0
- package/commands/forge-init.md +111 -0
- package/commands/forge-status.md +94 -0
- package/commands/forge.md +77 -0
- package/dist/agents/build-agent.md +29 -44
- package/dist/agents/design-agent.md +41 -1
- package/dist/agents/feature-dev/implement.md +11 -0
- package/dist/agents/feature-dev/review.md +3 -0
- package/dist/agents/feature-dev/summarise.md +12 -0
- package/dist/agents/plan-agent.md +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +171 -2
- package/dist/index.js.map +1 -1
- package/dist/skills/forge-build/SKILL.md +48 -0
- package/dist/skills/forge-build-approach/SKILL.md +39 -0
- package/dist/skills/forge-build-clarify/SKILL.md +40 -0
- package/dist/skills/forge-build-discover/SKILL.md +35 -0
- package/dist/skills/forge-build-explore/SKILL.md +31 -0
- package/dist/skills/forge-build-implement/SKILL.md +39 -0
- package/dist/skills/forge-build-review/SKILL.md +51 -0
- package/dist/skills/forge-build-summarise/SKILL.md +51 -0
- package/dist/skills/forge-build-validate/SKILL.md +50 -0
- package/dist/skills/forge-deploy/SKILL.md +52 -0
- package/dist/skills/forge-design/SKILL.md +53 -0
- package/dist/skills/forge-init/SKILL.md +83 -0
- package/dist/skills/forge-maintain/SKILL.md +53 -0
- package/dist/skills/forge-plan/SKILL.md +50 -0
- package/dist/skills/forge-status/SKILL.md +59 -0
- package/dist/skills/forge-test/SKILL.md +47 -0
- package/package.json +7 -3
- package/skills/forge-build/SKILL.md +48 -0
- package/skills/forge-build-approach/SKILL.md +39 -0
- package/skills/forge-build-clarify/SKILL.md +40 -0
- package/skills/forge-build-discover/SKILL.md +35 -0
- package/skills/forge-build-explore/SKILL.md +31 -0
- package/skills/forge-build-implement/SKILL.md +39 -0
- package/skills/forge-build-review/SKILL.md +51 -0
- package/skills/forge-build-summarise/SKILL.md +51 -0
- package/skills/forge-build-validate/SKILL.md +50 -0
- package/skills/forge-context-loader/SKILL.md +99 -0
- package/skills/forge-deploy/SKILL.md +52 -0
- package/skills/forge-design/SKILL.md +53 -0
- package/skills/forge-init/SKILL.md +83 -0
- package/skills/forge-maintain/SKILL.md +53 -0
- package/skills/forge-plan/SKILL.md +50 -0
- package/skills/forge-quality-checker/SKILL.md +227 -0
- package/skills/forge-state-manager/SKILL.md +235 -0
- package/skills/forge-status/SKILL.md +59 -0
- package/skills/forge-template-loader/SKILL.md +162 -0
- package/skills/forge-test/SKILL.md +47 -0
- package/templates/defects/DEFECT_TEMPLATE.md +96 -0
- package/templates/design/design-decisions.md +64 -0
- package/templates/design/task-list.md +56 -0
- package/templates/design/tasks/TASK_TEMPLATE.md +87 -0
- package/templates/planning/implementation-plan.md +59 -0
- package/templates/planning/project-scope.md +53 -0
- package/templates/planning/technology-and-architecture.md +80 -0
- package/templates/planning/user-stories.md +48 -0
- package/templates/testing/uat-results.md +68 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-implement
|
|
3
|
+
description: Feature Dev sub-phase 5 - Build the feature
|
|
4
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
skill:
|
|
7
|
+
"forge-*": allow
|
|
8
|
+
"documents-*": allow
|
|
9
|
+
"code-*": allow
|
|
10
|
+
"*": deny
|
|
11
|
+
tools:
|
|
12
|
+
read: true
|
|
13
|
+
write: true
|
|
14
|
+
edit: true
|
|
15
|
+
bash: true
|
|
16
|
+
glob: true
|
|
17
|
+
grep: true
|
|
18
|
+
websearch: true
|
|
19
|
+
webfetch: true
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Feature Dev: 5. Implement
|
|
23
|
+
|
|
24
|
+
Build the feature following the validated approach.
|
|
25
|
+
|
|
26
|
+
## Pre-flight Check
|
|
27
|
+
|
|
28
|
+
Verify you are working in the correct branch and worktree before writing any code:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git branch --show-current # must match feature/{task-slug}
|
|
32
|
+
pwd # must be inside .worktrees/{task-slug}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If not, stop and alert the build agent to set up the worktree first.
|
|
36
|
+
|
|
37
|
+
## Load Skills
|
|
38
|
+
|
|
39
|
+
Use these skills:
|
|
40
|
+
- `@forge-context-loader` - Load context for implementation
|
|
41
|
+
- `@forge-quality-checker` - For quality gate checks
|
|
42
|
+
|
|
43
|
+
## Implementation Principles
|
|
44
|
+
|
|
45
|
+
### Core Principles
|
|
46
|
+
|
|
47
|
+
1. **Step by Step** - Implement incrementally, don't skip steps
|
|
48
|
+
2. **SOLID Principles** - Apply throughout
|
|
49
|
+
3. **DRY Code** - Don't repeat yourself
|
|
50
|
+
4. **Clear Naming** - Variables, functions, files should be self-explanatory
|
|
51
|
+
5. **Error Handling** - Appropriate for context
|
|
52
|
+
|
|
53
|
+
### Code Standards
|
|
54
|
+
|
|
55
|
+
- Linting must pass (run `npm run lint` or equivalent)
|
|
56
|
+
- Type checking must pass (run `npm run typecheck` or equivalent)
|
|
57
|
+
- Follow existing patterns in codebase
|
|
58
|
+
- Add inline comments for non-obvious logic
|
|
59
|
+
|
|
60
|
+
## Implementation Order
|
|
61
|
+
|
|
62
|
+
Follow the approach plan. Typical order:
|
|
63
|
+
|
|
64
|
+
### 1. Foundation
|
|
65
|
+
- Type definitions / interfaces
|
|
66
|
+
- Configuration / constants
|
|
67
|
+
- Base classes / utilities
|
|
68
|
+
|
|
69
|
+
### 2. Core Domain/Business Logic
|
|
70
|
+
- Domain models
|
|
71
|
+
- Business rules
|
|
72
|
+
- Validation
|
|
73
|
+
|
|
74
|
+
### 3. Data Layer (if applicable)
|
|
75
|
+
- Database schema changes
|
|
76
|
+
- Repository patterns
|
|
77
|
+
- Data access objects
|
|
78
|
+
|
|
79
|
+
### 4. API Layer (if applicable)
|
|
80
|
+
- Route handlers
|
|
81
|
+
- Request/response DTOs
|
|
82
|
+
- API documentation
|
|
83
|
+
|
|
84
|
+
### 5. Integration Points
|
|
85
|
+
- External service clients
|
|
86
|
+
- Event handlers
|
|
87
|
+
- Middleware
|
|
88
|
+
|
|
89
|
+
### 6. Tests
|
|
90
|
+
- Unit tests
|
|
91
|
+
- Integration tests
|
|
92
|
+
|
|
93
|
+
## Implementation Checklist
|
|
94
|
+
|
|
95
|
+
- [ ] Types/interfaces defined
|
|
96
|
+
- [ ] Core logic implemented
|
|
97
|
+
- [ ] Error handling added
|
|
98
|
+
- [ ] Input validation added
|
|
99
|
+
- [ ] Tests written
|
|
100
|
+
- [ ] Lint passes
|
|
101
|
+
- [ ] Type check passes
|
|
102
|
+
|
|
103
|
+
## File Naming Conventions
|
|
104
|
+
|
|
105
|
+
Detect language from project and follow appropriate conventions:
|
|
106
|
+
|
|
107
|
+
| Type | Python | TypeScript | Go |
|
|
108
|
+
|------|--------|------------|-----|
|
|
109
|
+
| Components/Modules | `snake_case.py` | `PascalCase.tsx` | `snake_case.go` |
|
|
110
|
+
| Utilities | `snake_case.py` | `camelCase.ts` | `snake_case.go` |
|
|
111
|
+
| Constants | `UPPER_SNAKE.py` | `UPPER_SNAKE.ts` | `UpperSnake.go` |
|
|
112
|
+
| Types | `snake_case.py` | `PascalCase.ts` | - |
|
|
113
|
+
| Tests | `test_*.py` | `*.test.ts` | `*_test.go` |
|
|
114
|
+
|
|
115
|
+
## Error Handling Pattern
|
|
116
|
+
|
|
117
|
+
Follow language-specific patterns:
|
|
118
|
+
|
|
119
|
+
### Python
|
|
120
|
+
```python
|
|
121
|
+
try:
|
|
122
|
+
result = perform_operation()
|
|
123
|
+
return result
|
|
124
|
+
except KnownError as e:
|
|
125
|
+
raise UserFriendlyError('Message', cause=e)
|
|
126
|
+
except Exception:
|
|
127
|
+
logger.error('Unexpected error', extra={'context': context})
|
|
128
|
+
raise
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### TypeScript
|
|
132
|
+
```typescript
|
|
133
|
+
try {
|
|
134
|
+
const result = await performOperation();
|
|
135
|
+
return result;
|
|
136
|
+
} catch (error) {
|
|
137
|
+
if (error instanceof KnownError) {
|
|
138
|
+
throw new UserFriendlyError('Message', { cause: error });
|
|
139
|
+
}
|
|
140
|
+
logger.error('Unexpected error', { error, context });
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Go
|
|
146
|
+
```go
|
|
147
|
+
result, err := performOperation()
|
|
148
|
+
if err != nil {
|
|
149
|
+
if errors.Is(err, knownError) {
|
|
150
|
+
return nil, fmt.Errorf("user friendly: %w", err)
|
|
151
|
+
}
|
|
152
|
+
logger.Error("Unexpected error", "context", context)
|
|
153
|
+
return nil, err
|
|
154
|
+
}
|
|
155
|
+
return result, nil
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Output
|
|
159
|
+
|
|
160
|
+
### Update Task Document
|
|
161
|
+
|
|
162
|
+
Add "Implementation" section:
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
## Implementation
|
|
166
|
+
|
|
167
|
+
### Changes Made
|
|
168
|
+
| File | Change | Lines |
|
|
169
|
+
|------|--------|-------|
|
|
170
|
+
| src/auth.ts | Created | +120 |
|
|
171
|
+
| src/auth.test.ts | Created | +85 |
|
|
172
|
+
|
|
173
|
+
### Implementation Notes
|
|
174
|
+
- [Any notes about the implementation]
|
|
175
|
+
|
|
176
|
+
### Decisions Made During Implementation
|
|
177
|
+
- [If different from approach, document why]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Update Frontmatter
|
|
181
|
+
|
|
182
|
+
```yaml
|
|
183
|
+
status: in-progress:implement
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Track Progress
|
|
187
|
+
|
|
188
|
+
Keep track of what's been implemented vs what's left:
|
|
189
|
+
```markdown
|
|
190
|
+
### Progress
|
|
191
|
+
- [x] Types defined
|
|
192
|
+
- [x] Core logic
|
|
193
|
+
- [ ] API endpoints
|
|
194
|
+
- [ ] Tests
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Next Steps
|
|
198
|
+
|
|
199
|
+
Proceed to `@forge-review` when:
|
|
200
|
+
- Implementation is complete
|
|
201
|
+
- All approach steps followed
|
|
202
|
+
- Basic self-checks pass (lint, type check)
|
|
203
|
+
|
|
204
|
+
## Rework Handling
|
|
205
|
+
|
|
206
|
+
If `@forge-review` finds issues:
|
|
207
|
+
1. Fix the issues in this phase
|
|
208
|
+
2. Re-run quality checks
|
|
209
|
+
3. Proceed back to review
|
|
210
|
+
|
|
211
|
+
Use `@forge-quality-checker` to run automated checks.
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-review
|
|
3
|
+
description: Feature Dev sub-phase 6 - Automated checks and AI code review
|
|
4
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
skill:
|
|
7
|
+
"forge-*": allow
|
|
8
|
+
"documents-*": allow
|
|
9
|
+
"code-*": allow
|
|
10
|
+
"*": deny
|
|
11
|
+
tools:
|
|
12
|
+
read: true
|
|
13
|
+
write: true
|
|
14
|
+
edit: true
|
|
15
|
+
bash: true
|
|
16
|
+
glob: true
|
|
17
|
+
grep: true
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Feature Dev: 6. Review
|
|
21
|
+
|
|
22
|
+
Quality review using automated checks followed by AI code review.
|
|
23
|
+
|
|
24
|
+
## Load Skills
|
|
25
|
+
|
|
26
|
+
Use these skills:
|
|
27
|
+
- `@forge-quality-checker` - Run automated quality gates
|
|
28
|
+
- `@forge-state-manager` - Update task status
|
|
29
|
+
|
|
30
|
+
## Review Sequence
|
|
31
|
+
|
|
32
|
+
Run in this order:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
1. Automated Checks (fast failures)
|
|
36
|
+
├── Lint Check
|
|
37
|
+
├── Type Check
|
|
38
|
+
└── Security Audit
|
|
39
|
+
|
|
40
|
+
2. Tests
|
|
41
|
+
├── Unit Tests
|
|
42
|
+
└── Integration Tests
|
|
43
|
+
|
|
44
|
+
3. Coverage Check
|
|
45
|
+
|
|
46
|
+
4. AI Code Review (if automated checks pass)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Automated Checks
|
|
50
|
+
|
|
51
|
+
### Run Quality Gates
|
|
52
|
+
|
|
53
|
+
Use `@forge-quality-checker` skill. Run these commands:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# 1. Linting
|
|
57
|
+
npm run lint
|
|
58
|
+
|
|
59
|
+
# 2. Type Checking
|
|
60
|
+
npm run typecheck
|
|
61
|
+
|
|
62
|
+
# 3. Security Audit
|
|
63
|
+
npm audit
|
|
64
|
+
|
|
65
|
+
# 4. Static Analysis (SAST)
|
|
66
|
+
semgrep --config=auto --error .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Required Thresholds
|
|
70
|
+
|
|
71
|
+
From `.forge/config.yaml`:
|
|
72
|
+
```yaml
|
|
73
|
+
quality:
|
|
74
|
+
test_coverage_minimum: 80
|
|
75
|
+
lint_must_pass: true
|
|
76
|
+
type_check_must_pass: true
|
|
77
|
+
security_audit_must_pass: true
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## AI Code Review
|
|
81
|
+
|
|
82
|
+
After automated checks pass, review for:
|
|
83
|
+
|
|
84
|
+
### SOLID Principles
|
|
85
|
+
|
|
86
|
+
| Principle | What to Check |
|
|
87
|
+
|-----------|---------------|
|
|
88
|
+
| **S**ingle Responsibility | Does each module have one responsibility? |
|
|
89
|
+
| **O**pen/Closed | Can features be added without modifying existing code? |
|
|
90
|
+
| **L**iskov Substitution | Can subtypes replace base types safely? |
|
|
91
|
+
| **I**nterface Segregation | Are interfaces small and focused? |
|
|
92
|
+
| **D**ependency Inversion | Do modules depend on abstractions? |
|
|
93
|
+
|
|
94
|
+
### Design Patterns
|
|
95
|
+
|
|
96
|
+
Check for appropriate use of:
|
|
97
|
+
- Factory, Builder, Singleton
|
|
98
|
+
- Repository, Unit of Work
|
|
99
|
+
- Observer, Strategy
|
|
100
|
+
- Dependency Injection
|
|
101
|
+
|
|
102
|
+
### Error Handling
|
|
103
|
+
|
|
104
|
+
- Are errors caught and handled appropriately?
|
|
105
|
+
- Are exceptions used for exceptional cases only?
|
|
106
|
+
- Is error context preserved for debugging?
|
|
107
|
+
|
|
108
|
+
### Security
|
|
109
|
+
|
|
110
|
+
- Input validation on all user inputs?
|
|
111
|
+
- Authentication/authorization enforced?
|
|
112
|
+
- Secrets not logged or exposed?
|
|
113
|
+
- SQL injection, XSS, CSRF addressed?
|
|
114
|
+
|
|
115
|
+
### Performance
|
|
116
|
+
|
|
117
|
+
- Obvious bottlenecks?
|
|
118
|
+
- Unnecessary computations?
|
|
119
|
+
- Missing caching opportunities?
|
|
120
|
+
|
|
121
|
+
### Maintainability
|
|
122
|
+
|
|
123
|
+
- Would another developer understand this?
|
|
124
|
+
- Is the code self-documenting?
|
|
125
|
+
- Are there appropriate tests?
|
|
126
|
+
|
|
127
|
+
## Review Output
|
|
128
|
+
|
|
129
|
+
### Create Review Report
|
|
130
|
+
|
|
131
|
+
```markdown
|
|
132
|
+
## Review Report
|
|
133
|
+
|
|
134
|
+
### Automated Checks
|
|
135
|
+
|
|
136
|
+
| Check | Status | Details |
|
|
137
|
+
|-------|--------|---------|
|
|
138
|
+
| Lint | PASS | No issues |
|
|
139
|
+
| Type Check | PASS | No errors |
|
|
140
|
+
| Security | PASS | 0 vulnerabilities |
|
|
141
|
+
| Tests | PASS | 42/42 passed |
|
|
142
|
+
| Coverage | PASS | 87% |
|
|
143
|
+
|
|
144
|
+
### AI Code Review
|
|
145
|
+
|
|
146
|
+
#### SOLID Compliance
|
|
147
|
+
| Principle | Status | Notes |
|
|
148
|
+
|-----------|--------|-------|
|
|
149
|
+
| SRP | ✓ | Good separation |
|
|
150
|
+
| OCP | ✓ | Extensible design |
|
|
151
|
+
| LSP | ✓ | Proper inheritance |
|
|
152
|
+
| ISP | ⚠ | Interface X is large |
|
|
153
|
+
| DIP | ✓ | Good abstraction |
|
|
154
|
+
|
|
155
|
+
#### Design Patterns
|
|
156
|
+
- [Patterns identified]
|
|
157
|
+
|
|
158
|
+
#### Issues Found
|
|
159
|
+
|
|
160
|
+
| Severity | Issue | Location | Recommendation |
|
|
161
|
+
|----------|-------|----------|-----------------|
|
|
162
|
+
| High | Missing validation | auth.ts:45 | Add input validation |
|
|
163
|
+
| Medium | Deep nesting | process.ts:78 | Extract function |
|
|
164
|
+
|
|
165
|
+
#### Summary
|
|
166
|
+
- **Critical Issues:** 0
|
|
167
|
+
- **High Issues:** 1
|
|
168
|
+
- **Medium Issues:** 2
|
|
169
|
+
- **Low Issues:** 1
|
|
170
|
+
|
|
171
|
+
**Verdict:** APPROVED / REWORK REQUIRED
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Rework Decision
|
|
175
|
+
|
|
176
|
+
| Verdict | Action |
|
|
177
|
+
|---------|--------|
|
|
178
|
+
| APPROVED | Proceed to `@forge-validate` |
|
|
179
|
+
| REWORK (Minor) | Loop to `@forge-implement` |
|
|
180
|
+
| REWORK (Approach) | Loop to `@forge-approach` |
|
|
181
|
+
|
|
182
|
+
### Minor Issues (Loop to Implement)
|
|
183
|
+
- Code fixes
|
|
184
|
+
- Missing assertions in tests
|
|
185
|
+
- Lint/type errors
|
|
186
|
+
- Coverage gaps
|
|
187
|
+
|
|
188
|
+
### Approach Issues (Loop to Approach)
|
|
189
|
+
- Design was fundamentally flawed
|
|
190
|
+
- Wrong pattern chosen
|
|
191
|
+
- Architecture needs rethinking
|
|
192
|
+
|
|
193
|
+
## Update State
|
|
194
|
+
|
|
195
|
+
### Update Task Document
|
|
196
|
+
|
|
197
|
+
```yaml
|
|
198
|
+
status: in-progress:review
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Add review findings to task document.
|
|
202
|
+
|
|
203
|
+
## Next Steps
|
|
204
|
+
|
|
205
|
+
Proceed to `@forge-validate` when:
|
|
206
|
+
- All automated checks pass
|
|
207
|
+
- No critical or high issues
|
|
208
|
+
- Minor issues are acceptable (user decision)
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-summarise
|
|
3
|
+
description: Feature Dev sub-phase 8 - Document accomplishments
|
|
4
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
skill:
|
|
7
|
+
"forge-*": allow
|
|
8
|
+
"documents-*": allow
|
|
9
|
+
"*": deny
|
|
10
|
+
tools:
|
|
11
|
+
read: true
|
|
12
|
+
write: true
|
|
13
|
+
edit: true
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Feature Dev: 8. Summarise
|
|
17
|
+
|
|
18
|
+
Document what was accomplished and complete the feature development lifecycle.
|
|
19
|
+
|
|
20
|
+
## Load Skills
|
|
21
|
+
|
|
22
|
+
Use these skills:
|
|
23
|
+
- `@forge-state-manager` - Update task and project state
|
|
24
|
+
|
|
25
|
+
## Summary Content
|
|
26
|
+
|
|
27
|
+
### 1. Review Task Document
|
|
28
|
+
|
|
29
|
+
Read the complete task document to understand:
|
|
30
|
+
- What was planned
|
|
31
|
+
- What was implemented
|
|
32
|
+
- Any deviations from the plan
|
|
33
|
+
|
|
34
|
+
### 2. Document Changes Made
|
|
35
|
+
|
|
36
|
+
Create a summary of all changes:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
## Summary
|
|
40
|
+
|
|
41
|
+
### What Was Built
|
|
42
|
+
|
|
43
|
+
Brief description of the feature and its purpose.
|
|
44
|
+
|
|
45
|
+
### Changes Made
|
|
46
|
+
|
|
47
|
+
| File | Action | Lines | Description |
|
|
48
|
+
|------|--------|-------|-------------|
|
|
49
|
+
| src/auth.ts | Created | +120 | Authentication module |
|
|
50
|
+
| src/auth.test.ts | Created | +85 | Unit tests |
|
|
51
|
+
| src/middleware/auth.ts | Modified | +30 | Added auth middleware |
|
|
52
|
+
|
|
53
|
+
### Decisions Made During Implementation
|
|
54
|
+
|
|
55
|
+
| Decision | Original Plan | Actual | Reason for Change |
|
|
56
|
+
|----------|--------------|--------|-------------------|
|
|
57
|
+
| Token format | JWT | PASETO | Better security properties |
|
|
58
|
+
|
|
59
|
+
### Test Coverage
|
|
60
|
+
|
|
61
|
+
| Metric | Value |
|
|
62
|
+
|--------|-------|
|
|
63
|
+
| Lines Covered | 85% |
|
|
64
|
+
| Branches Covered | 78% |
|
|
65
|
+
| Functions Covered | 100% |
|
|
66
|
+
|
|
67
|
+
### Quality Gates
|
|
68
|
+
|
|
69
|
+
| Gate | Status |
|
|
70
|
+
|------|--------|
|
|
71
|
+
| Lint | ✓ Pass |
|
|
72
|
+
| Type Check | ✓ Pass |
|
|
73
|
+
| Security Audit | ✓ Pass |
|
|
74
|
+
| Tests | ✓ Pass (42/42) |
|
|
75
|
+
| Coverage | ✓ Pass (85% >= 80%) |
|
|
76
|
+
|
|
77
|
+
### Known Limitations
|
|
78
|
+
|
|
79
|
+
- [Any intentionally deferred items]
|
|
80
|
+
- [Known issues not fixed]
|
|
81
|
+
- [Technical debt introduced]
|
|
82
|
+
|
|
83
|
+
### Next Steps
|
|
84
|
+
|
|
85
|
+
1. Manual testing by QA
|
|
86
|
+
2. Deploy to staging
|
|
87
|
+
3. User acceptance testing
|
|
88
|
+
4. Documentation updates
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Git: Commit and Push
|
|
92
|
+
|
|
93
|
+
After updating the task document, commit all changes to the feature branch and push:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
git add -A
|
|
97
|
+
git commit -m "forge: feat - {task-title}"
|
|
98
|
+
git push -u origin feature/{task-slug}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Signal readiness to the build agent for merge coordination.
|
|
102
|
+
|
|
103
|
+
## Final Task Document Update
|
|
104
|
+
|
|
105
|
+
### Update Frontmatter
|
|
106
|
+
|
|
107
|
+
```yaml
|
|
108
|
+
---
|
|
109
|
+
title: [Task Title]
|
|
110
|
+
status: complete
|
|
111
|
+
mode: brownfield # or greenfield
|
|
112
|
+
completed: 2026-03-22T18:00:00Z
|
|
113
|
+
---
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Add Summary Section
|
|
117
|
+
|
|
118
|
+
Append completed summary to the task document body.
|
|
119
|
+
|
|
120
|
+
## State Updates
|
|
121
|
+
|
|
122
|
+
### Update Feature State
|
|
123
|
+
|
|
124
|
+
In `.forge/state.yaml`:
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
features:
|
|
128
|
+
feature-slug:
|
|
129
|
+
phase: 3
|
|
130
|
+
status: complete
|
|
131
|
+
completed: 2026-03-22T18:00:00Z
|
|
132
|
+
sub_phase_history:
|
|
133
|
+
- sub_phase: 1_discover
|
|
134
|
+
status: complete
|
|
135
|
+
- sub_phase: 2_explore
|
|
136
|
+
status: complete
|
|
137
|
+
- sub_phase: 3_clarify
|
|
138
|
+
status: complete
|
|
139
|
+
- sub_phase: 4_approach
|
|
140
|
+
status: complete
|
|
141
|
+
- sub_phase: 5_implement
|
|
142
|
+
status: complete
|
|
143
|
+
- sub_phase: 6_review
|
|
144
|
+
status: complete
|
|
145
|
+
- sub_phase: 7_validate
|
|
146
|
+
status: complete
|
|
147
|
+
- sub_phase: 8_summarise
|
|
148
|
+
status: complete
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Lifecycle Complete
|
|
152
|
+
|
|
153
|
+
Feature Development Lifecycle is complete when:
|
|
154
|
+
- ✓ All 8 sub-phases completed
|
|
155
|
+
- ✓ Task document updated with summary
|
|
156
|
+
- ✓ State file updated
|
|
157
|
+
- ✓ Quality gates passed
|
|
158
|
+
|
|
159
|
+
## Next Actions
|
|
160
|
+
|
|
161
|
+
After lifecycle completion:
|
|
162
|
+
|
|
163
|
+
1. **Run full test suite** - Ensure nothing was broken
|
|
164
|
+
2. **Manual testing** - Verify feature works as expected
|
|
165
|
+
3. **Code review** - Peer review by team member
|
|
166
|
+
4. **Documentation** - Update API docs, README if needed
|
|
167
|
+
5. **Next feature** - Start next task or propose Phase 4 (Testing)
|
|
168
|
+
|
|
169
|
+
## Propose Phase Transition
|
|
170
|
+
|
|
171
|
+
After completing features:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
Feature Development complete.
|
|
175
|
+
|
|
176
|
+
Completed features:
|
|
177
|
+
- implement-user-auth ✓
|
|
178
|
+
- session-management ✓
|
|
179
|
+
|
|
180
|
+
Ready to proceed to:
|
|
181
|
+
- Next feature: [task-name]
|
|
182
|
+
- Phase 4: Testing (forge 4:test)
|
|
183
|
+
|
|
184
|
+
What would you like to do?
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Output
|
|
188
|
+
|
|
189
|
+
### Confirm Completion
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
✓ Feature Development Lifecycle Complete
|
|
193
|
+
|
|
194
|
+
Task: [Task Title]
|
|
195
|
+
Duration: [Time spent]
|
|
196
|
+
Status: Complete
|
|
197
|
+
|
|
198
|
+
Next: Choose next action
|
|
199
|
+
```
|