skill-flow 1.0.1 → 1.0.3
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 +61 -22
- package/README.zh.md +62 -24
- package/dist/cli.js +35 -5
- package/dist/cli.js.map +1 -1
- package/dist/domain/types.d.ts +25 -0
- package/dist/services/deployment-applier.js +6 -0
- package/dist/services/deployment-applier.js.map +1 -1
- package/dist/services/deployment-planner.d.ts +5 -0
- package/dist/services/deployment-planner.js +198 -16
- package/dist/services/deployment-planner.js.map +1 -1
- package/dist/services/doctor-service.js +1 -1
- package/dist/services/doctor-service.js.map +1 -1
- package/dist/services/skill-flow.d.ts +28 -2
- package/dist/services/skill-flow.js +354 -3
- package/dist/services/skill-flow.js.map +1 -1
- package/dist/services/source-service.d.ts +1 -1
- package/dist/services/source-service.js +15 -18
- package/dist/services/source-service.js.map +1 -1
- package/dist/state/store.d.ts +3 -0
- package/dist/state/store.js +10 -0
- package/dist/state/store.js.map +1 -1
- package/dist/tests/skill-flow.test.js +1427 -0
- package/dist/tests/skill-flow.test.js.map +1 -1
- package/dist/tui/config-app.js +53 -4
- package/dist/tui/config-app.js.map +1 -1
- package/dist/tui/find-app.d.ts +9 -0
- package/dist/tui/find-app.js +117 -0
- package/dist/tui/find-app.js.map +1 -0
- package/dist/utils/builtin-git-sources.d.ts +5 -0
- package/dist/utils/builtin-git-sources.js +23 -0
- package/dist/utils/builtin-git-sources.js.map +1 -0
- package/dist/utils/find-command.d.ts +2 -0
- package/dist/utils/find-command.js +21 -0
- package/dist/utils/find-command.js.map +1 -0
- package/dist/utils/format.d.ts +2 -1
- package/dist/utils/format.js +19 -1
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/github-catalog.d.ts +1 -0
- package/dist/utils/github-catalog.js +25 -0
- package/dist/utils/github-catalog.js.map +1 -0
- package/dist/utils/naming.d.ts +9 -1
- package/dist/utils/naming.js +33 -6
- package/dist/utils/naming.js.map +1 -1
- package/package.json +10 -1
- package/.gstack/browse-network.log +0 -1
- package/.gstack/browse.json +0 -7
- package/.gstack/qa-reports/qa-report-skill-manager-2026-03-22.md +0 -60
- package/docs/DESIGN.md +0 -407
- package/docs/PRD/PRD-1.0.0.md +0 -1862
- package/docs/PRD/renew/PRD-0.0.0.md +0 -26
- package/docs/PRD/renew/PRD-0.0.1.md +0 -408
- package/docs/PRD/renew/PRD-0.0.2.md +0 -705
- package/docs/PRD/renew/PRD-0.0.3.md +0 -740
- package/docs/PRD/renew/PRD-0.0.4.md +0 -1494
- package/docs/README.md +0 -242
- package/docs/plan/PLAN_v1.0.0.md +0 -663
- package/docs/plan/PLAN_v1.0.1.md +0 -814
- package/docs/refrences/README.md +0 -7
- package/docs/refrences/agent-skill-paths.md +0 -252
- package/docs/refrences/naming-dedupe-warning-rules.md +0 -482
- package/img/img-1.jpg +0 -0
package/docs/plan/PLAN_v1.0.0.md
DELETED
|
@@ -1,663 +0,0 @@
|
|
|
1
|
-
# Skill Flow Implementation Plan
|
|
2
|
-
|
|
3
|
-
Version: v1.0.0
|
|
4
|
-
Status: APPROVED FOR IMPLEMENTATION
|
|
5
|
-
Date: 2026-03-21
|
|
6
|
-
Product mode: Workflow Control Tower MVP
|
|
7
|
-
Platform: macOS
|
|
8
|
-
CLI entry: `skill-flow`
|
|
9
|
-
State root: `~/.skillflow/`
|
|
10
|
-
|
|
11
|
-
## 1. Executive Summary
|
|
12
|
-
|
|
13
|
-
This plan replaces the earlier broad PRD for a discovery-heavy skills platform.
|
|
14
|
-
|
|
15
|
-
The first release of `skill-flow` is a terminal-first workflow control tower for skills:
|
|
16
|
-
- add one Git source
|
|
17
|
-
- see it as a grouped workflow, not a flat dump
|
|
18
|
-
- inspect contained skills
|
|
19
|
-
- project selected skills into multiple agent targets
|
|
20
|
-
- update that grouped workflow later without losing structure
|
|
21
|
-
- diagnose drift and broken projections clearly
|
|
22
|
-
|
|
23
|
-
This version is intentionally narrower than the original PRD:
|
|
24
|
-
- Git only
|
|
25
|
-
- grouped workflow management only
|
|
26
|
-
- no discovery / ranking / search platform
|
|
27
|
-
- no ClawHub in v1
|
|
28
|
-
- no physical canonical skill store
|
|
29
|
-
|
|
30
|
-
The goal is not "manage everything eventually."
|
|
31
|
-
The goal is "ship the smallest complete product that makes grouped skills finally make sense."
|
|
32
|
-
|
|
33
|
-
## 2. Problem Statement
|
|
34
|
-
|
|
35
|
-
Current skills tooling flattens related skills into target directories. That destroys the user's mental model.
|
|
36
|
-
|
|
37
|
-
The real user problem is:
|
|
38
|
-
- one source often contains several related skills
|
|
39
|
-
- those skills belong to one workflow
|
|
40
|
-
- after install, they are scattered across hidden directories
|
|
41
|
-
- later updates, reconfiguration, and troubleshooting become harder than the original install
|
|
42
|
-
|
|
43
|
-
`skill-flow` should treat the workflow group as the primary unit the user understands, while preserving `Source -> SkillLeaf` as the core domain model internally.
|
|
44
|
-
|
|
45
|
-
## 3. Product Scope
|
|
46
|
-
|
|
47
|
-
### In scope for v1
|
|
48
|
-
- Git source add/update/remove
|
|
49
|
-
- source-level grouped workflow view
|
|
50
|
-
- leaf skill discovery from source contents
|
|
51
|
-
- workflow-first TUI for config
|
|
52
|
-
- multi-target projection to supported agent directories
|
|
53
|
-
- `manifest.json + lock.json`
|
|
54
|
-
- grouped update and re-apply
|
|
55
|
-
- minimal `doctor`
|
|
56
|
-
- full test coverage for happy path plus known failure branches
|
|
57
|
-
|
|
58
|
-
### NOT in scope for v1
|
|
59
|
-
- discovery / `find` / ranking / candidate schema
|
|
60
|
-
- ClawHub adapter
|
|
61
|
-
- well-known discovery URLs
|
|
62
|
-
- physical canonical skill store
|
|
63
|
-
- new `WorkflowGroup` persistence entity
|
|
64
|
-
- GUI / desktop app
|
|
65
|
-
- plugin SDK
|
|
66
|
-
- project-scope management beyond target channel realities already required
|
|
67
|
-
- remote registry trust / stars / installs / leaderboards
|
|
68
|
-
|
|
69
|
-
## 4. What Already Exists
|
|
70
|
-
|
|
71
|
-
Existing inputs this plan reuses:
|
|
72
|
-
- [`PRD/PRD-1.0.0.md`](/Users/Vint/仓库/03%20Project/skill-flow/PRD/PRD-1.0.0.md)
|
|
73
|
-
Reuse:
|
|
74
|
-
- `Source / SkillLeaf / Channel / Deployment` domain vocabulary
|
|
75
|
-
- `manifest + lock` split
|
|
76
|
-
- channel-specific projection idea
|
|
77
|
-
- tree TUI direction
|
|
78
|
-
- [`DESIGN.md`](/Users/Vint/仓库/03%20Project/skill-flow/DESIGN.md)
|
|
79
|
-
Reuse:
|
|
80
|
-
- workflow-first information architecture
|
|
81
|
-
- operator-style terminal design
|
|
82
|
-
- state coverage and copy rules
|
|
83
|
-
- [`Vint-main-design-20260321-182259.md`](/Users/Vint/.gstack/projects/skill-flow/Vint-main-design-20260321-182259.md)
|
|
84
|
-
Reuse:
|
|
85
|
-
- approved product direction
|
|
86
|
-
- grouped workflow framing
|
|
87
|
-
- design decisions and constraints
|
|
88
|
-
- [`Vint-main-test-plan-20260321-103600.md`](/Users/Vint/.gstack/projects/skill-flow/Vint-main-test-plan-20260321-103600.md)
|
|
89
|
-
Reuse:
|
|
90
|
-
- critical paths
|
|
91
|
-
- edge cases
|
|
92
|
-
- QA surface
|
|
93
|
-
|
|
94
|
-
Existing plan content explicitly not reused:
|
|
95
|
-
- discovery workflow
|
|
96
|
-
- `SkillCandidate` domain object
|
|
97
|
-
- ranking / cache / registry tiers
|
|
98
|
-
- inventory cache as a standalone state file
|
|
99
|
-
- first-release ClawHub scope
|
|
100
|
-
|
|
101
|
-
## 5. Architecture Decisions
|
|
102
|
-
|
|
103
|
-
### 5.1 Source of Truth
|
|
104
|
-
|
|
105
|
-
The system has two sources of truth:
|
|
106
|
-
|
|
107
|
-
- `manifest.json`
|
|
108
|
-
User intent
|
|
109
|
-
- `lock.json`
|
|
110
|
-
Resolved source snapshots, discovered leafs, deployment state
|
|
111
|
-
|
|
112
|
-
Disk targets are projections only. They are never the truth.
|
|
113
|
-
|
|
114
|
-
```text
|
|
115
|
-
user intent
|
|
116
|
-
|
|
|
117
|
-
v
|
|
118
|
-
manifest.json
|
|
119
|
-
|
|
|
120
|
-
v
|
|
121
|
-
resolve source + scan leafs
|
|
122
|
-
|
|
|
123
|
-
v
|
|
124
|
-
lock.json
|
|
125
|
-
|
|
|
126
|
-
v
|
|
127
|
-
plan deployments
|
|
128
|
-
|
|
|
129
|
-
v
|
|
130
|
-
target directories (projection only)
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### 5.2 Domain Model
|
|
134
|
-
|
|
135
|
-
The internal model remains:
|
|
136
|
-
|
|
137
|
-
```text
|
|
138
|
-
Source -> SkillLeaf -> DeploymentTarget -> DeploymentState
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
User-facing language:
|
|
142
|
-
|
|
143
|
-
```text
|
|
144
|
-
Workflow Group -> Contained Skills -> Projects To
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
There is no separate persisted `WorkflowGroup` entity in v1.
|
|
148
|
-
|
|
149
|
-
### 5.3 Source Strategy
|
|
150
|
-
|
|
151
|
-
v1 only implements Git sources.
|
|
152
|
-
|
|
153
|
-
Do not build a generalized source plugin framework yet.
|
|
154
|
-
Instead:
|
|
155
|
-
- keep Git implementation concrete
|
|
156
|
-
- keep data contracts future-compatible
|
|
157
|
-
|
|
158
|
-
Supported source locators:
|
|
159
|
-
- `owner/repo`
|
|
160
|
-
- `https://...git`
|
|
161
|
-
- `git@...`
|
|
162
|
-
- local git path
|
|
163
|
-
|
|
164
|
-
### 5.4 Channel Strategy
|
|
165
|
-
|
|
166
|
-
Channels are real current differences, so they do get a lightweight adapter boundary.
|
|
167
|
-
|
|
168
|
-
Required adapter responsibilities:
|
|
169
|
-
- `detect()`
|
|
170
|
-
- `plan()`
|
|
171
|
-
- `apply()`
|
|
172
|
-
- `doctor()`
|
|
173
|
-
|
|
174
|
-
Common file operations must live in shared deployment core code.
|
|
175
|
-
Do not duplicate symlink/copy/conflict logic per adapter.
|
|
176
|
-
|
|
177
|
-
### 5.5 Storage Strategy
|
|
178
|
-
|
|
179
|
-
Do not create a physical canonical skill store for v1.
|
|
180
|
-
|
|
181
|
-
Use:
|
|
182
|
-
- raw source checkout in `~/.skillflow/source/...`
|
|
183
|
-
- leaf inventory stored in `lock.json`
|
|
184
|
-
- projection paths pointing directly to source leaf roots
|
|
185
|
-
|
|
186
|
-
This removes a full sync layer and reduces blast radius.
|
|
187
|
-
|
|
188
|
-
## 6. Filesystem Layout
|
|
189
|
-
|
|
190
|
-
```text
|
|
191
|
-
~/.skillflow/
|
|
192
|
-
├── source/
|
|
193
|
-
│ └── git/
|
|
194
|
-
│ └── <source-id>/
|
|
195
|
-
├── manifest.json
|
|
196
|
-
└── lock.json
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
No `channels.json`
|
|
200
|
-
No `inventory-index.json`
|
|
201
|
-
No `discovery-cache.json`
|
|
202
|
-
No physical `skills/` store in v1
|
|
203
|
-
|
|
204
|
-
## 7. Core Flows
|
|
205
|
-
|
|
206
|
-
### 7.1 Add Source
|
|
207
|
-
|
|
208
|
-
```text
|
|
209
|
-
parse locator
|
|
210
|
-
->
|
|
211
|
-
fetch git source
|
|
212
|
-
->
|
|
213
|
-
scan source for valid leaf skills
|
|
214
|
-
->
|
|
215
|
-
write manifest intent
|
|
216
|
-
->
|
|
217
|
-
write lock snapshot + leaf inventory
|
|
218
|
-
->
|
|
219
|
-
show grouped workflow in UI
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### 7.2 Configure Workflow
|
|
223
|
-
|
|
224
|
-
```text
|
|
225
|
-
load manifest + lock
|
|
226
|
-
->
|
|
227
|
-
render workflow groups
|
|
228
|
-
->
|
|
229
|
-
expand one group
|
|
230
|
-
->
|
|
231
|
-
select contained skills
|
|
232
|
-
->
|
|
233
|
-
select targets
|
|
234
|
-
->
|
|
235
|
-
build apply preview
|
|
236
|
-
->
|
|
237
|
-
persist intent
|
|
238
|
-
->
|
|
239
|
-
apply projection
|
|
240
|
-
->
|
|
241
|
-
persist deployment state
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### 7.3 Update Workflow
|
|
245
|
-
|
|
246
|
-
```text
|
|
247
|
-
fetch source
|
|
248
|
-
->
|
|
249
|
-
rescan leaf inventory
|
|
250
|
-
->
|
|
251
|
-
diff old vs new leafs
|
|
252
|
-
->
|
|
253
|
-
recompute deployment plan
|
|
254
|
-
->
|
|
255
|
-
apply changed items only
|
|
256
|
-
->
|
|
257
|
-
update lock state
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### 7.4 Doctor
|
|
261
|
-
|
|
262
|
-
```text
|
|
263
|
-
load manifest + lock
|
|
264
|
-
->
|
|
265
|
-
inspect targets
|
|
266
|
-
->
|
|
267
|
-
check channel availability
|
|
268
|
-
->
|
|
269
|
-
check foreign conflicts
|
|
270
|
-
->
|
|
271
|
-
check broken projections
|
|
272
|
-
->
|
|
273
|
-
check drift
|
|
274
|
-
->
|
|
275
|
-
report healthy / partial / blocked
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
## 8. UX and TUI Plan
|
|
279
|
-
|
|
280
|
-
The TUI is part of the product, not a thin shell.
|
|
281
|
-
|
|
282
|
-
### Default wide layout
|
|
283
|
-
|
|
284
|
-
```text
|
|
285
|
-
+------------------------+--------------------------+----------------------+
|
|
286
|
-
| WORKFLOW GROUPS | GROUP DETAIL | AGENT PROJECTION |
|
|
287
|
-
| | | |
|
|
288
|
-
| frontend-workflow | Purpose | Claude Code |
|
|
289
|
-
| agent-ops | Contained Skills | Codex (.agents) |
|
|
290
|
-
| pdf-toolchain | Health / Warnings | OpenCode |
|
|
291
|
-
| | Update State | OpenClaw |
|
|
292
|
-
+------------------------+--------------------------+----------------------+
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
### Top-level hierarchy
|
|
296
|
-
1. workflow group name
|
|
297
|
-
2. group health and update status
|
|
298
|
-
3. contained skill count
|
|
299
|
-
4. projection coverage
|
|
300
|
-
|
|
301
|
-
### Required states
|
|
302
|
-
- loading
|
|
303
|
-
- empty
|
|
304
|
-
- error
|
|
305
|
-
- success
|
|
306
|
-
- partial
|
|
307
|
-
|
|
308
|
-
### Required interaction rules
|
|
309
|
-
- preview before mutation
|
|
310
|
-
- no hidden auto-apply
|
|
311
|
-
- keyboard-only complete flow
|
|
312
|
-
- visible shortcuts in current screen
|
|
313
|
-
- warnings inline and in preview
|
|
314
|
-
|
|
315
|
-
## 9. Commands
|
|
316
|
-
|
|
317
|
-
v1 command surface:
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
skill-flow add <source>
|
|
321
|
-
skill-flow list
|
|
322
|
-
skill-flow config
|
|
323
|
-
skill-flow update [<sourceId> | --all]
|
|
324
|
-
skill-flow doctor
|
|
325
|
-
skill-flow uninstall [<sourceId>...]
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
### Command notes
|
|
329
|
-
- `add`
|
|
330
|
-
Fetch + scan + write state
|
|
331
|
-
- `list`
|
|
332
|
-
Show grouped workflow summary
|
|
333
|
-
- `config`
|
|
334
|
-
Main workflow-first TUI
|
|
335
|
-
- `update`
|
|
336
|
-
Source-level update and incremental re-apply
|
|
337
|
-
- `doctor`
|
|
338
|
-
Drift/conflict/broken target inspection
|
|
339
|
-
- `uninstall`
|
|
340
|
-
Remove source and associated deployment state
|
|
341
|
-
|
|
342
|
-
Commands not in v1:
|
|
343
|
-
- `find`
|
|
344
|
-
- `search`
|
|
345
|
-
- `install` as a separate discovery-driven flow
|
|
346
|
-
|
|
347
|
-
## 10. Data Contracts
|
|
348
|
-
|
|
349
|
-
### 10.1 Manifest
|
|
350
|
-
|
|
351
|
-
Purpose:
|
|
352
|
-
- store user intent only
|
|
353
|
-
|
|
354
|
-
Contents:
|
|
355
|
-
- schema version
|
|
356
|
-
- registered sources
|
|
357
|
-
- selected leafs by target
|
|
358
|
-
- user overrides
|
|
359
|
-
|
|
360
|
-
Example shape:
|
|
361
|
-
|
|
362
|
-
```json
|
|
363
|
-
{
|
|
364
|
-
"schemaVersion": 1,
|
|
365
|
-
"sources": [],
|
|
366
|
-
"bindings": {}
|
|
367
|
-
}
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### 10.2 Lock
|
|
371
|
-
|
|
372
|
-
Purpose:
|
|
373
|
-
- store resolved source snapshot
|
|
374
|
-
- store discovered leaf inventory
|
|
375
|
-
- store deployment state
|
|
376
|
-
|
|
377
|
-
Example shape:
|
|
378
|
-
|
|
379
|
-
```json
|
|
380
|
-
{
|
|
381
|
-
"schemaVersion": 1,
|
|
382
|
-
"sources": [],
|
|
383
|
-
"leafInventory": [],
|
|
384
|
-
"deployments": []
|
|
385
|
-
}
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
### 10.3 Explicit rule
|
|
389
|
-
|
|
390
|
-
If data can be derived from `manifest + lock + disk inspection`, do not create a new state file for it.
|
|
391
|
-
|
|
392
|
-
## 11. Module Plan
|
|
393
|
-
|
|
394
|
-
Keep the implementation small and explicit.
|
|
395
|
-
|
|
396
|
-
```text
|
|
397
|
-
src/
|
|
398
|
-
├── commands/
|
|
399
|
-
├── domain/
|
|
400
|
-
├── services/
|
|
401
|
-
├── adapters/
|
|
402
|
-
├── state/
|
|
403
|
-
├── tui/
|
|
404
|
-
└── tests/
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
### Required service boundaries
|
|
408
|
-
- `SourceService`
|
|
409
|
-
Parse/fetch/update Git sources
|
|
410
|
-
- `InventoryService`
|
|
411
|
-
Scan sources and resolve leaf inventory
|
|
412
|
-
- `DeploymentPlanner`
|
|
413
|
-
Compute create/update/remove/noop
|
|
414
|
-
- `DeploymentApplier`
|
|
415
|
-
Execute projection changes
|
|
416
|
-
|
|
417
|
-
### Required adapter boundaries
|
|
418
|
-
- `ChannelAdapter`
|
|
419
|
-
- `detect`
|
|
420
|
-
- `plan`
|
|
421
|
-
- `apply`
|
|
422
|
-
- `doctor`
|
|
423
|
-
|
|
424
|
-
### TUI-specific rule
|
|
425
|
-
Tree selection state should be implemented as a pure state machine that can be tested outside terminal rendering.
|
|
426
|
-
|
|
427
|
-
## 12. Channel Plan
|
|
428
|
-
|
|
429
|
-
v1 targets:
|
|
430
|
-
- Claude Code
|
|
431
|
-
- Codex (`.agents/skills`)
|
|
432
|
-
- OpenCode
|
|
433
|
-
- OpenClaw
|
|
434
|
-
|
|
435
|
-
### Default strategies
|
|
436
|
-
- Claude Code: symlink
|
|
437
|
-
- Codex (`.agents/skills`): symlink
|
|
438
|
-
- OpenCode: symlink
|
|
439
|
-
- OpenClaw: copy
|
|
440
|
-
|
|
441
|
-
### Important simplification
|
|
442
|
-
Surface `Codex (.agents/skills)` as one target in the first UX.
|
|
443
|
-
Do not split generic `.agents/skills` into another parallel mental model in v1.
|
|
444
|
-
|
|
445
|
-
## 13. Error Handling Strategy
|
|
446
|
-
|
|
447
|
-
Core services return explicit results:
|
|
448
|
-
|
|
449
|
-
```text
|
|
450
|
-
Result<T>:
|
|
451
|
-
- ok
|
|
452
|
-
- data
|
|
453
|
-
- warnings[]
|
|
454
|
-
- errors[]
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
Only throw exceptions for true programming errors or impossible states.
|
|
458
|
-
|
|
459
|
-
### Why
|
|
460
|
-
This tool has many user-facing failures that should be recoverable:
|
|
461
|
-
- bad source locator
|
|
462
|
-
- invalid leaf
|
|
463
|
-
- target unavailable
|
|
464
|
-
- foreign file conflict
|
|
465
|
-
- drift
|
|
466
|
-
|
|
467
|
-
Those should not become uncontrolled exception flow.
|
|
468
|
-
|
|
469
|
-
## 14. Test Strategy
|
|
470
|
-
|
|
471
|
-
### Test diagram
|
|
472
|
-
|
|
473
|
-
```text
|
|
474
|
-
add source
|
|
475
|
-
|
|
|
476
|
-
v
|
|
477
|
-
fetch git source
|
|
478
|
-
|
|
|
479
|
-
+--> fetch fails
|
|
480
|
-
|
|
|
481
|
-
v
|
|
482
|
-
scan source
|
|
483
|
-
|
|
|
484
|
-
+--> 0 valid leafs
|
|
485
|
-
+--> some invalid leafs
|
|
486
|
-
|
|
|
487
|
-
v
|
|
488
|
-
write manifest + lock
|
|
489
|
-
|
|
|
490
|
-
v
|
|
491
|
-
config workflow group
|
|
492
|
-
|
|
|
493
|
-
+--> parent/child state transitions
|
|
494
|
-
+--> target unavailable
|
|
495
|
-
|
|
|
496
|
-
v
|
|
497
|
-
plan projection
|
|
498
|
-
|
|
|
499
|
-
+--> foreign conflict
|
|
500
|
-
+--> unsupported strategy
|
|
501
|
-
|
|
|
502
|
-
v
|
|
503
|
-
apply projection
|
|
504
|
-
|
|
|
505
|
-
+--> broken projection later
|
|
506
|
-
|
|
|
507
|
-
v
|
|
508
|
-
update source
|
|
509
|
-
|
|
|
510
|
-
+--> added leaf
|
|
511
|
-
+--> removed leaf
|
|
512
|
-
+--> invalidated leaf
|
|
513
|
-
|
|
|
514
|
-
v
|
|
515
|
-
doctor
|
|
516
|
-
|
|
|
517
|
-
+--> healthy / partial / blocked / drift
|
|
518
|
-
```
|
|
519
|
-
|
|
520
|
-
### Required automated coverage
|
|
521
|
-
- add happy path
|
|
522
|
-
- invalid source fetch
|
|
523
|
-
- zero valid leafs
|
|
524
|
-
- mixed valid/invalid leafs
|
|
525
|
-
- foreign target conflict
|
|
526
|
-
- broken symlink detection
|
|
527
|
-
- unavailable target path
|
|
528
|
-
- update adds leaf
|
|
529
|
-
- update removes leaf
|
|
530
|
-
- update invalidates leaf
|
|
531
|
-
- tree selection state machine
|
|
532
|
-
- doctor drift detection
|
|
533
|
-
|
|
534
|
-
### Test artifact dependency
|
|
535
|
-
This plan consumes and aligns with:
|
|
536
|
-
- [`Vint-main-test-plan-20260321-103600.md`](/Users/Vint/.gstack/projects/skill-flow/Vint-main-test-plan-20260321-103600.md)
|
|
537
|
-
|
|
538
|
-
## 15. Performance Strategy
|
|
539
|
-
|
|
540
|
-
This is not a high-scale server, but careless implementation will still feel bad.
|
|
541
|
-
|
|
542
|
-
### Required performance rules
|
|
543
|
-
- inventory is tied to source snapshot in `lock.json`
|
|
544
|
-
- do not full-rescan and full-hash on every command if snapshot unchanged
|
|
545
|
-
- `DeploymentPlanner` must produce diffs:
|
|
546
|
-
- create
|
|
547
|
-
- update
|
|
548
|
-
- remove
|
|
549
|
-
- noop
|
|
550
|
-
- `DeploymentApplier` only executes changed items
|
|
551
|
-
|
|
552
|
-
### Explicitly avoid in v1
|
|
553
|
-
- standalone cache infrastructure
|
|
554
|
-
- eager full rebuild of all projections on every update
|
|
555
|
-
|
|
556
|
-
## 16. Security and Safety
|
|
557
|
-
|
|
558
|
-
This tool does not execute skills.
|
|
559
|
-
|
|
560
|
-
It still needs to treat third-party content as untrusted input.
|
|
561
|
-
|
|
562
|
-
Required protections:
|
|
563
|
-
- validate `SKILL.md`
|
|
564
|
-
- never mutate upstream source content
|
|
565
|
-
- never overwrite foreign target files silently
|
|
566
|
-
- show source locator clearly in detail metadata
|
|
567
|
-
- surface copy vs symlink strategy explicitly in preview
|
|
568
|
-
|
|
569
|
-
## 17. Milestones
|
|
570
|
-
|
|
571
|
-
### Milestone 1: State + Git + Scanner
|
|
572
|
-
- initialize project skeleton
|
|
573
|
-
- implement `manifest.json + lock.json`
|
|
574
|
-
- implement Git source parsing/fetch/update
|
|
575
|
-
- implement leaf scanner
|
|
576
|
-
- write initial tests for add/scanner/state
|
|
577
|
-
|
|
578
|
-
### Milestone 2: Workflow Tree + Selection State
|
|
579
|
-
- implement grouped workflow list model
|
|
580
|
-
- build tree selection state machine
|
|
581
|
-
- render TUI workflow list and detail pane
|
|
582
|
-
- persist bindings in manifest
|
|
583
|
-
- test parent/child/partial selection behavior
|
|
584
|
-
|
|
585
|
-
### Milestone 3: Projection + Preview
|
|
586
|
-
- implement channel detection
|
|
587
|
-
- implement channel adapters
|
|
588
|
-
- implement deployment planner
|
|
589
|
-
- implement apply preview
|
|
590
|
-
- implement deployment applier
|
|
591
|
-
- test conflict and partial projection flows
|
|
592
|
-
|
|
593
|
-
### Milestone 4: Update + Doctor + Hardening
|
|
594
|
-
- implement source update diff flow
|
|
595
|
-
- implement doctor
|
|
596
|
-
- implement drift detection
|
|
597
|
-
- finalize error handling and edge cases
|
|
598
|
-
- complete full regression test matrix
|
|
599
|
-
|
|
600
|
-
## 18. Failure Modes
|
|
601
|
-
|
|
602
|
-
| Failure mode | Test required | Error handling required | User sees |
|
|
603
|
-
|---|---|---|---|
|
|
604
|
-
| Git fetch fails | Yes | Yes | Clear source fetch error |
|
|
605
|
-
| Source has no valid leafs | Yes | Yes | Empty state with context |
|
|
606
|
-
| One leaf invalid, others valid | Yes | Yes | Partial state, skipped leafs shown |
|
|
607
|
-
| Target path unavailable | Yes | Yes | Blocked target with repair guidance |
|
|
608
|
-
| Foreign file exists at target | Yes | Yes | Conflict, no silent overwrite |
|
|
609
|
-
| Broken symlink found later | Yes | Yes | Doctor surfaces repair action |
|
|
610
|
-
| Update removes a previously active leaf | Yes | Yes | Partial / changed state, explicit diff |
|
|
611
|
-
| Manifest and disk disagree | Yes | Yes | Drift surfaced via doctor |
|
|
612
|
-
|
|
613
|
-
Critical rule:
|
|
614
|
-
No codepath may fail silently if it mutates or is expected to mutate user-visible projection state.
|
|
615
|
-
|
|
616
|
-
## 19. Diagram Targets For Inline Code Comments
|
|
617
|
-
|
|
618
|
-
When implementation starts, add inline ASCII diagrams in:
|
|
619
|
-
- `DeploymentPlanner`
|
|
620
|
-
diff pipeline
|
|
621
|
-
- tree selection state machine
|
|
622
|
-
parent/child/partial transitions
|
|
623
|
-
- `doctor`
|
|
624
|
-
health and drift decision tree
|
|
625
|
-
- update flow service
|
|
626
|
-
fetch -> scan -> diff -> replan -> reapply
|
|
627
|
-
|
|
628
|
-
## 20. TODO Capture Rules
|
|
629
|
-
|
|
630
|
-
Only create TODOs for work that is genuinely deferred and still valuable after v1.
|
|
631
|
-
|
|
632
|
-
Candidates:
|
|
633
|
-
- ClawHub adapter
|
|
634
|
-
- discovery / search
|
|
635
|
-
- broader source adapter framework
|
|
636
|
-
- richer design system beyond terminal-first UI
|
|
637
|
-
|
|
638
|
-
Do not create vague TODOs like "improve UX later."
|
|
639
|
-
|
|
640
|
-
## 21. Definition of Done
|
|
641
|
-
|
|
642
|
-
v1 is done when:
|
|
643
|
-
- one Git source can be added and scanned
|
|
644
|
-
- grouped workflow view is usable
|
|
645
|
-
- leaf selection works
|
|
646
|
-
- at least two projection targets work reliably
|
|
647
|
-
- update preserves grouped mental model
|
|
648
|
-
- doctor catches drift and broken projections
|
|
649
|
-
- required test matrix passes
|
|
650
|
-
- no critical gap remains with no test, no error handling, and silent user failure
|
|
651
|
-
|
|
652
|
-
## 22. Final Recommendation
|
|
653
|
-
|
|
654
|
-
Build this as a complete small product, not a cut-down platform.
|
|
655
|
-
|
|
656
|
-
The correct v1 is:
|
|
657
|
-
- narrow in scope
|
|
658
|
-
- complete in behavior
|
|
659
|
-
- explicit in state
|
|
660
|
-
- strong in grouped workflow UX
|
|
661
|
-
- aggressively tested on edge cases
|
|
662
|
-
|
|
663
|
-
That is the lake to boil.
|