donald-ada/workinggenius / skills/genius-file
genius-file
VerifiedRead and update Working Genius work files — the work's folder holding the bounded snapshot a cold session acts on, the append-only log behind it, and the contract that binds the unbuilt slices. Use when a stage skill needs the work-file discipline, when the user asks what work is in flight or where a piece of work left off, or before resuming any work tracked under .genius/.
| File | Kind | Size |
|---|---|---|
| BACKLOG-FORMAT.md | markdown | 4.8 KB |
| FILE-FORMAT.md | markdown | 20.4 KB |
| FORMAT-EDGES.md | markdown | 3.9 KB |
| SKILL.md | skill md | 7.1 KB |
| measure.pyexecutable | script | 18.3 KB |
| stop-judge.py | script | 3.5 KB |
stop-judge.py
View on GitHub#!/usr/bin/env python3
"""The builder's judge, as a SubagentStop command hook registered by /enable —
by invocation, never by installation, so a session that never typed it has no
judge.
Reads the hook's JSON on stdin. A fast model reads the builder's hand-back —
that message alone, never the transcript — against one condition, and only a
clear "ok: false" blocks: exit 2 with the reason on stderr, which Claude Code
hands back as the next instruction. Every failure of the judge's own — no
`claude` on the path, a timeout, unparsable output — allows the stop: a judge
that fails closed would hold a session hostage to its own plumbing.
The judgment is the model's, and no line is read from or written to any file
of the work.
"""
import json
import os
import re
import subprocess
import sys
import tempfile
MODEL = 'haiku'
NESTED_TIMEOUT = 45
MESSAGE_TAIL = 6000
BUILDER = (
'A builder subagent is finishing; below is what it hands back. Decide one thing: does it claim the slice '
'is done, built, implemented, passing or complete while carrying no line that names a command and what '
'it showed for its criteria? If yes, answer {"ok": false, "reason": "Hand back evidence, not a claim: per '
'criterion, the command and what it showed — or the stop, with what it changes and your recommendation."}. '
'If it hands back per-criterion command-and-result lines, or a stop — a discovery, what it changes, a '
'recommendation — or a named blocker it cannot work around, answer {"ok": true}. Respond with that JSON only.'
)
def ask(condition, message):
prompt = f'{condition}\n\n<message>\n{message}\n</message>'
# Not --bare: that mode reads no OAuth login, so it fails for everyone on a subscription
# (measured: api_error, zero tokens). Instead: no hooks, no skills, no tools, no MCP, and a
# neutral cwd so the project's instruction files stay out of the judge's context.
r = subprocess.run(
['claude', '-p', prompt, '--model', MODEL, '--max-turns', '1', '--output-format', 'json',
'--settings', '{"disableAllHooks": true}', '--disable-slash-commands', '--strict-mcp-config',
'--tools', ''],
capture_output=True, text=True, timeout=NESTED_TIMEOUT, stdin=subprocess.DEVNULL,
cwd=tempfile.gettempdir())
result = json.loads(r.stdout).get('result') or ''
m = re.search(r'\{.*\}', result, re.S)
return json.loads(m.group(0)) if m else {}
def log(line):
path = os.environ.get('WG_STOP_JUDGE_LOG')
if path:
try:
with open(path, 'a', encoding='utf-8') as f:
f.write(line + '\n')
except OSError:
pass
def main():
try:
data = json.load(sys.stdin)
except Exception:
return 0
if data.get('hook_event_name') != 'SubagentStop' or 'builder' not in (data.get('agent_type') or ''):
return 0
if data.get('stop_hook_active'):
log('SubagentStop allow: stop_hook_active')
return 0
message = (data.get('last_assistant_message') or '').strip()
if not message:
return 0
try:
verdict = ask(BUILDER, message[-MESSAGE_TAIL:])
except Exception as e:
log(f'SubagentStop allow: judge failed ({type(e).__name__})')
return 0
if verdict.get('ok') is False and verdict.get('reason'):
log(f'SubagentStop block: {verdict["reason"]}')
sys.stderr.write(str(verdict['reason']))
return 2
log(f'SubagentStop allow: {verdict.get("reason", "ok")}')
return 0
if __name__ == '__main__':
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |