269c380d9c
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>
97 lines
6.5 KiB
Markdown
97 lines
6.5 KiB
Markdown
## 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
|