write-spec
Skill19 starsChanged 5 months agoMITView on GitHub
A prompt template that turns a settled 7w3 design into a canonical, build-ready implementation specification covering data, API, security, testing, and deployment.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- dzhng/skillstheir own version, first seen Oct 4, 2026
- dzhng/jevgreptheir own version, first seen Oct 2, 2026
- dzhng/duet-agenttheir own version, first seen Oct 2, 2026
- NinjaSln-labs/agent-skillstheir own version, first seen Oct 2, 2026
- taipt1504/claudehuttheir own version, first seen Oct 2, 2026
- anthod0/skillstheir own version, first seen Sep 19, 2026
Used with
Projects with it also use audit-choices, close-spec and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dzhngSkillaudit-choices
Audit the choices an implementing agent made, not its diff — a pure decision audit that traces the session's history into a choices ledger, changes no code, and never blocks an unsupervised run. Working code still embeds architecture the user never chose; surface it because future work inherits it. Use when the user wants to review the decisions the AI made on their behalf, before merging or committing AI-implemented work, when integrating a delegated subagent's pass, or when a fix "works" but might be a point fix.
Also in 3 projects that use this
dzhngSkillclose-spec
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).
Also in 3 projects that use this
LucasMatuszewskiSkillaudit-agents
Audit and maintain agent configuration files (.claude/agents, AGENTS.md, CLAUDE.md, agent-memory). Checks for duplicates, outdated info, naming conflicts, wrong technical facts, and files over 200 lines. Fixes all issues and commits.
Also in 3 projects that use this
Halcyon666Skillwrite-skills
Creates high-quality Agent Skills (SKILL.md files) that follow the open Agent Skills specification. Use when asked to create a skill, write a SKILL.md, package agent instructions, build a reusable capability, or turn a workflow into a shareable skill. Produces spec-compliant, concise, well-structured skills optimized for agent discovery and execution.
Also in 3 projects that use this
isLinXuSkilleval-skills
AI Agent Skill unit testing framework. A framework-agnostic toolkit for discovering, scaffolding, selecting, evaluating, and reporting on AI skills. Use this skill to assess skill quality before production, compare candidate skills on the same benchmark, enforce quality gates in CI/CD, and generate human-readable evaluation reports.
Also in 3 projects that use this
Arman-KudaibergenovSkillwrite-plan
Этот скилл MUST быть вызван когда есть design.md и нужно разбить доработку на атомарные задачи (2-5 мин) с точными путями файлов и критериями проверки в tasks.md. SHOULD также вызывать как промежуточный шаг между brainstorm и subagent-dev. Do NOT использовать для обсуждения идеи — используй brainstorm; для выполнения задач — используй subagent-dev.
Also in 4 projects that use this
- +6 more from dzhng
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- anthropics/knowledge-work-plugins★ 26ksame name
- dzhng/jevgrep★ 2.3ksame name
- dzhng/skills★ 978same name
- dzhng/duet-agent★ 46same name
- oopsla5xx/oops-skills★ 4same name
- Gusen1453/creed★ 3same name
- hassan-mohiddin/freeflow★ 3same name
- arcadesunlabs/skills★ 2same name
- taipt1504/claudehut★ 2same name
- fclabs/skills★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- architecture-guardrailsSkill
- converging-and-polishingSkill
- delivering-mvp-fleetSkill
- designing-with-7w3Skill
- disruptorSkill
- qa-demo-standSkill
- setting-up-domain-modelSkill
- setup-serverSkill
- slicing-into-tracer-bulletsSkill
- spawning-reviewersSkill
- unvibe-reviewSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
36 rules. 0 are common, 34 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
34
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 87
Create a specification of such a level that, from it, one can:
- Distinctive: line 108
Do not invent hidden default values for mandatory data and settings.
- Distinctive: line 110
All external side effects must be explicit: events, background jobs, action log, retries, duplicate suppression.
- Very specific: line 129
Add a Scope Rules subsection with hard rules for changing the boundaries.
- Very specific: line 148
After the table, add Glossary Rules: a list of prohibitions against mixing similar concepts.
- Distinctive: line 152
If the product may be used across different industries, roles, countries, customer types, or business models, describe:
- Distinctive: line 160
If universality is not needed, explicitly explain why and which boundaries must still not be mixed.
- Distinctive: line 191
every command, handler, screen, background job, and AI scenario must reference one or more use case IDs.
- Distinctive: line 193
if a new feature does not map onto the catalog, the specification is updated first.
- Distinctive: line 205
After each table, add invariants:
- Distinctive: line 218
import or a bulk operation, if present.
- Distinctive: line 252
when it is published;
- Distinctive: line 278
If there is multi-tenancy, state:
- Distinctive: line 306
Add a unified error format:
- Distinctive: line 322
when an idempotency key against re-submission is mandatory.
- Distinctive: line 376
After the folder tree, add rules:
- Distinctive: line 389
read the specification and local contracts before changing anything.
- Distinctive: line 390
always determine the bounded context and use case.
- Distinctive: line 393
no hidden default values for mandatory data.
- Distinctive: line 418
After the table, add modeling rules:
- Distinctive: line 429
If the product is multi-tenant, describe the tenant isolation model.
- Distinctive: line 431
If the product is not multi-tenant, describe the model of data ownership by users, organizations, teams, or projects.
- Distinctive: line 455
If there is import, bulk update, or synchronization, describe:
- Distinctive: line 497
all permissions are checked on the server.
- Distinctive: line 499
if a permission is not in the specification, it is forbidden.
- Distinctive: line 503
If the product receives data from external channels or sends data outward, describe:
- Distinctive: line 562
If the product has work assignment, routing, queues, deadlines, or workload, describe:
- Distinctive: line 575
If duplicates or data merging are possible, describe:
- Distinctive: line 611
If the product works with files, describe:
- Distinctive: line 625
If the product sends notifications, describe:
- Distinctive: line 647
read models or marts;
- Distinctive: line 783
Do not use abstract promises.
- Distinctive: line 826
when it must be decided;
- Distinctive: line 834
If a quick implementation violates this specification, the implementation must be fixed, not the specification watered down for convenience.
- Distinctive: line 838
Before producing the final specification, check yourself against the checklist:
- Distinctive: line 857
If the input data is insufficient for a precise decision, do not invent critical details.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Write spec
Stage contract
- Stage: 2. Spec · Kind: prompt
- Inputs: the 7w3 design (stage 1) + known stack/constraints.
- Outputs: a canonical, build-ready specification — every behavior stated; anything unspecified must not be silently invented at build time.
- Entry gate: the design is settled (7w3's done-gate met).
- Done when: DB, backend, UI, integrations, tests, and security can all be built from it without verbal clarification.
- Next: the
architecture-guardrailsskill. - Maintains: uses CONTEXT.md vocabulary; surface new decisions as ADRs.
- Note: this file is a prompt template — everything below the line is the prompt.
Fill its
<placeholders>with the design's facts and hand the whole thing to a fresh executor agent; don't paraphrase it.
You act as the product's chief architect, systems analyst, and technical lead. Your task is to prepare not an overview and not a marketing description, but a canonical implementation specification from which the team and AI agents can build the product without constant verbal clarifications.
Write the specification in the language the user works in (<language> placeholder, default: the language of the input design), in plain understandable language, but with sufficient technical precision. If you use a technical term, explain it immediately in simple words. Do not write generic phrases like "security needs to be thought through". Instead, pin down concrete rules, tables, states, constraints, checks, and readiness criteria.
Input Data
Product: <product name>
Short description: <what the product does and for whom>
Target audience: <who the users, customers, administrators, external participants are>
Specification language: <language; default: the language of the input design>
Current implementation stage: <e.g.: Phase 1 / MVP / first production release / pilot>
What is definitely in scope for the current stage:
<item><item><item>
What is definitely out of scope for the current stage:
<item><item><item>
Future stages that need architectural groundwork, but no implementation now:
<stage or direction><stage or direction>
Preferred technology stack, if already chosen:
- Frontend:
<stack or "propose one"> - Backend:
<stack or "propose one"> - Database:
<stack or "propose one"> - Queues and background jobs:
<stack or "propose one"> - Files:
<stack or "propose one"> - Observability:
<stack or "propose one"> - AI/LLM:
<stack or "propose one">
Business, legal, security, or operational constraints:
<constraint><constraint>
Important integrations:
<integration><integration>
Expected product surfaces:
<e.g.: admin panel><e.g.: customer account area><e.g.: public widget><e.g.: mobile app>
Main Goal
Create a specification of such a level that, from it, one can:
- design the database;
- build the server side;
- build the user interfaces;
- write the integrations;
- write the tests;
- verify security;
- deploy the product;
- delegate tasks to AI agents without loss of context.
The document must be strict: if a behavior is not described, the implementation must not silently invent it.
Mandatory Principles Of The Document
- First fix the product's boundaries: what is in scope now, what is out of scope now, what is left for the future.
- Separate user scenarios, business entities, technical channels, notifications, analytics, and external integrations.
- For every important operation, state the acting party, the launch conditions, the successful outcome, and the side effects.
- For entities with statuses, describe the finite state machine: from where to where transitions are allowed, who may perform them, which invariants must not be violated.
- For data, state what is the source of truth, what is a derived read model, what is stored immutably, and what may be changed.
- For access rights, use the "deny by default" rule.
- Do not invent hidden default values for mandatory data and settings. If a value is needed for correct operation, the system must explicitly require it and fail with a clear error when it is missing.
- AI must be an advisor, not an invisible owner of business state: all AI results pass schema validation, a confidence threshold, and deterministic rules.
- All external side effects must be explicit: events, background jobs, action log, retries, duplicate suppression.
- Errors must have a stable code, a human-readable message, and a next-step hint where useful.
- Architectural rules must be verifiable by automation wherever possible.
Required Specification Structure
Produce a document with the following sections.
1. Product Scope
Describe:
- the product's purpose;
- the current implementation stage;
- what is in scope for the stage;
- what is out of scope;
- which future stages are accounted for only as extension points;
- a rule forbidding turning the current stage into a throwaway prototype if the product must live long.
Add a Scope Rules subsection with hard rules for changing the boundaries.
Golden case cards
3–5 concrete end-to-end scenarios with named actors, real inputs, and exact expected outcomes. They anchor parallel builders (align to the cards, not to each other), become the demo script, and become the acceptance evals. Write them before any breakdown.
2. Glossary
Make a table of terms.
For each term, state:
- name;
- a simple definition;
- important notes;
- what this term is not, if there is a risk of confusing it with another.
After the table, add Glossary Rules: a list of prohibitions against mixing similar concepts.
3. Universal Core And Product Templates
If the product may be used across different industries, roles, countries, customer types, or business models, describe:
- what is the universal core;
- what is defined by settings or templates;
- which differences must not spawn separate parallel implementations;
- which starter templates are needed now;
- which next template or scenario must be possible without rewriting the core.
If universality is not needed, explicitly explain why and which boundaries must still not be mixed.
4. Use-Case Catalog
Compose a catalog of key scenarios.
Break it down by product areas.
Each row must contain:
ID;- scenario name;
- primary acting party;
- preconditions;
- successful outcome;
- main side effects.
Be sure to cover:
- sign-in and user management;
- the product's main working scenarios;
- creation, modification, and closing of key business objects;
- external integrations;
- background jobs;
- notifications;
- analytics;
- customer or administrator settings;
- public surfaces, if any.
Add Use-Case Rules:
- every command, handler, screen, background job, and AI scenario must reference one or more use case IDs;
- hidden side effects are forbidden;
- if a new feature does not map onto the catalog, the specification is updated first.
5. Canonical State Machines
For each entity with statuses, describe a table:
From;To;Trigger;Allowed actors;Notes.
After each table, add invariants:
- which states are terminal;
- which transitions are forbidden;
- which transitions require a reason;
- what is written to the history;
- which direct status changes are forbidden.
At minimum, cover:
- the product's main working entity;
- assignment or task ownership, if present;
- the user session;
- import or a bulk operation, if present;
- a notification or delivery, if present;
- content publication, if present.
6. Canonical Event Catalog
Describe events as facts that have already happened, not as commands.
First fix the rules:
- where events are created;
- how redelivery is ensured;
- how consumers must be resilient to reprocessing;
- how events are versioned;
- why events do not replace the primary database, unless this is event sourcing.
Describe the event envelope:
- event id;
- name;
- version;
- time;
- tenant/client/account id, if the product is multi-tenant;
- aggregate type;
- aggregate id;
- actor;
- correlation id;
- causation id;
- payload.
Make event tables by product area:
- event;
- who publishes;
- when it is published;
- mandatory fields;
- typical consumers.
7. Data Model Level 2
Describe the logical data model at the level of tables or collections.
For each table, state:
- name;
- purpose;
- mandatory fields;
- key constraints.
Be sure to describe:
- identifiers;
- dates and times;
- soft archiving or deletion;
- immutable records;
- action history;
- relationships between entities;
- rules for JSON/flexible fields;
- rules for personal and sensitive data.
If there is multi-tenancy, state:
- where
tenant/account/org idis stored; - how data cross-contamination is forbidden;
- which tables may be global;
- how unique keys are built.
8. API Contract Baseline
Describe the chosen API style.
State:
- the base prefix;
- the data format;
- the source of truth for schemas;
- how documentation is generated;
- where business logic must not live.
Make a catalog of endpoints in tables:
- method;
- path;
- who has access;
- linked use case IDs;
- whether protection against request re-submission is needed;
- notes.
Add a unified error format:
{
"error": {
"code": "STABLE_ERROR_CODE",
"message": "A human-readable explanation of what went wrong.",
"hint": "What to do next, if applicable.",
"requestId": "...",
"details": {}
}
}Describe the rules:
- when an idempotency key against re-submission is mandatory;
- how pagination works;
- how filters are specified;
- how breaking changes are handled;
- how external webhooks/callbacks are verified;
- why DTOs must not leak straight from the database without an explicit schema.
9. Canonical Architecture
Describe the architectural baseline:
- repository type;
- modularity style;
- application boundaries;
- where business logic lives;
- where integrations live;
- where background jobs live;
- where the user interface lives;
- where the shared technical platform lives.
Make a list of the chosen technologies and a list of explicitly forbidden baseline solutions, if they create a risk of complexity or hidden logic.
10. Source-Of-Truth Rules
Describe what is the primary source of truth for:
- product rules;
- business logic;
- API schemas;
- the database schema;
- migrations;
- runtime settings;
- event routing;
- user interfaces.
Separately list where critical business logic is forbidden to live: for example, only in AI prompts, only in SQL read models, only in the interface, only in CI scripts, or in an external process builder.
11. Repo Layout
Propose a repository structure.
Describe:
- applications;
- modules by business area;
- the contracts layer;
- the domain layer;
- functional vertical slices;
- infrastructure adapters;
- tests;
- platform capabilities;
- documentation;
- architecture-checking tools.
After the folder tree, add rules:
- which imports are allowed;
- which imports are forbidden;
- where tests must live;
- where a module's public boundary must be;
- which folders are forbidden, so that shapeless
utils/common/helpersdo not appear; - which architectural rules must be checked automatically.
12. AI-Agent Delivery Rules
Describe the rules so that AI agents can safely evolve the codebase:
- read the specification and local contracts before changing anything;
- always determine the bounded context and use case;
- tests before logic for behavior changes;
- the minimal correct change;
- no hidden default values for mandatory data;
- clear errors;
- file size limits;
- comments on non-obvious logic blocks;
- external side effects only via explicit adapters, events, or background jobs;
- automatic architecture checking as a mandatory barrier.
13. Bounded Contexts
Make a table of business areas:
- context;
- what it owns;
- what it does not own.
Important: explicitly separate similar areas that are easy to mix. For example: communications and notifications, user and session, payment and invoice, order and message, file and attachment, event and command.
14. Canonical Domain Model
Make a table of aggregates and key entities:
- entity;
- purpose;
- invariants.
After the table, add modeling rules:
- which entities are not equal to each other;
- which relationships are allowed;
- where history is needed;
- where physical deletion is forbidden;
- which AI results are not state until validated;
- which analytical data is derived.
15. Multitenancy Or Ownership Model
If the product is multi-tenant, describe the tenant isolation model.
If the product is not multi-tenant, describe the model of data ownership by users, organizations, teams, or projects.
State:
- how the data owner is determined;
- which data is global;
- how access is checked;
- how keys are built;
- how background jobs preserve the owner context;
- how files and analytics preserve access boundaries.
16. Data Rules And Import Rules
Describe the general data rules:
- identifier format;
- time and time zones;
- archiving;
- change history;
- personal data;
- JSON fields;
- foreign keys;
- table naming rules.
If there is import, bulk update, or synchronization, describe:
- the two-step process
preview/validation->execute; - per-row errors;
- explicit confirmation of dangerous changes;
- prohibition of implicit deletions;
- the merge policy;
- error codes;
- the preview response contract.
17. Auth, Sessions And CSRF
Describe:
- who is the source of authorization;
- login types;
- sessions;
- lifetimes;
- rotation/revocation;
- protection of browser requests;
- throttling/rate limit;
- access recovery;
- why the user interface is not a security boundary.
18. RBAC Matrix
Make a role matrix:
- role;
- scope;
- main rights.
Then make a permissions table:
- permission code;
- meaning;
- allowed roles;
- scope restrictions.
Rules:
- deny-by-default;
- all permissions are checked on the server;
- privileged actions are logged;
- if a permission is not in the specification, it is forbidden.
19. Channel And Integration Model
If the product receives data from external channels or sends data outward, describe:
- the channels;
- the authorization model of each channel;
- how a channel is linked to a client/user/organization;
- what counts as a trustworthy identity;
- how attachments are handled;
- how retries are handled;
- how the original external data is stored;
- which actions a channel has no right to perform directly.
For each channel, make a contract:
- direction;
- binding;
- identity source;
- dialog or operation identifier;
- message or event identifier;
- attachments;
- replies;
- delivery confirmations;
- fault tolerance;
- special rules.
20. Frontend Runtime And UI Flow Specs
Describe all user surfaces.
For each surface, make a table of flows:
Flow ID;- screen or entry point;
- primary acting party;
- happy path;
- mandatory states for error, empty result, loading, access denied, and conflict.
Add interface rules:
- the interface does not compute permissions as a source of truth;
- stale state is not silently overwritten;
- dangerous actions require confirmation;
- errors must be understandable to the user;
- important statuses, history, and decision reasons must be visible.
21. Main Business Lifecycle
Describe the lifecycle of the product's main business entity in plain language and with a table.
State:
- internal statuses;
- user-facing statuses, if they differ;
- who may change the status;
- what happens to the history;
- how reopening, cancellation, rejection, duplicates, and archiving work;
- which actions require a reason.
22. Assignment, Routing, SLA Or Workload Rules
If the product has work assignment, routing, queues, deadlines, or workload, describe:
- how the performer or queue is chosen;
- which data is used;
- what is forbidden to choose;
- how deadlines are calculated;
- what pauses a deadline;
- what counts as a violation;
- how races and concurrent changes are handled;
- which changes must be visible in the history.
23. Dedupe, Merge And Conflict Rules
If duplicates or data merging are possible, describe:
- duplicate criteria;
- what AI may propose;
- what a rule or a human must confirm;
- which merges are forbidden;
- how the link to the original objects is stored;
- how an erroneous decision is rolled back;
- which conflicts block the operation.
24. AI Operating Model
Describe all AI scenarios.
For each, state:
- the use case;
- input data;
- the output schema;
- the confidence threshold;
- what the system does at low confidence;
- which fields AI has no right to change;
- which checks run after the response;
- how requests are logged;
- how quality evaluations are set up;
- what counts as an unacceptable response.
Rules:
- AI does not extend access rights;
- AI does not bypass consents, deadlines, settings, and policies;
- AI does not create mandatory data out of thin air;
- an AI response does not become business state without validation.
25. Files And Media
If the product works with files, describe:
- where the bytes are stored;
- where the metadata is stored;
- how links to business objects are created;
- how access is checked;
- how scanning is performed;
- how temporary links are issued;
- what is logged;
- which file types are allowed;
- what happens when a file is blocked.
26. Notifications And Campaigns
If the product sends notifications, describe:
- how a notification differs from an ordinary message or comment;
- notification types;
- the audience;
- consents and preferences;
- channel selection;
- quiet hours;
- duplicate suppression;
- retries;
- reasons for final failure;
- the two-step process for mass sends: preview -> publish/schedule;
- the preview contract;
- suppression codes.
27. Analytics And Read Models
Describe analytics as a separate layer, not as heavy queries straight against the working tables.
State:
- data sources;
- read models or marts;
- refresh frequency;
- metrics;
- formulas;
- what the user sees when data is stale;
- which widgets may fail independently;
- how drill-down transitions are built;
- which exports are allowed.
28. Observability
Describe the mandatory log fields:
- request id;
- trace id;
- owner/tenant/account id;
- actor id;
- module;
- use case;
- entity type;
- entity id;
- provider, if applicable.
List what must be logged.
Describe the baseline alert signals:
- error spikes;
- queue lag;
- external provider failure;
- AI errors;
- file errors;
- database problems;
- notification delivery problems.
29. Security, Privacy And Compliance
Describe:
- encryption;
- secrets;
- least privilege;
- audit;
- personal data;
- backups;
- legal or industry requirements;
- prohibition of secrets in the repository;
- prohibition of tokens in logs;
- support access;
- confirmation of destructive actions;
- data retention periods.
30. Runtime, Staging And Deploy
Describe:
- the service composition;
- environments;
- reverse proxy or entry point;
- build;
- registry;
- migrations;
- deploy order;
- readiness/liveness/startup checks;
- smoke checks;
- rollback;
- prohibition of manual hotfixes inside running containers or servers, if this matters for the project.
31. Environment And Config Contract
Describe the setting classes:
- database;
- cache;
- files;
- authorization;
- integrations;
- AI;
- observability;
- public interface settings.
For each class, state:
- examples;
- what happens when it is missing;
- whether the service may start in a degraded mode;
- where schema validation happens.
The main rule: a mandatory setting does not get an invented default value.
32. Backup And Disaster Recovery
Describe:
- what is backed up;
- the schedule;
- how restoration is verified;
- the restoration order;
- what counts as an incomplete restoration;
- how often restoration drills are conducted.
33. Testing Strategy
Describe risk-based testing: test critical risks first, not cosmetics.
Produce:
- a list of test types;
- a list of critical end-to-end scenarios;
- a minimal coverage matrix by module;
- a matrix of mandatory tests by change type;
- a release gate matrix.
Be sure to include:
- domain rule tests;
- integration tests of the database and background jobs;
- API contract tests;
- access rights tests;
- migration tests;
- redelivery tests for background handlers;
- an AI eval suite, if there is AI;
- regression tests for non-trivial fixes.
34. Non-Functional Requirements
Describe:
- availability;
- p95 read latency;
- p95 write latency;
- background job latency;
- limits on heavy operations;
- scaling;
- degradation when external providers fail.
Do not use abstract promises. Give numeric targets or explicitly state that they need to be confirmed by a load test.
35. Feature Delivery Gates
Describe the Definition of Ready:
- there is an area owner;
- there is a use case;
- the acting party, trigger, happy path, and errors are described;
- inputs and outputs are described;
- data changes are described;
- permissions and audit are described;
- tests and acceptance criteria are described.
Describe the Definition of Done:
- tests pass;
- type and quality checks pass;
- observability is added;
- the specification is updated when boundaries change;
- no hidden fallbacks;
- errors are understandable;
- permissions and data boundaries are verified;
- rollout and rollback are understood.
36. Canonical Implementation Decisions
A list of decisions that are no longer open questions.
For each decision, state:
- what was chosen;
- what was rejected;
- why;
- what consequence it has for the implementation.
37. Deferred Alignment Items
A list of questions that may be postponed but must not be forgotten.
For each, state:
- what is not yet decided;
- when it must be decided;
- which boundaries are already fixed;
- what is forbidden to do until it is decided.
38. Final Rule
Close the document with the rule:
If a quick implementation violates this specification, the implementation must be fixed, not the specification watered down for convenience.
Quality Check Before Answering
Before producing the final specification, check yourself against the checklist:
- There are explicit boundaries of the current stage and future stages.
- There is a glossary of terms and prohibitions against mixing similar concepts.
- There is a use-case catalog with IDs.
- There are finite state machines for entities with statuses.
- There are events and reprocessing rules.
- There is a data model with mandatory fields and constraints.
- There is an API catalog and a unified error format.
- There are access rights and the deny-by-default rule.
- There are AI rules, if AI is used.
- There are integration and channel rules, if any.
- There are UI flows with error and empty states.
- There is analytics as a separate layer, if analytics is needed.
- There is observability, security, data retention, deploy, backups, and recovery.
- There is a testing strategy and readiness criteria.
- There are no hidden default values for mandatory data.
- There are no placeholder phrases without a concrete decision.
If the input data is insufficient for a precise decision, do not invent critical details. Make two blocks:
Assumptions— explicitly marked working assumptions.Open Questions— questions without which a final architectural decision cannot be made.
But even with open questions, prepare the fullest possible draft specification, explicitly separating firm decisions from assumptions.
Source: Pukh (@aostrikov_agents_chat), specification prompt template. Translated from Russian.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

