buildlog 0.10.0__py3-none-any.whl → 0.10.1__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.
- buildlog/cli.py +45 -9
- buildlog/constants.py +39 -0
- {buildlog-0.10.0.dist-info → buildlog-0.10.1.dist-info}/METADATA +20 -18
- {buildlog-0.10.0.dist-info → buildlog-0.10.1.dist-info}/RECORD +17 -17
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/copier.yml +0 -0
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/post_gen.py +0 -0
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/.buildlog/.gitkeep +0 -0
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/.buildlog/seeds/.gitkeep +0 -0
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/.gitkeep +0 -0
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/2026-01-01-example.md +0 -0
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/BUILDLOG_SYSTEM.md +0 -0
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/_TEMPLATE.md +0 -0
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/_TEMPLATE_QUICK.md +0 -0
- {buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/assets/.gitkeep +0 -0
- {buildlog-0.10.0.dist-info → buildlog-0.10.1.dist-info}/WHEEL +0 -0
- {buildlog-0.10.0.dist-info → buildlog-0.10.1.dist-info}/entry_points.txt +0 -0
- {buildlog-0.10.0.dist-info → buildlog-0.10.1.dist-info}/licenses/LICENSE +0 -0
buildlog/cli.py
CHANGED
|
@@ -165,7 +165,7 @@ def _init_mcp(settings_path: Path | None = None, global_mode: bool = False) -> N
|
|
|
165
165
|
|
|
166
166
|
Args:
|
|
167
167
|
settings_path: Path to settings.json. Defaults to .claude/settings.json
|
|
168
|
-
global_mode: If True,
|
|
168
|
+
global_mode: If True, also writes usage instructions to ~/.claude/CLAUDE.md
|
|
169
169
|
"""
|
|
170
170
|
import json as json_module
|
|
171
171
|
|
|
@@ -190,21 +190,57 @@ def _init_mcp(settings_path: Path | None = None, global_mode: bool = False) -> N
|
|
|
190
190
|
if "mcpServers" not in data:
|
|
191
191
|
data["mcpServers"] = {}
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
click.echo(f"buildlog MCP server already registered in {location}")
|
|
195
|
-
return
|
|
193
|
+
mcp_already_registered = "buildlog" in data["mcpServers"]
|
|
196
194
|
|
|
197
|
-
|
|
195
|
+
if not mcp_already_registered:
|
|
196
|
+
data["mcpServers"]["buildlog"] = {"command": "buildlog-mcp", "args": []}
|
|
197
|
+
settings_path.parent.mkdir(parents=True, exist_ok=True)
|
|
198
|
+
settings_path.write_text(json_module.dumps(data, indent=2) + "\n")
|
|
199
|
+
click.echo(f"Registered buildlog MCP server in {location}")
|
|
200
|
+
else:
|
|
201
|
+
click.echo(f"buildlog MCP server already registered in {location}")
|
|
198
202
|
|
|
199
|
-
|
|
200
|
-
settings_path.write_text(json_module.dumps(data, indent=2) + "\n")
|
|
201
|
-
click.echo(f"Registered buildlog MCP server in {location}")
|
|
203
|
+
# In global mode, also write/update ~/.claude/CLAUDE.md with usage instructions
|
|
202
204
|
if global_mode:
|
|
203
|
-
|
|
205
|
+
_init_global_claude_md(settings_path.parent)
|
|
206
|
+
click.echo(
|
|
207
|
+
"Claude Code now has buildlog tools + instructions in all projects."
|
|
208
|
+
)
|
|
209
|
+
|
|
204
210
|
except Exception as e:
|
|
205
211
|
click.echo(f"Warning: could not register MCP server: {e}", err=True)
|
|
206
212
|
|
|
207
213
|
|
|
214
|
+
def _init_global_claude_md(claude_dir: Path) -> None:
|
|
215
|
+
"""Write buildlog usage instructions to ~/.claude/CLAUDE.md.
|
|
216
|
+
|
|
217
|
+
Creates or appends to the global CLAUDE.md so Claude knows how to use
|
|
218
|
+
buildlog tools automatically in any project.
|
|
219
|
+
"""
|
|
220
|
+
from buildlog.constants import CLAUDE_MD_GLOBAL_SECTION
|
|
221
|
+
|
|
222
|
+
claude_md_path = claude_dir / "CLAUDE.md"
|
|
223
|
+
|
|
224
|
+
try:
|
|
225
|
+
if claude_md_path.exists():
|
|
226
|
+
content = claude_md_path.read_text()
|
|
227
|
+
# Check if buildlog section already exists
|
|
228
|
+
if "## buildlog" in content:
|
|
229
|
+
click.echo("buildlog instructions already in ~/.claude/CLAUDE.md")
|
|
230
|
+
return
|
|
231
|
+
# Append to existing file
|
|
232
|
+
with open(claude_md_path, "a") as f:
|
|
233
|
+
f.write(CLAUDE_MD_GLOBAL_SECTION)
|
|
234
|
+
click.echo("Added buildlog instructions to ~/.claude/CLAUDE.md")
|
|
235
|
+
else:
|
|
236
|
+
# Create new file with header
|
|
237
|
+
header = "# Global Claude Instructions\n\nThese instructions apply to all projects.\n"
|
|
238
|
+
claude_md_path.write_text(header + CLAUDE_MD_GLOBAL_SECTION)
|
|
239
|
+
click.echo("Created ~/.claude/CLAUDE.md with buildlog instructions")
|
|
240
|
+
except Exception as e:
|
|
241
|
+
click.echo(f"Warning: could not write CLAUDE.md: {e}", err=True)
|
|
242
|
+
|
|
243
|
+
|
|
208
244
|
@main.command("init-mcp")
|
|
209
245
|
@click.option(
|
|
210
246
|
"--global",
|
buildlog/constants.py
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
"""Shared constants for buildlog, including the CLAUDE.md integration section."""
|
|
2
2
|
|
|
3
|
+
# Shorter version for global ~/.claude/CLAUDE.md - focused on "always on" usage
|
|
4
|
+
CLAUDE_MD_GLOBAL_SECTION = """
|
|
5
|
+
## buildlog (Always On)
|
|
6
|
+
|
|
7
|
+
buildlog is your ambient data capture layer. It runs in ALL projects via MCP.
|
|
8
|
+
Use these tools to track work, extract learnings, and feed downstream systems.
|
|
9
|
+
|
|
10
|
+
### Core Loop (use after every significant commit)
|
|
11
|
+
|
|
12
|
+
1. `buildlog_overview()` — check project state
|
|
13
|
+
2. `buildlog_commit(message="...")` — git commit with auto entry logging
|
|
14
|
+
3. `buildlog_gauntlet_rules()` + review + `buildlog_gauntlet_issues([...])` — run gauntlet
|
|
15
|
+
4. `buildlog_log_reward(outcome="accepted")` — close the feedback loop
|
|
16
|
+
|
|
17
|
+
### Key Tools
|
|
18
|
+
|
|
19
|
+
| Tool | When to Use |
|
|
20
|
+
|------|-------------|
|
|
21
|
+
| `buildlog_overview()` | Start of session, check state |
|
|
22
|
+
| `buildlog_commit(message)` | Wrap git commits with logging |
|
|
23
|
+
| `buildlog_entry_new(slug)` | Create journal entry |
|
|
24
|
+
| `buildlog_gauntlet_rules()` | Load reviewer personas |
|
|
25
|
+
| `buildlog_gauntlet_issues(issues)` | Process review findings |
|
|
26
|
+
| `buildlog_log_reward(outcome)` | Feedback after approval |
|
|
27
|
+
| `buildlog_skills()` | Extract patterns from entries |
|
|
28
|
+
| `buildlog_status()` | See extracted skills |
|
|
29
|
+
| `buildlog_promote(skill_ids)` | Surface to agent rules |
|
|
30
|
+
|
|
31
|
+
### Outputs (ambient capture for downstream)
|
|
32
|
+
|
|
33
|
+
- Journal entries: `buildlog/*.md`
|
|
34
|
+
- Reward signals: `buildlog/.buildlog/reward_events.jsonl`
|
|
35
|
+
- Extracted skills: `buildlog/.buildlog/promoted.json`
|
|
36
|
+
- Review learnings: `buildlog/.buildlog/review_learnings.json`
|
|
37
|
+
|
|
38
|
+
This data feeds automated content generation, engineering logs, and learning systems.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
# Full version for per-project CLAUDE.md - comprehensive reference
|
|
3
42
|
CLAUDE_MD_BUILDLOG_SECTION = """
|
|
4
43
|
## buildlog Integration
|
|
5
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: buildlog
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.1
|
|
4
4
|
Summary: Engineering notebook for AI-assisted development
|
|
5
5
|
Project-URL: Homepage, https://github.com/Peleke/buildlog-template
|
|
6
6
|
Project-URL: Repository, https://github.com/Peleke/buildlog-template
|
|
@@ -163,46 +163,48 @@ The roadmap: contextual bandits (now) -> richer policy models -> longer-horizon
|
|
|
163
163
|
|
|
164
164
|
## Installation
|
|
165
165
|
|
|
166
|
-
###
|
|
166
|
+
### Always-On Mode (recommended)
|
|
167
|
+
|
|
168
|
+
We run buildlog as an **ambient data capture layer** across all projects. One command, works everywhere:
|
|
167
169
|
|
|
168
170
|
```bash
|
|
169
|
-
|
|
170
|
-
buildlog init --
|
|
171
|
+
pipx install buildlog # or: uv tool install buildlog
|
|
172
|
+
buildlog init-mcp --global # registers MCP + writes instructions to ~/.claude/CLAUDE.md
|
|
171
173
|
```
|
|
172
174
|
|
|
173
|
-
That's it. Claude Code
|
|
175
|
+
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.
|
|
174
176
|
|
|
175
|
-
|
|
177
|
+
The `--global` flag:
|
|
178
|
+
- Registers the MCP server in `~/.claude/settings.json`
|
|
179
|
+
- Creates `~/.claude/CLAUDE.md` with usage instructions so Claude proactively uses buildlog
|
|
180
|
+
- Works immediately in any repo, even without a local `buildlog/` directory
|
|
176
181
|
|
|
177
|
-
|
|
178
|
-
uv tool install buildlog # or: pipx install buildlog
|
|
179
|
-
```
|
|
182
|
+
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.
|
|
180
183
|
|
|
181
|
-
|
|
184
|
+
### Per-project setup
|
|
182
185
|
|
|
183
|
-
|
|
186
|
+
If you prefer explicit per-project control:
|
|
184
187
|
|
|
185
188
|
```bash
|
|
186
|
-
|
|
189
|
+
pip install buildlog # MCP server included by default
|
|
190
|
+
buildlog init --defaults # scaffold buildlog/, register MCP, update CLAUDE.md
|
|
187
191
|
```
|
|
188
192
|
|
|
193
|
+
This creates a `buildlog/` directory with templates and configures Claude Code for that specific project.
|
|
194
|
+
|
|
189
195
|
### For JS/TS projects
|
|
190
196
|
|
|
191
197
|
```bash
|
|
192
198
|
npx @peleke.s/buildlog init
|
|
193
199
|
```
|
|
194
200
|
|
|
195
|
-
###
|
|
196
|
-
|
|
197
|
-
`buildlog init` auto-registers the MCP server. For existing projects:
|
|
201
|
+
### Verify installation
|
|
198
202
|
|
|
199
203
|
```bash
|
|
200
|
-
buildlog init-mcp # register MCP in .claude/settings.json
|
|
201
204
|
buildlog mcp-test # verify all 29 tools are registered
|
|
205
|
+
buildlog overview # check project state (works without init in global mode)
|
|
202
206
|
```
|
|
203
207
|
|
|
204
|
-
This exposes buildlog tools (seeds, skills, experiments, gauntlet, bandit status) to any Claude Code session.
|
|
205
|
-
|
|
206
208
|
## Quick Start
|
|
207
209
|
|
|
208
210
|
```bash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
buildlog/__init__.py,sha256=wxluyg3fDOiaKUAOJa0cav39hwtNJS5Y_0X20uL_yi4,90
|
|
2
|
-
buildlog/cli.py,sha256=
|
|
2
|
+
buildlog/cli.py,sha256=YlAo1h43dZuBL7AkEZpd1uJsKnakHNekw8ywBF5PJW4,76508
|
|
3
3
|
buildlog/confidence.py,sha256=jPvN0_3drGHQG1C7iUxUtYjKC62nNKsHHxu6WXMfJFg,10137
|
|
4
|
-
buildlog/constants.py,sha256=
|
|
4
|
+
buildlog/constants.py,sha256=9byHhexkEaHcM8jjK0F2C_CssPSO9ujvVbbBIi04ZJ4,7419
|
|
5
5
|
buildlog/distill.py,sha256=PL7UBToBb27BrCOTWGBTDIXGggtrUumHHBs0_MfG6vY,14166
|
|
6
6
|
buildlog/embeddings.py,sha256=vPydWjJVkYp172zFou-lJ737qsu6vRMQAMs143RGIpA,12364
|
|
7
7
|
buildlog/llm.py,sha256=t_3KnJ_eBmrtHaay4owG3EgGbJrVp_T379P0tTuyJf8,16986
|
|
@@ -42,18 +42,18 @@ buildlog/seed_engine/llm_extractor.py,sha256=nfTmN4vuEiPQuhiL_2DX1QZ7TZlDR2vxYy0
|
|
|
42
42
|
buildlog/seed_engine/models.py,sha256=qESSuoF3CJy8pp96E3Vmb38V-snzeaW0Xg0RfbH8v1U,3418
|
|
43
43
|
buildlog/seed_engine/pipeline.py,sha256=cyR2Vf32Hf0PK5DxnaFcq56ygjJIiJWiIkHY4Uz7AS8,8082
|
|
44
44
|
buildlog/seed_engine/sources.py,sha256=8j9oUFZCSKMr5VpIuAxTPY3wTzfTEmw6M_41_aismiE,11184
|
|
45
|
-
buildlog-0.10.
|
|
46
|
-
buildlog-0.10.
|
|
47
|
-
buildlog-0.10.
|
|
48
|
-
buildlog-0.10.
|
|
49
|
-
buildlog-0.10.
|
|
50
|
-
buildlog-0.10.
|
|
51
|
-
buildlog-0.10.
|
|
52
|
-
buildlog-0.10.
|
|
53
|
-
buildlog-0.10.
|
|
54
|
-
buildlog-0.10.
|
|
55
|
-
buildlog-0.10.
|
|
56
|
-
buildlog-0.10.
|
|
57
|
-
buildlog-0.10.
|
|
58
|
-
buildlog-0.10.
|
|
59
|
-
buildlog-0.10.
|
|
45
|
+
buildlog-0.10.1.data/data/share/buildlog/copier.yml,sha256=hD_UcLGB9eDxTGkWjHAvUoiqQKhLC0w3G-kPKX_p43I,802
|
|
46
|
+
buildlog-0.10.1.data/data/share/buildlog/post_gen.py,sha256=YQJYQjbRqfmyKrRRkdqk8qTkXwqompg-AgroKUR8W9M,2020
|
|
47
|
+
buildlog-0.10.1.data/data/share/buildlog/template/buildlog/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
|
+
buildlog-0.10.1.data/data/share/buildlog/template/buildlog/2026-01-01-example.md,sha256=7x9sKmydfmfKyNz9hV7MtYnQJuBwbxNanbPOcpQDDZQ,7040
|
|
49
|
+
buildlog-0.10.1.data/data/share/buildlog/template/buildlog/BUILDLOG_SYSTEM.md,sha256=osclytWwl5jUiTgSpuT4cT3h3oPvCkZ5GPCnFuJZNcY,3802
|
|
50
|
+
buildlog-0.10.1.data/data/share/buildlog/template/buildlog/_TEMPLATE.md,sha256=CUvxgcx1-9XT_EdQ8e_vnuPq_h-u1uhXJgForJU2Pso,2932
|
|
51
|
+
buildlog-0.10.1.data/data/share/buildlog/template/buildlog/_TEMPLATE_QUICK.md,sha256=eUr5MiqLsM6drV7rAq53R1SLkK8G7LkMAUjWKXx81IA,409
|
|
52
|
+
buildlog-0.10.1.data/data/share/buildlog/template/buildlog/.buildlog/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
|
+
buildlog-0.10.1.data/data/share/buildlog/template/buildlog/.buildlog/seeds/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
|
+
buildlog-0.10.1.data/data/share/buildlog/template/buildlog/assets/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
|
+
buildlog-0.10.1.dist-info/METADATA,sha256=BvQtReyHfyKdwVZF2JpZioaFrzzPrWF4J3_w_xsxosY,11971
|
|
56
|
+
buildlog-0.10.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
57
|
+
buildlog-0.10.1.dist-info/entry_points.txt,sha256=BMFclPOomp_sgaa0OqBg6LfqCMlqzjZV88ww5TrPPoo,87
|
|
58
|
+
buildlog-0.10.1.dist-info/licenses/LICENSE,sha256=fAgt-akug9nAwIj6M-SIf8u3ck-T7pJTwfmy9vWYASk,1074
|
|
59
|
+
buildlog-0.10.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/.gitkeep
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/_TEMPLATE.md
RENAMED
|
File without changes
|
|
File without changes
|
{buildlog-0.10.0.data → buildlog-0.10.1.data}/data/share/buildlog/template/buildlog/assets/.gitkeep
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|