一键导入
write-plan
Generate Plan artifact content for the agreed first slice and persist it through Plan tools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate Plan artifact content for the agreed first slice and persist it through Plan tools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implement one named Project issue with red-green TDD and return a structured task outcome.
Use when writing or reviewing TypeScript/full-stack code. Encodes principles for type safety (branded types, discriminated unions, end-to-end types), real tests over mocks, OpenTelemetry observability, and picking the right abstractions instead of premature ones.
Use when designing, writing, reviewing, or refactoring React components and features. Covers component boundaries, state ownership, composition, prop design, custom hooks, useEffect avoidance, memoization, Zustand, TanStack Query, loading/error/empty states, async event handling, TypeScript state modeling, and file organization. Trigger for React component design questions, component-tree restructuring, state management choices, data fetching, effect cleanup, reusable UI composition, prop drilling, render performance, error boundaries, optimistic updates, double-submit prevention, race conditions, or organizing a React codebase.
Generate Brief artifact content and persist it through the Brief and Project context tools.
Use only after a fresh slice PRD exists under the Project's .cairn/prds/ folder and the user-approved slice needs to be broken into local implementation issue files.
Use only after the project brief is concrete, the Cairn has proposed a smallest meaningful first slice, and the user has agreed to that slice; silently draft the slice PRD.
| name | write-plan |
| description | Generate Plan artifact content for the agreed first slice and persist it through Plan tools. |
| disable-model-invocation | false |
| response_schema | artifact_write |
| args | {"type":"object","required":["project_root","slice_agreement"],"properties":{"project_root":{"type":"string","description":"Absolute path to the active Project root."},"slice_agreement":{"type":"string","description":"The slice the Cairn proposed and the user agreed to."},"brief_path":{"type":"string","description":"Project-relative path to the Brief, normally brief.json."},"issues_directory":{"type":"string","description":"Project-relative path to the issue files directory, normally issues/."}}} |
Generate the Plan content in the Cairn's plain-language voice, then finish by calling the custom Plan artifact tool. Call create_plan_artifact for a new Plan. Call update_plan_artifact only when the inputs clearly say this is a revision of an existing Plan and provide a short reason.
Do not use raw Write or Edit for Plan artifact data. Do not create replacement Plan files. The Plan artifact tools own plan.json, its schema validation, and its envelope metadata.
Use the slice agreement, Brief, and issue files to write the user-visible Plan. Read referenced files when present, but keep the final Plan plain-language and free of engineering vocabulary. If the slice agreement is too vague to name a concrete first slice, return outcome: "blocked" with one short message naming the missing decision.
The Plan artifact tool input uses these fields:
title: short plain-language name for the first slice.summary: one short paragraph explaining what this slice builds first.from_brief: one short paragraph paraphrasing what the user wanted and ending with why this first slice fits.outcomes: concrete, demonstrable capabilities, one sentence each in second person: "You'll be able to..."pieces: a 3 to 6 item ordered list of small steps. Each step must be something the user could see when it is done, never an engineering task.not_yet: 2 to 4 things from the Brief that are intentionally not in this first slice, using the user's vocabulary. Avoid phrases like "out of scope" or "deferred features."Use action-y language: "you'll be able to..." and "I'll work through..." rather than generic product description. Avoid engineering vocabulary throughout.
create_plan_artifact with the complete Plan content.plan.json already exists and the inputs include a revision reason, call update_plan_artifact with the complete replacement Plan content and that reason. If there is no revision reason, return a small failure result instead of guessing.After the tool call finishes, return only one JSON object matching artifact_write:
{ "outcome": "complete", "message": "Created the Plan artifact.", "path": "plan.json" }
Use outcome: "failure" with path: "" when a tool fails and retrying is not safe. Use outcome: "blocked" with path: "" when the inputs lack a user decision needed for the Plan.
Failure and blocked examples:
{ "outcome": "failure", "message": "create_plan_artifact failed validation for outcomes.", "path": "" }
{ "outcome": "blocked", "message": "The first slice needs a concrete user-visible outcome before I can save the Plan.", "path": "" }