---
name: spec-creation-updating
description: Create, update, review, and improve technical specification documents so they are complete, testable, and implementation-ready. Use when defining new features/systems/APIs, updating existing specs, restructuring documents, auditing missing requirements, or converting vague plans into concrete, verifiable requirements and acceptance criteria.
title: spec-creation-updating
canonical_url: https://skilld.dev/gh/fiveonecode/agent-skills/spec-creation-updating
last_updated: 2026-09-28T22:22:23.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/fiveonecode/agent-skills/spec-creation-updating/agents/openai.yaml), [references/spec-must-have-checklist.md](https://skilld.dev/api/skills-raw/fiveonecode/agent-skills/spec-creation-updating/references/spec-must-have-checklist.md), [references/spec-review-scorecard.md](https://skilld.dev/api/skills-raw/fiveonecode/agent-skills/spec-creation-updating/references/spec-review-scorecard.md), [references/spec-template.md](https://skilld.dev/api/skills-raw/fiveonecode/agent-skills/spec-creation-updating/references/spec-template.md).
>
> If the user asked to install this Skill, run `npx skilld install fiveonecode/agent-skills/spec-creation-updating`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/spec-creation-updating`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/fiveonecode/agent-skills/spec-creation-updating) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/spec-creation-updating`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/spec-creation-updating --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/spec-creation-updating --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Spec Creation Updating

## Overview

Produce specs that reduce ambiguity and can be implemented with minimal back-and-forth.
Apply this workflow to any project domain (product, backend, API, data, UI, infrastructure, ops).

## Workflow

### 1. Set boundaries

- Capture the objective and user/business value.
- Define in-scope and out-of-scope behavior.
- Record assumptions, dependencies, and constraints.
- Ask clarifying questions when decisions affect architecture, cost, security, or user-visible behavior.

### 2. Choose depth

- Write a lightweight spec for isolated, low-risk changes.
- Write a full system spec for cross-team, risky, or high-impact work.
- Keep the same quality gates regardless of depth.

### 3. Build structure

- Start from [`references/spec-template.md`](https://skilld.dev/api/skills-raw/fiveonecode/agent-skills/spec-creation-updating/references/spec-template.md).
- Preserve repository naming, section ordering, and style if they already exist.
- Add domain-specific sections as needed, but do not remove mandatory content.

### 4. Fill concrete requirements

- Write requirements as testable statements, not intentions.
- Define success paths, edge cases, and failure behavior.
- Specify interfaces, data contracts, and state transitions when relevant.
- Specify non-functional requirements: performance, reliability, scalability, observability.
- When work spans existing code paths, add an implementation map that names the
  canonical files or directories to edit and adjacent paths that must remain
  untouched. Keep the map aligned with the repository's real structure so an
  implementer does not have to infer sibling paths from prose.
- For external, generated, AI-facing, or verifier-owned contracts, add a machine-checkable contract block before implementation details.

### 5. Define verification and completion

- Map each requirement to a verification method.
- Bind every requirement to a concrete verifier, test, or manual check ID; bind every verifier back to the requirement it proves.
- Include reproducible commands, tests, and manual checks when automation is unavailable.
- Define completion criteria with pass/fail outcomes.

### 6. Close traceability

- Link related specs, ADRs, designs, and operational docs.
- Update version, last-updated date, and status.
- Record unresolved questions and decision owners.

### 7. Run quality gate

- Validate against [`references/spec-must-have-checklist.md`](https://skilld.dev/api/skills-raw/fiveonecode/agent-skills/spec-creation-updating/references/spec-must-have-checklist.md).
- Use [`references/spec-review-scorecard.md`](https://skilld.dev/api/skills-raw/fiveonecode/agent-skills/spec-creation-updating/references/spec-review-scorecard.md) when auditing an existing spec.
- Treat any missing MUST item as blocking.

## Writing rules

- Prefer precise language over broad terms like "optimize", "support", or "handle".
- Use explicit units, limits, and conditions.
- Mark implemented vs planned behavior with explicit status labels.
- Keep requirements and facts in the spec; keep narrative concise.
- Avoid embedding secrets or private credentials in reusable specs.

## Machine-checkable contract blocks

Use this block when a contract crosses a subsystem boundary, drives generated data, constrains model/tool output, or owns verifier behavior.

Include:

- Canonical tokens, enum values, identifiers, and version fields.
- Predicate tables or mapping rules for eligibility, routing, projection, fallback, and publication decisions.
- App-owned envelope fields separated from model, user, service, or generated output.
- Validator order, fail-closed behavior, retry/idempotency rules, and forbidden silent-discard cases.
- Redaction and observability rules for logs, traces, QA artifacts, and analytics.
- Publication gates, rollout state, and backwards-compatibility rules when output becomes durable.
- Boundary-proof cases that show the exact allowed and disallowed edges.
- Requirement-to-verifier binding with stable IDs.

Do not rely on prose such as "validate the output" or "handle failures" when a table, enum list, state transition, or verifier binding would make the rule mechanically checkable.

## Output expectations

- When creating a spec, deliver:
  - A complete spec document.
  - A list of unresolved questions.
  - A verification plan mapped to requirements.
- When reviewing a spec, deliver:
  - Prioritized gaps and risks.
  - Concrete rewrite suggestions.
  - A readiness verdict based on MUST items.
