@fenglimg/fabric-shared 2.2.0-rc.9 → 2.3.0-rc.1
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/dist/{chunk-5AKCRBKJ.js → chunk-D7HUHWBI.js} +122 -78
- package/dist/{chunk-AQMDXC6J.js → chunk-IFMFEX3V.js} +68 -50
- package/dist/chunk-SQKWD7X6.js +152 -0
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/{index-D_gT1CEA.d.ts → index-BqsM1bzx.d.ts} +3 -39
- package/dist/index.d.ts +12 -10
- package/dist/index.js +88 -105
- package/dist/schemas/api-contracts.d.ts +358 -358
- package/dist/schemas/api-contracts.js +11 -1
- package/dist/templates/bootstrap-canonical.d.ts +2 -2
- package/dist/templates/bootstrap-canonical.js +1 -1
- package/dist/theme.d.ts +33 -0
- package/dist/theme.js +57 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +17 -3
- package/dist/chunk-BDJQIOQO.js +0 -206
|
@@ -24,19 +24,15 @@ var enMessages = {
|
|
|
24
24
|
"cli.shared.invalid-host-empty": "Invalid host: <empty>",
|
|
25
25
|
"cli.shared.invalid-port": "Invalid port: {value}",
|
|
26
26
|
"cli.shared.error": "Error",
|
|
27
|
-
// EPIC-011: Grouped help display i18n keys
|
|
28
|
-
"cli.help.group.
|
|
29
|
-
"cli.help.group.
|
|
30
|
-
"cli.help.group.
|
|
31
|
-
"cli.help.group.
|
|
32
|
-
"cli.help.group.
|
|
33
|
-
"cli.help.group.
|
|
34
|
-
"cli.help.group.
|
|
35
|
-
"cli.help.group.
|
|
36
|
-
"cli.help.group.advanced.status": "Show project status",
|
|
37
|
-
"cli.help.group.advanced.status.deprecated": "deprecated \u2192 info",
|
|
38
|
-
"cli.help.group.advanced.scope-explain": "Explain scope",
|
|
39
|
-
"cli.help.group.advanced.scope-explain.deprecated": "deprecated \u2192 info scope",
|
|
27
|
+
// EPIC-011 / W3-F: Grouped help display i18n keys (Knowledge/Project/Maintain).
|
|
28
|
+
"cli.help.group.knowledge.store": "Manage knowledge stores (see: fabric store --help)",
|
|
29
|
+
"cli.help.group.knowledge.sync": "Sync team knowledge with remote stores",
|
|
30
|
+
"cli.help.group.project.install": "Initialize Fabric in this repository",
|
|
31
|
+
"cli.help.group.project.config": "Configure Fabric settings",
|
|
32
|
+
"cli.help.group.project.info": "Show project status",
|
|
33
|
+
"cli.help.group.project.inspect": "Show what SessionStart injects this session",
|
|
34
|
+
"cli.help.group.maintain.doctor": "Check Fabric health and repair issues",
|
|
35
|
+
"cli.help.group.maintain.audit": "Knowledge & telemetry audit (cite/conflicts/history/metrics)",
|
|
40
36
|
// v2.1 hidden-command i18n keys cleanup: approve/bootstrap/hooks/human-lint/
|
|
41
37
|
// ledger-append/pre-commit/scan/sync-meta/update commands removed from CLI
|
|
42
38
|
// surface in v2.0.0-rc.18. Keys intentionally retained for backward compat
|
|
@@ -316,6 +312,11 @@ var enMessages = {
|
|
|
316
312
|
"doctor.check.skill_ref_mirror.ok": "All `.claude/skills/<slug>/ref/` and `.codex/skills/<slug>/ref/` files are byte-identical.",
|
|
317
313
|
"doctor.check.skill_ref_mirror.message": "{count} skill ref file(s) differ between `.claude/skills/` and `.codex/skills/` (paths: {list}). One client was hand-edited or partially installed.",
|
|
318
314
|
"doctor.check.skill_ref_mirror.remediation": "Run `fabric install` to rewrite both client subtrees from the canonical templates and restore parity.",
|
|
315
|
+
// ux-w2-2: retired-reference (stale-pointer) lint.
|
|
316
|
+
"doctor.check.retired_reference.name": "Retired reference",
|
|
317
|
+
"doctor.check.retired_reference.ok": "No retired tool/field names linger in the bootstrap, SKILL.md, or installed hooks.",
|
|
318
|
+
"doctor.check.retired_reference.message": "{count} stale pointer(s) to retired tool/field names in agent-facing text: {sample}",
|
|
319
|
+
"doctor.check.retired_reference.remediation": "Update the flagged text to the replacement token (or remove it), then re-run `fabric install` to resync the dogfood mirrors.",
|
|
319
320
|
// v2.0.0-rc.33 W3-6 (P1-13): SKILL.md token budget lint. warn > 5K / error > 10K tokens (chars/3 estimate). Anthropic recommends SKILL.md hot path stay ~3K; over 5K hurts progressive disclosure; over 10K is blocking (wasted model context + load latency).
|
|
320
321
|
"doctor.check.skill_token_budget.name": "Skill token budget",
|
|
321
322
|
"doctor.check.skill_token_budget.ok": "All .claude/skills/<slug>/SKILL.md files are within token budget (warn 5K / error 10K).",
|
|
@@ -343,7 +344,7 @@ var enMessages = {
|
|
|
343
344
|
// rc.36 TASK-05 (P0-8): empty-tags ratio warn.
|
|
344
345
|
"doctor.check.knowledge_tags_empty.name": "Knowledge tags coverage",
|
|
345
346
|
"doctor.check.knowledge_tags_empty.ok": "empty-tag ratio is healthy (\u2264 50%, or workspace too small to compute).",
|
|
346
|
-
"doctor.check.knowledge_tags_empty.message": "{emptyCount}/{totalCount} ({pct}%) canonical knowledge entries have empty `tags:` \u2014 topical clustering and cross-entry retrieval degrade. The fabric-archive
|
|
347
|
+
"doctor.check.knowledge_tags_empty.message": "{emptyCount}/{totalCount} ({pct}%) canonical knowledge entries have empty `tags:` \u2014 topical clustering and cross-entry retrieval degrade. The fabric-archive skill should produce 2-4 tags per entry.",
|
|
347
348
|
"doctor.check.knowledge_tags_empty.remediation": "On the next archive/import run, populate `tags:` in the frontmatter with 2-4 kebab-case keywords. To backfill existing entries in bulk, use `/fabric-review` with the modify flow.",
|
|
348
349
|
// rc.36 TASK-09 (P1-NEW1): drift_detected events unconsumed by demote.
|
|
349
350
|
"doctor.check.drift_unconsumed.name": "Knowledge drift unconsumed",
|
|
@@ -395,7 +396,7 @@ var enMessages = {
|
|
|
395
396
|
"doctor.check.underseeded.ok": "Knowledge corpus has {count} canonical entries (>= {threshold}).",
|
|
396
397
|
"doctor.check.underseeded.message.singular": "Knowledge corpus has only {count} canonical entry (< {threshold} threshold). The plan_context retrieval surface is below its useful floor.",
|
|
397
398
|
"doctor.check.underseeded.message.plural": "Knowledge corpus has only {count} canonical entries (< {threshold} threshold). The plan_context retrieval surface is below its useful floor.",
|
|
398
|
-
"doctor.check.underseeded.remediation": "Run the fabric-
|
|
399
|
+
"doctor.check.underseeded.remediation": "Run the fabric-archive skill's source mode (`/fabric-archive`) to backfill knowledge from git history and existing docs.",
|
|
399
400
|
"doctor.check.session_hints_stale.name": "Knowledge session-hints stale",
|
|
400
401
|
"doctor.check.session_hints_stale.ok": "No session-hints cache files older than {days} days under .fabric/.cache/.",
|
|
401
402
|
"doctor.check.session_hints_stale.message.singular": "{count} session-hints cache file under .fabric/.cache/ is older than {days} days. First: {detail}.",
|
|
@@ -438,7 +439,7 @@ var enMessages = {
|
|
|
438
439
|
// rc.31 BUG-G2/G5: promote-ledger invariant check.
|
|
439
440
|
"doctor.check.promote_ledger_invariant.name": "Promote ledger invariant",
|
|
440
441
|
"doctor.check.promote_ledger_invariant.ok": "knowledge_proposed={proposed} >= knowledge_promote_started={started} >= knowledge_promoted={promoted}; ledger invariant holds.",
|
|
441
|
-
"doctor.check.promote_ledger_invariant.message.proposed-lt-started": "knowledge_proposed={proposed} is less than knowledge_promote_started={started} (ledger invariant violated; some pending entries were approved without going through
|
|
442
|
+
"doctor.check.promote_ledger_invariant.message.proposed-lt-started": "knowledge_proposed={proposed} is less than knowledge_promote_started={started} (ledger invariant violated; some pending entries were approved without going through fab_propose, so no propose event was emitted for them).",
|
|
442
443
|
"doctor.check.promote_ledger_invariant.message.started-lt-promoted": "knowledge_promote_started={started} is less than knowledge_promoted={promoted} (ledger invariant violated; unpaired promoted events exist, possibly from doctor filesystem-edit fallback or external writers).",
|
|
443
444
|
"doctor.check.promote_ledger_invariant.remediation": "Starting in rc.31, review.approve synthesizes a knowledge_proposed event to keep the invariant; re-run fabric doctor after the next approve to settle. Historical imbalance is observability-only and does not affect KB function.",
|
|
444
445
|
// rc.35 TASK-04 (P0-9.b): global_cli_outdated.
|
|
@@ -458,7 +459,7 @@ var enMessages = {
|
|
|
458
459
|
"doctor.check.store_scope_lint.name": "Store scope lint",
|
|
459
460
|
"doctor.check.store_scope_lint.ok": "All read-set store entries carry valid scope metadata (semantic_scope + visibility_store, no personal leak, no dangling project).",
|
|
460
461
|
"doctor.check.store_scope_lint.message": "{total} store scope issue(s): {breakdown}. e.g. {sample}.",
|
|
461
|
-
"doctor.check.store_scope_lint.remediation": "Run `fabric store backfill
|
|
462
|
+
"doctor.check.store_scope_lint.remediation": "Run `fabric store migrate backfill` to add missing semantic_scope/visibility_store; `fabric store migrate scope` to fix a dangling project: coordinate; move any personal-scope entry out of a shared store (personal knowledge lives only in your personal store, R5#3).",
|
|
462
463
|
// v2.2 Goal B (G-INTEGRITY): store stable_id collision + layer mismatch lints.
|
|
463
464
|
"doctor.check.stable_id_collision.name": "Stable ID collision",
|
|
464
465
|
"doctor.check.stable_id_collision.message.singular": 'stable_id "{stableId}" is declared in {fileCount} files: {files}. Edit one of the knowledge files to use a unique stable_id.',
|
|
@@ -493,7 +494,7 @@ var enMessages = {
|
|
|
493
494
|
"doctor.check.broad_index_drift.ok": "No store's broad-scope entry count reaches the drift threshold ({threshold} of backstop {backstop}).",
|
|
494
495
|
"doctor.check.broad_index_drift.message.singular": "{count} store's broad-scope index has reached {threshold} (80% of backstop {backstop}) \u2014 the SessionStart banner is close to truncating broad entries. First: {detail}.",
|
|
495
496
|
"doctor.check.broad_index_drift.message.plural": "{count} stores' broad-scope indexes have reached {threshold} (80% of backstop {backstop}) \u2014 the SessionStart banner is close to truncating broad entries. First: {detail}.",
|
|
496
|
-
"doctor.check.broad_index_drift.remediation": "Run the `fabric-
|
|
497
|
+
"doctor.check.broad_index_drift.remediation": "Run the `fabric-review` skill's retire sub-flow to prune or demote stale broad-scope entries in the flagged store, or raise `broad_index_backstop` in .fabric/fabric-config.json if the corpus is legitimately large.",
|
|
497
498
|
// v2.2 Goal B (G-AGE): knowledge decay lints (orphan_demote + stale_archive).
|
|
498
499
|
"doctor.check.orphan_demote.name": "Knowledge orphan demote",
|
|
499
500
|
"doctor.check.orphan_demote.ok": "No canonical knowledge entries exceed their maturity-keyed inactivity threshold.",
|
|
@@ -505,6 +506,18 @@ var enMessages = {
|
|
|
505
506
|
"doctor.check.stale_archive.message.singular": "{count} draft knowledge entry is stale beyond the demote+{additionalDays}d additional quiet window. First: {detail}.",
|
|
506
507
|
"doctor.check.stale_archive.message.plural": "{count} draft knowledge entries are stale beyond the demote+{additionalDays}d additional quiet window. First: {detail}.",
|
|
507
508
|
"doctor.check.stale_archive.remediation": "Archive the stale draft via `/fabric-review reject <id>`, or revive it if still relevant. (Moving store-backed files is the store-write flow's job \u2014 this read-side lint only surfaces the staleness.)",
|
|
509
|
+
// v2.2 C1: knowledge promotion lint (promotion_candidate, info kind).
|
|
510
|
+
"doctor.check.promotion_candidate.name": "Knowledge promotion candidate",
|
|
511
|
+
"doctor.check.promotion_candidate.ok": "No verified knowledge entries reach the related in-degree threshold for proven promotion.",
|
|
512
|
+
"doctor.check.promotion_candidate.message.singular": "{count} verified knowledge entry has related in-degree \u2265{threshold} (structurally central) and is worth reviewing for promotion to proven. First: {detail}.",
|
|
513
|
+
"doctor.check.promotion_candidate.message.plural": "{count} verified knowledge entries have related in-degree \u2265{threshold} (structurally central) and are worth reviewing for promotion to proven. First: {detail}.",
|
|
514
|
+
"doctor.check.promotion_candidate.remediation": "Review these entries via `/fabric-review` and (after confirming 0 dismissals, cold-eval self-sufficiency, and foundational value) `modify <id>` to proven. (The promotion judgment is the store-write review's job \u2014 this read-side lint only surfaces the structurally-central candidates.)",
|
|
515
|
+
// v2.2 C1: broad review-recheck lint (broad_review_recheck, info kind).
|
|
516
|
+
"doctor.check.broad_review_recheck.name": "Knowledge broad review recheck",
|
|
517
|
+
"doctor.check.broad_review_recheck.ok": "No broad-scope knowledge entries are overdue for a review re-confirmation.",
|
|
518
|
+
"doctor.check.broad_review_recheck.message.singular": "{count} broad-scope knowledge entry has gone {thresholdDays}d+ without a fab-review re-confirmation and is worth a recheck (broad is exempt from usage-age decay, so this is its review clock). First: {detail}.",
|
|
519
|
+
"doctor.check.broad_review_recheck.message.plural": "{count} broad-scope knowledge entries have gone {thresholdDays}d+ without a fab-review re-confirmation and are worth a recheck (broad is exempt from usage-age decay, so this is its review clock). First: {detail}.",
|
|
520
|
+
"doctor.check.broad_review_recheck.remediation": "Re-confirm each entry via `/fabric-review` (approve/modify stamps a fresh review timestamp), or demote/reject it if it no longer holds. This is a non-blocking nudge, never an auto-demote \u2014 broad knowledge stays surfaced until a reviewer acts.",
|
|
508
521
|
// project-scope binding backfill lint (unbound_project).
|
|
509
522
|
"doctor.check.unbound_project.name": "Project-scope binding",
|
|
510
523
|
"doctor.check.unbound_project.ok": "The bound write store carries a project coordinate (project_id + active_project), so project-scope recall/writes route correctly.",
|
|
@@ -515,11 +528,6 @@ var enMessages = {
|
|
|
515
528
|
"doctor.check.skill_md_yaml_invalid.message.singular": "{count} SKILL.md frontmatter value contains an unquoted ': ' that strict YAML parsers reject (Claude Code tolerates it; Codex CLI drops the skill at load). First: {detail}.",
|
|
516
529
|
"doctor.check.skill_md_yaml_invalid.message.plural": "{count} SKILL.md frontmatter values contain an unquoted ': ' that strict YAML parsers reject (Claude Code tolerates it; Codex CLI drops the skill at load). First: {detail}.",
|
|
517
530
|
"doctor.check.skill_md_yaml_invalid.remediation": 'Quote the value with double quotes (`description: "\u2026"`) or rewrite the inner `key: value` token to `key=value`.',
|
|
518
|
-
"doctor.check.router_chain_ref.name": "Router chain refs",
|
|
519
|
-
"doctor.check.router_chain_ref.ok": "Every fabric-* reference in the fabric/ router S_CHAIN points at an installed leaf skill.",
|
|
520
|
-
"doctor.check.router_chain_ref.message.singular": "{count} S_CHAIN reference in the fabric/ router points at a skill not in the install set: {list}. The chain step will dead-end at runtime.",
|
|
521
|
-
"doctor.check.router_chain_ref.message.plural": "{count} S_CHAIN references in the fabric/ router point at skills not in the install set: {list}. Those chain steps will dead-end at runtime.",
|
|
522
|
-
"doctor.check.router_chain_ref.remediation": "Edit the S_CHAIN table in templates/skills/fabric/SKILL.md to reference a real leaf skill (one of the installed fabric-* skills), or remove the stale chain row.",
|
|
523
531
|
"doctor.check.onboard_coverage.name": "Onboard coverage",
|
|
524
532
|
"doctor.check.onboard_coverage.ok.complete": "Onboard coverage: {filledCount}/{total} \u2713 (opted-out: {optedOutCount}).",
|
|
525
533
|
"doctor.check.onboard_coverage.message.incomplete": "Onboard slots not yet covered: [{missingSlots}]. {filledCount}/{total} filled; {optedOutCount} opted-out.",
|
|
@@ -634,7 +642,7 @@ var enMessages = {
|
|
|
634
642
|
// spawned by the client; already-running Claude Code / Codex
|
|
635
643
|
// sessions won't pick up the new mcp config until they restart.
|
|
636
644
|
"cli.install.restart-banner": "Restart hint: any already-running Claude Code / Codex CLI session must restart to pick up the new MCP server config; new sessions will autoload the Fabric tools.",
|
|
637
|
-
"cli.install.next-steps":
|
|
645
|
+
"cli.install.next-steps": "Next steps \u2014 get your first value:\n 1. Restart your AI client (Claude Code / Codex). It now auto-surfaces this project's knowledge to the assistant.\n 2. Seed knowledge: just work normally \u2014 when you make a decision or hit a pitfall, the fabric-archive skill proposes an entry. Or run the fabric-archive skill's source mode to backfill from git history.\n 3. Verify it works: ask your AI \"what does Fabric know about this repo?\", or run `fabric doctor` to check health.",
|
|
638
646
|
"cli.install.store-bind-nudge": "\u{1F4A1} Mounted store(s) not bound to this project: {aliases}. Run `fabric store bind {first}` to read their knowledge here, then `fabric store switch-write {first}` to write team knowledge into it.",
|
|
639
647
|
// C1/C5: semantic-search interactive copy routed through t().
|
|
640
648
|
"cli.install.semantic.prompt": "Enable vector semantic search? (the first recall downloads an embedding model)",
|
|
@@ -982,6 +990,7 @@ var enMessages = {
|
|
|
982
990
|
"cli.store.detached": "detached '{alias}' \u2014 on-disk store tree left intact (detach \u2260 delete)",
|
|
983
991
|
"cli.store.bound": "bound required store '{id}' ({count} required)",
|
|
984
992
|
"cli.store.switch-write": "active write store set to '{alias}' for this project",
|
|
993
|
+
"cli.store.routed": "write route: scope '{scope}' \u2192 store '{alias}'",
|
|
985
994
|
"cli.sync.deferred": "{count} store(s) offline \u2014 push deferred; re-run `fabric sync` when online",
|
|
986
995
|
"cli.sync.paused": "sync paused on a conflict \u2014 resolve it, then run `fabric sync --continue` (or `--abort`)",
|
|
987
996
|
"cli.metrics.invalid-since": '--since: invalid duration "{raw}" (expected e.g. 24h, 7d, 30m)',
|
|
@@ -1029,19 +1038,15 @@ var zhCNMessages = {
|
|
|
1029
1038
|
"cli.shared.invalid-host-empty": "\u65E0\u6548 host\uFF1A<empty>",
|
|
1030
1039
|
"cli.shared.invalid-port": "\u65E0\u6548\u7AEF\u53E3\uFF1A{value}",
|
|
1031
1040
|
"cli.shared.error": "\u9519\u8BEF",
|
|
1032
|
-
// EPIC-011: 分组帮助显示 i18n 键
|
|
1033
|
-
"cli.help.group.
|
|
1034
|
-
"cli.help.group.
|
|
1035
|
-
"cli.help.group.
|
|
1036
|
-
"cli.help.group.
|
|
1037
|
-
"cli.help.group.
|
|
1038
|
-
"cli.help.group.
|
|
1039
|
-
"cli.help.group.
|
|
1040
|
-
"cli.help.group.
|
|
1041
|
-
"cli.help.group.advanced.status": "\u663E\u793A\u9879\u76EE\u72B6\u6001",
|
|
1042
|
-
"cli.help.group.advanced.status.deprecated": "\u5DF2\u5F03\u7528 \u2192 info",
|
|
1043
|
-
"cli.help.group.advanced.scope-explain": "\u89E3\u91CA scope",
|
|
1044
|
-
"cli.help.group.advanced.scope-explain.deprecated": "\u5DF2\u5F03\u7528 \u2192 info scope",
|
|
1041
|
+
// EPIC-011 / W3-F: 分组帮助显示 i18n 键 (Knowledge/Project/Maintain)
|
|
1042
|
+
"cli.help.group.knowledge.store": "\u7BA1\u7406\u77E5\u8BC6 store (\u8BE6\u89C1: fabric store --help)",
|
|
1043
|
+
"cli.help.group.knowledge.sync": "\u4E0E\u8FDC\u7A0B store \u540C\u6B65\u56E2\u961F\u77E5\u8BC6",
|
|
1044
|
+
"cli.help.group.project.install": "\u5728\u5F53\u524D\u4ED3\u5E93\u521D\u59CB\u5316 Fabric",
|
|
1045
|
+
"cli.help.group.project.config": "\u914D\u7F6E Fabric \u8BBE\u7F6E",
|
|
1046
|
+
"cli.help.group.project.info": "\u663E\u793A\u9879\u76EE\u72B6\u6001",
|
|
1047
|
+
"cli.help.group.project.inspect": "\u663E\u793A\u672C\u4F1A\u8BDD SessionStart \u6CE8\u5165\u4E86\u4EC0\u4E48",
|
|
1048
|
+
"cli.help.group.maintain.doctor": "\u68C0\u67E5 Fabric \u5065\u5EB7\u72B6\u6001\u5E76\u4FEE\u590D\u95EE\u9898",
|
|
1049
|
+
"cli.help.group.maintain.audit": "\u77E5\u8BC6\u4E0E\u9065\u6D4B\u5BA1\u8BA1 (cite/conflicts/history/metrics)",
|
|
1045
1050
|
"cli.config.description": "\u6253\u5F00 Fabric \u4EA4\u4E92\u5F0F\u914D\u7F6E\u9762\u677F\uFF08\u8BED\u8A00\u3001\u77E5\u8BC6\u5C42\u3001\u5BA1\u8BA1\u6A21\u5F0F\u3001\u63D0\u793A\u7A97\u53E3\u3001MCP \u5BA2\u6237\u7AEF\u914D\u7F6E\u7B49\uFF09\u3002\n\n\u793A\u4F8B\uFF1A\n fabric config \u6253\u5F00\u4EA4\u4E92\u5F0F\u9762\u677F\n fabric config --target /path \u7F16\u8F91\u6307\u5B9A\u9879\u76EE\u7684\u914D\u7F6E",
|
|
1046
1051
|
"cli.config.args.target.description": "\u76EE\u6807\u9879\u76EE\u76EE\u5F55\uFF08\u9ED8\u8BA4\u5F53\u524D\u5DE5\u4F5C\u76EE\u5F55\uFF09\u3002",
|
|
1047
1052
|
"cli.config.clients.claude": "Claude Code CLI",
|
|
@@ -1309,6 +1314,11 @@ var zhCNMessages = {
|
|
|
1309
1314
|
"doctor.check.skill_ref_mirror.ok": "`.claude/skills/<slug>/ref/` \u4E0E `.codex/skills/<slug>/ref/` \u5B57\u8282\u4E00\u81F4\u3002",
|
|
1310
1315
|
"doctor.check.skill_ref_mirror.message": "\u6709 {count} \u4E2A ref \u6587\u4EF6\u5728 `.claude/skills/` \u4E0E `.codex/skills/` \u4E4B\u95F4\u4E0D\u4E00\u81F4\uFF08\u8DEF\u5F84: {list}\uFF09\u3002\u53EF\u80FD\u67D0\u7AEF\u88AB\u624B\u52A8\u7F16\u8F91\u6216 install \u5199\u5165\u5931\u8D25\u3002",
|
|
1311
1316
|
"doctor.check.skill_ref_mirror.remediation": "\u8DD1 `fabric install` \u4ECE canonical templates \u91CD\u5199\u4E24\u7AEF ref \u5B50\u6811\u4EE5\u6062\u590D\u4E00\u81F4\u3002",
|
|
1317
|
+
// ux-w2-2: retired-reference (stale pointer) lint。
|
|
1318
|
+
"doctor.check.retired_reference.name": "\u9000\u5F79\u5F15\u7528",
|
|
1319
|
+
"doctor.check.retired_reference.ok": "bootstrap\u3001SKILL.md\u3001\u5DF2\u5B89\u88C5 hooks \u4E2D\u65E0\u6B8B\u7559\u7684\u9000\u5F79\u5DE5\u5177/\u5B57\u6BB5\u540D\u3002",
|
|
1320
|
+
"doctor.check.retired_reference.message": "agent \u53EF\u89C1\u6587\u672C\u4E2D\u6709 {count} \u5904\u6307\u5411\u9000\u5F79\u5DE5\u5177/\u5B57\u6BB5\u540D\u7684 stale pointer: {sample}",
|
|
1321
|
+
"doctor.check.retired_reference.remediation": "\u628A\u547D\u4E2D\u6587\u672C\u6539\u4E3A\u66FF\u4EE3 token (\u6216\u5220\u9664), \u518D\u8DD1 `fabric install` \u91CD\u540C\u6B65 dogfood \u955C\u50CF\u3002",
|
|
1312
1322
|
// v2.0.0-rc.33 W3-6 (P1-13): SKILL.md token budget lint。warn > 5K / error > 10K token (chars/3 估算)。基于 Anthropic 推荐 SKILL.md 热路径 ~3K, 超过 5K 已影响 progressive disclosure;超过 10K 是阻断级 (model context 浪费 + 加载延迟)。
|
|
1313
1323
|
"doctor.check.skill_token_budget.name": "Skill token budget",
|
|
1314
1324
|
"doctor.check.skill_token_budget.ok": "\u6240\u6709 .claude/skills/<slug>/SKILL.md \u5728 token budget \u5185 (warn 5K / error 10K)\u3002",
|
|
@@ -1336,7 +1346,7 @@ var zhCNMessages = {
|
|
|
1336
1346
|
// rc.36 TASK-05 (P0-8): empty-tags ratio warn.
|
|
1337
1347
|
"doctor.check.knowledge_tags_empty.name": "Knowledge tags coverage",
|
|
1338
1348
|
"doctor.check.knowledge_tags_empty.ok": "canonical knowledge entries \u4E2D empty tags \u5360\u6BD4\u6B63\u5E38 (\u2264 50%, \u6216 workspace \u592A\u5C0F\u4E0D\u8BC4)\u3002",
|
|
1339
|
-
"doctor.check.knowledge_tags_empty.message": "{emptyCount}/{totalCount} ({pct}%) canonical knowledge entries \u7684 `tags:` \u4E3A\u7A7A \u2014 \u4E3B\u9898\u805A\u7C7B\u4E0E\u8DE8\u6761\u76EE\u68C0\u7D22\u9000\u5316\u3002fabric-archive
|
|
1349
|
+
"doctor.check.knowledge_tags_empty.message": "{emptyCount}/{totalCount} ({pct}%) canonical knowledge entries \u7684 `tags:` \u4E3A\u7A7A \u2014 \u4E3B\u9898\u805A\u7C7B\u4E0E\u8DE8\u6761\u76EE\u68C0\u7D22\u9000\u5316\u3002fabric-archive skill \u5E94\u6BCF\u4E2A entry \u4EA7 2-4 \u4E2A tag\u3002",
|
|
1340
1350
|
"doctor.check.knowledge_tags_empty.remediation": "\u4E0B\u4E00\u8F6E archive/import \u65F6,\u5728 frontmatter `tags:` \u5199 2-4 \u4E2A kebab-case \u4E3B\u9898\u8BCD;\u6279\u91CF\u8865\u65E7 entry tag \u7528 `/fabric-review` modify \u6D41\u3002",
|
|
1341
1351
|
// rc.36 TASK-09 (P1-NEW1): drift_detected 未消化告警。
|
|
1342
1352
|
"doctor.check.drift_unconsumed.name": "Knowledge drift unconsumed",
|
|
@@ -1388,7 +1398,7 @@ var zhCNMessages = {
|
|
|
1388
1398
|
"doctor.check.underseeded.ok": "\u77E5\u8BC6\u5E93\u5DF2\u6709 {count} \u4E2A canonical entries\uFF08>= {threshold}\uFF09\u3002",
|
|
1389
1399
|
"doctor.check.underseeded.message.singular": "\u77E5\u8BC6\u5E93\u4EC5\u6709 {count} \u4E2A canonical entry\uFF08< {threshold} threshold\uFF09\u3002plan_context \u68C0\u7D22\u9762\u4F4E\u4E8E\u53EF\u7528\u4E0B\u9650\u3002",
|
|
1390
1400
|
"doctor.check.underseeded.message.plural": "\u77E5\u8BC6\u5E93\u4EC5\u6709 {count} \u4E2A canonical entries\uFF08< {threshold} threshold\uFF09\u3002plan_context \u68C0\u7D22\u9762\u4F4E\u4E8E\u53EF\u7528\u4E0B\u9650\u3002",
|
|
1391
|
-
"doctor.check.underseeded.remediation": "\u8FD0\u884C fabric-
|
|
1401
|
+
"doctor.check.underseeded.remediation": "\u8FD0\u884C fabric-archive skill \u7684 source mode\uFF08`/fabric-archive`\uFF09\u4ECE git history \u4E0E\u73B0\u6709\u6587\u6863\u56DE\u586B knowledge\u3002",
|
|
1392
1402
|
"doctor.check.session_hints_stale.name": "Knowledge session-hints stale",
|
|
1393
1403
|
"doctor.check.session_hints_stale.ok": ".fabric/.cache/ \u4E0B\u6CA1\u6709\u8D85\u8FC7 {days} \u5929\u7684 session-hints cache files\u3002",
|
|
1394
1404
|
"doctor.check.session_hints_stale.message.singular": ".fabric/.cache/ \u4E0B\u6709 {count} \u4E2A session-hints cache file \u8D85\u8FC7 {days} \u5929\u3002\u9996\u4E2A\uFF1A{detail}\u3002",
|
|
@@ -1431,7 +1441,7 @@ var zhCNMessages = {
|
|
|
1431
1441
|
// rc.31 BUG-G2/G5: promote-ledger invariant check.
|
|
1432
1442
|
"doctor.check.promote_ledger_invariant.name": "Promote ledger invariant",
|
|
1433
1443
|
"doctor.check.promote_ledger_invariant.ok": "knowledge_proposed={proposed} \u2265 knowledge_promote_started={started} \u2265 knowledge_promoted={promoted}\uFF0Cledger \u4E0D\u53D8\u91CF\u6301\u6709\u3002",
|
|
1434
|
-
"doctor.check.promote_ledger_invariant.message.proposed-lt-started": "knowledge_proposed={proposed} \u5C0F\u4E8E knowledge_promote_started={started}\uFF08ledger \u4E0D\u53D8\u91CF\u88AB\u7834\u574F\uFF1B\u90E8\u5206 pending \u5728 approve \u65F6\u672A\u7ECF\u8FC7
|
|
1444
|
+
"doctor.check.promote_ledger_invariant.message.proposed-lt-started": "knowledge_proposed={proposed} \u5C0F\u4E8E knowledge_promote_started={started}\uFF08ledger \u4E0D\u53D8\u91CF\u88AB\u7834\u574F\uFF1B\u90E8\u5206 pending \u5728 approve \u65F6\u672A\u7ECF\u8FC7 fab_propose \u2192 \u7F3A\u5C11 propose \u4E8B\u4EF6\uFF09\u3002",
|
|
1435
1445
|
"doctor.check.promote_ledger_invariant.message.started-lt-promoted": "knowledge_promote_started={started} \u5C0F\u4E8E knowledge_promoted={promoted}\uFF08ledger \u4E0D\u53D8\u91CF\u88AB\u7834\u574F\uFF1B\u5B58\u5728\u672A\u914D\u5BF9\u7684 promoted \u4E8B\u4EF6\uFF0C\u53EF\u80FD\u6765\u81EA doctor filesystem-edit fallback \u6216\u5916\u90E8\u5199\u5165\uFF09\u3002",
|
|
1436
1446
|
"doctor.check.promote_ledger_invariant.remediation": "rc.31 \u8D77 review.approve \u4F1A\u8865\u53D1 knowledge_proposed \u4E8B\u4EF6\u4EE5\u7EF4\u62A4\u4E0D\u53D8\u91CF\uFF1B\u65B0 approve \u540E\u518D\u8DD1\u4E00\u6B21 fabric doctor \u5373\u53EF\u6062\u590D\u3002\u5386\u53F2\u5931\u8861\u4EC5\u662F\u53EF\u89C2\u6D4B\u6027\u6307\u793A\uFF0C\u4E0D\u5F71\u54CD KB \u529F\u80FD\u3002",
|
|
1437
1447
|
// rc.35 TASK-04 (P0-9.b): global_cli_outdated.
|
|
@@ -1451,7 +1461,7 @@ var zhCNMessages = {
|
|
|
1451
1461
|
"doctor.check.store_scope_lint.name": "Store scope lint",
|
|
1452
1462
|
"doctor.check.store_scope_lint.ok": "read-set \u5185\u6240\u6709 store \u6761\u76EE scope \u5143\u6570\u636E\u9F50\u5907(semantic_scope + visibility_store,\u65E0 personal \u6CC4\u6F0F,\u65E0 dangling project)\u3002",
|
|
1453
1463
|
"doctor.check.store_scope_lint.message": "{total} \u4E2A store scope \u95EE\u9898: {breakdown}\u3002\u4F8B\u5982 {sample}\u3002",
|
|
1454
|
-
"doctor.check.store_scope_lint.remediation": "\u8C03 `fabric store backfill
|
|
1464
|
+
"doctor.check.store_scope_lint.remediation": "\u8C03 `fabric store migrate backfill` \u8865\u7F3A\u5931\u7684 semantic_scope/visibility_store;`fabric store migrate scope` \u4FEE dangling \u7684 project: \u5750\u6807;\u628A personal-scope \u6761\u76EE\u79FB\u51FA shared store(personal \u77E5\u8BC6\u53EA\u5B58\u4E2A\u4EBA store,R5#3)\u3002",
|
|
1455
1465
|
// v2.2 Goal B (G-INTEGRITY): store stable_id collision + layer mismatch lints。
|
|
1456
1466
|
"doctor.check.stable_id_collision.name": "Stable ID collision",
|
|
1457
1467
|
"doctor.check.stable_id_collision.message.singular": 'stable_id "{stableId}" \u88AB\u58F0\u660E\u5728 {fileCount} \u4E2A\u6587\u4EF6\u4E2D:{files}\u3002\u8BF7\u7F16\u8F91\u5176\u4E2D\u4E00\u4E2A knowledge file,\u6539\u7528\u552F\u4E00 stable_id\u3002',
|
|
@@ -1486,7 +1496,7 @@ var zhCNMessages = {
|
|
|
1486
1496
|
"doctor.check.broad_index_drift.ok": "\u6CA1\u6709 store \u7684 broad scope \u6761\u76EE\u6570\u8FBE\u5230\u6F02\u79FB\u9608\u503C({threshold},backstop {backstop} \u7684 80%)\u3002",
|
|
1487
1497
|
"doctor.check.broad_index_drift.message.singular": "{count} \u4E2A store \u7684 broad \u7D22\u5F15\u5DF2\u8FBE {threshold}(backstop {backstop} \u7684 80%) \u2014 SessionStart banner \u63A5\u8FD1\u622A\u65AD broad \u6761\u76EE\u3002\u9996\u6761: {detail}\u3002",
|
|
1488
1498
|
"doctor.check.broad_index_drift.message.plural": "{count} \u4E2A store \u7684 broad \u7D22\u5F15\u5DF2\u8FBE {threshold}(backstop {backstop} \u7684 80%) \u2014 SessionStart banner \u63A5\u8FD1\u622A\u65AD broad \u6761\u76EE\u3002\u9996\u6761: {detail}\u3002",
|
|
1489
|
-
"doctor.check.broad_index_drift.remediation": "\u8DD1 `fabric-
|
|
1499
|
+
"doctor.check.broad_index_drift.remediation": "\u8DD1 `fabric-review` skill \u7684 retire \u5B50\u6D41\u7A0B\u5728\u544A\u8B66 store \u5185 prune/\u964D\u7EA7\u9648\u65E7 broad \u6761\u76EE,\u6216\u82E5\u8BED\u6599\u786E\u5B9E\u5927\u5219\u5728 .fabric/fabric-config.json \u8C03\u9AD8 `broad_index_backstop`\u3002",
|
|
1490
1500
|
// v2.2 Goal B (G-AGE): knowledge decay lints (orphan_demote + stale_archive)。
|
|
1491
1501
|
"doctor.check.orphan_demote.name": "Knowledge orphan demote",
|
|
1492
1502
|
"doctor.check.orphan_demote.ok": "\u6CA1\u6709 canonical knowledge entries \u8D85\u8FC7\u6309 maturity \u8BBE\u5B9A\u7684 inactivity threshold\u3002",
|
|
@@ -1498,6 +1508,18 @@ var zhCNMessages = {
|
|
|
1498
1508
|
"doctor.check.stale_archive.message.singular": "{count} \u4E2A draft knowledge entry \u5DF2\u8D85\u8FC7 demote+{additionalDays}d \u989D\u5916 quiet window\u3002\u9996\u4E2A:{detail}\u3002",
|
|
1499
1509
|
"doctor.check.stale_archive.message.plural": "{count} \u4E2A draft knowledge entries \u5DF2\u8D85\u8FC7 demote+{additionalDays}d \u989D\u5916 quiet window\u3002\u9996\u4E2A:{detail}\u3002",
|
|
1500
1510
|
"doctor.check.stale_archive.remediation": "\u901A\u8FC7 `/fabric-review reject <id>` \u5F52\u6863\u8BE5 stale draft,\u6216\u82E5\u4ECD\u76F8\u5173\u5219\u590D\u6D3B\u5B83\u3002(\u79FB\u52A8 store \u6587\u4EF6\u662F store \u5199\u4FA7\u6D41\u7A0B\u7684\u804C\u8D23 \u2014 \u8FD9\u4E2A\u8BFB\u4FA7 lint \u53EA\u8D1F\u8D23\u66B4\u9732\u9648\u65E7\u3002)",
|
|
1511
|
+
// v2.2 C1: knowledge promotion lint (promotion_candidate, info kind)。
|
|
1512
|
+
"doctor.check.promotion_candidate.name": "Knowledge promotion candidate",
|
|
1513
|
+
"doctor.check.promotion_candidate.ok": "\u6CA1\u6709 verified knowledge entries \u8FBE\u5230 proven \u664B\u5347\u7684 related \u5165\u5EA6\u95E8\u69DB\u3002",
|
|
1514
|
+
"doctor.check.promotion_candidate.message.singular": "{count} \u4E2A verified knowledge entry \u7684 related \u5165\u5EA6 \u2265{threshold},\u7ED3\u6784\u4E0A\u591F\u4E2D\u5FC3,\u503C\u5F97 review \u664B\u5347\u5230 proven\u3002\u9996\u4E2A:{detail}\u3002",
|
|
1515
|
+
"doctor.check.promotion_candidate.message.plural": "{count} \u4E2A verified knowledge entries \u7684 related \u5165\u5EA6 \u2265{threshold},\u7ED3\u6784\u4E0A\u591F\u4E2D\u5FC3,\u503C\u5F97 review \u664B\u5347\u5230 proven\u3002\u9996\u4E2A:{detail}\u3002",
|
|
1516
|
+
"doctor.check.promotion_candidate.remediation": "\u901A\u8FC7 `/fabric-review` \u590D\u6838\u8FD9\u4E9B entry,\u786E\u8BA4 0 dismiss\u3001cold-eval \u81EA\u8DB3\u3001\u5C5E\u5730\u57FA\u7EA7\u540E `modify <id>` \u5347\u5230 proven\u3002(\u664B\u5347\u5224\u5B9A\u662F store \u5199\u4FA7 review \u7684\u804C\u8D23 \u2014 \u8FD9\u4E2A\u8BFB\u4FA7 lint \u53EA surface \u7ED3\u6784\u4E2D\u5FC3\u7684\u5019\u9009\u3002)",
|
|
1517
|
+
// v2.2 C1: broad review-recheck lint (broad_review_recheck, info kind)。
|
|
1518
|
+
"doctor.check.broad_review_recheck.name": "Knowledge broad review recheck",
|
|
1519
|
+
"doctor.check.broad_review_recheck.ok": "\u6CA1\u6709 broad-scope knowledge entries \u8D85\u671F\u672A\u505A review \u518D\u786E\u8BA4\u3002",
|
|
1520
|
+
"doctor.check.broad_review_recheck.message.singular": "{count} \u4E2A broad-scope knowledge entry \u5DF2 {thresholdDays}d+ \u6CA1\u7ECF\u8FC7 fab-review \u518D\u786E\u8BA4,\u503C\u5F97\u590D\u67E5(broad \u8C41\u514D usage-age \u964D\u7EA7,\u8FD9\u662F\u5B83\u7684 review \u65F6\u949F)\u3002\u9996\u4E2A:{detail}\u3002",
|
|
1521
|
+
"doctor.check.broad_review_recheck.message.plural": "{count} \u4E2A broad-scope knowledge entries \u5DF2 {thresholdDays}d+ \u6CA1\u7ECF\u8FC7 fab-review \u518D\u786E\u8BA4,\u503C\u5F97\u590D\u67E5(broad \u8C41\u514D usage-age \u964D\u7EA7,\u8FD9\u662F\u5B83\u7684 review \u65F6\u949F)\u3002\u9996\u4E2A:{detail}\u3002",
|
|
1522
|
+
"doctor.check.broad_review_recheck.remediation": "\u901A\u8FC7 `/fabric-review` \u518D\u786E\u8BA4\u6BCF\u6761(approve/modify \u4F1A\u76D6\u4E00\u4E2A\u65B0\u7684 review \u65F6\u95F4\u6233),\u6216\u82E5\u4E0D\u518D\u6210\u7ACB\u5219\u964D\u7EA7/\u9A73\u56DE\u3002\u8FD9\u662F\u975E\u963B\u585E\u63D0\u793A,\u7EDD\u4E0D\u81EA\u52A8\u964D\u7EA7 \u2014 broad \u77E5\u8BC6\u5728 reviewer \u52A8\u624B\u524D\u6301\u7EED surface\u3002",
|
|
1501
1523
|
// project-scope binding 回填 lint (unbound_project)。
|
|
1502
1524
|
"doctor.check.unbound_project.name": "Project-scope binding",
|
|
1503
1525
|
"doctor.check.unbound_project.ok": "\u5DF2\u7ED1\u5199\u5165 store \u5E26\u6709 project \u5750\u6807(project_id + active_project),project-scope \u7684 recall/\u5199\u5165\u8DEF\u7531\u6B63\u5E38\u3002",
|
|
@@ -1508,11 +1530,6 @@ var zhCNMessages = {
|
|
|
1508
1530
|
"doctor.check.skill_md_yaml_invalid.message.singular": "{count} \u4E2A SKILL.md frontmatter value \u5305\u542B\u672A\u52A0\u5F15\u53F7\u7684 ': '\uFF0Cstrict YAML parsers \u4F1A\u62D2\u7EDD\uFF08Claude Code tolerates it\uFF1BCodex CLI drops the skill at load\uFF09\u3002\u9996\u4E2A\uFF1A{detail}\u3002",
|
|
1509
1531
|
"doctor.check.skill_md_yaml_invalid.message.plural": "{count} \u4E2A SKILL.md frontmatter values \u5305\u542B\u672A\u52A0\u5F15\u53F7\u7684 ': '\uFF0Cstrict YAML parsers \u4F1A\u62D2\u7EDD\uFF08Claude Code tolerates it\uFF1BCodex CLI drops the skill at load\uFF09\u3002\u9996\u4E2A\uFF1A{detail}\u3002",
|
|
1510
1532
|
"doctor.check.skill_md_yaml_invalid.remediation": '\u4F7F\u7528\u53CC\u5F15\u53F7\u5305\u88F9\u8BE5 value\uFF08`description: "\u2026"`\uFF09\uFF0C\u6216\u5C06\u5185\u90E8\u7684 `key: value` token \u6539\u5199\u4E3A `key=value`\u3002',
|
|
1511
|
-
"doctor.check.router_chain_ref.name": "Router chain refs",
|
|
1512
|
-
"doctor.check.router_chain_ref.ok": "fabric/ \u8DEF\u7531\u5668 S_CHAIN \u91CC\u7684\u6BCF\u4E2A fabric-* \u5F15\u7528\u90FD\u6307\u5411\u5DF2\u5B89\u88C5\u7684 leaf skill\u3002",
|
|
1513
|
-
"doctor.check.router_chain_ref.message.singular": "{count} \u4E2A fabric/ \u8DEF\u7531\u5668 S_CHAIN \u5F15\u7528\u6307\u5411\u4E0D\u5728 install set \u7684 skill\uFF1A{list}\u3002\u8BE5 chain \u6B65\u9AA4\u5728\u8FD0\u884C\u65F6\u4F1A\u65AD\u94FE\u3002",
|
|
1514
|
-
"doctor.check.router_chain_ref.message.plural": "{count} \u4E2A fabric/ \u8DEF\u7531\u5668 S_CHAIN \u5F15\u7528\u6307\u5411\u4E0D\u5728 install set \u7684 skill\uFF1A{list}\u3002\u8FD9\u4E9B chain \u6B65\u9AA4\u5728\u8FD0\u884C\u65F6\u4F1A\u65AD\u94FE\u3002",
|
|
1515
|
-
"doctor.check.router_chain_ref.remediation": "\u7F16\u8F91 templates/skills/fabric/SKILL.md \u7684 S_CHAIN \u8868\uFF0C\u6539\u4E3A\u5F15\u7528\u771F\u5B9E\u7684 leaf skill\uFF08\u5DF2\u5B89\u88C5\u7684 fabric-* \u4E4B\u4E00\uFF09\uFF0C\u6216\u5220\u9664\u8BE5\u9648\u65E7 chain \u884C\u3002",
|
|
1516
1533
|
"doctor.check.onboard_coverage.name": "Onboard coverage",
|
|
1517
1534
|
"doctor.check.onboard_coverage.ok.complete": "Onboard coverage\uFF1A{filledCount}/{total} \u2713\uFF08opted-out\uFF1A{optedOutCount}\uFF09\u3002",
|
|
1518
1535
|
"doctor.check.onboard_coverage.message.incomplete": "\u5C1A\u672A\u8986\u76D6\u7684 onboard slots\uFF1A[{missingSlots}]\u3002{filledCount}/{total} filled\uFF1B{optedOutCount} opted-out\u3002",
|
|
@@ -1625,7 +1642,7 @@ var zhCNMessages = {
|
|
|
1625
1642
|
// 时 spawn, 已运行的 Claude Code / Codex session 不会自动加载
|
|
1626
1643
|
// 新 mcp config — 必须重启才能拿到 Fabric tools。
|
|
1627
1644
|
"cli.install.restart-banner": "\u91CD\u542F\u63D0\u793A: \u5DF2\u8FD0\u884C\u7684 Claude Code / Codex CLI session \u9700\u91CD\u542F\u624D\u80FD\u52A0\u8F7D\u65B0 MCP server \u914D\u7F6E;\u65B0\u4F1A\u8BDD\u4F1A\u81EA\u52A8\u4F7F\u7528 Fabric tools\u3002",
|
|
1628
|
-
"cli.install.next-steps": "\u4E0B\u4E00\u6B65 \u2014\u2014 \u62FF\u5230\u7B2C\u4E00\u4EFD\u4EF7\u503C:\n 1. \u91CD\u542F\u4F60\u7684 AI \u5BA2\u6237\u7AEF (Claude Code / Codex)\u3002\u5B83\u73B0\u5728\u4F1A\u81EA\u52A8\u628A\u672C\u9879\u76EE\u7684\u77E5\u8BC6 surface (\u4E3B\u52A8\u5448\u73B0) \u7ED9\u52A9\u624B\u3002\n 2. \u6C89\u6DC0\u77E5\u8BC6: \u6B63\u5E38\u5E72\u6D3B\u5373\u53EF \u2014\u2014 \u5F53\u4F60\u505A\u51B3\u7B56\u6216\u8E29\u5751\u65F6, fabric-archive skill \u4F1A\u63D0\u8BAE\u5165\u5E93; \u6216\u8DD1 fabric-
|
|
1645
|
+
"cli.install.next-steps": "\u4E0B\u4E00\u6B65 \u2014\u2014 \u62FF\u5230\u7B2C\u4E00\u4EFD\u4EF7\u503C:\n 1. \u91CD\u542F\u4F60\u7684 AI \u5BA2\u6237\u7AEF (Claude Code / Codex)\u3002\u5B83\u73B0\u5728\u4F1A\u81EA\u52A8\u628A\u672C\u9879\u76EE\u7684\u77E5\u8BC6 surface (\u4E3B\u52A8\u5448\u73B0) \u7ED9\u52A9\u624B\u3002\n 2. \u6C89\u6DC0\u77E5\u8BC6: \u6B63\u5E38\u5E72\u6D3B\u5373\u53EF \u2014\u2014 \u5F53\u4F60\u505A\u51B3\u7B56\u6216\u8E29\u5751\u65F6, fabric-archive skill \u4F1A\u63D0\u8BAE\u5165\u5E93; \u6216\u8DD1 fabric-archive skill \u7684 source mode \u4ECE git \u5386\u53F2\u56DE\u704C\u3002\n 3. \u9A8C\u8BC1\u751F\u6548: \u95EE\u4F60\u7684 AI\u300CFabric \u5BF9\u8FD9\u4E2A repo \u77E5\u9053\u4E9B\u4EC0\u4E48?\u300D, \u6216\u8DD1 `fabric doctor` \u67E5\u5065\u5EB7\u3002",
|
|
1629
1646
|
"cli.install.store-bind-nudge": "\u{1F4A1} \u68C0\u6D4B\u5230\u5DF2\u6302\u8F7D\u4F46\u672A\u7ED1\u5B9A\u672C\u9879\u76EE\u7684\u77E5\u8BC6 store: {aliases}\u3002\u8FD0\u884C `fabric store bind {first}` \u628A\u5B83\u7684\u77E5\u8BC6\u63A5\u5165\u672C\u9879\u76EE, \u518D `fabric store switch-write {first}` \u8BBE\u4E3A\u56E2\u961F\u77E5\u8BC6\u7684\u5199\u5165\u76EE\u6807\u3002",
|
|
1630
1647
|
// C1/C5: 语义搜索交互文案统一走 t(),英文术语首现加中文 gloss。
|
|
1631
1648
|
"cli.install.semantic.prompt": "\u542F\u7528\u5411\u91CF\u8BED\u4E49\u641C\u7D22 (vector semantic search)\uFF1F(\u9996\u6B21\u53EC\u56DE recall \u65F6\u624D\u4F1A\u4E0B\u8F7D\u5D4C\u5165\u6A21\u578B)",
|
|
@@ -1972,6 +1989,7 @@ var zhCNMessages = {
|
|
|
1972
1989
|
"cli.store.detached": "\u5DF2\u5206\u79BB '{alias}' \u2014\u2014 \u78C1\u76D8\u4E0A\u7684 store \u76EE\u5F55\u4FDD\u7559 (\u5206\u79BB \u2260 \u5220\u9664)",
|
|
1973
1990
|
"cli.store.bound": "\u5DF2\u7ED1\u5B9A\u5FC5\u9700 store '{id}' (\u5171 {count} \u4E2A\u5FC5\u9700)",
|
|
1974
1991
|
"cli.store.switch-write": "\u5DF2\u5C06\u672C\u9879\u76EE\u7684\u6D3B\u52A8\u5199\u5165 store \u8BBE\u4E3A '{alias}'",
|
|
1992
|
+
"cli.store.routed": "\u5199\u5165\u8DEF\u7531:scope '{scope}' \u2192 store '{alias}'",
|
|
1975
1993
|
"cli.sync.deferred": "{count} \u4E2A store \u79BB\u7EBF \u2014\u2014 push \u5DF2\u5EF6\u540E; \u8054\u7F51\u540E\u91CD\u65B0\u8FD0\u884C `fabric sync`",
|
|
1976
1994
|
"cli.sync.paused": "sync \u56E0\u51B2\u7A81\u6682\u505C \u2014\u2014 \u89E3\u51B3\u540E\u8FD0\u884C `fabric sync --continue` (\u6216 `--abort`)",
|
|
1977
1995
|
"cli.metrics.invalid-since": '--since: \u65E0\u6548\u7684\u65F6\u957F "{raw}" (\u793A\u4F8B: 24h\u30017d\u300130m)',
|
|
@@ -2026,7 +2044,7 @@ var PROTECTED_TOKENS = [
|
|
|
2026
2044
|
"fab_recall",
|
|
2027
2045
|
"fab_plan_context",
|
|
2028
2046
|
"fab_get_knowledge_sections",
|
|
2029
|
-
"
|
|
2047
|
+
"fab_propose",
|
|
2030
2048
|
"fab_review",
|
|
2031
2049
|
// Project convergence point + knowledge tree paths
|
|
2032
2050
|
"AGENTS.md",
|
|
@@ -2043,7 +2061,7 @@ var PROTECTED_TOKENS = [
|
|
|
2043
2061
|
// Phase 1.5 scope enum values (rc.9 — TASK-008 D1)
|
|
2044
2062
|
"narrow",
|
|
2045
2063
|
"broad",
|
|
2046
|
-
// v2.0.0-rc.7 T5/T6
|
|
2064
|
+
// v2.0.0-rc.7 T5/T6 fab_propose contract fields (TASK-008 D1)
|
|
2047
2065
|
"source_sessions",
|
|
2048
2066
|
"proposed_reason",
|
|
2049
2067
|
"session_context",
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveGlobalLocale
|
|
3
|
+
} from "./chunk-2GLIAZ5M.js";
|
|
4
|
+
|
|
5
|
+
// src/templates/bootstrap-canonical.ts
|
|
6
|
+
var BOOTSTRAP_MARKER_BEGIN = "<!-- fabric:bootstrap:begin -->";
|
|
7
|
+
var BOOTSTRAP_MARKER_END = "<!-- fabric:bootstrap:end -->";
|
|
8
|
+
var BOOTSTRAP_REGEX = /(?:\r?\n){0,2}<!-- fabric:bootstrap:begin -->[\s\S]*?<!-- fabric:bootstrap:end -->/;
|
|
9
|
+
var BOOTSTRAP_CANONICAL_ZH = `# Fabric Bootstrap
|
|
10
|
+
|
|
11
|
+
\u672C\u9879\u76EE\u4F7F\u7528 Fabric \u7BA1\u7406\u8DE8\u5BA2\u6237\u7AEF AI \u77E5\u8BC6\u4E0E\u884C\u4E3A\u89C4\u5219\u3002\u672C\u6587\u4EF6\u7531 \`fabric install\` \u540C\u6B65\u5230\u4E24\u7AEF managed block,**\u4E0D\u8981\u624B\u52A8\u7F16\u8F91\u4E24\u7AEF\u7684 block**,\u53EA\u6539\u8FD9\u91CC + \u91CD\u8DD1 \`fabric install\`\u3002
|
|
12
|
+
|
|
13
|
+
## For Developers
|
|
14
|
+
|
|
15
|
+
\u8FD9\u4E2A\u6587\u4EF6\u662F **AI \u5BA2\u6237\u7AEF\u7684\u7B56\u7565\u4E0E\u89C4\u7EA6\u914D\u7F6E**,\u4E0D\u662F dev onboarding\u3002\u4F60\u4E0D\u9700\u8981\u8BFB Self-archive / Cite / Phase 0.4 \u7B49\u7EC6\u8282\u3002
|
|
16
|
+
\u4F5C\u4E3A dev \u4F60\u53EA\u9700\u8981:\u5728\u6BCF\u4E2A repo \u8DD1\u4E00\u6B21 \`fabric install\`,\u7528 \`fabric store bind <alias>\` / \`fabric store switch-write <alias>\` \u63A5\u5165\u5199\u5165 store,\u51FA\u95EE\u9898\u8DD1 \`fabric doctor\`\u3002
|
|
17
|
+
**\u4E25\u7981\u624B\u52A8\u7F16\u8F91 \`.fabric/agents.meta.json\`** \u2014 \u6D3E\u751F\u72B6\u6001\u7531 engine \u91CD\u5EFA\u3002
|
|
18
|
+
|
|
19
|
+
## 5 \u5206\u949F\u4E0A\u624B (Dev Quickstart)
|
|
20
|
+
|
|
21
|
+
**Fabric \u662F\u4EC0\u4E48**:\u8DE8\u5BA2\u6237\u7AEF(Claude Code / Codex CLI)\u7684 AI \u77E5\u8BC6\u5C42\u3002\u628A\u56E2\u961F/\u9879\u76EE\u7684 **decisions / pitfalls / guidelines / models / processes** \u5B58\u4E3A markdown,hook \u81EA\u52A8 surface \u7ED9 AI,\u8BA9 AI \u4E0D\u7528\u6BCF\u6B21\u91CD\u5B66\u3002
|
|
22
|
+
|
|
23
|
+
**\u4F60\u8981\u505A\u7684 (DO)** vs **engine \u81EA\u52A8\u7684 (DON'T \u624B\u52A8)**:
|
|
24
|
+
|
|
25
|
+
| \u4F60 DO | \u4F60 DON'T |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| \u6BCF\u4E2A repo \u8DD1\u4E00\u6B21 \`fabric install\` | \u624B\u7F16 \`.fabric/agents.meta.json\` |
|
|
28
|
+
| \u5F02\u5E38\u65F6\u8DD1 \`fabric doctor\` (--fix \u81EA\u6108) | \u624B\u7F16 \`.claude/hooks/\` \u4E0B \`.cjs\` |
|
|
29
|
+
| \u7528 \`fabric-archive\` / \`fabric-review\` / \`fabric store ...\` \u7BA1\u7406 store-backed knowledge | \u624B\u5199\u4EFB\u4F55\u975E store knowledge \u6839 |
|
|
30
|
+
| \`npm install -g @fenglimg/fabric-cli@latest\` \u5347\u7EA7 | \u80CC 35 \u6761 doctor lint \u4EE3\u7801 |
|
|
31
|
+
|
|
32
|
+
**4 \u6B65\u5FAA\u73AF**: \`fabric install\` (\u4E00\u6B21) \u2192 \u7ED1\u5B9A\u5E76\u9009\u62E9\u5199\u5165 store \u2192 AI \u6B63\u5E38\u5DE5\u4F5C (hook on session start + edit) \u2192 AI \u901A\u8FC7 MCP \u5199\u5165\u5F53\u524D write store \u7684 pending \u6761\u76EE\u5E76\u8FD4\u56DE \`pending_path\` \u2192 \u7528 \`fabric-review\` skill \u5BA1\u6838\u3002
|
|
33
|
+
|
|
34
|
+
**\u771F\u4F8B**:\u67D0 sprite \u9ED1\u8FB9 root cause \u662F \`atlas.premultiplyAlpha\` flag \u53CD\u5411 \u2014 \u5F52\u6863\u8FDB store \u7684 \`knowledge/pitfalls/\` \u540E,\u4E0B\u6B21\u540C\u7C7B\u95EE\u9898 AI \u81EA\u52A8 reference\u3002
|
|
35
|
+
|
|
36
|
+
\u5B8C\u6574 maintainer \u7248\u89C1 \`docs/USER-QUICKSTART.md\`\u3002
|
|
37
|
+
|
|
38
|
+
## \u884C\u4E3A\u89C4\u5219
|
|
39
|
+
- **\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\u524D**:\u5148 \`fab_recall(paths=[<\u88AB\u6539\u6587\u4EF6>])\` \u2014\u2014 \u4E00\u6B21\u8C03\u7528\u62FF\u56DE\u76F8\u5173 KB \u7684\u63CF\u8FF0 + \u539F\u751F\u8BFB\u53D6\u8DEF\u5F84(\`entries[].read_path\`)\u3002\`fab_recall\` \u4E0D\u518D\u6295\u9012\u6B63\u6587;\u9700\u8981\u67D0\u6761\u6B63\u6587\u65F6\u76F4\u63A5\u5BF9\u5176 \`entries[].read_path\` \u505A\u539F\u751F Read(\`Read <store>/knowledge/<type>/<id>--*.md\`),\u8FD9\u4F1A\u88AB PostToolUse hook \u8BB0\u4E3A \`knowledge_body_read\`\u3002lean \u9ED8\u8BA4:\u63CF\u8FF0+\u7D22\u5F15\u5DF2\u591F\u53D1\u73B0\u6761\u76EE,\u6B63\u6587\u6309\u9700\u8BFB\u4E00\u6B21,\u4E0D\u6BCF\u8F6E\u91CD\u704C(KT-GLD-0005)\u3002
|
|
40
|
+
- **\`.fabric/agents.meta.json\` \u4E25\u7981\u624B\u52A8\u7F16\u8F91**;engine \u4F1A\u81EA\u52A8\u540C\u6B65\u6D3E\u751F\u72B6\u6001,\u663E\u5F0F reconcile \u8DD1 \`fabric doctor --fix\`\u3002
|
|
41
|
+
|
|
42
|
+
## \u77E5\u8BC6\u5E93(KB)
|
|
43
|
+
- **Discovery**:SessionStart hook \u5217 broad-scoped \u6761\u76EE(\u6761\u76EE\u6309 \`semantic_scope\` \u5206\u4E09\u5C42:\`team\` \u56E2\u961F\u901A\u7528 / \`project:<id>\` \u672C\u9879\u76EE\u4E13\u5C5E(\u4EC5\u5728\u7ED1\u5B9A\u8BE5\u9879\u76EE\u7684\u4ED3\u5E93\u6D6E\u73B0)/ \`personal\` \u4E2A\u4EBA \`KP-*\`,\u4E09\u8005\u5F15\u7528\u65B9\u5F0F\u76F8\u540C);edit \u6587\u4EF6\u65F6 PreToolUse hook \u53EF\u80FD\u89E6\u53D1 narrow hint\u3002
|
|
44
|
+
- **Scope \u4E09\u8F74(\u4E3A\u4EC0\u4E48\u6CA1\u6D6E\u73B0)** (KT-MOD-0001):\u4E00\u6761\u77E5\u8BC6\u662F\u5426\u6D6E\u73B0\u7531\u4E09\u4E2A**\u6B63\u4EA4**\u8F74\u51B3\u5B9A \u2014\u2014 \u2460 \`semantic_scope\` \u53D7\u4F17(\`team\` / \`project:<id>\` / \`personal\`;\u7ED1\u9519\u9879\u76EE\u5219\u4E0D\u663E)\u2461 \`relevance_scope\` \u65F6\u673A(\`broad\` \u5E38\u9A7B / \`narrow\` \u4EC5\u7F16\u8F91\u5339\u914D\u6587\u4EF6\u65F6\u6D6E\u73B0)\u2462 \`store\` \u7269\u7406\u5E93(\u6CA1 \`fabric store bind\` \u5C31\u4E0D\u8BFB)\u3002\u4E09\u8F74\u540D\u5B57\u4F1A\u649E("team" \u65E2\u662F\u53D7\u4F17\u503C\u4E5F\u53EF\u662F store \u522B\u540D),\u6240\u4EE5\u56F0\u60D1"\u4E3A\u4EC0\u4E48\u8FD9\u6761\u6CA1\u6D6E\u73B0"\u65F6\u8DD1 \`fabric audit why-not-surfaced <id>\` \u9010\u56E0\u8BCA\u65AD(store \u6CA1\u7ED1 / scope \u4E0D\u5339\u914D / narrow \u65F6\u673A)\u3002
|
|
45
|
+
- **Usage**:\u8D70\u5355\u6B65 \`fab_recall(paths=[...])\` \u4E00\u6B21\u62FF\u56DE\u76F8\u5173 KB \u7684\u63CF\u8FF0 + \u8BFB\u53D6\u8DEF\u5F84;\u9700\u8981\u67D0\u6761\u6B63\u6587\u65F6\u5BF9\u5176 \`entries[].read_path\` \u505A\u539F\u751F Read \u53D6\u56DE(\u4E0D\u518D\u8D70 MCP \u4E8C\u6B21\u53D6\u6B63\u6587)\u3002
|
|
46
|
+
- **session_id**: \u8C03\u7528 \`fab_recall\` \u65F6, \u52A1\u5FC5\u628A\u5F53\u524D client session id \u4F5C\u4E3A \`session_id\` \u53C2\u6570\u4F20\u5165(Claude Code \u7684 session id \u5728 stdin payload \u4E2D, Codex \u7684\u5BF9\u5E94 identifier \u540C\u7406)\u3002\u8FD9\u80FD\u8BA9 \`fabric doctor --archive-history\` \u4E0E \`fabric-hint.cjs\` Stop hook \u51C6\u786E\u8BC6\u522B\u8DE8\u4F1A\u8BDD debt \u72B6\u6001\u3002
|
|
47
|
+
- **Skills (4)**:\u5199\u6D41\u7A0B \`fabric-archive\`(\u542B source mode \u51B7\u542F\u52A8\u4ECE git/docs \u56DE\u704C)/ \`fabric-review\`(\u542B retire \u8BED\u4E49\u6DD8\u6C70 + relate \u5173\u8054\u5EFA\u8FB9 \u5B50\u6D41\u7A0B);store \u8FD0\u7EF4 \`fabric-store\` / \`fabric-sync\`\u3002
|
|
48
|
+
- **Language**:\u6E32\u67D3\u6309 \`~/.fabric/fabric-global.json\` \u7684 \`language\` \u5B57\u6BB5(machine-wide tone)\u3002
|
|
49
|
+
- **Archive cadence nudge** (rc.36): \u6BCF\u5B8C\u6210\u4E00\u6279 Edit(\u9ED8\u8BA4 ~20 \u6B21, \u4E0E Stop hook \u9608\u503C config \`archive_edit_threshold\` \u4E00\u81F4)/ \u663E\u8457 decision \u540E,\u5728\u5408\u9002\u56DE\u5408\u4E3B\u52A8 propose \u8C03 \`fabric-archive\` skill \u2014 archive \u6CA1\u5EFA\u7ACB\u9891\u7387\u4F1A\u8BA9 KB \u6162\u901F\u6B7B\u6389\u3002
|
|
50
|
+
- **Review backlog nudge** (rc.36): \u9700\u8981\u5224\u65AD pending backlog \u65F6\u8D70 \`fab_pending action="list"\` \u6216 \`fabric-review\` \u8FD4\u56DE\u7684 \`pending_path\`;\u4E0D\u8981 glob \u9879\u76EE\u672C\u5730 \`.fabric/knowledge/pending\`\u3002\u5F53\u53EF\u89C1 pending \u7D2F\u79EF >10 \u6761\u65F6,\u5728\u5408\u9002\u56DE\u5408\u4E3B\u52A8 propose \u8C03 \`fabric-review\` skill \u6279\u91CF\u5BA1,\u907F\u514D draft \u5361\u6B7B\u3002
|
|
51
|
+
|
|
52
|
+
## Self-archive policy (v2.2 C1: \u7CBE\u7B80\u8BF4\u660E\u4E66)
|
|
53
|
+
|
|
54
|
+
\u51FA\u73B0\u660E\u786E\u5F52\u6863\u4FE1\u53F7\u65F6, \u4E8E\u8BE5 turn \u672B\u5C3E\u81EA\u4E3B\u8C03\u7528 \`fabric-archive\` skill(AI \u81EA\u89E6\u53D1\u5165\u53E3 E3):
|
|
55
|
+
|
|
56
|
+
- **\u89E6\u53D1** (\u4E8C\u9009\u4E00): \u2460 **User-driven normative** \u2014 \u7528\u6237\u8BF4 \`\u4EE5\u540E\` / \`always\` / \`never\` / \`\u4E0B\u6B21\` / \`\u8BB0\u4E00\u4E0B\`, \u6216\u5728 \u22652 \u5019\u9009\u95F4\u6743\u8861\u540E\u9501\u5B9A\u65B9\u5411, \u6216\u62D2\u4E86\u5EFA\u8BAE\u5E76\u7ED9\u4E86\u7406\u7531(\u7406\u7531\u5373\u77E5\u8BC6); \u2461 **Wrong-turn-and-revert** \u2014 \u4F60\u8BD5\u4E86 path X \u53CD\u601D\u540E\u6539\u8D70 path Y("\u5426\u5B9A+\u66FF\u4EE3"\u4E24\u6B65\u7ED3\u6784, \u975E\u5355\u7EAF\u63A2\u7D22\u5931\u8D25)\u3002
|
|
57
|
+
- **\u4E0D\u89E6\u53D1**: \u7528\u6237\u7EAF\u8BE2\u95EE / \u7B80\u5355 refactor\xB7typo / \u51ED\u7A7A"\u6211\u5B66\u5230\u4E86"\u7684\u6D1E\u5BDF\u3002
|
|
58
|
+
- **\u9632 loop**: \u540C turn \u6700\u591A\u81EA\u8C03 1 \u6B21; \u540C session \u540C outcome \u4E0D\u91CD\u590D; skill \u5185 Phase 2.5 viability gate \u515C\u5E95\u3002
|
|
59
|
+
- **\u56DE\u6267 (marker-free)**: \u76F4\u63A5\u81EA\u8C03 \`fabric-archive\` skill \u5373\u53EF, \u65E0\u9700\u6253\u5370\u4EFB\u4F55\u6697\u53F7\u5B57\u7B26\u4E32 \u2014\u2014 skill \u9ED8\u8BA4\u628A AI \u81EA\u8C03\u8BC6\u522B\u4E3A E3(\u786E\u5B9A\u6027 else \u8DEF\u7531, \u4E0D\u518D\u4F9D\u8D56 AI \u8F93\u51FA\u7CBE\u786E\u5B57\u7B26\u4E32)\u3002skill \u843D pending \u540E\u8FD4\u56DE \`pending_path\`, \u4E0D\u8BE5\u8BB0\u5C31\u56DE \`undo\`(\u6211\u8C03 fab_review reject)\u3002
|
|
60
|
+
|
|
61
|
+
## Cite policy (v2.2 C1: recall \u81EA\u52A8\u8BB0\u8D26, \u96F6\u9996\u884C\u8D1F\u62C5)
|
|
62
|
+
|
|
63
|
+
- **\u6838\u5FC3 (recall-first \u81EA\u52A8\u8BB0\u8D26)**: \u6539\u4EFB\u4F55\u6587\u4EF6\u524D\u5148 \`fab_recall(paths=[<\u88AB\u6539\u6587\u4EF6>])\`\u3002\u7CFB\u7EDF\u6309"\u672C session recall \u547D\u4E2D\u7684 path \u4E0E\u7F16\u8F91\u76EE\u6807\u91CD\u53E0"\u81EA\u52A8\u628A\u53EC\u56DE\u7684 KB \u8BB0\u4E3A\u8BE5\u6B21 edit \u7684\u5F15\u7528 \u2014\u2014 **\u65E0\u9700\u624B\u5199\u4EFB\u4F55\u56DE\u590D\u9996\u884C**(C1 \u5220\u9664\u9996\u884C \`KB:\` contract \u516B\u80A1:\u5148\u60F3\u540E\u8BF4,recall \u624D\u662F\u5F15\u7528\u53D1\u751F\u7684\u771F\u5B9E\u4FE1\u53F7)\u3002PreToolUse \u68C0\u6D4B\u4E0D\u5230\u76F8\u5173 recall \u65F6\u7ED9\u4E00\u6761\u8F6F nudge(nudge \u975E gate,\u5B88 KT-DEC-0007)\u3002
|
|
64
|
+
- **\u552F\u4E00\u8981\u5F00\u53E3\u7684\u65F6\u5019 (dismissed / override)**: \u4F60\u5224\u65AD\u67D0\u53EC\u56DE KB \u4E0D\u8BE5\u5E94\u7528\u65F6,\u8BF4\u4E00\u53E5 \`dismissed: <id> (<reason>)\`;reason \u679A\u4E3E \`scope-mismatch | outdated | not-applicable | other:<text>\`\u3002\u9700\u7CBE\u786E\u6807\u6CE8\u4ECD\u53EF\u7528\u9996\u884C \`KB: <id> [applied|dismissed]\`(\u89E3\u6790\u5668\u4FDD\u7559,\u5411\u540E\u517C\u5BB9)\u3002
|
|
65
|
+
- **\`[applied]\` \u9A8C\u8BC1\u4E49\u52A1**: \u5F15\u7528\u4EFB\u4F55 id(\u81EA\u52A8\u6216\u624B\u5199)\u524D\u5FC5\u987B\u5148 fab_recall \u5B9E\u9645\u6293\u56DE KB(\u6309\u9700\u5BF9\u6B63\u6587\u8DEF\u5F84\u505A\u539F\u751F Read),\u9632\u6B62\u7F16\u9020 id\u3002\u9A8C\u8BC1\u4E0D\u901A\u8FC7 = \u4E0D\u80FD cite\u3002
|
|
66
|
+
- **\u7A3D\u6838\u4E0E\u5B8C\u6574\u89C4\u7EA6**: \`fabric audit cite\` \u8F93\u51FA\u8986\u76D6\u7387(\u4E0D\u963B\u65AD\u5DE5\u4F5C,\u53EA\u8BB0\u5F55);contract operator / store \u524D\u7F00 / skip\xB7dismissed \u8BCD\u5178 / \u7C7B\u578B\u8DEF\u7531 / \u88C1\u51B3\u9636\u68AF\u7B49\u5B8C\u6574\u89C4\u7EA6\u6743\u5A01\u8BE6\u53C2 \`fabric-review\` skill \u7684 \`ref/cite-contract.md\` \u2014\u2014 bootstrap \u53EA\u7559\u53EF\u6267\u884C core\u3002
|
|
67
|
+
`;
|
|
68
|
+
var BOOTSTRAP_CANONICAL_EN = `# Fabric Bootstrap
|
|
69
|
+
|
|
70
|
+
This project uses Fabric to manage cross-client AI knowledge and behavior rules. This file is synced into the managed block on both clients by \`fabric install\` \u2014 **do not hand-edit the block on any client**; edit here + re-run \`fabric install\`.
|
|
71
|
+
|
|
72
|
+
## For Developers
|
|
73
|
+
|
|
74
|
+
This file is the **AI client's policy & convention config**, not dev onboarding. You don't need to read the Self-archive / Cite / Phase 0.4 details.
|
|
75
|
+
As a dev you only need to: run \`fabric install\` once per repo, use \`fabric store bind <alias>\` / \`fabric store switch-write <alias>\` to wire up a write store, and run \`fabric doctor\` when something breaks.
|
|
76
|
+
**Never hand-edit \`.fabric/agents.meta.json\`** \u2014 derived state is rebuilt by the engine.
|
|
77
|
+
|
|
78
|
+
## Dev Quickstart
|
|
79
|
+
|
|
80
|
+
**What Fabric is**: a cross-client (Claude Code / Codex CLI) AI knowledge layer. Store the team/project **decisions / pitfalls / guidelines / models / processes** as markdown; hooks surface them to the AI automatically so it doesn't re-learn every time.
|
|
81
|
+
|
|
82
|
+
**What you DO** vs **what the engine does (DON'T hand-edit)**:
|
|
83
|
+
|
|
84
|
+
| You DO | You DON'T |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| Run \`fabric install\` once per repo | Hand-edit \`.fabric/agents.meta.json\` |
|
|
87
|
+
| Run \`fabric doctor\` (--fix self-heals) on trouble | Hand-edit \`.cjs\` under \`.claude/hooks/\` |
|
|
88
|
+
| Use \`fabric-archive\` / \`fabric-review\` / \`fabric store ...\` to manage store-backed knowledge | Hand-write any non-store knowledge root |
|
|
89
|
+
| \`npm install -g @fenglimg/fabric-cli@latest\` to upgrade | Memorize the 35 doctor lint codes |
|
|
90
|
+
|
|
91
|
+
**4-step loop**: \`fabric install\` (once) \u2192 bind and pick a write store \u2192 AI works normally (hook on session start + edit) \u2192 the AI writes pending entries into the current write store via MCP and returns a \`pending_path\` \u2192 review with the \`fabric-review\` skill.
|
|
92
|
+
|
|
93
|
+
**Real example**: a sprite black-edge root cause was the \`atlas.premultiplyAlpha\` flag being inverted \u2014 once archived into the store's \`knowledge/pitfalls/\`, the AI auto-references it next time a similar issue shows up.
|
|
94
|
+
|
|
95
|
+
See \`docs/USER-QUICKSTART.md\` for the full maintainer version.
|
|
96
|
+
|
|
97
|
+
## Behavior Rules
|
|
98
|
+
- **Before modifying any file**: first \`fab_recall(paths=[<file-being-edited>])\` \u2014\u2014 a single call returns the relevant KB descriptions + native read paths (\`entries[].read_path\`). \`fab_recall\` no longer delivers bodies; when you need a body, do a native Read of its \`entries[].read_path\` (\`Read <store>/knowledge/<type>/<id>--*.md\`), which the PostToolUse hook records as \`knowledge_body_read\`. Lean default: descriptions + index already suffice to discover entries; read a body once on demand, don't re-inject it every turn (KT-GLD-0005).
|
|
99
|
+
- **Never hand-edit \`.fabric/agents.meta.json\`**; the engine syncs derived state automatically \u2014 run \`fabric doctor --fix\` for an explicit reconcile.
|
|
100
|
+
|
|
101
|
+
## Knowledge Base (KB)
|
|
102
|
+
- **Discovery**: the SessionStart hook lists broad-scoped entries (scoped by \`semantic_scope\` across three tiers: \`team\` team-wide / \`project:<id>\` this-project-only (surfaces only in repos bound to that project) / \`personal\` \`KP-*\`, all three referenced the same way); editing a file may trigger a narrow hint via the PreToolUse hook.
|
|
103
|
+
- **Scope's 3 axes (why something isn't surfacing)** (KT-MOD-0001): whether an entry surfaces is decided by three **orthogonal** axes \u2014 \u2460 \`semantic_scope\` audience (\`team\` / \`project:<id>\` / \`personal\`; the wrong project binding hides it) \u2461 \`relevance_scope\` timing (\`broad\` always-on / \`narrow\` only when you edit a matching file) \u2462 \`store\` physical lib (not read without \`fabric store bind\`). The axis names collide ("team" is both an audience value and a possible store alias), so when puzzled about "why isn't this surfacing" run \`fabric audit why-not-surfaced <id>\` for a per-cause diagnosis (store unbound / scope mismatch / narrow timing).
|
|
104
|
+
- **Usage**: go one-step \`fab_recall(paths=[...])\` to fetch the relevant KB descriptions + read paths in one call; when you need a body, do a native Read of its \`entries[].read_path\` (no second MCP round-trip for the body).
|
|
105
|
+
- **session_id**: when calling \`fab_recall\`, always pass the current client session id as the \`session_id\` argument (Claude Code's session id is in the stdin payload; Codex's corresponding identifier likewise). This lets \`fabric doctor --archive-history\` and the \`fabric-hint.cjs\` Stop hook track cross-session debt accurately.
|
|
106
|
+
- **Skills (4)**: write flow \`fabric-archive\` (with source-mode cold-start backfill from git/docs) / \`fabric-review\` (with retire-deprecation + relate-edge sub-flows); store ops \`fabric-store\` / \`fabric-sync\`.
|
|
107
|
+
- **Language**: rendered per the \`language\` field in \`~/.fabric/fabric-global.json\` (machine-wide tone).
|
|
108
|
+
- **Archive cadence nudge** (rc.36): after each batch of edits (default ~20, matching the Stop hook threshold config \`archive_edit_threshold\`) / a significant decision, proactively propose the \`fabric-archive\` skill at a suitable turn \u2014 without an archive cadence the KB slowly dies.
|
|
109
|
+
- **Review backlog nudge** (rc.36): to judge the pending backlog, go through \`fab_pending action="list"\` or the \`pending_path\` returned by \`fabric-review\`; don't glob the project-local \`.fabric/knowledge/pending\`. When the visible pending count exceeds 10, proactively propose the \`fabric-review\` skill at a suitable turn to batch-review and avoid draft deadlock.
|
|
110
|
+
|
|
111
|
+
## Self-archive policy (v2.2 C1: lean spec)
|
|
112
|
+
|
|
113
|
+
When a clear archival signal appears, autonomously invoke the \`fabric-archive\` skill at the end of that turn (AI self-trigger entry E3):
|
|
114
|
+
|
|
115
|
+
- **Trigger** (either): \u2460 **User-driven normative** \u2014 the user says \`\u4EE5\u540E\` / \`always\` / \`never\` / \`\u4E0B\u6B21\` / \`\u8BB0\u4E00\u4E0B\`, or locks a direction with rationale after weighing \u22652 candidates, or rejects a suggestion and states a reason (the reason is knowledge); \u2461 **Wrong-turn-and-revert** \u2014 you tried path X, then after reflection switched to path Y (a two-step "negate + replace" structure, not mere exploratory failure).
|
|
116
|
+
- **Does NOT trigger**: pure user questions / simple refactor\xB7typo / a baseless "I learned something" insight.
|
|
117
|
+
- **Anti-loop**: at most 1 self-invocation per turn; no repeat for the same outcome in the same session; the skill's Phase 2.5 viability gate is the backstop.
|
|
118
|
+
- **Receipt (marker-free)**: just invoke the \`fabric-archive\` skill directly \u2014 no marker string to print: the skill routes an AI self-invocation to E3 by default (deterministic else-branch, no longer dependent on the AI emitting an exact string). The skill returns \`pending_path\` after writing pending \u2014 reply \`undo\` if it shouldn't be recorded (I'll call fab_review reject).
|
|
119
|
+
|
|
120
|
+
## Cite policy (v2.2 C1: recall auto-accounting, zero first-line burden)
|
|
121
|
+
|
|
122
|
+
- **Core (recall-first auto-accounting)**: before changing any file, run \`fab_recall(paths=[<file-being-edited>])\` first. The system auto-accounts the recalled KB as that edit's citation by "paths recall-hit this session overlap the edit target" \u2014\u2014 **no hand-written first reply line needed** (C1 removes the first-line \`KB:\` contract boilerplate: think-then-speak, recall is the real signal that a citation happened). The PreToolUse hook gives a soft nudge when it detects no relevant recall (nudge, not a gate, per KT-DEC-0007).
|
|
123
|
+
- **The only time to speak up (dismissed / override)**: when you judge a recalled KB should NOT apply, say one line \`dismissed: <id> (<reason>)\`; reason enum \`scope-mismatch | outdated | not-applicable | other:<text>\`. For precise annotation you may still use a first-line \`KB: <id> [applied|dismissed]\` (parser retained, backward compatible).
|
|
124
|
+
- **\`[applied]\` verification duty**: citing any id (auto or hand-written) requires first fetching the KB via fab_recall (a native Read of its body path when needed) to prevent fabricated ids. Verification failing = you cannot cite.
|
|
125
|
+
- **Audit & full spec**: \`fabric audit cite\` reports coverage (does not block your work, only records); the full spec (contract operators / store prefix / skip\xB7dismissed dictionaries / type routing / adjudication ladder) lives authoritatively in the \`fabric-review\` skill's \`ref/cite-contract.md\` \u2014\u2014 bootstrap keeps only the executable core.
|
|
126
|
+
`;
|
|
127
|
+
var BOOTSTRAP_CANONICAL_BY_LOCALE = {
|
|
128
|
+
"zh-CN": BOOTSTRAP_CANONICAL_ZH,
|
|
129
|
+
en: BOOTSTRAP_CANONICAL_EN
|
|
130
|
+
};
|
|
131
|
+
function resolveBootstrapCanonical(locale) {
|
|
132
|
+
return BOOTSTRAP_CANONICAL_BY_LOCALE[locale ?? resolveGlobalLocale()];
|
|
133
|
+
}
|
|
134
|
+
function matchBootstrapCanonicalLocale(body) {
|
|
135
|
+
for (const locale of Object.keys(BOOTSTRAP_CANONICAL_BY_LOCALE)) {
|
|
136
|
+
if (BOOTSTRAP_CANONICAL_BY_LOCALE[locale] === body) {
|
|
137
|
+
return locale;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export {
|
|
144
|
+
BOOTSTRAP_MARKER_BEGIN,
|
|
145
|
+
BOOTSTRAP_MARKER_END,
|
|
146
|
+
BOOTSTRAP_REGEX,
|
|
147
|
+
BOOTSTRAP_CANONICAL_ZH,
|
|
148
|
+
BOOTSTRAP_CANONICAL_EN,
|
|
149
|
+
BOOTSTRAP_CANONICAL_BY_LOCALE,
|
|
150
|
+
resolveBootstrapCanonical,
|
|
151
|
+
matchBootstrapCanonicalLocale
|
|
152
|
+
};
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ declare function resolveGlobalLocale(globalRoot?: string): Locale;
|
|
|
38
38
|
|
|
39
39
|
declare function normalizeLocale(raw: string | null | undefined): Locale;
|
|
40
40
|
|
|
41
|
-
declare const PROTECTED_TOKENS: readonly ["fab_recall", "fab_plan_context", "fab_get_knowledge_sections", "
|
|
41
|
+
declare const PROTECTED_TOKENS: readonly ["fab_recall", "fab_plan_context", "fab_get_knowledge_sections", "fab_propose", "fab_review", "AGENTS.md", ".fabric/agents/", ".fabric/agents/_cross/", ".fabric/human-lock.json", ".fabric/events.jsonl", "knowledge/pending", "knowledge_proposed", "relevance_scope", "relevance_paths", "narrow", "broad", "source_sessions", "proposed_reason", "session_context", "layer", "team", "personal", "pending_path", "knowledge_scope_degraded", "@HUMAN", "MUST", "NEVER"];
|
|
42
42
|
type ProtectedToken = (typeof PROTECTED_TOKENS)[number];
|
|
43
43
|
|
|
44
44
|
declare const enMessages: Messages;
|