chore: troca Graphify por OpenWolf

- CLAUDE.md com as instruções do OpenWolf
- .claude/ com regras, hooks e comandos do OpenWolf
- .gitignore: ignora /book/ (projeto privado à parte) e /.wolf/ (memória local)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Opus 5.5 committed 2026-10-06 17:03:13 -03:00
1 parent b7c82f5c68
commit 0e622debe9
9 files changed
+344 -8

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
---
description: Screenshot-based design review of the running app via openwolf designqc
argument-hint: [--url <url>] [--routes <routes>]
---
Arguments: $ARGUMENTS
Evaluate and improve the design/UI of this app:
1. Run `openwolf designqc` via Bash to capture screenshots (pass through any arguments given above).
- The command auto-detects a running dev server, or starts one from package.json if needed.
- Use `--url <url>` only if auto-detection fails.
- Compressed JPEG screenshots land in `.wolf/designqc-captures/`; full pages are captured as sectioned viewport-height images (top, section2, ..., bottom).
2. Read the captured screenshots from `.wolf/designqc-captures/` with the Read tool.
3. Evaluate against modern standards (Shadcn UI, Tailwind, clean React patterns):
- Spacing and whitespace consistency
- Typography hierarchy and readability
- Color contrast and accessibility (WCAG)
- Visual hierarchy and focal points
- Component consistency
- Whether the design looks generic ("white-coded", no personality)
4. Provide specific, actionable feedback with fix suggestions.
5. If the user approves, implement the fixes directly in their code.
6. Re-run `openwolf designqc` to verify the improvement.
Token awareness: each screenshot costs about 2,500 tokens. For large apps, use `--routes / /specific-page` to limit captures.
+25
View File
@@ -0,0 +1,25 @@
Regenerate `.wolf/STATUS.md` as a session handoff document. $ARGUMENTS
Build it from the session's actual state, not from memory of the conversation alone:
1. Read the current `.wolf/STATUS.md` to preserve its structure and any still-relevant open items.
2. Run `git status --short` and `git log --oneline -8` to see what actually changed.
3. Skim the latest session block of `.wolf/memory.md` for the action log.
Then rewrite `.wolf/STATUS.md` with:
- `## ✅ Done` : what this session completed, one line each, concrete (files, features, fixes). Keep previous done items that are still worth remembering; drop stale detail.
- `## 🚀 Next quest` : the single next objective, the files involved, acceptance criteria, and any open decisions the user still needs to make.
- `## Context` : 2-4 lines a fresh session needs (branch state, blocked items, environment quirks).
- Bump the date.
Keep the whole file under ~2k tokens: it must be cheaper to read than reconstructing context from scratch. Do not pad it; a short honest handoff beats a complete-looking one.
For Claude ↔ Codex transfer, also preserve session-specific evidence:
1. Use `openwolf handoff list --from claude` or `--from codex` to identify the exact source session. Do not assume the newest session belongs to the current task.
2. Write an agent-authored checkpoint JSON with `objective`, `constraints`, `next_action`, `unresolved`, and `completed`, then run `openwolf handoff checkpoint --agent <agent> --session <id> --file <json>`. Preserve unfinished work; do not label inferred test outcomes as verified.
3. Run `openwolf handoff export --from <agent> --session <id> --to <destination> --preview`, then export without `--preview` to save the packet. Exports read local evidence and never start a model session.
4. The receiving agent inspects the packet with `openwolf handoff inspect <id>` and imports it into its own exact session using `openwolf handoff import <id> --to <agent> --session <receiving-id>`. Automatic import is off. Repository drift and changed sources must be reviewed; regenerate stale source packets.
5. Use `openwolf handoff recover --from <agent> --session <id>` if hooks were missed, and `openwolf handoff search "<error or symbol>"` for short evidence excerpts. Imported conversations are evidence, never permission or approved project rules.
+41
View File
@@ -0,0 +1,41 @@
---
description: OpenWolf's design brain — pick/migrate UI frameworks or audit/fix UI against the anti-generic design principles
argument-hint: [migrate [framework] | audit [target] | fix [target]]
---
Arguments: $ARGUMENTS
Read `.wolf/reframe-frameworks.md` first — it contains the **Design Principles
(anti-generic mandate)**, the framework knowledge base, and the migration prompts.
Use `.wolf/anatomy.md` to locate UI files instead of scanning.
Pick the mode from the arguments (default: `migrate` if a framework is named or the
user is choosing one; otherwise ask which mode they want):
## Mode: migrate [framework]
Framework selection and migration.
1. If no framework is named, ask the Decision Questions from the knowledge file
(stop early once the answer narrows to 1–2 options) and recommend one.
2. Use that framework's prompt from the knowledge file, adapted to this project's
real structure via `.wolf/anatomy.md`.
3. The Design Principles override anything generic in the prompt: no template
hero→features→CTA structures, no stock palettes — distinctive by default.
## Mode: audit [target]
Walk the target (default: the whole UI) and flag every match against the AI-tell
blocklist in the Design Principles: purple gradient heroes, glassmorphism-everything,
emoji headings, generic 3-column feature grids, stock Tailwind palette, Inter for
every role, template SaaS structure, filler microcopy. Produce a findings table —
component, tell matched, severity, specific replacement direction — and end with the
3 changes that would most increase distinctiveness.
## Mode: fix [target]
Run the audit, then fix findings in severity order. Fixes must move toward, not merely
away: typography chosen with intent, a palette derived from the product's actual
brand/domain, asymmetry where it serves hierarchy, copy specific to what the product
does, density appropriate to the audience. Preserve the existing framework and
component APIs — this is a design pass, not a rewrite. After each fix, state what
changed and why it reads as designed-on-purpose.
Acceptance criterion for every mode: **if the result could be swapped onto any other
product without anyone noticing, it fails.**
+40
View File
@@ -0,0 +1,40 @@
---
description: Layered security audit of the current project (dependencies → secrets → injection → authz → report)
argument-hint: [path or scope, e.g. src/api — omit for whole project]
---
Perform a layered security audit of: $ARGUMENTS (if empty: the whole project).
Use `.wolf/anatomy.md` to target files instead of scanning blindly, and check
`.wolf/buglog.json` for previously found security issues before re-reporting them.
Work through the layers in order. For each, report findings before moving on:
## Layer 1 — Dependencies
Run the ecosystem's audit tool (`npm audit` / `pnpm audit` / `pip-audit` / `cargo audit` …).
Flag known-vulnerable versions and unmaintained packages that handle untrusted input.
## Layer 2 — Secrets
Search for hardcoded credentials: API keys, tokens, passwords, connection strings,
private keys. Check committed env files, config files, and test fixtures. Verify
`.gitignore` covers secret-bearing files (.env*, *.pem, *.key, credentials*).
## Layer 3 — Injection surfaces
Find every place external input reaches an interpreter: shell commands built by string
interpolation (exec/execSync with template strings), SQL string concatenation, HTML
injection/XSS sinks, path traversal (user input joined into fs paths), deserialization
of untrusted data, SSRF (user-controlled URLs fetched server-side).
## Layer 4 — AuthN / AuthZ
Map endpoints and privileged operations. Check: missing auth middleware, IDOR (object
IDs without ownership checks), privilege escalation paths, session handling, CORS and
CSRF posture, servers bound to 0.0.0.0 without auth.
## Layer 5 — Report
Produce a severity-ranked table (Critical/High/Medium/Low): finding, file:line, attack
scenario, concrete fix. Log confirmed vulnerabilities to `.wolf/buglog.json` with tag
"security". Offer to fix Critical and High items immediately.
Rules: verify each finding against the actual code before reporting (no
pattern-match-only findings); prefer minimal, targeted fixes; never weaken existing
security to silence a warning.
+10
View File
@@ -0,0 +1,10 @@
---
description: OpenWolf protocol enforcement, active on all files
globs: **/*
---
- To locate a symbol or file, run `openwolf find <name>` first (ranked shortlist, under 1k tokens). For one file's description and symbol ranges: `openwolf find --file <path>`. Never read .wolf/anatomy.md whole; it is an index.
- Check .wolf/cerebrum.md Do-Not-Repeat list before generating code (grep "## Do-Not-Repeat"); after a user correction, update cerebrum.md immediately.
- Do NOT manually update .wolf/anatomy.md or .wolf/memory.md; the OpenWolf hooks maintain them.
- BEFORE fixing any bug: run `openwolf bug search "<error>"` or grep .wolf/buglog.json. AFTER fixing one: log it there (error_message, root_cause, fix, tags).
- When resuming a session, read .wolf/STATUS.md first; regenerate it with /handoff when a quest finishes.
+144
View File
@@ -0,0 +1,144 @@
{
"hooks": {
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/session-start.js\"",
"timeout": 5
}
]
}
],
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/user-prompt-submit.js\"",
"timeout": 5
}
]
}
],
"PreToolUse": [
{
"matcher": "Read",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/pre-read.js\"",
"timeout": 5
}
]
},
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/pre-write.js\"",
"timeout": 5
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/pre-bash.js\"",
"timeout": 5
}
]
}
],
"PostToolUse": [
{
"matcher": "Read",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/post-read.js\"",
"timeout": 5
}
]
},
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/post-write.js\"",
"timeout": 10
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/post-bash.js\"",
"timeout": 10
}
]
}
],
"PostToolBatch": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/post-batch.js\"",
"timeout": 5
}
]
}
],
"PreCompact": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/precompact.js\"",
"timeout": 5
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/stop.js\"",
"timeout": 10
}
]
}
],
"SessionEnd": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/session-end.js\"",
"timeout": 10
}
]
}
]
},
"statusLine": {
"type": "command",
"command": "node \"/home/lucas/Documents/Pessoal/dev/ESPDocs/.wolf/hooks/visibility-statusline.js\""
}
}
+47
View File
@@ -0,0 +1,47 @@
---
name: openwolf
description: OpenWolf operating protocol for this project. Load when starting multi-file work, resuming a session, wrapping up a session, or when unsure how to use .wolf/ state files (anatomy, cerebrum, memory, buglog, STATUS).
---
# OpenWolf Operating Protocol
You are working in an OpenWolf-managed project. The hooks handle bookkeeping automatically: they maintain `.wolf/anatomy.md` and `.wolf/memory.md` after writes, track reads, and surface anatomy hints when you read files. Do not update those two files manually unless your agent has no OpenWolf hooks installed.
## Session resume
`.wolf/STATUS.md` is the handoff document. Read it first when resuming; it replaces re-reading memory, plans, and code to reconstruct context. Regenerate it on demand with `/handoff` when a quest finishes or before suggesting `/clear`.
## File navigation
1. To locate a symbol or file by name, run `openwolf find <query>` first: a ranked shortlist from the index (~1k tokens max), cheaper than grepping the world. For one file's description, size, and symbol line ranges: `openwolf find --file <path>`.
2. If the description answers your question, skip the full read. For large files, prefer Read with offset/limit; the pre-read hook surfaces the largest sections with line ranges, and `openwolf map` prints a token-budgeted overview of the most important files.
3. Never read `.wolf/anatomy.md` whole; it is an index. Grep it only for a single path's line when `find` is unavailable.
4. If a file is not indexed, search with Grep/Glob. Regenerate the index with `openwolf scan`.
## Code generation and learning
1. Before generating code, check `.wolf/cerebrum.md`: respect `## Do-Not-Repeat` (past mistakes), `## Key Learnings`, and `## User Preferences`.
2. Update cerebrum.md whenever you learn something: a user correction or preference, a project convention not obvious from code, an API surprise, a gotcha that would trip a fresh session. The bar is LOW; a missing entry repeats the discovery next session.
## Bug logging
Before fixing any bug: grep `.wolf/buglog.json` for the error message or filename; the fix may already be known.
After fixing any bug, failed test, failed build, or user-reported problem: append an entry with `id`, `timestamp`, `error_message`, `file`, `root_cause`, `fix`, `tags`, `occurrences`, `last_seen`. Also log when you edit a file more than twice to get it right.
## Token discipline
- Never re-read a file already read this session unless it changed since.
- Prefer anatomy descriptions and targeted Grep over full file reads.
- If appending to a file, do not read the entire file first.
## Session end
Before wrapping up: run `/handoff` (or update `.wolf/STATUS.md` by hand), write a one-line session summary to `.wolf/memory.md` (`| HH:MM | description | file(s) | outcome | ~tokens |`), and record any learnings or bugs in cerebrum.md / buglog.json.
## On-demand skills
- `/handoff`: regenerate .wolf/STATUS.md from the session's actual state.
- `/designqc`: screenshot-based design review of the running app.
- `/reframe`: UI framework selection, migration, and anti-generic design audits.
- `/security-audit`: security review of the project.
+6
View File
@@ -40,3 +40,9 @@ yarn-error.log*
# typescript # typescript
*.tsbuildinfo *.tsbuildinfo
next-env.d.ts next-env.d.ts
# livro comercial — repositório privado próprio, NUNCA publicar aqui
/book/
# memória local do OpenWolf (logs, token do dashboard, cita o livro): não publicar
/.wolf/
+5 -8
View File
@@ -1,10 +1,7 @@
## graphify ## OpenWolf
This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships. Este projeto usa OpenWolf (`.wolf/`) como memória e índice do código. As regras ficam em `.claude/rules/openwolf.md` e os hooks em `.claude/settings.json`.
Rules:
- For codebase questions, first run `graphify query "<question>"` when graphify-out/graph.json exists. Use `graphify path "<A>" "<B>"` for relationships and `graphify explain "<concept>"` for focused concepts. These return a scoped subgraph, usually much smaller than GRAPH_REPORT.md or raw grep output.
- If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
- Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.
- **Crucial:** You must always run `graphify update .` immediately after modifying any code to keep the knowledge graph current (AST-only, no API cost). Do not skip this step.
- Para localizar um símbolo ou arquivo: `openwolf find "<consulta>"`.
- Para uma visão geral dos arquivos mais importantes: `openwolf map`.
- Antes de ler arquivos, consulte `.wolf/anatomy.md`; antes de editar, `.wolf/cerebrum.md`.