Skip to content

research-evidence-ledger

Append lightweight provenance metadata for research retrieval tools.

hook PostToolUse multi-harness mode: audit

Append lightweight provenance metadata for research retrieval tools.

FieldValue
idresearch-evidence-ledger
modeaudit
logical_eventPostToolUse
matcherWebSearch|web_search|fetch|fetcher|trafilatura|docling|mcp__.*|mcp_.*
commandpython3 {repo_root}/hooks/wagents-hook.py research-evidence-ledger --harness {harness}
timeout5
harnesses["codex", "claude-code", "github-copilot", "gemini-cli"]
Full hook config + command reference
config/hook-registry.json (entry)
{
"id": "research-evidence-ledger",
"description": "Append lightweight provenance metadata for research retrieval tools.",
"mode": "audit",
"logical_event": "PostToolUse",
"matcher": "WebSearch|web_search|fetch|fetcher|trafilatura|docling|mcp__.*|mcp_.*",
"command": "python3 {repo_root}/hooks/wagents-hook.py research-evidence-ledger --harness {harness}",
"timeout": 5,
"harnesses": [
"codex",
"claude-code",
"github-copilot",
"gemini-cli"
]
}
hooks/wagents-hook.py (policy)
def _policy_evidence_ledger(payload: NormalizedPayload) -> int:
if not _state_active(payload):
return 0
# extracts URLs from payload, writes JSONL provenance to audit ledger
...

Full URL extraction + ledger append in wagents-hook.py (and mirrored in research_hook.py).


View source on GitHub