Skip to content

Latest commit

 

History

History
143 lines (109 loc) · 4.15 KB

File metadata and controls

143 lines (109 loc) · 4.15 KB

Handover: Judge System Fixes and Hook Validation

Date: 2026-02-22 Branch: main Session: Judge system fixes and operational testing


Progress Summary

Completed This Session

Task Commit Status
Fix PreToolUse hook JSON output Local Done
Fix judge model (use free glm-5-free) dd09d96 Done
Test judge with real files 0d36430 Done
Fix pre-push hook path 0f8edb2 Done
Create terraphim-ai#550 for command correction N/A Done
Push all changes to origin b5496a1 Done

What Works

  1. PreToolUse Hook (~/.claude/hooks/pre_tool_use.sh):

    • Returns valid JSON for safe commands
    • Blocks dangerous commands (via dcg system guard)
    • Fixed set -e issue by adding || true to agent hook call
  2. Judge System:

    • Quick judge: opencode/gpt-5-nano (free)
    • Deep judge: opencode/glm-5-free (free - fixed from non-existent kimi-k2.5-free)
    • Tiebreaker: opencode/gpt-5.1-codex-mini (free)
    • 10 verdicts logged in automation/judge/verdicts.jsonl
  3. Learning Capture:

    • Captures failed commands to ~/.local/share/terraphim/learnings/
    • 42 learnings stored
    • Query works: terraphim-agent learn query <pattern>
  4. Pre-push Hook:

    • Fixed path to run-judge.sh when symlinked to .git/hooks/pre-push
    • Now correctly uses ${SCRIPT_DIR}/../../automation/judge/run-judge.sh

What's Blocked

  1. SSH to bigbox: Permission denied (publickey)

    • Key ~/.ssh/id_ed25519 exists but not authorized on bigbox
    • Need to add public key to bigbox's ~/.ssh/authorized_keys
  2. Command Correction: Not yet implemented

    • terraphim-agent learn correct returns "(Not yet implemented)"
    • Tracked in terraphim-ai#550

Technical Context

# Current branch
git branch --show-current
main

# Recent commits
0f8edb2 fix(judge): correct run-judge.sh path in pre-push hook
b5496a1 docs(handover): add reference to command correction issue
0d36430 test(judge): add test verdicts for hook and quality validation
dd09d96 fix(judge): use free model for deep judge
e2c7941 docs: update judge v2 handover with Phase 3 operational testing results

# Modified files (uncommitted)
?? .cachebro/
?? .docs/
?? ENDOFFILE
?? PYEOF
?? crates/crates_backup/

Next Steps

Priority 1: Fix SSH to bigbox

# Copy public key to bigbox
ssh-copy-id -i ~/.ssh/id_ed25519.pub alex@bigbox

# Or manually add to bigbox's ~/.ssh/authorized_keys
cat ~/.ssh/id_ed25519.pub
# Then append to bigbox:~/.ssh/authorized_keys

Priority 2: Verify bigbox setup

Once SSH works:

  1. Check if terraphim-agent is installed on bigbox
  2. Check if hooks exist in ~/.claude/hooks/
  3. Copy hooks from terraphim-skills if needed:
    scp ~/.claude/hooks/pre_tool_use.sh alex@bigbox:~/.claude/hooks/
    scp ~/.claude/hooks/post_tool_use.sh alex@bigbox:~/.claude/hooks/
    scp ~/.claude/hooks/learning-capture.sh alex@bigbox:~/.claude/hooks/

Priority 3: Deploy to bigbox

  1. Clone/build terraphim-ai on bigbox
  2. Install terraphim-agent binary
  3. Configure knowledge graph
  4. Test hooks with a simple command

Configuration Reference

Judge Models (Free)

# automation/judge/run-judge.sh
QUICK_MODEL="opencode/gpt-5-nano"
DEEP_MODEL="opencode/glm-5-free"
TIEBREAKER_MODEL="opencode/gpt-5.1-codex-mini"

Hook Files

File Purpose
~/.claude/hooks/pre_tool_use.sh PreToolUse: git safety + KG replacement
~/.claude/hooks/post_tool_use.sh PostToolUse: learning capture wrapper
~/.claude/hooks/learning-capture.sh Captures failed commands

Claude Settings

Location: ~/.claude/settings.local.json

  • PreToolUse hook configured for Bash commands
  • PostToolUse hook configured for Bash commands
  • Skills permissions for terraphim-engineering-skills

GitHub Issues


Generated by Claude Code