@fenglimg/fabric-cli 2.0.0-rc.33 → 2.0.0-rc.35
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 +1 -1
- package/dist/{chunk-SRX7WZUG.js → chunk-BATF4PEJ.js} +2 -2
- package/dist/{chunk-PNRWNUFX.js → chunk-XVS4F3P6.js} +105 -4
- package/dist/{config-5CH4EJQ2.js → config-XJIPZNUP.js} +1 -1
- package/dist/{doctor-E26YO67D.js → doctor-2FCRAWDZ.js} +23 -8
- package/dist/index.js +7 -7
- package/dist/{install-YSFVNY3T.js → install-HOTE5BPA.js} +61 -4
- package/dist/{onboard-coverage-6MN3CYHT.js → onboard-coverage-MFCAEBDO.js} +4 -4
- package/dist/{plan-context-hint-CXTLNVSV.js → plan-context-hint-UQLRKGBZ.js} +2 -2
- package/dist/{uninstall-VLLJG7JT.js → uninstall-BIJ5GLEU.js} +1 -1
- package/package.json +3 -4
- package/templates/hooks/cite-policy-evict.cjs +242 -0
- package/templates/hooks/configs/claude-code.json +11 -0
- package/templates/hooks/fabric-hint.cjs +11 -1
- package/templates/hooks/knowledge-hint-broad.cjs +34 -6
- package/templates/hooks/knowledge-hint-narrow.cjs +106 -1
- package/templates/hooks/lib/summary-fallback.cjs +210 -0
- package/templates/skills/fabric-archive/SKILL.md +38 -255
- package/templates/skills/fabric-archive/ref/dry-run-scope.md +16 -0
- package/templates/skills/fabric-archive/ref/e5-cron-recap.md +1 -1
- package/templates/skills/fabric-archive/ref/i18n-policy.md +1 -1
- package/templates/skills/fabric-archive/ref/phase-1-5-onboard.md +10 -10
- package/templates/skills/fabric-import/ref/i18n-policy.md +1 -1
- package/templates/skills/fabric-review/SKILL.md +55 -413
- package/templates/skills/fabric-review/ref/askuserquestion-policy.md +66 -0
- package/templates/skills/fabric-review/ref/i18n-policy.md +1 -1
- package/templates/skills/fabric-review/ref/modify-flow.md +95 -0
- package/templates/skills/fabric-review/ref/output-contract.md +58 -0
- package/templates/skills/fabric-review/ref/per-mode-flows.md +155 -0
- package/templates/skills/fabric-review/ref/semantic-check.md +26 -0
|
@@ -34,7 +34,7 @@ Rendering rule:
|
|
|
34
34
|
|
|
35
35
|
- `fabric_language === "zh-CN"` → emit the zh-CN variant; pure monolingual, no language mixing inside a single user-facing block.
|
|
36
36
|
- `fabric_language === "en"` → emit the en variant; pure monolingual, no language mixing inside a single user-facing block.
|
|
37
|
-
- `fabric_language === "zh-CN-hybrid"` → emit Chinese narrative prose with English technical terms preserved. Protected tokens (always EN): MCP tool names (e.g. `fab_get_knowledge_sections`), CLI command names (e.g. `
|
|
37
|
+
- `fabric_language === "zh-CN-hybrid"` → emit Chinese narrative prose with English technical terms preserved. Protected tokens (always EN): MCP tool names (e.g. `fab_get_knowledge_sections`), CLI command names (e.g. `fabric install`), file paths, technical concepts (`Skill`, `SessionStart`, `hook`, `MCP`, `revision_hash`, `pending`, `proven`, `verified`, `draft`).
|
|
38
38
|
- `fabric_language === "match-existing"` or any other value → emit the en variant; pure monolingual.
|
|
39
39
|
|
|
40
40
|
Protected tokens (`fab_extract_knowledge`, `relevance_scope`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Phase 1.5 — First-run Onboard Phase (ref)
|
|
2
2
|
|
|
3
|
-
> **Loaded on demand.** SKILL.md hot path only runs this when entry_point ∈ {E2_explicit_user_invoke, E4_user_range_rollback} AND `
|
|
3
|
+
> **Loaded on demand.** SKILL.md hot path only runs this when entry_point ∈ {E2_explicit_user_invoke, E4_user_range_rollback} AND `fabric onboard-coverage --json` reports `missing.length > 0`. For E1/E3/E5 entries OR fully-covered workspaces, this entire phase is skipped — no reason to load.
|
|
4
4
|
|
|
5
5
|
## Phase 1.5 — First-run Onboard Phase
|
|
6
6
|
|
|
@@ -55,7 +55,7 @@ tone.
|
|
|
55
55
|
A first-time user whose ONLY invocations ever come via hook (never an
|
|
56
56
|
explicit `/fabric-archive`) will not see the onboard prompt; the 5
|
|
57
57
|
onboard slots remain empty. Mitigation: documentation tells users to
|
|
58
|
-
run an explicit `
|
|
58
|
+
run an explicit `fabric archive` at least once to populate the onboard
|
|
59
59
|
baseline.
|
|
60
60
|
|
|
61
61
|
##### Worked example
|
|
@@ -82,7 +82,7 @@ $ /fabric-archive
|
|
|
82
82
|
|
|
83
83
|
---
|
|
84
84
|
|
|
85
|
-
After F8a removed the auto-`
|
|
85
|
+
After F8a removed the auto-`fabric scan` baseline pipeline, a freshly installed
|
|
86
86
|
Fabric workspace ships with an EMPTY `.fabric/knowledge/` tree. Five fixed
|
|
87
87
|
**S5 onboard slots** capture the "project tone" baseline that the AI needs
|
|
88
88
|
for high-quality plan_context retrieval from day one:
|
|
@@ -98,10 +98,10 @@ gathering, so coverage state is fresh for the session.
|
|
|
98
98
|
|
|
99
99
|
#### Step 1 — Check coverage
|
|
100
100
|
|
|
101
|
-
Invoke `
|
|
101
|
+
Invoke `fabric onboard-coverage --json` and parse the JSON payload:
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
|
|
104
|
+
fabric onboard-coverage --json
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
Expected shape:
|
|
@@ -147,8 +147,8 @@ proposed entry counts toward coverage once approved via fab_review.
|
|
|
147
147
|
| User choice | Action |
|
|
148
148
|
|----------------|--------|
|
|
149
149
|
| `fill-all` | For EACH slot in `missing`, run Step 4 (Tour-and-propose). All proposals share session_id; one batch review at the end (Phase 3). |
|
|
150
|
-
| `fill-each` | Loop slot-by-slot through `missing`. Per slot: ask user `confirm | dismiss | skip` (per-slot AskUserQuestion); `confirm` → run Step 4; `dismiss` → `
|
|
151
|
-
| `dismiss-all` | For EACH slot in `missing`, invoke `Bash("
|
|
150
|
+
| `fill-each` | Loop slot-by-slot through `missing`. Per slot: ask user `confirm | dismiss | skip` (per-slot AskUserQuestion); `confirm` → run Step 4; `dismiss` → `fabric config dismiss-slot <slot>`; `skip` → leave for next archive run. |
|
|
151
|
+
| `dismiss-all` | For EACH slot in `missing`, invoke `Bash("fabric config dismiss-slot <slot>")`. Print a one-line confirmation each. Skip to Phase 0. |
|
|
152
152
|
| `skip` | No-op. Slots remain in `missing` for the next archive run. Skip to Phase 0. |
|
|
153
153
|
|
|
154
154
|
#### Step 4 — Tour-and-propose (per-slot)
|
|
@@ -174,7 +174,7 @@ After Read-ing the slot-specific sources, classify the observation:
|
|
|
174
174
|
|
|
175
175
|
Call `fab_extract_knowledge` with the inferred fields PLUS `onboard_slot:
|
|
176
176
|
<slot>`. The pending file's frontmatter will carry the slot label, and the
|
|
177
|
-
next `
|
|
177
|
+
next `fabric onboard-coverage` run will see the slot as filled (once approved
|
|
178
178
|
via fab_review).
|
|
179
179
|
|
|
180
180
|
Example:
|
|
@@ -201,9 +201,9 @@ mcp__fabric__fab_extract_knowledge({
|
|
|
201
201
|
|
|
202
202
|
- MUST run BEFORE Phase 2 evidence gathering — onboard is a separate flow,
|
|
203
203
|
not interleaved with session-archive candidates.
|
|
204
|
-
- MUST call `
|
|
204
|
+
- MUST call `fabric onboard-coverage --json` before deciding; never assume
|
|
205
205
|
coverage state.
|
|
206
|
-
- NEVER fill a slot that is in `opted_out` — `
|
|
206
|
+
- NEVER fill a slot that is in `opted_out` — `fabric onboard-coverage` already
|
|
207
207
|
excludes those from `missing`, but the Skill MUST NOT re-propose them
|
|
208
208
|
even if the user asks "fill all of them" — the dismiss is intentional.
|
|
209
209
|
- NEVER prompt the user when `missing.length === 0` — silent skip.
|
|
@@ -29,7 +29,7 @@ Rendering rule:
|
|
|
29
29
|
|
|
30
30
|
- `fabric_language === "zh-CN"` → emit the zh-CN variant; pure monolingual, no language mixing inside a single user-facing block.
|
|
31
31
|
- `fabric_language === "en"` → emit the en variant; pure monolingual, no language mixing inside a single user-facing block.
|
|
32
|
-
- `fabric_language === "zh-CN-hybrid"` → emit Chinese narrative prose with English technical terms preserved. Protected tokens (always EN): MCP tool names (e.g. `fab_get_knowledge_sections`), CLI command names (e.g. `
|
|
32
|
+
- `fabric_language === "zh-CN-hybrid"` → emit Chinese narrative prose with English technical terms preserved. Protected tokens (always EN): MCP tool names (e.g. `fab_get_knowledge_sections`), CLI command names (e.g. `fabric install`), file paths, technical concepts (`Skill`, `SessionStart`, `hook`, `MCP`, `revision_hash`, `pending`, `proven`, `verified`, `draft`).
|
|
33
33
|
- `fabric_language === "match-existing"` or any other value → emit the en variant; pure monolingual.
|
|
34
34
|
|
|
35
35
|
Protected tokens (`fab_extract_knowledge`, `fab_review`, `relevance_scope`,
|