@interf/compiler 0.2.4 → 0.3.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 +194 -148
- package/dist/commands/benchmark.d.ts.map +1 -1
- package/dist/commands/benchmark.js +60 -351
- package/dist/commands/benchmark.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +43 -110
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/create-workflow-wizard.d.ts +4 -25
- package/dist/commands/create-workflow-wizard.d.ts.map +1 -1
- package/dist/commands/create-workflow-wizard.js +29 -214
- package/dist/commands/create-workflow-wizard.js.map +1 -1
- package/dist/commands/create.d.ts +2 -11
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +72 -455
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/default.d.ts.map +1 -1
- package/dist/commands/default.js +16 -28
- package/dist/commands/default.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +71 -337
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +12 -22
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/reset.d.ts.map +1 -1
- package/dist/commands/reset.js +27 -124
- package/dist/commands/reset.js.map +1 -1
- package/dist/commands/source-config-wizard.d.ts +13 -6
- package/dist/commands/source-config-wizard.d.ts.map +1 -1
- package/dist/commands/source-config-wizard.js +93 -59
- package/dist/commands/source-config-wizard.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +60 -56
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +59 -98
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-constants.js +1 -1
- package/dist/lib/agent-constants.js.map +1 -1
- package/dist/lib/benchmark-execution.d.ts.map +1 -1
- package/dist/lib/benchmark-execution.js +7 -16
- package/dist/lib/benchmark-execution.js.map +1 -1
- package/dist/lib/benchmark-targets.d.ts +3 -4
- package/dist/lib/benchmark-targets.d.ts.map +1 -1
- package/dist/lib/benchmark-targets.js +9 -55
- package/dist/lib/benchmark-targets.js.map +1 -1
- package/dist/lib/benchmark-types.d.ts +2 -3
- package/dist/lib/benchmark-types.d.ts.map +1 -1
- package/dist/lib/benchmark.d.ts +1 -1
- package/dist/lib/benchmark.d.ts.map +1 -1
- package/dist/lib/benchmark.js +1 -1
- package/dist/lib/benchmark.js.map +1 -1
- package/dist/lib/config.d.ts +1 -2
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +2 -4
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/discovery.d.ts +1 -1
- package/dist/lib/discovery.d.ts.map +1 -1
- package/dist/lib/discovery.js +7 -2
- package/dist/lib/discovery.js.map +1 -1
- package/dist/lib/eval-packs.d.ts +6 -52
- package/dist/lib/eval-packs.d.ts.map +1 -1
- package/dist/lib/eval-packs.js +11 -39
- package/dist/lib/eval-packs.js.map +1 -1
- package/dist/lib/interf-bootstrap.d.ts +3 -5
- package/dist/lib/interf-bootstrap.d.ts.map +1 -1
- package/dist/lib/interf-bootstrap.js +10 -57
- package/dist/lib/interf-bootstrap.js.map +1 -1
- package/dist/lib/interf-detect.d.ts +13 -11
- package/dist/lib/interf-detect.d.ts.map +1 -1
- package/dist/lib/interf-detect.js +59 -45
- package/dist/lib/interf-detect.js.map +1 -1
- package/dist/lib/interf-scaffold.d.ts +2 -5
- package/dist/lib/interf-scaffold.d.ts.map +1 -1
- package/dist/lib/interf-scaffold.js +98 -235
- package/dist/lib/interf-scaffold.js.map +1 -1
- package/dist/lib/interf-workflow-package.d.ts +1 -2
- package/dist/lib/interf-workflow-package.d.ts.map +1 -1
- package/dist/lib/interf-workflow-package.js +94 -90
- package/dist/lib/interf-workflow-package.js.map +1 -1
- package/dist/lib/interf.d.ts +4 -5
- package/dist/lib/interf.d.ts.map +1 -1
- package/dist/lib/interf.js +3 -6
- package/dist/lib/interf.js.map +1 -1
- package/dist/lib/local-workflows.d.ts +9 -8
- package/dist/lib/local-workflows.d.ts.map +1 -1
- package/dist/lib/local-workflows.js +42 -94
- package/dist/lib/local-workflows.js.map +1 -1
- package/dist/lib/obsidian.d.ts +1 -5
- package/dist/lib/obsidian.d.ts.map +1 -1
- package/dist/lib/obsidian.js +11 -165
- package/dist/lib/obsidian.js.map +1 -1
- package/dist/lib/registry.d.ts +6 -17
- package/dist/lib/registry.d.ts.map +1 -1
- package/dist/lib/registry.js +36 -50
- package/dist/lib/registry.js.map +1 -1
- package/dist/lib/runtime-contracts.d.ts +2 -3
- package/dist/lib/runtime-contracts.d.ts.map +1 -1
- package/dist/lib/runtime-contracts.js +10 -9
- package/dist/lib/runtime-contracts.js.map +1 -1
- package/dist/lib/runtime-reconcile.d.ts +2 -5
- package/dist/lib/runtime-reconcile.d.ts.map +1 -1
- package/dist/lib/runtime-reconcile.js +23 -176
- package/dist/lib/runtime-reconcile.js.map +1 -1
- package/dist/lib/runtime-runs.d.ts.map +1 -1
- package/dist/lib/runtime-runs.js +52 -57
- package/dist/lib/runtime-runs.js.map +1 -1
- package/dist/lib/runtime-types.d.ts +5 -6
- package/dist/lib/runtime-types.d.ts.map +1 -1
- package/dist/lib/runtime.d.ts +2 -2
- package/dist/lib/runtime.d.ts.map +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/runtime.js.map +1 -1
- package/dist/lib/schema.d.ts +53 -312
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/schema.js +39 -206
- package/dist/lib/schema.js.map +1 -1
- package/dist/lib/source-config.d.ts +7 -7
- package/dist/lib/source-config.d.ts.map +1 -1
- package/dist/lib/source-config.js +55 -62
- package/dist/lib/source-config.js.map +1 -1
- package/dist/lib/state-artifacts.d.ts +5 -11
- package/dist/lib/state-artifacts.d.ts.map +1 -1
- package/dist/lib/state-artifacts.js +8 -18
- package/dist/lib/state-artifacts.js.map +1 -1
- package/dist/lib/state-health.d.ts +4 -8
- package/dist/lib/state-health.d.ts.map +1 -1
- package/dist/lib/state-health.js +27 -223
- package/dist/lib/state-health.js.map +1 -1
- package/dist/lib/state-io.d.ts +7 -12
- package/dist/lib/state-io.d.ts.map +1 -1
- package/dist/lib/state-io.js +26 -93
- package/dist/lib/state-io.js.map +1 -1
- package/dist/lib/state-view.d.ts +4 -6
- package/dist/lib/state-view.d.ts.map +1 -1
- package/dist/lib/state-view.js +62 -101
- package/dist/lib/state-view.js.map +1 -1
- package/dist/lib/state.d.ts +5 -5
- package/dist/lib/state.d.ts.map +1 -1
- package/dist/lib/state.js +4 -4
- package/dist/lib/state.js.map +1 -1
- package/dist/lib/summarize-plan.d.ts +2 -2
- package/dist/lib/summarize-plan.d.ts.map +1 -1
- package/dist/lib/summarize-plan.js +13 -13
- package/dist/lib/summarize-plan.js.map +1 -1
- package/dist/lib/{validate-kb.d.ts → validate-workspace.d.ts} +8 -8
- package/dist/lib/validate-workspace.d.ts.map +1 -0
- package/dist/lib/{validate-kb.js → validate-workspace.js} +44 -46
- package/dist/lib/validate-workspace.js.map +1 -0
- package/dist/lib/validate.d.ts +5 -7
- package/dist/lib/validate.d.ts.map +1 -1
- package/dist/lib/validate.js +6 -19
- package/dist/lib/validate.js.map +1 -1
- package/dist/lib/workflow-definitions.d.ts +14 -50
- package/dist/lib/workflow-definitions.d.ts.map +1 -1
- package/dist/lib/workflow-definitions.js +74 -349
- package/dist/lib/workflow-definitions.js.map +1 -1
- package/dist/lib/workflow-helpers.d.ts +3 -4
- package/dist/lib/workflow-helpers.d.ts.map +1 -1
- package/dist/lib/workflow-helpers.js +15 -49
- package/dist/lib/workflow-helpers.js.map +1 -1
- package/dist/lib/workflow-stage-runner.d.ts +1 -2
- package/dist/lib/workflow-stage-runner.d.ts.map +1 -1
- package/dist/lib/workflow-stage-runner.js +4 -6
- package/dist/lib/workflow-stage-runner.js.map +1 -1
- package/dist/lib/workflow-starter-docs.d.ts +3 -5
- package/dist/lib/workflow-starter-docs.d.ts.map +1 -1
- package/dist/lib/workflow-starter-docs.js +2 -17
- package/dist/lib/workflow-starter-docs.js.map +1 -1
- package/dist/lib/workflows.d.ts +9 -14
- package/dist/lib/workflows.d.ts.map +1 -1
- package/dist/lib/workflows.js +13 -30
- package/dist/lib/workflows.js.map +1 -1
- package/dist/lib/workspace-compile.d.ts +50 -0
- package/dist/lib/workspace-compile.d.ts.map +1 -0
- package/dist/lib/{workflows-kb.js → workspace-compile.js} +81 -89
- package/dist/lib/workspace-compile.js.map +1 -0
- package/package.json +9 -9
- package/skills/benchmark/SKILL.md +16 -24
- package/skills/workflow/create/SKILL.md +7 -14
- package/templates/workspace/README.md +23 -0
- package/templates/workspace/interfignore +2 -0
- package/dist/lib/bundled-templates.d.ts +0 -5
- package/dist/lib/bundled-templates.d.ts.map +0 -1
- package/dist/lib/bundled-templates.js +0 -23
- package/dist/lib/bundled-templates.js.map +0 -1
- package/dist/lib/interf-compile-plan.d.ts +0 -12
- package/dist/lib/interf-compile-plan.d.ts.map +0 -1
- package/dist/lib/interf-compile-plan.js +0 -143
- package/dist/lib/interf-compile-plan.js.map +0 -1
- package/dist/lib/validate-interface.d.ts +0 -79
- package/dist/lib/validate-interface.d.ts.map +0 -1
- package/dist/lib/validate-interface.js +0 -535
- package/dist/lib/validate-interface.js.map +0 -1
- package/dist/lib/validate-kb.d.ts.map +0 -1
- package/dist/lib/validate-kb.js.map +0 -1
- package/dist/lib/workflows-interface-contracts.d.ts +0 -24
- package/dist/lib/workflows-interface-contracts.d.ts.map +0 -1
- package/dist/lib/workflows-interface-contracts.js +0 -304
- package/dist/lib/workflows-interface-contracts.js.map +0 -1
- package/dist/lib/workflows-interface.d.ts +0 -72
- package/dist/lib/workflows-interface.d.ts.map +0 -1
- package/dist/lib/workflows-interface.js +0 -377
- package/dist/lib/workflows-interface.js.map +0 -1
- package/dist/lib/workflows-kb.d.ts +0 -50
- package/dist/lib/workflows-kb.d.ts.map +0 -1
- package/dist/lib/workflows-kb.js.map +0 -1
- package/skills/interface/analyze/SKILL.md +0 -191
- package/skills/interface/compile/SKILL.md +0 -152
- package/skills/interface/compile/references/output-format.md +0 -48
- package/skills/interface/create/SKILL.md +0 -87
- package/skills/interface/create/references/compile-plan-format.md +0 -109
- package/skills/interface/create/references/workflows.md +0 -35
- package/skills/interface/query/SKILL.md +0 -48
- package/skills/interface/retrieve/SKILL.md +0 -133
- package/skills/knowledge-base/compile/SKILL.md +0 -196
- package/skills/knowledge-base/compile/references/output-format.md +0 -48
- package/skills/knowledge-base/compile/references/stage-claims.md +0 -60
- package/skills/knowledge-base/compile/references/stage-entities.md +0 -46
- package/skills/knowledge-base/query/SKILL.md +0 -45
- package/skills/knowledge-base/summarize/SKILL.md +0 -152
- package/templates/interface/README.md +0 -159
- package/templates/interface/interfaces.md +0 -102
- package/templates/knowledge-base/README.md +0 -137
- package/templates/knowledge-base/interfignore +0 -19
- package/templates/knowledge-base/registry.md +0 -118
- package/templates/workflow-package/README.md +0 -16
- package/templates/workflow-package/create/SKILL.md +0 -8
- package/templates/workflow-package/interface-query/SKILL.md +0 -29
- package/templates/workflow-package/interface-stage/SKILL.md +0 -13
- package/templates/workflow-package/knowledge-base-query/SKILL.md +0 -36
- package/templates/workflow-package/knowledge-base-stage/SKILL.md +0 -13
- package/templates/workflow-starters/interface/interf/README.md +0 -13
- package/templates/workflow-starters/interface/interf/create/SKILL.md +0 -15
- package/templates/workflow-starters/knowledge-base/interf/README.md +0 -13
- package/templates/workflow-starters/knowledge-base/karpathy/README.md +0 -13
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
{
|
|
3
|
-
"name": "interface/query",
|
|
4
|
-
"description": "Manual-use skill for answering questions from inside an interface. Navigates AGENTS.md, home.md, local knowledge/briefs/summaries, parent knowledge-base summaries, backlinks, and raw sources only when reachable. Use when a user opens an agent inside an interface and asks questions against it."
|
|
5
|
-
}
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Interface Query
|
|
9
|
-
|
|
10
|
-
Use this skill in manual agent sessions inside a compiled interface.
|
|
11
|
-
|
|
12
|
-
Start with:
|
|
13
|
-
- `AGENTS.md`
|
|
14
|
-
- `home.md`
|
|
15
|
-
- local `knowledge/`
|
|
16
|
-
- `briefs/`
|
|
17
|
-
- local `summaries/`
|
|
18
|
-
|
|
19
|
-
Default loop:
|
|
20
|
-
- answer from local interface outputs first
|
|
21
|
-
- follow wikilinks and backlinks outward before treating one note as complete
|
|
22
|
-
- climb to parent knowledge-base summaries in `../../summaries/` when you need stronger evidence
|
|
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
|
|
27
|
-
|
|
28
|
-
Raw-source gate:
|
|
29
|
-
- inspect `../../.interf/source-access.json`
|
|
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
|
|
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
|
|
43
|
-
|
|
44
|
-
When confidence is low:
|
|
45
|
-
- expand outward through linked briefs, claims, entities, and parent summaries
|
|
46
|
-
- do not stop at the first local note if linked evidence exists above it
|
|
47
|
-
|
|
48
|
-
This skill is for manual question-answering behavior. It does not change retrieve, analyze, or compile runtime contracts.
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
{
|
|
3
|
-
"name": "interface/retrieve",
|
|
4
|
-
"description": "Interface retrieval contract. Identifies relevant files from the connected knowledge base. Scans knowledge-base summaries metadata, applies filters from compile-plan.md, computes delta since last compile. Use when asked to retrieve from the knowledge base, find relevant files, or run a retrieval stage inside interface compile."
|
|
5
|
-
}
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Interface Compile — Retrieve
|
|
9
|
-
|
|
10
|
-
Read `interf.json` (must have `type: interface`) and `compile-plan.md` for filter criteria.
|
|
11
|
-
|
|
12
|
-
Local runtime reference:
|
|
13
|
-
- active stage contract: `.interf/stage-contract.json`
|
|
14
|
-
- active run ledger: `.interf/run.json`
|
|
15
|
-
- local config: `interf.json`
|
|
16
|
-
- local plan: `compile-plan.md`
|
|
17
|
-
- local instruction docs: the files listed by `.interf/stage-contract.json`
|
|
18
|
-
|
|
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
|
-
|
|
21
|
-
This skill identifies which files in the knowledge base are relevant to this interface and which are new since last compile.
|
|
22
|
-
|
|
23
|
-
Retrieve is coverage-gated. The goal is not to guess a relevant set quickly. The goal is to prove that the routing layer scanned the full summary set, reviewed the candidate abstracts, and persisted both selected and rejected files before analysis begins.
|
|
24
|
-
The runtime in `compile-plan.md` is an initial hypothesis. Retrieve may discover missing entities, categories, or relationship clusters that should shape later interface refinement.
|
|
25
|
-
|
|
26
|
-
Important proof semantics:
|
|
27
|
-
- `proof.scanned` is the full summary set scanned at the frontmatter-routing layer
|
|
28
|
-
- `proof.reviewed` is the narrower candidate set whose abstracts were reviewed
|
|
29
|
-
- `proof.retrieved` plus `proof.excluded` should partition the scanned summary set
|
|
30
|
-
|
|
31
|
-
The knowledge base is located at `knowledge_base.path` from `interf.json` (typically `../..`). Knowledge-base summaries are at `{knowledge_base.path}/summaries/`.
|
|
32
|
-
If a coding agent is sandboxed to its current working tree, prefer launching it from the source folder or another root that can reach both the knowledge base and the source folder.
|
|
33
|
-
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.
|
|
34
|
-
If local docs are listed by the stage contract, read them before retrieving. They may `extend` or `override` the bundled workflow instructions for this stage, but they do not bypass coverage proof or the stage contract.
|
|
35
|
-
|
|
36
|
-
Harness role:
|
|
37
|
-
- This skill is an internal harness step normally invoked by `interf compile` from inside an interface.
|
|
38
|
-
- For standard operation, prefer the CLI or another higher-level tool over calling this skill directly.
|
|
39
|
-
|
|
40
|
-
## Runtime contract
|
|
41
|
-
|
|
42
|
-
When invoked by the CLI, honor any explicit execution instructions in the prompt. In particular:
|
|
43
|
-
- if `.interf/stage-contract.json` exists, treat it as the authoritative stage contract for this run
|
|
44
|
-
- if the prompt gives an expected summary-set size, use it as the source of truth for progress reporting
|
|
45
|
-
- if the prompt requires `.interf/relevant.json`, write it
|
|
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
|
|
50
|
-
|
|
51
|
-
## Steps
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
Retrieve:
|
|
55
|
-
- [ ] 1. Read config and plan
|
|
56
|
-
- [ ] 2. Scan knowledge-base frontmatter
|
|
57
|
-
- [ ] 3. Review candidate abstracts
|
|
58
|
-
- [ ] 4. Expand through links if needed
|
|
59
|
-
- [ ] 5. Compute delta
|
|
60
|
-
- [ ] 6. Write retrieval proof
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### 1. Read config and plan
|
|
64
|
-
|
|
65
|
-
- `interf.json` → `knowledge_base.path` to locate the knowledge base
|
|
66
|
-
- `compile-plan.md` → this stage's section: categories, priority evidence tiers, truth modes, key entities, date range
|
|
67
|
-
- if the plan depends on exact figures from PDFs, charts, or tables, keep that modality requirement visible during retrieval
|
|
68
|
-
- `../../.interf/source-access.json` → sample raw paths and suggested access checks when raw fallback is needed
|
|
69
|
-
- local instruction docs listed by the stage contract
|
|
70
|
-
|
|
71
|
-
Resolve `knowledge_base.path` from config and verify the knowledge base exists (has `summaries/`).
|
|
72
|
-
|
|
73
|
-
### 2. Scan knowledge-base frontmatter
|
|
74
|
-
|
|
75
|
-
Read all files in `{knowledge_base.path}/summaries/` frontmatter (fast — no full file reads):
|
|
76
|
-
- source
|
|
77
|
-
- source_kind
|
|
78
|
-
- evidence tier / truth mode / state
|
|
79
|
-
- abstract
|
|
80
|
-
|
|
81
|
-
Build a summary-set map: total files, source-kind distribution, evidence distribution.
|
|
82
|
-
|
|
83
|
-
### 3. Review candidate abstracts
|
|
84
|
-
|
|
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.
|
|
87
|
-
|
|
88
|
-
### 4. Expand through links if needed
|
|
89
|
-
|
|
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.
|
|
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.
|
|
94
|
-
|
|
95
|
-
### 5. Compute delta
|
|
96
|
-
|
|
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.
|
|
99
|
-
|
|
100
|
-
### 6. Write retrieval proof
|
|
101
|
-
|
|
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
|
|
107
|
-
|
|
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.
|
|
110
|
-
|
|
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
|
|
118
|
-
|
|
119
|
-
`proof.retrieved` plus `proof.excluded` must partition the scanned set for this run.
|
|
120
|
-
|
|
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.
|
|
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.
|
|
123
|
-
|
|
124
|
-
Report to user with status-style lines:
|
|
125
|
-
```
|
|
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
|
|
130
|
-
DONE: retrieve complete
|
|
131
|
-
```
|
|
132
|
-
|
|
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.
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
{
|
|
3
|
-
"name": "knowledge-base/compile",
|
|
4
|
-
"description": "Compile the cross-file knowledge layer from summaries in a knowledge base. Discovers entities, claims, relationships, and navigation outputs. Builds knowledge/ and home.md layers. Use when asked to compile a knowledge base, build graph, update knowledge, or connect the dots."
|
|
5
|
-
}
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Compile Knowledge Base
|
|
9
|
-
|
|
10
|
-
Read `interf.json` for the config. Must have `type: knowledge-base`.
|
|
11
|
-
|
|
12
|
-
Local runtime reference:
|
|
13
|
-
- active stage contract: `.interf/stage-contract.json`
|
|
14
|
-
- active run ledger: `.interf/run.json`
|
|
15
|
-
- local config: `interf.json`
|
|
16
|
-
- local instruction docs: the files listed by `.interf/stage-contract.json`
|
|
17
|
-
|
|
18
|
-
When this skill is embedded into a generated knowledge base, 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.
|
|
19
|
-
|
|
20
|
-
This skill builds the cross-file intelligence layer from existing summaries. This is the knowledge-layer contract for a knowledge base. For per-file evidence generation, use the bundled file-evidence stage first.
|
|
21
|
-
If local docs are listed by the stage contract, read them before compiling. They may `extend` or `override` the bundled workflow instructions for this stage, but they do not bypass the stage contract.
|
|
22
|
-
|
|
23
|
-
Harness role:
|
|
24
|
-
- This skill is an internal harness step normally invoked by `interf compile`.
|
|
25
|
-
- For standard operation, prefer the CLI or another higher-level tool over calling this skill directly.
|
|
26
|
-
|
|
27
|
-
## CLI status contract
|
|
28
|
-
|
|
29
|
-
When this skill is launched by the Interf CLI, do not narrate intent or planning. Only emit user-visible updates that begin with `STATUS:`, `DONE:`, `BLOCKED:`, or `ERROR:`.
|
|
30
|
-
|
|
31
|
-
If `.interf/stage-contract.json` exists, treat it as the authoritative stage contract for this run. It defines required artifacts, counts, and execution notes. Follow it instead of improvising a different workflow.
|
|
32
|
-
|
|
33
|
-
Use this sequence:
|
|
34
|
-
- `STATUS: loaded compile plan N summary files`
|
|
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
|
-
|
|
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.
|
|
42
|
-
|
|
43
|
-
## Prerequisites check
|
|
44
|
-
|
|
45
|
-
Read the stage contract, inventory, and summaries.
|
|
46
|
-
|
|
47
|
-
- If `summaries/` is missing or empty: "File-evidence stage not ready yet." Stop.
|
|
48
|
-
- Otherwise: proceed.
|
|
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
|
-
|
|
62
|
-
## Execution checklist
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
Knowledge-base compile:
|
|
66
|
-
- [ ] 1. Read interf.json
|
|
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
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### 1. Read interf.json + local stage docs
|
|
74
|
-
|
|
75
|
-
Read `interf.json` for knowledge-base identity and paths. Read `.interf/stage-contract.json` for the active stage contract. Then read any local docs listed by the contract. The summaries in `summaries/` have this structure:
|
|
76
|
-
|
|
77
|
-
- **Frontmatter fields**: source, source_kind, evidence_tier, truth_mode, state, abstract
|
|
78
|
-
- **Sections**: overview, key claims, references when needed
|
|
79
|
-
|
|
80
|
-
This is what you're working with. Every summary has:
|
|
81
|
-
- `source` → the exact source file path
|
|
82
|
-
- `source_kind`, `evidence_tier`, `truth_mode`, `state` → use these to weight evidence and avoid flattening weak material into strong claims
|
|
83
|
-
- `abstract` → quick routing summary for inventory and interface retrieve
|
|
84
|
-
- `overview` / `key claims` → source-grounded detail for deeper reads
|
|
85
|
-
|
|
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.
|
|
88
|
-
|
|
89
|
-
### 2. Scan summaries and create inventory
|
|
90
|
-
|
|
91
|
-
Scan ALL summaries/ frontmatter once. This step is deterministic and must complete before synthesis.
|
|
92
|
-
|
|
93
|
-
Write `.interf/inventory.json`:
|
|
94
|
-
|
|
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
|
|
104
|
-
|
|
105
|
-
Verify: `total` in inventory MUST equal the actual summaries/ file count. If not, stop.
|
|
106
|
-
|
|
107
|
-
Then read the summary overviews needed for synthesis:
|
|
108
|
-
|
|
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
|
|
112
|
-
|
|
113
|
-
Do not turn this into an open-ended archival pass. The compile stage should finish in one run for normal small knowledge bases.
|
|
114
|
-
|
|
115
|
-
### 3. Canonicalize entities, threads, and aliases
|
|
116
|
-
|
|
117
|
-
**Prerequisite:** inventory.json must cover all summaries, and the overview reads above must be complete for the working set.
|
|
118
|
-
|
|
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:
|
|
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)
|
|
122
|
-
- Resolve aliases to one canonical note
|
|
123
|
-
- Include: summary, evidence links, related entities, first/last seen
|
|
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.
|
|
126
|
-
|
|
127
|
-
### 4. Extract cross-file claims and relationships
|
|
128
|
-
|
|
129
|
-
**Prerequisite:** Same as entities.
|
|
130
|
-
|
|
131
|
-
Use inventory data plus deep reads to identify patterns across files. Create notes in knowledge/claims/ for cross-file observations:
|
|
132
|
-
- Must have 2+ supporting sources unless explicitly marked unresolved or exploratory
|
|
133
|
-
- Use prose-as-title: filename IS the claim
|
|
134
|
-
- Include: the claim, why it matters, evidence links, and a clear sense of evidence strength
|
|
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.
|
|
137
|
-
|
|
138
|
-
### 5. Build retrieval indexes and navigation
|
|
139
|
-
|
|
140
|
-
Create aggregate navigation in knowledge/indexes/:
|
|
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
|
|
144
|
-
- Link to canonical entities, high-signal summaries, and major claims
|
|
145
|
-
- Make the result useful for interface creation and retrieve, not just for human browsing
|
|
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.
|
|
149
|
-
|
|
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.
|
|
152
|
-
|
|
153
|
-
### 6. Runtime reconciliation
|
|
154
|
-
|
|
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.
|
|
157
|
-
|
|
158
|
-
### 7. Validate
|
|
159
|
-
|
|
160
|
-
- [ ] All output files exist and are non-empty
|
|
161
|
-
- [ ] Entity notes have evidence links
|
|
162
|
-
- [ ] Claims preserve evidence strength and do not overstate exploratory material
|
|
163
|
-
- [ ] No wikilinks to nonexistent files
|
|
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
|
|
166
|
-
|
|
167
|
-
## Graph quality rules
|
|
168
|
-
|
|
169
|
-
- Canonicalize aliases to one entity note
|
|
170
|
-
- Remove stale duplicates
|
|
171
|
-
- Repair broken wikilinks
|
|
172
|
-
- Prefer explicit wikilinks over vague prose
|
|
173
|
-
- Use properties for machine filtering, tags for Obsidian surfacing
|
|
174
|
-
- Prefer a small stable graph over speculative expansion
|
|
175
|
-
|
|
176
|
-
After compile, prefer running:
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
interf verify compile --json
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
If it fails, fix inventory/state/output consistency before treating the knowledge base as ready for interface creation or retrieval.
|
|
183
|
-
|
|
184
|
-
Report:
|
|
185
|
-
```
|
|
186
|
-
Step 2/2 complete — Knowledge-base compile
|
|
187
|
-
Entities: <entity_count>, Claims: <claim_count>
|
|
188
|
-
home.md updated.
|
|
189
|
-
```
|
|
190
|
-
|
|
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.
|
|
192
|
-
|
|
193
|
-
## What this skill does NOT do
|
|
194
|
-
|
|
195
|
-
- Does not generate per-file summaries (use `knowledge-base/summarize`)
|
|
196
|
-
- Does not work on interfaces (use `interface/retrieve` to start interface compile)
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Output Format Guide
|
|
2
|
-
|
|
3
|
-
All outputs are plain markdown. They work standalone for any agent and render well in Obsidian. Obsidian is supported but not required.
|
|
4
|
-
|
|
5
|
-
## Properties (JSON frontmatter)
|
|
6
|
-
|
|
7
|
-
Use Obsidian-compatible properties for filtering:
|
|
8
|
-
|
|
9
|
-
```md
|
|
10
|
-
---
|
|
11
|
-
{
|
|
12
|
-
"entity_type": "person",
|
|
13
|
-
"status": "active",
|
|
14
|
-
"confidence": "high",
|
|
15
|
-
"tags": ["type/entity", "entity/person"]
|
|
16
|
-
}
|
|
17
|
-
---
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Properties = machine filtering. Tags = human browsing.
|
|
21
|
-
|
|
22
|
-
## Wikilinks
|
|
23
|
-
|
|
24
|
-
Use `[[wikilinks]]` for all internal references. Never raw file paths.
|
|
25
|
-
|
|
26
|
-
## Wiki-link-as-prose
|
|
27
|
-
|
|
28
|
-
Links read as sentences:
|
|
29
|
-
> This note is where [[readiness assessment language first appears in the knowledge base]]
|
|
30
|
-
|
|
31
|
-
## home.md
|
|
32
|
-
|
|
33
|
-
Entry point. Links to key sections, current counts, last compile date. Update every compile.
|
|
34
|
-
|
|
35
|
-
## .base files
|
|
36
|
-
|
|
37
|
-
Optional Obsidian-specific JSON files for filterable table/card views. The knowledge base works without them.
|
|
38
|
-
|
|
39
|
-
## Graph optimization
|
|
40
|
-
|
|
41
|
-
- Wikilinks consistently (every link = edge)
|
|
42
|
-
- One canonical note per entity (no duplicates)
|
|
43
|
-
- Home.md and indexes as high-connectivity hubs
|
|
44
|
-
- Tags for color-coding in graph view
|
|
45
|
-
|
|
46
|
-
## Independence
|
|
47
|
-
|
|
48
|
-
Everything works without Obsidian. Wikilinks are `[[plain text]]`. Properties use JSON frontmatter. Tags are strings. Any agent can read the files directly.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Stage: Extract Claims
|
|
2
|
-
|
|
3
|
-
Create notes in knowledge/claims/ for cross-file observations backed by evidence.
|
|
4
|
-
|
|
5
|
-
## Process
|
|
6
|
-
|
|
7
|
-
1. Read summaries/ overviews looking for patterns that appear across 2+ files
|
|
8
|
-
2. Group related observations into claims
|
|
9
|
-
3. For each claim: create a note with evidence links
|
|
10
|
-
|
|
11
|
-
## What qualifies as a claim
|
|
12
|
-
|
|
13
|
-
- A pattern observed in 2+ sources
|
|
14
|
-
- A decision or pivot with supporting evidence
|
|
15
|
-
- A risk identified from multiple signals
|
|
16
|
-
- A relationship between entities backed by evidence
|
|
17
|
-
- A metric or milestone confirmed by locked/confirmed sources
|
|
18
|
-
|
|
19
|
-
Do NOT create claims from single observations unless marked as unresolved/hypothesis.
|
|
20
|
-
|
|
21
|
-
## Claim note format
|
|
22
|
-
|
|
23
|
-
Use prose-as-title: the filename IS the claim.
|
|
24
|
-
|
|
25
|
-
Example filename: `{subject} acts as {relationship} for {entity}.md`
|
|
26
|
-
|
|
27
|
-
```markdown
|
|
28
|
-
---
|
|
29
|
-
{
|
|
30
|
-
"claim_type": "pattern | decision | risk | milestone | relationship | metric",
|
|
31
|
-
"status": "active | historical | unresolved",
|
|
32
|
-
"evidence_count": "N",
|
|
33
|
-
"confidence": "high | medium | low",
|
|
34
|
-
"tags": ["type/claim", "claim/{claim_type}"]
|
|
35
|
-
}
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Claim
|
|
39
|
-
|
|
40
|
-
{The observation in one tight paragraph.}
|
|
41
|
-
|
|
42
|
-
## Why it matters
|
|
43
|
-
|
|
44
|
-
{Why this matters for future querying and decision-making.}
|
|
45
|
-
|
|
46
|
-
## Evidence
|
|
47
|
-
|
|
48
|
-
- [[{summary title}]]: {one-line evidence}
|
|
49
|
-
- [[{summary title}]]: {one-line evidence}
|
|
50
|
-
|
|
51
|
-
## Related
|
|
52
|
-
|
|
53
|
-
- [[{related entity or claim}]]
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Confidence levels
|
|
57
|
-
|
|
58
|
-
- **high**: 3+ locked/confirmed sources agree
|
|
59
|
-
- **medium**: 2+ sources, at least one confirmed
|
|
60
|
-
- **low**: 2+ draft sources, or sources partially conflict
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Stage: Discover Entities
|
|
2
|
-
|
|
3
|
-
Create canonical notes in knowledge/entities/ for recurring actors in the knowledge base.
|
|
4
|
-
|
|
5
|
-
## Process
|
|
6
|
-
|
|
7
|
-
1. Scan all summaries/ abstracts and frontmatter → build frequency map of recurring actors
|
|
8
|
-
2. Scan overviews for company names, product names, concepts
|
|
9
|
-
3. For each actor appearing 3+ times:
|
|
10
|
-
- Create a canonical entity note
|
|
11
|
-
- Resolve aliases (e.g., "{Short name}" and "{Full name}" -> one note)
|
|
12
|
-
- Link to all supporting summaries/ files via wikilinks
|
|
13
|
-
|
|
14
|
-
## Entity note format
|
|
15
|
-
|
|
16
|
-
```markdown
|
|
17
|
-
---
|
|
18
|
-
{
|
|
19
|
-
"entity_type": "person | company | product | concept",
|
|
20
|
-
"status": "active | historical",
|
|
21
|
-
"first_seen": "YYYY-MM-DD",
|
|
22
|
-
"last_seen": "YYYY-MM-DD",
|
|
23
|
-
"evidence_count": "N",
|
|
24
|
-
"tags": ["type/entity", "entity/{entity_type}"]
|
|
25
|
-
}
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Summary
|
|
29
|
-
|
|
30
|
-
{Who/what this is and why it matters. 2-3 sentences.}
|
|
31
|
-
|
|
32
|
-
## Evidence
|
|
33
|
-
|
|
34
|
-
- [[{summary title}]]: {one-line context}
|
|
35
|
-
|
|
36
|
-
## Related
|
|
37
|
-
|
|
38
|
-
- [[{related entity or claim}]]
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Alias resolution
|
|
42
|
-
|
|
43
|
-
When multiple names refer to the same actor:
|
|
44
|
-
- Pick the most complete name as canonical (e.g., "{Full Name}" not "{Nickname}")
|
|
45
|
-
- Mention aliases in the summary
|
|
46
|
-
- All evidence links point to the one canonical note
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
{
|
|
3
|
-
"name": "knowledge-base/query",
|
|
4
|
-
"description": "Manual-use skill for answering questions from inside a compiled knowledge base. Navigates AGENTS.md, home.md, knowledge/, summaries/, backlinks, and raw sources only when reachable. Use when a user opens an agent inside a knowledge base and asks questions against it."
|
|
5
|
-
}
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Knowledge Base Query
|
|
9
|
-
|
|
10
|
-
Use this skill in manual agent sessions inside a compiled knowledge base.
|
|
11
|
-
|
|
12
|
-
Start with:
|
|
13
|
-
- `AGENTS.md`
|
|
14
|
-
- `home.md`
|
|
15
|
-
- `knowledge/`
|
|
16
|
-
- `summaries/`
|
|
17
|
-
|
|
18
|
-
Default loop:
|
|
19
|
-
- use `knowledge/` indexes, entities, and claims first
|
|
20
|
-
- follow wikilinks and backlinks outward before treating one note as complete
|
|
21
|
-
- use `summaries/` for deeper evidence
|
|
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
|
|
24
|
-
|
|
25
|
-
Raw-source gate:
|
|
26
|
-
- inspect `.interf/source-access.json`
|
|
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
|
|
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
|
|
40
|
-
|
|
41
|
-
When confidence is low:
|
|
42
|
-
- expand outward through linked claims, entities, indexes, and summaries
|
|
43
|
-
- do not over-read a single summary title as final truth
|
|
44
|
-
|
|
45
|
-
This skill is for manual question-answering behavior. It does not change summarize or compile runtime contracts.
|