Create plan

From gittower/git-flow-next · View interactive version

Create plan is an AI agent skill from the GitHub repository gittower/git-flow-next. Create a test-first implementation plan from a spec issue, analysis, or concept

How to use this skill

Skill file

Create Implementation Plan

Generate a test-first implementation plan. The plan is built in two phases,

in the spirit of TDD: the test plan comes first — detailed scenarios

exercising code that does not yet exist or will change — and the

implementation outline second, serving those tests. TDD is mostly about

finding the right design and all edge cases upfront; the test plan is where

that happens.

Instructions

  1. Detect Current Context
  1. Find the Source of Truth

In order of preference:

carries the spec label (or contains Test Scenarios / Expected Behavior

sections per ISSUE_GUIDELINES.md), it is the source of truth

the workflow folder

provide context

  1. Read Project Guidelines
  1. Phase 1: Build the Test Plan

This phase comes first and gets the most effort:

explicitly; analyses have Testing Considerations)

scenarios the source missed — error conditions, edge cases, interaction

with existing config options and merge strategies, conflicting state

name, test file. A scenario must be implementable as a test without

guessing

yet. Do not water down expected outcomes to match current behavior

  1. Phase 2: Outline the Implementation

Derive the implementation tasks from the test plan — what has to change

for those tests to pass:

  1. Write the Plan

Write plan.md in the workflow folder using the template below.

Plan Template

Write to .ai/<folder>/plan.md:

# Implementation Plan: <branch-name>

## Source
- Spec: #<number> (<link>) — or Analysis: `.ai/<folder>/analysis.md`

## Overview
<Brief summary of what will be implemented>

## Test Plan

<This section is authoritative. Tests are written from it before the
implementation, and must not be changed to make the implementation pass —
see /implement.>

### Scenario 1: <name>
- **Test**: `Test<Name>` in `test/cmd/<file>_test.go`
- **Setup**: <repository/config state before the action>
- **Action**: <command or call being exercised>
- **Expected**: <concrete outcome — output, exit code, branch/config state>

### Scenario 2: <name>
...

### Coverage Check
- [ ] Happy path(s) covered
- [ ] Error conditions covered
- [ ] Edge cases from spec/analysis covered
- [ ] Additional edge cases found while double-checking: <list or "none">

## Implementation Tasks

### Task 1: Write failing tests
**Files**: `test/cmd/<file>_test.go`
- [ ] Implement all scenarios from the Test Plan as tests
- [ ] Verify they fail for the right reason (missing behavior, not setup bugs)

### Task 2: <Name>
**Files**: `path/to/file.go`
- [ ] <Specific change>

**Details**: <context or code snippets>

### Task 3: <Name>
**Files**: `path/to/file.go`
- [ ] <Specific change>

**Depends on**: Task 2

## Documentation Updates
- [ ] `docs/<command>.1.md` - <changes needed>
- [ ] `docs/gitflow-config.5.md` - <if config changes>
- [ ] Command help text updates

## Checkpoints

| Checkpoint | After Task | Verification |
|------------|------------|--------------|
| 1 | Task 1 | Tests compile and fail on missing behavior |
| 2 | Task 2 | <which scenarios now pass> |
| 3 | Task N | `go build ./...` and `go test ./...` fully pass |

## Commit Strategy

Plan commits following COMMIT_GUIDELINES.md. Tests are committed first.

## Estimated Scope
- Files to modify: <count>
- New files: <count>
- Tests to add: <count>

## Test Plan Revisions

<Empty initially. /implement appends an entry here whenever the test plan
has to change during implementation — see the revision rule in /implement.>
  1. Validate Plan
  1. Report Completion

plan. Implementation must not start before the gate has run.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.