en un clic
write
Write a specification document
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Write a specification document
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
| name | write |
| description | Write a specification document |
Do not re-invoke this skill recursively or reread instructions in a loop. Treat failed tool calls, patch-context mismatches, test failures, and command mistakes as recoverable unless they reveal a genuine blocker. Inspect the current state, correct the cause, and continue. Retrying or adapting a failed operation within this workflow is allowed; do not restart from the beginning. If a patch no longer matches, reread the affected file and regenerate a smaller patch against its current contents. Stop only when progress requires missing configuration or authority, unavailable external state, destructive or irreversible action, a material product choice not resolved by the request or repository, or no defensible safe path remains after diagnosis.
You are writing a specification document. The user's request contains the context/requirements for the spec.
Write and commit one specification, then stop. Do not implement it in the same task.
.agents/skill-configs/spex/config.local.yaml (local scope, gitignored).agents/skill-configs/spex/config.yaml (project scope, committed to repo).agent-workspace/spex/config.local.yaml, .agent-workspace/spex/config.yaml, then .claude/skill-configs/spex/config.local.yaml, .claude/skill-configs/spex/config.yaml. If config is found only at a legacy path, use it and offer to move it to the new location."No spex config found. I need a workspace directory to store spec files. You can either:
- Specify a custom path
- Use the default
.agent-workspace/specsI'll create
.agents/skill-configs/spex/config.yamlwith your choice. (If you use the local scope, add.agents/skill-configs/spex/config.local.yamlto .gitignore.) (Seeconfig.example.yamlbeside this skill for reference.)" Wait for the user's response, then create the config file before continuing.
${SPECS_DIR} to the resolved workspace_dir. All paths below use this variable.Step 1: Create timestamped spec file
# Generate timestamp and create spec
TIMESTAMP=$(date +"%y%m%d-%H%M%S")
touch ${SPECS_DIR}/${TIMESTAMP}-descriptive-name.md
File naming: {YYMMDD-HHMMSS}-{kebab-case-description}.md
Location: ${SPECS_DIR}/ directory
Step 2: Investigate thoroughly
Before proposing solutions:
Step 3: Write complete spec
Use this template:
# [Component/Feature] - [Brief Issue]
**Date:** YYYY-MM-DD HH:MM:SS
**Issue:** One-line problem description
**Priority:** [High/Medium/Low]
**Status:** Requires Implementation
## Problem Statement
- Current behavior (what's broken)
- Expected behavior (what should happen)
- Impact on users/system
## Root Cause Analysis
- Technical investigation with code examples
- Why the problem exists
- Comparison with working implementations if available
## Technical Approach
- Proposed solution methodology
- High-level implementation strategy
- Rationale for chosen approach
## Implementation Details
- Specific code changes with file paths
- Step-by-step implementation plan
- Testing strategy
- All commands and dependencies needed
Step 4: Git commit and STOP
Clone test: before committing, re-read the spec as a stranger on a
fresh clone — only git ls-files content exists. Grep the spec dir for
references to untracked/ignored paths, absolute user paths, and
conversation phrasing. Anything that fails resolves in one of two ways:
commit the referenced material to a tracked location, or rewrite the
reference. Committing a spec whose sources are gitignored is a silent
failure. (The Writing Quality Checklist is the itemized form of this
gate.)
# Add the spec file only
git add ${SPECS_DIR}/${TIMESTAMP}-descriptive-name.md
# Commit with descriptive message
git commit -m "spec: add specification for [brief description]
Created spec: ${TIMESTAMP}-descriptive-name.md
Status: Requires Implementation"
STOP HERE - Your work is done. Implementation will be handled by a different agent.
Before committing, verify:
${SPECS_DIR}/ directorygit ls-files / git check-ignore -v <path>). If normative
source material is untracked or gitignored, stop and ask the
user: commit it to a tracked location (updating references) or
inline it — never reference it in place. (This is the mechanical
form of the Clone test in Step 4.)/Users/..., /home/..., $HOME
literals). Use repo-relative paths or
cd "$(git rev-parse --show-toplevel)" in workflows.git check-ignore every path the spec
instructs the implementer to CREATE; where a tracked ignore
pattern would swallow it, the spec must carry an explicit
un-ignore instruction (e.g. !/bin/).Run through the checklist once. If the spec covers the problem, root cause, approach, and implementation details, commit it. Do not iterate.
Content principles:
Code examples format:
// src/components/Example.tsx:42
const problematic = () => { /* ... */ };
// Fixed version:
const corrected = () => { /* ... */ };
## Root Cause Analysis
The issue occurs in `src/components/Button.tsx:87-92`:
\`\`\`typescript
// Current problematic implementation
const handleClick = () => {
// Missing validation
processData(data);
};
\`\`\`
Similar functionality in `src/components/Form.tsx:145` handles this correctly.
## Implementation Details
**Files to modify**:
- `src/components/Button.tsx` - Add validation
- `src/types/index.ts` - Add new type definition
**Dependencies**:
\`\`\`bash
npm install zod
\`\`\`
**Testing**:
\`\`\`bash
npm run dev
# Navigate to http://localhost:5173/test-page
# Click button and verify validation works
\`\`\`
## Implementation Details
**Step 1: Add type definitions**
\`\`\`typescript
// src/types/validation.ts
export interface ValidationRule { /* ... */ }
\`\`\`
**Step 2: Implement validation logic**
\`\`\`typescript
// src/utils/validator.ts:1
export const validateInput = (/* ... */) => { /* ... */ }
\`\`\`
**Step 3: Integrate into component**
\`\`\`typescript
// src/components/Form.tsx:42
import { validateInput } from '@/utils/validator';
// Apply validation before submission
\`\`\`
❌ Vague problem statements: "The form doesn't work right"
✅ Specific problem statements:
"Form submission in src/components/ContactForm.tsx:87 allows invalid email formats to pass validation, causing 400 errors from the API"
❌ Assumed missing functionality: "We need to add validation because there is none"
✅ Verified gaps:
"Searched codebase with grep -r 'emailValidation' src/ - validation exists in auth/ but not in contact/ forms"
❌ Scope creep: "Fix email validation AND redesign the form UI AND add analytics"
✅ Focused solution:
"Add email validation to contact form using existing validation utilities from src/auth/validators.ts"
❌ Writing and implementing in same session: Don't create spec and immediately implement it
✅ Separate sessions: Write spec → commit → stop. Later: implement spec → update status → commit
${SPECS_DIR}/
├── {timestamp}-name.md # New specs (Status: Requires Implementation)
├── active/ # In progress (Status: In Progress)
├── archive/
│ ├── implemented/ # Completed (Status: Completed)
│ └── deprecated/ # Obsolete (Status: Deprecated)
└── drafts/ # Work-in-progress ideas
${SPECS_DIR}/git add ${SPECS_DIR}/{spec}.md && git commitUser-invoked shorthand that inverts delegation — produce a filesystem bundle (checklist, drop-bin directory, notes template) of human-only actions and artifacts blocking project progress, and launch the user's editor on it.
Explicit-request macro. Activate only when the user directly requests this macro; never infer activation from task characteristics. Skill — Shorthand that tells the agent to ask clarifying questions instead of making decisions on its own
Explicit-request macro. Activate only when the user directly requests this macro; never infer activation from task characteristics. Skill — Sequence a task as ordered parts that add up to the whole. Each iteration may read prior iterations' outputs.
Explicit-request macro. Activate only when the user directly requests this macro; never infer activation from task characteristics. Skill — Run N blind agents on the same job in parallel, then merge findings into consensus/unique/conflicts. Agents report only — no edits for concurrent safety.
Explicit-request macro. Activate only when the user directly requests this macro; never infer activation from task characteristics. Skill — Use subagents to save context space and/or parallelize subtasks where possible
Explicit-request macro. Activate only when the user directly requests this macro; never infer activation from task characteristics. Skill — Spawns an independent subagent to critique recent work with web research. Use when the user wants a second opinion, says "doubt this", or wants to verify code against docs.