Claude Code Daily Workflow
A Practical Claude Code Workflow for Daily Development
Follow a clearly labeled login bug from investigation through review. Learn when to use Plan mode, how permission modes affect approvals, and how evidence, tests, and diff review guide your decisions.

A reliable Claude Code workflow moves from understanding a repository problem to a bounded plan, a focused change, verified checks, and a human review of the diff. You decide what success means, set the boundaries for the work, and judge whether the evidence supports accepting the result.
This guide follows one hypothetical login bug through that process. The repository, findings, test output, and diff are illustrative; they show how to work through a real task, not results from an actual project.
What is a Claude Code workflow?
A Claude Code workflow is a repeatable way to direct the tool through repository investigation, planning, implementation, verification, and review. It is more than a one-off prompt for code generation: Claude can inspect project files and, depending on permissions, edit files or run commands. You remain responsible for defining the goal, setting approval boundaries, and deciding whether the result is acceptable.
A practical loop is: describe the behavior, gather evidence, choose whether to plan, approve a bounded approach, implement, test, and inspect the diff. Return to investigation if new evidence undermines the plan. This keeps a plausible explanation from turning into an unverified fix.
The guide’s example uses a fictional TypeScript application with a React login form and a server-side session service. The reported bug is specific: a user whose stored email address is lowercase cannot sign in when they enter the same address with uppercase letters. The expected behavior is that letter casing in the entered email does not prevent sign-in. The example will carry that condition through each stage.
What should you prepare before starting a repository task?
Give Claude the observed behavior, the expected outcome, relevant constraints, and any reproduction steps you have. Start by checking the working tree yourself so you know whether existing local changes need protection.
- Record the baseline. Check the repository and branch, and inspect existing changes with your usual Git workflow. Do not let the task overwrite unrelated work.
- State the failure precisely. For this example: “A user registered as alex@example.test cannot sign in when entering Alex@Example.test. The lowercase form succeeds. Expected: both forms sign in to the same account.”
- Set scope. Ask Claude to limit the fix to this login behavior and its regression test. Say that unrelated authentication changes, broad refactoring, and formatting are out of scope.
- Give landmarks without pretending to know the cause. If you know the login route or test command, share it. Otherwise ask Claude to locate the relevant code and tests before proposing a fix.
Specific boundaries help Claude distinguish the task from adjacent work. They also give you criteria for reviewing the final diff: does each changed file contribute to the stated behavior or its test?
Project instructions can record durable conventions, such as the test command or preferred patterns, while a task prompt should still explain the current bug. A fresh session may not contain the history of earlier work, so restate the evidence needed for the task rather than relying on an old conversation.
How should you investigate before asking Claude to change code?
Begin with a read-only investigation. Ask Claude to trace the behavior, identify files and tests, and separate what it can verify from what it only suspects. Reproduce the issue when possible; a code-level theory is not the same as evidence that the reported failure occurs.
- Trace the path. In the example, ask Claude to follow the submitted email from the React login form through the session endpoint to the user lookup.
- Inspect neighboring behavior. Ask it to compare the lookup with registration and nearby tests. Existing code can reveal where the application establishes conventions, but do not assume that convention is correct until it accounts for the failure.
- Reproduce and record. Run the project’s relevant test or reproduction command. Keep the command and output available for comparison after the change.
- Separate evidence and hypotheses. Ask for file names, observed code paths, test findings, and unanswered questions as distinct items.
Illustrative investigation findings: Claude reports that src/features/auth/LoginForm.tsx submits the email value as entered. The request reaches src/server/auth/session.ts, where the session service passes that value to a case-sensitive user lookup. Registration in src/server/auth/register.ts stores the email in lowercase. The existing test file, src/server/auth/session.test.ts, covers a lowercase login but has no uppercase-input case. These observations support a likely mismatch between registration normalization and login lookup; they do not yet prove the best place to fix it.
The developer reproduces the issue with the repository’s login test setup: the lowercase case passes, while a new or manually exercised uppercase-input case fails to find the account. If the project cannot reproduce the behavior, do not invent output. Ask what setup or missing information would make reproduction possible.
A useful prompt for this stage is:
“Investigate why the same registered user can sign in with a lowercase email but not with uppercase letters in the entered email. Trace the value from the login form to the user lookup and compare it with registration behavior and existing tests. Report files inspected, reproduction evidence, observations, hypotheses, and open questions. Do not edit files yet. Keep the investigation limited to this login behavior.”
When should you use Plan mode, and what should the plan contain?
Use Plan mode when you are uncertain about the cause, the task crosses files or layers, or you need to compare implementation options before editing. Skip it when investigation has already established a small, obvious change. Plan mode is for exploring and proposing a plan; it is not the mode that approves edits as they happen.
For the example, the evidence points to a mismatch between registration and login normalization. A bounded plan could be:
- Normalize the email at the server-side login lookup boundary, matching the lowercase convention already used during registration.
- Add a regression case to src/server/auth/session.test.ts using uppercase input for an account stored in lowercase.
- Keep the existing lowercase-login behavior covered and unchanged.
- Run the focused session test, then the relevant broader authentication check if the focused test passes.
- Change no registration, password, session-expiry, or unrelated authentication behavior.
Before implementation, check that the proposed location follows the evidence and that the plan does not expand into a broad refactor. If the lookup’s behavior is unclear or another layer transforms the value, ask for more investigation instead of approving the plan. A plan is a proposal, not proof of the diagnosis.
For a tiny task with a known file and a one-line intended change, planning may add little value. For a task with uncertainty or multiple plausible fixes, the plan gives you a chance to correct scope before code changes begin.
How should you set permissions for this workflow?
Choose a permission mode based on which actions should require approval. Claude Code’s default permission mode asks for approval for actions that are not already allowed by the configured rules. This is a reasonable starting point when you want to inspect first and approve consequential edits or commands as they arise.
Plan mode is different: use it to investigate and develop a proposal without implementing edits. After approving a plan, switch to an implementation workflow with the permission behavior you want; Plan mode itself is not an edit-approval mode.
In acceptEdits mode, file edits are accepted without an individual approval prompt, while other actions may still require approval under the configured rules. Use it only when you are comfortable letting Claude make file changes within the task boundary. A mode that bypasses permission checks removes a much broader set of prompts; reserve it for situations where that loss of approval checkpoints is intentional and appropriate to the environment.
For the login example, a cautious sequence is to investigate in Plan mode, review the proposal, then use the default mode to approve the targeted code and test edits and any necessary test command. If you use acceptEdits, inspect the resulting changes carefully. A permission mode controls what Claude may do; it does not establish that a change is correct or safe.
How do you ask Claude Code to implement the change?
Once the plan matches the evidence, ask for the smallest change that satisfies it. Name the relevant files, expected behavior, test case, and exclusions. In the example, ask Claude to normalize the submitted email at the login lookup boundary and add an uppercase-input regression case to the existing session test. Keep unrelated authentication behavior unchanged.
A focused implementation prompt could be:
“Implement the approved plan for the login email-casing bug. Normalize the submitted email at the server-side lookup boundary, following the registration convention identified during investigation. Add the uppercase-input regression case to the existing session test and preserve the lowercase case. Do not change unrelated authentication behavior. If the code contradicts the plan, stop and explain the new evidence before making a broader change.”
While Claude works, check whether the edits still fit the plan. If it discovers that registration and login use a shared normalization helper, for example, pause and ask whether using that helper is the right narrow fix. Do not let an unreviewed discovery silently turn a small correction into a wider redesign.
The implementation is not complete when Claude says it has finished. It is ready for verification only when you can identify what changed and which behavior the test should demonstrate.
How should you test Claude’s change?
Test the reported behavior, not just whether the code compiles. Ask Claude to run the relevant repository checks and report the exact command and meaningful output. Then inspect that output yourself, especially if a command fails or the result differs from expectations.
- Confirm the regression test is specific. It should represent an account stored with a lowercase email and a login attempt using uppercase letters, then check that the expected account is found or the login succeeds according to the project’s test boundary.
- Preserve the baseline case. The existing lowercase login case should continue to pass.
- Run the focused test first. This gives a direct signal about the behavior and makes failures easier to diagnose.
- Run broader checks when warranted. Use the project’s relevant authentication test or build command if the change could affect more than the focused service.
Illustrative test result: Before the fix, the uppercase-input regression case fails because the lookup does not find the lowercase account. After the change, the focused session test reports the uppercase-input case and existing lowercase case as passing. This is sample output for the fictional repository, not a claim that a real command was run.
If the test still fails, compare its setup with the reported reproduction and inspect the actual failure output. If it passes but the diff changes unrelated authentication code, the test result does not justify accepting that scope. Tests provide evidence about the behaviors they cover, not a blanket guarantee about the whole change.
How do you review the diff and decide whether to commit?
Read the full diff, including tests, before accepting the change. Compare it with the plan and the stated scope, then decide whether the implementation and checks support the expected behavior. A review command or another model’s findings can direct attention, but neither replaces your judgment.
- Check every changed file. In the example, the expected changes are the login lookup and the session test. Investigate any extra file rather than assuming it is necessary.
- Read the implementation in context. Confirm normalization happens at the intended boundary and does not alter unrelated values or flows.
- Read the test as a specification. Ensure it would fail for the original bug and pass for the intended behavior. A test that only checks a helper in isolation may not prove the login path uses it.
- Match claims to output. Confirm the reported command actually ran and inspect the result. If a broader check was not run, record that limitation rather than implying it passed.
- Make the final decision. Accept, request a targeted correction, or return to investigation. Commit only after the final state and its remaining limitations are clear.
Illustrative diff review: Suppose the final diff changes only the session lookup to use the same lowercase convention as registration and adds the uppercase-input case to src/server/auth/session.test.ts. The focused test passes, the existing lowercase case remains intact, and no unrelated files changed. That evidence supports accepting this bounded fix, subject to any broader check the project requires. If the diff also rewrites registration or changes password handling, reject that expansion or request a separate plan, even if the focused test passes.
For a second review, Claude Code’s /code-review command can help identify potential issues in changes. Treat each finding as something to verify against the code and task. If a tool is configured to apply suggested fixes, inspect those edits as new changes and rerun relevant checks before deciding whether to keep them.
What role do project memory and hooks play?
Project guidance and memory help Claude follow conventions across tasks. A project instruction file can explain how to run tests, where authentication logic belongs, or which patterns the repository uses. Keep instructions concise and durable; put the current bug, reproduction, scope, and acceptance criteria in the task prompt.
Instructions provide context, not an enforced permission rule. Hooks can run configured actions at specific tool events. A PreToolUse hook can deny a matching tool call when it is configured to do so, but it is not a universal control over every action or behavior. Define the relevant event and denial condition narrowly, and do not treat an instruction or hook as a substitute for choosing appropriate permissions.
For the login example, project guidance might name the session test command and the preferred pattern for authentication tests. A hook could be configured to deny a particular matching command or tool call that should not run. These are distinct jobs: guidance steers work, permission settings control approvals, and configured hooks act on their specified events.
For readers building a broader setup, the next supporting topics in the DevFlowClaude workflow pathway are project instructions and CLAUDE.md design, session memory, and hook configuration for repository checks. Read those focused guides when you need to establish conventions across a team or automate a specific control; this pillar guide keeps its focus on the task loop.
Frequently asked questions
Does every task need Plan mode?
No. Use it when uncertainty, unfamiliar code, or cross-file scope makes it useful to review an approach before edits. For a small, well-understood change, state the desired behavior and boundaries directly, then verify the result.
Can Claude Code continue work from an earlier session?
Claude Code provides ways to continue or resume session work, including CLI options such as --continue and --resume. Check the available options for your installed version. Before acting, confirm the current repository state and restate any task details or constraints that are necessary for safe work.
Can I run Claude Code non-interactively?
Yes, the CLI supports non-interactive use with -p. Scripted use still needs a bounded task, appropriately configured permissions, and checks that report whether the requested behavior holds. Do not treat a successful process exit as proof that the resulting change is suitable.
What should I do when a test fails after an edit?
Inspect the command and failure output, then compare the failure with the baseline and the original reproduction. Ask Claude to explain the evidence and identify whether the failure relates to the change. Fix the cause or revert the edit as appropriate; do not accept an unsupported claim that the failure is unrelated.
What is the final acceptance check?
Confirm that the change addresses the observed behavior, the relevant checks ran and produced acceptable results, and the diff contains only work you intend to keep. If one of those conditions is missing, investigate or narrow the change before committing.