skill-flow 1.0.1 → 1.0.2
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/.gstack/qa-reports/base-branch.txt +1 -0
- package/.gstack/qa-reports/qa-report-skill-flow-cli-2026-03-22.md +159 -0
- package/README.md +39 -2
- package/README.zh.md +39 -2
- package/dist/cli.js +32 -2
- 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/skill-flow.d.ts +28 -2
- package/dist/services/skill-flow.js +353 -2
- package/dist/services/skill-flow.js.map +1 -1
- package/dist/services/source-service.d.ts +1 -1
- package/dist/services/source-service.js +11 -14
- 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.map +1 -1
- package/dist/tui/config-app.js +52 -3
- 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 +18 -0
- 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/docs/plan/PLAN_v1.0.1.md +34 -3
- package/docs/refrences/README.md +2 -0
- package/docs/refrences/agent-skill-paths.md +22 -0
- package/docs/refrences/config-state-reconciliation.md +199 -0
- package/package.json +1 -1
package/docs/plan/PLAN_v1.0.1.md
CHANGED
|
@@ -17,8 +17,9 @@ State root: `~/.skillflow/`
|
|
|
17
17
|
This release does not try to become a full ecosystem registry.
|
|
18
18
|
It stays narrow:
|
|
19
19
|
- Git sources still matter
|
|
20
|
+
- built-in Git catalogs provide a fixed discovery corpus
|
|
20
21
|
- ClawHub becomes the only new remote structured source
|
|
21
|
-
- `find`
|
|
22
|
+
- `find` merges local inventory, built-in Git catalogs, and ClawHub search
|
|
22
23
|
|
|
23
24
|
The engineering goal is not "support every source."
|
|
24
25
|
The engineering goal is:
|
|
@@ -178,7 +179,7 @@ Track A: Source expansion
|
|
|
178
179
|
|
|
179
180
|
Track B: Discovery
|
|
180
181
|
- find/search
|
|
181
|
-
- local + ClawHub result merge
|
|
182
|
+
- local + built-in Git + ClawHub result merge
|
|
182
183
|
- ranking
|
|
183
184
|
- candidate -> add command bridge
|
|
184
185
|
```
|
|
@@ -289,6 +290,7 @@ This is the smallest seam that cleanly supports:
|
|
|
289
290
|
|
|
290
291
|
`find` aggregates:
|
|
291
292
|
- local installed inventory
|
|
293
|
+
- built-in Git catalogs
|
|
292
294
|
- ClawHub search metadata
|
|
293
295
|
|
|
294
296
|
It does not:
|
|
@@ -300,7 +302,34 @@ Search fetch policy:
|
|
|
300
302
|
- `find` requests metadata only
|
|
301
303
|
- `add` downloads source content
|
|
302
304
|
|
|
303
|
-
### 7.7
|
|
305
|
+
### 7.7 Built-In Git Catalogs Are Fixed And Curated
|
|
306
|
+
|
|
307
|
+
`find` includes a fixed built-in Git catalog list.
|
|
308
|
+
|
|
309
|
+
This list merges the original default catalog and the expanded catalog set, de-duplicated by repository:
|
|
310
|
+
|
|
311
|
+
| Repository | Branch |
|
|
312
|
+
| --- | --- |
|
|
313
|
+
| `anthropics/skills` | `main` |
|
|
314
|
+
| `obra/superpowers` | `main` |
|
|
315
|
+
| `affaan-m/everything-claude-code` | `main` |
|
|
316
|
+
| `msitarzewski/agency-agents` | `main` |
|
|
317
|
+
| `nextlevelbuilder/ui-ux-pro-max-skill` | `main` |
|
|
318
|
+
| `sickn33/antigravity-awesome-skills` | `main` |
|
|
319
|
+
| `coreyhaines31/marketingskills` | `main` |
|
|
320
|
+
| `agentskills/agentskills` | `main` |
|
|
321
|
+
| `Leonxlnx/taste-skill` | `main` |
|
|
322
|
+
| `Affitor/affiliate-skills` | `main` |
|
|
323
|
+
| `luongnv89/skills` | `main` |
|
|
324
|
+
| `ComposioHQ/awesome-claude-skills` | `master` |
|
|
325
|
+
| `cexll/myclaude` | `master` |
|
|
326
|
+
| `JimLiu/baoyu-skills` | `main` |
|
|
327
|
+
| `dontbesilent2025/dbskill` | `main` |
|
|
328
|
+
| `garrytan/gstack` | `main` |
|
|
329
|
+
| `pbakaus/impeccable` | `main` |
|
|
330
|
+
| `zarazhangrui/frontend-slides` | `main` |
|
|
331
|
+
|
|
332
|
+
### 7.8 Candidate-To-Command Bridge Is A First-Class Boundary
|
|
304
333
|
|
|
305
334
|
`find` output must not hand-build `add` command strings in CLI formatting code.
|
|
306
335
|
|
|
@@ -355,6 +384,8 @@ query
|
|
|
355
384
|
|
|
|
356
385
|
+--> local inventory matcher
|
|
357
386
|
|
|
|
387
|
+
+--> built-in git catalog matcher
|
|
388
|
+
|
|
|
358
389
|
+--> clawhub search metadata
|
|
359
390
|
|
|
|
360
391
|
v
|
package/docs/refrences/README.md
CHANGED
|
@@ -5,3 +5,5 @@ future `skill-flow` target support.
|
|
|
5
5
|
|
|
6
6
|
- [agent-skill-paths.md](/Users/Vint/仓库/03%20Project/skill-flow/docs/refrences/agent-skill-paths.md)
|
|
7
7
|
Current implementation paths and broader ecosystem path references.
|
|
8
|
+
- [config-state-reconciliation.md](/Users/Vint/仓库/03%20Project/skill-manager/docs/refrences/config-state-reconciliation.md)
|
|
9
|
+
Config, manifest, lock, and disk-state reconciliation rules.
|
|
@@ -47,6 +47,28 @@ Notes:
|
|
|
47
47
|
These references are for future compatibility and target-expansion work. They
|
|
48
48
|
should not be read as "already implemented".
|
|
49
49
|
|
|
50
|
+
### Ecosystem Default Path Matrix
|
|
51
|
+
|
|
52
|
+
This matrix is broader than current `skill-flow` support. It is a planning and compatibility reference, not an implementation promise.
|
|
53
|
+
|
|
54
|
+
| Tool | Global Path | Project Path | Default |
|
|
55
|
+
| --- | --- | --- | :---: |
|
|
56
|
+
| Claude Code | `~/.claude/skills/` | `.claude/skills/` | enabled |
|
|
57
|
+
| Codex | `~/.codex/skills/` | `.codex/skills/` | enabled |
|
|
58
|
+
| OpenClaw | `~/.openclaw/skills/` | `.openclaw/skills/` | enabled |
|
|
59
|
+
| Agents (generic) | `~/.agents/skills/` | `.agents/skills/` | enabled |
|
|
60
|
+
| Cursor | `~/.cursor/rules/` | `.cursor/rules/` | enabled |
|
|
61
|
+
| Windsurf | `~/.windsurf/rules/` | `.windsurf/rules/` | enabled |
|
|
62
|
+
| Cline | `~/Documents/Cline/Rules/` | `.clinerules/` | enabled |
|
|
63
|
+
| Roo Code | `~/.roo/rules/` | `.roo/rules/` | enabled |
|
|
64
|
+
| Continue | `~/.continue/rules/` | `.continue/rules/` | enabled |
|
|
65
|
+
| GitHub Copilot | `~/.github/instructions/` | `.github/instructions/` | enabled |
|
|
66
|
+
| Aider | `~/.aider/skills/` | `.aider/skills/` | enabled |
|
|
67
|
+
| OpenCode | `~/.config/opencode/skills/` | `.opencode/skills/` | enabled |
|
|
68
|
+
| Zed | `~/.config/zed/prompt_overrides/` | `.zed/rules/` | enabled |
|
|
69
|
+
| Augment | `~/.augment/rules/` | `.augment/rules/` | enabled |
|
|
70
|
+
| Amp | `~/.amp/skills/` | `.amp/skills/` | enabled |
|
|
71
|
+
|
|
50
72
|
### 1. Claude Code
|
|
51
73
|
|
|
52
74
|
Skills:
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Config State Reconciliation
|
|
2
|
+
|
|
3
|
+
Last updated: 2026-03-22
|
|
4
|
+
|
|
5
|
+
This document explains how `skill-flow` maps config state to persisted state,
|
|
6
|
+
why state could look inconsistent before, and what the current normalization
|
|
7
|
+
rules are.
|
|
8
|
+
|
|
9
|
+
## Four State Layers
|
|
10
|
+
|
|
11
|
+
`skill-flow` currently has four relevant state layers:
|
|
12
|
+
|
|
13
|
+
1. TUI draft state
|
|
14
|
+
2. `manifest.json`
|
|
15
|
+
3. `lock.json`
|
|
16
|
+
4. Target disk state
|
|
17
|
+
|
|
18
|
+
They are related, but they do not serve the same purpose.
|
|
19
|
+
|
|
20
|
+
## Layer Responsibilities
|
|
21
|
+
|
|
22
|
+
### 1. TUI draft state
|
|
23
|
+
|
|
24
|
+
The config UI uses this shape:
|
|
25
|
+
|
|
26
|
+
- `enabledTargets: DeploymentTargetName[]`
|
|
27
|
+
- `selectedLeafIds: string[]`
|
|
28
|
+
|
|
29
|
+
This is the editing model used by `ConfigApp`.
|
|
30
|
+
|
|
31
|
+
Important constraint:
|
|
32
|
+
|
|
33
|
+
- the TUI has one shared selected skill set per workflow group
|
|
34
|
+
- it does not model different `leafIds` per target
|
|
35
|
+
|
|
36
|
+
So from the UI's perspective, a workflow group means:
|
|
37
|
+
|
|
38
|
+
- these targets are enabled
|
|
39
|
+
- these skills are selected for all enabled targets
|
|
40
|
+
|
|
41
|
+
### 2. `manifest.json`
|
|
42
|
+
|
|
43
|
+
`manifest.json` stores user intent.
|
|
44
|
+
|
|
45
|
+
Relevant structure:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"bindings": {
|
|
50
|
+
"<sourceId>": {
|
|
51
|
+
"targets": {
|
|
52
|
+
"<target>": {
|
|
53
|
+
"enabled": true,
|
|
54
|
+
"leafIds": ["<sourceId>:browse"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Even though `manifest` stores `leafIds` per target, current config behavior
|
|
63
|
+
expects all enabled targets for one source to share the same `leafIds`.
|
|
64
|
+
|
|
65
|
+
That means the persisted manifest shape is more expressive than the TUI model.
|
|
66
|
+
|
|
67
|
+
### 3. `lock.json`
|
|
68
|
+
|
|
69
|
+
`lock.json` stores actual scanned and applied state.
|
|
70
|
+
|
|
71
|
+
It contains:
|
|
72
|
+
|
|
73
|
+
- `sources`: checked out source snapshots
|
|
74
|
+
- `leafInventory`: currently discovered valid skills
|
|
75
|
+
- `deployments`: saved projections to targets
|
|
76
|
+
|
|
77
|
+
This file is not the source of user intent. It is the source of actual known
|
|
78
|
+
inventory and deployment state.
|
|
79
|
+
|
|
80
|
+
### 4. Target disk state
|
|
81
|
+
|
|
82
|
+
This is the real directory or symlink on each target root.
|
|
83
|
+
|
|
84
|
+
Planner and doctor logic compare disk state against `lock.json`.
|
|
85
|
+
|
|
86
|
+
Disk state is the final truth for whether a projection exists right now.
|
|
87
|
+
|
|
88
|
+
## Main Read/Write Flow
|
|
89
|
+
|
|
90
|
+
### Config open
|
|
91
|
+
|
|
92
|
+
When `skill-flow config` starts:
|
|
93
|
+
|
|
94
|
+
1. `getConfigData()` forces inventory reconciliation
|
|
95
|
+
2. `manifest` and `lock` are loaded
|
|
96
|
+
3. bindings are normalized into the same model the TUI uses
|
|
97
|
+
4. summaries are derived from normalized data
|
|
98
|
+
|
|
99
|
+
This makes config rendering depend on one consistent state model.
|
|
100
|
+
|
|
101
|
+
### Preview
|
|
102
|
+
|
|
103
|
+
When the user changes selection in the TUI:
|
|
104
|
+
|
|
105
|
+
1. the draft stays in memory only
|
|
106
|
+
2. `previewDraft()` loads `manifest` and `lock`
|
|
107
|
+
3. bindings are normalized first
|
|
108
|
+
4. the draft is applied to an in-memory manifest copy
|
|
109
|
+
5. a deployment plan is calculated
|
|
110
|
+
|
|
111
|
+
Preview does not write filesystem state.
|
|
112
|
+
|
|
113
|
+
### Save
|
|
114
|
+
|
|
115
|
+
When the user saves:
|
|
116
|
+
|
|
117
|
+
1. `applyDraft()` reconciles inventory for the source
|
|
118
|
+
2. `manifest` and `lock` are loaded
|
|
119
|
+
3. bindings are normalized first
|
|
120
|
+
4. the current draft is written into manifest intent
|
|
121
|
+
5. planner computes actions
|
|
122
|
+
6. applier updates target disk state and `lock.deployments`
|
|
123
|
+
7. normalized manifest and updated lock are written back
|
|
124
|
+
|
|
125
|
+
## Why State Could Look Wrong Before
|
|
126
|
+
|
|
127
|
+
The main mismatch was this:
|
|
128
|
+
|
|
129
|
+
- TUI draft model: one shared `selectedLeafIds`
|
|
130
|
+
- persisted manifest model: separate `leafIds` per target
|
|
131
|
+
|
|
132
|
+
If persisted data ever contained different `leafIds` for different enabled
|
|
133
|
+
targets, config had no exact way to represent that state.
|
|
134
|
+
|
|
135
|
+
Typical bad outcome:
|
|
136
|
+
|
|
137
|
+
1. persisted `manifest` had target A and target B enabled
|
|
138
|
+
2. target A had one skill selected
|
|
139
|
+
3. target B had another skill selected
|
|
140
|
+
4. config loaded that into one shared draft
|
|
141
|
+
5. after save or refresh, the visible state looked different from what the
|
|
142
|
+
user expected
|
|
143
|
+
|
|
144
|
+
That is not a rendering bug by itself. It is a state-model mismatch.
|
|
145
|
+
|
|
146
|
+
## Current Normalization Rule
|
|
147
|
+
|
|
148
|
+
Before config-related reads and writes, bindings are normalized per source:
|
|
149
|
+
|
|
150
|
+
1. collect all enabled targets
|
|
151
|
+
2. union all `leafIds` across those enabled targets
|
|
152
|
+
3. drop any `leafId` not present in current `lock.leafInventory`
|
|
153
|
+
4. write the same final `leafIds` back to every enabled target
|
|
154
|
+
|
|
155
|
+
So for current behavior, this:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"claude-code": { "enabled": true, "leafIds": ["group:browse"] },
|
|
160
|
+
"codex": { "enabled": true, "leafIds": ["group:review"] }
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
is normalized to:
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"claude-code": { "enabled": true, "leafIds": ["group:browse", "group:review"] },
|
|
169
|
+
"codex": { "enabled": true, "leafIds": ["group:browse", "group:review"] }
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
This matches the only state shape the current TUI can represent.
|
|
174
|
+
|
|
175
|
+
## Relationship With Inventory Reconciliation
|
|
176
|
+
|
|
177
|
+
`reconcileInventory()` may remove stale `leafIds` from bindings when those
|
|
178
|
+
skills are no longer present in `lock.leafInventory`.
|
|
179
|
+
|
|
180
|
+
That behavior is expected and necessary.
|
|
181
|
+
|
|
182
|
+
The important part is ordering:
|
|
183
|
+
|
|
184
|
+
- reconcile inventory first
|
|
185
|
+
- normalize bindings second
|
|
186
|
+
- render or save third
|
|
187
|
+
|
|
188
|
+
Without that ordering, config can show stale selections or write back an
|
|
189
|
+
incompatible state shape.
|
|
190
|
+
|
|
191
|
+
## Current Invariant
|
|
192
|
+
|
|
193
|
+
For the current config implementation, one workflow group should satisfy this
|
|
194
|
+
invariant:
|
|
195
|
+
|
|
196
|
+
- every enabled target under the same source has the same `leafIds`
|
|
197
|
+
|
|
198
|
+
If product requirements later need per-target skill selection, the TUI state
|
|
199
|
+
model must change first. Until then, normalization is the correct behavior.
|
package/package.json
CHANGED