Agent Ops Pack Audit - 2026-05-20
過去レポートのView/ソース規律バックフィルで生成したView。
What We Stole
Source signal:
fcakyon/claude-codex-settings: packages skills, hooks, subagents, MCP, and agent settings as an operational pack. The two useful pieces for OpenClaw areintelligent-compactandclaude-telemetry-hooks.VILA-Lab/Dive-into-Claude-Code: reinforces the same thesis: the model loop is the easy part; production quality lives in deterministic harness infrastructure such as permission gates, context management, compaction, hooks, state, and recovery.
Adopted into local OpenClaw ops:
compact_priority_preserved: compaction/resume summaries must preserve file paths, root causes, open questions, IDs/metrics, and expensive subagent findings.owner_rejection_categorized: owner rejections must be categorized as operational signals such as visual mismatch, weak verification, wrong target, scope drift, or missing source evidence.
Audit Result
Runtime mode event audit now passes:
{"count": 5, "ok": true, "present": ["compact_priority_preserved", "owner_rejection_categorized", "verification_recorded"]}
Verification:
PYTHONPATH=scripts python3 -m unittest scripts/test_runtime_mode_events.pypassed, 4 tests.memory/runtime-mode-events.jsonlnow contains realcompact_priority_preservedandowner_rejection_categorizedevents, not only support in code.
Gap Left
This is still a local ledger, not a Gateway-native hook. The next useful hardening is wiring these events into actual compact/rejection boundaries automatically, so humans do not need to remember to record them.
Win Condition Update
The safe local hook is now implemented:
- scripts/runtime_ops_pack_hook.py scans compact/rejection boundary text and appends deterministic events to memory/runtime-mode-events.jsonl.
- Compact boundaries emit compact_priority_preserved and check for file paths, root cause, open questions, IDs/metrics, and reviewer/subagent findings.
- Owner/reviewer rejections emit owner_rejection_categorized with categories such as visual_mismatch, weak_verification, wrong_copy_or_explanation, scope_drift, source_gap, and missing_commit.
- scripts/runtime_ops_pack_hook.py audit-auto verifies that automatic compact and rejection events are present.
Verification:
- python3 -m py_compile scripts/runtime_mode_events.py scripts/runtime_ops_pack_hook.py scripts/test_runtime_mode_events.py scripts/test_runtime_ops_pack_hook.py passed.
- PYTHONPATH=scripts python3 -m unittest scripts/test_runtime_mode_events.py scripts/test_runtime_ops_pack_hook.py passed, 9 tests.
- PYTHONPATH=scripts python3 scripts/runtime_ops_pack_hook.py audit-auto passed.
- python3 scripts/runtime_mode_events.py audit --require-event compact_priority_preserved --require-event owner_rejection_categorized --require-event verification_recorded passed.
Remaining hard stop: Gateway-native wiring would require patching/restarting runtime behavior. That is intentionally not done without explicit restart/runtime-change approval.