@benjaminthomas/spec-driven-dev 0.0.0-stage → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +483 -2
- package/bin/cli.mjs +357 -0
- package/package.json +12 -4
- package/skills/generative-seo/SKILL.md +255 -0
- package/skills/generative-seo/assets/citation-log-template.md +17 -0
- package/skills/generative-seo/assets/competitor-analysis-template.md +20 -0
- package/skills/generative-seo/assets/content-plan-template.md +15 -0
- package/skills/generative-seo/assets/geo-config-template.md +33 -0
- package/skills/generative-seo/assets/geo-playbook-template.md +22 -0
- package/skills/generative-seo/assets/social-queue-template.md +8 -0
- package/skills/generative-seo/references/geo-methodology.md +143 -0
- package/skills/spec-checkpoint/SKILL.md +106 -0
- package/skills/spec-create/SKILL.md +149 -0
- package/skills/spec-create/references/action-required-template.md +53 -0
- package/skills/spec-create/references/readme-template.md +53 -0
- package/skills/spec-create/references/requirements-template.md +54 -0
- package/skills/spec-create/references/task-template.md +86 -0
- package/skills/spec-implement/SKILL.md +236 -0
- package/skills/spec-implement/references/coder-prompt-template.md +48 -0
- package/skills/spec-implement/references/fix-prompt-template.md +38 -0
- package/skills/spec-implement/references/review-prompt-template.md +50 -0
- package/skills/spec-investigate/SKILL.md +323 -0
- package/skills/spec-investigate/references/report-template.md +53 -0
- package/skills/spec-setup/SKILL.md +99 -0
- package/skills/spec-setup/references/config-template.yml +45 -0
- package/skills/spec-ship/SKILL.md +218 -0
- package/skills/spec-verify/SKILL.md +153 -0
- package/skills/spec-verify/references/report-template.md +57 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Competitor & Keyword Analysis
|
|
2
|
+
|
|
3
|
+
## Competitor landscape
|
|
4
|
+
|
|
5
|
+
| Competitor | Category term(s) they own | Notes |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| | | |
|
|
8
|
+
|
|
9
|
+
## Keyword gap map
|
|
10
|
+
|
|
11
|
+
| Query | Who ranks/is cited today | Should we contest it? |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| | | |
|
|
14
|
+
|
|
15
|
+
## Changelog
|
|
16
|
+
|
|
17
|
+
<!-- Append a dated entry each `competitors` run. Never delete prior entries. -->
|
|
18
|
+
|
|
19
|
+
### YYYY-MM-DD
|
|
20
|
+
-
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Content Plan
|
|
2
|
+
|
|
3
|
+
Status values: `todo`, `in-progress`, `blocked (reason)`, `shipped (YYYY-MM-DD)`.
|
|
4
|
+
|
|
5
|
+
## Phase 0 — foundation (blockers)
|
|
6
|
+
|
|
7
|
+
| Item | Target query | Status | Notes |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| | | todo | |
|
|
10
|
+
|
|
11
|
+
## Phase 1
|
|
12
|
+
|
|
13
|
+
| Item | Target query | Status | Notes |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| | | todo | |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
product_name:
|
|
3
|
+
brand_name:
|
|
4
|
+
domain:
|
|
5
|
+
framework:
|
|
6
|
+
marketing_pages_dir:
|
|
7
|
+
sitemap_mechanism:
|
|
8
|
+
robots_mechanism:
|
|
9
|
+
design_system_doc:
|
|
10
|
+
stats_source:
|
|
11
|
+
docs_dir: docs/seo
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Brand & naming notes
|
|
15
|
+
|
|
16
|
+
<!--
|
|
17
|
+
Free text. If the product is a sub-brand of a parent company, or the software
|
|
18
|
+
name differs from the company name, state the rule here explicitly, e.g.:
|
|
19
|
+
|
|
20
|
+
"Acme Corp is the parent company (a services agency). Acme Flow is the
|
|
21
|
+
product. Never write 'is Acme Corp free' or 'who is Acme Corp for' — the
|
|
22
|
+
software is Acme Flow; Acme Corp builds it. Correct brand uses: legal
|
|
23
|
+
operator, IP ownership, author/publisher credit."
|
|
24
|
+
|
|
25
|
+
If there's no distinction (company name == product name), just say so.
|
|
26
|
+
-->
|
|
27
|
+
|
|
28
|
+
# House style notes
|
|
29
|
+
|
|
30
|
+
<!--
|
|
31
|
+
Anything specific to how this project writes: tone, banned phrases, a
|
|
32
|
+
tagline that must appear consistently, units/currency conventions, etc.
|
|
33
|
+
-->
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# GEO Playbook — {{product_name}}
|
|
2
|
+
|
|
3
|
+
Filled in from `geo-config.md` and `references/geo-methodology.md` in the
|
|
4
|
+
generative-seo skill. This file is the project-specific source of truth — the
|
|
5
|
+
skill's reference file has the general evidence; this one has what this project
|
|
6
|
+
has decided to do about it.
|
|
7
|
+
|
|
8
|
+
## Category / positioning
|
|
9
|
+
|
|
10
|
+
<!-- What category term is this project trying to own? What's the one-line
|
|
11
|
+
differentiator vs the obvious alternatives? -->
|
|
12
|
+
|
|
13
|
+
## Content rules specific to this project
|
|
14
|
+
|
|
15
|
+
<!-- Start from SKILL.md's non-negotiable rules; add anything specific here
|
|
16
|
+
(e.g. "always include a pricing comparison table", "never use the word X"). -->
|
|
17
|
+
|
|
18
|
+
## What's proven vs still a hypothesis
|
|
19
|
+
|
|
20
|
+
<!-- Track which tactics this project has actually validated (ranked, got
|
|
21
|
+
cited, drove signups) vs ones still being tried. Update after each `report`
|
|
22
|
+
or `citations` run. -->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Social Distribution Queue
|
|
2
|
+
|
|
3
|
+
Drafts only — nothing here gets posted automatically. Review, edit into your own
|
|
4
|
+
voice, paste, then flip the status marker.
|
|
5
|
+
|
|
6
|
+
Status markers: `[ ] queued` → `[x] posted YYYY-MM-DD <URL>` or `[-] skipped`.
|
|
7
|
+
|
|
8
|
+
<!-- Append a new dated H2 per `social` run. Never overwrite prior entries. -->
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# GEO Methodology Reference
|
|
2
|
+
|
|
3
|
+
The evidence behind the rules in SKILL.md, and the full technical checklist for
|
|
4
|
+
`audit` mode. Read this once per project before the first `audit` or `content`
|
|
5
|
+
run; the summary in SKILL.md is enough for later runs.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
1. [The evidence](#the-evidence)
|
|
10
|
+
2. [Technical checklist](#technical-checklist)
|
|
11
|
+
3. [Sitemap / robots by framework](#sitemap--robots-by-framework)
|
|
12
|
+
4. [JSON-LD schema types](#json-ld-schema-types)
|
|
13
|
+
5. [AI-crawler allowlist](#ai-crawler-allowlist)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## The evidence
|
|
18
|
+
|
|
19
|
+
**Answer-first placement.** Research on what generative engines (AI Overviews,
|
|
20
|
+
ChatGPT search, Perplexity) actually quote found citations skew heavily toward
|
|
21
|
+
early-page content — a large share of cited passages come from roughly the first
|
|
22
|
+
third of the page. Practical takeaway: don't bury the direct answer under a long
|
|
23
|
+
intro, definitions section, or history lesson. State it, then elaborate.
|
|
24
|
+
|
|
25
|
+
**Statistics and quotable lines.** Studies analyzing what content gets cited by
|
|
26
|
+
AI answer engines (Princeton's GEO paper; independent studies from SEO tooling
|
|
27
|
+
vendors) found that adding concrete statistics, direct quotes, and citations to
|
|
28
|
+
sources measurably increases the odds a passage gets pulled into an AI-generated
|
|
29
|
+
answer — reported lifts in the 30–40%+ range for visibility, depending on the
|
|
30
|
+
study and baseline. This is the single highest-leverage on-page lever available.
|
|
31
|
+
|
|
32
|
+
**Extractable structure.** AI engines assemble answers from passages, not whole
|
|
33
|
+
pages. Content that mirrors how people actually ask ("How do I…", "What is…",
|
|
34
|
+
"X vs Y") in H2/H3 headings, uses genuine Q&A blocks, comparison tables, and a
|
|
35
|
+
TL;DR/summary block gets extracted more cleanly than prose that requires reading
|
|
36
|
+
top-to-bottom to make sense.
|
|
37
|
+
|
|
38
|
+
**Self-contained passages.** Because retrieval is passage-level, a section that
|
|
39
|
+
depends on context from three paragraphs earlier ("as mentioned above...") reads
|
|
40
|
+
as incomplete when lifted alone — which is exactly how it will be consumed.
|
|
41
|
+
|
|
42
|
+
**Freshness signals.** Visible author, published date, and last-updated date are
|
|
43
|
+
both a trust signal to AI crawlers and a genuine correctness signal — stale
|
|
44
|
+
numbers get corrected by AI engines using other sources instead. Re-verify and
|
|
45
|
+
refresh anything older than about 6 months, especially anything with a number
|
|
46
|
+
in it.
|
|
47
|
+
|
|
48
|
+
**Structured Q&A + schema.** `FAQPage` JSON-LD gives engines an unambiguous,
|
|
49
|
+
pre-parsed question/answer pair to lift verbatim — lower effort for the engine
|
|
50
|
+
than extracting an answer from prose, which matters when the engine is choosing
|
|
51
|
+
between two similarly good sources.
|
|
52
|
+
|
|
53
|
+
**What has weak or no proven effect (don't over-invest):** `llms.txt` files and
|
|
54
|
+
generic schema markup are commonly recommended but have thin independent
|
|
55
|
+
evidence of directly causing AI-citation lift — treat them as cheap hygiene
|
|
56
|
+
(an hour of work, do it once) rather than a strategy. The actual strategy is the
|
|
57
|
+
content quality levers above, plus off-site signals (third-party mentions in
|
|
58
|
+
roundups/directories/forums/video) and fast technical indexing.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Technical checklist
|
|
63
|
+
|
|
64
|
+
Run through all of these for `audit` mode; report failures with file:line.
|
|
65
|
+
|
|
66
|
+
1. **Sitemap** includes every indexable page with an honest `lastModified`;
|
|
67
|
+
excludes anything robots disallows; no auth-gated URLs. See framework map below.
|
|
68
|
+
2. **Robots** disallows app/API/auth routes; explicitly allows AI-answer-engine
|
|
69
|
+
bots (see allowlist below) unless the user has a specific reason to block
|
|
70
|
+
AI training/retrieval (rare — confirm before ever adding a disallow for these).
|
|
71
|
+
3. Every marketing/content page has: unique `title` (not duplicating a sitewide
|
|
72
|
+
template), unique `description` (~140–160 chars), a canonical URL, and
|
|
73
|
+
OG + Twitter/X card metadata.
|
|
74
|
+
4. JSON-LD present and valid — see schema-type table below.
|
|
75
|
+
5. `llms.txt` in the site root — a markdown index of key pages with one-line
|
|
76
|
+
descriptions. Low proven impact; still a cheap one-time hedge (see evidence
|
|
77
|
+
section — don't over-invest beyond the first pass).
|
|
78
|
+
6. All public content is server-rendered or otherwise present in the initial
|
|
79
|
+
HTML response — many AI crawlers don't execute JavaScript, so client-only
|
|
80
|
+
marketing copy is invisible to them.
|
|
81
|
+
7. **Live checks**: fetch `/robots.txt`, `/sitemap.xml` (or the framework's
|
|
82
|
+
equivalent), `/llms.txt`, and the homepage on the live domain — confirm they
|
|
83
|
+
match the repo and return 200; spot-check that sitemap URLs resolve.
|
|
84
|
+
8. Heading hygiene: exactly one H1 per page; H2s phrased as the questions the
|
|
85
|
+
page targets, where the page targets a specific query.
|
|
86
|
+
9. Internal linking: every content page links to its category/pillar page and
|
|
87
|
+
vice versa; pillar pages link out to their spokes.
|
|
88
|
+
10. Core Web Vitals sanity: no oversized unoptimized images (use the framework's
|
|
89
|
+
image component if it has one), no obvious layout shift from late-loading
|
|
90
|
+
content, no render-blocking resources that are trivially deferrable.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Sitemap / robots by framework
|
|
95
|
+
|
|
96
|
+
Confirm the actual files in the repo before assuming — frameworks change these
|
|
97
|
+
mechanisms across versions.
|
|
98
|
+
|
|
99
|
+
| Framework | Sitemap | Robots | Metadata |
|
|
100
|
+
|---|---|---|---|
|
|
101
|
+
| Next.js (App Router) | `app/sitemap.ts` (dynamic) or `public/sitemap.xml` | `app/robots.ts` or `public/robots.txt` | `generateMetadata` / static `metadata` export per route; root `metadataBase` in root layout |
|
|
102
|
+
| Astro | `@astrojs/sitemap` integration (generates at build) or manual `public/sitemap.xml` | `public/robots.txt` | Per-page `<head>` in `.astro` files, or a shared `<SEO>` component |
|
|
103
|
+
| Remix / React Router | A resource route returning XML (e.g. `app/routes/sitemap[.]xml.tsx`) | A resource route or `public/robots.txt` | `meta` export per route |
|
|
104
|
+
| SvelteKit | `src/routes/sitemap.xml/+server.ts` | `static/robots.txt` | `<svelte:head>` per page |
|
|
105
|
+
| Plain static site | Hand-maintained or generated `sitemap.xml` at the root | `robots.txt` at the root | Per-HTML-file `<head>` tags |
|
|
106
|
+
| WordPress / Webflow / other CMS | Usually auto-generated by an SEO plugin (Yoast, RankMath) or the platform itself | Same — check the plugin/platform settings, don't hand-edit generated files | Plugin-managed fields per page/post |
|
|
107
|
+
|
|
108
|
+
If none of these match, ask the user rather than guessing — inventing a
|
|
109
|
+
mechanism that doesn't fit the framework produces code that won't build.
|
|
110
|
+
|
|
111
|
+
## JSON-LD schema types
|
|
112
|
+
|
|
113
|
+
| Page type | Schema | Notes |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| Every page (sitewide, once) | `Organization` | Name, logo, sameAs (social profiles) |
|
|
116
|
+
| Homepage / pricing (for a product) | `SoftwareApplication` + `Offer` | Only if the product genuinely is software with a price; don't force this onto a services business |
|
|
117
|
+
| Any page with a real FAQ | `FAQPage` | Must match the visible on-page Q&A exactly — don't add schema for content that isn't rendered |
|
|
118
|
+
| Blog / article content | `Article` + `author` + `datePublished` + `dateModified` | Keep `dateModified` in sync with the visible "last updated" date |
|
|
119
|
+
| Blog / article content | `BreadcrumbList` | Only where there's a real breadcrumb trail |
|
|
120
|
+
| Ranked list/roundup content | `ItemList` | For "best X" style pages |
|
|
121
|
+
|
|
122
|
+
Sanitize any inline JSON-LD script against injection if the data includes
|
|
123
|
+
user-controlled or dynamic strings (e.g. `JSON.stringify(data).replace(/</g,
|
|
124
|
+
"\\u003c")` in a Node/JS context) — this is standard defensive practice for
|
|
125
|
+
inlining JSON into HTML, not framework-specific.
|
|
126
|
+
|
|
127
|
+
## AI-crawler allowlist
|
|
128
|
+
|
|
129
|
+
Bot user-agents to explicitly allow in `robots.txt` (or the framework's robots
|
|
130
|
+
mechanism) so AI answer engines can retrieve and potentially cite the content —
|
|
131
|
+
disallowing these is usually the opposite of what a project pursuing AI-search
|
|
132
|
+
visibility wants:
|
|
133
|
+
|
|
134
|
+
- `OAI-SearchBot`, `ChatGPT-User`, `GPTBot` (OpenAI)
|
|
135
|
+
- `ClaudeBot`, `Claude-SearchBot`, `Claude-User` (Anthropic)
|
|
136
|
+
- `PerplexityBot`, `Perplexity-User` (Perplexity)
|
|
137
|
+
- `Bingbot`, `Google-Extended` (Microsoft/Google AI training + retrieval)
|
|
138
|
+
- `CCBot` (Common Crawl — feeds many downstream AI training sets)
|
|
139
|
+
|
|
140
|
+
If the user has an explicit reason to keep content out of AI training data
|
|
141
|
+
(e.g. a paywalled or licensed-content business model), confirm before adding
|
|
142
|
+
these — the default recommendation is "allow all" for anyone wanting AI-search
|
|
143
|
+
visibility, but that's not universal.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-checkpoint
|
|
3
|
+
description: >
|
|
4
|
+
Create a comprehensive checkpoint commit with detailed analysis of all changes. Use this skill
|
|
5
|
+
when the user says "checkpoint", "commit everything", "save my progress", "create a commit",
|
|
6
|
+
or wants to stage and commit all current changes with a well-crafted message. Also use when
|
|
7
|
+
the user says "/spec-checkpoint" (or their host's equivalent invocation syntax) or asks to
|
|
8
|
+
snapshot current work. This skill stages all changes and creates a descriptive commit — it
|
|
9
|
+
does not push.
|
|
10
|
+
license: MIT
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Checkpoint Commit
|
|
14
|
+
|
|
15
|
+
Create a checkpoint commit that captures all current changes — but only after the code passes lint, type check, and build.
|
|
16
|
+
|
|
17
|
+
## Project config (read first)
|
|
18
|
+
|
|
19
|
+
Load `.spec-driven.yml`: walk up from the current directory to the home folder, and the first one
|
|
20
|
+
found wins (a `multi-repo` config only applies inside the repos it lists). Its values beat anything
|
|
21
|
+
you would detect or assume. This skill uses `commands` (lint/typecheck/test/build), `git.commit_style`, and `layout`/`repos`.
|
|
22
|
+
|
|
23
|
+
**Multi-repo:** run this in every listed repo that has changes, making one commit per repo with the same subject. **Monorepo:** run the checks for the packages that changed, or the root commands if that's how the repo works.
|
|
24
|
+
|
|
25
|
+
**No config?** If the `spec-setup` skill is available, run it first, then continue here. If it
|
|
26
|
+
isn't, detect what this skill needs from the repo, ask about anything ambiguous, and offer to save
|
|
27
|
+
the answers to `.spec-driven.yml` (keys: `layout`, `repos`, `tracker`, `git`, `commands`,
|
|
28
|
+
`specs_dir`).
|
|
29
|
+
|
|
30
|
+
## Instructions
|
|
31
|
+
|
|
32
|
+
### Step 1: Analyze Changes
|
|
33
|
+
|
|
34
|
+
Run these commands to understand the full picture:
|
|
35
|
+
|
|
36
|
+
1. `git status` — see all tracked and untracked files
|
|
37
|
+
2. `git diff` — see detailed changes in tracked files
|
|
38
|
+
3. `git diff --cached` — see already-staged changes
|
|
39
|
+
4. `git log -5 --oneline` — understand this repo's commit message style
|
|
40
|
+
|
|
41
|
+
### Step 2: Quality Checks
|
|
42
|
+
|
|
43
|
+
Use `commands` from `.spec-driven.yml`. For any that are missing, find the repo's own lint, typecheck, test, and build commands — `package.json` scripts (with the
|
|
44
|
+
repo's package manager), `Makefile`, `pyproject.toml`, `Cargo.toml`, CI config, or `CLAUDE.md`/
|
|
45
|
+
`AGENTS.md`. Run each one the repo has; skip (and say so) any it doesn't. If any fail, fix the
|
|
46
|
+
issues before proceeding — do not skip or ignore failures.
|
|
47
|
+
|
|
48
|
+
Iterate until every check passes cleanly. Only then move to the next step.
|
|
49
|
+
|
|
50
|
+
### Step 3: Stage Everything
|
|
51
|
+
|
|
52
|
+
Stage all changes — tracked modifications, deletions, and new untracked files:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
git add -A
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Then review `git status` again. If anything staged looks like it could hold secrets —
|
|
59
|
+
`.env*`, `*.pem`, `*_rsa`, `credentials.json`, `secrets.*`, or an unfamiliar filename that might
|
|
60
|
+
contain an API key — unstage it (`git restore --staged <file>`) and tell the user what was
|
|
61
|
+
excluded and why, rather than committing it silently. Don't rely on the filename alone for
|
|
62
|
+
anything you don't recognize; skim its diff if you're unsure.
|
|
63
|
+
|
|
64
|
+
### Step 4: Craft the Commit Message
|
|
65
|
+
|
|
66
|
+
Write a commit message in the config's `git.commit_style` (`conventional` → `feat: …`, `ticket` → `STP-123: …` using the ticket ID from the branch name, `freeform`). Without config, follow the project's existing conventions (observed from `git log`). Structure:
|
|
67
|
+
|
|
68
|
+
- **First line**: clear, concise summary in imperative mood (50-72 chars)
|
|
69
|
+
- Use conventional commit prefixes where the project uses them: `feat:`, `fix:`, `refactor:`, `docs:`, `chore:`, etc.
|
|
70
|
+
- **Body** (separated by blank line): a short TL;DR of the changes — 1-3 sentences max. No bullet lists, no file-by-file breakdowns, no lengthy explanations.
|
|
71
|
+
- **Footer**: co-author attribution, naming whichever agent/model is actually running this
|
|
72
|
+
skill — never hardcode a specific vendor or model name, since this skill runs under many
|
|
73
|
+
different hosts
|
|
74
|
+
|
|
75
|
+
### Step 5: Commit
|
|
76
|
+
|
|
77
|
+
Create the commit using a heredoc for proper formatting:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
git commit -m "$(cat <<'EOF'
|
|
81
|
+
{first line}
|
|
82
|
+
|
|
83
|
+
{tldr}
|
|
84
|
+
|
|
85
|
+
Co-Authored-By: {agent name} <noreply@example.com>
|
|
86
|
+
EOF
|
|
87
|
+
)"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Fill in `{agent name}` with whatever the current agent/model actually identifies as (e.g. "Claude", "Codex", "Cursor Agent") — if your host has no clean way to identify itself, omit the footer entirely rather than guessing.
|
|
91
|
+
|
|
92
|
+
### Step 6: Report
|
|
93
|
+
|
|
94
|
+
Display:
|
|
95
|
+
- The commit hash and message summary
|
|
96
|
+
- Files changed count
|
|
97
|
+
- Insertions/deletions summary
|
|
98
|
+
|
|
99
|
+
## Important
|
|
100
|
+
|
|
101
|
+
- Stage and commit everything except files that look like secrets or credentials (see Step 3) — check contents, not just filenames, before assuming something is safe to commit
|
|
102
|
+
- If the repo has no git history, run `git init` first
|
|
103
|
+
- All quality checks (lint, type-check, build) MUST pass before committing — fix issues, don't skip them
|
|
104
|
+
- Keep the commit body short — a TL;DR, not an essay
|
|
105
|
+
- Follow the project's existing commit conventions (check the log first)
|
|
106
|
+
- Do not push — only commit locally
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-create
|
|
3
|
+
description: >
|
|
4
|
+
Create a structured feature specification with self-contained task files organized into
|
|
5
|
+
parallel execution batches. Use this skill when the user says "create a spec", "plan this feature",
|
|
6
|
+
"write up an implementation plan", "break this into tasks", or after any planning conversation
|
|
7
|
+
where the user wants to capture decisions as actionable spec files. Also use when the user
|
|
8
|
+
says "/spec-create" (or their host's equivalent invocation syntax) or wants to decompose a
|
|
9
|
+
feature into work items that agents can implement independently. This skill produces local
|
|
10
|
+
spec files under specs/{feature}/ — no GitHub integration.
|
|
11
|
+
license: MIT
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Create Feature Specification
|
|
15
|
+
|
|
16
|
+
Transform a planning conversation into a structured spec folder that enables parallel agent implementation. The spec breaks a feature into self-contained task files — each one detailed enough that a coder agent can pick it up cold and implement it without reading anything else.
|
|
17
|
+
|
|
18
|
+
The key insight: implementation plans that live in a single file are either too large for a context window or too shallow for independent execution. By splitting into one file per task with full context in each, we enable multiple agents to work in parallel while keeping each agent's context focused.
|
|
19
|
+
|
|
20
|
+
## Project config (read first)
|
|
21
|
+
|
|
22
|
+
Load `.spec-driven.yml`: walk up from the current directory to the home folder, and the first one
|
|
23
|
+
found wins (a `multi-repo` config only applies inside the repos it lists). Its values beat anything
|
|
24
|
+
you would detect or assume. This skill uses `layout`/`repos` and `specs_dir`.
|
|
25
|
+
|
|
26
|
+
**Monorepo / multi-repo:** every task names its package or repo, and its file paths are relative to that. Keep each task inside one repo. Cross-repo work becomes separate tasks, with the contract (API shape, event, schema) written into both.
|
|
27
|
+
|
|
28
|
+
**No config?** If the `spec-setup` skill is available, run it first, then continue here. If it
|
|
29
|
+
isn't, detect what this skill needs from the repo, ask about anything ambiguous, and offer to save
|
|
30
|
+
the answers to `.spec-driven.yml` (keys: `layout`, `repos`, `tracker`, `git`, `commands`,
|
|
31
|
+
`specs_dir`).
|
|
32
|
+
|
|
33
|
+
## When to Use
|
|
34
|
+
|
|
35
|
+
- After a planning conversation where requirements and technical details have been discussed
|
|
36
|
+
- When the user asks to create a spec, plan a feature, or break work into tasks
|
|
37
|
+
- When the user wants to prepare work for parallel agent implementation
|
|
38
|
+
|
|
39
|
+
## Instructions
|
|
40
|
+
|
|
41
|
+
### Step 1: Gather Requirements
|
|
42
|
+
|
|
43
|
+
If a `{specs_dir}/*/investigation.md` (default `specs/`) from `spec-investigate` exists for this work, read it first and treat it as the evidence base: carry its VERIFIED facts, affected files, risks, and acceptance criteria into the spec, reuse its folder (`specs/{feature-slug}/`) instead of naming a new one in Step 2, and turn its open questions/UNKNOWNs into items for the user or `action-required.md` rather than guessing.
|
|
44
|
+
|
|
45
|
+
If the conversation already contains planning context (requirements discussed, technical decisions made, architecture outlined), extract all of it. Review the entire conversation to ensure nothing is lost — the spec is the single source of truth, and anything not captured here disappears.
|
|
46
|
+
|
|
47
|
+
If no planning conversation exists, interview the user:
|
|
48
|
+
- What does this feature do and why does it matter?
|
|
49
|
+
- What are the acceptance criteria?
|
|
50
|
+
- What technical constraints or decisions have been made?
|
|
51
|
+
- What files, APIs, schemas, or patterns are involved?
|
|
52
|
+
|
|
53
|
+
### Step 2: Name the Feature
|
|
54
|
+
|
|
55
|
+
Choose a kebab-case name that clearly identifies the feature (e.g., `add-user-auth`, `migrate-to-postgres`, `dashboard-redesign`). This becomes the folder name under `specs/`.
|
|
56
|
+
|
|
57
|
+
### Step 3: Decompose into Tasks
|
|
58
|
+
|
|
59
|
+
Break the implementation into atomic tasks. Each task should:
|
|
60
|
+
- Be completable in a single coding session by one agent
|
|
61
|
+
- Have a clear, specific scope (one concern per task)
|
|
62
|
+
- Produce working, testable code when complete
|
|
63
|
+
- Not overlap in files modified with other tasks in the same batch
|
|
64
|
+
|
|
65
|
+
Think carefully about granularity. Too coarse and agents can't work in parallel. Too fine and the overhead of context-switching between tasks dominates. A good task typically creates or modifies 1-5 files around a single concern.
|
|
66
|
+
|
|
67
|
+
Tests ship with the code they cover: fill in each task's **Tests** section (see the task template) instead of creating separate "write tests" tasks. Only add a standalone testing task for cross-cutting suites (e.g. a new E2E harness) or when the user asks for one.
|
|
68
|
+
|
|
69
|
+
### Step 4: Build the Dependency Graph
|
|
70
|
+
|
|
71
|
+
For each task, identify:
|
|
72
|
+
- **What it depends on**: which tasks must complete before this one can start
|
|
73
|
+
- **What depends on it**: which tasks are blocked until this one finishes
|
|
74
|
+
|
|
75
|
+
Tasks with no dependencies form Batch 1. Tasks whose dependencies are all in Batch 1 form Batch 2. And so on. All tasks within a batch can execute in parallel.
|
|
76
|
+
|
|
77
|
+
When assigning batches, verify that tasks within the same batch do not modify overlapping files. If two tasks in the same batch would touch the same file, move one to a later batch — parallel agents on the same branch cannot safely modify the same file.
|
|
78
|
+
|
|
79
|
+
### Step 5: Create the Spec Folder
|
|
80
|
+
|
|
81
|
+
Create the following structure at `specs/{feature-name}/`:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
specs/{feature-name}/
|
|
85
|
+
├── README.md
|
|
86
|
+
├── requirements.md
|
|
87
|
+
├── action-required.md
|
|
88
|
+
└── tasks/
|
|
89
|
+
├── task-01-{name}.md
|
|
90
|
+
├── task-02-{name}.md
|
|
91
|
+
└── ...
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Read the templates in `references/` before writing each file:
|
|
95
|
+
- `references/readme-template.md` — for the README (dependency graph, batch table, status tracking)
|
|
96
|
+
- `references/task-template.md` — for each task file (self-contained with all context)
|
|
97
|
+
- `references/requirements-template.md` — for the requirements document
|
|
98
|
+
- `references/action-required-template.md` — for manual human steps
|
|
99
|
+
|
|
100
|
+
Task files are numbered with zero-padded two-digit prefixes in topological order: Batch 1 tasks first, then Batch 2, etc. Within a batch, order is arbitrary but stable.
|
|
101
|
+
|
|
102
|
+
### Step 6: Write Self-Contained Task Files
|
|
103
|
+
|
|
104
|
+
This is the most important step. Each task file is the **only thing** a coder agent will read before implementing. It must contain everything the agent needs:
|
|
105
|
+
|
|
106
|
+
- **Description**: what to build and why it matters in context
|
|
107
|
+
- **Dependency context**: what prior tasks produce that this task needs (summarized in prose, not just filenames). The agent should not need to read other task files.
|
|
108
|
+
- **Technical details**: CLI commands, code snippets, schemas, file paths, env vars, API endpoints — every implementation-specific detail from the planning conversation
|
|
109
|
+
- **Files to create/modify**: explicit list with purpose for each
|
|
110
|
+
- **Acceptance criteria**: specific, verifiable conditions
|
|
111
|
+
|
|
112
|
+
Review each task file with fresh eyes: could an agent who has never seen the planning conversation implement this correctly using only this file? If not, add what's missing.
|
|
113
|
+
|
|
114
|
+
### Step 7: Extract Manual Actions
|
|
115
|
+
|
|
116
|
+
Identify any steps that require human action (account creation, API key setup, DNS configuration, environment variables, third-party service registration, etc.). Write these to `action-required.md` grouped by timing (Before/During/After implementation). If none exist, note "No manual steps required."
|
|
117
|
+
|
|
118
|
+
### Step 8: Report to User
|
|
119
|
+
|
|
120
|
+
After creating the spec, display:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
Feature specification created at specs/{feature-name}/
|
|
124
|
+
|
|
125
|
+
Files created:
|
|
126
|
+
- README.md (dependency graph, {N} batches, {T} tasks)
|
|
127
|
+
- requirements.md
|
|
128
|
+
- action-required.md
|
|
129
|
+
- tasks/ ({T} task files)
|
|
130
|
+
|
|
131
|
+
Batch breakdown:
|
|
132
|
+
- Batch 1: {count} tasks (parallel) — {brief description}
|
|
133
|
+
- Batch 2: {count} tasks (parallel) — {brief description}
|
|
134
|
+
- ...
|
|
135
|
+
|
|
136
|
+
Next steps:
|
|
137
|
+
1. Review action-required.md for tasks you need to complete manually
|
|
138
|
+
2. Review the requirements and task files
|
|
139
|
+
3. Use /spec-implement to start parallel implementation
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Critical Rules
|
|
143
|
+
|
|
144
|
+
- Every task file must be fully self-contained — this is the entire point of the spec structure. A coder agent reading only that file must know exactly what to do.
|
|
145
|
+
- Capture ALL technical details from the planning conversation. The spec is the single source of truth — CLI commands, schemas, code snippets, file paths, env vars, API endpoints. Anything not captured here is lost.
|
|
146
|
+
- Tasks within the same batch must not modify overlapping files. Parallel agents on the same branch cannot safely touch the same files.
|
|
147
|
+
- Keep tasks atomic — one concern per task. If a task has more than 5-7 files to modify, consider splitting it.
|
|
148
|
+
- Put tests in each task's Tests section, not in separate testing tasks (unless the user asks, or it's a cross-cutting suite).
|
|
149
|
+
- Number task files in topological order (batch 1 first, then batch 2, etc.) for easy scanning.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Action Required Template
|
|
2
|
+
|
|
3
|
+
Use this structure for the action-required.md at the root of each spec folder. This file captures manual steps that require human action and cannot be automated by agents.
|
|
4
|
+
|
|
5
|
+
## Template (when manual steps exist)
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Action Required: {Feature Name}
|
|
9
|
+
|
|
10
|
+
Manual steps that must be completed by a human. These cannot be automated.
|
|
11
|
+
|
|
12
|
+
## Before Implementation
|
|
13
|
+
|
|
14
|
+
- [ ] **{Action}** — {Brief reason why this is needed}
|
|
15
|
+
- [ ] **{Action}** — {Brief reason}
|
|
16
|
+
|
|
17
|
+
## During Implementation
|
|
18
|
+
|
|
19
|
+
- [ ] **{Action}** — {Brief reason}
|
|
20
|
+
|
|
21
|
+
## After Implementation
|
|
22
|
+
|
|
23
|
+
- [ ] **{Action}** — {Brief reason}
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
> These tasks are also referenced in context within the relevant task files.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Template (when no manual steps exist)
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
# Action Required: {Feature Name}
|
|
34
|
+
|
|
35
|
+
No manual steps required for this feature. All tasks can be implemented automatically.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Common Manual Steps
|
|
39
|
+
|
|
40
|
+
- Account creation (third-party services, OAuth apps)
|
|
41
|
+
- API key generation and setup
|
|
42
|
+
- Environment variable configuration
|
|
43
|
+
- DNS or domain settings
|
|
44
|
+
- Billing or subscription setup
|
|
45
|
+
- Third-party service registration (webhooks, integrations)
|
|
46
|
+
- Certificate provisioning
|
|
47
|
+
- Access permissions or IAM roles
|
|
48
|
+
|
|
49
|
+
## Key Points
|
|
50
|
+
|
|
51
|
+
- Group actions by timing: before, during, and after implementation. This helps the user know when they need to act.
|
|
52
|
+
- Keep descriptions brief — one line explaining what to do and why.
|
|
53
|
+
- Also reference these manual steps in the relevant task files so agents know to pause or skip that part.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# README Template
|
|
2
|
+
|
|
3
|
+
Use this structure for the README.md at the root of each spec folder. The README serves as the orchestration index — the `spec-implement` skill reads it to determine batch order, task assignments, and completion status.
|
|
4
|
+
|
|
5
|
+
## Template
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# {Feature Name}
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
{One paragraph summary of what the feature does and why it exists.}
|
|
13
|
+
|
|
14
|
+
## Quick Links
|
|
15
|
+
|
|
16
|
+
- [Requirements](./requirements.md) — full requirements and acceptance criteria
|
|
17
|
+
- [Action Required](./action-required.md) — manual steps needing human action
|
|
18
|
+
|
|
19
|
+
## Dependency Graph
|
|
20
|
+
|
|
21
|
+
```mermaid
|
|
22
|
+
graph TD
|
|
23
|
+
task-01-name["01: Task Title"]
|
|
24
|
+
task-02-name["02: Task Title"]
|
|
25
|
+
task-03-name["03: Task Title"]
|
|
26
|
+
task-01-name --> task-03-name
|
|
27
|
+
task-02-name --> task-03-name
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Batches
|
|
31
|
+
|
|
32
|
+
| Batch | Tasks | Description |
|
|
33
|
+
|------|-------|-------------|
|
|
34
|
+
| 1 | task-01, task-02 | {Brief description of what this batch accomplishes} |
|
|
35
|
+
| 2 | task-03 | {Brief description} |
|
|
36
|
+
|
|
37
|
+
## Task Status
|
|
38
|
+
|
|
39
|
+
### Batch 1
|
|
40
|
+
- [ ] [task-01-{name}](./tasks/task-01-{name}.md) — {One-line title}
|
|
41
|
+
- [ ] [task-02-{name}](./tasks/task-02-{name}.md) — {One-line title}
|
|
42
|
+
|
|
43
|
+
### Batch 2
|
|
44
|
+
- [ ] [task-03-{name}](./tasks/task-03-{name}.md) — {One-line title}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Key Points
|
|
48
|
+
|
|
49
|
+
- The **Dependency Graph** uses Mermaid syntax (widely rendered in GitHub, VS Code, etc.). Each node shows the task number and title for quick reference.
|
|
50
|
+
- The **Batches** table provides a scannable overview of what runs in parallel.
|
|
51
|
+
- The **Task Status** section uses markdown checkboxes that the `spec-implement` skill updates as tasks complete. The orchestrator parses these to determine which batch to resume from.
|
|
52
|
+
- Links to task files use relative paths pointing into the `tasks/` subfolder.
|
|
53
|
+
- Tasks without dependencies have no incoming arrows in the graph — these form Batch 1.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Requirements Template
|
|
2
|
+
|
|
3
|
+
Use this structure for the requirements.md at the root of each spec folder.
|
|
4
|
+
|
|
5
|
+
## Template
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Requirements: {Feature Name}
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
{What the feature does and why it exists — 2-3 paragraphs covering the problem, the solution, and the expected outcome.}
|
|
13
|
+
|
|
14
|
+
## Goals
|
|
15
|
+
|
|
16
|
+
- {Goal 1}
|
|
17
|
+
- {Goal 2}
|
|
18
|
+
- {Goal 3}
|
|
19
|
+
|
|
20
|
+
## Non-Goals
|
|
21
|
+
|
|
22
|
+
{Explicitly out of scope — things that might seem related but are not part of this feature.}
|
|
23
|
+
|
|
24
|
+
- {Non-goal 1}
|
|
25
|
+
- {Non-goal 2}
|
|
26
|
+
|
|
27
|
+
## Acceptance Criteria
|
|
28
|
+
|
|
29
|
+
{High-level criteria for the entire feature. Individual task files have their own granular criteria.}
|
|
30
|
+
|
|
31
|
+
- [ ] {Criterion 1}
|
|
32
|
+
- [ ] {Criterion 2}
|
|
33
|
+
- [ ] {Criterion 3}
|
|
34
|
+
|
|
35
|
+
## Assumptions
|
|
36
|
+
|
|
37
|
+
{Things assumed to be true that could affect implementation if they turn out to be false.}
|
|
38
|
+
|
|
39
|
+
- {Assumption 1}
|
|
40
|
+
- {Assumption 2}
|
|
41
|
+
|
|
42
|
+
## Technical Constraints
|
|
43
|
+
|
|
44
|
+
{Architecture decisions, technology choices, or constraints that affect all tasks.}
|
|
45
|
+
|
|
46
|
+
- {Constraint 1}
|
|
47
|
+
- {Constraint 2}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Key Points
|
|
51
|
+
|
|
52
|
+
- The requirements doc provides **overall feature context** that each coder agent receives alongside its task file. Keep it focused on the "what" and "why" — individual task files handle the "how."
|
|
53
|
+
- Non-goals are important: they prevent agents from over-building. If search functionality is out of scope, say so — otherwise a well-meaning agent might add it.
|
|
54
|
+
- Acceptance criteria here are feature-level (the whole thing works end-to-end). Task-level criteria live in each task file.
|