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