agileflow 3.3.0 → 3.4.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.
- package/CHANGELOG.md +10 -0
- package/README.md +6 -6
- package/lib/skill-loader.js +0 -1
- package/package.json +1 -1
- package/scripts/agileflow-statusline.sh +81 -0
- package/scripts/agileflow-welcome.js +79 -0
- package/scripts/claude-tmux.sh +90 -23
- package/scripts/claude-watchdog.sh +225 -0
- package/scripts/generators/agent-registry.js +14 -1
- package/scripts/generators/inject-babysit.js +22 -9
- package/scripts/generators/inject-help.js +19 -9
- package/scripts/lib/ac-test-matcher.js +452 -0
- package/scripts/lib/audit-cleanup.js +250 -0
- package/scripts/lib/audit-registry.js +304 -0
- package/scripts/lib/configure-features.js +35 -0
- package/scripts/lib/feature-catalog.js +3 -3
- package/scripts/lib/gate-enforcer.js +295 -0
- package/scripts/lib/model-profiles.js +118 -0
- package/scripts/lib/quality-gates.js +163 -0
- package/scripts/lib/signal-detectors.js +44 -1
- package/scripts/lib/skill-catalog.js +557 -0
- package/scripts/lib/skill-recommender.js +311 -0
- package/scripts/lib/status-writer.js +255 -0
- package/scripts/lib/story-claiming.js +128 -45
- package/scripts/lib/task-sync.js +32 -38
- package/scripts/lib/tdd-phase-manager.js +455 -0
- package/scripts/lib/team-events.js +34 -3
- package/scripts/lib/tmux-audit-monitor.js +611 -0
- package/scripts/lib/tmux-group-colors.js +113 -0
- package/scripts/lib/tool-registry.yaml +241 -0
- package/scripts/lib/tool-shed.js +441 -0
- package/scripts/messaging-bridge.js +209 -1
- package/scripts/native-team-observer.js +219 -0
- package/scripts/obtain-context.js +14 -0
- package/scripts/ralph-loop.js +30 -5
- package/scripts/smart-detect.js +21 -0
- package/scripts/spawn-audit-sessions.js +877 -0
- package/scripts/team-manager.js +56 -16
- package/scripts/tmux-close-windows.sh +180 -0
- package/src/core/agents/a11y-analyzer-aria.md +155 -0
- package/src/core/agents/a11y-analyzer-forms.md +162 -0
- package/src/core/agents/a11y-analyzer-keyboard.md +175 -0
- package/src/core/agents/a11y-analyzer-semantic.md +153 -0
- package/src/core/agents/a11y-analyzer-visual.md +158 -0
- package/src/core/agents/a11y-consensus.md +248 -0
- package/src/core/agents/ads-audit-budget.md +181 -0
- package/src/core/agents/ads-audit-compliance.md +169 -0
- package/src/core/agents/ads-audit-creative.md +164 -0
- package/src/core/agents/ads-audit-google.md +226 -0
- package/src/core/agents/ads-audit-meta.md +183 -0
- package/src/core/agents/ads-audit-tracking.md +197 -0
- package/src/core/agents/ads-consensus.md +396 -0
- package/src/core/agents/ads-generate.md +145 -0
- package/src/core/agents/ads-performance-tracker.md +197 -0
- package/src/core/agents/api-quality-analyzer-conventions.md +148 -0
- package/src/core/agents/api-quality-analyzer-docs.md +176 -0
- package/src/core/agents/api-quality-analyzer-errors.md +183 -0
- package/src/core/agents/api-quality-analyzer-pagination.md +171 -0
- package/src/core/agents/api-quality-analyzer-versioning.md +143 -0
- package/src/core/agents/api-quality-consensus.md +214 -0
- package/src/core/agents/arch-analyzer-circular.md +148 -0
- package/src/core/agents/arch-analyzer-complexity.md +171 -0
- package/src/core/agents/arch-analyzer-coupling.md +146 -0
- package/src/core/agents/arch-analyzer-layering.md +151 -0
- package/src/core/agents/arch-analyzer-patterns.md +162 -0
- package/src/core/agents/arch-consensus.md +227 -0
- package/src/core/agents/brainstorm-analyzer-features.md +169 -0
- package/src/core/agents/brainstorm-analyzer-growth.md +161 -0
- package/src/core/agents/brainstorm-analyzer-integration.md +172 -0
- package/src/core/agents/brainstorm-analyzer-market.md +147 -0
- package/src/core/agents/brainstorm-analyzer-ux.md +167 -0
- package/src/core/agents/brainstorm-consensus.md +237 -0
- package/src/core/agents/completeness-consensus.md +5 -5
- package/src/core/agents/perf-consensus.md +2 -2
- package/src/core/agents/security-consensus.md +2 -2
- package/src/core/agents/seo-analyzer-content.md +167 -0
- package/src/core/agents/seo-analyzer-images.md +187 -0
- package/src/core/agents/seo-analyzer-performance.md +206 -0
- package/src/core/agents/seo-analyzer-schema.md +176 -0
- package/src/core/agents/seo-analyzer-sitemap.md +172 -0
- package/src/core/agents/seo-analyzer-technical.md +144 -0
- package/src/core/agents/seo-consensus.md +289 -0
- package/src/core/agents/test-consensus.md +2 -2
- package/src/core/commands/adr.md +1 -0
- package/src/core/commands/ads/audit.md +375 -0
- package/src/core/commands/ads/budget.md +97 -0
- package/src/core/commands/ads/competitor.md +112 -0
- package/src/core/commands/ads/creative.md +85 -0
- package/src/core/commands/ads/generate.md +238 -0
- package/src/core/commands/ads/google.md +112 -0
- package/src/core/commands/ads/health.md +327 -0
- package/src/core/commands/ads/landing.md +119 -0
- package/src/core/commands/ads/linkedin.md +112 -0
- package/src/core/commands/ads/meta.md +91 -0
- package/src/core/commands/ads/microsoft.md +115 -0
- package/src/core/commands/ads/plan.md +321 -0
- package/src/core/commands/ads/test-plan.md +317 -0
- package/src/core/commands/ads/tiktok.md +129 -0
- package/src/core/commands/ads/track.md +288 -0
- package/src/core/commands/ads/youtube.md +124 -0
- package/src/core/commands/ads.md +140 -0
- package/src/core/commands/assign.md +1 -0
- package/src/core/commands/audit.md +43 -6
- package/src/core/commands/babysit.md +315 -1266
- package/src/core/commands/baseline.md +1 -0
- package/src/core/commands/blockers.md +1 -0
- package/src/core/commands/board.md +1 -0
- package/src/core/commands/changelog.md +1 -0
- package/src/core/commands/choose.md +1 -0
- package/src/core/commands/ci.md +1 -0
- package/src/core/commands/code/accessibility.md +347 -0
- package/src/core/commands/code/api.md +297 -0
- package/src/core/commands/code/architecture.md +297 -0
- package/src/core/commands/{audit → code}/completeness.md +72 -25
- package/src/core/commands/{audit → code}/legal.md +63 -16
- package/src/core/commands/{audit → code}/logic.md +64 -16
- package/src/core/commands/{audit → code}/performance.md +67 -20
- package/src/core/commands/{audit → code}/security.md +69 -19
- package/src/core/commands/{audit → code}/test.md +67 -20
- package/src/core/commands/configure.md +1 -0
- package/src/core/commands/council.md +1 -0
- package/src/core/commands/deploy.md +1 -0
- package/src/core/commands/diagnose.md +1 -0
- package/src/core/commands/docs.md +1 -0
- package/src/core/commands/epic/edit.md +213 -0
- package/src/core/commands/epic.md +1 -0
- package/src/core/commands/export.md +238 -0
- package/src/core/commands/help.md +16 -1
- package/src/core/commands/{discovery → ideate}/brief.md +12 -12
- package/src/core/commands/{discovery/new.md → ideate/discover.md} +20 -16
- package/src/core/commands/ideate/features.md +496 -0
- package/src/core/commands/ideate/new.md +158 -124
- package/src/core/commands/impact.md +1 -0
- package/src/core/commands/learn/explain.md +118 -0
- package/src/core/commands/learn/glossary.md +135 -0
- package/src/core/commands/learn/patterns.md +138 -0
- package/src/core/commands/learn/tour.md +126 -0
- package/src/core/commands/migrate/codemods.md +151 -0
- package/src/core/commands/migrate/plan.md +131 -0
- package/src/core/commands/migrate/scan.md +114 -0
- package/src/core/commands/migrate/validate.md +119 -0
- package/src/core/commands/multi-expert.md +1 -0
- package/src/core/commands/pr.md +1 -0
- package/src/core/commands/review.md +1 -0
- package/src/core/commands/seo/audit.md +373 -0
- package/src/core/commands/seo/competitor.md +174 -0
- package/src/core/commands/seo/content.md +107 -0
- package/src/core/commands/seo/geo.md +229 -0
- package/src/core/commands/seo/hreflang.md +140 -0
- package/src/core/commands/seo/images.md +96 -0
- package/src/core/commands/seo/page.md +198 -0
- package/src/core/commands/seo/plan.md +163 -0
- package/src/core/commands/seo/programmatic.md +131 -0
- package/src/core/commands/seo/references/cwv-thresholds.md +64 -0
- package/src/core/commands/seo/references/eeat-framework.md +110 -0
- package/src/core/commands/seo/references/quality-gates.md +91 -0
- package/src/core/commands/seo/references/schema-types.md +102 -0
- package/src/core/commands/seo/schema.md +183 -0
- package/src/core/commands/seo/sitemap.md +97 -0
- package/src/core/commands/seo/technical.md +100 -0
- package/src/core/commands/seo.md +107 -0
- package/src/core/commands/skill/list.md +68 -212
- package/src/core/commands/skill/recommend.md +216 -0
- package/src/core/commands/sprint.md +1 -0
- package/src/core/commands/status/undo.md +191 -0
- package/src/core/commands/status.md +1 -0
- package/src/core/commands/story/edit.md +204 -0
- package/src/core/commands/story/view.md +29 -7
- package/src/core/commands/story-validate.md +1 -0
- package/src/core/commands/story.md +1 -0
- package/src/core/commands/tdd-next.md +238 -0
- package/src/core/commands/tdd.md +211 -0
- package/src/core/commands/team/start.md +10 -6
- package/src/core/commands/tests.md +1 -0
- package/src/core/commands/verify.md +27 -1
- package/src/core/commands/workflow.md +2 -0
- package/src/core/experts/_core-expertise.yaml +105 -0
- package/src/core/experts/analytics/expertise.yaml +5 -99
- package/src/core/experts/codebase-query/expertise.yaml +3 -72
- package/src/core/experts/compliance/expertise.yaml +6 -72
- package/src/core/experts/database/expertise.yaml +9 -52
- package/src/core/experts/documentation/expertise.yaml +7 -140
- package/src/core/experts/integrations/expertise.yaml +7 -127
- package/src/core/experts/mentor/expertise.yaml +8 -35
- package/src/core/experts/monitoring/expertise.yaml +7 -49
- package/src/core/experts/performance/expertise.yaml +1 -26
- package/src/core/experts/security/expertise.yaml +9 -34
- package/src/core/experts/ui/expertise.yaml +6 -36
- package/src/core/knowledge/ads/ad-audit-checklist-scoring.md +424 -0
- package/src/core/knowledge/ads/ad-optimization-logic.md +590 -0
- package/src/core/knowledge/ads/ad-technical-specifications.md +385 -0
- package/src/core/knowledge/ads/definitive-advertising-reference-2026.md +506 -0
- package/src/core/knowledge/ads/paid-advertising-research-2026.md +445 -0
- package/src/core/teams/backend.json +41 -0
- package/src/core/teams/frontend.json +41 -0
- package/src/core/teams/qa.json +41 -0
- package/src/core/teams/solo.json +35 -0
- package/src/core/templates/agileflow-metadata.json +20 -1
- package/tools/cli/commands/setup.js +85 -3
- package/tools/cli/commands/update.js +42 -0
- package/tools/cli/installers/ide/_base-ide.js +42 -5
- package/tools/cli/installers/ide/claude-code.js +71 -3
- package/tools/cli/lib/content-injector.js +160 -12
- package/tools/cli/lib/docs-setup.js +1 -1
- package/src/core/commands/skill/create.md +0 -698
- package/src/core/commands/skill/delete.md +0 -316
- package/src/core/commands/skill/edit.md +0 -359
- package/src/core/commands/skill/test.md +0 -394
- package/src/core/commands/skill/upgrade.md +0 -552
- package/src/core/templates/skill-template.md +0 -117
|
@@ -1,552 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Upgrade existing skills with self-improving learning capability
|
|
3
|
-
argument-hint: "[<name>]"
|
|
4
|
-
compact_context:
|
|
5
|
-
priority: medium
|
|
6
|
-
preserve_rules:
|
|
7
|
-
- "ACTIVE COMMAND: /agileflow:skill:upgrade - Adds learning capability to skills"
|
|
8
|
-
- "MUST list available skills if SKILL_NAME not provided"
|
|
9
|
-
- "MUST check if skill already has learning capability"
|
|
10
|
-
- "MUST create .agileflow/skills/_learnings/<skill>.yaml learnings file"
|
|
11
|
-
- "MUST add Self-Improving Learnings section to SKILL.md"
|
|
12
|
-
- "MUST preserve all existing skill content (only add new sections)"
|
|
13
|
-
- "MUST offer preview mode before writing changes"
|
|
14
|
-
- "MUST support batch upgrade with --all flag"
|
|
15
|
-
state_fields:
|
|
16
|
-
- selected_skill
|
|
17
|
-
- already_upgraded
|
|
18
|
-
- learnings_file_created
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
# /agileflow:skill:upgrade
|
|
22
|
-
|
|
23
|
-
Add self-improving capability to existing skills created before the learning system was introduced.
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
<!-- COMPACT_SUMMARY_START -->
|
|
28
|
-
|
|
29
|
-
## 🚨 COMPACT SUMMARY - /agileflow:skill:upgrade IS ACTIVE
|
|
30
|
-
|
|
31
|
-
**CRITICAL**: This command adds learning capability to existing skills, preserving all original content.
|
|
32
|
-
|
|
33
|
-
### 🚨 RULE #1: Select Skill or Use Batch Mode
|
|
34
|
-
If SKILL_NAME not provided:
|
|
35
|
-
```bash
|
|
36
|
-
ls -d .claude/skills/*/ | xargs -I {} basename {}
|
|
37
|
-
```
|
|
38
|
-
Show options. Or use `--all` flag for batch upgrade.
|
|
39
|
-
|
|
40
|
-
### 🚨 RULE #2: Check Upgrade Status
|
|
41
|
-
Read SKILL.md and check for:
|
|
42
|
-
- Existing `## Self-Improving Learnings` section
|
|
43
|
-
- Existing `.agileflow/skills/_learnings/<skill>.yaml` file
|
|
44
|
-
|
|
45
|
-
If already upgraded:
|
|
46
|
-
```
|
|
47
|
-
✅ Skill "<skill>" already has self-improving capability!
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 🚨 RULE #3: Show What Will Be Added
|
|
51
|
-
Display changes that will be made:
|
|
52
|
-
```
|
|
53
|
-
📦 Upgrade: skill-name
|
|
54
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
55
|
-
|
|
56
|
-
Changes to be made:
|
|
57
|
-
|
|
58
|
-
1. SKILL.md - Add sections:
|
|
59
|
-
- ## Self-Improving Learnings
|
|
60
|
-
- Update ## Instructions to include learning workflow
|
|
61
|
-
|
|
62
|
-
2. Create new file:
|
|
63
|
-
- .agileflow/skills/_learnings/<skill>.yaml
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 🚨 RULE #4: Offer Preview or Direct Upgrade
|
|
67
|
-
Ask:
|
|
68
|
-
```
|
|
69
|
-
Proceed with upgrade?
|
|
70
|
-
- Yes, upgrade skill
|
|
71
|
-
- Preview changes first (Recommended)
|
|
72
|
-
- Cancel
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### 🚨 RULE #5: Create Learnings File
|
|
76
|
-
Create `.agileflow/skills/_learnings/<skill>.yaml`:
|
|
77
|
-
```yaml
|
|
78
|
-
skill: <skill>
|
|
79
|
-
version: 1
|
|
80
|
-
last_updated: <timestamp>
|
|
81
|
-
|
|
82
|
-
preferences:
|
|
83
|
-
# Will be added as skill is used
|
|
84
|
-
|
|
85
|
-
conventions:
|
|
86
|
-
# Will be extracted from corrections
|
|
87
|
-
|
|
88
|
-
anti_patterns:
|
|
89
|
-
# Things to avoid
|
|
90
|
-
|
|
91
|
-
context:
|
|
92
|
-
# Project-specific learnings
|
|
93
|
-
|
|
94
|
-
examples:
|
|
95
|
-
good: []
|
|
96
|
-
bad: []
|
|
97
|
-
|
|
98
|
-
metadata:
|
|
99
|
-
corrections_count: 0
|
|
100
|
-
approvals_count: 0
|
|
101
|
-
created: <timestamp>
|
|
102
|
-
sessions: []
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### 🚨 RULE #6: Update SKILL.md
|
|
106
|
-
Add new section AFTER "When to Use":
|
|
107
|
-
```markdown
|
|
108
|
-
## Self-Improving Learnings
|
|
109
|
-
|
|
110
|
-
This skill learns from your corrections and preferences.
|
|
111
|
-
|
|
112
|
-
**On invocation**:
|
|
113
|
-
1. Check if `.agileflow/skills/_learnings/<skill>.yaml` exists
|
|
114
|
-
2. If exists, read and apply learned preferences
|
|
115
|
-
3. Follow conventions and avoid anti-patterns from learnings
|
|
116
|
-
|
|
117
|
-
**On correction**:
|
|
118
|
-
1. When user corrects output, extract the signal
|
|
119
|
-
2. Determine confidence level...
|
|
120
|
-
3. Update the learnings file with new preference
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Also prepend learning workflow to Instructions:
|
|
124
|
-
```markdown
|
|
125
|
-
## Instructions
|
|
126
|
-
|
|
127
|
-
1. **Load learnings** (if exists):
|
|
128
|
-
- Read `.agileflow/skills/_learnings/<skill>.yaml`
|
|
129
|
-
- Apply preferences, conventions, and anti-patterns
|
|
130
|
-
|
|
131
|
-
2. **Execute skill**:
|
|
132
|
-
[... existing instructions ...]
|
|
133
|
-
|
|
134
|
-
3. **If user corrects**:
|
|
135
|
-
- Extract signal from correction
|
|
136
|
-
- Update learnings file
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### 🚨 RULE #7: Show Success
|
|
140
|
-
```
|
|
141
|
-
✅ Skill upgraded successfully!
|
|
142
|
-
|
|
143
|
-
Modified: .claude/skills/<skill>/SKILL.md
|
|
144
|
-
Created: .agileflow/skills/_learnings/<skill>.yaml
|
|
145
|
-
|
|
146
|
-
The skill will now:
|
|
147
|
-
• Load learned preferences on each invocation
|
|
148
|
-
• Extract signals from your corrections
|
|
149
|
-
• Build up conventions over time
|
|
150
|
-
• Avoid learned anti-patterns
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Critical Files Created/Modified
|
|
154
|
-
| File | Purpose | Action |
|
|
155
|
-
|------|---------|--------|
|
|
156
|
-
| SKILL.md | Main skill file | Add 2 sections + update instructions |
|
|
157
|
-
| .agileflow/skills/_learnings/<skill>.yaml | Learnings file | Create new |
|
|
158
|
-
|
|
159
|
-
### Learnings File Structure
|
|
160
|
-
```yaml
|
|
161
|
-
skill: <name>
|
|
162
|
-
version: 1
|
|
163
|
-
preferences: {}
|
|
164
|
-
conventions: []
|
|
165
|
-
anti_patterns: []
|
|
166
|
-
context: {}
|
|
167
|
-
examples: {good: [], bad: []}
|
|
168
|
-
metadata: {corrections_count: 0, approvals_count: 0, created: <ts>, sessions: []}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Anti-Patterns
|
|
172
|
-
- ❌ DON'T upgrade already-upgraded skills (check first)
|
|
173
|
-
- ❌ DON'T delete existing SKILL.md content (only add sections)
|
|
174
|
-
- ❌ DON'T create learnings file in wrong location
|
|
175
|
-
- ❌ DON'T skip preview mode option (let user see changes)
|
|
176
|
-
- ❌ DON'T forget to document the learning workflow in Instructions
|
|
177
|
-
|
|
178
|
-
### Batch Upgrade Mode
|
|
179
|
-
When using `--all` flag:
|
|
180
|
-
1. List all skills in `.claude/skills/`
|
|
181
|
-
2. Filter out already-upgraded skills
|
|
182
|
-
3. Ask for confirmation: "Upgrade N skills?"
|
|
183
|
-
4. Apply upgrade to each
|
|
184
|
-
5. Show summary: "Upgraded N skills"
|
|
185
|
-
|
|
186
|
-
### REMEMBER AFTER COMPACTION
|
|
187
|
-
- Upgrade is: Select → Check status → Show changes → [Preview if requested] → Create learnings file → Update SKILL.md → Confirm success
|
|
188
|
-
- Learnings file goes in .agileflow/skills/_learnings/ with skill name
|
|
189
|
-
- NEVER delete existing content, only add new sections
|
|
190
|
-
- Always ask for preview confirmation before writing
|
|
191
|
-
- Batch mode with --all upgrades all non-upgraded skills at once
|
|
192
|
-
|
|
193
|
-
<!-- COMPACT_SUMMARY_END -->
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## What This Does
|
|
198
|
-
|
|
199
|
-
Skills created before EP-0007 (Self-Improving Skills) don't have the learning capability. This command:
|
|
200
|
-
|
|
201
|
-
1. **Adds Self-Improving Learnings section** to SKILL.md
|
|
202
|
-
2. **Creates learnings file** at `.agileflow/skills/_learnings/{skill-name}.yaml`
|
|
203
|
-
3. **Updates Instructions section** to include learning workflow steps
|
|
204
|
-
4. **Preserves all existing content** - only adds new sections
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
## Workflow
|
|
209
|
-
|
|
210
|
-
### STEP 1: Select skill to upgrade
|
|
211
|
-
|
|
212
|
-
If SKILL_NAME not provided, list available skills:
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
ls -d .claude/skills/*/ 2>/dev/null | xargs -I {} basename {}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
Then ask user:
|
|
219
|
-
|
|
220
|
-
```xml
|
|
221
|
-
<invoke name="AskUserQuestion">
|
|
222
|
-
<parameter name="questions">[{
|
|
223
|
-
"question": "Which skill would you like to upgrade with self-improving capability?",
|
|
224
|
-
"header": "Select Skill",
|
|
225
|
-
"multiSelect": false,
|
|
226
|
-
"options": [
|
|
227
|
-
{"label": "<skill-1>", "description": "<description from frontmatter>"},
|
|
228
|
-
{"label": "<skill-2>", "description": "<description from frontmatter>"},
|
|
229
|
-
{"label": "<skill-3>", "description": "<description from frontmatter>"}
|
|
230
|
-
]
|
|
231
|
-
}]</parameter>
|
|
232
|
-
</invoke>
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### STEP 2: Check upgrade status
|
|
236
|
-
|
|
237
|
-
Read the skill's SKILL.md and check for existing self-improving capability:
|
|
238
|
-
|
|
239
|
-
```bash
|
|
240
|
-
cat .claude/skills/<skill>/SKILL.md
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
**Check for existing sections:**
|
|
244
|
-
- Look for `## Self-Improving Learnings` section
|
|
245
|
-
- Check if `.agileflow/skills/_learnings/<skill>.yaml` exists
|
|
246
|
-
|
|
247
|
-
**If already upgraded:**
|
|
248
|
-
```
|
|
249
|
-
✅ Skill "<skill>" already has self-improving capability!
|
|
250
|
-
|
|
251
|
-
Learnings file: .agileflow/skills/_learnings/<skill>.yaml
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
Offer to view the learnings file or exit.
|
|
255
|
-
|
|
256
|
-
**If not upgraded:**
|
|
257
|
-
Continue to next step.
|
|
258
|
-
|
|
259
|
-
### STEP 3: Show what will be added
|
|
260
|
-
|
|
261
|
-
Display the changes that will be made:
|
|
262
|
-
|
|
263
|
-
```
|
|
264
|
-
📦 Upgrade: <skill>
|
|
265
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
266
|
-
|
|
267
|
-
Changes to be made:
|
|
268
|
-
|
|
269
|
-
1. SKILL.md - Add sections:
|
|
270
|
-
- ## Self-Improving Learnings
|
|
271
|
-
- Update ## Instructions to include learning workflow
|
|
272
|
-
|
|
273
|
-
2. Create new file:
|
|
274
|
-
- .agileflow/skills/_learnings/<skill>.yaml
|
|
275
|
-
|
|
276
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
### STEP 4: Confirm upgrade
|
|
280
|
-
|
|
281
|
-
```xml
|
|
282
|
-
<invoke name="AskUserQuestion">
|
|
283
|
-
<parameter name="questions">[{
|
|
284
|
-
"question": "Proceed with upgrade?",
|
|
285
|
-
"header": "Confirm",
|
|
286
|
-
"multiSelect": false,
|
|
287
|
-
"options": [
|
|
288
|
-
{"label": "Yes, upgrade skill", "description": "Add self-improving capability"},
|
|
289
|
-
{"label": "Preview changes first", "description": "Show exact changes before applying"},
|
|
290
|
-
{"label": "Cancel", "description": "Exit without changes"}
|
|
291
|
-
]
|
|
292
|
-
}]</parameter>
|
|
293
|
-
</invoke>
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### STEP 5: Apply upgrade
|
|
297
|
-
|
|
298
|
-
**5.1: Create learnings file**
|
|
299
|
-
|
|
300
|
-
Create `.agileflow/skills/_learnings/<skill>.yaml`:
|
|
301
|
-
|
|
302
|
-
```yaml
|
|
303
|
-
# Learnings for <skill> skill
|
|
304
|
-
# This file accumulates user preferences for this skill.
|
|
305
|
-
|
|
306
|
-
skill: <skill>
|
|
307
|
-
version: 1
|
|
308
|
-
last_updated: <current-timestamp>
|
|
309
|
-
|
|
310
|
-
# =============================================================================
|
|
311
|
-
# PREFERENCES
|
|
312
|
-
# =============================================================================
|
|
313
|
-
preferences:
|
|
314
|
-
# Preferences will be added as you use this skill and Claude learns from corrections
|
|
315
|
-
|
|
316
|
-
# =============================================================================
|
|
317
|
-
# CONVENTIONS
|
|
318
|
-
# =============================================================================
|
|
319
|
-
conventions:
|
|
320
|
-
# - "Convention from skill usage will be added here"
|
|
321
|
-
|
|
322
|
-
# =============================================================================
|
|
323
|
-
# ANTI-PATTERNS
|
|
324
|
-
# =============================================================================
|
|
325
|
-
anti_patterns:
|
|
326
|
-
# - "Things to avoid will be added here"
|
|
327
|
-
|
|
328
|
-
# =============================================================================
|
|
329
|
-
# CONTEXT
|
|
330
|
-
# =============================================================================
|
|
331
|
-
context:
|
|
332
|
-
# Project-specific context will be learned here
|
|
333
|
-
|
|
334
|
-
# =============================================================================
|
|
335
|
-
# EXAMPLES
|
|
336
|
-
# =============================================================================
|
|
337
|
-
examples:
|
|
338
|
-
# good:
|
|
339
|
-
# - "Good examples will be collected here"
|
|
340
|
-
# bad:
|
|
341
|
-
# - "Bad examples will be collected here"
|
|
342
|
-
|
|
343
|
-
# =============================================================================
|
|
344
|
-
# METADATA
|
|
345
|
-
# =============================================================================
|
|
346
|
-
metadata:
|
|
347
|
-
corrections_count: 0
|
|
348
|
-
approvals_count: 0
|
|
349
|
-
created: <current-timestamp>
|
|
350
|
-
sessions: []
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
**5.2: Update SKILL.md**
|
|
354
|
-
|
|
355
|
-
Add the Self-Improving Learnings section AFTER the "What This Does" or "When to Use" section:
|
|
356
|
-
|
|
357
|
-
```markdown
|
|
358
|
-
## Self-Improving Learnings
|
|
359
|
-
|
|
360
|
-
This skill learns from your corrections and preferences.
|
|
361
|
-
|
|
362
|
-
**On invocation**:
|
|
363
|
-
1. Check if `.agileflow/skills/_learnings/<skill>.yaml` exists
|
|
364
|
-
2. If exists, read and apply learned preferences
|
|
365
|
-
3. Follow conventions and avoid anti-patterns from learnings
|
|
366
|
-
|
|
367
|
-
**On correction**:
|
|
368
|
-
1. When user corrects output, extract the signal
|
|
369
|
-
2. Determine confidence level:
|
|
370
|
-
- **high**: Explicit correction ("never do X", "always do Y")
|
|
371
|
-
- **medium**: User approved or pattern worked well
|
|
372
|
-
- **low**: Observation to review later
|
|
373
|
-
3. Update the learnings file with new preference
|
|
374
|
-
|
|
375
|
-
**Learnings file location**: `.agileflow/skills/_learnings/<skill>.yaml`
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
**5.3: Update Instructions section**
|
|
379
|
-
|
|
380
|
-
If the skill has an `## Instructions` section, prepend learning workflow steps:
|
|
381
|
-
|
|
382
|
-
```markdown
|
|
383
|
-
## Instructions
|
|
384
|
-
|
|
385
|
-
Step-by-step guidance for Claude:
|
|
386
|
-
|
|
387
|
-
1. **Load learnings** (if exists):
|
|
388
|
-
- Read `.agileflow/skills/_learnings/<skill>.yaml`
|
|
389
|
-
- Apply preferences, conventions, and anti-patterns
|
|
390
|
-
- Skip if file doesn't exist (first run)
|
|
391
|
-
|
|
392
|
-
2. **Execute skill**:
|
|
393
|
-
- Follow the instructions below with learned preferences applied
|
|
394
|
-
[... existing instructions ...]
|
|
395
|
-
|
|
396
|
-
3. **If user corrects**:
|
|
397
|
-
- Extract signal from correction
|
|
398
|
-
- Update learnings file
|
|
399
|
-
- Continue with corrected approach
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
### STEP 6: Show success
|
|
403
|
-
|
|
404
|
-
```
|
|
405
|
-
✅ Skill upgraded successfully!
|
|
406
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
407
|
-
|
|
408
|
-
Modified: .claude/skills/<skill>/SKILL.md
|
|
409
|
-
Created: .agileflow/skills/_learnings/<skill>.yaml
|
|
410
|
-
|
|
411
|
-
The skill will now:
|
|
412
|
-
• Load learned preferences on each invocation
|
|
413
|
-
• Extract signals from your corrections
|
|
414
|
-
• Build up conventions over time
|
|
415
|
-
• Avoid learned anti-patterns
|
|
416
|
-
|
|
417
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
---
|
|
421
|
-
|
|
422
|
-
## Preview Mode
|
|
423
|
-
|
|
424
|
-
If user selects "Preview changes first", show:
|
|
425
|
-
|
|
426
|
-
**SKILL.md diff:**
|
|
427
|
-
```diff
|
|
428
|
-
## When to Use
|
|
429
|
-
...existing content...
|
|
430
|
-
|
|
431
|
-
+ ## Self-Improving Learnings
|
|
432
|
-
+
|
|
433
|
-
+ This skill learns from your corrections and preferences.
|
|
434
|
-
+
|
|
435
|
-
+ **On invocation**:
|
|
436
|
-
+ 1. Check if `.agileflow/skills/_learnings/<skill>.yaml` exists
|
|
437
|
-
+ ...
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
**New file preview:**
|
|
441
|
-
```yaml
|
|
442
|
-
# .agileflow/skills/_learnings/<skill>.yaml
|
|
443
|
-
|
|
444
|
-
skill: <skill>
|
|
445
|
-
version: 1
|
|
446
|
-
...
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
Then ask for confirmation again.
|
|
450
|
-
|
|
451
|
-
---
|
|
452
|
-
|
|
453
|
-
## Batch Upgrade
|
|
454
|
-
|
|
455
|
-
If user wants to upgrade ALL skills:
|
|
456
|
-
|
|
457
|
-
```xml
|
|
458
|
-
<invoke name="AskUserQuestion">
|
|
459
|
-
<parameter name="questions">[{
|
|
460
|
-
"question": "Upgrade all skills at once?",
|
|
461
|
-
"header": "Batch Mode",
|
|
462
|
-
"multiSelect": false,
|
|
463
|
-
"options": [
|
|
464
|
-
{"label": "Yes, upgrade all", "description": "Apply to all skills without learnings"},
|
|
465
|
-
{"label": "No, one at a time", "description": "Select and upgrade individually"}
|
|
466
|
-
]
|
|
467
|
-
}]</parameter>
|
|
468
|
-
</invoke>
|
|
469
|
-
```
|
|
470
|
-
|
|
471
|
-
If batch mode:
|
|
472
|
-
1. List all skills in `.claude/skills/`
|
|
473
|
-
2. Filter out already-upgraded skills
|
|
474
|
-
3. Apply upgrade to each
|
|
475
|
-
4. Show summary at end
|
|
476
|
-
|
|
477
|
-
---
|
|
478
|
-
|
|
479
|
-
## Error Handling
|
|
480
|
-
|
|
481
|
-
### Skill Not Found
|
|
482
|
-
```
|
|
483
|
-
❌ Skill "<name>" not found.
|
|
484
|
-
|
|
485
|
-
Available skills:
|
|
486
|
-
- supabase-swift
|
|
487
|
-
- ui-components
|
|
488
|
-
|
|
489
|
-
Use /agileflow:skill:list to see all skills.
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
### No Skills Installed
|
|
493
|
-
```
|
|
494
|
-
❌ No skills installed yet.
|
|
495
|
-
|
|
496
|
-
Create a skill first: /agileflow:skill:create
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
### Write Permission Error
|
|
500
|
-
```
|
|
501
|
-
❌ Cannot create learnings file.
|
|
502
|
-
|
|
503
|
-
Please check permissions for:
|
|
504
|
-
.agileflow/skills/_learnings/
|
|
505
|
-
|
|
506
|
-
You may need to create the directory:
|
|
507
|
-
mkdir -p .agileflow/skills/_learnings
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
### SKILL.md Parse Error
|
|
511
|
-
```
|
|
512
|
-
⚠️ Could not parse SKILL.md frontmatter.
|
|
513
|
-
|
|
514
|
-
The skill file may have formatting issues.
|
|
515
|
-
Would you like me to try anyway, or edit manually?
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
---
|
|
519
|
-
|
|
520
|
-
## Quality Checklist
|
|
521
|
-
|
|
522
|
-
Before completing, verify:
|
|
523
|
-
- [ ] Learnings file created in correct location
|
|
524
|
-
- [ ] SKILL.md has Self-Improving Learnings section
|
|
525
|
-
- [ ] Instructions section updated (if exists)
|
|
526
|
-
- [ ] No existing content was removed
|
|
527
|
-
- [ ] Skill name matches in all locations
|
|
528
|
-
|
|
529
|
-
---
|
|
530
|
-
|
|
531
|
-
## Usage
|
|
532
|
-
|
|
533
|
-
```bash
|
|
534
|
-
# Interactive mode (recommended)
|
|
535
|
-
/agileflow:skill:upgrade
|
|
536
|
-
|
|
537
|
-
# Upgrade specific skill
|
|
538
|
-
/agileflow:skill:upgrade my-api-skill
|
|
539
|
-
|
|
540
|
-
# Batch upgrade (upgrade all at once)
|
|
541
|
-
/agileflow:skill:upgrade --all
|
|
542
|
-
```
|
|
543
|
-
|
|
544
|
-
---
|
|
545
|
-
|
|
546
|
-
## Related Commands
|
|
547
|
-
|
|
548
|
-
- `/agileflow:skill:create` - Create a new skill
|
|
549
|
-
- `/agileflow:skill:list` - List all installed skills
|
|
550
|
-
- `/agileflow:skill:edit` - Edit existing skill
|
|
551
|
-
- `/agileflow:skill:test` - Test skill functionality
|
|
552
|
-
- `/agileflow:skill:delete` - Remove an installed skill
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-name
|
|
3
|
-
description: Brief description of what this skill does and when Claude should use it (one line, <150 chars)
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Skill Name
|
|
7
|
-
|
|
8
|
-
Brief overview of what this skill does (1-2 sentences).
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
Use this skill when:
|
|
13
|
-
- Scenario 1 (be specific about triggers/keywords)
|
|
14
|
-
- Scenario 2
|
|
15
|
-
- Scenario 3
|
|
16
|
-
|
|
17
|
-
## What This Does
|
|
18
|
-
|
|
19
|
-
Clear explanation of the skill's functionality and purpose. Keep this concise and focused.
|
|
20
|
-
|
|
21
|
-
Include:
|
|
22
|
-
- Primary function
|
|
23
|
-
- Key capabilities
|
|
24
|
-
- Expected outcomes
|
|
25
|
-
|
|
26
|
-
## Self-Improving Learnings
|
|
27
|
-
|
|
28
|
-
This skill learns from your corrections and preferences.
|
|
29
|
-
|
|
30
|
-
**On invocation**:
|
|
31
|
-
1. Check if `.agileflow/skills/_learnings/{skill-name}.yaml` exists
|
|
32
|
-
2. If exists, read and apply learned preferences
|
|
33
|
-
3. Follow conventions and avoid anti-patterns from learnings
|
|
34
|
-
|
|
35
|
-
**On correction**:
|
|
36
|
-
1. When user corrects output, extract the signal
|
|
37
|
-
2. Determine confidence level:
|
|
38
|
-
- **high**: Explicit correction ("never do X", "always do Y")
|
|
39
|
-
- **medium**: User approved or pattern worked well
|
|
40
|
-
- **low**: Observation to review later
|
|
41
|
-
3. Update the learnings file with new preference
|
|
42
|
-
|
|
43
|
-
**Learnings file location**: `.agileflow/skills/_learnings/{skill-name}.yaml`
|
|
44
|
-
|
|
45
|
-
## Instructions
|
|
46
|
-
|
|
47
|
-
Step-by-step guidance for Claude:
|
|
48
|
-
|
|
49
|
-
1. **Load learnings** (if exists):
|
|
50
|
-
- Read `.agileflow/skills/_learnings/{skill-name}.yaml`
|
|
51
|
-
- Apply preferences, conventions, and anti-patterns
|
|
52
|
-
- Skip if file doesn't exist (first run)
|
|
53
|
-
|
|
54
|
-
2. **Execute skill**:
|
|
55
|
-
- Follow the instructions below with learned preferences applied
|
|
56
|
-
- [Your skill-specific step A]
|
|
57
|
-
- [Your skill-specific step B]
|
|
58
|
-
|
|
59
|
-
3. **If user corrects**:
|
|
60
|
-
- Extract signal from correction
|
|
61
|
-
- Update learnings file
|
|
62
|
-
- Continue with corrected approach
|
|
63
|
-
|
|
64
|
-
4. **Final step**: Complete the task
|
|
65
|
-
- Detail A
|
|
66
|
-
- Detail B
|
|
67
|
-
|
|
68
|
-
## Output Format
|
|
69
|
-
|
|
70
|
-
Describe the expected output or deliverable:
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
[Example output format or template]
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Quality Checklist
|
|
77
|
-
|
|
78
|
-
Before completing, verify:
|
|
79
|
-
- [ ] Loaded learnings file (if exists)
|
|
80
|
-
- [ ] Applied learned preferences
|
|
81
|
-
- [ ] Requirement 1 met
|
|
82
|
-
- [ ] Requirement 2 met
|
|
83
|
-
- [ ] If corrected, updated learnings file
|
|
84
|
-
|
|
85
|
-
## Examples
|
|
86
|
-
|
|
87
|
-
### Example 1: [Scenario]
|
|
88
|
-
|
|
89
|
-
**User Input:**
|
|
90
|
-
```
|
|
91
|
-
[Example user prompt or input]
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**Expected Output:**
|
|
95
|
-
```
|
|
96
|
-
[Example of what Claude should produce]
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Example 2: Learning from Correction
|
|
100
|
-
|
|
101
|
-
**User Correction:**
|
|
102
|
-
```
|
|
103
|
-
"Don't include emojis in the output"
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**Self-Improve Action:**
|
|
107
|
-
1. Extract signal: "User said 'Don't include emojis'"
|
|
108
|
-
2. Learning: "Never include emojis in output"
|
|
109
|
-
3. Confidence: high (explicit correction)
|
|
110
|
-
4. Update `.agileflow/skills/_learnings/{skill-name}.yaml`
|
|
111
|
-
|
|
112
|
-
## Notes
|
|
113
|
-
|
|
114
|
-
- Learnings persist across sessions
|
|
115
|
-
- First run has no learnings file - that's OK
|
|
116
|
-
- High-confidence learnings are treated as rules
|
|
117
|
-
- Git tracks learnings evolution over time
|