@smicolon/ai-kit 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +73 -40
  2. package/dist/index.js +260 -126
  3. package/package.json +5 -5
  4. package/.claude-plugin/marketplace.json +0 -369
  5. package/packs/architect/CHANGELOG.md +0 -17
  6. package/packs/architect/README.md +0 -58
  7. package/packs/architect/agents/system-architect.md +0 -768
  8. package/packs/architect/commands/diagram-create.md +0 -300
  9. package/packs/better-auth/.mcp.json +0 -14
  10. package/packs/better-auth/CHANGELOG.md +0 -26
  11. package/packs/better-auth/README.md +0 -125
  12. package/packs/better-auth/agents/auth-architect.md +0 -278
  13. package/packs/better-auth/commands/auth-provider-add.md +0 -265
  14. package/packs/better-auth/commands/auth-setup.md +0 -298
  15. package/packs/better-auth/skills/auth-security/SKILL.md +0 -425
  16. package/packs/better-auth/skills/better-auth-patterns/SKILL.md +0 -455
  17. package/packs/dev-loop/CHANGELOG.md +0 -69
  18. package/packs/dev-loop/README.md +0 -155
  19. package/packs/dev-loop/commands/cancel-dev.md +0 -21
  20. package/packs/dev-loop/commands/dev-loop.md +0 -72
  21. package/packs/dev-loop/commands/dev-plan.md +0 -351
  22. package/packs/dev-loop/hooks/hooks.json +0 -15
  23. package/packs/dev-loop/hooks/stop-hook.sh +0 -178
  24. package/packs/dev-loop/scripts/setup-dev-loop.sh +0 -194
  25. package/packs/dev-loop/skills/tdd-planner/SKILL.md +0 -249
  26. package/packs/dev-loop/skills/tdd-planner/references/framework-patterns.md +0 -874
  27. package/packs/dev-loop/skills/tdd-planner/references/good-example.md +0 -260
  28. package/packs/dev-loop/skills/tdd-planner/references/plan-template.md +0 -275
  29. package/packs/django/CHANGELOG.md +0 -39
  30. package/packs/django/README.md +0 -92
  31. package/packs/django/agents/django-architect.md +0 -182
  32. package/packs/django/agents/django-builder.md +0 -250
  33. package/packs/django/agents/django-feature-based.md +0 -420
  34. package/packs/django/agents/django-reviewer.md +0 -253
  35. package/packs/django/agents/django-tester.md +0 -230
  36. package/packs/django/commands/api-endpoint.md +0 -285
  37. package/packs/django/commands/model-create.md +0 -178
  38. package/packs/django/commands/test-generate.md +0 -325
  39. package/packs/django/rules/migrations.md +0 -138
  40. package/packs/django/rules/models.md +0 -167
  41. package/packs/django/rules/serializers.md +0 -126
  42. package/packs/django/rules/services.md +0 -131
  43. package/packs/django/rules/tests.md +0 -140
  44. package/packs/django/rules/views.md +0 -102
  45. package/packs/django/skills/import-convention-enforcer/SKILL.md +0 -226
  46. package/packs/django/skills/import-convention-enforcer/patterns/django-imports.md +0 -343
  47. package/packs/django/skills/migration-safety-checker/SKILL.md +0 -375
  48. package/packs/django/skills/model-entity-validator/SKILL.md +0 -298
  49. package/packs/django/skills/performance-optimizer/SKILL.md +0 -447
  50. package/packs/django/skills/red-phase-verifier/SKILL.md +0 -180
  51. package/packs/django/skills/security-first-validator/SKILL.md +0 -435
  52. package/packs/django/skills/test-coverage-advisor/SKILL.md +0 -394
  53. package/packs/django/skills/test-validity-checker/SKILL.md +0 -194
  54. package/packs/failure-log/CHANGELOG.md +0 -20
  55. package/packs/failure-log/README.md +0 -168
  56. package/packs/failure-log/commands/failure-add.md +0 -106
  57. package/packs/failure-log/commands/failure-list.md +0 -89
  58. package/packs/failure-log/hooks/hooks.json +0 -16
  59. package/packs/failure-log/hooks/scripts/inject-failures.sh +0 -64
  60. package/packs/failure-log/skills/failure-log-manager/SKILL.md +0 -164
  61. package/packs/flutter/CHANGELOG.md +0 -19
  62. package/packs/flutter/README.md +0 -170
  63. package/packs/flutter/agents/flutter-architect.md +0 -166
  64. package/packs/flutter/agents/flutter-builder.md +0 -303
  65. package/packs/flutter/agents/release-manager.md +0 -355
  66. package/packs/flutter/commands/fastlane-setup.md +0 -188
  67. package/packs/flutter/commands/flutter-build.md +0 -90
  68. package/packs/flutter/commands/flutter-deploy.md +0 -133
  69. package/packs/flutter/commands/flutter-test.md +0 -117
  70. package/packs/flutter/commands/signing-setup.md +0 -209
  71. package/packs/flutter/hooks/hooks.json +0 -17
  72. package/packs/flutter/skills/fastlane-knowledge/SKILL.md +0 -193
  73. package/packs/flutter/skills/flutter-architecture/SKILL.md +0 -127
  74. package/packs/flutter/skills/store-publishing/SKILL.md +0 -163
  75. package/packs/hono/CHANGELOG.md +0 -19
  76. package/packs/hono/README.md +0 -143
  77. package/packs/hono/agents/hono-architect.md +0 -240
  78. package/packs/hono/agents/hono-builder.md +0 -285
  79. package/packs/hono/agents/hono-reviewer.md +0 -279
  80. package/packs/hono/agents/hono-tester.md +0 -346
  81. package/packs/hono/commands/middleware-create.md +0 -223
  82. package/packs/hono/commands/project-init.md +0 -306
  83. package/packs/hono/commands/route-create.md +0 -153
  84. package/packs/hono/commands/rpc-client.md +0 -263
  85. package/packs/hono/skills/cloudflare-bindings/SKILL.md +0 -408
  86. package/packs/hono/skills/hono-patterns/SKILL.md +0 -309
  87. package/packs/hono/skills/rpc-typesafe/SKILL.md +0 -388
  88. package/packs/hono/skills/zod-validation/SKILL.md +0 -332
  89. package/packs/nestjs/CHANGELOG.md +0 -29
  90. package/packs/nestjs/README.md +0 -75
  91. package/packs/nestjs/agents/nestjs-architect.md +0 -402
  92. package/packs/nestjs/agents/nestjs-builder.md +0 -301
  93. package/packs/nestjs/agents/nestjs-tester.md +0 -437
  94. package/packs/nestjs/commands/module-create.md +0 -369
  95. package/packs/nestjs/rules/controllers.md +0 -92
  96. package/packs/nestjs/rules/dto.md +0 -124
  97. package/packs/nestjs/rules/entities.md +0 -102
  98. package/packs/nestjs/rules/services.md +0 -106
  99. package/packs/nestjs/skills/barrel-export-manager/SKILL.md +0 -389
  100. package/packs/nestjs/skills/import-convention-enforcer/SKILL.md +0 -365
  101. package/packs/nextjs/CHANGELOG.md +0 -36
  102. package/packs/nextjs/README.md +0 -76
  103. package/packs/nextjs/agents/frontend-tester.md +0 -680
  104. package/packs/nextjs/agents/frontend-visual.md +0 -820
  105. package/packs/nextjs/agents/nextjs-architect.md +0 -331
  106. package/packs/nextjs/agents/nextjs-modular.md +0 -433
  107. package/packs/nextjs/commands/component-create.md +0 -398
  108. package/packs/nextjs/rules/api-routes.md +0 -129
  109. package/packs/nextjs/rules/components.md +0 -106
  110. package/packs/nextjs/rules/hooks.md +0 -132
  111. package/packs/nextjs/skills/accessibility-validator/SKILL.md +0 -445
  112. package/packs/nextjs/skills/import-convention-enforcer/SKILL.md +0 -399
  113. package/packs/nextjs/skills/react-form-validator/SKILL.md +0 -569
  114. package/packs/nuxtjs/CHANGELOG.md +0 -30
  115. package/packs/nuxtjs/README.md +0 -56
  116. package/packs/nuxtjs/agents/frontend-tester.md +0 -680
  117. package/packs/nuxtjs/agents/frontend-visual.md +0 -820
  118. package/packs/nuxtjs/agents/nuxtjs-architect.md +0 -537
  119. package/packs/nuxtjs/commands/component-create.md +0 -223
  120. package/packs/nuxtjs/rules/components.md +0 -101
  121. package/packs/nuxtjs/rules/composables.md +0 -118
  122. package/packs/nuxtjs/rules/server-routes.md +0 -127
  123. package/packs/nuxtjs/skills/accessibility-validator/SKILL.md +0 -183
  124. package/packs/nuxtjs/skills/import-convention-enforcer/SKILL.md +0 -196
  125. package/packs/nuxtjs/skills/veevalidate-form-validator/SKILL.md +0 -190
  126. package/packs/onboard/CHANGELOG.md +0 -22
  127. package/packs/onboard/README.md +0 -103
  128. package/packs/onboard/agents/onboard-guide.md +0 -118
  129. package/packs/onboard/commands/onboard.md +0 -313
  130. package/packs/onboard/skills/onboard-context-provider/SKILL.md +0 -98
  131. package/packs/tanstack-router/CHANGELOG.md +0 -30
  132. package/packs/tanstack-router/README.md +0 -113
  133. package/packs/tanstack-router/agents/tanstack-architect.md +0 -173
  134. package/packs/tanstack-router/agents/tanstack-builder.md +0 -360
  135. package/packs/tanstack-router/agents/tanstack-tester.md +0 -454
  136. package/packs/tanstack-router/commands/form-create.md +0 -313
  137. package/packs/tanstack-router/commands/query-create.md +0 -263
  138. package/packs/tanstack-router/commands/route-create.md +0 -190
  139. package/packs/tanstack-router/commands/table-create.md +0 -413
  140. package/packs/tanstack-router/skills/ai-patterns/SKILL.md +0 -370
  141. package/packs/tanstack-router/skills/db-patterns/SKILL.md +0 -346
  142. package/packs/tanstack-router/skills/devtools-patterns/SKILL.md +0 -415
  143. package/packs/tanstack-router/skills/form-patterns/SKILL.md +0 -425
  144. package/packs/tanstack-router/skills/pacer-patterns/SKILL.md +0 -341
  145. package/packs/tanstack-router/skills/query-patterns/SKILL.md +0 -359
  146. package/packs/tanstack-router/skills/router-patterns/SKILL.md +0 -285
  147. package/packs/tanstack-router/skills/store-patterns/SKILL.md +0 -351
  148. package/packs/tanstack-router/skills/table-patterns/SKILL.md +0 -531
  149. package/packs/tanstack-router/skills/tanstack-conventions/SKILL.md +0 -428
  150. package/packs/tanstack-router/skills/virtual-patterns/SKILL.md +0 -490
  151. package/packs/worktree/CHANGELOG.md +0 -45
  152. package/packs/worktree/README.md +0 -219
  153. package/packs/worktree/commands/wt.md +0 -93
  154. package/packs/worktree/scripts/wt.sh +0 -957
  155. package/packs/worktree/skills/worktree-manager/SKILL.md +0 -113
@@ -1,168 +0,0 @@
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
@@ -1,106 +0,0 @@
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
- ```
@@ -1,89 +0,0 @@
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
@@ -1,16 +0,0 @@
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
- }
@@ -1,64 +0,0 @@
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
@@ -1,164 +0,0 @@
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.
@@ -1,19 +0,0 @@
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