@thierrynakoa/fire-flow 10.0.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/.claude-plugin/plugin.json +64 -0
- package/ARCHITECTURE-DIAGRAM.md +440 -0
- package/COMMAND-REFERENCE.md +172 -0
- package/DOMINION-FLOW-OVERVIEW.md +421 -0
- package/LICENSE +21 -0
- package/QUICK-START.md +351 -0
- package/README.md +398 -0
- package/TROUBLESHOOTING.md +264 -0
- package/agents/fire-codebase-mapper.md +484 -0
- package/agents/fire-debugger.md +535 -0
- package/agents/fire-executor.md +949 -0
- package/agents/fire-fact-checker.md +276 -0
- package/agents/fire-learncoding-explainer.md +237 -0
- package/agents/fire-learncoding-walker.md +147 -0
- package/agents/fire-planner.md +675 -0
- package/agents/fire-project-researcher.md +155 -0
- package/agents/fire-research-synthesizer.md +166 -0
- package/agents/fire-researcher.md +723 -0
- package/agents/fire-reviewer.md +499 -0
- package/agents/fire-roadmapper.md +203 -0
- package/agents/fire-verifier.md +880 -0
- package/bin/cli.js +208 -0
- package/commands/fire-0-orient.md +476 -0
- package/commands/fire-1-new.md +281 -0
- package/commands/fire-1a-discuss.md +455 -0
- package/commands/fire-2-plan.md +527 -0
- package/commands/fire-3-execute.md +1303 -0
- package/commands/fire-4-verify.md +845 -0
- package/commands/fire-5-handoff.md +515 -0
- package/commands/fire-6-resume.md +501 -0
- package/commands/fire-7-review.md +409 -0
- package/commands/fire-add-new-skill.md +598 -0
- package/commands/fire-analytics.md +499 -0
- package/commands/fire-assumptions.md +78 -0
- package/commands/fire-autonomous.md +528 -0
- package/commands/fire-brainstorm.md +413 -0
- package/commands/fire-complete-milestone.md +270 -0
- package/commands/fire-dashboard.md +375 -0
- package/commands/fire-debug.md +663 -0
- package/commands/fire-discover.md +616 -0
- package/commands/fire-double-check.md +460 -0
- package/commands/fire-execute-plan.md +182 -0
- package/commands/fire-learncoding.md +242 -0
- package/commands/fire-loop-resume.md +272 -0
- package/commands/fire-loop-stop.md +198 -0
- package/commands/fire-loop.md +1168 -0
- package/commands/fire-map-codebase.md +313 -0
- package/commands/fire-new-milestone.md +356 -0
- package/commands/fire-reflect.md +235 -0
- package/commands/fire-research.md +246 -0
- package/commands/fire-search.md +330 -0
- package/commands/fire-security-audit-repo.md +293 -0
- package/commands/fire-security-scan.md +484 -0
- package/commands/fire-session-summary.md +252 -0
- package/commands/fire-skills-diff.md +506 -0
- package/commands/fire-skills-history.md +388 -0
- package/commands/fire-skills-rollback.md +408 -0
- package/commands/fire-skills-sync.md +470 -0
- package/commands/fire-test.md +520 -0
- package/commands/fire-todos.md +335 -0
- package/commands/fire-transition.md +186 -0
- package/commands/fire-update.md +312 -0
- package/commands/fire-verify-uat.md +146 -0
- package/commands/fire-vuln-scan.md +493 -0
- package/hooks/hooks.json +16 -0
- package/hooks/run-hook.cmd +69 -0
- package/hooks/run-hook.sh +8 -0
- package/hooks/run-session-end.cmd +49 -0
- package/hooks/run-session-end.sh +7 -0
- package/hooks/session-end.sh +90 -0
- package/hooks/session-start.sh +111 -0
- package/package.json +52 -0
- package/plugin.json +7 -0
- package/references/auto-skill-extraction.md +136 -0
- package/references/behavioral-directives.md +365 -0
- package/references/blocker-tracking.md +155 -0
- package/references/checkpoints.md +165 -0
- package/references/circuit-breaker.md +410 -0
- package/references/context-engineering.md +587 -0
- package/references/decision-time-guidance.md +289 -0
- package/references/error-classification.md +326 -0
- package/references/execution-mode-intelligence.md +242 -0
- package/references/git-integration.md +217 -0
- package/references/honesty-protocols.md +304 -0
- package/references/integration-architecture.md +470 -0
- package/references/issue-to-pr-pipeline.md +150 -0
- package/references/metrics-and-trends.md +234 -0
- package/references/playwright-e2e-testing.md +326 -0
- package/references/questioning.md +125 -0
- package/references/research-improvements.md +110 -0
- package/references/skills-usage-guide.md +429 -0
- package/references/tdd.md +131 -0
- package/references/testing-enforcement.md +192 -0
- package/references/ui-brand.md +383 -0
- package/references/validation-checklist.md +456 -0
- package/references/verification-patterns.md +187 -0
- package/references/warrior-principles.md +173 -0
- package/skills-library/SKILLS-INDEX.md +588 -0
- package/skills-library/_general/frontend/html-visual-reports.md +292 -0
- package/skills-library/_general/methodology/debug-swarm-researcher-escape-hatch.md +240 -0
- package/skills-library/_general/methodology/learncoding-agentic-pattern.md +114 -0
- package/skills-library/_general/methodology/shell-autonomous-loop-fixplan.md +238 -0
- package/skills-library/basics/api-rest-basics.md +162 -0
- package/skills-library/basics/env-variables.md +96 -0
- package/skills-library/basics/error-handling-basics.md +125 -0
- package/skills-library/basics/git-commit-conventions.md +106 -0
- package/skills-library/basics/readme-template.md +108 -0
- package/skills-library/common-tasks/async-await-patterns.md +157 -0
- package/skills-library/common-tasks/auth-jwt-basics.md +164 -0
- package/skills-library/common-tasks/database-schema-design.md +166 -0
- package/skills-library/common-tasks/file-upload-basics.md +166 -0
- package/skills-library/common-tasks/form-validation.md +159 -0
- package/skills-library/debugging/FAILURE_TAXONOMY_CLASSIFICATION.md +117 -0
- package/skills-library/debugging/THREE_AGENT_HYPOTHESIS_DEBUGGING.md +86 -0
- package/skills-library/methodology/BREATH_BASED_PARALLEL_EXECUTION.md +678 -0
- package/skills-library/methodology/CONFIDENCE_GATED_EXECUTION.md +243 -0
- package/skills-library/methodology/EVIDENCE_BASED_VALIDATION.md +308 -0
- package/skills-library/methodology/MULTI_PERSPECTIVE_CODE_REVIEW.md +330 -0
- package/skills-library/methodology/PATH_VERIFICATION_GATE.md +211 -0
- package/skills-library/methodology/REFLEXION_MEMORY_PATTERN.md +183 -0
- package/skills-library/methodology/RESEARCH_BACKED_WORKFLOW_UPGRADE.md +263 -0
- package/skills-library/methodology/SABBATH_REST_PATTERN.md +267 -0
- package/skills-library/methodology/STONE_AND_SCAFFOLD.md +220 -0
- package/skills-library/performance/cache-augmented-generation.md +172 -0
- package/skills-library/quality-safety/debugging-steps.md +147 -0
- package/skills-library/quality-safety/deployment-checklist.md +155 -0
- package/skills-library/quality-safety/security-checklist.md +204 -0
- package/skills-library/quality-safety/testing-basics.md +180 -0
- package/skills-library/security/agent-security-scanner.md +445 -0
- package/skills-library/specialists/api-architecture/api-designer.md +49 -0
- package/skills-library/specialists/api-architecture/graphql-architect.md +49 -0
- package/skills-library/specialists/api-architecture/mcp-developer.md +51 -0
- package/skills-library/specialists/api-architecture/microservices-architect.md +50 -0
- package/skills-library/specialists/api-architecture/websocket-engineer.md +48 -0
- package/skills-library/specialists/backend/django-expert.md +52 -0
- package/skills-library/specialists/backend/fastapi-expert.md +52 -0
- package/skills-library/specialists/backend/laravel-specialist.md +52 -0
- package/skills-library/specialists/backend/nestjs-expert.md +51 -0
- package/skills-library/specialists/backend/rails-expert.md +53 -0
- package/skills-library/specialists/backend/spring-boot-engineer.md +56 -0
- package/skills-library/specialists/data-ml/fine-tuning-expert.md +48 -0
- package/skills-library/specialists/data-ml/ml-pipeline.md +47 -0
- package/skills-library/specialists/data-ml/pandas-pro.md +47 -0
- package/skills-library/specialists/data-ml/rag-architect.md +51 -0
- package/skills-library/specialists/data-ml/spark-engineer.md +47 -0
- package/skills-library/specialists/frontend/angular-architect.md +52 -0
- package/skills-library/specialists/frontend/flutter-expert.md +51 -0
- package/skills-library/specialists/frontend/nextjs-developer.md +54 -0
- package/skills-library/specialists/frontend/react-native-expert.md +50 -0
- package/skills-library/specialists/frontend/vue-expert.md +51 -0
- package/skills-library/specialists/infrastructure/chaos-engineer.md +74 -0
- package/skills-library/specialists/infrastructure/cloud-architect.md +70 -0
- package/skills-library/specialists/infrastructure/database-optimizer.md +64 -0
- package/skills-library/specialists/infrastructure/devops-engineer.md +70 -0
- package/skills-library/specialists/infrastructure/kubernetes-specialist.md +52 -0
- package/skills-library/specialists/infrastructure/monitoring-expert.md +70 -0
- package/skills-library/specialists/infrastructure/sre-engineer.md +70 -0
- package/skills-library/specialists/infrastructure/terraform-engineer.md +51 -0
- package/skills-library/specialists/languages/cpp-pro.md +74 -0
- package/skills-library/specialists/languages/csharp-developer.md +69 -0
- package/skills-library/specialists/languages/dotnet-core-expert.md +54 -0
- package/skills-library/specialists/languages/golang-pro.md +51 -0
- package/skills-library/specialists/languages/java-architect.md +49 -0
- package/skills-library/specialists/languages/javascript-pro.md +68 -0
- package/skills-library/specialists/languages/kotlin-specialist.md +68 -0
- package/skills-library/specialists/languages/php-pro.md +49 -0
- package/skills-library/specialists/languages/python-pro.md +52 -0
- package/skills-library/specialists/languages/react-expert.md +51 -0
- package/skills-library/specialists/languages/rust-engineer.md +50 -0
- package/skills-library/specialists/languages/sql-pro.md +56 -0
- package/skills-library/specialists/languages/swift-expert.md +69 -0
- package/skills-library/specialists/languages/typescript-pro.md +51 -0
- package/skills-library/specialists/platform/atlassian-mcp.md +52 -0
- package/skills-library/specialists/platform/embedded-systems.md +53 -0
- package/skills-library/specialists/platform/game-developer.md +53 -0
- package/skills-library/specialists/platform/salesforce-developer.md +53 -0
- package/skills-library/specialists/platform/shopify-expert.md +49 -0
- package/skills-library/specialists/platform/wordpress-pro.md +49 -0
- package/skills-library/specialists/quality/code-documenter.md +51 -0
- package/skills-library/specialists/quality/code-reviewer.md +67 -0
- package/skills-library/specialists/quality/debugging-wizard.md +51 -0
- package/skills-library/specialists/quality/fullstack-guardian.md +51 -0
- package/skills-library/specialists/quality/legacy-modernizer.md +50 -0
- package/skills-library/specialists/quality/playwright-expert.md +65 -0
- package/skills-library/specialists/quality/spec-miner.md +56 -0
- package/skills-library/specialists/quality/test-master.md +65 -0
- package/skills-library/specialists/security/secure-code-guardian.md +55 -0
- package/skills-library/specialists/security/security-reviewer.md +53 -0
- package/skills-library/specialists/workflow/architecture-designer.md +53 -0
- package/skills-library/specialists/workflow/cli-developer.md +70 -0
- package/skills-library/specialists/workflow/feature-forge.md +65 -0
- package/skills-library/specialists/workflow/prompt-engineer.md +54 -0
- package/skills-library/specialists/workflow/the-fool.md +62 -0
- package/templates/ASSUMPTIONS.md +125 -0
- package/templates/BLOCKERS.md +73 -0
- package/templates/DECISION_LOG.md +116 -0
- package/templates/UAT.md +96 -0
- package/templates/blueprint.md +94 -0
- package/templates/brainstorm.md +185 -0
- package/templates/conscience.md +92 -0
- package/templates/fire-handoff.md +159 -0
- package/templates/metrics.md +67 -0
- package/templates/phase-prompt.md +142 -0
- package/templates/record.md +131 -0
- package/templates/review-report.md +117 -0
- package/templates/skills-index.md +157 -0
- package/templates/verification.md +149 -0
- package/templates/vision.md +79 -0
- package/validation-config.yml +793 -0
- package/version.json +7 -0
- package/workflows/execute-phase.md +732 -0
- package/workflows/handoff-session.md +678 -0
- package/workflows/new-project.md +578 -0
- package/workflows/plan-phase.md +592 -0
- package/workflows/verify-phase.md +874 -0
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: AI-powered pattern discovery and skill suggestions
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /fire-discover
|
|
6
|
+
|
|
7
|
+
> AI-powered pattern discovery and skill suggestion engine
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Analyze completed work to detect recurring patterns, problem-solving approaches, and common solutions that could become reusable skills. Automatically suggests creating new skills or updating existing ones based on observed patterns. Helps compound knowledge across projects.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Arguments
|
|
18
|
+
|
|
19
|
+
| Argument | Required | Description |
|
|
20
|
+
|----------|----------|-------------|
|
|
21
|
+
| `--phase [N]` | No | Analyze specific phase (default: most recent completed) |
|
|
22
|
+
| `--weekly` | No | Generate weekly pattern summary |
|
|
23
|
+
| `--auto` | No | Non-interactive mode, auto-defer all suggestions |
|
|
24
|
+
| `--depth [level]` | No | Analysis depth: `shallow`, `normal`, `deep` (default: normal) |
|
|
25
|
+
| `--export [format]` | No | Export findings as `md` or `json` |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Process
|
|
30
|
+
|
|
31
|
+
### Step 1: Gather Analysis Data
|
|
32
|
+
|
|
33
|
+
Collect data from completed work.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Data sources for pattern detection
|
|
37
|
+
SUMMARIES=".planning/phases/*/RECORD.md"
|
|
38
|
+
COMMITS=$(git log --oneline --since="7 days ago")
|
|
39
|
+
CHANGED_FILES=$(git diff --stat HEAD~20..HEAD)
|
|
40
|
+
CODE_COMMENTS=$(grep -r "// tricky\|// hard\|// discovered\|// pattern" src/)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Sources analyzed:
|
|
44
|
+
- **RECORD.md files** - Skills applied, problems solved, decisions made
|
|
45
|
+
- **Git commits** - Commit messages indicating patterns or solutions
|
|
46
|
+
- **Code comments** - Developer annotations about non-obvious solutions
|
|
47
|
+
- **File changes** - Structural patterns in code organization
|
|
48
|
+
- **Test files** - Testing patterns and edge cases handled
|
|
49
|
+
|
|
50
|
+
### Step 2: Pattern Detection
|
|
51
|
+
|
|
52
|
+
Identify recurring patterns using multiple detection methods.
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Detection Methods:
|
|
56
|
+
|
|
57
|
+
1. Code Pattern Analysis (via AST concepts)
|
|
58
|
+
- Function signatures that repeat
|
|
59
|
+
- Similar error handling approaches
|
|
60
|
+
- Common utility patterns
|
|
61
|
+
- Component structure templates
|
|
62
|
+
|
|
63
|
+
2. Problem-Solving Approaches (from commits)
|
|
64
|
+
- "fix:" commits that address similar issues
|
|
65
|
+
- Refactoring patterns that repeat
|
|
66
|
+
- Performance optimization techniques
|
|
67
|
+
- Security hardening approaches
|
|
68
|
+
|
|
69
|
+
3. Frequency Analysis
|
|
70
|
+
- Code snippets that appear 3+ times
|
|
71
|
+
- Similar file structures
|
|
72
|
+
- Repeated import patterns
|
|
73
|
+
- Common configuration shapes
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 3: Generate Suggestions
|
|
77
|
+
|
|
78
|
+
Create actionable suggestions for skill creation or updates.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Suggestion Types:
|
|
82
|
+
|
|
83
|
+
1. NEW SKILL - Pattern not in library
|
|
84
|
+
- Generate skill document template
|
|
85
|
+
- Pre-fill with detected examples
|
|
86
|
+
- Suggest category placement
|
|
87
|
+
|
|
88
|
+
2. UPDATE SKILL - Variation of existing skill
|
|
89
|
+
- Identify which skill to update
|
|
90
|
+
- Show differences/improvements
|
|
91
|
+
- Propose merged content
|
|
92
|
+
|
|
93
|
+
3. COMPOUND SKILL - Skills frequently used together
|
|
94
|
+
- Identify co-occurring skills
|
|
95
|
+
- Suggest bundled workflow skill
|
|
96
|
+
- Document integration points
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Step 4: Display Discoveries
|
|
100
|
+
|
|
101
|
+
#### Default Mode (Interactive)
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
105
|
+
POWER ► DISCOVER
|
|
106
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
107
|
+
|
|
108
|
+
◆ Analyzing Phase 3 patterns...
|
|
109
|
+
├─ ✓ Loaded 6 RECORD.md files
|
|
110
|
+
├─ ✓ Analyzed 24 commits
|
|
111
|
+
├─ ✓ Scanned 156 changed files
|
|
112
|
+
├─ ✓ Found 8 annotated code patterns
|
|
113
|
+
└─ ✓ Pattern detection complete
|
|
114
|
+
|
|
115
|
+
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
116
|
+
║ PATTERN DISCOVERIES ║
|
|
117
|
+
╠══════════════════════════════════════════════════════════════════════════════╣
|
|
118
|
+
║ ║
|
|
119
|
+
║ Patterns Detected: 5 ║
|
|
120
|
+
║ New Skill Candidates: 2 ║
|
|
121
|
+
║ Skill Updates: 2 ║
|
|
122
|
+
║ Compound Skills: 1 ║
|
|
123
|
+
║ ║
|
|
124
|
+
╚══════════════════════════════════════════════════════════════════════════════╝
|
|
125
|
+
|
|
126
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
127
|
+
│ DISCOVERY #1: NEW SKILL CANDIDATE │
|
|
128
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
129
|
+
│ │
|
|
130
|
+
│ Pattern: Retry with Exponential Backoff │
|
|
131
|
+
│ Category: api-patterns │
|
|
132
|
+
│ Confidence: HIGH (found in 5 locations) │
|
|
133
|
+
│ │
|
|
134
|
+
│ Evidence: │
|
|
135
|
+
│ ├─ server/services/embedding.service.ts:45-67 │
|
|
136
|
+
│ ├─ server/services/rag.service.ts:112-134 │
|
|
137
|
+
│ ├─ server/services/youtube.service.ts:78-95 │
|
|
138
|
+
│ ├─ server/routes/chat.ts:156-178 │
|
|
139
|
+
│ └─ Commit: "feat: add retry logic to API calls" │
|
|
140
|
+
│ │
|
|
141
|
+
│ Detected Pattern: │
|
|
142
|
+
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
143
|
+
│ │ async function withRetry<T>( │ │
|
|
144
|
+
│ │ fn: () => Promise<T>, │ │
|
|
145
|
+
│ │ maxAttempts = 3, │ │
|
|
146
|
+
│ │ baseDelay = 1000 │ │
|
|
147
|
+
│ │ ): Promise<T> { │ │
|
|
148
|
+
│ │ for (let attempt = 1; attempt <= maxAttempts; attempt++) { │ │
|
|
149
|
+
│ │ try { │ │
|
|
150
|
+
│ │ return await fn(); │ │
|
|
151
|
+
│ │ } catch (error) { │ │
|
|
152
|
+
│ │ if (attempt === maxAttempts) throw error; │ │
|
|
153
|
+
│ │ await sleep(baseDelay * Math.pow(2, attempt - 1)); │ │
|
|
154
|
+
│ │ } │ │
|
|
155
|
+
│ │ } │ │
|
|
156
|
+
│ │ } │ │
|
|
157
|
+
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
158
|
+
│ │
|
|
159
|
+
│ No existing skill matches this pattern. │
|
|
160
|
+
│ │
|
|
161
|
+
│ Actions: │
|
|
162
|
+
│ [C] Create skill: api-patterns/retry-exponential-backoff │
|
|
163
|
+
│ [D] Defer (add to backlog) │
|
|
164
|
+
│ [I] Ignore (not worth capturing) │
|
|
165
|
+
│ │
|
|
166
|
+
│ Your choice: _ │
|
|
167
|
+
│ │
|
|
168
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
169
|
+
|
|
170
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
171
|
+
│ DISCOVERY #2: NEW SKILL CANDIDATE │
|
|
172
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
173
|
+
│ │
|
|
174
|
+
│ Pattern: Prisma Transaction with Rollback │
|
|
175
|
+
│ Category: database-solutions │
|
|
176
|
+
│ Confidence: MEDIUM (found in 3 locations) │
|
|
177
|
+
│ │
|
|
178
|
+
│ Evidence: │
|
|
179
|
+
│ ├─ server/services/discovery.service.ts:234-267 │
|
|
180
|
+
│ ├─ server/services/embedding.service.ts:189-215 │
|
|
181
|
+
│ └─ server/scripts/ingest-kjv.ts:145-178 │
|
|
182
|
+
│ │
|
|
183
|
+
│ Detected Pattern: │
|
|
184
|
+
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
185
|
+
│ │ await prisma.$transaction(async (tx) => { │ │
|
|
186
|
+
│ │ // Atomic operations │ │
|
|
187
|
+
│ │ const result = await tx.model.create({ ... }); │ │
|
|
188
|
+
│ │ await tx.related.createMany({ ... }); │ │
|
|
189
|
+
│ │ // Auto-rollback on any error │ │
|
|
190
|
+
│ │ return result; │ │
|
|
191
|
+
│ │ }, { │ │
|
|
192
|
+
│ │ maxWait: 5000, │ │
|
|
193
|
+
│ │ timeout: 10000, │ │
|
|
194
|
+
│ │ isolationLevel: 'Serializable' │ │
|
|
195
|
+
│ │ }); │ │
|
|
196
|
+
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
197
|
+
│ │
|
|
198
|
+
│ Similar to: database-solutions/transactions (but Prisma-specific) │
|
|
199
|
+
│ │
|
|
200
|
+
│ Actions: │
|
|
201
|
+
│ [C] Create skill: database-solutions/prisma-transactions │
|
|
202
|
+
│ [U] Update existing: database-solutions/transactions │
|
|
203
|
+
│ [D] Defer (add to backlog) │
|
|
204
|
+
│ [I] Ignore │
|
|
205
|
+
│ │
|
|
206
|
+
│ Your choice: _ │
|
|
207
|
+
│ │
|
|
208
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
209
|
+
|
|
210
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
211
|
+
│ DISCOVERY #3: SKILL UPDATE SUGGESTION │
|
|
212
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
213
|
+
│ │
|
|
214
|
+
│ Pattern: Enhanced N+1 with Batch Loading │
|
|
215
|
+
│ Existing Skill: database-solutions/n-plus-1 │
|
|
216
|
+
│ Confidence: HIGH (improvement detected) │
|
|
217
|
+
│ │
|
|
218
|
+
│ Current Skill Covers: │
|
|
219
|
+
│ ├─ Prisma includes for eager loading │
|
|
220
|
+
│ └─ Basic N+1 detection │
|
|
221
|
+
│ │
|
|
222
|
+
│ Detected Enhancement: │
|
|
223
|
+
│ ├─ DataLoader pattern for batch loading │
|
|
224
|
+
│ ├─ Cursor-based pagination with N+1 prevention │
|
|
225
|
+
│ └─ Conditional includes based on query params │
|
|
226
|
+
│ │
|
|
227
|
+
│ Example Addition: │
|
|
228
|
+
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
229
|
+
│ │ // DataLoader pattern for batching │ │
|
|
230
|
+
│ │ const userLoader = new DataLoader(async (ids) => { │ │
|
|
231
|
+
│ │ const users = await prisma.user.findMany({ │ │
|
|
232
|
+
│ │ where: { id: { in: ids } } │ │
|
|
233
|
+
│ │ }); │ │
|
|
234
|
+
│ │ return ids.map(id => users.find(u => u.id === id)); │ │
|
|
235
|
+
│ │ }); │ │
|
|
236
|
+
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
237
|
+
│ │
|
|
238
|
+
│ Actions: │
|
|
239
|
+
│ [U] Update skill: database-solutions/n-plus-1 │
|
|
240
|
+
│ [C] Create new: database-solutions/dataloader-batching │
|
|
241
|
+
│ [D] Defer │
|
|
242
|
+
│ [I] Ignore │
|
|
243
|
+
│ │
|
|
244
|
+
│ Your choice: _ │
|
|
245
|
+
│ │
|
|
246
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
247
|
+
|
|
248
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
249
|
+
│ DISCOVERY #4: SKILL UPDATE SUGGESTION │
|
|
250
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
251
|
+
│ │
|
|
252
|
+
│ Pattern: Streaming Response Handling │
|
|
253
|
+
│ Existing Skill: api-patterns/streaming │
|
|
254
|
+
│ Confidence: MEDIUM (partial match) │
|
|
255
|
+
│ │
|
|
256
|
+
│ Your Implementation: │
|
|
257
|
+
│ ├─ Server-Sent Events for LLM responses │
|
|
258
|
+
│ ├─ Backpressure handling │
|
|
259
|
+
│ └─ Client reconnection logic │
|
|
260
|
+
│ │
|
|
261
|
+
│ Differs From Existing: │
|
|
262
|
+
│ ├─ Uses SSE instead of WebSocket │
|
|
263
|
+
│ ├─ Specific to AI/LLM streaming │
|
|
264
|
+
│ └─ Includes citation extraction mid-stream │
|
|
265
|
+
│ │
|
|
266
|
+
│ Actions: │
|
|
267
|
+
│ [U] Update skill: api-patterns/streaming │
|
|
268
|
+
│ [C] Create new: api-patterns/llm-streaming │
|
|
269
|
+
│ [D] Defer │
|
|
270
|
+
│ [I] Ignore │
|
|
271
|
+
│ │
|
|
272
|
+
│ Your choice: _ │
|
|
273
|
+
│ │
|
|
274
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
275
|
+
|
|
276
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
277
|
+
│ DISCOVERY #5: COMPOUND SKILL SUGGESTION │
|
|
278
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
279
|
+
│ │
|
|
280
|
+
│ Pattern: Skills Frequently Used Together │
|
|
281
|
+
│ Skills: n-plus-1 + indexing + query-optimization │
|
|
282
|
+
│ Co-occurrence Rate: 85% │
|
|
283
|
+
│ │
|
|
284
|
+
│ Observation: │
|
|
285
|
+
│ These three skills are almost always applied together when optimizing │
|
|
286
|
+
│ database performance. Consider bundling into a compound skill. │
|
|
287
|
+
│ │
|
|
288
|
+
│ Proposed Compound Skill: │
|
|
289
|
+
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
290
|
+
│ │ Name: database-solutions/query-performance-bundle │ │
|
|
291
|
+
│ │ │ │
|
|
292
|
+
│ │ Includes: │ │
|
|
293
|
+
│ │ 1. N+1 detection and prevention │ │
|
|
294
|
+
│ │ 2. Strategic index creation │ │
|
|
295
|
+
│ │ 3. Query analysis with EXPLAIN │ │
|
|
296
|
+
│ │ │ │
|
|
297
|
+
│ │ Workflow: │ │
|
|
298
|
+
│ │ 1. Run query analysis → identify slow queries │ │
|
|
299
|
+
│ │ 2. Check for N+1 patterns → add eager loading │ │
|
|
300
|
+
│ │ 3. Add indexes for remaining bottlenecks │ │
|
|
301
|
+
│ │ 4. Verify with EXPLAIN ANALYZE │ │
|
|
302
|
+
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
303
|
+
│ │
|
|
304
|
+
│ Actions: │
|
|
305
|
+
│ [C] Create compound skill │
|
|
306
|
+
│ [D] Defer │
|
|
307
|
+
│ [I] Ignore (prefer individual skills) │
|
|
308
|
+
│ │
|
|
309
|
+
│ Your choice: _ │
|
|
310
|
+
│ │
|
|
311
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
312
|
+
|
|
313
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
314
|
+
|
|
315
|
+
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
316
|
+
║ DISCOVERY SUMMARY ║
|
|
317
|
+
╠══════════════════════════════════════════════════════════════════════════════╣
|
|
318
|
+
║ ║
|
|
319
|
+
║ Patterns Analyzed: 5 ║
|
|
320
|
+
║ Skills Created: [based on choices] ║
|
|
321
|
+
║ Skills Updated: [based on choices] ║
|
|
322
|
+
║ Deferred: [based on choices] ║
|
|
323
|
+
║ Ignored: [based on choices] ║
|
|
324
|
+
║ ║
|
|
325
|
+
║ Knowledge Compounding: Your skills library grew by X skills this session ║
|
|
326
|
+
║ ║
|
|
327
|
+
╚══════════════════════════════════════════════════════════════════════════════╝
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
#### Weekly Summary Mode (`--weekly`)
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
━━━ POWER ► DISCOVER: WEEKLY SUMMARY ━━━
|
|
334
|
+
|
|
335
|
+
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
336
|
+
║ WEEKLY PATTERN SUMMARY ║
|
|
337
|
+
║ 2026-01-15 to 2026-01-22 ║
|
|
338
|
+
╠══════════════════════════════════════════════════════════════════════════════╣
|
|
339
|
+
║ ║
|
|
340
|
+
║ Phases Completed: 2 (Phase 2, Phase 3) ║
|
|
341
|
+
║ Commits Analyzed: 47 ║
|
|
342
|
+
║ Files Changed: 156 ║
|
|
343
|
+
║ Patterns Detected: 8 ║
|
|
344
|
+
║ ║
|
|
345
|
+
╚══════════════════════════════════════════════════════════════════════════════╝
|
|
346
|
+
|
|
347
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
348
|
+
│ TOP PATTERNS THIS WEEK │
|
|
349
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
350
|
+
│ │
|
|
351
|
+
│ 1. Retry with Exponential Backoff 5 occurrences → NEW SKILL │
|
|
352
|
+
│ 2. Prisma Transaction Patterns 4 occurrences → NEW SKILL │
|
|
353
|
+
│ 3. Streaming Response Handling 3 occurrences → UPDATE SKILL │
|
|
354
|
+
│ 4. Error Boundary with Recovery 3 occurrences → REVIEW │
|
|
355
|
+
│ 5. Type-safe API Responses 2 occurrences → REVIEW │
|
|
356
|
+
│ │
|
|
357
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
358
|
+
|
|
359
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
360
|
+
│ SKILLS LIBRARY CHANGES │
|
|
361
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
362
|
+
│ │
|
|
363
|
+
│ Created This Week: │
|
|
364
|
+
│ ├─ + api-patterns/retry-exponential-backoff │
|
|
365
|
+
│ └─ + database-solutions/prisma-transactions │
|
|
366
|
+
│ │
|
|
367
|
+
│ Updated This Week: │
|
|
368
|
+
│ └─ ~ database-solutions/n-plus-1 (added DataLoader patterns) │
|
|
369
|
+
│ │
|
|
370
|
+
│ Deferred (in backlog): │
|
|
371
|
+
│ ├─ api-patterns/llm-streaming │
|
|
372
|
+
│ └─ database-solutions/query-performance-bundle │
|
|
373
|
+
│ │
|
|
374
|
+
│ Library Growth: +2 skills, +1 update │
|
|
375
|
+
│ │
|
|
376
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
377
|
+
|
|
378
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
379
|
+
│ KNOWLEDGE COMPOUNDING METRICS │
|
|
380
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
381
|
+
│ │
|
|
382
|
+
│ Skills Applied: 12 this week │
|
|
383
|
+
│ Skills Created: 2 from discoveries │
|
|
384
|
+
│ Reuse Rate: 4.2x (skills applied per unique skill) │
|
|
385
|
+
│ Time Saved: ~9 hours │
|
|
386
|
+
│ │
|
|
387
|
+
│ Trend: ████████████████████░░░░░░░░░░░░ Knowledge growing +15%/week │
|
|
388
|
+
│ │
|
|
389
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
390
|
+
|
|
391
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
392
|
+
│ NEXT WEEK RECOMMENDATIONS │
|
|
393
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
394
|
+
│ │
|
|
395
|
+
│ Based on upcoming Phase 4 (Greek/Hebrew Tools): │
|
|
396
|
+
│ │
|
|
397
|
+
│ ○ Review deferred patterns before Phase 4 starts │
|
|
398
|
+
│ ○ Consider creating i18n/unicode skills for Hebrew handling │
|
|
399
|
+
│ ○ Search for existing NLP/text-processing skills │
|
|
400
|
+
│ │
|
|
401
|
+
│ Run: /fire-search "unicode text processing" for relevant skills │
|
|
402
|
+
│ │
|
|
403
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
#### Auto Mode (`--auto`)
|
|
407
|
+
|
|
408
|
+
Non-interactive mode that defers all suggestions for later review:
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
━━━ POWER ► DISCOVER (Auto Mode) ━━━
|
|
412
|
+
|
|
413
|
+
◆ Analyzing patterns...
|
|
414
|
+
├─ ✓ Detected 5 patterns
|
|
415
|
+
├─ ✓ All suggestions deferred to backlog
|
|
416
|
+
└─ ✓ Summary saved to .planning/discoveries/2026-01-22.md
|
|
417
|
+
|
|
418
|
+
Deferred Suggestions:
|
|
419
|
+
1. api-patterns/retry-exponential-backoff (NEW)
|
|
420
|
+
2. database-solutions/prisma-transactions (NEW)
|
|
421
|
+
3. database-solutions/n-plus-1 (UPDATE)
|
|
422
|
+
4. api-patterns/streaming (UPDATE)
|
|
423
|
+
5. database-solutions/query-performance-bundle (COMPOUND)
|
|
424
|
+
|
|
425
|
+
Run /fire-discover without --auto to review interactively.
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## Pattern Detection Algorithms
|
|
431
|
+
|
|
432
|
+
### Code Pattern Detection
|
|
433
|
+
|
|
434
|
+
```
|
|
435
|
+
1. Function Signature Analysis
|
|
436
|
+
- Extract function signatures from changed files
|
|
437
|
+
- Group by parameter patterns
|
|
438
|
+
- Identify >3 occurrences with similar structure
|
|
439
|
+
|
|
440
|
+
2. Import Pattern Analysis
|
|
441
|
+
- Track commonly imported modules
|
|
442
|
+
- Identify utility functions that repeat
|
|
443
|
+
- Flag candidates for extraction
|
|
444
|
+
|
|
445
|
+
3. Error Handling Patterns
|
|
446
|
+
- Detect try/catch blocks with similar structure
|
|
447
|
+
- Identify common error recovery patterns
|
|
448
|
+
- Note retry/fallback implementations
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Commit Message Analysis
|
|
452
|
+
|
|
453
|
+
```
|
|
454
|
+
Keywords that indicate patterns:
|
|
455
|
+
- "fix:" repeated fixes for same issue type
|
|
456
|
+
- "refactor:" indicates pattern improvement
|
|
457
|
+
- "feat:" with similar descriptions
|
|
458
|
+
- "perf:" performance patterns
|
|
459
|
+
- Comments: "tricky", "hard", "discovered", "pattern"
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### Complexity Indicators
|
|
463
|
+
|
|
464
|
+
Patterns worth capturing often have:
|
|
465
|
+
- Multiple failed attempts before success (from git history)
|
|
466
|
+
- Research queries to external sources (from RECORD.md)
|
|
467
|
+
- Code refactoring iterations
|
|
468
|
+
- Test failures before passing
|
|
469
|
+
- Long implementation duration (>30 minutes)
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Interactive Actions
|
|
474
|
+
|
|
475
|
+
### Create Skill [C]
|
|
476
|
+
|
|
477
|
+
Launches `/fire-contribute` with pre-filled data:
|
|
478
|
+
|
|
479
|
+
```
|
|
480
|
+
◆ Creating skill: api-patterns/retry-exponential-backoff
|
|
481
|
+
|
|
482
|
+
Pre-filled from discovery:
|
|
483
|
+
├─ Category: api-patterns
|
|
484
|
+
├─ Name: retry-exponential-backoff
|
|
485
|
+
├─ Problem: API calls fail intermittently, need resilient retry logic
|
|
486
|
+
├─ Solution: Exponential backoff with configurable attempts
|
|
487
|
+
└─ Examples: [extracted from codebase]
|
|
488
|
+
|
|
489
|
+
Launching /fire-contribute...
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
### Update Skill [U]
|
|
493
|
+
|
|
494
|
+
Shows diff and confirms update:
|
|
495
|
+
|
|
496
|
+
```
|
|
497
|
+
◆ Updating skill: database-solutions/n-plus-1
|
|
498
|
+
|
|
499
|
+
Changes to add:
|
|
500
|
+
├─ + DataLoader batching pattern section
|
|
501
|
+
├─ + Cursor-based pagination example
|
|
502
|
+
└─ + Conditional includes pattern
|
|
503
|
+
|
|
504
|
+
View full diff? [y/N]: _
|
|
505
|
+
Proceed with update? [Y/n]: _
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### Defer [D]
|
|
509
|
+
|
|
510
|
+
Adds to discovery backlog for later review:
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
◆ Deferred: api-patterns/retry-exponential-backoff
|
|
514
|
+
|
|
515
|
+
Added to: .planning/discoveries/backlog.md
|
|
516
|
+
|
|
517
|
+
Backlog now contains 3 deferred patterns.
|
|
518
|
+
Review with: /fire-discover --backlog
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
### Ignore [I]
|
|
522
|
+
|
|
523
|
+
Marks pattern as not worth capturing:
|
|
524
|
+
|
|
525
|
+
```
|
|
526
|
+
◆ Ignored: [pattern description]
|
|
527
|
+
|
|
528
|
+
This pattern will not be suggested again unless significantly changed.
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
## Discovery Schedule
|
|
534
|
+
|
|
535
|
+
Pattern discovery runs:
|
|
536
|
+
1. **After phase completion** - Automatic trigger via `/fire-4-verify`
|
|
537
|
+
2. **Weekly summary** - Manual via `/fire-discover --weekly`
|
|
538
|
+
3. **On demand** - Manual via `/fire-discover`
|
|
539
|
+
|
|
540
|
+
---
|
|
541
|
+
|
|
542
|
+
## Output Files
|
|
543
|
+
|
|
544
|
+
### Discovery Log
|
|
545
|
+
|
|
546
|
+
`.planning/discoveries/YYYY-MM-DD.md`:
|
|
547
|
+
|
|
548
|
+
```markdown
|
|
549
|
+
# Discovery Log: 2026-01-22
|
|
550
|
+
|
|
551
|
+
## Patterns Detected
|
|
552
|
+
|
|
553
|
+
### Pattern 1: Retry with Exponential Backoff
|
|
554
|
+
- Confidence: HIGH
|
|
555
|
+
- Locations: [list]
|
|
556
|
+
- Action: CREATED as api-patterns/retry-exponential-backoff
|
|
557
|
+
|
|
558
|
+
### Pattern 2: Prisma Transactions
|
|
559
|
+
- Confidence: MEDIUM
|
|
560
|
+
- Locations: [list]
|
|
561
|
+
- Action: DEFERRED
|
|
562
|
+
|
|
563
|
+
## Summary
|
|
564
|
+
- Patterns: 5
|
|
565
|
+
- Created: 1
|
|
566
|
+
- Updated: 0
|
|
567
|
+
- Deferred: 3
|
|
568
|
+
- Ignored: 1
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### Backlog
|
|
572
|
+
|
|
573
|
+
`.planning/discoveries/backlog.md`:
|
|
574
|
+
|
|
575
|
+
```markdown
|
|
576
|
+
# Discovery Backlog
|
|
577
|
+
|
|
578
|
+
## Pending Review
|
|
579
|
+
|
|
580
|
+
### api-patterns/llm-streaming
|
|
581
|
+
- Detected: 2026-01-22
|
|
582
|
+
- Confidence: MEDIUM
|
|
583
|
+
- Status: Deferred (needs more examples)
|
|
584
|
+
|
|
585
|
+
### database-solutions/query-performance-bundle
|
|
586
|
+
- Detected: 2026-01-22
|
|
587
|
+
- Confidence: HIGH
|
|
588
|
+
- Status: Deferred (compound skill - needs review)
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
## Success Criteria
|
|
594
|
+
|
|
595
|
+
- [ ] Pattern detection finds genuine recurring patterns
|
|
596
|
+
- [ ] Confidence scores reflect actual pattern frequency
|
|
597
|
+
- [ ] Interactive prompts work correctly
|
|
598
|
+
- [ ] Create action launches /fire-contribute with correct data
|
|
599
|
+
- [ ] Update action shows meaningful diff
|
|
600
|
+
- [ ] Defer action properly updates backlog
|
|
601
|
+
- [ ] Weekly summary aggregates data correctly
|
|
602
|
+
- [ ] Auto mode non-interactively defers all patterns
|
|
603
|
+
- [ ] Discovery log files are created and formatted correctly
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
## Related Commands
|
|
608
|
+
|
|
609
|
+
- `/fire-contribute` - Create new skills
|
|
610
|
+
- `/fire-analytics` - View skills usage statistics
|
|
611
|
+
- `/fire-search` - Search existing skills
|
|
612
|
+
- `/fire-4-verify` - Triggers discovery after phase completion
|
|
613
|
+
|
|
614
|
+
---
|
|
615
|
+
|
|
616
|
+
*Discovery compounds knowledge. Run /fire-discover --weekly to track pattern growth over time.*
|