Skip to main content

Engineering notebook for AI-assisted development

Project description

buildlog

A measurable learning loop for AI-assisted work

PyPI Python CI License: MIT Docs

Track what works. Prove it. Drop what doesn't.

buildlog - A measurable learning loop for AI-assisted work

RE: The art. Yes, it's AI-generated. Yes, that's hypocritical for a project about rigor over vibes. Looking for an actual artist to pay for a real logo. If you know someone good, open an issue or DM me. Budget exists.

Read the full documentation


The Problem

Every AI-assisted work session produces decisions, corrections, and outcomes. Almost all of it gets discarded. The next session starts from scratch with the same blind spots.

buildlog captures structured trajectories from real work, extracts decision patterns, and uses Thompson Sampling to select which patterns to surface. Then it measures whether that selection actually reduced mistakes.

How It Works

1. Capture structured work trajectories

Each session is a dated entry documenting what you did, what went wrong, and what you learned. Each session is a structured record of decisions and outcomes, not a chat transcript.

buildlog init          # scaffold a project
buildlog new my-feature   # start a session
# ... work ...
buildlog commit -m "feat: add auth"

2. Extract decision patterns as seeds

The seed engine watches your development patterns and extracts seeds: atomic observations about what works. A seed might be "always define interfaces before implementations" or "mock at the boundary, not the implementation." Each seed carries a category, a confidence score, and source provenance.

Extraction runs through a pipeline: sources -> extractors -> categorizers -> generators. Extractors range from regex-based (fast, cheap, brittle) to LLM-backed (accurate, expensive). The pipeline deduplicates semantically using embeddings.

3. Select which patterns to surface using Thompson Sampling

Seeds compete for inclusion in your agent's instruction set. The system treats each seed as an arm in a contextual bandit and uses Thompson Sampling to balance exploration (trying under-tested rules) against exploitation (surfacing rules with strong track records).

Each seed maintains a Beta posterior updated by observed outcomes. Over time, the system converges on the rules that actually reduce mistakes in your specific codebase and workflow, not rules that sound good in the abstract.

4. Render to every agent format

Selected rules are written into the instruction files your agents actually read:

  • CLAUDE.md (Claude Code)
  • .cursorrules (Cursor)
  • .github/copilot-instructions.md (GitHub Copilot)
  • Windsurf, Continue.dev, generic settings.json

The same knowledge base renders to every agent format.

buildlog skills   # render current policy to agent files

5. Close the loop with experiments

Track whether the selected rules are working. Run experiments, measure Repeated Mistake Rate (RMR) across sessions, and get statistical evidence, not feelings, about what improved.

buildlog experiment start
# ... work across sessions ...
buildlog experiment end
buildlog experiment report

What Else Is In the Box

  • Review gauntlet: automated quality gate with curated reviewer personas. Runs on commits (via Claude Code hooks or CI) and files GitHub issues for findings, categorized by severity.
  • LLM-backed extraction: when regex isn't enough, the seed engine can use OpenAI, Anthropic, or Ollama to extract patterns from code and logs. Metered backend tracks token usage and cost.
  • MCP server: buildlog exposes itself as an MCP server so agents can query seeds, skills, and build history programmatically during sessions.
  • npm wrapper: npx @peleke.s/buildlog for JS/TS projects. Thin shim that finds and invokes the Python CLI.

Current Limits

This is v0.10, not the end state.

  • Extraction quality is uneven. Regex extractors miss nuance; LLM extractors are accurate but expensive. The middle ground is still being found.
  • Feedback signals are coarse. Repeated Mistake Rate works but requires manual tagging. Richer automatic signals (test outcomes, review results, revision distance) are on the roadmap.
  • Credit assignment is limited. When multiple rules are active, the system doesn't yet isolate which one was responsible for an outcome.
  • Single-agent only. Multi-agent coordination (shared learning across agents) is designed but not implemented.
  • Long-horizon learning is not modeled. The bandit operates per-session. Longer arcs of competence building need richer policy models.

The roadmap: contextual bandits (now) -> richer policy models -> longer-horizon RL -> multi-agent coordination. Each step builds on the same foundation: measuring whether rule changes actually reduce mistakes.

Installation

Always-On Mode (recommended)

We run buildlog as an ambient data capture layer across all projects. One command, works everywhere:

pipx install buildlog         # or: uv tool install buildlog
buildlog init-mcp --global -y # registers MCP + writes instructions to ~/.claude/CLAUDE.md

That's it. Claude Code now has all 29 buildlog tools and knows how to use them in every project you open. No per-project setup needed.

The --global flag:

  • Registers the MCP server in ~/.claude.json (Claude Code's global config)
  • Creates ~/.claude/CLAUDE.md with usage instructions so Claude proactively uses buildlog
  • Works immediately in any repo, even without a local buildlog/ directory

The -y flag skips confirmation prompts (useful for scripts and CI).

This is how we use buildlog ourselves: always on, capturing structured trajectories from every session, feeding downstream systems that generate engineering logs, courses, and content.

Per-project setup

If you prefer explicit per-project control:

pip install buildlog          # MCP server included by default
buildlog init --defaults      # scaffold buildlog/, register MCP, update CLAUDE.md

This creates a buildlog/ directory with templates and configures Claude Code for that specific project.

For JS/TS projects

npx @peleke.s/buildlog init

Verify installation

buildlog mcp-test          # verify all 29 tools are registered
buildlog overview          # check project state (works without init in global mode)

Quick Start

buildlog init --defaults      # scaffold + MCP + CLAUDE.md
buildlog new my-feature       # start a session
# ... work ...
buildlog commit -m "feat: add auth"
buildlog experiment start
# ... work across sessions ...
buildlog experiment end
buildlog experiment report

Documentation

Section Description
Installation Setup, extras, and initialization
Quick Start Full pipeline walkthrough
Core Concepts The problem, the claim, and the metric
CLI Reference Every command documented
MCP Integration Claude Code setup and available tools
Experiments Running and measuring experiments
Review Gauntlet Reviewer personas and the gauntlet loop
Multi-Agent Setup Render rules to any AI coding agent
Theory The math behind Thompson Sampling
Philosophy Principles and honest limitations

Contributing

git clone https://github.com/Peleke/buildlog-template
cd buildlog-template
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest

We're especially interested in better context representations, credit assignment approaches, statistical methodology improvements, and real-world experiment results (positive or negative).

License

MIT License. See LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buildlog-0.10.5.tar.gz (126.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buildlog-0.10.5-py3-none-any.whl (154.5 kB view details)

Uploaded Python 3

File details

Details for the file buildlog-0.10.5.tar.gz.

File metadata

  • Download URL: buildlog-0.10.5.tar.gz
  • Upload date:
  • Size: 126.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for buildlog-0.10.5.tar.gz
Algorithm Hash digest
SHA256 db5ef3f48f10f60113095c9a65d19108648267108024aae4a184c2539064e83d
MD5 8ea24434bdd1f01218f3825dc981ef05
BLAKE2b-256 992f813bf93bb4332af49b5780f7f77ef76b7b06dde722f1f4956db41c01e237

See more details on using hashes here.

Provenance

The following attestation bundles were made for buildlog-0.10.5.tar.gz:

Publisher: publish.yml on Peleke/buildlog-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file buildlog-0.10.5-py3-none-any.whl.

File metadata

  • Download URL: buildlog-0.10.5-py3-none-any.whl
  • Upload date:
  • Size: 154.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for buildlog-0.10.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d87294b678d7d8411ae201f4811375e8aab8990051994ca2b5eb98c58a53d1bb
MD5 1241b8904807d98d479ae5dd0e1387e6
BLAKE2b-256 8c0258ccc3e063ac5100ff586c500841b5ef0317159b2984783d10201d57c653

See more details on using hashes here.

Provenance

The following attestation bundles were made for buildlog-0.10.5-py3-none-any.whl:

Publisher: publish.yml on Peleke/buildlog-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page