SpecWriter: Feature Mode
Write specifications for new features in existing projects with codebase-aware context.
Overview
Feature Mode is a specialized SpecWriter workflow designed for adding new features to an existing codebase. Unlike a blank-slate spec, Feature Mode gathers context about your project so the specification it produces references real files, follows established patterns, and accounts for existing architecture.
How Context Gathering Works
When you start a Feature Mode session, SpecWriter automatically reads key files from your project to understand its structure. This includes:
- CLAUDE.md — Your project's conventions, stack, and architectural decisions
- Route definitions — Page and API routes that already exist
- Component inventory — Shared components available for reuse
- Configuration files — Framework and build tool settings
This context allows SpecWriter to generate specs that work with your codebase instead of against it.
File Request Markers
During the conversation, SpecWriter may determine it needs to see specific files to write an accurate spec. When this happens, you'll see a file request marker:
REQUEST_FILES: src/components/Button.tsx, src/lib/api.tsYou can approve or deny these requests. When approved, SpecWriter reads those files and incorporates their interfaces, types, and patterns into the specification. This ensures the spec references actual function signatures and component props rather than guessing.
Confidence Tagging
Every section of a Feature Mode spec includes a confidence tag:
- HIGH — SpecWriter has enough context to be specific and accurate
- MEDIUM — The section is likely correct but may need adjustment
- LOW — SpecWriter is making assumptions that you should verify
These tags help you focus your review time on the sections that need the most attention rather than reading the entire document line by line.
Referencing Real File Paths
Feature Mode specs use absolute file paths from your project when describing where changes should be made. Instead of vague instructions like "add a new component," the spec will say:
Create `src/components/dashboard/ActivityFeed.tsx`
Modify `src/app/dashboard/page.tsx` to import and render ActivityFeed
Update `src/lib/types.ts` to add the ActivityEvent interfaceThis gives Claude Code precise instructions about where to make changes.
Open Questions Section
At the end of every Feature Mode spec, there is an Open Questions section. This lists decisions that SpecWriter could not resolve on its own — either because the information wasn't available in the codebase or because the decision is a product choice rather than a technical one.
Examples of open questions:
- "Should the activity feed support pagination or infinite scroll?"
- "What is the maximum number of items to display before truncating?"
Resolving these before handing the spec to Claude Code prevents the agent from making arbitrary choices on your behalf.