{
  "name": "Balance0014/claude-code-when-to-clear — 1 hook",
  "slug": "source-hooks-1353ce8aa206123c18a1af77",
  "type": "hooks",
  "category": "developer-tools",
  "example": false,
  "evidence_state": "pinned_source_listing",
  "stamp": "Pinned source listing — machine-checked",
  "summary": "Pinned source declarations and file hashes were listed.",
  "outcome": "Listed 1 hook declaration. Ran 18 git commands; each one's exit status and output hash is in commands.json. Scope: acquisition and static inspection.",
  "rule_results": [
    "The retained source tree matches its acquisition manifest.",
    "Declared hook names (listing.json): Stop"
  ],
  "task": "What declarations and files are present in this pinned source?",
  "setup": "Git blob acquisition followed by static source inspection.",
  "limitations": "Scope: acquisition and static inspection. Command results: commands.json.",
  "source_url": "https://github.com/Balance0014/claude-code-when-to-clear",
  "documentation_url": "https://github.com/Balance0014/claude-code-when-to-clear",
  "commit": "9c5d1fcf153716ccb61a5deda72e2c9254827ca0",
  "tree_sha256": "d6111bfbfc5f9606072b5bbd0fe462c0680521b383fd6a8fd9765d7127ae4a3f",
  "file_sha256": {
    ".claude-plugin/marketplace.json": "fe8c6477d071cdd9eaca3c0aed60dfd52cdb37f20e972fc6fc3f954901e29095",
    ".claude-plugin/plugin.json": "6b75e4b2ea618b860b52c594add0989e8beaca654f33bc4bb2ab59d3230cc12e",
    ".github/workflows/ci.yml": "9af975f3815ea4d397f072001587f7cc4ace6dfdcc65628528c91f8c328864db",
    "CHANGELOG.md": "f9e50ce37c044cccf62d3bb3488d5f6eac53eefcb4b203846f2f594367c53812",
    "CONTRIBUTING.md": "5a19d08ff520844d5f7635e6ddbad5e5bf1466b94284e01976a39869d8b018c3",
    "LICENSE": "118a5351e04b95a8646611d51fc1f968c07371ec88206e823c736092a692808d",
    "README.md": "7885af518780633677f7614e786b2df95e70d4b64e77efbeece510dd2dd52d1d",
    "README.zh-CN.md": "5ab05ed7ecdcd967b7b0d1ee7965c1a9a945b9197976f09b4b61e371890fad29",
    "docs/demo.svg": "aa9f93eda86c407be41612b5a57070fbfe2545d0d63e5269d70c4daa407b41ff",
    "hooks/hooks.json": "539bfc5f057a393b6714d694f0f40549d3349cef755d4c31ecdda3a05e1e53df",
    "skills/handoff/SKILL.md": "8ed44d712b475ae3ff9c4685f3edb631879f53f2a52376799d6f9eb81392195a",
    "tests/test_when_to_clear.py": "f41902f871d329fc6779c176fbb472e37d56730ec43ff17af861fe757c70337d",
    "when_to_clear.py": "aee361c734d52ab570c770de5b74779f9610ec59fbeb4be353fc8fecbacd2b6c"
  },
  "lockfiles": [
    "LOCK.json"
  ],
  "utc_date": "2026-11-04T01:23:08Z",
  "source_date": "2026-11-04",
  "discovered_date": "2026-11-04",
  "retested_date": "2026-11-04",
  "reviewed_date": "2026-11-04",
  "published_date": "2026-11-04",
  "modified_date": "2026-11-04",
  "reviewer": "machine pipeline",
  "harness_version": "toolwitness harness at commit 459f854cecd8851ec8eee1ee375adcc7122f0a73",
  "claude_code_version": "Not applicable: static source inspection (commands.json).",
  "model_id": "Not applicable: static source inspection (commands.json).",
  "scanner_version": "Not applicable: static source inspection.",
  "rulepack_version": "Not applicable: static source inspection.",
  "agents": [],
  "disclaimer": "This record lists declarations and file hashes from a pinned source tree. Git command results from acquisition and static inspection are retained in commands.json. Scope: acquisition and static inspection. It is not a security or quality verdict. Changed bytes are outside this record.",
  "commands": [
    "Ran 18 git commands; each one's exit status and output hash is in commands.json. Scope: acquisition and static inspection."
  ],
  "prompt_list": [
    "Not applicable: static source inspection (commands.json)."
  ],
  "history": [
    "2026-11-04T01:23:08Z: pinned source inspection"
  ],
  "application": {
    "name": "Balance0014/claude-code-when-to-clear — 1 hook",
    "softwareVersion": "9c5d1fcf153716ccb61a5deda72e2c9254827ca0",
    "applicationCategory": "DeveloperApplication",
    "operatingSystem": "Not exercised"
  },
  "artifacts": {
    "transcript": "Ran 18 git commands; each one's exit status and output hash is in commands.json. Scope: acquisition and static inspection.",
    "sinkhole_log": "Not applicable: static source inspection (commands.json).",
    "canary_log": "Not applicable: static source inspection (commands.json).",
    "scanner_output": "Not applicable: static source inspection (commands.json).",
    "normalized_text": "{\n  \"listing\": {\n    \"skills\": [\n      {\n        \"path\": \"skills/handoff/SKILL.md\",\n        \"name\": \"handoff\",\n        \"description\": \"Use when the user asks for a handoff note, wants to /clear or start a new session without losing their place, or when the when-to-clear reminder says the conversation is getting long. Writes HANDOFF.md so a fresh session can pick up the work.\",\n        \"files\": {\n          \"skills/handoff/SKILL.md\": \"8ed44d712b475ae3ff9c4685f3edb631879f53f2a52376799d6f9eb81392195a\"\n        }\n      }\n    ],\n    \"hooks\": [\n      {\n        \"path\": \"hooks/hooks.json\",\n        \"sha256\": \"539bfc5f057a393b6714d694f0f40549d3349cef755d4c31ecdda3a05e1e53df\",\n        \"event\": \"Stop\",\n        \"matcher\": null,\n        \"declaration\": {\n          \"type\": \"command\",\n          \"command\": \"python3 \\\"${CLAUDE_PLUGIN_ROOT}/when_to_clear.py\\\" hook --at 200k\",\n          \"timeout\": 15\n        },\n        \"executed\": false\n      }\n    ],\n    \"executions\": []\n  }\n}"
  },
  "review_input": {
    "identity_artifact": "identity.json",
    "evidence_sha256": {
      "LOCK.json": "4c59bde1a99da070e91b347f07afdef7a03236b88226aba5ac1d118e5d446bce",
      "commands.json": "50b479a902a9b26402d1accf53e968cb2948b98b57eefb11286edb05e37561a9",
      "complete.json": "91b504b43905fdc009504d516c45eea831f39a1995b9e7d69987c9756c936d6f",
      "identity.json": "ff7d1dbe36a973ee104f188b22bd0ca9ddff0fa6ef02f2b70868710ec0a2a61e",
      "listing.json": "3c5652d8c76dc76704aa7934cb7d242f5e16d0cc08fb3cb4aa960cababcf74f1",
      "selection.json": "3347942bcef96d0e96915c985894c6fcdbd2d7c4e7c20dca48bd2e9f0b1d7c21"
    },
    "claims": [
      {
        "id": "acquired",
        "field": "summary",
        "text": "Pinned source declarations and file hashes were listed.",
        "sources": [
          "LOCK.json",
          "listing.json",
          "commands.json"
        ]
      },
      {
        "id": "listed",
        "field": "outcome",
        "text": "Listed 1 hook declaration. Ran 18 git commands; each one's exit status and output hash is in commands.json. Scope: acquisition and static inspection.",
        "sources": [
          "LOCK.json",
          "listing.json",
          "commands.json"
        ]
      },
      {
        "id": "tree",
        "field": "rule_results.0",
        "text": "The retained source tree matches its acquisition manifest.",
        "sources": [
          "LOCK.json",
          "listing.json",
          "commands.json"
        ]
      },
      {
        "id": "declared",
        "field": "rule_results.1",
        "text": "Declared hook names (listing.json): Stop",
        "sources": [
          "LOCK.json",
          "listing.json",
          "commands.json"
        ]
      }
    ]
  },
  "review": {
    "kind": "machine-checked",
    "date": "2026-11-04",
    "reviewed_sha256": "929cded1c4513f415b09595bb268c6c5b6123388c2a6ae91ea48dc9da6b9fb8b",
    "gates": "925c273b85bb9e0dfcca400965416e962ab62da6fbba7801762ae355fcbea644",
    "codex": "0281536685fe1c8d96afe695a5345cebd978c1d09b8f9b67030981c99e6a06db",
    "grok": "e6685a02b80cf0437ba1e50f5ce58b491c498cd60b502a50cbaab38feecf5b50",
    "summary": "Deterministic gates passed; every claim rebuilt from evidence with a reviewed template; Grok reported no standing refutation."
  }
}
