Esqueleto inicial: sabia-core + sabia-cli + UI local, OpenWolf

- sabia-core: descoberta de interfaces, controle de modo monitor/canal
  via iw (ponte até ter nl80211 nativo), captura crua 802.11 via
  AF_PACKET (sem libpcap), parsing de radiotap e quadros de
  gerenciamento (beacon/probe/EAPOL), agregação em tabela de APs/
  clientes, escrita de .pcap, trilha de auditoria encadeada por hash,
  auto-atualização via GitHub releases (curl, sem dependências de
  rede extras)
- sabia-cli: `sabia iface`, `sabia scan`, `sabia update`,
  `sabia audit-verify`, `sabia ui` (servidor local + navegador,
  protegido por token, mesma filosofia do Guará)
- OpenWolf inicializado para memória de projeto entre agentes
This commit is contained in:
Lucas committed 2026-10-23 08:22:04 -03:00
commit e989413018
76 files changed
+8386

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.