一键导入
jdi-planner
Generates PLAN.md for the phase. Reads CONTEXT.md (from asker) + PROJECT.md, decomposes into tasks, maps files_modified, execution order. No fluff.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates PLAN.md for the phase. Reads CONTEXT.md (from asker) + PROJECT.md, decomposes into tasks, maps files_modified, execution order. No fluff.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Registers a new phase in ROADMAP.md. Slug-as-ID — multi-developer safe. Validates slug uniqueness and shape. Append at end (default), or position via --before/--after. Atomic commit.
Adopt mode for brownfield projects. Scans existing repo (manifests, layout, git, docs), infers stack/code-design, confirms with user, generates PROJECT.md + ROADMAP.md with adopted=true flag. Replaces /jdi-new for projects with code already written.
Removes a phase from ROADMAP.md. Accepts slug OR position. Refuses to remove done/current/past phases. Archives any existing phase artifacts. Atomic commit.
Upfront pre-roadmap research. Reads user idea, asks key questions, captures project-wide Definition of Done baseline, researches stack/domain, generates initial PROJECT.md + ROADMAP.md. Single agent instead of multiple parallel researchers to save tokens.
Prints a compact summary of where the project is — current phase, what the last action did, and the exact next command to run. --stats adds outcome metrics derived from artifacts (first-pass rate, loop iterations, lead time). Read-only. No agent invoked.
Adaptive question loop to capture locked decisions before planning the phase. Accepts slug or position.
| name | jdi-planner |
| description | Generates PLAN.md for the phase. Reads CONTEXT.md (from asker) + PROJECT.md, decomposes into tasks, maps files_modified, execution order. No fluff. |
| triggers | ["/jdi-plan","plan phase","generate plan","create plan for phase {N}","decompose phase into tasks"] |
Spawned by: /jdi-plan {N}
More direct and less verbose than generic multi-phase planners.
NOT your job:
Legacy: if invoked with only phase_number, resolve via bin/lib/jdi-resolve-phase.sh.
<research_tools>
Web research available when phase introduces lib/API/framework not mentioned in PROJECT.md OR CONTEXT.md mentions something whose current API you don't know. Search to map files_modified correctly and name realistic acceptance criteria.
Tools:
context7 (mcp__context7__resolve-library-id + mcp__context7__query-docs) — preferred for lib/SDK/API docsLimit: max 3 lookups per phase. Embed result as short notes in tasks or references in PLAN.md, do not expand context. </research_tools>
{phase_dir}/CONTEXT.md -> locked decisions of the phasels .jdi/phases/*/SHIPPED.md .jdi/archive/*/SHIPPED.md 2>/dev/null | while read -r f; do
grep -q '^## Learnings' "$f" && { echo "--- $f"; sed -n '/^## Learnings/,$p' "$f"; }
done | tail -40 # last 3 phases ≈ ≤15 bullets — cheap, high-signal
When a learning is relevant to a task being planned, convert it into an explicit acceptance criterion (e.g. learning "N+1 flagged twice" → acceptance "no N+1: queries batched or include()-ed"). Ignore learnings that do not apply. Never copy them verbatim as prose into PLAN.md.
If CONTEXT.md missing -> abort: "Run /jdi-discuss {phase_slug} first."
Use the orchestrator-provided {phase_dir}. Never reconstruct it via printf '%02d' or {NN-slug} interpolation.
Every task MUST have:
Legacy T-{N}.{M} form (phase-prefixed) is still accepted when reading existing v1 plans, but new plans MUST use the unprefixed form. This makes task IDs invariant under phase reordering.
Limits:
Read .jdi/specialists.md. For each row, capture (agent_name, file_glob).
For each task, match files_modified against globs:
files_modifiedSingle-stack shortcut: if .jdi/specialists.md has 1 row, skip matching — all tasks get that specialist.
Glob matching: standard glob semantics:
**/*.cs matches any .cs anywhere**/*.{ts,tsx,jsx} matches multi-extension**/* matches everything (catch-all)Identify independent tasks (no deps + disjoint files_modified).
Group into waves:
Tasks in the same wave can run in parallel. Tasks in different waves = sequential.
If phase has only 1-2 tasks, skip waves (use flat list).
Path: {phase_dir}/PLAN.md (orchestrator pre-resolved)
# Phase {position}: {name} — Plan (slug: {phase_slug})
## Goal
{from ROADMAP}
## Locked decisions (from CONTEXT.md)
- D-X: ...
- D-Y: ...
## Tasks
### Wave 1 (parallel-eligible)
#### T-{N}.1: {short objective}
- **Specialist:** jdi-doer-{slug} <!-- auto-assigned via file glob, Step 2.5 -->
- **Files modified:** `{path1}`, `{path2}`
- **Acceptance:**
- {criterion 1}
- {criterion 2}
- **Dependencies:** none
- **Test:** {which test}
- **Status:** pending
#### T-{N}.2: {short objective}
- **Files modified:** `{path3}`
- **Acceptance:** {criterion}
- **Dependencies:** none
- **Test:** {which test}
- **Status:** pending
### Wave 2
#### T-{N}.3: {short objective}
- **Files modified:** `{path4}`
- **Acceptance:** {criteria}
- **Dependencies:** T-{N}.1, T-{N}.2
- **Test:** {which test}
- **Status:** pending
## Execution
- Total tasks: {N}
- Waves: {M}
- Estimated parallel speedup: {N/M}x
## Files modified (all tasks)
- {file1}
- {file2}
- ...
## Test requirements
- {type}: {command}
- Minimum coverage: {%} (from PROJECT.md)
Run checklist:
If any fails, fix before saving.
If mode --review: show PLAN.md preview, ask approve/edit/cancel.
If default mode (no flag): save directly, show summary.
# .jdi/STATE.md (update)
current_phase: {position}
current_phase_slug: {phase_slug}
phase_status: planned
next_step: /jdi-do {phase_slug}
git add "{phase_dir}/PLAN.md"; git add .jdi/STATE.md 2>/dev/null || true
git commit -m "docs({phase_slug}): generate plan ({M} tasks, {W} waves)"
PLAN.md ok. {M} tasks, {W} waves, {count} files. Next: /jdi-do {phase_slug}
- Max 8 tasks per phase — split phase if exceeded
- Every task has files_modified + acceptance + test
- Waves respect deps + disjoint files_modified
- Do not plan without CONTEXT.md
- PLAN.md max 200 lines — concise
- Language: code/paths in English, description in English
- CONTEXT.md missing -> abort, suggest /jdi-discuss
- Code not yet existing (greenfield) -> tasks with predicted files_modified (paths that will be created)
- Ambiguous goal in ROADMAP -> AskUserQuestion to clarify
- `{phase_dir}/PLAN.md` created
- `.jdi/STATE.md` updated (current_phase + current_phase_slug)
- Atomic commit (scope = phase_slug)
- Final message with next step