buildlog 0.6.1__py3-none-any.whl → 0.8.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 (40) hide show
  1. buildlog/__init__.py +1 -1
  2. buildlog/cli.py +589 -44
  3. buildlog/confidence.py +27 -0
  4. buildlog/core/__init__.py +12 -0
  5. buildlog/core/bandit.py +699 -0
  6. buildlog/core/operations.py +499 -11
  7. buildlog/distill.py +80 -1
  8. buildlog/engine/__init__.py +61 -0
  9. buildlog/engine/bandit.py +23 -0
  10. buildlog/engine/confidence.py +28 -0
  11. buildlog/engine/embeddings.py +28 -0
  12. buildlog/engine/experiments.py +619 -0
  13. buildlog/engine/types.py +31 -0
  14. buildlog/llm.py +461 -0
  15. buildlog/mcp/server.py +12 -6
  16. buildlog/mcp/tools.py +166 -13
  17. buildlog/render/__init__.py +19 -2
  18. buildlog/render/claude_md.py +74 -26
  19. buildlog/render/continue_dev.py +102 -0
  20. buildlog/render/copilot.py +100 -0
  21. buildlog/render/cursor.py +105 -0
  22. buildlog/render/tracking.py +20 -1
  23. buildlog/render/windsurf.py +95 -0
  24. buildlog/seeds.py +41 -0
  25. buildlog/skills.py +69 -6
  26. {buildlog-0.6.1.data → buildlog-0.8.0.data}/data/share/buildlog/copier.yml +0 -4
  27. buildlog-0.8.0.data/data/share/buildlog/template/buildlog/_TEMPLATE_QUICK.md +21 -0
  28. buildlog-0.8.0.dist-info/METADATA +151 -0
  29. buildlog-0.8.0.dist-info/RECORD +54 -0
  30. buildlog-0.6.1.dist-info/METADATA +0 -490
  31. buildlog-0.6.1.dist-info/RECORD +0 -41
  32. {buildlog-0.6.1.data → buildlog-0.8.0.data}/data/share/buildlog/post_gen.py +0 -0
  33. {buildlog-0.6.1.data → buildlog-0.8.0.data}/data/share/buildlog/template/buildlog/.gitkeep +0 -0
  34. {buildlog-0.6.1.data → buildlog-0.8.0.data}/data/share/buildlog/template/buildlog/2026-01-01-example.md +0 -0
  35. {buildlog-0.6.1.data → buildlog-0.8.0.data}/data/share/buildlog/template/buildlog/BUILDLOG_SYSTEM.md +0 -0
  36. {buildlog-0.6.1.data → buildlog-0.8.0.data}/data/share/buildlog/template/buildlog/_TEMPLATE.md +0 -0
  37. {buildlog-0.6.1.data → buildlog-0.8.0.data}/data/share/buildlog/template/buildlog/assets/.gitkeep +0 -0
  38. {buildlog-0.6.1.dist-info → buildlog-0.8.0.dist-info}/WHEEL +0 -0
  39. {buildlog-0.6.1.dist-info → buildlog-0.8.0.dist-info}/entry_points.txt +0 -0
  40. {buildlog-0.6.1.dist-info → buildlog-0.8.0.dist-info}/licenses/LICENSE +0 -0
buildlog/confidence.py CHANGED
@@ -32,6 +32,7 @@ __all__ = [
32
32
  "get_confidence_tier",
33
33
  "merge_confidence_metrics",
34
34
  "add_contradiction",
35
+ "apply_severity_weight",
35
36
  ]
36
37
 
37
38
 
@@ -309,3 +310,29 @@ def add_contradiction(metrics: ConfidenceMetrics) -> ConfidenceMetrics:
309
310
  contradiction_count=metrics.contradiction_count + 1,
310
311
  first_seen=metrics.first_seen,
311
312
  )
313
+
314
+
315
+ # Severity weight multipliers for confidence scoring
316
+ SEVERITY_WEIGHTS: dict[str, float] = {
317
+ "critical": 1.5,
318
+ "major": 1.2,
319
+ "minor": 1.0,
320
+ "info": 0.8,
321
+ }
322
+
323
+
324
+ def apply_severity_weight(confidence_score: float, severity: str) -> float:
325
+ """Apply severity weighting to a continuous confidence score.
326
+
327
+ Severity acts as a multiplier: critical rules get boosted,
328
+ info rules get dampened. Result is capped at 1.0.
329
+
330
+ Args:
331
+ confidence_score: Base confidence score in [0, 1].
332
+ severity: One of: critical, major, minor, info.
333
+
334
+ Returns:
335
+ Weighted confidence score, capped at 1.0.
336
+ """
337
+ weight = SEVERITY_WEIGHTS.get(severity, 1.0)
338
+ return min(confidence_score * weight, 1.0)
buildlog/core/__init__.py CHANGED
@@ -3,6 +3,8 @@
3
3
  from buildlog.core.operations import (
4
4
  DiffResult,
5
5
  EndSessionResult,
6
+ GauntletAcceptRiskResult,
7
+ GauntletLoopResult,
6
8
  LearnFromReviewResult,
7
9
  LogMistakeResult,
8
10
  LogRewardResult,
@@ -20,6 +22,9 @@ from buildlog.core.operations import (
20
22
  diff,
21
23
  end_session,
22
24
  find_skills_by_ids,
25
+ gauntlet_accept_risk,
26
+ gauntlet_process_issues,
27
+ get_bandit_status,
23
28
  get_experiment_report,
24
29
  get_rewards,
25
30
  get_session_metrics,
@@ -50,6 +55,9 @@ __all__ = [
50
55
  "StartSessionResult",
51
56
  "EndSessionResult",
52
57
  "LogMistakeResult",
58
+ # Gauntlet loop
59
+ "GauntletLoopResult",
60
+ "GauntletAcceptRiskResult",
53
61
  "status",
54
62
  "promote",
55
63
  "reject",
@@ -64,4 +72,8 @@ __all__ = [
64
72
  "log_mistake",
65
73
  "get_session_metrics",
66
74
  "get_experiment_report",
75
+ "get_bandit_status",
76
+ # Gauntlet loop operations
77
+ "gauntlet_process_issues",
78
+ "gauntlet_accept_risk",
67
79
  ]