Rails Pair Programming
Run a live Agentic Rails pair-programming session that stays grounded in the
project's durable context and produces a session artifact when the user wraps up.
This skill belongs to the reusable right rail. Its context and outputs belong to
the project-local left rail.
Operating Contract
Apply this skill only after explicit activation. Once active, treat later user
turns as part of the same pair-programming session when the conversation context
clearly indicates the session is still ongoing.
Use four phases:
Intent -> Context Gathering -> Collaborative Session -> Wrap-up
Keep the active Story authoritative. Explore freely when helpful, but ground
decisions, conclusions, and next steps back into the current Story and Plan when
possible.
Do not write production code unless the user explicitly moves the session into
implementation.
Phase 1: Intent
Start here unless the user already provided clear intent.
Identify:
- what the user wants to work on
- whether the session is exploration, intense collaboration, or mixed
- which Story or implementation plan the work relates to
- what outcome would make the session useful
Modes:
Exploration: understand a codebase area, file, architecture, bug surface,
design, story, or implementation plan.
Intense Collaboration: solve, debug, design, implement, decide, refactor, or
build through close back-and-forth.
Mixed: begin with exploration and switch into concrete collaboration when a
specific move becomes clear.
If intent is obvious, confirm it briefly and proceed. Avoid setup questions that
do not change the next useful action.
Example:
rails-pair-programming is active.
Intent looks like: understand and debug the current implementation around <topic>.
Mode: Exploration, with a possible switch into intense collaboration if we find a fix.
I'll ground this against the current Story and Plan folder first.
Phase 2: Context Gathering
Gather only the context needed for the session. Prefer maintained Agentic Rails
context over chat memory.
Load, when relevant and available:
- the current Story (in the active milestone document, or
context/backlog/
before it is pulled into one)
- the active implementation-plan folder and
plan.md (the plan's ## Execution Log, ## Evidence / References, and ## Complaints / Friction sections
carry what standalone implementation-log.md, evidence.md, and
complaining.md used to hold; check for those standalone files too, since
large/phased stories may still keep them separately)
- Design (with its Milestones Index), the relevant Milestone, and the Story's
own section inside it
- relevant source files, tests, logs, or technical artifacts
- Dictation notes only when rationale recovery or source synthesis matters
Priority order:
- Active user request
- Current Story and its implementation plan
- Design and milestone context
- Dictation notes, only when needed
- Source files, tests, logs, and technical artifacts
Path hints:
- Prefer
context/implementation-plans/<milestone-slug>/<story-slug>/.
- Search existing implementation-plan folders before creating or assuming a new
one.
- If no active Story or Plan can be located, ask one targeted question or proceed
with clearly marked uncertainty.
Keep context use visible enough that the user can tell the session is grounded,
but do not dump large summaries unless asked.
Phase 3: Collaborative Session
Act as a pair programmer, tutor, debugger, codebase guide, technical sounding
board, and design reviewer as the session requires.
During the loop:
- ask useful questions when the next move depends on the answer
- inspect relevant files and project context
- explain concepts through the actual code or Story context
- test ideas against project constraints
- challenge weak assumptions with concrete reasons
- narrow broad problems into actionable next moves
- call out trade-offs, risks, and validation steps
- keep notes for wrap-up
In exploration mode:
- map the area
- identify important files, concepts, dependencies, and open questions
- explain relationships in practical language
- avoid premature implementation
- preserve findings for the session artifact
In intense collaboration mode:
- stay close to the immediate problem
- propose options with trade-offs
- help decide and execute the next step
- validate claims against code, tests, logs, or project documents
- capture decisions and reasoning for wrap-up
When tutoring:
- use direct, practical explanations
- connect concepts to the current code or Agentic Rails artifact
- avoid generic textbook dumps
- ask short comprehension checks only when useful
- adapt depth to the user's expertise
Phase 4: Wrap-up
Wrap up when the user says something like:
I'm done
wrap it up
conclude
finish
save this
end session
that's enough
summarise this
At wrap-up:
- Summarize the session.
- Derive a topic slug: 2-4 kebab-case words that name the session's main topic
or work covered. Prefer specific over generic (
hooks-observability beats
general-exploration).
- Create a new artifact file using the naming convention:
pair-programming-DDMMMYYYY-topic-slug.md
Example: pair-programming-09MAY2026-hooks-observability.md
- Include discoveries, key discussions, decisions, open questions, outcomes,
and yielded work.
- Ground the artifact in the active Story and Plan context.
- End cleanly.
Each session always produces its own file. Never overwrite or append to an
existing session artifact.
Preferred path:
context/implementation-plans/<milestone-slug>/<story-slug>/pair-programming-DDMMMYYYY-topic-slug.md
Fallback path when the active plan folder is unknown:
context/pair-programming-DDMMMYYYY-topic-slug.md
Artifact Template
Use this structure for a new file, or as a new appended session entry in an
existing file:
# Pair Programming Session
## Session Date
<YYYY-MM-DD>
## Story Reference
<Link or describe the current Story and Plan folder.>
## Intent And Mode
- Intent: <what the session was trying to achieve>
- Mode: <Exploration | Intense Collaboration | Mixed>
## Key Topics Explored
- <Topic 1>
- <Topic 2>
- <Topic 3>
## Discoveries And Decisions
- Discovery: <what was found>
- Decision: <what was decided and why>
## Code Changes Or Next Steps Identified
- <Change, candidate change, or next step>
## Open Items
- <Question, risk, unknown, or follow-up>
## Outcome
<What the session yielded.>
## Session Summary
<Concise narrative summary of what was achieved.>
Boundaries
Do not:
- operate as generic chat with no Story or Plan awareness
- invent Story context when it cannot be found
- create fake decisions, discoveries, or validation evidence
- expose private chain-of-thought
- replace
plan.md's ## Execution Log and ## Completion Review sections
(or standalone implementation-log.md / completion-review.md when a large
or phased story keeps them separately), evidence.md, thinking.md,
complaining.md, or handover artifacts
- write code unless the user explicitly moves into implementation
- keep asking setup questions when intent is already obvious
- finish a save or wrap-up request without writing the artifact
Related Artifacts
plan.md's ## Execution Log section (or standalone implementation-log.md
for large/phased stories): records implementation history; reference it, but
do not replace it.
plan.md's ## Completion Review section (or standalone
completion-review.md for large/phased stories): the session-end postmortem
(estimates vs. actuals); reference it, but do not replace it.
complaining.md (or plan.md's ## Complaints / Friction section):
records real execution friction; surface friction only when it is genuine.
thinking.md: stores sanitized working notes; keep the pair-programming
artifact outcome-focused.
evidence.md (or plan.md's ## Evidence / References section): indexes
validation and provenance; mention evidence needs, but do not replace
evidence tracking.
- handover artifacts: can use pair-programming summaries as input, but are a
separate ownership-transfer output.
Validation
Before considering the skill applied correctly, confirm:
- explicit
rails-pair-programming activation occurred
- intent and mode were established
- relevant Story and Plan context was gathered or uncertainty was
stated
- the collaborative loop stayed grounded in the current Story and Plan
- useful questions were asked where appropriate
- wrap-up was triggered by the user
- a new artifact file was created using the
pair-programming-DDMMMYYYY-topic-slug.md convention
- the topic slug is specific and descriptive, not generic
- the artifact is in the correct folder (plan folder preferred,
context/ fallback)
- the artifact includes discoveries, discussions, decisions, open questions,
outcomes, and yielded work
- no existing session artifact was overwritten or appended to
1---2name: rails-pair-programming3description: Use this skill when the user explicitly wants a structured Agentic Rails pair-programming session, such as "use rails-pair-programming", "start rails-pair-programming", "pair program this under Rails", or similar phrasing. The skill establishes intent, gathers the current Story and implementation-plan context from the context tier system, runs a collaborative tutoring and pair-programming loop, and creates a uniquely named session artifact at wrap-up.4---56# Rails Pair Programming78Run a live Agentic Rails pair-programming session that stays grounded in the9project's durable context and produces a session artifact when the user wraps up.1011This skill belongs to the reusable right rail. Its context and outputs belong to12the project-local left rail.1314## Operating Contract1516Apply this skill only after explicit activation. Once active, treat later user17turns as part of the same pair-programming session when the conversation context18clearly indicates the session is still ongoing.1920Use four phases:2122```text23Intent -> Context Gathering -> Collaborative Session -> Wrap-up24```2526Keep the active Story authoritative. Explore freely when helpful, but ground27decisions, conclusions, and next steps back into the current Story and Plan when28possible.2930Do not write production code unless the user explicitly moves the session into31implementation.3233## Phase 1: Intent3435Start here unless the user already provided clear intent.3637Identify:3839- what the user wants to work on40- whether the session is exploration, intense collaboration, or mixed41- which Story or implementation plan the work relates to42- what outcome would make the session useful4344Modes:4546- `Exploration`: understand a codebase area, file, architecture, bug surface,47 design, story, or implementation plan.48- `Intense Collaboration`: solve, debug, design, implement, decide, refactor, or49 build through close back-and-forth.50- `Mixed`: begin with exploration and switch into concrete collaboration when a51 specific move becomes clear.5253If intent is obvious, confirm it briefly and proceed. Avoid setup questions that54do not change the next useful action.5556Example:5758```text59rails-pair-programming is active.6061Intent looks like: understand and debug the current implementation around <topic>.62Mode: Exploration, with a possible switch into intense collaboration if we find a fix.63I'll ground this against the current Story and Plan folder first.64```6566## Phase 2: Context Gathering6768Gather only the context needed for the session. Prefer maintained Agentic Rails69context over chat memory.7071Load, when relevant and available:7273- the current Story (in the active milestone document, or `context/backlog/`74 before it is pulled into one)75- the active implementation-plan folder and `plan.md` (the plan's `## Execution76 Log`, `## Evidence / References`, and `## Complaints / Friction` sections77 carry what standalone `implementation-log.md`, `evidence.md`, and78 `complaining.md` used to hold; check for those standalone files too, since79 large/phased stories may still keep them separately)80- Design (with its Milestones Index), the relevant Milestone, and the Story's81 own section inside it82- relevant source files, tests, logs, or technical artifacts83- Dictation notes only when rationale recovery or source synthesis matters8485Priority order:86871. Active user request882. Current Story and its implementation plan893. Design and milestone context904. Dictation notes, only when needed915. Source files, tests, logs, and technical artifacts9293Path hints:9495- Prefer `context/implementation-plans/<milestone-slug>/<story-slug>/`.96- Search existing implementation-plan folders before creating or assuming a new97 one.98- If no active Story or Plan can be located, ask one targeted question or proceed99 with clearly marked uncertainty.100101Keep context use visible enough that the user can tell the session is grounded,102but do not dump large summaries unless asked.103104## Phase 3: Collaborative Session105106Act as a pair programmer, tutor, debugger, codebase guide, technical sounding107board, and design reviewer as the session requires.108109During the loop:110111- ask useful questions when the next move depends on the answer112- inspect relevant files and project context113- explain concepts through the actual code or Story context114- test ideas against project constraints115- challenge weak assumptions with concrete reasons116- narrow broad problems into actionable next moves117- call out trade-offs, risks, and validation steps118- keep notes for wrap-up119120In exploration mode:121122- map the area123- identify important files, concepts, dependencies, and open questions124- explain relationships in practical language125- avoid premature implementation126- preserve findings for the session artifact127128In intense collaboration mode:129130- stay close to the immediate problem131- propose options with trade-offs132- help decide and execute the next step133- validate claims against code, tests, logs, or project documents134- capture decisions and reasoning for wrap-up135136When tutoring:137138- use direct, practical explanations139- connect concepts to the current code or Agentic Rails artifact140- avoid generic textbook dumps141- ask short comprehension checks only when useful142- adapt depth to the user's expertise143144## Phase 4: Wrap-up145146Wrap up when the user says something like:147148```text149I'm done150wrap it up151conclude152finish153save this154end session155that's enough156summarise this157```158159At wrap-up:1601611. Summarize the session.1622. Derive a topic slug: 2-4 kebab-case words that name the session's main topic163 or work covered. Prefer specific over generic (`hooks-observability` beats164 `general-exploration`).1653. Create a new artifact file using the naming convention:166 `pair-programming-DDMMMYYYY-topic-slug.md`167 Example: `pair-programming-09MAY2026-hooks-observability.md`1684. Include discoveries, key discussions, decisions, open questions, outcomes,169 and yielded work.1705. Ground the artifact in the active Story and Plan context.1716. End cleanly.172173Each session always produces its own file. Never overwrite or append to an174existing session artifact.175176Preferred path:177178```text179context/implementation-plans/<milestone-slug>/<story-slug>/pair-programming-DDMMMYYYY-topic-slug.md180```181182Fallback path when the active plan folder is unknown:183184```text185context/pair-programming-DDMMMYYYY-topic-slug.md186```187188## Artifact Template189190Use this structure for a new file, or as a new appended session entry in an191existing file:192193```markdown194# Pair Programming Session195196## Session Date197198<YYYY-MM-DD>199200## Story Reference201202<Link or describe the current Story and Plan folder.>203204## Intent And Mode205206- Intent: <what the session was trying to achieve>207- Mode: <Exploration | Intense Collaboration | Mixed>208209## Key Topics Explored210211- <Topic 1>212- <Topic 2>213- <Topic 3>214215## Discoveries And Decisions216217- Discovery: <what was found>218- Decision: <what was decided and why>219220## Code Changes Or Next Steps Identified221222- <Change, candidate change, or next step>223224## Open Items225226- <Question, risk, unknown, or follow-up>227228## Outcome229230<What the session yielded.>231232## Session Summary233234<Concise narrative summary of what was achieved.>235```236237## Boundaries238239Do not:240241- operate as generic chat with no Story or Plan awareness242- invent Story context when it cannot be found243- create fake decisions, discoveries, or validation evidence244- expose private chain-of-thought245- replace `plan.md`'s `## Execution Log` and `## Completion Review` sections246 (or standalone `implementation-log.md` / `completion-review.md` when a large247 or phased story keeps them separately), `evidence.md`, `thinking.md`,248 `complaining.md`, or handover artifacts249- write code unless the user explicitly moves into implementation250- keep asking setup questions when intent is already obvious251- finish a save or wrap-up request without writing the artifact252253## Related Artifacts254255- `plan.md`'s `## Execution Log` section (or standalone `implementation-log.md`256 for large/phased stories): records implementation history; reference it, but257 do not replace it.258- `plan.md`'s `## Completion Review` section (or standalone259 `completion-review.md` for large/phased stories): the session-end postmortem260 (estimates vs. actuals); reference it, but do not replace it.261- `complaining.md` (or `plan.md`'s `## Complaints / Friction` section):262 records real execution friction; surface friction only when it is genuine.263- `thinking.md`: stores sanitized working notes; keep the pair-programming264 artifact outcome-focused.265- `evidence.md` (or `plan.md`'s `## Evidence / References` section): indexes266 validation and provenance; mention evidence needs, but do not replace267 evidence tracking.268- handover artifacts: can use pair-programming summaries as input, but are a269 separate ownership-transfer output.270271## Validation272273Before considering the skill applied correctly, confirm:274275- explicit `rails-pair-programming` activation occurred276- intent and mode were established277- relevant Story and Plan context was gathered or uncertainty was278 stated279- the collaborative loop stayed grounded in the current Story and Plan280- useful questions were asked where appropriate281- wrap-up was triggered by the user282- a new artifact file was created using the `pair-programming-DDMMMYYYY-topic-slug.md` convention283- the topic slug is specific and descriptive, not generic284- the artifact is in the correct folder (plan folder preferred, `context/` fallback)285- the artifact includes discoveries, discussions, decisions, open questions,286 outcomes, and yielded work287- no existing session artifact was overwritten or appended to