ld-vibe-harness 0.2.0 → 0.3.0

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.
Files changed (85) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/.codex-plugin/plugin.json +4 -4
  3. package/CHANGELOG.md +32 -0
  4. package/README.en.md +13 -12
  5. package/README.md +20 -20
  6. package/adapters/antigravity/installer.js +26 -8
  7. package/adapters/dsh/index.js +0 -3
  8. package/adapters/dsh/package.json +2 -2
  9. package/agents/ldvh-experience-recorder.md +2 -3
  10. package/agents/ldvh-post-work-reviewer.md +0 -1
  11. package/agents/ldvh-pre-action-reviewer.md +0 -1
  12. package/agents/ldvh-researcher.md +1 -2
  13. package/cli/ldvh.mjs +137 -5
  14. package/docs/ARCHITECTURE.md +37 -37
  15. package/docs/PRIVACY.md +7 -6
  16. package/hooks/_client.mjs +1 -12
  17. package/hooks/hook-engine.js +684 -84
  18. package/lib/capture-notice.js +8 -22
  19. package/lib/commit-validation.js +0 -59
  20. package/lib/data-paths.js +0 -1
  21. package/lib/experience-arming.js +10 -4
  22. package/lib/gate-events.js +27 -2
  23. package/lib/git-gate-runner.js +83 -34
  24. package/lib/goal-anchor.js +17 -45
  25. package/lib/goal-tools.js +4 -26
  26. package/lib/goal-writer.js +5 -18
  27. package/lib/governed-projects.js +18 -7
  28. package/lib/guidance-budget.js +2 -2
  29. package/lib/guidance-text.js +7 -7
  30. package/lib/hook-manager.js +40 -14
  31. package/lib/hook-repair.js +77 -13
  32. package/lib/host-api.js +7 -3
  33. package/lib/host-seams.js +78 -57
  34. package/lib/idle-settings.js +1 -4
  35. package/lib/intent-tools.js +6 -14
  36. package/lib/intent-writer.js +12 -45
  37. package/lib/ldvh-tools.js +26 -61
  38. package/lib/object-identifier.js +0 -2
  39. package/lib/object-reference.js +0 -2
  40. package/lib/operation-declarations.bundle.json +1 -64
  41. package/lib/recall-criteria.bundle.json +2 -67
  42. package/lib/recall-criteria.js +0 -2
  43. package/lib/recall-injection.js +1 -5
  44. package/lib/recall-synonyms.js +1 -3
  45. package/lib/research-consult-tools.js +201 -19
  46. package/lib/research-consult.js +49 -27
  47. package/lib/review-ask-tool.js +75 -11
  48. package/lib/review-ask.js +12 -9
  49. package/lib/source-recall.js +6 -16
  50. package/lib/web-preferences.js +2 -2
  51. package/package.json +2 -2
  52. package/plugin-specs/experience-accumulation-system-foundation.yaml +5 -25
  53. package/plugin-specs/fact-model-common.yaml +3 -14
  54. package/plugin-specs/gate-consult-system-foundation.yaml +39 -29
  55. package/plugin-specs/goal-fact-type.yaml +20 -67
  56. package/plugin-specs/goal-planning-system-foundation.yaml +27 -98
  57. package/plugin-specs/intent-fact-type.yaml +13 -22
  58. package/plugin-specs/intent-record-system-foundation.yaml +1 -2
  59. package/plugin-specs/ldvh-root.yaml +6 -6
  60. package/plugin-specs/norm-fact-type.yaml +1 -1
  61. package/plugin-specs/pitfall-fact-type.yaml +5 -49
  62. package/plugin-specs/report-fact-type.yaml +1 -1
  63. package/plugin-specs/research-system-foundation.yaml +12 -9
  64. package/plugin.json +4 -4
  65. package/rules/AGENTS.md +3 -3
  66. package/server/local-daemon.js +86 -28
  67. package/server/mcp-server.js +211 -53
  68. package/server/tool-registry.js +0 -23
  69. package/skills/ldvh-governance-flow/SKILL.md +10 -19
  70. package/skills/ldvh-onboarding/SKILL.md +2 -2
  71. package/agents/ldvh-friction-recorder.md +0 -27
  72. package/lib/aux-task-registry.js +0 -129
  73. package/lib/friction-discovery.js +0 -383
  74. package/lib/friction-failure-registration.js +0 -56
  75. package/lib/friction-observation-buffer.js +0 -889
  76. package/lib/friction-promotion-lock.js +0 -124
  77. package/lib/friction-review-promotion.js +0 -193
  78. package/lib/friction-tools.js +0 -829
  79. package/lib/friction-writer.js +0 -1123
  80. package/lib/milestone-tools.js +0 -684
  81. package/lib/milestone-writer.js +0 -707
  82. package/lib/verification-run.js +0 -195
  83. package/plugin-specs/friction-fact-type.yaml +0 -333
  84. package/plugin-specs/friction-settlement-system-foundation.yaml +0 -334
  85. package/plugin-specs/milestone-fact-type.yaml +0 -212
package/lib/ldvh-tools.js CHANGED
@@ -9,22 +9,18 @@ import { parseSpecDocument, resolveHeadingPath, contentFingerprint, parseOperati
9
9
  import { resolveGovernanceScope } from "./governance-scope.js";
10
10
  import { evaluateRegistrationEntry, registerProjectFromEntry, unregisterProject } from "./governed-projects.js";
11
11
  import { currentRouteValues, currentRouteValuesFromShellEnvironment, ROUTE_SELECTION_RULE } from "./session-signature.js";
12
- import { validateMessage, checkKeyChangesAgainstDiff, snapshotIdentity, SOURCE_FINGERPRINT, cleanGitEnvironment, newFinding, checkDocsReferences, isSpecOrFactCarrierPath, isFrictionCarrierPath, checkFrictionCommitTargets, checkFactCarrierIdentity, factCarrierType, checkSignatureAgainstRoute } from "./commit-validation.js";
12
+ import { validateMessage, checkKeyChangesAgainstDiff, snapshotIdentity, SOURCE_FINGERPRINT, cleanGitEnvironment, newFinding, checkDocsReferences, isSpecOrFactCarrierPath, checkFactCarrierIdentity, factCarrierType, checkSignatureAgainstRoute } from "./commit-validation.js";
13
13
  import { REVIEW_ASK_OPERATION, reviewAskParameterSchema, executeReviewAsk } from "./review-ask-tool.js";
14
14
  import { registerReportTools, OPERATIONS as REPORT_OPERATIONS } from "./report-tools.js";
15
15
  import { registerResearchConsultTools, OPERATIONS as RESEARCH_CONSULT_OPERATIONS } from "./research-consult-tools.js";
16
16
  import { OPERATIONS as GOAL_OPERATIONS } from "./goal-tools.js";
17
- import { OPERATIONS as MILESTONE_OPERATIONS } from "./milestone-tools.js";
18
17
  import { OPERATIONS as INTENT_OPERATIONS } from "./intent-tools.js";
19
18
  import { OPERATIONS as PITFALL_OPERATIONS } from "./pitfall-tools.js";
20
19
  import { OPERATIONS as NORM_OPERATIONS } from "./norm-tools.js";
21
- import { OPERATIONS as FRICTION_OPERATIONS } from "./friction-tools.js";
22
20
  import { registerIntentTools } from "./intent-tools.js";
23
21
  import { registerPitfallTools } from "./pitfall-tools.js";
24
- import { registerFrictionTools } from "./friction-tools.js";
25
22
  import { registerNormTools } from "./norm-tools.js";
26
23
  import { registerGoalTools } from "./goal-tools.js";
27
- import { registerMilestoneTools } from "./milestone-tools.js";
28
24
 
29
25
  const execFileAsync = promisify(execFile);
30
26
 
@@ -65,12 +61,10 @@ const OPERATIONS = {
65
61
 
66
62
  const TOOL_LAYER_CATALOG = Object.freeze([
67
63
  { layer: "goal", operations: GOAL_OPERATIONS, spec_key: "goal-fact-type", source_path: "specs/20-Goal-项目目标.md", arguments: "13. 受控操作" },
68
- { layer: "milestone", operations: MILESTONE_OPERATIONS, spec_key: "milestone-fact-type", source_path: "specs/21-Milestone-里程碑.md", arguments: "13. 受控操作" },
69
64
  { layer: "intent", operations: INTENT_OPERATIONS, spec_key: "intent-fact-type", source_path: "specs/22-Intent-意图.md", arguments: "13. 受控操作" },
70
65
  { layer: "norm", operations: NORM_OPERATIONS, spec_key: "norm-fact-type", source_path: "specs/23-Norm-事实规范.md", arguments: "11. 受控操作" },
71
66
  { layer: "report", operations: REPORT_OPERATIONS, spec_key: "report-fact-type", source_path: "specs/24-Report-报告.md", arguments: "13. 受控操作" },
72
67
  { layer: "pitfall", operations: PITFALL_OPERATIONS, spec_key: "pitfall-fact-type", source_path: "specs/25-Pitfall-踩坑经验.md", arguments: "13. 受控操作" },
73
- { layer: "friction", operations: FRICTION_OPERATIONS, spec_key: "friction-fact-type", source_path: "specs/26-Friction-摩擦账本.md", arguments: "13. 受控操作" },
74
68
  { layer: "research-consult", operations: RESEARCH_CONSULT_OPERATIONS, spec_key: "gate-consult-system-foundation", source_path: "specs/32-把关请示系统规范.md", arguments: "7. 输入与前置条件" },
75
69
  ]);
76
70
 
@@ -412,8 +406,6 @@ function makeExecute(deps) {
412
406
  if (!correspondence.ok) issues.push(...correspondence.issues);
413
407
  const docsRefs = await checkDocsReferencesForIndex(governed.project.path, correspondence.changedPaths ?? []);
414
408
  if (!docsRefs.ok) issues.push(...docsRefs.issues);
415
- const frictionCommits = await checkFrictionCommitTargetsForIndex(governed.project.path);
416
- if (!frictionCommits.ok) issues.push(...frictionCommits.issues);
417
409
  const factIdentity = await checkFactCarrierIdentityForIndex(governed.project.path);
418
410
  if (!factIdentity.ok) issues.push(...factIdentity.issues);
419
411
  const route = await currentRouteValues(deps.sessionPersistence?.(), exec?.agent);
@@ -449,39 +441,6 @@ function makeExecute(deps) {
449
441
  });
450
442
  }
451
443
 
452
- async function checkFrictionCommitTargetsForIndex(projectPath) {
453
- const runGit = async (args) => {
454
- const result = await execFileAsync("git", ["-C", projectPath, ...args], { encoding: "utf8", timeout: 10000, maxBuffer: 8 * 1024 * 1024, env: cleanGitEnvironment() });
455
- return result.stdout;
456
- };
457
- let staged = [];
458
- try {
459
- staged = (await runGit(["ls-files", "--cached", "-z"])).split("\0").filter(Boolean);
460
- } catch {
461
- staged = [];
462
- }
463
- const carriers = [];
464
- for (const path of staged) {
465
- if (!isFrictionCarrierPath(path)) continue;
466
- try {
467
- carriers.push({ path, content: await runGit(["show", `:${path}`]) });
468
- } catch {
469
- carriers.push({ path, content: "" });
470
- }
471
- }
472
- if (carriers.length === 0) return { ok: true, issues: [] };
473
- return checkFrictionCommitTargets(carriers, {
474
- resolves: async (hash) => {
475
- try {
476
- await runGit(["cat-file", "-e", `${hash}^{commit}`]);
477
- return true;
478
- } catch {
479
- return false;
480
- }
481
- },
482
- });
483
- }
484
-
485
444
  async function checkDocsReferencesForIndex(projectPath, changedPaths) {
486
445
  const runGit = async (args) => {
487
446
  const result = await execFileAsync("git", ["-C", projectPath, ...args], { encoding: "utf8", timeout: 10000, maxBuffer: 8 * 1024 * 1024, env: cleanGitEnvironment() });
@@ -816,10 +775,8 @@ export function registerLdvhTools(ctx, deps) {
816
775
  disposers.push(registerResearchConsultTools(ctx, deps));
817
776
  disposers.push(registerIntentTools(ctx, deps));
818
777
  disposers.push(registerPitfallTools(ctx, deps));
819
- disposers.push(registerFrictionTools(ctx, deps));
820
778
  disposers.push(registerNormTools(ctx, deps));
821
779
  disposers.push(registerGoalTools(ctx, deps));
822
- disposers.push(registerMilestoneTools(ctx, deps));
823
780
  disposers.push(ctx.tools.register(defineTool({
824
781
  name: REVIEW_ASK_OPERATION.toolName,
825
782
  description: REVIEW_ASK_OPERATION.summary,
@@ -926,6 +883,7 @@ export function renderEnvelope(operationKey, value) {
926
883
  if (r.reused === true) lines.push(`reused: true (同一候选内容已答复过,未重复提问)`);
927
884
  if (r.fingerprint !== undefined) lines.push(`fingerprint: ${r.fingerprint}`);
928
885
  if (r.point === "research") {
886
+ if (r.human_requested === true) lines.push("human_requested: true");
929
887
  if (r.need !== undefined) lines.push(`need: ${r.need}`);
930
888
  if (r.internal_found !== undefined) lines.push(`internal_found: ${r.internal_found}(命中 ${r.internal_hit_count ?? 0} 条,弱命中 ${r.internal_weak_hit_count ?? 0} 条)`);
931
889
  if (r.internal_source_read !== undefined) lines.push(`internal_source_read: ${r.internal_source_read}`);
@@ -933,29 +891,45 @@ export function renderEnvelope(operationKey, value) {
933
891
  for (const line of r.internal_hits) lines.push(`internal_hit: ${typeof line === "string" ? line : JSON.stringify(line)}`);
934
892
  }
935
893
  if (r.decision === "research") {
936
- lines.push(`decision: research — Human 已同意开一次联网调查(安排零上下文调研子代理走 33 号机器)`);
937
- } else if (r.decision === "self-review") {
938
- lines.push(`decision: self-review — Human 选择主控自调查:主控自己联网查一遍,不派代理;须实做并在交付写明来源与结论,不得称独立调研结论`);
894
+ lines.push(r.human_requested === true
895
+ ? "decision: research — Human 主动要求联网调查(已先内查,免重复请示),由主控亲自执行完整调研工序"
896
+ : "decision: research — Human 已同意本次联网调查,由主控亲自执行完整调研工序");
939
897
  } else if (r.decision === "skip") {
940
- lines.push(`decision: skip — Human 选择本次不联网,按既有路径继续`);
898
+ lines.push("decision: skip — Human 选择本次不调查,按现有信息继续推进");
899
+ } else if (r.needs_ask_question === true && typeof r.question === "string") {
900
+ lines.push("decision: null — 待调用宿主 ask_question 向 Human 征询(请原样使用下方 question 与 options)");
901
+ lines.push("needs_ask_question: true");
902
+ lines.push(`question: ${r.question}`);
903
+ if (Array.isArray(r.options) && r.options.length > 0) {
904
+ lines.push(`options: ${r.options.join(" / ")}`);
905
+ }
941
906
  } else if (r.asked === false && r.switch_enabled === false) {
942
907
  lines.push("decision: null — 第三处开关关闭,本次未提请(这是配置的结果)");
943
908
  } else if (r.asked === false && r.internal_found === true) {
944
909
  lines.push("decision: null — 内部查找已命中可用候选,按规范不提请联网(先精读内部对象,不足时带 internal_gap 再提请)");
910
+ } else if (r.asked === false) {
911
+ lines.push("decision: null — 第三处未发起提请(原因见下方 gap;不得当成不调查)");
945
912
  } else {
946
- lines.push("decision: null — 第三处未取得明确答复(未决策不是答复,下次仍会问;不得当成不联网)");
913
+ lines.push("decision: null — 第三处未取得明确答复(未决策不是答复,下次仍会问;不得当成不调查)");
947
914
  }
948
915
  } else if (r.decision === "review") {
949
- lines.push(`decision: review — Human 已同意安排${r.point === "post-work" ? "复核" : "审查"}`);
916
+ lines.push(`decision: review — Human 已同意安排${r.point === "post-work" ? "复核" : "审核"}`);
950
917
  } else if (r.decision === "self-review") {
951
918
  lines.push(`decision: self-review — Human 选择主控自己做:主控亲自${r.point === "post-work" ? "自查" : "自审"}一遍,不派代理;须实做并在交付写明核了什么与依据,不得称独立核对结论`);
952
919
  } else if (r.decision === "skip") {
953
- lines.push(`decision: skip — Human 选择这次核对不做,直接推进(主控自查仍在)`);
920
+ lines.push(`decision: skip — Human 选择直接推进(主控自查仍在)`);
954
921
  } else if (r.decision === "silent") {
955
922
  lines.push(`decision: silent — 静默执行:未询问,按设置直接安排${r.point === "post-work" ? "复核" : "审查"}(不是 Human 的答复,也不是 skip)`);
956
923
  if (typeof r.notice === "string" && r.notice.length > 0) {
957
924
  lines.push(`notice(须原样写进本次交付说明): ${r.notice}`);
958
925
  }
926
+ } else if (r.needs_ask_question === true && typeof r.question === "string") {
927
+ lines.push("decision: null — 待调用宿主 ask_question 向 Human 征询(请原样使用下方 question 与 options)");
928
+ lines.push("needs_ask_question: true");
929
+ lines.push(`question: ${r.question}`);
930
+ if (Array.isArray(r.options) && r.options.length > 0) {
931
+ lines.push(`options: ${r.options.join(" / ")}`);
932
+ }
959
933
  } else {
960
934
  if (r.asked === false && r.switch_enabled === false) {
961
935
  lines.push("decision: null — 开关关闭,本次未发起询问(这是配置的结果,不是未决策)");
@@ -1002,18 +976,10 @@ export function renderEnvelope(operationKey, value) {
1002
976
  if (researchTemplate !== undefined && researchTemplate !== null && typeof researchTemplate === "object") {
1003
977
  if (typeof researchTemplate.kind === "string") lines.push(`research_template.kind: ${researchTemplate.kind}`);
1004
978
  if (typeof researchTemplate.prompt === "string" && researchTemplate.prompt.length > 0) {
1005
- lines.push("research_template.prompt(须原样作为零上下文调研子代理的 prompt): |");
979
+ lines.push("research_template.prompt(主控联网调研执行指引): |");
1006
980
  for (const line of researchTemplate.prompt.split("\n")) lines.push(` ${line}`);
1007
981
  }
1008
982
  }
1009
- const selfResearch = r.self_research_template;
1010
- if (selfResearch !== undefined && selfResearch !== null && typeof selfResearch === "object") {
1011
- if (typeof selfResearch.kind === "string") lines.push(`self_research_template.kind: ${selfResearch.kind}`);
1012
- if (typeof selfResearch.prompt === "string" && selfResearch.prompt.length > 0) {
1013
- lines.push("self_research_template.prompt(主控自己联网查一遍,不派代理): |");
1014
- for (const line of selfResearch.prompt.split("\n")) lines.push(` ${line}`);
1015
- }
1016
- }
1017
983
  for (const item of env.scope?.not_completed ?? []) lines.push(`not_completed: ${item}`);
1018
984
  for (const item of env.follow_up ?? []) lines.push(`follow_up: ${item}`);
1019
985
  for (const gap of env.gaps ?? []) lines.push(`gap: ${gap}`);
@@ -1102,7 +1068,6 @@ export function renderEnvelope(operationKey, value) {
1102
1068
  if (env.result !== null && typeof env.result === "object" && env.result.settings !== undefined) {
1103
1069
  const st = env.result.settings ?? {};
1104
1070
  lines.push(`agent assistance enabled: ${st.enabled === true}`);
1105
- lines.push(`friction discovery: ${st.frictionDiscovery === true}`);
1106
1071
  lines.push(`experience accumulation: ${st.experienceAccumulation === true}`);
1107
1072
  lines.push(`trigger: ${env.result.trigger}`);
1108
1073
  lines.push(`running: ${env.result.running === true}${env.result.runningReason ? ` (${env.result.runningReason})` : ""}`);
@@ -80,12 +80,10 @@ export function isRegisteredFactType(typeKey) {
80
80
 
81
81
 
82
82
  export const FACT_TYPE_DIRECTORIES = Object.freeze({
83
- friction: "frictions",
84
83
  norm: "norms",
85
84
  pitfall: "pitfalls",
86
85
  report: "reports",
87
86
  intent: "intents",
88
- milestone: "milestones",
89
87
  });
90
88
 
91
89
  const CARRIER_NAME = /^([a-z]+)-([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})\.md$/i;
@@ -2,11 +2,9 @@
2
2
  const FACT_TYPE_KEYS = new Set([
3
3
  "intent",
4
4
  "pitfall",
5
- "friction",
6
5
  "report",
7
6
  "norm",
8
7
  "goal",
9
- "milestone",
10
8
  ]);
11
9
 
12
10
  export const __FACT_TYPE_KEYS_FOR_TEST = FACT_TYPE_KEYS;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "operation-declarations/v1",
3
- "fingerprint": "fb3b2ae6972945b2190d1f2f66a5eba274e4466f788a0f9d13fdcd617589efba",
3
+ "fingerprint": "37474ce60193c05a3de34077208cce15af395d0d96841f848ef81a2b580ba615",
4
4
  "generated_from": "specs/",
5
5
  "declarations": {
6
6
  "collect-subagent-results": {
@@ -21,33 +21,6 @@
21
21
  "source": "helper-service-contract",
22
22
  "source_path": "specs/05-LDVH CLI 确定性服务规范.md"
23
23
  },
24
- "friction-list-objects": {
25
- "operation_key": "friction-list-objects",
26
- "summary": "枚举 Friction 事实对象的账本投影(标题、现象、状态、归因与发生次数)",
27
- "effect": "read",
28
- "arguments_contract": "friction-fact-type::13. 受控操作",
29
- "result_contract": "friction-fact-type::15. 验证与证据边界",
30
- "source": "friction-fact-type",
31
- "source_path": "specs/26-Friction-摩擦账本.md"
32
- },
33
- "friction-read-object": {
34
- "operation_key": "friction-read-object",
35
- "summary": "按 object_uid 精确读取一个 Friction 事实对象的身份块、正文与文件指纹",
36
- "effect": "read",
37
- "arguments_contract": "friction-fact-type::13. 受控操作",
38
- "result_contract": "friction-fact-type::15. 验证与证据边界",
39
- "source": "friction-fact-type",
40
- "source_path": "specs/26-Friction-摩擦账本.md"
41
- },
42
- "friction-write-object": {
43
- "operation_key": "friction-write-object",
44
- "summary": "对 Friction 事实对象执行受控创建、销账与 CAS 更新(含写后回读)",
45
- "effect": "may_change_state",
46
- "arguments_contract": "friction-fact-type::13. 受控操作",
47
- "result_contract": "friction-fact-type::15. 验证与证据边界",
48
- "source": "friction-fact-type",
49
- "source_path": "specs/26-Friction-摩擦账本.md"
50
- },
51
24
  "goal-read-object": {
52
25
  "operation_key": "goal-read-object",
53
26
  "summary": "按 object_uid 精确读取一个 Goal 事实对象的身份块、正文与文件指纹",
@@ -111,42 +84,6 @@
111
84
  "source": "intent-fact-type",
112
85
  "source_path": "specs/22-Intent-意图.md"
113
86
  },
114
- "milestone-list-objects": {
115
- "operation_key": "milestone-list-objects",
116
- "summary": "枚举 Milestone 事实对象的 F0/F1 投影(顺序、标题、状态与达成条件)",
117
- "effect": "read",
118
- "arguments_contract": "milestone-fact-type::13. 受控操作",
119
- "result_contract": "milestone-fact-type::15. 验证与证据边界",
120
- "source": "milestone-fact-type",
121
- "source_path": "specs/21-Milestone-里程碑.md"
122
- },
123
- "milestone-precheck-create": {
124
- "operation_key": "milestone-precheck-create",
125
- "summary": "只读机械预检一份 Milestone 创建候选,跑与受控创建相同的校验器",
126
- "effect": "read",
127
- "arguments_contract": "milestone-fact-type::13. 受控操作",
128
- "result_contract": "milestone-fact-type::15. 验证与证据边界",
129
- "source": "milestone-fact-type",
130
- "source_path": "specs/21-Milestone-里程碑.md"
131
- },
132
- "milestone-read-object": {
133
- "operation_key": "milestone-read-object",
134
- "summary": "按 object_uid 精确读取一个 Milestone 事实对象的身份块、正文与文件指纹",
135
- "effect": "read",
136
- "arguments_contract": "milestone-fact-type::13. 受控操作",
137
- "result_contract": "milestone-fact-type::15. 验证与证据边界",
138
- "source": "milestone-fact-type",
139
- "source_path": "specs/21-Milestone-里程碑.md"
140
- },
141
- "milestone-write-object": {
142
- "operation_key": "milestone-write-object",
143
- "summary": "对 Milestone 事实对象执行受控创建与 CAS 更新(含 change_log 与写后回读)",
144
- "effect": "may_change_state",
145
- "arguments_contract": "milestone-fact-type::13. 受控操作",
146
- "result_contract": "milestone-fact-type::15. 验证与证据边界",
147
- "source": "milestone-fact-type",
148
- "source_path": "specs/21-Milestone-里程碑.md"
149
- },
150
87
  "norm-list-objects": {
151
88
  "operation_key": "norm-list-objects",
152
89
  "summary": "枚举 Norm 事实对象的 F1 目录(方向键、定位句与查阅时机)",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "recall-criteria/v1",
3
- "fingerprint": "e3873eb480dadc84528e78b3e48d27bd0e8c248aec9404ae0e781f7fe6ca489f",
3
+ "fingerprint": "17a512897c7168cf6d2a429781d48370b2f709e890f71294e8223cc07faaab22",
4
4
  "types": {
5
5
  "goal": {
6
6
  "specId": "20",
@@ -15,26 +15,6 @@
15
15
  "typeAliases": [],
16
16
  "relations": []
17
17
  },
18
- "milestone": {
19
- "specId": "21",
20
- "notApplicable": {
21
- "默认候选状态": false,
22
- "核心语义字段": false,
23
- "类型词别名": false,
24
- "关系展开": true
25
- },
26
- "defaultStatuses": [
27
- "active"
28
- ],
29
- "coreFields": [
30
- "title",
31
- "criterion"
32
- ],
33
- "typeAliases": [
34
- "里程碑"
35
- ],
36
- "relations": []
37
- },
38
18
  "intent": {
39
19
  "specId": "22",
40
20
  "notApplicable": {
@@ -120,9 +100,7 @@
120
100
  "intent",
121
101
  "norm",
122
102
  "pitfall",
123
- "report",
124
- "friction",
125
- "milestone"
103
+ "report"
126
104
  ]
127
105
  },
128
106
  {
@@ -131,8 +109,6 @@
131
109
  "norm",
132
110
  "pitfall",
133
111
  "report",
134
- "friction",
135
- "milestone",
136
112
  "intent"
137
113
  ]
138
114
  },
@@ -163,47 +139,6 @@
163
139
  "踩坑经验"
164
140
  ],
165
141
  "relations": []
166
- },
167
- "friction": {
168
- "specId": "26",
169
- "notApplicable": {
170
- "默认候选状态": false,
171
- "核心语义字段": false,
172
- "类型词别名": false,
173
- "关系展开": false
174
- },
175
- "defaultStatuses": [
176
- "open",
177
- "accepted"
178
- ],
179
- "coreFields": [
180
- "title",
181
- "phenomenon",
182
- "attribution"
183
- ],
184
- "typeAliases": [
185
- "摩擦账本",
186
- "摩擦"
187
- ],
188
- "relations": [
189
- {
190
- "relationKey": "informs",
191
- "targets": [
192
- "intent",
193
- "norm",
194
- "pitfall",
195
- "report",
196
- "friction",
197
- "milestone"
198
- ]
199
- },
200
- {
201
- "relationKey": "paired-with",
202
- "targets": [
203
- "pitfall"
204
- ]
205
- }
206
- ]
207
142
  }
208
143
  }
209
144
  }
@@ -35,12 +35,10 @@ export const RECALL_CRITERIA_NOT_APPLICABLE = "不采用";
35
35
 
36
36
  export const FACT_TYPE_BY_SPEC_ID = Object.freeze({
37
37
  "20": "goal",
38
- "21": "milestone",
39
38
  "22": "intent",
40
39
  "23": "norm",
41
40
  "24": "report",
42
41
  "25": "pitfall",
43
- "26": "friction",
44
42
  });
45
43
 
46
44
  export const FACTSOURCE_TYPE_KEYS = Object.freeze(Object.values(FACT_TYPE_BY_SPEC_ID));
@@ -56,22 +56,18 @@ export const RUNTIME_CARRIER_INJECTION_BYTES = 1400;
56
56
  export const RUNTIME_CARRIER_INJECTION_HEADER = "运行时机制:";
57
57
 
58
58
  export const FACT_SECTION_ORDER = Object.freeze([
59
- "milestone", "norm", "pitfall", "friction", "report",
59
+ "norm", "pitfall", "report",
60
60
  ]);
61
61
 
62
62
  export const FACT_SECTION_LABELS = Object.freeze({
63
- milestone: "Milestone(里程碑)",
64
63
  norm: "Norm(事实规范)",
65
64
  pitfall: "Pitfall(踩坑经验)",
66
- friction: "Friction(摩擦账本)",
67
65
  report: "报告(调研/总结/审核)",
68
66
  });
69
67
 
70
68
  export const QUOTA_BY_TYPE = Object.freeze({
71
- milestone: 2,
72
69
  norm: 2,
73
70
  pitfall: 2,
74
- friction: 1,
75
71
  report: 1,
76
72
  });
77
73
 
@@ -10,10 +10,8 @@ export const RECALL_SYNONYM_GROUPS = Object.freeze([
10
10
  ["commit", "git-gate", "提交", "受控提交"],
11
11
  ["hook", "hooks", "钩子", "拦截", "pretooluse", "preinvocation"],
12
12
  ["recall", "召回", "检索", "注入"],
13
- ["pitfall", "踩坑", "经验", "避坑"],
14
- ["friction", "摩擦", "阻碍", "卡点"],
13
+ ["pitfall", "踩坑", "经验", "避坑", "阻碍", "卡点"],
15
14
  ["intent", "意图", "方向线"],
16
- ["milestone", "里程碑"],
17
15
  ["norm", "方向规范", "事实规范"],
18
16
  ["report", "报告", "调研"],
19
17
  ["subagent", "子代理", "子代", "代理"],