workcrew 0.1.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.
- workcrew-0.1.0/.github/actionlint.yaml +5 -0
- workcrew-0.1.0/.github/dependabot.yml +8 -0
- workcrew-0.1.0/.github/workflows/ci.yml +242 -0
- workcrew-0.1.0/.github/workflows/contract.yml +66 -0
- workcrew-0.1.0/.github/workflows/release.yml +96 -0
- workcrew-0.1.0/.gitignore +8 -0
- workcrew-0.1.0/AGENTS.md +56 -0
- workcrew-0.1.0/CHANGELOG.md +33 -0
- workcrew-0.1.0/LICENSE +18 -0
- workcrew-0.1.0/Makefile +17 -0
- workcrew-0.1.0/PKG-INFO +173 -0
- workcrew-0.1.0/README.md +153 -0
- workcrew-0.1.0/docs/assets/workcrew-cursor-dark.svg +1 -0
- workcrew-0.1.0/docs/assets/workcrew-cursor-light.svg +1 -0
- workcrew-0.1.0/docs/assets/workcrew-team.png +0 -0
- workcrew-0.1.0/pyproject.toml +67 -0
- workcrew-0.1.0/scripts/release.sh +29 -0
- workcrew-0.1.0/src/workcrew/__init__.py +1 -0
- workcrew-0.1.0/src/workcrew/__main__.py +6 -0
- workcrew-0.1.0/src/workcrew/board.py +555 -0
- workcrew-0.1.0/src/workcrew/cli.py +2340 -0
- workcrew-0.1.0/src/workcrew/harness/__init__.py +51 -0
- workcrew-0.1.0/src/workcrew/harness/claude.py +523 -0
- workcrew-0.1.0/src/workcrew/harness/claude_screen.py +84 -0
- workcrew-0.1.0/src/workcrew/link.py +1061 -0
- workcrew-0.1.0/src/workcrew/notes/leader.md +21 -0
- workcrew-0.1.0/src/workcrew/notes/worker.md +5 -0
- workcrew-0.1.0/src/workcrew/picker.py +107 -0
- workcrew-0.1.0/src/workcrew/place.py +97 -0
- workcrew-0.1.0/src/workcrew/prompt.py +386 -0
- workcrew-0.1.0/src/workcrew/reconcile.py +411 -0
- workcrew-0.1.0/src/workcrew/send.py +244 -0
- workcrew-0.1.0/src/workcrew/state.py +516 -0
- workcrew-0.1.0/src/workcrew/tmux.py +992 -0
- workcrew-0.1.0/src/workcrew/width.py +30 -0
- workcrew-0.1.0/tests/__init__.py +0 -0
- workcrew-0.1.0/tests/conftest.py +33 -0
- workcrew-0.1.0/tests/contract/__init__.py +0 -0
- workcrew-0.1.0/tests/contract/hook.py +25 -0
- workcrew-0.1.0/tests/contract/member.py +514 -0
- workcrew-0.1.0/tests/contract/member_hook.py +42 -0
- workcrew-0.1.0/tests/contract/scenario.py +449 -0
- workcrew-0.1.0/tests/contract/spellings.py +161 -0
- workcrew-0.1.0/tests/contract/test_contract.py +53 -0
- workcrew-0.1.0/tests/fake_claude/claude +2 -0
- workcrew-0.1.0/tests/fake_claude/contract_keys.json +63 -0
- workcrew-0.1.0/tests/fake_claude/fake_claude.py +454 -0
- workcrew-0.1.0/tests/fake_claude/member_keys.json +62 -0
- workcrew-0.1.0/tests/fake_claude/records.py +52 -0
- workcrew-0.1.0/tests/fake_claude/spelling_keys.json +21 -0
- workcrew-0.1.0/tests/federation/__init__.py +0 -0
- workcrew-0.1.0/tests/federation/conftest.py +181 -0
- workcrew-0.1.0/tests/federation/data/README +1 -0
- workcrew-0.1.0/tests/federation/data/allowed_signers +1 -0
- workcrew-0.1.0/tests/federation/data/msg +1 -0
- workcrew-0.1.0/tests/federation/data/msg.sig +82 -0
- workcrew-0.1.0/tests/federation/test_accept.py +848 -0
- workcrew-0.1.0/tests/federation/test_add.py +352 -0
- workcrew-0.1.0/tests/federation/test_fixture.py +32 -0
- workcrew-0.1.0/tests/federation/test_github_keys.py +83 -0
- workcrew-0.1.0/tests/federation/test_locks.py +284 -0
- workcrew-0.1.0/tests/federation/test_messages.py +895 -0
- workcrew-0.1.0/tests/federation/test_refusals.py +537 -0
- workcrew-0.1.0/tests/federation/test_relay_trust.py +117 -0
- workcrew-0.1.0/tests/federation/two_users.sh +245 -0
- workcrew-0.1.0/tests/helpers/__init__.py +0 -0
- workcrew-0.1.0/tests/helpers/tmuxfix.py +217 -0
- workcrew-0.1.0/tests/tmux/__init__.py +0 -0
- workcrew-0.1.0/tests/tmux/test_cli.py +5480 -0
- workcrew-0.1.0/tests/tmux/test_fixture.py +66 -0
- workcrew-0.1.0/tests/tmux/test_picker.py +170 -0
- workcrew-0.1.0/tests/tmux/test_prompt_tmux.py +554 -0
- workcrew-0.1.0/tests/tmux/test_reconcile.py +535 -0
- workcrew-0.1.0/tests/tmux/test_send.py +1727 -0
- workcrew-0.1.0/tests/tmux/test_team.py +2211 -0
- workcrew-0.1.0/tests/tmux/test_tmux.py +1251 -0
- workcrew-0.1.0/tests/unit/__init__.py +0 -0
- workcrew-0.1.0/tests/unit/board_rules.json +6173 -0
- workcrew-0.1.0/tests/unit/test_board.py +749 -0
- workcrew-0.1.0/tests/unit/test_claude.py +1212 -0
- workcrew-0.1.0/tests/unit/test_grammar.py +1037 -0
- workcrew-0.1.0/tests/unit/test_place.py +350 -0
- workcrew-0.1.0/tests/unit/test_prompt.py +354 -0
- workcrew-0.1.0/tests/unit/test_reconcile.py +565 -0
- workcrew-0.1.0/tests/unit/test_state.py +852 -0
- workcrew-0.1.0/tests/unit/test_tmux.py +20 -0
- workcrew-0.1.0/tests/unit/test_width.py +33 -0
- workcrew-0.1.0/uv.lock +384 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Every action is pinned to a full commit SHA (the tag is in the comment); Dependabot keeps them current.
|
|
2
|
+
name: ci
|
|
3
|
+
|
|
4
|
+
# A push runs every job but two: tmux master, a canary, and macOS, whose run of the whole suite
|
|
5
|
+
# takes most of an hour. `workflow_dispatch` runs everything, and is what a release waits for.
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
pull_request:
|
|
10
|
+
workflow_dispatch: # the only thing that runs the full set
|
|
11
|
+
|
|
12
|
+
permissions: {}
|
|
13
|
+
|
|
14
|
+
# The event in the group: a push cancels the push before it, never a full run that is going.
|
|
15
|
+
concurrency:
|
|
16
|
+
group: ci-${{ github.ref }}-${{ github.event_name }}
|
|
17
|
+
cancel-in-progress: true
|
|
18
|
+
|
|
19
|
+
env:
|
|
20
|
+
PYTHON_FLOOR: "3.11"
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
lint:
|
|
24
|
+
name: Lint and types
|
|
25
|
+
# Proves: ruff and mypy pass on the floor syntax target. Cannot: find runtime behaviour.
|
|
26
|
+
runs-on: ubuntu-26.04
|
|
27
|
+
timeout-minutes: 5
|
|
28
|
+
permissions:
|
|
29
|
+
contents: read
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
32
|
+
with:
|
|
33
|
+
persist-credentials: false
|
|
34
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
35
|
+
with:
|
|
36
|
+
enable-cache: false
|
|
37
|
+
- run: uv sync --locked --group dev
|
|
38
|
+
- run: uv run ruff check
|
|
39
|
+
- run: uv run ruff format --check
|
|
40
|
+
- run: uv run mypy
|
|
41
|
+
|
|
42
|
+
test:
|
|
43
|
+
name: Unit tests (Python ${{ matrix.python }})
|
|
44
|
+
# Proves: the unit tests pass on the floor and the newest Python.
|
|
45
|
+
# Cannot: anything that needs tmux or real Claude Code.
|
|
46
|
+
runs-on: ubuntu-26.04
|
|
47
|
+
timeout-minutes: 10
|
|
48
|
+
permissions:
|
|
49
|
+
contents: read
|
|
50
|
+
strategy:
|
|
51
|
+
fail-fast: false
|
|
52
|
+
matrix:
|
|
53
|
+
python: ["3.11", "3.15"]
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
56
|
+
with:
|
|
57
|
+
persist-credentials: false
|
|
58
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
59
|
+
with:
|
|
60
|
+
enable-cache: false
|
|
61
|
+
- run: uv run --python "$PY" --group dev pytest -m "not tmux"
|
|
62
|
+
env:
|
|
63
|
+
PY: ${{ matrix.python }}
|
|
64
|
+
|
|
65
|
+
tmux:
|
|
66
|
+
name: tmux ${{ matrix.tmux }}
|
|
67
|
+
# Proves: the tmux tests pass on each tmux, on private -L sockets.
|
|
68
|
+
# Cannot: real Claude Code; macOS; distro tmux builds.
|
|
69
|
+
runs-on: ubuntu-26.04
|
|
70
|
+
timeout-minutes: 15
|
|
71
|
+
permissions:
|
|
72
|
+
contents: read
|
|
73
|
+
strategy:
|
|
74
|
+
fail-fast: false
|
|
75
|
+
matrix:
|
|
76
|
+
# Every version we claim: floor, 3.3a, Ubuntu 24.04, Ubuntu 26.04, latest; asked for,
|
|
77
|
+
# also next.
|
|
78
|
+
tmux: ${{ case(github.event_name == 'workflow_dispatch', fromJSON('["3.2a", "3.3a", "3.4", "3.6a", "3.8", "master"]'), fromJSON('["3.2a", "3.3a", "3.4", "3.6a", "3.8"]')) }}
|
|
79
|
+
# master is a canary: a moving branch, not a release, so its red never hides a release's.
|
|
80
|
+
continue-on-error: ${{ matrix.tmux == 'master' }}
|
|
81
|
+
steps:
|
|
82
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
83
|
+
with:
|
|
84
|
+
persist-credentials: false
|
|
85
|
+
- name: Build dependencies
|
|
86
|
+
run: |
|
|
87
|
+
sudo apt-get update
|
|
88
|
+
sudo apt-get install -y --no-install-recommends \
|
|
89
|
+
build-essential autoconf automake bison pkg-config libevent-dev libncurses-dev
|
|
90
|
+
- id: cache
|
|
91
|
+
if: matrix.tmux != 'master'
|
|
92
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
93
|
+
with:
|
|
94
|
+
path: ~/tmux
|
|
95
|
+
key: tmux-${{ matrix.tmux }}-${{ runner.os }}-${{ runner.arch }}-v1
|
|
96
|
+
- name: Build tmux from source
|
|
97
|
+
if: steps.cache.outputs.cache-hit != 'true'
|
|
98
|
+
env:
|
|
99
|
+
TMUX_REF: ${{ matrix.tmux }}
|
|
100
|
+
run: |
|
|
101
|
+
git clone -q --depth 1 --branch "$TMUX_REF" https://github.com/tmux/tmux src-tmux
|
|
102
|
+
cd src-tmux && sh autogen.sh && ./configure --prefix="$HOME/tmux" && make -j"$(nproc)" install
|
|
103
|
+
- run: echo "$HOME/tmux/bin" >> "$GITHUB_PATH"
|
|
104
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
105
|
+
with:
|
|
106
|
+
enable-cache: false
|
|
107
|
+
- run: tmux -V
|
|
108
|
+
- run: uv run --group dev pytest -m tmux
|
|
109
|
+
|
|
110
|
+
tmux-distro:
|
|
111
|
+
name: Ubuntu 22.04 packaged tmux
|
|
112
|
+
# Proves: the floor as users get it — Ubuntu 22.04's packaged tmux 3.2a with its old ncurses.
|
|
113
|
+
# Cannot: EL 9's build (ncurses 6.2).
|
|
114
|
+
runs-on: ubuntu-22.04
|
|
115
|
+
timeout-minutes: 10
|
|
116
|
+
permissions:
|
|
117
|
+
contents: read
|
|
118
|
+
steps:
|
|
119
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
120
|
+
with:
|
|
121
|
+
persist-credentials: false
|
|
122
|
+
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends tmux
|
|
123
|
+
- run: tmux -V
|
|
124
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
125
|
+
with:
|
|
126
|
+
enable-cache: false
|
|
127
|
+
- run: uv run --group dev pytest -m tmux
|
|
128
|
+
|
|
129
|
+
macos:
|
|
130
|
+
name: macOS 15
|
|
131
|
+
# Proves: the platform rules on macOS — 103-byte socket limit, /private/tmp realpaths,
|
|
132
|
+
# hook text under /bin/sh (bash 3.2), case-insensitive APFS, flock on APFS, Homebrew tmux.
|
|
133
|
+
# Cannot: real Claude Code
|
|
134
|
+
# (no login in public CI), the Claude inbox socket path on macOS.
|
|
135
|
+
# Asked for, not automatic: the whole suite runs here, several times slower than on Linux. The
|
|
136
|
+
# repository is public, so this standard runner costs no Actions minutes.
|
|
137
|
+
if: github.event_name == 'workflow_dispatch'
|
|
138
|
+
runs-on: macos-15
|
|
139
|
+
# The suite reached 41% in 15 minutes here; its pace per test file puts the whole at 35 to 50.
|
|
140
|
+
timeout-minutes: 60
|
|
141
|
+
permissions:
|
|
142
|
+
contents: read
|
|
143
|
+
steps:
|
|
144
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
145
|
+
with:
|
|
146
|
+
persist-credentials: false
|
|
147
|
+
- run: brew install tmux
|
|
148
|
+
- run: tmux -V
|
|
149
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
150
|
+
with:
|
|
151
|
+
enable-cache: false
|
|
152
|
+
- run: uv run --python "$PYTHON_FLOOR" --group dev pytest
|
|
153
|
+
|
|
154
|
+
package:
|
|
155
|
+
name: Package smoke
|
|
156
|
+
# Proves: the wheel builds, installs into a clean tool environment and starts; version matches.
|
|
157
|
+
# Cannot: PyPI upload (release.yml) or install from the index.
|
|
158
|
+
runs-on: ubuntu-26.04
|
|
159
|
+
timeout-minutes: 5
|
|
160
|
+
permissions:
|
|
161
|
+
contents: read
|
|
162
|
+
steps:
|
|
163
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
164
|
+
with:
|
|
165
|
+
persist-credentials: false
|
|
166
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
167
|
+
with:
|
|
168
|
+
enable-cache: false
|
|
169
|
+
- run: uv build
|
|
170
|
+
- run: uv tool install dist/*.whl
|
|
171
|
+
- run: workcrew --help
|
|
172
|
+
- run: test "$(workcrew --version)" = "$(uv version --short)"
|
|
173
|
+
|
|
174
|
+
federation:
|
|
175
|
+
name: Two OS users link their teams
|
|
176
|
+
# Proves: two OS users, each with a team of fake members, pin each other's keys, exchange
|
|
177
|
+
# messages through their leaders over one shared bare git relay, and refuse an unpinned key,
|
|
178
|
+
# a tampered envelope and a replay. Cannot: real Claude Code members, a remote relay, two machines.
|
|
179
|
+
runs-on: ubuntu-26.04
|
|
180
|
+
timeout-minutes: 10
|
|
181
|
+
permissions:
|
|
182
|
+
contents: read
|
|
183
|
+
steps:
|
|
184
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
185
|
+
with:
|
|
186
|
+
persist-credentials: false
|
|
187
|
+
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends tmux
|
|
188
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
189
|
+
with:
|
|
190
|
+
enable-cache: false
|
|
191
|
+
- name: Install workcrew where every user can run it
|
|
192
|
+
run: |
|
|
193
|
+
uv build
|
|
194
|
+
sudo env "PATH=$PATH" uv venv /opt/workcrew
|
|
195
|
+
sudo env "PATH=$PATH" uv pip install --python /opt/workcrew dist/*.whl
|
|
196
|
+
sudo chmod -R a+rX /opt/workcrew
|
|
197
|
+
- name: Create the two users
|
|
198
|
+
run: for u in wc-alice wc-bob; do sudo useradd --create-home --shell /bin/bash "$u"; done
|
|
199
|
+
- run: sudo env "PATH=/opt/workcrew/bin:$PATH" bash tests/federation/two_users.sh wc-alice wc-bob
|
|
200
|
+
|
|
201
|
+
secrets:
|
|
202
|
+
name: Secret scan
|
|
203
|
+
# Proves: no secret or deny-listed internal string anywhere in git history.
|
|
204
|
+
# Cannot: catch what is not in the rules; the deny-list lives outside the repo.
|
|
205
|
+
runs-on: ubuntu-26.04
|
|
206
|
+
timeout-minutes: 5
|
|
207
|
+
permissions:
|
|
208
|
+
contents: read
|
|
209
|
+
steps:
|
|
210
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
211
|
+
with:
|
|
212
|
+
fetch-depth: 0
|
|
213
|
+
persist-credentials: false
|
|
214
|
+
- name: Install gitleaks 8.30.1 (checksum pinned)
|
|
215
|
+
run: |
|
|
216
|
+
curl -fsSLo gl.tgz https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz
|
|
217
|
+
echo "551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb gl.tgz" | sha256sum -c -
|
|
218
|
+
tar -xzf gl.tgz gitleaks
|
|
219
|
+
- name: Scan history
|
|
220
|
+
env:
|
|
221
|
+
GITLEAKS_CONFIG_TOML: ${{ secrets.GITLEAKS_CONFIG_TOML }}
|
|
222
|
+
run: |
|
|
223
|
+
if [ -n "$GITLEAKS_CONFIG_TOML" ]; then printf '%s' "$GITLEAKS_CONFIG_TOML" > "$RUNNER_TEMP/gl.toml"; set -- --config "$RUNNER_TEMP/gl.toml"; fi
|
|
224
|
+
./gitleaks git --redact --exit-code 1 "$@" .
|
|
225
|
+
|
|
226
|
+
workflows:
|
|
227
|
+
name: Workflow audit
|
|
228
|
+
# Proves: workflows have pinned actions, least-privilege permissions and no template injection.
|
|
229
|
+
# Cannot: judge the logic of a job.
|
|
230
|
+
runs-on: ubuntu-26.04
|
|
231
|
+
timeout-minutes: 5
|
|
232
|
+
permissions:
|
|
233
|
+
contents: read
|
|
234
|
+
steps:
|
|
235
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
236
|
+
with:
|
|
237
|
+
persist-credentials: false
|
|
238
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
239
|
+
with:
|
|
240
|
+
enable-cache: false
|
|
241
|
+
- run: uvx zizmor@1.33.1 --pedantic .github/workflows
|
|
242
|
+
- run: uvx --from actionlint-py actionlint
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Claude Code contract test: workcrew against a real, logged-in `claude`.
|
|
2
|
+
#
|
|
3
|
+
# Where it runs:
|
|
4
|
+
# - Normally on a developer machine, where `claude` is already logged in:
|
|
5
|
+
# make contract # = uv run --group dev pytest -m contract
|
|
6
|
+
# Run it before each release, and whenever Claude Code ships a new version.
|
|
7
|
+
# - Here, by hand (Actions → contract → Run workflow), to check a given Claude Code version on a
|
|
8
|
+
# clean machine. Public CI cannot run it otherwise: it needs a paid login, which forks and pull
|
|
9
|
+
# requests never get.
|
|
10
|
+
#
|
|
11
|
+
# What it proves: on the installed Claude Code, the undocumented parts workcrew depends on still hold:
|
|
12
|
+
# the SessionStart hook's input and $CLAUDE_CODE_MESSAGING_SOCKET, the inbox socket's replies,
|
|
13
|
+
# `claude agents --json`, how a member ends on /exit, SIGTERM, SIGHUP and SIGKILL, and `--resume`.
|
|
14
|
+
# What it cannot prove: macOS behaviour, or any Claude Code version other than the one installed.
|
|
15
|
+
name: contract
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
workflow_dispatch:
|
|
19
|
+
inputs:
|
|
20
|
+
claude_version:
|
|
21
|
+
description: "Claude Code version to test, e.g. 2.1.332"
|
|
22
|
+
required: true
|
|
23
|
+
type: string
|
|
24
|
+
|
|
25
|
+
permissions: {}
|
|
26
|
+
|
|
27
|
+
concurrency:
|
|
28
|
+
group: contract
|
|
29
|
+
cancel-in-progress: false
|
|
30
|
+
|
|
31
|
+
jobs:
|
|
32
|
+
contract:
|
|
33
|
+
name: Contract test against Claude Code ${{ inputs.claude_version }}
|
|
34
|
+
runs-on: ubuntu-26.04
|
|
35
|
+
timeout-minutes: 20
|
|
36
|
+
# The environment holds the secret and asks the owner to approve each run (each run costs tokens).
|
|
37
|
+
environment: claude-contract
|
|
38
|
+
permissions:
|
|
39
|
+
contents: read
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
42
|
+
with:
|
|
43
|
+
persist-credentials: false
|
|
44
|
+
- name: Check the version input
|
|
45
|
+
env:
|
|
46
|
+
CLAUDE_VERSION: ${{ inputs.claude_version }}
|
|
47
|
+
run: |
|
|
48
|
+
[[ "$CLAUDE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "::error::bad version $CLAUDE_VERSION"; exit 1; }
|
|
49
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
50
|
+
with:
|
|
51
|
+
node-version: "24"
|
|
52
|
+
- name: Install tmux and Claude Code
|
|
53
|
+
env:
|
|
54
|
+
CLAUDE_VERSION: ${{ inputs.claude_version }}
|
|
55
|
+
run: | # zizmor: ignore[adhoc-packages] -- the exact version under test is the pin
|
|
56
|
+
sudo apt-get update && sudo apt-get install -y --no-install-recommends tmux
|
|
57
|
+
# The version under test is the input; an exact version is the pin.
|
|
58
|
+
npm install -g "@anthropic-ai/claude-code@$CLAUDE_VERSION"
|
|
59
|
+
claude --version
|
|
60
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
61
|
+
with:
|
|
62
|
+
enable-cache: false
|
|
63
|
+
- name: Contract test
|
|
64
|
+
env:
|
|
65
|
+
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} # from `claude setup-token`
|
|
66
|
+
run: uv run --group dev pytest -m contract
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Release for workcrew. `make release V=x.y.z` tags vX.Y.Z locally; this workflow does the rest.
|
|
2
|
+
# One-time setup: a PyPI trusted publisher (xls-nv/workcrew, release.yml, environment "pypi") and a
|
|
3
|
+
# GitHub environment "pypi" whose required reviewer is the owner, so every publish waits for one click.
|
|
4
|
+
name: release
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags: ["v*"]
|
|
9
|
+
|
|
10
|
+
permissions: {}
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: release-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: false
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
name: Build and check the version
|
|
19
|
+
# Proves: the tag equals pyproject.toml's version, and the sdist and wheel build.
|
|
20
|
+
runs-on: ubuntu-26.04
|
|
21
|
+
timeout-minutes: 10
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
26
|
+
with:
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
29
|
+
with:
|
|
30
|
+
enable-cache: false # no cache in a release build (cache poisoning)
|
|
31
|
+
- name: Tag must equal the project version
|
|
32
|
+
env:
|
|
33
|
+
TAG: ${{ github.ref_name }}
|
|
34
|
+
run: |
|
|
35
|
+
version="$(uv version --short)"
|
|
36
|
+
if [ "$TAG" != "v$version" ]; then
|
|
37
|
+
echo "::error::tag $TAG does not match pyproject.toml version $version"
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
- run: uv build
|
|
41
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
42
|
+
with:
|
|
43
|
+
name: dist
|
|
44
|
+
path: dist/
|
|
45
|
+
if-no-files-found: error
|
|
46
|
+
|
|
47
|
+
pypi:
|
|
48
|
+
name: Publish to PyPI
|
|
49
|
+
# Trusted Publishing: no token is stored. Attestations (PEP 740) are on by default and are
|
|
50
|
+
# signed with the same OIDC identity, so id-token is the only permission needed.
|
|
51
|
+
needs: build
|
|
52
|
+
runs-on: ubuntu-26.04
|
|
53
|
+
timeout-minutes: 10
|
|
54
|
+
environment:
|
|
55
|
+
name: pypi
|
|
56
|
+
url: https://pypi.org/project/workcrew/
|
|
57
|
+
permissions:
|
|
58
|
+
id-token: write # OIDC token for PyPI Trusted Publishing and the Sigstore attestations
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
61
|
+
with:
|
|
62
|
+
name: dist
|
|
63
|
+
path: dist/
|
|
64
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
65
|
+
|
|
66
|
+
github-release:
|
|
67
|
+
name: GitHub Release
|
|
68
|
+
# Only after PyPI accepted the files, so a GitHub Release never points at a version PyPI lacks.
|
|
69
|
+
needs: pypi
|
|
70
|
+
runs-on: ubuntu-26.04
|
|
71
|
+
timeout-minutes: 5
|
|
72
|
+
permissions:
|
|
73
|
+
contents: write # gh release create
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
76
|
+
with:
|
|
77
|
+
persist-credentials: false
|
|
78
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
79
|
+
with:
|
|
80
|
+
name: dist
|
|
81
|
+
path: dist/
|
|
82
|
+
- name: Release notes = this version's CHANGELOG.md section
|
|
83
|
+
env:
|
|
84
|
+
TAG: ${{ github.ref_name }}
|
|
85
|
+
run: |
|
|
86
|
+
awk -v v="${TAG#v}" '
|
|
87
|
+
$0 ~ "^## \\[" v "\\]" { on = 1; next }
|
|
88
|
+
on && /^## \[/ { exit }
|
|
89
|
+
on { print }
|
|
90
|
+
' CHANGELOG.md > "$RUNNER_TEMP/notes.md"
|
|
91
|
+
test -s "$RUNNER_TEMP/notes.md" || { echo "::error::no CHANGELOG.md section for $TAG"; exit 1; }
|
|
92
|
+
- name: Create the release with the dist files
|
|
93
|
+
env:
|
|
94
|
+
GH_TOKEN: ${{ github.token }}
|
|
95
|
+
TAG: ${{ github.ref_name }}
|
|
96
|
+
run: gh release create "$TAG" dist/* --verify-tag --title "$TAG" --notes-file "$RUNNER_TEMP/notes.md"
|
workcrew-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# AGENTS.md — rules for anyone (human or agent) changing workcrew
|
|
2
|
+
|
|
3
|
+
## Two principles (the owner's; every change answers to both)
|
|
4
|
+
1. **Perfect product.** "Perfect is sort of when you can't take anything away anymore." For every mechanism, concept and option, ask what is lost if it is taken away. Keep it only if a real past failure, a measured number or a hard rule needs it.
|
|
5
|
+
2. **Work as the best practitioner of that exact problem would, not with the first plan that comes to mind.** In every sub-task:
|
|
6
|
+
- do what a top professional in that field would do here without being asked, and say what it is;
|
|
7
|
+
- start from the rawest material they would start from — the source, the data, the run, the original text — not from a summary someone has already digested;
|
|
8
|
+
- use the specific methods and tools they would use: look the practice up instead of recalling it, and name the method and the tool;
|
|
9
|
+
- show that the result is right by something other than yourself: a run, a test that fails without the change, an independent check.
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
- `make check`: ruff, ruff format, `mypy --strict`, pytest (tmux tests need tmux ≥ 3.2a). Run it before every commit.
|
|
13
|
+
- Run the checks outside a workcrew team: inside a member's session the tool takes the tests' commands for that member's.
|
|
14
|
+
- `make contract`: the Claude Code contract against your real, logged-in `claude`. It spends forty-seven short Haiku requests and needs `WORKCREW_CONTRACT_WORK=<folder>`, a folder you have opened in `claude` once and answered Yes; without it, Claude Code waits at its trust dialog and each test fails after about 90 s, spending nothing. Run it after a Claude Code update and before a release.
|
|
15
|
+
- **CI's two sets.** A push runs every job but two: tmux master and macOS. Ask for the full set, which adds them, with `gh workflow run ci.yml --ref main` before a release, after a change to `tmux.py` or to the tmux config, and whenever a platform question is open. The repository is public, so its standard runners, macOS included, cost no Actions minutes. macOS stays off a push because its run of the whole suite takes most of an hour, and master because it is a moving canary.
|
|
16
|
+
- `make release V=x.y.z`: the only way to release. It refuses until a full run has passed for the commit being released, and CI publishes after the owner approves.
|
|
17
|
+
|
|
18
|
+
## Fixed decisions (change only with the owner)
|
|
19
|
+
- Python ≥ 3.11, standard library only at run time. Development tools: pytest, ruff, `mypy --strict`.
|
|
20
|
+
- tmux ≥ 3.2a, one code path. Version differences live only in `tmux.py`: a layout made when a client attaches takes the client's size from the hook, not the window's, which may not have it yet; no popup title, options newer than the floor set with `-q`, OSC 52 off below 3.4; a saved layout in the classic form, which every release from 3.2a reads, always reaches `select-layout`, and one in the JSON form 3.8 and master write only where this tmux writes JSON itself, read from a live window, since 3.3a ends its own server on another's instead of refusing it.
|
|
21
|
+
- Each team has its own private tmux server (`-L`) with its own `-f` config. Never run a tmux command against any other server, except the single nested-attach `new-window` in the caller's own session: started inside tmux, `workcrew` shows the team in a new window named after the team, whose client runs with `TMUX` unset; the window closes when that client ends.
|
|
22
|
+
- State lives in `${XDG_STATE_HOME:-~/.local/state}/workcrew/<slug of the name>-<8 random hex>/`, never in the working tree. A folder holds any number of teams, and a team's key never changes, so a folder may be renamed or moved. The tool owns no socket directory: tmux and Claude Code own every socket.
|
|
23
|
+
- A member's environment is made when its pane execs it, from the environment the team's tmux server gives the pane, minus the variables a Claude session sets for its children; nothing is added. Nothing is passed from the command that started the member.
|
|
24
|
+
- A member's settings change Claude Code's sandbox in one way only: a `workcrew` command on its own runs outside it (`excludedCommands`). A `workcrew` command chained with another runs inside, is refused at its start, and does nothing.
|
|
25
|
+
- A caller's identity is its pane tag. When `$TMUX` names one of the tool's live servers, the caller must be a live pane of it: a pane tagged `@workcrew_member` is that member, an untagged pane is the owner; a dead or vanished pane, or a dead server, is refused. A caller with no tool server in `$TMUX`, or none of its panes, is the member whose harness it descends from: the outermost ancestor whose argv holds a member's note path; with none, it is the owner. The caller is settled once, before any command runs, and a member runs only the commands on one list; a command missing from it is the owner's. A command acts on the team of the pane it runs in; outside a team it names one with `-r NAME`, and the folder finds a team only for the bare `workcrew`. `-r` is the owner's, whatever follows it: a member's command always means its own team. The session id serves `--resume` only.
|
|
26
|
+
- Notices are sent once, after the change, outside the lock. A command killed within about 100 ms of its change loses that notice; nothing resends it.
|
|
27
|
+
|
|
28
|
+
## Rules every change keeps (each has a test)
|
|
29
|
+
1. **Names** fullmatch `^[a-z][a-z0-9-]{0,23}$`. A team's name is unique on the host and is no command word; it is checked when the team is made and when it is renamed. `leader`, `all` and `workers` are reserved: no team or worker takes them, and a worker's name differs from the other members' and the team's. No worker takes `workcrew` or `owner`, the names the tool's notices and the owner's link messages come from. A task's id is the highest id plus one; commands take `7` or `T7`, notices print `T7`.
|
|
30
|
+
2. **tmux calls are argv lists.** No data goes into a tmux command string. Data reaches an argument tmux expands as a format (`-c`, a window's name) only through `_unexpanded`, and display-message's text, which tmux expands twice, only through `_literal`. A member pane's command is the fixed `[workcrew, "_exec", <key>, <member id>]`, inside a `systemd-run --user --scope` when caps are on.
|
|
31
|
+
3. **No member text in a tmux format, title or style.** Use a user option (`@workcrew_member`, which holds the member's permanent id) and reference it as `#{@workcrew_member}`. tmux does not expand a user option's value, so `#{` and `#(` in it do nothing, but it draws a `#[` in it as a style; the escape for that (`#{q/e:}`) came in 3.3. What keeps a style out is rule 1: no name holds a `#`.
|
|
32
|
+
4. **Data never travels as keys.** The owner's `send` is the only text put into a pane: a bracketed paste from a tmux buffer loaded from stdin, into an empty input box. Notices and members' messages go through the inbox socket. `send-keys` is used only with fixed key names.
|
|
33
|
+
5. **No team state is read from the working tree.**
|
|
34
|
+
6. **A private state directory.** Mode `0700`; a state directory with another mode is refused, never reused.
|
|
35
|
+
7. **Atomic writes:** temp file in the same directory, buffered write, `fsync`, `os.replace`, directory `fsync`. Never a bare `os.write`, with one exception: the link log is append-only, one `write` per line on an `O_APPEND` descriptor, so a crash tears at most its last line.
|
|
36
|
+
8. **One lock** (`flock` on `<state>/lock`) for every mutating command, hook-driven ones included; the holder checks that the lock file it holds is still the one at the path. One more lies in the state root, the directory that holds every team's: it is held only while the bare command looks for this folder's teams and makes one, and is released before any team's lock is taken. Linked teams add a second, `<state>/link.lock`, held across a relay's fetches and pushes. It is taken first, the team lock only inside it, and no team or board command takes it; its holder makes the same path check.
|
|
37
|
+
9. **Desired state first, then one idempotent reconcile.** Every other step of a reconcile repeats safely, so crash points (`WORKCREW_CRASH_AT=<step>`) prove only the orders that matter: a member is marked started with its pane; `exit` saves every member as stopping in the roster before its first mark or signal, and marks a member exited before it stops it; writes are atomic. `remove` gives back tasks before it saves; a row proves it by failing the first release.
|
|
38
|
+
10. **Never answer a prompt.** The tool sends no keys to a member at start and never answers a trust or permission dialog.
|
|
39
|
+
|
|
40
|
+
## Code and comments
|
|
41
|
+
Principle 1 applies to every line.
|
|
42
|
+
- Every function, branch, parameter, option and file answers a test row or a rule of the design. If removing it fails no test and breaks no rule, remove it.
|
|
43
|
+
- No code for a case nobody has met: no speculative generality, fallback, flag, setting or layer.
|
|
44
|
+
- A comment says only what the code cannot: why it is so, a hazard, or its source (a tmux or Claude Code fact). Never what the code does, never its history, never a TODO.
|
|
45
|
+
- The same for tests: one test per row; no test that cannot fail.
|
|
46
|
+
- A change's description lists what was considered and left out.
|
|
47
|
+
|
|
48
|
+
## Writing tests
|
|
49
|
+
- Test through the interface. Take expected values from the design or from real tool output (`tests/fake_claude/` was recorded from Claude Code 2.1.332), never from running the new code.
|
|
50
|
+
- tmux tests use `tests/helpers/tmuxfix.py`, which gives a private `-L` server under a scratch `TMUX_TMPDIR` and, when a test needs one, a real attached client through an outer server. Never touch the user's tmux.
|
|
51
|
+
- The fake `claude` (`tests/fake_claude/claude`) must keep passing the contract (`tests/contract/`). If real Claude Code changes, re-record with `make contract` and update the fake and the checks together.
|
|
52
|
+
- A note (`src/workcrew/notes/`) gives a command only in backticks, as its reader would type it; a row runs every such line on the tool.
|
|
53
|
+
|
|
54
|
+
## The repository is public
|
|
55
|
+
- No secrets, no internal names, hosts or people. `gitleaks` runs in CI with a private deny-list.
|
|
56
|
+
- Everything pushed is written in English: code, comments, commit messages, documentation and the text in pictures. Another language appears only as test data.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [Semantic Versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-11-27
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `workcrew` starts a team of Claude Code sessions in the current folder, on a private tmux server: a leader and N workers (`--workers N`, default 3). The team is named after the folder; `workcrew --name NAME` starts another in the same folder, and a folder holds any number of teams. Run again in a folder with one team, it brings back the same sessions; `workcrew -r NAME` does so from any folder, and `workcrew -r` alone shows your teams to pick one, or lists them where there is no terminal. Every worker is shown beside the leader in the team's one window, however small its pane; what the owner arranges with tmux is kept while the team runs and comes back as it was left at the next start, and `layout left|right|middle` lays the default grid out again.
|
|
13
|
+
- A task board: the leader puts tasks on it, each worker takes one at a time and reports it, and the leader reviews. A task's text is handed over with it, and a report reaches the leader with its text. `workcrew board` shows the board, and `--loop` redraws it.
|
|
14
|
+
- The leader can close a task still in Ready; nobody had taken it, so nobody is told.
|
|
15
|
+
- The leader gives a task to one worker as it makes it, `board new TITLE --to WORKER`, or sends one back to a chosen worker with its reports, or gives one still in Ready to a worker, `board back ID --to WORKER`. Without `--to`, a task goes to Ready, where the next free worker takes it.
|
|
16
|
+
- Thin blue pane borders with each member's name on its border, `(you)` and `(board)` on the owner's panes, the active pane marked by ► before its name and the name reversed, and a status bar in the terminal's own colours, reversed: the board's counts on the left, the team's name on the right, and between them the window list when there is more than one window or its pane is zoomed.
|
|
17
|
+
- Commands `add`, `remove`, `send`, `layout`, `board`, `exit` (`--forget`), `resume`, `rename` and `link`. Inside a team, `C-]` opens a command line for them, and they act on that team; a result too tall for its popup keeps its top and says how many lines are left out. Outside a team a command names its team, `workcrew -r NAME COMMAND`, on a running or a stopped team, and never starts a new team.
|
|
18
|
+
- A line the tool prints for you to type works where you are: it names the team when you are outside it, and at `C-]` the word `workcrew` may be left out.
|
|
19
|
+
- Members may run `send`, `board` and `link` on their own team; the leader also `add`, `remove`, `resume`, `rename MEMBER NEW` and `layout`. The rest, and `-r`, are the owner's.
|
|
20
|
+
- The owner's `send` is typed into each member's input box. A member with a draft, an open prompt or dialog, a pane scrolled back in copy mode or a pane too small to read is skipped and named. A member's `send` arrives as a message from another session.
|
|
21
|
+
- The leader is told when a task is reported, when a worker leaves or exits, when a worker holding a task comes back, when a worker stops a second time still holding its task, or stops, still holding one, while a background command of its own runs, when a worker holding no task, with tasks in Ready, has its turn fail or stops a second time, and when the owner adds a worker to a running team; at a start, it is told what is on the board if anything is or a member is down. As many idle workers with no task as Ready has tasks are told of them, and the next one when one of those exits, is removed or is given another task.
|
|
22
|
+
- `workcrew link` lets two people's teams message each other through a git repository both can push to. Messages are signed with the owner's SSH key and accepted only under the keys pinned for that team. Every outgoing message asks the owner first; a member reads one with `link read`, marked as another team's data; each message sent, accepted, refused or read is logged.
|
|
23
|
+
- Claude Code flags after `--` are stored and given to every member; `workcrew --` alone clears them. Flags workcrew sets itself, and a prompt as the first word, are refused.
|
|
24
|
+
- `resume MEMBER… -- --model V --effort V` gives those members their own model and effort, restarting them in the same session and keeping them at every later start; `--` alone clears them. The leader or the owner sets a worker's; only the owner sets the leader's. `--effort` is refused while the team's environment sets `CLAUDE_CODE_EFFORT_LEVEL`, which Claude Code reads first.
|
|
25
|
+
- `exit` stops the team for every screen attached to it, and each screen it leaves says that the team is stopping; `C-b d` leaves one screen and keeps the team running. `exit --forget` also removes the members' `TMPDIR`s.
|
|
26
|
+
- workcrew refuses to start a team unless it is the first `workcrew` on `PATH`, since members call it by name.
|
|
27
|
+
- A member's `workcrew` command must run on its own: chained with another command it runs in Claude Code's sandbox, and is refused.
|
|
28
|
+
- A member waiting for the owner's answer is marked `WAITING` once Claude Code reports it (six seconds after a permission prompt), and the terminal's bell rings once; a worker keeps its task meanwhile. A worker that ends its turn holding a Running task is sent back to it once, unless a background command of its own still runs; at every start while it holds a task, it gets the task's text.
|
|
29
|
+
- On Linux with a systemd user manager, each member runs under a memory cap of half the machine's memory, without swap; `--no-cap` turns it off.
|
|
30
|
+
- Text from a member, a linked team or a file name is printed with control and reordering characters shown as escapes.
|
|
31
|
+
- Exit codes: 0 done, 1 refused or failed, 2 wrong usage or a state workcrew will not touch, such as a state folder of the wrong mode or owner, or a filesystem without locking.
|
|
32
|
+
- A team's name is unique on the machine and is no command word. No worker can be named `workcrew` or `owner`, the names the tool's notices and the owner's link messages come from.
|
|
33
|
+
- Needs tmux 3.2a or newer, Claude Code 2.1.225 or newer and Python 3.11 or newer, on Linux or macOS. Linux is tested with a real Claude Code; macOS runs the test suite in CI when asked, without one.
|
workcrew-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 The workcrew authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
6
|
+
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
12
|
+
portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
15
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
16
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
18
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
workcrew-0.1.0/Makefile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.PHONY: check contract release
|
|
2
|
+
|
|
3
|
+
# Everything CI's lint and unit jobs run, plus the tmux tests when tmux is installed.
|
|
4
|
+
check:
|
|
5
|
+
uv run ruff check
|
|
6
|
+
uv run ruff format --check
|
|
7
|
+
uv run mypy
|
|
8
|
+
uv run pytest
|
|
9
|
+
|
|
10
|
+
# The Claude Code contract against the real, logged-in `claude`: forty-seven short Haiku requests,
|
|
11
|
+
# in the trusted folder that WORKCREW_CONTRACT_WORK names.
|
|
12
|
+
contract:
|
|
13
|
+
uv run pytest -m contract
|
|
14
|
+
|
|
15
|
+
release:
|
|
16
|
+
@test -n "$(V)" || { echo "usage: make release V=x.y.z"; exit 2; }
|
|
17
|
+
scripts/release.sh "$(V)"
|