agileflow 2.76.0 → 2.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +6 -1
- package/scripts/agileflow-configure.js +185 -13
- package/scripts/agileflow-statusline.sh +266 -27
- package/scripts/agileflow-welcome.js +160 -52
- package/scripts/auto-self-improve.js +63 -20
- package/scripts/check-update.js +1 -4
- package/scripts/damage-control-bash.js +232 -0
- package/scripts/damage-control-edit.js +243 -0
- package/scripts/damage-control-write.js +243 -0
- package/scripts/get-env.js +15 -7
- package/scripts/lib/frontmatter-parser.js +4 -1
- package/scripts/obtain-context.js +59 -48
- package/scripts/ralph-loop.js +25 -13
- package/scripts/validate-expertise.sh +19 -15
- package/src/core/agents/accessibility.md +124 -53
- package/src/core/agents/adr-writer.md +192 -52
- package/src/core/agents/analytics.md +139 -60
- package/src/core/agents/api.md +173 -63
- package/src/core/agents/ci.md +139 -57
- package/src/core/agents/compliance.md +159 -68
- package/src/core/agents/configuration/damage-control.md +356 -0
- package/src/core/agents/database.md +162 -61
- package/src/core/agents/datamigration.md +179 -66
- package/src/core/agents/design.md +179 -57
- package/src/core/agents/devops.md +160 -3
- package/src/core/agents/documentation.md +204 -60
- package/src/core/agents/epic-planner.md +147 -55
- package/src/core/agents/integrations.md +197 -69
- package/src/core/agents/mentor.md +158 -57
- package/src/core/agents/mobile.md +159 -67
- package/src/core/agents/monitoring.md +154 -65
- package/src/core/agents/multi-expert.md +115 -43
- package/src/core/agents/orchestrator.md +77 -24
- package/src/core/agents/performance.md +130 -75
- package/src/core/agents/product.md +151 -55
- package/src/core/agents/qa.md +162 -74
- package/src/core/agents/readme-updater.md +178 -76
- package/src/core/agents/refactor.md +148 -95
- package/src/core/agents/research.md +143 -72
- package/src/core/agents/security.md +154 -65
- package/src/core/agents/testing.md +176 -97
- package/src/core/agents/ui.md +170 -79
- package/src/core/commands/adr/list.md +171 -0
- package/src/core/commands/adr/update.md +235 -0
- package/src/core/commands/adr/view.md +252 -0
- package/src/core/commands/adr.md +207 -50
- package/src/core/commands/agent.md +16 -0
- package/src/core/commands/assign.md +148 -44
- package/src/core/commands/auto.md +18 -1
- package/src/core/commands/babysit.md +361 -36
- package/src/core/commands/baseline.md +14 -0
- package/src/core/commands/blockers.md +170 -51
- package/src/core/commands/board.md +144 -66
- package/src/core/commands/changelog.md +15 -0
- package/src/core/commands/ci.md +179 -69
- package/src/core/commands/compress.md +18 -0
- package/src/core/commands/configure.md +16 -0
- package/src/core/commands/context/export.md +193 -4
- package/src/core/commands/context/full.md +191 -18
- package/src/core/commands/context/note.md +248 -4
- package/src/core/commands/debt.md +17 -0
- package/src/core/commands/deploy.md +208 -65
- package/src/core/commands/deps.md +15 -0
- package/src/core/commands/diagnose.md +16 -0
- package/src/core/commands/docs.md +196 -64
- package/src/core/commands/epic/list.md +170 -0
- package/src/core/commands/epic/view.md +242 -0
- package/src/core/commands/epic.md +192 -69
- package/src/core/commands/feedback.md +191 -71
- package/src/core/commands/handoff.md +162 -48
- package/src/core/commands/help.md +9 -0
- package/src/core/commands/ideate.md +446 -0
- package/src/core/commands/impact.md +16 -0
- package/src/core/commands/metrics.md +141 -37
- package/src/core/commands/multi-expert.md +77 -0
- package/src/core/commands/packages.md +16 -0
- package/src/core/commands/pr.md +161 -67
- package/src/core/commands/readme-sync.md +16 -0
- package/src/core/commands/research/analyze.md +568 -0
- package/src/core/commands/research/ask.md +345 -20
- package/src/core/commands/research/import.md +562 -19
- package/src/core/commands/research/list.md +173 -5
- package/src/core/commands/research/view.md +181 -8
- package/src/core/commands/retro.md +135 -48
- package/src/core/commands/review.md +219 -47
- package/src/core/commands/session/end.md +209 -0
- package/src/core/commands/session/history.md +210 -0
- package/src/core/commands/session/init.md +116 -0
- package/src/core/commands/session/new.md +296 -0
- package/src/core/commands/session/resume.md +166 -0
- package/src/core/commands/session/status.md +166 -0
- package/src/core/commands/skill/create.md +115 -17
- package/src/core/commands/skill/delete.md +117 -0
- package/src/core/commands/skill/edit.md +104 -0
- package/src/core/commands/skill/list.md +128 -0
- package/src/core/commands/skill/test.md +135 -0
- package/src/core/commands/skill/upgrade.md +542 -0
- package/src/core/commands/sprint.md +17 -1
- package/src/core/commands/status.md +133 -21
- package/src/core/commands/story/list.md +176 -0
- package/src/core/commands/story/view.md +265 -0
- package/src/core/commands/story-validate.md +101 -1
- package/src/core/commands/story.md +204 -51
- package/src/core/commands/template.md +16 -1
- package/src/core/commands/tests.md +226 -64
- package/src/core/commands/update.md +17 -1
- package/src/core/commands/validate-expertise.md +16 -0
- package/src/core/commands/velocity.md +140 -36
- package/src/core/commands/verify.md +14 -0
- package/src/core/commands/whats-new.md +30 -0
- package/src/core/skills/_learnings/README.md +91 -0
- package/src/core/skills/_learnings/_template.yaml +106 -0
- package/src/core/skills/_learnings/commit.yaml +69 -0
- package/src/core/templates/damage-control-patterns.yaml +234 -0
- package/src/core/templates/skill-template.md +53 -11
- package/tools/cli/commands/list.js +3 -1
- package/tools/cli/commands/start.js +180 -0
- package/tools/cli/commands/uninstall.js +4 -5
- package/tools/cli/commands/update.js +11 -3
- package/tools/cli/lib/content-injector.js +6 -1
- package/tools/cli/tui/Dashboard.js +66 -0
- package/tools/cli/tui/StoryList.js +69 -0
- package/tools/cli/tui/index.js +16 -0
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Pick a session to switch to or resume
|
|
3
3
|
argument-hint: (no arguments)
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:session:resume - Switch between parallel sessions"
|
|
8
|
+
- "Lists all registered sessions (active and inactive) with status"
|
|
9
|
+
- "User selects which session to resume"
|
|
10
|
+
- "Returns `cd` command to switch to selected session"
|
|
11
|
+
- "Formats nickname/branch with activity status (Active now / inactive)"
|
|
12
|
+
- "Marks current session with '(current)' label"
|
|
13
|
+
state_fields:
|
|
14
|
+
- current_session
|
|
15
|
+
- all_sessions
|
|
16
|
+
- user_selection
|
|
4
17
|
---
|
|
5
18
|
|
|
6
19
|
# /agileflow:session:resume
|
|
@@ -89,3 +102,156 @@ Run /agileflow:session:new to create a new parallel workspace.
|
|
|
89
102
|
- `/agileflow:session:new` - Create new session
|
|
90
103
|
- `/agileflow:session:status` - Quick status view
|
|
91
104
|
- `/agileflow:session:end` - End current session
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
<!-- COMPACT_SUMMARY_START -->
|
|
109
|
+
|
|
110
|
+
## ⚠️ COMPACT SUMMARY - /agileflow:session:resume IS ACTIVE
|
|
111
|
+
|
|
112
|
+
**CRITICAL**: This command is the primary way to **switch between parallel sessions**. User selects, you display the cd command.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### 🚨 RULE #1: ALWAYS USE AskUserQuestion
|
|
117
|
+
|
|
118
|
+
**NEVER just describe the sessions.** Build an AskUserQuestion with:
|
|
119
|
+
- One option per session
|
|
120
|
+
- Current session marked "(current)"
|
|
121
|
+
- Active sessions marked "Active now"
|
|
122
|
+
- Inactive sessions show "last active: {time}"
|
|
123
|
+
- "Create new session" option at bottom
|
|
124
|
+
|
|
125
|
+
```xml
|
|
126
|
+
<invoke name="AskUserQuestion">
|
|
127
|
+
<parameter name="questions">[{
|
|
128
|
+
"question": "Which session would you like to resume?",
|
|
129
|
+
"header": "Sessions",
|
|
130
|
+
"multiSelect": false,
|
|
131
|
+
"options": [
|
|
132
|
+
{"label": "Session 1: main (current)",
|
|
133
|
+
"description": "US-0042: User Auth API │ Active now │ /home/user/project"},
|
|
134
|
+
{"label": "Session 2: \"auth\"",
|
|
135
|
+
"description": "US-0038: Fix Login │ Active now │ ../project-auth"},
|
|
136
|
+
{"label": "Session 3: feature/payments",
|
|
137
|
+
"description": "US-0051 │ Inactive (1 day ago) │ ../project-payments"},
|
|
138
|
+
{"label": "Create new session",
|
|
139
|
+
"description": "Start a fresh parallel workspace"}
|
|
140
|
+
]
|
|
141
|
+
}]</parameter>
|
|
142
|
+
</invoke>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
### 🚨 RULE #2: HANDLE EACH SELECTION CASE
|
|
148
|
+
|
|
149
|
+
**If user selects current session:**
|
|
150
|
+
```
|
|
151
|
+
You're already in Session 1!
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**If user selects different session:**
|
|
155
|
+
```
|
|
156
|
+
To resume Session 2 "auth":
|
|
157
|
+
|
|
158
|
+
┌─────────────────────────────────────────────────────────┐
|
|
159
|
+
│ cd ../project-auth && claude --resume │
|
|
160
|
+
└─────────────────────────────────────────────────────────┘
|
|
161
|
+
|
|
162
|
+
Session info:
|
|
163
|
+
Branch: session-2
|
|
164
|
+
Story: US-0038 (in-progress)
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**If user selects "Create new session":**
|
|
168
|
+
```
|
|
169
|
+
Run /agileflow:session:new to create a new parallel workspace.
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### 🚨 RULE #3: FORMATTING LABELS & DESCRIPTIONS
|
|
175
|
+
|
|
176
|
+
**Label format (session option):**
|
|
177
|
+
- Session with nickname: `Session {id}: "{nickname}"`
|
|
178
|
+
- Session with branch: `Session {id}: {branch}`
|
|
179
|
+
- Current session: append ` (current)`
|
|
180
|
+
|
|
181
|
+
**Description format:**
|
|
182
|
+
- Include story ID if available: `US-0042`
|
|
183
|
+
- Include status: `Active now` OR `Inactive (N days ago)`
|
|
184
|
+
- Include relative path: `../project-auth`
|
|
185
|
+
- Format: `{STORY_ID} │ {STATUS} │ {PATH}`
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### 🚨 RULE #4: SESSION DATA STRUCTURE
|
|
190
|
+
|
|
191
|
+
Sessions from `session-manager.js list --json` contain:
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"id": 1,
|
|
195
|
+
"path": "/home/user/project",
|
|
196
|
+
"branch": "main",
|
|
197
|
+
"nickname": null,
|
|
198
|
+
"status": "active",
|
|
199
|
+
"is_current": true,
|
|
200
|
+
"is_main": true,
|
|
201
|
+
"created": "2025-12-20T10:00:00Z",
|
|
202
|
+
"last_active": "2025-12-20T10:30:00Z"
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Use these fields to build readable labels.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
### KEY FILES TO REMEMBER
|
|
211
|
+
|
|
212
|
+
| File | Purpose |
|
|
213
|
+
|------|---------|
|
|
214
|
+
| `.agileflow/sessions/registry.json` | Master list of all sessions |
|
|
215
|
+
| `.agileflow/sessions/{id}.lock` | Lock file = session is active |
|
|
216
|
+
| `.agileflow/scripts/session-manager.js` | Script providing session data |
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### WORKFLOW
|
|
221
|
+
|
|
222
|
+
1. **Get sessions** → `node .agileflow/scripts/session-manager.js list --json`
|
|
223
|
+
2. **Parse JSON** → Extract id, branch, nickname, status, path
|
|
224
|
+
3. **Build options** → Create readable labels with status
|
|
225
|
+
4. **Show AskUserQuestion** → Let user select
|
|
226
|
+
5. **Handle selection** → Show cd command or appropriate response
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
### ANTI-PATTERNS (DON'T DO THESE)
|
|
231
|
+
|
|
232
|
+
❌ Just list sessions without AskUserQuestion
|
|
233
|
+
❌ Format label as "session_1_main" (use readable format)
|
|
234
|
+
❌ Show path as absolute when relative is shorter
|
|
235
|
+
❌ Don't mark current session with "(current)"
|
|
236
|
+
❌ Don't show "Active now" status for active sessions
|
|
237
|
+
|
|
238
|
+
### DO THESE INSTEAD
|
|
239
|
+
|
|
240
|
+
✅ ALWAYS use AskUserQuestion with user options
|
|
241
|
+
✅ Format labels as "Session 1: main (current)"
|
|
242
|
+
✅ Show relative paths (../project-auth)
|
|
243
|
+
✅ Mark current session clearly
|
|
244
|
+
✅ Show activity status (Active now / Inactive Xd ago)
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
### REMEMBER AFTER COMPACTION
|
|
249
|
+
|
|
250
|
+
- `/agileflow:session:resume` IS ACTIVE
|
|
251
|
+
- ALWAYS use AskUserQuestion to let user select
|
|
252
|
+
- Format labels clearly: `Session {id}: {nickname/branch} {(current)}`
|
|
253
|
+
- Show status in description: `Active now` OR `Inactive (N days ago)`
|
|
254
|
+
- Handle each case: current / different / create new
|
|
255
|
+
- Return cd command when user selects different session
|
|
256
|
+
|
|
257
|
+
<!-- COMPACT_SUMMARY_END -->
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: View current session state and activity
|
|
3
3
|
argument-hint: (no arguments)
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: medium
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:session:status - Display all sessions in table"
|
|
8
|
+
- "Does NOT prompt for action (read-only display)"
|
|
9
|
+
- "Shows current session, then table of other sessions"
|
|
10
|
+
- "Marks active sessions with ● bullet, inactive with ○"
|
|
11
|
+
- "Returns session count and active count"
|
|
12
|
+
state_fields:
|
|
13
|
+
- current_session
|
|
14
|
+
- all_sessions
|
|
15
|
+
- active_count
|
|
16
|
+
- total_count
|
|
4
17
|
---
|
|
5
18
|
|
|
6
19
|
# /agileflow:session:status
|
|
@@ -63,3 +76,156 @@ Run /agileflow:session:new to create a parallel workspace.
|
|
|
63
76
|
- `/agileflow:session:new` - Create new session
|
|
64
77
|
- `/agileflow:session:resume` - Switch sessions
|
|
65
78
|
- `/agileflow:session:end` - End current session
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
<!-- COMPACT_SUMMARY_START -->
|
|
83
|
+
|
|
84
|
+
## ⚠️ COMPACT SUMMARY - /agileflow:session:status IS ACTIVE
|
|
85
|
+
|
|
86
|
+
**CRITICAL**: This command displays read-only status. It NEVER prompts for action - just shows information.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### 🚨 RULE #1: READ-ONLY DISPLAY (NO USER PROMPTS)
|
|
91
|
+
|
|
92
|
+
**NEVER use AskUserQuestion or present options.** This command is informational only.
|
|
93
|
+
|
|
94
|
+
| Command | Has Prompts? | Use Case |
|
|
95
|
+
|---------|-------------|----------|
|
|
96
|
+
| `/agileflow:session:status` | ❌ No | Quick info view |
|
|
97
|
+
| `/agileflow:session:resume` | ✅ Yes | Switch sessions |
|
|
98
|
+
| `/agileflow:session:new` | ✅ Yes | Create session |
|
|
99
|
+
| `/agileflow:session:end` | ✅ Yes | End session |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### 🚨 RULE #2: DISPLAY FORMAT
|
|
104
|
+
|
|
105
|
+
**Structure:**
|
|
106
|
+
1. Header with emoji: `📊 Session Status`
|
|
107
|
+
2. Current session info (highlighted)
|
|
108
|
+
3. Table of other sessions
|
|
109
|
+
4. Summary line: `Total: X sessions │ Y active`
|
|
110
|
+
5. Quick actions (optional)
|
|
111
|
+
|
|
112
|
+
**Example:**
|
|
113
|
+
```
|
|
114
|
+
📊 Session Status
|
|
115
|
+
|
|
116
|
+
Current: Session 1 (main)
|
|
117
|
+
Branch: main │ Story: US-0042 │ Active
|
|
118
|
+
|
|
119
|
+
Other Sessions:
|
|
120
|
+
┌─────┬──────────────────┬─────────────┬────────────┐
|
|
121
|
+
│ # │ Name/Branch │ Story │ Status │
|
|
122
|
+
├─────┼──────────────────┼─────────────┼────────────┤
|
|
123
|
+
│ 2 │ "auth" │ US-0038 │ ● Active │
|
|
124
|
+
│ 3 │ feature/payments │ - │ ○ Inactive │
|
|
125
|
+
└─────┴──────────────────┴─────────────┴────────────┘
|
|
126
|
+
|
|
127
|
+
Total: 3 sessions │ 2 active
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### 🚨 RULE #3: STATUS BULLETS
|
|
133
|
+
|
|
134
|
+
- **● Active** - Session has lock file (Claude process running)
|
|
135
|
+
- **○ Inactive** - No lock file (can be resumed)
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### 🚨 RULE #4: SHOW QUICK ACTIONS (OPTIONAL)
|
|
140
|
+
|
|
141
|
+
After the table, show optional quick actions info:
|
|
142
|
+
```
|
|
143
|
+
💡 Quick actions:
|
|
144
|
+
/agileflow:session:new - Create parallel session
|
|
145
|
+
/agileflow:session:resume - Switch to another session
|
|
146
|
+
/agileflow:session:end - End current session
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
### 🚨 RULE #5: HANDLE EDGE CASES
|
|
152
|
+
|
|
153
|
+
**If no sessions exist:**
|
|
154
|
+
```
|
|
155
|
+
📊 Session Status
|
|
156
|
+
|
|
157
|
+
No sessions registered yet. You're in the main project directory.
|
|
158
|
+
Run /agileflow:session:new to create a parallel workspace.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**If only current session:**
|
|
162
|
+
```
|
|
163
|
+
📊 Session Status
|
|
164
|
+
|
|
165
|
+
Current: Session 1 (main)
|
|
166
|
+
Branch: main │ Active
|
|
167
|
+
|
|
168
|
+
This is your only session. Use /agileflow:session:new to create more.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### FORMATTING RULES
|
|
174
|
+
|
|
175
|
+
| Element | Format | Example |
|
|
176
|
+
|---------|--------|---------|
|
|
177
|
+
| Session name | Branch or nickname | `main` or `"auth"` |
|
|
178
|
+
| Story ID | US-#### or dash | `US-0042` or `-` |
|
|
179
|
+
| Status | ● Active or ○ Inactive | `● Active` |
|
|
180
|
+
| Session reference | Session {id} | `Session 1` |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
### KEY FILES TO REMEMBER
|
|
185
|
+
|
|
186
|
+
| File | Purpose |
|
|
187
|
+
|------|---------|
|
|
188
|
+
| `.agileflow/sessions/registry.json` | Master list of sessions |
|
|
189
|
+
| `.agileflow/sessions/{id}.lock` | Lock file marks session active |
|
|
190
|
+
| `.agileflow/scripts/session-manager.js` | Data source |
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
### WORKFLOW
|
|
195
|
+
|
|
196
|
+
1. **Get sessions** → `node .agileflow/scripts/session-manager.js list --json`
|
|
197
|
+
2. **Parse JSON** → Extract sessions, identify current
|
|
198
|
+
3. **Build display** → Format header, current session, table
|
|
199
|
+
4. **Show summary** → Total and active counts
|
|
200
|
+
5. **Optionally show** → Quick actions reference
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### ANTI-PATTERNS (DON'T DO THESE)
|
|
205
|
+
|
|
206
|
+
❌ Use AskUserQuestion to prompt for action
|
|
207
|
+
❌ Show "Resume Session 2?" or similar prompts
|
|
208
|
+
❌ Use table without proper formatting
|
|
209
|
+
❌ Show path in table (too much info)
|
|
210
|
+
❌ Skip summary line showing counts
|
|
211
|
+
|
|
212
|
+
### DO THESE INSTEAD
|
|
213
|
+
|
|
214
|
+
✅ Display as read-only information
|
|
215
|
+
✅ Use ● and ○ bullets for status
|
|
216
|
+
✅ Format table with proper borders
|
|
217
|
+
✅ Show summary with counts
|
|
218
|
+
✅ Optionally show quick actions for reference
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
### REMEMBER AFTER COMPACTION
|
|
223
|
+
|
|
224
|
+
- `/agileflow:session:status` IS ACTIVE
|
|
225
|
+
- NEVER prompt for action (read-only display)
|
|
226
|
+
- Format: header + current session + table + summary
|
|
227
|
+
- Use ● for active, ○ for inactive
|
|
228
|
+
- Show session counts in summary
|
|
229
|
+
- Optionally show quick actions reference
|
|
230
|
+
|
|
231
|
+
<!-- COMPACT_SUMMARY_END -->
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Generate a custom skill with web research, cookbook pattern, and MCP integration
|
|
3
3
|
argument-hint: [SKILL_NAME] (optional)
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:skill:create - Generates custom research-backed skills"
|
|
8
|
+
- "MUST enter Plan Mode FIRST to research THREE sources: web docs, local docs, codebase patterns"
|
|
9
|
+
- "MUST output to .claude/skills/<skill-name>/ (directly usable by Claude Code)"
|
|
10
|
+
- "MUST include references.md linking web docs, local docs, and codebase patterns"
|
|
11
|
+
- "MUST use cookbook pattern for complex skills (2+ use cases)"
|
|
12
|
+
- "NEVER copy entire docs - reference URLs instead"
|
|
13
|
+
- "CRITICAL: Ask for approval of plan before generating skill files"
|
|
14
|
+
state_fields:
|
|
15
|
+
- skill_name
|
|
16
|
+
- research_sources
|
|
17
|
+
- use_cases_count
|
|
18
|
+
- mcp_server_found
|
|
4
19
|
---
|
|
5
20
|
|
|
6
21
|
# /agileflow:skill:create
|
|
@@ -11,27 +26,67 @@ Generate dynamic, research-backed skills that combine web documentation, user's
|
|
|
11
26
|
|
|
12
27
|
<!-- COMPACT_SUMMARY_START -->
|
|
13
28
|
|
|
14
|
-
##
|
|
29
|
+
## 🚨 COMPACT SUMMARY - /agileflow:skill:create IS ACTIVE
|
|
15
30
|
|
|
16
|
-
**
|
|
31
|
+
**CRITICAL**: This command creates custom skills by researching THREE sources and building research-backed workflows.
|
|
17
32
|
|
|
18
|
-
###
|
|
19
|
-
|
|
20
|
-
2. **Research THREE sources**: Web docs, user's local docs, user's codebase
|
|
21
|
-
3. **Link to external docs** - Reference URLs, don't copy entire docs
|
|
22
|
-
4. **Reference local patterns** - Point to user's existing practices and code
|
|
23
|
-
5. **Use cookbook pattern** for multi-use-case skills
|
|
24
|
-
6. **Output to `.claude/skills/<skill-name>/`** - directly usable by Claude Code
|
|
25
|
-
|
|
26
|
-
### Generated Skill Structure
|
|
33
|
+
### 🚨 RULE #1: Enter Plan Mode First
|
|
34
|
+
ALWAYS start with Plan Mode to explore before generating ANY skill files.
|
|
27
35
|
```
|
|
28
|
-
|
|
29
|
-
├── SKILL.md # Pivot file with references to all sources
|
|
30
|
-
├── cookbook/ # Per-use-case workflows
|
|
31
|
-
├── references.md # Links to web docs + local docs + code patterns
|
|
32
|
-
├── tools/ # Executable scripts (optional)
|
|
33
|
-
└── .mcp.json # MCP server config (if applicable)
|
|
36
|
+
EnterPlanMode
|
|
34
37
|
```
|
|
38
|
+
This prevents wasted generations and gets user approval on research findings.
|
|
39
|
+
|
|
40
|
+
### 🚨 RULE #2: Research Three Sources
|
|
41
|
+
In Plan Mode, research and collect (DON'T generate):
|
|
42
|
+
1. **Web docs**: Official documentation URLs, API reference URLs, best practices links
|
|
43
|
+
2. **Local docs**: Files in `docs/02-practices/`, `docs/04-architecture/`, `docs/03-decisions/`
|
|
44
|
+
3. **Codebase patterns**: Existing code using Glob/Grep to find patterns
|
|
45
|
+
|
|
46
|
+
### 🚨 RULE #3: Link, Never Copy
|
|
47
|
+
- Link to external docs with URLs (don't copy entire docs)
|
|
48
|
+
- Point to local files that exist (don't reference user's docs/02-practices/ directly)
|
|
49
|
+
- Show codebase patterns with file locations and code snippets
|
|
50
|
+
|
|
51
|
+
### 🚨 RULE #4: Output Structure
|
|
52
|
+
Output ALWAYS goes to `.claude/skills/<skill-name>/` with:
|
|
53
|
+
- `SKILL.md` (main file with activation triggers and cookbook references)
|
|
54
|
+
- `references.md` (all documentation links)
|
|
55
|
+
- `cookbook/` directory (one .md per use case)
|
|
56
|
+
- `.mcp.json` (if MCP server found)
|
|
57
|
+
|
|
58
|
+
### 🚨 RULE #5: Cookbook Pattern
|
|
59
|
+
- **Simple skill** (1 use case): SKILL.md only
|
|
60
|
+
- **Complex skill** (2+ use cases): SKILL.md + cookbook/ directory with per-use-case files
|
|
61
|
+
|
|
62
|
+
### 🚨 RULE #6: Get Approval Before Writing
|
|
63
|
+
After research and plan creation:
|
|
64
|
+
1. Show plan findings to user
|
|
65
|
+
2. Ask for approval
|
|
66
|
+
3. Exit Plan Mode with approval
|
|
67
|
+
4. THEN write the skill files
|
|
68
|
+
|
|
69
|
+
### Critical Files Generated
|
|
70
|
+
| File | Purpose | Required? |
|
|
71
|
+
|------|---------|-----------|
|
|
72
|
+
| SKILL.md | Main skill file with activation triggers | Yes |
|
|
73
|
+
| references.md | Links to all web/local/codebase docs | Yes |
|
|
74
|
+
| cookbook/<use-case>.md | Per-use-case workflow | If 2+ cases |
|
|
75
|
+
| .mcp.json | MCP server configuration | If found |
|
|
76
|
+
|
|
77
|
+
### Anti-Patterns
|
|
78
|
+
- ❌ DON'T write skill files without Plan Mode approval
|
|
79
|
+
- ❌ DON'T copy entire external documentation
|
|
80
|
+
- ❌ DON'T reference docs/02-practices/ that user hasn't created
|
|
81
|
+
- ❌ DON'T skip cookbook pattern for complex skills
|
|
82
|
+
- ❌ DON'T forget references.md (critical for user context)
|
|
83
|
+
|
|
84
|
+
### REMEMBER AFTER COMPACTION
|
|
85
|
+
- Skill creation is 5 phases: Requirements → Plan Mode Research → Get Approval → Generate → Write Files
|
|
86
|
+
- Plan Mode research finds URLs and local patterns (don't generate from plan)
|
|
87
|
+
- User must approve plan before ANY files are written
|
|
88
|
+
- Complex skills need cookbook/ for each use case
|
|
89
|
+
- references.md is the pivot file linking all sources
|
|
35
90
|
|
|
36
91
|
<!-- COMPACT_SUMMARY_END -->
|
|
37
92
|
|
|
@@ -564,3 +619,46 @@ If validation fails:
|
|
|
564
619
|
# With skill name hint
|
|
565
620
|
/agileflow:skill:create supabase-swift
|
|
566
621
|
```
|
|
622
|
+
|
|
623
|
+
---
|
|
624
|
+
|
|
625
|
+
## POST-CREATION ACTIONS
|
|
626
|
+
|
|
627
|
+
After successfully creating a skill, offer next steps:
|
|
628
|
+
|
|
629
|
+
```xml
|
|
630
|
+
<invoke name="AskUserQuestion">
|
|
631
|
+
<parameter name="questions">[{
|
|
632
|
+
"question": "Skill '<skill-name>' created! What would you like to do next?",
|
|
633
|
+
"header": "Next Steps",
|
|
634
|
+
"multiSelect": false,
|
|
635
|
+
"options": [
|
|
636
|
+
{"label": "Test the skill (Recommended)", "description": "Verify the skill works correctly"},
|
|
637
|
+
{"label": "View all skills", "description": "See full skill inventory with /agileflow:skill:list"},
|
|
638
|
+
{"label": "Create another skill", "description": "Build another custom skill"},
|
|
639
|
+
{"label": "Done", "description": "Exit"}
|
|
640
|
+
]
|
|
641
|
+
}]</parameter>
|
|
642
|
+
</invoke>
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
**If "Test the skill"**:
|
|
646
|
+
- Run `/agileflow:skill:test SKILL=<skill-name>`
|
|
647
|
+
- Provide sample input scenarios
|
|
648
|
+
- Verify output matches expectations
|
|
649
|
+
|
|
650
|
+
**If "View all skills"**:
|
|
651
|
+
- Run `/agileflow:skill:list`
|
|
652
|
+
|
|
653
|
+
**If "Create another skill"**:
|
|
654
|
+
- Re-run `/agileflow:skill:create`
|
|
655
|
+
|
|
656
|
+
---
|
|
657
|
+
|
|
658
|
+
## Related Commands
|
|
659
|
+
|
|
660
|
+
- `/agileflow:skill:list` - View all installed skills
|
|
661
|
+
- `/agileflow:skill:test` - Test a skill with sample inputs
|
|
662
|
+
- `/agileflow:skill:edit` - Modify an existing skill
|
|
663
|
+
- `/agileflow:skill:delete` - Remove a skill
|
|
664
|
+
- `/agileflow:skill:upgrade` - Update skill with new patterns
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Remove an installed skill from .claude/skills/
|
|
3
3
|
argument-hint: [SKILL_NAME] (optional)
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: medium
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:skill:delete - Removes installed skills"
|
|
8
|
+
- "MUST list available skills if SKILL_NAME not provided"
|
|
9
|
+
- "MUST show exactly what will be deleted (tree view of files)"
|
|
10
|
+
- "MUST ask for explicit confirmation before deletion (no undo)"
|
|
11
|
+
- "MUST offer backup option before deletion"
|
|
12
|
+
- "MUST create backup in .claude/skills-backup/ if requested"
|
|
13
|
+
- "NEVER delete without explicit user confirmation"
|
|
14
|
+
state_fields:
|
|
15
|
+
- selected_skill_for_deletion
|
|
16
|
+
- backup_created
|
|
4
17
|
---
|
|
5
18
|
|
|
6
19
|
# /agileflow:skill:delete
|
|
@@ -9,6 +22,110 @@ Remove a skill from `.claude/skills/`.
|
|
|
9
22
|
|
|
10
23
|
---
|
|
11
24
|
|
|
25
|
+
<!-- COMPACT_SUMMARY_START -->
|
|
26
|
+
|
|
27
|
+
## 🚨 COMPACT SUMMARY - /agileflow:skill:delete IS ACTIVE
|
|
28
|
+
|
|
29
|
+
**CRITICAL**: This command deletes skills with full safety features and backup options.
|
|
30
|
+
|
|
31
|
+
### 🚨 RULE #1: Select Skill
|
|
32
|
+
If SKILL_NAME not provided:
|
|
33
|
+
```bash
|
|
34
|
+
ls -d .claude/skills/*/ | xargs -I {} basename {}
|
|
35
|
+
```
|
|
36
|
+
Show options and ask user which to delete.
|
|
37
|
+
|
|
38
|
+
### 🚨 RULE #2: Show Exactly What Will Be Deleted
|
|
39
|
+
Display complete tree view:
|
|
40
|
+
```
|
|
41
|
+
⚠️ About to delete: skill-name
|
|
42
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
This will permanently remove:
|
|
44
|
+
.claude/skills/skill-name/
|
|
45
|
+
├── SKILL.md
|
|
46
|
+
├── references.md
|
|
47
|
+
├── cookbook/
|
|
48
|
+
│ ├── use-case-1.md
|
|
49
|
+
│ └── use-case-2.md
|
|
50
|
+
└── .mcp.json
|
|
51
|
+
|
|
52
|
+
Total: 5 files in 2 directories
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 🚨 RULE #3: Ask for Confirmation
|
|
56
|
+
Multiple confirmation levels:
|
|
57
|
+
1. **First ask**: "Are you sure?" (show file tree)
|
|
58
|
+
2. **Options**:
|
|
59
|
+
- "Yes, delete permanently" - Proceed with deletion
|
|
60
|
+
- "No, keep it" - Cancel
|
|
61
|
+
- "Export first" - Create backup first
|
|
62
|
+
|
|
63
|
+
### 🚨 RULE #4: Handle Backup Request
|
|
64
|
+
If user chooses "Export first":
|
|
65
|
+
```bash
|
|
66
|
+
mkdir -p .claude/skills-backup/
|
|
67
|
+
cp -r .claude/skills/<skill> .claude/skills-backup/<skill>-$(date +%Y%m%d-%H%M%S)/
|
|
68
|
+
```
|
|
69
|
+
Show backup location, then return to confirmation.
|
|
70
|
+
|
|
71
|
+
### 🚨 RULE #5: Execute Deletion
|
|
72
|
+
After confirmed deletion:
|
|
73
|
+
```bash
|
|
74
|
+
rm -rf .claude/skills/<skill>/
|
|
75
|
+
```
|
|
76
|
+
Show confirmation message with success emoji.
|
|
77
|
+
|
|
78
|
+
### 🚨 RULE #6: Offer Next Actions
|
|
79
|
+
After deletion, ask:
|
|
80
|
+
```
|
|
81
|
+
What would you like to do next?
|
|
82
|
+
- Delete another skill
|
|
83
|
+
- Create new skill
|
|
84
|
+
- List remaining skills
|
|
85
|
+
- Done
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Safety Features
|
|
89
|
+
| Feature | Purpose |
|
|
90
|
+
|---------|---------|
|
|
91
|
+
| Show file tree | User sees EXACTLY what's deleted |
|
|
92
|
+
| Explicit confirmation | Can't accidentally delete |
|
|
93
|
+
| Backup option | Can recover if needed |
|
|
94
|
+
| One at a time | No batch delete accidents |
|
|
95
|
+
| Timestamp in backup | Identify which version backed up |
|
|
96
|
+
|
|
97
|
+
### Backup Location
|
|
98
|
+
```
|
|
99
|
+
.claude/skills-backup/<skill>-<YYYYMMDD-HHMMSS>/
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Example:
|
|
103
|
+
```
|
|
104
|
+
.claude/skills-backup/supabase-swift-20251227-143052/
|
|
105
|
+
├── SKILL.md
|
|
106
|
+
├── references.md
|
|
107
|
+
├── cookbook/
|
|
108
|
+
└── .mcp.json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Anti-Patterns
|
|
112
|
+
- ❌ DON'T delete without showing file tree
|
|
113
|
+
- ❌ DON'T proceed without explicit confirmation
|
|
114
|
+
- ❌ DON'T skip backup option offer
|
|
115
|
+
- ❌ DON'T allow batch/wildcard deletes (one at a time)
|
|
116
|
+
- ❌ DON'T delete without confirming again if backup created
|
|
117
|
+
|
|
118
|
+
### REMEMBER AFTER COMPACTION
|
|
119
|
+
- Delete is always: Select → Show tree → Ask confirm → [Backup if requested] → Delete → Show next actions
|
|
120
|
+
- NEVER delete without explicit confirmation
|
|
121
|
+
- Always offer backup option before deletion
|
|
122
|
+
- Backup goes to .claude/skills-backup/ with timestamp
|
|
123
|
+
- One skill at a time (no batch delete)
|
|
124
|
+
|
|
125
|
+
<!-- COMPACT_SUMMARY_END -->
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
12
129
|
## Workflow
|
|
13
130
|
|
|
14
131
|
### STEP 1: Select skill to delete
|