@fenglimg/fabric-shared 2.0.0-rc.23 → 2.0.0-rc.26
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-GDYPVGWT.js → chunk-3RSYWMQU.js} +57 -1
- package/dist/{chunk-IP6VWOVE.js → chunk-4OQXR6JW.js} +31 -1
- package/dist/{chunk-GYIALPMW.js → chunk-E5LHOWTN.js} +534 -0
- package/dist/i18n/index.d.ts +21 -1
- package/dist/i18n/index.js +3 -1
- package/dist/index.d.ts +242 -16
- package/dist/index.js +141 -13
- package/dist/schemas/api-contracts.d.ts +203 -1
- package/dist/schemas/api-contracts.js +7 -1
- package/dist/templates/bootstrap-canonical.d.ts +2 -2
- package/dist/templates/bootstrap-canonical.js +1 -1
- package/package.json +1 -1
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-4OQXR6JW.js";
|
|
2
10
|
import {
|
|
3
11
|
PROTECTED_TOKENS,
|
|
4
12
|
createTranslator,
|
|
@@ -6,8 +14,9 @@ import {
|
|
|
6
14
|
detectNodeLocale,
|
|
7
15
|
enMessages,
|
|
8
16
|
normalizeLocale,
|
|
17
|
+
resolveFabricLocale,
|
|
9
18
|
zhCNMessages
|
|
10
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E5LHOWTN.js";
|
|
11
20
|
import {
|
|
12
21
|
FabExtractKnowledgeInputSchema,
|
|
13
22
|
FabExtractKnowledgeInputShape,
|
|
@@ -27,6 +36,9 @@ import {
|
|
|
27
36
|
ProposedReasonSchema,
|
|
28
37
|
StableIdSchema,
|
|
29
38
|
annotateIntentRequestSchema,
|
|
39
|
+
citeContractMetricsSchema,
|
|
40
|
+
citeCoverageReportSchema,
|
|
41
|
+
citeLayerTypeBreakdownSchema,
|
|
30
42
|
fabExtractKnowledgeAnnotations,
|
|
31
43
|
fabReviewAnnotations,
|
|
32
44
|
formatKnowledgeId,
|
|
@@ -46,16 +58,8 @@ import {
|
|
|
46
58
|
planContextInputSchema,
|
|
47
59
|
planContextOutputSchema,
|
|
48
60
|
structuredWarningSchema
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import
|
|
51
|
-
BOOTSTRAP_CANONICAL,
|
|
52
|
-
BOOTSTRAP_MARKER_BEGIN,
|
|
53
|
-
BOOTSTRAP_MARKER_END,
|
|
54
|
-
BOOTSTRAP_REGEX,
|
|
55
|
-
LEGACY_KB_MARKER_BEGIN,
|
|
56
|
-
LEGACY_KB_MARKER_END,
|
|
57
|
-
LEGACY_KB_REGEX
|
|
58
|
-
} from "./chunk-IP6VWOVE.js";
|
|
61
|
+
} from "./chunk-3RSYWMQU.js";
|
|
62
|
+
import "./chunk-LXNCAKJZ.js";
|
|
59
63
|
|
|
60
64
|
// src/schemas/agents-meta.ts
|
|
61
65
|
import { z } from "zod";
|
|
@@ -1076,6 +1080,24 @@ var assistantTurnObservedEventSchema = z10.object({
|
|
|
1076
1080
|
kb_line_raw: z10.string().nullable(),
|
|
1077
1081
|
cite_ids: z10.array(z10.string()).default([]),
|
|
1078
1082
|
cite_tags: z10.array(z10.enum(["planned", "recalled", "chained-from", "dismissed", "none"])).default([]),
|
|
1083
|
+
// v2.0.0-rc.24 TASK-01: per-cite contract commitments. Index-aligned with
|
|
1084
|
+
// cite_ids/cite_tags (commitments[i] belongs to cite_ids[i]). Each slot
|
|
1085
|
+
// carries `operators[]` (kind + glob target) or `skip_reason` when the cite
|
|
1086
|
+
// cannot be operator-ized. Old rc.20-rc.23 events naturally parse with an
|
|
1087
|
+
// empty array via `.default([])` and are excluded from contract-policy
|
|
1088
|
+
// audits by the marker-gate (see cite_contract_policy_activated below).
|
|
1089
|
+
// Mirrors the rc.20 cite_tags parallel-array evolution exactly.
|
|
1090
|
+
cite_commitments: z10.array(
|
|
1091
|
+
z10.object({
|
|
1092
|
+
operators: z10.array(
|
|
1093
|
+
z10.object({
|
|
1094
|
+
kind: z10.enum(["edit", "not_edit", "require", "forbid"]),
|
|
1095
|
+
target: z10.string()
|
|
1096
|
+
})
|
|
1097
|
+
),
|
|
1098
|
+
skip_reason: z10.string().nullable()
|
|
1099
|
+
})
|
|
1100
|
+
).default([]),
|
|
1079
1101
|
client: z10.enum(["cc", "codex", "cursor"]).optional(),
|
|
1080
1102
|
turn_id: z10.string(),
|
|
1081
1103
|
envelope_index: z10.number().int().nonnegative().optional(),
|
|
@@ -1087,6 +1109,10 @@ var citePolicyActivatedEventSchema = z10.object({
|
|
|
1087
1109
|
policy_version: z10.string(),
|
|
1088
1110
|
timestamp: z10.string().datetime()
|
|
1089
1111
|
});
|
|
1112
|
+
var citeContractPolicyActivatedEventSchema = z10.object({
|
|
1113
|
+
...eventLedgerEnvelopeSchema,
|
|
1114
|
+
event_type: z10.literal("cite_contract_policy_activated")
|
|
1115
|
+
});
|
|
1090
1116
|
var eventsRotatedEventSchema = z10.object({
|
|
1091
1117
|
...eventLedgerEnvelopeSchema,
|
|
1092
1118
|
event_type: z10.literal("events_rotated"),
|
|
@@ -1118,6 +1144,14 @@ var knowledgeEnrichedEventSchema = z10.object({
|
|
|
1118
1144
|
mode: z10.enum(["auto", "interactive"]),
|
|
1119
1145
|
timestamp: z10.string().datetime()
|
|
1120
1146
|
});
|
|
1147
|
+
var sessionArchiveAttemptedEventSchema = z10.object({
|
|
1148
|
+
...eventLedgerEnvelopeSchema,
|
|
1149
|
+
event_type: z10.literal("session_archive_attempted"),
|
|
1150
|
+
outcome: z10.enum(["proposed", "viability_failed", "user_dismissed", "skipped_no_signal"]),
|
|
1151
|
+
covered_through_ts: z10.number().int().nonnegative(),
|
|
1152
|
+
candidates_proposed: z10.number().int().nonnegative().default(0),
|
|
1153
|
+
knowledge_proposed_ids: z10.array(z10.string()).default([])
|
|
1154
|
+
});
|
|
1121
1155
|
var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
|
|
1122
1156
|
knowledgeContextPlannedEventSchema,
|
|
1123
1157
|
knowledgeSelectionEventSchema,
|
|
@@ -1170,6 +1204,10 @@ var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
|
|
|
1170
1204
|
// v2.0.0-rc.20 TASK-02: cite_policy_activated — session/policy-bump
|
|
1171
1205
|
// marker recording when a given policy_version became active.
|
|
1172
1206
|
citePolicyActivatedEventSchema,
|
|
1207
|
+
// v2.0.0-rc.24 TASK-01: cite_contract_policy_activated — drift-gated
|
|
1208
|
+
// idempotent marker opening the contract-policy audit window. Distinct
|
|
1209
|
+
// from cite_policy_activated so contract metrics get their own window.
|
|
1210
|
+
citeContractPolicyActivatedEventSchema,
|
|
1173
1211
|
// v2.0.0-rc.22 Scope D T-D1: knowledge_meta_auto_healed — emitted by
|
|
1174
1212
|
// loadActiveMeta when read-path drift triggers an in-place meta rebuild.
|
|
1175
1213
|
knowledgeMetaAutoHealedEventSchema,
|
|
@@ -1185,8 +1223,91 @@ var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
|
|
|
1185
1223
|
// `fab doctor --enrich-descriptions` once per modified canonical knowledge
|
|
1186
1224
|
// file when one or more of the four rc.23 description-grade frontmatter
|
|
1187
1225
|
// fields is back-filled.
|
|
1188
|
-
knowledgeEnrichedEventSchema
|
|
1226
|
+
knowledgeEnrichedEventSchema,
|
|
1227
|
+
// v2.0.0-rc.25 TASK-01: session_archive_attempted — emitted by the
|
|
1228
|
+
// fabric-archive skill at the end of every invocation. Drives Phase 0.0
|
|
1229
|
+
// cross-session digest, outcome-based rescan filter (skips user_dismissed),
|
|
1230
|
+
// covered_through_ts watermark, and `fab doctor --archive-history`.
|
|
1231
|
+
sessionArchiveAttemptedEventSchema
|
|
1232
|
+
]);
|
|
1233
|
+
|
|
1234
|
+
// src/cite-line-parser.ts
|
|
1235
|
+
var ID_RE = /^K[TP]-[A-Z]+-\d+$/;
|
|
1236
|
+
var SENTINEL_RE = /^KB:\s*none\b\s*(?:\[[^\]]*\])?\s*$/i;
|
|
1237
|
+
var FULL_RE = /^KB:\s+(K[TP]-[A-Z]+-\d+)(?:\s+\(([^)]*)\))?(?:\s+\[([^\]]+)\])?(?:\s+→\s*(.+))?\s*$/;
|
|
1238
|
+
var ALLOWED_TAGS = /* @__PURE__ */ new Set([
|
|
1239
|
+
"planned",
|
|
1240
|
+
"recalled",
|
|
1241
|
+
"chained-from",
|
|
1242
|
+
"dismissed",
|
|
1243
|
+
"none"
|
|
1189
1244
|
]);
|
|
1245
|
+
function parseTag(rawTag) {
|
|
1246
|
+
if (!rawTag) return "none";
|
|
1247
|
+
const head = rawTag.trim().split(/[\s:]+/)[0].toLowerCase();
|
|
1248
|
+
return ALLOWED_TAGS.has(head) ? head : "none";
|
|
1249
|
+
}
|
|
1250
|
+
function parseContractTail(tail) {
|
|
1251
|
+
const result = { operators: [], skip_reason: null };
|
|
1252
|
+
if (!tail) return result;
|
|
1253
|
+
const tokens = tail.trim().split(/\s+/).filter((t) => t.length > 0);
|
|
1254
|
+
for (const token of tokens) {
|
|
1255
|
+
const skipMatch = token.match(/^skip:(.+)$/i);
|
|
1256
|
+
if (skipMatch) {
|
|
1257
|
+
if (result.skip_reason === null) result.skip_reason = skipMatch[1];
|
|
1258
|
+
continue;
|
|
1259
|
+
}
|
|
1260
|
+
const notEditMatch = token.match(/^!edit:(.+)$/i);
|
|
1261
|
+
if (notEditMatch) {
|
|
1262
|
+
result.operators.push({ kind: "not_edit", target: notEditMatch[1] });
|
|
1263
|
+
continue;
|
|
1264
|
+
}
|
|
1265
|
+
const opMatch = token.match(/^(edit|require|forbid):(.+)$/i);
|
|
1266
|
+
if (opMatch) {
|
|
1267
|
+
result.operators.push({
|
|
1268
|
+
kind: opMatch[1].toLowerCase(),
|
|
1269
|
+
target: opMatch[2]
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
return result;
|
|
1274
|
+
}
|
|
1275
|
+
function parseLine(line) {
|
|
1276
|
+
const trimmed = line.trim();
|
|
1277
|
+
if (trimmed.length === 0) return null;
|
|
1278
|
+
if (SENTINEL_RE.test(trimmed)) {
|
|
1279
|
+
return { id: null, tag: "none", commitment: null };
|
|
1280
|
+
}
|
|
1281
|
+
const fullMatch = trimmed.match(FULL_RE);
|
|
1282
|
+
if (fullMatch) {
|
|
1283
|
+
const id = fullMatch[1];
|
|
1284
|
+
if (!ID_RE.test(id)) return null;
|
|
1285
|
+
return {
|
|
1286
|
+
id,
|
|
1287
|
+
tag: parseTag(fullMatch[3]),
|
|
1288
|
+
commitment: parseContractTail(fullMatch[4])
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
return null;
|
|
1292
|
+
}
|
|
1293
|
+
function parseCiteLine(raw) {
|
|
1294
|
+
const result = {
|
|
1295
|
+
cite_ids: [],
|
|
1296
|
+
cite_tags: [],
|
|
1297
|
+
cite_commitments: []
|
|
1298
|
+
};
|
|
1299
|
+
if (typeof raw !== "string") return result;
|
|
1300
|
+
for (const line of raw.split(/\r?\n/)) {
|
|
1301
|
+
const parsed = parseLine(line);
|
|
1302
|
+
if (!parsed) continue;
|
|
1303
|
+
result.cite_tags.push(parsed.tag);
|
|
1304
|
+
if (parsed.id !== null) result.cite_ids.push(parsed.id);
|
|
1305
|
+
if (parsed.commitment !== null) {
|
|
1306
|
+
result.cite_commitments.push(parsed.commitment);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
return result;
|
|
1310
|
+
}
|
|
1190
1311
|
export {
|
|
1191
1312
|
AGENTS_META_IDENTITY_SOURCES,
|
|
1192
1313
|
AGENTS_META_LAYERS,
|
|
@@ -1230,6 +1351,10 @@ export {
|
|
|
1230
1351
|
auditModeSchema,
|
|
1231
1352
|
bootstrapMarkerMigratedEventSchema,
|
|
1232
1353
|
candidateFileEntrySchema,
|
|
1354
|
+
citeContractMetricsSchema,
|
|
1355
|
+
citeContractPolicyActivatedEventSchema,
|
|
1356
|
+
citeCoverageReportSchema,
|
|
1357
|
+
citeLayerTypeBreakdownSchema,
|
|
1233
1358
|
citePolicyActivatedEventSchema,
|
|
1234
1359
|
claudeHookPathMigratedEventSchema,
|
|
1235
1360
|
claudeSkillPathMigratedEventSchema,
|
|
@@ -1324,6 +1449,7 @@ export {
|
|
|
1324
1449
|
metaUpdatedEventSchema,
|
|
1325
1450
|
normalizeLocale,
|
|
1326
1451
|
onboardSlotSchema,
|
|
1452
|
+
parseCiteLine,
|
|
1327
1453
|
parseKnowledgeId,
|
|
1328
1454
|
pendingAutoArchivedEventSchema,
|
|
1329
1455
|
planContextAnnotations,
|
|
@@ -1333,9 +1459,11 @@ export {
|
|
|
1333
1459
|
planContextOutputSchema,
|
|
1334
1460
|
reapplyCompletedEventSchema,
|
|
1335
1461
|
relevanceMigrationRunEventSchema,
|
|
1462
|
+
resolveFabricLocale,
|
|
1336
1463
|
ruleDescriptionIndexItemSchema,
|
|
1337
1464
|
ruleDescriptionSchema,
|
|
1338
1465
|
serveLockClearedEventSchema,
|
|
1466
|
+
sessionArchiveAttemptedEventSchema,
|
|
1339
1467
|
structuredWarningSchema,
|
|
1340
1468
|
withDerivedAgentsMetaNodeDefaults,
|
|
1341
1469
|
zhCNMessages
|
|
@@ -1630,6 +1630,208 @@ declare const fabReviewAnnotations: {
|
|
|
1630
1630
|
readonly openWorldHint: false;
|
|
1631
1631
|
readonly title: "Review pending knowledge entries";
|
|
1632
1632
|
};
|
|
1633
|
+
declare const citeContractMetricsSchema: z.ZodObject<{
|
|
1634
|
+
decisions_cited: z.ZodNumber;
|
|
1635
|
+
pitfalls_cited: z.ZodNumber;
|
|
1636
|
+
contract_with: z.ZodNumber;
|
|
1637
|
+
contract_missing: z.ZodNumber;
|
|
1638
|
+
hard_violated: z.ZodNumber;
|
|
1639
|
+
cite_id_unresolved: z.ZodNumber;
|
|
1640
|
+
skip_count: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1641
|
+
}, "strip", z.ZodTypeAny, {
|
|
1642
|
+
decisions_cited: number;
|
|
1643
|
+
pitfalls_cited: number;
|
|
1644
|
+
contract_with: number;
|
|
1645
|
+
contract_missing: number;
|
|
1646
|
+
hard_violated: number;
|
|
1647
|
+
cite_id_unresolved: number;
|
|
1648
|
+
skip_count: Record<string, number>;
|
|
1649
|
+
}, {
|
|
1650
|
+
decisions_cited: number;
|
|
1651
|
+
pitfalls_cited: number;
|
|
1652
|
+
contract_with: number;
|
|
1653
|
+
contract_missing: number;
|
|
1654
|
+
hard_violated: number;
|
|
1655
|
+
cite_id_unresolved: number;
|
|
1656
|
+
skip_count: Record<string, number>;
|
|
1657
|
+
}>;
|
|
1658
|
+
type CiteContractMetrics = z.infer<typeof citeContractMetricsSchema>;
|
|
1659
|
+
declare const citeLayerTypeBreakdownSchema: z.ZodObject<{
|
|
1660
|
+
team: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1661
|
+
personal: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1662
|
+
}, "strip", z.ZodTypeAny, {
|
|
1663
|
+
personal: Record<string, number>;
|
|
1664
|
+
team: Record<string, number>;
|
|
1665
|
+
}, {
|
|
1666
|
+
personal: Record<string, number>;
|
|
1667
|
+
team: Record<string, number>;
|
|
1668
|
+
}>;
|
|
1669
|
+
type CiteLayerTypeBreakdown = z.infer<typeof citeLayerTypeBreakdownSchema>;
|
|
1670
|
+
declare const citeCoverageReportSchema: z.ZodObject<{
|
|
1671
|
+
status: z.ZodEnum<["ok", "skipped"]>;
|
|
1672
|
+
marker_ts: z.ZodNumber;
|
|
1673
|
+
marker_emitted_now: z.ZodBoolean;
|
|
1674
|
+
since_ts: z.ZodNumber;
|
|
1675
|
+
client_filter: z.ZodEnum<["cc", "codex", "cursor", "all"]>;
|
|
1676
|
+
layer_filter: z.ZodOptional<z.ZodEnum<["team", "personal", "all"]>>;
|
|
1677
|
+
metrics: z.ZodObject<{
|
|
1678
|
+
edits_touched: z.ZodNumber;
|
|
1679
|
+
qualifying_cites: z.ZodNumber;
|
|
1680
|
+
recalled_unverified: z.ZodNumber;
|
|
1681
|
+
expected_but_missed: z.ZodNumber;
|
|
1682
|
+
total_turns: z.ZodNumber;
|
|
1683
|
+
}, "strip", z.ZodTypeAny, {
|
|
1684
|
+
edits_touched: number;
|
|
1685
|
+
qualifying_cites: number;
|
|
1686
|
+
recalled_unverified: number;
|
|
1687
|
+
expected_but_missed: number;
|
|
1688
|
+
total_turns: number;
|
|
1689
|
+
}, {
|
|
1690
|
+
edits_touched: number;
|
|
1691
|
+
qualifying_cites: number;
|
|
1692
|
+
recalled_unverified: number;
|
|
1693
|
+
expected_but_missed: number;
|
|
1694
|
+
total_turns: number;
|
|
1695
|
+
}>;
|
|
1696
|
+
per_client: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1697
|
+
edits_touched: z.ZodOptional<z.ZodNumber>;
|
|
1698
|
+
qualifying_cites: z.ZodOptional<z.ZodNumber>;
|
|
1699
|
+
recalled_unverified: z.ZodOptional<z.ZodNumber>;
|
|
1700
|
+
expected_but_missed: z.ZodOptional<z.ZodNumber>;
|
|
1701
|
+
total_turns: z.ZodOptional<z.ZodNumber>;
|
|
1702
|
+
}, "strip", z.ZodTypeAny, {
|
|
1703
|
+
edits_touched?: number | undefined;
|
|
1704
|
+
qualifying_cites?: number | undefined;
|
|
1705
|
+
recalled_unverified?: number | undefined;
|
|
1706
|
+
expected_but_missed?: number | undefined;
|
|
1707
|
+
total_turns?: number | undefined;
|
|
1708
|
+
}, {
|
|
1709
|
+
edits_touched?: number | undefined;
|
|
1710
|
+
qualifying_cites?: number | undefined;
|
|
1711
|
+
recalled_unverified?: number | undefined;
|
|
1712
|
+
expected_but_missed?: number | undefined;
|
|
1713
|
+
total_turns?: number | undefined;
|
|
1714
|
+
}>>>;
|
|
1715
|
+
dismissed_reason_histogram: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1716
|
+
none_reason_histogram: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1717
|
+
contract_metrics_status: z.ZodOptional<z.ZodEnum<["ok", "skipped:bootstrap_drift", "awaiting_marker"]>>;
|
|
1718
|
+
contract_metrics: z.ZodOptional<z.ZodObject<{
|
|
1719
|
+
decisions_cited: z.ZodNumber;
|
|
1720
|
+
pitfalls_cited: z.ZodNumber;
|
|
1721
|
+
contract_with: z.ZodNumber;
|
|
1722
|
+
contract_missing: z.ZodNumber;
|
|
1723
|
+
hard_violated: z.ZodNumber;
|
|
1724
|
+
cite_id_unresolved: z.ZodNumber;
|
|
1725
|
+
skip_count: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1726
|
+
}, "strip", z.ZodTypeAny, {
|
|
1727
|
+
decisions_cited: number;
|
|
1728
|
+
pitfalls_cited: number;
|
|
1729
|
+
contract_with: number;
|
|
1730
|
+
contract_missing: number;
|
|
1731
|
+
hard_violated: number;
|
|
1732
|
+
cite_id_unresolved: number;
|
|
1733
|
+
skip_count: Record<string, number>;
|
|
1734
|
+
}, {
|
|
1735
|
+
decisions_cited: number;
|
|
1736
|
+
pitfalls_cited: number;
|
|
1737
|
+
contract_with: number;
|
|
1738
|
+
contract_missing: number;
|
|
1739
|
+
hard_violated: number;
|
|
1740
|
+
cite_id_unresolved: number;
|
|
1741
|
+
skip_count: Record<string, number>;
|
|
1742
|
+
}>>;
|
|
1743
|
+
per_layer_type: z.ZodOptional<z.ZodObject<{
|
|
1744
|
+
team: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1745
|
+
personal: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
1746
|
+
}, "strip", z.ZodTypeAny, {
|
|
1747
|
+
personal: Record<string, number>;
|
|
1748
|
+
team: Record<string, number>;
|
|
1749
|
+
}, {
|
|
1750
|
+
personal: Record<string, number>;
|
|
1751
|
+
team: Record<string, number>;
|
|
1752
|
+
}>>;
|
|
1753
|
+
contract_marker_ts: z.ZodOptional<z.ZodNumber>;
|
|
1754
|
+
generated_at: z.ZodString;
|
|
1755
|
+
}, "strip", z.ZodTypeAny, {
|
|
1756
|
+
status: "ok" | "skipped";
|
|
1757
|
+
marker_ts: number;
|
|
1758
|
+
marker_emitted_now: boolean;
|
|
1759
|
+
since_ts: number;
|
|
1760
|
+
client_filter: "all" | "cc" | "codex" | "cursor";
|
|
1761
|
+
metrics: {
|
|
1762
|
+
edits_touched: number;
|
|
1763
|
+
qualifying_cites: number;
|
|
1764
|
+
recalled_unverified: number;
|
|
1765
|
+
expected_but_missed: number;
|
|
1766
|
+
total_turns: number;
|
|
1767
|
+
};
|
|
1768
|
+
generated_at: string;
|
|
1769
|
+
layer_filter?: "personal" | "team" | "all" | undefined;
|
|
1770
|
+
per_client?: Record<string, {
|
|
1771
|
+
edits_touched?: number | undefined;
|
|
1772
|
+
qualifying_cites?: number | undefined;
|
|
1773
|
+
recalled_unverified?: number | undefined;
|
|
1774
|
+
expected_but_missed?: number | undefined;
|
|
1775
|
+
total_turns?: number | undefined;
|
|
1776
|
+
}> | undefined;
|
|
1777
|
+
dismissed_reason_histogram?: Record<string, number> | undefined;
|
|
1778
|
+
none_reason_histogram?: Record<string, number> | undefined;
|
|
1779
|
+
contract_metrics_status?: "ok" | "skipped:bootstrap_drift" | "awaiting_marker" | undefined;
|
|
1780
|
+
contract_metrics?: {
|
|
1781
|
+
decisions_cited: number;
|
|
1782
|
+
pitfalls_cited: number;
|
|
1783
|
+
contract_with: number;
|
|
1784
|
+
contract_missing: number;
|
|
1785
|
+
hard_violated: number;
|
|
1786
|
+
cite_id_unresolved: number;
|
|
1787
|
+
skip_count: Record<string, number>;
|
|
1788
|
+
} | undefined;
|
|
1789
|
+
per_layer_type?: {
|
|
1790
|
+
personal: Record<string, number>;
|
|
1791
|
+
team: Record<string, number>;
|
|
1792
|
+
} | undefined;
|
|
1793
|
+
contract_marker_ts?: number | undefined;
|
|
1794
|
+
}, {
|
|
1795
|
+
status: "ok" | "skipped";
|
|
1796
|
+
marker_ts: number;
|
|
1797
|
+
marker_emitted_now: boolean;
|
|
1798
|
+
since_ts: number;
|
|
1799
|
+
client_filter: "all" | "cc" | "codex" | "cursor";
|
|
1800
|
+
metrics: {
|
|
1801
|
+
edits_touched: number;
|
|
1802
|
+
qualifying_cites: number;
|
|
1803
|
+
recalled_unverified: number;
|
|
1804
|
+
expected_but_missed: number;
|
|
1805
|
+
total_turns: number;
|
|
1806
|
+
};
|
|
1807
|
+
generated_at: string;
|
|
1808
|
+
layer_filter?: "personal" | "team" | "all" | undefined;
|
|
1809
|
+
per_client?: Record<string, {
|
|
1810
|
+
edits_touched?: number | undefined;
|
|
1811
|
+
qualifying_cites?: number | undefined;
|
|
1812
|
+
recalled_unverified?: number | undefined;
|
|
1813
|
+
expected_but_missed?: number | undefined;
|
|
1814
|
+
total_turns?: number | undefined;
|
|
1815
|
+
}> | undefined;
|
|
1816
|
+
dismissed_reason_histogram?: Record<string, number> | undefined;
|
|
1817
|
+
none_reason_histogram?: Record<string, number> | undefined;
|
|
1818
|
+
contract_metrics_status?: "ok" | "skipped:bootstrap_drift" | "awaiting_marker" | undefined;
|
|
1819
|
+
contract_metrics?: {
|
|
1820
|
+
decisions_cited: number;
|
|
1821
|
+
pitfalls_cited: number;
|
|
1822
|
+
contract_with: number;
|
|
1823
|
+
contract_missing: number;
|
|
1824
|
+
hard_violated: number;
|
|
1825
|
+
cite_id_unresolved: number;
|
|
1826
|
+
skip_count: Record<string, number>;
|
|
1827
|
+
} | undefined;
|
|
1828
|
+
per_layer_type?: {
|
|
1829
|
+
personal: Record<string, number>;
|
|
1830
|
+
team: Record<string, number>;
|
|
1831
|
+
} | undefined;
|
|
1832
|
+
contract_marker_ts?: number | undefined;
|
|
1833
|
+
}>;
|
|
1834
|
+
type CiteCoverageReport = z.infer<typeof citeCoverageReportSchema>;
|
|
1633
1835
|
declare const ledgerSourceSchema: z.ZodEnum<["ai", "human"]>;
|
|
1634
1836
|
declare const ledgerQuerySchema: z.ZodObject<{
|
|
1635
1837
|
source: z.ZodOptional<z.ZodEnum<["ai", "human"]>>;
|
|
@@ -1736,4 +1938,4 @@ declare function parseKnowledgeId(id: string): {
|
|
|
1736
1938
|
counter: number;
|
|
1737
1939
|
} | null;
|
|
1738
1940
|
|
|
1739
|
-
export { type FabExtractKnowledgeInput, FabExtractKnowledgeInputSchema, FabExtractKnowledgeInputShape, type FabExtractKnowledgeOutput, FabExtractKnowledgeOutputSchema, type FabReviewInput, FabReviewInputSchema, FabReviewInputShape, type FabReviewOutput, FabReviewOutputSchema, FabReviewOutputShape, KNOWLEDGE_TYPE_CODES, type KnowledgeEntryFrontmatter, KnowledgeEntryFrontmatterSchema, type KnowledgeType, type KnowledgeTypeCode, KnowledgeTypeSchema, type Layer, LayerSchema, type Maturity, MaturitySchema, PROPOSED_REASON_DESCRIPTIONS, type ProposedReason, ProposedReasonSchema, type StableId, StableIdSchema, annotateIntentRequestSchema, fabExtractKnowledgeAnnotations, fabReviewAnnotations, formatKnowledgeId, historyStateQuerySchema, humanLockApproveRequestSchema, humanLockFileParamsSchema, knowledgeSectionsAnnotations, knowledgeSectionsInputSchema, knowledgeSectionsOutputSchema, ledgerQuerySchema, ledgerSourceSchema, parseKnowledgeId, planContextAnnotations, planContextHintNarrowEntrySchema, planContextHintOutputSchema, planContextInputSchema, planContextOutputSchema, structuredWarningSchema };
|
|
1941
|
+
export { type CiteContractMetrics, type CiteCoverageReport, type CiteLayerTypeBreakdown, type FabExtractKnowledgeInput, FabExtractKnowledgeInputSchema, FabExtractKnowledgeInputShape, type FabExtractKnowledgeOutput, FabExtractKnowledgeOutputSchema, type FabReviewInput, FabReviewInputSchema, FabReviewInputShape, type FabReviewOutput, FabReviewOutputSchema, FabReviewOutputShape, KNOWLEDGE_TYPE_CODES, type KnowledgeEntryFrontmatter, KnowledgeEntryFrontmatterSchema, type KnowledgeType, type KnowledgeTypeCode, KnowledgeTypeSchema, type Layer, LayerSchema, type Maturity, MaturitySchema, PROPOSED_REASON_DESCRIPTIONS, type ProposedReason, ProposedReasonSchema, type StableId, StableIdSchema, annotateIntentRequestSchema, citeContractMetricsSchema, citeCoverageReportSchema, citeLayerTypeBreakdownSchema, fabExtractKnowledgeAnnotations, fabReviewAnnotations, formatKnowledgeId, historyStateQuerySchema, humanLockApproveRequestSchema, humanLockFileParamsSchema, knowledgeSectionsAnnotations, knowledgeSectionsInputSchema, knowledgeSectionsOutputSchema, ledgerQuerySchema, ledgerSourceSchema, parseKnowledgeId, planContextAnnotations, planContextHintNarrowEntrySchema, planContextHintOutputSchema, planContextInputSchema, planContextOutputSchema, structuredWarningSchema };
|
|
@@ -15,6 +15,9 @@ import {
|
|
|
15
15
|
ProposedReasonSchema,
|
|
16
16
|
StableIdSchema,
|
|
17
17
|
annotateIntentRequestSchema,
|
|
18
|
+
citeContractMetricsSchema,
|
|
19
|
+
citeCoverageReportSchema,
|
|
20
|
+
citeLayerTypeBreakdownSchema,
|
|
18
21
|
fabExtractKnowledgeAnnotations,
|
|
19
22
|
fabReviewAnnotations,
|
|
20
23
|
formatKnowledgeId,
|
|
@@ -33,7 +36,7 @@ import {
|
|
|
33
36
|
planContextInputSchema,
|
|
34
37
|
planContextOutputSchema,
|
|
35
38
|
structuredWarningSchema
|
|
36
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-3RSYWMQU.js";
|
|
37
40
|
export {
|
|
38
41
|
FabExtractKnowledgeInputSchema,
|
|
39
42
|
FabExtractKnowledgeInputShape,
|
|
@@ -51,6 +54,9 @@ export {
|
|
|
51
54
|
ProposedReasonSchema,
|
|
52
55
|
StableIdSchema,
|
|
53
56
|
annotateIntentRequestSchema,
|
|
57
|
+
citeContractMetricsSchema,
|
|
58
|
+
citeCoverageReportSchema,
|
|
59
|
+
citeLayerTypeBreakdownSchema,
|
|
54
60
|
fabExtractKnowledgeAnnotations,
|
|
55
61
|
fabReviewAnnotations,
|
|
56
62
|
formatKnowledgeId,
|
|
@@ -49,8 +49,8 @@ declare const LEGACY_KB_REGEX: RegExp;
|
|
|
49
49
|
* {@link BOOTSTRAP_MARKER_END} by `fab install` across all three supported
|
|
50
50
|
* clients (Claude Code, Cursor, Codex CLI).
|
|
51
51
|
*
|
|
52
|
-
* Length guarantee: ≥
|
|
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 `fab install` \u540C\u6B65\u5230\u4E09\u7AEF managed block,**\u4E0D\u8981\u624B\u52A8\u7F16\u8F91\u4E09\u7AEF\u7684 block**,\u53EA\u6539\u8FD9\u91CC + \u91CD\u8DD1 `fab install`\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 `fab doctor --fix`\u3002\n\n## \u77E5\u8BC6\u5E93(KB)\n- **Discovery**:SessionStart hook \u5217 broad-scoped \u6761\u76EE;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- **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## 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- **\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**: `fab 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";
|
|
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 `fab install` \u540C\u6B65\u5230\u4E09\u7AEF managed block,**\u4E0D\u8981\u624B\u52A8\u7F16\u8F91\u4E09\u7AEF\u7684 block**,\u53EA\u6539\u8FD9\u91CC + \u91CD\u8DD1 `fab install`\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 `fab 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 `fab 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**: `fab 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 };
|