@interf/compiler 0.33.0 → 0.50.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 (234) hide show
  1. package/README.md +122 -226
  2. package/dist/cli/commands/agents.js +1 -32
  3. package/dist/cli/commands/benchmark.d.ts +2 -3
  4. package/dist/cli/commands/benchmark.js +1 -31
  5. package/dist/cli/commands/build-plan.js +26 -50
  6. package/dist/cli/commands/build.d.ts +2 -3
  7. package/dist/cli/commands/build.js +1 -31
  8. package/dist/cli/commands/graphs.js +177 -32
  9. package/dist/cli/commands/mcp.d.ts +1 -0
  10. package/dist/cli/commands/mcp.js +223 -126
  11. package/dist/cli/commands/project.js +10 -36
  12. package/dist/cli/commands/reset.d.ts +2 -3
  13. package/dist/cli/commands/reset.js +1 -22
  14. package/dist/cli/commands/runs.js +86 -33
  15. package/dist/cli/commands/status.js +3 -24
  16. package/dist/cli/commands/traces.js +1 -29
  17. package/dist/cli/commands/wizard.js +17 -29
  18. package/dist/cli/lib/http-client.d.ts +39 -0
  19. package/dist/cli/lib/http-client.js +73 -0
  20. package/dist/packages/build-plans/authoring/brief.d.ts +25 -4
  21. package/dist/packages/build-plans/authoring/build-plan-authoring.d.ts +42 -1
  22. package/dist/packages/build-plans/authoring/build-plan-authoring.js +470 -63
  23. package/dist/packages/build-plans/authoring/build-plan-edit-session.d.ts +9 -0
  24. package/dist/packages/build-plans/authoring/build-plan-edit-session.js +27 -10
  25. package/dist/packages/build-plans/authoring/build-plan-improvement.js +62 -8
  26. package/dist/packages/build-plans/authoring/lib/build-plan-edit-utils.d.ts +1 -0
  27. package/dist/packages/build-plans/package/build-plan-definitions.d.ts +0 -1
  28. package/dist/packages/build-plans/package/build-plan-definitions.js +5 -3
  29. package/dist/packages/build-plans/package/build-plan-stage-runner.d.ts +1 -0
  30. package/dist/packages/build-plans/package/build-plan-stage-runner.js +2 -1
  31. package/dist/packages/build-plans/package/builtin-build-plan.d.ts +2 -2
  32. package/dist/packages/build-plans/package/builtin-build-plan.js +3 -3
  33. package/dist/packages/build-plans/package/context-interface.d.ts +3 -0
  34. package/dist/packages/build-plans/package/context-interface.js +5 -5
  35. package/dist/packages/build-plans/package/interf-build-plan-package.js +22 -22
  36. package/dist/packages/build-plans/package/local-build-plans.d.ts +10 -5
  37. package/dist/packages/build-plans/package/local-build-plans.js +57 -32
  38. package/dist/packages/contracts/index.d.ts +4 -3
  39. package/dist/packages/contracts/index.js +2 -1
  40. package/dist/packages/contracts/lib/context-graph-layer.d.ts +161 -0
  41. package/dist/packages/contracts/lib/context-graph-layer.js +216 -0
  42. package/dist/packages/contracts/lib/project-paths.d.ts +7 -0
  43. package/dist/packages/contracts/lib/project-paths.js +9 -0
  44. package/dist/packages/contracts/lib/project-schema.d.ts +264 -1
  45. package/dist/packages/contracts/lib/project-schema.js +38 -13
  46. package/dist/packages/contracts/lib/schema.d.ts +556 -23
  47. package/dist/packages/contracts/lib/schema.js +279 -18
  48. package/dist/packages/contracts/utils/filesystem.d.ts +1 -0
  49. package/dist/packages/contracts/utils/filesystem.js +29 -1
  50. package/dist/packages/projects/lib/schema.d.ts +6 -8
  51. package/dist/packages/projects/lib/schema.js +3 -1
  52. package/dist/packages/projects/source-config.d.ts +0 -5
  53. package/dist/packages/projects/source-config.js +9 -22
  54. package/dist/packages/runtime/actions/fields.d.ts +4 -0
  55. package/dist/packages/runtime/actions/form-builders.js +79 -31
  56. package/dist/packages/runtime/actions/form-validators.js +9 -3
  57. package/dist/packages/runtime/actions/helpers.js +3 -3
  58. package/dist/packages/runtime/actions/registry.d.ts +1 -1
  59. package/dist/packages/runtime/actions/registry.js +1 -1
  60. package/dist/packages/runtime/actions/requests.d.ts +1 -1
  61. package/dist/packages/runtime/actions/requests.js +12 -6
  62. package/dist/packages/runtime/actions/schemas.d.ts +7 -0
  63. package/dist/packages/runtime/actions/schemas.js +1 -0
  64. package/dist/packages/runtime/agent-handoff.js +8 -7
  65. package/dist/packages/runtime/agents/lib/execution-profile.d.ts +14 -0
  66. package/dist/packages/runtime/agents/lib/execution-profile.js +23 -0
  67. package/dist/packages/runtime/agents/lib/execution.js +14 -8
  68. package/dist/packages/runtime/agents/lib/executors.d.ts +1 -0
  69. package/dist/packages/runtime/agents/lib/executors.js +11 -2
  70. package/dist/packages/runtime/agents/lib/logs.d.ts +10 -0
  71. package/dist/packages/runtime/agents/lib/logs.js +32 -8
  72. package/dist/packages/runtime/agents/lib/preflight.js +4 -1
  73. package/dist/packages/runtime/agents/lib/render.d.ts +18 -0
  74. package/dist/packages/runtime/agents/lib/render.js +44 -18
  75. package/dist/packages/runtime/agents/lib/shell-templates.js +105 -63
  76. package/dist/packages/runtime/agents/lib/shells.d.ts +29 -0
  77. package/dist/packages/runtime/agents/lib/shells.js +158 -32
  78. package/dist/packages/runtime/agents/lib/source-context-scan.d.ts +10 -0
  79. package/dist/packages/runtime/agents/lib/source-context-scan.js +388 -0
  80. package/dist/packages/runtime/agents/lib/status.js +1 -14
  81. package/dist/packages/runtime/agents/lib/string-utils.d.ts +16 -0
  82. package/dist/packages/runtime/agents/lib/string-utils.js +36 -0
  83. package/dist/packages/runtime/agents/lib/types.d.ts +1 -0
  84. package/dist/packages/runtime/agents/providers/codex.js +2 -0
  85. package/dist/packages/runtime/agents/role-executors.js +2 -1
  86. package/dist/packages/runtime/auth/session-store.js +11 -3
  87. package/dist/packages/runtime/benchmark-question-draft.d.ts +3 -0
  88. package/dist/packages/runtime/benchmark-question-draft.js +57 -28
  89. package/dist/packages/runtime/build/artifact-status.d.ts +1 -1
  90. package/dist/packages/runtime/build/artifact-status.js +1 -1
  91. package/dist/packages/runtime/build/build-evidence.d.ts +2 -1
  92. package/dist/packages/runtime/build/build-evidence.js +11 -5
  93. package/dist/packages/runtime/build/build-pipeline.js +89 -5
  94. package/dist/packages/runtime/build/build-stage-plan.js +3 -1
  95. package/dist/packages/runtime/build/build-stage-runner.js +169 -32
  96. package/dist/packages/runtime/build/build-target.d.ts +3 -0
  97. package/dist/packages/runtime/build/build-target.js +25 -1
  98. package/dist/packages/runtime/build/check-evaluator.d.ts +1 -1
  99. package/dist/packages/runtime/build/check-evaluator.js +655 -4
  100. package/dist/packages/runtime/build/context-graph-paths.d.ts +13 -0
  101. package/dist/packages/runtime/build/context-graph-paths.js +27 -0
  102. package/dist/packages/runtime/build/index.d.ts +2 -2
  103. package/dist/packages/runtime/build/index.js +2 -2
  104. package/dist/packages/runtime/build/inspect-map.d.ts +10 -0
  105. package/dist/packages/runtime/build/inspect-map.js +270 -0
  106. package/dist/packages/runtime/build/lib/schema.d.ts +246 -53
  107. package/dist/packages/runtime/build/lib/schema.js +173 -15
  108. package/dist/packages/runtime/build/native-entrypoint.d.ts +2 -0
  109. package/dist/packages/runtime/build/native-entrypoint.js +286 -0
  110. package/dist/packages/runtime/build/runtime-contracts.js +9 -3
  111. package/dist/packages/runtime/build/runtime-log-paths.d.ts +3 -0
  112. package/dist/packages/runtime/build/runtime-log-paths.js +16 -0
  113. package/dist/packages/runtime/build/runtime-prompt.js +6 -4
  114. package/dist/packages/runtime/build/runtime-runs.js +63 -10
  115. package/dist/packages/runtime/build/runtime-types.d.ts +4 -1
  116. package/dist/packages/runtime/build/runtime.d.ts +3 -1
  117. package/dist/packages/runtime/build/runtime.js +3 -1
  118. package/dist/packages/runtime/build/source-files.js +11 -2
  119. package/dist/packages/runtime/build/source-inventory.d.ts +1 -0
  120. package/dist/packages/runtime/build/source-inventory.js +246 -7
  121. package/dist/packages/runtime/build/source-manifest.d.ts +11 -0
  122. package/dist/packages/runtime/build/source-manifest.js +30 -2
  123. package/dist/packages/runtime/build/stage-evidence.js +80 -11
  124. package/dist/packages/runtime/build/stage-manifest.d.ts +45 -0
  125. package/dist/packages/runtime/build/stage-manifest.js +1125 -0
  126. package/dist/packages/runtime/build/stage-reuse.js +12 -0
  127. package/dist/packages/runtime/build/stage-session.d.ts +81 -0
  128. package/dist/packages/runtime/build/stage-session.js +308 -0
  129. package/dist/packages/runtime/build/state-io.js +10 -11
  130. package/dist/packages/runtime/build/state-view.js +1 -1
  131. package/dist/packages/runtime/build/state.d.ts +1 -1
  132. package/dist/packages/runtime/build/state.js +1 -1
  133. package/dist/packages/runtime/build/summary-coverage-index.d.ts +21 -0
  134. package/dist/packages/runtime/build/summary-coverage-index.js +189 -0
  135. package/dist/packages/runtime/build/traces.js +3 -3
  136. package/dist/packages/runtime/build/validate-context-graph.d.ts +1 -1
  137. package/dist/packages/runtime/build/validate-context-graph.js +5 -5
  138. package/dist/packages/runtime/build/validate.d.ts +1 -1
  139. package/dist/packages/runtime/build/validate.js +1 -1
  140. package/dist/packages/runtime/client.d.ts +3 -3
  141. package/dist/packages/runtime/client.js +8 -13
  142. package/dist/packages/runtime/context-checks.js +13 -0
  143. package/dist/packages/runtime/context-graph-scaffold.js +2 -1
  144. package/dist/packages/runtime/context-graph-semantic-graph.d.ts +9 -0
  145. package/dist/packages/runtime/context-graph-semantic-graph.js +416 -0
  146. package/dist/packages/runtime/execution/lib/schema.d.ts +34 -31
  147. package/dist/packages/runtime/index.d.ts +2 -2
  148. package/dist/packages/runtime/index.js +1 -1
  149. package/dist/packages/runtime/native-run-handlers.d.ts +38 -0
  150. package/dist/packages/runtime/native-run-handlers.js +52 -33
  151. package/dist/packages/runtime/plan-artifact-contract.js +1 -1
  152. package/dist/packages/runtime/project-source-state.d.ts +4 -4
  153. package/dist/packages/runtime/project-source-state.js +5 -2
  154. package/dist/packages/runtime/project-store.d.ts +5 -0
  155. package/dist/packages/runtime/project-store.js +30 -3
  156. package/dist/packages/runtime/requested-artifacts.js +1 -1
  157. package/dist/packages/runtime/run-observability.js +9 -4
  158. package/dist/packages/runtime/runtime-action-proposals.js +3 -3
  159. package/dist/packages/runtime/runtime-build-plans.js +47 -3
  160. package/dist/packages/runtime/runtime-build-runs.js +9 -16
  161. package/dist/packages/runtime/runtime-caches.d.ts +26 -0
  162. package/dist/packages/runtime/runtime-caches.js +47 -0
  163. package/dist/packages/runtime/runtime-jobs.js +6 -6
  164. package/dist/packages/runtime/runtime-project-mutations.js +1 -0
  165. package/dist/packages/runtime/runtime-project-reads.d.ts +4 -1
  166. package/dist/packages/runtime/runtime-project-reads.js +229 -36
  167. package/dist/packages/runtime/runtime-proposal-helpers.js +6 -6
  168. package/dist/packages/runtime/runtime-resource-builders.d.ts +4 -2
  169. package/dist/packages/runtime/runtime-resource-builders.js +16 -14
  170. package/dist/packages/runtime/runtime-status.d.ts +14 -0
  171. package/dist/packages/runtime/runtime-status.js +15 -0
  172. package/dist/packages/runtime/runtime-verify-runs.js +6 -5
  173. package/dist/packages/runtime/runtime.d.ts +439 -22
  174. package/dist/packages/runtime/runtime.js +16 -2
  175. package/dist/packages/runtime/schemas/actions.d.ts +24 -0
  176. package/dist/packages/runtime/schemas/agents.d.ts +28 -0
  177. package/dist/packages/runtime/schemas/agents.js +33 -0
  178. package/dist/packages/runtime/schemas/build-plans.d.ts +181 -8
  179. package/dist/packages/runtime/schemas/build-plans.js +36 -2
  180. package/dist/packages/runtime/schemas/context-graphs.d.ts +1522 -0
  181. package/dist/packages/runtime/schemas/context-graphs.js +110 -0
  182. package/dist/packages/runtime/schemas/files.d.ts +7 -347
  183. package/dist/packages/runtime/schemas/files.js +1 -24
  184. package/dist/packages/runtime/schemas/index.d.ts +1 -0
  185. package/dist/packages/runtime/schemas/index.js +1 -0
  186. package/dist/packages/runtime/schemas/jobs.js +4 -0
  187. package/dist/packages/runtime/schemas/projects.d.ts +48 -21
  188. package/dist/packages/runtime/schemas/projects.js +34 -10
  189. package/dist/packages/runtime/schemas/runs.d.ts +1009 -240
  190. package/dist/packages/runtime/schemas/runs.js +17 -0
  191. package/dist/packages/runtime/service/openapi.js +1 -0
  192. package/dist/packages/runtime/service/operations.d.ts +1666 -145
  193. package/dist/packages/runtime/service/operations.js +147 -17
  194. package/dist/packages/runtime/service/routes.d.ts +11 -3
  195. package/dist/packages/runtime/service/routes.js +11 -3
  196. package/dist/packages/runtime/service/server-app-boot.js +2 -2
  197. package/dist/packages/runtime/service/server-helpers.d.ts +11 -0
  198. package/dist/packages/runtime/service/server-helpers.js +19 -0
  199. package/dist/packages/runtime/service/server-routes-action-proposals.js +4 -2
  200. package/dist/packages/runtime/service/server-routes-agents.js +19 -85
  201. package/dist/packages/runtime/service/server-routes-build-plans.js +14 -11
  202. package/dist/packages/runtime/service/server-routes-project-context.js +102 -7
  203. package/dist/packages/runtime/service/server-routes-project-jobs.js +19 -12
  204. package/dist/packages/runtime/service/server-routes-project-runs.js +5 -2
  205. package/dist/packages/runtime/service/server-routes-projects.js +6 -2
  206. package/dist/packages/runtime/service/server-routes-runs.js +11 -4
  207. package/dist/packages/runtime/verify/lib/schema.js +12 -0
  208. package/dist/packages/runtime/verify/test-file-guard.d.ts +2 -0
  209. package/dist/packages/runtime/verify/test-file-guard.js +29 -0
  210. package/dist/packages/runtime/verify/verify-execution.d.ts +7 -0
  211. package/dist/packages/runtime/verify/verify-execution.js +109 -35
  212. package/dist/packages/runtime/verify/verify-paths.d.ts +1 -0
  213. package/dist/packages/runtime/verify/verify-paths.js +4 -0
  214. package/dist/packages/runtime/verify/verify-specs.js +49 -39
  215. package/dist/packages/runtime/wire-schemas.d.ts +1 -1
  216. package/dist/packages/runtime/wire-schemas.js +1 -1
  217. package/package.json +2 -8
  218. package/public-repo/CONTRIBUTING.md +10 -3
  219. package/public-repo/README.md +122 -226
  220. package/public-repo/build-plans/interf-default/README.md +15 -12
  221. package/public-repo/build-plans/interf-default/build/stages/entrypoint/SKILL.md +74 -0
  222. package/public-repo/build-plans/interf-default/build/stages/knowledge/SKILL.md +95 -0
  223. package/public-repo/build-plans/interf-default/build/stages/summarize/SKILL.md +38 -5
  224. package/public-repo/build-plans/interf-default/build-plan.json +27 -23
  225. package/public-repo/build-plans/interf-default/build-plan.schema.json +24 -20
  226. package/public-repo/build-plans/interf-default/use/query/SKILL.md +8 -7
  227. package/public-repo/openapi/local-service.openapi.json +11637 -4213
  228. package/public-repo/skills/interf/SKILL.md +174 -134
  229. package/dist/packages/runtime/build/runtime-paths.d.ts +0 -8
  230. package/dist/packages/runtime/build/runtime-paths.js +0 -26
  231. package/dist/packages/runtime/build/state-paths.d.ts +0 -7
  232. package/dist/packages/runtime/build/state-paths.js +0 -22
  233. package/public-repo/build-plans/interf-default/build/stages/shape/SKILL.md +0 -34
  234. package/public-repo/build-plans/interf-default/build/stages/structure/SKILL.md +0 -28
@@ -0,0 +1,74 @@
1
+ # Entrypoint
2
+
3
+ Assemble the primary Context Graph entrypoint and task-specific entrypoint
4
+ notes around the saved Project intent and coverage.
5
+
6
+ Contract type: `build-entrypoint`
7
+
8
+ This stage is service-owned in the default local runtime. The local service
9
+ uses the same stage shell, expected inputs, reviewed inputs, output validation,
10
+ and StageManifest path, but writes deterministic routing notes from already
11
+ prepared summaries and knowledge instead of asking an agent to reinterpret the
12
+ Source.
13
+
14
+ ## Requirements
15
+
16
+ - Read `runtime/project.json`, `runtime/stage-contract.json.project.intent`,
17
+ `runtime/expected-inputs.json`, summaries, and knowledge notes before writing
18
+ outputs.
19
+ - Write `runtime/reviewed-inputs.json` with one decision for every required
20
+ expected knowledge note before DONE.
21
+ - `runtime/reviewed-inputs.json` must use this shape:
22
+ - `{`
23
+ - ` "kind": "interf-stage-reviewed-inputs",`
24
+ - ` "version": 1,`
25
+ - ` "generated_at": "2026-01-01T00:00:00.000Z",`
26
+ - ` "stage_id": "entrypoint",`
27
+ - ` "reviewed": [`
28
+ - ` { "resource_id": "knowledge-example", "decision": "used", "source_refs": ["knowledge/example.md"] }`
29
+ - ` ]`
30
+ - `}`
31
+ - Use Project intent plus coverage from summaries and knowledge to shape
32
+ `home.md`, `artifacts/`, and supporting graph routes.
33
+ - Write `home.md` as the downstream agent's primary entrypoint. It must tell
34
+ the next agent where to start, what source refs matter, and what caveats or
35
+ source re-checks remain.
36
+ - Route into all three fixed layers: `summaries/` (coverage — every Source file
37
+ read), `knowledge/` (the connected knowledge web — traverse/query),
38
+ `artifacts/` (task handoffs). Do not introduce a new top-level folder; richer
39
+ structure nests under `knowledge/`.
40
+ - Close the whole-graph connectivity floor (`graph_notes_connected`): EVERY note
41
+ in the graph — including every summary, not only the ones a knowledge note
42
+ happened to cite — must be reachable through the link web. A summary that no
43
+ note links is a free-floating island and fails readiness. Make `home.md` (or a
44
+ coverage-index note it links, e.g. `summaries/index.md`) route into the
45
+ coverage layer so every summary has at least one inbound link. For a large
46
+ coverage layer, prefer a `summaries/` index note that links each summary and
47
+ link that index from `home.md`, rather than listing hundreds of summaries
48
+ directly in `home.md`. The floor is connectedness, not a quota — one genuine
49
+ inbound or outbound link per note is enough; never fabricate links to pass.
50
+ - Write at least one task-specific entrypoint note under `artifacts/` when it
51
+ helps the agent continue from prepared context.
52
+ - Each task entrypoint note must start with JSON frontmatter containing non-empty `task`, `source_refs`, `handoff_type`, and `caveats`. Optional routing fields (for example a source-evidence posture or a coverage state) may be added when they help the next agent, but the gating keys are those four.
53
+ - `source_refs` must point to original Source locations, not just generated summaries or knowledge notes.
54
+ - Task entrypoint notes should tell the downstream agent which original Source files, pages, figures, tables, sections, units, periods, series, and caveats matter for the task.
55
+ - Task entrypoint notes should route the downstream agent to original Source refs for exact claims. Do not present generated summaries or knowledge notes as the dataset or source of truth.
56
+ - Do not leave the scaffold `Not yet built.` placeholder in place.
57
+ - When you add wikilinks, target real Context Graph notes by exact basename or explicit relative path.
58
+ - If you introduce a new note name in `home.md` or another shaped output, the same stage must also create that note file.
59
+ - Prefer direct file-reading and search tools over shell commands for routine file inspection.
60
+ - When a source value is approximate, preserve it as a bounded range and say why it is approximate.
61
+ - Do not invent finer precision than the source supports.
62
+ - For unlabeled charts, screenshots, diagrams, or visual marks, either create a measurement note with source-grounded visual reference, calibration, method, and uncertainty, or tell the downstream agent to inspect the original Source before answering.
63
+ - Keep approximate values consistent across `home.md`, focused indexes, and claim/entity notes.
64
+ - Do not copy expected answers into the Context Graph.
65
+
66
+ ## Notes
67
+
68
+ - Use the saved Project intent and coverage metrics to bias the final Context Graph toward the job it should be especially good at.
69
+ - Do not copy benchmark expected answers into the final Context Graph.
70
+ - Prefer the saved summary evidence and structured notes when they already preserve routing, source refs, and caveats.
71
+ - Reopen source references during shaping when exact wording, table values, chart reads, or provenance-sensitive claims matter.
72
+ - If a prepared value depends on source-derived values, route the entrypoint or handoff to source refs and preserve source granularity instead of fabricating precision.
73
+ - Prefer better routing, prioritization, and focused navigation over speculative synthesis.
74
+ - Any wikilinks you add to `home.md` or indexes must resolve to real Context Graph note basenames or explicit relative paths.
@@ -0,0 +1,95 @@
1
+ # Knowledge
2
+
3
+ Build the task-aware Context Graph knowledge layer from the summaries.
4
+
5
+ Contract type: `build-knowledge`
6
+
7
+ ## Requirements
8
+
9
+ - Treat the Context Graph knowledge layer as retrieval support, not final truth.
10
+ - Read `runtime/project.json` and `runtime/stage-contract.json.project.intent`
11
+ before choosing the knowledge notes. The knowledge layer must be task-aware:
12
+ extract claims, entities, timelines, comparisons, risks, or indexes that help
13
+ the saved Project intent, not just a generic source outline.
14
+ - Read `runtime/expected-inputs.json` before writing notes and write
15
+ `runtime/reviewed-inputs.json` with one decision for every required expected
16
+ summary before DONE.
17
+ - `runtime/reviewed-inputs.json` must use this shape:
18
+ - `{`
19
+ - ` "kind": "interf-stage-reviewed-inputs",`
20
+ - ` "version": 1,`
21
+ - ` "generated_at": "2026-01-01T00:00:00.000Z",`
22
+ - ` "stage_id": "knowledge",`
23
+ - ` "reviewed": [`
24
+ - ` { "resource_id": "summary-example", "decision": "used", "source_refs": ["summaries/example/summary.md"] }`
25
+ - ` ]`
26
+ - `}`
27
+ - Prefer durable entity, claim, and index notes over one giant catch-all file.
28
+ - Write those notes as flat markdown files under `knowledge/` unless this
29
+ Build Plan explicitly declares typed child folders.
30
+ - The Context Graph has three FIXED top-level layers plus `home.md`, each with a
31
+ purpose serving humans AND agents:
32
+ - `summaries/` — grounding/coverage: one folder per Source file, each linking
33
+ back to its Source. Human-first: navigate and understand "what's in my data".
34
+ - `knowledge/` — the knowledge web: claims, entities, timelines, tables, etc.
35
+ Agent-first: traverse and query. Every note links DOWN to its summary, carries
36
+ raw `source_refs`, and links to OTHER knowledge notes.
37
+ - `artifacts/` — higher-level task outputs/handoffs that reference summaries and
38
+ knowledge (plus raw source refs for exact claims). Human deliverable and agent
39
+ entrypoint.
40
+ - `home.md` — start here; routes into all three.
41
+ - The interior of `knowledge/` is free: a typed interior such as
42
+ `knowledge/entities/`, `knowledge/claims/`, `knowledge/timelines/`,
43
+ `knowledge/tables/`, or `knowledge/atlas/` is encouraged when the task needs
44
+ richer structure. But core derived content must stay UNDER these canonical
45
+ layers — never invent a new top-level folder (for example `graph/` or
46
+ `insights/`) for core content. If you need richer structure, nest it under
47
+ `knowledge/<interior>/`; the layer recognition routes `knowledge/<anything>/`
48
+ to the knowledge layer.
49
+ - Keep claims connected to the summaries and original source references that
50
+ support them, so users can follow links back to sources.
51
+ - Every knowledge note MUST wikilink the summary of every source it cites.
52
+ For each source a note records in its `source_refs`, add a
53
+ `[[summaries/<source-name>/summary]]` wikilink (or
54
+ `[[summaries/<source-name>/manifest]]` for paginated/visual sources) in that
55
+ note's body. Source refs alone are not enough: a note that cites a source
56
+ without linking its summary leaves that summary an orphaned island and fails
57
+ the stage. This is not optional — there is no plain-source-ref opt-out for the
58
+ summary layer.
59
+ - Build the knowledge layer as a connected WEB, not isolated islands. In
60
+ addition to the mandatory `[[summaries/...]]` down-link, every knowledge note
61
+ should link at least one OTHER knowledge note (entity to claim, claim to
62
+ related claim, note to index) using its filename stem under `knowledge/`. A
63
+ note that links no other knowledge note is a disconnected island and fails the
64
+ `knowledge_web_connectivity` check. This enforces CONNECTEDNESS, not a count: a
65
+ single genuine link is enough, and a genuinely lone note on a sparse Source is
66
+ fine. Never invent links to pass — fabricated links are worse than honest
67
+ sparsity.
68
+ - Every claim or entity note MUST also record raw `source_refs` in JSON
69
+ frontmatter — the original Source paths it asserts from — so a reader can drop
70
+ to ground truth and verify instead of trusting a paraphrased summary. Keep
71
+ both pointers: the `[[summary]]` wikilink is for navigation, the `source_refs`
72
+ are for verification, and every source in `source_refs` must also have its
73
+ summary wikilinked (above).
74
+ - A pure index or navigation note that asserts nothing of its own (for example a
75
+ `knowledge/index.md` route map, or the no-intent `knowledge/task-focus.md`
76
+ fallback) may set `"note_role": "index"` in its JSON frontmatter to opt out of
77
+ the `source_refs` requirement. Do not use this to dodge provenance on a note
78
+ that makes a claim — fabricated source refs are worse than none.
79
+ - Use knowledge notes as navigation and assurance. They are not the authority
80
+ for exact wording, table values, chart reads, or provenance-sensitive claims.
81
+ - Keep knowledge-stage links stage-local: prefer linking only to summaries or knowledge notes that are already meaningful by the end of this stage. Avoid relying on `home.md` or other entrypoint-stage routes as the main navigation surface.
82
+ - Prefer direct file-reading and search tools over shell commands for routine file inspection.
83
+
84
+ ## Notes
85
+
86
+ - Bias knowledge notes toward canonical entities, claims, timelines, and stable indexes.
87
+ - Use taxonomy and ontology only as means to improve retrieval, navigation, and evidence tracking.
88
+ - For small Sources, prefer a minimal stable substrate over exhaustive flow sprawl.
89
+ - When you add wikilinks, target real Context Graph notes by exact basename or explicit relative path. Do not invent title-style links unless that exact title is also a declared note label or alias.
90
+ - Do not add wikilinks in knowledge outputs to files that the entrypoint stage creates later. If a route belongs in `home.md` or a later entrypoint note, leave plain text now and let the later stage add the link.
91
+ - Build task-aware claims, entities, topics, timelines, comparisons, and indexes from the summaries and their source refs. Use clear filenames such as `knowledge/rent-growth-claims.md`, `knowledge/market-entities.md`, or `knowledge/index.md`.
92
+ - If the Project intent is missing, write a small `knowledge/task-focus.md`
93
+ note that says the graph has no saved Project intent yet and bias the rest of
94
+ the knowledge layer toward coverage and source routing.
95
+ - For summary references, you MUST link the summary itself: `[[summaries/<source-name>/summary]]` or, for paginated/visual sources, `[[summaries/<source-name>/manifest]]` (page note links are an optional addition). Do not cite a summary's source with plain source refs only — link the summary note. For links to other knowledge notes, use the final filename stem under `knowledge/` — and use these to satisfy the web requirement above: every knowledge note should reach at least one other knowledge note so the layer is a connected web, not a star of islands flagged by `knowledge_web_connectivity`.
@@ -29,19 +29,52 @@ Contract type: `build-file-evidence`
29
29
  - A bare `Abstract` label without markdown heading syntax does not count.
30
30
  - Do not skip the abstract just because the overview section is present.
31
31
  - Build `summaries/` as a coverage layer:
32
- - one folder per source file, named so a human can match it to the original source file
33
- - non-paginated sources: `summaries/<source-name>/summary.md`
34
- - PDFs, decks, images, or paginated/visual reports: `summaries/<source-name>/manifest.md` plus `pages/001/summary.md`, `pages/002/summary.md`, etc. for every page/slide that can be inspected
32
+ - one folder per source file, named exactly from `runtime/expected-inputs.json` metadata `source_path`
33
+ - keep the original file extension in the folder name; do not strip `.md`, `.txt`, `.pdf`, or similar suffixes
34
+ - non-paginated sources: `summaries/<source_path>/summary.md`, for example `summaries/01-source-note.md/summary.md`
35
+ - PDFs, decks, images, or paginated/visual reports: `summaries/<source_path>/manifest.md` plus `pages/001/summary.md`, `pages/002/summary.md`, etc. for every page/slide that can be inspected
35
36
  - if a page/slide cannot be extracted, record `not_extracted_reason` in the manifest instead of silently skipping it
36
37
  - optional `screenshot.png` or visual trace paths only when useful and available
37
38
  - Preserve links back to sources through the `source_file_id`, `source`, `source_path`, `source_locator`, page,
38
39
  section, table, chart, figure, or region references the source provides.
40
+ - Connect every summary INTO the graph web — a summary that no note links and that
41
+ links no note is a free-floating island and fails the whole-graph
42
+ `graph_notes_connected` gate. Source refs point DOWN to the original file; they
43
+ are NOT graph-note links and do not connect a summary to the web. So in each
44
+ summary's body add at least one `[[wikilink]]` to a sibling note in the graph:
45
+ a `summaries/<index>` / section index you maintain for the group, a related
46
+ summary, or `[[home]]`. If this stage writes a per-group or per-folder index
47
+ note under `summaries/`, link each summary to its index and link the index back
48
+ from `home.md` (the entrypoint stage may also route `home.md` into the coverage
49
+ layer). The point is reachability: every summary must be reachable through the
50
+ link web, not only through a source_ref.
39
51
  - Do not copy source files into the Context Graph. Store source references.
52
+ - Treat this stage as common grounding. Capture what each Source contains and
53
+ how to get back to it; leave task-specific synthesis to `knowledge` and
54
+ `entrypoint` unless a source detail is needed to preserve coverage.
55
+ - Read `runtime/expected-inputs.json` and write `runtime/reviewed-inputs.json`
56
+ with one decision for every required expected input before DONE.
57
+ - Mark an expected source unit `used` or `reviewed` when you summarized it.
58
+ Mark it `missing`, `blocked`, or `not-relevant` only with a concrete reason.
59
+ - `runtime/reviewed-inputs.json` must use this shape:
60
+ - `{`
61
+ - ` "kind": "interf-stage-reviewed-inputs",`
62
+ - ` "version": 1,`
63
+ - ` "generated_at": "2026-01-01T00:00:00.000Z",`
64
+ - ` "stage_id": "summarize",`
65
+ - ` "reviewed": [`
66
+ - ` { "resource_id": "source-unit-example", "decision": "used", "source_refs": ["example.md"] }`
67
+ - ` ]`
68
+ - `}`
40
69
 
41
70
  ## Notes
42
71
 
43
72
  - Favor conservative, source-grounded summaries that preserve evidence tiers and leave broader synthesis for later stages.
44
- - Read `runtime/source-manifest.json` for the authoritative Source inventory and `runtime/stage-inputs.json` for the exact source references assigned to this stage.
73
+ - Read `runtime/source-manifest.json` for the authoritative Source inventory, `runtime/stage-inputs.json` for the exact source references assigned to this stage, and `runtime/expected-inputs.json` for coverage decisions.
74
+ - Read `runtime/project.json` and `runtime/stage-contract.json` so you know the Project intent, but keep summaries broadly reusable source coverage rather than final task answers.
45
75
  - For large reports or decks, capture page coverage, scope, headline evidence, and chart/table routing in one light pass. Prefer explicit page records over one loose file summary.
46
- - Summaries prove coverage; they do not need to answer the final task.
76
+ - One summary folder per Source file; this is the file-level COVERAGE proof it
77
+ proves every file was read, not that every fact was captured. Summaries do not
78
+ need to answer the final task, and missing coverage is detectable at the file
79
+ level only, never claimed at the fact level.
47
80
  - Keep scratch extraction commands single-purpose and non-destructive.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "purpose": {
9
9
  "label": "Build Context Graph",
10
- "task_hint": "Build mixed source files into a three-layer Context Graph: summaries for coverage, knowledge for task-aware structure, and artifacts for downstream agent handoff with links back to original sources."
10
+ "task_hint": "Reads your files and builds a task-specific Context Graph summaries, key facts, and entities, each linked back to the original Source file so your agent works from prepared context it can open and check."
11
11
  },
12
12
  "inputs": [
13
13
  {
@@ -18,12 +18,12 @@
18
18
  }
19
19
  ],
20
20
  "label": "Built-in Interf Build Plan",
21
- "hint": "Built-in Build Plan that builds a Context Graph with source coverage summaries, task-aware knowledge, requested Artifact handoffs, links back to sources, Build evidence, and traces.",
21
+ "hint": "Reads your files and builds a Context Graph of summaries, key facts, and entities each linked back to the original file your agent can open.",
22
22
  "stages": [
23
23
  {
24
24
  "id": "summarize",
25
25
  "label": "Summarize",
26
- "description": "Turn source files into source-named coverage folders under summaries/, with summary.md or manifest.md plus page/slide notes for every inspectable paginated or visual source page.",
26
+ "description": "Turn source files into exact source-path coverage folders under summaries/, with summary.md or manifest.md plus page/slide notes for every inspectable paginated or visual source page.",
27
27
  "contract_type": "build-file-evidence",
28
28
  "role": "summarizer",
29
29
  "skill_dir": "summarize",
@@ -33,12 +33,12 @@
33
33
  ]
34
34
  },
35
35
  {
36
- "id": "structure",
37
- "label": "Structure",
36
+ "id": "knowledge",
37
+ "label": "Knowledge",
38
38
  "description": "Build the task-aware knowledge graph from summaries as flat knowledge/*.md notes, including claims, entities, topics, indexes, and links back to source refs.",
39
- "contract_type": "build-knowledge-structure",
39
+ "contract_type": "build-knowledge",
40
40
  "role": "structurer",
41
- "skill_dir": "structure",
41
+ "skill_dir": "knowledge",
42
42
  "reads": [
43
43
  "summaries"
44
44
  ],
@@ -47,12 +47,12 @@
47
47
  ]
48
48
  },
49
49
  {
50
- "id": "shape",
51
- "label": "Shape",
52
- "description": "Shape task-specific Artifact handoffs and the Context Graph index around the saved task focus and Context Checks.",
53
- "contract_type": "build-query-shape",
50
+ "id": "entrypoint",
51
+ "label": "Entrypoint",
52
+ "description": "Assemble home.md as the primary agent entrypoint plus task-specific entrypoint notes around the saved Project intent and coverage.",
53
+ "contract_type": "build-entrypoint",
54
54
  "role": "structurer",
55
- "skill_dir": "shape",
55
+ "skill_dir": "entrypoint",
56
56
  "reads": [
57
57
  "summaries",
58
58
  "knowledge"
@@ -67,27 +67,31 @@
67
67
  "stage_policy_notes": {
68
68
  "summarize": [
69
69
  "Favor conservative, source-grounded summaries that prove coverage and preserve evidence tiers; leave broader synthesis for later stages.",
70
- "Create one folder under `summaries/` per source file, named so a human can match it to the original source file.",
71
- "For non-paginated sources, write `summaries/<source-name>/summary.md`.",
72
- "For PDFs, decks, images, or paginated/visual reports, write `summaries/<source-name>/manifest.md` and page or slide folders such as `pages/001/summary.md` for every page/slide that can be inspected. If a page/slide cannot be extracted, record `not_extracted_reason` in the manifest instead of silently skipping it. Include optional screenshots or visual trace paths only when useful and available.",
70
+ "Create one folder under `summaries/` per source file, named exactly from `runtime/expected-inputs.json` metadata `source_path`, including the original file extension.",
71
+ "For non-paginated sources, write `summaries/<source_path>/summary.md`, for example `summaries/01-source-note.md/summary.md`.",
72
+ "For PDFs, decks, images, or paginated/visual reports, write `summaries/<source_path>/manifest.md` and page or slide folders such as `pages/001/summary.md` for every page/slide that can be inspected. If a page/slide cannot be extracted, record `not_extracted_reason` in the manifest instead of silently skipping it. Include optional screenshots or visual trace paths only when useful and available.",
73
73
  "Every summary or page note must link back to the original Source path and the relevant page, section, figure, table, or region. Do not copy source files into the Context Graph.",
74
74
  "Keep scratch extraction commands single-purpose and non-destructive."
75
75
  ],
76
- "structure": [
76
+ "knowledge": [
77
+ "Read Project intent and the expected summaries before choosing the knowledge notes.",
77
78
  "Build task-aware claims, entities, topics, and indexes from the summaries and their source refs as flat markdown notes under `knowledge/`.",
78
79
  "Use taxonomy and ontology only when it improves retrieval, navigation, and evidence tracking.",
79
80
  "Treat knowledge notes as navigation and assurance, not as the authority for exact wording, table values, chart reads, or provenance-sensitive claims.",
80
81
  "For small Sources, prefer a minimal stable graph over exhaustive note sprawl.",
81
82
  "When you add wikilinks, target real Context Graph notes by exact basename or explicit relative path. Do not invent title-style links unless that exact title is also a declared note label or alias.",
82
- "Do not add wikilinks in structure outputs to files that the shape stage creates later. If a route belongs in `home.md` or a later shaped note, leave plain text now and let the later stage add the link.",
83
- "For summary references, prefer explicit links like `[[summaries/<source-name>/summary]]`, `[[summaries/<source-name>/manifest]]`, or plain source refs. For knowledge notes, prefer final filenames under `knowledge/`."
83
+ "Do not add wikilinks in knowledge outputs to files that the entrypoint stage creates later. If a route belongs in `home.md` or a later entrypoint note, leave plain text now and let the later stage add the link.",
84
+ "Every knowledge note MUST wikilink the summary of every source it cites: for each source in a note's `source_refs`, add `[[summaries/<source-name>/summary]]` (or `[[summaries/<source-name>/manifest]]` for paginated/visual sources). Source refs alone are not enough and leave the summary an orphaned island; there is no plain-source-ref opt-out. For links to other knowledge notes, use final filenames under `knowledge/`.",
85
+ "The knowledge layer must be an interlinked web, not isolated islands: in addition to the mandatory summary down-link, every knowledge note should link at least one OTHER knowledge note. A note that links no other knowledge note is a disconnected island and fails the `knowledge_web_connectivity` check. This enforces connectedness, not a count — a single genuine link is enough — and never fabricate links to pass.",
86
+ "Every claim or entity note MUST also record raw `source_refs` in JSON frontmatter — the original Source paths it asserts from — so a reader can verify against ground truth instead of trusting a paraphrased summary. Keep both: the summary wikilink is for navigation, the `source_refs` are for verification. A pure index or navigation note that asserts nothing of its own may set `\"note_role\": \"index\"` in frontmatter to opt out of `source_refs`."
84
87
  ],
85
- "shape": [
86
- "Use the saved task focus and Context Checks to bias the final Context Graph toward the agent task it should be especially good at.",
88
+ "entrypoint": [
89
+ "Use the saved Project intent and coverage metrics to bias the final Context Graph toward the agent task it should be especially good at.",
87
90
  "Do not copy benchmark expected answers into the final Context Graph.",
88
- "Write one or more notes under `artifacts/` as the downstream agent handoff. These notes should tell the agent which original Source files, pages, figures, tables, sections, units, periods, series, and caveats matter.",
89
- "Artifacts should route the agent to original Source refs for exact claims. Do not present generated summaries or knowledge notes as the dataset or source of truth.",
90
- "If a saved Context Check depends on source-derived values that may be approximate, preserve the stated range, limits, evidence tier, and source inspection requirement.",
91
+ "Rewrite `home.md` as the primary downstream agent entrypoint. It should tell the agent which original Source files, pages, figures, tables, sections, units, periods, series, and caveats matter.",
92
+ "Write one or more notes under `artifacts/` when a task-specific handoff helps the agent continue from prepared context.",
93
+ "Entrypoints should route the agent to original Source refs for exact claims. Do not present generated summaries or knowledge notes as the dataset or source of truth.",
94
+ "If a prepared value depends on source-derived values that may be approximate, preserve the stated range, limits, evidence tier, and source inspection requirement.",
91
95
  "For unlabeled charts or visual marks, either create a measurement note with visual reference, calibration, method, and uncertainty, or tell the downstream agent to inspect the original Source before answering.",
92
96
  "Prefer better routing, prioritization, and focused navigation over speculative synthesis or answer-only notes.",
93
97
  "Any wikilinks you add to `home.md` or indexes must resolve to real Context Graph note basenames or explicit relative paths."
@@ -6,7 +6,7 @@
6
6
  "artifacts": [
7
7
  {
8
8
  "id": "home",
9
- "description": "Context Graph index note. Routes to the summaries coverage layer, knowledge graph layer, and task-specific Artifact handoffs; downstream agents should start from artifacts/ for task work.",
9
+ "description": "Primary Context Graph agent entrypoint. Routes to the summaries coverage layer, knowledge graph layer, and task-specific entrypoint notes; downstream agents should start from home.md for task work.",
10
10
  "shape": { "kind": "path", "path": "home.md", "artifact_kind": "file" },
11
11
  "checks": [
12
12
  { "id": "exists", "kind": "file_exists", "description": "The graph index note exists.", "required": true },
@@ -17,19 +17,20 @@
17
17
  "required": true,
18
18
  "params": { "phrases": ["Not yet built."] }
19
19
  },
20
- { "id": "wikilinks", "kind": "wikilinks_valid", "description": "Every graph index wikilink resolves.", "required": true }
20
+ { "id": "wikilinks", "kind": "wikilinks_valid", "description": "Every graph index wikilink resolves.", "required": true },
21
+ { "id": "graph-connected", "kind": "graph_notes_connected", "description": "Every Context Graph note — across summaries/, knowledge/, artifacts/, and home.md — is link-connected to at least one other note. No summary or note is left a free-floating island unreachable through the link web. Connectedness, not a quota.", "required": true }
21
22
  ],
22
- "built_by_stages": ["shape"]
23
+ "built_by_stages": ["entrypoint"]
23
24
  },
24
25
  {
25
26
  "id": "summaries",
26
- "description": "Coverage layer with one source-named folder per source file. Non-paginated sources have summary.md. PDFs, decks, and visual/paginated sources include manifest.md plus page/slide folders for every inspected page/slide; uninspected pages/slides must be called out with not_extracted_reason. Every note links back to the original Source path and page/section/figure/table refs instead of copying source files.",
27
+ "description": "Coverage layer with one exact source-path folder per source file. Non-paginated sources have summary.md. PDFs, decks, and visual/paginated sources include manifest.md plus page/slide folders for every inspected page/slide; uninspected pages/slides must be called out with not_extracted_reason. Every note links back to the original Source path and page/section/figure/table refs instead of copying source files.",
27
28
  "shape": { "kind": "path", "path": "summaries", "artifact_kind": "directory" },
28
29
  "checks": [
29
30
  {
30
31
  "id": "source-summary-folders",
31
32
  "kind": "source_summary_folders",
32
- "description": "Every source file has a source-named folder with summary.md or manifest.md.",
33
+ "description": "Every source file has an exact source-path folder with summary.md or manifest.md.",
33
34
  "required": true,
34
35
  "params": { "match": "source_total" }
35
36
  },
@@ -39,7 +40,7 @@
39
40
  "kind": "frontmatter_required_keys",
40
41
  "description": "Every summary note records source and evidence metadata.",
41
42
  "required": true,
42
- "params": { "keys": ["source", "source_file_id", "source_path", "source_locator", "source_kind", "evidence_tier", "truth_mode", "state"] }
43
+ "params": { "keys": ["source", "source_file_id", "source_path", "source_locator", "source_kind", "evidence_tier", "state"] }
43
44
  }
44
45
  ],
45
46
  "built_by_stages": ["summarize"]
@@ -49,49 +50,52 @@
49
50
  "description": "Task-aware Context Graph layer built from summaries and source refs. Current default is flat knowledge/*.md notes. Notes may contain claims, entities, topics, and indexes, but remain navigation and assurance rather than the authority for exact source claims.",
50
51
  "shape": { "kind": "path", "path": "knowledge", "artifact_kind": "directory" },
51
52
  "checks": [
52
- { "id": "exists", "kind": "min_file_count", "description": "Knowledge layer contains notes for task-aware navigation.", "required": true, "params": { "min": 3 } },
53
- { "id": "wikilinks", "kind": "wikilinks_valid", "description": "Every knowledge wikilink resolves.", "required": true }
53
+ { "id": "exists", "kind": "min_file_count", "description": "Knowledge layer contains notes for task-aware navigation.", "required": true, "params": { "min": 1 } },
54
+ { "id": "wikilinks", "kind": "wikilinks_valid", "description": "Every knowledge wikilink resolves.", "required": true },
55
+ { "id": "summary-backlinks", "kind": "summary_backlinks_present", "description": "Every summary a knowledge note cites via source_refs is also wikilinked from the knowledge layer — no orphaned summaries.", "required": true },
56
+ { "id": "knowledge-web", "kind": "knowledge_web_connectivity", "description": "Every knowledge note links at least one OTHER knowledge note — the knowledge layer forms a connected web, not isolated islands. Connectedness, not a quota; a single genuine link is enough.", "required": true },
57
+ { "id": "claim-source-refs", "kind": "source_refs_required", "description": "Every claim/entity note cites the raw Source it asserts from (verification), so a reader can drop to ground truth instead of trusting a paraphrased summary. Pure index/navigation notes that assert nothing may opt out with note_role: index.", "required": true, "params": { "keys": ["source_refs"], "exempt_when": { "note_role": ["index", "navigation"] } } }
54
58
  ],
55
- "built_by_stages": ["structure", "shape"]
59
+ "built_by_stages": ["knowledge", "entrypoint"]
56
60
  },
57
61
  {
58
62
  "id": "artifacts",
59
- "description": "Task-specific requested Artifact handoffs for downstream agents. These notes point to original Source files, pages, figures, tables, sections, units, periods, and caveats; they may link to summaries or knowledge notes for drilldown, but source files remain the authority for exact claims.",
63
+ "description": "Task-specific entrypoint notes for downstream agents. These notes supplement home.md and point to original Source files, pages, figures, tables, sections, units, periods, and caveats; they may link to summaries or knowledge notes for drilldown, but source files remain the authority for exact claims.",
60
64
  "shape": { "kind": "path", "path": "artifacts", "artifact_kind": "directory" },
61
65
  "checks": [
62
- { "id": "exists", "kind": "min_file_count", "description": "At least one task-specific Artifact handoff note exists.", "required": true, "params": { "min": 1 } },
63
- { "id": "frontmatter-valid", "kind": "frontmatter_valid", "description": "Every Artifact handoff note has valid frontmatter.", "required": true },
66
+ { "id": "exists", "kind": "min_file_count", "description": "At least one task-specific entrypoint note exists.", "required": true, "params": { "min": 1 } },
67
+ { "id": "frontmatter-valid", "kind": "frontmatter_valid", "description": "Every task entrypoint note has valid frontmatter.", "required": true },
64
68
  {
65
69
  "id": "handoff-frontmatter",
66
70
  "kind": "frontmatter_required_keys",
67
- "description": "Every Artifact handoff records task, source reference, and verification posture.",
71
+ "description": "Every task entrypoint note records task, source refs, handoff type, and caveats.",
68
72
  "required": true,
69
- "params": { "keys": ["task", "source_refs", "handoff_type", "truth_mode", "verification_state", "caveats"] }
73
+ "params": { "keys": ["task", "source_refs", "handoff_type", "caveats"] }
70
74
  },
71
75
  {
72
76
  "id": "handoff-source-refs",
73
77
  "kind": "source_refs_required",
74
- "description": "Every Artifact handoff has non-empty source refs.",
78
+ "description": "Every task entrypoint note has non-empty source refs.",
75
79
  "required": true,
76
80
  "params": { "keys": ["source_refs"] }
77
81
  },
78
82
  {
79
83
  "id": "handoff-nonempty-fields",
80
84
  "kind": "frontmatter_nonempty_keys",
81
- "description": "Every Artifact handoff has non-empty task, source refs, verification state, and caveats.",
85
+ "description": "Every task entrypoint note has non-empty task, source refs, and caveats.",
82
86
  "required": true,
83
- "params": { "keys": ["task", "source_refs", "verification_state", "caveats"] }
87
+ "params": { "keys": ["task", "source_refs", "caveats"] }
84
88
  },
85
89
  {
86
90
  "id": "source-authority-caveat",
87
91
  "kind": "must_contain",
88
- "description": "Artifact handoffs tell agents to follow original Source refs for exact claims.",
92
+ "description": "Task entrypoint notes tell agents to follow original Source refs for exact claims.",
89
93
  "required": true,
90
94
  "params": { "phrases": ["original Source", "source refs"] }
91
95
  },
92
- { "id": "wikilinks", "kind": "wikilinks_valid", "description": "Every Artifact handoff wikilink resolves.", "required": true }
96
+ { "id": "wikilinks", "kind": "wikilinks_valid", "description": "Every task entrypoint note wikilink resolves.", "required": true }
93
97
  ],
94
- "built_by_stages": ["shape"]
98
+ "built_by_stages": ["entrypoint"]
95
99
  }
96
100
  ]
97
101
  }
@@ -4,17 +4,18 @@ This file is the editable authoring source for the generated native local `inter
4
4
 
5
5
  Default loop:
6
6
  1. Read `.interf/build-plan/README.md` and this file first.
7
- 2. Read the relevant notes under `artifacts/` first. Artifact handoffs are the default task handoff surface for the agent.
8
- 3. Use `home.md` only when you need a graph index to find the right Artifact handoff.
9
- 4. Browse `knowledge/` and `summaries/` only when the Artifact handoff needs drilldown, broader context, or debugging.
10
- 5. Use `.interf/runtime/source-manifest.json` and Artifact source refs to follow graph-provided source references for direct quotes, exact values, visual/table verification, and provenance-sensitive claims.
7
+ 2. Read `home.md` first. It is the primary agent entrypoint.
8
+ 3. Use `.interf/runtime/graph-manifest.json` when you need coverage metrics, stage summaries, entrypoints, or readiness.
9
+ 4. Follow at least one linked `knowledge/` or `summaries/` note when the answer depends on a claim, entity, timeline, comparison, or source-backed fact.
10
+ 5. Use `.interf/runtime/source-manifest.json` and note source refs to follow graph-provided source references for direct quotes, exact values, visual/table verification, and provenance-sensitive claims.
11
11
 
12
12
  Answering rule:
13
13
  - do not modify source files while answering
14
14
  - use the Context Graph as the knowledge map, not as a raw-source replacement
15
- - do not bypass the graph with ad hoc source browsing; drill into source only through graph-provided source references, traces, requested Artifacts, or the recorded Source Manifest
16
- - start from `artifacts/`; treat Artifact handoffs as routing and source-evidence maps, not as a replacement dataset
15
+ - do not bypass the graph with ad hoc source browsing; drill into source only through graph-provided source references, traces, entrypoint notes, or the recorded Source Manifest
16
+ - start from `home.md`; treat entrypoints and task entrypoint notes as routing and source-evidence maps, not as a replacement dataset
17
17
  - use `summaries/` for coverage proof and `knowledge/` for navigation/drilldown; do not treat generated knowledge notes as the authority for exact claims
18
+ - record the entrypoint note and linked `knowledge/` or `summaries/` notes you used when a trace log is requested
18
19
  - when exact wording, table values, chart positions, visual ranges, or provenance matter, follow the cited source reference before making a strong claim
19
20
  - when a number is approximate or source-derived from a visual, say that explicitly
20
21
  - if the Context Graph already contains a bounded value for the exact metric and period the user asked about, verify the cited source reference when precision matters, then answer from that bounded value
@@ -24,6 +25,6 @@ Answering rule:
24
25
  - when reading visuals, verify you are on the correct metric family and period before making a claim
25
26
  - keep annual, quarterly, sector, and point-in-time metrics separate unless the source explicitly connects them
26
27
  - if multiple notes mention the same value, keep the answer consistent with the most focused note rather than synthesizing a new midpoint or shifted range
27
- - when the Context Graph is insufficient but points to the right source evidence, improve or rebuild if the missing semantics are part of the requested Artifact contract; do not present a blurry artifact as ready
28
+ - when the Context Graph is insufficient but points to the right source evidence, improve or rebuild if the missing semantics are part of the Build Plan output contract; do not present a weak graph as ready
28
29
 
29
30
  You can edit this file to bias manual question-answering behavior for this Context Graph.