@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,506 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: power-skills-diff
|
|
3
|
+
description: Compare different versions of a skill
|
|
4
|
+
arguments:
|
|
5
|
+
- name: skill
|
|
6
|
+
description: Skill identifier in format category/skill-name
|
|
7
|
+
required: true
|
|
8
|
+
type: string
|
|
9
|
+
- name: v1
|
|
10
|
+
description: First version to compare (default current)
|
|
11
|
+
required: false
|
|
12
|
+
type: string
|
|
13
|
+
- name: v2
|
|
14
|
+
description: Second version to compare (default previous)
|
|
15
|
+
required: false
|
|
16
|
+
type: string
|
|
17
|
+
triggers:
|
|
18
|
+
- "compare skill versions"
|
|
19
|
+
- "skill diff"
|
|
20
|
+
- "skill changes"
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# /fire-skills-diff - Compare Skill Versions
|
|
24
|
+
|
|
25
|
+
Compare two versions of a skill to see what changed between them.
|
|
26
|
+
|
|
27
|
+
## Purpose
|
|
28
|
+
|
|
29
|
+
- Understand how a skill evolved
|
|
30
|
+
- Review changes before rollback
|
|
31
|
+
- Compare project vs global versions
|
|
32
|
+
- Audit skill modifications
|
|
33
|
+
- Learn from skill improvements
|
|
34
|
+
|
|
35
|
+
## Arguments
|
|
36
|
+
|
|
37
|
+
| Argument | Required | Default | Description |
|
|
38
|
+
|----------|----------|---------|-------------|
|
|
39
|
+
| `skill` | Yes | - | Skill path: `{category}/{skill-name}` |
|
|
40
|
+
| `v1` | No | current | First version (base) |
|
|
41
|
+
| `v2` | No | previous | Second version (compare) |
|
|
42
|
+
|
|
43
|
+
## Usage Examples
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Compare current with previous version
|
|
47
|
+
/fire-skills-diff database-solutions/n-plus-1
|
|
48
|
+
|
|
49
|
+
# Compare two specific versions
|
|
50
|
+
/fire-skills-diff database-solutions/n-plus-1 1.0.0 2.0.0
|
|
51
|
+
|
|
52
|
+
# Compare current with specific version
|
|
53
|
+
/fire-skills-diff security/jwt-auth current 1.2.0
|
|
54
|
+
|
|
55
|
+
# Compare project vs global version
|
|
56
|
+
/fire-skills-diff api-patterns/pagination project global
|
|
57
|
+
|
|
58
|
+
# Side-by-side output
|
|
59
|
+
/fire-skills-diff performance/caching 1.0.0 2.0.0 --side-by-side
|
|
60
|
+
|
|
61
|
+
# Show only specific sections
|
|
62
|
+
/fire-skills-diff testing/snapshot --section "Code Example"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Process
|
|
66
|
+
|
|
67
|
+
<step number="1">
|
|
68
|
+
### Resolve Versions
|
|
69
|
+
|
|
70
|
+
Determine which versions to compare:
|
|
71
|
+
|
|
72
|
+
**Default behavior:**
|
|
73
|
+
- `v1` = current (HEAD)
|
|
74
|
+
- `v2` = previous (HEAD~1)
|
|
75
|
+
|
|
76
|
+
**Special keywords:**
|
|
77
|
+
- `current` or `head` = Latest version
|
|
78
|
+
- `previous` or `prev` = One version before current
|
|
79
|
+
- `project` = Version in project library
|
|
80
|
+
- `global` = Version in global library
|
|
81
|
+
- `X.Y.Z` = Specific semantic version
|
|
82
|
+
- `{commit-hash}` = Specific git commit
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Resolve v1
|
|
86
|
+
if v1 == "current" or v1 == "head":
|
|
87
|
+
v1_ref = "HEAD"
|
|
88
|
+
elif v1 == "project":
|
|
89
|
+
v1_ref = "HEAD" (in project library)
|
|
90
|
+
elif v1 == "global":
|
|
91
|
+
v1_ref = "HEAD" (in global library)
|
|
92
|
+
else:
|
|
93
|
+
v1_ref = find_commit_for_version(skill, v1)
|
|
94
|
+
|
|
95
|
+
# Resolve v2 similarly
|
|
96
|
+
```
|
|
97
|
+
</step>
|
|
98
|
+
|
|
99
|
+
<step number="2">
|
|
100
|
+
### Retrieve Version Content
|
|
101
|
+
|
|
102
|
+
Fetch content for both versions:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
cd ~/.claude/plugins/dominion-flow/skills-library
|
|
106
|
+
|
|
107
|
+
# Get v1 content
|
|
108
|
+
v1_content=$(git show {v1_ref}:{category}/{skill-name}.md)
|
|
109
|
+
|
|
110
|
+
# Get v2 content
|
|
111
|
+
v2_content=$(git show {v2_ref}:{category}/{skill-name}.md)
|
|
112
|
+
|
|
113
|
+
# For project vs global comparison
|
|
114
|
+
v1_content=$(cat ~/.claude/plugins/dominion-flow/skills-library/{category}/{skill-name}.md)
|
|
115
|
+
v2_content=$(cat ~/.claude/fire-skills-global/{category}/{skill-name}.md)
|
|
116
|
+
```
|
|
117
|
+
</step>
|
|
118
|
+
|
|
119
|
+
<step number="3">
|
|
120
|
+
### Generate Diff
|
|
121
|
+
|
|
122
|
+
Create detailed diff between versions:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Unified diff
|
|
126
|
+
diff -u <(echo "$v1_content") <(echo "$v2_content")
|
|
127
|
+
|
|
128
|
+
# Or with git diff for better formatting
|
|
129
|
+
git diff {v1_ref} {v2_ref} -- {category}/{skill-name}.md
|
|
130
|
+
```
|
|
131
|
+
</step>
|
|
132
|
+
|
|
133
|
+
<step number="4">
|
|
134
|
+
### Display Comparison
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
=============================================================
|
|
138
|
+
SKILL VERSION COMPARISON
|
|
139
|
+
=============================================================
|
|
140
|
+
|
|
141
|
+
Skill: {category}/{skill-name}
|
|
142
|
+
Comparing: v{v1} -> v{v2}
|
|
143
|
+
|
|
144
|
+
-------------------------------------------------------------
|
|
145
|
+
VERSION INFO
|
|
146
|
+
-------------------------------------------------------------
|
|
147
|
+
|
|
148
|
+
BASE (v{v1}):
|
|
149
|
+
Date: {v1-date}
|
|
150
|
+
Commit: {v1-commit-short}
|
|
151
|
+
Author: {v1-author}
|
|
152
|
+
Message: {v1-commit-message}
|
|
153
|
+
|
|
154
|
+
COMPARE (v{v2}):
|
|
155
|
+
Date: {v2-date}
|
|
156
|
+
Commit: {v2-commit-short}
|
|
157
|
+
Author: {v2-author}
|
|
158
|
+
Message: {v2-commit-message}
|
|
159
|
+
|
|
160
|
+
Time between versions: {days} days
|
|
161
|
+
|
|
162
|
+
-------------------------------------------------------------
|
|
163
|
+
SUMMARY OF CHANGES
|
|
164
|
+
-------------------------------------------------------------
|
|
165
|
+
|
|
166
|
+
Sections modified:
|
|
167
|
+
[M] Problem - Minor clarification
|
|
168
|
+
[+] Solution Pattern - New approach added
|
|
169
|
+
[M] Code Example - Major rewrite (TypeScript migration)
|
|
170
|
+
[ ] When to Use - No changes
|
|
171
|
+
[+] When NOT to Use - New section added
|
|
172
|
+
[M] References - Links updated
|
|
173
|
+
|
|
174
|
+
Legend: [+] Added [-] Removed [M] Modified [ ] Unchanged
|
|
175
|
+
|
|
176
|
+
Statistics:
|
|
177
|
+
Lines added: +{X}
|
|
178
|
+
Lines removed: -{Y}
|
|
179
|
+
Net change: {Z}
|
|
180
|
+
|
|
181
|
+
-------------------------------------------------------------
|
|
182
|
+
DETAILED DIFF
|
|
183
|
+
-------------------------------------------------------------
|
|
184
|
+
|
|
185
|
+
## Frontmatter Changes
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
- version: {v1}
|
|
189
|
+
+ version: {v2}
|
|
190
|
+
- last_updated: {v1-date}
|
|
191
|
+
+ last_updated: {v2-date}
|
|
192
|
+
contributors:
|
|
193
|
+
- my-project
|
|
194
|
+
+ - book-writer-app
|
|
195
|
+
tags: [database, orm, prisma]
|
|
196
|
+
+ difficulty: medium
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
-------------------------------------------------------------
|
|
200
|
+
|
|
201
|
+
## Problem Section
|
|
202
|
+
|
|
203
|
+
## Problem
|
|
204
|
+
|
|
205
|
+
When fetching related data in an ORM, naive implementations
|
|
206
|
+
- often result in N+1 queries - one query to fetch the parent
|
|
207
|
+
- records, then N additional queries to fetch related data for
|
|
208
|
+
- each parent.
|
|
209
|
+
+ often result in the N+1 query problem, where:
|
|
210
|
+
+
|
|
211
|
+
+ 1. One query fetches parent records
|
|
212
|
+
+ 2. N additional queries fetch related data (one per parent)
|
|
213
|
+
+
|
|
214
|
+
+ This causes severe performance degradation at scale.
|
|
215
|
+
|
|
216
|
+
-------------------------------------------------------------
|
|
217
|
+
|
|
218
|
+
## Solution Pattern Section
|
|
219
|
+
|
|
220
|
+
## Solution Pattern
|
|
221
|
+
|
|
222
|
+
- Use eager loading to fetch related data in a single query.
|
|
223
|
+
+ Use eager loading (also called "include" or "join fetch") to
|
|
224
|
+
+ retrieve all related data in a single database query.
|
|
225
|
+
+
|
|
226
|
+
+ **Key Principle:** Replace lazy loading with explicit includes
|
|
227
|
+
+ for data you know you'll need.
|
|
228
|
+
|
|
229
|
+
-------------------------------------------------------------
|
|
230
|
+
|
|
231
|
+
## Code Example Section
|
|
232
|
+
|
|
233
|
+
## Code Example
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
// Before (N+1 problem)
|
|
237
|
+
const users = await prisma.user.findMany();
|
|
238
|
+
for (const user of users) {
|
|
239
|
+
- const posts = await prisma.post.findMany({ where: { userId: user.id } });
|
|
240
|
+
+ const posts = await prisma.post.findMany({
|
|
241
|
+
+ where: { userId: user.id }
|
|
242
|
+
+ });
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// After (Eager loading)
|
|
246
|
+
const users = await prisma.user.findMany({
|
|
247
|
+
- include: { posts: true }
|
|
248
|
+
+ include: {
|
|
249
|
+
+ posts: {
|
|
250
|
+
+ select: {
|
|
251
|
+
+ id: true,
|
|
252
|
+
+ title: true,
|
|
253
|
+
+ createdAt: true
|
|
254
|
+
+ }
|
|
255
|
+
+ }
|
|
256
|
+
+ }
|
|
257
|
+
});
|
|
258
|
+
```
|
|
259
|
+
+
|
|
260
|
+
+ **Performance Impact:**
|
|
261
|
+
+ - Before: 15 queries, 250ms total
|
|
262
|
+
+ - After: 1 query, 45ms total
|
|
263
|
+
+ - Improvement: 82% faster
|
|
264
|
+
|
|
265
|
+
-------------------------------------------------------------
|
|
266
|
+
|
|
267
|
+
## New Section: When NOT to Use
|
|
268
|
+
|
|
269
|
+
+ ## When NOT to Use
|
|
270
|
+
+
|
|
271
|
+
+ - When related data is rarely accessed (lazy loading preferred)
|
|
272
|
+
+ - When related data set is very large (use pagination instead)
|
|
273
|
+
+ - When memory constraints are tight (eager loading loads all data)
|
|
274
|
+
+ - When using NoSQL databases with different query patterns
|
|
275
|
+
|
|
276
|
+
-------------------------------------------------------------
|
|
277
|
+
|
|
278
|
+
## References Section
|
|
279
|
+
|
|
280
|
+
## References
|
|
281
|
+
|
|
282
|
+
- - [Prisma Docs](https://prisma.io/docs/concepts/components/prisma-client/relation-queries)
|
|
283
|
+
+ - [Prisma Relation Queries](https://prisma.io/docs/concepts/components/prisma-client/relation-queries)
|
|
284
|
+
+ - [N+1 Problem Explained](https://dev.to/n-plus-1-queries-explained)
|
|
285
|
+
+ - [ORM Performance Patterns](https://example.com/orm-performance)
|
|
286
|
+
|
|
287
|
+
=============================================================
|
|
288
|
+
|
|
289
|
+
-------------------------------------------------------------
|
|
290
|
+
QUICK ACTIONS
|
|
291
|
+
-------------------------------------------------------------
|
|
292
|
+
|
|
293
|
+
Based on this comparison:
|
|
294
|
+
|
|
295
|
+
[1] Rollback to v{v1}:
|
|
296
|
+
/fire-skills-rollback {skill} {v1}
|
|
297
|
+
|
|
298
|
+
[2] Keep v{v2} (no action needed)
|
|
299
|
+
|
|
300
|
+
[3] Compare with another version:
|
|
301
|
+
/fire-skills-diff {skill} {v1} {other}
|
|
302
|
+
|
|
303
|
+
[4] View full version history:
|
|
304
|
+
/fire-skills-history {skill}
|
|
305
|
+
|
|
306
|
+
=============================================================
|
|
307
|
+
```
|
|
308
|
+
</step>
|
|
309
|
+
|
|
310
|
+
## Side-by-Side Output
|
|
311
|
+
|
|
312
|
+
With `--side-by-side` flag:
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
=============================================================
|
|
316
|
+
SIDE-BY-SIDE COMPARISON
|
|
317
|
+
=============================================================
|
|
318
|
+
|
|
319
|
+
Skill: {category}/{skill-name}
|
|
320
|
+
Left: v{v1} ({v1-date})
|
|
321
|
+
Right: v{v2} ({v2-date})
|
|
322
|
+
|
|
323
|
+
-------------------------------------------------------------
|
|
324
|
+
## Problem
|
|
325
|
+
-------------------------------------------------------------
|
|
326
|
+
|
|
327
|
+
v{v1} | v{v2}
|
|
328
|
+
-----------------------------------|-----------------------------------
|
|
329
|
+
When fetching related data in an | When fetching related data in an
|
|
330
|
+
ORM, naive implementations often | ORM, naive implementations often
|
|
331
|
+
result in N+1 queries - one query | result in the N+1 query problem,
|
|
332
|
+
to fetch the parent records, then | where:
|
|
333
|
+
N additional queries to fetch |
|
|
334
|
+
related data for each parent. | 1. One query fetches parent records
|
|
335
|
+
| 2. N additional queries fetch
|
|
336
|
+
| related data (one per parent)
|
|
337
|
+
|
|
|
338
|
+
| This causes severe performance
|
|
339
|
+
| degradation at scale.
|
|
340
|
+
|
|
341
|
+
-------------------------------------------------------------
|
|
342
|
+
## Code Example
|
|
343
|
+
-------------------------------------------------------------
|
|
344
|
+
|
|
345
|
+
v{v1} | v{v2}
|
|
346
|
+
-----------------------------------|-----------------------------------
|
|
347
|
+
// After (Eager loading) | // After (Eager loading)
|
|
348
|
+
const users = await prisma.user. | const users = await prisma.user.
|
|
349
|
+
findMany({ | findMany({
|
|
350
|
+
include: { posts: true } | include: {
|
|
351
|
+
}); | posts: {
|
|
352
|
+
| select: {
|
|
353
|
+
| id: true,
|
|
354
|
+
| title: true,
|
|
355
|
+
| createdAt: true
|
|
356
|
+
| }
|
|
357
|
+
| }
|
|
358
|
+
| }
|
|
359
|
+
| });
|
|
360
|
+
|
|
|
361
|
+
| **Performance Impact:**
|
|
362
|
+
| - Before: 15 queries, 250ms
|
|
363
|
+
| - After: 1 query, 45ms
|
|
364
|
+
|
|
365
|
+
=============================================================
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
## Section-Specific Diff
|
|
369
|
+
|
|
370
|
+
With `--section "Code Example"`:
|
|
371
|
+
|
|
372
|
+
```
|
|
373
|
+
=============================================================
|
|
374
|
+
SECTION DIFF: Code Example
|
|
375
|
+
=============================================================
|
|
376
|
+
|
|
377
|
+
Skill: {category}/{skill-name}
|
|
378
|
+
Section: Code Example
|
|
379
|
+
Comparing: v{v1} -> v{v2}
|
|
380
|
+
|
|
381
|
+
-------------------------------------------------------------
|
|
382
|
+
|
|
383
|
+
## Code Example
|
|
384
|
+
|
|
385
|
+
```typescript
|
|
386
|
+
// Before (N+1 problem)
|
|
387
|
+
const users = await prisma.user.findMany();
|
|
388
|
+
for (const user of users) {
|
|
389
|
+
- const posts = await prisma.post.findMany({ where: { userId: user.id } });
|
|
390
|
+
+ const posts = await prisma.post.findMany({
|
|
391
|
+
+ where: { userId: user.id }
|
|
392
|
+
+ });
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// After (Eager loading)
|
|
396
|
+
const users = await prisma.user.findMany({
|
|
397
|
+
- include: { posts: true }
|
|
398
|
+
+ include: {
|
|
399
|
+
+ posts: {
|
|
400
|
+
+ select: {
|
|
401
|
+
+ id: true,
|
|
402
|
+
+ title: true,
|
|
403
|
+
+ createdAt: true
|
|
404
|
+
+ }
|
|
405
|
+
+ }
|
|
406
|
+
+ }
|
|
407
|
+
});
|
|
408
|
+
```
|
|
409
|
+
+
|
|
410
|
+
+ **Performance Impact:**
|
|
411
|
+
+ - Before: 15 queries, 250ms total
|
|
412
|
+
+ - After: 1 query, 45ms total
|
|
413
|
+
+ - Improvement: 82% faster
|
|
414
|
+
|
|
415
|
+
=============================================================
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
## Options
|
|
419
|
+
|
|
420
|
+
| Option | Description |
|
|
421
|
+
|--------|-------------|
|
|
422
|
+
| `--side-by-side` | Display versions in columns |
|
|
423
|
+
| `--unified` | Standard unified diff (default) |
|
|
424
|
+
| `--section "{name}"` | Compare only specific section |
|
|
425
|
+
| `--stat` | Show only statistics, no content |
|
|
426
|
+
| `--color` | Force colored output |
|
|
427
|
+
| `--no-color` | Disable colored output |
|
|
428
|
+
| `--context {N}` | Lines of context around changes (default: 3) |
|
|
429
|
+
| `--ignore-whitespace` | Ignore whitespace changes |
|
|
430
|
+
| `--word-diff` | Show word-level changes |
|
|
431
|
+
| `--json` | Output as JSON |
|
|
432
|
+
| `--export` | Save diff to file |
|
|
433
|
+
|
|
434
|
+
## Project vs Global Comparison
|
|
435
|
+
|
|
436
|
+
Special syntax for comparing libraries:
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
# Compare project library version with global library version
|
|
440
|
+
/fire-skills-diff database-solutions/n-plus-1 project global
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
Output includes library-specific information:
|
|
444
|
+
|
|
445
|
+
```
|
|
446
|
+
=============================================================
|
|
447
|
+
PROJECT vs GLOBAL COMPARISON
|
|
448
|
+
=============================================================
|
|
449
|
+
|
|
450
|
+
Skill: database-solutions/n-plus-1
|
|
451
|
+
|
|
452
|
+
PROJECT LIBRARY:
|
|
453
|
+
Path: ~/.claude/plugins/dominion-flow/skills-library/
|
|
454
|
+
Version: v2.1.0
|
|
455
|
+
Updated: 2026-01-22
|
|
456
|
+
|
|
457
|
+
GLOBAL LIBRARY:
|
|
458
|
+
Path: ~/.claude/fire-skills-global/
|
|
459
|
+
Version: v2.0.0
|
|
460
|
+
Updated: 2026-01-15
|
|
461
|
+
|
|
462
|
+
Status: PROJECT IS NEWER
|
|
463
|
+
|
|
464
|
+
-------------------------------------------------------------
|
|
465
|
+
RECOMMENDATION
|
|
466
|
+
-------------------------------------------------------------
|
|
467
|
+
|
|
468
|
+
Project has updates not in global library.
|
|
469
|
+
Consider syncing: /fire-skills-sync --push --skill {skill}
|
|
470
|
+
|
|
471
|
+
=============================================================
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
## Integration with Other Commands
|
|
475
|
+
|
|
476
|
+
The diff command integrates with:
|
|
477
|
+
|
|
478
|
+
1. **History viewing:**
|
|
479
|
+
```bash
|
|
480
|
+
/fire-skills-history database-solutions/n-plus-1
|
|
481
|
+
# Then use diff to compare specific versions
|
|
482
|
+
/fire-skills-diff database-solutions/n-plus-1 1.0.0 2.0.0
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
2. **Before rollback:**
|
|
486
|
+
```bash
|
|
487
|
+
# Review what will change
|
|
488
|
+
/fire-skills-diff database-solutions/n-plus-1 2.1.0 1.2.0
|
|
489
|
+
# Then rollback if satisfied
|
|
490
|
+
/fire-skills-rollback database-solutions/n-plus-1 1.2.0
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
3. **Before sync:**
|
|
494
|
+
```bash
|
|
495
|
+
# See what's different
|
|
496
|
+
/fire-skills-diff database-solutions/n-plus-1 project global
|
|
497
|
+
# Then sync
|
|
498
|
+
/fire-skills-sync --push
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
## Related Commands
|
|
502
|
+
|
|
503
|
+
- `/fire-skills-history` - View all versions
|
|
504
|
+
- `/fire-skills-rollback` - Revert to a version
|
|
505
|
+
- `/fire-search --detail` - View current content
|
|
506
|
+
- `/fire-skills-sync` - Sync between libraries
|