plan-issue-cli
Overview
plan-issue-cli provides the Rust command contract for plan/issue delivery orchestration. It is the typed replacement lane for
plan-issue-delivery-loop.sh behavior and is built around deterministic task-spec generation, issue-body rendering, and gate-enforced
sprint transitions. Task Decomposition is the runtime-truth execution table; sprint task-spec/prompt artifacts are derived from those
issue rows. plan-tooling split-prs provides grouping primitives only in the current model; plan-issue-cli materializes runtime
Owner/Branch/Worktree/Notes metadata from plan content plus grouping results.
The crate ships two binaries with the same command surface:
plan-issue: live GitHub-backed modeplan-issue-local: local-first rehearsal mode (offline/dry-run friendly)
Shell wrapper scripts are deprecated for this crate path. Use plan-issue / plan-issue-local directly.
Command surface
Build and preparation
build-task-spec: build sprint-scoped task-spec TSV from a plan.build-plan-task-spec: build plan-scoped task-spec TSV (all sprints).
Plan-level flow
start-plan: open one plan issue and emit plan artifacts.status-plan: summarize Task Decomposition status from issue body/body file.link-pr: link a concrete PR to task rows and update row status (defaultin-progress).ready-plan: apply review-ready markers and optional review summary comment.close-plan: enforce final close gate and close the plan issue.cleanup-worktrees: enforce cleanup of all issue-assigned task worktrees.
Sprint-level flow
start-sprint: open sprint execution loop after previous sprint gate passes, validate runtime-truth rows against plan lanes, and render artifacts without rewriting issue rows.ready-sprint: post sprint-ready signal for main-agent review.accept-sprint: enforce merged-PR gate and mark sprint accepted.multi-sprint-guide: print repeated command flow for a whole plan.
Shell completion
completion <bash|zsh>: export completion script for each binary.
Global flags
--repo <owner/repo>: pass-through repo target for GitHub operations.--dry-run: print write actions without mutating GitHub state.-f, --force: bypass markdown payload guard for body/comment writes.--jsonor--format json: machine-readable contract output.--format text: human-readable output.
Local-mode constraints
plan-issue-localdoes not support live--issuepaths that require GitHub reads/writes.- Use
plan-issue <command>for live operations. - Use
--body-file+--dry-runflows for local rehearsal where supported. start-planin local mode emits deterministic placeholder issue number999.
Task Decomposition schema
- Canonical table columns are fixed to:
Task | Summary | Owner | Branch | Worktree | Execution Mode | PR | Status | Notes
- Writer and parser share the same schema contract.
- Writer sanitizes cell values (including
|) vianils-common::markdown::canonicalize_table_cellso parser column count remains deterministic and drift checks stay stable. - Shared runtime lanes (
per-sprint,pr-shared) must keep a consistentPRvalue across rows.
Grouping and strategy rules
--strategy deterministicrequires--pr-groupingfor split-dependent commands:build-task-spec,build-plan-task-spec,start-plan,start-sprint,ready-sprint,accept-sprint.
--pr-grouping per-sprint: one shared group per sprint.--pr-grouping group --strategy deterministic: requires explicit--pr-group <task>=<group>mappings.--strategy autorejects--pr-grouping.--strategy autoresolves each sprint from plan metadataPR grouping intentfirst, then--default-pr-groupingfor metadata gaps.--strategy autoallows optional pins only for sprints resolved togroup; pins targetingper-sprintlanes fail fast.- Use
plan-tooling validatebefore orchestration when sprint metadata is present; invalid/partial metadata is blocked there. - When a sprint resolves to a single shared PR group,
Execution Modeis normalized toper-sprint(instead ofpr-shared) to reflect single-lane execution semantics. - Runtime lane metadata is materialized locally in
plan-issue-cli(not read from split-prs runtime placeholders).
Quick examples
# 1) Build plan-scoped task spec locally
# 2) Start plan issue in live mode
# 3) Local rehearsal start-plan (deterministic placeholder issue_number=999)
# 4) Export completion
# 5) Auto grouping with metadata fallback
Exit codes
0: success1: runtime/validation failure2: usage failure
Specifications
Fixtures
- Shell parity fixtures live under
tests/fixtures/shell_parity/. - Use
tests/fixtures/shell_parity/regenerate.shto refresh fixture snapshots when shell behavior intentionally changes.