Rails Planning
Force implementation planning to live in the target repository, not in IDE-local state, hidden assistant folders, chat history, or machine-specific storage.
This is the single-plan enforcement skill for Agentic Rails. It creates or revises durable Implementation Plan artifacts. It does not implement production code.
rails-planning itself belongs to the right rail: reusable agentic behavior. Its output belongs to the left rail: project-local context and provenance.
Core Rule
Every story gets one primary artifact:
context/implementation-plans/<milestone-slug>/<story-slug>/plan.md
plan.md integrates CER, questions/unknowns, evidence/references, complaints/friction, execution log, and completion review as sections inside the one file — see references/plan-template.md. Do not produce separate questions.md, evidence.md, complaining.md, thinking.md, implementation-log.md, or completion-review.md files by default. thinking.md is the one exception that is never a plan.md section — see references/plan-template.md's thinking.md Sidecar note.
Only create one of those sidecar files when:
- the user explicitly asks for it, or
- the story is large or phased enough that a durable, separately-tracked file is genuinely justified (the same threshold
rails-planning-phaser uses for splitting a plan into phases is a reasonable signal).
When a sidecar file is created, it lives beside plan.md in the same story folder, never in context/ root.
All artifacts must be normal repository files that the human can review, diff, branch, commit, copy, and preserve with the project.
When To Apply
Apply this skill when the user asks for one implementation plan or wants IDE planning redirected into Agentic Rails. Typical triggers include:
- Planning before coding in Codex, Claude Code, Cursor, Windsurf, Cascade, or another agentic IDE.
- Creating or revising a story, feature, bug, refactor, spike, work item, or execution plan.
- Making planning output durable across machines, IDEs, branches, sessions, reviews, or retrospectives.
- Preparing context that will later feed the plan's
## Execution Log, ## Completion Review, ## Complaints / Friction, ## Evidence / References, or a handover artifact.
- Fixing hidden, scattered, disconnected, or lost IDE-local plans.
Do not apply this skill when the user explicitly wants only a quick chat outline, the plan is unrelated to repository implementation work, the task is trivial enough that a durable plan would be noise, or another active workflow explicitly owns the output location.
Use rails-plan-spam-workflow instead when the user wants many plans generated from stories, backlog items, feature dumps, or milestone checklists.
Repository Detection
- Identify the target repository root.
- Treat the repository as Agentic Rails when any of these exist:
AGENTIC_RAILS.md
.agentic-rails.json
AGENTIC_RAILS_README.MD
context/implementation-plans/
- an established context tier system under
context/
- If the target repository is not clearly Agentic Rails but the user explicitly asks for this skill, still create repository-local planning artifacts using the path rules below.
Context Loading
Load only the minimum context needed to write a grounded plan. Prefer maintained context over raw intake:
context/design.md, including the Milestones Index
- relevant
context/milestones/*.md, including the story's own section inside the milestone
- relevant
context/backlog/*.md story files, when the story has not yet been pulled into a milestone
- existing related
context/implementation-plans/**/plan.md
- relevant
context/dictations-tier-0/ source only when raw intake materially shaped the work
Dictation is raw intake, not final truth. If dictation contradicts maintained design, milestones, or stories, prefer maintained context and record the contradiction as an open question.
If an agent encounters context/milestones.md, context/goals*.md, or context/tier0/ in an older repository, treat them as old-era migration signals to retire, not current canonical paths.
Path Selection
Prefer the canonical Agentic Rails path, grouped by milestone:
context/implementation-plans/<milestone-slug>/<story-slug>/
Preserve an existing repository convention rather than creating duplicate folders. Accept these existing variants:
context/implementation-plans/
documentation/implementation-plans/
docs/implementation-plans/
If an active plan already exists for the same story, update that plan.md instead of creating a duplicate. Preserve existing decisions unless the user asks for a revision, add a short revision note when useful, and do not overwrite its ## Execution Log history.
Folder Naming
context/implementation-plans/<milestone-slug>/<story-slug>/
Slug rules (both milestone-slug and story-slug):
- Use lowercase words separated by hyphens.
- Keep the slug short but recognizable.
- Avoid vague names such as
new-plan, task, or implementation.
- Include a story id when one exists (e.g.
3-4-normalize-settings-loading).
- When the story's type matters for discoverability, it may prefix the slug (
bug-fix-login-token-refresh, spike-compare-vector-store-options), but the type prefix is optional — the milestone/story nesting is what matters.
Examples:
context/implementation-plans/milestone-1-dockerize-app/add-report-export-support/
context/implementation-plans/milestone-1-dockerize-app/bug-fix-login-token-refresh/
context/implementation-plans/milestone-2-observability/story-2-3-add-health-checks/
If the story does not yet belong to a milestone (for example, it is still sitting in the backlog), resolve its target milestone first — following the Backlog → Milestone flow — before creating the plan folder, since the folder path requires a milestone slug.
Operating Model
- Detect the target repository root and whether it follows Agentic Rails.
- Load the minimum maintained context needed to ground the plan.
- Decide whether the user wants a new plan, a revision, or path enforcement.
- Search existing implementation-plan folders for related active plans.
- Resolve the story's milestone, then select or create the correct
<milestone-slug>/<story-slug>/ folder.
- Create or update
plan.md using the structure from references/plan-template.md, unless the repository has a stronger local template.
- Populate CER,
## Questions / Unknowns, and ## Risk Mitigation inline in plan.md. Preserve uncertainty — record assumptions, constraints, risks, and open questions rather than inventing certainty.
- Do not create
questions.md, evidence.md, complaining.md, thinking.md, implementation-log.md, or completion-review.md unless the user explicitly requests one or the story is large/phased enough to justify it (see Core Rule). When creating any of them, use references/questions-format.md for the questions format.
- Leave
## Execution Log and ## Completion Review absent (or clearly marked not-yet-started) for a plan that has not begun execution — they are filled in during and after execution, not at plan-creation time.
- Report the exact path of
plan.md to the user, plus the path of any sidecar file actually created.
Plan Quality Bar
A valid rails-planning plan is concrete enough that another agent or developer can execute it without reconstructing intent from chat history.
Include:
- task metadata and linked context (milestone, story, backlog source)
- CER (complexity, effort, risk) and routing intent
- objective, scope, and non-goals
- current understanding of the repository state, including likely files, modules, interfaces, or subsystems affected
- assumptions and constraints
- sequenced execution steps
- automated and manual verification strategy, plus acceptance criteria
- risks and mitigation, and open questions/unknowns
- an execution log and completion review once execution starts and finishes, respectively
Avoid:
- chat-only plans
- IDE-local hidden plans
- vague checklists with no repository grounding
- invented certainty
- plans that do not explain how to validate completion
- accidental duplicates of active related plans
- a cluster of default sidecar files where the plan's own sections would do
IDE Rule
Any IDE may keep transient internal task state, but the durable plan of record must be the repository file:
context/implementation-plans/<milestone-slug>/<story-slug>/plan.md
For Codex, Claude Code, Cursor, Windsurf, Cascade, and similar IDEs, materialize the plan file before implementation begins when the work needs durable planning.
Validation
Before considering this skill applied correctly, confirm:
plan.md exists inside the target repository, under the milestone/story implementation-plans path.
- The plan is not only in chat, IDE history, or an external folder.
- The plan follows the implementation-plan structure in references/plan-template.md or a stronger local template.
- Relevant maintained context is linked where available.
- The plan includes CER, scope, steps, validation, risk mitigation, and open questions/unknowns.
- No
questions.md, evidence.md, complaining.md, thinking.md, implementation-log.md, or completion-review.md was created unless explicitly requested or genuinely justified by story size/phasing.
- Existing related plans were reused or intentionally superseded instead of duplicated accidentally.
- The user was told the exact path of
plan.md, plus any sidecar file actually created.
1---2name: rails-planning3description: Use this skill when creating, revising, locating, or enforcing implementation plans inside an Agentic Rails project. Use for implementation plans, work plans, execution plans, feature plans, bug plans, repository planning before coding, IDE planning drift, or any planning output that should survive across IDEs, machines, branches, sessions, reviews, retrospectives, execution logs, evidence, complaints, or handovers. The skill ensures plans are written into the target repository under context/implementation-plans/<milestone-slug>/ <story-slug>/, producing one primary artifact — plan.md — with CER, questions, evidence, complaints, execution log, and completion review folded into it by default. Can also produce opt-in sidecars (evidence.md, complaining.md, thinking.md) beside plan.md when a story genuinely needs durable, separately tracked provenance.4---56# Rails Planning78Force implementation planning to live in the target repository, not in IDE-local state, hidden assistant folders, chat history, or machine-specific storage.910This is the single-plan enforcement skill for Agentic Rails. It creates or revises durable Implementation Plan artifacts. It does not implement production code.1112`rails-planning` itself belongs to the right rail: reusable agentic behavior. Its output belongs to the left rail: project-local context and provenance.1314## Core Rule1516Every story gets **one primary artifact**:1718```text19context/implementation-plans/<milestone-slug>/<story-slug>/plan.md20```2122`plan.md` integrates CER, questions/unknowns, evidence/references, complaints/friction, execution log, and completion review as sections inside the one file — see [references/plan-template.md](references/plan-template.md). Do not produce separate `questions.md`, `evidence.md`, `complaining.md`, `thinking.md`, `implementation-log.md`, or `completion-review.md` files by default. `thinking.md` is the one exception that is never a `plan.md` section — see [references/plan-template.md](references/plan-template.md)'s `thinking.md` Sidecar note.2324Only create one of those sidecar files when:2526- the user explicitly asks for it, or27- the story is large or phased enough that a durable, separately-tracked file is genuinely justified (the same threshold `rails-planning-phaser` uses for splitting a plan into phases is a reasonable signal).2829When a sidecar file is created, it lives beside `plan.md` in the same story folder, never in `context/` root.3031All artifacts must be normal repository files that the human can review, diff, branch, commit, copy, and preserve with the project.3233## When To Apply3435Apply this skill when the user asks for one implementation plan or wants IDE planning redirected into Agentic Rails. Typical triggers include:3637- Planning before coding in Codex, Claude Code, Cursor, Windsurf, Cascade, or another agentic IDE.38- Creating or revising a story, feature, bug, refactor, spike, work item, or execution plan.39- Making planning output durable across machines, IDEs, branches, sessions, reviews, or retrospectives.40- Preparing context that will later feed the plan's `## Execution Log`, `## Completion Review`, `## Complaints / Friction`, `## Evidence / References`, or a handover artifact.41- Fixing hidden, scattered, disconnected, or lost IDE-local plans.4243Do not apply this skill when the user explicitly wants only a quick chat outline, the plan is unrelated to repository implementation work, the task is trivial enough that a durable plan would be noise, or another active workflow explicitly owns the output location.4445Use `rails-plan-spam-workflow` instead when the user wants many plans generated from stories, backlog items, feature dumps, or milestone checklists.4647## Repository Detection48491. Identify the target repository root.502. Treat the repository as Agentic Rails when any of these exist:51 - `AGENTIC_RAILS.md`52 - `.agentic-rails.json`53 - `AGENTIC_RAILS_README.MD`54 - `context/implementation-plans/`55 - an established context tier system under `context/`563. If the target repository is not clearly Agentic Rails but the user explicitly asks for this skill, still create repository-local planning artifacts using the path rules below.5758## Context Loading5960Load only the minimum context needed to write a grounded plan. Prefer maintained context over raw intake:61621. `context/design.md`, including the Milestones Index632. relevant `context/milestones/*.md`, including the story's own section inside the milestone643. relevant `context/backlog/*.md` story files, when the story has not yet been pulled into a milestone654. existing related `context/implementation-plans/**/plan.md`665. relevant `context/dictations-tier-0/` source only when raw intake materially shaped the work6768Dictation is raw intake, not final truth. If dictation contradicts maintained design, milestones, or stories, prefer maintained context and record the contradiction as an open question.6970<!-- rails-lint-allow: VC004 -->71<!-- Legacy-path migration note: these are retired paths named so an agent recognizes and72 avoids them, not a live convention. Kept deliberately for that recognition purpose. -->73If an agent encounters `context/milestones.md`, `context/goals*.md`, or `context/tier0/` in an older repository, treat them as old-era migration signals to retire, not current canonical paths.7475## Path Selection7677Prefer the canonical Agentic Rails path, grouped by milestone:7879```text80context/implementation-plans/<milestone-slug>/<story-slug>/81```8283Preserve an existing repository convention rather than creating duplicate folders. Accept these existing variants:8485```text86context/implementation-plans/87documentation/implementation-plans/88docs/implementation-plans/89```9091If an active plan already exists for the same story, update that `plan.md` instead of creating a duplicate. Preserve existing decisions unless the user asks for a revision, add a short revision note when useful, and do not overwrite its `## Execution Log` history.9293## Folder Naming9495```text96context/implementation-plans/<milestone-slug>/<story-slug>/97```9899Slug rules (both `milestone-slug` and `story-slug`):100101- Use lowercase words separated by hyphens.102- Keep the slug short but recognizable.103- Avoid vague names such as `new-plan`, `task`, or `implementation`.104- Include a story id when one exists (e.g. `3-4-normalize-settings-loading`).105- When the story's type matters for discoverability, it may prefix the slug (`bug-fix-login-token-refresh`, `spike-compare-vector-store-options`), but the type prefix is optional — the milestone/story nesting is what matters.106107Examples:108109```text110context/implementation-plans/milestone-1-dockerize-app/add-report-export-support/111context/implementation-plans/milestone-1-dockerize-app/bug-fix-login-token-refresh/112context/implementation-plans/milestone-2-observability/story-2-3-add-health-checks/113```114115If the story does not yet belong to a milestone (for example, it is still sitting in the backlog), resolve its target milestone first — following the Backlog → Milestone flow — before creating the plan folder, since the folder path requires a milestone slug.116117## Operating Model1181191. Detect the target repository root and whether it follows Agentic Rails.1202. Load the minimum maintained context needed to ground the plan.1213. Decide whether the user wants a new plan, a revision, or path enforcement.1224. Search existing implementation-plan folders for related active plans.1235. Resolve the story's milestone, then select or create the correct `<milestone-slug>/<story-slug>/` folder.1246. Create or update `plan.md` using the structure from [references/plan-template.md](references/plan-template.md), unless the repository has a stronger local template.1257. Populate CER, `## Questions / Unknowns`, and `## Risk Mitigation` inline in `plan.md`. Preserve uncertainty — record assumptions, constraints, risks, and open questions rather than inventing certainty.1268. Do not create `questions.md`, `evidence.md`, `complaining.md`, `thinking.md`, `implementation-log.md`, or `completion-review.md` unless the user explicitly requests one or the story is large/phased enough to justify it (see Core Rule). When creating any of them, use [references/questions-format.md](references/questions-format.md) for the questions format.1279. Leave `## Execution Log` and `## Completion Review` absent (or clearly marked not-yet-started) for a plan that has not begun execution — they are filled in during and after execution, not at plan-creation time.12810. Report the exact path of `plan.md` to the user, plus the path of any sidecar file actually created.129130## Plan Quality Bar131132A valid rails-planning plan is concrete enough that another agent or developer can execute it without reconstructing intent from chat history.133134Include:135136- task metadata and linked context (milestone, story, backlog source)137- CER (complexity, effort, risk) and routing intent138- objective, scope, and non-goals139- current understanding of the repository state, including likely files, modules, interfaces, or subsystems affected140- assumptions and constraints141- sequenced execution steps142- automated and manual verification strategy, plus acceptance criteria143- risks and mitigation, and open questions/unknowns144- an execution log and completion review once execution starts and finishes, respectively145146Avoid:147148- chat-only plans149- IDE-local hidden plans150- vague checklists with no repository grounding151- invented certainty152- plans that do not explain how to validate completion153- accidental duplicates of active related plans154- a cluster of default sidecar files where the plan's own sections would do155156## IDE Rule157158Any IDE may keep transient internal task state, but the durable plan of record must be the repository file:159160```text161context/implementation-plans/<milestone-slug>/<story-slug>/plan.md162```163164For Codex, Claude Code, Cursor, Windsurf, Cascade, and similar IDEs, materialize the plan file before implementation begins when the work needs durable planning.165166## Validation167168Before considering this skill applied correctly, confirm:169170- `plan.md` exists inside the target repository, under the milestone/story implementation-plans path.171- The plan is not only in chat, IDE history, or an external folder.172- The plan follows the implementation-plan structure in [references/plan-template.md](references/plan-template.md) or a stronger local template.173- Relevant maintained context is linked where available.174- The plan includes CER, scope, steps, validation, risk mitigation, and open questions/unknowns.175- No `questions.md`, `evidence.md`, `complaining.md`, `thinking.md`, `implementation-log.md`, or `completion-review.md` was created unless explicitly requested or genuinely justified by story size/phasing.176- Existing related plans were reused or intentionally superseded instead of duplicated accidentally.177- The user was told the exact path of `plan.md`, plus any sidecar file actually created.