ag-generate-plan
Create or update implementation plans in the repo's SIMPLE, COMPLEX, or PHASE PROGRAM format. Use when turning an idea, PRD, or approved direction into saved plan artifacts.
- License 许可
- MIT
- 最近更新
- 2026-08-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ag-generate-plan
- layer
- contract
- description
- Create or update implementation plans in the repo's SIMPLE, COMPLEX, or PHASE PROGRAM format. Use when turning an idea, PRD, or approved direction into saved plan artifacts.
- trigger_keywords
- plan, create plan, write plan, generate spec, plan artifact, phase program, umbrella plan, session goal block
02 资源文件 15
- 参考文档references/example-complex-prd.md81.5 KB
- 参考文档references/example-simple-prd.md7.5 KB
- 参考文档references/generate-plan.md19.6 KB
- 脚本scripts/fixtures/validate-phase-stub/fail.md779 B
- 脚本scripts/fixtures/validate-phase-stub/pass.md817 B
- 脚本scripts/fixtures/validate-umbrella-artifact/fail.md708 B
- 脚本scripts/fixtures/validate-umbrella-artifact/pass.md1.1 KB
- 脚本scripts/update-roadmap.mjs5.6 KB
- 脚本scripts/validate-harness-artifacts.mjs7.1 KB
- 脚本scripts/validate-phase-stub.mjs6.6 KB
- 脚本scripts/validate-plan-artifact.mjs9.6 KB
- 脚本scripts/validate-umbrella-artifact.mjs7.6 KB
- 脚本templates/phase-loop-workflow-template.js6.5 KB
- 参考文档templates/phase-stub-template.md4.1 KB
- 参考文档templates/umbrella-plan-template.md12.5 KB
03 SKILL.md 正文
Generate Plan & Phase Program (ag-generate-plan)
When to Apply
Use this skill when turning ideas, PRDs, or approved directions into authoritative implementation plan artifacts for the project.
This skill is the canonical plan artifact contract for the repository, supporting three complexity classifications:
- SIMPLE: Single-session feature (8-15 steps, 1 plan artifact).
- COMPLEX: Multi-phase project within 1 plan file.
How to Use
Refer to the workflow instructions and command references detailed below.
Workflow
- Read
references/generate-plan.mdfor the single-plan contract. - Run
date +%d-%m-%ybefore choosing the filename. - Classify complexity:
SIMPLE,COMPLEX, orPHASE PROGRAM. - Save plans inside task subfolders:
- Single plan:
process/general-plans/active/{slug}_{date}/{slug}_PLAN_{date}.md(orprocess/features/{feature}/active/{slug}_{date}/{slug}_PLAN_{date}.md). - Phase Program:
process/features/{feature}/active/{program-slug}_{date}/{program-slug}-umbrella_PLAN_{date}.mdfor umbrella plan, andphase-NN-{slug}_PLAN_{date}.mdfor per-phase stubs.
- Single plan:
- Per task-folder artefact colocation, every artifact (plan, spec, reports, references) lives FLAT inside the task folder.
- Validate generated artifacts:
- Single plan:
node .claude/skills/ag-generate-plan/scripts/validate-plan-artifact.mjs <plan-path> - Umbrella plan:
node .claude/skills/ag-generate-plan/scripts/validate-umbrella-artifact.mjs <umbrella-path> - Phase stub:
node .claude/skills/ag-generate-plan/scripts/validate-phase-stub.mjs <stub-path>
- Single plan:
Phase Program Kickoff Procedure (3+ Phases)
When PHASE PROGRAM is detected (3 or more dependent phases):
- Invoke
ag-agent-strategy-compare: For each phase, run strategy evaluation before drafting. - Read Template Files:
.claude/skills/ag-generate-plan/templates/umbrella-plan-template.md.claude/skills/ag-generate-plan/templates/phase-stub-template.md
- Emit Kickoff Recommendation: Present feature folder, umbrella plan name, phase list, and immediate next action. Stop for user approval.
- Create Artifacts:
- Create task folder:
process/features/{feature}/active/{program-slug}_{date}/ - Create umbrella plan:
{program-slug}-umbrella_PLAN_{date}.md - Create phase plan stubs:
phase-NN-{slug}_PLAN_{date}.md
- Create task folder:
- Emit Compressed Session-Goal Block: Print copy-pasteable
/goalblock (≤4000 chars) in chat.
Required Plan Sections
For new or newly touched direct *_PLAN_*.md files, include all required sections:
TouchpointsPublic ContractsBlast RadiusVerification Evidence(table:| Gate / Scenario | Strategy | Proves SPEC criterion |)Test Infra Improvement NotesResume and Execution HandoffValidate Contract(placeholder forag-validate-agent)
References
04 同仓库更多 Skills
zustand
Rules and standards for state management using Zustand in React and Next.js. Use when implementing client-side stores, persistence with localStorage, or preventing SSR hydration mismatch.
zod
Zod v4 schema validation best practices. Use when defining schemas, utilizing safeParse, or customizing error messages.
upstash-ratelimit
Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.
ui-design
UI/UX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.
typescript
TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to "optimize TypeScript performance", "speed up tsc compilation", "configure tsconfig.json", "fix type errors", "improve async patterns", or encounters TS errors (TS2322, TS2339, "is not assignable to"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.
typescript-refactor
TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should be used when refactoring, reviewing, or modernizing TypeScript or React/TSX code for type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving type architecture, narrowing, generics, discriminated unions, error handling, React component and hook typing, or migration to modern TypeScript features (satisfies, using, const type parameters, inferred type predicates, isolatedDeclarations, erasable syntax, import attributes).