Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

chore: the spec, config and hooks this repo runs on

Corey Olson12e9049201f4
diff --git a/.githooks/commit-msg b/.githooks/commit-msg
new file mode 100755
index 00000000..a57ca6a3
--- /dev/null
+++ b/.githooks/commit-msg
@@ -0,0 +1,4 @@
+#!/bin/sh
+# This repo is pullboard itself, so its hooks run the source in this checkout.
+root=$(git rev-parse --show-toplevel)
+exec node "$root/bin/pullboard.js" hook commit-msg "$1"
diff --git a/.githooks/pre-commit b/.githooks/pre-commit
new file mode 100755
index 00000000..808b0820
--- /dev/null
+++ b/.githooks/pre-commit
@@ -0,0 +1,4 @@
+#!/bin/sh
+# This repo is pullboard itself, so its hooks run the source in this checkout.
+root=$(git rev-parse --show-toplevel)
+exec node "$root/bin/pullboard.js" hook pre-commit
diff --git a/.githooks/pre-push b/.githooks/pre-push
new file mode 100755
index 00000000..0f59ed60
--- /dev/null
+++ b/.githooks/pre-push
@@ -0,0 +1,4 @@
+#!/bin/sh
+# This repo is pullboard itself, so its hooks run the source in this checkout.
+root=$(git rev-parse --show-toplevel)
+exec node "$root/bin/pullboard.js" hook pre-push
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..aafcb345
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+node_modules/
+.DS_Store
+*.log
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 00000000..c093520b
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,36 @@
+# AGENTS.md
+
+This repo is pullboard itself. Humans start at `README.md`; the spec is `SPEC.md`.
+
+## Code
+
+- Plain JavaScript, ES modules, Node 22.13 or newer. No dependencies and no build step: every import is a `node:` built-in or a file in this repo (`test/package.test.js` checks).
+- Every function gets a JSDoc block: what it does, then why when the why is not obvious.
+- A refusal is a `Refused(code, message)`: the code names the rule, the message says the next step.
+- Tests use `node:test` against real git repos and a real SQLite file. Each test name cites the spec ids it proves.
+- `npm run gate` is the spec check plus the tests. Pre-push runs it.
+
+<!-- pullboard:start -->
+## Working here: pullboard
+
+This repo runs on pullboard: a work board, lanes and a spec that live in git. Nothing ships until a second agent verifies it.
+
+**Source of truth.** `SPEC.md` holds every requirement as a row with an id, like `G1.2`. Code follows the spec. Commits cite the ids they serve: `feat(scope): subject [G1.2]`. Only a person approves or changes an approved row.
+
+**Who you are.** An agent is its worktree. The main checkout is the coordinator. Every other agent works in its own worktree and joins one lane:
+
+ git worktree add ../<repo>-<lane> -b <lane>/<slug>
+ cd ../<repo>-<lane> && pullboard join <lane>
+
+**The loop.**
+1. `pullboard inbox`, then `pullboard list <lane>`.
+2. `pullboard claim <id>`. A claim is a 2-hour lease; claim again to renew. The criterion freezes now: `pullboard show <id>` is the bar your work is judged against.
+3. Build inside your lane's folders (`pullboard lanes`). Pre-commit refuses anything else; shout the owner instead.
+4. Commit, then `pullboard submit <id>`. It needs a clean tree and the gate green at HEAD.
+5. A different agent verifies: it checks out the submitted commit and runs `pullboard verify <id> accept`, or `pullboard verify <id> reject --reason TEST_FAILURE --note "what failed"`.
+6. A reject reopens the item. Fix it, commit, claim, submit again; the same head is refused.
+
+**Talk.** `pullboard shout <lane|agent|all> "<text>"`. Read `pullboard inbox` before you start and after you submit.
+
+**Never.** Bypass a hook with `--no-verify`. Edit the board's database. Verify your own work. Change an approved spec row without the person's OK.
+<!-- pullboard:end -->
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 00000000..43c994c2
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1 @@
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..47413cca
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 Pullboard
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/SPEC.md b/SPEC.md
new file mode 100644
index 00000000..1223a97f
--- /dev/null
+++ b/SPEC.md
@@ -0,0 +1,60 @@
+# Pullboard local
+
+The local-first core of Pullboard: a work board, lanes, a spec and git hooks that live in the repo. No account, no network. This file is the spec, in the format `pullboard spec check` lints.
+
+Statuses: approved = decided · draft = proposed · pending = open question · fact = true today · retired = spent, never reused. Tiers: must · aim.
+
+## P · Principles
+- P1 [approved, must] Nothing ships until a second agent verifies it. | gate: test/board.test.js
+- P2 [approved, must] Works offline in any git repo. No account, no network. | gate: test/e2e.test.js
+- P3 [approved, must] Zero runtime dependencies. Node 22.13 or newer. | gate: test/package.test.js
+- P4 [approved, must] Every refusal names its rule and the next step. | gate: review
+
+## B · Board
+- B1 [approved, must] One SQLite file in the git common dir. Every worktree sees it; nothing is committed. | gate: test/e2e.test.js
+- B2 [approved, must] Every move is one immediate transaction. Two agents never hold one item. | gate: test/e2e.test.js | serves: P1
+- B3 [approved, must] An agent is its worktree. The main checkout is the coordinator. | gate: test/e2e.test.js
+- B4 [approved, must] A claim is a lease, 2h by default. Claiming again renews it. | gate: test/board.test.js
+- B5 [approved, must] One live top-level claim per agent. Child items are free. | gate: test/board.test.js
+- B6 [approved, must] Items cite spec ids that exist. | gate: test/e2e.test.js | serves: S1
+- B7 [approved, must] Shouts reach a lane, an agent or all. Inbox marks them read. | gate: test/board.test.js
+
+## V · Verification
+- V1 [approved, must] The builder never verifies its own work. | gate: test/board.test.js | serves: P1
+- V2 [approved, must] The criterion freezes at first claim: title, criterion and cited spec rows. | gate: test/board.test.js | serves: P1
+- V3 [approved, must] Verify refuses when the frozen criterion has changed. | gate: test/e2e.test.js | serves: V2
+- V4 [approved, must] Submit needs a clean tree and the gate green at HEAD. | gate: test/e2e.test.js
+- V5 [approved, must] ACCEPT needs CRITERION_MET. REJECT needs a reason code and a note. | gate: test/board.test.js
+- V6 [approved, must] REJECT reopens the item. Resubmitting needs a new head. | gate: test/board.test.js
+- V7 [approved, must] The verifier's checkout contains the submitted commit. | gate: test/e2e.test.js
+- V8 [approved, must] Every verdict binds the submitted commit and the frozen digest. | gate: test/board.test.js
+
+## L · Lanes
+- L1 [approved, must] Lanes live in pullboard.json: folders owned, spec prefixes, when it starts. | gate: test/lanes.test.js
+- L2 [approved, must] The longest owned prefix decides a path's lane. Unowned paths are the coordinator's. | gate: test/lanes.test.js
+- L3 [approved, must] In a lane's worktree, pre-commit refuses changes outside the lane, moves included. | gate: test/e2e.test.js
+- L4 [approved, must] A worktree that has not joined a lane cannot commit. | gate: test/e2e.test.js
+
+## S · Spec
+- S1 [approved, must] SPEC.md holds one row per line: id, status, text, gate, what it serves. | gate: test/spec.test.js
+- S2 [approved, must] Ids are unique forever. Retired rows stay, so no id is reused. | gate: test/spec.test.js
+- S3 [approved, must] Serves links name real ids and never cycle. | gate: test/spec.test.js
+- S4 [approved, must] Approved must-rows name their gate. | gate: test/spec.test.js
+- S5 [approved, must] A sign-off keeps the text it approved. Changing the row makes it stale. | gate: test/spec.test.js
+
+## C · Commits
+- C1 [approved, must] Header: type(scope): subject [ids], 72 characters at most. | gate: test/hooks.test.js
+- C2 [approved, must] Cited ids exist. feat and fix commits cite at least one. | gate: test/hooks.test.js | serves: S1
+- C3 [approved, must] Pre-push runs the gate, unless this exact tree already passed it. | gate: test/e2e.test.js | serves: V4
+
+## R · Receipts
+- R1 [approved, must] The ledger lists built items: lane, spec, builder, verifier, verdict, commit. | gate: test/board.test.js
+- R2 [approved, must] Every move lands in an append-only event log. | gate: test/board.test.js
+
+## I · Init
+- I1 [approved, must] One command sets up config, spec, agent instructions, hooks and board. | gate: test/e2e.test.js
+- I2 [approved, must] Init is idempotent and never overwrites a file it did not write. | gate: test/e2e.test.js
+
+## H · Hosted
+- H1 [pending, aim] `pullboard sync` mirrors the local board to pullboard.dev for teams across machines.
+- H2 [pending, aim] Hosted issues an identity per agent, so a verdict binds who gave it, not a path.
diff --git a/package.json b/package.json
new file mode 100644
index 00000000..590f92bc
--- /dev/null
+++ b/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "@pullboard/local",
+ "version": "0.5.0",
+ "private": true,
+ "description": "Pullboard, local-first: a work board, lanes, a spec and git hooks that live in your repo. Nothing ships until a second agent verifies it.",
+ "license": "MIT",
+ "type": "module",
+ "bin": { "pullboard": "./bin/pullboard.js" },
+ "exports": { ".": "./src/index.js" },
+ "files": ["bin", "src", "docs", "README.md", "LICENSE"],
+ "engines": { "node": ">=22.13" },
+ "keywords": ["pullboard", "ai-agents", "coding-agents", "multi-agent", "verification", "git-hooks", "local-first", "spec"],
+ "homepage": "https://pullboard.dev",
+ "scripts": {
+ "test": "node --disable-warning=ExperimentalWarning --test",
+ "gate": "node bin/pullboard.js spec check && npm test"
+ }
+}
diff --git a/pullboard.json b/pullboard.json
new file mode 100644
index 00000000..7455380b
--- /dev/null
+++ b/pullboard.json
@@ -0,0 +1,13 @@
+{
+ "gate": "npm run gate",
+ "spec": "SPEC.md",
+ "verify": "any",
+ "lease": "2h",
+ "lanes": {
+ "core": { "owns": ["src/", "bin/"], "specs": ["B", "V", "L", "S", "C", "R", "I"], "starts": "now" },
+ "tests": { "owns": ["test/"], "specs": ["P"], "starts": "now" },
+ "docs": { "owns": ["docs/", "README.md", "ROADMAP.md"], "specs": ["H"], "starts": "now" }
+ },
+ "shared": [],
+ "commits": { "requireIds": ["feat", "fix"], "noEmoji": true }
+}