一键导入
writing-plans
Write implementation plans: bite-sized tasks for coding engine dispatch.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Write implementation plans: bite-sized tasks for coding engine dispatch.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Branch, commit, push, and open PRs with humanized messages, then monitor GitHub Actions CI. Per-project autonomy gating; blocks direct pushes to the default branch and pushes with a dirty tree. Never auto-merges.
Dispatch patterns for Claude Code as the coding engine. Default harness. Implementation dispatches go through dispatch_coder.py (writes the dispatch receipt the commit gate requires).
Testing strategy, TDD enforcement, spec compliance, and regression checks.
Automated fix loop for failed Quality/Reviewer checks. Parses failures, builds escalating prompts, dispatches through the active harness up to 3 times.
Run independent, file-disjoint plan tasks concurrently, each isolated in its own git worktree + branch. Collects per-task results; never auto-merges.
T-shirt sizing for tasks before dispatch. Runs heuristics and optionally LLM classification to determine task size (S/M/L/XL), recommend local vs cloud routing, and set tool budgets.
基于 SOC 职业分类
| name | writing-plans |
| description | Write implementation plans: bite-sized tasks for coding engine dispatch. |
| version | 2.0.0 |
| author | Hermes Coder (adapted from obra/superpowers) |
| license | MIT |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["planning","design","implementation","workflow","documentation"],"related_skills":["subagent-driven-development","test-driven-development","requesting-code-review"]}} |
Write comprehensive implementation plans assuming the implementer (Claude Code) has zero context for the codebase. Document everything: which files to touch, complete code, testing commands, docs to check, how to verify. Give them bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
The coding engine receives each task as a self-contained one-shot prompt — it cannot see the plan or prior tasks. Every task must be fully self-contained.
Core principle: A good plan makes implementation obvious. If the coding engine has to guess, the plan is incomplete.
Always use before:
Don't skip when:
Each task = one focused coding engine dispatch.
Every task should be completable in a single coding engine dispatch. If a task needs more, break it down further.
Too big:
### Task 1: Build authentication system
[50 lines of code across 5 files]
Right size:
### Task 1: Create User model with email field
[10 lines, 1 file]
### Task 2: Add password hash field to User
[8 lines, 1 file]
### Task 3: Create password hashing utility
[15 lines, 1 file]
# [Feature Name] Implementation Plan
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
**Project Directory:** [Absolute path to project root]
---
Each task follows this format:
### Task N: [Descriptive Name]
**Objective:** What this task accomplishes (one sentence)
**Files:**
- Create: `exact/path/to/new_file.py`
- Modify: `exact/path/to/existing.py`
- Test: `tests/path/to/test_file.py`
**Dispatch Prompt:**
```
[The exact prompt to pass to the coding engine, including all context needed]
```
**Scope:** read, edit, write, run commands
**Timeout:** 180
**Verification:**
Run: `pytest tests/path/test.py -v`
Expected: PASS
Read and understand the feature requirements, constraints, and acceptance criteria.
main or master), pull the latest changes from the remote, and query the live status of active pull requests and issues on GitHub (gh pr list, gh issue list). The user or other agents may have merged PRs or mutated issue states out-of-band since your last session.main, pull the latest remote, and create a fresh working branch. To keep your drafted markdown plans and specifications immediately available on this fresh branch without bringing over unwanted draft code commits, use:
git checkout <spec-branch> -- docs/hermes/<plan-files>
This safely checks out only the planning documents from the old branch into your new, clean branch's working tree, keeping them staged and ready.Decide on architecture, file organization, dependencies, and testing strategy.
Create tasks in order:
.gitignore file. Build dependencies (like node_modules/), compiled binaries, local caches, and temporary files must be ignored before other feature files are staged.For each task, write the exact prompt for the coding engine. Include:
src/config/settings.py)Check:
After completing the plan:
"Plan complete. Ready to execute using subagent-driven-development — I'll dispatch the coding engine per task with two-stage review (spec compliance then code quality). Shall I proceed?"
When starting a new project or adding sub-projects, always configure a robust .gitignore file before running any package managers (like npm install, go mod, cargo build) or compiling templated assets. If dependency folders like node_modules/, local .cache/ folders, or transient test/build binaries are accidentally tracked, they clutter commits and pollute the remote repository. If any slip through, immediately run git rm -r --cached <paths> to untrack them.
The coding engine has no memory between dispatches. Each prompt must include all context needed: file paths, function signatures, project conventions, related code snippets.
Extract shared utilities. Don't copy-paste validation in 3 places.
Implement only what's needed now. No speculative features.
Every task that produces code includes the full TDD cycle in its dispatch prompt:
When initializing a new repository, directory structure, or toolchain, always establish a comprehensive .gitignore file as the very first step. Never stage or commit changes without checking that dependency directories (such as node_modules/), compiled binaries, local tools caches (e.g. tmp/ or test/run artifacts), or credentials are kept untracked. If files are accidentally tracked, run git rm -r --cached <files> immediately to untrack them before any pull request is merged.
When planning or executing verification checks in TypeScript/JS or compiled-asset monorepos (such as squad or Go applications with generated views), always ensure that a complete, clean build is run (e.g. npm run build, templ generate) before executing the test runner. Running tests directly after making code edits in these environments will often execute against stale, outdated build artifacts (such as compiled JS in dist/ or out/), resulting in false-negative test failures and misleading diagnostic paths.
When writing or executing tests for React components that leverage navigation or data-fetching hooks:
<Link> or using routing hooks (useNavigate, useParams) will crash during test renders with TypeError: Cannot destructure property 'basename' of 'React.useContext(...)' unless it is wrapped inside a router context. Always ensure the test wrapper wraps the component in <MemoryRouter> from react-router-dom.undefined before the mocked promise resolves. If a component renders a fallback message (e.g., "Loading..." or "No week open") during this loading phase, assertions like expect(screen.getByText("No week open")).toBeInTheDocument() will pass instantly—succeeding during the loading phase before the mock has actually resolved to its final state! To write robust tests, always assert against elements that only appear in the fully resolved state (e.g., using await screen.findByText("Picks Locked") or await waitFor(...) on resolved elements) to ensure the test waits for mock promise resolution.new Date()) against database/mock timestamps (e.g., a lock time or tournament start date), hard-coded mock timestamps in test files will eventually drift into the past relative to the system clock. This causes tests asserting on "upcoming" or "open" states to silently fail or change behavior. Always ensure mock timestamps in test fixtures are either dynamically generated relative to the current time (e.g., new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString()) or set to a far-future static date (e.g., 2099-12-31) to guarantee they never transition into the past.When developing filters or selectors driven by asynchronous server state, do NOT use useEffect hooks to synchronize server defaults into local state (this triggers performance-degrading double renders and strict ESLint exhaustive-deps errors).
Instead, leverage derived values computed on-the-fly during the render pass (e.g., const effectiveId = selectedId || activeIdFromQuery || "").
For a complete reference, boilerplate code, and architectural guidelines, consult the support file:
references/react_query_derived_defaults.md (accessible via skill_view(name='writing-plans', file_path='references/react_query_derived_defaults.md')).
When executing bulk backlog mutations (such as triage or enrichment across multiple issues), running a single monolithic command (e.g. triage --limit 20) can easily exceed tool execution timeouts. Because each issue requires research, RFC-style drafting, and humanizing, a single issue can take 100–150 seconds. The most reliable and robust workflow is to execute the backlog tool with --limit 1 inside sequential, discrete tool calls. This saves intermediate progress incrementally on each iteration and completely prevents cascading timeouts.
When drafting implementation plans that direct a coding engine to consume or integrate with existing utility functions, model methods, or API clients:
formatPickedValue(type, value) accepts a third options argument). Writing incorrect method signatures in task dispatches will cause compilation failures, break TypeScript type-checking, and halt automated build execution.When planning features involving database schema changes or versioned configurations:
app/db/base.py or models/__init__.py) before running alembic revision --autogenerate. This guarantees Alembic detects the new tables and columns.draft or superseded status).published or scored definitions.When a user or an external peer-reviewer (like a senior lead or another agent) provides critical feedback or a post-scoring audit on your plans or specifications:
Deconstruct & Categorize Findings:
Clean Branch Alignment:
main and pull the latest remote gold standard.git checkout <spec-branch> -- docs/hermes/<plan-files>Prerequisites First, Local Verification Always:
Bite-sized tasks (one coding engine dispatch each)
Self-contained prompts (no external context)
Exact file paths
Complete code (copy-pasteable)
Exact commands with expected output
Verification steps
DRY, YAGNI, TDD
A good plan makes implementation obvious.