@interf/compiler 0.1.11 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +254 -136
- package/dist/commands/benchmark.d.ts.map +1 -1
- package/dist/commands/benchmark.js +65 -84
- package/dist/commands/benchmark.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +19 -3
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/create.d.ts +3 -0
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +34 -9
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/default.d.ts.map +1 -1
- package/dist/commands/default.js +2 -0
- package/dist/commands/default.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +3 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/index.d.ts +11 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -16
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-args.d.ts +4 -0
- package/dist/lib/agent-args.d.ts.map +1 -0
- package/dist/lib/agent-args.js +42 -0
- package/dist/lib/agent-args.js.map +1 -0
- package/dist/lib/agent-constants.d.ts +6 -0
- package/dist/lib/agent-constants.d.ts.map +1 -0
- package/dist/lib/agent-constants.js +29 -0
- package/dist/lib/agent-constants.js.map +1 -0
- package/dist/lib/agent-detection.d.ts +8 -0
- package/dist/lib/agent-detection.d.ts.map +1 -0
- package/dist/lib/agent-detection.js +66 -0
- package/dist/lib/agent-detection.js.map +1 -0
- package/dist/lib/agent-execution.d.ts +3 -0
- package/dist/lib/agent-execution.d.ts.map +1 -0
- package/dist/lib/agent-execution.js +207 -0
- package/dist/lib/agent-execution.js.map +1 -0
- package/dist/lib/agent-logs.d.ts +3 -0
- package/dist/lib/agent-logs.d.ts.map +1 -0
- package/dist/lib/agent-logs.js +18 -0
- package/dist/lib/agent-logs.js.map +1 -0
- package/dist/lib/agent-preflight.d.ts +8 -0
- package/dist/lib/agent-preflight.d.ts.map +1 -0
- package/dist/lib/agent-preflight.js +77 -0
- package/dist/lib/agent-preflight.js.map +1 -0
- package/dist/lib/agent-render.d.ts +9 -0
- package/dist/lib/agent-render.d.ts.map +1 -0
- package/dist/lib/agent-render.js +219 -0
- package/dist/lib/agent-render.js.map +1 -0
- package/dist/lib/agent-status.d.ts +4 -0
- package/dist/lib/agent-status.d.ts.map +1 -0
- package/dist/lib/agent-status.js +59 -0
- package/dist/lib/agent-status.js.map +1 -0
- package/dist/lib/agent-types.d.ts +31 -0
- package/dist/lib/agent-types.d.ts.map +1 -0
- package/dist/lib/agent-types.js +2 -0
- package/dist/lib/agent-types.js.map +1 -0
- package/dist/lib/agents.d.ts +7 -49
- package/dist/lib/agents.d.ts.map +1 -1
- package/dist/lib/agents.js +8 -554
- package/dist/lib/agents.js.map +1 -1
- package/dist/lib/benchmark-execution.d.ts +9 -0
- package/dist/lib/benchmark-execution.d.ts.map +1 -0
- package/dist/lib/benchmark-execution.js +488 -0
- package/dist/lib/benchmark-execution.js.map +1 -0
- package/dist/lib/benchmark-paths.d.ts +11 -0
- package/dist/lib/benchmark-paths.d.ts.map +1 -0
- package/dist/lib/benchmark-paths.js +38 -0
- package/dist/lib/benchmark-paths.js.map +1 -0
- package/dist/lib/benchmark-specs.d.ts +8 -0
- package/dist/lib/benchmark-specs.d.ts.map +1 -0
- package/dist/lib/benchmark-specs.js +115 -0
- package/dist/lib/benchmark-specs.js.map +1 -0
- package/dist/lib/benchmark-targets.d.ts +5 -0
- package/dist/lib/benchmark-targets.d.ts.map +1 -0
- package/dist/lib/benchmark-targets.js +72 -0
- package/dist/lib/benchmark-targets.js.map +1 -0
- package/dist/lib/benchmark-types.d.ts +19 -0
- package/dist/lib/benchmark-types.d.ts.map +1 -0
- package/dist/lib/benchmark-types.js +2 -0
- package/dist/lib/benchmark-types.js.map +1 -0
- package/dist/lib/benchmark.d.ts +4 -29
- package/dist/lib/benchmark.d.ts.map +1 -1
- package/dist/lib/benchmark.js +3 -324
- package/dist/lib/benchmark.js.map +1 -1
- package/dist/lib/bundled-templates.d.ts +5 -0
- package/dist/lib/bundled-templates.d.ts.map +1 -0
- package/dist/lib/bundled-templates.js +23 -0
- package/dist/lib/bundled-templates.js.map +1 -0
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +2 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/eval-packs.d.ts +204 -0
- package/dist/lib/eval-packs.d.ts.map +1 -0
- package/dist/lib/eval-packs.js +177 -0
- package/dist/lib/eval-packs.js.map +1 -0
- package/dist/lib/execution-profile.d.ts +18 -0
- package/dist/lib/execution-profile.d.ts.map +1 -0
- package/dist/lib/execution-profile.js +85 -0
- package/dist/lib/execution-profile.js.map +1 -0
- package/dist/lib/interf-bootstrap.d.ts +4 -0
- package/dist/lib/interf-bootstrap.d.ts.map +1 -1
- package/dist/lib/interf-bootstrap.js +71 -68
- package/dist/lib/interf-bootstrap.js.map +1 -1
- package/dist/lib/interf-compile-plan.d.ts +12 -0
- package/dist/lib/interf-compile-plan.d.ts.map +1 -0
- package/dist/lib/interf-compile-plan.js +143 -0
- package/dist/lib/interf-compile-plan.js.map +1 -0
- package/dist/lib/interf-detect.d.ts.map +1 -1
- package/dist/lib/interf-detect.js +11 -10
- package/dist/lib/interf-detect.js.map +1 -1
- package/dist/lib/interf-scaffold.d.ts +1 -10
- package/dist/lib/interf-scaffold.d.ts.map +1 -1
- package/dist/lib/interf-scaffold.js +25 -362
- package/dist/lib/interf-scaffold.js.map +1 -1
- package/dist/lib/interf-workflow-package.d.ts +4 -0
- package/dist/lib/interf-workflow-package.d.ts.map +1 -0
- package/dist/lib/interf-workflow-package.js +131 -0
- package/dist/lib/interf-workflow-package.js.map +1 -0
- package/dist/lib/interf.d.ts +2 -1
- package/dist/lib/interf.d.ts.map +1 -1
- package/dist/lib/interf.js +2 -1
- package/dist/lib/interf.js.map +1 -1
- package/dist/lib/local-workflows.d.ts.map +1 -1
- package/dist/lib/local-workflows.js +8 -12
- package/dist/lib/local-workflows.js.map +1 -1
- package/dist/lib/logger.d.ts +4 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +11 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/obsidian.d.ts.map +1 -1
- package/dist/lib/obsidian.js +7 -3
- package/dist/lib/obsidian.js.map +1 -1
- package/dist/lib/parse.d.ts +2 -2
- package/dist/lib/parse.d.ts.map +1 -1
- package/dist/lib/parse.js +11 -7
- package/dist/lib/parse.js.map +1 -1
- package/dist/lib/registry.js +3 -3
- package/dist/lib/registry.js.map +1 -1
- package/dist/lib/runtime-acceptance.d.ts +4 -0
- package/dist/lib/runtime-acceptance.d.ts.map +1 -0
- package/dist/lib/runtime-acceptance.js +123 -0
- package/dist/lib/runtime-acceptance.js.map +1 -0
- package/dist/lib/runtime-contracts.d.ts +4 -0
- package/dist/lib/runtime-contracts.d.ts.map +1 -0
- package/dist/lib/runtime-contracts.js +63 -0
- package/dist/lib/runtime-contracts.js.map +1 -0
- package/dist/lib/runtime-paths.d.ts +8 -0
- package/dist/lib/runtime-paths.d.ts.map +1 -0
- package/dist/lib/runtime-paths.js +28 -0
- package/dist/lib/runtime-paths.js.map +1 -0
- package/dist/lib/runtime-prompt.d.ts +3 -0
- package/dist/lib/runtime-prompt.d.ts.map +1 -0
- package/dist/lib/runtime-prompt.js +59 -0
- package/dist/lib/runtime-prompt.js.map +1 -0
- package/dist/lib/runtime-reconcile.d.ts +6 -0
- package/dist/lib/runtime-reconcile.d.ts.map +1 -0
- package/dist/lib/runtime-reconcile.js +339 -0
- package/dist/lib/runtime-reconcile.js.map +1 -0
- package/dist/lib/runtime-runs.d.ts +12 -0
- package/dist/lib/runtime-runs.d.ts.map +1 -0
- package/dist/lib/runtime-runs.js +337 -0
- package/dist/lib/runtime-runs.js.map +1 -0
- package/dist/lib/runtime-types.d.ts +42 -0
- package/dist/lib/runtime-types.d.ts.map +1 -0
- package/dist/lib/runtime-types.js +2 -0
- package/dist/lib/runtime-types.js.map +1 -0
- package/dist/lib/runtime.d.ts +6 -58
- package/dist/lib/runtime.d.ts.map +1 -1
- package/dist/lib/runtime.js +5 -614
- package/dist/lib/runtime.js.map +1 -1
- package/dist/lib/schema.d.ts +156 -13
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/schema.js +113 -4
- package/dist/lib/schema.js.map +1 -1
- package/dist/lib/source-config.d.ts +13 -0
- package/dist/lib/source-config.d.ts.map +1 -0
- package/dist/lib/source-config.js +75 -0
- package/dist/lib/source-config.js.map +1 -0
- package/dist/lib/state-artifacts.d.ts +15 -0
- package/dist/lib/state-artifacts.d.ts.map +1 -0
- package/dist/lib/state-artifacts.js +24 -0
- package/dist/lib/state-artifacts.js.map +1 -0
- package/dist/lib/state-health.d.ts +9 -0
- package/dist/lib/state-health.d.ts.map +1 -0
- package/dist/lib/state-health.js +330 -0
- package/dist/lib/state-health.js.map +1 -0
- package/dist/lib/state-io.d.ts +15 -0
- package/dist/lib/state-io.d.ts.map +1 -0
- package/dist/lib/state-io.js +219 -0
- package/dist/lib/state-io.js.map +1 -0
- package/dist/lib/state-paths.d.ts +5 -0
- package/dist/lib/state-paths.d.ts.map +1 -0
- package/dist/lib/state-paths.js +19 -0
- package/dist/lib/state-paths.js.map +1 -0
- package/dist/lib/state-view.d.ts +7 -0
- package/dist/lib/state-view.d.ts.map +1 -0
- package/dist/lib/state-view.js +147 -0
- package/dist/lib/state-view.js.map +1 -0
- package/dist/lib/state.d.ts +6 -46
- package/dist/lib/state.d.ts.map +1 -1
- package/dist/lib/state.js +5 -632
- package/dist/lib/state.js.map +1 -1
- package/dist/lib/summarize-plan.d.ts +1 -0
- package/dist/lib/summarize-plan.d.ts.map +1 -1
- package/dist/lib/summarize-plan.js +10 -0
- package/dist/lib/summarize-plan.js.map +1 -1
- package/dist/lib/user-config.js +2 -2
- package/dist/lib/user-config.js.map +1 -1
- package/dist/lib/validate-helpers.d.ts +21 -0
- package/dist/lib/validate-helpers.d.ts.map +1 -0
- package/dist/lib/validate-helpers.js +72 -0
- package/dist/lib/validate-helpers.js.map +1 -0
- package/dist/lib/validate-interface.d.ts +79 -0
- package/dist/lib/validate-interface.d.ts.map +1 -0
- package/dist/lib/validate-interface.js +535 -0
- package/dist/lib/validate-interface.js.map +1 -0
- package/dist/lib/validate-kb.d.ts +81 -0
- package/dist/lib/validate-kb.d.ts.map +1 -0
- package/dist/lib/validate-kb.js +252 -0
- package/dist/lib/validate-kb.js.map +1 -0
- package/dist/lib/validate.d.ts +17 -146
- package/dist/lib/validate.d.ts.map +1 -1
- package/dist/lib/validate.js +33 -709
- package/dist/lib/validate.js.map +1 -1
- package/dist/lib/workflow-definitions.d.ts +1 -1
- package/dist/lib/workflow-definitions.d.ts.map +1 -1
- package/dist/lib/workflow-definitions.js +90 -166
- package/dist/lib/workflow-definitions.js.map +1 -1
- package/dist/lib/workflow-helpers.d.ts.map +1 -1
- package/dist/lib/workflow-helpers.js +6 -3
- package/dist/lib/workflow-helpers.js.map +1 -1
- package/dist/lib/workflow-stage-runner.d.ts +41 -0
- package/dist/lib/workflow-stage-runner.d.ts.map +1 -0
- package/dist/lib/workflow-stage-runner.js +106 -0
- package/dist/lib/workflow-stage-runner.js.map +1 -0
- package/dist/lib/workflow-starter-docs.d.ts +9 -0
- package/dist/lib/workflow-starter-docs.d.ts.map +1 -0
- package/dist/lib/workflow-starter-docs.js +18 -0
- package/dist/lib/workflow-starter-docs.js.map +1 -0
- package/dist/lib/workflows-interface-contracts.d.ts +24 -0
- package/dist/lib/workflows-interface-contracts.d.ts.map +1 -0
- package/dist/lib/workflows-interface-contracts.js +304 -0
- package/dist/lib/workflows-interface-contracts.js.map +1 -0
- package/dist/lib/workflows-interface.d.ts +3 -10
- package/dist/lib/workflows-interface.d.ts.map +1 -1
- package/dist/lib/workflows-interface.js +117 -365
- package/dist/lib/workflows-interface.js.map +1 -1
- package/dist/lib/workflows-kb.d.ts.map +1 -1
- package/dist/lib/workflows-kb.js +79 -55
- package/dist/lib/workflows-kb.js.map +1 -1
- package/dist/lib/workflows.d.ts +1 -1
- package/dist/lib/workflows.d.ts.map +1 -1
- package/dist/lib/workflows.js +1 -1
- package/dist/lib/workflows.js.map +1 -1
- package/package.json +15 -4
- package/skills/interface/analyze/SKILL.md +79 -28
- package/skills/interface/compile/SKILL.md +27 -28
- package/skills/interface/create/SKILL.md +53 -230
- package/skills/interface/create/references/compile-plan-format.md +31 -31
- package/skills/interface/create/references/workflows.md +17 -32
- package/skills/interface/query/SKILL.md +15 -1
- package/skills/interface/retrieve/SKILL.md +32 -65
- package/skills/knowledge-base/compile/SKILL.md +59 -83
- package/skills/knowledge-base/compile/references/stage-claims.md +1 -1
- package/skills/knowledge-base/compile/references/stage-entities.md +2 -2
- package/skills/knowledge-base/query/SKILL.md +13 -1
- package/skills/knowledge-base/summarize/SKILL.md +54 -24
- package/templates/interface/README.md +13 -12
- package/templates/interface/interfaces.md +14 -11
- package/templates/knowledge-base/README.md +0 -1
- package/templates/knowledge-base/registry.md +15 -15
- package/templates/workflow-package/README.md +16 -0
- package/templates/workflow-package/create/SKILL.md +8 -0
- package/templates/workflow-package/interface-query/SKILL.md +29 -0
- package/templates/workflow-package/interface-stage/SKILL.md +13 -0
- package/templates/workflow-package/knowledge-base-query/SKILL.md +36 -0
- package/templates/workflow-package/knowledge-base-stage/SKILL.md +13 -0
- package/templates/workflow-starters/interface/interf/README.md +13 -0
- package/templates/workflow-starters/interface/interf/create/SKILL.md +15 -0
- package/templates/workflow-starters/knowledge-base/interf/README.md +13 -0
- package/templates/workflow-starters/knowledge-base/karpathy/README.md +13 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
# Interface Compile — Analyze
|
|
9
9
|
|
|
10
|
-
Read `interf.json
|
|
10
|
+
Read `interf.json`, `compile-plan.md`, and `.interf/relevant.json` for the current target set from the preceding retrieval stage.
|
|
11
11
|
|
|
12
12
|
Local runtime reference:
|
|
13
13
|
- active stage contract: `.interf/stage-contract.json`
|
|
@@ -18,7 +18,7 @@ Local runtime reference:
|
|
|
18
18
|
|
|
19
19
|
When this skill is embedded into a generated interface, do not try to open SDK repo docs or source files outside the current workspace. The local contract and local docs are the source of truth for this run.
|
|
20
20
|
|
|
21
|
-
This skill does the deep analysis — reading summaries and extracting what matters for this interface. It
|
|
21
|
+
This skill does the deep analysis — reading summaries and extracting what matters for this interface. It may refine the interface runtime after the requested target set is classified, but bounded audits should close the named task before widening scope.
|
|
22
22
|
If `../../.interf/source-access.json` exists, use it as the quick check for whether raw paths are actually reachable from this session before assuming raw fallback will work.
|
|
23
23
|
If local docs are listed by the stage contract, read them before analyzing. They may `extend` or `override` the bundled workflow instructions for this stage, but they do not bypass coverage proof or the stage contract.
|
|
24
24
|
|
|
@@ -33,12 +33,17 @@ When invoked by the CLI, honor any explicit execution instructions in the prompt
|
|
|
33
33
|
- if the prompt gives an expected analysis set size, use it for progress reporting
|
|
34
34
|
- use `.interf/relevant.json` as the source of truth for `relevant_files` and `delta_files`
|
|
35
35
|
- require `.interf/coverage.json` and `coverage_complete: true` as proof that retrieve reached retrieval closure
|
|
36
|
-
- keep `.interf/health.json` consistent with the latest `.interf/state.json` if you update state directly
|
|
37
36
|
- only emit user-facing lines that start with `STATUS:`, `DONE:`, `BLOCKED:`, or `ERROR:`
|
|
37
|
+
- the CLI reconciles `.interf/state.json` and refreshes `.interf/health.json` after validation; do not treat those files as stage-owned write targets for analyze
|
|
38
|
+
- before any long-running raw inspection, PDF/chart extraction, OCR, or shell-based helper step, emit a `STATUS:` line naming the current subtask
|
|
39
|
+
- do not stay silent for more than about one minute while extraction work is still in progress
|
|
40
|
+
- when you switch page groups, markets, chart families, or extraction methods, emit another `STATUS:` line first
|
|
41
|
+
- do not keep reopening the same large raw PDF once the relevant pages are known; switch to a narrower page-bounded extraction step instead
|
|
42
|
+
- avoid long inline Bash heredocs for extraction helpers; prefer one page-bounded command per step, or write a short scratch script file and run it explicitly
|
|
38
43
|
|
|
39
44
|
## Prerequisites
|
|
40
45
|
|
|
41
|
-
`.interf/
|
|
46
|
+
`.interf/relevant.json` and `.interf/coverage.json` must exist. If not: "Run the retrieval stage first." Stop.
|
|
42
47
|
|
|
43
48
|
Before analyzing, prefer running:
|
|
44
49
|
|
|
@@ -52,27 +57,75 @@ If it fails, stop and fix the retrieval proof instead of continuing.
|
|
|
52
57
|
|
|
53
58
|
```
|
|
54
59
|
Analyze:
|
|
55
|
-
- [ ] 1. Read
|
|
60
|
+
- [ ] 1. Read retrieve proof and plan
|
|
56
61
|
- [ ] 2. Load summaries in bounded working sets
|
|
57
62
|
- [ ] 3. Extract entities, claims, and relationships
|
|
58
63
|
- [ ] 4. Refine runtime where evidence demands it
|
|
59
64
|
- [ ] 5. Merge results
|
|
60
|
-
- [ ] 6.
|
|
65
|
+
- [ ] 6. Write analysis handoff
|
|
61
66
|
```
|
|
62
67
|
|
|
63
|
-
### 1. Read
|
|
68
|
+
### 1. Read retrieve proof and plan
|
|
64
69
|
|
|
65
|
-
- `.interf/
|
|
66
|
-
- `.interf/relevant.json` → `delta_files[]` (or all `relevant_files[]` on first run)
|
|
70
|
+
- `.interf/relevant.json` → `delta_files[]` (or all `relevant_files[]` when delta is conservative)
|
|
67
71
|
- `.interf/coverage.json` → proof of scanned summary set, abstract review, and expansion passes
|
|
68
72
|
- `compile-plan.md` → this stage's section: what to extract (entity types, claim types, relationships)
|
|
69
73
|
- `../../.interf/source-access.json` → sample raw paths and suggested access checks when raw fallback is needed
|
|
70
74
|
- local instruction docs listed by the stage contract
|
|
71
|
-
- treat the plan as the starting ontology
|
|
75
|
+
- treat the plan as the starting ontology
|
|
76
|
+
- if the plan names a bounded audit target set, treat that set as the hard default scope until every requested value is classified as exact, approximate, or unresolved
|
|
77
|
+
- if the plan includes a target ledger, use it as the primary checklist and record one result per target
|
|
78
|
+
- if the plan depends on exact figures from PDFs, charts, or tables, raw inspection is part of analysis for those items, not an optional afterthought
|
|
79
|
+
- for exact-value PDF work, reading raw pages with `Read` confirms location and context, but it does not by itself satisfy the extraction requirement
|
|
80
|
+
- choose the local extraction path from whatever the current environment actually supports; do not assume a specific binary or hardcode shell recipes into the answer
|
|
81
|
+
- before locking in a machine-readable path, verify that the local method is actually available in this environment; if it is missing or blocked, count that as one failed path and switch to another available local method
|
|
72
82
|
|
|
73
83
|
### 2. Load summaries in bounded working sets
|
|
74
84
|
|
|
75
|
-
Read full abstract + overview for each delta file
|
|
85
|
+
Read full abstract + overview for each delta file.
|
|
86
|
+
Summaries are the default evidence surface, but if the plan requires exact chart/table values and the summaries do not preserve them, inspect the raw source for those specific items and record how the values were derived.
|
|
87
|
+
Do not treat `the summary was coarse` as proof that the source lacks the number.
|
|
88
|
+
When exact chart values matter, the analysis is not complete until you either recover the value more precisely or record why the local environment blocked a machine-readable attempt.
|
|
89
|
+
Keep raw probing focused. Do not dump large SVG, PDF, or OCR bodies into the run log. Extract the needed values, calibration anchors, and method notes only.
|
|
90
|
+
If the plan names a bounded target set, keep the extraction bounded to that set. Do not widen to every market, page, or entity in the report unless one extra comparator or calibration anchor is required to answer the task correctly.
|
|
91
|
+
For bounded audits, do not widen the ontology, taxonomy, or target set until the requested values are classified or a concrete blocker has been recorded.
|
|
92
|
+
Treat metric plus period as part of the target identity. A nearby exact figure with the wrong period, wrong unit, or wrong chart family does not satisfy the target and must remain separate supporting context.
|
|
93
|
+
As soon as each target row is classified as exact, approximate, or unresolved, stop extraction and move directly to the required file writes. Do not spend extra turns polishing, re-reading, or chasing more precision after the ledger is complete.
|
|
94
|
+
|
|
95
|
+
### Exact-value escalation for PDFs and charts
|
|
96
|
+
|
|
97
|
+
If the task asks for exact chart or table values:
|
|
98
|
+
- opening the PDF with `Read` is only the first step; it does not count as the machine-readable extraction attempt
|
|
99
|
+
- a concrete local extraction path is the default path rather than an optional enhancement
|
|
100
|
+
- before each new page group, market batch, or extraction method, emit a short `STATUS:` line so the run ledger shows where extraction is currently focused
|
|
101
|
+
- use `Read` on the raw PDF to confirm location, context, or a narrow page group only; once the page map is known, do not keep reopening the full PDF
|
|
102
|
+
- after the page map is known, switch to a page-bounded local extraction helper or scratch file workflow for that page group instead of rereading the whole PDF
|
|
103
|
+
- keep helper commands single-purpose and short. Avoid long inline Bash heredocs; if you need multiple steps, write a short scratch script file first or run separate bounded commands
|
|
104
|
+
- use this ladder in order and do not stop after a single failed extractor:
|
|
105
|
+
1. confirm the relevant pages, chart titles, axes, units, time cuts, and left-to-right target order from the raw PDF
|
|
106
|
+
1a. before locking in values, build a page-level chart map for each target chart: page, chart title, visible axis range/ticks, legend or component series, and whether the chart is stacked
|
|
107
|
+
2. attempt text or table extraction with a local machine-readable method that you have already verified is available in this environment
|
|
108
|
+
3. if the text layer still misses the values, switch to another machine-readable path that fits the source structure and is already available in the environment
|
|
109
|
+
4. if the chart still has no explicit labels, attempt another recoverable extraction path before giving up on exactness
|
|
110
|
+
4a. try at most two machine-readable extraction paths per target or tightly related page group; if both fail, record the blocker and mark the value unresolved instead of escalating indefinitely
|
|
111
|
+
5. when the report contains known anchor values elsewhere (for example Key Stats or Q1/YTD tables), use them to validate calibration before finalizing historical chart values
|
|
112
|
+
6. if the anchor check is materially off, recalibrate or change method instead of locking in a coarse approximation
|
|
113
|
+
7. only then fall back to a visual estimate
|
|
114
|
+
- if the chart is stacked, recover the total stacked height or area unless the request explicitly names one component series; do not treat one colored segment as the requested total
|
|
115
|
+
- if multiple charts share a page, keep a separate chart map and scale for each chart family; never reuse one chart's scale for another chart on the same page
|
|
116
|
+
- when you use shell commands for scratch extraction, keep them single-purpose and non-destructive. Do not start with `rm`, wildcard cleanup, or chained helpers like `;` and `&&`. Prefer fresh temp filenames or directories instead.
|
|
117
|
+
- if a local extraction path is unavailable, blocked, or missing a dependency, record that explicitly, do not retry the same missing path, and either switch once to another available local path or record the blocker
|
|
118
|
+
- do not call a value approximate or unavailable until you have exhausted the extraction ladder or documented a concrete blocker on the local extraction path
|
|
119
|
+
- if you only have an approximation, keep that precision gap visible in the analysis instead of presenting it as final truth
|
|
120
|
+
- if the task only needs a rounded bin, one-decimal chart read, or other answer-grade approximation, and the rendered chart plus visible axis labels already support that answer, stop there instead of drilling deeper into SVG or PDF internals for pseudo-precision
|
|
121
|
+
- if you record an approximate chart value, also record the scale band that supports it, such as `between 0.5 and 0.6, closer to 0.5`, plus any nearby labeled anchors used to choose the rounded value or `bin_choice`
|
|
122
|
+
- if a chart-derived value sits between adjacent one-decimal bins, set `bin_choice` to the closer supported bin and explain that choice in `scale_band` or the notes; do not default to rounding an uncertain midpoint up
|
|
123
|
+
- for approximate chart reads, make `value_display` the answer-grade value a later weak model should quote; keep any finer-grained midpoint guess in `scale_band` or `notes` instead of promoting it into the main display value
|
|
124
|
+
- if the visible chart scale is coarser than the requested display precision, prefer the nearest clearly supported bin or anchor rather than interpolating a prettier in-between tenth that the chart does not really justify
|
|
125
|
+
- if you cannot state which chart title, scale, and total-vs-component interpretation produced the number, keep the target unresolved instead of emitting a confident approximate answer
|
|
126
|
+
- if you widen beyond the named target set, record why in the extraction ledger and stop once that reason is satisfied
|
|
127
|
+
- once every requested value is classified as exact, approximate, or unresolved, stop exploring. Write `.interf/analysis.json`, emit the required status line, and finish the stage.
|
|
128
|
+
- when using scratch extraction files, keep the command output minimal. Write bulk SVG/OCR/PDF output to temp files and inspect only the relevant slices for the target chart rather than streaming whole blobs into the run log.
|
|
76
129
|
|
|
77
130
|
Batching strategy:
|
|
78
131
|
- Prefer a working set budget of roughly 35-45% of the model context window per batch
|
|
@@ -84,6 +137,11 @@ Each batch (or subagent) extracts:
|
|
|
84
137
|
- Entities relevant to this interface's ontology goals
|
|
85
138
|
- Claims (patterns, decisions, risks, metrics)
|
|
86
139
|
- Relationships between entities
|
|
140
|
+
- Modality notes when it matters: whether a key numeric claim came from prose, tables, or chart/figure extraction
|
|
141
|
+
- Time-cut notes when it matters: whether a value is annual, quarterly, trailing-twelve-month, or another window
|
|
142
|
+
- Precision notes when it matters: exact, approximate, or unresolved
|
|
143
|
+
- For bounded audits, only extract the entities and claims needed for the named targets plus any narrowly justified comparators or calibration anchors
|
|
144
|
+
- For bounded target ledgers, emit one result per requested item with metric, entity, period, source kind, derivation, value, and precision
|
|
87
145
|
|
|
88
146
|
Subagent instruction:
|
|
89
147
|
```
|
|
@@ -102,6 +160,7 @@ If repeated evidence shows the interface needs better local structure, propose o
|
|
|
102
160
|
- stronger relationship groupings
|
|
103
161
|
|
|
104
162
|
Do not rewrite the runtime gratuitously. Refine only when it helps the interface become a better local context layer for future agents.
|
|
163
|
+
For bounded audit or exact-value tasks, do not widen the runtime before the requested values are classified and the main brief can be written.
|
|
105
164
|
|
|
106
165
|
### 5. Merge results
|
|
107
166
|
|
|
@@ -111,30 +170,22 @@ Combine all batch/subagent outputs:
|
|
|
111
170
|
- merge runtime refinements
|
|
112
171
|
- Flag conflicts for manual review
|
|
113
172
|
|
|
114
|
-
### 6.
|
|
115
|
-
|
|
116
|
-
Write analysis results to `.interf/state.json`:
|
|
117
|
-
|
|
118
|
-
```json
|
|
119
|
-
{
|
|
120
|
-
"retrieve_complete": true,
|
|
121
|
-
"analyze_complete": true,
|
|
122
|
-
"extracted_entities": 15,
|
|
123
|
-
"extracted_claims": 23,
|
|
124
|
-
"last_analyze": "2026-03-30T20:10:00Z"
|
|
125
|
-
}
|
|
126
|
-
```
|
|
173
|
+
### 6. Write analysis handoff
|
|
127
174
|
|
|
128
175
|
Store the merged extraction results in `.interf/analysis.json` (temporary, consumed by the next output stage). Include runtime refinements when present.
|
|
176
|
+
When exact-value PDF or chart work happened, include a raw extraction ledger in `.interf/analysis.json` with enough detail for the compile stage to judge confidence: source path, pages inspected, methods attempted, result, whether a scratch helper was used, and whether each reported value is exact, approximate, or unresolved.
|
|
177
|
+
For chart-derived approximate values, include enough structure in `.interf/analysis.json` for a later reviewer to reconstruct the judgment without reopening the raw file: chart title, whether the chart was stacked, scale band or nearest labeled anchors, and the reason the chosen `bin_choice` is closer than the neighboring bins.
|
|
178
|
+
For bounded target audits, the final write sequence is strict: write `.interf/analysis.json`, emit `STATUS: wrote analyze outputs`, emit `DONE: analyze complete`, and stop.
|
|
129
179
|
|
|
130
|
-
|
|
180
|
+
The CLI reconciles `.interf/state.json` and refreshes `.interf/health.json` after validation.
|
|
131
181
|
|
|
132
182
|
Report with status-style lines:
|
|
133
183
|
```
|
|
134
|
-
STATUS: loaded analyze plan
|
|
135
|
-
STATUS:
|
|
184
|
+
STATUS: loaded analyze plan N files.
|
|
185
|
+
STATUS: inspecting <current subtask>
|
|
186
|
+
STATUS: analyzed N/N
|
|
136
187
|
STATUS: wrote analysis
|
|
137
188
|
DONE: analyze complete
|
|
138
189
|
```
|
|
139
190
|
|
|
140
|
-
When the analysis artifact
|
|
191
|
+
When the analysis artifact is written, emit the required `DONE:` line and stop. The CLI reconciles `.interf/state.json` and refreshes `.interf/health.json` after validation. Do not keep exploring after the analyze contract is satisfied.
|
|
@@ -31,13 +31,13 @@ Harness role:
|
|
|
31
31
|
When invoked by the CLI, honor any explicit execution instructions in the prompt. In particular:
|
|
32
32
|
- if `.interf/stage-contract.json` exists, treat it as the authoritative stage contract for this run
|
|
33
33
|
- if the prompt gives a retrieved set size, use it for progress framing
|
|
34
|
-
- keep `.interf/health.json` consistent with the latest `.interf/state.json` if you update state directly
|
|
35
34
|
- do not create or edit `.interf/view-spec.json`; the CLI refreshes it after stage completion
|
|
36
35
|
- only emit user-facing lines that start with `STATUS:`, `DONE:`, `BLOCKED:`, or `ERROR:`
|
|
36
|
+
- the CLI reconciles `.interf/state.json`, refreshes `.interf/health.json`, and refreshes `.interf/view-spec.json` after validation; do not treat those files as stage-owned write targets for compile
|
|
37
37
|
|
|
38
38
|
## Prerequisites
|
|
39
39
|
|
|
40
|
-
`.interf/
|
|
40
|
+
If `.interf/analysis.json` is missing or unreadable: emit `BLOCKED: missing analysis handoff (.interf/analysis.json)` and stop.
|
|
41
41
|
|
|
42
42
|
Before compiling, prefer running:
|
|
43
43
|
|
|
@@ -58,9 +58,8 @@ Compile:
|
|
|
58
58
|
- [ ] 3. Compile claims
|
|
59
59
|
- [ ] 4. Compile interface-specific outputs
|
|
60
60
|
- [ ] 5. Compile navigation
|
|
61
|
-
- [ ] 6.
|
|
62
|
-
- [ ] 7.
|
|
63
|
-
- [ ] 8. Clean up
|
|
61
|
+
- [ ] 6. Validate
|
|
62
|
+
- [ ] 7. Clean up
|
|
64
63
|
```
|
|
65
64
|
|
|
66
65
|
### 1. Read analysis results and output spec
|
|
@@ -70,6 +69,7 @@ Compile:
|
|
|
70
69
|
- Existing `knowledge/` → what already exists (for delta: update, don't recreate)
|
|
71
70
|
- `../../.interf/source-access.json` → sample raw paths and suggested access checks when raw fallback is needed
|
|
72
71
|
- local instruction docs listed by the stage contract
|
|
72
|
+
- if the plan asked for exact values from PDFs, charts, or tables, check whether `.interf/analysis.json` includes a raw extraction ledger or equivalent method notes before treating approximations as closed findings
|
|
73
73
|
|
|
74
74
|
### 2. Compile entities
|
|
75
75
|
|
|
@@ -83,19 +83,33 @@ Create/update `knowledge/entities/` notes. Each entity gets:
|
|
|
83
83
|
|
|
84
84
|
Create/update `knowledge/claims/` notes. Prose-as-title: filename IS the claim.
|
|
85
85
|
- The claim, why it matters, evidence links
|
|
86
|
-
- 2+ sources required
|
|
86
|
+
- 2+ sources required for broad synthesis work
|
|
87
|
+
- single-source claims are allowed for bounded audit or extraction workflows when provenance includes source path/page, extraction method, and precision (`exact`, `approximate`, or `unresolved`)
|
|
87
88
|
- Link claims to related entities, briefs, and parent summaries so backlinks become a real navigation surface
|
|
88
89
|
|
|
89
90
|
### 4. Compile interface-specific outputs
|
|
90
91
|
|
|
91
92
|
From `compile-plan.md`: create whatever this output stage defines.
|
|
93
|
+
- Treat `compile-plan.md` Stage 3 as the output contract. Follow the exact filenames and folders named there.
|
|
92
94
|
- briefs/ hero documents
|
|
93
95
|
- summaries/ interface-local temporal views when needed
|
|
94
96
|
- Any other outputs defined in the compile plan
|
|
97
|
+
- if this is a bounded audit, prefer one focused hero brief plus the smallest supporting note set that makes the target answers easy to retrieve
|
|
98
|
+
- do not mirror the whole parent report into the interface unless the compile plan explicitly asks for full-report coverage
|
|
99
|
+
- if the plan includes a target ledger, the hero brief must cover every requested target explicitly and unresolved targets must stay unresolved instead of being replaced by nearby exact figures
|
|
100
|
+
- Preserve `value_display`, `bin_choice`, `precision`, `source_kind`, and page metadata from `.interf/analysis.json`. Compile is a render pass, not a second chart-reading pass.
|
|
101
|
+
- If an approximate chart-derived target includes both `value_display` and `bin_choice`, prefer the conservative answer-grade value for the main hero surface unless the notes explicitly justify a finer display. Keep extra granularity in supporting prose, `scale_band`, or notes rather than upgrading the main answer.
|
|
102
|
+
- Do not invent fixed hero-brief filenames or generic claim-folder patterns unless the compile plan explicitly asks for them.
|
|
95
103
|
|
|
96
104
|
For delta compiles: update existing files surgically. Do NOT regenerate everything.
|
|
97
105
|
|
|
98
106
|
When a local output cites evidence from the main knowledge base, use the parent knowledge-base summary path (`../../summaries/...`). Do not point `source:` or evidence links at the interface-local `summaries/` folder unless that interface actually created the cited file.
|
|
107
|
+
When an output depends on exact numbers from PDFs, tables, or charts, say whether the value was text-derived, table-derived, or chart-derived. Do not present chart-extracted values as if they were already explicit in the compiled summaries.
|
|
108
|
+
Do not write `data unavailable` or `gap` when the real state is `not yet extracted from the raw source`.
|
|
109
|
+
If the analysis only opened raw pages but did not log a machine-readable extraction attempt for an exact-value task, keep the result unresolved instead of upgrading it to a verified finding.
|
|
110
|
+
If the analysis logged anchor cross-checks with material drift, keep the finding approximate or unresolved instead of presenting it as settled.
|
|
111
|
+
If the question asked for exact values and you only recovered a visual estimate, say `approximate` explicitly and keep the remaining precision gap in the output.
|
|
112
|
+
Do not substitute a requested `annual`, `quarterly`, `trailing-12-month`, `availability`, `take-up`, or similar target with another metric or period just because the substitute is exact and easier to quote.
|
|
99
113
|
|
|
100
114
|
### 5. Compile navigation
|
|
101
115
|
|
|
@@ -106,30 +120,15 @@ When a local output cites evidence from the main knowledge base, use the parent
|
|
|
106
120
|
- if Obsidian is mentioned, assume the interface is being browsed from the parent knowledge-base vault rather than as a standalone vault
|
|
107
121
|
- Update every compile run
|
|
108
122
|
|
|
109
|
-
### 6.
|
|
123
|
+
### 6. Runtime reconciliation
|
|
110
124
|
|
|
111
|
-
|
|
112
|
-
{
|
|
113
|
-
"retrieve_complete": true,
|
|
114
|
-
"coverage_complete": true,
|
|
115
|
-
"analyze_complete": true,
|
|
116
|
-
"compile_complete": true,
|
|
117
|
-
"last_compile": "2026-03-30T20:15:00Z",
|
|
118
|
-
"knowledge_base_summary_count_at_last_compile": 1242,
|
|
119
|
-
"entity_count": 15,
|
|
120
|
-
"claim_count": 23
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Do not reset retrieve/analyze coverage markers after a successful compile. The next compile starts fresh because the next retrieve run rewrites the retrieval artifacts and updates timestamps, not because state is zeroed out.
|
|
125
|
-
|
|
126
|
-
Refresh `.interf/health.json` after state is updated. The CLI refreshes `.interf/view-spec.json` after stage completion so viewers keep a stable presentation contract.
|
|
125
|
+
Do not reset retrieve/analyze coverage markers manually. The CLI reconciles `.interf/state.json`, refreshes `.interf/health.json`, and refreshes `.interf/view-spec.json` after stage validation so viewers keep a stable presentation contract.
|
|
127
126
|
|
|
128
127
|
### 7. Validate
|
|
129
128
|
|
|
130
129
|
- [ ] All outputs from compile-plan.md exist and are non-empty
|
|
131
130
|
- [ ] Entity notes have evidence links
|
|
132
|
-
- [ ] Claims
|
|
131
|
+
- [ ] Claims meet the workflow provenance rule: either 2+ sources or a bounded-audit single-source record with explicit provenance
|
|
133
132
|
- [ ] No broken wikilinks
|
|
134
133
|
- [ ] home.md is current
|
|
135
134
|
|
|
@@ -139,14 +138,14 @@ Delete `.interf/analysis.json` — it was temporary between stages.
|
|
|
139
138
|
|
|
140
139
|
Report with status-style lines:
|
|
141
140
|
```
|
|
142
|
-
STATUS: loaded compile plan
|
|
143
|
-
STATUS: wrote entities
|
|
144
|
-
STATUS: wrote claims
|
|
141
|
+
STATUS: loaded compile plan N relevant files.
|
|
142
|
+
STATUS: wrote entities E
|
|
143
|
+
STATUS: wrote claims C
|
|
145
144
|
STATUS: wrote interface outputs
|
|
146
145
|
DONE: compile complete
|
|
147
146
|
```
|
|
148
147
|
|
|
149
|
-
When the required outputs
|
|
148
|
+
When the required outputs are written, emit the required `DONE:` line and stop. The CLI reconciles `.interf/state.json` and refreshes `.interf/health.json` after validation. Do not keep exploring after the compile contract is satisfied.
|
|
150
149
|
|
|
151
150
|
## Key principle
|
|
152
151
|
|
|
@@ -1,264 +1,87 @@
|
|
|
1
1
|
---
|
|
2
2
|
{
|
|
3
3
|
"name": "interface/create",
|
|
4
|
-
"description": "Create a new Interf interface. Analyzes a knowledge base to generate an interf.json config and execution plan (compile-plan.md). Use when asked to create an interface, new interface,
|
|
4
|
+
"description": "Create a new Interf interface. Analyzes a knowledge base to generate an interf.json config and execution plan (compile-plan.md). Use when asked to create an interface, new interface, or build a task-specific view."
|
|
5
5
|
}
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Create Interface
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
This stage drafts the initial interface runtime hypothesis from the parent knowledge base.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
- active stage contract: `.interf/stage-contract.json`
|
|
14
|
-
- active run ledger: `.interf/run.json`
|
|
15
|
-
- local config: `interf.json`
|
|
16
|
-
- local plan target: `compile-plan.md`
|
|
17
|
-
- local instruction docs: the files listed by `.interf/stage-contract.json`
|
|
12
|
+
## Stage role
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
- planning only
|
|
15
|
+
- no raw-source inspection
|
|
16
|
+
- no chart/table extraction
|
|
17
|
+
- no registry edits
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
- This skill is an internal harness step normally invoked by `interf create interface`.
|
|
23
|
-
- For standard operation, prefer the CLI or another higher-level tool over calling this skill directly.
|
|
19
|
+
Read `.interf/stage-contract.json` first and treat it as authoritative.
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
## Minimal completion target
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
For automated runs, the primary deliverable is a correct `compile-plan.md`.
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
- [ ] 3. Analyze knowledge base
|
|
34
|
-
- [ ] 4. Update interf.json
|
|
35
|
-
- [ ] 5. Generate compile-plan.md
|
|
36
|
-
- [ ] 6. Update interface structure
|
|
37
|
-
- [ ] 7. Register
|
|
38
|
-
- [ ] 8. Show next steps
|
|
39
|
-
```
|
|
25
|
+
- If scaffolded `interf.json` already matches the stage contract, leave it unchanged.
|
|
26
|
+
- If scaffolded `AGENTS.md` already preserves the router, checklist, and parent handoff, leave it unchanged.
|
|
27
|
+
- Do not spend the run rewriting scaffold files that already validate.
|
|
28
|
+
- After the knowledge-base review, the next action should usually be to rewrite `compile-plan.md` in one full write and stop.
|
|
40
29
|
|
|
41
|
-
|
|
30
|
+
## Bounded analysis
|
|
42
31
|
|
|
43
|
-
|
|
32
|
+
Build the plan from the parent knowledge-base surface only:
|
|
44
33
|
|
|
45
|
-
|
|
34
|
+
- `../../home.md`
|
|
35
|
+
- `../../knowledge/`
|
|
36
|
+
- `../../summaries/`
|
|
46
37
|
|
|
47
|
-
|
|
38
|
+
Read only enough to plan the interface:
|
|
48
39
|
|
|
49
|
-
|
|
40
|
+
- the primary summary or summaries that anchor the task
|
|
41
|
+
- the highest-signal parent knowledge notes that clarify scope
|
|
42
|
+
- the local scaffold files you may update
|
|
50
43
|
|
|
51
|
-
|
|
52
|
-
If no known workflow fits: ask the user:
|
|
53
|
-
- What questions should this interface answer?
|
|
54
|
-
- What's the use case? (briefing, research, audit, etc.)
|
|
44
|
+
Do not widen into broad research. If later stages need raw/chart work, encode that in `compile-plan.md` and leave the actual extraction to retrieve/analyze.
|
|
55
45
|
|
|
56
|
-
|
|
46
|
+
## Plan requirements
|
|
57
47
|
|
|
58
|
-
|
|
59
|
-
- Category distribution
|
|
60
|
-
- People mentioned
|
|
61
|
-
- Date range
|
|
62
|
-
- Evidence-tier / truth-mode distribution
|
|
63
|
-
- Entity and claim coverage in knowledge/
|
|
48
|
+
`compile-plan.md` must:
|
|
64
49
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
- preserve the exact requested use case line in `## Interface Goal`
|
|
51
|
+
- keep the existing workflow stage headings and required subsection labels
|
|
52
|
+
- translate the task into a concrete target ledger when the task names specific values, periods, entities, metrics, units, or chart/table families
|
|
53
|
+
- keep different time cuts and metric families separate, and say when later stages must inspect raw visuals
|
|
54
|
+
- require a concrete local extraction path plus exact/approximate/unresolved labeling when precision matters
|
|
55
|
+
- require a durable output surface, usually one focused hero brief for bounded audits
|
|
68
56
|
|
|
69
|
-
|
|
57
|
+
## AGENTS handling
|
|
70
58
|
|
|
71
|
-
|
|
59
|
+
`AGENTS.md` is a scaffold router for later agents, not the main output of this stage.
|
|
72
60
|
|
|
73
|
-
|
|
61
|
+
- Preserve the scaffold router and checklist.
|
|
62
|
+
- preserve the `## Manual access checklist`, raw-source gate, and parent knowledge-base handoff
|
|
63
|
+
- preserve the router to `workflow/use/query/` and later compile-stage docs
|
|
64
|
+
- do not execute those instructions during create
|
|
65
|
+
- only rewrite `AGENTS.md` if the existing scaffold is materially wrong for this interface
|
|
74
66
|
|
|
75
|
-
|
|
67
|
+
## Finish rule
|
|
76
68
|
|
|
77
|
-
|
|
78
|
-
{
|
|
79
|
-
"type": "interface",
|
|
80
|
-
"name": "{name}",
|
|
81
|
-
"workflow": "{workflow}",
|
|
82
|
-
"knowledge_base": {
|
|
83
|
-
"path": "../.."
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Do not add `filter:`, `outputs:`, or `validation:` sections to `interf.json`. Those belong in `compile-plan.md`.
|
|
89
|
-
|
|
90
|
-
### 5. Generate compile-plan.md
|
|
91
|
-
|
|
92
|
-
This is the execution plan for compiling THIS interface. The LLM writes it based on the knowledge-base analysis and use case.
|
|
93
|
-
|
|
94
|
-
The plan defines the initial runtime hypothesis for the selected workflow stage graph.
|
|
95
|
-
Start from the existing scaffolded `compile-plan.md`. Preserve the workflow stage headings and required subsection labels already present in that starter plan, then refine the bullet contents and wording for the actual use case.
|
|
96
|
-
For each workflow stage:
|
|
97
|
-
- name the stage exactly as the workflow labels it
|
|
98
|
-
- explain what that stage must accomplish for this use case
|
|
99
|
-
- include contract-appropriate detail for retrieval, analysis, or output stages
|
|
100
|
-
|
|
101
|
-
### 6. Update interface structure
|
|
102
|
-
|
|
103
|
-
The CLI creates the scaffold before invoking this skill. The expected structure is:
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
{name}/
|
|
107
|
-
├── interf.json
|
|
108
|
-
├── compile-plan.md execution plan (git-tracked)
|
|
109
|
-
├── AGENTS.md
|
|
110
|
-
├── CLAUDE.md
|
|
111
|
-
├── workflow/
|
|
112
|
-
│ ├── workflow.json
|
|
113
|
-
│ ├── README.md
|
|
114
|
-
│ ├── create/
|
|
115
|
-
│ │ └── SKILL.md
|
|
116
|
-
│ ├── use/
|
|
117
|
-
│ │ └── query/
|
|
118
|
-
│ │ └── SKILL.md
|
|
119
|
-
│ └── compile/
|
|
120
|
-
│ └── stages/
|
|
121
|
-
│ └── {workflow stage folders}/
|
|
122
|
-
├── .gitignore
|
|
123
|
-
├── .interf/state.json runtime only (gitignored)
|
|
124
|
-
└── home.md
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
**AGENTS.md:**
|
|
128
|
-
```markdown
|
|
129
|
-
# {Name}
|
|
130
|
-
|
|
131
|
-
{One-line description: what this interface is for and what questions it answers.}
|
|
132
|
-
|
|
133
|
-
## How this interface works
|
|
134
|
-
|
|
135
|
-
This is an Interf interface — a focused local context shell built on top of a knowledge base.
|
|
136
|
-
|
|
137
|
-
- `interf.json` — minimal config. Defines type, name, and knowledge-base path only.
|
|
138
|
-
- `compile-plan.md` — execution plan. Defines the selected workflow's compile stages. Generated by LLM, customized for this specific interface. This is the initial runtime hypothesis, not the final word.
|
|
139
|
-
- `knowledge/` — this interface's local entities, claims, and indexes. Built during compile.
|
|
140
|
-
- `briefs/` — hero documents for this use case.
|
|
141
|
-
- `summaries/` — periodic summaries.
|
|
142
|
-
- `workflow/` — local workflow package for create, query, and compile-stage docs.
|
|
143
|
-
- `workflow/use/query/` — interface-local manual query rules. If local artifacts are insufficient, this should defer to the parent KB query loop at `../../workflow/use/query/SKILL.md`.
|
|
144
|
-
- `home.md` — start here. Overview of what's built.
|
|
145
|
-
- The knowledge base is at `../../`. Knowledge-base summaries are at `../../summaries/`.
|
|
146
|
-
- The knowledge-base raw-file quick check is at `../../.interf/source-access.json`.
|
|
147
|
-
- Agent access hierarchy for this interface is: local interface artifacts -> parent knowledge-base artifacts -> raw source files only when needed.
|
|
148
|
-
- If your coding agent is sandboxed, prefer opening the source folder as the session root, then navigate to this interface from there.
|
|
149
|
-
- In Obsidian, browse this interface from the parent knowledge-base vault. Do not assume a standalone interface vault can resolve parent links.
|
|
150
|
-
|
|
151
|
-
## Manual access checklist
|
|
152
|
-
|
|
153
|
-
Use this checklist on the first substantive manual question so you do not get stuck later in the session:
|
|
154
|
-
|
|
155
|
-
1. Read this `AGENTS.md` and then local `workflow/use/query/SKILL.md`.
|
|
156
|
-
2. Confirm the local interface surface is reachable: `home.md`, `knowledge/`, `briefs/`, and any local `summaries/`.
|
|
157
|
-
3. Confirm the parent knowledge base is reachable: `../../AGENTS.md`, `../../home.md`, and parent summaries.
|
|
158
|
-
4. Run the raw-source preflight through `../../.interf/source-access.json` immediately. If the environment asks for permission, request it right away.
|
|
159
|
-
5. After that preflight, start the answer with exactly `Raw access: confirmed` or `Raw access: unavailable`.
|
|
160
|
-
|
|
161
|
-
## Preferred operation
|
|
162
|
-
|
|
163
|
-
Use the Interf CLI:
|
|
164
|
-
```
|
|
165
|
-
interf verify interface-plan --json # immediately after scaffold creation
|
|
166
|
-
interf compile
|
|
167
|
-
interf verify retrieve --json # after retrieve before analyze/compile
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Raw skills (fallback / internal harness)
|
|
171
|
-
|
|
172
|
-
Run the compile chain:
|
|
173
|
-
```
|
|
174
|
-
interface/retrieve retrieval contract: prove coverage and select relevant files
|
|
175
|
-
interface/analyze analysis contract: extract entities, claims, and refinements
|
|
176
|
-
interface/compile output contract: create local outputs and validate them
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
## For agents without bundled skills
|
|
180
|
-
|
|
181
|
-
Read `AGENTS.md` first. Then read `workflow/use/query/SKILL.md` for manual questions or the relevant `workflow/compile/stages/<stage>/SKILL.md` when doing compile work. `interf.json` and `compile-plan.md` provide the config and execution plan.
|
|
182
|
-
|
|
183
|
-
To answer questions: start with `home.md`, follow wikilinks to local entities, claims, and indexes in `knowledge/`, then use `briefs/` and local `summaries/` for high-level entry points. If you need deeper evidence, follow links into knowledge-base summaries at `../../summaries/`, then raw files only when necessary.
|
|
184
|
-
Preserve the scaffold router and checklist. Do not replace this file with a shorter template that drops the manual access checklist, raw-source gate, or parent knowledge-base handoff.
|
|
185
|
-
If local docs are listed by the stage contract, read them before creating the interface. They may `extend` or `override` the bundled workflow instructions for later stages, but they do not bypass the stage contract.
|
|
186
|
-
Do not answer from the knowledge base until retrieval coverage is proved via `.interf/coverage.json` and `.interf/relevant.json`.
|
|
187
|
-
|
|
188
|
-
## Rules
|
|
189
|
-
|
|
190
|
-
- Do not modify anything in the knowledge base — it is read-only.
|
|
191
|
-
- All outputs are local to this interface.
|
|
192
|
-
- Follow prose-as-title: filenames are claims, not slugs.
|
|
193
|
-
- Follow wiki-link-as-prose: links read as sentences.
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
When updating `AGENTS.md`, edit the existing scaffold in place. Keep the manual access checklist, router guidance, and parent knowledge-base handoff sections. Only refine the interface-specific description and lines that need to reflect this use case.
|
|
197
|
-
|
|
198
|
-
**.gitignore:**
|
|
199
|
-
```
|
|
200
|
-
knowledge/
|
|
201
|
-
briefs/
|
|
202
|
-
summaries/
|
|
203
|
-
.interf/
|
|
204
|
-
```
|
|
205
|
-
Add any output directories from compile-plan.md.
|
|
206
|
-
|
|
207
|
-
**CLAUDE.md:**
|
|
208
|
-
- Generate it from the final `AGENTS.md` content so Claude Code picks up the same interface instructions automatically.
|
|
209
|
-
- Add a short header telling users to edit `AGENTS.md`, not `CLAUDE.md`.
|
|
210
|
-
|
|
211
|
-
**.interf/state.json:**
|
|
212
|
-
```json
|
|
213
|
-
{
|
|
214
|
-
"version": 1,
|
|
215
|
-
"retrieve_complete": false,
|
|
216
|
-
"analyze_complete": false,
|
|
217
|
-
"compile_complete": false,
|
|
218
|
-
"coverage_complete": false,
|
|
219
|
-
"frontmatter_scanned": 0,
|
|
220
|
-
"candidate_count": 0,
|
|
221
|
-
"abstracts_read": 0,
|
|
222
|
-
"expansion_passes": 0,
|
|
223
|
-
"relevant_count": 0,
|
|
224
|
-
"rejected_count": 0,
|
|
225
|
-
"delta_count": 0,
|
|
226
|
-
"delta_files": [],
|
|
227
|
-
"last_retrieve": null,
|
|
228
|
-
"last_analyze": null,
|
|
229
|
-
"last_compile": null,
|
|
230
|
-
"knowledge_base_summary_count_at_last_compile": 0,
|
|
231
|
-
"extracted_entities": 0,
|
|
232
|
-
"extracted_claims": 0,
|
|
233
|
-
"entity_count": 0,
|
|
234
|
-
"claim_count": 0,
|
|
235
|
-
"output_count": 0,
|
|
236
|
-
"warning_count": 0,
|
|
237
|
-
"error_count": 0
|
|
238
|
-
}
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
**home.md:**
|
|
242
|
-
```markdown
|
|
243
|
-
# {Name} — Home
|
|
244
|
-
|
|
245
|
-
Not yet compiled. Run `interf compile` to start interface compilation.
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### 7. Register
|
|
69
|
+
Once `compile-plan.md` is correct and the scaffold still validates:
|
|
249
70
|
|
|
250
|
-
|
|
71
|
+
1. update `interf.json` only if needed
|
|
72
|
+
2. update `AGENTS.md` only if needed
|
|
73
|
+
3. emit the required status lines
|
|
74
|
+
4. stop
|
|
251
75
|
|
|
252
|
-
|
|
76
|
+
Do not keep researching after the durable plan is written.
|
|
253
77
|
|
|
254
|
-
|
|
255
|
-
Done — interface "{name}" created at {path}
|
|
256
|
-
Connected to knowledge base "{knowledge-base-name}"
|
|
78
|
+
## Status contract
|
|
257
79
|
|
|
258
|
-
|
|
259
|
-
```
|
|
80
|
+
For automated runs, these canonical `STATUS:` lines are mandatory and must appear verbatim on their own lines:
|
|
260
81
|
|
|
261
|
-
|
|
82
|
+
- `STATUS: loaded interface creation contract.`
|
|
83
|
+
- `STATUS: analyzed knowledge-base.`
|
|
84
|
+
- `STATUS: wrote compile plan.`
|
|
262
85
|
|
|
263
|
-
|
|
264
|
-
|
|
86
|
+
You may emit `DONE: interface create complete.` as a final progress line, but the CLI validates completion from the scaffold files rather than trusting that line.
|
|
87
|
+
Additional `STATUS:` lines are allowed between them, but do not replace or rewrite these canonical markers.
|