@smicolon/ai-kit 0.1.0 → 0.1.1

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.
Files changed (162) hide show
  1. package/.claude-plugin/CLAUDE.md +7 -0
  2. package/.claude-plugin/marketplace.json +373 -0
  3. package/package.json +4 -3
  4. package/packs/architect/CHANGELOG.md +17 -0
  5. package/packs/architect/README.md +58 -0
  6. package/packs/architect/agents/system-architect.md +768 -0
  7. package/packs/architect/commands/diagram-create.md +300 -0
  8. package/packs/better-auth/.claude-plugin/plugin.json +14 -0
  9. package/packs/better-auth/.mcp.json +14 -0
  10. package/packs/better-auth/CHANGELOG.md +26 -0
  11. package/packs/better-auth/README.md +125 -0
  12. package/packs/better-auth/agents/auth-architect.md +278 -0
  13. package/packs/better-auth/commands/auth-provider-add.md +265 -0
  14. package/packs/better-auth/commands/auth-setup.md +298 -0
  15. package/packs/better-auth/skills/auth-security/SKILL.md +425 -0
  16. package/packs/better-auth/skills/better-auth-patterns/SKILL.md +455 -0
  17. package/packs/dev-loop/.claude-plugin/plugin.json +10 -0
  18. package/packs/dev-loop/CHANGELOG.md +69 -0
  19. package/packs/dev-loop/README.md +155 -0
  20. package/packs/dev-loop/commands/cancel-dev.md +21 -0
  21. package/packs/dev-loop/commands/dev-loop.md +72 -0
  22. package/packs/dev-loop/commands/dev-plan.md +351 -0
  23. package/packs/dev-loop/hooks/hooks.json +15 -0
  24. package/packs/dev-loop/hooks/stop-hook.sh +178 -0
  25. package/packs/dev-loop/scripts/setup-dev-loop.sh +194 -0
  26. package/packs/dev-loop/skills/tdd-planner/SKILL.md +249 -0
  27. package/packs/dev-loop/skills/tdd-planner/references/framework-patterns.md +874 -0
  28. package/packs/dev-loop/skills/tdd-planner/references/good-example.md +260 -0
  29. package/packs/dev-loop/skills/tdd-planner/references/plan-template.md +275 -0
  30. package/packs/django/CHANGELOG.md +39 -0
  31. package/packs/django/README.md +92 -0
  32. package/packs/django/agents/django-architect.md +182 -0
  33. package/packs/django/agents/django-builder.md +250 -0
  34. package/packs/django/agents/django-feature-based.md +420 -0
  35. package/packs/django/agents/django-reviewer.md +253 -0
  36. package/packs/django/agents/django-tester.md +230 -0
  37. package/packs/django/commands/api-endpoint.md +285 -0
  38. package/packs/django/commands/model-create.md +178 -0
  39. package/packs/django/commands/test-generate.md +325 -0
  40. package/packs/django/rules/migrations.md +138 -0
  41. package/packs/django/rules/models.md +167 -0
  42. package/packs/django/rules/serializers.md +126 -0
  43. package/packs/django/rules/services.md +131 -0
  44. package/packs/django/rules/tests.md +140 -0
  45. package/packs/django/rules/views.md +102 -0
  46. package/packs/django/skills/import-convention-enforcer/SKILL.md +226 -0
  47. package/packs/django/skills/import-convention-enforcer/patterns/django-imports.md +343 -0
  48. package/packs/django/skills/migration-safety-checker/SKILL.md +375 -0
  49. package/packs/django/skills/model-entity-validator/SKILL.md +298 -0
  50. package/packs/django/skills/performance-optimizer/SKILL.md +447 -0
  51. package/packs/django/skills/red-phase-verifier/SKILL.md +180 -0
  52. package/packs/django/skills/security-first-validator/SKILL.md +435 -0
  53. package/packs/django/skills/test-coverage-advisor/SKILL.md +394 -0
  54. package/packs/django/skills/test-validity-checker/SKILL.md +194 -0
  55. package/packs/failure-log/.claude-plugin/plugin.json +14 -0
  56. package/packs/failure-log/CHANGELOG.md +20 -0
  57. package/packs/failure-log/README.md +168 -0
  58. package/packs/failure-log/commands/failure-add.md +106 -0
  59. package/packs/failure-log/commands/failure-list.md +89 -0
  60. package/packs/failure-log/hooks/hooks.json +16 -0
  61. package/packs/failure-log/hooks/scripts/inject-failures.sh +64 -0
  62. package/packs/failure-log/skills/failure-log-manager/SKILL.md +164 -0
  63. package/packs/flutter/.claude-plugin/plugin.json +10 -0
  64. package/packs/flutter/CHANGELOG.md +19 -0
  65. package/packs/flutter/README.md +170 -0
  66. package/packs/flutter/agents/flutter-architect.md +166 -0
  67. package/packs/flutter/agents/flutter-builder.md +303 -0
  68. package/packs/flutter/agents/release-manager.md +355 -0
  69. package/packs/flutter/commands/fastlane-setup.md +188 -0
  70. package/packs/flutter/commands/flutter-build.md +90 -0
  71. package/packs/flutter/commands/flutter-deploy.md +133 -0
  72. package/packs/flutter/commands/flutter-test.md +117 -0
  73. package/packs/flutter/commands/signing-setup.md +209 -0
  74. package/packs/flutter/hooks/hooks.json +17 -0
  75. package/packs/flutter/skills/fastlane-knowledge/SKILL.md +193 -0
  76. package/packs/flutter/skills/flutter-architecture/SKILL.md +127 -0
  77. package/packs/flutter/skills/store-publishing/SKILL.md +163 -0
  78. package/packs/hono/.claude-plugin/plugin.json +19 -0
  79. package/packs/hono/CHANGELOG.md +19 -0
  80. package/packs/hono/README.md +143 -0
  81. package/packs/hono/agents/hono-architect.md +240 -0
  82. package/packs/hono/agents/hono-builder.md +285 -0
  83. package/packs/hono/agents/hono-reviewer.md +279 -0
  84. package/packs/hono/agents/hono-tester.md +346 -0
  85. package/packs/hono/commands/middleware-create.md +223 -0
  86. package/packs/hono/commands/project-init.md +306 -0
  87. package/packs/hono/commands/route-create.md +153 -0
  88. package/packs/hono/commands/rpc-client.md +263 -0
  89. package/packs/hono/hooks/hooks.json +4 -0
  90. package/packs/hono/skills/cloudflare-bindings/SKILL.md +408 -0
  91. package/packs/hono/skills/hono-patterns/SKILL.md +309 -0
  92. package/packs/hono/skills/rpc-typesafe/SKILL.md +388 -0
  93. package/packs/hono/skills/zod-validation/SKILL.md +332 -0
  94. package/packs/nestjs/CHANGELOG.md +29 -0
  95. package/packs/nestjs/README.md +75 -0
  96. package/packs/nestjs/agents/nestjs-architect.md +402 -0
  97. package/packs/nestjs/agents/nestjs-builder.md +301 -0
  98. package/packs/nestjs/agents/nestjs-tester.md +437 -0
  99. package/packs/nestjs/commands/module-create.md +369 -0
  100. package/packs/nestjs/rules/controllers.md +92 -0
  101. package/packs/nestjs/rules/dto.md +124 -0
  102. package/packs/nestjs/rules/entities.md +102 -0
  103. package/packs/nestjs/rules/services.md +106 -0
  104. package/packs/nestjs/skills/barrel-export-manager/SKILL.md +389 -0
  105. package/packs/nestjs/skills/import-convention-enforcer/SKILL.md +365 -0
  106. package/packs/nextjs/CHANGELOG.md +36 -0
  107. package/packs/nextjs/README.md +76 -0
  108. package/packs/nextjs/agents/frontend-tester.md +680 -0
  109. package/packs/nextjs/agents/frontend-visual.md +820 -0
  110. package/packs/nextjs/agents/nextjs-architect.md +331 -0
  111. package/packs/nextjs/agents/nextjs-modular.md +433 -0
  112. package/packs/nextjs/commands/component-create.md +398 -0
  113. package/packs/nextjs/rules/api-routes.md +129 -0
  114. package/packs/nextjs/rules/components.md +106 -0
  115. package/packs/nextjs/rules/hooks.md +132 -0
  116. package/packs/nextjs/skills/accessibility-validator/SKILL.md +445 -0
  117. package/packs/nextjs/skills/import-convention-enforcer/SKILL.md +399 -0
  118. package/packs/nextjs/skills/react-form-validator/SKILL.md +569 -0
  119. package/packs/nuxtjs/CHANGELOG.md +30 -0
  120. package/packs/nuxtjs/README.md +56 -0
  121. package/packs/nuxtjs/agents/frontend-tester.md +680 -0
  122. package/packs/nuxtjs/agents/frontend-visual.md +820 -0
  123. package/packs/nuxtjs/agents/nuxtjs-architect.md +537 -0
  124. package/packs/nuxtjs/commands/component-create.md +223 -0
  125. package/packs/nuxtjs/rules/components.md +101 -0
  126. package/packs/nuxtjs/rules/composables.md +118 -0
  127. package/packs/nuxtjs/rules/server-routes.md +127 -0
  128. package/packs/nuxtjs/skills/accessibility-validator/SKILL.md +183 -0
  129. package/packs/nuxtjs/skills/import-convention-enforcer/SKILL.md +196 -0
  130. package/packs/nuxtjs/skills/veevalidate-form-validator/SKILL.md +190 -0
  131. package/packs/onboard/CHANGELOG.md +22 -0
  132. package/packs/onboard/README.md +103 -0
  133. package/packs/onboard/agents/onboard-guide.md +118 -0
  134. package/packs/onboard/commands/onboard.md +313 -0
  135. package/packs/onboard/skills/onboard-context-provider/SKILL.md +98 -0
  136. package/packs/tanstack-router/.claude-plugin/plugin.json +14 -0
  137. package/packs/tanstack-router/CHANGELOG.md +30 -0
  138. package/packs/tanstack-router/README.md +113 -0
  139. package/packs/tanstack-router/agents/tanstack-architect.md +173 -0
  140. package/packs/tanstack-router/agents/tanstack-builder.md +360 -0
  141. package/packs/tanstack-router/agents/tanstack-tester.md +454 -0
  142. package/packs/tanstack-router/commands/form-create.md +313 -0
  143. package/packs/tanstack-router/commands/query-create.md +263 -0
  144. package/packs/tanstack-router/commands/route-create.md +190 -0
  145. package/packs/tanstack-router/commands/table-create.md +413 -0
  146. package/packs/tanstack-router/skills/ai-patterns/SKILL.md +370 -0
  147. package/packs/tanstack-router/skills/db-patterns/SKILL.md +346 -0
  148. package/packs/tanstack-router/skills/devtools-patterns/SKILL.md +415 -0
  149. package/packs/tanstack-router/skills/form-patterns/SKILL.md +425 -0
  150. package/packs/tanstack-router/skills/pacer-patterns/SKILL.md +341 -0
  151. package/packs/tanstack-router/skills/query-patterns/SKILL.md +359 -0
  152. package/packs/tanstack-router/skills/router-patterns/SKILL.md +285 -0
  153. package/packs/tanstack-router/skills/store-patterns/SKILL.md +351 -0
  154. package/packs/tanstack-router/skills/table-patterns/SKILL.md +531 -0
  155. package/packs/tanstack-router/skills/tanstack-conventions/SKILL.md +428 -0
  156. package/packs/tanstack-router/skills/virtual-patterns/SKILL.md +490 -0
  157. package/packs/worktree/.claude-plugin/plugin.json +19 -0
  158. package/packs/worktree/CHANGELOG.md +24 -0
  159. package/packs/worktree/README.md +110 -0
  160. package/packs/worktree/commands/wt.md +73 -0
  161. package/packs/worktree/scripts/wt.sh +396 -0
  162. package/packs/worktree/skills/worktree-manager/SKILL.md +68 -0
@@ -0,0 +1,168 @@
1
+ # failure-log
2
+
3
+ Persistent failure memory system that tracks mistakes and prevents repeating them across sessions.
4
+
5
+ ## Overview
6
+
7
+ This plugin creates a "learning from mistakes" system for each project. Failures are logged to a local file and automatically injected into context at the start of each session, ensuring the agent never repeats the same mistakes.
8
+
9
+ ## Features
10
+
11
+ - **Persistent Memory**: Failures survive across sessions in `.claude/failure-log.local.md`
12
+ - **Auto-Injection**: Condensed failure summary injected on every prompt
13
+ - **Semi-Automatic Capture**: Hooks detect potential failures and prompt for logging
14
+ - **Manual Logging**: `/failure-add` command for explicit failure entry
15
+ - **Categorized Entries**: Organize by imports, security, testing, architecture, conventions
16
+ - **Project-Specific**: Each project maintains its own failure log
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ /plugin install failure-log
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ ### Adding Failures
27
+
28
+ **Manual (recommended for important mistakes):**
29
+ ```
30
+ /failure-add Used relative imports instead of alias pattern in Django
31
+ ```
32
+
33
+ **Semi-automatic:**
34
+ When the PostToolUse hook detects a potential mistake (error, correction), it will prompt whether to log it.
35
+
36
+ ### Viewing Failures
37
+
38
+ ```
39
+ /failure-list # Show all failures
40
+ /failure-list imports # Filter by category
41
+ /failure-list security # Filter by category
42
+ ```
43
+
44
+ ### Categories
45
+
46
+ | Category | Description |
47
+ |----------|-------------|
48
+ | `imports` | Wrong import patterns |
49
+ | `security` | Missing security checks |
50
+ | `testing` | Wrong test approaches |
51
+ | `architecture` | Structural mistakes |
52
+ | `conventions` | Code style violations |
53
+
54
+ ## How It Works
55
+
56
+ ```
57
+ ┌─────────────────────────────────────────────────┐
58
+ │ FAILURE LOG FLOW │
59
+ ├─────────────────────────────────────────────────┤
60
+ │ │
61
+ │ 1. CAPTURE │
62
+ │ - Manual: /failure-add "description" │
63
+ │ - Auto: Hook detects errors → prompts │
64
+ │ │
65
+ │ 2. STORE │
66
+ │ - .claude/failure-log.local.md │
67
+ │ - YAML frontmatter + Markdown entries │
68
+ │ │
69
+ │ 3. INJECT │
70
+ │ - UserPromptSubmit hook reads log │
71
+ │ - Condensed summary added to context │
72
+ │ - "AVOID THESE KNOWN MISTAKES: ..." │
73
+ │ │
74
+ └─────────────────────────────────────────────────┘
75
+ ```
76
+
77
+ ## File Format
78
+
79
+ The failure log is stored at `.claude/failure-log.local.md`:
80
+
81
+ ```markdown
82
+ ---
83
+ enabled: true
84
+ last_updated: 2026-01-01T10:30:00Z
85
+ ---
86
+
87
+ # Failure Log
88
+
89
+ ## Pattern Mistakes
90
+
91
+ ### [2026-01-01] Wrong import pattern in Django
92
+ **Context:** Writing user service
93
+ **Mistake:** Used `from users.models import User`
94
+ **Correct:** Use `import users.models as _users_models`
95
+ **Category:** imports
96
+
97
+ ## Failed Approaches
98
+
99
+ ### [2026-01-01] Mocking database directly
100
+ **Context:** Writing unit tests
101
+ **What failed:** Mocking ORM breaks fixtures
102
+ **Better approach:** Use factory_boy
103
+ **Category:** testing
104
+ ```
105
+
106
+ ## Configuration
107
+
108
+ ### Disabling Injection
109
+
110
+ To temporarily disable failure injection without deleting the log:
111
+
112
+ ```markdown
113
+ ---
114
+ enabled: false
115
+ last_updated: 2026-01-01T10:30:00Z
116
+ ---
117
+ ```
118
+
119
+ ### Gitignore
120
+
121
+ Add to your `.gitignore`:
122
+
123
+ ```
124
+ .claude/*.local.md
125
+ ```
126
+
127
+ ## Components
128
+
129
+ | Component | Purpose |
130
+ |-----------|---------|
131
+ | `hooks/hooks.json` | Hook configuration |
132
+ | `hooks/scripts/inject-failures.sh` | Reads log, outputs summary |
133
+ | `skills/failure-log-manager/` | Knowledge about log format |
134
+ | `commands/failure-add.md` | Manual failure entry |
135
+ | `commands/failure-list.md` | View logged failures |
136
+
137
+ ## Best Practices
138
+
139
+ ### What to Log
140
+
141
+ - Pattern violations that recur
142
+ - Non-obvious mistakes
143
+ - Project-specific conventions
144
+ - Security-related errors
145
+ - Architecture decisions that failed
146
+
147
+ ### What NOT to Log
148
+
149
+ - One-time typos
150
+ - Linting errors (already caught)
151
+ - Generic programming mistakes
152
+ - Non-actionable failures
153
+
154
+ ## Troubleshooting
155
+
156
+ ### Failures Not Injecting
157
+
158
+ 1. Check file exists: `.claude/failure-log.local.md`
159
+ 2. Verify `enabled: true` in frontmatter
160
+ 3. Restart Claude Code (hooks load at session start)
161
+
162
+ ### Hook Not Detecting Failures
163
+
164
+ The PostToolUse hook only triggers on Write/Edit operations. For other failures, use `/failure-add` manually.
165
+
166
+ ## License
167
+
168
+ MIT
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: failure-add
3
+ description: Add a failure or mistake to the project's failure log for future reference
4
+ argument-hint: "[description of mistake]"
5
+ allowed-tools: ["Read", "Write", "AskUserQuestion"]
6
+ ---
7
+
8
+ # Add Failure to Log
9
+
10
+ Record a mistake to prevent repeating it in future sessions.
11
+
12
+ ## Steps
13
+
14
+ 1. **Parse the user's input** to understand the failure:
15
+ - What was the context?
16
+ - What was the mistake?
17
+ - What is the correct approach?
18
+
19
+ 2. **Determine failure type**:
20
+ - **Pattern Mistake**: Recurring pattern violation (imports, naming, structure)
21
+ - **Failed Approach**: An approach that doesn't work
22
+
23
+ 3. **Determine category** (ask if unclear):
24
+ - `imports` - Wrong import patterns
25
+ - `security` - Missing security checks
26
+ - `testing` - Wrong test approaches
27
+ - `architecture` - Structural mistakes
28
+ - `conventions` - Code style violations
29
+
30
+ 4. **Check if failure log exists** at `.claude/failure-log.local.md`:
31
+ - If not, create it with the template below
32
+ - If yes, read existing content
33
+
34
+ 5. **Add the new failure entry**:
35
+ - Update `last_updated` timestamp in frontmatter
36
+ - Add entry under appropriate section (Pattern Mistakes or Failed Approaches)
37
+ - Place newest entries first
38
+
39
+ 6. **Confirm** the failure was logged with a brief summary
40
+
41
+ ## Template for New File
42
+
43
+ ```markdown
44
+ ---
45
+ enabled: true
46
+ last_updated: [CURRENT_ISO_TIMESTAMP]
47
+ ---
48
+
49
+ # Failure Log
50
+
51
+ This log tracks mistakes to prevent repeating them across sessions.
52
+
53
+ ## Pattern Mistakes
54
+
55
+ [NEW_ENTRY_HERE]
56
+
57
+ ## Failed Approaches
58
+
59
+ _No failed approaches logged yet._
60
+ ```
61
+
62
+ ## Entry Format
63
+
64
+ ### For Pattern Mistakes
65
+
66
+ ```markdown
67
+ ### [YYYY-MM-DD] Brief descriptive title
68
+ **Context:** What was being done when the mistake occurred
69
+ **Mistake:** The specific error or violation
70
+ **Correct:** The correct approach to use instead
71
+ **Category:** [category]
72
+ ```
73
+
74
+ ### For Failed Approaches
75
+
76
+ ```markdown
77
+ ### [YYYY-MM-DD] Brief descriptive title
78
+ **Context:** What was being attempted
79
+ **What failed:** Why the approach didn't work
80
+ **Better approach:** What works instead
81
+ **Category:** [category]
82
+ ```
83
+
84
+ ## Examples
85
+
86
+ **User says:** "Log that I used relative imports in Django"
87
+
88
+ **Entry created:**
89
+ ```markdown
90
+ ### [2026-01-01] Used relative imports in Django service
91
+ **Context:** Writing business logic in user service
92
+ **Mistake:** Used `from .models import User` relative import
93
+ **Correct:** Use `import users.models as _users_models` with alias pattern
94
+ **Category:** imports
95
+ ```
96
+
97
+ **User says:** "Remember that mocking the database directly doesn't work"
98
+
99
+ **Entry created:**
100
+ ```markdown
101
+ ### [2026-01-01] Mocking database directly in tests
102
+ **Context:** Writing unit tests for user creation
103
+ **What failed:** Mocking `User.objects.create` breaks ORM behavior and fixtures
104
+ **Better approach:** Use factory_boy to create test data, mock external services only
105
+ **Category:** testing
106
+ ```
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: failure-list
3
+ description: View all logged failures and mistakes for this project
4
+ argument-hint: "[category]"
5
+ allowed-tools: ["Read"]
6
+ ---
7
+
8
+ # List Failures
9
+
10
+ Display failures from the project's failure log.
11
+
12
+ ## Steps
13
+
14
+ 1. **Check if failure log exists** at `.claude/failure-log.local.md`:
15
+ - If not, inform user: "No failure log found. Use `/failure-add` to start logging mistakes."
16
+
17
+ 2. **Read the failure log** file
18
+
19
+ 3. **Parse optional category filter** from arguments:
20
+ - If category provided, filter entries by that category
21
+ - Valid categories: `imports`, `security`, `testing`, `architecture`, `conventions`
22
+ - If no category, show all entries
23
+
24
+ 4. **Display failures** in a readable format:
25
+
26
+ ## Output Format
27
+
28
+ ```
29
+ 📋 Failure Log Summary
30
+ ━━━━━━━━━━━━━━━━━━━━━
31
+
32
+ Total entries: X
33
+ Last updated: YYYY-MM-DD
34
+
35
+ ## Pattern Mistakes (X entries)
36
+
37
+ 1. [2026-01-01] Brief title
38
+ Category: imports
39
+ Mistake: What went wrong
40
+ Correct: What to do instead
41
+
42
+ 2. [2026-01-01] Another title
43
+ ...
44
+
45
+ ## Failed Approaches (X entries)
46
+
47
+ 1. [2026-01-01] Brief title
48
+ Category: testing
49
+ What failed: Why it didn't work
50
+ Better: What works instead
51
+
52
+ ━━━━━━━━━━━━━━━━━━━━━
53
+ ```
54
+
55
+ ## Filtered Output
56
+
57
+ When category is provided:
58
+
59
+ ```
60
+ 📋 Failure Log: imports
61
+ ━━━━━━━━━━━━━━━━━━━━━
62
+
63
+ Showing X entries for category: imports
64
+
65
+ 1. [2026-01-01] Wrong import pattern
66
+ Mistake: Used relative imports
67
+ Correct: Use alias pattern
68
+
69
+ ...
70
+ ```
71
+
72
+ ## Empty Log
73
+
74
+ If log exists but has no entries:
75
+
76
+ ```
77
+ 📋 Failure Log
78
+ ━━━━━━━━━━━━━━
79
+
80
+ No failures logged yet.
81
+
82
+ Use `/failure-add "description"` to log a mistake.
83
+ ```
84
+
85
+ ## Usage Examples
86
+
87
+ - `/failure-list` - Show all failures
88
+ - `/failure-list imports` - Show only import-related failures
89
+ - `/failure-list security` - Show only security-related failures
@@ -0,0 +1,16 @@
1
+ {
2
+ "description": "Failure log hooks for injecting learned lessons at session start",
3
+ "hooks": {
4
+ "SessionStart": [
5
+ {
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/inject-failures.sh",
10
+ "timeout": 5
11
+ }
12
+ ]
13
+ }
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,64 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ # Failure log injection script
5
+ # Reads .claude/failure-log.local.md and injects a condensed summary into context
6
+
7
+ FAILURE_LOG=".claude/failure-log.local.md"
8
+
9
+ # Quick exit if no failure log exists
10
+ if [[ ! -f "$FAILURE_LOG" ]]; then
11
+ exit 0
12
+ fi
13
+
14
+ # Parse YAML frontmatter
15
+ FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' "$FAILURE_LOG" 2>/dev/null || echo "")
16
+
17
+ # Check if enabled (default to true if not specified)
18
+ ENABLED=$(echo "$FRONTMATTER" | grep '^enabled:' | sed 's/enabled: *//' | tr -d ' ' || echo "true")
19
+ if [[ "$ENABLED" == "false" ]]; then
20
+ exit 0
21
+ fi
22
+
23
+ # Extract markdown body (everything after the second ---)
24
+ BODY=$(awk '/^---$/{i++; next} i>=2' "$FAILURE_LOG" 2>/dev/null || echo "")
25
+
26
+ # Count failures (lines starting with ###)
27
+ FAILURE_COUNT=$(echo "$BODY" | grep -c '^### ' || echo "0")
28
+
29
+ if [[ "$FAILURE_COUNT" -eq 0 ]]; then
30
+ exit 0
31
+ fi
32
+
33
+ # Extract failure summaries (condensed format)
34
+ # Get the mistake line from each failure entry
35
+ FAILURES_SUMMARY=$(echo "$BODY" | awk '
36
+ /^### / {
37
+ # Get the failure title (date and description)
38
+ title = $0
39
+ gsub(/^### /, "", title)
40
+ }
41
+ /^\*\*Mistake:\*\*/ {
42
+ mistake = $0
43
+ gsub(/^\*\*Mistake:\*\* */, "", mistake)
44
+ if (title != "") {
45
+ print "- " title ": " mistake
46
+ title = ""
47
+ }
48
+ }
49
+ ')
50
+
51
+ # If no structured failures found, try simpler extraction
52
+ if [[ -z "$FAILURES_SUMMARY" ]]; then
53
+ # Just extract headers as reminders
54
+ FAILURES_SUMMARY=$(echo "$BODY" | grep '^### ' | sed 's/^### /- /' | head -20)
55
+ fi
56
+
57
+ # Output system message with failure context
58
+ if [[ -n "$FAILURES_SUMMARY" ]]; then
59
+ cat << EOF
60
+ {
61
+ "systemMessage": "⚠️ FAILURE LOG ACTIVE ($FAILURE_COUNT known mistakes to avoid):\n$FAILURES_SUMMARY\n\nReview full log at .claude/failure-log.local.md if needed."
62
+ }
63
+ EOF
64
+ fi
@@ -0,0 +1,164 @@
1
+ ---
2
+ name: failure-log-manager
3
+ description: This skill should be used when the user asks to "log a failure", "remember this mistake", "add to failure log", "what mistakes to avoid", "check failure log", or when a mistake is detected that should be recorded for future reference. Manages persistent failure memory.
4
+ ---
5
+
6
+ # Failure Log Manager
7
+
8
+ Manages the persistent failure log at `.claude/failure-log.local.md` to prevent repeating mistakes across sessions.
9
+
10
+ ## Activation Triggers
11
+
12
+ This skill activates when:
13
+ - User asks to log a mistake or failure
14
+ - A pattern violation or error is detected
15
+ - User wants to review known mistakes
16
+ - Adding, viewing, or managing failure entries
17
+
18
+ ## File Location
19
+
20
+ ```
21
+ .claude/failure-log.local.md
22
+ ```
23
+
24
+ This file is project-specific and should be in `.gitignore`.
25
+
26
+ ## File Format
27
+
28
+ ```markdown
29
+ ---
30
+ enabled: true
31
+ last_updated: 2026-01-01T10:30:00Z
32
+ ---
33
+
34
+ # Failure Log
35
+
36
+ ## Pattern Mistakes
37
+
38
+ ### [YYYY-MM-DD] Brief title
39
+ **Context:** What was being done
40
+ **Mistake:** What went wrong
41
+ **Correct:** What should be done instead
42
+ **Category:** imports|security|testing|architecture|conventions
43
+
44
+ ## Failed Approaches
45
+
46
+ ### [YYYY-MM-DD] Brief title
47
+ **Context:** What was being attempted
48
+ **What failed:** Why the approach didn't work
49
+ **Better approach:** What works instead
50
+ **Category:** imports|security|testing|architecture|conventions
51
+ ```
52
+
53
+ ## Categories
54
+
55
+ | Category | Description | Examples |
56
+ |----------|-------------|----------|
57
+ | `imports` | Wrong import patterns | Relative imports, missing aliases |
58
+ | `security` | Missing security checks | No permission classes, exposed secrets |
59
+ | `testing` | Wrong test approaches | unittest vs pytest, missing fixtures |
60
+ | `architecture` | Structural mistakes | Wrong file locations, missing layers |
61
+ | `conventions` | Code style violations | Naming, formatting, patterns |
62
+
63
+ ## Adding Failures
64
+
65
+ ### Pattern Mistake Entry
66
+
67
+ For recurring pattern violations:
68
+
69
+ ```markdown
70
+ ### [2026-01-01] Wrong import pattern in Django
71
+ **Context:** Writing user service
72
+ **Mistake:** Used `from users.models import User` instead of alias pattern
73
+ **Correct:** Use `import users.models as _users_models`
74
+ **Category:** imports
75
+ ```
76
+
77
+ ### Failed Approach Entry
78
+
79
+ For approaches that don't work:
80
+
81
+ ```markdown
82
+ ### [2026-01-01] Tried unittest instead of pytest
83
+ **Context:** Writing tests for user service
84
+ **What failed:** unittest assertions don't integrate with Django fixtures
85
+ **Better approach:** Use pytest with factory_boy for test data
86
+ **Category:** testing
87
+ ```
88
+
89
+ ## Reading Failures
90
+
91
+ To check the failure log:
92
+
93
+ 1. Read `.claude/failure-log.local.md`
94
+ 2. Parse entries under each section
95
+ 3. Use category to filter relevant failures
96
+ 4. Apply lessons to current task
97
+
98
+ ## Creating Initial Log
99
+
100
+ If no failure log exists, create with template:
101
+
102
+ ```markdown
103
+ ---
104
+ enabled: true
105
+ last_updated: CURRENT_ISO_TIMESTAMP
106
+ ---
107
+
108
+ # Failure Log
109
+
110
+ This log tracks mistakes to prevent repeating them across sessions.
111
+
112
+ ## Pattern Mistakes
113
+
114
+ _No pattern mistakes logged yet._
115
+
116
+ ## Failed Approaches
117
+
118
+ _No failed approaches logged yet._
119
+ ```
120
+
121
+ ## Updating Log
122
+
123
+ When adding a new failure:
124
+
125
+ 1. Read existing file
126
+ 2. Update `last_updated` in frontmatter
127
+ 3. Add new entry under appropriate section (Pattern Mistakes or Failed Approaches)
128
+ 4. Maintain chronological order (newest first)
129
+ 5. Write updated file
130
+
131
+ ## Best Practices
132
+
133
+ ### What to Log
134
+
135
+ Log failures that are:
136
+ - Likely to recur (pattern-based mistakes)
137
+ - Non-obvious (not caught by linting)
138
+ - Project-specific (conventions unique to codebase)
139
+ - Costly to repeat (security, architecture)
140
+
141
+ ### What NOT to Log
142
+
143
+ Skip failures that are:
144
+ - One-time typos
145
+ - Already caught by linting/tests
146
+ - Generic programming errors
147
+ - Not actionable
148
+
149
+ ### Entry Quality
150
+
151
+ Each entry must have:
152
+ - Clear date for context
153
+ - Specific mistake description
154
+ - Actionable correct approach
155
+ - Appropriate category
156
+
157
+ ## Integration with Hooks
158
+
159
+ The `UserPromptSubmit` hook automatically injects a condensed summary of failures into context. The summary includes:
160
+ - Total failure count
161
+ - One-line summary per failure
162
+ - Reference to full log file
163
+
164
+ This ensures failures are always visible without overwhelming context.
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "flutter",
3
+ "version": "0.1.0",
4
+ "description": "Flutter development plugin with Fastlane automation, store publishing, and architecture patterns",
5
+ "author": {
6
+ "name": "Smicolon",
7
+ "email": "dev@smicolon.com"
8
+ },
9
+ "keywords": ["flutter", "fastlane", "ios", "android", "app-store", "google-play", "mobile"]
10
+ }
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ All notable changes to the smi-flutter plugin will be documented in this file.
4
+
5
+ ## [Unreleased]
6
+
7
+ ### Changed
8
+ - Renamed from `smi-flutter` to `flutter` as part of ai-kit migration
9
+ - Moved from `plugins/smi-flutter/` to `packs/flutter/`
10
+
11
+ ## [0.1.0] - 2025-01-02
12
+
13
+ ### Added
14
+ - Initial release (experimental)
15
+ - 3 agents: flutter-architect, flutter-builder, release-manager
16
+ - 5 commands: flutter-build, flutter-test, flutter-deploy, fastlane-setup, signing-setup
17
+ - 3 skills: flutter-architecture, fastlane-knowledge, store-publishing
18
+ - Fastlane automation for iOS and Android
19
+ - App Store and Play Store publishing support