Agent workflow
Repairledger is a user-global ledger. Run repairledger init once on
each new machine; it creates the global config and data path. From then on,
log observations from any repository without writing into the current source
tree.
Do not initialize Repairledger inside the current source repository. If
repairledger --json statusreports missing config, runrepairledger initto create the user-global config and data path.
Normal observation logging
# Check global status
repairledger --json status
# Initialize the global config and data path (once per machine)
repairledger init
# Create via structured bundle
cat <<'JSON' | repairledger repair apply --file - --dry-run
{
"schema": "repairledger.structured_repair.v1",
"operation": "create",
"repair": {
"title": "Example tool failure",
"target_tool": "example",
"kind": "tool_failure",
"severity": "medium",
"status": "observed",
"components": {
"summary": "Summary here.",
"context": "Context here.",
"tool_call": "example command",
"expected_behavior": "Expected behavior.",
"actual_behavior": "Actual behavior.",
"reproduction": "1. Step one.\n2. Step two.",
"impact": "This matters because...",
"suggested_fix": "Add validation."
}
}
}
JSON
# Create for real
cat <<'JSON' | repairledger repair apply --file -
{ ... same JSON ... }
JSON
# Validate
repairledger repair validate --repair repair-0001 --for-observed
# Build rendered artifacts in the global data path
repairledger repair build --repair repair-0001
# Export the aggregate report
repairledger report export
Convenience log path
repairledger log \
--title "Tool rejects valid input" \
--target-tool mytool \
--kind validation_false_positive \
--severity high \
--summary "Tool rejected valid config." \
--context "Agent was configuring tool." \
--tool-call "mytool validate" \
--expected "Should pass." \
--actual "Was rejected." \
--reproduction "1. Run validate. 2. Observe." \
--impact "Blocks workflow." \
--suggested-fix "Make field-aware." \
--status observed
repairledger log returns the new repair ID. Capture it and pass it
explicitly to later mutating commands when multiple repairs exist.