用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ForceInjection/domain-driven-design-skills --skill planning-patterns命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Conduct deep academic research for philosophy, neuroscience, cognitive science, and theoretical computer science (computability, complexity, AI theory, logic). Use when user asks to: research academic topics, find scholarly papers, conduct literature reviews, analyze citations, synthesize research findings, explore philosophical arguments, investigate consciousness/cognition, study computability/decidability/Turing machines, or analyze academic debates. Triggers on: 'research papers', 'literature review', 'academic sources', 'scholarly articles', 'philosophy of mind', 'computability theory', 'neuroscience studies', 'find papers on', 'what does the research say'.
Create clear action plans with steps, success criteria, and risk awareness. Use before implementing features, making changes, starting projects, or anytime you need a roadmap to success. Triggers on "plan this", "how should we approach", "what's the strategy", "steps to complete", or when facing complex multi-step work.
Add keyboard navigation to a feature using CommandRegistryService. Use when implementing keyboard shortcuts, vim-style navigation, or hotkeys for a page or component.
正在显示 SKILL.md
基于 SOC 职业分类
| name | planning-patterns |
| description | Internal skill. Use cc10x-router for all development tasks. |
| allowed-tools | Read, Grep, Glob |
Write comprehensive implementation plans assuming the engineer has zero context for the codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
Assume they are a skilled developer, but know almost nothing about the toolset or problem domain. Assume they don't know good test design very well.
Core principle: Plans must be executable without asking questions.
NO VAGUE STEPS - EVERY STEP IS A SPECIFIC ACTION
"Add validation" is not a step. "Write test for empty email, run it, implement check, run it, commit" - that's 5 steps.
Each step is one action (2-5 minutes):
Not a step:
Every plan MUST start with this header:
# [Feature Name] Implementation Plan
> **For Claude:** REQUIRED: Follow this plan task-by-task using TDD.
> **Design:** See `docs/plans/YYYY-MM-DD-<feature>-design.md` for full specification.
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
**Prerequisites:** [What must exist before starting]
---
Note: If a design document exists, always reference it in the header.
### Task N: [Component Name]
**Files:**
- Create: `exact/path/to/file.ts`
- Modify: `exact/path/to/existing.ts:123-145`
- Test: `tests/exact/path/to/test.ts`
**Step 1: Write the failing test**
```typescript
test('specific behavior being tested', () => {
const result = functionName(input);
expect(result).toBe(expected);
});
Step 2: Run test to verify it fails
Run: npm test tests/path/test.ts -- --grep "specific behavior"
Expected: FAIL with "functionName is not defined"
Step 3: Write minimal implementation
function functionName(input: InputType): OutputType {
return expected;
}
Step 4: Run test to verify it passes
Run: npm test tests/path/test.ts -- --grep "specific behavior"
Expected: PASS
Step 5: Commit
git add tests/path/test.ts src/path/file.ts
git commit -m "feat: add specific feature"
## Requirements Checklist
Before writing a plan:
- [ ] Problem statement clear
- [ ] Users identified
- [ ] Functional requirements listed
- [ ] Non-functional requirements listed (performance, security, scale)
- [ ] Constraints documented
- [ ] Success criteria defined
- [ ] Existing code patterns understood
## Risk Assessment Table
For each identified risk:
| Risk | Probability (1-5) | Impact (1-5) | Score | Mitigation |
|------|-------------------|--------------|-------|------------|
| API timeout | 3 | 4 | 12 | Retry with backoff |
| Invalid input | 4 | 2 | 8 | Validation layer |
| Auth bypass | 2 | 5 | 10 | Security review |
Score = Probability × Impact. Address risks with score > 8 first.
## Risk-Based Testing Matrix
**Match testing depth to task risk:**
| Task Risk | Example | Tests Required |
|-----------|---------|----------------|
| Trivial | Typo fix, docs update | None |
| Low | Single file change, utility function | Unit tests only |
| Medium | Multi-file feature, new component | Unit + Integration tests |
| High | Cross-service, auth, state management | Unit + Integration + E2E tests |
| Critical | Payments, security, data migrations | All tests + Security audit |
**How to assess risk:**
- How many files touched? (1 = low, 3+ = medium, cross-service = high)
- Is it auth/payments/security? (always high or critical)
- Is it user-facing? (medium minimum)
- Can it cause data loss? (high or critical)
**Use this matrix when planning test steps. Don't over-test trivial changes. Don't under-test critical ones.**
## Functionality Flow Mapping
Before planning, document all flows:
**User Flow:**
**Admin Flow:**
**System Flow:**
## Red Flags - STOP and Revise
If you find yourself:
- Writing "add feature" without exact file paths
- Skipping the test step
- Combining multiple actions into one step
- Using "etc." or "similar" instead of explicit steps
- Planning without understanding existing code patterns
- Creating steps that take more than 5 minutes
- Not including expected output for test commands
**STOP. Revise the plan with more specific steps.**
## Rationalization Prevention
| Excuse | Reality |
|--------|---------|
| "They'll know what I mean" | No they won't. Be explicit. |
| "Too much detail is annoying" | Vague plans cause bugs. |
| "Testing is obvious" | Write the test command. |
| "File paths are discoverable" | Write the exact path. |
| "Commits are implied" | Write when to commit. |
| "They can figure out edge cases" | List every edge case. |
## Output Format
```markdown
# [Feature Name] Implementation Plan
> **For Claude:** REQUIRED: Follow this plan task-by-task using TDD.
**Goal:** [One sentence]
**Architecture:** [2-3 sentences]
**Tech Stack:** [Technologies]
**Prerequisites:** [Requirements]
---
## Phase 1: Foundation
### Task 1: [First Component]
**Files:**
- Create: `src/path/file.ts`
- Test: `tests/path/file.test.ts`
**Step 1:** Write failing test
[code block with test]
**Step 2:** Run test, verify fails
Run: `[command]`
Expected: FAIL
**Step 3:** Implement
[code block with implementation]
**Step 4:** Run test, verify passes
Run: `[command]`
Expected: PASS
**Step 5:** Commit
```bash
git add [files]
git commit -m "feat: [description]"
...
| Risk | P | I | Score | Mitigation |
|---|---|---|---|---|
| ... | ... | ... | ... | ... |
## Save the Plan (MANDATORY)
**Two saves are required - plan file AND memory update:**
### Step 1: Save Plan File (Use Write tool - NO PERMISSION NEEDED)
Bash(command="mkdir -p docs/plans")
Write(file_path="docs/plans/YYYY-MM-DD--plan.md", content="[full plan content from output format above]")
Bash(command="git add docs/plans/*.md") Bash(command="git commit -m 'docs: add implementation plan'")
### Step 2: Update Memory (CRITICAL - Links Plan to Memory)
**Use Edit tool (NO permission prompt):**
Read(file_path=".claude/cc10x/activeContext.md")
Edit(file_path=".claude/cc10x/activeContext.md", old_string="# Active Context", new_string="# Active Context
Plan created for [feature]. Ready for execution.
| Decision | Choice | Why |
|---|---|---|
| [Key decisions from plan] | [Choice] | [Reason] |
Execute: docs/plans/YYYY-MM-DD-<feature>-plan.md
[current date/time]")
**Also append to progress.md using Edit:**
Read(file_path=".claude/cc10x/progress.md")
Edit(file_path=".claude/cc10x/progress.md", old_string="[last section heading]", new_string="[last section heading]
**WHY BOTH:** Plan files are artifacts. Memory is the index. Without memory update, next session won't know the plan exists.
**This is non-negotiable.** Memory is the single source of truth.
## Execution Handoff
After saving the plan, offer execution choice:
**"Plan complete and saved to `docs/plans/<filename>.md`. Two execution options:**
**1. Subagent-Driven (this session)** - Fresh subagent per task, review between tasks, fast iteration
**2. Manual Execution** - Follow plan step by step, verify each step
**Which approach?"**
## Remember
- Exact file paths always
- Complete code in plan (not "add validation")
- Exact commands with expected output
- DRY, YAGNI, TDD, frequent commits
- Each step = one action (2-5 minutes)
- No assumptions about context