← Catalog

@srobroek/pi-speckit-beads

SpecKit on Beads: a tasks.md guard, setup, ledger and bugfix skills, formulas, and the speckit-sync and speckit-verify subagents.

Package

Install

Install with PiG

pig install npm:@srobroek/pi-speckit-beads

Install with Pi

pi install npm:@srobroek/pi-speckit-beads
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "skills": [
    "./skills"
  ],
  "subagents": {
    "agents": [
      "./agents"
    ]
  },
  "extensions": [
    "./extensions/speckit-beads.js",
    "./_kit/prereqs.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 2.1.2 (README.md). PiG does not review it.

speckit-beads

SpecKit on Beads: spec-driven setup, a workflow tracked as beads molecules, and protection for specs/*/tasks.md, whose task state lives in beads.

It replaces the speckit plugin and needs no other plugin from this repository. It works through the public bd CLI, and the agents run bd prime for the Beads workflow and command reference. Beads is required. Setup always creates the beads workspace and installs the formulas, and nothing switches that off.

Install

HarnessInstall
OpenCodeopencode plugin add 'github:srobroek/harness-plugins::path:plugins/speckit-beads/opencode'
Claude Codespeckit-beads@harness-plugins from this repository's marketplace
pipi install npm:@srobroek/pi-speckit-beads
ToolNeeded forVersion
bdThe beads workspace, the formulas and the task state. Setup and the tasks.md guard ask bd -C <repository> where. Required.1.3.0 or later
specifyspeckit_setup's specify init and extension installs1.4.0 or later

On pi, a session start reports a missing or too-old tool with its install hint (mise use -g aqua:gastownhall/beads, mise use -g pipx:specify-cli).

From the speckit plugin

  • The OpenCode entry is plugins/speckit-beads/opencode, and the plugin id is srobroek.speckit-beads. Move the options to that entry.
  • Claude Code installs it as speckit-beads@harness-plugins, without the beads plugin.
  • speckit_setup has no input that skips beads. It refuses every input it does not know.
  • The speckit-ledger skill holds the task graph rules. The workflow, the formulas and the agents load it instead of the beads plugin's skills.

Options

OpenCode takes them as the plugin's options, and Claude Code takes none.

pi reads the same keys from the speckit-beads key of its user settings, ~/.pi/agent/settings.json ($PI_CODING_AGENT_DIR/settings.json). For example, { "speckit-beads": { "tasksGuard": false } } turns the tasks.md guard off. The extension ignores a project's .pi/settings.json, so a repository cannot switch a guard off. Without the key, the defaults below apply. A speckit-beads value that is not an object gives the defaults and a warning at session start. So does a settings.json that is unreadable or not valid JSON.

OptionDefaultEffect
integrationcodex (OpenCode), pi (pi)The spec-kit integration that speckit_setup passes to specify init. codex writes the commands as skills under .agents/skills/, where OpenCode finds them. pi writes prompt templates under .pi/prompts/, and pi runs each as /speckit.<command>.
tasksGuardtrueRefuse writes of specs/*/tasks.md where beads is active.
implementRedirecttrueWhere beads is active, replace the implement command with the beads route and point the analyze command at the task beads.
blockTasksToIssuestrueRefuse the taskstoissues commands where beads is active.
workflowtrueAdd the workflow instructions to sessions in a SpecKit repository.
agentstrueOpenCode: register the speckit-sync and speckit-verify subagents.
specAgent"auto"OpenCode: register the primary spec agent. "auto": only where the location, or the project root it lies inside, holds .specify/; true: everywhere; false: never.

Tools

OpenCode and pi get the three tools. Claude Code gets the manual steps in the speckit-setup skill instead. The tools run in the session's SpecKit workspace: the session's directory when it holds .specify/, else the project root when the directory lies inside it and the root holds .specify/. OpenCode takes the project root from the session's project. pi takes the nearest directory that holds .git. Agent registration and the workflow instructions use the same workspace.

speckit_setup bootstraps the session's repository. Every phase reports done, skipped (already present or an extension could not install) or failed. Extension failures are non-fatal and report the extension and CLI reason; other failed phases stop with ok: false. A rerun skips completed work and retries missing extensions. ok: true means bootstrap completed, not that every optional extension is available. Each phase has its own timeout.

  1. specify init --here --force --integration <integration> --script sh --ignore-agent-tools, unless .specify/ exists.
  2. The community catalog, only with installAllowed=true (skipped when SPECKIT_CATALOG_URL is set: specify then reads only that catalog).
  3. Attempt optional extensions not yet installed: agent-context, bugfix, cleanup, critique, fix-findings, iterate, qa, refine, retro, security-review, status-report, tinyspec.
  4. bd init --skip-hooks without a workspace, then the bundled formulas into .beads/formulas/. Formula installation rejects symlinks and never overwrites a divergent file. Without a working bd, this phase fails with an install hint.
  5. specs/**/spec-status.md in .gitignore.

agent-context is in the core catalog. The other ids above are only in the community catalog. That catalog is discovery-only by default, so their default installs fail. Setup changes that trust policy only on explicit opt-in.

Before a workflow, report skipped capabilities. Select speckit-basic for core commands only, or use the direct-work fallbacks of the formulas, with the same deliverables and checks. Never skip a review or verification because its extension is not installed.

InputEffect
workspaceRepository root, resolved against the session's directory; defaults to it.
integrationOverrides the integration option for this call.
installAllowed=trueRegisters the public community catalog as an install source. Opt in only after vetting the extensions.
force=trueRe-scaffolds .specify/ only.
skipSpecify=trueSkips steps 1 to 3. Beads, the formulas and the gitignore entry still run.
scriptsh (default) or ps, passed to specify init --script.

speckit_start starts or resumes the workflow for one NNN-slug spec. It asks for an explicit routine-approval choice before pouring, records it on the run root, reads it back, and reuses it on resume.

A new run goes under the spec's feature epic. That is the epic argument, or else the one open epic with the spec's spec_id.

  • The tool bonds the run with bd mol bond <profile> <epic> --type parallel --pour --ref speckit. The root is the epic's child in the same write, with no blocks edge.
  • The root id reads <epic>.speckit. A second run under the same epic takes speckit-2.
  • A spec without an epic gets a poured run with no parent, as before.
  • In both cases the root title is <NNN-slug> (<profile>), not the bare profile name. Each profile declares a required title var, and bd titles the root from it.
Human approvalsFormula selectionRoutine sign-offs
Requiredautonomous=noRetained
Declinedautonomous=yesOmitted
  • CHOICE_REQUIRED, MIGRATION_REQUIRED and REPARENT_REQUIRED return a question. Ask the user. Then call again with the answer:
    • After CHOICE_REQUIRED, send approvals and decision.
    • After MIGRATION_REQUIRED, on consent, send the pending approvals=no and migrate=true. Also send the returned root and decision. migrate with any other approvals is refused, so a yes to migrating cannot become approvals=yes.
    • An older run with no parent gets REPARENT_REQUIRED once its spec has an epic. Send the returned root with reparent=true or reparent=false. A yes moves the run under the epic and retitles it. A no is recorded, and the question does not come back.
  • An epic that already blocks on a step of the run gets an error, because the move would make a cycle. The tool adds no blocks edge between an epic and its run.
  • READY names the run root, its epic and both selections. It carries a warning when the epic has open blocks edges. bd marks every child of a blocked epic blocked, so no step of the run reaches bd ready until those edges close.
  • INCOMPLETE means the store-lock wait ran out, a bounded bd command passed its 120 s bound, or the call was canceled. It names the step reached and whether a pour was issued; inspect the run before retrying. mol pour, mol bond and gate resolve run without a time bound.

The whole start holds the beads store's embedded-write lock, so concurrent starts for a spec cannot pour duplicate runs. The lock module comes from this repository's shared library, and the plugin bundles it. The beads plugin bundles the same module, so the two take turns on the same lock file when both run. Pass root when the spec has several runs, or alone to resume a run: the tool reads the spec id from the root. Clarification, analysis, reviews, verification, tests and consequential safety confirmations stay required whatever the choice.

speckit_commit commits SpecKit artifacts. It takes only paths under specs/ and .specify/ (by default both) and refuses when a requested path lies outside them or the index already holds other files. It builds the commit in a private index (HEAD plus the working-tree state of those paths), checks the tree changes nothing else, commits that tree on top of HEAD and syncs the real index for those paths. It stores each file's bytes exactly as they are on disk, never through git add: no clean or process filter from .gitattributes runs and core.autocrlf converts nothing. Ignored files stay out, the exec bit sets the file mode, and a symlink is stored as its link text. A symlink that is absolute or climbs out of specs/ and .specify/, a path through a symlinked directory, a submodule and a nested repository are refused. After reading each file it checks the ancestors, the file's real path and its inode again, and refuses the commit if anything moved. That closes the practical race window, not a perfectly timed double swap: the tool guards against an agent's mistakes and casual misuse, not a hostile local process racing it. It never amends, and a concurrent move of HEAD makes it fail rather than overwrite the other commit. Every git call runs pinned to the workspace (git -C) without inherited repository selectors (GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE, object-store and GIT_CONFIG* variables), and it refuses before writing unless git resolves the workspace to itself.

No git hook of any kind runs (pre-commit, commit-msg, reference-transaction, post-index-change): the tool commits with plumbing, and every git call points core.hooksPath at an empty directory. That is the price of committing exactly the checked snapshot, so run the project's checks separately. The spec agent commits through it, since a shell git add or git commit pattern cannot keep its operands or options in bounds.

Guards and routes

All of them apply only where bd -C <repository> where finds a beads workspace, and fail open when it cannot run.

SurfaceBehavior
File writes of specs/*/tasks.mdRefused. OpenCode: edit, write and patch, including patch move destinations. Claude Code: Edit and Write. pi: edit and write, with an @ or ~ path read as pi reads it. The guard asks the target's own repository.
Shell writes of specs/*/tasks.mdRefused: redirects, tee, cp/mv destinations, sed -i, touch and similar, resolved against the call's working directory. Reads run.
Implement commandBecomes the beads route: work the task beads under the molecule's implement step. OpenCode rewrites the speckit-implement skill. pi rewrites a typed /speckit.implement or /skill:speckit-implement, and keeps the words after it. A read of the prompt or skill file returns the route too.
Analyze commandGets a beads preamble ahead of the upstream text. The preamble drops --require-tasks --include-tasks from the prerequisite script. It also says to read the task beads where the command reads tasks.md. The spec and plan analysis stays as upstream wrote it. OpenCode adds the preamble to the skill. pi sends it as a message with a typed /speckit.analyze, and adds it to a read of the prompt file.
speckit-taskstoissues, speckit-github-taskstoissuesRefused. OpenCode: the skill tool does not load them, and their content becomes the refusal. pi: a typed command stops and shows the refusal. A read of the file returns it.

Upstream writers the guard denies: speckit-tasks, speckit-converge (it appends a ## Phase N: Convergence section), and the bugfix, cleanup, iterate, reconcile and refine extensions.

On OpenCode, project skills load after plugins, so the skill transform registers again whenever a skill.updated event shows upstream content.

Workflow instructions

opencode/instructions/speckit-workflow.md holds the beads workflow contract and command routing. Its BEADS section has the agent run bd prime once per session and load speckit-ledger.

  • OpenCode: a session gets it in its system prompt when it has a SpecKit workspace (see Tools) at its first request. That decision holds for the whole session, also across a server restart. The system prompt stays the same, and the prompt cache of the provider holds. The two speckit subagents do not get it.
  • pi: every run in a SpecKit workspace gets it as the speckit_workflow system prompt section. pi sends only the sections that change. A section that appears after setup costs one patch message and keeps the prompt cache.
  • OpenCode and pi: a run that started without it and calls speckit_setup gets the text in the tool result.
  • Claude Code: gets no workflow text, because the text names the OpenCode and pi tools.

Agents

spec

spec drives one feature through SpecKit up to implementation:

  1. It checks for .specify/, the SpecKit commands and a beads workspace, and offers speckit_setup. Then it runs bd prime.
  2. It calls speckit_start and asks the routine-approval question.
  3. It follows the poured molecule and runs the upstream command of each phase. The tasks phase creates child beads of the implement step. Checklist, critique and security review run where the profile has them.
  4. It stops at the first step outside its boundary and hands those steps over by id. The implement step, later docs, checks and the final commit are outside it.

It has three entry paths: a new spec, a resume of an existing spec id or run root (no new number), and a verify-return that routes verification to speckit-verify.

On OpenCode it is a primary agent. It asks through the question tool, which parley takes over when its TUI is attached, and through tools.parley_ask for rounds of several questions.

BoundaryAllowed
Steps100
EditsAny file. Its prompt keeps it to spec artifacts, and commits go through speckit_commit, which stages only specs/ and .specify/
Shellbd (including the beads write-lock runner), specify, .specify/ scripts, and git status, diff, log, show, branch, rev-parse, ls-files, merge-base, switch. Branch deletion, renames and forced moves, and discarding or forced switches are denied.
Toolsread, grep, glob, LSP, question, execute (for parley_ask, speckit_setup, speckit_start), speckit_* (commits go through speckit_commit)
Skillsspeckit-* (this plugin's and spec-kit's), quality-*
Subagentsexplore, researcher, architect, speckit-verify, speckit-sync

Everything else is denied, including git push and web access. It writes spec artifacts and never implements product code; that boundary is its prompt's, not a permission.

It carries the strong model tier: the spec, plan and task breakdown decide what every implementer builds, and the agent writes no code, so its token volume stays small next to the implementation it directs.

Each location runs its own plugin instance, so with specAgent: "auto" the agent is listed (and in the primary-agent cycle) only in SpecKit repositories. A speckit_setup that creates .specify/ at the location registers it without a restart.

On pi it is a pi-subagents agent, from common/agents/spec.pi.md. Its own session loads this package's extension (subagentOnlyExtensions). It has the speckit_* tools, the guard and the workflow section even where the parent session does not load the package.

  • Tools: every pi file tool, edit and write included, plus bash, subagent, contact_supervisor and the three speckit_* tools.
  • Subagents: scout, researcher and architect, plus speckit-verify and speckit-sync.
  • Context: the repository's AGENTS.md and the skills catalog, so it can load speckit-ledger.
  • Questions go to the user through contact_supervisor. It ends with a report for its supervisor.

pi has no per-path edit or shell rules, so the boundary above is an instruction there. Only the tasks.md guard enforces part of it.

Subagents

AgentSpawn with
speckit-sync (steps 60)scope: drift / conflicts / both
speckit-verify (steps 60)mode: requirements / tasks / review

On OpenCode the two subagents are read-only (edits denied) and carry the reviewer model tier in request.headers.x-opencode-model-role. With the model-roles plugin they run on that tier's model, otherwise on the parent's. They pin no model. Both are hidden from the subagent catalog, since the formulas and the workflow instructions spawn them by id, and neither gets Code Mode. speckit-verify may load the quality-* skills, and speckit-sync only speckit-ledger.

On pi each has the file-reading tools and bash, from common/agents/<id>.pi.md, and no write tool. Both declare acceptanceRole: read-only, so pi-subagents asks them for no writer's acceptance report. pi-subagents saves the reply to <id>.md in the output directory of the run.

speckit-verify is composed by bun run build from agents.src/speckit-verify.md and the evidence and report parts of the shared review core (lib/src/review-core.md); edit the source, not agents/. Its reply starts with VERDICT: PASS|GAPS.

Formula steps that spawn them set execution_agent_type to the agent id, with execution_agent_mode or execution_agent_scope beside it. A spawn for such a step goes to that agent, and to no other.

The review steps (review, and code-review in speckit-feature) spawn speckit-verify with mode: review rather than spec-kit's review extension, which speckit_setup does not install. They route to this plugin's own agent, not delivery's pr-reviewer, so they work without the delivery plugin.

Skills

SkillUse when
speckit-setupBootstrap .specify/, extensions, beads and formulas, or start a spec where speckit_start is missing.
speckit-ledgerTurn a task breakdown into task beads under the implement step: the graph file's fields, a dry run, the create and the read-back. Also adding and changing tasks later.
speckit-bugfixFix a defect. For a tracked trail, bond mol-speckit-bugfix.

speckit-bugfix loads the quality-code-design skill from the quality plugin; without it the skill reports the missing guidance.

Formulas

  • Depth: speckit-basic, speckit-lean, speckit-feature
  • Bonds: mol-speckit-iterate, mol-speckit-fix-findings, mol-speckit-bugfix, mol-speckit-refine

Claude Code

Claude Code gets these parts:

  • the speckit-setup, speckit-ledger and speckit-bugfix skills, with the manual steps for setup and spec start
  • the speckit-sync and speckit-verify subagents
  • the formulas, under ${CLAUDE_PLUGIN_ROOT}/formulas/
  • the tasks.md guard, as a PreToolUse hook on Edit, Write and Bash, run by bun dist/claude-hook.js

These parts stay with OpenCode and pi:

  • the spec agent
  • the speckit_setup, speckit_start and speckit_commit tools
  • the command routes
  • the workflow instructions, which name those tools

Not ported

  • The omp tools/spec-start.ts CLI. Use speckit_start.
  • The beadsPlugin option. The lock implementation is bundled, so no installed beads package has to be found at runtime.

License

Apache-2.0