@fenglimg/fabric-shared 2.0.0-rc.34 → 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/dist/{chunk-4OQXR6JW.js → chunk-COWUGYWC.js} +10 -4
- package/dist/{chunk-Z7UPW75I.js → chunk-S2OX6ZUS.js} +183 -133
- package/dist/{chunk-Y2YBFL2G.js → chunk-Z26SD627.js} +3 -3
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +24 -20
- package/dist/schemas/api-contracts.js +1 -1
- package/dist/templates/bootstrap-canonical.d.ts +3 -3
- package/dist/templates/bootstrap-canonical.js +1 -1
- package/package.json +1 -1
|
@@ -85,7 +85,7 @@ var planContextInputSchema = z2.object({
|
|
|
85
85
|
client_hash: z2.string().optional().describe("Revision hash from a prior fab_plan_context response; enables stale detection"),
|
|
86
86
|
correlation_id: z2.string().optional().describe("Optional caller-provided correlation id for Event Ledger records"),
|
|
87
87
|
session_id: z2.string().optional().describe(
|
|
88
|
-
"Recommended: pass the current client session id (Claude Code: $session_id; Codex: corresponding identifier) \u2014 enables cross-session debt tracking in
|
|
88
|
+
"Recommended: pass the current client session id (Claude Code: $session_id; Codex: corresponding identifier) \u2014 enables cross-session debt tracking in fabric doctor and accurate archive-hint cross-session count. Falls back gracefully if omitted."
|
|
89
89
|
),
|
|
90
90
|
// v2.0-rc.5 A3 (TASK-007): `include_deprecated` removed — it was a no-op
|
|
91
91
|
// placeholder (MaturitySchema has no `deprecated` value). When the maturity
|
|
@@ -313,8 +313,8 @@ var _FabExtractKnowledgeInputBaseSchema = z2.object({
|
|
|
313
313
|
),
|
|
314
314
|
// v2.0.0-rc.23 TASK-014 (F8c): optional onboard-slot tag. The S5 slot
|
|
315
315
|
// mechanism reintroduces a Skill-orchestrated "project tone" capture
|
|
316
|
-
// surface after F8a deleted the auto-`
|
|
317
|
-
// fabric-archive's first-run phase reads `
|
|
316
|
+
// surface after F8a deleted the auto-`fabric scan` baseline pipeline.
|
|
317
|
+
// fabric-archive's first-run phase reads `fabric onboard-coverage` to
|
|
318
318
|
// discover unclaimed slots, then propagates the chosen slot label here
|
|
319
319
|
// so the resulting pending entry counts toward coverage.
|
|
320
320
|
//
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -17,10 +17,10 @@ declare function detectNodeLocale(): Locale;
|
|
|
17
17
|
* 1. Read `<projectRoot>/.fabric/fabric-config.json` and inspect
|
|
18
18
|
* `fabric_language`.
|
|
19
19
|
* 2. If the value is `"en"` or `"zh-CN"` (the two concrete Locale members),
|
|
20
|
-
* return it verbatim — this is the eager-resolved value `
|
|
20
|
+
* return it verbatim — this is the eager-resolved value `fabric init` is
|
|
21
21
|
* supposed to write back per KT-DEC-9004.
|
|
22
22
|
* 3. If the value is `"match-existing"` or `"zh-CN-hybrid"` (placeholders
|
|
23
|
-
* that should NEVER survive `
|
|
23
|
+
* that should NEVER survive `fabric init` per KT-DEC-9004's invariant),
|
|
24
24
|
* emit a `console.warn` and fall through to `detectNodeLocale()`.
|
|
25
25
|
* 4. If the file is missing, unreadable, malformed JSON, or `fabric_language`
|
|
26
26
|
* is absent / has any other shape, silently fall through to
|
package/dist/i18n/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1344,7 +1344,7 @@ interface PanelFieldMeta {
|
|
|
1344
1344
|
format_for_display(value: unknown): string;
|
|
1345
1345
|
}
|
|
1346
1346
|
/**
|
|
1347
|
-
* Returns the per-field metadata array driving the `
|
|
1347
|
+
* Returns the per-field metadata array driving the `fabric config` clack panel.
|
|
1348
1348
|
* Group A (2) + Group B (8) + Group C (1) = 11 entries.
|
|
1349
1349
|
*/
|
|
1350
1350
|
declare function getPanelFields(): readonly PanelFieldMeta[];
|
|
@@ -4997,7 +4997,7 @@ declare const editIntentCheckedEventSchema: z.ZodObject<{
|
|
|
4997
4997
|
compliant: z.ZodBoolean;
|
|
4998
4998
|
intent: z.ZodString;
|
|
4999
4999
|
ledger_entry_id: z.ZodString;
|
|
5000
|
-
ledger_source: z.ZodOptional<z.ZodEnum<["ai", "human"]>>;
|
|
5000
|
+
ledger_source: z.ZodOptional<z.ZodEnum<["ai", "human", "hook"]>>;
|
|
5001
5001
|
commit_sha: z.ZodOptional<z.ZodString>;
|
|
5002
5002
|
parent_sha: z.ZodOptional<z.ZodString>;
|
|
5003
5003
|
parent_ledger_entry_id: z.ZodOptional<z.ZodString>;
|
|
@@ -5030,7 +5030,7 @@ declare const editIntentCheckedEventSchema: z.ZodObject<{
|
|
|
5030
5030
|
parent_sha?: string | undefined;
|
|
5031
5031
|
parent_ledger_entry_id?: string | undefined;
|
|
5032
5032
|
diff_stat?: string | undefined;
|
|
5033
|
-
ledger_source?: "ai" | "human" | undefined;
|
|
5033
|
+
ledger_source?: "ai" | "human" | "hook" | undefined;
|
|
5034
5034
|
}, {
|
|
5035
5035
|
path: string;
|
|
5036
5036
|
id: string;
|
|
@@ -5050,7 +5050,7 @@ declare const editIntentCheckedEventSchema: z.ZodObject<{
|
|
|
5050
5050
|
parent_sha?: string | undefined;
|
|
5051
5051
|
parent_ledger_entry_id?: string | undefined;
|
|
5052
5052
|
diff_stat?: string | undefined;
|
|
5053
|
-
ledger_source?: "ai" | "human" | undefined;
|
|
5053
|
+
ledger_source?: "ai" | "human" | "hook" | undefined;
|
|
5054
5054
|
}>;
|
|
5055
5055
|
declare const knowledgeDriftDetectedEventSchema: z.ZodObject<{
|
|
5056
5056
|
event_type: z.ZodLiteral<"knowledge_drift_detected">;
|
|
@@ -6637,7 +6637,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
6637
6637
|
compliant: z.ZodBoolean;
|
|
6638
6638
|
intent: z.ZodString;
|
|
6639
6639
|
ledger_entry_id: z.ZodString;
|
|
6640
|
-
ledger_source: z.ZodOptional<z.ZodEnum<["ai", "human"]>>;
|
|
6640
|
+
ledger_source: z.ZodOptional<z.ZodEnum<["ai", "human", "hook"]>>;
|
|
6641
6641
|
commit_sha: z.ZodOptional<z.ZodString>;
|
|
6642
6642
|
parent_sha: z.ZodOptional<z.ZodString>;
|
|
6643
6643
|
parent_ledger_entry_id: z.ZodOptional<z.ZodString>;
|
|
@@ -6670,7 +6670,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
6670
6670
|
parent_sha?: string | undefined;
|
|
6671
6671
|
parent_ledger_entry_id?: string | undefined;
|
|
6672
6672
|
diff_stat?: string | undefined;
|
|
6673
|
-
ledger_source?: "ai" | "human" | undefined;
|
|
6673
|
+
ledger_source?: "ai" | "human" | "hook" | undefined;
|
|
6674
6674
|
}, {
|
|
6675
6675
|
path: string;
|
|
6676
6676
|
id: string;
|
|
@@ -6690,7 +6690,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
|
|
|
6690
6690
|
parent_sha?: string | undefined;
|
|
6691
6691
|
parent_ledger_entry_id?: string | undefined;
|
|
6692
6692
|
diff_stat?: string | undefined;
|
|
6693
|
-
ledger_source?: "ai" | "human" | undefined;
|
|
6693
|
+
ledger_source?: "ai" | "human" | "hook" | undefined;
|
|
6694
6694
|
}>, z.ZodObject<{
|
|
6695
6695
|
event_type: z.ZodLiteral<"knowledge_drift_detected">;
|
|
6696
6696
|
revision: z.ZodOptional<z.ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
BOOTSTRAP_CANONICAL,
|
|
3
|
+
BOOTSTRAP_MARKER_BEGIN,
|
|
4
|
+
BOOTSTRAP_MARKER_END,
|
|
5
|
+
BOOTSTRAP_REGEX,
|
|
6
|
+
LEGACY_KB_MARKER_BEGIN,
|
|
7
|
+
LEGACY_KB_MARKER_END,
|
|
8
|
+
LEGACY_KB_REGEX
|
|
9
|
+
} from "./chunk-COWUGYWC.js";
|
|
2
10
|
import {
|
|
3
11
|
PROTECTED_TOKENS,
|
|
4
12
|
createTranslator,
|
|
@@ -8,7 +16,7 @@ import {
|
|
|
8
16
|
normalizeLocale,
|
|
9
17
|
resolveFabricLocale,
|
|
10
18
|
zhCNMessages
|
|
11
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-S2OX6ZUS.js";
|
|
12
20
|
import {
|
|
13
21
|
FabExtractKnowledgeInputSchema,
|
|
14
22
|
FabExtractKnowledgeInputShape,
|
|
@@ -50,16 +58,8 @@ import {
|
|
|
50
58
|
planContextInputSchema,
|
|
51
59
|
planContextOutputSchema,
|
|
52
60
|
structuredWarningSchema
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import
|
|
55
|
-
BOOTSTRAP_CANONICAL,
|
|
56
|
-
BOOTSTRAP_MARKER_BEGIN,
|
|
57
|
-
BOOTSTRAP_MARKER_END,
|
|
58
|
-
BOOTSTRAP_REGEX,
|
|
59
|
-
LEGACY_KB_MARKER_BEGIN,
|
|
60
|
-
LEGACY_KB_MARKER_END,
|
|
61
|
-
LEGACY_KB_REGEX
|
|
62
|
-
} from "./chunk-4OQXR6JW.js";
|
|
61
|
+
} from "./chunk-Z26SD627.js";
|
|
62
|
+
import "./chunk-LXNCAKJZ.js";
|
|
63
63
|
|
|
64
64
|
// src/schemas/agents-meta.ts
|
|
65
65
|
import { z } from "zod";
|
|
@@ -504,12 +504,12 @@ var fabricConfigSchema = z5.object({
|
|
|
504
504
|
fabric_event_retention_days: z5.union([z5.literal(7), z5.literal(30), z5.literal(90)]).optional(),
|
|
505
505
|
// v2.0.0-rc.23 TASK-014 (F8c): onboard slot opt-out list. Tracks slot
|
|
506
506
|
// names the user explicitly dismissed during fabric-archive's first-run
|
|
507
|
-
// onboard phase (or via `
|
|
508
|
-
// slots are excluded from `
|
|
507
|
+
// onboard phase (or via `fabric config dismiss-slot <slot>`). Dismissed
|
|
508
|
+
// slots are excluded from `fabric onboard-coverage`'s `missing` set and the
|
|
509
509
|
// doctor `Onboard coverage` advisory's recompute, so the user is never
|
|
510
510
|
// re-prompted for slots they consciously declined.
|
|
511
511
|
//
|
|
512
|
-
// Re-opening a dismissed slot requires `
|
|
512
|
+
// Re-opening a dismissed slot requires `fabric config onboard-reset <slot>`
|
|
513
513
|
// — a deliberate two-command UX to keep the dismiss intent reversible
|
|
514
514
|
// but never silently undone. Schema is intentionally `z.array(z.string())`
|
|
515
515
|
// rather than `z.array(onboardSlotSchema)` so historical configs survive
|
|
@@ -956,7 +956,11 @@ var editIntentCheckedEventSchema = z10.object({
|
|
|
956
956
|
compliant: z10.boolean(),
|
|
957
957
|
intent: z10.string(),
|
|
958
958
|
ledger_entry_id: z10.string(),
|
|
959
|
-
|
|
959
|
+
// rc.35 TASK-07 (P0-2): add "hook" — emitted by the PreToolUse narrow hook
|
|
960
|
+
// for every Edit/Write/MultiEdit fire so cite-coverage doctor metrics see
|
|
961
|
+
// actual edit signals (previously editsTouched was permanently 0 because
|
|
962
|
+
// no production caller of appendLedgerEntry existed).
|
|
963
|
+
ledger_source: z10.enum(["ai", "human", "hook"]).optional(),
|
|
960
964
|
commit_sha: z10.string().optional(),
|
|
961
965
|
parent_sha: z10.string().optional(),
|
|
962
966
|
parent_ledger_entry_id: z10.string().optional(),
|
|
@@ -1316,7 +1320,7 @@ var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
|
|
|
1316
1320
|
eventLedgerTruncatedEventSchema,
|
|
1317
1321
|
mcpConfigMigratedEventSchema,
|
|
1318
1322
|
// v2.0.0-rc.19 TASK-004: bootstrap_marker_migrated — one-time fabric:knowledge-base
|
|
1319
|
-
// → fabric:bootstrap marker rewrite emitted per file by `
|
|
1323
|
+
// → fabric:bootstrap marker rewrite emitted per file by `fabric doctor --fix`.
|
|
1320
1324
|
bootstrapMarkerMigratedEventSchema,
|
|
1321
1325
|
metaReconciledOnStartupEventSchema,
|
|
1322
1326
|
metaReconciledEventSchema,
|
|
@@ -1371,18 +1375,18 @@ var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
|
|
|
1371
1375
|
// stale entries to events.archive/events-rotated-YYYY-MM-DD.jsonl.
|
|
1372
1376
|
eventsRotatedEventSchema,
|
|
1373
1377
|
// v2.0.0-rc.23 TASK-010 (e): serve_lock_cleared — emitted by
|
|
1374
|
-
// `
|
|
1378
|
+
// `fabric doctor --fix` when a stale `.fabric/.serve.lock` with a dead PID is
|
|
1375
1379
|
// unlinked.
|
|
1376
1380
|
serveLockClearedEventSchema,
|
|
1377
1381
|
// v2.0.0-rc.23 TASK-007 (a-C2): knowledge_enriched — emitted by
|
|
1378
|
-
// `
|
|
1382
|
+
// `fabric doctor --enrich-descriptions` once per modified canonical knowledge
|
|
1379
1383
|
// file when one or more of the four rc.23 description-grade frontmatter
|
|
1380
1384
|
// fields is back-filled.
|
|
1381
1385
|
knowledgeEnrichedEventSchema,
|
|
1382
1386
|
// v2.0.0-rc.25 TASK-01: session_archive_attempted — emitted by the
|
|
1383
1387
|
// fabric-archive skill at the end of every invocation. Drives Phase 0.0
|
|
1384
1388
|
// cross-session digest, outcome-based rescan filter (skips user_dismissed),
|
|
1385
|
-
// covered_through_ts watermark, and `
|
|
1389
|
+
// covered_through_ts watermark, and `fabric doctor --archive-history`.
|
|
1386
1390
|
sessionArchiveAttemptedEventSchema
|
|
1387
1391
|
]);
|
|
1388
1392
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canonical Fabric bootstrap content + marker constants — single source of truth
|
|
3
|
-
* consumed by both `
|
|
3
|
+
* consumed by both `fabric install` (writer) and the server-side doctor (drift
|
|
4
4
|
* comparator). Mirrors the rc.18 banner-i18n shared-module pattern: shared
|
|
5
5
|
* constants in `packages/shared` so the cross-package boundary stays clean
|
|
6
6
|
* (server has zero dep on cli).
|
|
@@ -46,11 +46,11 @@ declare const LEGACY_KB_REGEX: RegExp;
|
|
|
46
46
|
/**
|
|
47
47
|
* Canonical bootstrap body — byte-locked per rc.19 locked clarification 3.
|
|
48
48
|
* Rendered into the managed block between {@link BOOTSTRAP_MARKER_BEGIN} and
|
|
49
|
-
* {@link BOOTSTRAP_MARKER_END} by `
|
|
49
|
+
* {@link BOOTSTRAP_MARKER_END} by `fabric install` across all three supported
|
|
50
50
|
* clients (Claude Code, Cursor, Codex CLI).
|
|
51
51
|
*
|
|
52
52
|
* Length guarantee: ≥ 800 bytes (rc.24: grew from ≥400 with cite-contract syntax).
|
|
53
53
|
*/
|
|
54
|
-
declare const BOOTSTRAP_CANONICAL = "# Fabric Bootstrap\n\n\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 `
|
|
54
|
+
declare const BOOTSTRAP_CANONICAL = "# Fabric Bootstrap\n\n\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\u4E09\u7AEF managed block,**\u4E0D\u8981\u624B\u52A8\u7F16\u8F91\u4E09\u7AEF\u7684 block**,\u53EA\u6539\u8FD9\u91CC + \u91CD\u8DD1 `fabric install`\u3002\n\n## For Developers\n\n\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\n\u4F5C\u4E3A dev \u4F60\u53EA\u9700\u8981:\u5728\u6BCF\u4E2A repo \u8DD1\u4E00\u6B21 `fabric install`,\u51FA\u95EE\u9898\u8DD1 `fabric doctor`,\u5728 `.fabric/knowledge/<type>/` \u4E0B\u5199 markdown\u3002\n\u5B8C\u6574 5 \u5206\u949F\u7248 quickstart \u89C1 `docs/USER-QUICKSTART.md`\u3002**\u4E25\u7981\u624B\u52A8\u7F16\u8F91 `.fabric/agents.meta.json`** \u2014 \u6D3E\u751F\u72B6\u6001\u7531 engine \u91CD\u5EFA\u3002\n\n## \u884C\u4E3A\u89C4\u5219\n- **\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\u524D**:\u4E24\u6B65\u8C03\u7528\u2014\u2014\u5148 `fab_plan_context(paths=[<\u88AB\u6539\u6587\u4EF6>])` \u62FF\u5230 `selection_token` \u4E0E\u5019\u9009 `entries`(\u6311 `selectable===true` \u7684 `stable_id`),\u518D `fab_get_knowledge_sections({ selection_token, ai_selected_stable_ids: [<id>...] })` \u53D6\u89C4\u5219\u6B63\u6587\u3002\n- **`.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\n\n## \u77E5\u8BC6\u5E93(KB)\n- **Discovery**:SessionStart hook \u5217 broad-scoped \u6761\u76EE(\u542B personal layer `KP-*` \u6761\u76EE,\u5F15\u7528\u65B9\u5F0F\u76F8\u540C);edit \u6587\u4EF6\u65F6 PreToolUse hook \u53EF\u80FD\u89E6\u53D1 narrow hint\u3002\n- **Usage**:\u4E24\u6B65\u5F0F\u2014\u2014`fab_plan_context(paths=[...])` \u8FD4\u56DE `selection_token` + \u5019\u9009 entries,\u518D `fab_get_knowledge_sections({ selection_token, ai_selected_stable_ids: [<id>...] })` \u62C9\u5168\u6587;`selection_token` \u5FC5\u987B\u6765\u81EA\u6700\u8FD1\u4E00\u6B21 `fab_plan_context`,\u4E0D\u53EF\u51ED\u7A7A\u7F16\u9020\u3002\n- **session_id**: \u8C03\u7528 `fab_plan_context` \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 archive-hint hook \u51C6\u786E\u8BC6\u522B\u8DE8\u4F1A\u8BDD debt \u72B6\u6001\u3002\n- **Write flows**:`fabric-archive` / `fabric-review` / `fabric-import` \u4E09\u4E2A Skills\u3002\n- **Language**:\u6E32\u67D3\u6309 `.fabric/fabric-config.json` \u7684 `fabric_language` \u5B57\u6BB5\u3002\n\n## Self-archive policy\n\n- **\u89E6\u53D1**: \u672C\u4F1A\u8BDD\u51FA\u73B0\u4EE5\u4E0B\u4EFB\u4E00\u4FE1\u53F7, \u5728\u8BE5 turn \u56DE\u590D\u672B\u5C3E\u81EA\u4E3B\u8C03\u7528 `fabric-archive` skill (E3-strong mode):\n 1. **Normative \u8BED\u8A00** \u2014 \u7528\u6237\u6D88\u606F\u51FA\u73B0 `\u4EE5\u540E` / `always` / `never` / `from now on` / `\u4E0B\u6B21\u6CE8\u610F` / `\u8BB0\u4E00\u4E0B` / `\u6C38\u8FDC\u4E0D\u8981`\n 2. **Wrong-turn-and-revert** \u2014 AI \u5C1D\u8BD5 path X, \u53CD\u601D\u540E\u6539\u8D70 path Y (\u5C24\u5176\u5F53 path X \u662F\u975E\u663E\u7136\u8E29\u5751)\n 3. **Decision confirmation** \u2014 \u7528\u6237\u5728 \u22652 \u5019\u9009\u4E2D\u6743\u8861\u540E\u7ED9\u51FA rationale \u9501\u5B9A\u65B9\u5411\n 4. **Explicit dismissal with reason** \u2014 \u7528\u6237\u62D2\u4E86\u67D0\u5EFA\u8BAE**\u5E76**\u8BF4\u4E86\u539F\u56E0\n\n- **Anti-trigger** (\u660E\u786E\u4E0D\u89E6\u53D1):\n - \u7528\u6237\u7EAF\u8BE2\u95EE (\u65E0 normative \u8868\u8FBE)\n - \u7B80\u5355 refactor / typo fix\n - AI \u81EA\u5DF1\u4EA7\u751F\u7684'\u6D1E\u5BDF' (\u5FC5\u987B\u7531\u7528\u6237\u6D88\u606F\u4E2D\u4FE1\u53F7\u89E6\u53D1)\n\n- **Anti-loop \u4E09\u6761\u9632\u62A4**:\n - \u540C turn \u6700\u591A\u81EA\u8C03 1 \u6B21\n - \u540C session \u540C outcome \u4E0D\u91CD\u590D (\u82E5 user_dismissed, \u672C\u4F1A\u8BDD\u4E0D\u518D\u81EA\u8C03\u76F8\u540C\u4E3B\u9898)\n - Phase 0.5 viability gate \u515C\u5E95 (skill \u5185\u90E8\u4ECD\u8DD1 gate, AI \u5224\u9519\u4E0D\u4F1A\u4E71\u5199 pending)\n\n- **\u5448\u73B0\u6A21\u677F** (turn \u672B\u5C3E\u63D2\u5165, \u4E24\u884C: \u5148 marker \u884C\u4F9B Phase 0.4 \u68C0\u6D4B, \u518D user-facing \u63D0\u793A):\n ```\n self-archive policy triggered by signal: <Normative|Wrong-turn-and-revert|Decision confirmation|Explicit dismissal>\n \u987A\u624B\u5F52\u6863: \u6CE8\u610F\u5230\u4F60\u8BF4 `<\u89E6\u53D1\u77ED\u8BED>`, \u5DF2\u8C03\u7528 fabric-archive \u6293 N \u6761\u5019\u9009 \u2192 .fabric/knowledge/pending/...\n \u82E5\u4E0D\u8BE5\u8BB0, \u7B54 '\u64A4\u9500' \u6211\u4F1A\u8C03 fab_review reject\u3002\n ```\n \u7B2C\u4E00\u884C\u662F Phase 0.4 Trigger Gate \u7528\u6765\u8BC6\u522B E3 \u5165\u53E3\u7684 structured marker (verbatim \u5B57\u7B26\u4E32 `self-archive policy triggered by signal`, \u540E\u63A5\u5192\u53F7 + \u89E6\u53D1\u4FE1\u53F7\u540D)\u3002\u7B2C\u4E8C\u884C\u8D77\u662F\u7ED9\u7528\u6237\u770B\u7684\u4E2D\u6587\u63D0\u793A\u3002\u4E24\u884C\u90FD\u5FC5\u987B\u51FA\u73B0; \u7F3A marker \u884C Phase 0.4 \u65E0\u6CD5\u8DEF\u7531\u5230 E3_ai_self_trigger\u3002\n\n## Cite policy\n\n- **\u89E6\u53D1**: \u505A edit / decide / propose plan \u4E4B\u524D,**\u56DE\u590D\u9996\u884C**\u5FC5\u987B\u5199 `KB: <id> (<\u22648\u5B57 \u7528\u6CD5>) [planned|recalled|chained-from <id>|dismissed:<reason>]` \u6216 `KB: none [<reason>]`\u3002\n- **`[recalled]` \u9A8C\u8BC1**: \u5FC5\u987B\u7D27\u8DDF\u4E24\u6B65\u8C03\u7528\u2014\u2014\u5148 `fab_plan_context(paths=[...])` \u62FF `selection_token`,\u518D `fab_get_knowledge_sections({ selection_token, ai_selected_stable_ids: [<id>] })`,\u9632\u6B62\u7F16\u9020 id\u3002\n- **contract \u8BED\u6CD5**: decisions/pitfalls \u7C7B\u5F15\u7528\u5FC5\u987B\u5728\u5C3E\u6BB5\u52A0 contract: `\u2192 <operator> [<operator> ...]`,operator \u2208 {`edit:<glob>` `!edit:<glob>` `require:<symbol>` `forbid:<symbol>` `skip:<reason>`}\u3002\u4F8B:`KB: K-001 (auth) [planned] \u2192 edit:src/auth/**/*.ts !edit:src/legacy/**`\u3002\n- **skip reason \u8BCD\u5178**: `sequencing | conditional | semantic | aesthetic | architectural | other:<text>`\u3002\n- **type \u8DEF\u7531**: models \u7C7B\u5F15\u7528\u4E3A reference cite,\u4E0D\u9700\u8981 contract;guidelines/processes \u7C7B\u6682\u4E0D\u5F3A\u5236,\u63A8\u540E LLM-judge\u3002\n- **\u7528\u6237\u53E3\u5934\u63D0\u89C4\u5219\u6CA1\u7ED9 id**: \u5148\u8C03 `fab_extract_knowledge` \u6216 `search_context` \u53CD\u67E5\u3002\n- **dismissed reason**: \u679A\u4E3E `scope-mismatch | outdated | not-applicable | other:<text>`\u3002\n- **`KB: none` sentinel**: \u679A\u4E3E\u4E24\u79CD\u5408\u89C4\u7406\u7531\u2014\u2014`[no-relevant]` \u5DF2\u8C03 `fab_plan_context`(\u6216 hook \u8F93\u51FA\u53EF\u89C1)\u4F46\u65E0\u53EF\u7528\u6761\u76EE;`[not-applicable]` \u5F53\u524D\u52A8\u4F5C\u4E0D\u5728 cite \u8303\u56F4(\u7EAF\u63A2\u7D22 / Bash \u53EA\u8BFB / \u7528\u6237\u95EE\u7B54)\u3002\u88F8 `KB: none`(\u65E0\u540E\u7F00)\u4ECD\u7136 valid,\u5F52\u7C7B\u4E3A `[unspecified]`(legacy \u517C\u5BB9,\u9F13\u52B1\u540E\u7EED\u8865\u6CE8)\u3002\n- **\u7A3D\u6838**: `fabric doctor --cite-coverage [--since=7d] [--client=cc|codex|all]` \u8F93\u51FA cite \u8986\u76D6\u7387,\u542B `KB: none` sentinel \u62C6\u5206\u3002\u672C\u89C4\u5219\u4E0D\u963B\u65AD\u4F60\u5DE5\u4F5C,\u53EA\u8BB0\u5F55\u3002\n";
|
|
55
55
|
|
|
56
56
|
export { BOOTSTRAP_CANONICAL, BOOTSTRAP_MARKER_BEGIN, BOOTSTRAP_MARKER_END, BOOTSTRAP_REGEX, LEGACY_KB_MARKER_BEGIN, LEGACY_KB_MARKER_END, LEGACY_KB_REGEX };
|