writing-plans — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited writing-plans (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Transform a Technical Specification (or equivalent input) into an atomic, dependency-ordered Implementation Plan. The plan is the contract between architect and implementer: it removes ambiguity about WHAT changes, WHERE it changes, in WHAT ORDER, and HOW each step is verified. The coder agent executes the plan verbatim; ambiguous or oversized steps each produce a class of implementation defect.
This skill is stack-agnostic and project-agnostic. Concrete phase catalogs, layering rules, banned patterns, and verification commands come from the project's architecture document and agent-instruction files, not from this skill. Read those documents first; design within them; flag every deviation explicitly.
Script paths in this document (e.g. scripts/) are resolved relative to this SKILL.md file, not to your current working directory. If a relative command fails to resolve, prefix it with the path your platform loaded this SKILL.md from.
Fallback. If python3 cannot be located, analyze the script's purpose and logic and execute its intent with available tools, but warn the user that python is not available and the logic was executed with a fallback approach that may not be perfect.
These documents are the authority every plan must conform to. Read in this order; skip tiers the project does not ship; do not load files that do not exist.
CLAUDE.md, AGENTS.md, GEMINI.md. Boundary rules (often "Always / Ask First / Never"). Quote the rules that constrain this feature.docs/ exists, read docs/README.md (or the closest equivalent: docs/index.md, docs/SUMMARY.md, docs/DIGEST.md). Use it as a map.architecture.md, ARCHITECTURE.md, design.md, PRD.md, product.md, or whatever name the project uses.docs/decisions/, docs/adr/, adr/, ADR/. Read the index first; read individual records only when they constrain this feature. Accepted decisions are architectural law..agents/rules/, .github/instructions/, .copilot/instructions/, .claude/rules/. Plan-prose requirements (RFC 2119 keywords, banned vocabulary, comment style, naming).When the project documents none of the above, say so explicitly in the plan's Summary section and propose what context the project should add. Do not invent constraints the project did not document.
The planning input is one of:
.specs/Spec-*.md or whichever path the project uses. The common case.writing-specs before planning.If the input is missing, one-line, or so ambiguous the plan would be a guess, stop and ask. Planning from guesses produces plans that drift from architecture on first contact with the code.
Five phases, executed sequentially. Do not skip a phase, do not reorder phases, do not collapse two phases. Each phase has an exit gate; do not advance until the gate passes.
Copy this checklist into the reasoning trace and mark items as you complete them:
Apply the reading order in § Project context. Extract concrete, named constraints, not impressions. Quote the rules that constrain this feature so the plan can cite them.
Exit gate. You can answer: which agent-instruction rules apply, which architecture sections constrain the work, which ADRs touch this feature, and which language/style rules govern plan prose.
Read the spec or tracker in full. Identify every behavior the input requires, every interface it names, every acceptance criterion, every constraint it carries. If the input contradicts the architecture document, surface the contradiction; do not silently resolve it.
Exit gate. You can list: exact files that will change, layers/modules touched, acceptance criteria the plan must satisfy.
Decompose work into ordered phases. Imports and dependencies flow downward only: data shapes -> services/business logic -> composition -> boundary/UI. The project's documented layering, if any, overrides this default. Each phase has an entry condition, a step pattern, and an exit gate.
See references/phase-structure.md for the dependency-graph principle, the universal phase template, common partial-scope shapes, and the constraint-check pattern.
Only include phases that are actually touched. A two-layer change produces a two-phase plan; a feature that threads through every layer produces a full plan. Do not pad with empty phases.
Exit gate. You can list the phases in execution order and explicitly state which canonical phases are omitted and why.
Use assets/plan-template.md as the structural skeleton. Every section of the template appears in the final plan. Empty sections include a note explaining why ("No persistence changes required.").
Group steps into the selected phases. Each step is a Markdown checkbox: - [ ] **N.M** {step title}. See § Step anatomy below and references/output-style-rules.md for the detailed rules with examples.
Run the validator as a feedback loop:
python3 .agents/skills/writing-plans/scripts/validate_plan.py .plans/Plan-{slug}.mdIf the script is unavailable, walk through references/philosophy-checklist.md manually. Fix every error and re-run until the validator reports PASS. Fix warnings where the plan can reasonably be improved; warnings do not block delivery but they signal under-specified or untraced work.
These rules are the core of the plan protocol. A plan that violates any of them is not a valid plan. They exist because the coder agent executes the plan verbatim: ambiguity or leaked implementation costs real engineering time.
.plans/Plan-{slug}.md. Derive {slug} from: (a) the spec filename, stripping the Spec- prefix; (b) the tracker ID if present; (c) otherwise a kebab-case slug of the feature title. Reuse the same slug across spec, plan, and review for traceability.go, ts, tsx, python, sql, rust, java, etc.); the tag signals runnable code and lets implementation creep into the plan. Inline signatures in prose are correct. Untagged pseudo-code is acceptable for non-trivial logic when prose alone is unclear.Verify: line carrying a specific, runnable command with the actual target (package path, test name, file path, named check). Bad: Verify: tests pass. Good: Verify: run the project's test command targeting the modified package; confirm the new test for X passes. Discover the actual commands from the project (Makefile, Taskfile.yml, package.json scripts, scripts/, CI configuration); do not hardcode make test or go test ./... unless the project documents them.(depends on step N). When two steps in the same phase share no file and no data dependency, annotate both: (parallel with step N).See references/output-style-rules.md for each rule expanded with Good/Bad examples.
Each step MUST be atomic and independently verifiable, sized for a single coder-agent session. A well-formed step names:
Example of a well-formed step (universal):
- [ ] 2.1 Add the listing operation to the contact service.
- File: src/services/contact-service.{ext}
- Change: MOD (extend existing module)
- Symbols: existing `ContactService`; new `listContacts` exported function
- Signature: `listContacts(userId, cursor?, limit?) -> Promise<ContactPage>`
- Logic:
1. Validate `userId` against the existing scope guard.
2. Query the contact store filtered by `userId` and `relationshipTag`.
3. Paginate with cursor-based navigation per architecture Section 5.3.
- Constraint check: no UI imports, no transport-layer imports.
- Verify: run the project's typecheck command targeting `src/services/`; confirm no new errors.Step granularity. Optimal step count follows a U-shape: under-specified plans (under ~3 steps per phase) cause hallucinated sub-tasks; over-specified plans (monolithic steps that span multiple files) fail atomicity. Aim for 3 to 15 steps per phase; split whenever a step names more than one file.
Forbidden step shapes:
See references/output-style-rules.md § Anti-patterns to reject on self-review for the full catalogue.
Every plan follows this top-level structure (see assets/plan-template.md for the verbatim template):
## Phase N: <Name> per applicable phase with checkbox steps inside and a constraint-check bullet at the endThe philosophy checklist is the planner's internal pre-delivery self-check (Phase 5 of the workflow). It runs in the planner's reasoning trace; it does NOT belong in the artifact. The artifact is read by the coder and tester agents, neither of which extracts value from the checklist content; the structural conditions the checklist verifies are independently enforced by scripts/validate_plan.py.
After writing, report the absolute plan-file path to the caller.
| File | When to read |
|---|---|
| references/phase-structure.md | Phase 3 of the workflow. Dependency-graph principle, universal phase template, partial-scope shapes, constraint-check pattern |
| references/output-style-rules.md | Phase 4. Each output rule expanded with Good/Bad examples plus the anti-patterns catalogue |
| references/philosophy-checklist.md | Phase 5. Self-check organized by concern (Traceability, Layering, Atomicity, Sequencing, Security, Style, Simplicity, Delivery) |
| assets/plan-template.md | Phase 4. Structural skeleton for the plan file |
| scripts/validate_plan.py | Phase 5. Automated validator for the structural and style rules |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.