Repository navigation
Drive Spek tasks through atomic claims, not todo writes - #4
Merged
Merged
Conversation
added 2 commits
August 26, 2026 10:45
The skills told agents to track Spek task state with `update_jam_todo` — `in_progress` before editing, `completed` after verification. The gateway's own instructions now say the opposite: "use `start_jam_task`, heartbeat the returned claim while working, and call `complete_jam_task` with verification evidence. Do not bypass atomic claim semantics with `update_jam_todo`." The claim exists because more than one connected client can hold the same grant. Two agents reading the same plan pick the same task, and a todo write makes neither of them the owner, so they build it twice and overwrite each other. That is the collision the claim primitive was added to prevent, and this plugin was written before it landed: nothing in these skills mentioned `list_available_work`, `start_jam_task`, `heartbeat_jam_task`, `complete_jam_task`, `release_jam_task`, `list_spek_projects`, `get_spek_project`, or `list_workspace_inbox`. `operating-nullshot` now carries the whole lifecycle — find, claim, heartbeat, complete once with evidence, or release — with the argument and rejection semantics taken from the live tool schemas rather than guessed. The heartbeat step is spelled out because a claim that stops being heartbeated expires and the task is silently reclaimed mid-build. `using-nullshot` points at it and adds the two discovery calls plus the inbox read, which is the only way work finished while away is ever seen. One existing assertion pinned the deprecated sentence, so it was asserting the bug; it now asserts the replacement. A new test covers the lifecycle and fails against the previous skills.
The skill told agents to OAuth against https://mcp.nullshot.ai/mcp by name. An agent that reads an explicit URL in its instructions can reasonably use it over the one it was configured with, which would defeat the point of a configurable gateway and silently move a session to production. Says "the gateway it is configured with" instead, and names the consequence: the environments do not share accounts, jams or grants.
teechoi
force-pushed
the
fix/skills-atomic-claims
branch
from
August 26, 2026 17:45
634372f to
81c2024
Compare
teechoi
pushed a commit
that referenced
this pull request
Aug 31, 2026
`v0.2.0` was cut before #3, #4, #5 and #6, and every manifest still declared 0.2.0. Two consequences, both silent: - The README's own Pi row installs `@v0.2.0`, so a Pi user pasting it today gets a plugin that can only reach production, teaches `update_jam_todo` instead of atomic claims, and carries the two invented Codex commands. - Claude Code and Cursor read the version to decide whether an update exists. At an unchanged 0.2.0, an already-installed user is never offered any of it, including the Cursor gateway this branch adds. So the version moves to 0.3.0 in all eight places the validator checks, and the Pi row moves with it. `scripts/validate.mjs` now asserts the README's pinned tag matches package.json. It cannot prove the tag exists on the remote from here, but it makes the pin move with the version, which turns four releases of silent staleness into a release step someone has to take. **Merging this requires `git tag v0.3.0 && git push origin v0.3.0`** on the merge commit, or the Pi row points at a tag that is not there yet. Verified: validate green at 0.3.0, 12/12 tests. Non-vacuous — restoring only the README pin to v0.2.0 fails the new assertion. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
teechoi
added a commit
that referenced
this pull request
Aug 31, 2026
* Installing into Cursor now connects Cursor
`.cursor-plugin/plugin.json` declared `skills` and nothing else. A user who
completed Cursor's dashboard install got the planning skills — which name
`start_jam_task`, `upsert_jam_plan`, `list_available_work` — and no server to
call them on. Nothing errors in that state: the plugin is installed, the skills
load, the tools are simply absent. It is the least obvious way to be broken,
which is why it shipped.
The previous change documented this. This one fixes it.
## The manifest
`mcpServers` is a documented Cursor manifest field — a path, an inline object,
or an array — and the inline object here is the shape Cursor's own first-party
remote-MCP plugins use (`third_party/ahrefs`, `third_party/brevo`): no
transport gymnastics, inferred from `url`. It validates against Cursor's
published `schemas/plugin.schema.json`.
`commands` was missing for the same reason skills were not enough: ten command
files shipped in this repo that Cursor had no way to load.
## Why the URL stays literal
Cursor supports manifest `variables`, but they are values the user is PROMPTED
for, with no default. An unset one would write a literally unexpanded `${...}`
into the server URL — a broken server rather than a movable one, which is the
same reasoning that keeps `.mcp.json` plain for Codex. So Cursor remains
production-only, and the README now says where a non-production user goes
instead: the one-click Cursor button in Nullshot's Connect panel, which writes
that environment's gateway directly.
## Verification
- `node --test test/*.test.mjs`: 12 pass. The new test fails, and
`scripts/validate.mjs` throws, against the manifest as it shipped.
- The URL the manifest now carries answers `POST /mcp` with 401 and a
`WWW-Authenticate` naming its resource metadata, so the README's claim that
Cursor discovers OAuth from a 401 is true for Cursor for the first time.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* Release 0.3.0, and stop the tag going stale again
`v0.2.0` was cut before #3, #4, #5 and #6, and every manifest still declared
0.2.0. Two consequences, both silent:
- The README's own Pi row installs `@v0.2.0`, so a Pi user pasting it today
gets a plugin that can only reach production, teaches `update_jam_todo`
instead of atomic claims, and carries the two invented Codex commands.
- Claude Code and Cursor read the version to decide whether an update exists.
At an unchanged 0.2.0, an already-installed user is never offered any of it,
including the Cursor gateway this branch adds.
So the version moves to 0.3.0 in all eight places the validator checks, and the
Pi row moves with it.
`scripts/validate.mjs` now asserts the README's pinned tag matches
package.json. It cannot prove the tag exists on the remote from here, but it
makes the pin move with the version, which turns four releases of silent
staleness into a release step someone has to take.
**Merging this requires `git tag v0.3.0 && git push origin v0.3.0`** on the
merge commit, or the Pi row points at a tag that is not there yet.
Verified: validate green at 0.3.0, 12/12 tests. Non-vacuous — restoring only
the README pin to v0.2.0 fails the new assertion.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
---------
Co-authored-by: rokt <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
operating-nullshottells agents to track Spek task state withupdate_jam_todo:The gateway's own instructions now say the opposite:
Why the claim exists: more than one connected client can hold the same grant. Two agents reading the same plan pick the same dependency-ready task, and a todo write makes neither of them the owner — so they build it twice and overwrite each other. That's the collision the claim primitive was added to prevent.
This plugin predates it. I grepped all five skills for the work-claiming surface:
start_jam_taskheartbeat_jam_taskcomplete_jam_taskrelease_jam_tasklist_available_worklist_spek_projectsget_spek_projectlist_workspace_inboxEvery other tool the skills name does still exist — this is the one surface that moved.
The change
operating-nullshotgains the full lifecycle: find → claim → heartbeat → complete once with evidence → or release. Argument and rejection semantics are taken from the live tool schemas viatool_schema, not guessed:start_jam_taskreturnsclaimId,generation, and aworkPacket; creates no branch and dispatches no hosted builderheartbeat_jam_tasktakesttlMsbetween 30s and 1hcomplete_jam_taskrequiresverificationEvidencewith at least one property, reconcilestasks.mdunder a revision check, and notifies the workspace inboxrelease_jam_tasktakes an optionalreasonclaimId,generationand the authenticated grant all match — so on rejection, re-read rather than retryI spelled the heartbeat step out deliberately: a claim that stops being heartbeated expires and the task is silently reclaimed mid-build, which is not obvious from the tool names alone.
using-nullshotnow points at that lifecycle instead of the todo path, and gains the two discovery calls pluslist_workspace_inbox— the gateway can't push notifications, so it's the only way an agent ever learns what finished while it was away.update_jam_todois not banned outright; it stays available for todo content the plan doesn't own.One test was asserting the bug
That pinned the deprecated sentence in place, so the old guidance couldn't be changed without a test failure. It now asserts the replacement.
Verification
node scripts/validate.mjsclean ·node --test test/*.test.mjs7 pass, 0 fail (1 new).Non-vacuous — the new test against the original skills:
Relationship to #3
Independent; either can land first. #3 makes the gateway URL environment-aware. Together they're what I'd want in place before the Nullshot connect panel starts handing users these plugin commands instead of a plain
claude mcp add.Note
Low Risk
Documentation and test-only changes to agent skills; no runtime plugin or gateway behavior is modified.
Overview
Replaces deprecated Spek task tracking in the Nullshot plugin skills so agents align with gateway claim semantics and avoid multi-client collisions on the same grant.
operating-nullshotnow documents a full find → claim → heartbeat → complete (with verification evidence) or release flow (list_available_work,start_jam_task,heartbeat_jam_task,complete_jam_task,release_jam_task) and explicitly forbids usingupdate_jam_todofor Spek task lifecycle state. Direct execution still uses app file tools; claims do not create branches or dispatch hosted builders.using-nullshotaddslist_workspace_inboxon resume/long work,list_spek_projects/list_available_workwhen picking up existing work, points direct execution at the claim lifecycle, and clarifies OAuth against the configured gateway (includingNULLSHOT_MCP_URL).Tests in
adapters.test.mjsadd coverage for the claim lifecycle in skills and flip an assertion that previously pinned the oldupdate_jam_todoguidance.Reviewed by Cursor Bugbot for commit 634372f. Bugbot is set up for automated code reviews on this repo. Configure here.