{"skill":{"slug":"architecture-critic","displayName":"Architecture Critic","summary":"Adversarial pre-build architecture review. Spawns a structurally independent agent that reviews proposed builds, features, or operational decisions BEFORE an...","description":"---\nname: architecture-critic\nversion: 1.1.0\nrequires:\n  - python3\n  - bash\ncredentials:\n  - ANTHROPIC_API_KEY\ndescription: >\n  Adversarial pre-build architecture review. Spawns a structurally independent agent\n  that reviews proposed builds, features, or operational decisions BEFORE any code is\n  written. The critic sees only the task spec and codebase state — never conversation\n  history, enthusiasm, or the proposer's reasoning. Returns APPROVE, REVISE, or REJECT\n  with specific, itemized findings. Use when: starting any new feature, endpoint, schema\n  change, payment/auth touch, or any decision being recommended with confidence.\n  Skip only for: copy/style-only changes under 3 files with no logic, or isolated bug\n  fixes that don't touch payment or auth.\n---\n\n# Architecture Critic\n\nAn adversarial pre-build agent. Its job is to find what's wrong with a proposed build before a single line of code is written.\n\nThis is not a collaborator. It does not refine the plan or suggest alternatives. It reads the proposal and returns a verdict with specific, itemized findings. No stake in the outcome. No relationship to protect.\n\n**Cost to run: ~$0.05. Cost of skipping: a rework cycle.**\n\n---\n\n## When to Run\n\n| Condition | Action |\n|---|---|\n| New API endpoint or route | Run |\n| Schema change (DB table, migration) | Run |\n| Payment or charge flow touched | Run |\n| Auth logic touched | Run |\n| Feature touching >3 files | Run |\n| New external API integration | Run |\n| Any decision being pitched with confidence | Run |\n| Copy/style-only change, <3 files, no logic | Skip |\n| Isolated bug fix, no payment/auth touch | Skip |\n\n**When in doubt: run it.** The gate costs a fraction of a rework cycle.\n\n---\n\n## How to Run\n\n```bash\n# Write a DONE_WHEN brief to a temp file first\ncat > /tmp/brief.md << 'EOF'\nGoal: <what this build accomplishes>\nScope: <what files/systems are touched>\nDone when: <specific acceptance criteria>\nEOF\n\nbash /path/to/skills/architecture-critic/scripts/run-critic.sh \\\n  --project <project-name> \\\n  --task \"<short task description>\" \\\n  --done-when /tmp/brief.md\n```\n\n**Exit codes:** `0` = APPROVE · `1` = REVISE · `2` = REJECT · `3` = ERROR\n\nVerdict is saved to `specialists/critic-verdicts/YYYY-MM-DD-<slug>.md`.\n\n---\n\n## Critic System Prompt — v1.0 (LOCKED — never modify per task)\n\n```\nYou are an adversarial architecture reviewer.\nYour job is to find what is wrong with a proposed build before any code is written.\n\nYou have no knowledge of how the plan was developed, who proposed it, or why they think it will work.\nYou see only the task brief and the current state of the codebase.\n\nYour mandate:\n- Find scope violations: does this touch more than it should?\n- Find missing pieces: what's not in the plan that will be needed?\n- Find integration risks: what existing systems could this break?\n- Find security gaps: what data, auth, or payment flows are at risk?\n- Find token/cost waste: is this approach more expensive than necessary?\n- Find sacred file risks: does this approach put protected files at risk?\n- Find architectural drift: does this duplicate logic that already exists?\n- Find deployment risks: what could break in production that won't show in dev?\n\nReturn one of three verdicts:\n\nAPPROVE — the plan is sound. List any minor WARNs.\nREVISE — specific correctable problems. List each with exact fix required. Build does not start until addressed.\nREJECT — fundamental problems requiring redesign. Do not patch — redesign.\n\nBe specific. Be uncharitable. Do not validate effort or intent.\nTemperature: 0.\n```\n\nThis prompt is versioned and frozen. It never changes per task. The critic's structural independence is the point.\n\n---\n\n## Verdict Protocol\n\n**APPROVE** → Build proceeds. Log any WARNs to specialist log before starting.\n\n**REVISE** → Build does NOT start. Address every listed item. Update the brief. Re-run critic. Max 2 REVISE cycles before escalating to a human.\n\n**REJECT** → Build STOPS. Notify immediately. No build proceeds until a human approves a redesigned approach.\n\n---\n\n## Verdict File Format\n\nSaved to `specialists/critic-verdicts/YYYY-MM-DD-<task-slug>.md`:\n\n```markdown\n# Critic Verdict — <task-slug>\nDate: YYYY-MM-DD\nProject: <project>\nTask: <description>\nSpec version: v1.0\nVerdict: APPROVE | REVISE | REJECT\n\n## Findings\n[itemized — empty if APPROVE with no WARNs]\n\n## WARNs (non-blocking)\n[itemized]\n\n## Decision\n[one paragraph — what the critic concluded and why]\n```\n\n---\n\n## Domain Checklists\n\nFor web/API projects, load `references/checklist-web.md` and pass it to the critic.\nFor general/non-web projects, use `references/checklist-general.md`.\n\nThe run script handles this automatically when `--checklist` is passed.\n\n---\n\n## Independence Rules\n\n1. Critic agent spawned fresh for every review — no accumulated context\n2. Receives ONLY: task brief, codebase state, system prompt, optional checklist\n3. System prompt never modified per task\n4. Verdict written to file BEFORE any build agent starts\n5. Critic infrastructure down → build is BLOCKED (no pass-through)\n","topics":["Payment"],"tags":{"latest":"1.1.1"},"stats":{"comments":0,"downloads":416,"installsAllTime":16,"installsCurrent":0,"stars":1,"versions":4},"createdAt":1778001587476,"updatedAt":1778492850251},"latestVersion":{"version":"1.1.1","createdAt":1778072915075,"changelog":"- Added new file: clawhub.yaml\n- No changes to code or documentation content.\n- No breaking changes; existing functionality remains the same.","license":"MIT-0"},"metadata":null,"owner":{"handle":"jfulmines-star","userId":"s17b67z4e7twb4m15ybtk5xz2h83gtsp","displayName":"JJ","image":"https://avatars.githubusercontent.com/u/262581161?v=4"},"moderation":null}