38 lines
1.8 KiB
Markdown
38 lines
1.8 KiB
Markdown
|
|
---
|
||
|
|
description: Write evergreen knowledge to the SecondBrain vault with correct frontmatter and scope
|
||
|
|
---
|
||
|
|
|
||
|
|
Use this skill when you have knowledge that should persist across projects and sessions.
|
||
|
|
|
||
|
|
## Evergreen vs. ephemeral test
|
||
|
|
|
||
|
|
**Write to vault if:** the knowledge is reusable across projects (tool/API behavior, client-specific facts, conventions, cross-project patterns). Vault is for knowledge that survives the current session.
|
||
|
|
|
||
|
|
**Do NOT write to vault:** project-ephemeral state (current task, in-progress decisions, temporary context). These belong in project files or the episodic layer (session journal — handled automatically by SessionEnd hook).
|
||
|
|
|
||
|
|
## Required frontmatter contract
|
||
|
|
|
||
|
|
Every vault note must have:
|
||
|
|
|
||
|
|
```yaml
|
||
|
|
---
|
||
|
|
summary: <one-line router hint — write at creation, do not defer>
|
||
|
|
tags:
|
||
|
|
- scope/global # or scope/project (required)
|
||
|
|
- type/<...> # required — one of: procedure, reference, log, hub, concept, decision
|
||
|
|
- <facet-tag> # required — at least one of: client/<n>, project/<n>, domain/<n>, tool/<n>, convention/<n>
|
||
|
|
---
|
||
|
|
```
|
||
|
|
|
||
|
|
All three tag groups are required. `type/` classifies the note; the facet tag routes it to the right context.
|
||
|
|
|
||
|
|
**Write `summary` now.** It is the primary router hint for graph traversal and memsearch. Deferring it breaks retrieval.
|
||
|
|
|
||
|
|
## Vault-not-repo rule
|
||
|
|
|
||
|
|
Write ONLY to `~/Documents/SecondBrain`. Never silently write to a project repository what belongs in the vault. If in doubt, write to the vault.
|
||
|
|
|
||
|
|
## PostToolUse hook is automatic
|
||
|
|
|
||
|
|
When you write or edit a `.md` file in the vault, the PostToolUse hook records the vault write and invalidates the rebuild stamp — the graph refreshes incrementally (via `graphify extract --update`) at the next session start, not immediately. You do not need to run graphify manually.
|