tiny-spec 0.3.0__tar.gz → 0.5.0__tar.gz

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.
@@ -0,0 +1,607 @@
1
+ Metadata-Version: 2.5
2
+ Name: tiny-spec
3
+ Version: 0.5.0
4
+ Summary: A tiny, opinionated take on spec-driven development.
5
+ Project-URL: Homepage, https://github.com/GrayMa77er/tiny-spec
6
+ Project-URL: Source, https://github.com/GrayMa77er/tiny-spec
7
+ Project-URL: Issues, https://github.com/GrayMa77er/tiny-spec/issues
8
+ Author: Snir Orlanczyk
9
+ License: MIT License
10
+
11
+ Copyright (c) 2026 Snir Orlanczyk
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ License-File: LICENSE
31
+ Keywords: ai-agents,claude,claude-code,skills,spec-driven-development
32
+ Classifier: Environment :: Console
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Programming Language :: Python :: 3
35
+ Requires-Python: >=3.9
36
+ Description-Content-Type: text/markdown
37
+
38
+ <p align="center">
39
+ <img src="images/logo.png" alt="tiny-spec" width="200">
40
+ </p>
41
+
42
+ <h1 align="center">tiny-spec</h1>
43
+
44
+ <p align="center">A tiny, opinionated take on spec-driven development.</p>
45
+
46
+ <p align="center">
47
+ <a href="https://pypi.org/project/tiny-spec/"><img src="https://img.shields.io/pypi/v/tiny-spec.svg?color=d97757" alt="PyPI version"></a>
48
+ <a href="https://pypi.org/project/tiny-spec/"><img src="https://img.shields.io/pypi/dm/tiny-spec.svg?color=d97757" alt="PyPI downloads"></a>
49
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT"></a>
50
+ <a href="https://docs.claude.com/en/docs/claude-code/overview"><img src="https://img.shields.io/badge/Claude%20Code-skills-d97757.svg" alt="Claude Code"></a>
51
+ <a href="https://github.com/GrayMa77er/tiny-spec/stargazers"><img src="https://img.shields.io/github/stars/GrayMa77er/tiny-spec?color=d97757" alt="Stars"></a>
52
+ </p>
53
+
54
+ <p align="center">
55
+ <code>uvx tiny-spec install</code>
56
+ </p>
57
+
58
+ <!-- DEMO GIF SLOT — images/demo.gif
59
+ Record the FAIL -> fix -> PASS loop, then uncomment:
60
+ <p align="center">
61
+ <img src="images/demo.gif" alt="tiny-spec build loop: the reviewer fails a task, the executor fixes it, the task commits" width="800">
62
+ </p>
63
+ -->
64
+
65
+ tiny-spec is a four-step workflow for Claude Code that turns a ticket into shipped,
66
+ reviewed code. You write the intent, it produces a design, a task list, and then
67
+ builds the work one task at a time. Every task is implemented by one agent and
68
+ graded by an independent reviewer that runs the real tests before anything is
69
+ committed.
70
+
71
+ That core is **four skills and two agents**. In front of it sit **two optional
72
+ planning on-ramps** — `tiny-spec-prd` (idea → PRD) and `tiny-spec-breakdown`
73
+ (PRD → stories) — for when you're starting from an idea rather than a ready ticket.
74
+ Two optional routers sit over the top: `tiny-spec-run` walks the three planning steps
75
+ in one command, and `tiny-spec-loop` works a whole list of stories — branch, plan,
76
+ build, merge, next — until they're built or something stops it. No config file, no
77
+ build step.
78
+
79
+ ```
80
+ ┌───────────────── tiny-spec-run ─────────────────┐
81
+ │ optional: one command, stops before build │
82
+ ▼ ▼
83
+ PLANNING (optional on-ramps) EXECUTION (the core loop, one story at a time)
84
+ tiny-spec-prd ⇢ tiny-spec-breakdown ⇢ tiny-spec-create → tiny-spec-plan → tiny-spec-tasks → tiny-spec-build
85
+ idea → PRD PRD → stories intent design tasks per-task loop
86
+ PRD.md BREAKDOWN.md SPEC.md PLAN.md + tasks.md plan → implement → review → commit
87
+ constitution
88
+ ▲ ▲
89
+ └──────────────── tiny-spec-loop ─────────────────┘
90
+ optional: per story — branch, run, build, merge,
91
+ then the next story. Halts on a wall.
92
+ ```
93
+
94
+ The two on-ramps are **optional** and stack. Have nothing written down? Run
95
+ `tiny-spec-prd` to interview your idea into a `PRD.md`. Have a PRD already? Run
96
+ `tiny-spec-breakdown` to carve it into a `BREAKDOWN.md` — a flat list of
97
+ Features → Stories with draft acceptance criteria. Have a single known piece of
98
+ work? Skip both and start at `tiny-spec-create`. Both on-ramps write a regenerable
99
+ file at your project root (not under `.spec/`); `tiny-spec-create` then reads the
100
+ breakdown one story at a time.
101
+
102
+ ## How small
103
+
104
+ Every other kit in this space is bigger. That is the whole pitch, so here is the
105
+ receipt rather than the adjective:
106
+
107
+ | | skills / commands | agents | config | artifacts per feature |
108
+ |---|---|---|---|---|
109
+ | **tiny-spec** | **8** (4 core + 4 optional) | **2** | **none** | **`SPEC` `PLAN` `tasks`** |
110
+ | [GitHub Spec Kit](https://github.com/github/spec-kit) | 10 | — | `specify init` | `spec` `plan` `tasks` `checklist` `constitution` `research` `data-model` `contracts/` `quickstart` |
111
+ | [OpenSpec](https://github.com/Fission-AI/OpenSpec) | 12 | — | `.openspec.yaml` | `proposal` `design` `tasks` `specs/` |
112
+ | [BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) | 58 | 5 personas | 35 × `customize.toml` | `PRD` `architecture` `epics` `stories` `UX` `brief` `sprint-plan` |
113
+
114
+ The whole of tiny-spec is **2,079 lines** of markdown across 8 skills and 2 agents.
115
+ There is no config file, no build step, no orchestrator, and no CLI to initialize a
116
+ project — the skills are the product.
117
+
118
+ <sub>Counts taken from each project's own repository on 2026-08-03 by listing its
119
+ command/skill/agent directories and templates, not from its marketing copy. Spec Kit:
120
+ `templates/commands/` (10 files) and the artifact set named in `templates/plan-template.md`.
121
+ OpenSpec: `skills/` (12 directories). BMAD: `SKILL.md` files on `main` (58), agent
122
+ personas in `src/bmm-skills/agents/` (analyst, architect, dev, pm, ux-designer), and
123
+ `customize.toml` files (35). These projects are all substantially more popular than
124
+ tiny-spec — Spec Kit ~125k stars, OpenSpec ~64k, BMAD ~51k — and being smaller is a
125
+ bet, not a proof of quality. Re-run the counts yourself before believing them.</sub>
126
+
127
+ ## Why it's small
128
+
129
+ Most spec frameworks are generous by default:
130
+ many phases, many agents, many generated documents. tiny-spec makes the opposite
131
+ bet. Keep one safeguard, drop the rest.
132
+
133
+ A green unit test suite is not the same as working software, so the reviewer
134
+ exercises acceptance criteria end to end and a final smoke test confirms the whole
135
+ spec. That independent review is the safeguard — not the volume of planning
136
+ artifacts. One task, one commit, an external reviewer. Nothing gets added unless
137
+ it earns its place.
138
+
139
+ The case for staying small:
140
+
141
+ - **Documents are context, and context isn't free.** Generating large `spec.md`,
142
+ `plan.md`, `research.md`, and `data-model.md` files costs tokens to write, then
143
+ costs context to carry. Every paragraph the agent has to hold is room it no
144
+ longer has for your actual code. tiny-spec keeps the spine small — a
145
+ constitution and a short memory — and injects only what each task needs.
146
+ - **Real work is a ticket inside a system, not a greenfield repo.** Bigger kits
147
+ assume you're bootstrapping a project from a blank page. Day to day, you pick up
148
+ a ticket and change part of a system that already exists. tiny-spec binds to a
149
+ ticket, works one at a time, and references your task platform instead of
150
+ re-describing the world.
151
+ - **Rigid pipelines fight the user.** Mandatory phases and required sections
152
+ impose ceremony on work that doesn't need it. tiny-spec's extra structure is
153
+ optional by design — add shape where it pays, skip it where it doesn't.
154
+ - **More moving parts is more to maintain.** Orchestrators, ownership contracts,
155
+ checkpoint matrices, and config files are themselves a system you have to learn
156
+ and keep in sync. A few small skills and two agents are not.
157
+ - **Generated docs can fake rigor.** A folder of polished planning artifacts looks
158
+ like progress, but it isn't proof. The proof is the reviewer running your real
159
+ tests before each commit.
160
+
161
+ That's the whole trade: where larger kits add machinery, tiny-spec adds one
162
+ independent reviewer and stops.
163
+
164
+ ### Does the trade hold up?
165
+
166
+ Smaller is easy to claim, so the suite ships a harness that measures it. `docs/eval/`
167
+ runs tiny-spec headlessly on benchmark tasks in hermetic sandboxes, grades the produced
168
+ code with held-out tests the suite never sees, and checks the reviewer's own verdict
169
+ against that ground truth — the number that matters being **false-PASS rate**, how
170
+ often the gate blesses code that is actually broken.
171
+
172
+ Most recent run — 5 benchmark tasks, v0.4.0 (`7810074`), 2026-08-03:
173
+
174
+ | | |
175
+ |---|---|
176
+ | held-out pass rate | **100%** (5/5) — the code works, judged by tests it never saw |
177
+ | suite/truth agreement | **100%** — the reviewer's verdict matched the held-out grader every time |
178
+ | **false-PASS rate** | **0%** — it never called broken code done |
179
+ | blocker rate | 0% |
180
+
181
+ The same run a month earlier on `f973c85` scored identically, which is the more
182
+ interesting result: the loop is at least stable across versions rather than tuned to a
183
+ single commit.
184
+
185
+ See [`docs/eval/README.md`](docs/eval/README.md) for the method and
186
+ [`docs/sdd-evaluation-rubric.md`](docs/sdd-evaluation-rubric.md) for the scoring rubric
187
+ this repo grades itself against. **Read both skeptically: it is my benchmark, of my own
188
+ tool, scored by me.** The rubric says so itself — *"treat the tiny-spec column as
189
+ self-assessment to pressure-test, not gospel."* The tasks are small and self-contained,
190
+ so the harness measures the loop on well-specified work, not large-codebase performance.
191
+ The harness is in the repo precisely so you don't have to take my word for it.
192
+
193
+ ## New to spec-driven development?
194
+
195
+ Spec-driven development (SDD) means writing down *what* you want and *why* before
196
+ any code exists, then letting that spec drive the build. Instead of prompting an
197
+ agent and hoping, you hand it a small, explicit contract — the intent, a design,
198
+ and an ordered list of tasks — and it implements against that. The payoff: the
199
+ agent stops guessing. It knows what "done" looks like, you can review the plan
200
+ before a single line is written, and the result is checked against the spec
201
+ rather than vibes. tiny-spec is one small take on that idea.
202
+
203
+ ## Quickstart
204
+
205
+ Install the skills and agents into your Claude Code config with
206
+ [uv](https://docs.astral.sh/uv/):
207
+
208
+ ```sh
209
+ uvx tiny-spec install
210
+ ```
211
+
212
+ Restart Claude Code so it picks up the new skills, then run the flow in your project:
213
+
214
+ ```
215
+ /tiny-spec-prd # optional: interview a rough idea into a PRD (PRD.md)
216
+ /tiny-spec-breakdown # optional: carve a PRD + wireframes into stories (BREAKDOWN.md)
217
+ /tiny-spec-create # capture intent and requirements (binds a ticket, optional)
218
+ /tiny-spec-plan # turn the spec into a design and harden the constitution
219
+ /tiny-spec-tasks # slice the plan into an ordered checklist
220
+ /tiny-spec-build # build each task: implement, review, commit
221
+ ```
222
+
223
+ Or collapse the three planning steps into one and go straight to building:
224
+
225
+ ```
226
+ /tiny-spec-run # create → plan → tasks in one pass; stops before build
227
+ /tiny-spec-build # build each task: implement, review, commit
228
+ ```
229
+
230
+ `tiny-spec-run` resolves where your ticket stands and invokes whichever of
231
+ `create` / `plan` / `tasks` moves it forward, reconciling anything stale first. It
232
+ **stops before `tiny-spec-build`** — that's where you actually review the work — and
233
+ it writes nothing itself, it only delegates.
234
+
235
+ Or hand it a whole list of stories:
236
+
237
+ ```
238
+ /tiny-spec-loop # per story: branch → plan → build → merge → next
239
+ ```
240
+
241
+ `tiny-spec-loop` reads your `BREAKDOWN.md` (or a list you paste) and works the stories
242
+ one after another, merging each finished branch into `main` locally before starting the
243
+ next — until it's done or reaches a **terminal state** it names out loud. See
244
+ [Working a whole list](#working-a-whole-list--tiny-spec-loop).
245
+
246
+ **Building from a mockup?** There is no design flag to pass. Commit your exports to
247
+ `design/` before the run and `tiny-spec-create` — whether you invoke it directly or
248
+ reach it through `tiny-spec-run` — reads what's there and asks which screens this
249
+ ticket covers. [Designs, if you have them](#designs-if-you-have-them) walks through it.
250
+
251
+ Re-run `install` any time to update; `tiny-spec uninstall` removes only what it
252
+ installed. Each skill is copied (not symlinked) so every install is
253
+ self-contained.
254
+
255
+ <details>
256
+ <summary>Manual install (no uv)</summary>
257
+
258
+ The skills and agents are plain markdown — copy them in by hand. Claude Code
259
+ loads skills from `~/.claude/skills/` and agents from `~/.claude/agents/`:
260
+
261
+ ```sh
262
+ git clone https://github.com/GrayMa77er/tiny-spec.git
263
+ cd tiny-spec
264
+
265
+ mkdir -p "$HOME/.claude/skills" "$HOME/.claude/agents"
266
+ for s in tiny-spec-prd tiny-spec-breakdown tiny-spec-run tiny-spec-loop tiny-spec-create tiny-spec-plan tiny-spec-tasks tiny-spec-build; do
267
+ cp -R "$s" "$HOME/.claude/skills/$s"
268
+ done
269
+ cp agents/*.md "$HOME/.claude/agents/"
270
+ ```
271
+
272
+ If a skill name collides with one you already have, rename these before copying,
273
+ or install one set at a time.
274
+
275
+ </details>
276
+
277
+ ### See a finished run first
278
+
279
+ [`examples/todo-cli/`](examples/todo-cli/) is a real run of the flow on one small
280
+ ticket, committed verbatim — the `TICKET.md` that went in, the `SPEC.md`, `PLAN.md`,
281
+ `tasks.md` and `constitution.md` the suite wrote, and the code and tests it produced.
282
+ The tests pass; you can clone it and run the gate yourself.
283
+
284
+ ## How it works
285
+
286
+ The constitution (`constitution.md`) is the spine. `tiny-spec-create` seeds it from a
287
+ short interview, `tiny-spec-plan` hardens it with concrete engineering rules, and
288
+ `tiny-spec-build` injects it whole into every task. It holds your style, standards,
289
+ invariants, definition of done, and verification commands.
290
+
291
+ Because it is project-wide it can also go missing — deleted, or never committed —
292
+ while your specs survive. Re-running `tiny-spec-create` then repairs it: it rebuilds
293
+ the constitution from whatever is already written down and marks completed tasks
294
+ stale, since they were reviewed against a document that wasn't there.
295
+
296
+ ### Designs, if you have them
297
+
298
+ Wireframes usually get read once and forgotten. tiny-spec turns them into two durable
299
+ things — a project-wide token system in the constitution, and a per-screen entry in
300
+ the spec — so "does this look right?" becomes something the reviewer can fail a task
301
+ on. Skip all of it for a CLI or a library; the constitution simply has no design
302
+ section.
303
+
304
+ **Designs enter by convention, not by argument.** No skill takes a design flag or a
305
+ path parameter. `tiny-spec-create` reads every file in `design/` at your project root —
306
+ directly, or when `tiny-spec-run` reaches it — and asks which screens this ticket
307
+ covers; you can also just hand it paths during the interview. Change an export later and
308
+ re-running `create` (or `run`) re-hashes it, marking the spec stale exactly like editing
309
+ a requirement.
310
+
311
+ **1. Commit your exports.** Any format an agent can read — a Figma export, an HTML
312
+ mockup, an Excalidraw file, a photo of a whiteboard.
313
+
314
+ ```
315
+ your-project/
316
+ design/
317
+ signup.png
318
+ dashboard.png
319
+ ```
320
+
321
+ **2. `tiny-spec-create` looks at them and proposes a design system.** Actually looks —
322
+ they are read as images. It infers *one* coherent scale across all of them rather than
323
+ measuring each screen separately, tells you what it rounded ("your wireframes had 19px
324
+ and 21px — proposing `space.5`=20px for both"), and on your approval writes it into
325
+ `.spec/constitution.md`:
326
+
327
+ ```markdown
328
+ ## Design system
329
+ - color: `color.surface.base` #FFFFFF · `color.text.default` #111111
330
+ `color.text.muted` #6B7280 · `color.text.danger` #B91C1C
331
+ - space: `space.1`=4px · `space.2`=8px · `space.4`=16px · `space.6`=24px
332
+ - type: `type.heading.lg` 24px/600/1.25 · `type.body` 16px/400/1.5
333
+ `type.caption` 13px/400/1.4
334
+ - states: every interactive surface defines default, focus, disabled, loading, empty, error
335
+ ```
336
+
337
+ Since it is project-wide, every screen from here on speaks this vocabulary — and a
338
+ redesign edits this one table instead of every file.
339
+
340
+ **3. Each screen becomes a `D<n>` in `SPEC.md`**, written in those token names:
341
+
342
+ ```markdown
343
+ ## Design
344
+
345
+ - D1 — Signup form
346
+ - source: figma.com/file/abc#node-12:34 (view-only)
347
+ - export: design/signup.png
348
+ - sha256: d21d6330648c504edeb924b5398bf7fb6485d3a4c1907e43d800970f39622a1d
349
+ - layout: single centered column, max 420px; title → field → error → submit
350
+ - elements:
351
+ - card `[data-testid="signup-card"]` → space.6 padding, color.surface.base
352
+ - title `[data-testid="signup-title"]` → type.heading.lg, space.4 below
353
+ - field `[data-testid="signup-email"]` → type.body, space.2 below
354
+ - error `[data-testid="signup-error"]` → type.caption, color.text.danger
355
+ - states: error (caption under the field), loading (spinner replaces button label)
356
+ ```
357
+
358
+ The selectors are a **contract**, not a hint — the reviewer measures exactly these, so
359
+ your markup carries them verbatim. Prefer test ids over CSS classes: classes get
360
+ renamed by refactors and mangled by CSS-in-JS, and a selector that silently stops
361
+ matching is the failure this exists to prevent.
362
+
363
+ **4. Tag the tasks that build the surface** — and only those, not the API call behind
364
+ it. This is your blast radius:
365
+
366
+ ```
367
+ - [ ] T4 — Build the signup form
368
+ - acceptance: submitting a valid email advances to the verify step
369
+ - design: D1
370
+ ```
371
+
372
+ **5. The reviewer measures it, then looks at it, and fails on both:**
373
+
374
+ ```
375
+ DESIGN: D1 — Signup form
376
+ [data-testid="signup-card"] padding 19px — not on the space.* scale (4/8/16/24)
377
+ [data-testid="signup-email"] MISSING FROM DOM — never built, or renamed
378
+ [data-testid="signup-error"] rgb(204,0,0) — color.text.danger is #B91C1C
379
+ state "loading" never renders: button label stays "Continue", no spinner
380
+ judge: read states default, error — compared against design/signup.png
381
+ state "error": signup-error sits behind the card — every token right, and the
382
+ user sees nothing where the export shows the red caption
383
+ state "default": submit label "Create account" truncates to "Create acco…"
384
+ FINDINGS:
385
+ - flag: title/field gap feels tight (on-scale — does not fail the task)
386
+ ```
387
+
388
+ Numbers first, and never a screenshot diff — pixel comparison goes flaky on font
389
+ antialiasing and teams end up muting it. But no measurement catches an element that is
390
+ present, on-token, and still not on screen — occluded, clipped, truncated, or the same
391
+ color as what's behind it. So the last step reads a screenshot of each state next to
392
+ your export and grades presence, legibility, and correspondence. **Where a number
393
+ already settled the question the eye may only flag** — on-scale-but-cramped is never a
394
+ fail — which keeps the two halves from contradicting each other. Measurable or visible
395
+ violations fail; taste comes back as `flag:` notes so a bounded fix loop can't thrash. A
396
+ task with no `design:` tag is graded exactly as before.
397
+
398
+ <details>
399
+ <summary>The <code>visual:</code> command (you write this once)</summary>
400
+
401
+ tiny-spec ships no script — it can't know your stack. Write one, put it in the
402
+ constitution's **Verification commands**, and the reviewer runs it:
403
+
404
+ ```
405
+ ## Verification commands
406
+ - test: `npm test`
407
+ - visual: `node visual.mjs`
408
+ ```
409
+
410
+ ```js
411
+ // visual.mjs — node visual.mjs '<selector>' ['<selector>'...]
412
+ import { chromium } from 'playwright';
413
+
414
+ const b = await chromium.launch({ channel: 'chrome' }); // your Chrome, no download
415
+ const p = await b.newPage({ viewport: { width: 900, height: 700 } });
416
+ await p.goto('http://localhost:3000/signup'); // your dev server + route
417
+
418
+ for (const sel of process.argv.slice(2)) {
419
+ const el = await p.$(sel);
420
+ if (!el) { console.log(`${sel}\n MISSING FROM DOM`); continue; } // required
421
+ console.log(sel, JSON.stringify(await el.evaluate(n => {
422
+ const c = getComputedStyle(n), r = n.getBoundingClientRect();
423
+ return { padding: c.padding, margin: c.margin, fontSize: c.fontSize,
424
+ fontWeight: c.fontWeight, lineHeight: c.lineHeight, color: c.color,
425
+ background: c.backgroundColor, border: c.border,
426
+ opacity: c.opacity, visibility: c.visibility,
427
+ top: Math.round(r.top), w: Math.round(r.width), h: Math.round(r.height) };
428
+ })));
429
+ }
430
+
431
+ const state = process.env.STATE ?? 'default'; // however you drive states
432
+ const shot = `/tmp/visual-${state}.png`;
433
+ await p.screenshot({ path: shot, fullPage: true });
434
+ console.log('SCREENSHOT', state, shot); // this line arms the judge
435
+
436
+ await b.close();
437
+ ```
438
+
439
+ The missing-selector branch **must print something** — that is what turns a renamed
440
+ element into a failure instead of a silent skip. `top` is what the layout-order check
441
+ reads, and `opacity`/`visibility` are worth printing because they turn the cheapest kind
442
+ of invisible element into a numeric failure. The `SCREENSHOT` line is what the reviewer
443
+ reads back to look at the render and catch the rest — occlusion, clipping, truncation,
444
+ same-color-on-same-color — none of which any single property reports. Drop it and the
445
+ numeric half still gates exactly as before, with the reviewer reporting `judge: not run`
446
+ rather than quietly skipping it. Without a `visual:` command at all, a task tagged
447
+ `design:` raises a blocker rather than passing quietly.
448
+
449
+ </details>
450
+
451
+ **No Figma token, plugin, or design SaaS.** A view-only account works fine: the
452
+ committed export is what the agents read, and `source:` keeps the trail back. Change
453
+ an export and its recorded `sha256` stops matching, which marks the spec stale exactly
454
+ like editing a requirement — so a design that moved under finished work can't pass
455
+ unnoticed.
456
+
457
+ `tiny-spec-build` walks the task list top to bottom. Each task runs through one loop:
458
+
459
+ 1. Plan the task against the constitution (inline, brief).
460
+ 2. Implement it with a fresh `tiny-spec-build-executor` agent.
461
+ 3. Review it with an independent `tiny-spec-build-reviewer` agent that runs the gate
462
+ end to end and grades against the constitution and the task's acceptance.
463
+ 4. On pass, commit the code plus a checklist tick. On fail, loop back to the
464
+ executor with the findings. After two failed attempts the run halts `exhausted`.
465
+
466
+ ```mermaid
467
+ flowchart TB
468
+ SPEC[SPEC.md<br/>intent] --> PLAN[PLAN.md<br/>design] --> TASKS[tasks.md<br/>checklist]
469
+
470
+ TASKS -->|pause: set| H[Halt — paused<br/>task stays unchecked]
471
+ TASKS --> P[Plan task]
472
+ P --> I[Implement<br/>executor]
473
+ I --> R[Review + run gate<br/>reviewer]
474
+ I -->|blocker| B
475
+ R -->|pass| C[Commit + tick]
476
+ C --> TASKS
477
+ R -->|fail| I
478
+ R -->|fail twice| B[Halt — blocked / exhausted<br/>logged to decisions.md]
479
+
480
+ CON([constitution.md]) -.-> P & I & R
481
+ MEM([memory.md]) -.-> I & R
482
+ DES([SPEC.md D-n + design/ export]) -.->|only on a design: task| I & R
483
+ ```
484
+
485
+ Solid arrows are the flow. Dotted arrows show the persistent context injected into
486
+ a step: the `constitution.md` goes into planning, implementation, and review, while
487
+ `memory.md` is handed to the executor and reviewer. A task tagged `design:` also
488
+ carries its screen's `D<n>` entry into both agents — and the review step then runs
489
+ the `visual:` gate on top of the usual one.
490
+
491
+ A small `memory.md` carries operational lessons between runs, so the executor and
492
+ reviewer (which start fresh each time) don't relearn the same pitfalls.
493
+
494
+ When a task can't pass because of a gap in the design or spec, the executor stops
495
+ and logs a blocker instead of hacking around it. You fix the gap upstream in
496
+ `tiny-spec-plan` or `tiny-spec-create`, then resume. Work runs one ticket at a time and
497
+ resumes from the checklist state.
498
+
499
+ ### Working a whole list — `tiny-spec-loop`
500
+
501
+ `/tiny-spec-loop` takes a list of stories and works them one after another. Per story
502
+ it does the same four moves:
503
+
504
+ ```
505
+ cut a branch from main → tiny-spec-run → tiny-spec-build → merge back to main
506
+ ```
507
+
508
+ Then the next story. Each branch is cut **fresh from main**, so story 3 sees stories 1
509
+ and 2 already merged — which is what makes an ordered list build correctly.
510
+
511
+ **The list is `BREAKDOWN.md` by default** — its `- Story:` entries, in file order,
512
+ each already carrying a `slug:` (the branch and directory name) and `AC:` lines. Paste
513
+ a list at invocation instead and that wins; but a bare feature name has no acceptance
514
+ criteria, so `tiny-spec-create` will interview you when it reaches it. That's the
515
+ honest trade: a breakdown runs unattended, a pasted list is supervised.
516
+
517
+ **Every run ends in exactly one of six states, and it says which:**
518
+
519
+ | | |
520
+ |---|---|
521
+ | `done` | every story built **and merged** |
522
+ | `blocked` | an upstream document is wrong — go fix the spec or the plan |
523
+ | `exhausted` | a task stayed red past two fix attempts |
524
+ | `paused` | it reached a `pause:` point |
525
+ | `fork` | a real either/or the plan doesn't answer |
526
+ | `conflict` | a story's branch wouldn't merge cleanly |
527
+
528
+ **Only `done` means the work is built** — and in a story loop that means *all* of them.
529
+ A run that stopped at story 2 of 7 reporting "done" is the single thing autonomous loops
530
+ get wrong most often, so the state is always named, along with what got merged and how
531
+ many stories are still untouched.
532
+
533
+ **A halt stops the whole run, not just that story.** Later stories in a list you wrote
534
+ top to bottom usually assume the earlier ones landed, so skipping ahead past a failure
535
+ just produces a second, more confusing failure downstream.
536
+
537
+ **Pause points are technical, not per-story.** Any task can carry a `pause:` line, and
538
+ the build halts *before* running it:
539
+
540
+ ```
541
+ - [ ] T7 — run the schema migration against the restored snapshot
542
+ - acceptance: every row in orders has a non-null tenant_id
543
+ - pause: confirm the snapshot is current before this touches real rows
544
+ ```
545
+
546
+ `tiny-spec-tasks` proposes these for genuinely irreversible work — migrations,
547
+ destructive file operations, a new dependency, an auth boundary, a public API contract.
548
+ You can also give the run a standing policy up front ("halt before anything that touches
549
+ auth") and it gets applied as each story's tasks are sliced.
550
+
551
+ **What it will not do to your repo.** It runs exactly five git commands — `switch`,
552
+ `switch -c`, `merge --no-ff`, `merge --abort`, and reads. It refuses to start on a dirty
553
+ tree. It **never pushes**, never rebases, never resets, never deletes a branch, and
554
+ never opens a PR. Merges are local, so a bad run is one `git reset` away; publishing
555
+ stays yours. If the gate goes red after a merge it leaves the merge alone and tells you
556
+ the undo command rather than running it.
557
+
558
+ **Walk away and come back.** Nothing is written down to track progress — it's derived:
559
+ a story whose ticked `tasks.md` is on `main` is done, a `.spec/<slug>/` with an unchecked
560
+ task is in progress, no directory means not started. So re-running `/tiny-spec-loop`
561
+ tomorrow in a fresh session picks up exactly where it stopped. No run-state file, no
562
+ lock, and no budget to configure: the story list *is* the budget.
563
+
564
+ **It never fixes a blocker for you.** A blocker means one of your documents is wrong,
565
+ and a loop allowed to rewrite the requirement its own task just failed would be grading
566
+ its own homework. It reports and stops; the upstream edit is yours.
567
+
568
+ ## Project layout
569
+
570
+ Each skill is one self-contained `SKILL.md`, with every document skeleton inline in
571
+ it — no companion template files, no absolute paths, and no shared parent required
572
+ at runtime, so a skill works wherever you drop it. (It also means a run never stops
573
+ to ask permission to read a template out of your Claude config directory.)
574
+
575
+ tiny-spec creates a `.spec/` directory in your project root, never inside a skill.
576
+ It is namespaced per ticket, with a shared spine at the root:
577
+
578
+ ```
579
+ .spec/
580
+ constitution.md project-wide, shared across tickets
581
+ memory.md operational lessons, shared across tickets
582
+ <ticket-id>/ one directory per ticket (PROJ-123/, gh-42/, …)
583
+ SPEC.md PLAN.md tasks.md decisions.md
584
+ ```
585
+
586
+ `PRD.md`, `BREAKDOWN.md`, and `design/` sit at your project root rather than inside
587
+ `.spec/`, because they are yours: the first two are regenerable pre-spec planning
588
+ files, and the design exports are project files no skill ever writes.
589
+
590
+ `CONTRACTS.md` documents the formats for maintainers. The skills do not read it at
591
+ runtime; each is self-sufficient.
592
+
593
+ ## Integrations
594
+
595
+ tiny-spec binds to a task platform (Jira, GitHub Issues, Azure DevOps, Monday) by
596
+ reference only: a `ticket` block in the spec and a `Refs:` footer on each
597
+ [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/), so the
598
+ platform auto-links the work. No API calls or credentials are required.
599
+
600
+ ## Contributing
601
+
602
+ Issues and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md), and
603
+ read [AGENTS.md](AGENTS.md) before changing any skill or agent.
604
+
605
+ ## License
606
+
607
+ [MIT](LICENSE)