This skill should be used when the user works with SPECLAN specification files in the speclan/ directory, asks to "read a feature", "list requirements", "create a feature", "new requirement", "update a spec", "delete a change request", "show spec hierarchy", "ID format", or references SPECLAN entity types (Goal, Feature, Requirement, ChangeRequest). Provides foundational knowledge for all speclan/ directory operations including file structure, validation rules, status lifecycle, and entity relationships.
From speclannpx claudepluginhub thlandgraf/cc-marketplace --plugin speclanThis skill uses the workspace's default tool permissions.
references/entity-fields.mdreferences/validation-rules.mdreferences/writing-guide.mdscripts/detect-speclan.shGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
THIS IS FOUNDATIONAL CONTEXT. Apply these rules to ALL speclan file operations.
SPECLAN (Specification as a Living Language) manages project specifications as interlinked markdown files with YAML frontmatter in a hierarchical directory structure.
The directory/filename pattern {PREFIX}-{ID}-{slug} is authoritative:
F-1049-pet-management/F-1049-pet-management.md
│ │ │ └─ File MUST match directory name
│ │ └─ Kebab-case slug from title
│ └─ 4-digit numeric ID (randomly generated)
└─ Entity prefix (F=Feature, R=Requirement, etc.)
Extract ID from filename, NOT frontmatter for indexing and collision checks.
| Entity | Prefix | Digits | Example | Storage |
|---|---|---|---|---|
| Goal | G- | 3 | G-292 | goals/G-292-slug.md (flat) |
| Feature | F- | 4 | F-1049 | features/F-1049-slug/F-1049-slug.md (dir) |
| Requirement | R- | 4 | R-2046 | features/.../requirements/R-2046-slug/R-2046-slug.md (dir) |
| Change Request | CR- | 4 | CR-0731 | {parent}/change-requests/CR-0731-slug.md (flat) |
| Editable (direct edit OK) | Locked (needs Change Request) |
|---|---|
| draft, review, approved | in-development, under-test, released, deprecated |
SPECLAN specifications live in ${PROJECT}/speclan/:
speclan/
├── goals/ # G-### Business goals (flat)
├── features/ # F-#### Feature hierarchy
│ └── F-1049-pet-management/
│ ├── F-1049-pet-management.md # Feature file matches directory
│ ├── requirements/ # Requirements as directories
│ │ ├── R-2046-health-check/
│ │ │ ├── R-2046-health-check.md
│ │ │ └── change-requests/ # CRs for this requirement
│ │ └── R-3272-status-tracking/
│ │ └── R-3272-status-tracking.md
│ ├── change-requests/ # CRs for this feature
│ │ └── CR-0731-add-feature.md
│ └── F-1200-pet-health/ # Child feature (nested)
│ └── F-1200-pet-health.md
├── templates/ # Templates (UUID in frontmatter, slug filename)
│ ├── features/
│ └── requirements/
└── change-requests/ # Root-level change requests
Key structural rules:
requirements/ directory as subdirectorieschange-requests/ adjacent to the entity they modify (features OR requirements)Goal (G-###)
└── Feature (F-####) [forms hierarchical tree via directories]
└── Requirement (R-####)
Additional entities:
| Entity | Format | Example | Storage Location |
|---|---|---|---|
| Goal | G-### | G-292 | goals/ (flat files) |
| Feature | F-#### | F-1049 | features/ (hierarchical directories) |
| Requirement | R-#### | R-2046 | features/{feature}/requirements/ (directories) |
| ChangeRequest | CR-#### | CR-0731 | {entity}/change-requests/ (flat files) |
| Template | UUID v4 | bf5cb38b-... | templates/{type}/ (flat files) |
ID Generation: All numeric IDs are randomly generated with collision detection (not sequential). Always check existing IDs before creating new ones.
ID-Based Ordering: IDs determine artifact priority/order numerically:
Files follow pattern: <ID>-kebab-case-title.md
Examples:
G-292-comprehensive-pet-retail-operations.md (flat file in goals/)F-1049-pet-management/F-1049-pet-management.md (directory-based)R-2046-health-check/R-2046-health-check.md (directory-based)Directory-based entities (Features, Requirements):
F-1049-pet-management/F-1049-pet-management.mdR-2046-health-check/R-2046-health-check.mdTemplate filenames use kebab-case slugs (UUID stored in frontmatter only):
basic-feature.mdfunctional-requirement.mdEvery spec file has YAML frontmatter followed by markdown content. The body MUST start with an H1 heading (# Title) matching the title field from the frontmatter:
---
id: F-1049
type: feature
title: Pet Management
status: draft
owner: Store Manager
created: "2025-12-29T09:53:49.355Z"
updated: "2025-12-29T10:31:04.445Z"
goals:
- G-292
- G-087
---
# Pet Management ← REQUIRED: H1 must match frontmatter title
## Overview
Brief description of what this feature does and why it exists.
## User Story
As a **Store Manager**, I want **comprehensive tools** so that **I can track pets**.
## Scope
- Pet Tracking
- Status Management
- Health Records
Structural rules:
# {title} (H1 heading)## Heading (H2) and belowAll entities share:
id: <entity-id> # Required
type: <entity-type> # Required: goal|feature|requirement|template|changeRequest
title: <string> # Required
status: <status> # Required: draft|review|approved|in-development|under-test|released|deprecated
owner: <string> # Required
created: <ISO-8601> # Required
updated: <ISO-8601> # Required
tags: [<string>, ...] # Optional
Entity-specific fields - See references/entity-fields.md for complete reference.
Entities follow a 7-stage lifecycle:
draft → review → approved → in-development → under-test → released → deprecated
| Status | Editable | Description |
|---|---|---|
draft | Yes | Initial creation, work in progress |
review | Yes | Ready for review |
approved | Yes | Approved, ready for development |
in-development | No | Currently being implemented |
under-test | No | Implementation complete, testing |
released | No | Deployed to production |
deprecated | No | No longer active (terminal state) |
Read-only statuses: Entities in in-development, under-test, released, or deprecated are locked. Direct edits are not allowed - changes require a Change Request (CR-####).
For complete validation rules including ID format regex, directory naming enforcement,
parent-child relationship validation, status lifecycle rules, and entity-specific
field validation, consult references/validation-rules.md.
# Goal references features
contributors:
- F-1049
- F-2247
# Feature references goals
goals:
- G-292
- G-087
# Requirement references parent feature
feature: F-1009
Use relative paths in markdown content:
## Related
### Goals
- [Animal Welfare Compliance](../goals/G-087-animal-welfare-compliance.md)
### Features
- [Pet Status Lifecycle](../F-1807-pet-status-lifecycle/F-1807-pet-status-lifecycle.md)
To find the speclan directory in a project:
speclan/, specs/speclan/goals/, features/, requirements/When reading a spec file:
To create a new spec:
Check for user templates FIRST:
speclan/templates/<entity-type>/
speclan/templates/features/ for feature templatesspeclan/templates/requirements/ for requirement templatesRead available templates and choose the best fit. Templates contain the user's preferred structure.
Generate a unique ID using the speclan-id-generator:
SCRIPT="${CLAUDE_PLUGIN_ROOT}/skills/speclan-id-generator/scripts/generate-id.mjs"
# Generate a feature ID (collision-free, end-biased)
node "$SCRIPT" --type feature --speclan-root speclan | jq -r '.data.ids[0]'
# Generate a child feature ID under a parent
node "$SCRIPT" --type feature --parent F-1049 --speclan-root speclan | jq -r '.data.ids[0]'
# Generate a requirement ID under a feature
node "$SCRIPT" --type requirement --parent F-1049 --speclan-root speclan | jq -r '.data.ids[0]'
Create file in correct location:
For Goals: speclan/goals/G-###-slug.md (flat file)
For Features: Create directory AND file with matching name:
speclan/features/F-####-slug/F-####-slug.md
For Requirements: Create directory inside parent feature's requirements/:
speclan/features/F-####-parent/requirements/R-####-slug/R-####-slug.md
For Child Features: Nest inside parent feature directory:
speclan/features/F-####-parent/F-####-child/F-####-child.md
Write frontmatter and content:
feature: F-#### to link to parentUpdate related entities to establish bidirectional links
When modifying a spec:
updated timestampFor guidance on writing effective specifications, consult references/writing-guide.md.
Key principles:
references/entity-fields.md - Complete YAML field reference for all entity typesreferences/writing-guide.md - Best practices for writing specificationsspeclan-id-generator - Generate collision-free unique IDs for SPECLAN entitiesscripts/detect-speclan.sh - Detect speclan directory in a project