Skip to content

nexaedge/linear-spec-plugin

vv2

Spec-driven project execution pipeline backed by Linear. Same skills and agents as spec-plugin, but writes specs, stories and validation to Linear via GraphQL while keeping reasoning artifacts on disk.

Linear Spec Plugin

A Claude Code plugin for spec-driven project execution backed by Linear. Same skill set and agent team as spec-plugin, but the execution unit (specs, stories, validation reports) lives in Linear via the GraphQL API instead of on disk. Reasoning artifacts (briefings, ADRs, research, retrospectives, comms) stay where they belong — in your knowledge base.

For the disk-only flow, use spec-plugin instead. The two are designed to be installed independently.

Pipeline

/ideate → /architect → /plan → /orchestrate (per spec)
SkillPurpose
/ideateBuild a project specification through conversational refinement (disk)
/architectProject-level implementation approach (Project Document)
/planEvolutionary delivery roadmap → Initiative + Projects + Spec Issues
/orchestrateExecute a spec end-to-end with a coordinated agent team

The orchestrator runs a simple cycle per spec:

/architect-version → /build-stories → [ /execute-task → /validate-execution ]* → human signs off

A spec ships when the human confirms its Definition of Done is met.

What lives where

The plugin honors the boundary defined in linear-workflow/docs/approach.md (private):

ArtifactLocation
Briefing (<entity>.md)disk (knowledge base)
Project-level architectureLinear Project Document Architecture
Spec bodyLinear issue description (label type/spec)
Spec architectureLinear Project Document Spec vX.Y — Architecture
StoriesLinear sub-issues under the spec issue
Story execution logsLinear comments on the story sub-issue
Validation reportsLinear Project Document Spec vX.Y — Validation Report
Retrospectivesdisk (knowledge base), with a back-link comment on the spec issue
Research, decisions (ADRs), comms, contracts, people, resourcesdisk

Inputs: ID or text search

Skills that take a target accept either:

  • A Linear identifier matching ^[A-Z]{2,5}-\d+$ — e.g. DIN-142, used directly.
  • Free text — runs a search and presents the top matches via AskUserQuestion so you can pick.

/architect and /plan take projects/initiatives, not issues — same picker pattern.

Configuration

Required:

export LINEAR_API_KEY="lin_api_..."

Set this in ~/.zshenv.local so it is available to non-interactive shells too. Personal API keys are issued from Linear → Settings → API.

If you keep the key in 1Password (e.g. at op://Environments/Linear/credential), pull it on demand:

export LINEAR_API_KEY="$(op read op://Environments/Linear/credential)"

Agents

AgentRole
architectDeep-dive spec architecture. Writes Linear documents — no code.
product-ownerStory breakdown (creates sub-issues) and retrospectives (disk).
engineerTask execution — runs in a worktree, posts logs as comments.
designerVisual UI creation following the design system.
qaWrites validation specs and executes them. Reports failures — never fixes.

Agents that touch code call EnterWorktree as their first action to work on an isolated copy of the repo. Worktrees apply to code only — not to your knowledge-base directory, which is read/write directly.

All Skills

SkillDescription
/ideateProject spec through conversation (disk briefing)
/architectDeliverable architecture as Project Document
/planInitiative + projects + spec issues from a roadmap
/architect-versionSpec body in issue description; spec architecture as Project Document
/build-storiesSub-issues under the spec issue
/execute-taskComments + state transitions on a story sub-issue
/validate-executionValidation Report Project Document; comment on spec issue
/run-retrospectiveRetrospective on disk; back-link comment on the spec issue
/orchestrateFull spec execution with agent team

Bundled Linear scripts

The plugin ships a Node CLI in scripts/linear/ (zero dependencies, Node 18+ stdlib only). Skills invoke these scripts; you can also call them directly from your shell:

ScriptOperation
resolve-spec.js <id>Full context for a spec issue
search.js --type issue|project|initiative --query "..."Picker source
get-issue.js <id> [--with-comments] [--with-children]Read an issue
get-project.js <id> [--with-issues] [--with-documents]Read a project
list-sub-issues.js <parent>Children of an issue
list-documents.js <project> [--title-match <regex>]Find a doc by title
set-issue-description.js <id> (stdin = body)Replace description
post-comment.js <id> (stdin = body)Add a comment
transition-issue.js <id> --state "<name>"Move workflow state
create-sub-issue.js <parent> --title "..." (stdin = body)New sub-issue
create-issue.js --project <id> --team <key> --title "..." --label type/spec (stdin = body)New top-level issue
create-document.js --project <id> --title "..." (stdin = content)New Project Document
update-document.js <id> [--title "..."] (stdin = content)Replace doc content
create-project.js --team <key> --name "..." [--initiative <id>] (stdin = description)New deliverable project
create-initiative.js --name "..." (stdin = description)New initiative (OS)
set-project-description.js <id> (stdin = description)Replace project description

All scripts emit JSON to stdout on success and human messages to stderr on failure. Non-zero exit on error.

Worktree Isolation (code only)

Agents work in isolated git worktrees to avoid conflicts:

  1. Agent definitions instruct each agent to call EnterWorktree before doing any work
  2. Orchestrate skill provides worktree names in agent prompts
  3. PostToolUse hook on EnterWorktree runs scripts/setup-worktree.sh if it exists in your project

The plugin's agent hooks look for scripts/setup-worktree.sh in your project directory (not the plugin). If the file exists, it runs automatically after EnterWorktree to copy gitignored files into the worktree. Create one in your project like this:

#!/usr/bin/env bash
# scripts/setup-worktree.sh — runs via PostToolUse hook on EnterWorktree
set -euo pipefail

MAIN_REPO=$(git worktree list --porcelain | head -1 | sed 's/worktree //')
WORKTREE_DIR=$(pwd)

[ "$MAIN_REPO" = "$WORKTREE_DIR" ] && exit 0

for f in .env .env.local .tool-versions; do
  [ -f "$MAIN_REPO/$f" ] && [ ! -f "$WORKTREE_DIR/$f" ] && cp "$MAIN_REPO/$f" "$WORKTREE_DIR/$f"
done

exit 0

Installation

/plugin marketplace add nexaedge-marketplace --source github --repo nexaedge/nexaedge-marketplace
/plugin install linear-spec-plugin@nexaedge-marketplace

Optional Dependencies

  • /interface-design plugin — Required for designer agent stories.
  • Chrome DevTools MCP — Used by /validate-execution for browser-based validation.

Out of scope (v1)

  • Cycles and priorities — no auto-assignment; set them in Linear if you use them.
  • Reserved labels beyond type/spec — sub-issues and sub-tasks are unlabeled.
  • Migration from disk-based spec-plugin — manual replay; not automated.