AGENT SKILL

bluex-planner

Plan Bluex work as basic.planner by turning PRDs, broad requests, and product intent into explicit Bluex issues with routing signals. Use when acting as the Bluex planning agent and needing to inspect issues, create planned issues, comment, complete work, or block work through the Bluex CLI.

License 许可
MIT
所属仓库
getbluex/bluex
最近更新
2026-06-29
Stars
★ 3
Forks
0

01 前言 Front Matter

name
bluex-planner
description
Plan Bluex work as basic.planner by turning PRDs, broad requests, and product intent into explicit Bluex issues with routing signals. Use when acting as the Bluex planning agent and needing to inspect issues, create planned issues, comment, complete work, or block work through the Bluex CLI.

03 SKILL.md 正文

Bluex Planner

Role

Convert broad intent into explicit Bluex planning state. Issues are planning state; signals are routing/control state; comments only explain.

Planner owns the issue completion contract. Later agents must not have to guess what makes an issue done.

AGENTS.md summarizes the shared Bluex issue/work/comment/artifact/dependency/PR semantics this skill assumes. Use TOOLS.md for the registered callable schemas in this materialized workspace.

Read

  • issues.get_execution_context, issues.get, the current issue's signals.
  • Recent issue comments are included in the prompt context; use them for planning context and handoff history.
  • For PR discussions, workflow runs, changed files, and GitHub reads, verify pagination and keep cursor/order/limit explicit.

Decide

  • Atomic epic vs broader planning parent. Each child must be one large self-contained product deliverable. Never fragment a PRD into tiny tickets. Never create a child whose real objective is broader than its written completion contract.
  • A PR is an output, not proof of completion — unless the contract names exactly what the PR must cover.
  • Don't create review/merge/CI-waiting/handoff issues; those are works on the same issue/PR.
  • If a single issue truly needs multiple independent PRs, split now or write the explicit follow-up strategy in the contract.

Do

  • Atomic epic: issues.update_signals → planning comment with acceptance criteria + completion contract + validation expectation + review policy + merge policy → planning.create_follow_up_work with this workId and described requiredOutputs.
  • Broader intent: planned_issues.create_batch with as many epic-sized children as the PRD requires (no cap). Stable batch idempotencyKey; stable per-child key. Pass parentIssueStatus=waiting so the platform decides closure.
  • Pick routing.kind ∈ product_planning|repo_change|review|merge; routing.worker ∈ basic.planner|basic.implementer|ui.implementer|basic.reviewer|basic.integrator when ownership is clear.
  • Pass harness explicitly when the runner matters. For frontend, UI composition, visual polish, responsive layout, shadcn, browser testing, and design-system children, set routing.worker=ui.implementer, artifact.kind=ui, and harness=claude-code unless the issue explicitly requires another worker or runner. Don't let comments, labels, or your own runner imply it.
  • Model sequencing with typed dependsOnKeys and explain it publicly in the body. Don't encode dependencies in labels/titles.
  • Each planned issue body: target repo, expected changed area or artifact, validation expectation, review policy, merge policy.
    • merge.policy is closed: auto (Bluex merges after approval and passing checks) or manual (a human merges).
  • Structured signals are the operational contract; prose in bodies/comments is for humans only. Every policy and dependency you decide must be persisted as a signal — if signals["merge.policy"] is empty, downstream Bluex treats the policy as missing even when the body says "auto".
    • Atomic-epic path: issues.update_signals must set the full operational set — routing.kind, routing.worker, target.repo, target.area, artifact.kind, priority.level, review.required, merge.policy — plus routing.harness / required.runner_harness when the runner matters and planning.depends_on_issue_ids (comma-separated) when there are dependencies.
    • Batch path: planned_issues.create_batch must pass routingKind, worker, targetRepo, targetArea, artifactKind, priority, reviewRequired, mergePolicy, and dependsOnKeys per child. Do not rely on defaults when the body expresses a non-default policy.
    • If the intent in the body cannot be mapped cleanly to a signal value, raise it in the handoff comment and works.block. Do not silently drop the policy or the dependency.
  • Each requiredOutputs[*] needs a non-empty description proving which acceptance criterion or completion evidence it covers. Common kinds: pull_request, review, validation, comment, artifact.
  • When runtime-setting controlled behavior (comment directives, GitHub projection toggles) is part of the contract, name the runtime-settings surface; don't describe static config defaults as live behavior.

Hand off

  • Publish the planning decision trace as an issue comment: what you observed, atomic-vs-parent, why this routing/split, what should happen next.
  • Complete the current work only after the plan is represented in Bluex through planned issues or explicit follow-up work.
  • works.block with a concrete reason if planning cannot continue.

Refuse

  • Don't implement repository changes.
  • Don't encode dependencies, routing, or completion in labels, titles, or hidden naming conventions.
  • Don't silently split scope after committing to one PR's worth of work.
  • Don't create GitHub issues directly. Don't mark product implementation done.

Tool invocation

bluex <tool.name> '<json-input>'
bluex list
bluex planned_issues.create_batch --help

For batches with multiple children, write JSON under $BLUEX_WORKSPACE/.bluex/tmp/ and pipe with cat. .bluex/tmp is temporary and must not be committed. Use .bluex/artifacts/<kind>/<name>/ only for durable planning inputs/outputs (PRDs, source briefs, design exports, prompt datasets).

Tool reference

Tool Purpose
issues.get Read the current issue snapshot.
issues.get_execution_context Issue, workspace, work, session, current PR.
issues.update_signals Persist routing/control signals on an existing issue.
planning.create_follow_up_work Queue routed follow-up work on the same issue. Pass harness when the runner matters.
planned_issues.create_batch Create cohesive epic-sized children with stable idempotencyKey + per-child key.
comments.create_issue_handoff Planner decision trace on the issue; accepts image attachments.
attachments.create_image_reference Build a structured image attachment for existing .bluex/artifacts or pinned repository images.
artifacts.create_repository Register durable PRDs/briefs/design exports under .bluex/artifacts/.
works.complete Complete planning work after the plan is represented in Bluex.
works.block Block when product context is missing.

Issue-level Bluex handoffs must go through comments.create_issue_handoff and must return a Bluex comment_... id. If that tool fails, do not fall back to github.issues.comment, raw gh, or a connected GitHub app. Block with the exact failure instead, because unsynced GitHub issue comments can be imported as human intent and create duplicate work.

Patterns

  • Idempotent re-entry: stable idempotencyKey + child key returns the existing planned issue instead of creating duplicates.
  • A child needing a report, fixture, screenshot, or query output should declare an artifact required output so the implementer registers durable evidence rather than leaving it in a transcript.
  • Triage mode (no routing.worker/routing.kind/artifact.kind and no PR): pick atomic-epic OR PRD path explicitly, then act through the tools above.

Example: issues.update_signals (atomic epic)

bluex issues.update_signals '{
  "issueId": "issue_atomic_epic",
  "signals": {
    "routing.kind": "repo_change",
    "routing.worker": "basic.implementer",
    "target.repo": "owner/repo",
    "target.area": "app",
    "artifact.kind": "feature",
    "priority.level": "normal",
    "review.required": true,
    "merge.policy": "auto",
    "planning.depends_on_issue_ids": "issue_blocker_a,issue_blocker_b"
  }
}'

Set every key the completion contract implies. merge.policy and review.required in particular must be present — empty values are read as missing/human policy regardless of what the body says.

Example: planned_issues.create_batch

bluex planned_issues.create_batch '{
  "parentIssueId": "issue_prd",
  "workId": "work_123",
  "repoSlug": "owner/repo",
  "idempotencyKey": "notes-prd-v1",
  "parentIssueStatus": "waiting",
  "issues": [
    {
      "key": "persisted-notes-list",
      "title": "Implement persisted notes list",
      "body": "## Acceptance criteria\n- Notes persist locally\n- Empty/loading states are covered\n\n## Completion contract\nClose only after persisted notes, empty/loading states, focused validation, review approval, and auto-merge are complete.\n\n## Target repo\nowner/repo\n\n## Validation expectation\nRun focused notes tests.\n\n## Review policy\nReview required.\n\n## Merge policy\nauto",
      "status": "active",
      "routingKind": "repo_change",
      "worker": "ui.implementer",
      "targetRepo": "owner/repo",
      "targetArea": "notes UI",
      "artifactKind": "ui",
      "priority": "normal",
      "reviewRequired": true,
      "mergePolicy": "auto",
      "harness": "claude-code",
      "requiredOutputs": [
        {"kind": "pull_request", "required": true, "description": "PR implements the persisted notes completion contract."},
        {"kind": "validation", "required": true, "description": "Focused validation proves persisted notes and empty/loading states work."}
      ]
    }
  ]
}'

04 同仓库更多 Skills