System Map
Runtime flow
點左側情境切換 highlight。虛線箭頭代表資料/控制流,不代表自動啟用。
User
Start / continue work提出需求、修正偏好、review 結果。
Review in dashboardDismiss / Promote / Evolve / Materialize / Activate。
Claude Code
Tool + session activityBash、Read、Edit、Web 等工具事件與 session lifecycle。
Future behavior只讀 explicit activated surface,不讀 pending/draft。
Hooks / Collector
Observe hooksPreToolUse / PostToolUse / Stop / PreCompact / SessionStart。
Allowlist + redaction每個 tool 有可存欄位;統一 scrub secrets。
Nudge onlySessionStart 顯示「有 candidates 待 review」,不 auto-load。
Local Stores
Observation storebounded tool facts:tool、phase、outcome、sanitized command/path。
Session / diary storebounded summaries、diary、reflect、recall notes。
Candidate queue
CandidateV1 JSONL;status=pending by default。Draft artifactsMaterialized but inactive review files。
Curator / Validator
Curator daemon reads evidence讀 observations + diaries + recall,不讀 quarantined backlog。
LLM distillation頻率只是 signal;LLM 產出 proposed candidate。
Deterministic validatorschema validate、redact、dedupe、atomic append。
Dashboard
Candidate review顯示 summary、scope、evidence_quality、safe evidence view。
Control plane actionsDismiss / Promote / Evolve / Approve / Materialize / Activate。
Active Behavior Surface
Active skill
skills/<name>/SKILL.md 可影響未來 Claude 行為。CLAUDE.md draft patch仍是 manual apply;不是 dashboard 自動改 repo policy。
Scenario Timeline
Scenario
Boundaries
這個情境要守住的規則
Data Ledger
何時存檔、存了哪些內容、不存什麼
這是流程正確性的主表;之後 implementation plan 應該讓測試對齊這張表。
| 時機 | 存檔位置 / 平面 | 允許存的內容 | 明確不存 / 不暴露 | 誰會讀 |
|---|---|---|---|---|
| PreToolUse / PostToolUse | Observation plane | tool、phase、session/project id、outcome、sanitized command/path metadata、byte count | raw env dump、secret、Skill args、Edit/Write full body、PostToolUse raw body | Curator daemon;dashboard 只看 safe summary |
| Stop / PreCompact | Transcript / diary plane | bounded session summary、intent/outcome、diary draft、reflect-ready signal | full raw transcript by default;debug-only transcript 不進 dashboard wire model | Curator daemon;/reflect;dashboard safe evidence |
| Daemon analysis run | Candidate plane | CandidateV1:artifact_type、name、summary、body、scope、evidence、evidence_quality、status=pending | active instinct write、schema-less JSONL、template/statistical production candidate | Dashboard、CLI inspection、materializer |
| Dashboard Materialize | Draft plane | inactive draft skill / command / claude_md_addition for review | automatic behavior change | User reviewer;dashboard activation flow |
| Dashboard Activate | Active behavior plane | reviewed active skill or explicitly approved behavior surface | direct global activation;automatic CLAUDE.md mutation | Future Claude Code sessions |
| 3.1 fresh-start | Quarantine archive | old experimental observations/candidates moved outside normal reader globs, chmod restrictive | compat migration、normal daemon reads、dashboard exposure | None by default |
Candidate Lifecycle
Dashboard-gated 狀態流
只有最後一格是 behavior-changing。Promote / Evolve / Materialize 都不是 activate。
PendingValidator append CandidateV1。預設完全不影響 Claude。
Dismiss / PromoteDismiss 結束;Promote 只產生 global pending candidate。
Evolve選定 instincts,由 LLM 產生更高階 skill candidate。
Approve使用者同意值得 draft,但仍不改行為。
Materialize寫 inactive draft artifact,供人工 review。
Activate明確啟用後才進 active behavior surface。
Design Principles
流程圖應該補上的幾個漏項
1. Nudge ≠ Load
SessionStart 可以提醒「有候選項待 review」,但不能把 instinct/candidate 注入 Claude context。
2. Candidate ≠ Behavior
Candidate queue 是 review backlog,不是設定檔、skill、或 active memory。
3. Materialize ≠ Activate
寫出 draft artifact 只是讓使用者看得到檔案;沒有 explicit activate 就不生效。
4. Quarantine first
舊 experimental backlog 不 migration;要移出 normal reader globs,避免污染 3.1。