@falkenslab/agent-kit 0.17.0 → 0.18.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/assets/agent-help/SKILL.md +1 -1
- package/assets/knowledge-plugin/commands/ingest.md +1 -1
- package/assets/knowledge-plugin/skills/knowledge-ingest/SKILL.md +8 -3
- package/assets/knowledge-plugin/skills/knowledge-lint/SKILL.md +12 -5
- package/dist/core/agentSpec.d.ts +16 -16
- package/dist/core/fileKnowledgeStore.d.ts +1 -3
- package/dist/core/fileKnowledgeStore.js +23 -29
- package/dist/core/hooks/fileScopeGate.d.ts +17 -2
- package/dist/core/hooks/fileScopeGate.js +45 -10
- package/dist/core/knowledge.d.ts +20 -17
- package/dist/core/knowledge.js +32 -60
- package/dist/core/knowledgeStore.d.ts +4 -9
- package/dist/core/knowledgeStore.js +16 -2
- package/dist/core/language.js +1 -1
- package/dist/core/messages/de.js +1 -1
- package/dist/core/messages/en.js +1 -1
- package/dist/core/messages/es.js +1 -1
- package/dist/core/messages/fr.js +1 -1
- package/dist/core/session.d.ts +12 -0
- package/dist/core/session.js +88 -33
- package/dist/core/sources.d.ts +24 -31
- package/dist/core/sources.js +45 -108
- package/dist/core/tools/humanApproval.js +3 -3
- package/dist/core/tools/knowledgeTools.d.ts +6 -6
- package/dist/core/tools/knowledgeTools.js +18 -53
- package/dist/core/tools/saveToSources.d.ts +6 -2
- package/dist/core/tools/saveToSources.js +17 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/assets/knowledge-plugin-files/.claude-plugin/plugin.json +0 -4
- package/assets/knowledge-plugin-files/commands/ingest.md +0 -7
- package/assets/knowledge-plugin-files/commands/lint.md +0 -5
- package/assets/knowledge-plugin-files/commands/query.md +0 -5
- package/assets/knowledge-plugin-files/skills/knowledge-ingest/SKILL.md +0 -46
- package/assets/knowledge-plugin-files/skills/knowledge-lint/SKILL.md +0 -26
- package/assets/knowledge-plugin-files/skills/knowledge-pages/SKILL.md +0 -137
- package/assets/knowledge-plugin-files/skills/knowledge-query/SKILL.md +0 -14
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: knowledge-lint
|
|
3
|
-
description: Health-check the knowledge base - broken links, pages missing from index.md, orphan pages, one-way links, duplicated concepts, mentioned-but-missing concepts, contradictions, gaps - fix what's mechanical and report the rest.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Linting the knowledge base
|
|
7
|
-
|
|
8
|
-
A knowledge base maintained across sessions drifts: links break, pages go unlisted, the same concept appears under two names. Lint it when asked and after a large ingest. Load `knowledge-pages` first for the templates.
|
|
9
|
-
|
|
10
|
-
## Checks
|
|
11
|
-
|
|
12
|
-
Use `Glob` to list pages and `Grep` (always with `path` inside the knowledge base) to find links, instead of reading every page in full.
|
|
13
|
-
|
|
14
|
-
1. **Broken links**: a relative link whose target file doesn't exist. Fix it if the right target is obvious (a typo, a page under a close name); otherwise report it.
|
|
15
|
-
2. **Index**: every page is listed in `index.md` and every entry there points to an existing page. Fix it.
|
|
16
|
-
3. **Orphans**: pages nothing links to (`Grep` for the file name). Link them from where they belong, or report why they don't belong anywhere.
|
|
17
|
-
4. **One-way links**: a summary that feeds a concept which doesn't list it back... Add the missing side.
|
|
18
|
-
5. **Duplicates**: two pages for the same idea under different names. Merge the content into one, mark the other as superseded (never delete it) and repoint links.
|
|
19
|
-
6. **Missing pages**: terms that several pages treat as concepts or entities but have no page. Create them if the material is there; otherwise list them.
|
|
20
|
-
7. **Contradictions**: claims that disagree across pages without being recorded as such. Record both sides, attributed.
|
|
21
|
-
8. **Provenance**: claims with no traceable source. Add the link, or mark them as unsourced.
|
|
22
|
-
9. **Gaps**: originals `list_sources` reports as new (no summary yet), changed (their summary may be stale) or missing (deleted by hand: their summaries point nowhere), and concepts mentioned but never explained by any source. Report them - they are what to ingest, update or find next.
|
|
23
|
-
|
|
24
|
-
## Close
|
|
25
|
-
|
|
26
|
-
Append `## [date] lint | <summary>` to `log.md` listing what was fixed. Then report to the human: what you fixed, and what needs their decision or more material. Don't make judgement calls silently - merging pages that are only similar, or choosing between contradictory sources, goes in the report.
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: knowledge-pages
|
|
3
|
-
description: Exact templates and conventions for every page of the knowledge base (index, log, overview, summary, concept, entity and synthesis pages) - load it before creating a knowledge base page or restructuring one, so every page keeps the same shape and links.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Knowledge base page templates
|
|
7
|
-
|
|
8
|
-
The knowledge base's layout and rules are in the system prompt ("Knowledge base"). This skill only adds the exact shape of each page. Headings and frontmatter keys stay in English (they are structure); the text under them is in the human's language. Dates are `YYYY-MM-DD`. Links are relative markdown links (from `concepts/x.md`, a summary is `../summaries/y.md`; an original file is `../../sources/...`, adjusted to where the folders really are).
|
|
9
|
-
|
|
10
|
-
Every page starts with YAML frontmatter; `updated` changes whenever you edit the page.
|
|
11
|
-
|
|
12
|
-
## index.md
|
|
13
|
-
|
|
14
|
-
The catalog and entry point. One line per page, grouped by section: Summaries, Concepts, Entities, Syntheses (plus any section the domain adds).
|
|
15
|
-
|
|
16
|
-
```markdown
|
|
17
|
-
# Index
|
|
18
|
-
|
|
19
|
-
## Summaries
|
|
20
|
-
- [Q3 architecture review](summaries/q3-architecture-review.md) - decisions taken on the billing service
|
|
21
|
-
## Concepts
|
|
22
|
-
- [Idempotency](concepts/idempotency.md) - safe retries of a request
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## log.md
|
|
26
|
-
|
|
27
|
-
Append-only; never edit past entries. Newest at the bottom.
|
|
28
|
-
|
|
29
|
-
```markdown
|
|
30
|
-
## [2026-10-03] ingest | Q3 architecture review
|
|
31
|
-
- created: summaries/q3-architecture-review.md, concepts/idempotency.md
|
|
32
|
-
- updated: entities/billing-service.md, index.md
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## overview.md
|
|
36
|
-
|
|
37
|
-
A living synthesis of the whole knowledge base, rewritten (not appended) as understanding grows: what it covers, its main blocks and how they connect (with links), what is still unknown.
|
|
38
|
-
|
|
39
|
-
## Summary page (`summaries/<slug>.md`)
|
|
40
|
-
|
|
41
|
-
One per ingested source.
|
|
42
|
-
|
|
43
|
-
```markdown
|
|
44
|
-
---
|
|
45
|
-
type: summary
|
|
46
|
-
title: "<Title>"
|
|
47
|
-
file: <relative link to the original in sources/, if any>
|
|
48
|
-
url: <original URL, if any>
|
|
49
|
-
ingested: YYYY-MM-DD
|
|
50
|
-
updated: YYYY-MM-DD
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
# <Title>
|
|
54
|
-
|
|
55
|
-
## Summary
|
|
56
|
-
<Two to four paragraphs: what it actually says.>
|
|
57
|
-
|
|
58
|
-
## Key points
|
|
59
|
-
- Claims, definitions or figures likely to be needed later, quoted literally when exact wording matters.
|
|
60
|
-
|
|
61
|
-
## Pages it feeds
|
|
62
|
-
- [Concept or entity](../concepts/<slug>.md)
|
|
63
|
-
|
|
64
|
-
## New or surprising
|
|
65
|
-
- What this source adds to what the knowledge base already had.
|
|
66
|
-
|
|
67
|
-
## Contradictions
|
|
68
|
-
- Conflicts with other pages, linked.
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Concept page (`concepts/<slug>.md`)
|
|
72
|
-
|
|
73
|
-
One idea per page.
|
|
74
|
-
|
|
75
|
-
```markdown
|
|
76
|
-
---
|
|
77
|
-
type: concept
|
|
78
|
-
aliases: []
|
|
79
|
-
updated: YYYY-MM-DD
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
# <Concept>
|
|
83
|
-
|
|
84
|
-
<Definition in one or two sentences.>
|
|
85
|
-
|
|
86
|
-
## Explanation
|
|
87
|
-
<How it works, at the depth the sources give.>
|
|
88
|
-
|
|
89
|
-
## Connections
|
|
90
|
-
- Requires: [Concept](<slug>.md)
|
|
91
|
-
- Related: [Concept](<slug>.md) - how
|
|
92
|
-
|
|
93
|
-
## Sources
|
|
94
|
-
- [Summary](../summaries/<slug>.md) - what it says about this
|
|
95
|
-
|
|
96
|
-
## Contradictions and open questions
|
|
97
|
-
- "<Source A> says X; <source B> says Y" - both attributed.
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Entity page (`entities/<slug>.md`)
|
|
101
|
-
|
|
102
|
-
A concrete thing: a system, a component, an organization, a document, a person only when they are a public role rather than private individual details.
|
|
103
|
-
|
|
104
|
-
```markdown
|
|
105
|
-
---
|
|
106
|
-
type: entity
|
|
107
|
-
kind: <system | component | organization | document | other>
|
|
108
|
-
aliases: []
|
|
109
|
-
updated: YYYY-MM-DD
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
# <Name>
|
|
113
|
-
|
|
114
|
-
<What it is, one or two sentences.>
|
|
115
|
-
|
|
116
|
-
## Facts
|
|
117
|
-
- Attributed facts, each linking the summary or source it comes from.
|
|
118
|
-
|
|
119
|
-
## Connections
|
|
120
|
-
- [Concept or entity](../concepts/<slug>.md) - how
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Synthesis page (`syntheses/<slug>.md`)
|
|
124
|
-
|
|
125
|
-
An answer worth keeping: a comparison, an analysis, a report.
|
|
126
|
-
|
|
127
|
-
```markdown
|
|
128
|
-
---
|
|
129
|
-
type: synthesis
|
|
130
|
-
question: "<The question it answers>"
|
|
131
|
-
updated: YYYY-MM-DD
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
# <Title>
|
|
135
|
-
|
|
136
|
-
<The answer, with links to every page it draws on.>
|
|
137
|
-
```
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: knowledge-query
|
|
3
|
-
description: Answer a question from the knowledge base - find the relevant pages through the index, read them, answer with links to them, and file the answer back as a synthesis page when it is worth keeping.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Querying the knowledge base
|
|
7
|
-
|
|
8
|
-
The knowledge base exists so a question doesn't start from zero. Answer from it first; go back to the originals or the web only for what it doesn't hold.
|
|
9
|
-
|
|
10
|
-
1. **Start from the index.** Read `index.md`, pick the pages that can matter, read those (not the whole knowledge base). `Grep` inside the knowledge base for terms and aliases the index doesn't reveal.
|
|
11
|
-
2. **Answer from the pages**, linking each one you drew on. Say what comes from the knowledge base, what comes from an original in the sources folder (read it if the knowledge base is thin or contradictory) and what comes from outside (label it as such).
|
|
12
|
-
3. **Say what is missing.** If the knowledge base can't answer part of the question, say so and name the source that would fill it, instead of filling the gap from memory silently.
|
|
13
|
-
4. **File it back.** If the answer is a comparison, an analysis or a report that will be asked again, save it as `syntheses/<slug>.md` (template in `knowledge-pages`) with links to its inputs, add it to `index.md`, and log it: `## [date] query | <question>`. A quick factual answer needs no page.
|
|
14
|
-
5. **Feed the knowledge base.** If answering revealed a concept or fact that has no page, or a contradiction, fix that in the knowledge base too and log it.
|