@fenglimg/fabric-cli 2.0.0-rc.11 → 2.0.0-rc.13
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/dist/{chunk-5MQ52F42.js → chunk-FDRLV5PL.js} +13 -8
- package/dist/{chunk-HQLEHH4O.js → chunk-OHWQNSLH.js} +1 -1
- package/dist/{chunk-WPTA74BY.js → chunk-Q72D24BG.js} +6 -4
- package/dist/{chunk-AW3G7ZH5.js → chunk-X7QPY5KH.js} +68 -41
- package/dist/{hooks-NX32PPEN.js → hooks-HIWYI3VG.js} +2 -2
- package/dist/index.js +6 -6
- package/dist/{init-C56PWHID.js → install-SLS5W27W.js} +115 -109
- package/dist/{scan-66EKMNAY.js → scan-VHKZPT2W.js} +1 -1
- package/dist/{uninstall-DBAR2JBS.js → uninstall-JHUSFENL.js} +27 -18
- package/package.json +3 -3
- package/templates/hooks/configs/README.md +1 -1
- package/templates/hooks/knowledge-hint-broad.cjs +28 -107
- package/templates/skills/fabric-archive/SKILL.md +15 -15
- package/templates/skills/fabric-import/SKILL.md +26 -26
- package/templates/skills/fabric-review/SKILL.md +19 -19
|
@@ -19,7 +19,7 @@ If none of the above hold, stop the skill immediately and tell the user (UX i18n
|
|
|
19
19
|
- zh-CN: `没有触发 review 信号;如需手动 review 请显式调用 fabric-review`
|
|
20
20
|
- en: `No review signal detected; to manually review, explicitly invoke fabric-review`
|
|
21
21
|
|
|
22
|
-
(Render per `
|
|
22
|
+
(Render per `fabric_language` resolved in Config Load below.)
|
|
23
23
|
|
|
24
24
|
This skill is `Infer-not-Ask` for mode and `Ask-when-genuine` for per-item actions:
|
|
25
25
|
|
|
@@ -51,9 +51,10 @@ If `.fabric/fabric-config.json` is missing or unreadable, use defaults silently.
|
|
|
51
51
|
|
|
52
52
|
### UX i18n Policy (5-class bilingualization)
|
|
53
53
|
|
|
54
|
-
The skill consults `
|
|
54
|
+
The skill consults `fabric_language` from `.fabric/fabric-config.json`
|
|
55
55
|
(固化于 init 时,via `scan.ts:detectExistingLanguage`; default `"en"` when no
|
|
56
|
-
CJK signal is detected in README + docs
|
|
56
|
+
CJK signal is detected in README + docs/; may resolve to `"match-existing"`,
|
|
57
|
+
`"zh-CN"`, `"en"`, or `"zh-CN-hybrid"`). All user-facing text in the
|
|
57
58
|
following 5 categories MUST be rendered in the resolved language:
|
|
58
59
|
|
|
59
60
|
1. **Roll-up templates** — the `# Review Summary — mode={...}` final block,
|
|
@@ -77,11 +78,10 @@ following 5 categories MUST be rendered in the resolved language:
|
|
|
77
78
|
|
|
78
79
|
Rendering rule:
|
|
79
80
|
|
|
80
|
-
- `
|
|
81
|
-
- `
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
or fully en.
|
|
81
|
+
- `fabric_language === "zh-CN"` → emit the zh-CN variant; pure monolingual, no language mixing inside a single user-facing block.
|
|
82
|
+
- `fabric_language === "en"` → emit the en variant; pure monolingual, no language mixing inside a single user-facing block.
|
|
83
|
+
- `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. `fab install`), file paths, technical concepts (`Skill`, `SessionStart`, `hook`, `MCP`, `revision_hash`, `pending`, `proven`, `verified`, `draft`).
|
|
84
|
+
- `fabric_language === "match-existing"` or any other value → emit the en variant; pure monolingual.
|
|
85
85
|
|
|
86
86
|
Protected tokens (`fab_review`, `relevance_scope`, `relevance_paths`,
|
|
87
87
|
`narrow`, `broad`, `source_sessions`, `proposed_reason`, `session_context`,
|
|
@@ -93,9 +93,9 @@ prose ONLY.
|
|
|
93
93
|
### AskUserQuestion i18n Policy (value vs label)
|
|
94
94
|
|
|
95
95
|
When this skill issues an `AskUserQuestion`, the `header` and `question`
|
|
96
|
-
strings are user-facing prose → translated per `
|
|
96
|
+
strings are user-facing prose → translated per `fabric_language`. The
|
|
97
97
|
`options[]` array entries are **routing keys** consumed by the skill
|
|
98
|
-
state machine — they MUST remain English regardless of `
|
|
98
|
+
state machine — they MUST remain English regardless of `fabric_language`.
|
|
99
99
|
|
|
100
100
|
Canonical options arrays used by this skill (every value below stays
|
|
101
101
|
English in BOTH language variants):
|
|
@@ -109,14 +109,14 @@ English in BOTH language variants):
|
|
|
109
109
|
Worked example — per-item action (the most common AskUserQuestion in this skill):
|
|
110
110
|
|
|
111
111
|
```ts
|
|
112
|
-
// EN (
|
|
112
|
+
// EN (fabric_language === "en")
|
|
113
113
|
AskUserQuestion({
|
|
114
114
|
header: "Review pending entry",
|
|
115
115
|
question: "What action for '{title}'? ({pending_path})",
|
|
116
116
|
options: ["approve", "reject", "modify", "defer", "skip"]
|
|
117
117
|
})
|
|
118
118
|
|
|
119
|
-
// zh-CN (
|
|
119
|
+
// zh-CN (fabric_language === "zh-CN")
|
|
120
120
|
AskUserQuestion({
|
|
121
121
|
header: "审核 pending 条目",
|
|
122
122
|
question: "对 '{title}' 执行什么操作?({pending_path})",
|
|
@@ -210,7 +210,7 @@ Each mode produces user-facing output, then routes per-item or per-batch decisio
|
|
|
210
210
|
templates; protected tokens (`pending_path`, `layer`, `team`, `decisions`,
|
|
211
211
|
`proposed_reason`, `Tags`, etc.) appear verbatim in BOTH variants:
|
|
212
212
|
|
|
213
|
-
en variant (`
|
|
213
|
+
en variant (`fabric_language === "en"`):
|
|
214
214
|
|
|
215
215
|
```md
|
|
216
216
|
## [type=decisions] [layer=team] pending_path=knowledge/pending/decisions/single-cjs-hook.md
|
|
@@ -222,7 +222,7 @@ Each mode produces user-facing output, then routes per-item or per-batch decisio
|
|
|
222
222
|
⚠ Possible duplicate of KT-D-0007 (LLM subjective dup/subsumption judgement; thresholds intentionally not quantified)
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
-
zh-CN variant (`
|
|
225
|
+
zh-CN variant (`fabric_language === "zh-CN"`):
|
|
226
226
|
|
|
227
227
|
```md
|
|
228
228
|
## [type=decisions] [layer=team] pending_path=knowledge/pending/decisions/single-cjs-hook.md
|
|
@@ -286,7 +286,7 @@ Each mode produces user-facing output, then routes per-item or per-batch decisio
|
|
|
286
286
|
1. Call `fab_review action="list"` with `filters.maturity="draft"` (or no filter for full corpus inspection).
|
|
287
287
|
2. Tail `.fabric/events.jsonl` for layer_changed / demoted / rejected counts in the trailing 30 days.
|
|
288
288
|
3. Compute stale candidates: pending entries with mtime older than `review_stale_pending_days` (config-resolved, default 14) OR maturity=draft entries with no recent evidence-append events.
|
|
289
|
-
4. Render a corpus dashboard. UX i18n Policy class 1 — roll-up templates; render per `
|
|
289
|
+
4. Render a corpus dashboard. UX i18n Policy class 1 — roll-up templates; render per `fabric_language`:
|
|
290
290
|
|
|
291
291
|
en variant:
|
|
292
292
|
|
|
@@ -471,7 +471,7 @@ mcp__fabric__fab_review({
|
|
|
471
471
|
|
|
472
472
|
### Per-Item Question Phrasing Template
|
|
473
473
|
|
|
474
|
-
UX i18n Policy class 5 — `header` + `question` translated per `
|
|
474
|
+
UX i18n Policy class 5 — `header` + `question` translated per `fabric_language`; `options[]` arrays remain English routing keys in BOTH variants. Choose the variant matching the resolved language; the structure (field names, options) is identical.
|
|
475
475
|
|
|
476
476
|
en variant:
|
|
477
477
|
|
|
@@ -556,9 +556,9 @@ Pending entry presented for review
|
|
|
556
556
|
|
|
557
557
|
## Output Contract
|
|
558
558
|
|
|
559
|
-
After each invocation, the skill MUST produce a brief roll-up to the user. UX i18n Policy class 1 — roll-up templates; render per `
|
|
559
|
+
After each invocation, the skill MUST produce a brief roll-up to the user. UX i18n Policy class 1 — roll-up templates; render per `fabric_language`. Protected tokens (event-type strings such as `knowledge_promoted` / `knowledge_layer_changed` / `knowledge_rejected` / `knowledge_deferred`, plus `.fabric/events.jsonl`) appear verbatim in BOTH variants:
|
|
560
560
|
|
|
561
|
-
en variant (`
|
|
561
|
+
en variant (`fabric_language === "en"`):
|
|
562
562
|
|
|
563
563
|
```md
|
|
564
564
|
# Review Summary — mode={pending|topic|health|revisit}
|
|
@@ -577,7 +577,7 @@ en variant (`knowledge_language === "en"`):
|
|
|
577
577
|
- knowledge_deferred ×D
|
|
578
578
|
```
|
|
579
579
|
|
|
580
|
-
zh-CN variant (`
|
|
580
|
+
zh-CN variant (`fabric_language === "zh-CN"`):
|
|
581
581
|
|
|
582
582
|
```md
|
|
583
583
|
# Review 汇总 — mode={pending|topic|health|revisit}
|