jpskill.com
📦 その他 コミュニティ

ralph-tui-create-json

製品要求定義書(PRD)を、ユーザー ストーリーや受け入れ基準、依存関係を含むJSON形式のタスクファイルに変換し、ralph-tuiで実行できるようにするSkill。

📜 元の英語説明(参考)

Convert PRDs to prd.json format for ralph-tui execution. Creates JSON task files with user stories, acceptance criteria, and dependencies. Triggers on: create prd.json, convert to json, ralph json, create json tasks.

🇯🇵 日本人クリエイター向け解説

一言でいうと

製品要求定義書(PRD)を、ユーザー ストーリーや受け入れ基準、依存関係を含むJSON形式のタスクファイルに変換し、ralph-tuiで実行できるようにするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ralph-tui-create-json.zip https://jpskill.com/download/20879.zip && unzip -o ralph-tui-create-json.zip && rm ralph-tui-create-json.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/20879.zip -OutFile "$d\ralph-tui-create-json.zip"; Expand-Archive "$d\ralph-tui-create-json.zip" -DestinationPath $d -Force; ri "$d\ralph-tui-create-json.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して ralph-tui-create-json.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → ralph-tui-create-json フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] ralph-tui-create-json

Ralph TUI - JSONタスクの作成

PRDをralph-tuiの自律実行用のprd.json形式に変換します。

注: このスキルはralph-tuiのJSONトラッカープラグインにバンドルされています。将来のトラッカープラグイン(Linear、GitHub Issuesなど)は、それぞれ独自のタスク作成スキルをバンドルします。

⚠️ 重要: 出力は、"name"と"userStories"がルートレベルにあるフラットなJSONオブジェクトでなければなりません。"prd"オブジェクトでコンテンツをラップしたり、"tasks"配列を使用したりしないでください。下記の「スキーマのアンチパターン」セクションを参照してください。


ジョブ

PRD(Markdownファイルまたはテキスト)を受け取り、prd.jsonファイルを作成します。

  1. PRDの「Quality Gates」セクションから品質ゲートを抽出します。
  2. PRDからユーザーストーリーをパースします。
  3. 各ストーリーの受け入れ基準に品質ゲートを追加します。
  4. ストーリー間の依存関係を設定します。
  5. ralph-tui run --prd <path>ですぐに実行できる形式で出力します。

ステップ1:品質ゲートの抽出

PRDの「Quality Gates」セクションを探します。

## Quality Gates

These commands must pass for every user story:
- `pnpm typecheck` - Type checking
- `pnpm lint` - Linting

For UI stories, also include:
- Verify in browser using dev-browser skill

以下を抽出します。

  • ユニバーサルゲート: すべてのストーリーに適用されるコマンド(例: pnpm typecheck
  • UIゲート: UIストーリーにのみ適用されるコマンド(例: ブラウザでの検証)

「Quality Gates」セクションが存在しない場合: ユーザーにどのコマンドがパスすべきか尋ねるか、npm run typecheckのような適切なデフォルトを使用します。


出力形式

JSONファイルは、ルートレベルにフラットなオブジェクトでなければなりません。

{
  "name": "[PRDまたはディレクトリからのプロジェクト名]",
  "branchName": "ralph/[feature-name-kebab-case]",
  "description": "[PRDからの機能説明]",
  "userStories": [
    {
      "id": "US-001",
      "title": "[ストーリーのタイトル]",
      "description": "As a [user], I want [feature] so that [benefit]",
      "acceptanceCriteria": [
        "Criterion 1 from PRD",
        "Criterion 2 from PRD",
        "pnpm typecheck passes",
        "pnpm lint passes"
      ],
      "priority": 1,
      "passes": false,
      "notes": "",
      "dependsOn": []
    },
    {
      "id": "US-002",
      "title": "[US-001に依存するUIストーリー]",
      "description": "...",
      "acceptanceCriteria": [
        "...",
        "pnpm typecheck passes",
        "pnpm lint passes",
        "Verify in browser using dev-browser skill"
      ],
      "priority": 2,
      "passes": false,
      "notes": "",
      "dependsOn": ["US-001"]
    }
  ]
}

重要: スキーマのアンチパターン(使用しないでください)

以下のパターンは無効であり、検証エラーを引き起こします。

❌ 誤り: ラッパーオブジェクト

{
  "prd": {
    "name": "...",
    "userStories": [...]
  }
}

これはすべてを"prd"オブジェクトでラップしています。これを行わないでください。 "name"と"userStories"フィールドはルートレベルになければなりません。

❌ 誤り: "userStories"の代わりに"tasks"を使用する

{
  "name": "...",
  "tasks": [...]
}

配列は"userStories"と呼ばれ、"tasks"ではありません。

❌ 誤り: 複雑なネスト構造

{
  "metadata": {...},
  "overview": {...},
  "migration_strategy": {
    "phases": [...]
  }
}

PRDがフェーズ/マイルストーン/スプリントを記述していても、これらを単一の"userStories"配列にフラット化する必要があります。

❌ 誤り: "passes"の代わりに"status"を使用する

{
  "userStories": [{
    "id": "US-001",
    "status": "open"  // WRONG!
  }]
}

未完了のストーリーには"passes": falseを、完了したストーリーには"passes": trueを使用してください。

✅ 正しい: ルートにフラットな構造

{
  "name": "Android Kotlin Migration",
  "branchName": "ralph/kotlin-migration",
  "userStories": [
    {"id": "US-001", "title": "Create Scraper interface", "passes": false, "dependsOn": []},
    {"id": "US-002", "title": "Implement WeebCentralScraper", "passes": false, "dependsOn": ["US-001"]}
  ]
}

ストーリーのサイズ: 最重要ルール

各ストーリーは、1回のralph-tuiイテレーション(約1つのエージェントコンテキストウィンドウ)で完了できるものでなければなりません。

Ralph-tuiは、以前の作業の記憶なしに、イテレーションごとに新しいエージェントインスタンスを生成します。ストーリーが大きすぎると、エージェントは完了する前にコンテキストを使い果たしてしまいます。

適切なサイズのストーリー:

  • データベースカラムとマイグレーションの追加
  • 既存のページへのUIコンポーネントの追加
  • 新しいロジックによるサーバーアクションの更新
  • リストへのフィルタドロップダウンの追加

大きすぎるストーリー(分割してください):

  • 「ダッシュボード全体を構築する」→ スキーマ、クエリ、UIコンポーネント、フィルタに分割
  • 「認証を追加する」→ スキーマ、ミドルウェア、ログインUI、セッション処理に分割
  • 「APIをリファクタリングする」→ エンドポイントまたはパターンごとに1つのストーリーに分割

経験則: 変更を2〜3文で説明できない場合、それは大きすぎます。


dependsOnによる依存関係

dependsOn配列を使用して、どのストーリーが最初に完了する必要があるかを指定します。

{
  "id": "US-002",
  "title": "Create API endpoints",
  "dependsOn": ["US-001"],  // US-001がパスするまで選択されません
  ...
}

Ralph-tuiは以下を行います。

  • US-001が完了するまでUS-002を「ブロック済み」と表示します。
  • US-001がオープンな間は、US-002を実行のために選択することはありません。
  • US-002の作業中にプロンプトに「前提条件: US-001」を含めます。

正しい依存関係の順序:

  1. スキーマ/データベースの変更(依存関係なし)
  2. バックエンドロジック(スキーマに依存)
  3. UIコンポーネント(バックエンドに依存)
  4. 統合/仕上げ(UIに依存)

受け入れ基準: 品質ゲート + ストーリー固有

各ストーリーの受け入れ基準には以下を含める必要があります。

  1. PRDからのストーリー固有の基準(このストーリーが達成すること)
  2. PRDの品質ゲートセクションからの品質ゲート(最後に追記されます)

良い基準(検証可能):

  • 「タスクテーブルにデフォルト値'open'のstatusカラムを追加する」
  • 「フィルタドロップダウンにオプション: All, Open, Closedがある」
  • 「削除をクリックすると確認ダイアログが表示される」

悪い基準(曖昧):

  • ❌ 「正しく動作する」
  • ❌ 「ユーザーはXを簡単にできる」
  • ❌ 「良いUX」
  • ❌ 「エッジケースを処理する」

変換ルール

  1. 最初にPRDから品質ゲートを抽出します。
  2. 各ユーザーストーリー → 1つのJSONエントリ
  3. ID: 連番(US-001、US-002など)
  4. 優先度

(原文がここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Ralph TUI - Create JSON Tasks

Converts PRDs to prd.json format for ralph-tui autonomous execution.

Note: This skill is bundled with ralph-tui's JSON tracker plugin. Future tracker plugins (Linear, GitHub Issues, etc.) will bundle their own task creation skills.

⚠️ CRITICAL: The output MUST be a FLAT JSON object with "name" and "userStories" at the ROOT level. DO NOT wrap content in a "prd" object or use "tasks" array. See "Schema Anti-Patterns" section below.


The Job

Take a PRD (markdown file or text) and create a prd.json file:

  1. Extract Quality Gates from the PRD's "Quality Gates" section
  2. Parse user stories from the PRD
  3. Append quality gates to each story's acceptance criteria
  4. Set up dependencies between stories
  5. Output ready for ralph-tui run --prd <path>

Step 1: Extract Quality Gates

Look for the "Quality Gates" section in the PRD:

## Quality Gates

These commands must pass for every user story:
- `pnpm typecheck` - Type checking
- `pnpm lint` - Linting

For UI stories, also include:
- Verify in browser using dev-browser skill

Extract:

  • Universal gates: Commands that apply to ALL stories (e.g., pnpm typecheck)
  • UI gates: Commands that apply only to UI stories (e.g., browser verification)

If no Quality Gates section exists: Ask the user what commands should pass, or use a sensible default like npm run typecheck.


Output Format

The JSON file MUST be a FLAT object at the root level:

{
  "name": "[Project name from PRD or directory]",
  "branchName": "ralph/[feature-name-kebab-case]",
  "description": "[Feature description from PRD]",
  "userStories": [
    {
      "id": "US-001",
      "title": "[Story title]",
      "description": "As a [user], I want [feature] so that [benefit]",
      "acceptanceCriteria": [
        "Criterion 1 from PRD",
        "Criterion 2 from PRD",
        "pnpm typecheck passes",
        "pnpm lint passes"
      ],
      "priority": 1,
      "passes": false,
      "notes": "",
      "dependsOn": []
    },
    {
      "id": "US-002",
      "title": "[UI Story that depends on US-001]",
      "description": "...",
      "acceptanceCriteria": [
        "...",
        "pnpm typecheck passes",
        "pnpm lint passes",
        "Verify in browser using dev-browser skill"
      ],
      "priority": 2,
      "passes": false,
      "notes": "",
      "dependsOn": ["US-001"]
    }
  ]
}

CRITICAL: Schema Anti-Patterns (DO NOT USE)

The following patterns are INVALID and will cause validation errors:

❌ WRONG: Wrapper object

{
  "prd": {
    "name": "...",
    "userStories": [...]
  }
}

This wraps everything in a "prd" object. DO NOT DO THIS. The "name" and "userStories" fields must be at the ROOT level.

❌ WRONG: Using "tasks" instead of "userStories"

{
  "name": "...",
  "tasks": [...]
}

The array is called "userStories", not "tasks".

❌ WRONG: Complex nested structures

{
  "metadata": {...},
  "overview": {...},
  "migration_strategy": {
    "phases": [...]
  }
}

Even if the PRD describes phases/milestones/sprints, you MUST flatten these into a single "userStories" array.

❌ WRONG: Using "status" instead of "passes"

{
  "userStories": [{
    "id": "US-001",
    "status": "open"  // WRONG!
  }]
}

Use "passes": false for incomplete stories, "passes": true for completed.

✅ CORRECT: Flat structure at root

{
  "name": "Android Kotlin Migration",
  "branchName": "ralph/kotlin-migration",
  "userStories": [
    {"id": "US-001", "title": "Create Scraper interface", "passes": false, "dependsOn": []},
    {"id": "US-002", "title": "Implement WeebCentralScraper", "passes": false, "dependsOn": ["US-001"]}
  ]
}

Story Size: The #1 Rule

Each story must be completable in ONE ralph-tui iteration (~one agent context window).

Ralph-tui spawns a fresh agent instance per iteration with no memory of previous work. If a story is too big, the agent runs out of context before finishing.

Right-sized stories:

  • Add a database column + migration
  • Add a UI component to an existing page
  • Update a server action with new logic
  • Add a filter dropdown to a list

Too big (split these):

  • "Build the entire dashboard" → Split into: schema, queries, UI components, filters
  • "Add authentication" → Split into: schema, middleware, login UI, session handling
  • "Refactor the API" → Split into one story per endpoint or pattern

Rule of thumb: If you can't describe the change in 2-3 sentences, it's too big.


Dependencies with dependsOn

Use the dependsOn array to specify which stories must complete first:

{
  "id": "US-002",
  "title": "Create API endpoints",
  "dependsOn": ["US-001"],  // Won't be selected until US-001 passes
  ...
}

Ralph-tui will:

  • Show US-002 as "blocked" until US-001 completes
  • Never select US-002 for execution while US-001 is open
  • Include "Prerequisites: US-001" in the prompt when working on US-002

Correct dependency order:

  1. Schema/database changes (no dependencies)
  2. Backend logic (depends on schema)
  3. UI components (depends on backend)
  4. Integration/polish (depends on UI)

Acceptance Criteria: Quality Gates + Story-Specific

Each story's acceptance criteria should include:

  1. Story-specific criteria from the PRD (what this story accomplishes)
  2. Quality gates from the PRD's Quality Gates section (appended at the end)

Good criteria (verifiable):

  • "Add status column to tasks table with default 'open'"
  • "Filter dropdown has options: All, Open, Closed"
  • "Clicking delete shows confirmation dialog"

Bad criteria (vague):

  • ❌ "Works correctly"
  • ❌ "User can do X easily"
  • ❌ "Good UX"
  • ❌ "Handles edge cases"

Conversion Rules

  1. Extract Quality Gates from PRD first
  2. Each user story → one JSON entry
  3. IDs: Sequential (US-001, US-002, etc.)
  4. Priority: Based on dependency order (1 = highest)
  5. dependsOn: Array of story IDs this story requires
  6. All stories: passes: false and empty notes
  7. branchName: Derive from feature name, kebab-case, prefixed with ralph/
  8. Acceptance criteria: Story criteria + quality gates appended
  9. UI stories: Also append UI-specific gates (browser verification)

Output Location

Default: ./tasks/prd.json (alongside the PRD markdown files)

This keeps all PRD-related files together in the tasks/ directory.

Or specify a different path - ralph-tui will use it with:

ralph-tui run --prd ./path/to/prd.json

Example

Input PRD:

# PRD: Task Priority System

Add priority levels to tasks.

## Quality Gates

These commands must pass for every user story:
- `pnpm typecheck` - Type checking
- `pnpm lint` - Linting

For UI stories, also include:
- Verify in browser using dev-browser skill

## User Stories

### US-001: Add priority field to database
**Description:** As a developer, I need to store task priority.

**Acceptance Criteria:**
- [ ] Add priority column: 1-4 (default 2)
- [ ] Migration runs successfully

### US-002: Display priority badge on task cards
**Description:** As a user, I want to see task priority at a glance.

**Acceptance Criteria:**
- [ ] Badge shows P1/P2/P3/P4 with colors
- [ ] Badge visible without hovering

### US-003: Add priority filter dropdown
**Description:** As a user, I want to filter tasks by priority.

**Acceptance Criteria:**
- [ ] Filter dropdown: All, P1, P2, P3, P4
- [ ] Filter persists in URL

Output prd.json:

{
  "project": "my-app",
  "branchName": "ralph/task-priority",
  "description": "Add priority levels to tasks",
  "userStories": [
    {
      "id": "US-001",
      "title": "Add priority field to database",
      "description": "As a developer, I need to store task priority.",
      "acceptanceCriteria": [
        "Add priority column: 1-4 (default 2)",
        "Migration runs successfully",
        "pnpm typecheck passes",
        "pnpm lint passes"
      ],
      "priority": 1,
      "passes": false,
      "notes": "",
      "dependsOn": []
    },
    {
      "id": "US-002",
      "title": "Display priority badge on task cards",
      "description": "As a user, I want to see task priority at a glance.",
      "acceptanceCriteria": [
        "Badge shows P1/P2/P3/P4 with colors",
        "Badge visible without hovering",
        "pnpm typecheck passes",
        "pnpm lint passes",
        "Verify in browser using dev-browser skill"
      ],
      "priority": 2,
      "passes": false,
      "notes": "",
      "dependsOn": ["US-001"]
    },
    {
      "id": "US-003",
      "title": "Add priority filter dropdown",
      "description": "As a user, I want to filter tasks by priority.",
      "acceptanceCriteria": [
        "Filter dropdown: All, P1, P2, P3, P4",
        "Filter persists in URL",
        "pnpm typecheck passes",
        "pnpm lint passes",
        "Verify in browser using dev-browser skill"
      ],
      "priority": 3,
      "passes": false,
      "notes": "",
      "dependsOn": ["US-002"]
    }
  ]
}

Running with ralph-tui

After creating prd.json:

ralph-tui run --prd ./tasks/prd.json

Ralph-tui will:

  1. Load stories from prd.json
  2. Select the highest-priority story with passes: false and no blocking dependencies
  3. Generate a prompt with story details + acceptance criteria
  4. Run the agent to implement the story
  5. Mark passes: true on completion
  6. Repeat until all stories pass

Checklist Before Saving

  • [ ] Extracted Quality Gates from PRD (or asked user if missing)
  • [ ] Each story completable in one iteration
  • [ ] Stories ordered by dependency (schema → backend → UI)
  • [ ] dependsOn correctly set for each story
  • [ ] Quality gates appended to every story's acceptance criteria
  • [ ] UI stories have browser verification (if specified in Quality Gates)
  • [ ] Acceptance criteria are verifiable (not vague)
  • [ ] No circular dependencies