0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenSpec早見表

0
Last updated at Posted at 2025-12-17

OpenSpecの早見表作りました

AIコーディングエージェントを利用した仕様駆動開発に利用できるOpenSpecについて

実際コマンドを打ったり、GitHub見ればわかるレベルのことですが、
ざっと確認できるように日本語化して早見表にしました。

OpenSpec CLIコマンド

基本コマンド一覧

コマンド 説明
openspec init プロジェクト初期化
openspec update AI指示ファイルの更新
openspec list 変更一覧表示
openspec view インタラクティブダッシュボード
openspec show 詳細表示
openspec validate 検証
openspec archive 完了した変更のアーカイブ
openspec spec 仕様管理
openspec change 変更管理

各コマンドの詳細オプション

openspec init [path]

--tools <tools>  # AIツール指定(非対話モード)
                 # "all", "none", またはカンマ区切りリスト
                 # 例: --tools claude,cursor

openspec list

--specs    # specsを一覧表示
--changes  # changesを一覧表示(デフォルト)

openspec show [item-name]

--json              # JSON出力
--type <change|spec>  # アイテム種別を明示指定
--no-interactive    # プロンプト無効化
--deltas-only       # 差分のみ表示(JSON・change用)
--requirements      # 要件のみ表示(シナリオ除外)
-r, --requirement <id>  # 特定の要件をID指定で表示

openspec validate [item-name]

--all              # 全てのchanges/specsを検証
--changes          # 全changesを検証
--specs            # 全specsを検証
--type <change|spec>  # アイテム種別を明示
--strict           # 厳格モード(推奨)
--json             # JSON出力
--concurrency <n>  # 並列数(デフォルト6)
--no-interactive   # プロンプト無効化

openspec archive <change-name>

-y, --yes       # 確認をスキップ(自動化向け)
--skip-specs    # spec更新をスキップ(インフラ/ツール変更用)
--no-validate   # 検証スキップ(非推奨)

ディレクトリ構造

openspec/
├── project.md              # プロジェクト規約
├── AGENTS.md               # AI向け指示書
├── specs/                  # 現在の仕様(真実の源)
│   └── [capability]/
│       ├── spec.md         # 要件とシナリオ
│       └── design.md       # 技術パターン
├── changes/                # 提案中の変更
│   ├── [change-name]/
│   │   ├── proposal.md     # なぜ・何を・影響
│   │   ├── tasks.md        # 実装チェックリスト
│   │   ├── design.md       # 技術判断(任意)
│   │   └── specs/          # 差分仕様
│   │       └── [capability]/
│   │           └── spec.md # ADDED/MODIFIED/REMOVED
│   └── archive/            # 完了した変更

3段階ワークフロー

  1. Stage 1: Creating - /openspec:proposal でproposal作成、実装前に承認を得る
  2. Stage 2: Implementing - /openspec:apply でタスク実装
  3. Stage 3: Archiving - /openspec:archive で完了・specマージ

Spec Delta記法

## ADDED Requirements
### Requirement: 新機能
ユーザーは〜できなければならない(SHALL/MUST)

#### Scenario: 成功ケース
- **WHEN** 条件
- **THEN** 結果

## MODIFIED Requirements
### Requirement: 既存機能
(完全な更新済み内容を記載)

## REMOVED Requirements
### Requirement: 廃止機能
**Reason**: 理由
**Migration**: 移行方法

実用的なコマンド例

# 状態確認
openspec list                          # アクティブな変更一覧
openspec list --specs                  # 既存の仕様一覧

# 詳細確認
openspec show my-feature               # 変更の詳細表示
openspec show my-feature --json --deltas-only  # 差分のみJSON

# 検証
openspec validate my-feature --strict  # 厳格検証(推奨)

change-id命名

kebab-case、動詞始まり: add-, update-, remove-, refactor-

最後に

また何か載せた方が良い事があれば更新します。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?