AgentSkillsCN

specs-update

将本地项目与最新的SDD方法论基础设施同步——规格目录、模板、README脚手架、CLAUDE.md方法论。

SKILL.md
--- frontmatter
name: specs-update
description: "Sync local project with latest SDD methodology infrastructure — specs dir, template, README scaffold, CLAUDE.md methodology"
disable-model-invocation: true
argument-hint: "[--force]"
allowed-tools: Read, Write, Edit, Grep, Glob, Bash

Update Specs & Methodology Infrastructure

Sync local project with latest SDD methodology.

Pre-parsed Data

Directory Structure

!${CLAUDE_PLUGIN_ROOT}/scripts/specs-parse.sh structure

Spec Status

!${CLAUDE_PLUGIN_ROOT}/scripts/specs-parse.sh status

Instructions

Part A: Specs Directory

1. Check specs directory

If the structure data above shows specs_dir: missing:

  • Create specs/ directory
  • Report: "Created specs/ directory"

2. Sync TEMPLATE.md

If the structure data above shows template: missing:

  • Copy the canonical template from ${CLAUDE_PLUGIN_ROOT}/templates/TEMPLATE.md to specs/TEMPLATE.md
  • Report: "Created specs/TEMPLATE.md"

3. Sync specs/README.md

If the structure data above shows readme: missing, create this scaffold:

markdown
# {Project Name} - Specifications

This is the **single source of truth** for project progress. Individual spec files contain the What/Why/How; this README tracks what's done and what's next.

---

## Quick Status

| Version | Name | Progress | Status |
|---------|------|----------|--------|

---

## Creating New Specs

Use `/sdd:spec <description>` to create a new spec. Files are named `spec-v{N}-{short-name}.md`.

When adding tasks, add them to this README (the checklist lives here, not in the spec files).

If specs/README.md exists but is missing the Quick Status table:

  • Add the table header after the intro section
  • Report: "Added Quick Status table to README"

4. Validate existing specs

Check the UNLINKED_SPECS section from the structure data above. For each unlinked spec file, report: "spec-v{N}-{name}.md not linked in README Quick Status table"

Part B: Methodology in CLAUDE.md

5. Check project CLAUDE.md

Read the project's .claude/CLAUDE.md file (if it exists). Look for a "Development Methodology" section.

6. Sync methodology

If no CLAUDE.md exists:

  • Report: "No CLAUDE.md found. Create one with project overview and methodology."
  • Do NOT auto-create

If CLAUDE.md exists but no methodology section:

  • Append the Development Methodology section (Definition of Done, Planning Requirements, Task States)
  • Report: "Added Development Methodology section to CLAUDE.md"

If methodology section exists but differs:

  • Show differences
  • If $ARGUMENTS contains --force: Update to match canonical
  • Otherwise: Report differences only

Part C: Report Summary

Display:

text
📦 Specs & Methodology Updated

Specs Infrastructure:
  ✓ specs/ directory {exists | created}
  ✓ specs/TEMPLATE.md {exists | created}
  ✓ specs/README.md {exists | created | updated}
  ✓ N spec files validated (M linked in README)

Methodology:
  ✓ CLAUDE.md has Development Methodology section
  - or -
  ⚠ {issue description}

Run `/sdd:specs` to see current status.

Idempotent

This command is safe to run multiple times. It only adds missing structure, never overwrites existing content unless --force is used.