sinapse-ai 9.3.0 → 9.4.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 (192) hide show
  1. package/.claude/CLAUDE.md +56 -343
  2. package/.claude/rules/agent-authority.md +6 -0
  3. package/.claude/rules/agent-handoff.md +5 -0
  4. package/.claude/rules/cross-squad-routing.md +5 -0
  5. package/.claude/rules/hook-governance.md +6 -0
  6. package/.claude/rules/mcp-usage.md +3 -1
  7. package/.claude/rules/safe-collaboration.md +10 -0
  8. package/.claude/rules/security-data-protection.md +9 -0
  9. package/.claude/rules/squad-awareness.md +3 -1
  10. package/.claude/rules/tool-examples.md +6 -0
  11. package/.claude/rules/workflow-execution.md +7 -0
  12. package/.codex/agents/analyst.md +253 -72
  13. package/.codex/agents/architect.md +455 -68
  14. package/.codex/agents/data-engineer.md +492 -106
  15. package/.codex/agents/developer.md +560 -0
  16. package/.codex/agents/devops.md +518 -69
  17. package/.codex/agents/product-lead.md +335 -0
  18. package/.codex/agents/project-lead.md +377 -0
  19. package/.codex/agents/quality-gate.md +449 -0
  20. package/.codex/agents/sinapse-orqx.md +9 -7
  21. package/.codex/agents/sprint-lead.md +287 -0
  22. package/.codex/agents/squad-creator.md +344 -0
  23. package/.codex/agents/ux-design-expert.md +495 -0
  24. package/.codex/delegation-matrix.json +756 -44
  25. package/.codex/handoff-packet.schema.json +30 -6
  26. package/.sinapse-ai/data/entity-registry.yaml +175 -363
  27. package/.sinapse-ai/data/registry-update-log.jsonl +16 -0
  28. package/.sinapse-ai/development/agents/analyst.md +90 -0
  29. package/.sinapse-ai/development/agents/architect.md +73 -0
  30. package/.sinapse-ai/development/agents/developer.md +69 -0
  31. package/.sinapse-ai/development/agents/devops.md +117 -0
  32. package/.sinapse-ai/development/agents/quality-gate.md +85 -0
  33. package/.sinapse-ai/development/checklists/agent-quality-gate.md +27 -0
  34. package/.sinapse-ai/development/checklists/brownfield-compatibility-checklist.md +20 -0
  35. package/.sinapse-ai/development/checklists/code-review-checklist.md +106 -0
  36. package/.sinapse-ai/development/checklists/issue-triage-checklist.md +9 -0
  37. package/.sinapse-ai/development/checklists/memory-audit-checklist.md +16 -0
  38. package/.sinapse-ai/development/checklists/pr-quality-checklist.md +72 -0
  39. package/.sinapse-ai/development/checklists/security-deployment-checklist.md +54 -0
  40. package/.sinapse-ai/development/checklists/self-critique-checklist.md +19 -1
  41. package/.sinapse-ai/development/skills/debug.md +57 -0
  42. package/.sinapse-ai/development/skills/fast-review.md +69 -0
  43. package/.sinapse-ai/development/skills/research-synthesis.md +77 -0
  44. package/.sinapse-ai/development/skills/security-scan.md +73 -0
  45. package/.sinapse-ai/development/skills/verify.md +53 -0
  46. package/.sinapse-ai/development/templates/squad/agent-template.md +17 -4
  47. package/.sinapse-ai/development/templates/squad/checklist-template.md +13 -5
  48. package/.sinapse-ai/development/templates/squad/task-template.md +7 -0
  49. package/.sinapse-ai/development/templates/squad/workflow-template.yaml +7 -0
  50. package/.sinapse-ai/development/workflows/fast-track.yaml +87 -0
  51. package/.sinapse-ai/infrastructure/scripts/validate-codex-delegation.js +3 -1
  52. package/.sinapse-ai/install-manifest.yaml +71 -35
  53. package/docs/codex-integration-process.md +22 -0
  54. package/docs/codex-parity-program.md +27 -0
  55. package/docs/ide-integration.md +36 -0
  56. package/package.json +1 -1
  57. package/squads/claude-code-mastery/knowledge-base/claude-code-internals-reference.md +927 -0
  58. package/squads/squad-brand/knowledge-base/archetype-brand-mapping.md +12 -1
  59. package/squads/squad-brand/knowledge-base/brand-activism-cultural-branding.md +216 -0
  60. package/squads/squad-brand/knowledge-base/brand-audit-criteria.md +58 -0
  61. package/squads/squad-brand/knowledge-base/brand-digital-strategy.md +188 -0
  62. package/squads/squad-brand/knowledge-base/brand-legal-ip.md +222 -0
  63. package/squads/squad-brand/knowledge-base/brand-naming-framework.md +163 -0
  64. package/squads/squad-brand/knowledge-base/branding-master-reference.md +1001 -0
  65. package/squads/squad-brand/knowledge-base/color-psychology.md +25 -12
  66. package/squads/squad-brand/knowledge-base/employer-personal-branding.md +206 -0
  67. package/squads/squad-brand/knowledge-base/routing-catalog.md +34 -0
  68. package/squads/squad-brand/knowledge-base/sonic-branding-principles.md +6 -1
  69. package/squads/squad-brand/knowledge-base/typography-personality.md +34 -0
  70. package/squads/squad-claude/knowledge-base/context-window-optimization.md +334 -0
  71. package/squads/squad-claude/knowledge-base/knowledge-architecture-reference.md +403 -0
  72. package/squads/squad-claude/knowledge-base/memory-systems-reference.md +412 -0
  73. package/squads/squad-claude/knowledge-base/obsidian-claude-integration.md +423 -0
  74. package/squads/squad-claude/knowledge-base/retrieval-augmented-generation.md +320 -0
  75. package/squads/squad-claude/knowledge-base/skill-creation-patterns.md +380 -0
  76. package/squads/squad-claude/knowledge-base/swarm-orchestration-patterns.md +411 -0
  77. package/squads/squad-cloning/knowledge-base/clone-quality-assurance.md +211 -0
  78. package/squads/squad-cloning/knowledge-base/confidence-scoring.md +51 -0
  79. package/squads/squad-cloning/knowledge-base/cross-squad-deployment.md +47 -0
  80. package/squads/squad-cloning/knowledge-base/ethical-guidelines.md +237 -0
  81. package/squads/squad-cloning/knowledge-base/knowledge-graph-for-clones.md +295 -0
  82. package/squads/squad-cloning/knowledge-base/memory-architecture-for-clones.md +229 -0
  83. package/squads/squad-cloning/knowledge-base/multi-agent-deployment-patterns.md +320 -0
  84. package/squads/squad-cloning/knowledge-base/skill-standard-for-clones.md +262 -0
  85. package/squads/squad-cloning/knowledge-base/sop-extraction-guide.md +243 -0
  86. package/squads/squad-commercial/knowledge-base/account-based-selling.md +206 -0
  87. package/squads/squad-commercial/knowledge-base/ai-as-competitive-infrastructure.md +14 -0
  88. package/squads/squad-commercial/knowledge-base/ai-in-sales.md +199 -0
  89. package/squads/squad-commercial/knowledge-base/brazilian-sales-context.md +195 -0
  90. package/squads/squad-commercial/knowledge-base/customer-success-operations.md +83 -2
  91. package/squads/squad-commercial/knowledge-base/prospecting-pipeline-generation.md +69 -0
  92. package/squads/squad-commercial/knowledge-base/sales-enablement-playbook.md +260 -0
  93. package/squads/squad-commercial/knowledge-base/sales-methodology-comparison.md +185 -0
  94. package/squads/squad-commercial/knowledge-base/sales-revenue-master-reference.md +1123 -0
  95. package/squads/squad-content/knowledge-base/brazilian-content-context.md +176 -0
  96. package/squads/squad-content/knowledge-base/competitor-analysis-methods.md +40 -1
  97. package/squads/squad-content/knowledge-base/content-architecture-taxonomy.md +206 -0
  98. package/squads/squad-content/knowledge-base/content-formats-encyclopedia.md +58 -1
  99. package/squads/squad-content/knowledge-base/content-references-bibliography.md +130 -0
  100. package/squads/squad-content/knowledge-base/content-strategy-master-reference.md +1097 -0
  101. package/squads/squad-content/knowledge-base/content-tech-stack.md +150 -0
  102. package/squads/squad-content/knowledge-base/copywriting-formulas-library.md +188 -0
  103. package/squads/squad-content/knowledge-base/email-newsletter-strategy.md +161 -0
  104. package/squads/squad-content/knowledge-base/platform-algorithm-intelligence.md +86 -1
  105. package/squads/squad-content/knowledge-base/social-algorithms-master-reference.md +1007 -0
  106. package/squads/squad-content/knowledge-base/video-audio-content-playbook.md +218 -0
  107. package/squads/squad-copy/knowledge-base/ai-copy-production.md +254 -0
  108. package/squads/squad-copy/knowledge-base/brazilian-copywriting-context.md +242 -0
  109. package/squads/squad-copy/knowledge-base/email-copywriting-system.md +299 -0
  110. package/squads/squad-copy/knowledge-base/landing-page-copy-architecture.md +267 -0
  111. package/squads/squad-copy/knowledge-base/power-words-catalog.md +205 -0
  112. package/squads/squad-copy/knowledge-base/seo-copywriting.md +255 -0
  113. package/squads/squad-copy/knowledge-base/video-script-copywriting.md +239 -0
  114. package/squads/squad-council/knowledge-base/brand-strategy-models.md +193 -0
  115. package/squads/squad-council/knowledge-base/growth-strategy-models.md +267 -0
  116. package/squads/squad-council/knowledge-base/innovation-disruption-frameworks.md +193 -0
  117. package/squads/squad-council/knowledge-base/market-analysis-frameworks.md +240 -0
  118. package/squads/squad-council/knowledge-base/organizational-leadership-models.md +212 -0
  119. package/squads/squad-council/knowledge-base/sales-strategy-models.md +215 -0
  120. package/squads/squad-courses/knowledge-base/course-launch-strategy.md +251 -0
  121. package/squads/squad-courses/knowledge-base/domain-advocacia-curriculum.md +385 -0
  122. package/squads/squad-courses/knowledge-base/domain-contabilidade-curriculum.md +266 -0
  123. package/squads/squad-courses/knowledge-base/platform-comparison.md +68 -0
  124. package/squads/squad-courses/knowledge-base/video-production-guide.md +70 -0
  125. package/squads/squad-cybersecurity/knowledge-base/cloud-security-reference.md +363 -0
  126. package/squads/squad-cybersecurity/knowledge-base/compliance-frameworks.md +273 -0
  127. package/squads/squad-cybersecurity/knowledge-base/database-security.md +438 -0
  128. package/squads/squad-cybersecurity/knowledge-base/incident-response-playbook.md +420 -0
  129. package/squads/squad-cybersecurity/knowledge-base/network-security-reference.md +477 -0
  130. package/squads/squad-cybersecurity/knowledge-base/penetration-testing-methodology.md +350 -0
  131. package/squads/squad-cybersecurity/knowledge-base/vulnerability-management.md +349 -0
  132. package/squads/squad-design/knowledge-base/brazilian-design-context.md +223 -0
  133. package/squads/squad-design/knowledge-base/component-api-patterns.md +208 -4
  134. package/squads/squad-design/knowledge-base/design-system-master-reference.md +1302 -0
  135. package/squads/squad-design/knowledge-base/design-systems-frameworks.md +91 -1
  136. package/squads/squad-design/knowledge-base/responsive-modern-css.md +96 -4
  137. package/squads/squad-design/knowledge-base/wcag-aria-reference.md +117 -5
  138. package/squads/squad-design/knowledge-base/web-performance-reference.md +127 -4
  139. package/squads/squad-finance/knowledge-base/brazilian-taxation.md +263 -0
  140. package/squads/squad-finance/knowledge-base/contabilidade-master-reference.md +998 -0
  141. package/squads/squad-finance/knowledge-base/finance-master-reference.md +946 -0
  142. package/squads/squad-finance/knowledge-base/financial-reporting-analysis.md +316 -0
  143. package/squads/squad-finance/knowledge-base/fintech-brazilian-context.md +242 -0
  144. package/squads/squad-finance/knowledge-base/fpa-planning-frameworks.md +286 -0
  145. package/squads/squad-finance/knowledge-base/ma-and-transactions.md +285 -0
  146. package/squads/squad-finance/knowledge-base/risk-management.md +233 -0
  147. package/squads/squad-finance/knowledge-base/startups-venture-capital.md +337 -0
  148. package/squads/squad-growth/knowledge-base/ai-growth-playbook.md +216 -0
  149. package/squads/squad-growth/knowledge-base/attribution-models.md +78 -0
  150. package/squads/squad-growth/knowledge-base/brazilian-growth-context.md +208 -0
  151. package/squads/squad-growth/knowledge-base/community-led-growth.md +175 -0
  152. package/squads/squad-growth/knowledge-base/content-marketing-flywheel.md +190 -0
  153. package/squads/squad-growth/knowledge-base/email-lifecycle-framework.md +192 -0
  154. package/squads/squad-growth/knowledge-base/growth-frameworks-catalog.md +82 -0
  155. package/squads/squad-growth/knowledge-base/growth-master-reference.md +1168 -0
  156. package/squads/squad-growth/knowledge-base/routing-catalog.md +53 -11
  157. package/squads/squad-paidmedia/knowledge-base/audiences-segmentation-deep.md +285 -0
  158. package/squads/squad-paidmedia/knowledge-base/creative-strategy-deep.md +294 -0
  159. package/squads/squad-paidmedia/knowledge-base/google-ads-account-architecture.md +87 -0
  160. package/squads/squad-paidmedia/knowledge-base/meta-ads-campaign-architecture.md +76 -0
  161. package/squads/squad-paidmedia/knowledge-base/paid-media-metrics-reference.md +117 -0
  162. package/squads/squad-paidmedia/knowledge-base/paid-traffic-master-reference.md +1308 -0
  163. package/squads/squad-paidmedia/knowledge-base/routing-catalog.md +95 -18
  164. package/squads/squad-paidmedia/knowledge-base/traffic-masters-frameworks.md +71 -0
  165. package/squads/squad-product/knowledge-base/brazilian-product-context.md +284 -0
  166. package/squads/squad-product/knowledge-base/discovery-methodology-playbook.md +141 -0
  167. package/squads/squad-product/knowledge-base/pm-frameworks-reference.md +125 -9
  168. package/squads/squad-product/knowledge-base/product-analytics-formulas.md +72 -0
  169. package/squads/squad-product/knowledge-base/product-led-growth-reference.md +155 -13
  170. package/squads/squad-product/knowledge-base/product-market-fit-framework.md +222 -0
  171. package/squads/squad-product/knowledge-base/routing-catalog.md +32 -0
  172. package/squads/squad-research/knowledge-base/agentic-second-brain-reference.md +591 -0
  173. package/squads/squad-research/knowledge-base/ai-augmented-research.md +212 -0
  174. package/squads/squad-research/knowledge-base/brazilian-market-research-sources.md +197 -0
  175. package/squads/squad-research/knowledge-base/community-platforms-reference.md +786 -0
  176. package/squads/squad-research/knowledge-base/community-research-methods.md +194 -0
  177. package/squads/squad-research/knowledge-base/mixed-methods-research-design.md +168 -0
  178. package/squads/squad-research/knowledge-base/network-effects-analysis.md +192 -0
  179. package/squads/squad-research/knowledge-base/qualitative-research-deep-methods.md +202 -0
  180. package/squads/squad-research/knowledge-base/quantitative-research-methods.md +208 -0
  181. package/squads/squad-research/knowledge-base/research-frameworks-encyclopedia.md +40 -0
  182. package/squads/squad-research/knowledge-base/research-synthesis-frameworks.md +223 -0
  183. package/squads/squad-storytelling/knowledge-base/brand-mythology-framework.md +236 -0
  184. package/squads/squad-storytelling/knowledge-base/brazilian-storytelling-context.md +237 -0
  185. package/squads/squad-storytelling/knowledge-base/data-storytelling.md +232 -0
  186. package/squads/squad-storytelling/knowledge-base/improv-storytelling.md +226 -0
  187. package/squads/squad-storytelling/knowledge-base/persuasion-narrative-techniques.md +269 -0
  188. package/squads/squad-storytelling/knowledge-base/social-movement-narratives.md +191 -0
  189. package/squads/squad-storytelling/knowledge-base/video-storytelling.md +252 -0
  190. package/squads/claude-code-mastery/data/swarm-orchestration-patterns.yaml +0 -378
  191. package/squads/squad-animations/knowledge-base/framer-motion-complete-reference.md +0 -710
  192. package/squads/squad-animations/knowledge-base/web-animations-api-view-transitions.md +0 -478
@@ -0,0 +1,591 @@
1
+ # Agentic Second Brain Engineering Reference
2
+
3
+ Comprehensive reference on building agentic Second Brains -- systems where AI agents capture, organize, connect, and retrieve knowledge autonomously, transforming personal vaults into living cognitive infrastructure.
4
+
5
+ **Sources:** 67 sources (papers, repositories, articles, documentation). Research conducted April 2026.
6
+
7
+ ---
8
+
9
+ ## 1. The Convergence
10
+
11
+ Three waves converge to create the Agentic Second Brain:
12
+
13
+ 1. **PKM Wave:** Obsidian, Logseq, Roam Research -- local-first vaults with markdown and bidirectional links
14
+ 2. **LLM Wave:** GPT-4, Claude, Gemini -- models capable of reading, summarizing, synthesizing, and producing knowledge
15
+ 3. **Agentic Wave:** CrewAI, LangGraph, Claude Code, OpenAI Agents SDK -- frameworks giving agents autonomy, tools, and persistent memory
16
+
17
+ ### Why Now (2025-2026)
18
+
19
+ - Context windows of 1M+ tokens (Claude, Gemini) allow agents to read entire vaults
20
+ - MCP (Model Context Protocol) enables LLM-to-filesystem connections
21
+ - A-Mem (NeurIPS 2025) formalized agentic memory inspired by Zettelkasten
22
+ - Graphiti/Zep: temporal knowledge graphs tracking how facts change
23
+ - Context Engineering recognized formally (Karpathy, Willison, 2025) as more important than prompt crafting
24
+
25
+ ### Market Context
26
+
27
+ - Graph database market: $2.85B (2025), projected $18-20B by 2032-2034
28
+ - Knowledge management market: $773B-$885B (2024)
29
+ - Gartner: 33% of enterprise apps will include agentic AI by 2028 (vs <1% in 2024)
30
+ - Cost of poor data quality: $12.9M/year per organization
31
+
32
+ ---
33
+
34
+ ## 2. Knowledge Architecture (System 1)
35
+
36
+ ### What and Why
37
+
38
+ Knowledge Architecture is the formal design that organizes, classifies, and relates units of knowledge. Without it, a vault becomes a graveyard of notes -- information accumulated but inaccessible. Architecture determines findability, connectability, evolution, and reasoning capability.
39
+
40
+ ### Frameworks
41
+
42
+ | Framework | Structure | Focus | Ideal For |
43
+ |-----------|-----------|-------|-----------|
44
+ | Zettelkasten | Network of atomic interlinked notes | Idea emergence | Research, writing |
45
+ | PARA | Projects / Areas / Resources / Archives | Action and productivity | Project management |
46
+ | Evergreen Notes | Conceptual notes that evolve | Durable thinking | Deep reflection |
47
+ | MOC (Maps of Content) | Index notes aggregating themes | Navigation | Large vaults |
48
+ | Knowledge Graph | Entities + relations + attributes | Reasoning and inference | Agentic systems |
49
+
50
+ ### State of the Art
51
+
52
+ **GraphRAG:** Evolution of traditional RAG incorporating a knowledge graph in retrieval. Instead of pure vector search, the system also queries the graph for relevant entities and relations, combining structural precision with semantic coverage.
53
+
54
+ **Graphiti (Zep):** Framework for temporal context graphs. Unlike static graphs, Graphiti tracks how facts change over time, maintains provenance for data sources, and supports both prescribed and learned ontology.
55
+
56
+ **Bi-Temporal Model:** Tracks when an event occurred AND when it was ingested. Each edge includes explicit validity intervals. Conflicts use temporal metadata to update or invalidate -- but not discard -- outdated information.
57
+
58
+ ### Implementation Steps
59
+
60
+ 1. Define base ontology: entity types (Person, Concept, Project, Decision, Insight, Source) and relations
61
+ 2. Choose granularity: atomic notes (1 idea = 1 note) vs composite notes
62
+ 3. Implement layers: fixed taxonomy + fluid tags + bidirectional links
63
+ 4. Automatic graphs: use LLMs to extract entities and relations
64
+ 5. Evolutionary ontology: allow the system to learn new categories from usage
65
+
66
+ ### Risks
67
+
68
+ - Over-engineering ontologies nobody can maintain
69
+ - Rigid taxonomies that reject emergent knowledge
70
+ - Platform lock-in from tool-specific architectures
71
+ - Temporal inconsistency polluting the graph without invalidation mechanisms
72
+
73
+ ### Key People
74
+
75
+ - **Niklas Luhmann** -- Zettelkasten creator (70 books published)
76
+ - **Tim Berners-Lee** -- Semantic Web, RDF, OWL foundations
77
+ - **Preston Rasmussen** -- Zep/Graphiti temporal graphs paper
78
+
79
+ ---
80
+
81
+ ## 3. Ingestion, Capture and Context Normalization (System 2)
82
+
83
+ ### The Problem
84
+
85
+ Most valuable knowledge is generated in ephemeral contexts -- a conversation with Claude, a meeting, an article read quickly. Without systematic capture, knowledge evaporates.
86
+
87
+ ### State of the Art
88
+
89
+ **Agentic Context Engineering (ACE):** Academic framework with three specialized components -- Generator, Reflector, and Curator -- representing context as structured bullets instead of monolithic prompts. Each memory entry has metadata (unique IDs, utility counters) and content capturing reusable strategies, domain concepts, or common failure modes.
90
+
91
+ **Cognee:** Open-source cognitive memory engine combining graph structures with vector embeddings. Modular pipelines for custom extraction, enrichment, and retrieval. 30+ connectors for documents, images, audio, conversations. $7.5M seed (Feb 2026), 1M+ pipeline runs, 70+ companies in production.
92
+
93
+ ### Source Types
94
+
95
+ | Source | Content Type | Normalization Challenge |
96
+ |--------|-------------|------------------------|
97
+ | Claude/ChatGPT conversations | Dialogs, decisions, insights | Extract essence from conversational flow |
98
+ | Documents (PDF, Word, Slides) | Structured text + tables | OCR, layout parsing, table extraction |
99
+ | Web pages | Articles, docs, forums | HTML cleanup, main content extraction |
100
+ | Audio/Video | Meetings, podcasts | Transcription + diarization + summary |
101
+ | Source code | Logic, patterns, architecture | Intent extraction beyond syntax |
102
+ | Manual notes | Drafts, brainstorms | Structuring and connecting |
103
+
104
+ ### Normalization Pipeline
105
+
106
+ ```
107
+ [Raw Source]
108
+ -> Extraction (parsing, OCR, transcription)
109
+ -> Cleaning (remove noise, format)
110
+ -> Semantic Chunking (divide by meaning, not tokens)
111
+ -> Enrichment (metadata, tags, entities)
112
+ -> Embedding (vectorization for semantic search)
113
+ -> Indexing (vault + graph + vector store)
114
+ -> Connection (links with existing knowledge)
115
+ ```
116
+
117
+ ### Implementation
118
+
119
+ 1. One connector per source (API, filesystem watch, clipboard monitor, webhook)
120
+ 2. Semantic chunking: divide by meaning, each chunk self-contained
121
+ 3. Entity extractors: LLMs identify people, concepts, decisions, actions
122
+ 4. Deduplication: verify knowledge exists before creating new note
123
+ 5. Templates per type: meeting note, article digest, conversation insight
124
+ 6. Auto-connection: agent identifies related existing notes and creates links
125
+
126
+ ### Risks
127
+
128
+ - Ingestion without curation generates noise degrading vault quality
129
+ - Loss of provenance makes knowledge unverifiable
130
+ - Over-chunking destroys context necessary for comprehension
131
+
132
+ ---
133
+
134
+ ## 4. Operational Memory and Context Engineering (System 3)
135
+
136
+ ### The Paradigm Shift
137
+
138
+ Andrej Karpathy (2025): "Context engineering is the delicate art and science of filling the context window with just the right information for the next step."
139
+
140
+ Simon Willison: "Context engineering is what we do instead of fine-tuning."
141
+
142
+ Mental model: think of the LLM as a CPU and the context window as RAM. Your job is analogous to an operating system: load working memory with exactly the right code and data for the task.
143
+
144
+ ### Memory Layers
145
+
146
+ | Layer | Human Analogy | Function | Duration | Cost |
147
+ |-------|--------------|----------|----------|------|
148
+ | Working Memory | Scratchpad | Active task information | Session | Direct tokens |
149
+ | Episodic Memory | Autobiographical | Specific events, past interactions | Days-Months | Vector search |
150
+ | Semantic Memory | General knowledge | Facts, concepts, rules | Permanent | Graph + Vector |
151
+
152
+ ### Storage Tiers
153
+
154
+ | Tier | Access | Example |
155
+ |------|--------|---------|
156
+ | HOT | In active context window | System prompt, current task, recent messages |
157
+ | WARM | Retrievable in <300ms | Recent notes, mentioned entities, project decisions |
158
+ | COLD | Retrievable on demand | Old notes, completed projects, full history |
159
+
160
+ **ContextForge principle:** Memory becomes HOT not just when accessed, but when semantically crucial for the current task. Relevance pulls it to HOT instantly regardless of age.
161
+
162
+ ### Token Budget Management
163
+
164
+ ```
165
+ TOTAL WINDOW: 200,000 tokens
166
+ |- System Prompt: ~2,000 (1%)
167
+ |- Agent Persona: ~1,500 (0.75%)
168
+ |- Memory Context: ~50,000 (25%) <- MANAGED
169
+ |- User History: ~20,000 (10%) <- COMPACTED
170
+ |- Tool Results: ~50,000 (25%) <- DYNAMIC
171
+ |- Response Budget: ~76,500 (38.25%) <- RESERVED
172
+ ```
173
+
174
+ ### Frameworks and Tools
175
+
176
+ | Tool | Approach | Highlight |
177
+ |------|----------|-----------|
178
+ | **Letta (MemGPT)** | Virtual context management (OS-inspired) | #1 Terminal-Bench. Conversations API for cross-session shared memory |
179
+ | **Mem0** | Memory layer with graph DB | 26% accuracy gain vs OpenAI Memory, 91% less latency, 90% less tokens. $24M Series A |
180
+ | **A-Mem** | Zettelkasten-inspired agentic memory | NeurIPS 2025. Atomic notes with keywords, tags, contextual descriptions |
181
+ | **OpenMemory** | Local-first persistent memory | SQL-native with temporal graphs and entity tracking |
182
+ | **ContextForge** | Three-tier memory system | Auto promotion/demotion. 10x compression ratio |
183
+ | **Hindsight** | Four separate memory networks | 91.4% accuracy on DMR benchmark. Open-source |
184
+ | **Cognee** | Graph-vector hybrid cognitive engine | $7.5M seed, 1M+ pipeline runs, 30+ data connectors |
185
+
186
+ ### Risks
187
+
188
+ - Context pollution degrades response quality
189
+ - Lost-in-the-middle effect with long contexts
190
+ - Memory staleness presenting outdated info as current
191
+ - Over-compaction losing critical nuances
192
+
193
+ ---
194
+
195
+ ## 5. Retrieval, Navigation and Discovery (System 4)
196
+
197
+ ### Hybrid Search as Production Standard (2026)
198
+
199
+ ```
200
+ [User Query]
201
+ -> BM25 (keyword search) -> Top-K results
202
+ -> Dense Embeddings (semantic) -> Top-K results
203
+ -> Knowledge Graph (structured) -> Entities/Relations
204
+ -> Reciprocal Rank Fusion (RRF) -> Merged and Ranked
205
+ -> Cross-Encoder Reranking -> Final Top-N
206
+ -> LLM Generation with Context
207
+ ```
208
+
209
+ **Why BM25 still matters:** Unbeatable for product codes, legal terminology, unique acronyms. For most real RAG applications, full-text search provides precision that vector search alone cannot.
210
+
211
+ ### Vector Database Comparison (2026)
212
+
213
+ | Database | Ideal For | Scale | Latency (P95) |
214
+ |----------|----------|-------|----------------|
215
+ | Pinecone | Production enterprise | Billions | <50ms |
216
+ | Weaviate | Hybrid search native | Hundreds of millions | <100ms |
217
+ | Qdrant | Performance/cost | Hundreds of millions | <100ms |
218
+ | Chroma | Rapid prototyping | Millions | Variable |
219
+ | pgvector | PostgreSQL integration | 5-100M | Variable |
220
+ | Milvus | Cost at scale | Billions | <50ms |
221
+
222
+ Strategy: Start with pgvector/Chroma for prototype, migrate to Pinecone/Weaviate for production.
223
+
224
+ ### GraphRAG
225
+
226
+ Experiments report gains in faithfulness, response relevance, and context recall when integrating structured graph contexts AND dense embeddings:
227
+
228
+ - **Graph:** High-precision evidence, structured by domain
229
+ - **Vector:** Nuanced context coverage and edge cases
230
+ - **Combined:** Governance via graph + flexibility via vectors
231
+
232
+ ### Zep/Graphiti: Temporal Retrieval
233
+
234
+ Retrieval P95 of 300ms through hybrid search combining semantic embeddings, keyword (BM25), and direct graph traversal -- no LLM calls during retrieval. 94.8% on DMR benchmark with gpt-4-turbo. Up to 18.5% accuracy gain with 90% latency reduction.
235
+
236
+ **LazyGraphRAG (Microsoft):** Indexing at vector RAG cost (0.1% of full GraphRAG) with comparable quality for global queries.
237
+
238
+ ### Implementation
239
+
240
+ 1. Dual index: BM25 (full-text) + vector (embeddings) per note
241
+ 2. Graph layer: entity/relation graph for structured navigation
242
+ 3. Hybrid fusion: RRF or learned merging
243
+ 4. Reranking: cross-encoder as second phase
244
+ 5. Context window packing: select and order chunks for maximum utility
245
+ 6. Feedback loop: track which results are actually used
246
+
247
+ ---
248
+
249
+ ## 6. Agent, Subagent and Skills Modeling (System 5)
250
+
251
+ ### Reasoning Patterns
252
+
253
+ | Pattern | Description | Ideal Use |
254
+ |---------|-------------|-----------|
255
+ | ReAct | Reason + Act in loop | Tasks with tools |
256
+ | Tree of Thought | Explore multiple reasoning paths | Problems with multiple solutions |
257
+ | Graph of Thought | Reasoning as graph, merge/refine thoughts | Complex multi-source synthesis |
258
+ | Chain of Thought | Step-by-step linear reasoning | Sequential problems |
259
+ | Reflection | Agent evaluates own output | Quality and self-correction |
260
+
261
+ ### Multi-Agent Orchestration Frameworks (2026)
262
+
263
+ | Framework | Architecture | Control | Maturity |
264
+ |-----------|-------------|---------|----------|
265
+ | LangGraph | State machine with directed graph | Maximum | High |
266
+ | CrewAI | Role-playing + task delegation | Medium | High |
267
+ | OpenAI Agents SDK | Agents with handoffs and guardrails | Medium | High |
268
+ | Claude Agent SDK | Claude-native with tool use | Medium | High |
269
+ | Google ADK | Agent Development Kit | Medium | High |
270
+ | Microsoft Agent Framework | Unifies AutoGen + Semantic Kernel | Medium-High | New (2026) |
271
+ | deepagents (LangChain) | Batteries-included agent harness | Medium | High |
272
+
273
+ **Note:** Microsoft retired AutoGen in favor of the new Microsoft Agent Framework. AutoGen remains in maintenance mode; the community fork AG2 continues independently.
274
+
275
+ ### Architecture for Second Brain
276
+
277
+ ```
278
+ [Main Orchestrator]
279
+ |-- [Capture Agent] -- Monitor sources, ingest
280
+ |-- [Curation Agent] -- Connect, tag, classify
281
+ |-- [Research Agent] -- Search, navigate, discover
282
+ |-- [Synthesis Agent] -- Summarize, combine, produce
283
+ |-- [Quality Agent] -- Validate, score, suggest
284
+ |-- [Maintenance Agent] -- Detect decay, archive, clean
285
+ ```
286
+
287
+ ### Skills as Capability Units
288
+
289
+ Skills are modular capabilities agents can invoke:
290
+ - `/capture` -- Capture insight from conversation
291
+ - `/connect` -- Find and create links between related notes
292
+ - `/remember` -- Retrieve relevant knowledge from vault
293
+ - `/synthesize` -- Combine multiple notes into synthesis
294
+ - `/pipeline` -- Execute complete research pipeline
295
+ - `/graph` -- Visualize knowledge connections
296
+
297
+ ### Implementation
298
+
299
+ 1. Agent-per-concern, not one super-agent
300
+ 2. Shared state via state graph or shared memory
301
+ 3. Tool registry: catalog of available tools per agent
302
+ 4. Handoff protocol: formal transfer between agents
303
+ 5. Skill system: atomic functions agents can compose
304
+ 6. Guardrails: authority limits per agent
305
+
306
+ ---
307
+
308
+ ## 7. Automations, Hooks and Operational Pipelines (System 6)
309
+
310
+ ### Automation Types
311
+
312
+ | Type | Trigger | Example |
313
+ |------|---------|---------|
314
+ | Event Hook | Specific action occurs | End of Claude conversation -> capture insights |
315
+ | Cron Job | Temporal schedule | 11pm BRT daily -> review day's sessions |
316
+ | Watch | Filesystem change | New file in folder -> automatic ingestion |
317
+ | Webhook | External HTTP request | GitHub push -> update project notes |
318
+ | Threshold | Metric exceeds limit | Note not accessed for 90 days -> flag for review |
319
+ | Pipeline | Transformation chain | Conversation -> chunks -> entities -> notes -> links |
320
+
321
+ ### Conversation-to-Knowledge Pipeline
322
+
323
+ ```
324
+ [Claude Code session ends]
325
+ -> Hook: PreCompact captures session digest
326
+ -> Cron (11pm BRT): Haiku reviews all day's sessions
327
+ -> Extract: decisions, insights, facts, actions
328
+ -> For each insight:
329
+ -> Check if already exists in vault
330
+ -> If new: create note with appropriate template
331
+ -> If existing: enrich note with new context
332
+ -> Create links with related notes
333
+ -> Update indices and graphs
334
+ -> Generate daily summary
335
+ ```
336
+
337
+ ### Automation Patterns for Second Brain
338
+
339
+ | Pattern | Frequency | Agent | Action |
340
+ |---------|-----------|-------|--------|
341
+ | Daily Digest | 1x/day | Capture | Review sessions, extract insights |
342
+ | Connection Discovery | Continuous | Curation | Find links between new and existing notes |
343
+ | Decay Detection | 1x/week | Maintenance | Identify outdated notes |
344
+ | Graph Update | Continuous | Curation | Keep knowledge graph synchronized |
345
+ | Quality Scoring | 1x/week | Quality | Score notes by completeness, connections, relevance |
346
+ | Monthly Review | 1x/month | Synthesis | Generate knowledge retrospective |
347
+
348
+ ---
349
+
350
+ ## 8. Governance, Quality and Vault Evolution (System 7)
351
+
352
+ ### Content Decay Types
353
+
354
+ | Type | Example | Detection |
355
+ |------|---------|-----------|
356
+ | Factual | Framework version changed | Compare with external sources |
357
+ | Contextual | Project was cancelled | Status tracking |
358
+ | Relevance | Topic no longer priority | Usage analytics |
359
+ | Structural | Broken links, obsolete tags | Graph validation |
360
+ | Temporal | Note has date but no review deadline | Metadata check |
361
+
362
+ ### Lifecycle Management
363
+
364
+ ```
365
+ [DRAFT] -> [REVIEWED] -> [PUBLISHED] -> [EVERGREEN]
366
+ | |
367
+ v v
368
+ [NEEDS UPDATE] [DEPRECATED]
369
+ | |
370
+ v v
371
+ [UPDATED] [ARCHIVED]
372
+ ```
373
+
374
+ ### Quality Scoring
375
+
376
+ | Dimension | Weight | Metrics |
377
+ |-----------|--------|---------|
378
+ | Completeness | 20% | All sections filled? Links present? |
379
+ | Accuracy | 25% | Verifiable facts? Sources cited? |
380
+ | Connection | 15% | Number and quality of links |
381
+ | Freshness | 20% | Time since last review, access frequency |
382
+ | Utility | 20% | Retrieval frequency, user feedback |
383
+
384
+ **Score interpretation:**
385
+ - >= 80: Evergreen (high confidence)
386
+ - 60-79: Healthy (periodic review)
387
+ - 40-59: Needs Attention (flag for review)
388
+ - < 40: At Risk (archival candidate)
389
+
390
+ ### Implementation
391
+
392
+ 1. Mandatory metadata: created_date, updated_date, review_date, status, owner, quality_score
393
+ 2. Review cycles by content type (technical notes: quarterly, decisions: semi-annual, facts: continuous)
394
+ 3. Automated scoring by quality agent
395
+ 4. Decay alerts when notes fall below threshold
396
+ 5. Git for entire vault -- every change traceable
397
+ 6. Provenance chain: each note knows its origin
398
+
399
+ ---
400
+
401
+ ## 9. Knowledge Analytics and Cognitive Observability (System 8)
402
+
403
+ ### Telemetry Metrics
404
+
405
+ | Metric | What It Measures | Why It Matters |
406
+ |--------|-----------------|----------------|
407
+ | Retrieval Hit Rate | % of searches returning useful results | Index quality |
408
+ | Knowledge Coverage | % of topics covered vs demanded | Vault gaps |
409
+ | Note Utilization | Access frequency per note | Content relevance |
410
+ | Connection Density | Links per note (avg and distribution) | Network richness |
411
+ | Decay Rate | % of notes becoming outdated per period | Vault health |
412
+ | Ingestion Velocity | Notes created per day/week | Capture pace |
413
+ | Synthesis Rate | Synthetic notes vs raw notes | Knowledge maturity |
414
+ | Agent Token Usage | Tokens consumed per operation | Operational cost |
415
+ | Query Latency | Retrieval response time | Performance |
416
+ | Context Relevance | Relevance score of retrieved context | RAG quality |
417
+
418
+ ### Observability Tools (2025-2026)
419
+
420
+ | Tool | Focus |
421
+ |------|-------|
422
+ | LangWatch | LLM observability -- traces, evaluations, guardrails |
423
+ | Datadog LLM Obs | Enterprise integration with existing stack |
424
+ | Langfuse | Open-source -- traces, scores, datasets |
425
+ | Arize Phoenix | ML observability -- drift detection, embeddings |
426
+ | Monte Carlo | Data observability -- quality for RAG |
427
+
428
+ ---
429
+
430
+ ## 10. Research, Synthesis and Knowledge Production (System 10)
431
+
432
+ ### Deep Research (2025-2026)
433
+
434
+ - **OpenAI Deep Research:** Retrieves, reads, critiques, synthesizes hundreds of papers in under an hour
435
+ - **Google Gemini Deep Research:** Synthesizes from dozens of independent sources
436
+ - **The AI Scientist (Sakana AI):** Creates research ideas, writes code, runs experiments, writes manuscripts, performs peer review. Published in Nature (March 2026)
437
+
438
+ ### Research Pipeline
439
+
440
+ ```
441
+ [Question/Topic]
442
+ -> Decompose into sub-questions
443
+ -> Parallel search across multiple sources
444
+ -> For each source:
445
+ -> Retrieval (web, vault, papers)
446
+ -> Claim/fact extraction
447
+ -> Credibility evaluation
448
+ -> Cross-reference between sources
449
+ -> Identify convergences and divergences
450
+ -> Structured synthesis
451
+ -> Citation verification
452
+ -> Formatted output (note, article, report)
453
+ ```
454
+
455
+ ### Synthesis Methods
456
+
457
+ | Method | Description | When to Use |
458
+ |--------|-------------|-------------|
459
+ | Aggregation | Combine facts from multiple sources | Topic overview |
460
+ | Comparison | Contrast approaches/perspectives | Decisions between alternatives |
461
+ | Narrative | Build coherent story from facts | Communication and teaching |
462
+ | Framework | Extract mental model from data | Structural comprehension |
463
+ | Gap Analysis | Identify what is MISSING | Direct future research |
464
+ | Contradiction | Identify conflicts between sources | Validation and verification |
465
+
466
+ ### Research Tools (2026)
467
+
468
+ | Tool | Type | Highlight |
469
+ |------|------|-----------|
470
+ | Elicit | Paper discovery + synthesis | 138M papers, 99.4% screening accuracy |
471
+ | Consensus | Evidence-based answers | Scientific corpus search |
472
+ | Scite.ai | Citation analysis | Verify if papers were supported/contrasted |
473
+ | Perplexity | General research | Web search + inline citations |
474
+
475
+ ---
476
+
477
+ ## 11. Infrastructure, Portability and Resilience (System 11)
478
+
479
+ ### Core Principles
480
+
481
+ | Principle | Implementation |
482
+ |-----------|---------------|
483
+ | Local-First | Filesystem local as source of truth |
484
+ | Plain Text | Markdown as universal format |
485
+ | Git-Versioned | Full change history traceable |
486
+ | Cloud-Synced | Backup as secondary layer |
487
+ | Portable | No specific runtime dependencies |
488
+ | Resilient | 3-2-1 backup strategy |
489
+
490
+ ### Filesystem Design
491
+
492
+ ```
493
+ vault/
494
+ 00-inbox/ # Quick capture, unprocessed
495
+ 01-daily/ # Daily notes, session logs
496
+ 02-projects/ # Active project notes
497
+ 03-areas/ # Ongoing responsibility areas
498
+ 04-resources/ # Reference material
499
+ 05-archive/ # Archived projects and notes
500
+ 06-templates/ # Templates for new note types
501
+ 07-agents/ # Agent configuration and memory
502
+ 08-analytics/ # Metrics and vault health reports
503
+ _attachments/ # Images, PDFs, media
504
+ _data/ # Structured data (JSON, YAML)
505
+ ```
506
+
507
+ ### Backup Strategy (3-2-1)
508
+
509
+ | Layer | Medium | Frequency | Retention |
510
+ |-------|--------|-----------|-----------|
511
+ | L1 | Git local (commits) | Every change | Unlimited |
512
+ | L2 | Cloud sync (OneDrive) | Real-time | 30 days of versions |
513
+ | L3 | Git remote (GitHub/private) | Daily push | Unlimited |
514
+ | L4 | External SSD (encrypted) | Weekly | Unlimited |
515
+
516
+ ---
517
+
518
+ ## 12. Orchestration for Obsidian + Claude Code (System 12)
519
+
520
+ ### Why This Stack
521
+
522
+ Obsidian is the most mature and extensible local-first vault tool. Claude Code is the AI agent with the greatest capability to operate on local filesystems. The combination is, in 2026, the most powerful stack for Agentic Second Brains.
523
+
524
+ ### Key Integrations (2025-2026)
525
+
526
+ **Claudian:** Obsidian plugin embedding AI agents (Claude Code, Codex) as vault collaborators. Vault becomes the agent's working directory with full agentic capabilities. ~4K GitHub stars.
527
+
528
+ **Obsidian Agent Skills (Jan 2026):** Official repository by Obsidian CEO (Steph Ango/Kepano) teaching AI agents to correctly handle wikilinks, frontmatter, Bases databases, and JSON Canvas. Obsidian 1.12 introduced a native CLI dramatically facilitating agent integration.
529
+
530
+ **obsidian-claude-pkm (Starter Kit):** Complete kit with 4 specialized agents with memory, 10 skills, auto-commit hooks, and agents that use memory to learn user patterns between sessions.
531
+
532
+ ### CLAUDE.md as Vault Constitution
533
+
534
+ Claude Code reads CLAUDE.md at project root every session -- analogous to the SINAPSE Constitution. For Second Brain vaults, this file defines:
535
+
536
+ - Vault structure and conventions
537
+ - Agent permissions and boundaries
538
+ - Capture and curation rules
539
+ - Quality standards
540
+ - Automation triggers
541
+
542
+ ### Human-Machine Interface
543
+
544
+ | Interface | Function | Complexity |
545
+ |-----------|----------|-----------|
546
+ | Quick Capture | Rapid idea/insight input | Minimal |
547
+ | Search Bar | Semantic + keyword search | Low |
548
+ | Note Editor | Edit with connection preview | Medium |
549
+ | Graph View | Knowledge network visualization | Medium-High |
550
+ | Dashboard | Health metrics, gaps, trends | Medium |
551
+ | Agent Chat | Natural conversation with vault | Low |
552
+ | Command Palette | Skills and automations by command | Low |
553
+
554
+ ### Progressive Disclosure for Second Brain UX
555
+
556
+ 1. **Level 1:** Quick capture (one text box, one button)
557
+ 2. **Level 2:** Note created with basic metadata and suggested connections
558
+ 3. **Level 3:** Full editing, tags, manual links, template selection
559
+ 4. **Level 4:** Graph view, analytics, bulk operations
560
+
561
+ ---
562
+
563
+ ## 13. Key People and References
564
+
565
+ ### Researchers and Practitioners
566
+
567
+ | Person | Contribution |
568
+ |--------|-------------|
569
+ | Niklas Luhmann | Zettelkasten creator, proved knowledge architecture scales |
570
+ | Tiago Forte | Popularized "Building a Second Brain" (BASB) with PARA method |
571
+ | Andy Matuschak | Evergreen Notes concept |
572
+ | Andrej Karpathy | Defined Context Engineering (2025) |
573
+ | Simon Willison | "Context engineering is what we do instead of fine-tuning" |
574
+ | Vannevar Bush | Memex concept (1945) |
575
+ | Doug Engelbart | "Augmenting Human Intellect" framework (1962) |
576
+
577
+ ### Key Tools and Frameworks
578
+
579
+ | Tool | Category | Differentiator |
580
+ |------|----------|---------------|
581
+ | Obsidian | PKM vault | Plugin ecosystem, graph view, markdown, local-first |
582
+ | Graphiti/Zep | Temporal graph | Bi-temporal model, provenance tracking |
583
+ | Mem0 | Memory layer | 26% accuracy gain, 90% token reduction |
584
+ | Letta (MemGPT) | Virtual context | OS-inspired, #1 Terminal-Bench |
585
+ | Cognee | Cognitive engine | Graph-vector hybrid, 30+ connectors |
586
+ | ContextForge | Three-tier memory | Auto promotion/demotion, 10x compression |
587
+
588
+ ---
589
+
590
+ *Knowledge base compiled from research conducted by Scope (Research Analyst) -- SINAPSE Research Initiative*
591
+ *Research: MS-009 Agentic Second Brain Engineering | 67 sources | April 2026*