Skip to main content

bylines

CI

Every line has an author. Prove which ones were the agent's.

bylines verifies that work attributed to an AI agent was really produced inside the agent's own session. Give it a repository and the session transcripts (Muse, Claude Code, Codex, or a redacted bylines bundle) and it will:

  1. Replay every write/edit tool call in timestamp order, reconstructing each file exactly as the session built it.
  2. Classify every line by first appearance. A line counts as agent-authored only if its first appearance in the transcript is inside a write/edit payload. Lines that first surfaced in a tool result, a file read, a shell output, or a pasted blob stay external forever — later edits cannot launder them into authored lines.
  3. Check the rules a reviewer actually cares about:
    • reproduces — enough of the final code was agent-authored, little enough came from nowhere;
    • in_window — the work happened inside the allowed time window;
    • revised — files reached their final content through real iteration, not a single paste;
    • coverage — every file in the repo is accounted for: authored, declared (vendored / binary / generated, with hashes), or flagged unexplained.
  4. Emit a deterministic report (report.json + a human-readable summary) that anyone can re-run and re-check. Same inputs, same verdict.

Why

Maintainers and platforms are flooded with agent-produced pull requests, contest entries and bounty submissions. A one-prompt paste and a carefully steered, multi-hour session look identical from the outside. bylines makes honest agent work legible — and raises the cost of faking it from zero to substantial.

What it does not prove

bylines proves internal consistency: these transcripts reproduce this artifact under these rules. It does not prove the transcripts are authentic, a human was present, or the timestamps are true. Forgery is possible; it is just no longer free. See DESIGN.md for the full threat model.

Install

pip install git+https://github.com/kaamura-ai/bylines

(A PyPI release is in preparation; once it lands, pipx install bylines will work too.)

Python 3.11+, standard library only. No network, no API keys, fully offline.

Quickstart

bylines verify \
  --repo ./my-entry \
  --sessions ./bundle/sessions \
  --harness claude-code \
  --policy policy.toml \
  --out report.json --md report.md

--harness selects the transcript format: muse (Muse session JSONL, the default), claude-code (~/.claude/projects/**/*.jsonl, subagent transcripts included), codex (~/.codex/sessions/**/rollout-*.jsonl, including apply_patch writes), or events (redacted bylines bundles, below).

Exit code: 0 pass, 1 fail, 2 input error.

Redacted bundles

Raw transcripts contain your prompts and everything your tools printed — not something you publish. bylines redact converts them into a shareable bylines event file:

bylines redact --sessions ~/.claude/projects/-home-dev-myrepo \
  --harness claude-code --anchor myrepo --out ./attestation
bylines verify --repo ./myrepo --sessions ./attestation --harness events

Redaction keeps timestamps, tool-call structure and the write/edit payloads (those lines are the artifact itself — the repo already publishes them), and removes all conversation text and tool outputs. Outputs survive only as per-line SHA-256 hashes, which is exactly what verification needs: a line first sighted in an output is still classified external, so a pasted file still fails — the verdict on a redacted bundle is the verdict on the raw transcript.

GitHub Action

Commit a redacted bundle with your repo and verify it in CI:

- uses: actions/checkout@v4
- uses: kaamura-ai/bylines@v0.2.0
  with:
    sessions: ./attestation
    harness: events
    policy: ./policy.toml

The action fails the job on a fail verdict and uploads report.json / report.md as artifacts.

Policy (TOML)

[window]
opens  = "2026-12-01T00:00:00Z"
closes = "2026-12-07T00:00:00Z"

[counted]
include = ["**/*.py", "**/*.md"]
exclude = ["vendor/**", "*.min.js"]

[reproduces]
authored_min   = 0.30
unwritten_max  = 0.40

[revised]
min_files = 1
min_ops   = 2

[coverage]
unexplained = "fail"   # or "warn"

Status

v0.3 — Muse, Claude Code and Codex transcript adapters, replay engine, the four checks above, JSON/Markdown reports, redacted bundles (bylines redact), and a GitHub Action. Transcript hash-chain anchoring is on the roadmap (see DESIGN.md).

Validated against a production corpus: a real contest submission verified by a platform's own (closed) checker reproduces the same verdict under bylines, from both the raw and the redacted transcript.

See examples/self-verification/ for bylines verifying its own development session — bundle, policy and report included, warts and all.

License

MIT

Metadata

Release files for bylines 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bylines 0.3.0
File Size Uploaded Provenance Actions
bylines-0.3.0.tar.gz 26.0 kB Without provenance Details for bylines-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bylines 0.3.0
File Interpreter ABI Platform Actions
bylines-0.3.0-py3-none-any.whl Python 3 none any Details for bylines-0.3.0-py3-none-any.whl

Total release size: 50.5 kB

Release files / bylines-0.3.0.tar.gz

Download URL bylines-0.3.0.tar.gz
Size 26.0 kB
Tags Source
SHA-256 checksum
How to use checksums
51a910aa36a5a10070a8e12486c6721fc56d461fae598b803f0b9b0bd0afb0d6
BLAKE2b-256 checksum
How to use checksums
f6497596e22c5f92f06fdf20c2b420342778320233232f4cd28929e5d4676de8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / bylines-0.3.0-py3-none-any.whl

Download URL bylines-0.3.0-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
596a6383840dd58f3f967605bc93760a60ab4e7398c3422cb1d021f95a8d6aca
BLAKE2b-256 checksum
How to use checksums
44cf10b39e4c5d6a90966d4a64880222f5c8c5b8722932feb54714bd7a85535a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for bylines 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page