buildlog 0.8.0__py3-none-any.whl → 0.10.0__py3-none-any.whl

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.
Files changed (28) hide show
  1. buildlog/cli.py +491 -30
  2. buildlog/constants.py +121 -0
  3. buildlog/core/__init__.py +44 -0
  4. buildlog/core/operations.py +1189 -13
  5. buildlog/data/seeds/bragi.yaml +61 -0
  6. buildlog/llm.py +51 -4
  7. buildlog/mcp/__init__.py +51 -3
  8. buildlog/mcp/server.py +40 -0
  9. buildlog/mcp/tools.py +526 -12
  10. buildlog/seed_engine/__init__.py +2 -0
  11. buildlog/seed_engine/llm_extractor.py +121 -0
  12. buildlog/seed_engine/pipeline.py +45 -1
  13. {buildlog-0.8.0.data → buildlog-0.10.0.data}/data/share/buildlog/post_gen.py +10 -5
  14. buildlog-0.10.0.data/data/share/buildlog/template/buildlog/.gitkeep +0 -0
  15. buildlog-0.10.0.data/data/share/buildlog/template/buildlog/assets/.gitkeep +0 -0
  16. buildlog-0.10.0.dist-info/METADATA +248 -0
  17. {buildlog-0.8.0.dist-info → buildlog-0.10.0.dist-info}/RECORD +27 -22
  18. buildlog-0.8.0.dist-info/METADATA +0 -151
  19. {buildlog-0.8.0.data → buildlog-0.10.0.data}/data/share/buildlog/copier.yml +0 -0
  20. {buildlog-0.8.0.data/data/share/buildlog/template/buildlog → buildlog-0.10.0.data/data/share/buildlog/template/buildlog/.buildlog}/.gitkeep +0 -0
  21. {buildlog-0.8.0.data/data/share/buildlog/template/buildlog/assets → buildlog-0.10.0.data/data/share/buildlog/template/buildlog/.buildlog/seeds}/.gitkeep +0 -0
  22. {buildlog-0.8.0.data → buildlog-0.10.0.data}/data/share/buildlog/template/buildlog/2026-01-01-example.md +0 -0
  23. {buildlog-0.8.0.data → buildlog-0.10.0.data}/data/share/buildlog/template/buildlog/BUILDLOG_SYSTEM.md +0 -0
  24. {buildlog-0.8.0.data → buildlog-0.10.0.data}/data/share/buildlog/template/buildlog/_TEMPLATE.md +0 -0
  25. {buildlog-0.8.0.data → buildlog-0.10.0.data}/data/share/buildlog/template/buildlog/_TEMPLATE_QUICK.md +0 -0
  26. {buildlog-0.8.0.dist-info → buildlog-0.10.0.dist-info}/WHEEL +0 -0
  27. {buildlog-0.8.0.dist-info → buildlog-0.10.0.dist-info}/entry_points.txt +0 -0
  28. {buildlog-0.8.0.dist-info → buildlog-0.10.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,121 @@
1
+ """LLM-backed rule extraction for the seed engine pipeline.
2
+
3
+ Adapts LLMBackend.extract_rules() into the RuleExtractor interface,
4
+ bridging the LLM module with the seed engine's 4-step pipeline.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import logging
10
+ from typing import TYPE_CHECKING, Any
11
+
12
+ from buildlog.seed_engine.extractors import RuleExtractor
13
+ from buildlog.seed_engine.models import CandidateRule, Source
14
+
15
+ if TYPE_CHECKING:
16
+ from buildlog.llm import LLMBackend
17
+
18
+ logger = logging.getLogger(__name__)
19
+
20
+ _PLACEHOLDER = "Not specified by LLM"
21
+
22
+
23
+ class LLMExtractor(RuleExtractor):
24
+ """LLM-backed rule extraction from source content.
25
+
26
+ Wraps any LLMBackend to produce CandidateRules with full
27
+ defensibility fields. Fields the LLM doesn't populate get
28
+ placeholder values so downstream validation passes.
29
+
30
+ Usage:
31
+ from buildlog.llm import OllamaBackend
32
+ from buildlog.seed_engine.llm_extractor import LLMExtractor
33
+
34
+ backend = OllamaBackend(model="llama3.2")
35
+ extractor = LLMExtractor(backend, source_content={"https://...": "..."})
36
+
37
+ rules = extractor.extract(source)
38
+ """
39
+
40
+ def __init__(
41
+ self,
42
+ backend: LLMBackend,
43
+ source_content: dict[str, str] | None = None,
44
+ ) -> None:
45
+ """Initialize with an LLM backend.
46
+
47
+ Args:
48
+ backend: Any LLMBackend (Ollama, Anthropic, etc.).
49
+ source_content: Optional map of source.url → text content.
50
+ For sources that need pre-fetched content.
51
+ """
52
+ self._backend = backend
53
+ self._source_content = source_content or {}
54
+
55
+ def extract(self, source: Source) -> list[CandidateRule]:
56
+ """Extract candidate rules from a source via LLM.
57
+
58
+ Resolution for content:
59
+ 1. source_content dict (keyed by source.url)
60
+ 2. source.description as fallback
61
+
62
+ Returns empty list on LLM failure (logged, not raised).
63
+ """
64
+ content = self._source_content.get(source.url, "").strip()
65
+ if not content:
66
+ content = source.description.strip()
67
+ if not content:
68
+ logger.warning("No content for source %s, skipping", source.name)
69
+ return []
70
+
71
+ try:
72
+ extracted = self._backend.extract_rules(content)
73
+ except Exception:
74
+ logger.exception("LLM extraction failed for %s", source.name)
75
+ return []
76
+
77
+ candidates: list[CandidateRule] = []
78
+ for er in extracted:
79
+ if not er.rule.strip():
80
+ continue
81
+
82
+ metadata: dict[str, Any] = {
83
+ "extractor": "llm",
84
+ "severity": er.severity,
85
+ "scope": er.scope,
86
+ }
87
+ # Include backend class name (public info only)
88
+ metadata["backend_type"] = type(self._backend).__name__
89
+
90
+ candidates.append(
91
+ CandidateRule(
92
+ rule=er.rule,
93
+ context=er.context or _PLACEHOLDER,
94
+ antipattern=er.antipattern or _PLACEHOLDER,
95
+ rationale=er.rationale or _PLACEHOLDER,
96
+ source=source,
97
+ raw_tags=[er.category] + er.applicability,
98
+ confidence=0.7,
99
+ metadata=metadata,
100
+ )
101
+ )
102
+
103
+ logger.info("LLM extracted %d rules from %s", len(candidates), source.name)
104
+ return candidates
105
+
106
+ def validate(self, rule: CandidateRule) -> list[str]:
107
+ """Validate a candidate rule.
108
+
109
+ Warns on placeholder defensibility fields.
110
+ Requires non-empty rule text.
111
+ """
112
+ issues: list[str] = []
113
+ if not rule.rule.strip():
114
+ issues.append("Rule text is empty")
115
+ if rule.context == _PLACEHOLDER:
116
+ issues.append("Context is LLM placeholder — consider enriching")
117
+ if rule.antipattern == _PLACEHOLDER:
118
+ issues.append("Antipattern is LLM placeholder — consider enriching")
119
+ if rule.rationale == _PLACEHOLDER:
120
+ issues.append("Rationale is LLM placeholder — consider enriching")
121
+ return issues
@@ -12,13 +12,16 @@ from __future__ import annotations
12
12
  import logging
13
13
  from dataclasses import dataclass
14
14
  from pathlib import Path
15
- from typing import Any
15
+ from typing import TYPE_CHECKING, Any
16
16
 
17
17
  from buildlog.seed_engine.categorizers import Categorizer, TagBasedCategorizer
18
18
  from buildlog.seed_engine.extractors import ManualExtractor, RuleExtractor
19
19
  from buildlog.seed_engine.generators import SeedGenerator
20
20
  from buildlog.seed_engine.models import CandidateRule, CategorizedRule, Source
21
21
 
22
+ if TYPE_CHECKING:
23
+ from buildlog.llm import LLMBackend
24
+
22
25
  logger = logging.getLogger(__name__)
23
26
 
24
27
 
@@ -174,6 +177,7 @@ class Pipeline:
174
177
  Returns:
175
178
  List of validation issues (empty if valid).
176
179
  """
180
+ allowed_schemes = {"https", "http", "file"}
177
181
  issues = []
178
182
  for i, source in enumerate(sources):
179
183
  prefix = f"Source {i + 1} ({source.name})"
@@ -181,10 +185,50 @@ class Pipeline:
181
185
  issues.append(f"{prefix}: Missing name")
182
186
  if not source.url.strip():
183
187
  issues.append(f"{prefix}: Missing URL")
188
+ else:
189
+ # Validate URL scheme
190
+ scheme = (
191
+ source.url.split("://")[0].lower() if "://" in source.url else ""
192
+ )
193
+ if scheme not in allowed_schemes:
194
+ issues.append(
195
+ f"{prefix}: URL scheme '{scheme}' not in allowlist {allowed_schemes}"
196
+ )
184
197
  if not source.domain.strip():
185
198
  issues.append(f"{prefix}: Missing domain")
186
199
  return issues
187
200
 
201
+ @classmethod
202
+ def with_llm(
203
+ cls,
204
+ persona: str,
205
+ backend: LLMBackend,
206
+ source_content: dict[str, str] | None = None,
207
+ default_category: str = "general",
208
+ version: int = 1,
209
+ ) -> Pipeline:
210
+ """Convenience constructor wiring LLMExtractor + TagBasedCategorizer.
211
+
212
+ Args:
213
+ persona: Persona name for the seed file.
214
+ backend: Any LLMBackend implementation.
215
+ source_content: Optional pre-fetched content map.
216
+ default_category: Fallback category for uncategorized rules.
217
+ version: Seed file version.
218
+
219
+ Returns:
220
+ Pipeline configured with LLMExtractor.
221
+ """
222
+ from buildlog.seed_engine.llm_extractor import LLMExtractor
223
+
224
+ return cls(
225
+ persona=persona,
226
+ default_category=default_category,
227
+ version=version,
228
+ extractor=LLMExtractor(backend, source_content),
229
+ categorizer=TagBasedCategorizer(default_category=default_category),
230
+ )
231
+
188
232
  def dry_run(self, sources: list[Source]) -> dict[str, Any]:
189
233
  """Run pipeline without writing, returning preview.
190
234
 
@@ -3,7 +3,11 @@
3
3
 
4
4
  from pathlib import Path
5
5
 
6
- CLAUDE_MD_SECTION = """
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
- if "## Build Journal" in content:
44
- print("Build Journal section already exists in CLAUDE.md")
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" + CLAUDE_MD_SECTION)
54
+ f.write("\n" + CLAUDE_MD_BUILDLOG_SECTION)
50
55
 
51
- print("Added Build Journal section to CLAUDE.md")
56
+ print("Added buildlog Integration section to CLAUDE.md")
52
57
 
53
58
 
54
59
  if __name__ == "__main__":
@@ -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
+ [![PyPI](https://img.shields.io/pypi/v/buildlog?style=for-the-badge&logo=pypi&logoColor=white)](https://pypi.org/project/buildlog/)
67
+ [![Python](https://img.shields.io/pypi/pyversions/buildlog?style=for-the-badge&logo=python&logoColor=white)](https://python.org/)
68
+ [![CI](https://img.shields.io/github/actions/workflow/status/Peleke/buildlog-template/ci.yml?branch=main&style=for-the-badge&logo=github&label=CI)](https://github.com/Peleke/buildlog-template/actions/workflows/ci.yml)
69
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
70
+ [![Docs](https://img.shields.io/badge/docs-GitHub%20Pages-blue?style=for-the-badge&logo=github)](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)
@@ -1,16 +1,18 @@
1
1
  buildlog/__init__.py,sha256=wxluyg3fDOiaKUAOJa0cav39hwtNJS5Y_0X20uL_yi4,90
2
- buildlog/cli.py,sha256=G2d2N2cmC3HEiYc6_mQhRyW8PLHzrHr2Kx38ooQsMlU,59456
2
+ buildlog/cli.py,sha256=YSLegAPnIqPR_AGEkSTe3DaZilhRH4kdDUhbk1dLCD4,74956
3
3
  buildlog/confidence.py,sha256=jPvN0_3drGHQG1C7iUxUtYjKC62nNKsHHxu6WXMfJFg,10137
4
+ buildlog/constants.py,sha256=nwRAiI4NcXczdUK1C332i36BfnPqjMp4gHg2E4y4n5M,5783
4
5
  buildlog/distill.py,sha256=PL7UBToBb27BrCOTWGBTDIXGggtrUumHHBs0_MfG6vY,14166
5
6
  buildlog/embeddings.py,sha256=vPydWjJVkYp172zFou-lJ737qsu6vRMQAMs143RGIpA,12364
6
- buildlog/llm.py,sha256=vXFT03BZVI8GMX-ybSK18SoeABaZbr_B2KXm8WsNews,15278
7
+ buildlog/llm.py,sha256=t_3KnJ_eBmrtHaay4owG3EgGbJrVp_T379P0tTuyJf8,16986
7
8
  buildlog/seeds.py,sha256=L-lzO7rrDjMdVHcYKvEBm6scVDfCmFD0koiyafMZDLo,8596
8
9
  buildlog/skills.py,sha256=3CihyyAFfJh0w0VNXQauNhGm_RM8m_GIO1iiNLNPmsQ,33789
9
10
  buildlog/stats.py,sha256=2WdHdmzUNGobtWngmm9nA_UmqM7DQeAnZL8_rLQN8aw,13256
10
- buildlog/core/__init__.py,sha256=gPd6ava_sei0sYIS4NdeHgCVwJ2wEjyLt-Rxz_11IWU,1626
11
+ buildlog/core/__init__.py,sha256=yjmo_pWE7ijCvMSgBXDPVl5lgsUlTXjc1Nv7eIRjlVI,2642
11
12
  buildlog/core/bandit.py,sha256=0z58s42jpQiBgXdjb465apenWdBVTvoc7bDOcnAcPLo,24565
12
- buildlog/core/operations.py,sha256=4gElPJBG9zlXoXO6CPTolwoRrd45DOIV6X1SAQbF3zE,70205
13
+ buildlog/core/operations.py,sha256=fVpUcxt2AzktGy1iwSpazj3sLob6l4Rio9QtxDWHOec,104634
13
14
  buildlog/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ buildlog/data/seeds/bragi.yaml,sha256=2bheCsPHp6gHvgi8jCFTebs_q5X8WLVUduJe-Q-kQ0Y,3702
14
16
  buildlog/data/seeds/security_karen.yaml,sha256=Hjwp4j6FB-e0vCXp6AkyhAEkwASR4H1owdhPBID740E,8775
15
17
  buildlog/data/seeds/test_terrorist.yaml,sha256=-QY2x6d0LrlM6msMYaYwR43Wny9ZybQmU7pH_E7gSB0,11113
16
18
  buildlog/engine/__init__.py,sha256=KNTSUZTUHK6r2abAA-2PIb0wUcRgbE4juvBmoywaXHI,1750
@@ -19,9 +21,9 @@ buildlog/engine/confidence.py,sha256=7Zhw8bwT_S-qeVaGXT6dHOyjDTvwyhetLKCWhJH9jMc
19
21
  buildlog/engine/embeddings.py,sha256=78InITcBbaPZ29tUlb4hJNNVZ1fhxstvVa2fYvOh6QA,597
20
22
  buildlog/engine/experiments.py,sha256=38f_UsbY4TP3LTGM9yUsZxoXqxUGOxmLCoYrfZqjVks,20041
21
23
  buildlog/engine/types.py,sha256=W7U2B4TE79xACV0cuaidKevmTEskxqXfltH5hjIxV5k,734
22
- buildlog/mcp/__init__.py,sha256=jCLNUkYFrDcPd5dY9xbaaVANl-ZzdPim1BykgGY7f7U,334
23
- buildlog/mcp/server.py,sha256=vzgT_-SUWNNx9bvABJBgT7rHNGPx_nB7pVo-04WbwjI,1249
24
- buildlog/mcp/tools.py,sha256=k1f6R7Dgcx0VIKzTNezkcRc0UVkWXWkk-uGkRq1sIiw,17578
24
+ buildlog/mcp/__init__.py,sha256=dSjiS__oyYuGipAQDfNlM37NYZ60TMCCA9WXtQk81x0,1668
25
+ buildlog/mcp/server.py,sha256=Ua0Jk5jRuHGDSSLS0QEJhsXW2fKtrQlUdow-aeumI9M,2233
26
+ buildlog/mcp/tools.py,sha256=MRM9UMwoDmX0WaRq3JD1DlNnOOJdjNOzq7CQs2f0IC4,32764
25
27
  buildlog/render/__init__.py,sha256=jj-o-vPdqpivdFKK85xskCOT8Zn_2tb3Q5Jb0gWLjAg,2567
26
28
  buildlog/render/base.py,sha256=gQfvOsH1zttAo10xtEyNsAbqZ4NRSPiDihO-aiGgTsw,533
27
29
  buildlog/render/claude_md.py,sha256=R5z4dHh-3YwclbW3MAzHxgYQHtd5lXS3McJJ1isLGqE,4901
@@ -32,23 +34,26 @@ buildlog/render/settings_json.py,sha256=4DS5OWksPrFCa7MIgWIu0t4rxYmItpMdGfTqMX3a
32
34
  buildlog/render/skill.py,sha256=_7umIS1Ms1oQ2_PopYueFjX41nMq1p28yJp6DhXFdgU,5981
33
35
  buildlog/render/tracking.py,sha256=1y_Mf1s3KblV8TC0W9x2a_ynSJHLwkVZJcW1gs1a6q4,1786
34
36
  buildlog/render/windsurf.py,sha256=jfJLb-luQLjdBM38_KKp0mZ08bUSDTBPxSLOIFWxawQ,3047
35
- buildlog/seed_engine/__init__.py,sha256=f2LYSAs_D1bK4CW_pt54UEmy_SB1u1MOEJlKqM7_R7E,1869
37
+ buildlog/seed_engine/__init__.py,sha256=QHo59cq-Ar_M6UthSOu_zpfYR1OF2ePu1qWrbgQqLak,1949
36
38
  buildlog/seed_engine/categorizers.py,sha256=uzatJQPG4Vf7z7ZAeyQbL-bVJ8cUKBHG-3U93-BFIRQ,4649
37
39
  buildlog/seed_engine/extractors.py,sha256=rkztg62LzFH018ob5Tl1eFp_yfPo8syn3Ib4h6bAyK4,4824
38
40
  buildlog/seed_engine/generators.py,sha256=T3N3uHg359xSBypIGmvVWYI0Qh8WLlGIFQWX0_gs0I4,4358
41
+ buildlog/seed_engine/llm_extractor.py,sha256=nfTmN4vuEiPQuhiL_2DX1QZ7TZlDR2vxYy0tVrkf2Vc,4124
39
42
  buildlog/seed_engine/models.py,sha256=qESSuoF3CJy8pp96E3Vmb38V-snzeaW0Xg0RfbH8v1U,3418
40
- buildlog/seed_engine/pipeline.py,sha256=wLdcjyA_B4wFEb2iKwRCUGkX-oaVu9OXIcmLcEsJN6s,6527
43
+ buildlog/seed_engine/pipeline.py,sha256=cyR2Vf32Hf0PK5DxnaFcq56ygjJIiJWiIkHY4Uz7AS8,8082
41
44
  buildlog/seed_engine/sources.py,sha256=8j9oUFZCSKMr5VpIuAxTPY3wTzfTEmw6M_41_aismiE,11184
42
- buildlog-0.8.0.data/data/share/buildlog/copier.yml,sha256=hD_UcLGB9eDxTGkWjHAvUoiqQKhLC0w3G-kPKX_p43I,802
43
- buildlog-0.8.0.data/data/share/buildlog/post_gen.py,sha256=XFlo40LuPpAsBhIRRRtHqvU3_5POss4L401hp35ijhw,1744
44
- buildlog-0.8.0.data/data/share/buildlog/template/buildlog/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- buildlog-0.8.0.data/data/share/buildlog/template/buildlog/2026-01-01-example.md,sha256=7x9sKmydfmfKyNz9hV7MtYnQJuBwbxNanbPOcpQDDZQ,7040
46
- buildlog-0.8.0.data/data/share/buildlog/template/buildlog/BUILDLOG_SYSTEM.md,sha256=osclytWwl5jUiTgSpuT4cT3h3oPvCkZ5GPCnFuJZNcY,3802
47
- buildlog-0.8.0.data/data/share/buildlog/template/buildlog/_TEMPLATE.md,sha256=CUvxgcx1-9XT_EdQ8e_vnuPq_h-u1uhXJgForJU2Pso,2932
48
- buildlog-0.8.0.data/data/share/buildlog/template/buildlog/_TEMPLATE_QUICK.md,sha256=eUr5MiqLsM6drV7rAq53R1SLkK8G7LkMAUjWKXx81IA,409
49
- buildlog-0.8.0.data/data/share/buildlog/template/buildlog/assets/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- buildlog-0.8.0.dist-info/METADATA,sha256=JNxWkxamVUmEeEQ9vz56j4lzZwex35sJyUngqytW6c4,7032
51
- buildlog-0.8.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
52
- buildlog-0.8.0.dist-info/entry_points.txt,sha256=BMFclPOomp_sgaa0OqBg6LfqCMlqzjZV88ww5TrPPoo,87
53
- buildlog-0.8.0.dist-info/licenses/LICENSE,sha256=fAgt-akug9nAwIj6M-SIf8u3ck-T7pJTwfmy9vWYASk,1074
54
- buildlog-0.8.0.dist-info/RECORD,,
45
+ buildlog-0.10.0.data/data/share/buildlog/copier.yml,sha256=hD_UcLGB9eDxTGkWjHAvUoiqQKhLC0w3G-kPKX_p43I,802
46
+ buildlog-0.10.0.data/data/share/buildlog/post_gen.py,sha256=YQJYQjbRqfmyKrRRkdqk8qTkXwqompg-AgroKUR8W9M,2020
47
+ buildlog-0.10.0.data/data/share/buildlog/template/buildlog/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
+ buildlog-0.10.0.data/data/share/buildlog/template/buildlog/2026-01-01-example.md,sha256=7x9sKmydfmfKyNz9hV7MtYnQJuBwbxNanbPOcpQDDZQ,7040
49
+ buildlog-0.10.0.data/data/share/buildlog/template/buildlog/BUILDLOG_SYSTEM.md,sha256=osclytWwl5jUiTgSpuT4cT3h3oPvCkZ5GPCnFuJZNcY,3802
50
+ buildlog-0.10.0.data/data/share/buildlog/template/buildlog/_TEMPLATE.md,sha256=CUvxgcx1-9XT_EdQ8e_vnuPq_h-u1uhXJgForJU2Pso,2932
51
+ buildlog-0.10.0.data/data/share/buildlog/template/buildlog/_TEMPLATE_QUICK.md,sha256=eUr5MiqLsM6drV7rAq53R1SLkK8G7LkMAUjWKXx81IA,409
52
+ buildlog-0.10.0.data/data/share/buildlog/template/buildlog/.buildlog/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
+ buildlog-0.10.0.data/data/share/buildlog/template/buildlog/.buildlog/seeds/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
+ buildlog-0.10.0.data/data/share/buildlog/template/buildlog/assets/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ buildlog-0.10.0.dist-info/METADATA,sha256=3rhwCyjU4M6hABubghAUvxA2uEz1YvK8hjMaoQY_PYk,11465
56
+ buildlog-0.10.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
57
+ buildlog-0.10.0.dist-info/entry_points.txt,sha256=BMFclPOomp_sgaa0OqBg6LfqCMlqzjZV88ww5TrPPoo,87
58
+ buildlog-0.10.0.dist-info/licenses/LICENSE,sha256=fAgt-akug9nAwIj6M-SIf8u3ck-T7pJTwfmy9vWYASk,1074
59
+ buildlog-0.10.0.dist-info/RECORD,,