@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
@@ -5,10 +5,10 @@ description: "Use when an agent needs to operate Interf from natural language: c
5
5
 
6
6
  # Interf
7
7
 
8
- Interf prepares data for agents. It lets users' agents build a Context Graph
9
- from their files with source coverage summaries, task-aware knowledge, artifact
10
- handoffs, and links back to sources, so users can inspect what was covered
11
- before agents answer.
8
+ Interf prepares data for agent tasks. It lets users' agents build a Context Graph
9
+ from their files with source coverage
10
+ summaries, task-aware knowledge, graph entrypoints, and links back to sources,
11
+ so users can inspect what was covered before agents answer.
12
12
 
13
13
  Interf is not a search engine and not a general RAG index over every Project
14
14
  the instance has seen. Treat it as a data-preparation workflow for the user's
@@ -17,8 +17,9 @@ when they clearly bind the same Source and task-relevant Build Plan.
17
17
 
18
18
  Ask Claude to answer from a folder. With Interf, Claude builds a Context Graph
19
19
  from the files and the user can inspect what it covered. Interf runs locally,
20
- exposes Context Checks, Build evidence, traces, and ready / not ready status,
21
- and returns a Context Graph locator agents can read.
20
+ exposes Graph Manifest metrics, Stage Manifest coverage, traces, and ready /
21
+ not ready status, preserves stage execution shells for inspection, and returns
22
+ a Context Graph locator agents can read.
22
23
 
23
24
  ## Core Model
24
25
 
@@ -28,46 +29,70 @@ and returns a Context Graph locator agents can read.
28
29
  - **Source** = input files or data. A local folder is the current binding
29
30
  shape; Source stays local and read-only, and Interf reads it by reference,
30
31
  not by copy.
31
- - **Project** = the durable workspace for one Source binding, selected
32
- Build Plan, Project activity, execution agents, and the latest Context Graph.
33
- The detailed intent, requested Artifact contract, stages, and Context Checks belong in the
34
- Build Plan.
35
- - **Requested Artifact** = an output agents need Interf to build, such as a
36
- source map, index, timeline, comparison note, extraction table, or custom file.
37
- - **Build Plan** = the reviewed plan for how Interf will build a Context Graph
38
- and requested Artifacts from the Source. It owns intent, requested Artifacts,
39
- user-visible Context Checks, Artifact diagnostics, Build instructions, and optional
40
- Source context. It can be drafted, selected, saved, or improved. CLI
41
- namespace: `interf plan`.
32
+ - **Project** = the durable workspace for one Source binding, agent task
33
+ intent, selected Build Plan, Project activity, execution agents, and the
34
+ latest Context Graph.
35
+ - **Build Plan** = the reviewed recipe for how Interf will build a Context
36
+ Graph from the Source for the Project intent. It owns requested outputs,
37
+ expected inputs, coverage metrics, graph entrypoints, Build instructions,
38
+ and optional Source context. It can be drafted, selected, saved, or improved.
39
+ CLI namespace: `interf plan`.
42
40
  - **Run** = one durable execution record. Build runs, benchmark runs,
43
41
  Build Plan draft runs, and Build Plan improvement runs are all Runs.
42
+ - **execution shell** = the replayable workspace Interf creates for an
43
+ agent-executed stage. It contains stage-local `AGENTS.md` / `CLAUDE.md`, the
44
+ native skill, contract, expected inputs, Source Manifest, required prior
45
+ outputs, writable output mounts, prompt log, event/status logs, validator,
46
+ and validation attempts. Stage retries create a fresh shell with previous
47
+ attempts and validation feedback mounted under `runtime/`. Use it for
48
+ debugging and retry; do not present it as the product output.
44
49
  - **Build Context Graph** = the action that runs the selected Build Plan for a
45
50
  Project and produces one Context Graph. CLI: `interf build <project-id>`.
46
51
  - **Context Graph** = source-backed context built from files so agents can use
47
- prepared context instead of partial file reads. It contains task handoffs,
48
- summaries, knowledge notes, links back to sources, and traces. Current local
49
- builds expose it as an inspectable folder agents can continue from.
52
+ prepared context instead of partial file reads. It contains `home.md`, graph
53
+ entrypoints, summaries, knowledge notes, links back to sources, and traces.
54
+ Current local builds expose it as an inspectable folder agents can continue
55
+ from.
50
56
 
51
- Agents should think in Build Plan contracts: "what Context Graph, requested
52
- Artifacts, checks, evidence, and traces need to exist before I can answer from
53
- this Source without partial file reads?"
57
+ Agents should think in Build Plan contracts: "what Context Graph outputs,
58
+ expected inputs, coverage metrics, entrypoints, and traces need to exist before
59
+ I can answer from this Source without partial file reads?"
54
60
 
55
61
  ## Source Reference Contract
56
62
 
57
63
  The Context Graph is a knowledge map over the Source. It normally contains
58
- `artifacts/` task handoffs, `summaries/` coverage proof, `knowledge/`
59
- navigation/drilldown, traces, and source references. It does not duplicate the
60
- raw Source files.
64
+ `home.md`, `artifacts/` graph entrypoints, `summaries/` coverage proof,
65
+ `knowledge/` navigation/drilldown, traces, and source references. It does not
66
+ duplicate the raw Source files.
67
+
68
+ A built Context Graph has three fixed top-level layers and `home.md`:
69
+
70
+ - `summaries/` — grounding: one folder per Source file, each linking back to its
71
+ Source. This is COVERAGE proof (every file was read; file-level, not a claim
72
+ that every fact was captured).
73
+ - `knowledge/` — the knowledge web: claims, entities, timelines, tables, etc.
74
+ Every note links DOWN to its summary and carries raw `source_refs`, and notes
75
+ link to EACH OTHER. This is TRACEABILITY (every claim links a Source; no
76
+ orphaned summaries; no disconnected islands).
77
+ - `artifacts/` — higher-level task outputs that reference summaries + knowledge
78
+ (+ raw source refs for exact claims).
79
+ - `home.md` — start here; routes into all three.
80
+
81
+ Readiness (`ready` / `not ready`) is backed by COVERAGE and TRACEABILITY — both
82
+ provable and deterministic. A separate VERIFICATION pass (`interf benchmark`) is
83
+ a fallible double-check: it flags claims a verifier could not confirm against the
84
+ cited file. It is not proof of absence and does not gate readiness — for exact
85
+ claims, always read the original Source via the note's `source_refs`.
61
86
 
62
87
  Use the Context Graph first to learn what exists, which files/pages/figures are
63
- relevant, which requested Artifacts were prepared, and where evidence lives in
64
- the original Source. Then follow the graph's source references when exact
65
- wording, table values, chart positions, visual ranges, or provenance matter.
88
+ relevant, which graph outputs were prepared, and where evidence lives in the
89
+ original Source. Then follow the graph's source references when exact wording,
90
+ table values, chart positions, visual ranges, or provenance matter.
66
91
 
67
92
  "Answer from the Context Graph" means:
68
93
 
69
- - start from `artifacts/` task handoffs instead of rediscovering the Source ad hoc;
70
- - use `home.md` only as a graph index, not as the answer surface;
94
+ - start from `home.md` as the primary graph entrypoint;
95
+ - use generated `artifacts/` as task-specific graph entrypoints;
71
96
  - use `summaries/` for coverage proof and `knowledge/` for navigation/drilldown;
72
97
  - use the graph's source references and traces as backlinks to the source of
73
98
  truth;
@@ -140,40 +165,44 @@ inside that Source unless the user explicitly asks to narrow scope. If no
140
165
  usable Source locator is available, ask for one Source locator, usually a local
141
166
  folder path. Do not ask for a file-selection menu.
142
167
 
143
- 1. **Propose checks and requested Artifacts first.**
168
+ 1. **Propose requested outputs and coverage first.**
144
169
 
145
- Say what Interf needs to prepare before the answer can be trusted. The
146
- output is a short in-chat review:
170
+ Say what Interf needs to prepare before the answer can be trusted. Requested
171
+ outputs are GRAPH AREAS — claim nodes, comparison nodes, a timeline, a
172
+ coverage index — the next agent will read and reason over. They are NOT
173
+ the answer itself, NOT a finished report, and NOT a summary document. Source
174
+ stays in the user's files; Interf builds the task-specific Context Graph
175
+ the agent traverses. The output is a short in-chat review:
147
176
 
148
177
  ```text
149
- Before I answer, Interf should prepare this report for the question.
178
+ Before I answer, Interf should prepare this Context Graph for the question.
150
179
 
151
- What Interf will check:
152
- - <plain-English check>
153
- Backed by: <requested Artifact>
154
- - <plain-English check>
155
- Backed by: <requested Artifact>
180
+ Context Graph outputs (graph areas, not the answer):
181
+ 1. <output name> — <which claim nodes / comparison nodes / timeline Interf will prepare>
182
+ 2. <output name> — <same, for the next area>
156
183
 
157
- Requested Artifacts:
158
- 1. <artifact name> — <what it will export into the Context Graph>
159
- 2. <artifact name> — <what it will export into the Context Graph>
184
+ Coverage I will verify:
185
+ - files processed
186
+ - source units summarized
187
+ - knowledge reviewed and used
188
+ - graph entrypoints generated
160
189
 
161
- Approve these checks and Artifacts, and I will draft the Build Plan.
190
+ Approve these outputs and coverage expectations, and I will draft the Build Plan.
162
191
  ```
163
192
 
164
193
  Stop here unless the user has already explicitly approved this exact set of
165
- checks and Artifacts. Do not answer yet.
194
+ outputs and coverage expectations. Do not answer yet.
166
195
 
167
196
  2. **Draft the Build Plan after approval.**
168
197
 
169
198
  Create or reuse the Project, draft the Build Plan, then summarize it in
170
- chat. Include the Project id, Build Plan id, checks, requested Artifacts,
171
- stages, and what the Context Graph will contain. Include a review locator
172
- when the connected Interf client provides one, but the user should be able
173
- to review the plan in chat.
199
+ chat. Include the Project id, Build Plan id, requested outputs, stages,
200
+ expected inputs, graph entrypoints, and what the Context Graph will contain.
201
+ Include a review locator when the connected Interf client provides one, but
202
+ the user should be able to review the plan in chat.
174
203
 
175
204
  Stop here unless the user approves the Build Plan or already gave explicit
176
- end-to-end autonomy after reviewing the checks.
205
+ end-to-end autonomy after reviewing the outputs and coverage expectations.
177
206
 
178
207
  3. **Build the Context Graph after Build Plan approval.**
179
208
 
@@ -189,15 +218,15 @@ folder path. Do not ask for a file-selection menu.
189
218
 
190
219
  4. **Answer only from the Context Graph.**
191
220
 
192
- Read the task handoff notes under `artifacts/` first. Use them as the map
193
- for what exists and where to look in the Source. Use `home.md` only as an
194
- index, `summaries/` as coverage proof, and `knowledge/` as drilldown. For exact values,
221
+ Read `home.md` first. Use generated graph entrypoints under `artifacts/`
222
+ as task-specific starting points, `summaries/` as coverage proof, and
223
+ `knowledge/` as drilldown. For exact values,
195
224
  quotes, chart reads, tables, or provenance-sensitive claims, follow the
196
225
  graph's source references back to the cited Source evidence before answering.
197
226
  Answer with the values the Context Graph prepared plus any source-reference
198
- verification you performed, and say which requested Artifact and source page
227
+ verification you performed, and say which graph entrypoint and source page
199
228
  the answer came from. If the Context Graph points to the right evidence but
200
- the artifact is too coarse, under-extracted, or missing the required visual
229
+ the prepared graph output is too coarse, under-extracted, or missing the required visual
201
230
  semantics, say the Context Graph is not ready and improve the Build Plan.
202
231
 
203
232
  The public package path is CLI/runtime-first. MCP is how agent hosts talk to a
@@ -271,8 +300,8 @@ interf runtime start # fallback: managed background service
271
300
  ### Review References
272
301
 
273
302
  When a Project, Build Plan, or Run is created, include the compact review
274
- summary in chat: Project id, Build Plan id, Run id, checks, requested
275
- Artifacts, and the Context Graph locator when ready.
303
+ summary in chat: Project id, Build Plan id, Run id, requested outputs, primary
304
+ metrics, and the Context Graph locator when ready.
276
305
 
277
306
  The local HTTP URL is an authorized service connection fallback, not a review
278
307
  UI. Do not present `127.0.0.1` links as the review surface for normal users.
@@ -309,7 +338,7 @@ UI. Do not present `127.0.0.1` links as the review surface for normal users.
309
338
  Treat `package_version`, CLI versions, and raw service metadata as internal
310
339
  diagnostics. Do not include them in normal user-facing replies.
311
340
 
312
- 2. **Propose what Interf will check before mutating state**.
341
+ 2. **Propose what Interf will prepare before mutating state**.
313
342
 
314
343
  After confirming an Interf connection, inspect what you can about the
315
344
  Source: filenames, file types, obvious page counts, section names, and
@@ -317,8 +346,8 @@ UI. Do not present `127.0.0.1` links as the review surface for normal users.
317
346
  context, not evidence that Interf processed the files.
318
347
 
319
348
  If the user invoked `/interf` or explicitly asked to use Interf, that is
320
- permission to inspect the Source and propose the checks Interf should run plus
321
- the requested Artifacts that make those checks true. It is not permission to
349
+ permission to inspect the Source and propose the graph outputs and coverage
350
+ metrics Interf should prepare. It is not permission to
322
351
  answer from the Source. Follow the Required User-Visible Flow above.
323
352
 
324
353
  Keep the proposal compact:
@@ -330,19 +359,19 @@ UI. Do not present `127.0.0.1` links as the review surface for normal users.
330
359
  Interf should prepare data for the agent by building a Context Graph from
331
360
  the files.
332
361
 
333
- What Interf will check:
334
- - <Plain-English check>
335
- Backed by: <requested Artifact name>
336
- - <Plain-English check>
337
- Backed by: <requested Artifact name>
338
-
339
- Requested Artifacts:
340
- 1. **<Plain-English artifact name>**
362
+ Context Graph outputs:
363
+ 1. **<Plain-English output name>**
341
364
  Why it helps: <short sentence>
342
- 2. **<Plain-English artifact name>**
365
+ 2. **<Plain-English output name>**
343
366
  Why it helps: <short sentence>
344
367
 
345
- Approve these checks and Artifacts, and I will draft the Build Plan.
368
+ Coverage metrics:
369
+ - files processed
370
+ - source units summarized
371
+ - knowledge reviewed and used
372
+ - graph entrypoints generated
373
+
374
+ Approve these outputs and coverage expectations, and I will draft the Build Plan.
346
375
  ```
347
376
 
348
377
  Do not show JSON to the user. Do not use markdown tables. Do not include
@@ -353,13 +382,13 @@ UI. Do not present `127.0.0.1` links as the review surface for normal users.
353
382
  3. **Create the Project after approval**.
354
383
 
355
384
  ```sh
356
- interf project create <id> --source <path>
385
+ interf project create <id> --source <path> --intent "<agent task>"
357
386
  ```
358
387
 
359
388
  Create a fresh Project for the current Source unless the user explicitly
360
- names an existing Project id. Store the approved proposal in the Build Plan
361
- draft request, not on the Project. Store advisory source interpretation as
362
- `source_context` when useful.
389
+ names an existing Project id. Store the durable agent task on the Project.
390
+ Store requested outputs and advisory source interpretation in the Build Plan
391
+ draft request, using `source_context` when useful.
363
392
 
364
393
  4. **Draft a Build Plan**.
365
394
 
@@ -369,12 +398,10 @@ UI. Do not present `127.0.0.1` links as the review surface for normal users.
369
398
 
370
399
  ```sh
371
400
  interf plan draft <project-id> \
372
- --intent "<agent task>" \
401
+ --intent "<agent task override, optional>" \
373
402
  --requested-artifacts-json '<json-array>' \
374
- --checks-json '<context-checks-json-array>' \
375
403
  --source-context-json '<json-object>' \
376
- --artifacts "<optional extra requested Artifact notes or change request>" \
377
- --ready-when "<plain-English Context Check the requested Artifacts should satisfy>"
404
+ --artifacts "<optional extra requested output notes or change request>"
378
405
  interf runs status <run-id>
379
406
  interf plan show <build-plan-id>
380
407
  ```
@@ -387,10 +414,11 @@ UI. Do not present `127.0.0.1` links as the review surface for normal users.
387
414
 
388
415
  After the Build Plan is drafted, selected, or materially changed, send the
389
416
  user a compact in-chat review: Project id, Build Plan id, what Interf will
390
- check, which requested Artifacts back each check, stage names, and what each
417
+ prepare, stage names, expected inputs, graph entrypoints, and what each
391
418
  stage writes. Include a review locator when the connected Interf client
392
419
  provides one, but do not force the user to leave chat to approve. Unless the
393
- user granted autonomy after reviewing the checks, pause here.
420
+ user granted autonomy after reviewing the outputs and coverage expectations,
421
+ pause here.
394
422
 
395
423
  6. **Build the Context Graph**.
396
424
 
@@ -403,9 +431,11 @@ UI. Do not present `127.0.0.1` links as the review surface for normal users.
403
431
  `--watch`, the CLI tails events until the Build reaches a terminal state.
404
432
 
405
433
  If the user asked for an answer in the same `/interf` request, answer from
406
- the built Context Graph, requested Artifacts, and source references linked
407
- from that graph. Do not bypass the graph by searching the original
408
- PDF/report/source file directly.
434
+ the built Context Graph. Start from `home.md` and graph entrypoints under
435
+ `artifacts/`, then use `summaries/` for Source coverage proof,
436
+ `knowledge/` for drilldown, and traces/source references for exact claims.
437
+ Do not bypass the graph by searching the original PDF/report/source file
438
+ directly.
409
439
 
410
440
  7. **Inspect Project activity and optionally benchmark**.
411
441
 
@@ -421,15 +451,14 @@ UI. Do not present `127.0.0.1` links as the review surface for normal users.
421
451
  `interf benchmark` is a benchmark/evaluation run for Q&A / fact-check accuracy.
422
452
  Use it when the user wants a source-files baseline, a Context Graph
423
453
  evaluation, or a source-vs-Context Graph comparison. It is not the
424
- Context Checks surface.
454
+ readiness surface.
425
455
 
426
456
  8. **On `not ready`, improve the Build Plan**.
427
457
 
428
458
  ```sh
429
459
  interf plan improve <project-id> \
430
- --intent "<what needs to change>" \
431
- --artifacts "<requested Artifact changes, if any>" \
432
- --ready-when "<Context Check changes, if any>"
460
+ --intent "<what needs to change, optional>" \
461
+ --artifacts "<requested output changes, if any>"
433
462
  ```
434
463
 
435
464
  ## Agents
@@ -471,8 +500,8 @@ Build Plans may declare custom names; the Build runtime treats unknown roles as
471
500
  - If `/interf` was invoked and no connection exists, stop. Do not answer by
472
501
  reading raw source files.
473
502
  - Once a Context Graph exists, use it as the knowledge map. Source drilldown is
474
- allowed only through graph-provided source references, traces, requested
475
- Artifacts, or the Project's recorded Source Manifest.
503
+ allowed only through graph-provided source references, traces, graph
504
+ entrypoints, or the Project's recorded Source Manifest.
476
505
  - For long-running work, use the async default and check status by id. Use
477
506
  `--watch` only when the agent must wait inline.
478
507
  - Use MCP when available. Use the CLI only when it is
@@ -485,28 +514,29 @@ Build Plans may declare custom names; the Build runtime treats unknown roles as
485
514
  provides the local connection details or gives an API-integration task.
486
515
  - Never write helper files into the Source folder. The Source is read-only
487
516
  input.
488
- - Treat Context Checks plus requested Artifact review as the default
489
- human trust gate.
490
- - Treat structural Artifact checks as necessary but not sufficient for
517
+ - Treat Build Plan review plus Graph Manifest metrics as the default human
518
+ trust gate.
519
+ - Treat structural output checks as necessary but not sufficient for
491
520
  precision. If a visual/table/chart answer needs range, axis, period, unit,
492
- series, or provenance semantics that the artifact did not capture, mark the
493
- Context Graph not ready and improve the Build Plan.
521
+ series, or provenance semantics that the graph output did not capture, mark
522
+ the Context Graph not ready and improve the Build Plan.
494
523
  - The first visible Interf response to a read-and-answer request is the
495
- checks-and-Artifacts proposal. It is not a draft answer.
524
+ requested-outputs-and-coverage proposal. It is not a draft answer.
496
525
  - Separate proposal from evidence. Before a Build, you can say what Interf
497
- plans to check, which requested Artifacts back that, and what evidence it
498
- will produce. After a Build, you can say which files/pages were processed,
499
- what evidence was produced, and whether the Context Graph is ready.
526
+ plans to prepare, which outputs and coverage metrics the Build Plan targets,
527
+ and what graph entrypoints it will produce. After a Build, you can say which
528
+ files/pages were processed, what graph resources were produced, and whether
529
+ the Context Graph is ready.
500
530
  - Ask one concise clarification only when the Source or agent goal is missing,
501
- or when ambiguity makes the requested Artifacts impossible to draft. For
531
+ or when ambiguity makes the requested outputs impossible to draft. For
502
532
  normal domain ambiguity, state the assumption and make it a check.
503
533
 
504
534
  ## Show Your Work
505
535
 
506
- The Run record, Build evidence, checks, traces, and Context Graph locator are
507
- the user's verification surface. Whenever you start a Build, summarize the
508
- Project id, Build id, checks, and Context Graph locator in chat. If the
509
- connected Interf client returns a review locator, include it.
536
+ The Run record, Stage Manifests, Graph Manifest, traces, and Context Graph locator show
537
+ what the user can inspect. Whenever you start a Build, summarize the
538
+ Project id, Build id, primary metrics, and Context Graph locator in chat. If
539
+ the connected Interf client returns a review locator, include it.
510
540
 
511
541
  Do not present the local HTTP service URL as a review UI.
512
542
 
@@ -521,7 +551,7 @@ I'll check status in a moment with `interf runs status <run-id>`.
521
551
  ```
522
552
 
523
553
  When a Build finishes, report the final `ready` / `not ready` status, the
524
- Context Graph locator, and the requested Artifacts or validation failures that
554
+ Context Graph locator, and the primary metrics or missing coverage that
525
555
  matter.
526
556
 
527
557
  ## Reading The Context Graph Locator
@@ -535,8 +565,8 @@ Context Graph: <local-path-returned-by-interf>
535
565
  ```
536
566
 
537
567
  For `local-path`, use the agent's filesystem tools to read the directory.
538
- Start from `artifacts/` task handoffs. Use `home.md` only if you need to find
539
- the right handoff. Follow source refs for exact claims.
568
+ Start from `home.md`, then follow graph entrypoints under `artifacts/`. Follow
569
+ source refs for exact claims.
540
570
 
541
571
  ## Interf Client Freeform Proposal Mode
542
572
 
@@ -553,7 +583,7 @@ Use these action types:
553
583
  - `build-plan-improvement`
554
584
  - `clarification`
555
585
 
556
- Use `build` when the user asks to prepare data, build artifacts, or refresh
586
+ Use `build` when the user asks to prepare data, build graph outputs, or refresh
557
587
  the Context Graph for an agent task. Set `project` to the Project id. Do not set
558
588
  `build_plan` for a Build proposal; Build always runs the Project's selected
559
589
  Build Plan. If the request named a different Build Plan, select or draft that
@@ -571,18 +601,34 @@ Return this shape:
571
601
  "action_type": "build",
572
602
  "project": "project-id",
573
603
  "title": "short approval card title",
574
- "summary": "one sentence describing which artifacts will be built",
604
+ "summary": "one sentence describing which graph outputs will be built",
575
605
  "assistant_message": "concise explanation for the user",
576
606
  "command_preview": "interf build project-id"
577
607
  }
578
608
  ```
579
609
 
580
- For Build Plan drafting proposals, keep user-facing checks in
581
- `values.checks[]`, requested Artifacts in `values.requested_artifacts[]`, and
582
- the advisory source summary in `values.source_context`:
583
- Use stable requested Artifact ids and connect each Context Check with
584
- `backed_by_artifact_ids`. These ids are implementation detail for the action
585
- payload; do not show them in the human proposal.
610
+ For Build Plan drafting proposals, keep requested outputs and graph entrypoints
611
+ in `values.requested_artifacts[]` for the current API shape, and put the
612
+ advisory source summary in `values.source_context`. Use stable output ids.
613
+ Treat `values.checks[]` as an optional developer-diagnostic field only when an
614
+ Interf client explicitly asks for it; do not make checks the human-facing
615
+ proposal.
616
+
617
+ **Requested outputs are graph areas, not answers.** Each entry must describe a
618
+ region of the Context Graph the next agent will traverse — claim nodes,
619
+ entity nodes, comparison nodes, timelines, coverage indexes — NOT the user's
620
+ answer or a finished report. Interf prepares structured context; the agent
621
+ still does the reasoning.
622
+
623
+ Good titles / purposes (graph-shaped):
624
+ - `"London cost-and-take-up claim nodes"` — source-cited claim notes the agent can compare against South West claim nodes.
625
+ - `"South West rent-growth signals timeline"` — dated decision/forecast signals extracted from the report.
626
+ - `"Page-by-page guide of the report"` — coverage index so the agent knows where evidence for any claim lives.
627
+
628
+ Bad titles / purposes (replace agent thinking — do NOT use):
629
+ - `"NY rent growth answer"` — that is the agent's job, not Interf's.
630
+ - `"Final report"` / `"Forecast summary"` — finished answer artifacts.
631
+ - `"Recommended decision"` — Interf does not decide; it prepares the data the decider reads.
586
632
 
587
633
  ```json
588
634
  {
@@ -590,32 +636,25 @@ payload; do not show them in the human proposal.
590
636
  "project": "project-id",
591
637
  "build_plan": "project-id-build-plan",
592
638
  "title": "Draft Build Plan",
593
- "summary": "Drafts the Build Plan for the requested Artifacts.",
639
+ "summary": "Drafts the Build Plan for the requested graph outputs.",
594
640
  "values": {
595
641
  "build_plan_id": "project-id-build-plan",
596
642
  "intent": "London versus South West annual take-up",
597
- "checks": [
643
+ "requested_artifacts": [
598
644
  {
599
- "label": "Every page is covered.",
600
- "backed_by_artifact_ids": ["guide-to-report"]
645
+ "id": "page-guide",
646
+ "title": "Page-by-page guide of the report",
647
+ "purpose": "Short coverage note per page so the agent knows what evidence lives where."
601
648
  },
602
649
  {
603
- "label": "The final comparison cites sources for every figure.",
604
- "backed_by_artifact_ids": ["london-versus-south-west-comparison"]
605
- }
606
- ],
607
- "requested_artifacts": [
608
- {
609
- "id": "guide-to-report",
610
- "title": "Guide to the report",
611
- "purpose": "A short note for each page, so the agent knows what is where.",
612
- "checks": ["Every page is listed.", "Each page has a plain-English summary."]
650
+ "id": "london-claims",
651
+ "title": "London take-up claim nodes",
652
+ "purpose": "Source-cited claim notes (figures, source page, caveat) for London take-up — the agent compares these against the South West nodes."
613
653
  },
614
654
  {
615
- "id": "london-versus-south-west-comparison",
616
- "title": "London versus South West comparison",
617
- "purpose": "A source-cited comparison note for the figures the agent task depends on.",
618
- "checks": ["Every figure has a source citation.", "Ambiguous chart-derived values are bounded."]
655
+ "id": "south-west-claims",
656
+ "title": "South West take-up claim nodes",
657
+ "purpose": "Same shape as the London claim nodes, scoped to South West figures."
619
658
  }
620
659
  ],
621
660
  "source_context": {
@@ -653,5 +692,6 @@ interf traces show <trace-kind> --project <project-id>
653
692
  ```
654
693
 
655
694
  The UI link is for visual review. The CLI output is for agent-readable status,
656
- Build Plan review, requested Artifact status, Build errors, Checks, Build evidence,
657
- traces, benchmark results, and ready / not ready summaries.
695
+ Build Plan review, graph output status, Build errors, Graph Manifest metrics,
696
+ Stage Manifest coverage, stage execution sessions, traces, benchmark results,
697
+ and ready / not ready summaries.
@@ -1,8 +0,0 @@
1
- export declare function runPath(dirPath: string): string;
2
- export declare function runHistoryPath(dirPath: string): string;
3
- export declare function stageContractPath(dirPath: string): string;
4
- export declare function archivedStageContractPath(dirPath: string, runId: string): string;
5
- export declare function logsDirPath(dirPath: string): string;
6
- export declare function promptLogPath(dirPath: string, runId: string): string;
7
- export declare function eventLogPath(dirPath: string, runId: string): string;
8
- export declare function statusLogPath(dirPath: string, runId: string): string;
@@ -1,26 +0,0 @@
1
- import { join } from "node:path";
2
- import { contextGraphRuntimeArchivedStageContractPath, contextGraphRuntimeLogsRoot, contextGraphExecutionStageLedgerHistoryPath, contextGraphExecutionStageLedgerPath, contextGraphRuntimeStageContractPath, } from "./context-graph-paths.js";
3
- export function runPath(dirPath) {
4
- return contextGraphExecutionStageLedgerPath(dirPath);
5
- }
6
- export function runHistoryPath(dirPath) {
7
- return contextGraphExecutionStageLedgerHistoryPath(dirPath);
8
- }
9
- export function stageContractPath(dirPath) {
10
- return contextGraphRuntimeStageContractPath(dirPath);
11
- }
12
- export function archivedStageContractPath(dirPath, runId) {
13
- return contextGraphRuntimeArchivedStageContractPath(dirPath, runId);
14
- }
15
- export function logsDirPath(dirPath) {
16
- return contextGraphRuntimeLogsRoot(dirPath);
17
- }
18
- export function promptLogPath(dirPath, runId) {
19
- return join(logsDirPath(dirPath), `${runId}.prompt.txt`);
20
- }
21
- export function eventLogPath(dirPath, runId) {
22
- return join(logsDirPath(dirPath), `${runId}.events.ndjson`);
23
- }
24
- export function statusLogPath(dirPath, runId) {
25
- return join(logsDirPath(dirPath), `${runId}.status.log`);
26
- }
@@ -1,7 +0,0 @@
1
- export declare function statePath(dirPath: string): string;
2
- export declare function healthPath(dirPath: string): string;
3
- export declare function viewSpecPath(dirPath: string): string;
4
- export declare function sourceManifestPath(dirPath: string): string;
5
- export declare function sourceManifestAuditPath(dirPath: string): string;
6
- export declare function sourceFilesPath(dirPath: string): string;
7
- export declare function sourceStatePath(dirPath: string): string;
@@ -1,22 +0,0 @@
1
- import { contextGraphRuntimeHealthPath, contextGraphRuntimeSourceManifestAuditPath, contextGraphRuntimeSourceManifestPath, contextGraphRuntimeSourceFilesPath, contextGraphRuntimeSourceStatePath, contextGraphRuntimeStatePath, contextGraphRuntimeViewSpecPath, } from "./context-graph-paths.js";
2
- export function statePath(dirPath) {
3
- return contextGraphRuntimeStatePath(dirPath);
4
- }
5
- export function healthPath(dirPath) {
6
- return contextGraphRuntimeHealthPath(dirPath);
7
- }
8
- export function viewSpecPath(dirPath) {
9
- return contextGraphRuntimeViewSpecPath(dirPath);
10
- }
11
- export function sourceManifestPath(dirPath) {
12
- return contextGraphRuntimeSourceManifestPath(dirPath);
13
- }
14
- export function sourceManifestAuditPath(dirPath) {
15
- return contextGraphRuntimeSourceManifestAuditPath(dirPath);
16
- }
17
- export function sourceFilesPath(dirPath) {
18
- return contextGraphRuntimeSourceFilesPath(dirPath);
19
- }
20
- export function sourceStatePath(dirPath) {
21
- return contextGraphRuntimeSourceStatePath(dirPath);
22
- }
@@ -1,34 +0,0 @@
1
- # Shape
2
-
3
- Shape the task-specific Artifact handoff and final Context Graph index
4
- around the saved task focus and Checks.
5
-
6
- Contract type: `build-query-shape`
7
-
8
- ## Requirements
9
-
10
- - Use the Build task focus plus saved Check text to shape `artifacts/` handoffs and supporting graph routes.
11
- - Write at least one task-specific handoff note under `artifacts/`.
12
- - Each Artifact handoff must start with JSON frontmatter containing non-empty `task`, `source_refs`, `handoff_type`, `truth_mode`, `verification_state`, and `caveats`.
13
- - `source_refs` must point to original Source locations, not just generated summaries or knowledge notes.
14
- - Artifact handoff notes should tell the downstream agent which original Source files, pages, figures, tables, sections, units, periods, series, and caveats matter for the task.
15
- - Artifact handoff 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.
16
- - Rewrite `home.md` into a real graph index note. Do not leave the scaffold `Not yet built.` placeholder in place, and do not make `home.md` the answer surface.
17
- - When you add wikilinks, target real Context Graph notes by exact basename or explicit relative path.
18
- - If you introduce a new note name in `home.md` or another shaped output, the same stage must also create that note file.
19
- - Prefer direct file-reading and search tools over shell commands for routine file inspection.
20
- - When a source value is approximate, preserve it as a bounded range and say why it is approximate.
21
- - Do not invent finer precision than the source supports.
22
- - 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.
23
- - Keep approximate values consistent across `home.md`, focused indexes, and claim/entity notes.
24
- - Do not copy expected answers into the Context Graph.
25
-
26
- ## Notes
27
-
28
- - Use the saved task focus and Checks to bias the final Context Graph toward the job it should be especially good at.
29
- - Do not copy benchmark expected answers into the final Context Graph.
30
- - Prefer the saved summary evidence and structured notes when they already preserve routing, source refs, and caveats.
31
- - Reopen source references during shaping when exact wording, table values, chart reads, or provenance-sensitive claims matter.
32
- - If a saved Check depends on source-derived values, route the handoff to source refs and preserve source granularity instead of fabricating precision.
33
- - Prefer better routing, prioritization, and focused navigation over speculative synthesis.
34
- - Any wikilinks you add to `home.md` or indexes must resolve to real Context Graph note basenames or explicit relative paths.