Skip to content

Chapter 7 of 7

Architecture, Documentation, and Release Workflow

For higher-level work, the prompts shift from individual files to systems. To evaluate an existing design, ask "Review the current architecture of [system/feature] and identify any design issues, scalability concerns, or improvements to consider," or "Identify the top 5 pieces of technical debt in [file/module] ranked by impact and effort, and suggest a remediation plan for each." When extracting responsibilities, "Extract [logic] from [controller/class] into a dedicated service class, following the single responsibility principle and dependency injection pattern" is a clean, repeatable pattern. For larger extractions, "Identify bounded contexts in this codebase and propose how to extract [module] into an independently deployable service with a clear API boundary" frames the migration as a design problem.

For new systems, the design-doc prompt is a useful forcing function: "Write a technical design document for [feature] covering: requirements, proposed solution, alternative approaches, risks, and success metrics." State machines and event-driven designs have dedicated templates: "Implement a state machine for [entity] with states [list] and transitions [list], enforcing valid transitions and logging state changes" and "Refactor [feature] to use event sourcing: store domain events, rebuild state from events, and add event projections for queries." For search features, "Add full-text search to [model/endpoint] that searches [fields], ranks results by relevance, and supports [filters/pagination]" and "Add autocomplete to [search field] that queries [endpoint] on keypress with [debounce ms] delay, displaying top [N] results" are complete starting points. Feature flags are similarly straightforward: "Add a feature flag for [feature] using [library/config], defaulting to disabled, so it can be enabled per user/environment." Frontend quality has its own canonical prompt: "Ensure [component/page] meets WCAG 2.1 AA standards: proper ARIA labels, keyboard navigation, color contrast, and screen reader support." A small but useful UX prompt is "Improve the error messages in [file] to be more descriptive, actionable, and user-friendly."

Documentation and release tasks round out the workflow. To produce a README, ask "Generate a README for this project including: overview, features, prerequisites, installation steps, usage examples, and contributing guide." For ongoing maintenance, "Based on the changes in [files], generate a changelog entry in [Keep a Changelog / conventional format] for version [X.X.X]" and "I need to upgrade [package] from [version A] to [version B]. Read the changelog and migrate any breaking API changes in this codebase" cover the common cases. Before shipping, "Generate a pre-deployment checklist for this project covering: environment variables, database migrations, cache warming, and health checks" produces a concrete list. For the kind of small polish that is easy to forget, prompts like "Add documentation to [file] explaining the purpose of each function, its parameters, return values, and any important behavior" and "Suggest more descriptive names for these variables: [list]. The names should clearly express intent without abbreviation" keep the codebase pleasant to work in over time.

All chapters
  1. 1Getting Started with Claude Code
  2. 2Project Context and Configuration
  3. 3Reading, Searching, and Understanding Code
  4. 4Writing, Editing, and Refactoring Code
  5. 5Testing, Debugging, and Code Review
  6. 6APIs, Data, and Infrastructure
  7. 7Architecture, Documentation, and Release Workflow

Drill it

Reading is not remembering. These come from the Claude Code Prompts deck:

Q

What is Claude Code?

Claude Code is Anthropic's official AI-powered CLI tool that helps developers write, edit, debug, and understand code directly in the terminal.

Q

How do you start Claude Code?

Run `claude` in your terminal from any project directory to start an interactive session with the AI assistant.

Q

What is the key benefit of working in Claude Code's agentic mode?

Claude Code can read files, write code, run tests, and execute shell commands autonomously, completing complex multi-step tasks end-to-end.

Q

How do you give Claude Code access to your entire project?

Navigate to your project root before starting Claude Code — it will automatically have context of all files in the working directory.