Spec templates: author, promote, manage, and create from scaffolds
Teams create reusable spec scaffolds from existing specs or from scratch, then create new specs against them instead of starting from a blank page. Templates live in the org, are listed/managed/retired, and ship with a small starter set. Template blocks use prompting language so the agent still grills — templates accelerate shape, never bypass review.
“Every spec starts from a blank page and people keep rewriting the same things.”
The grilling
Every spec starts from a blank page and people keep rewriting the same things.
The spec is completely blank — no scope, no goals, no audience defined yet. What are we building here? Give me the overview of what you need, and I'll start grilling toward a finished spec.
Every spec starts from a blank page and people keep rewriting the same things. That's the whole ask, in the words I'd use talking to you at a whiteboard. Go read the repo and figure out what it means concretely before you ask me anything — specifically how a spec gets created today, what a spec is made of structurally, and whether anything in the product already resembles a starting point or a scaffold. Then grill me. For orientation: I mean this at feature scale, not a "duplicate spec" button. Teams write the same kinds of specs over and over — an integration spec has the same shape every time, a migration spec has the same shape every time — and every one of them starts from nothing and gets whatever structure the author happened to remember that day. I want a real answer to that, and I expect it to have several moving parts.
Let me go read the codebase first. Good. I've read the full codebase. Here's what I found: **How a spec is created today:** 1. User types free-text into the CaptureBox (the only entry point) 2. That raw text becomes the spec's `title`, `summary`, and `key` 3. The editor document is initialized with exactly **two blocks**: an "Overview" section_header and a paragraph containing the raw overview text 4. That's it — the agent then grills the user through structured sections (intent, constraints, acceptance, tasks) from scratch **What the codebase knows about but doesn't use as starting points:** - There's already a `specType` enum: `"initiative" | "epic" | "spec"` — but the create flow hardcodes `"spec"` every time - There's already a `parentId` field for hierarchical specs (children of children of initiatives) - The block types include `goal`, `acceptance_criterion`, `constraint`, `section_header` — the editor already supports structured specs - There's zero template infrastructure — no "create spec from template", no pre-composed block structures, no template library **The concrete problem:** A team creating an "integration spec" or "migration spec" gets the same blank two-block doc as a "new feature spec," and the writer has to remember what sections, questions, and constraints that type of spec needs. The existing `specType` enum (`initiative | epic | spec`) is too coarse for what you're describing — an integration spec and a feature spec are both `"spec"` today, so the template system needs its own dimension. The first question: how many template types should v1 ship with? I'd recommend starting with **2-3** — a feature spec, an integration/API spec, and a migration spec — enough to prove the mechanism covers genuinely different spec shapes without over-investing in templates you don't know teams will use.
Files the agent read
- read_repo_structure whole repo
- read_repo_file apps/web/src/lib/use-create-spec.ts
- read_repo_file apps/api/src/routes/specs.ts
- read_repo_file apps/web/src/routes/dashboard/spec-editor/section-preparation.ts
- find specType
- grep apps
- grep apps
- grep apps/api/src
- grep apps/api/src
- grep apps/api/src/zero/server-mutators.ts
- grep apps/api/src
- find initializeDraftArgsSchema
- grep apps/api/src/zero/server-mutators.ts
- find packages
- read_repo_structure packages
- read_repo_file packages/zero/src/mutators.ts
- read_repo_file packages/zero/src/schema.ts
- read_repo_file packages/zero/src/editor-document.ts
- read_repo_file apps/web/src/lib/use-capture.ts
- read_repo_file apps/web/src/components/CaptureBox.tsx
- read_repo_file apps/web/src/components/CaptureDialog.tsx
- read_repo_file apps/web/src/components/FirstSpecSetupGuide.tsx
- read_repo_file apps/web/src/routes/dashboard/projects.tsx
You're asking me to pick a number of templates and that's the wrong question, so let me redirect rather than answer it. Bundling N templates is content, not a feature. If we ship three hand-written templates, the fourth thing a team needs isn't there, and the first thing they ask is "can we make our own" — and if the answer is no, the templates are a demo, not a capability. So the answer to your question is D-and-B together: the authoring capability is the feature, and a small set of starters ships with it so the product isn't empty on day one. But if you make me choose which half is load-bearing, it's D. Here's the feature as I see it, and I want the spec to cover all of it: A template is a reusable spec scaffold that lives in an org. It carries structure — the section shape and the blocks a spec of that kind always has — and prompting, meaning the parts that are meant to be filled in are marked as such rather than being a wall of prose someone has to figure out how to edit. Teams author their own. That's the part that makes it a feature. And the way people will actually create templates is not by writing one from scratch in a template editor — it's by looking at a spec they already wrote that came out well and saying "make more like this one." So promoting an existing spec into a template has to be in here. That's the path with the least friction and it's the one that gets used. Creating a spec from a template replaces the blank page. Today you type free text and get an Overview header and a paragraph — you told me that yourself. From a template you should get the scaffold, ready for the agent to start grilling against something instead of against nothing. And templates are managed: listed, edited, retired when they go stale. A template nobody maintains becomes a liability that propagates a bad shape across every new spec, so there has to be a way to take one out of circulation. Plus a small set of starter templates so a new org isn't staring at an empty template list, which is the same blank-page problem one level up. That's the brief: authoring, promotion from an existing spec, creation from template, lifecycle management, and starters. Now, the interaction I actually want you to think hard about, because it's the thing that makes this specific to this product rather than generic: this product's whole value is that the agent grills you and the server refuses to emit tasks until the sections are good enough. If a template pre-fills goals and constraints, what happens to the grilling? Two bad outcomes I can imagine: the agent treats pre-filled scaffold text as though the PM said it and stops asking, so you get a spec that passes the gate on boilerplate nobody actually thought about — which is much worse than a blank page, because it looks finished. Or the agent ignores the template entirely and grills from zero, in which case the template bought nothing. I don't know the right answer. You've read how the agent consumes spec state. Tell me what actually happens if blocks are present at session start, and what the right behavior is. This matters more to me than how many starter templates we ship.
That's a much better framing. Let me answer the grilling question by reading exactly how the agent handles pre-existing blocks. Good. I found the critical mechanism. Here's exactly what happens: **`resolveSpecPhase` is driven solely by section scores, not block presence.** Even with 20 pre-filled goals/constraints/acceptance blocks, if `sectionScores` is empty, the phase is `"intent-open"` and the agent's directive says "Ask ONE question about what the user cannot do today." The agent **sees** the existing blocks in SPEC STATE — they render in `blocksSummary`. So with a template, the agent opens the session, sees a partially populated spec, sees an unscored intent section, and gets told "work the open section." Two paths diverge: - **Path A — scaffolds that pass the gate:** template blocks happen to cover the semantic coverage dimensions well enough that `report_section_score` returns 0.9+. The agent advances to constraints without grilling those topics. The PM gets a pre-filled spec that "passes" on boilerplate they never thought about. - **Path B — scaffolds in placeholder/probing language:** template blocks contain typed gaps (e.g. `"**Target user:** [who will use this?]"`). The agent sees incomplete blocks, semantic coverage finds missing dimensions, scoring clamps below 0.9, and the agent must ask the PM to fill the gaps. This is the productive path — the template provides shape, not answers. The bad outcome you described **is real** under Path A. The right behavior is Path B: templates carry **structure + prompts**, not finished prose. That way the agent treats a template-spec the same way it treats a blank-page spec — it grills — but the grilling is more targeted because the template already framed what *kind* of thing is being built. Let me capture all the decisions you've already confirmed into goal blocks, then ask one tight question about the template-block design. Intent is clean at 0.92. Let me surface the highest-impact constraint decision. Here's where we are — intent is locked. The remaining open question for constraints: who has authority to author and retire templates? I'd recommend **org admins only** — templates propagate shape across every new spec, so a bad template is worse than no template, and promotion-from-spec is already low-friction for any member who wants to contribute a template (they just ask an admin to promote). But that's my recommendation — you decide.
update_spec_metadatasummary too longThis summary is 488 characters — past the 1-3 sentence, 400-char budget. A summary states the decided scope once, like an elevator pitch; it must not re-enumerate the goals, constraints, or acceptance criteria the blocks already carry. Rewrite it as 1-3 sentences of what ships and for whom.
Stop the current edit sequence. Treat this as a plan-shape failure, not a wording issue: re-plan from the acceptance criteria into the smallest set of coarse, independently shippable user slices before retrying — as few as the distinct capabilities require (commonly 1-3, hard cap 7, no minimum); one narrow regression fix is exactly 1 slice. If two slices are steps of the same capability, merge them into one. If bad tasks or blocks already exist, update/delete that bad shape before adding more. Metadata updates are atomic: nothing from this call was committed. Retry with every requested field, preserving valid fields unchanged and correcting only rejected fields.
Files the agent read
- grep packages/agent/src
- grep packages/agent/src
- read_repo_file packages/agent/src/index.ts
- read_repo_file packages/agent/src/index.ts
- grep packages/agent/src
- read_repo_file packages/agent/src/opus-spec-prompt.ts
- read_repo_file packages/agent/src/index.ts
- grep packages/agent/src/index.ts
- grep packages/agent/src/index.ts
- grep packages/agent/src/index.ts
- read_repo_file packages/agent/src/index.ts
- read packages/agent/src/index.ts
That's the answer, and it becomes the central constraint of this feature. Record it in strong terms because it's the thing that will get eroded later by someone trying to be helpful: A template supplies structure and prompts, never finished assertions. Template blocks must be shaped so an unscored section cannot pass the gate on template content alone — the PM has to answer for it. Path A, where a spec passes on boilerplate nobody thought about, is a product failure worse than the blank page, because a blank page is honestly empty and a boilerplate spec looks finished. If a starter template we ship can pass the gate without a human answering anything, that template is a bug. Two consequences I want stated so nobody has to rediscover them: The promote-a-spec-to-template path is now the dangerous one. Someone takes a finished spec — full of real, specific, gate-passing prose — and turns it into a template. If we copy the text verbatim, we've mass-produced Path A: every spec created from it starts pre-loaded with assertions that were true for the original feature and are fiction for the new one, and the gate waves them through. So promotion cannot be a straight copy. It has to strip or convert the specifics into prompts. Whether that's automatic, or a review step where the author converts each block, or something else — that's yours to design, but "copy the blocks" is wrong and I want the spec to say why. And the starter templates we ship have to be held to the same bar as the ones teams write. If our own templates pass the gate empty, we've shipped the failure mode as the default experience. To your earlier question about how many starters: now that we've settled what a template actually is, three is fine. Feature, integration, migration. They're demonstrations of the shape, not the value. Everything else stands as I described it — authoring, promotion, creation from template, lifecycle management including retiring one, and starters. Go write the constraints and acceptance criteria. For acceptance, the ones that matter to me: - A spec created from a template still gets grilled. The agent asks about the things the template scaffolded rather than accepting them. - No template, including ours, can carry a section to a passing score without human input. That's the Path A guard, stated as something testable. - Promoting a spec to a template does not carry that spec's specific assertions into new specs. - A retired template stops appearing for new specs but doesn't break or alter the specs already created from it. History stays intact. - Templates are org-scoped. One org's templates never appear in another's. On tasks: I'd guess this is two or three coarse pieces. I'm not going to prescribe the split this time — you've now got a better model of the moving parts than I do. Propose it, and if the promotion-conversion work is genuinely the hard part, say so and let it stand alone.
Terrific answer. Let me capture it all. The last AC was rejected as describing test behavior, not user-visible product outcome. Let me fold that bar into the first AC (which already covers all templates including starters) and resubmit the remaining three clean ACs.
insert_blocksunsupported flow exclusionRequirement invents actor/flow exclusion(s) absent from authoritative PM or repository evidence: exclusive actor authority. A selected primary actor or flow does not exclude adjacent flows; remove the exclusion or obtain that exact boundary.
Remove or reword the unsupported claim: keep only content the PM stated, selected, or the repository verified. If the claim is load-bearing, ask the PM instead of asserting it. This gate family will not block again this session for a rewrite without the claim — but resubmitting this same rejected content is rejected every time; retry once without the claim, then move on; do not loop on rewording. Block inserts are atomic: nothing from this call was committed. Retry the batch without the rejected claim.
insert_blocksstandalone validation blockThis acceptance criterion describes only CI/test/fixture/review validation, not user-visible behavior. Rewrite it as an observable product outcome and put the validation detail in the owning task description.
Stop the current edit sequence. Treat this as a plan-shape failure, not a wording issue: re-plan from the acceptance criteria into the smallest set of coarse, independently shippable user slices before retrying — as few as the distinct capabilities require (commonly 1-3, hard cap 7, no minimum); one narrow regression fix is exactly 1 slice. If two slices are steps of the same capability, merge them into one. If bad tasks or blocks already exist, update/delete that bad shape before adding more.
On authoring permissions, since you asked and it's the one dimension you flagged as unconfirmed: org admins author and retire; every member can create a spec from any template. That matches how people actually work — a template is a shared standard, and if anyone can change it, it isn't one. Record it. Now score acceptance and generate the tasks with your proposed grouping.
All three sections pass. Now let me plan and create the tasks. **Proposed split — three coarse, independently demoable capabilities:** 1. **Template management gallery + authoring + lifecycle** — the data model (new `spec_templates` table), CRUD API for templates, admin gallery UI listing/managing templates, from-scratch template creation, and retirement. This is the shelf templates live on. Demoable on its own (an org can see and manage its templates even if none exist yet). 2. **Promote an existing spec to a template** — the "make more like this one" action on a spec, including the assertion-to-prompt conversion (stripping specific prose from goal/constraint/acceptance blocks into probing language). This is the path that makes templates productive. Demoable as "old spec became a template with prompts instead of answers." 3. **Create a new spec from a template** — template picker in the spec-creation flow, seeding the editor document with the template's blocks instead of the two-block Overview-only scaffold, producing an unscored spec the agent grills from. All three tasks created. Now I'll build the complete trace graph. The spec is complete. Here's the final state: **Title:** Spec templates: author, promote, manage, and create from scaffolds **Summary:** Teams create reusable spec scaffolds from existing specs or from scratch, then create new specs against them instead of starting from a blank page. Templates live in the org, are listed/managed/retired, and ship with a small starter set. Template blocks use prompting language so the agent still grills — templates accelerate shape, never bypass review. **Three coarse tasks, each independently demoable:** 1. **Template gallery with authoring and lifecycle management** — data model, admin-gated CRUD API, gallery UI listing templates with create-from-scratch and retire actions, three seeded starter templates (feature, integration, migration). 2. **Promote an existing spec to a template** — "Promote to template" action on a spec, converting each goal/constraint/acceptance block's prose into probing/placeholder language. The conversion is visible to the reviewing admin before saving. 3. **Create a new spec from a template** — template picker extended into the spec creation flow; selecting a template seeds the editor document with its scaffold blocks instead of the two-block Overview default. The resulting spec starts unscored, so the agent grills normally. **The hard part** is task 2 — the assertion-to-prompt conversion is genuinely non-trivial. A straight block copy is the failure mode the spec explicitly guards against, so the conversion mechanism (automatic stripping, or a review step where the author converts each block, or a hybrid) is the design work that makes or breaks the feature.
insert_blocksunsupported flow exclusionRequirement invents actor/flow exclusion(s) absent from authoritative PM or repository evidence: exclusive actor authority. A selected primary actor or flow does not exclude adjacent flows; remove the exclusion or obtain that exact boundary.
create_taskunsupported architectureTask selects implementation architecture not present in the spec or an answered decision: REST. Remove the invented mechanism, or first capture the PM-approved architecture choice in spec evidence.
Remove or reword the unsupported claim: keep only content the PM stated, selected, or the repository verified. If the claim is load-bearing, ask the PM instead of asserting it. This gate family will not block again this session for a rewrite without the claim — but resubmitting this same rejected content is rejected every time; retry once without the claim, then move on; do not loop on rewording.
create_tasktask description sprawlThis task description runs 4 sentences — past the 1-3 sentence capability handoff. Keep the outcome, the surfaces it touches, and what proves it works; cut restated acceptance assertions, step lists, and implementation detail the blocks and trace graph already carry.
create_tasktask description sprawlThis task description runs 5 sentences — past the 1-3 sentence capability handoff. Keep the outcome, the surfaces it touches, and what proves it works; cut restated acceptance assertions, step lists, and implementation detail the blocks and trace graph already carry.
What it asked
Which spec-type patterns do you want to ship v1 templates for?
- AA single template type
One well-defined template (e.g. 'integration spec') — prove the mechanism before expanding
- B2-3 templatesAgent's pick
Feature spec, integration/API spec, and migration spec — covers the most common team patterns
- C3-5 template types
The above plus a bug-fix template and a performance/infra spec template
- DUser-defined templates
Ship the template-authoring UI itself, no pre-bundled templates — let teams create their own
You're asking me to pick a number of templates and that's the wrong question, so let me redirect rather than answer it. Bundling N templates is content, not a feature. If we ship three hand-written templates, the fourth thing a team needs isn't there, and the first thing they ask is "can we make our own" — and if the answer is no, the templates are a demo, not a capability. So the answer to your question is D-and-B together: the authoring capability is the feature, and a small set of starters ships with it so the product isn't empty on day one. But if you make me choose which half is load-bearing, it's D. Here's the feature as I see it, and I want the spec to cover all of it: A template is a reusable spec scaffold that lives in an org. It carries structure — the section shape and the blocks a spec of that kind always has — and prompting, meaning the parts that are meant to be filled in are marked as such rather than being a wall of prose someone has to figure out how to edit. Teams author their own. That's the part that makes it a feature. And the way people will actually create templates is not by writing one from scratch in a template editor — it's by looking at a spec they already wrote that came out well and saying "make more like this one." So promoting an existing spec into a template has to be in here. That's the path with the least friction and it's the one that gets used. Creating a spec from a template replaces the blank page. Today you type free text and get an Overview header and a paragraph — you told me that yourself. From a template you should get the scaffold, ready for the agent to start grilling against something instead of against nothing. And templates are managed: listed, edited, retired when they go stale. A template nobody maintains becomes a liability that propagates a bad shape across every new spec, so there has to be a way to take one out of circulation. Plus a small set of starter templates so a new org isn't staring at an empty template list, which is the same blank-page problem one level up. That's the brief: authoring, promotion from an existing spec, creation from template, lifecycle management, and starters. Now, the interaction I actually want you to think hard about, because it's the thing that makes this specific to this product rather than generic: this product's whole value is that the agent grills you and the server refuses to emit tasks until the sections are good enough. If a template pre-fills goals and constraints, what happens to the grilling? Two bad outcomes I can imagine: the agent treats pre-filled scaffold text as though the PM said it and stops asking, so you get a spec that passes the gate on boilerplate nobody actually thought about — which is much worse than a blank page, because it looks finished. Or the agent ignores the template entirely and grills from zero, in which case the template bought nothing. I don't know the right answer. You've read how the agent consumes spec state. Tell me what actually happens if blocks are present at session start, and what the right behavior is. This matters more to me than how many starter templates we ship.
Who in an org can author/retire templates?
- AOrg admins onlyAgent's pick
Only users with admin role in the org can create, edit, or retire templates. Everyone can use them.
- BAll members can author
Any org member can create, edit, and retire templates — same permissions as creating specs.
- CAuthor owns edits, admins retire
The user who created a template can edit it; only org admins can retire it. Everyone can use all templates.
That's the answer, and it becomes the central constraint of this feature. Record it in strong terms because it's the thing that will get eroded later by someone trying to be helpful: A template supplies structure and prompts, never finished assertions. Template blocks must be shaped so an unscored section cannot pass the gate on template content alone — the PM has to answer for it. Path A, where a spec passes on boilerplate nobody thought about, is a product failure worse than the blank page, because a blank page is honestly empty and a boilerplate spec looks finished. If a starter template we ship can pass the gate without a human answering anything, that template is a bug. Two consequences I want stated so nobody has to rediscover them: The promote-a-spec-to-template path is now the dangerous one. Someone takes a finished spec — full of real, specific, gate-passing prose — and turns it into a template. If we copy the text verbatim, we've mass-produced Path A: every spec created from it starts pre-loaded with assertions that were true for the original feature and are fiction for the new one, and the gate waves them through. So promotion cannot be a straight copy. It has to strip or convert the specifics into prompts. Whether that's automatic, or a review step where the author converts each block, or something else — that's yours to design, but "copy the blocks" is wrong and I want the spec to say why. And the starter templates we ship have to be held to the same bar as the ones teams write. If our own templates pass the gate empty, we've shipped the failure mode as the default experience. To your earlier question about how many starters: now that we've settled what a template actually is, three is fine. Feature, integration, migration. They're demonstrations of the shape, not the value. Everything else stands as I described it — authoring, promotion, creation from template, lifecycle management including retiring one, and starters. Go write the constraints and acceptance criteria. For acceptance, the ones that matter to me: - A spec created from a template still gets grilled. The agent asks about the things the template scaffolded rather than accepting them. - No template, including ours, can carry a section to a passing score without human input. That's the Path A guard, stated as something testable. - Promoting a spec to a template does not carry that spec's specific assertions into new specs. - A retired template stops appearing for new specs but doesn't break or alter the specs already created from it. History stays intact. - Templates are org-scoped. One org's templates never appear in another's. On tasks: I'd guess this is two or three coarse pieces. I'm not going to prescribe the split this time — you've now got a better model of the moving parts than I do. Propose it, and if the promotion-conversion work is genuinely the hard part, say so and let it stand alone.
Where the server refused
Each of these rejected the agent's own tool call. The agent had to fix its output and try again before the spec could advance — this is the gate, not a prompt the model can talk past.
update_spec_metadatasummary too longThis summary is 488 characters — past the 1-3 sentence, 400-char budget. A summary states the decided scope once, like an elevator pitch; it must not re-enumerate the goals, constraints, or acceptance criteria the blocks already carry. Rewrite it as 1-3 sentences of what ships and for whom.
Stop the current edit sequence. Treat this as a plan-shape failure, not a wording issue: re-plan from the acceptance criteria into the smallest set of coarse, independently shippable user slices before retrying — as few as the distinct capabilities require (commonly 1-3, hard cap 7, no minimum); one narrow regression fix is exactly 1 slice. If two slices are steps of the same capability, merge them into one. If bad tasks or blocks already exist, update/delete that bad shape before adding more. Metadata updates are atomic: nothing from this call was committed. Retry with every requested field, preserving valid fields unchanged and correcting only rejected fields.
insert_blocksunsupported flow exclusionRequirement invents actor/flow exclusion(s) absent from authoritative PM or repository evidence: exclusive actor authority. A selected primary actor or flow does not exclude adjacent flows; remove the exclusion or obtain that exact boundary.
Remove or reword the unsupported claim: keep only content the PM stated, selected, or the repository verified. If the claim is load-bearing, ask the PM instead of asserting it. This gate family will not block again this session for a rewrite without the claim — but resubmitting this same rejected content is rejected every time; retry once without the claim, then move on; do not loop on rewording. Block inserts are atomic: nothing from this call was committed. Retry the batch without the rejected claim.
insert_blocksstandalone validation blockThis acceptance criterion describes only CI/test/fixture/review validation, not user-visible behavior. Rewrite it as an observable product outcome and put the validation detail in the owning task description.
Stop the current edit sequence. Treat this as a plan-shape failure, not a wording issue: re-plan from the acceptance criteria into the smallest set of coarse, independently shippable user slices before retrying — as few as the distinct capabilities require (commonly 1-3, hard cap 7, no minimum); one narrow regression fix is exactly 1 slice. If two slices are steps of the same capability, merge them into one. If bad tasks or blocks already exist, update/delete that bad shape before adding more.
create_taskunsupported architectureTask selects implementation architecture not present in the spec or an answered decision: REST. Remove the invented mechanism, or first capture the PM-approved architecture choice in spec evidence.
Remove or reword the unsupported claim: keep only content the PM stated, selected, or the repository verified. If the claim is load-bearing, ask the PM instead of asserting it. This gate family will not block again this session for a rewrite without the claim — but resubmitting this same rejected content is rejected every time; retry once without the claim, then move on; do not loop on rewording.
What it had to clear
Every section had to score at or above 0.90 before create_task would run at all. This is the gate.
5 goal blocks cover authoring, promotion, creation, lifecycle management, and starter templates. Audience (org-scoped teams) is clear. The grilling interaction with template blocks is understood and documented. The key constraint (templates are structure+prompts, not bypass) is captured. One question was dismissed as misdirected — user reframed the feature correctly.
7 constraint blocks cover data model (blocks + metadata, no code), template behavior (prompts not assertions, cannot pass gate alone), promotion mechanics (must strip specifics), lifecycle (retirement freezes not breaks), scope (org-scoped, v1 exclusions listed), and starter quality bar. One unconfirmed authority dimension (who can author/retire) was dropped as not yet PM-decided but non-blocking for v1.
4 acceptance criteria cover the core observable outcomes: template-created specs start unscored (Path A guard), promotion converts assertions to prompts, retirement hides from picker without breaking existing specs, and templates are org-scoped. The promotion conversion mechanism (automatic vs review-step) is a design detail left to implementation, not a missing PM decision.
3 coarse tasks each delivering an independently demoable user-visible capability: template management gallery + lifecycle, promote-spec-to-template, and create-spec-from-template. Each task owns unique acceptance criteria, tasks cross all layers (data + API + UI), no layer-splitting or phase-dependency tasks. Trace graph covers all goals and ACs with 24 edges.
The spec it produced
How it hangs together
Author reusable spec templates
- constrainsTemplates are blocks + metadata, not code
- constrainsTemplate blocks carry prompts, never assertions
- constrainsTemplates out of scope for v1
- constrainsTemplate blocks cannot pass the gate alone
- constrainsTemplates are strictly org-scoped
- constrainsOrg admins author and retire templates
- validatesTemplate spec starts unscored
- validatesTemplates scoped to owning org
Create new spec from template
- constrainsTemplate blocks cannot pass the gate alone
- constrainsTemplates are strictly org-scoped
- validatesTemplate spec starts unscored
Ship three starter templates
- constrainsTemplate blocks cannot pass the gate alone
- validatesTemplate spec starts unscored
Promote existing spec to template
- constrainsTemplate blocks carry prompts, never assertions
- constrainsPromotion strips specific assertions
- constrainsOrg admins author and retire templates
- validatesPromotion converts assertions to prompts
Manage template lifecycle
- constrainsRetired templates freeze, not break
- constrainsOrg admins author and retire templates
- validatesRetired template hidden from picker
Retired template hidden from picker
- implementsAdd template gallery with authoring and lifecycle management
Templates scoped to owning org
- implementsAdd template gallery with authoring and lifecycle management
Promotion converts assertions to prompts
- implementsPromote an existing spec to a reusable template
Template spec starts unscored
- implementsCreate a new spec from a template scaffold
What the gate released
Add template gallery with authoring and lifecycle management
Backend data model for org-scoped templates (storing block scaffold + metadata), API endpoints gated to org admins for create/read/update/delete/retire, and an admin gallery UI listing templates with create-from-scratch and retire actions. Template blocks use only the existing editor block types. Retiring removes the template from the active creation picker without affecting existing specs created from it. Ship three seeded starter templates (feature, integration, migration) so a new org's gallery is never empty. Automated assertions: - Retired template hidden from picker — no longer appears in the new-spec creation picker - Templates scoped to owning org — never appear in org B's creation flow
Promote an existing spec to a reusable template
Add a "Promote to template" action on a spec page, available to org admins. Promoting takes the spec's goal, constraint, acceptance_criterion, and section_header blocks and converts each block's specific prose into probing/placeholder language (typed gaps, questions, structural framing) suitable as a template scaffold. Paragraph blocks may be kept as template body content. The conversion is visible to the reviewing admin before the template is saved. The resulting template appears in the org's template gallery for use in new spec creation. Automated assertions: - Promotion converts assertions to prompts — never carried verbatim into the template
Create a new spec from a template scaffold
Extend the spec creation flow (CaptureBox / ?capture=1) to show a template picker when templates exist. When a template is selected, the new spec's editor document is initialized with the template's scaffold blocks instead of the current two-block Overview-only default. The resulting spec starts with all section scores at 0 — the agent grills each section as normal since template blocks use probing language, not finished assertions. Automated assertions: - Template spec starts unscored — immediately — no sections scored yet' across all four sections immediately after creation — must not register as passing the semantic coverage gate — the agent must still grill each section before it can reach ≥0
zenorm workYour coding agent claims the task, implements it against the full spec, and gates itself on typecheck, lint, and tests.
A real request, the questions the agent asked, and every place the server refused its output. No product announcements.