~ / rigs / supernovae-st / nika

supernovae-st/nika

Intent as Code | the workflow language for AI. One file, 4 verbs, one Rust binary. Local-first, any model, AGPL-3.0. 🦋

↗ GitHub ★ 89 agpl-3.0 updated 11d ago project Claude CodeCodex Claude plugin
share on X
ARCHETYPE
Automator
Hooks on every lifecycle event: format, lint, notify, log.
CONTEXT TAX · EVERY TURN
~5.1k tokens
Moderate · median rig: 2.3k · breakdown
GUARDRAILS
3/5
Blocks destructive commands · Pre-tool screening hook · No YOLO mode · details

Copy this rig

# review before running: this installs third-party code
$ claude mcp add nika -- nika mcp
$ npx degit supernovae-st/nika/.claude ./rig-nika  # inspect, then merge into .claude/

MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.

$ claude mcp add nika -- nika mcp
$ npx degit supernovae-st/nika/.agents/plugins/nika/skills/nika-authoring .claude/skills/nika-authoring
$ npx degit supernovae-st/nika/.agents/plugins/nika/skills/nika-debugging .claude/skills/nika-debugging
$ npx degit supernovae-st/nika/.agents/plugins/nika/skills/nika-migration .claude/skills/nika-migration
$ npx degit supernovae-st/nika/.agents/plugins/nika/skills/nika-operating .claude/skills/nika-operating
$ npx degit supernovae-st/nika/.claude/skills/crate-admit .claude/skills/crate-admit
$ npx degit supernovae-st/nika/.claude/skills/gate-check .claude/skills/gate-check
$ curl -fsSL --create-dirs -o .claude/agents/review-swarm.md https://raw.githubusercontent.com/supernovae-st/nika/main/.claude/agents/review-swarm.md

Merge into .claude/settings.json (project) or ~/.claude/settings.json (user). Hook commands reference scripts in the source repo — copy those too.

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE 'git push[[:space:]]+.*(--force(-with-lease)?|-f)\\b'; then echo '❌ FORBIDDEN: git push --force (incl --force-with-lease). Would destroy "
          },
          {
            "type": "command",
            "command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\\|\\|[[:space:]]*)git add[[:space:]]+(-A|\\.|\\*)'; then echo '❌ FORBIDDEN: git add -A/./*. Stage explicit"
          },
          {
            "type": "command",
            "command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE 'cargo test[[:space:]]+--test\\b'; then echo '❌ FORBIDDEN: cargo test --test triggers macOS Keychain popup. Use --lib only (feedback_no_k"
          },
          {
            "type": "command",
            "command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE 'git[[:space:]]+(checkout|switch)[[:space:]]+main\\b'; then echo '❌ FORBIDDEN: main is read-only. Use `git show brouillon:path` instead.'"
          },
          {
            "type": "command",
            "command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE '(git commit|git push).*--no-verify'; then echo '❌ FORBIDDEN: --no-verify bypasses hooks. Fix the underlying issue.' >&2; exit 2; fi"
          },
          {
            "type": "command",
            "command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE 'cargo[[:space:]]+(yank|publish)\\b' && ! echo \"$INPUT\" | grep -qE '(--dry-run|--undo)\\b'; then echo '🛑 IRREVERSIBLE: cargo yank/publish "
          }
        ]
      },
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "FILE=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.file_path // empty' 2>/dev/null); if echo \"$FILE\" | grep -qE '/\\.git/'; then echo '❌ FORBIDDEN: editing inside .git/ directory.' >&2; exit 2; fi"
          }
        ]
      }
    ]
  }
}

MCP servers (1)

serversourceest. tokens
nika binary 2.5k

Skills (6)

Subagents (1)

review-swarmReview a crate independently from three perspectives for ADR-003 admission Gate 11.

Hooks (15)

eventmatcherruns
PreToolUseBashINPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE 'git push[[:space:]]+.*(--force(-with-lease)?|-f)\b'; then echo '❌ FORBIDDEN: git push --force (incl --force-with-lease). Would destroy
PreToolUseBashINPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\|\|[[:space:]]*)git add[[:space:]]+(-A|\.|\*)'; then echo '❌ FORBIDDEN: git add -A/./*. Stage explicit
PreToolUseBashINPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE 'cargo test[[:space:]]+--test\b'; then echo '❌ FORBIDDEN: cargo test --test triggers macOS Keychain popup. Use --lib only (feedback_no_k
PreToolUseBashINPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE 'git[[:space:]]+(checkout|switch)[[:space:]]+main\b'; then echo '❌ FORBIDDEN: main is read-only. Use `git show brouillon:path` instead.'
PreToolUseBashINPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE '(git commit|git push).*--no-verify'; then echo '❌ FORBIDDEN: --no-verify bypasses hooks. Fix the underlying issue.' >&2; exit 2; fi
PreToolUseBashINPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE 'cargo[[:space:]]+(yank|publish)\b' && ! echo "$INPUT" | grep -qE '(--dry-run|--undo)\b'; then echo '🛑 IRREVERSIBLE: cargo yank/publish
PreToolUseEdit|WriteFILE=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.file_path // empty' 2>/dev/null); if echo "$FILE" | grep -qE '/\.git/'; then echo '❌ FORBIDDEN: editing inside .git/ directory.' >&2; exit 2; fi
PostToolUseBashCMD=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$CMD" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\|\|[[:space:]]*)git commit\b' && git log -1 --format=%B 2>/dev/null | grep -qi 'Co-Authored-By: Claude'; t
PostToolUseBashCMD=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$CMD" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\|\|[[:space:]]*)git commit\b' && git log -1 --format=%B 2>/dev/null | grep -qE 'admit to workspace'; then
PostToolUseBashCMD=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$CMD" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\|\|[[:space:]]*)git push\b' && ! echo "$CMD" | grep -qE '(^|[[:space:]])(--force|-f)([[:space:]]|$)'; then
PostToolUseWrite|EditFILE=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.file_path // empty' 2>/dev/null); if [ -n "$FILE" ] && echo "$FILE" | grep -q '\.rs$' && [ -f "$FILE" ]; then LOC=$(wc -l < "$FILE" 2>/dev/null || echo 0); if [ "$LOC" -gt 1500 ]; then echo "⚠️ WAR
PostToolUseWrite|EditFILE=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.file_path // empty' 2>/dev/null); if [ -n "$FILE" ] && echo "$FILE" | grep -qE '(MEMORY|SEQUENCE)\.md$'; then REPO=$(git rev-parse --show-toplevel 2>/dev/null || echo '.'); LOG="$REPO/.nika/state-c
SessionStart*cd "${CLAUDE_PROJECT_DIR:-.}" 2>/dev/null && HEAD=$(git log -1 --format=%h 2>/dev/null || echo ?); BRANCH=$(git branch --show-current 2>/dev/null || echo ?); CRATES=$(ls crates/*/Cargo.toml 2>/dev/null | wc -l | tr -d ' '); echo "💎 Nika Dia
SessionStart*cd "${CLAUDE_PROJECT_DIR:-.}" 2>/dev/null && if [ -x scripts/hygiene/check-all.sh ]; then RESULT=$(scripts/hygiene/check-all.sh --quiet 2>&1 | tail -1); echo "🩺 Hygiene: $RESULT"; fi
Stop*echo '🦋 Session end. If crate admitted: update MEMORY.md Quick State + run scripts/hygiene/check-all.sh'

Slash commands (4)

/admit/diamond-gates/diamond-health/legacy-lookup

Similar rigs

copied ✓