buildlog 0.8.0__tar.gz → 0.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- buildlog-0.10.0/PKG-INFO +248 -0
- buildlog-0.10.0/README.md +189 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/post_gen.py +10 -5
- {buildlog-0.8.0 → buildlog-0.10.0}/pyproject.toml +4 -6
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/cli.py +491 -30
- buildlog-0.10.0/src/buildlog/constants.py +121 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/core/__init__.py +44 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/core/operations.py +1189 -13
- buildlog-0.10.0/src/buildlog/data/seeds/bragi.yaml +61 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/llm.py +51 -4
- buildlog-0.10.0/src/buildlog/mcp/__init__.py +65 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/mcp/server.py +40 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/mcp/tools.py +526 -12
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/seed_engine/__init__.py +2 -0
- buildlog-0.10.0/src/buildlog/seed_engine/llm_extractor.py +121 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/seed_engine/pipeline.py +45 -1
- buildlog-0.10.0/template/buildlog/.gitkeep +0 -0
- buildlog-0.10.0/template/buildlog/assets/.gitkeep +0 -0
- buildlog-0.8.0/PKG-INFO +0 -151
- buildlog-0.8.0/README.md +0 -91
- buildlog-0.8.0/src/buildlog/mcp/__init__.py +0 -17
- {buildlog-0.8.0 → buildlog-0.10.0}/.gitignore +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/LICENSE +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/copier.yml +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/__init__.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/confidence.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/core/bandit.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/data/__init__.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/data/seeds/security_karen.yaml +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/data/seeds/test_terrorist.yaml +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/distill.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/embeddings.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/engine/__init__.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/engine/bandit.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/engine/confidence.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/engine/embeddings.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/engine/experiments.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/engine/types.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/__init__.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/base.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/claude_md.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/continue_dev.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/copilot.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/cursor.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/settings_json.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/skill.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/tracking.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/render/windsurf.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/seed_engine/categorizers.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/seed_engine/extractors.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/seed_engine/generators.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/seed_engine/models.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/seed_engine/sources.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/seeds.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/skills.py +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/src/buildlog/stats.py +0 -0
- {buildlog-0.8.0/template/buildlog → buildlog-0.10.0/template/buildlog/.buildlog}/.gitkeep +0 -0
- {buildlog-0.8.0/template/buildlog/assets → buildlog-0.10.0/template/buildlog/.buildlog/seeds}/.gitkeep +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/template/buildlog/2026-01-01-example.md +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/template/buildlog/BUILDLOG_SYSTEM.md +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/template/buildlog/_TEMPLATE.md +0 -0
- {buildlog-0.8.0 → buildlog-0.10.0}/template/buildlog/_TEMPLATE_QUICK.md +0 -0
buildlog-0.10.0/PKG-INFO
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: buildlog
|
|
3
|
+
Version: 0.10.0
|
|
4
|
+
Summary: Engineering notebook for AI-assisted development
|
|
5
|
+
Project-URL: Homepage, https://github.com/Peleke/buildlog-template
|
|
6
|
+
Project-URL: Repository, https://github.com/Peleke/buildlog-template
|
|
7
|
+
Author: Peleke Sengstacke
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: ai,buildlog,development,documentation,journal
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Documentation
|
|
21
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Requires-Dist: click>=8.0.0
|
|
24
|
+
Requires-Dist: copier>=9.0.0
|
|
25
|
+
Requires-Dist: mcp>=1.0.0
|
|
26
|
+
Requires-Dist: numpy>=1.21.0
|
|
27
|
+
Requires-Dist: pymupdf>=1.26.7
|
|
28
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
29
|
+
Provides-Extra: all
|
|
30
|
+
Requires-Dist: anthropic>=0.40.0; extra == 'all'
|
|
31
|
+
Requires-Dist: ollama>=0.4.0; extra == 'all'
|
|
32
|
+
Requires-Dist: openai>=1.0.0; extra == 'all'
|
|
33
|
+
Requires-Dist: sentence-transformers>=2.2.0; extra == 'all'
|
|
34
|
+
Provides-Extra: anthropic
|
|
35
|
+
Requires-Dist: anthropic>=0.40.0; extra == 'anthropic'
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: black>=24.0.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: flake8>=7.0.0; extra == 'dev'
|
|
39
|
+
Requires-Dist: isort>=5.13.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: mkdocs-material>=9.5.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: mypy>=1.8.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: pre-commit>=3.6.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
46
|
+
Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
|
|
47
|
+
Provides-Extra: embeddings
|
|
48
|
+
Requires-Dist: sentence-transformers>=2.2.0; extra == 'embeddings'
|
|
49
|
+
Provides-Extra: engine
|
|
50
|
+
Provides-Extra: llm
|
|
51
|
+
Requires-Dist: anthropic>=0.40.0; extra == 'llm'
|
|
52
|
+
Requires-Dist: ollama>=0.4.0; extra == 'llm'
|
|
53
|
+
Provides-Extra: mcp
|
|
54
|
+
Provides-Extra: ollama
|
|
55
|
+
Requires-Dist: ollama>=0.4.0; extra == 'ollama'
|
|
56
|
+
Provides-Extra: openai
|
|
57
|
+
Requires-Dist: openai>=1.0.0; extra == 'openai'
|
|
58
|
+
Description-Content-Type: text/markdown
|
|
59
|
+
|
|
60
|
+
<div align="center">
|
|
61
|
+
|
|
62
|
+
# buildlog
|
|
63
|
+
|
|
64
|
+
### A measurable learning loop for AI-assisted work
|
|
65
|
+
|
|
66
|
+
[](https://pypi.org/project/buildlog/)
|
|
67
|
+
[](https://python.org/)
|
|
68
|
+
[](https://github.com/Peleke/buildlog-template/actions/workflows/ci.yml)
|
|
69
|
+
[](https://opensource.org/licenses/MIT)
|
|
70
|
+
[](https://peleke.github.io/buildlog-template/)
|
|
71
|
+
|
|
72
|
+
**Track what works. Prove it. Drop what doesn't.**
|
|
73
|
+
|
|
74
|
+
<img src="assets/hero-banner-perfectdeliberate.png" alt="buildlog - A measurable learning loop for AI-assisted work" width="800"/>
|
|
75
|
+
|
|
76
|
+
> **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](https://github.com/Peleke/buildlog-template/issues) or DM me. Budget exists.
|
|
77
|
+
|
|
78
|
+
**[Read the full documentation](https://peleke.github.io/buildlog-template/)**
|
|
79
|
+
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## The Problem
|
|
85
|
+
|
|
86
|
+
Most AI agents do not learn. They execute without retaining context. You can bolt on memory stores and tool routers, but if the system cannot demonstrably improve its decision-making over time, you have a persistent memory store, not a learning system.
|
|
87
|
+
|
|
88
|
+
Every AI-assisted work session produces a trajectory: goals, decisions, tool uses, corrections, outcomes. Almost all of this is discarded. The next session starts from scratch with the same blind spots.
|
|
89
|
+
|
|
90
|
+
buildlog exists to close that gap. It captures structured trajectories from real work, extracts decision patterns, and uses statistical methods to select which patterns to surface in future sessions, then measures whether that selection actually reduced mistakes.
|
|
91
|
+
|
|
92
|
+
buildlog measures whether the system actually got better, and proves it.
|
|
93
|
+
|
|
94
|
+
## How It Works
|
|
95
|
+
|
|
96
|
+
### 1. Capture structured work trajectories
|
|
97
|
+
|
|
98
|
+
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.
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
buildlog init # scaffold a project
|
|
102
|
+
buildlog new my-feature # start a session
|
|
103
|
+
# ... work ...
|
|
104
|
+
buildlog commit -m "feat: add auth"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 2. Extract decision patterns as seeds
|
|
108
|
+
|
|
109
|
+
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.
|
|
110
|
+
|
|
111
|
+
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.
|
|
112
|
+
|
|
113
|
+
### 3. Select which patterns to surface using Thompson Sampling
|
|
114
|
+
|
|
115
|
+
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).
|
|
116
|
+
|
|
117
|
+
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.
|
|
118
|
+
|
|
119
|
+
### 4. Render to every agent format
|
|
120
|
+
|
|
121
|
+
Selected rules are written into the instruction files your agents actually read:
|
|
122
|
+
|
|
123
|
+
- `CLAUDE.md` (Claude Code)
|
|
124
|
+
- `.cursorrules` (Cursor)
|
|
125
|
+
- `.github/copilot-instructions.md` (GitHub Copilot)
|
|
126
|
+
- Windsurf, Continue.dev, generic `settings.json`
|
|
127
|
+
|
|
128
|
+
The same knowledge base renders to every agent format.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
buildlog skills # render current policy to agent files
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 5. Close the loop with experiments
|
|
135
|
+
|
|
136
|
+
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.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
buildlog experiment start
|
|
140
|
+
# ... work across sessions ...
|
|
141
|
+
buildlog experiment end
|
|
142
|
+
buildlog experiment report
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## What Else Is In the Box
|
|
146
|
+
|
|
147
|
+
- **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.
|
|
148
|
+
- **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.
|
|
149
|
+
- **MCP server:** buildlog exposes itself as an MCP server so agents can query seeds, skills, and build history programmatically during sessions.
|
|
150
|
+
- **npm wrapper:** `npx @peleke.s/buildlog` for JS/TS projects. Thin shim that finds and invokes the Python CLI.
|
|
151
|
+
|
|
152
|
+
## Current Limits
|
|
153
|
+
|
|
154
|
+
This is v0.8, not the end state.
|
|
155
|
+
|
|
156
|
+
- **Extraction quality is uneven.** Regex extractors miss nuance; LLM extractors are accurate but expensive. The middle ground is still being found.
|
|
157
|
+
- **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.
|
|
158
|
+
- **Credit assignment is limited.** When multiple rules are active, the system doesn't yet isolate which one was responsible for an outcome.
|
|
159
|
+
- **Single-agent only.** Multi-agent coordination (shared learning across agents) is designed but not implemented.
|
|
160
|
+
- **Long-horizon learning is not modeled.** The bandit operates per-session. Longer arcs of competence building need richer policy models.
|
|
161
|
+
|
|
162
|
+
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.
|
|
163
|
+
|
|
164
|
+
## Installation
|
|
165
|
+
|
|
166
|
+
### Quick start
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
pip install buildlog # MCP server included by default
|
|
170
|
+
buildlog init --defaults # scaffold project, register MCP, update CLAUDE.md
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
That's it. Claude Code will now have access to all 29 buildlog tools.
|
|
174
|
+
|
|
175
|
+
### Global install (recommended)
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
uv tool install buildlog # or: pipx install buildlog
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
This puts `buildlog` and `buildlog-mcp` on your PATH. Works from any directory.
|
|
182
|
+
|
|
183
|
+
### Per-project (virtual environment)
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
uv pip install buildlog # or: pip install buildlog
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### For JS/TS projects
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
npx @peleke.s/buildlog init
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### MCP server for Claude Code
|
|
196
|
+
|
|
197
|
+
`buildlog init` auto-registers the MCP server. For existing projects:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
buildlog init-mcp # register MCP in .claude/settings.json
|
|
201
|
+
buildlog mcp-test # verify all 29 tools are registered
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
This exposes buildlog tools (seeds, skills, experiments, gauntlet, bandit status) to any Claude Code session.
|
|
205
|
+
|
|
206
|
+
## Quick Start
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
buildlog init --defaults # scaffold + MCP + CLAUDE.md
|
|
210
|
+
buildlog new my-feature # start a session
|
|
211
|
+
# ... work ...
|
|
212
|
+
buildlog commit -m "feat: add auth"
|
|
213
|
+
buildlog experiment start
|
|
214
|
+
# ... work across sessions ...
|
|
215
|
+
buildlog experiment end
|
|
216
|
+
buildlog experiment report
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Documentation
|
|
220
|
+
|
|
221
|
+
| Section | Description |
|
|
222
|
+
|---------|------------|
|
|
223
|
+
| [Installation](https://peleke.github.io/buildlog-template/getting-started/installation/) | Setup, extras, and initialization |
|
|
224
|
+
| [Quick Start](https://peleke.github.io/buildlog-template/getting-started/quick-start/) | Full pipeline walkthrough |
|
|
225
|
+
| [Core Concepts](https://peleke.github.io/buildlog-template/getting-started/concepts/) | The problem, the claim, and the metric |
|
|
226
|
+
| [CLI Reference](https://peleke.github.io/buildlog-template/guides/cli-reference/) | Every command documented |
|
|
227
|
+
| [MCP Integration](https://peleke.github.io/buildlog-template/guides/mcp-integration/) | Claude Code setup and available tools |
|
|
228
|
+
| [Experiments](https://peleke.github.io/buildlog-template/guides/experiments/) | Running and measuring experiments |
|
|
229
|
+
| [Review Gauntlet](https://peleke.github.io/buildlog-template/guides/review-gauntlet/) | Reviewer personas and the gauntlet loop |
|
|
230
|
+
| [Multi-Agent Setup](https://peleke.github.io/buildlog-template/guides/multi-agent/) | Render rules to any AI coding agent |
|
|
231
|
+
| [Theory](https://peleke.github.io/buildlog-template/theory/00-background/) | The math behind Thompson Sampling |
|
|
232
|
+
| [Philosophy](https://peleke.github.io/buildlog-template/philosophy/) | Principles and honest limitations |
|
|
233
|
+
|
|
234
|
+
## Contributing
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
git clone https://github.com/Peleke/buildlog-template
|
|
238
|
+
cd buildlog-template
|
|
239
|
+
uv venv && source .venv/bin/activate
|
|
240
|
+
uv pip install -e ".[dev]"
|
|
241
|
+
pytest
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
We're especially interested in better context representations, credit assignment approaches, statistical methodology improvements, and real-world experiment results (positive or negative).
|
|
245
|
+
|
|
246
|
+
## License
|
|
247
|
+
|
|
248
|
+
MIT License. See [LICENSE](./LICENSE)
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# buildlog
|
|
4
|
+
|
|
5
|
+
### A measurable learning loop for AI-assisted work
|
|
6
|
+
|
|
7
|
+
[](https://pypi.org/project/buildlog/)
|
|
8
|
+
[](https://python.org/)
|
|
9
|
+
[](https://github.com/Peleke/buildlog-template/actions/workflows/ci.yml)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[](https://peleke.github.io/buildlog-template/)
|
|
12
|
+
|
|
13
|
+
**Track what works. Prove it. Drop what doesn't.**
|
|
14
|
+
|
|
15
|
+
<img src="assets/hero-banner-perfectdeliberate.png" alt="buildlog - A measurable learning loop for AI-assisted work" width="800"/>
|
|
16
|
+
|
|
17
|
+
> **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](https://github.com/Peleke/buildlog-template/issues) or DM me. Budget exists.
|
|
18
|
+
|
|
19
|
+
**[Read the full documentation](https://peleke.github.io/buildlog-template/)**
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## The Problem
|
|
26
|
+
|
|
27
|
+
Most AI agents do not learn. They execute without retaining context. You can bolt on memory stores and tool routers, but if the system cannot demonstrably improve its decision-making over time, you have a persistent memory store, not a learning system.
|
|
28
|
+
|
|
29
|
+
Every AI-assisted work session produces a trajectory: goals, decisions, tool uses, corrections, outcomes. Almost all of this is discarded. The next session starts from scratch with the same blind spots.
|
|
30
|
+
|
|
31
|
+
buildlog exists to close that gap. It captures structured trajectories from real work, extracts decision patterns, and uses statistical methods to select which patterns to surface in future sessions, then measures whether that selection actually reduced mistakes.
|
|
32
|
+
|
|
33
|
+
buildlog measures whether the system actually got better, and proves it.
|
|
34
|
+
|
|
35
|
+
## How It Works
|
|
36
|
+
|
|
37
|
+
### 1. Capture structured work trajectories
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
buildlog init # scaffold a project
|
|
43
|
+
buildlog new my-feature # start a session
|
|
44
|
+
# ... work ...
|
|
45
|
+
buildlog commit -m "feat: add auth"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. Extract decision patterns as seeds
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
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.
|
|
53
|
+
|
|
54
|
+
### 3. Select which patterns to surface using Thompson Sampling
|
|
55
|
+
|
|
56
|
+
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).
|
|
57
|
+
|
|
58
|
+
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.
|
|
59
|
+
|
|
60
|
+
### 4. Render to every agent format
|
|
61
|
+
|
|
62
|
+
Selected rules are written into the instruction files your agents actually read:
|
|
63
|
+
|
|
64
|
+
- `CLAUDE.md` (Claude Code)
|
|
65
|
+
- `.cursorrules` (Cursor)
|
|
66
|
+
- `.github/copilot-instructions.md` (GitHub Copilot)
|
|
67
|
+
- Windsurf, Continue.dev, generic `settings.json`
|
|
68
|
+
|
|
69
|
+
The same knowledge base renders to every agent format.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
buildlog skills # render current policy to agent files
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 5. Close the loop with experiments
|
|
76
|
+
|
|
77
|
+
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.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
buildlog experiment start
|
|
81
|
+
# ... work across sessions ...
|
|
82
|
+
buildlog experiment end
|
|
83
|
+
buildlog experiment report
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## What Else Is In the Box
|
|
87
|
+
|
|
88
|
+
- **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.
|
|
89
|
+
- **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.
|
|
90
|
+
- **MCP server:** buildlog exposes itself as an MCP server so agents can query seeds, skills, and build history programmatically during sessions.
|
|
91
|
+
- **npm wrapper:** `npx @peleke.s/buildlog` for JS/TS projects. Thin shim that finds and invokes the Python CLI.
|
|
92
|
+
|
|
93
|
+
## Current Limits
|
|
94
|
+
|
|
95
|
+
This is v0.8, not the end state.
|
|
96
|
+
|
|
97
|
+
- **Extraction quality is uneven.** Regex extractors miss nuance; LLM extractors are accurate but expensive. The middle ground is still being found.
|
|
98
|
+
- **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.
|
|
99
|
+
- **Credit assignment is limited.** When multiple rules are active, the system doesn't yet isolate which one was responsible for an outcome.
|
|
100
|
+
- **Single-agent only.** Multi-agent coordination (shared learning across agents) is designed but not implemented.
|
|
101
|
+
- **Long-horizon learning is not modeled.** The bandit operates per-session. Longer arcs of competence building need richer policy models.
|
|
102
|
+
|
|
103
|
+
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.
|
|
104
|
+
|
|
105
|
+
## Installation
|
|
106
|
+
|
|
107
|
+
### Quick start
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pip install buildlog # MCP server included by default
|
|
111
|
+
buildlog init --defaults # scaffold project, register MCP, update CLAUDE.md
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
That's it. Claude Code will now have access to all 29 buildlog tools.
|
|
115
|
+
|
|
116
|
+
### Global install (recommended)
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
uv tool install buildlog # or: pipx install buildlog
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
This puts `buildlog` and `buildlog-mcp` on your PATH. Works from any directory.
|
|
123
|
+
|
|
124
|
+
### Per-project (virtual environment)
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
uv pip install buildlog # or: pip install buildlog
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### For JS/TS projects
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npx @peleke.s/buildlog init
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### MCP server for Claude Code
|
|
137
|
+
|
|
138
|
+
`buildlog init` auto-registers the MCP server. For existing projects:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
buildlog init-mcp # register MCP in .claude/settings.json
|
|
142
|
+
buildlog mcp-test # verify all 29 tools are registered
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
This exposes buildlog tools (seeds, skills, experiments, gauntlet, bandit status) to any Claude Code session.
|
|
146
|
+
|
|
147
|
+
## Quick Start
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
buildlog init --defaults # scaffold + MCP + CLAUDE.md
|
|
151
|
+
buildlog new my-feature # start a session
|
|
152
|
+
# ... work ...
|
|
153
|
+
buildlog commit -m "feat: add auth"
|
|
154
|
+
buildlog experiment start
|
|
155
|
+
# ... work across sessions ...
|
|
156
|
+
buildlog experiment end
|
|
157
|
+
buildlog experiment report
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Documentation
|
|
161
|
+
|
|
162
|
+
| Section | Description |
|
|
163
|
+
|---------|------------|
|
|
164
|
+
| [Installation](https://peleke.github.io/buildlog-template/getting-started/installation/) | Setup, extras, and initialization |
|
|
165
|
+
| [Quick Start](https://peleke.github.io/buildlog-template/getting-started/quick-start/) | Full pipeline walkthrough |
|
|
166
|
+
| [Core Concepts](https://peleke.github.io/buildlog-template/getting-started/concepts/) | The problem, the claim, and the metric |
|
|
167
|
+
| [CLI Reference](https://peleke.github.io/buildlog-template/guides/cli-reference/) | Every command documented |
|
|
168
|
+
| [MCP Integration](https://peleke.github.io/buildlog-template/guides/mcp-integration/) | Claude Code setup and available tools |
|
|
169
|
+
| [Experiments](https://peleke.github.io/buildlog-template/guides/experiments/) | Running and measuring experiments |
|
|
170
|
+
| [Review Gauntlet](https://peleke.github.io/buildlog-template/guides/review-gauntlet/) | Reviewer personas and the gauntlet loop |
|
|
171
|
+
| [Multi-Agent Setup](https://peleke.github.io/buildlog-template/guides/multi-agent/) | Render rules to any AI coding agent |
|
|
172
|
+
| [Theory](https://peleke.github.io/buildlog-template/theory/00-background/) | The math behind Thompson Sampling |
|
|
173
|
+
| [Philosophy](https://peleke.github.io/buildlog-template/philosophy/) | Principles and honest limitations |
|
|
174
|
+
|
|
175
|
+
## Contributing
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
git clone https://github.com/Peleke/buildlog-template
|
|
179
|
+
cd buildlog-template
|
|
180
|
+
uv venv && source .venv/bin/activate
|
|
181
|
+
uv pip install -e ".[dev]"
|
|
182
|
+
pytest
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
We're especially interested in better context representations, credit assignment approaches, statistical methodology improvements, and real-world experiment results (positive or negative).
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
MIT License. See [LICENSE](./LICENSE)
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
try:
|
|
7
|
+
from buildlog.constants import CLAUDE_MD_BUILDLOG_SECTION
|
|
8
|
+
except ImportError:
|
|
9
|
+
# Fallback for when buildlog isn't installed (e.g., copier from GitHub)
|
|
10
|
+
CLAUDE_MD_BUILDLOG_SECTION = """
|
|
7
11
|
## Build Journal
|
|
8
12
|
|
|
9
13
|
After completing significant work (features, debugging sessions, deployments,
|
|
@@ -40,15 +44,16 @@ def main():
|
|
|
40
44
|
|
|
41
45
|
content = claude_md.read_text()
|
|
42
46
|
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
# Check for either old or new section marker
|
|
48
|
+
if "## buildlog Integration" in content or "## Build Journal" in content:
|
|
49
|
+
print("buildlog section already exists in CLAUDE.md")
|
|
45
50
|
return
|
|
46
51
|
|
|
47
52
|
# Append to end of file
|
|
48
53
|
with open(claude_md, "a") as f:
|
|
49
|
-
f.write("\n" +
|
|
54
|
+
f.write("\n" + CLAUDE_MD_BUILDLOG_SECTION)
|
|
50
55
|
|
|
51
|
-
print("Added
|
|
56
|
+
print("Added buildlog Integration section to CLAUDE.md")
|
|
52
57
|
|
|
53
58
|
|
|
54
59
|
if __name__ == "__main__":
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "buildlog"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.10.0"
|
|
8
8
|
description = "Engineering notebook for AI-assisted development"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -32,6 +32,7 @@ dependencies = [
|
|
|
32
32
|
"pyyaml>=6.0.0",
|
|
33
33
|
"numpy>=1.21.0",
|
|
34
34
|
"pymupdf>=1.26.7",
|
|
35
|
+
"mcp>=1.0.0",
|
|
35
36
|
]
|
|
36
37
|
|
|
37
38
|
[project.optional-dependencies]
|
|
@@ -60,15 +61,12 @@ llm = [
|
|
|
60
61
|
"ollama>=0.4.0",
|
|
61
62
|
"anthropic>=0.40.0",
|
|
62
63
|
]
|
|
63
|
-
# MCP server for Claude Code integration
|
|
64
|
-
mcp = [
|
|
65
|
-
"mcp>=1.0.0",
|
|
66
|
-
]
|
|
64
|
+
# MCP server for Claude Code integration (now a default dependency, kept for backwards compat)
|
|
65
|
+
mcp = []
|
|
67
66
|
# All optional features
|
|
68
67
|
all = [
|
|
69
68
|
"sentence-transformers>=2.2.0",
|
|
70
69
|
"openai>=1.0.0",
|
|
71
|
-
"mcp>=1.0.0",
|
|
72
70
|
"ollama>=0.4.0",
|
|
73
71
|
"anthropic>=0.40.0",
|
|
74
72
|
]
|