一键导入
evaluate
Run 4 lightweight quality checks on recent work and fix issues found
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run 4 lightweight quality checks on recent work and fix issues found
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scan for stale memory topics, near-dead instincts, and low-salience K-LEAN entries. Proposes cleanup actions interactively.
Quality gate for instinct persistence. Validates new instincts through a 4-stage pipeline before allowing them to be written to disk. Invoke before writing any new instinct file.
Use when the user needs thorough research on a complex topic, says 'deep dive', 'research this thoroughly', or 'sensor sweep'. Parallel agent orchestrator for comprehensive multi-angle investigation.
Autonomous experiment loop: iteratively improves a single file against a measurable metric. Uses git-as-state-management in a disposable worktree. Invoke when user wants to optimize, tune, or systematically improve a file through repeated iterations.
Use when you need multi-faction review combining security, strategy, cost, and quality perspectives. Trigger: fleet review, multi-faction assessment, comprehensive quality gate, or when escalation requires L5+.
Two-loop research orchestrator: chains deep-research (outer, hypothesis generation) with experiment-loop (inner, empirical testing). Use when research questions have a testable dimension with a measurable metric.
| name | evaluate |
| description | Run 4 lightweight quality checks on recent work and fix issues found |
Run 4 quality checks on recently modified files. Identify issues. Fix them with user approval.
Before running checks, determine review level based on change scope:
Lines changed < 50 AND files <= 2 → Level 1-2 (self-check + peer)
Lines changed 50-200 AND files 2-5 → Level 1-3 (+ devil's advocate)
Lines changed 200-500 AND files 5-10 → Level 1-5 (+ adversarial debate)
Lines changed > 500 OR files > 10 → Level 1-7 (full bridge briefing)
Override minimums for sensitive files:
After running the 4 checks below, suggest the appropriate next review level based on this scaling.
flowchart TD
Start([evaluate]) --> GetFiles["Step 0: git diff --name-only HEAD\n+ git diff --name-only --cached"]
GetFiles --> HasFiles{Files found?}
HasFiles -- No --> AskUser[Ask user to specify files]
AskUser --> HasFiles
HasFiles -- Yes --> Scale0["Assess review level\n(lines changed + file count + sensitivity)"]
Scale0 --> C1["Check 1: Code Quality\nlint-check.sh"]
C1 --> C2["Check 2: Goal Alignment\nmodel + memory"]
C2 --> C3["Check 3: Tests\ntest-runner.sh"]
C3 --> C4["Check 4: Security\nOWASP Top 10"]
C4 --> Table[Output results table]
Table --> Fail{Any FAIL or WARN?}
Fail -- No --> Scale[Suggest next review level]
Scale --> Done([Done])
Fail -- Yes --> InitCycle["cycle = 1"]
InitCycle --> Fix["List fixes + diff preview"]
Fix --> Approve{"Cycle cycle/3:\nApply fixes?"}
Approve -- No --> Report[Report remaining issues]
Report --> Done
Approve -- Yes --> Apply[Apply fixes]
Apply --> ReRun[Re-run ONLY failed checks]
ReRun --> Still{Still FAIL/WARN?}
Still -- No --> Scale
Still -- "Yes + cycle < 3" --> IncCycle["cycle++"] --> Fix
Still -- "Yes + cycle = 3" --> Escalate[Escalate to human review]
Escalate --> Done
Check 1 -- Code Quality: Run ~/.claude/scripts/lint-check.sh <modified-files>. Parse JSON: PASS if status == "pass", FAIL with each issues item.
Check 2 -- Goal Alignment: Query mcp__memory__search_nodes for entities related to modified files/modules before evaluating. Verify: (1) code matches request, (2) no unrequested additions, (3) no missing requirements, (4) aligns with knowledge graph decisions. Report ALIGNED or MISALIGNED with specific divergences.
Check 3 -- Integration/Tests: Run ~/.claude/scripts/test-runner.sh. Parse JSON: PASS if status == "pass", FAIL with failures array + counts.
Check 4 -- Security: Scan modified files only for OWASP Top 10:
Report PASS or WARN with file:line references.
After all 4 checks, output a summary table:
## Evaluate Results
| Check | Status | Notes |
|-----------------|--------|--------------------------------|
| Code Quality | PASS | eslint: 0 issues |
| Goal Alignment | PASS | All requirements addressed |
| Tests | FAIL | 2 failures: test_auth, test_db |
| Security | WARN | Possible XSS at src/render.js:42 |
Escalation message after 3 cycles: "These issues require human review after 3 fix cycles: [list]"