feat: remove active knowledge support

This commit is contained in:
2026-07-16 07:30:00 +09:00
parent f2106407be
commit f786e01997
54 changed files with 197 additions and 1591 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ It is not a dumping ground for external research, old plans, API inventories, or
5. [`design/tool-permissions-scope.md`](design/tool-permissions-scope.md) — tool policy and filesystem scope.
6. [`design/plugin-packages.md`](design/plugin-packages.md) — plugin package distribution, discovery, and enablement boundaries.
7. [`development/plugin-development.md`](development/plugin-development.md) — how to build, package, enable, and inspect Yoi Plugins.
8. [`design/memory-knowledge.md`](design/memory-knowledge.md) — generated memory, Knowledge, and audit records.
8. [`design/memory-knowledge.md`](design/memory-knowledge.md) — generated memory and audit records.
9. [`design/workspace-kanban-orchestrator-runtime.md`](design/workspace-kanban-orchestrator-runtime.md) — how Kanban operations become durable orchestration events and backend-internal routing decisions.
10. [`development/work-items.md`](development/work-items.md) — how project work is recorded and reviewed.
11. [`development/validation.md`](development/validation.md) — how to check changes.
+9 -32
View File
@@ -1,38 +1,15 @@
# Memory and Knowledge
# Generated memory records
Yoi memory is generated context, not project authority.
Yoi keeps generated memory under `.yoi/memory/` for durable, low-volume context:
The authoritative record for work is still code, git history, work item files, tickets, session logs, and explicit user instruction. Memory helps the agent retrieve durable preferences and prior rationale, but it must not replace the records that made those facts true.
- `summary.md` is optional resident context.
- `decisions/*.md` capture durable decisions and rationale.
- `requests/*.md` capture durable user preferences or standing requests.
## Record types
Memory records are not workspace record authority for exact implementation state. Use tickets, objectives, repository files, git history, and session logs for exact current facts.
- `summary.md` is resident background context for normal Workers.
- `decisions/` stores durable decisions that are useful across turns.
- `requests/` stores durable user requests and preferences.
- `.yoi/knowledge/` stores curated Knowledge records when available.
- `_logs/` stores append-only audit observations.
- `_staging/` is generated candidate state before consolidation.
## Historical Knowledge records
Generated `.yoi/memory` is personal/generated state in this repository. Curated workflow/Knowledge assets may be tracked separately when intended.
Older workspaces may contain `.yoi/knowledge/`. Knowledge is no longer an active supported feature or workspace record authority. Current memory tooling ignores it; archive or inspect those files manually if needed.
## What memory should not do
Memory should not duplicate authoritative project records. Do not copy ticket threads, TODO lists, implementation reports, or full docs into memory merely to make them resident.
The useful memory is the small part that changes future behavior: a policy, a rationale, a user preference, or a durable conclusion that would otherwise be hard to find.
## Lookup policy
Agents should use memory and Knowledge when the request depends on prior decisions, historical rationale, project workflow, or durable preferences.
Agents should not query memory every turn. Local repository files, current user instructions, command output, and tickets are more authoritative for exact current state.
## Audit and mutation
Memory extraction/consolidation writes append-only observations under `_logs`. No-op and idle notices belong there rather than in user-facing UI.
Memory mutation should be explicit work or part of the configured memory maintenance path. Casual edits during unrelated tasks make memory harder to trust.
## Language
Memory follows configured memory language policy. Conversation prose follows the user's language unless configured otherwise.
Future Agent Skills are intentionally separate and are not implemented by this design note.
+2 -2
View File
@@ -232,7 +232,7 @@ permission = "write"
# ===== [memory] =============================================================
# Memory subsystem の opt-in。
# - セクションが *ある* … memory tools (MemoryRead/Write/Edit) を登録、
# `<workspace>/memory/` と `<workspace>/knowledge/`
# `<workspace>/memory/` と `<workspace>/`
# の通常 write を Worker 自体に対して deny する。
# - セクションが *無い* … 何も起きない (legacy 動作)。
# `[memory]` だけ書いて中身を省略するのも有効 (全フィールド既定値で有効化)。
@@ -243,7 +243,7 @@ permission = "write"
# workspace_root = "/abs/path/to/workspace"
#
# # 任意。デフォルト: tool 側既定 = 20。
# # MemoryQuery / KnowledgeQuery が 1 回に返す最大件数。
# # MemoryQuery / MemoryQuery が 1 回に返す最大件数。
# query_result_limit = 20
#
# # 任意。デフォルト: tool 側既定 = 3。
+10 -10
View File
@@ -19,12 +19,12 @@
## 現在のテストがよくカバーしていること
- crate の責務に沿った主要な pure / filesystem-local invariants はかなり広く押さえられている。
- `.yoi/memory` / `.yoi/knowledge` の path classification、opaque subtree (`_staging`, `_usage`, `_logs`) の除外、invalid slug / nested path reject。
- `.yoi/memory` / `.yoi` の path classification、opaque subtree (`_staging`, `_usage`, `_logs`) の除外、invalid slug / nested path reject。
- workspace root resolution で `.yoi` project records だけを memory marker と見なさない挙動。
- linter の frontmatter 必須 field、`replaced_by` の存在確認・self reference、body size、Knowledge `model_invokation` description cap、same slug create reject、similar slug warning。
- `MemoryRead` / `MemoryWrite` / `MemoryEdit` / `MemoryDelete` / `MemoryQuery` / `KnowledgeQuery` の基本成功・基本失敗・slug rule・workflow kind 非公開。
- query の list/search、case-insensitive search、excerpt context、result limit、Knowledge kind filter、frontmatter search、query が usage event を増やさないこと。
- resident summary / resident knowledge collection の missing/malformed/empty/並び順/`model_invokation` filter。
- linter の frontmatter 必須 field、`replaced_by` の存在確認・self reference、body size、`resident-injection` description cap、same slug create reject、similar slug warning。
- `MemoryRead` / `MemoryWrite` / `MemoryEdit` / `MemoryDelete` / `MemoryQuery` / `MemoryQuery` の基本成功・基本失敗・slug rule・workflow kind 非公開。
- query の list/search、case-insensitive search、excerpt context、result limit、kind filter、frontmatter search、query が usage event を増やさないこと。
- resident summary / の missing/malformed/empty/並び順/`resident-injection` filter。
- extract staging, extract pointer fold, extract input rendering で tool result content や reasoning を落とすこと。
- consolidation staging list, invalid staging count, lock acquire/release/stale handling, tidy hints, consolidate prompt sections。
- usage event aggregation で explicit use と resident exposure を分けること。
@@ -37,12 +37,12 @@
- extract payload → staging → consolidation input → memory tools write/edit/delete → audit/usage までの一連の流れは、個別部品ごとにはあるが、run-level の不変条件としては検証されていない。
- Pod / Worker 経由の real tool registry や permission scope との接続はこの crate 単体ではほぼ未検証。
- linter の網羅性に穴がある。
- `InvalidStatus`、unknown/extra frontmatter fields、malformed date、`sources` / `last_sources` の shape、request / knowledge / summary の必須 field failure が体系的には確認されていない。
- `InvalidStatus`、unknown/extra frontmatter fields、malformed date、`sources` / `last_sources` の shape、request / summary の必須 field failure が体系的には確認されていない。
- `replaced_by` cycle detection の実シナリオは弱い。`references.rs` の test は unknown reference で 1 error になる smoke に近く、既存 A→B / B→A のような cycle report を明確には固定していない。
- `LowImportanceLargeRecord``SourcesOverflow` warning は tidy 側では一部見ているが、linter warning と tool output/audit への伝播としては薄い。
- tool の edge case が不足している。
- `MemoryRead``offset` / `limit` / truncation summary、limit=0 の `.max(1)` 挙動、空ファイル・末尾改行なしの line numbering が未検証。
- `MemoryEdit``replace_all`, duplicate old_string reject, old_string empty, identical replacement, non-UTF-8 file, summary/knowledge edit path が未検証。
- `MemoryEdit``replace_all`, duplicate old_string reject, old_string empty, identical replacement, non-UTF-8 file, summary edit path が未検証。
- `MemoryWrite` の invalid slug、summary with slug、Knowledge/Request 作成、write success audit contents、warning summary/audit reason が未検証。
- `MemoryDelete` は成功 path のみで、missing file、summary slug forbidden、invalid slug、workflow kind reject、audit failure record が未検証。
- 誤解を招く / 弱い test がある。
@@ -51,7 +51,7 @@
- filesystem failure / concurrency はほぼ未検証。
- write/edit/delete の permission error、directory/file collision、partial write、外部同時変更は現状未カバー。
- consolidation lock は live pid / stale pid / cleanup は見ているが、corrupt lock overwrite や `release_only` は明示テストがない。
- query / resident の malformed handling はある程度あるが、KnowledgeQuery の kind filter 時に malformed frontmatter を skip する仕様、malformed でも query だけなら body hit できる仕様は直接の regression test があるとよい。
- query / resident の malformed handling はある程度あるが、MemoryQuery の kind filter 時に malformed frontmatter を skip する仕様、malformed でも query だけなら body hit できる仕様は直接の regression test があるとよい。
- schema strictness が仕様なら危険。
- `frontmatter::deserialize_strict` という名前だが、schema structs 側に `deny_unknown_fields` が見当たらず、unknown field reject の test もない。extra field を許す設計なら問題ないが、「strict」を期待するならテスト・実装とも不足。
@@ -63,8 +63,8 @@
- `MemoryRead``offset` / `limit` / truncation / limit=0 を追加。
- `MemoryDelete` の missing file・summary slug forbidden・invalid slug・workflow kind reject を追加。
- 中優先度:
- linter の invalid status、malformed timestamps、request/knowledge/summary の必須 field、Knowledge `last_sources` malformed、warning propagation を追加。
- KnowledgeQuery の malformed frontmatter behavior: kind filter では skip、query-only では body match 可能、という仕様を固定。
- linter の invalid status、malformed timestamps、request/summary の必須 field、`last_sources` malformed、warning propagation を追加。
- MemoryQuery の malformed frontmatter behavior: kind filter では skip、query-only では body match 可能、という仕様を固定。
- write/edit/delete/read の audit log JSON を success/failure それぞれで軽く確認する。
- consolidation lock の corrupt lock overwrite と `release_only` の staging preservation を追加。
- 低〜中優先度:
+1 -1
View File
@@ -40,7 +40,7 @@
- running 中の submit queueing
- rollback 時の入力復元
- input history persistence
- file / knowledge completion
- file completion
- typed `Segment` の保持
- context usage 表示
- live system item / task snapshot の反映