Skip to main content

Spec Writer

The Spec Writer skill provides context injection for specification writing tasks, creating clear, unambiguous technical specifications using RFC 2119 language.

Overview

PropertyValue
Skill IDct-spec-writer
Tier2 (Execution)
Protocolspecification
Tagsspecification, documentation, rfc

Capabilities

  1. Protocol Specifications - Define behavior rules with RFC 2119 keywords
  2. Technical Requirements - Document system requirements with constraints
  3. API Specifications - Define interfaces, schemas, and contracts
  4. Architecture Documents - Document system design decisions

When to Use

The dispatch algorithm selects ct-spec-writer for:
  • Tasks with keywords: spec, rfc, protocol, contract
  • Tasks labeled: specification
  • Task type: specification

RFC 2119 Keywords

Specifications MUST use these keywords with their precise meanings:
KeywordMeaningExpected Compliance
MUSTAbsolute requirement95-98%
MUST NOTAbsolute prohibition93-97%
SHOULDRecommended unless good reason75-85%
SHOULD NOTDiscouraged unless good reason75-85%
MAYTruly optional40-60%

Specification Structure

# {Specification Title} v{X.Y.Z}

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document
are to be interpreted as described in RFC 2119.

---

## Overview

{2-3 sentence summary of what this spec defines}

---

## Definitions

| Term | Definition |
|------|------------|
| {term} | {definition} |

---

## Requirements

### {Category 1}

**REQ-001**: {Requirement description}
- Rationale: {Why this requirement exists}
- Verification: {How to verify compliance}

---

## Constraints

| ID | Constraint | Enforcement |
|----|------------|-------------|
| CON-001 | {constraint} | {how enforced} |

---

## Compliance

A system is compliant if:
1. {condition 1}
2. {condition 2}

Writing Guidelines

Be Precise

  • Every requirement MUST be testable
  • Avoid ambiguous terms (“appropriate”, “reasonable”, “adequate”)
  • Use specific values, not ranges when possible

Be Complete

  • Define all terms that might be misunderstood
  • Cover error cases and edge conditions
  • Specify what happens when requirements conflict

Be Organized

  • Group related requirements
  • Use consistent numbering (REQ-XXX, CON-XXX)
  • Cross-reference related sections

Output Location

Specifications are written to: developer/specifications/{{SPEC_NAME}}.mdx

Execution Flow

1. Read task details
   └─→ cleo show {{TASK_ID}}

2. Set focus (if needed)
   └─→ cleo focus set {{TASK_ID}}

3. Write specification
   └─→ developer/specifications/{{SPEC_NAME}}.mdx

4. Append manifest
   └─→ {{MANIFEST_PATH}}

5. Complete task
   └─→ cleo complete {{TASK_ID}}

6. Return summary
   └─→ "Specification complete. See MANIFEST.jsonl for summary."

Manifest Entry

{"id":"spec-{{SPEC_NAME}}-{{DATE}}","file":"{{DATE}}_spec-{{SPEC_NAME}}.md","title":"Specification: {{TITLE}}","date":"{{DATE}}","status":"complete","agent_type":"specification","topics":["specification"],"key_findings":["Defined N requirements in M categories","Established X constraints","Compliance criteria defined"],"actionable":true,"needs_followup":["{{IMPLEMENTATION_TASK_IDS}}"],"linked_tasks":["{{TASK_ID}}"]}