skills/brownfield/bf-plan/SKILL.md
Create an implementation plan for a batch of tasks using Claude Code Plan mode. Reads research.txt, spec.txt, and tasks.json, identifies the established patterns in the target area, and enters Plan mode with that context injected. Ensures the plan follows the codebase's existing architecture. Part of the brownfield skill family. Use when the user says /bf-plan or wants to plan a batch of tasks before implementing.
npx skillsauth add ricky-yosh/agent-workflows bf-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.
Enter Plan mode for a batch of tasks, ensuring the implementation follows the established patterns in the target codebase area.
Brownfield codebases have established patterns. Different areas might use different architectural approaches — one module might use event-driven patterns while another uses direct function calls. When implementing a feature, the code must follow whatever pattern the surrounding area uses — not introduce a new one. This skill makes sure the plan identifies and follows the right pattern before any code is written.
Read context files:
.aw/brownfield-progress/research.txt — for patterns in use, key classes.aw/brownfield-progress/spec.txt — for constraints and scope.aw/brownfield-progress/tasks.json — for the task listIf research.txt or spec.txt are missing, tell the user which skill to run first.
Identify the task scope. Read .aw/brownfield-progress/next-task.json — if it exists, default to the task listed there (written by /bf-triage). Confirm with the user: "Triage picked Task N — planning for that. Want a different task instead?" 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. They exist but are irrelevant to this plan.
Explore the target area. Based on the identified task and research.txt, read the concrete files that represent the pattern to follow. Don't just reference research.txt abstractly — open the actual files so Plan mode has real code examples in context. Focus on:
If the area has conflicting patterns, surface them and ask the user which to follow. For example: "This area uses both callback-based and promise-based patterns — the newer files use promises. Which should this feature use?"
Enter Plan mode with all this context loaded. The plan covers only the identified task(s) — it should be detailed enough to implement without referencing other tasks. The plan should:
Exit Plan mode, then use AskUserQuestion to get approval:
["Looks good", "No"]If "Looks good": done.
If "No": use AskUserQuestion to ask for the reason (free text, no options). Then re-enter Plan mode with the feedback and repeat from step 5.
The plan is Claude Code's built-in Plan mode output — not a separate artifact file. It should read like an implementation guide that a developer can follow step by step. The key addition this skill provides is the pattern context: every plan must anchor itself to concrete existing code.
Example of what "pattern anchoring" looks like in a plan:
Pattern: Follow
UserListController+UserListDataSourcepattern
- New
CategoryPickerControllermirrorsUserListController(same event setup, same lifecycle hooks)- New
CategoryPickerDataSourcemirrorsUserListDataSource(same data interface, same reload pattern)- Wire via event emitter, same as
UserListController.onUpdate
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 (model, view, controller, 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 model classes. Task 2: Create all views. Task 3: Wire everything together."
Good: "Task 1: Add the entry point that opens an empty view. Task 2: Populate the view with data from the existing data source. Task 3: Add edit/save functionality."
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 app, not things that require reading code.
Write these from the user's perspective: launch the app, navigate somewhere, click something, observe something. Each task gets its own mini-checklist so the user can verify incrementally as tasks are completed.
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.