skills/greenfield/gf-plan/SKILL.md
Research the task, form a recommended approach, ask the user to confirm or redirect via AskUserQuestion, then enter Plan mode. Part of the gf (greenfield) skill family.
npx skillsauth add ricky-yosh/agent-workflows gf-planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Research the task, surface a recommended approach, confirm with the user, then enter Plan mode.
Read context files:
.aw/greenfield-progress/spec.xml — for requirements and constraints.aw/greenfield-progress/tasks.json — for the task list.aw/greenfield-progress/progress.txt — for prior decisions and contextIf spec.xml is missing, tell the user to run /gf-create-spec first.
Identify the task scope. Read .aw/greenfield-progress/next-task.json — if it exists, default to the task listed there (written by /gf-resume). If next-task.json doesn't exist, fall back to the first not-done task in tasks.json. The user can request multiple (e.g., "tasks 3-4"), but the default is one.
Scope constraint: Plan ONLY for the identified task(s). Do not outline, summarize, or propose approaches for other tasks in tasks.json.
Research the codebase. Read the actual files relevant to this task — understand what patterns are already in use, what files will be touched, and how things connect. Look for:
Form a recommendation. Based on your research, identify the simplest approach consistent with the spec and existing patterns. Note the rationale in one sentence. If there's a meaningful alternative worth surfacing, note that too.
Ask the user to confirm the approach using AskUserQuestion:
question: "Recommended approach for Task N: <one-sentence summary>. Proceed?"
options:
- "Yes — plan it"
- "Different approach: ___"
Enter Plan mode with a complete, grounded plan for the confirmed approach. The plan covers only the identified task(s) and must be detailed enough to implement without referencing other tasks. It should:
After presenting the plan, use AskUserQuestion:
question: "Ready to implement, or want to adjust the plan?"
options:
- "Looks good — implement it"
- "Change something: ___"
If the user wants a change, revise and re-present. Otherwise, proceed.
The plan is Claude Code's built-in Plan mode output. It should read like an implementation guide. The key is grounding every decision in the architecture doc and existing code:
Pattern: Follow the event-driven pattern from the existing codebase
- New
OrderProcessoremits events through the existingEventBus- New
OrderViewsubscribes to order events, same pattern asUserView- Data flows: API → Processor → EventBus → View
Every task in the plan should be a skinny, end-to-end integration — not a horizontal layer. A good task touches all the layers it needs (data, logic, UI, wiring) but does the minimum at each layer to produce something the user can see and test. This means after completing any single task, the feature should be in a testable state, even if incomplete.
Bad: "Task 1: Create all data models. Task 2: Build all UI components. Task 3: Wire everything together."
Good: "Task 1: Render a hardcoded list on screen. Task 2: Replace hardcoded data with API fetch. Task 3: Add create/edit flow."
The final section of every plan must be a "How to test" checklist — simple, concrete steps the user can take to verify each task works after it's implemented. These steps should be actions anyone can perform in the running application, not things that require reading code.
Write these from the user's perspective: launch the app, navigate somewhere, interact with something, observe something. Each task gets its own mini-checklist so the user can verify incrementally as tasks are completed.
Example:
How to test
After Task 1 (hardcoded list renders):
- Run
npm startand openhttp://localhost:3000/orders- Verify: a list of three placeholder orders appears
- Verify: each order shows an ID, date, and total
After Task 2 (live data from API):
- Restart the dev server and open the orders page
- Verify: orders from the database appear instead of placeholders
- Verify: refreshing the page shows up-to-date data
After Task 3 (create/edit flow):
- Click "New Order" and fill in the form
- Verify: the new order appears in the list after saving
- Click an existing order, change the total, save
- Verify: the updated total is reflected in the list
development
Write tests for a batch of tasks BEFORE implementation. Detects the project's test framework and language, then writes tests that cover happy paths, edge cases, and failure modes. All tests should fail initially since there is no implementation yet. Part of the gf (greenfield) skill family. Use when the user says /gf-write-tests or wants to write tests before implementing a feature or task batch.
testing
Generate readable testing notes after a feature is complete. Compares spec against implementation to produce a concise list of what was built, how to test it, and any scope gaps. Writes testing-notes.md to .aw/greenfield-progress/. Part of the gf (greenfield) skill family.
testing
Save current session work to .aw/greenfield-progress/progress.txt. Captures decisions (why, not just what) that git diff cannot show. Updates tasks.json to mark completed tasks. Part of the gf (greenfield) skill family.
testing
Gate the greenfield workflow on user verification after an implementation step. Reads the implementation digest, shows verification steps, and waits for the user to confirm before advancing. Part of the gf (greenfield) skill family.