本文へ移動
cccskills
無料GitHub で公開

kiro-spec-design

Create comprehensive technical design for a specification

インストール方法を見る

含まれるファイル(7)

  • SKILL.md11.2 KB
  • LICENSE.txt1.0 KB
  • rules/design-discovery-full.md3.7 KB
  • rules/design-discovery-light.md1.5 KB
  • rules/design-principles.md11.7 KB
  • rules/design-review-gate.md4.0 KB
  • rules/design-synthesis.md1.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Technical Design Generator

<background_information>

  • Success Criteria:
    • All requirements mapped to technical components with clear interfaces
    • The design makes responsibility boundaries explicit enough to guide task generation and review
    • Appropriate architecture discovery and research completed
    • Design aligns with steering context and existing patterns
    • Visual diagrams included for complex architectures </background_information>
<instructions> ## Execution Steps

Step 1: Load Context

Read all necessary context:

  • docs/specs/$1/spec.json, requirements.md, design.md (if exists)
  • docs/specs/$1/research.md (if exists, contains gap analysis from /kiro-validate-gap)
  • Core steering context: product.md, tech.md, structure.md
  • Additional steering files only when directly relevant to requirement coverage, architecture boundaries, integrations, runtime prerequisites, security/performance constraints, or team conventions that affect implementation readiness
  • docs/settings/templates/specs/design.md for document structure
  • Read rules/design-principles.md from this skill's directory for design principles
  • docs/settings/templates/specs/research.md for discovery log structure

Validate requirements approval:

  • If -y flag provided ($2 == "-y"): Auto-approve requirements in spec.json
  • Otherwise: Verify approval status (stop if unapproved, see Safety & Fallback)

Step 2: Discovery & Analysis

Critical: This phase ensures design is based on complete, accurate information.

  1. Classify Feature Type:

    • New Feature (greenfield) → Full discovery required
    • Extension (existing system) → Integration-focused discovery
    • Simple Addition (CRUD/UI) → Minimal or no discovery
    • Complex Integration → Comprehensive analysis required
  2. Execute Appropriate Discovery Process:

    For Complex/New Features:

    • Read and execute rules/design-discovery-full.md from this skill's directory
    • Conduct thorough research using WebSearch/WebFetch:
      • Latest architectural patterns and best practices
      • External dependency verification (APIs, libraries, versions, compatibility)
      • Official documentation, migration guides, known issues
      • Performance benchmarks and security considerations

    For Extensions:

    • Read and execute rules/design-discovery-light.md from this skill's directory
    • Focus on integration points, existing patterns, compatibility
    • Use Grep to analyze existing codebase patterns

    For Simple Additions:

    • Skip formal discovery, quick pattern check only

Parallel Research (sub-agent dispatch)

The following research areas are independent and can be dispatched as sub-agents. The agent should decide the optimal decomposition based on feature complexity — split, merge, add, or skip sub-agents as needed. Each sub-agent returns a findings summary (not raw data) to keep the main context clean for synthesis.

Typical research areas (adjust as appropriate):

  • Codebase analysis: Existing architecture patterns, integration points, code conventions
  • External research: Dependencies, APIs, latest best practices
  • Context loading (usually main context): Steering files, design principles, discovery rules, templates

For simple additions, skip sub-agent dispatch entirely and do a quick pattern check in main context.

After all findings return, synthesize in main context before proceeding.

  1. Retain Discovery Findings for Step 3:

    • External API contracts and constraints
    • Technology decisions with rationale
    • Existing patterns to follow or extend
    • Integration points and dependencies
    • Identified risks and mitigation strategies
    • Boundary candidates, out-of-boundary decisions, and likely revalidation triggers
  2. Persist Findings to Research Log:

    • Create or update docs/specs/$1/research.md using the shared template
    • Summarize discovery scope and key findings (Summary section)
    • Record investigations in Research Log topics with sources and implications
    • Document architecture pattern evaluation, design decisions, and risks using the template sections
    • Use the language specified in spec.json when writing or updating research.md

Step 3: Synthesis

Apply design synthesis to discovery findings before writing.

  • Read and apply rules/design-synthesis.md from this skill's directory
  • This step requires the full picture from discovery — do not parallelize or delegate to sub-agents
  • Record synthesis outcomes (generalizations found, build-vs-adopt decisions, simplifications) in research.md

Step 4: Generate Design Draft

  1. Load Design Template and Rules:

    • Read docs/settings/templates/specs/design.md for structure
    • Read rules/design-principles.md from this skill's directory for principles
  2. Generate Design Draft:

    • Follow specs/design.md template structure and generation instructions strictly
    • Boundary-first requirement: Before expanding supporting sections, make the boundary explicit. The draft must clearly define what this spec owns, what it does not own, which dependencies are allowed, and what changes would require downstream revalidation.
    • Integrate all discovery findings and synthesis outcomes: Use researched information (APIs, patterns, technologies) and synthesis decisions (generalizations, build-vs-adopt, simplifications) throughout component definitions, architecture decisions, and integration points
    • File Structure Plan (required): Populate the File Structure Plan section with concrete file paths and responsibilities. Analyze the codebase to determine which files need to be created vs. modified. Each file must have one clear responsibility. This section directly drives task _Boundary:_ annotations and implementation Task Briefs — vague file structures produce vague implementations.
    • Testing Strategy: Derive test items from requirements' acceptance criteria, not generic patterns. Each test item should reference specific components and behaviors from this design. E2E paths must map to the critical user flows identified in requirements. Avoid vague entries like "test login works" -- instead specify what is being verified and why it matters.
    • If existing design.md found in Step 1, use it as reference context (merge mode)
    • Apply design rules: Type Safety, Visual Communication, Formal Tone
    • Use language specified in spec.json
    • Keep this as a draft until the review gate passes; do not write design.md yet

Step 5: Review Design Draft

  • Read and apply rules/design-review-gate.md from this skill's directory
  • Verify requirements coverage, architecture readiness, and implementation executability before finalizing the design
  • If issues are local to the draft, repair the design and review again
  • Keep the review bounded to at most 2 repair passes
  • If the draft exposes a real requirements/design gap, stop and return to requirements clarification instead of papering over it in design.md

Step 6: Finalize Design Document

  1. Write Final Design and Research Log:

    • Write docs/specs/$1/design.md only after the design review gate passes
    • Write research.md with discovery findings and synthesis outcomes (if not already written)
    • Persist any research.md updates that support the finalized design
  2. Update Metadata in spec.json:

    • Set phase: "design-generated"
    • Set approvals.design.generated: true, approved: false
    • Set approvals.requirements.approved: true
    • Update updated_at timestamp

Critical Constraints

  • Type Safety:
    • Enforce strong typing aligned with the project's technology stack.
    • For statically typed languages, define explicit types/interfaces and avoid unsafe casts.
    • For TypeScript, never use any; prefer precise types and generics.
    • For dynamically typed languages, provide type hints/annotations where available (e.g., Python type hints) and validate inputs at boundaries.
    • Document public interfaces and contracts clearly to ensure cross-component type safety.
  • Requirements Traceability IDs: Use numeric requirement IDs only (e.g. "1.1", "1.2", "3.1", "3.3") exactly as defined in requirements.md. Do not invent new IDs or use alphabetic labels. </instructions>

Output Description

Command execution output (separate from design.md content):

Provide brief summary in the language specified in spec.json:

  1. Status: Confirm design document generated at docs/specs/$1/design.md
  2. Discovery Type: Which discovery process was executed (full/light/minimal)
  3. Key Findings: 2-3 critical insights from research.md that shaped the design
  4. Review Gate: Confirm the design review gate passed
  5. Next Action: Approval workflow guidance (see Safety & Fallback)
  6. Research Log: Confirm research.md updated with latest decisions

Format: Concise Markdown (under 200 words) - this is the command output, NOT the design document itself

Note: The actual design document follows docs/settings/templates/specs/design.md structure.

Safety & Fallback

Error Scenarios

Requirements Not Approved:

  • Stop Execution: Cannot proceed without approved requirements
  • User Message: "Requirements not yet approved. Approval required before design generation."
  • Suggested Action: "Run /kiro-spec-design $1 -y to auto-approve requirements and proceed"

Missing Requirements:

  • Stop Execution: Requirements document must exist
  • User Message: "No requirements.md found at docs/specs/$1/requirements.md"
  • Suggested Action: "Run /kiro-spec-requirements $1 to generate requirements first"

Template Missing:

  • User Message: "Template file missing at docs/settings/templates/specs/design.md"
  • Suggested Action: "Check repository setup or restore template file"
  • Fallback: Use inline basic structure with warning

Steering Context Missing:

  • Warning: "Steering directory empty or missing - design may not align with project standards"
  • Proceed: Continue with generation but note limitation in output

Invalid Requirement IDs:

  • Stop Execution: If requirements.md is missing numeric IDs or uses non-numeric headings (for example, "Requirement A"), stop and instruct the user to fix requirements.md before continuing.

Spec Gap Found During Design Review:

  • Stop Execution: Do not write a patched-over design.md
  • User Message: "Design review found a real spec gap or ambiguity that must be resolved before design can be finalized."
  • Suggested Action: Clarify or fix requirements.md, then re-run /kiro-spec-design $1

Next Phase: Task Generation

If Design Approved:

  • Review generated design at docs/specs/$1/design.md
  • Optional: Run /kiro-validate-design $1 for interactive quality review
  • Then /kiro-spec-tasks $1 -y to generate implementation tasks

If Modifications Needed:

  • Provide feedback and re-run /kiro-spec-design $1
  • Existing design used as reference (merge mode)

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

cc-sdd-restack-after-merge

無料日本語概要

stacked PRの下位PRがマージされた後に上位branchをrestack(rebase/cherry-pick再構成)する際に使用。「restackして」「上位PRを更新して」「restack after merge」「PRのbaseを更新」「スタックを整理」という依頼でトリガーする。対象sliceの特定→rebase→変更ファイル確認と代表テスト実行→force-with-leaseでpush→PR base更新→auto-merge判定の順で進める。

studiogadget/skills32026年5月25日 更新

cc-sdd-review-slice-stack

無料日本語概要

cc-sdd実装用統合ブランチのコミット群(ベースブランチとの差分)をreview slice単位のstacked PRに再構成する際に使用。「review sliceに分割」「stacked PRを作成」「PRをスタックして」「レビュー用にPRを分けて」「review slice stack」という依頼でトリガーする。dry-run(既定)でslice計画を提示し、apply指示で実際にブランチ・PRを作成する。

studiogadget/skills32026年5月25日 更新

ci-stable-log-testing

無料日本語概要

CI環境で安定動作するPythonテスト(特にstructlogのログ検証)を書く際に使用。「CIで失敗する」「capture_logsが不安定」「ログアサーションがCIだけ落ちる」「caplogフォールバック」「ANSI混入」「xdistでログが取れない」という課題で起動。capture_logs→caplogフォールバック→ANSI正規化→アサーション設計の流れで堅牢なテストを書く。

studiogadget/skills32026年5月25日 更新

create-issue

無料日本語概要

GitHub Issueを作成してGitHubに投稿するスキル。「Issueを作成」「Issue作成」「Issueにして」「Issueとして投稿」「GitHubにIssue」「create issue」「open issue」「バグ報告」「機能追加をIssueに」「改善提案をIssueに」などの依頼でトリガーする。コンテキスト収集→Issue本文生成→ラベル存在確認・作成→gh issue create投稿の流れでIssueを作成する。

studiogadget/skills32026年5月25日 更新

docker-deployment-guide

無料日本語概要

Dockerベースのアプリケーションのデプロイメント手順書(Markdown)を作成するスキル。「デプロイ手順書」「デプロイメント手順」「deployment guide」「本番環境への配置手順」「サーバーへの配置手順」などの依頼でトリガーする。Docker Composeビルド→イメージ転送→サーバー配置→設定→動作確認→cron設定の流れで手順書を生成する。

studiogadget/skills32026年5月25日 更新

hibernate-pc

無料日本語概要

タスク完了後にPCを休止状態にする。Use when: ユーザーが「休止」「hibernate」「タスク完了後に休止状態」「作業後にPCをスリープ/休止」と明示的に指示した場合のみ。正常終了時だけでなく、エラーや未解決事項が残っていても、明示指示があれば最後に休止へ移行する。Windows only.

studiogadget/skills32026年5月25日 更新

studiogadget のスキルをすべて見る

このスキルの問題を報告する