AgentSkillsCN

pm-beads-plan

将已批准的PRD转化为清晰无歧义的Beads追踪图,在交付实施前,通过bdui任务评审进行第二次审批关口。

SKILL.md
--- frontmatter
name: pm-beads-plan
description: Convert an approved PRD into an unambiguous Beads tracking graph, then run a second approval gate with bdui task review before implementation handoff.

PM Beads Plan (Strict)

Current Phase

  • BEADS PLANNING (and then AWAITING BEADS APPROVAL)

Purpose

Convert an APPROVED PRD into an executable Beads graph:

  • 1 Epic per PRD
  • Atomic child tasks with Definition of Done (DoD)
  • Explicit dependencies (blocks / blocked-by)
  • Human review gate before implementation starts

Paired Support Agents (recommended)

Before locking the task graph, proactively consult:

  1. Senior Engineer for dependency correctness and implementation sequencing.
  2. Librarian for external constraints (API quotas, platform requirements, compliance notes).
  3. Smoke Test Planner output from discovery/PRD for QA task coverage.

Preconditions (hard gate)

Before planning, verify all of the following:

  1. PRD path is provided and file exists.
  2. User explicitly confirms PRD is approved.
  3. PRD Open Questions section is empty.

If any precondition fails:

  • STOP.
  • State exactly what is missing.
  • Ask only for the missing prerequisite(s).
  • Do not generate epic/tasks/dependencies yet.

Planning Rules

When preconditions pass:

  • Ensure Beads is initialized (bd init) if .beads/ is missing.
  • Epic title format:
    • <slug> (PRD: <path>)
  • Generate atomic tasks only:
    • each task independently completable
    • no vague "misc/refactor/fix later" tasks
  • Each task must include:
    • clear scope
    • DoD (testable)
  • Dependencies must be explicit:
    • define blocks / blocked-by relationships with bd dep
  • Include a dedicated Manual QA Smoke Tests task in the epic:
    • consumes the discovery/PRD smoke-test plan
    • runs happy/unhappy/regression checks
    • includes browser-based smoke checks when needed

bdui Review Gate (required)

After task graph is generated:

  • Present bdui as the primary visual review.
  • If bdui is available, instruct to launch it from repo root.
  • Always provide fallback list view:
    • bd list --parent <epic-id> --pretty
    • bd graph <epic-id> --compact
  • Require explicit user response approved before implementation.

Handoff to Implementation

When user responds approved at this gate:

  • Automatically invoke $pm-implement with PRD path and epic ID.
  • Do not ask the user to manually run the next command.
  • Preferred orchestration path: invoke via spawn_agent and wait for completion.

Minimal Repo Bootstrap (only if needed)

  • Ensure docs/beads.md exists.
  • If missing, create it with these conventions:
    • PRD slug format: YYYY-MM-DD--kebab-slug
    • Epic naming includes slug + PRD path
    • Atomic tasks + DoD + explicit deps
    • .beads/ should be committed to git

Output Requirements (every run)

Always include these sections, in order:

  1. Current phase: BEADS PLANNING or Current phase: AWAITING BEADS APPROVAL
  2. PRD path
  3. Epic name
  4. Task list (with DoD)
  5. Dependency list
  6. Human-readable task graph
  7. bdui review (with repo link + fallback commands)
  8. What I need from you next

Invocation

  • Trigger strongly on $pm-beads-plan <request>.
  • Expect PRD path and approval confirmation.