Skip to content

ghcordeiro/spec-driven

v1.4.1CC-BY-4.0

Spec-Driven Development toolkit: drive features through Specify, Plan, Tasks and Implement with ADRs, C4 diagrams, RFCs, TDDs and code review wired in.

sdd

Spec-Driven Development toolkit for AI agents.

Install battle-tested SDD skills into Claude Code, Cursor, GitHub Copilot, Gemini CLI, Antigravity, and Kiro — in seconds.

npm version npm downloads CI License: MIT Node.js ≥22

npx @ghcordeiro/sdd

What is this?

sdd installs a curated set of AI agent skills for Spec-Driven Development — spec-driven planning, architecture documentation, ADR creation, C4 diagrams, code quality review, RFC writing, and more.

All skills are installed at once, as a single toolkit. No picking and choosing — just run, select your agent, and get to work.

Each skill is a self-contained SKILL.md file that gives your AI agent deep, specialized knowledge. Plain Markdown. No cloud dependency. No lock-in.


Quick Start

npx @ghcordeiro/sdd

The interactive CLI walks you through three steps:

──────────────────────────────────────────
 ◆ SDD
   Spec-Driven Development toolkit for AI agents
──────────────────────────────────────────

  step 1 of 3 · Select agents
  ━━━━━━━━━━━━━──────────────────────────

  Which AI agent(s) do you use?

  › ○  Claude Code
    ○  Cursor
    ○  GitHub Copilot
    ○  Gemini CLI
    ○  Antigravity
    ○  Kiro

  ↑↓ navigate  ·  space toggle  ·  a select all  ·  enter confirm

  step 2 of 3 · Install scope
  ━━━━━━━━━━━━━━━━━━━━━━━━━━─────────────

  Where should spec-driven be installed?

  › ◉  Global    available across all your projects
    ○  Local     this project only

  step 3 of 3 · Confirm
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  Ready to install spec-driven

  Agent  Gemini CLI
  Scope  Global
         ~/.gemini/skills

  › Enter to install     c to cancel

  ✓ spec-driven installed
  → ~/.gemini/skills

Non-interactive (scripts & CI)

npx @ghcordeiro/sdd install \
  --agent claude-code \
  --skills spec-driven \
  --global
FlagAliasDescription
--agent <id>-aTarget agent (see supported agents below)
--skills <ids>-sComma-separated skill IDs (e.g. spec-driven)
--globalInstall to home directory ~/ (default)
--localInstall to current project directory ./

You can always inspect the full CLI help with:

npx @ghcordeiro/sdd --help

Supported Agents

AgentIDGlobal install path
Claude Codeclaude-code~/.claude/skills/
Cursorcursor~/.cursor/skills/
GitHub Copilotgithub-copilot~/.github-copilot/skills/
Gemini CLIgemini-cli~/.gemini/skills/
Antigravityantigravity~/.antigravity/skills/
Kirokiro~/.kiro/skills/

Kiro Power (install from the repo link)

This repository is also a Kiro Power — no CLI needed:

  1. Open the Powers panel in Kiro
  2. Add Custom Power → Import power from GitHub
  3. Paste https://github.com/ghcordeiro/sdd and click Install

The power manifest is plugin.json at the repo root; the skill lives in skills/spec-driven/, and mcp.json adds the Context7 MCP server.


Learning & Companion Tools

Cross-project learnings

spec-driven learns how you work and carries it across projects. It keeps a plain Markdown file at ~/.sdd/LEARNINGS.md with your preferences, stack and code patterns, mistakes to avoid, and an index of your projects.

  • Read at the start of Specify, Plan, and when resuming work.
  • Written at every phase gate, whenever you correct the agent, and when a decision reflects a general preference.
  • Project-only memory stays in .specs/project/STATE.md.

The file needs no extra tooling, and it never stores secrets or credentials. Edit or delete entries any time.

Recommended companions

sdd detects these and shows how to install them. It never installs or configures them for you. The skill uses each one when it is available.

ToolWhat it addsInstall
agentmemoryAutomatic cross-session memory; the skill recalls and saves to it in addition to LEARNINGS.mdnpm i -g @agentmemory/agentmemory && agentmemory connect
RTKCompresses command output to cut token usagebrew install rtk && rtk init -g (see rtk init --help for other agents)
Context7Up-to-date library docs via MCP, used in Plan and ImplementSetup per client — already included in the Kiro Power
Playwright MCPBrowser automation for AC verification, mobile-web emulation and E2E testsclaude mcp add playwright -- npx @playwright/mcp@latest
mobile-mcpNative iOS/Android device control for verificationclaude mcp add mobile-mcp -- npx -y @mobilenext/mobile-mcp@latest
MaestroRepeatable mobile E2E flows in YAML; MCP via maestro mcpcurl -fsSL "https://get.maestro.mobile.dev" | bash

Skills Included

🧭 Built-in workflows (loaded on demand)

spec-driven is a small router: each workflow below is a separate file loaded only when its trigger fires. If your agent already has an equivalent skill (e.g. systematic-debugging, security-review, using-git-worktrees), the host skill is used instead and the sdd file is never loaded.

WorkflowFires when
Spec readiness checkBefore the Specify gate on Large/Complex features — a fresh subagent lists what a builder would still need to ask
Root-cause debuggingA bug, failing test, or unexpected behavior shows up
Security reviewA change touches auth, external input, secrets, crypto, payments, PII, paths, or shell/SQL
Branch & finishStart of Implement (branch/worktree + green baseline) and end of feature (PR, merge, keep, discard)
Parallel subagentstasks.md has independent "Parallel OK" tasks and the agent supports subagents
Review responsePR or reviewer comments arrive — each one is verified before it is applied
Learning loopPhase gates and corrections — see Learning & Companion Tools

🏗️ Planning & Architecture

SkillDescription
spec-drivenFull project & feature planning with 4 adaptive phases: Specify → Plan → Tasks → Implement. Orchestrates all other skills.
c4-architectGenerates C4 architecture diagrams (Context, Container, Component, Sequence) from source code using PlantUML.
frontend-component-architectEvaluates React/Angular component boundaries, API design quality, state ownership, and reuse opportunities.
technical-design-doc-creatorCreates comprehensive Technical Design Documents (TDDs) for implementation planning.

📋 Decision & Documentation

SkillDescription
create-adrCreates immutable Architecture Decision Records (ADRs) in MADR, Nygard, or Y-Statement format.
create-rfcCreates structured Request for Comments (RFCs) to drive stakeholder alignment before committing to a direction.

🔍 Code Quality

SkillDescription
code-quality-guardianReviews code for correctness, security, maintainability, and architecture fit — findings triaged as Critical / Warning / Suggestion.
duplication-hunterDetects exact and semantic code duplication and recommends low-risk shared abstractions with migration steps.
best-practicesAudits web projects for security misconfigurations, deprecated APIs, and modern code quality standards.

🌐 Web & Frontend

SkillDescription
seoOptimizes pages for search visibility — meta tags, structured data (JSON-LD), sitemaps, and crawlability.
accessibilityAudits and improves web accessibility following WCAG 2.1 AA guidelines.
playwrightVerifies web flows against acceptance criteria in Chromium, Firefox and WebKit, checks mobile web with device emulation, and writes E2E tests — via Playwright MCP.
mobileVerifies native iOS/Android apps (React Native, Expo, Flutter, Swift, Kotlin) on simulators, emulators or devices via mobile-mcp, and writes repeatable Maestro flows.
chrome-devtoolsBrowser debugging, performance profiling, and automation via Chrome DevTools.

⚙️ Tooling & Automation

SkillDescription
gh-fix-ciDiagnoses and fixes failing GitHub Actions CI checks by inspecting logs and drafting targeted fixes.
cursor-subagent-creatorCreates Cursor-specific AI subagents with isolated context for complex multi-step workflows.
skill-architectExpert guide for designing and building new AI agent skills from scratch.

Repository Structure

sdd/
├── plugin.json               # Kiro Power manifest (Agent Plugins format)
├── mcp.json                  # Kiro Power MCP servers (Context7)
├── skills/
│   └── spec-driven/          # the skill — SKILL.md + embedded toolkit/
├── packages/
│   └── cli/                  # @ghcordeiro/sdd — CLI publicado no npm
│       ├── src/              # TypeScript source (Ink + Commander)
│       └── build.mjs         # esbuild bundler script
├── libs/
│   └── core/                 # shared logic (catalog, installer, agent definitions)
├── .github/workflows/
│   ├── ci.yml                # type-check on every push to main
│   └── publish.yml           # semantic-release on push to main (npm Trusted Publishing)
├── package.json              # npm workspaces root
└── nx.json

Contributing

Adding a new skill

  1. Create a new directory under skills/<skill-name>/
  2. Add a SKILL.md with YAML frontmatter (name, description, license)
  3. Open a pull request — the skill is automatically included in the next release

Publishing a new version

# Preview release result locally (optional)
npm run release:dry-run

Releases are fully automated with semantic-release on every push to main. It automatically:

  • analyzes Conventional Commits (feat, fix, BREAKING CHANGE)
  • calculates the next version
  • updates packages/cli/package.json + package-lock.json + plugin.json (Kiro Power)
  • creates CHANGELOG.md
  • creates git tag + GitHub release
  • publishes @ghcordeiro/sdd to npm with provenance

Examples:

  • fix: ... → patch release
  • feat: ... → minor release
  • feat!: ... or BREAKING CHANGE: → major release

npm authentication — Trusted Publishing (OIDC)

There is no npm token in this repo. publish.yml authenticates to npm with Trusted Publishing: GitHub Actions exchanges a short-lived OIDC token with the registry on each run.

SettingValue
npm package → Settings → Trusted PublisherGitHub Actions · ghcordeiro/sdd · workflow publish.yml · environment npm · Allow npm publish
Workflow permissionid-token: write on the release job
GitHub environmentnpm (no secrets needed)
Toolingnpm ≥ 11.5.1 (the workflow upgrades it), semantic-release ≥ 25 / @semantic-release/npm ≥ 13

Rules:

  • Do not add NPM_TOKEN / NODE_AUTH_TOKEN, and do not set registry-url in actions/setup-node — both switch npm back to token auth.
  • The trusted publisher is bound to the filename publish.yml. Renaming the workflow or the npm environment breaks publishing until the npm setting is updated.
  • Publishing access can stay on "Require two-factor authentication and disallow bypass 2fa tokens" — trusted publishers keep working.

Recovering a release that tagged but did not publish

If semantic-release created the tag but npm publish failed, the next push will not retry it (the tag already exists). Publish the existing tag from Actions:

gh workflow run publish.yml -f tag=vX.Y.Z

This checks out the tag, publishes it to npm with provenance, and creates the GitHub release if missing.

Troubleshooting release

  • npm ci fails with lockfile mismatch:
    • run npm install locally to sync package-lock.json
    • commit package-lock.json before tagging
  • ENONPMTOKEN / EINVALIDNPMTOKEN / EOTP:
    • npm is not using OIDC — check the trusted publisher settings above and that no token or registry-url was added to the workflow
  • provenance/repository mismatch (E422):
    • ensure packages/cli/package.json repository.url points to the same GitHub repo used by Actions
  • publish workflow not triggered:
    • ensure commit was pushed to main
    • ensure commit follows Conventional Commits so semantic-release can determine a version bump

Inspiration & Credits

This project's spec-driven skill is inspired by prior work from the community and published references on Spec-Driven Development.

Original work

SDD references

Toolkit skill provenance

SkillCreditsGitHub sourceGitHub localLicense
accessibilityExternal (web-quality-skills), adapted locallyweb-accessibility upstreamsdd/accessibilityMIT
best-practicesExternal (web-quality-skills), adapted locallyweb-best-practices upstreamsdd/best-practicesMIT
c4-architectLocal author (ghcordeiro)—sdd/c4-architectCC-BY-4.0
playwrightLocal author (ghcordeiro)—sdd/playwrightCC-BY-4.0
mobileLocal author (ghcordeiro)—sdd/mobileCC-BY-4.0
chrome-devtoolsExternal (upstream match), adapted locallychrome-devtools upstreamsdd/chrome-devtoolsMIT
code-quality-guardianCredit undeclared in metadata; maintained locally—sdd/code-quality-guardianMIT
create-adrExternal (Tech Leads Club), adapted locallycreate-adr upstreamsdd/create-adrCC-BY-4.0
create-rfcExternal (Tech Leads Club), adapted locallycreate-rfc upstreamsdd/create-rfcCC-BY-4.0
cursor-subagent-creatorExternal (Tech Leads Club), adapted locallycursor-subagent-creator upstreamsdd/cursor-subagent-creatorCC-BY-4.0
duplication-hunterLocal author (ghcordeiro)—sdd/duplication-hunterCC-BY-4.0
frontend-component-architectLocal author (ghcordeiro)—sdd/frontend-component-architectCC-BY-4.0
gh-fix-ciExternal (Tech Leads Club), adapted locallygh-fix-ci upstreamsdd/gh-fix-ciApache-2.0
seoExternal (web-quality-skills), adapted locallyseo upstreamsdd/seoMIT
skill-architectExternal (Felipe Rodrigues / Tech Leads Club), adapted locallyskill-architect upstreamsdd/skill-architectCC-BY-4.0
technical-design-doc-creatorExternal (Tech Leads Club), adapted locallycreate-technical-design-doc upstreamsdd/technical-design-doc-creatorCC-BY-4.0

License

MIT — see LICENSE.

Individual skills may carry their own licenses — check each skill's directory for details.