一键导入
impl-plan
Use when creating implementation plans from design documents. Provides plan structure, status tracking, and progress logging guidelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating implementation plans from design documents. Provides plan structure, status tracking, and progress logging guidelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when configuring, running, inspecting, or troubleshooting divedra auto-improve supervision. Applies to workflow run --auto-improve, nested supervisor/superviser workflows, supervision policies, stall detection, remediation budgets, workflow patch modes, targeted reruns, supervision state, nestedSuperviserDriver, and GraphQL/library parity for supervised execution.
Use when configuring, validating, emitting, serving, listing, replaying, or troubleshooting divedra external event sources. Applies to .divedra-events, events validate/emit/serve/list/replay, webhook/chat/cron bindings, event-to-workflow input mapping, supervised event execution, mock scenarios for events, and event receipt inspection.
Use when implementation work in this repository changes behavior, adds functionality, or fixes bugs and the user has not explicitly asked to avoid workflows. Routes the work through the project-local divedra workflow `.divedra/workflows/design-and-implement-review-loop`, including design/plan alignment, implementation, review, user-facing documentation refresh, commit-message generation, and built-in git commit/push steps.
Use when implementing or issuing divedra manager control-plane actions. Applies to divedra graphql, GraphQL manager mutations, sendManagerMessage, retry-step, replay-communication, optional-step execute/skip decisions, manager session auth, idempotency keys, scoped attachments, and avoiding freeform-only privileged control.
Use when using, reviewing, or implementing divedra node add-ons. Applies to workflow.nodes[].addon, built-in divedra add-ons, local scoped add-ons, third-party add-on resolvers, addon.config, addon.inputs, addon.env, node add-on validation, and add-on-backed worker nodes.
Use when diagnosing failed, paused, stalled, timed out, or surprising divedra workflow executions. Applies to session status/progress/logs/export, runtime artifacts, node execution records, workflow validation failures, backend invocation errors, timeout failures, GraphQL inspection, event receipts, and artifact/session-store path issues.
| name | impl-plan |
| description | Use when creating implementation plans from design documents. Provides plan structure, status tracking, and progress logging guidelines. |
| allowed-tools | Read, Write, Glob, Grep |
This skill provides guidelines for creating and managing implementation plans from design documents.
Apply this skill when:
Implementation plans bridge the gap between design documents (what to build) and actual implementation (how to build). They provide:
IMPORTANT: Implementation plans and spec files do NOT need 1:1 mapping.
| Mapping | When to Use |
|---|---|
| 1:N (one spec -> multiple plans) | Large specs should be split into smaller, focused units |
| N:1 (multiple specs -> one plan) | Related specs sharing dependencies can be combined |
| 1:1 (one spec -> one plan) | Well-bounded features with clear scope |
Recommended granularity:
CRITICAL: Large implementation plan files cause Claude Code OOM (Out of Memory) errors.
| Metric | Limit | Reason |
|---|---|---|
| Line count | MAX 400 lines | Prevents memory issues when agents read files |
| Modules per plan | MAX 8 modules | Keeps plans focused and manageable |
| Tasks per plan | MAX 10 tasks | Enables completion in 1-3 sessions |
Split a plan into multiple files when ANY of these conditions are met:
BEFORE (one large plan):
impl-plans/foundation-and-core.md (1100+ lines)
AFTER (split by phase):
impl-plans/foundation-interfaces.md (~200 lines)
impl-plans/foundation-mocks.md (~150 lines)
impl-plans/foundation-types.md (~150 lines)
impl-plans/foundation-core-services.md (~200 lines)
When splitting, use consistent naming:
{feature}-{phase}.md - For phase-based splits{feature}-{category}.md - For category-based splitsExample:
session-groups-types.mdsession-groups-repository.mdsession-groups-manager.mdEach split plan MUST include:
## Related Plans
- **Previous**: `impl-plans/foundation-interfaces.md` (Phase 1)
- **Next**: `impl-plans/foundation-core-services.md` (Phase 3)
- **Depends On**: `foundation-interfaces.md`, `foundation-types.md`
IMPORTANT: All implementation plans MUST be stored directly under impl-plans/.
impl-plans/
├── README.md # Index of all implementation plans
├── PROGRESS.json # Task status index (single source of truth)
├── <feature>.md # Implementation plan files
├── <feature>-types.md # Split plans use consistent naming
└── templates/ # Plan templates
└── plan-template.md # Standard plan template
| Location | Purpose |
|---|---|
impl-plans/*.md | All implementation plan files (no subdirectories) |
impl-plans/PROGRESS.json | Single source of truth for plan/task status |
impl-plans/templates/ | Plan templates and examples |
Plan status is tracked in PROGRESS.json, not by file location.
DO NOT create implementation plan files outside impl-plans/.
Each implementation plan file MUST include:
# <Feature Name> Implementation Plan
**Status**: Planning | Ready | In Progress | Completed
**Design Reference**: design-docs/<file>.md#<section>
**Created**: YYYY-MM-DD
**Last Updated**: YYYY-MM-DD
List each module with its TypeScript type definitions. USE ACTUAL TYPESCRIPT CODE for interfaces and types - not prose descriptions.
## Modules
### 1. Core Interfaces
#### src/interfaces/filesystem.ts
**Status**: NOT_STARTED
```typescript
interface FileSystem {
readFile(path: string): Promise<string>;
writeFile(path: string, content: string): Promise<void>;
exists(path: string): Promise<boolean>;
watch(path: string): AsyncIterable<WatchEvent>;
}
interface WatchEvent {
type: 'create' | 'modify' | 'delete';
path: string;
}
Checklist:
### 4. Status Tracking Table
Use simple tables for overview tracking:
```markdown
## Module Status
| Module | File Path | Status | Tests |
|--------|-----------|--------|-------|
| FileSystem interface | `src/interfaces/filesystem.ts` | NOT_STARTED | - |
| ProcessManager interface | `src/interfaces/process-manager.ts` | NOT_STARTED | - |
| Mock implementations | `src/test/mocks/*.ts` | NOT_STARTED | - |
Simple table showing what depends on what:
## Dependencies
| Feature | Depends On | Status |
|---------|------------|--------|
| Phase 2: Repository | Phase 1: Interfaces | BLOCKED |
| Phase 3: Core Services | Phase 1, Phase 2 | BLOCKED |
Simple checklist:
## Completion Criteria
- [ ] All modules implemented
- [ ] All tests passing
- [ ] Type checking passes
- [ ] Integration verified
Track session-by-session progress:
## Progress Log
### Session: YYYY-MM-DD HH:MM
**Tasks Completed**: Module 1, Module 2
**Tasks In Progress**: Module 3
**Blockers**: None
**Notes**: Discovered edge case in variable parsing
ALWAYS include actual TypeScript code for:
Example:
```typescript
interface SessionGroup {
id: string; // Format: YYYYMMDD-HHMMSS-{slug}
name: string;
status: GroupStatus;
sessions: GroupSession[];
config: GroupConfig;
createdAt: string; // ISO timestamp
}
type GroupStatus = 'created' | 'running' | 'paused' | 'completed' | 'failed';
### DO NOT Include
- Implementation logic (function bodies)
- Private methods
- Algorithm details
- Excessive prose descriptions
### Format Comparison
**GOOD** (TypeScript-first):
```markdown
#### src/interfaces/clock.ts
```typescript
interface Clock {
now(): Date;
timestamp(): string;
sleep(ms: number): Promise<void>;
}
Checklist:
**BAD** (Prose-heavy):
```markdown
**Exports**:
| Name | Type | Purpose | Called By |
|------|------|---------|-----------|
| `Clock` | interface | Time operations | Caching, logging |
**Function Signatures**:
now(): Date
Purpose: Get current date/time
Called by: Logger, Cache
CRITICAL: Each task MUST have explicit task ID and dependency information for PROGRESS.json integration.
### TASK-001: Core Types
**Status**: Not Started
**Parallelizable**: Yes
**Deliverables**: `src/sdk/queue/types.ts`, `src/sdk/queue/events.ts`
**Dependencies**: None
**Description**:
Define core type definitions for the queue system.
**Completion Criteria**:
- [ ] Types defined
- [ ] Type checking passes
- [ ] Unit tests written
TASK-XXX where XXX is zero-padded number (001, 002, etc.)<plan-name>:TASK-XXXSame-plan dependency:
**Dependencies**: TASK-001
**Dependencies**: TASK-001, TASK-002
Cross-plan dependency:
**Dependencies**: session-groups-types:TASK-001
**Dependencies**: session-groups-types:TASK-001, command-queue-types:TASK-002
No dependencies:
**Dependencies**: None
Identify dependencies by analyzing:
Example analysis:
TASK-001: Define QueueRepository interface
TASK-002: Implement FileQueueRepository (implements QueueRepository)
-> TASK-002 depends on TASK-001
TASK-003: Define QueueManager class (uses QueueRepository)
-> TASK-003 depends on TASK-001
TASK-004: Define types (independent)
-> No dependencies, parallelizable
Tasks can be parallelized when:
Parallelizable: Yes means the task has no blocking dependencies on other incomplete tasks. Parallelizable: No is used when the task depends on other tasks (list in Dependencies field).
CRITICAL: After creating a plan file, PROGRESS.json MUST be updated to include the new plan and its tasks.
{
"lastUpdated": "2026-01-06T16:00:00Z",
"phases": {
"1": { "status": "COMPLETED" },
"2": { "status": "READY" },
"3": { "status": "BLOCKED" },
"4": { "status": "BLOCKED" }
},
"plans": {
"plan-name": {
"phase": 2,
"status": "Ready",
"tasks": {
"TASK-001": { "status": "Not Started", "parallelizable": true, "deps": [] },
"TASK-002": { "status": "Not Started", "parallelizable": false, "deps": ["TASK-001"] },
"TASK-003": { "status": "Not Started", "parallelizable": false, "deps": ["other-plan:TASK-001"] }
}
}
}
}
| Dependency Type | Plan File Format | PROGRESS.json Format |
|---|---|---|
| None | **Dependencies**: None | "deps": [] |
| Same-plan | **Dependencies**: TASK-001 | "deps": ["TASK-001"] |
| Same-plan multiple | **Dependencies**: TASK-001, TASK-002 | "deps": ["TASK-001", "TASK-002"] |
| Cross-plan | **Dependencies**: other-plan:TASK-001 | "deps": ["other-plan:TASK-001"] |
| Mixed | **Dependencies**: TASK-001, other-plan:TASK-002 | "deps": ["TASK-001", "other-plan:TASK-002"] |
Assign the plan to a phase based on its dependencies:
| Condition | Phase |
|---|---|
| No cross-plan dependencies | Phase 2 (or current active phase) |
| Depends on Phase 2 plans | Phase 3 |
| Depends on Phase 3 plans | Phase 4 |
When creating a new plan:
### TASK-XXX: sections**Status**, **Parallelizable**, **Dependencies**for task in plan_tasks:
task_entry = {
"status": task.status, # "Not Started", "In Progress", "Completed"
"parallelizable": task.parallelizable, # true/false
"deps": parse_dependencies(task.dependencies) # ["TASK-001", "other-plan:TASK-002"]
}
"new-plan-name": {
"phase": <determined-phase>,
"status": "Ready",
"tasks": { ... }
}
When updating PROGRESS.json, use file locking to prevent race conditions:
# Acquire lock
while [ -f impl-plans/.progress.lock ]; do sleep 1; done
echo "<plan-name>" > impl-plans/.progress.lock
# ... perform PROGRESS.json update ...
# Release lock
rm -f impl-plans/.progress.lock
impl-plans/<feature>.mdNote: No file move is required. PROGRESS.json is the single source of truth for plan status.
| Section | Required | Format |
|---|---|---|
| Header | Yes | Markdown metadata |
| Design Reference | Yes | Link + summary |
| Modules | Yes | TypeScript code blocks + checklist |
| Status Table | Yes | Simple table |
| Dependencies | Yes | Simple table |
| Completion Criteria | Yes | Checklist |
| Progress Log | Yes | Session entries |