wicked-brain 0.17.2 → 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.
Files changed (43) hide show
  1. package/README.md +22 -3
  2. package/install.mjs +29 -38
  3. package/package.json +1 -1
  4. package/server/package.json +1 -1
  5. package/skills/wicked-brain-configure/SKILL.md +6 -6
  6. package/skills/{wicked-brain-agent/agents/consolidate.md → wicked-brain-consolidate/SKILL.md} +74 -10
  7. package/skills/{wicked-brain-agent/agents/context.md → wicked-brain-context/SKILL.md} +64 -6
  8. package/skills/wicked-brain-forget/SKILL.md +1 -1
  9. package/skills/{wicked-brain-agent/agents/onboard.md → wicked-brain-onboard/SKILL.md} +87 -9
  10. package/skills/wicked-brain-review/SKILL.md +2 -2
  11. package/skills/{wicked-brain-agent/agents/session-teardown.md → wicked-brain-session-teardown/SKILL.md} +54 -5
  12. package/skills/wicked-brain-agent/SKILL.md +0 -95
  13. package/skills/wicked-brain-agent/platform/antigravity/wicked-brain-consolidate.md +0 -103
  14. package/skills/wicked-brain-agent/platform/antigravity/wicked-brain-context.md +0 -67
  15. package/skills/wicked-brain-agent/platform/antigravity/wicked-brain-onboard.md +0 -74
  16. package/skills/wicked-brain-agent/platform/antigravity/wicked-brain-session-teardown.md +0 -72
  17. package/skills/wicked-brain-agent/platform/claude/wicked-brain-consolidate.md +0 -106
  18. package/skills/wicked-brain-agent/platform/claude/wicked-brain-context.md +0 -70
  19. package/skills/wicked-brain-agent/platform/claude/wicked-brain-onboard.md +0 -100
  20. package/skills/wicked-brain-agent/platform/claude/wicked-brain-session-teardown.md +0 -75
  21. package/skills/wicked-brain-agent/platform/codex/wicked-brain-consolidate.toml +0 -104
  22. package/skills/wicked-brain-agent/platform/codex/wicked-brain-context.toml +0 -68
  23. package/skills/wicked-brain-agent/platform/codex/wicked-brain-onboard.toml +0 -75
  24. package/skills/wicked-brain-agent/platform/codex/wicked-brain-session-teardown.toml +0 -73
  25. package/skills/wicked-brain-agent/platform/copilot/wicked-brain-consolidate.agent.md +0 -105
  26. package/skills/wicked-brain-agent/platform/copilot/wicked-brain-context.agent.md +0 -69
  27. package/skills/wicked-brain-agent/platform/copilot/wicked-brain-onboard.agent.md +0 -76
  28. package/skills/wicked-brain-agent/platform/copilot/wicked-brain-session-teardown.agent.md +0 -74
  29. package/skills/wicked-brain-agent/platform/cursor/wicked-brain-consolidate.md +0 -104
  30. package/skills/wicked-brain-agent/platform/cursor/wicked-brain-context.md +0 -68
  31. package/skills/wicked-brain-agent/platform/cursor/wicked-brain-onboard.md +0 -75
  32. package/skills/wicked-brain-agent/platform/cursor/wicked-brain-session-teardown.md +0 -73
  33. package/skills/wicked-brain-agent/platform/gemini/wicked-brain-consolidate.md +0 -107
  34. package/skills/wicked-brain-agent/platform/gemini/wicked-brain-context.md +0 -71
  35. package/skills/wicked-brain-agent/platform/gemini/wicked-brain-onboard.md +0 -78
  36. package/skills/wicked-brain-agent/platform/gemini/wicked-brain-session-teardown.md +0 -76
  37. package/skills/wicked-brain-agent/platform/kiro/wicked-brain-consolidate.json +0 -17
  38. package/skills/wicked-brain-agent/platform/kiro/wicked-brain-context.json +0 -16
  39. package/skills/wicked-brain-agent/platform/kiro/wicked-brain-onboard.json +0 -17
  40. package/skills/wicked-brain-agent/platform/kiro/wicked-brain-session-teardown.json +0 -17
  41. /package/skills/{wicked-brain-agent → wicked-brain-context}/hooks/claude-hooks.json +0 -0
  42. /package/skills/{wicked-brain-agent → wicked-brain-context}/hooks/copilot-hooks.json +0 -0
  43. /package/skills/{wicked-brain-agent → wicked-brain-context}/hooks/gemini-hooks.json +0 -0
@@ -1,78 +0,0 @@
1
- ---
2
- name: wicked-brain-onboard
3
- description: Full project understanding — scan structure, trace architecture, extract conventions, ingest into brain, compile wiki article, configure CLI.
4
- tools: [shell, read, write, edit, glob, grep]
5
- model: gemini-3-flash-preview
6
- max_turns: 25
7
- ---
8
-
9
- You are an onboarding agent for the digital brain at {brain_path}.
10
- Server: http://localhost:{port}/api
11
- Project: {project_path}
12
-
13
- Your job: deeply understand a project and ingest that understanding into the brain.
14
-
15
- ### Step 1: Scan project structure
16
-
17
- Use Glob and Read tools to survey:
18
- - Root files: package.json, pyproject.toml, Cargo.toml, go.mod, Makefile, Dockerfile, etc.
19
- - Directory structure: `ls` the top-level and key subdirectories
20
- - Languages: identify primary and secondary languages from file extensions
21
- - Frameworks: identify from dependency files and imports
22
- - Config files: .env.example, CI/CD configs, deployment manifests
23
-
24
- Create a structured summary of what you found.
25
-
26
- ### Step 2: Trace architecture
27
-
28
- - Identify entry points (main files, server start, CLI entry)
29
- - Map module boundaries (directories, packages, namespaces)
30
- - Identify API surfaces (HTTP routes, CLI commands, exported functions)
31
- - Trace primary data flows (request -> handler -> storage -> response)
32
- - Note external dependencies and integrations
33
-
34
- ### Step 3: Extract conventions
35
-
36
- - **Naming**: file naming, function naming, variable naming patterns
37
- - **Testing**: test framework, test file locations, test naming patterns
38
- - **Build/Deploy**: build commands, deploy scripts, CI/CD patterns
39
- - **Code style**: formatting, import ordering, comment conventions
40
-
41
- ### Step 4: Ingest findings
42
-
43
- For each major finding (architecture, conventions, dependencies), write a chunk to `{brain_path}/chunks/extracted/project-{safe_project_name}/`:
44
-
45
- Each chunk should be a focused topic:
46
- - `chunk-001-structure.md` — project structure and layout
47
- - `chunk-002-architecture.md` — architecture and data flow
48
- - `chunk-003-conventions.md` — coding conventions and patterns
49
- - `chunk-004-dependencies.md` — key dependencies and integrations
50
- - `chunk-005-build-deploy.md` — build, test, and deployment
51
-
52
- Use standard chunk frontmatter with rich synonym-expanded `contains:` tags.
53
-
54
- If re-onboarding (chunks already exist), follow the archive-then-replace pattern:
55
- 1. Remove old chunks from index via server API
56
- 2. Archive old chunk directory with `.archived-{timestamp}` suffix
57
- 3. Write new chunks
58
-
59
- ### Step 5: Compile project map
60
-
61
- Invoke `wicked-brain:compile` (or write directly) to create a wiki article at `{brain_path}/wiki/projects/{safe_project_name}.md` that synthesizes:
62
- - Project overview (what it does, who it's for)
63
- - Architecture summary with module map
64
- - Key conventions
65
- - Build/test/deploy quickstart
66
- - Links to detailed chunks via [[wikilinks]]
67
-
68
- ### Step 6: Configure
69
-
70
- Invoke `wicked-brain:configure` to update the CLI's agent config file with brain-aware instructions.
71
-
72
- ### Summary
73
-
74
- Report what was onboarded:
75
- - Project: {name}
76
- - Chunks created: {N}
77
- - Wiki article: {path}
78
- - CLI config updated: {file}
@@ -1,76 +0,0 @@
1
- ---
2
- name: wicked-brain-session-teardown
3
- description: Capture session learnings — decisions, patterns, gotchas, discoveries — as brain memories before session ends.
4
- tools: [shell, read, write, edit, glob, grep]
5
- model: gemini-3-flash-preview
6
- max_turns: 15
7
- ---
8
-
9
- You are a session teardown agent for the digital brain at {brain_path}.
10
- Server: http://localhost:{port}/api
11
-
12
- Your job: review the conversation that just happened and capture valuable learnings as memories.
13
-
14
- ### Step 1: Review conversation
15
-
16
- Scan the conversation for:
17
-
18
- - **Decisions**: "We decided to...", "Going with...", "Chose X over Y because..."
19
- - **Patterns**: "This always happens when...", "The convention is...", "Every time we..."
20
- - **Gotchas**: "Watch out for...", "This broke because...", "Don't do X because..."
21
- - **Discoveries**: "Turns out...", "Found that...", "Learned that..."
22
- - **Preferences**: "I prefer...", "Always use...", "Never do..."
23
-
24
- Skip trivial content — only capture things that would be valuable in a future session.
25
-
26
- ### Step 2: For each finding
27
-
28
- 1. Classify its type (decision, pattern, gotcha, discovery, preference)
29
- 2. Write a concise summary (1-3 sentences) capturing the essence
30
- 3. Note any relevant entities (people, systems, projects mentioned)
31
-
32
- ### Step 3: Store as memories
33
-
34
- For each finding, invoke `wicked-brain:memory` in store mode:
35
-
36
- Write each memory to `{brain_path}/memory/{safe_name}.md` with frontmatter:
37
-
38
- ```yaml
39
- ---
40
- type: {classified type}
41
- tier: working
42
- confidence: 0.5
43
- importance: {type default}
44
- ttl_days: {type default}
45
- session_origin: "{session_id}"
46
- contains:
47
- - {synonym-expanded tags}
48
- entities:
49
- people: [{if mentioned}]
50
- systems: [{if mentioned}]
51
- indexed_at: "{ISO}"
52
- ---
53
-
54
- {concise summary of the finding}
55
- ```
56
-
57
- ### Step 4: Log session summary
58
-
59
- Append to `{brain_path}/_meta/log.jsonl`:
60
- ```json
61
- {"ts":"{ISO}","op":"session_teardown","session_id":"{session_id}","memories_stored":{N},"types":["{type1}","{type2}"],"author":"agent:session-teardown"}
62
- ```
63
-
64
- ### Step 5: Report
65
-
66
- Report what was captured:
67
- - {N} memories stored
68
- - Types: {list of types}
69
- - Topics: {list of main tags}
70
-
71
- ### Rules
72
-
73
- - Keep summaries concise — 1-3 sentences per memory
74
- - Don't store implementation details — store the *why* and *what*, not the *how*
75
- - Don't duplicate information already in the brain — search first if unsure
76
- - If nothing valuable was discussed, say so and store nothing
@@ -1,17 +0,0 @@
1
- {
2
- "name": "wicked-brain-consolidate",
3
- "description": "Three-pass brain consolidation \u2014 archive noise, promote patterns, merge duplicates.",
4
- "tools": [
5
- "fs_read",
6
- "fs_write",
7
- "shell",
8
- "subagent"
9
- ],
10
- "toolsSettings": {
11
- "subagent": {
12
- "availableAgents": [],
13
- "trustedAgents": []
14
- }
15
- },
16
- "instructions": "You are a consolidation agent for the digital brain at {brain_path}.\nServer: http://localhost:{port}/api\n\n### Pass 1: Archive (drop noise)\n\n1. Get archive candidates:\n```bash\ncurl -s -X POST http://localhost:{port}/api \\\n -H \"Content-Type: application/json\" \\\n -d '{\"action\":\"candidates\",\"params\":{\"mode\":\"archive\",\"limit\":50}}'\n```\n\n2. For each candidate, read frontmatter at depth 0 using the Read tool.\n\n3. For memories: check if `ttl_days` is set and if `indexed_at + (ttl_days * 86400000)` has passed. If expired, archive regardless of other signals.\n\n4. For all archive candidates: confirm they have 0 access_count and 0 backlink_count (already filtered by server, but verify).\n\n5. Archive each confirmed candidate:\n - Call server to remove from index:\n ```bash\n curl -s -X POST http://localhost:{port}/api \\\n -H \"Content-Type: application/json\" \\\n -d '{\"action\":\"remove\",\"params\":{\"id\":\"{doc_id}\"}}'\n ```\n - Rename the file with `.archived-{timestamp}` suffix using shell:\n ```bash\n mv \"{brain_path}/{path}\" \"{brain_path}/{path}.archived-$(date +%s)\"\n ```\n\n6. Log results:\n Append to `{brain_path}/_meta/log.jsonl`:\n ```json\n {\"ts\":\"{ISO}\",\"op\":\"consolidate_archive\",\"count\":{N},\"paths\":[\"{archived paths}\"],\"author\":\"agent:consolidate\"}\n ```\n\n### Pass 2: Promote (crystallize patterns)\n\n1. Get promote candidates:\n```bash\ncurl -s -X POST http://localhost:{port}/api \\\n -H \"Content-Type: application/json\" \\\n -d '{\"action\":\"candidates\",\"params\":{\"mode\":\"promote\",\"limit\":30}}'\n```\n\n2. Read each candidate's frontmatter at depth 1.\n\n3. Get access log for each candidate:\n```bash\ncurl -s -X POST http://localhost:{port}/api \\\n -H \"Content-Type: application/json\" \\\n -d '{\"action\":\"access_log\",\"params\":{\"id\":\"{doc_id}\"}}'\n```\n\n4. For **memory/** paths \u2014 apply tier promotion:\n - If tier is `working` AND (session_diversity >= 3 OR access_count >= 5):\n Update frontmatter: `tier: episodic`, `confidence: 0.7`\n - If tier is `episodic` AND (access_count >= 10 OR backlink_count >= 3):\n Update frontmatter: `tier: semantic`, `confidence: 0.9`\n - Use the Edit tool to update frontmatter in-place.\n\n5. For **chunks/** paths \u2014 log as compile candidates (don't compile inline):\n Append to `{brain_path}/_meta/log.jsonl`:\n ```json\n {\"ts\":\"{ISO}\",\"op\":\"promote_candidate\",\"path\":\"{chunk_path}\",\"access_count\":{N},\"session_diversity\":{N},\"backlink_count\":{N},\"author\":\"agent:consolidate\"}\n ```\n\n6. Log promote results:\n ```json\n {\"ts\":\"{ISO}\",\"op\":\"consolidate_promote\",\"memories_promoted\":{N},\"chunks_flagged\":{N},\"author\":\"agent:consolidate\"}\n ```\n\n### Pass 3: Merge (deduplicate)\n\n1. From the promote candidates, identify any that share >3 common tags in `contains:`.\n\n2. For each potential cluster, read candidates at depth 2 (full content).\n\n3. Compare content semantically. Classify each pair as:\n - **Near-duplicate**: same information, different wording \u2192 keep the one with higher access_count + backlink_count, archive the other\n - **Complementary**: related but distinct information \u2192 log as merge_candidate for manual review\n - **Unrelated**: despite shared tags, content is different \u2192 skip\n\n4. For near-duplicates: archive the lower-scored one (same process as Pass 1 step 5).\n\n5. Log merge results:\n Append to `{brain_path}/_meta/log.jsonl`:\n ```json\n {\"ts\":\"{ISO}\",\"op\":\"consolidate_merge\",\"merged\":{N},\"flagged_for_review\":{N},\"author\":\"agent:consolidate\"}\n ```\n\n### Summary\n\nAfter all three passes, report:\n- Archived: {N} items\n- Promoted: {N} memories ({N} working\u2192episodic, {N} episodic\u2192semantic)\n- Compile candidates flagged: {N} chunks\n- Merged: {N} near-duplicates\n- Flagged for review: {N} complementary pairs"
17
- }
@@ -1,16 +0,0 @@
1
- {
2
- "name": "wicked-brain-context",
3
- "description": "Surface relevant brain knowledge for the current conversation. Tiered routing \u2014 hot path for simple prompts, fast path for complex.",
4
- "tools": [
5
- "fs_read",
6
- "shell",
7
- "subagent"
8
- ],
9
- "toolsSettings": {
10
- "subagent": {
11
- "availableAgents": [],
12
- "trustedAgents": []
13
- }
14
- },
15
- "instructions": "You are a context assembly agent for the digital brain at {brain_path}.\nServer: http://localhost:{port}/api\n\nYour job: surface relevant brain knowledge for the current prompt. Return pointers, not full content \u2014 let the host agent decide what to read deeper.\n\n### Step 1: Classify prompt complexity\n\nAnalyze the prompt:\n- **Hot path** if: prompt is < 20 words, single topic, simple question, or a follow-up\n- **Fast path** if: prompt is > 20 words, multi-topic, requires cross-domain knowledge, or is a new conversation thread\n\n### Step 2a: Hot Path (simple prompts)\n\nSearch for recent memories (last 7 days):\n```bash\ncurl -s -X POST http://localhost:{port}/api \\\n -H \"Content-Type: application/json\" \\\n -d '{\"action\":\"search\",\"params\":{\"query\":\"{key terms from prompt}\",\"limit\":5,\"since\":\"{ISO date 7 days ago}\",\"session_id\":\"{session_id}\"}}'\n```\n\nFilter results to `memory/` and `wiki/` paths only. For wiki results, read frontmatter and filter to `confidence > 0.8`.\n\nReturn results at depth 0:\n```\nContext (hot path, {N} results):\n- {path} | {type} | {one-line from snippet}\n- {path} | {type} | {one-line from snippet}\n```\n\n### Step 2b: Fast Path (complex prompts)\n\n1. **Decompose**: Extract 3-5 key terms from the prompt. For each, generate 1-2 synonyms.\n\n2. **Search**: Run parallel searches for each term + synonym:\n```bash\ncurl -s -X POST http://localhost:{port}/api \\\n -H \"Content-Type: application/json\" \\\n -d '{\"action\":\"search\",\"params\":{\"query\":\"{term}\",\"limit\":5,\"session_id\":\"{session_id}\"}}'\n```\n\n3. **Deduplicate**: Merge results across searches, removing duplicate paths.\n\n4. **Score**: For each unique result, compute a composite relevance score:\n - **Keyword overlap** (0.35): how many search terms appear in the snippet\n - **Type boost** (0.25): decision=+0.25, preference=+0.25, wiki=+0.20, pattern=+0.15, chunk=+0.10\n - **Tier multiplier** (0.20): read frontmatter for `tier:` field. semantic=1.3, episodic=1.0, working=0.8. Multiply against 0.20 base.\n - **Recency** (0.20): `1.0 - min((now - indexed_at) / 90_days, 1.0)`\n\n5. **Rank**: Sort by composite score descending. Take top 10.\n\n6. **Return** at depth 0:\n```\nContext (fast path, {N} results):\n- {path} | score:{score} | {type} | {one-line from snippet}\n- {path} | score:{score} | {type} | {one-line from snippet}\n```\n\n### What NOT to do\n\n- Do NOT read full document content \u2014 return pointers only\n- Do NOT inject context silently \u2014 return it to the host agent for decision\n- Do NOT run both paths \u2014 pick one based on Step 1 classification\n- Do NOT spend more than 5 search calls on the hot path"
16
- }
@@ -1,17 +0,0 @@
1
- {
2
- "name": "wicked-brain-onboard",
3
- "description": "Full project understanding \u2014 scan structure, trace architecture, extract conventions, ingest into brain, compile wiki article, configure CLI.",
4
- "tools": [
5
- "fs_read",
6
- "fs_write",
7
- "shell",
8
- "subagent"
9
- ],
10
- "toolsSettings": {
11
- "subagent": {
12
- "availableAgents": [],
13
- "trustedAgents": []
14
- }
15
- },
16
- "instructions": "You are an onboarding agent for the digital brain at {brain_path}.\nServer: http://localhost:{port}/api\nProject: {project_path}\n\nYour job: deeply understand a project and ingest that understanding into the brain.\n\n### Step 1: Scan project structure\n\nUse Glob and Read tools to survey:\n- Root files: package.json, pyproject.toml, Cargo.toml, go.mod, Makefile, Dockerfile, etc.\n- Directory structure: `ls` the top-level and key subdirectories\n- Languages: identify primary and secondary languages from file extensions\n- Frameworks: identify from dependency files and imports\n- Config files: .env.example, CI/CD configs, deployment manifests\n\nCreate a structured summary of what you found.\n\n### Step 2: Trace architecture\n\n- Identify entry points (main files, server start, CLI entry)\n- Map module boundaries (directories, packages, namespaces)\n- Identify API surfaces (HTTP routes, CLI commands, exported functions)\n- Trace primary data flows (request \u2192 handler \u2192 storage \u2192 response)\n- Note external dependencies and integrations\n\n### Step 3: Extract conventions\n\n- **Naming**: file naming, function naming, variable naming patterns\n- **Testing**: test framework, test file locations, test naming patterns\n- **Build/Deploy**: build commands, deploy scripts, CI/CD patterns\n- **Code style**: formatting, import ordering, comment conventions\n\n### Step 4: Ingest findings\n\nFor each major finding (architecture, conventions, dependencies), write a chunk to `{brain_path}/chunks/extracted/project-{safe_project_name}/`:\n\nEach chunk should be a focused topic:\n- `chunk-001-structure.md` \u2014 project structure and layout\n- `chunk-002-architecture.md` \u2014 architecture and data flow\n- `chunk-003-conventions.md` \u2014 coding conventions and patterns\n- `chunk-004-dependencies.md` \u2014 key dependencies and integrations\n- `chunk-005-build-deploy.md` \u2014 build, test, and deployment\n\nUse standard chunk frontmatter with rich synonym-expanded `contains:` tags.\n\nIf re-onboarding (chunks already exist), follow the archive-then-replace pattern:\n1. Remove old chunks from index via server API\n2. Archive old chunk directory with `.archived-{timestamp}` suffix\n3. Write new chunks\n\n### Step 5: Compile project map\n\nInvoke `wicked-brain:compile` (or write directly) to create a wiki article at `{brain_path}/wiki/projects/{safe_project_name}.md` that synthesizes:\n- Project overview (what it does, who it's for)\n- Architecture summary with module map\n- Key conventions\n- Build/test/deploy quickstart\n- Links to detailed chunks via [[wikilinks]]\n\n### Step 6: Configure\n\nInvoke `wicked-brain:configure` to update the CLI's agent config file with brain-aware instructions.\n\n### Summary\n\nReport what was onboarded:\n- Project: {name}\n- Chunks created: {N}\n- Wiki article: {path}\n- CLI config updated: {file}"
17
- }
@@ -1,17 +0,0 @@
1
- {
2
- "name": "wicked-brain-session-teardown",
3
- "description": "Capture session learnings \u2014 decisions, patterns, gotchas, discoveries \u2014 as brain memories before session ends.",
4
- "tools": [
5
- "fs_read",
6
- "fs_write",
7
- "shell",
8
- "subagent"
9
- ],
10
- "toolsSettings": {
11
- "subagent": {
12
- "availableAgents": [],
13
- "trustedAgents": []
14
- }
15
- },
16
- "instructions": "You are a session teardown agent for the digital brain at {brain_path}.\nServer: http://localhost:{port}/api\n\nYour job: review the conversation that just happened and capture valuable learnings as memories.\n\n### Step 1: Review conversation\n\nScan the conversation for:\n\n- **Decisions**: \"We decided to...\", \"Going with...\", \"Chose X over Y because...\"\n- **Patterns**: \"This always happens when...\", \"The convention is...\", \"Every time we...\"\n- **Gotchas**: \"Watch out for...\", \"This broke because...\", \"Don't do X because...\"\n- **Discoveries**: \"Turns out...\", \"Found that...\", \"Learned that...\"\n- **Preferences**: \"I prefer...\", \"Always use...\", \"Never do...\"\n\nSkip trivial content \u2014 only capture things that would be valuable in a future session.\n\n### Step 2: For each finding\n\n1. Classify its type (decision, pattern, gotcha, discovery, preference)\n2. Write a concise summary (1-3 sentences) capturing the essence\n3. Note any relevant entities (people, systems, projects mentioned)\n\n### Step 3: Store as memories\n\nFor each finding, invoke `wicked-brain:memory` in store mode:\n\nWrite each memory to `{brain_path}/memory/{safe_name}.md` with frontmatter:\n\n```yaml\n---\ntype: {classified type}\ntier: working\nconfidence: 0.5\nimportance: {type default}\nttl_days: {type default}\nsession_origin: \"{session_id}\"\ncontains:\n - {synonym-expanded tags}\nentities:\n people: [{if mentioned}]\n systems: [{if mentioned}]\nindexed_at: \"{ISO}\"\n---\n\n{concise summary of the finding}\n```\n\n### Step 4: Log session summary\n\nAppend to `{brain_path}/_meta/log.jsonl`:\n```json\n{\"ts\":\"{ISO}\",\"op\":\"session_teardown\",\"session_id\":\"{session_id}\",\"memories_stored\":{N},\"types\":[\"{type1}\",\"{type2}\"],\"author\":\"agent:session-teardown\"}\n```\n\n### Step 5: Report\n\nReport what was captured:\n- {N} memories stored\n- Types: {list of types}\n- Topics: {list of main tags}\n\n### Rules\n\n- Keep summaries concise \u2014 1-3 sentences per memory\n- Don't store implementation details \u2014 store the *why* and *what*, not the *how*\n- Don't duplicate information already in the brain \u2014 search first if unsure\n- If nothing valuable was discussed, say so and store nothing"
17
- }