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,423 @@
1
+ # Obsidian + Claude Code Integration
2
+
3
+ > Patterns for connecting Obsidian vaults with Claude Code agents. Based on MS-009 Sistema 12 + production patterns.
4
+
5
+ ---
6
+
7
+ ## The Stack: Obsidian + Claude Code
8
+
9
+ In 2026, this is the most powerful combination for Agentic Second Brains:
10
+
11
+ - **Obsidian:** Most mature local-first vault tool, 1,000+ plugins, graph view, markdown-native
12
+ - **Claude Code:** Agent runtime with filesystem access, hooks, skills, MCP support
13
+ - **MCP:** Protocol connecting the two (filesystem, search, vault operations)
14
+
15
+ **Architecture:**
16
+ ```
17
+ +--------------------+ +-------------------+
18
+ | OBSIDIAN | | CLAUDE CODE |
19
+ | (UI + Plugins) | | (Agent Runtime) |
20
+ | | | |
21
+ | Graph View <---+---->| Vault Access |
22
+ | Editor <---+---->| File Read/Write |
23
+ | Search <---+---->| Grep/Glob |
24
+ | Templates <---+---->| Note Generation |
25
+ | Daily Notes <---+---->| Daily Pipeline |
26
+ | | | |
27
+ +--------+-----------+ +--------+----------+
28
+ | |
29
+ v v
30
+ +--------+-----------+ +--------+----------+
31
+ | LOCAL FILESYSTEM | | MCP LAYER |
32
+ | (Markdown Vault) | | (Tool Protocol) |
33
+ +--------+-----------+ +--------+----------+
34
+ | |
35
+ v v
36
+ +--------+-----------+ +--------+----------+
37
+ | GIT | | VECTOR STORE |
38
+ | (Version Control) | | (Embeddings) |
39
+ +--------------------+ +-------------------+
40
+ ```
41
+
42
+ ---
43
+
44
+ ## CLAUDE.md as Vault Constitution
45
+
46
+ Claude Code reads CLAUDE.md at session start as permanent agent instructions. In a vault, this becomes the **constitution of knowledge governance**.
47
+
48
+ ### Template: Vault CLAUDE.md
49
+
50
+ ```markdown
51
+ # Second Brain Constitution
52
+
53
+ ## Vault Rules
54
+ - Every note MUST have frontmatter: date, tags, status
55
+ - Links use [[wikilink]] format
56
+ - One idea = one note (atomicity rule)
57
+ - Capture notes go to 00-inbox/
58
+ - Processed notes move to appropriate folder
59
+
60
+ ## Agent Permissions
61
+ | Agent | Can Write | Read-Only |
62
+ |-------|-----------|-----------|
63
+ | Capture Agent | 00-inbox/ | — |
64
+ | Curation Agent | All folders (link, tag, move) | — |
65
+ | Research Agent | 00-inbox/ only | Everything |
66
+ | Maintenance Agent | Status fields only | Everything |
67
+
68
+ ## Knowledge Standards
69
+ - Every factual claim needs a source
70
+ - Dates: created_date + updated_date on every note
71
+ - Review schedule by type:
72
+ - Technical notes: quarterly
73
+ - Decisions: semi-annually
74
+ - Facts: continuous verification
75
+
76
+ ## Compact instructions
77
+ - Preserve current note path being edited
78
+ - Preserve any pending vault operations
79
+ - Preserve connection suggestions not yet applied
80
+
81
+ ## Naming Conventions
82
+ - Files: lowercase-with-hyphens.md
83
+ - Dates: YYYY-MM-DD format
84
+ - No special characters except hyphens and underscores
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Conversation-to-Knowledge Pipeline
90
+
91
+ ### The Core Automation
92
+
93
+ ```
94
+ [Claude Code session ends]
95
+
96
+ PreCompact hook captures session digest
97
+
98
+ Cron job (e.g., daily at 23:00) triggers review agent
99
+
100
+ For each session:
101
+ Extract: decisions, insights, facts, patterns
102
+ Classify by note type
103
+ For each extracted item:
104
+ Semantic search in vault for duplicates
105
+ If new: create note from template
106
+ If existing: enrich with new context
107
+ Auto-link with related notes
108
+
109
+ Update knowledge graph indices
110
+
111
+ Generate daily summary in 01-daily/
112
+
113
+ Git commit + push (backup)
114
+ ```
115
+
116
+ ### PreCompact Hook for Session Capture
117
+
118
+ ```bash
119
+ #!/bin/bash
120
+ # .claude/hooks/capture-session-digest.sh
121
+ # Runs before each compaction — captures session digest
122
+
123
+ SESSION_ID="${CLAUDE_SESSION_ID:-unknown}"
124
+ DATE=$(date +%Y-%m-%d)
125
+ VAULT_SESSIONS="$HOME/vault/01-daily/sessions"
126
+
127
+ mkdir -p "$VAULT_SESSIONS"
128
+
129
+ # Write digest to vault
130
+ cat > "$VAULT_SESSIONS/session-$SESSION_ID-$DATE.md" << EOF
131
+ ---
132
+ date: $DATE
133
+ session_id: $SESSION_ID
134
+ type: session-digest
135
+ status: unprocessed
136
+ ---
137
+
138
+ # Session Digest
139
+
140
+ ## Summary
141
+ $HOOK_COMPACT_SUMMARY
142
+
143
+ ## Key Decisions
144
+ $HOOK_KEY_DECISIONS
145
+
146
+ ## Files Modified
147
+ $HOOK_FILES_MODIFIED
148
+ EOF
149
+
150
+ exit 0
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Obsidian-Specific Note Format
156
+
157
+ ### Standard Note Frontmatter
158
+
159
+ ```yaml
160
+ ---
161
+ title: "Note Title"
162
+ date: 2026-04-10
163
+ updated: 2026-04-10
164
+ tags: [tag1, tag2, area/subtopic]
165
+ status: draft|active|evergreen|archived
166
+ type: concept|decision|insight|reference|project|person
167
+ source: "URL or source reference"
168
+ related: [[note-a]], [[note-b]]
169
+ review_by: 2026-07-01
170
+ ---
171
+ ```
172
+
173
+ ### Wikilink Handling for Agents
174
+
175
+ Obsidian uses `[[wikilinks]]` not standard markdown links. Agents must use this format when creating/editing vault notes.
176
+
177
+ **Correct (Obsidian):**
178
+ ```markdown
179
+ See [[context-engineering-guide]] for details.
180
+ Related to [[memory-systems-reference]].
181
+ ```
182
+
183
+ **Wrong (standard markdown):**
184
+ ```markdown
185
+ See [context engineering guide](context-engineering-guide.md) for details.
186
+ ```
187
+
188
+ ### Frontmatter for Bases Databases (Obsidian 1.12+)
189
+
190
+ Obsidian 1.12 introduced structured databases using frontmatter. Agents should write compatible frontmatter:
191
+
192
+ ```yaml
193
+ ---
194
+ # For project tracking database
195
+ project: "Sprint 23"
196
+ story_id: "2.3"
197
+ status: "InProgress"
198
+ priority: "High"
199
+ assignee: "Caio"
200
+ due_date: 2026-04-15
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Skills for Vault Operations
206
+
207
+ ### /capturar — Capture Insight to Vault
208
+
209
+ ```yaml
210
+ ---
211
+ name: capturar
212
+ description: |
213
+ Capture an insight, decision, or fact from the current conversation to the Obsidian vault.
214
+ Use when: user says "capture this", "save this to my vault", "remember this insight",
215
+ or when a significant decision or insight emerges that should be preserved.
216
+ ---
217
+
218
+ ## Process
219
+
220
+ 1. Identify the core insight (1-3 sentences, distilled)
221
+ 2. Determine note type: concept | decision | insight | reference
222
+ 3. Search vault for existing related notes (use Grep + Glob)
223
+ 4. If note exists: ENRICH (add new context, update date)
224
+ 5. If new: CREATE from template (see below)
225
+ 6. Add [[wikilinks]] to related existing notes
226
+ 7. Move to appropriate folder based on type
227
+
228
+ ## Template: New Insight Note
229
+
230
+ ```frontmatter
231
+ ---
232
+ title: "{Title}"
233
+ date: {today}
234
+ updated: {today}
235
+ tags: [{domain}, insight]
236
+ status: draft
237
+ type: insight
238
+ source: "Claude Code session {session_id}"
239
+ related: {related_notes}
240
+ ---
241
+
242
+ # {Title}
243
+
244
+ {Distilled insight in 1-3 sentences}
245
+
246
+ ## Context
247
+ {When/where/why this insight emerged}
248
+
249
+ ## Implications
250
+ {What this means for the work}
251
+
252
+ ## Open Questions
253
+ {What remains uncertain}
254
+ ```
255
+ ```
256
+
257
+ ### /conectar — Find and Create Links
258
+
259
+ ```yaml
260
+ ---
261
+ name: conectar
262
+ description: |
263
+ Find existing vault notes related to a given concept and create [[wikilinks]] between them.
264
+ Use when: after creating a new note, when user says "connect this to vault",
265
+ or when patterns of related notes are detected.
266
+ ---
267
+
268
+ ## Process
269
+
270
+ 1. Extract key concepts from source note
271
+ 2. For each concept:
272
+ a. Grep vault for mentions
273
+ b. Glob for notes with similar titles
274
+ c. Semantic check: are these actually related?
275
+ 3. For confirmed connections:
276
+ a. Add [[link]] to source note
277
+ b. Add [[link]] back in target note (bidirectional)
278
+ 4. Report connections created
279
+ ```
280
+
281
+ ### /lembrar — Retrieve from Vault
282
+
283
+ ```yaml
284
+ ---
285
+ name: lembrar
286
+ description: |
287
+ Search and retrieve relevant knowledge from the Obsidian vault.
288
+ Use when: user asks "what do I know about X?", "what did we decide about Y?",
289
+ "find my notes on Z", or when grounding a response in vault knowledge.
290
+ ---
291
+
292
+ ## Process
293
+
294
+ 1. Extract query concepts
295
+ 2. Hybrid search:
296
+ a. Grep for exact keyword matches
297
+ b. Search by tags (frontmatter)
298
+ c. Search by title patterns
299
+ 3. Rank results by:
300
+ - Recency (updated_date)
301
+ - Relevance (keyword density)
302
+ - Quality (status: evergreen > active > draft)
303
+ 4. Return: note paths + excerpts + quality scores
304
+ ```
305
+
306
+ ---
307
+
308
+ ## Automation Patterns
309
+
310
+ ### Daily Digest Pipeline
311
+
312
+ ```
313
+ Trigger: cron 23:00 BRT daily
314
+ Agent: Haiku (cost-effective for batch processing)
315
+ Input: All session digests in 01-daily/sessions/ from today
316
+
317
+ For each session digest:
318
+ 1. Extract: decisions, insights, facts, patterns, actions
319
+ 2. For each item:
320
+ a. Check vault for duplicates (semantic)
321
+ b. Create or enrich note
322
+ c. Connect to related notes
323
+ 3. Archive session digest (status: processed)
324
+
325
+ Output: 01-daily/{date}.md with:
326
+ - Key insights captured
327
+ - Connections created
328
+ - Knowledge gaps identified
329
+ - Stats: notes created, enriched, connected
330
+ ```
331
+
332
+ ### Connection Discovery (Background)
333
+
334
+ ```
335
+ Trigger: When new note created in vault
336
+ Agent: Haiku (read-only access)
337
+
338
+ 1. Extract entities and concepts from new note
339
+ 2. Search vault for notes mentioning same entities
340
+ 3. Generate connection suggestions
341
+ 4. Write suggestions to note frontmatter: suggested_links: []
342
+ 5. User or curation agent confirms/creates actual links
343
+ ```
344
+
345
+ ### Decay Detection (Weekly)
346
+
347
+ ```
348
+ Trigger: cron Sunday 09:00 BRT weekly
349
+ Agent: Haiku (read-only access)
350
+
351
+ For each note in vault:
352
+ If updated_date older than threshold for type:
353
+ - Technical notes: 90 days
354
+ - Decisions: 180 days
355
+ - Facts: 45 days
356
+ Add to decay_report.md with:
357
+ - Note path
358
+ - Last updated date
359
+ - Suggested action (review/update/archive)
360
+ ```
361
+
362
+ ---
363
+
364
+ ## Git Integration for Vault
365
+
366
+ ### Auto-Commit Pattern
367
+
368
+ ```bash
369
+ #!/bin/bash
370
+ # Runs after each vault modification session
371
+
372
+ cd "$VAULT_PATH"
373
+ git add -A
374
+ git commit -m "vault: daily update $(date +%Y-%m-%d)" --allow-empty-message
375
+ git push origin main --quiet
376
+ ```
377
+
378
+ ### 3-2-1 Backup Strategy
379
+
380
+ | Layer | Medium | Frequency | Retention |
381
+ |-------|--------|-----------|-----------|
382
+ | L1 | Git local (commits) | Every change | Unlimited |
383
+ | L2 | Cloud sync (OneDrive/iCloud) | Real-time | 30 days versions |
384
+ | L3 | Git remote (GitHub private) | Daily push | Unlimited |
385
+ | L4 | Encrypted external SSD | Weekly | Unlimited |
386
+
387
+ ---
388
+
389
+ ## Caio's Vault Architecture
390
+
391
+ ### Current Configuration
392
+
393
+ **Path:** `C:\Users\Caio Imori\OneDrive\Caio Imori\3. B U S I S S N E S\ClaudeCode\#AI-Projects\Second-Brain`
394
+
395
+ **Routing:** `~/.claude/vault-routing.json` maps project domains to vault notes.
396
+
397
+ **Auto-grounding:** `vault-grounding.cjs` hook injects relevant vault context at session start based on project domain.
398
+
399
+ ### Domain Mapping
400
+
401
+ | Domain | Vault Note | What It Covers |
402
+ |--------|-----------|----------------|
403
+ | SINAPSE | sinapse-ai-framework.md, sinapse.md | Framework, course, platform |
404
+ | Astro Brand Studio | astro-brand-studio.md | Agency, services, clients |
405
+ | @caioimori | marca-pessoal-caioimori.md | Personal brand, content |
406
+ | Colegio Modulo | colegio-modulo.md | Marketing, branding |
407
+
408
+ ### Session Capture
409
+
410
+ Every Claude Code session generates a strategic summary in `ops/sessions/` via the daily cronjob (2:30 AM BRT).
411
+
412
+ ---
413
+
414
+ ## Troubleshooting
415
+
416
+ | Issue | Cause | Fix |
417
+ |-------|-------|-----|
418
+ | Wikilinks not resolving | Agent using markdown links | Ensure SKILL.md teaches [[wikilink]] format |
419
+ | Notes in wrong folder | Missing PARA classification in template | Add explicit folder rules to vault CLAUDE.md |
420
+ | Duplicate notes created | Missing semantic dedup step | Add Grep/Glob search before creating new notes |
421
+ | Frontmatter invalid | Special characters in YAML | Use quoted strings for values with colons |
422
+ | Obsidian not seeing new files | Sync delay | Trigger manual vault refresh or use Obsidian CLI |
423
+ | Agent modifying wrong notes | No scope constraints | Add explicit path restrictions to agent permissions |