@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.
- package/README.md +122 -226
- package/dist/cli/commands/agents.js +1 -32
- package/dist/cli/commands/benchmark.d.ts +2 -3
- package/dist/cli/commands/benchmark.js +1 -31
- package/dist/cli/commands/build-plan.js +26 -50
- package/dist/cli/commands/build.d.ts +2 -3
- package/dist/cli/commands/build.js +1 -31
- package/dist/cli/commands/graphs.js +177 -32
- package/dist/cli/commands/mcp.d.ts +1 -0
- package/dist/cli/commands/mcp.js +223 -126
- package/dist/cli/commands/project.js +10 -36
- package/dist/cli/commands/reset.d.ts +2 -3
- package/dist/cli/commands/reset.js +1 -22
- package/dist/cli/commands/runs.js +86 -33
- package/dist/cli/commands/status.js +3 -24
- package/dist/cli/commands/traces.js +1 -29
- package/dist/cli/commands/wizard.js +17 -29
- package/dist/cli/lib/http-client.d.ts +39 -0
- package/dist/cli/lib/http-client.js +73 -0
- package/dist/packages/build-plans/authoring/brief.d.ts +25 -4
- package/dist/packages/build-plans/authoring/build-plan-authoring.d.ts +42 -1
- package/dist/packages/build-plans/authoring/build-plan-authoring.js +470 -63
- package/dist/packages/build-plans/authoring/build-plan-edit-session.d.ts +9 -0
- package/dist/packages/build-plans/authoring/build-plan-edit-session.js +27 -10
- package/dist/packages/build-plans/authoring/build-plan-improvement.js +62 -8
- package/dist/packages/build-plans/authoring/lib/build-plan-edit-utils.d.ts +1 -0
- package/dist/packages/build-plans/package/build-plan-definitions.d.ts +0 -1
- package/dist/packages/build-plans/package/build-plan-definitions.js +5 -3
- package/dist/packages/build-plans/package/build-plan-stage-runner.d.ts +1 -0
- package/dist/packages/build-plans/package/build-plan-stage-runner.js +2 -1
- package/dist/packages/build-plans/package/builtin-build-plan.d.ts +2 -2
- package/dist/packages/build-plans/package/builtin-build-plan.js +3 -3
- package/dist/packages/build-plans/package/context-interface.d.ts +3 -0
- package/dist/packages/build-plans/package/context-interface.js +5 -5
- package/dist/packages/build-plans/package/interf-build-plan-package.js +22 -22
- package/dist/packages/build-plans/package/local-build-plans.d.ts +10 -5
- package/dist/packages/build-plans/package/local-build-plans.js +57 -32
- package/dist/packages/contracts/index.d.ts +4 -3
- package/dist/packages/contracts/index.js +2 -1
- package/dist/packages/contracts/lib/context-graph-layer.d.ts +161 -0
- package/dist/packages/contracts/lib/context-graph-layer.js +216 -0
- package/dist/packages/contracts/lib/project-paths.d.ts +7 -0
- package/dist/packages/contracts/lib/project-paths.js +9 -0
- package/dist/packages/contracts/lib/project-schema.d.ts +264 -1
- package/dist/packages/contracts/lib/project-schema.js +38 -13
- package/dist/packages/contracts/lib/schema.d.ts +556 -23
- package/dist/packages/contracts/lib/schema.js +279 -18
- package/dist/packages/contracts/utils/filesystem.d.ts +1 -0
- package/dist/packages/contracts/utils/filesystem.js +29 -1
- package/dist/packages/projects/lib/schema.d.ts +6 -8
- package/dist/packages/projects/lib/schema.js +3 -1
- package/dist/packages/projects/source-config.d.ts +0 -5
- package/dist/packages/projects/source-config.js +9 -22
- package/dist/packages/runtime/actions/fields.d.ts +4 -0
- package/dist/packages/runtime/actions/form-builders.js +79 -31
- package/dist/packages/runtime/actions/form-validators.js +9 -3
- package/dist/packages/runtime/actions/helpers.js +3 -3
- package/dist/packages/runtime/actions/registry.d.ts +1 -1
- package/dist/packages/runtime/actions/registry.js +1 -1
- package/dist/packages/runtime/actions/requests.d.ts +1 -1
- package/dist/packages/runtime/actions/requests.js +12 -6
- package/dist/packages/runtime/actions/schemas.d.ts +7 -0
- package/dist/packages/runtime/actions/schemas.js +1 -0
- package/dist/packages/runtime/agent-handoff.js +8 -7
- package/dist/packages/runtime/agents/lib/execution-profile.d.ts +14 -0
- package/dist/packages/runtime/agents/lib/execution-profile.js +23 -0
- package/dist/packages/runtime/agents/lib/execution.js +14 -8
- package/dist/packages/runtime/agents/lib/executors.d.ts +1 -0
- package/dist/packages/runtime/agents/lib/executors.js +11 -2
- package/dist/packages/runtime/agents/lib/logs.d.ts +10 -0
- package/dist/packages/runtime/agents/lib/logs.js +32 -8
- package/dist/packages/runtime/agents/lib/preflight.js +4 -1
- package/dist/packages/runtime/agents/lib/render.d.ts +18 -0
- package/dist/packages/runtime/agents/lib/render.js +44 -18
- package/dist/packages/runtime/agents/lib/shell-templates.js +105 -63
- package/dist/packages/runtime/agents/lib/shells.d.ts +29 -0
- package/dist/packages/runtime/agents/lib/shells.js +158 -32
- package/dist/packages/runtime/agents/lib/source-context-scan.d.ts +10 -0
- package/dist/packages/runtime/agents/lib/source-context-scan.js +388 -0
- package/dist/packages/runtime/agents/lib/status.js +1 -14
- package/dist/packages/runtime/agents/lib/string-utils.d.ts +16 -0
- package/dist/packages/runtime/agents/lib/string-utils.js +36 -0
- package/dist/packages/runtime/agents/lib/types.d.ts +1 -0
- package/dist/packages/runtime/agents/providers/codex.js +2 -0
- package/dist/packages/runtime/agents/role-executors.js +2 -1
- package/dist/packages/runtime/auth/session-store.js +11 -3
- package/dist/packages/runtime/benchmark-question-draft.d.ts +3 -0
- package/dist/packages/runtime/benchmark-question-draft.js +57 -28
- package/dist/packages/runtime/build/artifact-status.d.ts +1 -1
- package/dist/packages/runtime/build/artifact-status.js +1 -1
- package/dist/packages/runtime/build/build-evidence.d.ts +2 -1
- package/dist/packages/runtime/build/build-evidence.js +11 -5
- package/dist/packages/runtime/build/build-pipeline.js +89 -5
- package/dist/packages/runtime/build/build-stage-plan.js +3 -1
- package/dist/packages/runtime/build/build-stage-runner.js +169 -32
- package/dist/packages/runtime/build/build-target.d.ts +3 -0
- package/dist/packages/runtime/build/build-target.js +25 -1
- package/dist/packages/runtime/build/check-evaluator.d.ts +1 -1
- package/dist/packages/runtime/build/check-evaluator.js +655 -4
- package/dist/packages/runtime/build/context-graph-paths.d.ts +13 -0
- package/dist/packages/runtime/build/context-graph-paths.js +27 -0
- package/dist/packages/runtime/build/index.d.ts +2 -2
- package/dist/packages/runtime/build/index.js +2 -2
- package/dist/packages/runtime/build/inspect-map.d.ts +10 -0
- package/dist/packages/runtime/build/inspect-map.js +270 -0
- package/dist/packages/runtime/build/lib/schema.d.ts +246 -53
- package/dist/packages/runtime/build/lib/schema.js +173 -15
- package/dist/packages/runtime/build/native-entrypoint.d.ts +2 -0
- package/dist/packages/runtime/build/native-entrypoint.js +286 -0
- package/dist/packages/runtime/build/runtime-contracts.js +9 -3
- package/dist/packages/runtime/build/runtime-log-paths.d.ts +3 -0
- package/dist/packages/runtime/build/runtime-log-paths.js +16 -0
- package/dist/packages/runtime/build/runtime-prompt.js +6 -4
- package/dist/packages/runtime/build/runtime-runs.js +63 -10
- package/dist/packages/runtime/build/runtime-types.d.ts +4 -1
- package/dist/packages/runtime/build/runtime.d.ts +3 -1
- package/dist/packages/runtime/build/runtime.js +3 -1
- package/dist/packages/runtime/build/source-files.js +11 -2
- package/dist/packages/runtime/build/source-inventory.d.ts +1 -0
- package/dist/packages/runtime/build/source-inventory.js +246 -7
- package/dist/packages/runtime/build/source-manifest.d.ts +11 -0
- package/dist/packages/runtime/build/source-manifest.js +30 -2
- package/dist/packages/runtime/build/stage-evidence.js +80 -11
- package/dist/packages/runtime/build/stage-manifest.d.ts +45 -0
- package/dist/packages/runtime/build/stage-manifest.js +1125 -0
- package/dist/packages/runtime/build/stage-reuse.js +12 -0
- package/dist/packages/runtime/build/stage-session.d.ts +81 -0
- package/dist/packages/runtime/build/stage-session.js +308 -0
- package/dist/packages/runtime/build/state-io.js +10 -11
- package/dist/packages/runtime/build/state-view.js +1 -1
- package/dist/packages/runtime/build/state.d.ts +1 -1
- package/dist/packages/runtime/build/state.js +1 -1
- package/dist/packages/runtime/build/summary-coverage-index.d.ts +21 -0
- package/dist/packages/runtime/build/summary-coverage-index.js +189 -0
- package/dist/packages/runtime/build/traces.js +3 -3
- package/dist/packages/runtime/build/validate-context-graph.d.ts +1 -1
- package/dist/packages/runtime/build/validate-context-graph.js +5 -5
- package/dist/packages/runtime/build/validate.d.ts +1 -1
- package/dist/packages/runtime/build/validate.js +1 -1
- package/dist/packages/runtime/client.d.ts +3 -3
- package/dist/packages/runtime/client.js +8 -13
- package/dist/packages/runtime/context-checks.js +13 -0
- package/dist/packages/runtime/context-graph-scaffold.js +2 -1
- package/dist/packages/runtime/context-graph-semantic-graph.d.ts +9 -0
- package/dist/packages/runtime/context-graph-semantic-graph.js +416 -0
- package/dist/packages/runtime/execution/lib/schema.d.ts +34 -31
- package/dist/packages/runtime/index.d.ts +2 -2
- package/dist/packages/runtime/index.js +1 -1
- package/dist/packages/runtime/native-run-handlers.d.ts +38 -0
- package/dist/packages/runtime/native-run-handlers.js +52 -33
- package/dist/packages/runtime/plan-artifact-contract.js +1 -1
- package/dist/packages/runtime/project-source-state.d.ts +4 -4
- package/dist/packages/runtime/project-source-state.js +5 -2
- package/dist/packages/runtime/project-store.d.ts +5 -0
- package/dist/packages/runtime/project-store.js +30 -3
- package/dist/packages/runtime/requested-artifacts.js +1 -1
- package/dist/packages/runtime/run-observability.js +9 -4
- package/dist/packages/runtime/runtime-action-proposals.js +3 -3
- package/dist/packages/runtime/runtime-build-plans.js +47 -3
- package/dist/packages/runtime/runtime-build-runs.js +9 -16
- package/dist/packages/runtime/runtime-caches.d.ts +26 -0
- package/dist/packages/runtime/runtime-caches.js +47 -0
- package/dist/packages/runtime/runtime-jobs.js +6 -6
- package/dist/packages/runtime/runtime-project-mutations.js +1 -0
- package/dist/packages/runtime/runtime-project-reads.d.ts +4 -1
- package/dist/packages/runtime/runtime-project-reads.js +229 -36
- package/dist/packages/runtime/runtime-proposal-helpers.js +6 -6
- package/dist/packages/runtime/runtime-resource-builders.d.ts +4 -2
- package/dist/packages/runtime/runtime-resource-builders.js +16 -14
- package/dist/packages/runtime/runtime-status.d.ts +14 -0
- package/dist/packages/runtime/runtime-status.js +15 -0
- package/dist/packages/runtime/runtime-verify-runs.js +6 -5
- package/dist/packages/runtime/runtime.d.ts +439 -22
- package/dist/packages/runtime/runtime.js +16 -2
- package/dist/packages/runtime/schemas/actions.d.ts +24 -0
- package/dist/packages/runtime/schemas/agents.d.ts +28 -0
- package/dist/packages/runtime/schemas/agents.js +33 -0
- package/dist/packages/runtime/schemas/build-plans.d.ts +181 -8
- package/dist/packages/runtime/schemas/build-plans.js +36 -2
- package/dist/packages/runtime/schemas/context-graphs.d.ts +1522 -0
- package/dist/packages/runtime/schemas/context-graphs.js +110 -0
- package/dist/packages/runtime/schemas/files.d.ts +7 -347
- package/dist/packages/runtime/schemas/files.js +1 -24
- package/dist/packages/runtime/schemas/index.d.ts +1 -0
- package/dist/packages/runtime/schemas/index.js +1 -0
- package/dist/packages/runtime/schemas/jobs.js +4 -0
- package/dist/packages/runtime/schemas/projects.d.ts +48 -21
- package/dist/packages/runtime/schemas/projects.js +34 -10
- package/dist/packages/runtime/schemas/runs.d.ts +1009 -240
- package/dist/packages/runtime/schemas/runs.js +17 -0
- package/dist/packages/runtime/service/openapi.js +1 -0
- package/dist/packages/runtime/service/operations.d.ts +1666 -145
- package/dist/packages/runtime/service/operations.js +147 -17
- package/dist/packages/runtime/service/routes.d.ts +11 -3
- package/dist/packages/runtime/service/routes.js +11 -3
- package/dist/packages/runtime/service/server-app-boot.js +2 -2
- package/dist/packages/runtime/service/server-helpers.d.ts +11 -0
- package/dist/packages/runtime/service/server-helpers.js +19 -0
- package/dist/packages/runtime/service/server-routes-action-proposals.js +4 -2
- package/dist/packages/runtime/service/server-routes-agents.js +19 -85
- package/dist/packages/runtime/service/server-routes-build-plans.js +14 -11
- package/dist/packages/runtime/service/server-routes-project-context.js +102 -7
- package/dist/packages/runtime/service/server-routes-project-jobs.js +19 -12
- package/dist/packages/runtime/service/server-routes-project-runs.js +5 -2
- package/dist/packages/runtime/service/server-routes-projects.js +6 -2
- package/dist/packages/runtime/service/server-routes-runs.js +11 -4
- package/dist/packages/runtime/verify/lib/schema.js +12 -0
- package/dist/packages/runtime/verify/test-file-guard.d.ts +2 -0
- package/dist/packages/runtime/verify/test-file-guard.js +29 -0
- package/dist/packages/runtime/verify/verify-execution.d.ts +7 -0
- package/dist/packages/runtime/verify/verify-execution.js +109 -35
- package/dist/packages/runtime/verify/verify-paths.d.ts +1 -0
- package/dist/packages/runtime/verify/verify-paths.js +4 -0
- package/dist/packages/runtime/verify/verify-specs.js +49 -39
- package/dist/packages/runtime/wire-schemas.d.ts +1 -1
- package/dist/packages/runtime/wire-schemas.js +1 -1
- package/package.json +2 -8
- package/public-repo/CONTRIBUTING.md +10 -3
- package/public-repo/README.md +122 -226
- package/public-repo/build-plans/interf-default/README.md +15 -12
- package/public-repo/build-plans/interf-default/build/stages/entrypoint/SKILL.md +74 -0
- package/public-repo/build-plans/interf-default/build/stages/knowledge/SKILL.md +95 -0
- package/public-repo/build-plans/interf-default/build/stages/summarize/SKILL.md +38 -5
- package/public-repo/build-plans/interf-default/build-plan.json +27 -23
- package/public-repo/build-plans/interf-default/build-plan.schema.json +24 -20
- package/public-repo/build-plans/interf-default/use/query/SKILL.md +8 -7
- package/public-repo/openapi/local-service.openapi.json +11637 -4213
- package/public-repo/skills/interf/SKILL.md +174 -134
- package/dist/packages/runtime/build/runtime-paths.d.ts +0 -8
- package/dist/packages/runtime/build/runtime-paths.js +0 -26
- package/dist/packages/runtime/build/state-paths.d.ts +0 -7
- package/dist/packages/runtime/build/state-paths.js +0 -22
- package/public-repo/build-plans/interf-default/build/stages/shape/SKILL.md +0 -34
- 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
|
|
9
|
-
from their files with source coverage
|
|
10
|
-
|
|
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
|
|
21
|
-
|
|
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,
|
|
32
|
-
Build Plan, Project activity, execution agents, and the
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
|
48
|
-
summaries, knowledge notes, links back to sources, and traces.
|
|
49
|
-
builds expose it as an inspectable folder agents can continue
|
|
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,
|
|
52
|
-
|
|
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/`
|
|
59
|
-
navigation/drilldown, traces, and source references. It does not
|
|
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
|
|
64
|
-
|
|
65
|
-
|
|
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 `
|
|
70
|
-
- use `
|
|
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
|
|
168
|
+
1. **Propose requested outputs and coverage first.**
|
|
144
169
|
|
|
145
|
-
Say what Interf needs to prepare before the answer can be trusted.
|
|
146
|
-
|
|
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
|
|
178
|
+
Before I answer, Interf should prepare this Context Graph for the question.
|
|
150
179
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
|
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
|
-
|
|
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,
|
|
171
|
-
|
|
172
|
-
when the connected Interf client provides one, but
|
|
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
|
|
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
|
|
193
|
-
|
|
194
|
-
|
|
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
|
|
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
|
|
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,
|
|
275
|
-
|
|
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
|
|
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
|
|
321
|
-
|
|
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
|
-
|
|
334
|
-
|
|
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
|
|
365
|
+
2. **<Plain-English output name>**
|
|
343
366
|
Why it helps: <short sentence>
|
|
344
367
|
|
|
345
|
-
|
|
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
|
|
361
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
407
|
-
|
|
408
|
-
|
|
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
|
-
|
|
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
|
|
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,
|
|
475
|
-
|
|
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
|
|
489
|
-
|
|
490
|
-
- Treat structural
|
|
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
|
|
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
|
-
|
|
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
|
|
498
|
-
will produce. After a Build, you can say which
|
|
499
|
-
what
|
|
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
|
|
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,
|
|
507
|
-
the user
|
|
508
|
-
Project id, Build id,
|
|
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
|
|
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 `
|
|
539
|
-
|
|
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
|
|
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
|
|
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
|
|
581
|
-
`values.
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
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
|
|
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
|
-
"
|
|
643
|
+
"requested_artifacts": [
|
|
598
644
|
{
|
|
599
|
-
"
|
|
600
|
-
"
|
|
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
|
-
"
|
|
604
|
-
"
|
|
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": "
|
|
616
|
-
"title": "
|
|
617
|
-
"purpose": "
|
|
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,
|
|
657
|
-
|
|
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.
|