원클릭으로
windburn-crabbox-failure-hook
Wrap remote workhorse runs with prediction → observed-delta → failure-memory packets. Captures the failure cache.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Wrap remote workhorse runs with prediction → observed-delta → failure-memory packets. Captures the failure cache.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Perceive before reasoning. Anchor time and retrieve prior episodes before any substantive response. Time receipt + recall as default lookup, not optional luxury.
Classify agent memory into Windburn cognitive-cache objects and route writes safely. Source cache + episodic cache + parking lane.
Review source-truth proposals against evidence and boundary rules. Returns verdict — never approves automatically.
| name | windburn-crabbox-failure-hook |
| description | Wrap remote workhorse runs with prediction → observed-delta → failure-memory packets. Captures the failure cache. |
| version | 0.2.0 |
| platforms | ["linux","macos","windows"] |
| metadata | {"tags":["windburn","crabbox","remote-workhorse","failure-memory","verification"],"cache_slots":["failure"],"invariant":"a failure with no avoid_rule or retry_condition is not learning"} |
Pre-/post-run hook that turns a remote workhorse execution into a failure-cache contribution. Forces the agent to predict before running and to compare delta after, so failures become reusable learning instead of noise.
Make every remote run leave a usable trace in the failure cache: predicted-vs-actual delta, root cause hypothesis, and an avoid_rule or retry_condition for the next attempt.
Before AND after any of:
scripts/remote-*.sh)run_id: <stable identifier>
repo: <repo or system under change>
action: <one-line description of what's about to be attempted>
expected_delta:
- <observable change 1>
- <observable change 2>
success_criteria:
- <verifiable assertion 1>
- <verifiable assertion 2>
preconditions:
- <state that must hold before run>
relevant_beliefs:
- <belief-cache ref>
relevant_failures:
- <failure-cache ref — see below>
Mandatory lookup: Search the failure cache for entries whose state_before matches the current preconditions. If a matching failure exists:
retry_condition is satisfied → proceed, record that the retry condition was satisfied.retry_condition is NOT satisfied → do NOT repeat the action. Escalate to operator OR change the action.retry_condition was recorded → operator decision required.run_id: <same as prediction>
exit_code: <integer>
verdict: PASS | FLAG | BLOCK
actual_delta:
- <observed change 1>
- <observed change 2>
evidence_refs:
- <log path or evidence pointer — redacted if public surface>
redacted_summary: <one paragraph, public-surface-safe>
If expected_delta and actual_delta disagree (even partially):
state_before: <preconditions snapshot>
action_tried: <action field from prediction>
predicted: <expected_delta snapshot>
actual: <actual_delta snapshot>
inferred_reason: <one-line hypothesis>
avoid_rule: <when to NOT repeat this action — required if no retry_condition>
retry_condition: <state that must change before retrying — required if no avoid_rule>
evidence_refs:
- <evidence pointer>
Hard invariant: at least one of avoid_rule or retry_condition MUST be non-empty. A failure entry without either is not learning; it is a complaint. Reject such entries.
no_repeat_failed_actionScore every subsequent run that hits a precondition matching a known failure:
| Score | Behavior |
|---|---|
| 1.0 | Matching failure retrieved AND action changed (per avoid_rule) OR retry condition explicitly satisfied |
| 0.5 | Matching failure retrieved AND operator asked before retrying |
| 0.0 | Same action repeated under same failed preconditions (regression) |
A 0.0 score is a system-level FLAG worth surfacing to the operator immediately — the failure cache is being ignored.
inferred_reason: unknown. Unknown is an honest answer for a moment, but the entry should be re-visited and updated before it's filed permanently — otherwise it pollutes the cache with un-actionable junk.success_criteria to be unfalsifiable. Criteria like "the command completed" make the verdict always PASS even when the actual change failed. Criteria must be observation-shaped.run_id. Each run gets a fresh identifier; reuse corrupts the audit trail.verdict: PASS as "no failure entry needed" without comparing deltas. PASS-on-verdict + delta-mismatch is exactly the case the failure cache is for — disagreement between prediction and reality even when nothing crashed.evidence_refs may point at local logs containing absolute paths, secrets, or host identifiers. Those are operator-private. The redacted_summary field is the public-safe surface — write it as if anyone could read it.
Before any git commit that includes failure-cache artifacts:
grep -E "/Users/<user>/|sk-|ghp_|Bearer " <file> # expect: 0 matches
结论:PASS | FLAG | BLOCK
预测:one line
实际:one line
失败记忆:written | not-needed (delta matched) | rejected (missing avoid/retry rule)
下一步:one concrete action
Named "crabbox" after the Crabbox lease/sync/run/release pattern from the broader Multica ecosystem. The hook shape generalizes to any remote-execution loop where prediction-and-comparison is meaningful.