@interf/compiler 0.1.11 → 0.2.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 (283) hide show
  1. package/README.md +254 -136
  2. package/dist/commands/benchmark.d.ts.map +1 -1
  3. package/dist/commands/benchmark.js +65 -84
  4. package/dist/commands/benchmark.js.map +1 -1
  5. package/dist/commands/compile.d.ts.map +1 -1
  6. package/dist/commands/compile.js +19 -3
  7. package/dist/commands/compile.js.map +1 -1
  8. package/dist/commands/create.d.ts +3 -0
  9. package/dist/commands/create.d.ts.map +1 -1
  10. package/dist/commands/create.js +34 -9
  11. package/dist/commands/create.js.map +1 -1
  12. package/dist/commands/default.d.ts.map +1 -1
  13. package/dist/commands/default.js +2 -0
  14. package/dist/commands/default.js.map +1 -1
  15. package/dist/commands/init.d.ts.map +1 -1
  16. package/dist/commands/init.js +3 -2
  17. package/dist/commands/init.js.map +1 -1
  18. package/dist/index.d.ts +11 -29
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +7 -16
  21. package/dist/index.js.map +1 -1
  22. package/dist/lib/agent-args.d.ts +4 -0
  23. package/dist/lib/agent-args.d.ts.map +1 -0
  24. package/dist/lib/agent-args.js +42 -0
  25. package/dist/lib/agent-args.js.map +1 -0
  26. package/dist/lib/agent-constants.d.ts +6 -0
  27. package/dist/lib/agent-constants.d.ts.map +1 -0
  28. package/dist/lib/agent-constants.js +29 -0
  29. package/dist/lib/agent-constants.js.map +1 -0
  30. package/dist/lib/agent-detection.d.ts +8 -0
  31. package/dist/lib/agent-detection.d.ts.map +1 -0
  32. package/dist/lib/agent-detection.js +66 -0
  33. package/dist/lib/agent-detection.js.map +1 -0
  34. package/dist/lib/agent-execution.d.ts +3 -0
  35. package/dist/lib/agent-execution.d.ts.map +1 -0
  36. package/dist/lib/agent-execution.js +207 -0
  37. package/dist/lib/agent-execution.js.map +1 -0
  38. package/dist/lib/agent-logs.d.ts +3 -0
  39. package/dist/lib/agent-logs.d.ts.map +1 -0
  40. package/dist/lib/agent-logs.js +18 -0
  41. package/dist/lib/agent-logs.js.map +1 -0
  42. package/dist/lib/agent-preflight.d.ts +8 -0
  43. package/dist/lib/agent-preflight.d.ts.map +1 -0
  44. package/dist/lib/agent-preflight.js +77 -0
  45. package/dist/lib/agent-preflight.js.map +1 -0
  46. package/dist/lib/agent-render.d.ts +9 -0
  47. package/dist/lib/agent-render.d.ts.map +1 -0
  48. package/dist/lib/agent-render.js +219 -0
  49. package/dist/lib/agent-render.js.map +1 -0
  50. package/dist/lib/agent-status.d.ts +4 -0
  51. package/dist/lib/agent-status.d.ts.map +1 -0
  52. package/dist/lib/agent-status.js +59 -0
  53. package/dist/lib/agent-status.js.map +1 -0
  54. package/dist/lib/agent-types.d.ts +31 -0
  55. package/dist/lib/agent-types.d.ts.map +1 -0
  56. package/dist/lib/agent-types.js +2 -0
  57. package/dist/lib/agent-types.js.map +1 -0
  58. package/dist/lib/agents.d.ts +7 -49
  59. package/dist/lib/agents.d.ts.map +1 -1
  60. package/dist/lib/agents.js +8 -554
  61. package/dist/lib/agents.js.map +1 -1
  62. package/dist/lib/benchmark-execution.d.ts +9 -0
  63. package/dist/lib/benchmark-execution.d.ts.map +1 -0
  64. package/dist/lib/benchmark-execution.js +488 -0
  65. package/dist/lib/benchmark-execution.js.map +1 -0
  66. package/dist/lib/benchmark-paths.d.ts +11 -0
  67. package/dist/lib/benchmark-paths.d.ts.map +1 -0
  68. package/dist/lib/benchmark-paths.js +38 -0
  69. package/dist/lib/benchmark-paths.js.map +1 -0
  70. package/dist/lib/benchmark-specs.d.ts +8 -0
  71. package/dist/lib/benchmark-specs.d.ts.map +1 -0
  72. package/dist/lib/benchmark-specs.js +115 -0
  73. package/dist/lib/benchmark-specs.js.map +1 -0
  74. package/dist/lib/benchmark-targets.d.ts +5 -0
  75. package/dist/lib/benchmark-targets.d.ts.map +1 -0
  76. package/dist/lib/benchmark-targets.js +72 -0
  77. package/dist/lib/benchmark-targets.js.map +1 -0
  78. package/dist/lib/benchmark-types.d.ts +19 -0
  79. package/dist/lib/benchmark-types.d.ts.map +1 -0
  80. package/dist/lib/benchmark-types.js +2 -0
  81. package/dist/lib/benchmark-types.js.map +1 -0
  82. package/dist/lib/benchmark.d.ts +4 -29
  83. package/dist/lib/benchmark.d.ts.map +1 -1
  84. package/dist/lib/benchmark.js +3 -324
  85. package/dist/lib/benchmark.js.map +1 -1
  86. package/dist/lib/bundled-templates.d.ts +5 -0
  87. package/dist/lib/bundled-templates.d.ts.map +1 -0
  88. package/dist/lib/bundled-templates.js +23 -0
  89. package/dist/lib/bundled-templates.js.map +1 -0
  90. package/dist/lib/config.d.ts +1 -0
  91. package/dist/lib/config.d.ts.map +1 -1
  92. package/dist/lib/config.js +2 -0
  93. package/dist/lib/config.js.map +1 -1
  94. package/dist/lib/eval-packs.d.ts +204 -0
  95. package/dist/lib/eval-packs.d.ts.map +1 -0
  96. package/dist/lib/eval-packs.js +177 -0
  97. package/dist/lib/eval-packs.js.map +1 -0
  98. package/dist/lib/execution-profile.d.ts +18 -0
  99. package/dist/lib/execution-profile.d.ts.map +1 -0
  100. package/dist/lib/execution-profile.js +85 -0
  101. package/dist/lib/execution-profile.js.map +1 -0
  102. package/dist/lib/interf-bootstrap.d.ts +4 -0
  103. package/dist/lib/interf-bootstrap.d.ts.map +1 -1
  104. package/dist/lib/interf-bootstrap.js +71 -68
  105. package/dist/lib/interf-bootstrap.js.map +1 -1
  106. package/dist/lib/interf-compile-plan.d.ts +12 -0
  107. package/dist/lib/interf-compile-plan.d.ts.map +1 -0
  108. package/dist/lib/interf-compile-plan.js +143 -0
  109. package/dist/lib/interf-compile-plan.js.map +1 -0
  110. package/dist/lib/interf-detect.d.ts.map +1 -1
  111. package/dist/lib/interf-detect.js +11 -10
  112. package/dist/lib/interf-detect.js.map +1 -1
  113. package/dist/lib/interf-scaffold.d.ts +1 -10
  114. package/dist/lib/interf-scaffold.d.ts.map +1 -1
  115. package/dist/lib/interf-scaffold.js +25 -362
  116. package/dist/lib/interf-scaffold.js.map +1 -1
  117. package/dist/lib/interf-workflow-package.d.ts +4 -0
  118. package/dist/lib/interf-workflow-package.d.ts.map +1 -0
  119. package/dist/lib/interf-workflow-package.js +131 -0
  120. package/dist/lib/interf-workflow-package.js.map +1 -0
  121. package/dist/lib/interf.d.ts +2 -1
  122. package/dist/lib/interf.d.ts.map +1 -1
  123. package/dist/lib/interf.js +2 -1
  124. package/dist/lib/interf.js.map +1 -1
  125. package/dist/lib/local-workflows.d.ts.map +1 -1
  126. package/dist/lib/local-workflows.js +8 -12
  127. package/dist/lib/local-workflows.js.map +1 -1
  128. package/dist/lib/logger.d.ts +4 -0
  129. package/dist/lib/logger.d.ts.map +1 -0
  130. package/dist/lib/logger.js +11 -0
  131. package/dist/lib/logger.js.map +1 -0
  132. package/dist/lib/obsidian.d.ts.map +1 -1
  133. package/dist/lib/obsidian.js +7 -3
  134. package/dist/lib/obsidian.js.map +1 -1
  135. package/dist/lib/parse.d.ts +2 -2
  136. package/dist/lib/parse.d.ts.map +1 -1
  137. package/dist/lib/parse.js +11 -7
  138. package/dist/lib/parse.js.map +1 -1
  139. package/dist/lib/registry.js +3 -3
  140. package/dist/lib/registry.js.map +1 -1
  141. package/dist/lib/runtime-acceptance.d.ts +4 -0
  142. package/dist/lib/runtime-acceptance.d.ts.map +1 -0
  143. package/dist/lib/runtime-acceptance.js +123 -0
  144. package/dist/lib/runtime-acceptance.js.map +1 -0
  145. package/dist/lib/runtime-contracts.d.ts +4 -0
  146. package/dist/lib/runtime-contracts.d.ts.map +1 -0
  147. package/dist/lib/runtime-contracts.js +63 -0
  148. package/dist/lib/runtime-contracts.js.map +1 -0
  149. package/dist/lib/runtime-paths.d.ts +8 -0
  150. package/dist/lib/runtime-paths.d.ts.map +1 -0
  151. package/dist/lib/runtime-paths.js +28 -0
  152. package/dist/lib/runtime-paths.js.map +1 -0
  153. package/dist/lib/runtime-prompt.d.ts +3 -0
  154. package/dist/lib/runtime-prompt.d.ts.map +1 -0
  155. package/dist/lib/runtime-prompt.js +59 -0
  156. package/dist/lib/runtime-prompt.js.map +1 -0
  157. package/dist/lib/runtime-reconcile.d.ts +6 -0
  158. package/dist/lib/runtime-reconcile.d.ts.map +1 -0
  159. package/dist/lib/runtime-reconcile.js +339 -0
  160. package/dist/lib/runtime-reconcile.js.map +1 -0
  161. package/dist/lib/runtime-runs.d.ts +12 -0
  162. package/dist/lib/runtime-runs.d.ts.map +1 -0
  163. package/dist/lib/runtime-runs.js +337 -0
  164. package/dist/lib/runtime-runs.js.map +1 -0
  165. package/dist/lib/runtime-types.d.ts +42 -0
  166. package/dist/lib/runtime-types.d.ts.map +1 -0
  167. package/dist/lib/runtime-types.js +2 -0
  168. package/dist/lib/runtime-types.js.map +1 -0
  169. package/dist/lib/runtime.d.ts +6 -58
  170. package/dist/lib/runtime.d.ts.map +1 -1
  171. package/dist/lib/runtime.js +5 -614
  172. package/dist/lib/runtime.js.map +1 -1
  173. package/dist/lib/schema.d.ts +156 -13
  174. package/dist/lib/schema.d.ts.map +1 -1
  175. package/dist/lib/schema.js +113 -4
  176. package/dist/lib/schema.js.map +1 -1
  177. package/dist/lib/source-config.d.ts +13 -0
  178. package/dist/lib/source-config.d.ts.map +1 -0
  179. package/dist/lib/source-config.js +75 -0
  180. package/dist/lib/source-config.js.map +1 -0
  181. package/dist/lib/state-artifacts.d.ts +15 -0
  182. package/dist/lib/state-artifacts.d.ts.map +1 -0
  183. package/dist/lib/state-artifacts.js +24 -0
  184. package/dist/lib/state-artifacts.js.map +1 -0
  185. package/dist/lib/state-health.d.ts +9 -0
  186. package/dist/lib/state-health.d.ts.map +1 -0
  187. package/dist/lib/state-health.js +330 -0
  188. package/dist/lib/state-health.js.map +1 -0
  189. package/dist/lib/state-io.d.ts +15 -0
  190. package/dist/lib/state-io.d.ts.map +1 -0
  191. package/dist/lib/state-io.js +219 -0
  192. package/dist/lib/state-io.js.map +1 -0
  193. package/dist/lib/state-paths.d.ts +5 -0
  194. package/dist/lib/state-paths.d.ts.map +1 -0
  195. package/dist/lib/state-paths.js +19 -0
  196. package/dist/lib/state-paths.js.map +1 -0
  197. package/dist/lib/state-view.d.ts +7 -0
  198. package/dist/lib/state-view.d.ts.map +1 -0
  199. package/dist/lib/state-view.js +147 -0
  200. package/dist/lib/state-view.js.map +1 -0
  201. package/dist/lib/state.d.ts +6 -46
  202. package/dist/lib/state.d.ts.map +1 -1
  203. package/dist/lib/state.js +5 -632
  204. package/dist/lib/state.js.map +1 -1
  205. package/dist/lib/summarize-plan.d.ts +1 -0
  206. package/dist/lib/summarize-plan.d.ts.map +1 -1
  207. package/dist/lib/summarize-plan.js +10 -0
  208. package/dist/lib/summarize-plan.js.map +1 -1
  209. package/dist/lib/user-config.js +2 -2
  210. package/dist/lib/user-config.js.map +1 -1
  211. package/dist/lib/validate-helpers.d.ts +21 -0
  212. package/dist/lib/validate-helpers.d.ts.map +1 -0
  213. package/dist/lib/validate-helpers.js +72 -0
  214. package/dist/lib/validate-helpers.js.map +1 -0
  215. package/dist/lib/validate-interface.d.ts +79 -0
  216. package/dist/lib/validate-interface.d.ts.map +1 -0
  217. package/dist/lib/validate-interface.js +535 -0
  218. package/dist/lib/validate-interface.js.map +1 -0
  219. package/dist/lib/validate-kb.d.ts +81 -0
  220. package/dist/lib/validate-kb.d.ts.map +1 -0
  221. package/dist/lib/validate-kb.js +252 -0
  222. package/dist/lib/validate-kb.js.map +1 -0
  223. package/dist/lib/validate.d.ts +17 -146
  224. package/dist/lib/validate.d.ts.map +1 -1
  225. package/dist/lib/validate.js +33 -709
  226. package/dist/lib/validate.js.map +1 -1
  227. package/dist/lib/workflow-definitions.d.ts +1 -1
  228. package/dist/lib/workflow-definitions.d.ts.map +1 -1
  229. package/dist/lib/workflow-definitions.js +90 -166
  230. package/dist/lib/workflow-definitions.js.map +1 -1
  231. package/dist/lib/workflow-helpers.d.ts.map +1 -1
  232. package/dist/lib/workflow-helpers.js +6 -3
  233. package/dist/lib/workflow-helpers.js.map +1 -1
  234. package/dist/lib/workflow-stage-runner.d.ts +41 -0
  235. package/dist/lib/workflow-stage-runner.d.ts.map +1 -0
  236. package/dist/lib/workflow-stage-runner.js +106 -0
  237. package/dist/lib/workflow-stage-runner.js.map +1 -0
  238. package/dist/lib/workflow-starter-docs.d.ts +9 -0
  239. package/dist/lib/workflow-starter-docs.d.ts.map +1 -0
  240. package/dist/lib/workflow-starter-docs.js +18 -0
  241. package/dist/lib/workflow-starter-docs.js.map +1 -0
  242. package/dist/lib/workflows-interface-contracts.d.ts +24 -0
  243. package/dist/lib/workflows-interface-contracts.d.ts.map +1 -0
  244. package/dist/lib/workflows-interface-contracts.js +304 -0
  245. package/dist/lib/workflows-interface-contracts.js.map +1 -0
  246. package/dist/lib/workflows-interface.d.ts +3 -10
  247. package/dist/lib/workflows-interface.d.ts.map +1 -1
  248. package/dist/lib/workflows-interface.js +117 -365
  249. package/dist/lib/workflows-interface.js.map +1 -1
  250. package/dist/lib/workflows-kb.d.ts.map +1 -1
  251. package/dist/lib/workflows-kb.js +79 -55
  252. package/dist/lib/workflows-kb.js.map +1 -1
  253. package/dist/lib/workflows.d.ts +1 -1
  254. package/dist/lib/workflows.d.ts.map +1 -1
  255. package/dist/lib/workflows.js +1 -1
  256. package/dist/lib/workflows.js.map +1 -1
  257. package/package.json +15 -4
  258. package/skills/interface/analyze/SKILL.md +79 -28
  259. package/skills/interface/compile/SKILL.md +27 -28
  260. package/skills/interface/create/SKILL.md +53 -230
  261. package/skills/interface/create/references/compile-plan-format.md +31 -31
  262. package/skills/interface/create/references/workflows.md +17 -32
  263. package/skills/interface/query/SKILL.md +15 -1
  264. package/skills/interface/retrieve/SKILL.md +32 -65
  265. package/skills/knowledge-base/compile/SKILL.md +59 -83
  266. package/skills/knowledge-base/compile/references/stage-claims.md +1 -1
  267. package/skills/knowledge-base/compile/references/stage-entities.md +2 -2
  268. package/skills/knowledge-base/query/SKILL.md +13 -1
  269. package/skills/knowledge-base/summarize/SKILL.md +54 -24
  270. package/templates/interface/README.md +13 -12
  271. package/templates/interface/interfaces.md +14 -11
  272. package/templates/knowledge-base/README.md +0 -1
  273. package/templates/knowledge-base/registry.md +15 -15
  274. package/templates/workflow-package/README.md +16 -0
  275. package/templates/workflow-package/create/SKILL.md +8 -0
  276. package/templates/workflow-package/interface-query/SKILL.md +29 -0
  277. package/templates/workflow-package/interface-stage/SKILL.md +13 -0
  278. package/templates/workflow-package/knowledge-base-query/SKILL.md +36 -0
  279. package/templates/workflow-package/knowledge-base-stage/SKILL.md +13 -0
  280. package/templates/workflow-starters/interface/interf/README.md +13 -0
  281. package/templates/workflow-starters/interface/interf/create/SKILL.md +15 -0
  282. package/templates/workflow-starters/knowledge-base/interf/README.md +13 -0
  283. package/templates/workflow-starters/knowledge-base/karpathy/README.md +13 -0
@@ -52,58 +52,58 @@ Status: {counts, last compile}
52
52
  Agent navigation: {how an agent should move from AGENTS.md into the rest of this interface}
53
53
  ```
54
54
 
55
- ## Example: Research Briefing interface
55
+ ## Example: Task-Specific interface
56
56
 
57
57
  ```markdown
58
- # Research Briefing — Compile Plan
58
+ # {Interface Name} — Compile Plan
59
59
 
60
60
  ## Stage 1: Retrieve
61
61
 
62
62
  Filter criteria for knowledge-base summaries/:
63
- - Categories: papers, notes, repos, datasets, experiments
64
- - Priority evidence tiers: tier_1_authoritative, tier_2_direct_record, tier_3_working_material
65
- - Truth modes to prioritize or downweight: prioritize fact/reported_fact/measurement, downweight brainstorm and speculation
66
- - Key entities: methods, datasets, benchmarks, authors, projects
67
- - Date range: all (for landscape), last 90 days (for recent developments)
63
+ - Categories: {documents, notes, datasets, reports, experiments, or other relevant categories}
64
+ - Priority evidence tiers: {which evidence tiers matter most for this task}
65
+ - Truth modes to prioritize or downweight: {which truth modes to favor or downweight}
66
+ - Key entities: {entities, systems, products, markets, or themes to prioritize}
67
+ - Date range: {all time, a recent window, or another task-specific cutoff}
68
68
 
69
- Expected relevant file count: ~220 of 900
69
+ Expected relevant file count: ~{estimate} of {knowledge_base_summary_total}
70
70
  Coverage loop:
71
- - scan all 900 summary frontmatter blocks
71
+ - scan all {knowledge_base_summary_total} summary frontmatter blocks
72
72
  - read abstracts for the full candidate set
73
- - follow adjacency links for methods, datasets, and benchmark clusters until retrieval closure
73
+ - follow adjacency links for the relevant clusters until retrieval closure
74
74
  - persist selected and rejected files with reasons in coverage proof
75
75
 
76
76
  ## Stage 2: Analyze
77
77
 
78
78
  For each relevant summary, extract:
79
- - Methods: goals, assumptions, strengths, weaknesses
80
- - Datasets: scope, quality issues, benchmark relevance
81
- - Claims: what is being asserted and with what level of support
82
- - Contradictions: disagreements across sources, benchmarks, or interpretations
83
- - Open questions: what the knowledge base still does not explain well
84
- - Runtime refinements: add missing method families, benchmark clusters, and claim groupings when evidence supports them
79
+ - {Entity type 1}: {what to extract}
80
+ - {Entity type 2}: {what to extract}
81
+ - Claims: {what is being asserted and with what level of support}
82
+ - Contradictions: {what disagreements matter}
83
+ - Open questions: {what remains unresolved}
84
+ - Runtime refinements: {what missing structure to add when evidence supports it}
85
85
 
86
- Working-set budget: ~40% of model context window per batch.
87
- Subagent instruction: "Extract entities, claims, contradictions, and open questions relevant to this research briefing. Return structured JSON."
86
+ Working-set budget: ~{fraction} of model context window per batch.
87
+ Subagent instruction: "{what each subagent should extract and return}"
88
88
 
89
89
  ## Stage 3: Compile
90
90
 
91
- ### briefs/Themes.md
92
- Purpose: "What themes define this knowledge base right now?"
93
- Sections: major themes, strongest evidence, changes over time
94
- Evidence: prefer primary and direct-record sources
91
+ ### briefs/{Primary Brief}.md
92
+ Purpose: "{what question this brief answers}"
93
+ Sections: {section structure}
94
+ Evidence: {what evidence to prefer}
95
95
 
96
- ### briefs/Contradictions.md
97
- Purpose: "Where do sources disagree or look unresolved?"
98
- Sections: contradiction, supporting evidence, counterevidence, next check
99
- Evidence: cite both sides explicitly
96
+ ### briefs/{Secondary Brief}.md
97
+ Purpose: "{what this note clarifies}"
98
+ Sections: {section structure}
99
+ Evidence: {what evidence to cite}
100
100
 
101
- ### briefs/Open-Questions.md
102
- Purpose: "What should we read or verify next?"
103
- Sections: question, why it matters, missing evidence, suggested next sources
104
- Evidence: link back to the gaps in the reviewed set
101
+ ### briefs/{Follow-up Brief}.md
102
+ Purpose: "{what should be checked next}"
103
+ Sections: {section structure}
104
+ Evidence: {how to link back to gaps or follow-up needs}
105
105
 
106
106
  ### home.md
107
- Links to: all briefs notes, latest summary, entity/claim counts
107
+ Links to: {key briefs and local outputs}
108
108
  Agent navigation: AGENTS.md -> home.md -> briefs/ -> knowledge/ -> knowledge-base summaries
109
109
  ```
@@ -1,46 +1,31 @@
1
1
  # Interface Workflows
2
2
 
3
- Pre-designed interface methodologies. Use them as starting points and adapt them to the actual knowledge-base data.
3
+ Interf now ships one built-in interface workflow: `interf`.
4
4
 
5
- ## briefing
5
+ Use it as the default task-specific method on top of a knowledge base. If you need a different bias, create a reusable local workflow under `interf/workflows/interface/` and benchmark it.
6
6
 
7
- Current-state briefing. Best when the agent needs the latest truth, recent changes, and immediate next steps.
7
+ ## interf
8
8
 
9
- **Questions it answers:**
10
- - What is true right now?
11
- - What changed recently?
12
- - What should happen next?
13
-
14
- **Filter:** current-state docs, changelogs, decisions, updates
15
- **Outputs:** Current-State.md, Changes.md, Next-Steps.md
16
-
17
- ## research
18
-
19
- Research synthesis. Best when the agent needs themes, claims, contradictions, and open questions from a dense knowledge base.
20
-
21
- **Questions it answers:**
22
- - What are the strongest recurring themes?
23
- - Where do sources agree or disagree?
24
- - What questions still need more evidence?
25
-
26
- **Filter:** primary sources, papers, notes, datasets, experiments, repos
27
- **Outputs:** Themes.md, Contradictions.md, Open-Questions.md
28
-
29
- ## audit
30
-
31
- Audit and gap-finding. Best when the agent needs to improve knowledge-base quality, surface contradictions, and plan follow-up work.
9
+ Task-specific evidence distillation. Best when the agent needs a bounded workspace that:
10
+ - proves what was scanned and selected
11
+ - preserves the exact task nouns the user cares about
12
+ - compiles minimal answer-ready artifacts for later retrieval
32
13
 
33
14
  **Questions it answers:**
34
- - What is missing or weakly covered?
35
- - Which facts or claims look inconsistent?
36
- - What should be verified or added next?
15
+ - What exactly is this interface trying to help an agent do?
16
+ - Which entities, periods, metrics, comparators, or source families matter?
17
+ - What compiled brief or notes should a weaker model rely on instead of rediscovering the raw data?
37
18
 
38
- **Filter:** canonical records, requirements, policies, status docs, recent changes
39
- **Outputs:** Gaps.md, Contradictions.md, Follow-Ups.md
19
+ **Default bias:**
20
+ - narrow retrieval to the requested task before widening scope
21
+ - turn the request into a target ledger when the task is bounded
22
+ - preserve time periods, units, metric families, and provenance
23
+ - when exact values matter, inspect the raw source and classify the result as text-derived, table-derived, or chart-derived
24
+ - compile one concise hero brief plus the minimum supporting notes needed for reliable retrieval
40
25
 
41
26
  ## Create new workflow
42
27
 
43
- Create a new reusable local workflow from the wizard when the shipped workflows are not enough.
28
+ Create a reusable local interface workflow when the built-in `interf` method is not enough.
44
29
 
45
30
  The wizard asks:
46
31
  1. What questions should this interface answer?
@@ -21,11 +21,25 @@ Default loop:
21
21
  - follow wikilinks and backlinks outward before treating one note as complete
22
22
  - climb to parent knowledge-base summaries in `../../summaries/` when you need stronger evidence
23
23
  - use raw source files only when needed for verification, direct quotes, ambiguity, or missing context
24
+ - if the user asks for exact chart or table values from a named report, use local outputs only to locate the source and relevant pages, then go straight to the raw PDF and a concrete local extraction path
25
+ - when a caller asks for a trace, audit log, or `artifacts_consulted` list, record local `workflow/use/query/SKILL.md` after you inspect it
26
+ - when you climb to the parent knowledge-base query loop, record `../../workflow/use/query/SKILL.md` after you inspect it
24
27
 
25
28
  Raw-source gate:
26
29
  - inspect `../../.interf/source-access.json`
27
- - verify one `suggested_checks` path is actually readable from this session before claiming raw-file verification
30
+ - actually open and inspect at least one `suggested_checks` path before claiming raw-file verification; a plain existence check is not enough
31
+ - when a caller asks for a trace, audit log, or `artifacts_consulted` list, record `../../.interf/source-access.json` after you inspect it
28
32
  - if the path is not reachable or permission is not granted, say the answer is based on interface and parent knowledge-base artifacts only
33
+ - when the question depends on exact figures, direct quotes, chart values, table values, or image-derived evidence, raw inspection is required before answering confidently
34
+
35
+ PDF / chart rule:
36
+ - if the parent source is a PDF, deck, or report and the needed evidence may live in charts, tables, or figures, do not assume the default text layer or existing notes captured everything
37
+ - if local outputs and parent summaries do not preserve the needed numeric detail, inspect the raw source and say whether the value was text-derived, table-derived, or chart-derived
38
+ - opening the PDF with `Read` is not enough for an exact-value chart question; you must take a machine-readable extraction path before answering
39
+ - if the first local extraction method misses the number, continue down another local recovery path instead of settling early for a visual estimate
40
+ - if the default local extraction path still cannot reach the value, switch methods before stopping early; a temporary scratch helper outside the workspace is allowed when needed
41
+ - if the chart does not expose exact numbers as text, say that clearly instead of pretending the interface already captured them
42
+ - if you can only estimate from the chart after exhausting the local extraction path, label the answer `approximate` and keep the precision gap explicit
29
43
 
30
44
  When confidence is low:
31
45
  - expand outward through linked briefs, claims, entities, and parent summaries
@@ -43,8 +43,10 @@ When invoked by the CLI, honor any explicit execution instructions in the prompt
43
43
  - if `.interf/stage-contract.json` exists, treat it as the authoritative stage contract for this run
44
44
  - if the prompt gives an expected summary-set size, use it as the source of truth for progress reporting
45
45
  - if the prompt requires `.interf/relevant.json`, write it
46
- - keep `.interf/health.json` consistent with the latest `.interf/state.json` if you update state directly
47
46
  - only emit user-facing lines that start with `STATUS:`, `DONE:`, `BLOCKED:`, or `ERROR:`
47
+ - when updating `.interf/relevant.json` or `.interf/coverage.json`, read the current file first and then rewrite the full JSON document; do not depend on anchored patch edits against stale runtime files
48
+ - the CLI reconciles `.interf/state.json` and refreshes `.interf/health.json` after validation; do not treat those files as stage-owned write targets for retrieve
49
+ - once the selected set is final, write the proof artifacts immediately, emit the `DONE:` line, and stop; do not reopen manual query docs or raw files after selection is settled
48
50
 
49
51
  ## Steps
50
52
 
@@ -55,14 +57,14 @@ Retrieve:
55
57
  - [ ] 3. Review candidate abstracts
56
58
  - [ ] 4. Expand through links if needed
57
59
  - [ ] 5. Compute delta
58
- - [ ] 6. Update state
60
+ - [ ] 6. Write retrieval proof
59
61
  ```
60
62
 
61
63
  ### 1. Read config and plan
62
64
 
63
65
  - `interf.json` → `knowledge_base.path` to locate the knowledge base
64
66
  - `compile-plan.md` → this stage's section: categories, priority evidence tiers, truth modes, key entities, date range
65
- - `.interf/state.json` `last_compile`, `knowledge_base_summary_count_at_last_compile`
67
+ - if the plan depends on exact figures from PDFs, charts, or tables, keep that modality requirement visible during retrieval
66
68
  - `../../.interf/source-access.json` → sample raw paths and suggested access checks when raw fallback is needed
67
69
  - local instruction docs listed by the stage contract
68
70
 
@@ -81,86 +83,51 @@ Build a summary-set map: total files, source-kind distribution, evidence distrib
81
83
  ### 3. Review candidate abstracts
82
84
 
83
85
  From compile-plan.md filter criteria, identify a candidate set. Then read the abstract block for every candidate file before final selection.
86
+ If the use case depends on exact numeric comparisons from charts or tables, do not exclude a candidate just because the summary abstract is coarse. Keep files whose key evidence may still live in raw visuals.
84
87
 
85
88
  ### 4. Expand through links if needed
86
89
 
87
90
  If candidate abstracts point to adjacent summaries that may materially change the answer, follow those links, review their abstracts, and repeat until the retrieved set is coverage-complete for the interface question.
88
91
  Track emergent clusters that suggest the initial interface runtime is missing concepts, relationships, or taxonomy branches.
92
+ When chart-heavy PDFs or report pages are likely to hold the decisive evidence, preserve that signal for later stages instead of routing the interface toward prose-only summaries.
93
+ If exact numbers will require a local extraction path against the raw PDF, carry that requirement forward explicitly instead of assuming the analysis stage can infer it from a coarse abstract.
89
94
 
90
95
  ### 5. Compute delta
91
96
 
92
- - First run (`last_compile` is null): ALL relevant files are new
93
- - Subsequent runs: compare `knowledge_base_summary_count_at_last_compile` vs current count, identify new files by date
97
+ - If the current workspace already makes the delta obvious, keep `delta_files` limited to the newly relevant or newly changed files.
98
+ - If the prior compile boundary is not obvious from the current workspace, use the conservative fallback: set `delta_files` equal to the selected relevant set for this run.
94
99
 
95
- ### 6. Update state
100
+ ### 6. Write retrieval proof
96
101
 
97
- Write the full retrieved set to `.interf/relevant.json`:
102
+ Write the full retrieved set to `.interf/relevant.json` in the current runtime shape. At minimum include:
103
+ - `generated_at`
104
+ - `knowledge_base_summary_count` derived from the current knowledge-base summary total
105
+ - `relevant_files` with the actual knowledge-base-relative summary paths selected in this run
106
+ - `delta_files` with the actual knowledge-base-relative summary paths that are new or changed for this run
98
107
 
99
- ```json
100
- {
101
- "version": 1,
102
- "generated_at": "2026-03-30T20:00:00Z",
103
- "knowledge_base_summary_count": 2500,
104
- "relevant_files": ["summaries/file1.md", "summaries/file2.md"],
105
- "delta_files": ["summaries/file1.md", "summaries/file2.md"]
106
- }
107
- ```
108
-
109
- File paths in `relevant_files` and `delta_files` are relative to the knowledge base.
110
-
111
- Write retrieval proof to `.interf/coverage.json`:
112
-
113
- ```json
114
- {
115
- "version": 1,
116
- "run_id": "run_abc123",
117
- "interface": "briefing",
118
- "generated_at": "2026-03-30T20:00:00Z",
119
- "knowledge_base_summary_total": 3,
120
- "frontmatter_scanned": 3,
121
- "candidates_after_frontmatter": 2,
122
- "abstracts_reviewed": 2,
123
- "expansion_passes": 2,
124
- "relevant_selected": 1,
125
- "rejected": 2,
126
- "coverage_complete": true,
127
- "proof": {
128
- "scanned": ["summaries/file1.md", "summaries/file2.md", "summaries/file3.md"],
129
- "reviewed": ["summaries/file1.md", "summaries/file2.md"],
130
- "retrieved": ["summaries/file1.md"],
131
- "excluded": ["summaries/file2.md", "summaries/file3.md"]
132
- }
133
- }
134
- ```
108
+ Do not paste placeholder filenames, canned totals, or copied sample counters into the runtime artifact.
109
+ If `.interf/relevant.json` does not exist yet, create it in one complete write rather than trying to patch a missing file.
135
110
 
136
- Write retrieve results to `.interf/state.json`:
111
+ Write retrieval proof to `.interf/coverage.json` in the current verifier shape. Include:
112
+ - top-level `generated_at`
113
+ - top-level counts derived from this run: `knowledge_base_summary_total`, `frontmatter_scanned`, `candidates_after_frontmatter`, `abstracts_reviewed`, `expansion_passes`, `relevant_selected`, `rejected`, `coverage_complete`
114
+ - `proof.scanned` for the full scanned summary set
115
+ - `proof.reviewed` for the candidate abstracts actually reviewed
116
+ - `proof.retrieved` for the selected relevant set
117
+ - `proof.excluded` for the excluded set
137
118
 
138
- ```json
139
- {
140
- "retrieve_complete": true,
141
- "coverage_complete": true,
142
- "frontmatter_scanned": 2500,
143
- "candidate_count": 1200,
144
- "abstracts_read": 1200,
145
- "expansion_passes": 2,
146
- "relevant_count": 1200,
147
- "rejected_count": 1300,
148
- "delta_count": 12,
149
- "delta_files": ["summaries/file1.md", "summaries/file2.md"],
150
- "last_retrieve": "2026-03-30T20:00:00Z"
151
- }
152
- ```
119
+ `proof.retrieved` plus `proof.excluded` must partition the scanned set for this run.
153
120
 
154
- Refresh `.interf/health.json` after state is updated. The health file is a computed verification surface for compile status and key metrics, not a prose summary.
121
+ If `.interf/coverage.json` already exists, read it and then rewrite the complete JSON document. Do not patch old counters or timestamps line-by-line.
155
122
  If the retrieve stage reveals clear runtime gaps, preserve that signal for later stages via `.interf/analysis.json` or the next stage handoff rather than silently discarding it.
156
123
 
157
124
  Report to user with status-style lines:
158
125
  ```
159
- STATUS: loaded retrieve plan 2500 summary files.
160
- STATUS: scanned 2500/2500
161
- STATUS: reviewed 1200 abstracts, 2 expansion passes
162
- STATUS: selected 1200 relevant, 1300 rejected, 12 delta
126
+ STATUS: loaded retrieve plan N summary files.
127
+ STATUS: scanned N/N
128
+ STATUS: reviewed M abstracts, P expansion passes
129
+ STATUS: selected R relevant, X rejected, D delta
163
130
  DONE: retrieve complete
164
131
  ```
165
132
 
166
- When the retrieval proof, relevant set, state, and health files are written, emit the required `DONE:` line and stop. Do not keep exploring once retrieval closure is recorded.
133
+ When the retrieval proof and relevant set are written, emit the required `DONE:` line and stop. The CLI reconciles `.interf/state.json` and refreshes `.interf/health.json` after validation. Do not keep exploring once retrieval closure is recorded.
@@ -32,33 +32,42 @@ If `.interf/stage-contract.json` exists, treat it as the authoritative stage con
32
32
 
33
33
  Use this sequence:
34
34
  - `STATUS: loaded compile plan N summary files`
35
- - `STATUS: inventoried N/N` after the inventory pass is complete
36
- - `STATUS: read X/N` after each deep-read batch or every 25 files, whichever comes first
37
- - `STATUS: wrote graph outputs` after `knowledge/` and `home.md` are updated
38
- - `DONE: compiled N/N` when `.interf/state.json` is updated successfully
35
+ - `STATUS: inventoried summaries N/N` after the inventory pass is complete
36
+ - `STATUS: read summary files X/N` after each deep-read batch or every 25 files, whichever comes first
37
+ - `STATUS: wrote compile outputs` after `knowledge/` and `home.md` are updated
38
+ - `DONE: compile complete N/N` when the required outputs are on disk
39
39
 
40
40
  If you are blocked or hit an unrecoverable issue, emit `BLOCKED:` or `ERROR:` once with the concrete reason.
41
+ Keep scratch commands single-purpose and non-destructive. Do not start by deleting old outputs with `rm`, wildcard cleanup, `;`, or `&&` chains.
41
42
 
42
43
  ## Prerequisites check
43
44
 
44
- Read `.interf/state.json`. Compare `summarized` vs `compiled`.
45
+ Read the stage contract, inventory, and summaries.
45
46
 
46
- - If `summarized == compiled` and both are current: "Knowledge base is up to date. Nothing to do." Stop.
47
- - If `summarized == 0` or source folder has unprocessed files: "File-evidence stage not ready yet." Stop.
47
+ - If `summaries/` is missing or empty: "File-evidence stage not ready yet." Stop.
48
48
  - Otherwise: proceed.
49
49
 
50
+ ## Execution bias
51
+
52
+ This stage builds a reusable substrate, not a full task-specific intelligence layer.
53
+
54
+ - for small knowledge bases, prefer the smallest useful retrieval surface over graph sprawl
55
+ - for a single report or small folder, do not invent dozens of entities or claims just because the source is rich
56
+ - create only the entities, claims, and indexes that materially help later interface retrieval
57
+ - if `.interf/stage-contract.json` says `summary_total <= 3`, treat the run as a tiny compile: read every summary overview, write the smallest truthful substrate, and stop
58
+ - for a tiny compile, do not spend time designing an elaborate ontology or widening into raw-source exploration
59
+ - a tiny compile is successful when it leaves a grounded home page plus a compact retrieval surface in `knowledge/` that later interfaces can build on
60
+ - stop once the stable substrate exists; do not keep expanding the ontology out of curiosity
61
+
50
62
  ## Execution checklist
51
63
 
52
64
  ```
53
65
  Knowledge-base compile:
54
66
  - [ ] 1. Read interf.json
55
- - [ ] 2a. Inventory scan ALL frontmatter, write .interf/inventory.json
56
- - [ ] 2b. Local evidence reading batch-read abstracts/overviews, update inventory per file
57
- - [ ] 3. Canonicalize entities, threads, and aliases
58
- - [ ] 4. Extract cross-file claims and relationships
59
- - [ ] 5. Build retrieval indexes and navigation
60
- - [ ] 6. Update state (.interf/state.json)
61
- - [ ] 7. Validate
67
+ - [ ] 2. Scan ALL summary frontmatter and write .interf/inventory.json
68
+ - [ ] 3. Read the summary overviews needed for a minimal compile
69
+ - [ ] 4. Write canonical entities, claims, indexes, and home.md
70
+ - [ ] 5. Validate
62
71
  ```
63
72
 
64
73
  ### 1. Read interf.json + local stage docs
@@ -75,111 +84,76 @@ This is what you're working with. Every summary has:
75
84
  - `overview` / `key claims` → source-grounded detail for deeper reads
76
85
 
77
86
  The compile job is to turn these file-level evidence objects into a retrieval-ready knowledge base. Use the active stage contract plus any local docs listed by it for entity discovery rules, claim derivation logic, and quality requirements.
87
+ Prefer source-domain entities over document-shell entities. A report PDF is evidence, not the main ontology. If a market report summary names covered markets, segments, publishers, or themes, compile those as the primary retrieval surface instead of centering the document title alone.
78
88
 
79
89
  ### 2. Scan summaries and create inventory
80
90
 
81
- This step has two phases inventory (deterministic, must be complete) then analysis (can span sessions).
82
-
83
- **Phase A: Inventory (MUST be complete before any analysis)**
84
-
85
- Scan ALL summaries/ frontmatter. Every file. Write `.interf/inventory.json`:
86
-
87
- ```json
88
- {
89
- "total": 2460,
90
- "files": [
91
- {
92
- "file": "summaries/readiness assessment language.md",
93
- "source": "notes/readiness.md",
94
- "source_kind": "note",
95
- "evidence_tier": "primary",
96
- "truth_mode": "stated",
97
- "state": "active",
98
- "frontmatter_scanned": true,
99
- "abstract_read": false,
100
- "full_read": false
101
- }
102
- ],
103
- "summary_map": {
104
- "source_kind": {"note": 340, "plan": 280},
105
- "evidence_tier": {"primary": 600, "secondary": 400},
106
- "truth_mode": {"stated": 700, "reported": 120},
107
- "state": {"active": 640, "draft": 80}
108
- }
109
- }
110
- ```
111
-
112
- Verify: `total` in inventory MUST equal actual summaries/ file count. If not, stop.
91
+ Scan ALL summaries/ frontmatter once. This step is deterministic and must complete before synthesis.
113
92
 
114
- This is deterministic — read frontmatter from every file, write the inventory. No analysis, no interpretation. Fast.
93
+ Write `.interf/inventory.json`:
115
94
 
116
- **Phase B: Deep read (batched, resumable across sessions)**
95
+ Write a full inventory ledger in the current runtime shape. At minimum:
96
+ - `total` must equal the actual `summaries/` file count for this run
97
+ - every summary must have a corresponding inventory entry
98
+ - prefer the current `entries[]` runtime shape over legacy `files[]`
99
+ - for current `entries[]` inventory entries, include at least `source`, `summary`, `frontmatter_scanned: true`, and the overview-read proof the validators use (`abstract`, `abstract_read: true`, or an equivalent current-state field)
100
+ - per-summary entries should preserve the fields the runtime and validators use, such as file path, source path, source metadata, and whether frontmatter or deeper reads were completed
101
+ - for legacy `files[]` inventory entries, use `frontmatter_scanned: true` after the frontmatter pass and `abstract_read: true` after the summary overview read
102
+ - do not invent alternate flag names for those validator-facing fields
103
+ - if you include `summary_map`, derive it from the current inventory instead of copying sample aggregates from docs
117
104
 
118
- Work through inventory.json. For each file where `abstract_read: false`:
119
- - Read the abstract section
120
- - Update inventory: `abstract_read: true`
121
- - Extract entity mentions, thread markers, and potential claims
105
+ Verify: `total` in inventory MUST equal the actual summaries/ file count. If not, stop.
122
106
 
123
- For higher-weight files (`tier_1_authoritative`, `tier_2_direct_record`, or otherwise critical) where `full_read: false`:
124
- - Read the full overview
125
- - Update inventory: `full_read: true`
126
- - Extract deeper evidence
107
+ Then read the summary overviews needed for synthesis:
127
108
 
128
- **Batching:** Process ~200 files per batch. After each batch:
129
- - Write updated inventory.json
130
- - Report progress: "Abstract read: 400/2460 (16%)"
109
+ - if `N <= 25`, read every summary overview
110
+ - if `N > 25`, read all high-signal summaries plus enough additional summaries to build a stable substrate
111
+ - if `N <= 3`, move directly from those overview reads into the smallest honest compile outputs; do not turn a tiny knowledge base into an open-ended graph-design pass
131
112
 
132
- If the session ends mid-batch, the next run reads inventory.json and continues from where it left off. No work is lost.
113
+ Do not turn this into an open-ended archival pass. The compile stage should finish in one run for normal small knowledge bases.
133
114
 
134
115
  ### 3. Canonicalize entities, threads, and aliases
135
116
 
136
- **Prerequisite:** inventory.json must have ALL files scanned (frontmatter_scanned: true). Deep reads (abstract_read) should be substantially complete at least 80% of files. If not, continue Phase B first.
117
+ **Prerequisite:** inventory.json must cover all summaries, and the overview reads above must be complete for the working set.
137
118
 
138
119
  Use the inventory summary_map plus deep-read evidence to identify canonical entities and recurring threads. Create canonical notes in knowledge/entities/ for recurring actors:
139
120
  - people, companies, products, concepts, projects, and durable threads
121
+ - for reports, datasets, and decks, create entities for the covered domain objects when the summary makes them explicit (for example markets, publishers, regions, products, or benchmark topics)
140
122
  - Resolve aliases to one canonical note
141
123
  - Include: summary, evidence links, related entities, first/last seen
142
124
  - Prefer explicit wikilinks to related summaries, entities, and claims so future agents can climb outward through backlinks instead of rereading from scratch
125
+ - For a single report or other small KB, prefer a compact set of 2-6 high-signal entities over exhaustive decomposition.
143
126
 
144
127
  ### 4. Extract cross-file claims and relationships
145
128
 
146
- **Prerequisite:** Same as entities — inventory must be complete.
129
+ **Prerequisite:** Same as entities.
147
130
 
148
131
  Use inventory data plus deep reads to identify patterns across files. Create notes in knowledge/claims/ for cross-file observations:
149
132
  - Must have 2+ supporting sources unless explicitly marked unresolved or exploratory
150
133
  - Use prose-as-title: filename IS the claim
151
134
  - Include: the claim, why it matters, evidence links, and a clear sense of evidence strength
152
135
  - Link claims back to the supporting summaries and related entities so navigation can move claim -> evidence -> source trail cleanly
136
+ - For a single report or small KB, 1-4 strong claims are enough when they capture the main retrieval surface.
153
137
 
154
138
  ### 5. Build retrieval indexes and navigation
155
139
 
156
140
  Create aggregate navigation in knowledge/indexes/:
157
- - People.md, Companies.md, Timeline.md, Themes.md, Projects.md, Threads.md
141
+ - Keep a stable core set first: Companies.md, Markets.md, Themes.md
142
+ - Add extra indexes only when the source base clearly supports them and they do not replace the stable core set
143
+ - For a single report or dataset, prefer report-shaped indexes over generic People/Projects/Timeline scaffolding
158
144
  - Link to canonical entities, high-signal summaries, and major claims
159
145
  - Make the result useful for interface creation and retrieve, not just for human browsing
160
146
  - Treat backlinks as part of the retrieval surface: notes should make it obvious how to move from a high-level concept to the supporting summaries and back again
147
+ - If the KB is very small, keep the indexes short and direct instead of expanding them into standalone essays.
148
+ - For a tiny compile, it is enough for the stable core indexes to be short landing notes that route later interface stages toward the real evidence.
161
149
 
162
150
  Update `home.md` every compile run so it becomes the knowledge-base landing layer for agents.
151
+ Include the source count, the high-signal scope of the knowledge base, and links to the stable core indexes.
163
152
 
164
- ### 6. Update state
165
-
166
- Update `.interf/state.json` with proof of work:
167
-
168
- ```json
169
- {
170
- "compiled": 2460,
171
- "last_compile": "2026-03-30T18:10:00Z",
172
- "entity_count": 85,
173
- "claim_count": 142,
174
- "inventory_complete": true,
175
- "abstracts_read": 2460,
176
- "full_reads": 400
177
- }
178
- ```
179
-
180
- The inventory at `.interf/inventory.json` has per-file detail. State.json has the summary. Both must be consistent. If `abstracts_read` < total, the compile is incomplete — next run continues.
153
+ ### 6. Runtime reconciliation
181
154
 
182
- Refresh `.interf/health.json` after state is updated. The CLI refreshes `.interf/view-spec.json` after stage completion so viewers keep a stable knowledge-base-level presentation contract.
155
+ The CLI reconciles `.interf/state.json`, refreshes `.interf/health.json`, and refreshes `.interf/view-spec.json` after stage validation so viewers keep a stable knowledge-base-level presentation contract.
156
+ Rewrite outputs directly instead of clearing `knowledge/` or `.interf/` first. If a stale artifact truly must go away, remove only that explicit path after the replacement files are already written.
183
157
 
184
158
  ### 7. Validate
185
159
 
@@ -188,6 +162,7 @@ Refresh `.interf/health.json` after state is updated. The CLI refreshes `.interf
188
162
  - [ ] Claims preserve evidence strength and do not overstate exploratory material
189
163
  - [ ] No wikilinks to nonexistent files
190
164
  - [ ] home.md is current
165
+ - [ ] The result is compact enough that an interface stage can reuse it without re-reading a bloated local graph
191
166
 
192
167
  ## Graph quality rules
193
168
 
@@ -196,6 +171,7 @@ Refresh `.interf/health.json` after state is updated. The CLI refreshes `.interf
196
171
  - Repair broken wikilinks
197
172
  - Prefer explicit wikilinks over vague prose
198
173
  - Use properties for machine filtering, tags for Obsidian surfacing
174
+ - Prefer a small stable graph over speculative expansion
199
175
 
200
176
  After compile, prefer running:
201
177
 
@@ -208,11 +184,11 @@ If it fails, fix inventory/state/output consistency before treating the knowledg
208
184
  Report:
209
185
  ```
210
186
  Step 2/2 complete — Knowledge-base compile
211
- Entities: 85, Claims: 142
187
+ Entities: <entity_count>, Claims: <claim_count>
212
188
  home.md updated.
213
189
  ```
214
190
 
215
- When the required outputs, state, and health files are written, emit the required `DONE:` line and stop. Do not keep browsing or auditing after the compile contract is satisfied.
191
+ When the required outputs and inventory are written, emit the required `DONE:` line and stop. Do not keep browsing or auditing after the compile contract is satisfied.
216
192
 
217
193
  ## What this skill does NOT do
218
194
 
@@ -22,7 +22,7 @@ Do NOT create claims from single observations unless marked as unresolved/hypoth
22
22
 
23
23
  Use prose-as-title: the filename IS the claim.
24
24
 
25
- Example filename: `GATHR and Aon act as paid R&D for the product thesis.md`
25
+ Example filename: `{subject} acts as {relationship} for {entity}.md`
26
26
 
27
27
  ```markdown
28
28
  ---
@@ -8,7 +8,7 @@ Create canonical notes in knowledge/entities/ for recurring actors in the knowle
8
8
  2. Scan overviews for company names, product names, concepts
9
9
  3. For each actor appearing 3+ times:
10
10
  - Create a canonical entity note
11
- - Resolve aliases (e.g., "Matt" and "Matteo" one note)
11
+ - Resolve aliases (e.g., "{Short name}" and "{Full name}" -> one note)
12
12
  - Link to all supporting summaries/ files via wikilinks
13
13
 
14
14
  ## Entity note format
@@ -41,6 +41,6 @@ Create canonical notes in knowledge/entities/ for recurring actors in the knowle
41
41
  ## Alias resolution
42
42
 
43
43
  When multiple names refer to the same actor:
44
- - Pick the most complete name as canonical (e.g., "Matteo Cassese" not "Matt")
44
+ - Pick the most complete name as canonical (e.g., "{Full Name}" not "{Nickname}")
45
45
  - Mention aliases in the summary
46
46
  - All evidence links point to the one canonical note
@@ -20,11 +20,23 @@ Default loop:
20
20
  - follow wikilinks and backlinks outward before treating one note as complete
21
21
  - use `summaries/` for deeper evidence
22
22
  - use raw source files only when needed for verification, direct quotes, ambiguity, or missing context
23
+ - when a caller asks for a trace, audit log, or `artifacts_consulted` list, record `workflow/use/query/SKILL.md` after you inspect it
23
24
 
24
25
  Raw-source gate:
25
26
  - inspect `.interf/source-access.json`
26
- - verify one `suggested_checks` path is actually readable from this session before claiming raw-file verification
27
+ - actually open and inspect at least one `suggested_checks` path before claiming raw-file verification; a plain existence check is not enough
28
+ - when a caller asks for a trace, audit log, or `artifacts_consulted` list, record `.interf/source-access.json` after you inspect it
27
29
  - if the path is not reachable or permission is not granted, say the answer is based on compiled knowledge-base artifacts only
30
+ - when the question depends on exact figures, direct quotes, chart values, table values, or image-derived evidence, raw inspection is required before answering confidently
31
+
32
+ PDF / chart rule:
33
+ - if the source is a PDF, deck, or report and the needed evidence may live in charts, tables, or figures, do not assume the default text layer or existing notes captured everything
34
+ - if summaries do not preserve the needed numeric detail, inspect the raw source and say whether the value was text-derived, table-derived, or chart-derived
35
+ - opening the PDF with `Read` is not enough for an exact-value chart question; take a machine-readable extraction path before answering
36
+ - if the first local extraction method misses the number, attempt another local recovery path before settling for a visual estimate
37
+ - if the default local extraction path still cannot reach the value, switch methods before stopping early; a temporary scratch helper outside the workspace is allowed when needed
38
+ - if the chart does not expose exact numbers as text, say that clearly instead of pretending the compiled notes were sufficient
39
+ - if you can only estimate from the chart, label the answer `approximate` and keep the precision gap explicit
28
40
 
29
41
  When confidence is low:
30
42
  - expand outward through linked claims, entities, indexes, and summaries