Wiki/grafo: graphify + wiki-brain setup compartilhado pra equipe

CLAUDE.md com 3 secoes (navegacao, regras de sessao, doc pra equipe).
Vault Obsidian/Brain/ commitado pra time editar conhecimento curado.
graphify-out/ no gitignore (regeneravel via /graphify src/).
Binarios do Obsidian.exe ignorados, so vault Brain/ vai pro repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Leonardo
2026-05-04 11:40:59 -03:00
parent b331d68572
commit 269c380d9c
8 changed files with 209 additions and 0 deletions
+12
View File
@@ -41,3 +41,15 @@ playwright-report/
informacoes Gerais.txt
pasteds.txt
commit.txt
# Graphify outputs — regeneráveis via /graphify ou graphify update
graphify-out/
**/graphify-out/
# Obsidian: ignorar binarios do app, comitar SO o vault Brain/
Obsidian/*
!Obsidian/Brain/
# Estado local do Obsidian (workspace, hot-keys do dev) — não compartilhar
Obsidian/Brain/.obsidian/workspace*.json
Obsidian/Brain/.obsidian/hotkeys.json
+96
View File
@@ -0,0 +1,96 @@
## Navegação de Contexto
Quando precisar entender o código, documentos ou quaisquer arquivos deste projeto:
1. SEMPRE consulte o grafo de conhecimento primeiro: `/graphify query "sua pergunta"`
2. Só leia arquivos brutos se eu disser explicitamente "leia o arquivo" ou "veja o arquivo bruto"
3. Use `graphify-out/wiki/index.md` como ponto de entrada para navegar pela estrutura
---
## Para a Equipe — Sistema de Wiki/Grafo
> Este projeto usa um grafo de conhecimento (graphify) + wiki curado (wiki-brain) pra acelerar o trabalho do Claude e da equipe. O grafo mapeia o código automaticamente; a wiki acumula decisões, gotchas e blueprints.
### Estrutura
- `graphify-out/` — gerado automaticamente. **Não commitar** (já no .gitignore). Cada dev gera o seu localmente.
- `graph.html` — visualização interativa, abre no browser
- `graph.json` — dados brutos do grafo (consultáveis via `graphify query`)
- `wiki/` — 477+ artigos auto-gerados (1 por comunidade + god nodes), cross-linkados em estilo Obsidian
- `GRAPH_REPORT.md` — relatório auditável: god nodes, comunidades, conexões surpreendentes
- `Obsidian/Brain/` — vault Obsidian compartilhado. **É commitado**.
- `wiki/` — páginas curadas pela equipe (decisões, blueprints, gotchas) — esse é o que cresce com o tempo
- `raw/` — fontes imutáveis ingeridas (PDFs, links, transcrições)
- `log.md` — registro cronológico do que foi ingerido/decidido
### Setup local (uma vez por dev)
1. Garantir Python 3.10+ instalado
2. Instalar graphify: `pip install graphifyy`
3. Verificar: `graphify --help` (deve listar comandos)
4. Pronto. As skills `/graphify` e `/wiki-brain` já vêm com o Claude Code instaladas via `~/.claude/skills/`.
### Como acessar (modos de visualização)
- **Visual rápido** (sem instalar nada): `start graphify-out\graph.html` no Windows ou `xdg-open` no Linux. Abre no browser, navegação por arrastar e clicar.
- **Wiki crawlable**: abrir Obsidian → "Open another vault" → apontar pra `agenciapsi-primesakai\graphify-out\wiki\`. Navega com cliques nos `[[wikilinks]]` e graph view nativa.
- **Wiki curado**: abrir Obsidian → "Open another vault" → apontar pra `agenciapsi-primesakai\Obsidian\Brain\`. É onde a equipe edita.
- **Via Claude**: digitar `/graphify query "sua pergunta"` em qualquer sessão — retorna BFS no grafo, citando fontes.
### Como regenerar (cada dev no seu local)
- **Full rebuild** (lê o código + LLM, ~1M tokens, demorado): `/graphify D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\src` no Claude Code. Roda quando há mudança grande de arquitetura.
- **Update incremental** (só AST, sem LLM, rápido): `graphify update D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\src` no terminal. Roda depois de commits que mudam código mas não a arquitetura.
- **Só recluster** (sem reextração): `graphify cluster-only D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\src --no-viz`
### Como contribuir pro wiki curado (`Obsidian/Brain/wiki/`)
- Tomou uma decisão arquitetural? Criou um blueprint? Achou um gotcha? Anota lá.
- Pedir pro Claude: "ingere essa decisão sobre X no wiki" — ele cria a página com cross-links e atualiza `index.md`.
- Cross-link agressivo: usar `[[Nome da Página]]` (sintaxe Obsidian). Página sem links de entrada é beco sem saída.
- Commitar quando salvar — é conhecimento compartilhado da equipe.
### Convenções importantes
- **Nunca editar `graphify-out/` à mão** — é regenerado, qualquer mudança é perdida
- **Nunca modificar `Obsidian/Brain/raw/`** — fontes são imutáveis
- **Sempre commitar mudanças em `Obsidian/Brain/wiki/`** — é onde o conhecimento composto vive
- Antes de sessão grande de Claude, considerar `graphify update src/` pra grafo atualizado
---
## Context Navigation (Wiki-Brain)
You have access to a personal wiki at `D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\Obsidian\Brain`. This is the user's compounding knowledge base. Use it as your primary context source.
When you need to understand the codebase, docs, past work, or any stored knowledge:
1. **ALWAYS query the knowledge graph first:** `graphify query "your question"` (run from `D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\Obsidian\Brain`).
2. **Use `D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\Obsidian\Brain/wiki/index.md`** as your navigation entrypoint for browsing the wiki structure.
3. **Use `D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\Obsidian\Brain/graphify-out/wiki/index.md`** if it exists — it's the auto-generated Graphify wiki index.
4. **Only read raw files in `D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\Obsidian\Brain/raw/`** if the user explicitly says "read the raw file" or the graph query doesn't have the answer.
## Wiki-Brain Session Rules
**Ingesting sources.** When the user drops a file into `D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\Obsidian\Brain/raw/` and asks you to ingest it, follow `/wiki-brain ingest` — read the source, summarize, create/update wiki pages, cross-link aggressively, update `wiki/index.md`, append to `log.md`.
**Every session must end with a log entry.** Before ending a session, append one line to `D:\leonohama\AgenciaPsi.com.br\Sistema\agenciapsi-primesakai\Obsidian\Brain/log.md` in this exact format:
```
## [YYYY-MM-DD HH:MM] session | <3-8 word session title>
Touched: <comma-separated wiki pages, or "none">
```
**If the session produced durable knowledge** (decisions made, things learned, project state changed, problems solved) — update or create relevant wiki pages with that knowledge before ending. Cross-link with `[[Page Name]]`. Update `wiki/index.md`.
**If the session was trivial** (one-off fix, routine task, exploratory chatter) — skip the wiki update. Just append the log line.
**Never modify files in `raw/`.** Sources are immutable.
**Claude owns `wiki/` entirely.** Update it, don't ask permission for each page — just report what changed.
**Always update `wiki/index.md`** when you create or rename a wiki page.
**Cross-link aggressively.** `[[Page Name]]` Obsidian syntax. A page with no inbound links is a dead-end.
## Wiki-Brain Commands Available
- `/wiki-brain` — status menu
- `/wiki-brain ingest <file>` — ingest a source
- `/wiki-brain query "<q>"` — query the graph + wiki
- `/wiki-brain lint` — health-check the wiki
- `/wiki-brain rebuild` — force a Graphify rebuild
- `/wiki-brain doctor` — verify install
- `/recall` — show last 5 activities + read linked pages
+3
View File
@@ -0,0 +1,3 @@
{
"promptDelete": false
}
+1
View File
@@ -0,0 +1 @@
{}
+33
View File
@@ -0,0 +1,33 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"footnotes": false,
"properties": true,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": true,
"bases": true,
"webviewer": false
}
+22
View File
@@ -0,0 +1,22 @@
{
"collapse-filter": true,
"search": "",
"showTags": false,
"showAttachments": false,
"hideUnresolved": false,
"showOrphans": true,
"collapse-color-groups": true,
"colorGroups": [],
"collapse-display": true,
"showArrow": false,
"textFadeMultiplier": 0,
"nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1,
"collapse-forces": true,
"centerStrength": 0.518713248970312,
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
"scale": 1,
"close": true
}
+15
View File
@@ -0,0 +1,15 @@
# Wiki Log
Chronological, append-only record of everything that's happened in this wiki.
**Format:**
```
## [YYYY-MM-DD HH:MM] <type> | <title>
<optional detail line>
```
**Types:** `session`, `ingest`, `query`, `lint`, `rebuild`
**Quick access:** `grep "^## \[" log.md | tail -5` gives you the last 5 entries.
---
+27
View File
@@ -0,0 +1,27 @@
# Wiki Index
This is the catalog of every page in your wiki. Claude updates it automatically.
**Pattern:** `- [[Page Name]] — one-line summary`
---
## Entities
_(people, places, organizations, products — pages that describe a thing)_
## Concepts
_(ideas, frameworks, patterns, principles — pages that describe a concept)_
## Sources
_(summaries of specific sources you've ingested)_
## Analyses
_(synthesized answers to questions you've asked, filed back as pages)_
---
*This index is maintained by Claude via `/wiki-brain`. Do not edit by hand unless you know what you're doing.*