-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (108 loc) · 4.64 KB
/
Copy pathpyproject.toml
File metadata and controls
120 lines (108 loc) · 4.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[build-system]
requires = ["hatchling>=1.30"]
build-backend = "hatchling.build"
[project]
name = "bmad-loop"
version = "0.11.1"
description = "Deterministic ralph-loop orchestrator for the BMAD implementation phase"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "BMad Code, LLC" }]
requires-python = ">=3.11"
dependencies = [
"pyyaml>=6.0",
# stdlib `re` has no match timeout; the #194 env-fault classifier runs
# operator-supplied profile regexes over session logs, so it matches with the
# `regex` module's per-call timeout= to keep a pathological pattern from
# hanging a session teardown. Core (all-platform) — classification is on the
# main pipeline path.
"regex>=2024.11.6",
# win32 liveness needs psutil (no /proc; os.kill(pid,0) is destructive there);
# without it the TUI shows every run as `?`. Hard dep so no install path misses it.
"psutil>=7.2.2; sys_platform == 'win32'",
]
[project.scripts]
bmad-loop = "bmad_loop.cli:main"
[project.optional-dependencies]
tui = ["textual>=8.0,<9", "tomlkit>=0.13", "pyte>=0.8.2", "rich>=14.2"]
# macOS opt-in for psutil (identity/force-kill niceties); win32 gets it as a core
# dep above, Linux stays dep-free. `pip install bmad-loop[non-linux]` on macOS.
non-linux = ["psutil>=7.2.2"]
# HTTP client for the opencode-http adapter (drives `opencode serve` over
# HTTP/SSE). `pip install 'bmad-loop[opencode]'`.
opencode = ["httpx>=0.28"]
[dependency-groups]
# dev gets tui via `uv sync --all-extras` (groups can't self-reference an extra).
dev = [
"pytest>=8.0",
"ruff>=0.15.17",
"pytest-asyncio>=1.0",
"pytest-xdist>=3.6",
# the opencode-http adapter tests exercise the real httpx client
"httpx>=0.28",
# Exact, not a floor like the rest: pyright is a GATE, and a newer one adds
# checks that fail the build on untouched code. This is the single pin — the
# typecheck job runs `uv run pyright`, so CI and `uv run pyright` locally are
# the same resolved version and cannot drift apart (#245).
"pyright==1.1.411",
]
[tool.hatch.build.targets.wheel]
packages = ["src/bmad_loop"]
[tool.hatch.build.targets.sdist]
# .trunk/tools holds an absolute external symlink (trunk launcher) that breaks
# sdist packing; it is dev tooling and irrelevant to the source distribution.
exclude = ["/.trunk"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
[tool.ruff]
line-length = 100
target-version = "py311"
# skill assets contain template placeholders that are not valid Python
extend-exclude = [".agents", ".claude", "src/bmad_loop/data/skills"]
[tool.ruff.lint]
# CI lints with trunk's ruff (pinned 0.15.17), whose plugin injects no `--select`
# and so runs ruff's own default rule set. With no lint table that default is
# resolved per ruff version and can drift, so pin the families explicitly. The
# repo's ruff is pinned to 0.15.17 via trunk (`trunk check` = what CI runs and
# the documented local lint, see CONTRIBUTING) and floored at >=0.15.17 in the
# dev deps (uv.lock resolves 0.15.17), so those paths match CI; a bare, newer
# ruff gets rule-family parity only — new rules can land under these prefixes.
# This spells out ruff 0.15.17's default set (`E4`, `E7`, `E9`, `F`) (#246). Do
# NOT ratchet stricter than CI without moving CI first.
select = ["E4", "E7", "E9", "F"]
[tool.black]
line-length = 100
target-version = ["py311"]
[tool.isort]
profile = "black"
line_length = 100
[tool.pyright]
# Stage 1 of #245 (assessment F-4): a basic-mode type-check gate so annotation
# drift stops being invisible. Verified against pyright 1.1.411 docs.
include = ["src/bmad_loop"]
# data/ ships skill assets + hook scripts that are templates / stand-alone (not
# part of the package's import graph); type-checking them is noise.
exclude = ["src/bmad_loop/data"]
typeCheckingMode = "basic"
# Stage 2 of #245: the pure/leaf modules (no live process, git, or mux I/O) are
# held to strict analysis while the rest stays basic. `strict` overrides
# typeCheckingMode for these paths only — the same effect as a per-file
# `# pyright: strict` comment — so annotation drift in the domain core is caught
# without forcing the I/O-heavy modules over the strict bar. No runtime changes.
strict = [
"src/bmad_loop/model.py",
"src/bmad_loop/statemachine.py",
"src/bmad_loop/policy.py",
"src/bmad_loop/documents.py",
"src/bmad_loop/machine.py",
"src/bmad_loop/checks.py",
"src/bmad_loop/sanitize.py",
]
# Check against the floor of requires-python so we never lean on 3.12+ typing.
pythonVersion = "3.11"
# Resolve third-party imports from the uv-managed project venv (created by
# `uv sync` locally and in CI), so optional-extra imports aren't false misses.
venvPath = "."
venv = ".venv"