Skip to content

Writing Good Specs

The spec is the single highest-leverage artifact in the ACT workflow. A clear spec produces a focused plan and correct implementation. A vague spec produces guesswork.

Good specs share four qualities:

  1. Specific --- requirements describe observable behavior, not intent. “Show a loading spinner while fetching” rather than “handle loading.”
  2. Testable --- every requirement can be verified with a concrete check. If you cannot describe how to test it, the requirement is too vague.
  3. Bounded --- the spec states what is out of scope just as clearly as what is in scope.
  4. Independent --- the spec can be implemented without depending on other unfinished work.

ACT generates specs with these sections (see Spec command for details):

SectionPurpose
GoalWhat to build and why it matters
BackgroundTech stack, constraints, project context
User flowsHappy path, alternative flows, error/recovery flows
RequirementsNumbered, testable requirements grouped by category
BoundariesWhat is explicitly out of scope
Implementation notesPatterns to follow, files to modify, things to avoid
ValidationHow to verify the feature works correctly
Done whenMeasurable completion criteria

You do not need to write all of this yourself. Give ACT a clear task description, answer the clarifying questions well, and it generates the structure. Your job is to review and refine the output.

  • “Add authentication” --- which provider? What happens on failure? What screens need auth guards?
  • “Improve performance” --- which screen? What metric? What is the target?

Fix: Describe the specific user-facing behavior you want to see.

  • “Build the entire settings screen with all options” --- this bundles unrelated features (theme, notifications, account, privacy) into one spec.

Fix: Split into one spec per concern. See Breaking Down Large Tasks.

  • Specs that only describe the happy path. What happens when the network is down? When the user has no data? When the input is invalid?

Fix: After writing the spec, ask yourself “what could go wrong?” for each user flow. Or use /act:workflow:refine-spec to catch gaps automatically.

  • “Use a StatefulWidget with a TextEditingController and call setState on every keystroke” --- this over-constrains the implementation and may conflict with your project’s patterns.

Fix: Describe the behavior (“real-time search filtering as the user types”), not the mechanism. Let the plan stage decide the implementation approach.

BadGood
”Handle errors""Show a retry button with the error message when the API returns a non-200 status"
"Make it fast""The list renders within 300ms for up to 500 items"
"Support offline""Previously loaded data is available when the device has no network connection; a banner indicates offline status"
"Add validation""Email field rejects input without @ and a domain; password requires 8+ characters with one number”

When you run /act:workflow:spec, the quality of your initial description matters:

  • State the user goal, not the technical task. “Users can bookmark articles for later reading” beats “add a bookmarks table and API endpoint.”
  • Mention constraints early. If you use Riverpod, need offline support, or have a specific API --- say so upfront.
  • Reference existing features. “Similar to how favorites work in the current app” gives ACT a concrete pattern to follow.
  • Answer clarifying questions thoroughly. These questions exist because the AI detected genuine ambiguity. Brief answers lead to assumptions.

Review the spec yourself, then optionally run /act:workflow:refine-spec for adversarial review. Once you are satisfied, proceed to /act:workflow:plan.