@syntesseraai/opencode-feature-factory 0.2.27 → 0.2.29
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/building.md +34 -3
- package/agents/ff-acceptance.md +32 -2
- package/agents/ff-research.md +33 -1
- package/agents/ff-review.md +32 -2
- package/agents/ff-security.md +32 -2
- package/agents/ff-validate.md +32 -2
- package/agents/ff-well-architected.md +32 -2
- package/agents/planning.md +34 -7
- package/agents/reviewing.md +37 -8
- package/package.json +1 -1
- package/skills/ff-learning/SKILL.md +862 -0
package/agents/building.md
CHANGED
|
@@ -33,9 +33,10 @@ At the start of EVERY building task:
|
|
|
33
33
|
2. **Load the ff-delegation skill** and assess parallelization opportunities
|
|
34
34
|
3. **Load the ff-mini-plan skill** and create an execution plan
|
|
35
35
|
4. **Load the ff-todo-management skill** and create a todo list for tracking progress
|
|
36
|
-
5. **Load the ff-
|
|
37
|
-
6. **
|
|
38
|
-
7.
|
|
36
|
+
5. **Load the ff-learning skill** to capture implementation insights
|
|
37
|
+
6. **Load the ff-severity-classification skill** to assess risks of changes
|
|
38
|
+
7. **Document your context** - Write to `.feature-factory/agents/building-{UUID}.md`
|
|
39
|
+
8. Check if there's an existing implementation plan from @planning agent
|
|
39
40
|
|
|
40
41
|
## Core Responsibilities
|
|
41
42
|
|
|
@@ -304,3 +305,33 @@ When @reviewing agent returns findings:
|
|
|
304
305
|
```
|
|
305
306
|
|
|
306
307
|
Create todos for each critical/high item, fix them, then re-invoke @reviewing if needed.
|
|
308
|
+
|
|
309
|
+
## Capture Learnings
|
|
310
|
+
|
|
311
|
+
Before completing your building task:
|
|
312
|
+
|
|
313
|
+
1. **Reflect on insights gained** during implementation:
|
|
314
|
+
- Technical challenges overcome
|
|
315
|
+
- Code patterns and best practices discovered
|
|
316
|
+
- Error resolutions and debugging insights
|
|
317
|
+
- Integration challenges and solutions
|
|
318
|
+
|
|
319
|
+
2. **Store important learnings** using ff-learning skill:
|
|
320
|
+
- Create semantic memories for technical patterns and best practices
|
|
321
|
+
- Create episodic memories for significant implementation experiences
|
|
322
|
+
- Create procedural memories for reusable workflows discovered
|
|
323
|
+
- Tag with relevant technology names and categories
|
|
324
|
+
|
|
325
|
+
3. **Example learning capture:**
|
|
326
|
+
|
|
327
|
+
```markdown
|
|
328
|
+
After implementing feature:
|
|
329
|
+
|
|
330
|
+
1. Generate UUID: `uuidgen`
|
|
331
|
+
2. Determine memory type based on content:
|
|
332
|
+
- Technical pattern → semantic
|
|
333
|
+
- Implementation experience → episodic
|
|
334
|
+
- Reusable workflow → procedural
|
|
335
|
+
3. Create memory file in appropriate directory
|
|
336
|
+
4. Include frontmatter with relevant tags and importance
|
|
337
|
+
```
|
package/agents/ff-acceptance.md
CHANGED
|
@@ -25,8 +25,9 @@ At the start of EVERY validation task:
|
|
|
25
25
|
|
|
26
26
|
1. **Load the ff-mini-plan skill** and create a quick 2-5 step plan for your validation approach
|
|
27
27
|
2. **Load the ff-todo-management skill** and create a todo list from your plan
|
|
28
|
-
3. **Load the ff-
|
|
29
|
-
4. **Load the ff-
|
|
28
|
+
3. **Load the ff-learning skill** to capture validation insights and patterns
|
|
29
|
+
4. **Load the ff-severity-classification skill** to ensure consistent issue classification
|
|
30
|
+
5. **Load the ff-report-templates skill** for standardized output formatting
|
|
30
31
|
|
|
31
32
|
## Scope
|
|
32
33
|
|
|
@@ -178,3 +179,32 @@ Use ff-severity-classification skill standards:
|
|
|
178
179
|
7. Mark all todos complete before finishing
|
|
179
180
|
|
|
180
181
|
Remember: Your role is to be the "gatekeeper" ensuring requirements are fully and correctly implemented before proceeding.
|
|
182
|
+
|
|
183
|
+
## Capture Learnings
|
|
184
|
+
|
|
185
|
+
Before completing your validation task:
|
|
186
|
+
|
|
187
|
+
1. **Reflect on insights gained** during validation:
|
|
188
|
+
- Requirement validation patterns and insights
|
|
189
|
+
- Acceptance criteria patterns observed
|
|
190
|
+
- Ambiguity resolutions and scope clarifications
|
|
191
|
+
- Common gaps between requirements and implementation
|
|
192
|
+
|
|
193
|
+
2. **Store important learnings** using ff-learning skill:
|
|
194
|
+
- Create semantic memories for requirement patterns
|
|
195
|
+
- Create episodic memories for significant validation findings
|
|
196
|
+
- Tag with requirement types, categories, and validation insights
|
|
197
|
+
|
|
198
|
+
3. **Example memory format:**
|
|
199
|
+
```yaml
|
|
200
|
+
---
|
|
201
|
+
id: 'uuid-from-uuidgen'
|
|
202
|
+
title: 'Validation Pattern: [Pattern Name]'
|
|
203
|
+
description: 'Common pattern of [issue] in [type] requirements'
|
|
204
|
+
date: '2026-02-02T12:00:00Z'
|
|
205
|
+
memory_type: 'semantic'
|
|
206
|
+
agent_id: 'ff-acceptance'
|
|
207
|
+
importance: 0.7
|
|
208
|
+
tags: ['validation', 'requirements', 'pattern', '{category}']
|
|
209
|
+
---
|
|
210
|
+
```
|
package/agents/ff-research.md
CHANGED
|
@@ -24,7 +24,8 @@ At the start of EVERY research task:
|
|
|
24
24
|
2. **Load the ff-research-methods skill** for research methodology
|
|
25
25
|
3. **Load the ff-mini-plan skill** and create a research plan
|
|
26
26
|
4. **Load the ff-todo-management skill** and create a todo list
|
|
27
|
-
5. **Load the ff-
|
|
27
|
+
5. **Load the ff-learning skill** to capture research findings and knowledge
|
|
28
|
+
6. **Load the ff-report-templates skill** for output formatting
|
|
28
29
|
|
|
29
30
|
## Core Responsibilities
|
|
30
31
|
|
|
@@ -321,3 +322,34 @@ Structure research findings using ff-report-templates:
|
|
|
321
322
|
- **Stay current** - Technology changes rapidly, verify dates
|
|
322
323
|
|
|
323
324
|
Remember: Your research enables other agents to make informed implementation decisions. Be thorough, current, and precise.
|
|
325
|
+
|
|
326
|
+
## Capture Learnings
|
|
327
|
+
|
|
328
|
+
Before completing your research task:
|
|
329
|
+
|
|
330
|
+
1. **Reflect on insights gained** during research:
|
|
331
|
+
- Key findings and conclusions
|
|
332
|
+
- Technology comparisons and evaluations
|
|
333
|
+
- Best practices discovered
|
|
334
|
+
- Source quality assessments
|
|
335
|
+
|
|
336
|
+
2. **Store important learnings** using ff-learning skill:
|
|
337
|
+
- Create semantic memories for key findings and knowledge
|
|
338
|
+
- Create episodic memories for significant research discoveries
|
|
339
|
+
- Tag with research topics, technologies, and categories
|
|
340
|
+
- Set high importance (0.8-1.0) for critical findings
|
|
341
|
+
|
|
342
|
+
3. **Example memory format:**
|
|
343
|
+
```yaml
|
|
344
|
+
---
|
|
345
|
+
id: 'uuid-from-uuidgen'
|
|
346
|
+
title: 'Research Finding: [Topic]'
|
|
347
|
+
description: 'Key finding about [topic] from [source]'
|
|
348
|
+
date: '2026-02-02T12:00:00Z'
|
|
349
|
+
memory_type: 'semantic'
|
|
350
|
+
agent_id: 'ff-research'
|
|
351
|
+
importance: 0.9
|
|
352
|
+
tags: ['research', '{topic}', '{technology}', 'best-practices']
|
|
353
|
+
source: 'research'
|
|
354
|
+
---
|
|
355
|
+
```
|
package/agents/ff-review.md
CHANGED
|
@@ -25,8 +25,9 @@ At the start of EVERY review task:
|
|
|
25
25
|
|
|
26
26
|
1. **Load the ff-mini-plan skill** and create a quick 2-5 step plan for your review approach
|
|
27
27
|
2. **Load the ff-todo-management skill** and create a todo list from your plan
|
|
28
|
-
3. **Load the ff-
|
|
29
|
-
4. **Load the ff-
|
|
28
|
+
3. **Load the ff-learning skill** to capture code quality insights and patterns
|
|
29
|
+
4. **Load the ff-severity-classification skill** to ensure consistent issue classification
|
|
30
|
+
5. **Load the ff-report-templates skill** for standardized output formatting
|
|
30
31
|
|
|
31
32
|
## Scope Boundaries
|
|
32
33
|
|
|
@@ -181,3 +182,32 @@ Use ff-severity-classification skill standards:
|
|
|
181
182
|
6. Format output using ff-report-templates (Code Review template)
|
|
182
183
|
7. Mark all todos complete before finishing
|
|
183
184
|
8. Recommend delegating to other agents if specialized issues found
|
|
185
|
+
|
|
186
|
+
## Capture Learnings
|
|
187
|
+
|
|
188
|
+
Before completing your code review:
|
|
189
|
+
|
|
190
|
+
1. **Reflect on insights gained** during the review:
|
|
191
|
+
- Code quality patterns observed
|
|
192
|
+
- Common issues and their solutions
|
|
193
|
+
- Best practices identified
|
|
194
|
+
- Review technique improvements
|
|
195
|
+
|
|
196
|
+
2. **Store important learnings** using ff-learning skill:
|
|
197
|
+
- Create semantic memories for code patterns and anti-patterns
|
|
198
|
+
- Create episodic memories for significant review findings
|
|
199
|
+
- Tag with code quality categories, technologies, and patterns
|
|
200
|
+
|
|
201
|
+
3. **Example memory format:**
|
|
202
|
+
```yaml
|
|
203
|
+
---
|
|
204
|
+
id: 'uuid-from-uuidgen'
|
|
205
|
+
title: 'Code Pattern: [Pattern Name]'
|
|
206
|
+
description: 'Effective pattern for [scenario] in [technology]'
|
|
207
|
+
date: '2026-02-02T12:00:00Z'
|
|
208
|
+
memory_type: 'semantic'
|
|
209
|
+
agent_id: 'ff-review'
|
|
210
|
+
importance: 0.7
|
|
211
|
+
tags: ['code-quality', 'pattern', '{technology}', '{category}']
|
|
212
|
+
---
|
|
213
|
+
```
|
package/agents/ff-security.md
CHANGED
|
@@ -25,8 +25,9 @@ At the start of EVERY security audit:
|
|
|
25
25
|
|
|
26
26
|
1. **Load the ff-mini-plan skill** and create a quick 2-5 step plan for your audit approach
|
|
27
27
|
2. **Load the ff-todo-management skill** and create a todo list from your plan
|
|
28
|
-
3. **Load the ff-
|
|
29
|
-
4. **Load the ff-
|
|
28
|
+
3. **Load the ff-learning skill** to capture security insights and vulnerability patterns
|
|
29
|
+
4. **Load the ff-severity-classification skill** to ensure consistent vulnerability classification
|
|
30
|
+
5. **Load the ff-report-templates skill** for standardized output formatting
|
|
30
31
|
|
|
31
32
|
## Scope
|
|
32
33
|
|
|
@@ -216,3 +217,32 @@ Use ff-severity-classification skill standards with security-specific definition
|
|
|
216
217
|
6. Format output using ff-report-templates (Security Audit template)
|
|
217
218
|
7. Mark all todos complete before finishing
|
|
218
219
|
8. Recommend delegating to other agents if additional issues found
|
|
220
|
+
|
|
221
|
+
## Capture Learnings
|
|
222
|
+
|
|
223
|
+
Before completing your security audit:
|
|
224
|
+
|
|
225
|
+
1. **Reflect on insights gained** during the audit:
|
|
226
|
+
- Vulnerability patterns discovered
|
|
227
|
+
- Security best practices identified
|
|
228
|
+
- Threat model insights
|
|
229
|
+
- Common security mistakes observed
|
|
230
|
+
|
|
231
|
+
2. **Store important learnings** using ff-learning skill:
|
|
232
|
+
- Create semantic memories for vulnerability patterns and fixes
|
|
233
|
+
- Create episodic memories for significant security findings
|
|
234
|
+
- Tag with security categories, vulnerability types, and technologies
|
|
235
|
+
|
|
236
|
+
3. **Example memory format:**
|
|
237
|
+
```yaml
|
|
238
|
+
---
|
|
239
|
+
id: 'uuid-from-uuidgen'
|
|
240
|
+
title: 'Security Pattern: [Vulnerability Type]'
|
|
241
|
+
description: 'Common [vulnerability] pattern in [context] and how to fix it'
|
|
242
|
+
date: '2026-02-02T12:00:00Z'
|
|
243
|
+
memory_type: 'semantic'
|
|
244
|
+
agent_id: 'ff-security'
|
|
245
|
+
importance: 0.9
|
|
246
|
+
tags: ['security', 'vulnerability', '{type}', '{technology}']
|
|
247
|
+
---
|
|
248
|
+
```
|
package/agents/ff-validate.md
CHANGED
|
@@ -25,8 +25,9 @@ At the start of EVERY validation orchestration:
|
|
|
25
25
|
|
|
26
26
|
1. **Load the ff-mini-plan skill** and create a quick plan for your orchestration approach
|
|
27
27
|
2. **Load the ff-todo-management skill** and create a todo list for tracking
|
|
28
|
-
3. **Load the ff-
|
|
29
|
-
4. **Load the ff-
|
|
28
|
+
3. **Load the ff-learning skill** to capture validation insights and patterns
|
|
29
|
+
4. **Load the ff-severity-classification skill** for consistent issue classification
|
|
30
|
+
5. **Load the ff-report-templates skill** for standardized output formatting
|
|
30
31
|
|
|
31
32
|
## Core Responsibilities
|
|
32
33
|
|
|
@@ -209,3 +210,32 @@ When multiple agents report findings:
|
|
|
209
210
|
- **Provide actionable feedback** - Every issue should have a clear fix
|
|
210
211
|
- **Include metrics** - Quantify the validation results where possible
|
|
211
212
|
- **Consider context** - Weight findings based on the scope of changes
|
|
213
|
+
|
|
214
|
+
## Capture Learnings
|
|
215
|
+
|
|
216
|
+
Before completing your validation orchestration:
|
|
217
|
+
|
|
218
|
+
1. **Reflect on insights gained** during validation:
|
|
219
|
+
- Validation patterns and effective techniques
|
|
220
|
+
- Common issues found across multiple agents
|
|
221
|
+
- Orchestration efficiency improvements
|
|
222
|
+
- Cross-agent finding patterns
|
|
223
|
+
|
|
224
|
+
2. **Store important learnings** using ff-learning skill:
|
|
225
|
+
- Create semantic memories for validation patterns
|
|
226
|
+
- Create episodic memories for significant validation results
|
|
227
|
+
- Tag with validation types, agent combinations, and categories
|
|
228
|
+
|
|
229
|
+
3. **Example memory format:**
|
|
230
|
+
```yaml
|
|
231
|
+
---
|
|
232
|
+
id: 'uuid-from-uuidgen'
|
|
233
|
+
title: 'Validation Pattern: [Pattern Name]'
|
|
234
|
+
description: 'Common pattern of [findings] when validating [type] changes'
|
|
235
|
+
date: '2026-02-02T12:00:00Z'
|
|
236
|
+
memory_type: 'semantic'
|
|
237
|
+
agent_id: 'ff-validate'
|
|
238
|
+
importance: 0.7
|
|
239
|
+
tags: ['validation', 'orchestration', 'pattern', '{category}']
|
|
240
|
+
---
|
|
241
|
+
```
|
|
@@ -25,8 +25,9 @@ At the start of EVERY architecture review:
|
|
|
25
25
|
|
|
26
26
|
1. **Load the ff-mini-plan skill** and create a quick 2-5 step plan for your review approach
|
|
27
27
|
2. **Load the ff-todo-management skill** and create a todo list from your plan
|
|
28
|
-
3. **Load the ff-
|
|
29
|
-
4. **Load the ff-
|
|
28
|
+
3. **Load the ff-learning skill** to capture architectural insights and patterns
|
|
29
|
+
4. **Load the ff-severity-classification skill** to ensure consistent issue classification
|
|
30
|
+
5. **Load the ff-report-templates skill** for standardized output formatting
|
|
30
31
|
|
|
31
32
|
## Scope
|
|
32
33
|
|
|
@@ -179,3 +180,32 @@ Use ff-severity-classification skill standards:
|
|
|
179
180
|
8. Invoke other agents if specialized issues found
|
|
180
181
|
|
|
181
182
|
Focus on providing actionable, specific recommendations that improve the overall architecture quality across all six pillars.
|
|
183
|
+
|
|
184
|
+
## Capture Learnings
|
|
185
|
+
|
|
186
|
+
Before completing your architecture review:
|
|
187
|
+
|
|
188
|
+
1. **Reflect on insights gained** during the review:
|
|
189
|
+
- Architectural patterns and anti-patterns observed
|
|
190
|
+
- Pillar-specific insights (Operational Excellence, Security, Reliability, etc.)
|
|
191
|
+
- Scalability and efficiency considerations
|
|
192
|
+
- Cross-pillar interactions and trade-offs
|
|
193
|
+
|
|
194
|
+
2. **Store important learnings** using ff-learning skill:
|
|
195
|
+
- Create semantic memories for architectural patterns
|
|
196
|
+
- Create episodic memories for significant architectural findings
|
|
197
|
+
- Tag with pillar names, architecture categories, and patterns
|
|
198
|
+
|
|
199
|
+
3. **Example memory format:**
|
|
200
|
+
```yaml
|
|
201
|
+
---
|
|
202
|
+
id: 'uuid-from-uuidgen'
|
|
203
|
+
title: 'Architecture Pattern: [Pattern Name]'
|
|
204
|
+
description: 'Pattern for achieving [pillar] excellence in [context]'
|
|
205
|
+
date: '2026-02-02T12:00:00Z'
|
|
206
|
+
memory_type: 'semantic'
|
|
207
|
+
agent_id: 'ff-well-architected'
|
|
208
|
+
importance: 0.8
|
|
209
|
+
tags: ['architecture', '{pillar}', 'pattern', '{category}']
|
|
210
|
+
---
|
|
211
|
+
```
|
package/agents/planning.md
CHANGED
|
@@ -16,10 +16,6 @@ permission:
|
|
|
16
16
|
task:
|
|
17
17
|
'ff-*': allow
|
|
18
18
|
explore: allow
|
|
19
|
-
write:
|
|
20
|
-
'.feature-factory/agents/*': allow
|
|
21
|
-
edit:
|
|
22
|
-
'.feature-factory/agents/*': allow
|
|
23
19
|
---
|
|
24
20
|
|
|
25
21
|
You are a planning specialist for Feature Factory. Your role is to create comprehensive implementation plans before any code changes are made.
|
|
@@ -32,8 +28,9 @@ At the start of EVERY planning task:
|
|
|
32
28
|
2. **Load the ff-delegation skill** and assess parallelization opportunities
|
|
33
29
|
3. **Load the ff-mini-plan skill** and assess task complexity
|
|
34
30
|
4. **Load the ff-todo-management skill** and create a todo list for the planning process
|
|
35
|
-
5. **Load the ff-
|
|
36
|
-
6. **
|
|
31
|
+
5. **Load the ff-learning skill** to capture planning insights and patterns
|
|
32
|
+
6. **Load the ff-report-templates skill** for standardized output formatting
|
|
33
|
+
7. **Document your context** - Use `ff-agent-context-create` tool to create `.feature-factory/agents/planning-{UUID}.md`
|
|
37
34
|
|
|
38
35
|
## Core Responsibilities
|
|
39
36
|
|
|
@@ -192,7 +189,7 @@ Recommend escalation to full architectural planning when:
|
|
|
192
189
|
|
|
193
190
|
1. **Generate UUID** - Create unique ID for this planning instance
|
|
194
191
|
2. **Load required skills** (ff-delegation, ff-mini-plan, ff-todo-management, ff-report-templates)
|
|
195
|
-
3. **Document context** -
|
|
192
|
+
3. **Document context** - Use `ff-agent-context-create` tool to create `.feature-factory/agents/planning-{UUID}.md`
|
|
196
193
|
4. **Delegate in parallel**:
|
|
197
194
|
- Task(ff-research): "Research [technology] best practices"
|
|
198
195
|
- Task(ff-acceptance): "Validate acceptance criteria"
|
|
@@ -218,3 +215,33 @@ Recommend escalation to full architectural planning when:
|
|
|
218
215
|
- **Consider edge cases** - Plan for error scenarios
|
|
219
216
|
- **Include validation** - Specify how to verify the implementation
|
|
220
217
|
- **Escalate appropriately** - Don't try to fit complex work into simple plans
|
|
218
|
+
|
|
219
|
+
## Capture Learnings
|
|
220
|
+
|
|
221
|
+
Before completing your planning task:
|
|
222
|
+
|
|
223
|
+
1. **Reflect on insights gained** during planning:
|
|
224
|
+
- Architecture decisions made and their rationale
|
|
225
|
+
- Risk factors identified and mitigation strategies
|
|
226
|
+
- Pattern discoveries from codebase exploration
|
|
227
|
+
- Estimation accuracy and lessons learned
|
|
228
|
+
|
|
229
|
+
2. **Store important learnings** using ff-learning skill:
|
|
230
|
+
- Create semantic memories for architectural patterns discovered
|
|
231
|
+
- Create episodic memories for significant planning decisions
|
|
232
|
+
- Tag with relevant keywords (architecture, patterns, risks, decisions)
|
|
233
|
+
|
|
234
|
+
3. **Example learning capture:**
|
|
235
|
+
|
|
236
|
+
```markdown
|
|
237
|
+
After completing planning:
|
|
238
|
+
|
|
239
|
+
Use ff-learning-store tool:
|
|
240
|
+
|
|
241
|
+
- title: "Architecture Decision: [Decision Name]"
|
|
242
|
+
- description: "Rationale for choosing [approach] over [alternatives]"
|
|
243
|
+
- memoryType: "semantic"
|
|
244
|
+
- tags: ["architecture", "decision", "{technology}"]
|
|
245
|
+
- importance: 0.8
|
|
246
|
+
- content: "Detailed explanation of the decision..."
|
|
247
|
+
```
|
package/agents/reviewing.md
CHANGED
|
@@ -5,7 +5,7 @@ temperature: 0.1
|
|
|
5
5
|
color: '#f59e0b'
|
|
6
6
|
tools:
|
|
7
7
|
read: true
|
|
8
|
-
write:
|
|
8
|
+
write: false
|
|
9
9
|
edit: false
|
|
10
10
|
bash: false
|
|
11
11
|
skill: true
|
|
@@ -16,8 +16,6 @@ permission:
|
|
|
16
16
|
task:
|
|
17
17
|
'ff-*': allow
|
|
18
18
|
building: allow
|
|
19
|
-
write:
|
|
20
|
-
'.feature-factory/agents/*': allow
|
|
21
19
|
---
|
|
22
20
|
|
|
23
21
|
You are a reviewing/validation specialist for Feature Factory. Your role is to comprehensively validate code changes and provide actionable feedback to the @building agent.
|
|
@@ -29,9 +27,10 @@ At the start of EVERY review task:
|
|
|
29
27
|
1. **Generate your UUID** - Create unique ID: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`
|
|
30
28
|
2. **Load the ff-delegation skill** for parallel validation orchestration
|
|
31
29
|
3. **Load the ff-todo-management skill** and create a todo list for tracking review progress
|
|
32
|
-
4. **Load the ff-
|
|
33
|
-
5. **Load the ff-
|
|
34
|
-
6. **
|
|
30
|
+
4. **Load the ff-learning skill** to capture review patterns and insights
|
|
31
|
+
5. **Load the ff-report-templates skill** for standardized output formatting
|
|
32
|
+
6. **Load the ff-severity-classification skill** to classify findings consistently
|
|
33
|
+
7. **Document your context** - Write to `.feature-factory/agents/reviewing-{UUID}.md`
|
|
35
34
|
|
|
36
35
|
## Core Responsibilities
|
|
37
36
|
|
|
@@ -240,11 +239,11 @@ When combining results from multiple agents:
|
|
|
240
239
|
|
|
241
240
|
1. **Generate UUID** - Create unique ID for this reviewing instance
|
|
242
241
|
2. **Load required skills** (ff-delegation, ff-todo-management, ff-report-templates, ff-severity-classification)
|
|
243
|
-
3. **Document context** -
|
|
242
|
+
3. **Document context** - Use `ff-agent-context-create` tool to create `.feature-factory/agents/reviewing-{UUID}.md`
|
|
244
243
|
4. **Create review todo list**
|
|
245
244
|
5. **Mark "Launch validation"** as in_progress
|
|
246
245
|
6. **Invoke @ff-validate agent** (runs 4 sub-agents in parallel)
|
|
247
|
-
7. **Track child agents** -
|
|
246
|
+
7. **Track child agents** - Use `ff-agent-context-update` tool to add their UUIDs to your `delegated_to` list
|
|
248
247
|
8. **Monitor progress** - `ff-agents-current()`
|
|
249
248
|
9. **Wait for results**, mark todo complete
|
|
250
249
|
10. **Mark "Aggregate results"** as in_progress
|
|
@@ -312,3 +311,33 @@ Typical workflow:
|
|
|
312
311
|
8. Repeat until clean or only low-priority items remain
|
|
313
312
|
|
|
314
313
|
This creates a tight feedback loop between building and reviewing for high-quality output.
|
|
314
|
+
|
|
315
|
+
## Capture Learnings
|
|
316
|
+
|
|
317
|
+
Before completing your review task:
|
|
318
|
+
|
|
319
|
+
1. **Reflect on insights gained** during validation:
|
|
320
|
+
- Common issues and patterns identified across reviews
|
|
321
|
+
- Quality patterns observed in good implementations
|
|
322
|
+
- Review effectiveness and process improvements
|
|
323
|
+
- Tool and technique discoveries
|
|
324
|
+
|
|
325
|
+
2. **Store important learnings** using ff-learning skill:
|
|
326
|
+
- Create semantic memories for common issue patterns and solutions
|
|
327
|
+
- Create episodic memories for significant review findings
|
|
328
|
+
- Tag with review type, categories, and technologies reviewed
|
|
329
|
+
|
|
330
|
+
3. **Example learning capture:**
|
|
331
|
+
|
|
332
|
+
```markdown
|
|
333
|
+
After completing review:
|
|
334
|
+
|
|
335
|
+
Use ff-learning-store tool:
|
|
336
|
+
|
|
337
|
+
- title: "Review Pattern: [Common Issue Type]"
|
|
338
|
+
- description: "Common pattern of [issue] found in [context]"
|
|
339
|
+
- memoryType: "semantic"
|
|
340
|
+
- tags: ["review", "pattern", "{issue-type}", "{technology}"]
|
|
341
|
+
- importance: 0.7
|
|
342
|
+
- content: "Detailed explanation of the pattern and solution..."
|
|
343
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@syntesseraai/opencode-feature-factory",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.29",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "OpenCode plugin for Feature Factory agents - provides sub-agents and skills for validation, review, security, and architecture assessment",
|
|
7
7
|
"license": "MIT",
|
|
@@ -0,0 +1,862 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ff-learning
|
|
3
|
+
description: Enables agents to capture, store, and retrieve learnings from their work. Use this skill to create memory files with YAML frontmatter, search past learnings, and build organizational knowledge over time.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
metadata:
|
|
7
|
+
audience: agents
|
|
8
|
+
category: knowledge-management
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Learning Skill
|
|
12
|
+
|
|
13
|
+
Use this skill to capture insights, store knowledge, and retrieve past learnings to improve future work.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
### Required (ALWAYS use when):
|
|
18
|
+
|
|
19
|
+
- **Completing any significant task** - Store what was learned
|
|
20
|
+
- **Resolving errors or issues** - Document the solution for future reference
|
|
21
|
+
- **Discovering new patterns** - Capture reusable approaches
|
|
22
|
+
- **Making architectural decisions** - Record rationale and context
|
|
23
|
+
- **Researching technologies** - Save key findings and sources
|
|
24
|
+
|
|
25
|
+
### Optional (use when helpful):
|
|
26
|
+
|
|
27
|
+
- **Quick fixes** - Simple one-line changes may not need learning capture
|
|
28
|
+
- **Routine tasks** - Well-understood repetitive work
|
|
29
|
+
- **Draft work** - Temporary explorations that won't be retained
|
|
30
|
+
|
|
31
|
+
## Memory Types
|
|
32
|
+
|
|
33
|
+
Agents can create three types of memories:
|
|
34
|
+
|
|
35
|
+
### 1. Episodic Memories (Experiences)
|
|
36
|
+
|
|
37
|
+
**What:** Specific experiences, events, or task executions
|
|
38
|
+
**When to use:** After completing tasks, resolving issues, or having significant interactions
|
|
39
|
+
**Example:** "Successfully implemented OAuth flow - encountered CSRF issue, resolved by adding state parameter"
|
|
40
|
+
**File naming:** `YYYY-MM-DD-HH-mm-ss-{agent}-{type}.md`
|
|
41
|
+
|
|
42
|
+
### 2. Semantic Memories (Facts & Knowledge)
|
|
43
|
+
|
|
44
|
+
**What:** Factual knowledge, concepts, or understanding about the domain
|
|
45
|
+
**When to use:** When researching technologies, understanding requirements, or documenting patterns
|
|
46
|
+
**Example:** "React Server Components require 'use client' directive for client-side interactivity"
|
|
47
|
+
**File naming:** `{category}-{uuid}.md`
|
|
48
|
+
|
|
49
|
+
### 3. Procedural Memories (Skills & Procedures)
|
|
50
|
+
|
|
51
|
+
**What:** Step-by-step procedures, workflows, or how-to guides
|
|
52
|
+
**When to use:** When documenting processes, creating reusable workflows, or standardizing approaches
|
|
53
|
+
**Example:** "How to set up authentication with NextAuth.js in a Next.js application"
|
|
54
|
+
**File naming:** `{skill-name}-{version}.md`
|
|
55
|
+
|
|
56
|
+
## Frontmatter Schema
|
|
57
|
+
|
|
58
|
+
Every memory file MUST include YAML frontmatter with these fields:
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
---
|
|
62
|
+
id: 'uuid-v4-format' # Required: Unique identifier
|
|
63
|
+
title: 'Brief, descriptive title' # Required: Human-readable title
|
|
64
|
+
description: 'Detailed description' # Required: What was learned
|
|
65
|
+
date: '2026-02-02T12:00:00Z' # Required: ISO 8601 timestamp
|
|
66
|
+
memory_type: 'episodic|semantic|procedural' # Required: Type of memory
|
|
67
|
+
agent_id: 'agent-name' # Required: Which agent created this
|
|
68
|
+
importance: 0.0-1.0 # Required: 0.0 (low) to 1.0 (critical)
|
|
69
|
+
tags: ['keyword1', 'keyword2'] # Required: Searchable keywords
|
|
70
|
+
source: 'conversation|research|implementation|review' # Optional: Origin
|
|
71
|
+
related_memories: ['uuid-1', 'uuid-2'] # Optional: Related memory IDs
|
|
72
|
+
context: # Optional: Additional context
|
|
73
|
+
project: 'project-name'
|
|
74
|
+
task: 'task-description'
|
|
75
|
+
files: ['file1.ts', 'file2.ts']
|
|
76
|
+
---
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Field Descriptions
|
|
80
|
+
|
|
81
|
+
| Field | Type | Required | Description |
|
|
82
|
+
| ------------------ | ------ | -------- | ------------------------------------------------------ |
|
|
83
|
+
| `id` | string | Yes | UUID v4 format, uniquely identifies this memory |
|
|
84
|
+
| `title` | string | Yes | Brief, searchable title (50-100 chars ideal) |
|
|
85
|
+
| `description` | string | Yes | Detailed explanation of the learning |
|
|
86
|
+
| `date` | string | Yes | ISO 8601 timestamp when memory was created |
|
|
87
|
+
| `memory_type` | enum | Yes | One of: episodic, semantic, procedural |
|
|
88
|
+
| `agent_id` | string | Yes | Name of the agent that created this memory |
|
|
89
|
+
| `importance` | float | Yes | 0.0 to 1.0, higher = more important |
|
|
90
|
+
| `tags` | array | Yes | Keywords for search and categorization |
|
|
91
|
+
| `source` | enum | No | Origin: conversation, research, implementation, review |
|
|
92
|
+
| `related_memories` | array | No | UUIDs of related memories for linking |
|
|
93
|
+
| `context` | object | No | Additional structured context (project, task, files) |
|
|
94
|
+
|
|
95
|
+
## File Organization
|
|
96
|
+
|
|
97
|
+
### Directory Structure
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
.feature-factory/memories/
|
|
101
|
+
├── episodic/ # Experience-based learnings
|
|
102
|
+
│ └── YYYY/
|
|
103
|
+
│ └── MM/
|
|
104
|
+
│ └── DD/
|
|
105
|
+
│ └── HH-mm-ss-{agent}-{type}.md
|
|
106
|
+
├── semantic/ # Factual knowledge
|
|
107
|
+
│ └── {category}/
|
|
108
|
+
│ └── {topic}-{uuid}.md
|
|
109
|
+
├── procedural/ # Skills and procedures
|
|
110
|
+
│ └── {type}/
|
|
111
|
+
│ └── {skill-name}-{version}.md
|
|
112
|
+
└── index/ # Search indices (auto-generated)
|
|
113
|
+
└── tags.json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Naming Conventions
|
|
117
|
+
|
|
118
|
+
**Episodic:**
|
|
119
|
+
|
|
120
|
+
- Format: `YYYY-MM-DD-HH-mm-ss-{agent}-{descriptor}.md`
|
|
121
|
+
- Example: `2026-02-02-14-30-00-building-oauth-implementation.md`
|
|
122
|
+
|
|
123
|
+
**Semantic:**
|
|
124
|
+
|
|
125
|
+
- Format: `{category}-{uuid}.md`
|
|
126
|
+
- Example: `react-server-components-550e8400-e29b-41d4-a716-446655440000.md`
|
|
127
|
+
|
|
128
|
+
**Procedural:**
|
|
129
|
+
|
|
130
|
+
- Format: `{skill-name}-{version}.md`
|
|
131
|
+
- Example: `nextauth-setup-v1.md`
|
|
132
|
+
|
|
133
|
+
## Tools
|
|
134
|
+
|
|
135
|
+
The ff-learning skill provides three tools for agents to interact with the memory system. These tools are especially important for **read-only agents** (like @planning and @reviewing) that cannot directly write files.
|
|
136
|
+
|
|
137
|
+
### Using the Tools
|
|
138
|
+
|
|
139
|
+
**For read-only agents:** Use the tool calls directly:
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
Store a learning using ff-learning-store tool:
|
|
143
|
+
|
|
144
|
+
- title: "OAuth Implementation Pattern"
|
|
145
|
+
- description: "Successfully implemented OAuth with NextAuth.js"
|
|
146
|
+
- memoryType: "semantic"
|
|
147
|
+
- tags: ["oauth", "nextauth", "authentication"]
|
|
148
|
+
- importance: 0.8
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**For agents with write permissions:** Can use either tools or direct file operations.
|
|
152
|
+
|
|
153
|
+
### Tool 1: Store Learning (ff-learning-store)
|
|
154
|
+
|
|
155
|
+
**Purpose:** Create a new memory file with proper frontmatter
|
|
156
|
+
|
|
157
|
+
**When to use:**
|
|
158
|
+
|
|
159
|
+
- At end of task completion
|
|
160
|
+
- When insight or pattern is discovered
|
|
161
|
+
- After error resolution
|
|
162
|
+
- When research findings are significant
|
|
163
|
+
|
|
164
|
+
**Input parameters:**
|
|
165
|
+
|
|
166
|
+
- `title` (string, required): Brief title for the learning
|
|
167
|
+
- `description` (string, required): Detailed description
|
|
168
|
+
- `memory_type` (enum, required): episodic, semantic, or procedural
|
|
169
|
+
- `tags` (array, required): Relevant keywords
|
|
170
|
+
- `importance` (float, required): 0.0 to 1.0
|
|
171
|
+
- `content` (string, optional): Additional markdown content
|
|
172
|
+
- `source` (enum, optional): Origin of the learning
|
|
173
|
+
- `related_memories` (array, optional): UUIDs of related memories
|
|
174
|
+
|
|
175
|
+
**Process:**
|
|
176
|
+
|
|
177
|
+
1. Generate UUID using `uuidgen` or similar
|
|
178
|
+
2. Get current timestamp in ISO 8601 format
|
|
179
|
+
3. Determine appropriate directory based on memory_type
|
|
180
|
+
4. Format frontmatter with all required fields
|
|
181
|
+
5. Write file to appropriate location
|
|
182
|
+
6. Return the file path
|
|
183
|
+
|
|
184
|
+
**Example:**
|
|
185
|
+
|
|
186
|
+
```markdown
|
|
187
|
+
## Store Learning Example
|
|
188
|
+
|
|
189
|
+
After implementing OAuth:
|
|
190
|
+
|
|
191
|
+
1. Generate UUID: `uuidgen` → `550e8400-e29b-41d4-a716-446655440000`
|
|
192
|
+
2. Create timestamp: `date -u +%Y-%m-%dT%H:%M:%SZ` → `2026-02-02T14:30:00Z`
|
|
193
|
+
3. Determine directory: `semantic/authentication/`
|
|
194
|
+
4. Write file: `semantic/authentication/oauth-implementation-550e8400.md`
|
|
195
|
+
5. Content includes frontmatter + detailed implementation notes
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Tool 2: Search Learnings
|
|
199
|
+
|
|
200
|
+
**Purpose:** Find relevant memories by keywords/tags
|
|
201
|
+
|
|
202
|
+
**When to use:**
|
|
203
|
+
|
|
204
|
+
- At start of new task (find related past work)
|
|
205
|
+
- When facing similar problem to previous one
|
|
206
|
+
- For context gathering before planning
|
|
207
|
+
- To avoid repeating mistakes
|
|
208
|
+
|
|
209
|
+
**Input parameters:**
|
|
210
|
+
|
|
211
|
+
- `query` (string, required): Search terms
|
|
212
|
+
- `tags` (array, optional): Filter by specific tags
|
|
213
|
+
- `memory_type` (enum, optional): Filter by type
|
|
214
|
+
- `agent_id` (string, optional): Filter by agent
|
|
215
|
+
- `limit` (number, optional): Max results (default: 10)
|
|
216
|
+
- `min_importance` (float, optional): Minimum importance threshold
|
|
217
|
+
|
|
218
|
+
**Process:**
|
|
219
|
+
|
|
220
|
+
1. Use `glob` to find all memory files: `.feature-factory/memories/**/*.md`
|
|
221
|
+
2. Read frontmatter from each file
|
|
222
|
+
3. Match against query (title, description, tags)
|
|
223
|
+
4. Apply filters (tags, type, agent, importance)
|
|
224
|
+
5. Sort by relevance and importance
|
|
225
|
+
6. Return array of matching memory metadata
|
|
226
|
+
|
|
227
|
+
**Example:**
|
|
228
|
+
|
|
229
|
+
```markdown
|
|
230
|
+
## Search Example
|
|
231
|
+
|
|
232
|
+
Before implementing authentication:
|
|
233
|
+
|
|
234
|
+
1. Search: `query: "OAuth", tags: ["authentication", "security"]`
|
|
235
|
+
2. Find: `semantic/authentication/oauth-implementation-550e8400.md`
|
|
236
|
+
3. Review: Read the memory to understand previous approach
|
|
237
|
+
4. Apply: Use lessons learned in new implementation
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Tool 3: Get Learning
|
|
241
|
+
|
|
242
|
+
**Purpose:** Retrieve full content of a specific memory
|
|
243
|
+
|
|
244
|
+
**When to use:**
|
|
245
|
+
|
|
246
|
+
- After search to read full details
|
|
247
|
+
- When referenced by ID in another memory
|
|
248
|
+
- For deep dive into specific learning
|
|
249
|
+
|
|
250
|
+
**Input parameters:**
|
|
251
|
+
|
|
252
|
+
- `memory_id` (string, optional): UUID of the memory
|
|
253
|
+
- `file_path` (string, optional): Direct path to memory file
|
|
254
|
+
|
|
255
|
+
**Process:**
|
|
256
|
+
|
|
257
|
+
1. If `memory_id` provided, search for file containing that ID
|
|
258
|
+
2. If `file_path` provided, read directly
|
|
259
|
+
3. Parse frontmatter and content
|
|
260
|
+
4. Return complete memory object
|
|
261
|
+
|
|
262
|
+
**Example:**
|
|
263
|
+
|
|
264
|
+
```markdown
|
|
265
|
+
## Get Learning Example
|
|
266
|
+
|
|
267
|
+
After finding a relevant memory:
|
|
268
|
+
|
|
269
|
+
1. Get by ID: `memory_id: "550e8400-e29b-41d4-a716-446655440000"`
|
|
270
|
+
2. Or get by path: `file_path: "semantic/authentication/oauth-implementation-550e8400.md"`
|
|
271
|
+
3. Read full content including implementation details
|
|
272
|
+
4. Apply learnings to current task
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## Additional Tools for Read-Only Agents
|
|
276
|
+
|
|
277
|
+
Since @planning and @reviewing agents are read-only (cannot write/edit files), the following tools are provided for essential file operations:
|
|
278
|
+
|
|
279
|
+
### Tool 4: Create Plan (ff-plan-create)
|
|
280
|
+
|
|
281
|
+
**Purpose:** Create a new implementation plan file in `.feature-factory/plans/`
|
|
282
|
+
|
|
283
|
+
**When to use:**
|
|
284
|
+
|
|
285
|
+
- At the end of planning sessions to document the plan
|
|
286
|
+
- When creating architecture or migration plans
|
|
287
|
+
- To document research findings as structured plans
|
|
288
|
+
|
|
289
|
+
**Input parameters:**
|
|
290
|
+
|
|
291
|
+
- `title` (string, required): Title of the plan
|
|
292
|
+
- `description` (string, required): What the plan covers
|
|
293
|
+
- `content` (string, required): Full markdown content
|
|
294
|
+
- `planType` (enum, required): implementation, architecture, migration, or research
|
|
295
|
+
- `relatedIssues` (array, optional): Related issue IDs
|
|
296
|
+
- `estimatedEffort` (string, optional): Time estimate
|
|
297
|
+
|
|
298
|
+
**Example:**
|
|
299
|
+
|
|
300
|
+
```markdown
|
|
301
|
+
Create plan using ff-plan-create:
|
|
302
|
+
|
|
303
|
+
- title: "OAuth Implementation Plan"
|
|
304
|
+
- description: "Plan for implementing OAuth authentication"
|
|
305
|
+
- content: "## Phase 1: Setup..."
|
|
306
|
+
- planType: "implementation"
|
|
307
|
+
- estimatedEffort: "2-3 hours"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Tool 5: Create Agent Context (ff-agent-context-create)
|
|
311
|
+
|
|
312
|
+
**Purpose:** Create a new agent context file in `.feature-factory/agents/`
|
|
313
|
+
|
|
314
|
+
**When to use:**
|
|
315
|
+
|
|
316
|
+
- At the start of EVERY agent task to document context
|
|
317
|
+
- When delegating work to track parent-child relationships
|
|
318
|
+
- To maintain agent state and progress
|
|
319
|
+
|
|
320
|
+
**Input parameters:**
|
|
321
|
+
|
|
322
|
+
- `id` (string, required): UUID for this agent instance
|
|
323
|
+
- `agent` (string, required): Agent type (planning, building, etc.)
|
|
324
|
+
- `title` (string, required): Task title
|
|
325
|
+
- `description` (string, required): Task description
|
|
326
|
+
- `status` (enum, optional): in-progress, completed, delegated, failed
|
|
327
|
+
- `parent` (string, optional): Parent agent UUID
|
|
328
|
+
- `delegatedTo` (array, optional): Child agent UUIDs
|
|
329
|
+
- `notes` (string, optional): Additional notes
|
|
330
|
+
|
|
331
|
+
**Example:**
|
|
332
|
+
|
|
333
|
+
```markdown
|
|
334
|
+
Create agent context using ff-agent-context-create:
|
|
335
|
+
|
|
336
|
+
- id: "550e8400-e29b-41d4-a716-446655440000"
|
|
337
|
+
- agent: "planning"
|
|
338
|
+
- title: "Implement OAuth"
|
|
339
|
+
- description: "Plan OAuth implementation for customer portal"
|
|
340
|
+
- status: "in-progress"
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Tool 6: Update Agent Context (ff-agent-context-update)
|
|
344
|
+
|
|
345
|
+
**Purpose:** Update an existing agent context file
|
|
346
|
+
|
|
347
|
+
**When to use:**
|
|
348
|
+
|
|
349
|
+
- When status changes (e.g., completed, delegated)
|
|
350
|
+
- When adding delegated child agents
|
|
351
|
+
- When appending progress updates or notes
|
|
352
|
+
|
|
353
|
+
**Input parameters:**
|
|
354
|
+
|
|
355
|
+
- `agentId` (string, required): Agent UUID to update
|
|
356
|
+
- `agent` (string, required): Agent type
|
|
357
|
+
- `status` (enum, optional): New status
|
|
358
|
+
- `addDelegatedTo` (string, optional): Add child agent UUID
|
|
359
|
+
- `notes` (string, optional): Notes to append
|
|
360
|
+
- `progressUpdate` (string, optional): Progress line to add
|
|
361
|
+
|
|
362
|
+
**Example:**
|
|
363
|
+
|
|
364
|
+
```markdown
|
|
365
|
+
Update agent context using ff-agent-context-update:
|
|
366
|
+
|
|
367
|
+
- agentId: "550e8400-e29b-41d4-a716-446655440000"
|
|
368
|
+
- agent: "planning"
|
|
369
|
+
- status: "completed"
|
|
370
|
+
- notes: "Planning finished successfully"
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
## Usage by Agent Type
|
|
374
|
+
|
|
375
|
+
### Planning Agent
|
|
376
|
+
|
|
377
|
+
**When to capture:**
|
|
378
|
+
|
|
379
|
+
- After completing planning session
|
|
380
|
+
- When architectural decisions are made
|
|
381
|
+
- When risks are identified
|
|
382
|
+
|
|
383
|
+
**What to capture:**
|
|
384
|
+
|
|
385
|
+
- Architecture decisions and rationale
|
|
386
|
+
- Risk factors and mitigation strategies
|
|
387
|
+
- Pattern discoveries from codebase exploration
|
|
388
|
+
- Estimation accuracy reflections
|
|
389
|
+
|
|
390
|
+
**Example workflow:**
|
|
391
|
+
|
|
392
|
+
```markdown
|
|
393
|
+
At end of planning session:
|
|
394
|
+
|
|
395
|
+
1. Reflect on what was learned
|
|
396
|
+
2. Store key insights:
|
|
397
|
+
- Architecture decisions made
|
|
398
|
+
- Risk factors identified
|
|
399
|
+
- Pattern discoveries
|
|
400
|
+
3. Tag with relevant keywords
|
|
401
|
+
4. Link related memories
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### Building Agent
|
|
405
|
+
|
|
406
|
+
**When to capture:**
|
|
407
|
+
|
|
408
|
+
- After implementing feature
|
|
409
|
+
- When technical challenge is overcome
|
|
410
|
+
- When error is resolved
|
|
411
|
+
- When new pattern is discovered
|
|
412
|
+
|
|
413
|
+
**What to capture:**
|
|
414
|
+
|
|
415
|
+
- Technical implementation details
|
|
416
|
+
- Code patterns and best practices
|
|
417
|
+
- Error resolutions and debugging steps
|
|
418
|
+
- Integration challenges and solutions
|
|
419
|
+
|
|
420
|
+
**Example workflow:**
|
|
421
|
+
|
|
422
|
+
```markdown
|
|
423
|
+
After implementing feature:
|
|
424
|
+
|
|
425
|
+
1. Document technical learnings
|
|
426
|
+
2. Store code patterns discovered
|
|
427
|
+
3. Record error resolutions
|
|
428
|
+
4. Tag with technology names
|
|
429
|
+
5. Link to related documentation
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Reviewing Agent
|
|
433
|
+
|
|
434
|
+
**When to capture:**
|
|
435
|
+
|
|
436
|
+
- After completing review
|
|
437
|
+
- When common issues are identified
|
|
438
|
+
- When quality patterns are observed
|
|
439
|
+
|
|
440
|
+
**What to capture:**
|
|
441
|
+
|
|
442
|
+
- Common issues and their solutions
|
|
443
|
+
- Quality patterns observed
|
|
444
|
+
- Review effectiveness insights
|
|
445
|
+
- Improvement recommendations
|
|
446
|
+
|
|
447
|
+
**Example workflow:**
|
|
448
|
+
|
|
449
|
+
```markdown
|
|
450
|
+
After completing review:
|
|
451
|
+
|
|
452
|
+
1. Summarize findings
|
|
453
|
+
2. Store patterns of issues found
|
|
454
|
+
3. Document effective review techniques
|
|
455
|
+
4. Tag with review type and categories
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Research Agent
|
|
459
|
+
|
|
460
|
+
**When to capture:**
|
|
461
|
+
|
|
462
|
+
- After completing research
|
|
463
|
+
- When significant findings are discovered
|
|
464
|
+
- When technology evaluation is complete
|
|
465
|
+
|
|
466
|
+
**What to capture:**
|
|
467
|
+
|
|
468
|
+
- Key findings and conclusions
|
|
469
|
+
- Technology comparisons
|
|
470
|
+
- Best practices discovered
|
|
471
|
+
- Source references and links
|
|
472
|
+
|
|
473
|
+
**Example workflow:**
|
|
474
|
+
|
|
475
|
+
```markdown
|
|
476
|
+
After completing research:
|
|
477
|
+
|
|
478
|
+
1. Store key findings as semantic memories
|
|
479
|
+
2. Tag with research topics
|
|
480
|
+
3. Link to sources
|
|
481
|
+
4. Set high importance for critical findings
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### Security Agent
|
|
485
|
+
|
|
486
|
+
**When to capture:**
|
|
487
|
+
|
|
488
|
+
- After security audit
|
|
489
|
+
- When vulnerabilities are found
|
|
490
|
+
- When security patterns are identified
|
|
491
|
+
|
|
492
|
+
**What to capture:**
|
|
493
|
+
|
|
494
|
+
- Vulnerability findings and fixes
|
|
495
|
+
- Security best practices
|
|
496
|
+
- Threat model insights
|
|
497
|
+
- Compliance considerations
|
|
498
|
+
|
|
499
|
+
**Example workflow:**
|
|
500
|
+
|
|
501
|
+
```markdown
|
|
502
|
+
After security audit:
|
|
503
|
+
|
|
504
|
+
1. Document vulnerabilities found
|
|
505
|
+
2. Store security best practices
|
|
506
|
+
3. Record threat model insights
|
|
507
|
+
4. Tag with security categories
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### Acceptance Agent
|
|
511
|
+
|
|
512
|
+
**When to capture:**
|
|
513
|
+
|
|
514
|
+
- After validating requirements
|
|
515
|
+
- When acceptance criteria insights are gained
|
|
516
|
+
- When requirement patterns are identified
|
|
517
|
+
|
|
518
|
+
**What to capture:**
|
|
519
|
+
|
|
520
|
+
- Requirement validation insights
|
|
521
|
+
- Acceptance criteria patterns
|
|
522
|
+
- Ambiguity resolutions
|
|
523
|
+
- Scope clarifications
|
|
524
|
+
|
|
525
|
+
**Example workflow:**
|
|
526
|
+
|
|
527
|
+
```markdown
|
|
528
|
+
After validating requirements:
|
|
529
|
+
|
|
530
|
+
1. Document requirement insights
|
|
531
|
+
2. Store acceptance criteria patterns
|
|
532
|
+
3. Record ambiguity resolutions
|
|
533
|
+
4. Tag with requirement types
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
## Integration with Other Skills
|
|
537
|
+
|
|
538
|
+
### With ff-delegation
|
|
539
|
+
|
|
540
|
+
- Store learnings from delegated agents
|
|
541
|
+
- Capture insights from parallel work
|
|
542
|
+
- Link related memories across agent boundaries
|
|
543
|
+
|
|
544
|
+
### With ff-todo-management
|
|
545
|
+
|
|
546
|
+
- Add "Capture learnings" as final todo item
|
|
547
|
+
- Track learning capture in todo list
|
|
548
|
+
- Ensure learnings are not forgotten
|
|
549
|
+
|
|
550
|
+
### With ff-mini-plan
|
|
551
|
+
|
|
552
|
+
- Search past learnings during planning
|
|
553
|
+
- Use previous patterns to inform new plans
|
|
554
|
+
- Store plan effectiveness as episodic memory
|
|
555
|
+
|
|
556
|
+
### With ff-report-templates
|
|
557
|
+
|
|
558
|
+
- Use standardized formats for memory content
|
|
559
|
+
- Include severity/confidence in technical learnings
|
|
560
|
+
- Apply report structure to procedural memories
|
|
561
|
+
|
|
562
|
+
## Best Practices
|
|
563
|
+
|
|
564
|
+
### Do:
|
|
565
|
+
|
|
566
|
+
- ✅ **Be specific** - Concrete details are more useful than generalities
|
|
567
|
+
- ✅ **Use consistent tags** - Establish tag conventions for your project
|
|
568
|
+
- ✅ **Set appropriate importance** - Reserve 0.8-1.0 for truly critical learnings
|
|
569
|
+
- ✅ **Link related memories** - Create connections between related learnings
|
|
570
|
+
- ✅ **Include context** - Project, task, and file context helps retrieval
|
|
571
|
+
- ✅ **Write searchable titles** - Use keywords that future you will search for
|
|
572
|
+
- ✅ **Capture failures too** - What didn't work is as valuable as what did
|
|
573
|
+
- ✅ **Review periodically** - Search old learnings before starting new tasks
|
|
574
|
+
|
|
575
|
+
### Don't:
|
|
576
|
+
|
|
577
|
+
- ❌ **Store everything** - Not every small change needs a memory
|
|
578
|
+
- ❌ **Use vague titles** - "Fixed bug" is not helpful; "Fixed race condition in auth middleware" is
|
|
579
|
+
- ❌ **Duplicate memories** - Search first to avoid redundancy
|
|
580
|
+
- ❌ **Forget tags** - Untagged memories are hard to find
|
|
581
|
+
- ❌ **Store secrets** - Never put credentials or sensitive data in memories
|
|
582
|
+
- ❌ **Be too brief** - One-line descriptions lack context
|
|
583
|
+
|
|
584
|
+
## Common Mistakes to Avoid
|
|
585
|
+
|
|
586
|
+
### Mistake 1: Not Searching First
|
|
587
|
+
|
|
588
|
+
**Problem:** Creating duplicate memories for the same learning
|
|
589
|
+
**Solution:** Always search before storing: `Search learnings with query and tags`
|
|
590
|
+
|
|
591
|
+
### Mistake 2: Poor Tagging
|
|
592
|
+
|
|
593
|
+
**Problem:** Memories can't be found later due to inconsistent or missing tags
|
|
594
|
+
**Solution:** Establish tag conventions: technology names, categories, project names
|
|
595
|
+
|
|
596
|
+
### Mistake 3: Wrong Memory Type
|
|
597
|
+
|
|
598
|
+
**Problem:** Using episodic for procedural knowledge or vice versa
|
|
599
|
+
**Solution:**
|
|
600
|
+
|
|
601
|
+
- Episodic = specific event/task
|
|
602
|
+
- Semantic = general knowledge
|
|
603
|
+
- Procedural = how-to guide
|
|
604
|
+
|
|
605
|
+
### Mistake 4: Missing Context
|
|
606
|
+
|
|
607
|
+
**Problem:** Memory lacks context to be useful later
|
|
608
|
+
**Solution:** Always include project, task, and relevant files in context field
|
|
609
|
+
|
|
610
|
+
### Mistake 5: Not Capturing Failures
|
|
611
|
+
|
|
612
|
+
**Problem:** Only storing successes, missing valuable failure lessons
|
|
613
|
+
**Solution:** Store what didn't work and why - prevents future repetition
|
|
614
|
+
|
|
615
|
+
## Example Memory Files
|
|
616
|
+
|
|
617
|
+
### Example 1: Episodic Memory
|
|
618
|
+
|
|
619
|
+
````markdown
|
|
620
|
+
---
|
|
621
|
+
id: '550e8400-e29b-41d4-a716-446655440000'
|
|
622
|
+
title: 'OAuth Implementation with NextAuth.js'
|
|
623
|
+
description: 'Successfully implemented OAuth authentication using NextAuth.js with Google provider. Encountered and resolved CSRF token issues.'
|
|
624
|
+
date: '2026-02-02T14:30:00Z'
|
|
625
|
+
memory_type: 'episodic'
|
|
626
|
+
agent_id: 'building'
|
|
627
|
+
importance: 0.8
|
|
628
|
+
tags: ['oauth', 'nextauth', 'authentication', 'nextjs', 'csrf']
|
|
629
|
+
source: 'implementation'
|
|
630
|
+
context:
|
|
631
|
+
project: 'customer-portal'
|
|
632
|
+
task: 'Implement Google OAuth'
|
|
633
|
+
files: ['app/api/auth/[...nextauth]/route.ts', 'lib/auth.ts']
|
|
634
|
+
---
|
|
635
|
+
|
|
636
|
+
## Implementation Details
|
|
637
|
+
|
|
638
|
+
### What Worked
|
|
639
|
+
|
|
640
|
+
1. Using NextAuth.js with Google provider
|
|
641
|
+
2. Configuring callback URLs properly
|
|
642
|
+
3. Storing user data in Supabase after OAuth
|
|
643
|
+
|
|
644
|
+
### Challenges Faced
|
|
645
|
+
|
|
646
|
+
1. **CSRF Token Mismatch**
|
|
647
|
+
- Issue: State parameter not being validated
|
|
648
|
+
- Solution: Added explicit state parameter in OAuth config
|
|
649
|
+
- Code: See lib/auth.ts lines 45-52
|
|
650
|
+
|
|
651
|
+
2. **Session Persistence**
|
|
652
|
+
- Issue: Sessions not persisting across page reloads
|
|
653
|
+
- Solution: Configured JWT strategy with database persistence
|
|
654
|
+
|
|
655
|
+
### Key Code Pattern
|
|
656
|
+
|
|
657
|
+
```typescript
|
|
658
|
+
// Always include state parameter for CSRF protection
|
|
659
|
+
providers: [
|
|
660
|
+
GoogleProvider({
|
|
661
|
+
clientId: process.env.GOOGLE_CLIENT_ID!,
|
|
662
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
|
|
663
|
+
authorization: {
|
|
664
|
+
params: {
|
|
665
|
+
state: generateState(),
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
}),
|
|
669
|
+
],
|
|
670
|
+
```
|
|
671
|
+
````
|
|
672
|
+
|
|
673
|
+
### Lessons Learned
|
|
674
|
+
|
|
675
|
+
- Always validate state parameter in OAuth flows
|
|
676
|
+
- Test session persistence across page reloads
|
|
677
|
+
- Use JWT strategy for serverless environments
|
|
678
|
+
|
|
679
|
+
````
|
|
680
|
+
|
|
681
|
+
### Example 2: Semantic Memory
|
|
682
|
+
|
|
683
|
+
```markdown
|
|
684
|
+
---
|
|
685
|
+
id: '6ba7b810-9dad-11d1-80b4-00c04fd430c8'
|
|
686
|
+
title: 'React Server Components Data Fetching'
|
|
687
|
+
description: 'Understanding when and how to fetch data in React Server Components vs Client Components'
|
|
688
|
+
date: '2026-02-01T10:00:00Z'
|
|
689
|
+
memory_type: 'semantic'
|
|
690
|
+
agent_id: 'research'
|
|
691
|
+
importance: 0.9
|
|
692
|
+
tags: ['react', 'server-components', 'data-fetching', 'nextjs', 'patterns']
|
|
693
|
+
source: 'research'
|
|
694
|
+
related_memories: ['550e8400-e29b-41d4-a716-446655440000']
|
|
695
|
+
---
|
|
696
|
+
|
|
697
|
+
## Key Concepts
|
|
698
|
+
|
|
699
|
+
### Server Components
|
|
700
|
+
|
|
701
|
+
- Can be async functions
|
|
702
|
+
- Can fetch data directly
|
|
703
|
+
- Run on server only
|
|
704
|
+
- Cannot use useState, useEffect, or browser APIs
|
|
705
|
+
|
|
706
|
+
### Client Components
|
|
707
|
+
|
|
708
|
+
- Must use 'use client' directive
|
|
709
|
+
- Cannot be async
|
|
710
|
+
- Use useEffect for data fetching
|
|
711
|
+
- Can use all React hooks and browser APIs
|
|
712
|
+
|
|
713
|
+
### Best Practices
|
|
714
|
+
|
|
715
|
+
1. **Fetch in Server Components when possible**
|
|
716
|
+
- Better performance
|
|
717
|
+
- Reduced client-side JavaScript
|
|
718
|
+
- Direct database access
|
|
719
|
+
|
|
720
|
+
2. **Use Client Components for interactivity**
|
|
721
|
+
- Forms with validation
|
|
722
|
+
- Real-time updates
|
|
723
|
+
- Browser-only features
|
|
724
|
+
|
|
725
|
+
3. **Pass data as props**
|
|
726
|
+
- Server Component fetches data
|
|
727
|
+
- Passes to Client Component as props
|
|
728
|
+
- Client Component handles interactivity
|
|
729
|
+
|
|
730
|
+
### Code Example
|
|
731
|
+
|
|
732
|
+
```typescript
|
|
733
|
+
// Server Component (app/page.tsx)
|
|
734
|
+
async function Page() {
|
|
735
|
+
const data = await fetchData(); // Direct fetch
|
|
736
|
+
return <ClientComponent initialData={data} />;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
// Client Component (components/ClientComponent.tsx)
|
|
740
|
+
'use client';
|
|
741
|
+
|
|
742
|
+
function ClientComponent({ initialData }) {
|
|
743
|
+
const [data, setData] = useState(initialData);
|
|
744
|
+
// Handle interactivity...
|
|
745
|
+
}
|
|
746
|
+
````
|
|
747
|
+
|
|
748
|
+
````
|
|
749
|
+
|
|
750
|
+
### Example 3: Procedural Memory
|
|
751
|
+
|
|
752
|
+
```markdown
|
|
753
|
+
---
|
|
754
|
+
id: '6ba7b811-9dad-11d1-80b4-00c04fd430c8'
|
|
755
|
+
title: 'Setting Up Feature Factory in New Project'
|
|
756
|
+
description: 'Step-by-step procedure for installing and configuring Feature Factory in a new codebase'
|
|
757
|
+
date: '2026-01-15T09:00:00Z'
|
|
758
|
+
memory_type: 'procedural'
|
|
759
|
+
agent_id: 'building'
|
|
760
|
+
importance: 0.7
|
|
761
|
+
tags: ['feature-factory', 'setup', 'installation', 'configuration']
|
|
762
|
+
source: 'implementation'
|
|
763
|
+
---
|
|
764
|
+
|
|
765
|
+
## Prerequisites
|
|
766
|
+
|
|
767
|
+
- Node.js 18+
|
|
768
|
+
- Git repository initialized
|
|
769
|
+
- opencode CLI installed
|
|
770
|
+
|
|
771
|
+
## Steps
|
|
772
|
+
|
|
773
|
+
### 1. Install Plugin
|
|
774
|
+
|
|
775
|
+
```bash
|
|
776
|
+
cd packages/opencode-plugin
|
|
777
|
+
npm install
|
|
778
|
+
npm run build
|
|
779
|
+
````
|
|
780
|
+
|
|
781
|
+
### 2. Configure Agents
|
|
782
|
+
|
|
783
|
+
Create `.config/opencode/agents/` directory and copy agent files:
|
|
784
|
+
|
|
785
|
+
```bash
|
|
786
|
+
mkdir -p .config/opencode/agents
|
|
787
|
+
cp -r packages/opencode-plugin/agents/* .config/opencode/agents/
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
### 3. Configure Skills
|
|
791
|
+
|
|
792
|
+
Create `.config/opencode/skills/` directory and copy skill files:
|
|
793
|
+
|
|
794
|
+
```bash
|
|
795
|
+
mkdir -p .config/opencode/skills
|
|
796
|
+
cp -r packages/opencode-plugin/skills/* .config/opencode/skills/
|
|
797
|
+
```
|
|
798
|
+
|
|
799
|
+
### 4. Initialize Feature Factory
|
|
800
|
+
|
|
801
|
+
```bash
|
|
802
|
+
npx ff-setup
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
### 5. Verify Setup
|
|
806
|
+
|
|
807
|
+
```bash
|
|
808
|
+
npx ff-doctor
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
## Common Issues
|
|
812
|
+
|
|
813
|
+
### Issue: Agents not found
|
|
814
|
+
|
|
815
|
+
**Solution:** Check that agent files are in `.config/opencode/agents/`
|
|
816
|
+
|
|
817
|
+
### Issue: Skills not loading
|
|
818
|
+
|
|
819
|
+
**Solution:** Verify skill files have proper frontmatter
|
|
820
|
+
|
|
821
|
+
## Next Steps
|
|
822
|
+
|
|
823
|
+
- Read `docs/GETTING_STARTED.md`
|
|
824
|
+
- Try running `@planning` agent
|
|
825
|
+
- Create your first feature plan
|
|
826
|
+
|
|
827
|
+
````
|
|
828
|
+
|
|
829
|
+
## Quick Reference
|
|
830
|
+
|
|
831
|
+
### Creating a Memory
|
|
832
|
+
|
|
833
|
+
1. Generate UUID: `uuidgen`
|
|
834
|
+
2. Get timestamp: `date -u +%Y-%m-%dT%H:%M:%SZ`
|
|
835
|
+
3. Choose directory based on type
|
|
836
|
+
4. Write file with frontmatter + content
|
|
837
|
+
5. Include tags for searchability
|
|
838
|
+
|
|
839
|
+
### Searching Memories
|
|
840
|
+
|
|
841
|
+
```markdown
|
|
842
|
+
Search learnings:
|
|
843
|
+
- query: "authentication"
|
|
844
|
+
- tags: ["oauth", "security"]
|
|
845
|
+
- memory_type: "semantic"
|
|
846
|
+
- limit: 5
|
|
847
|
+
````
|
|
848
|
+
|
|
849
|
+
### Memory Checklist
|
|
850
|
+
|
|
851
|
+
Before storing a memory, verify:
|
|
852
|
+
|
|
853
|
+
- [ ] UUID is unique
|
|
854
|
+
- [ ] Title is descriptive and searchable
|
|
855
|
+
- [ ] Description explains what was learned
|
|
856
|
+
- [ ] Date is ISO 8601 format
|
|
857
|
+
- [ ] Memory type is correct
|
|
858
|
+
- [ ] Agent ID is set
|
|
859
|
+
- [ ] Importance is appropriate (0.0-1.0)
|
|
860
|
+
- [ ] Tags are relevant and consistent
|
|
861
|
+
- [ ] Context includes project/task/files
|
|
862
|
+
- [ ] No sensitive data included
|