Skip to content

Log Entry Attribution

Chris Sweet edited this page May 20, 2026 · 1 revision

type: concept up: "Three-Operations" extends: "Three-Operations" tags: [conventions, attribution, log]

Log Entry Attribution

Every log entry is attributed to a human and the agent that ran the operation, and each entry is committed on its own. Introduced by PR #4.

The by: line

The first bullet of every entry in log_<repo>.md is an attribution line:

- by: <human> via <agent>
  • <human> is the value of git config user.name in the wiki repo at the time of the operation. Read it; do not invent it. If the config disagrees with the actual committer, fix the config; that is a bug, not a value to guess.
  • <agent> is the coding assistant: claude-code, cursor, etc. The agent overlay's setup or instantiate.sh --agent=<x> controls what gets stamped.

One commit per log entry

The log append is committed separately from the page and index changes. A single ingest produces two commits:

  1. The pages and index changes (the substance of the ingest)
  2. The log entry append (the attribution and record)

This keeps git blame on the log file a faithful per-entry record: one entry maps to exactly one commit with exactly one author. Bundling multiple log appends into a single commit defeats this property.

Two records, one truth

The by: field is the human-readable attribution; git history is the verifiable attribution. They should always agree. If they disagree, trust git and correct the field, never the other way.

Implementation

  • wiki/init-wiki.sh --agent <name> stamps the initial create entry.
  • scripts/instantiate.sh forwards the chosen agent to init-wiki.sh. Only a single concrete agent is forwarded; none and all leave the entry human-only.
  • The per-overlay slash commands and skills (/wiki-experiment, /wiki-source, /wiki-lint) write the by: line and split into two commits.

Behavioral test that proved it works

Priscila's PR #4 ran a real Claude Code session with the wiki's git identity pinned to a distinctive name so the test could discriminate. Observed behavior:

  • Agent's first action was git config user.name in the wiki repo. It did not guess.
  • The log entry's first bullet was - by: <pinned name> via claude-code.
  • The wiki repo received two commits: pages and index first, then the log entry alone.
  • A 6-check verifier (entry appended, attribution line correct, every entry has a by: bullet, last commit touches only the log file, preceding commit does not, log commit author correct) reported 6/6 pass.

This is the kind of validation Lesson-Validation-Methodology advocates for.

See also

Clone this wiki locally