Skip to contentমূল লেখায় যান

Part 07পর্ব 07 · Foundations

Key Principles

These eight principles sum up this tutorial. Use them as a checklist when you design how your team tests with Claude Code. Each principle links to the page that explains it in detail.

8 min read8 মিনিটে পড়া যায় · 3 sections3টি সেকশন · 10 sources10টি সোর্স · updated Nov 2026আপডেট: Nov 2026

The eight principles

1. Verify first

Give Claude a check that it can run, and ask for evidence, not a claim of success. Source 1সোর্স 1

2. Plan when the scope is unclear

Explore and plan before you implement. Skip the plan when the scope is clear and small (this tutorial's advice). Source 2সোর্স 2

3. Be specific and give context

Reference specific files, mention constraints, and point to example patterns. Source 1সোর্স 1

4. Keep the context small

A focused context gets better answers and costs less. Clear it between tasks, and send noisy research to subagents. Source 1সোর্স 1

5. Rules in CLAUDE.md, guarantees in hooks

CLAUDE.md is advisory. Hooks are deterministic. Source 1সোর্স 1

6. Grant the least permission that works

Pick the permission mode by risk, and refine it with allow and deny rules. Source 2সোর্স 2

7. Treat outside content as untrusted

Files, web pages, and tool results can carry hostile instructions. Source 3সোর্স 3

8. Test what matters

Use test techniques to build a small but sufficient set of test cases. Source 4সোর্স 4

সহজ English

In short, the eight principles are:

  1. Give Claude a check that it can run. Ask for evidence, not a claim that the work is done. Source 1সোর্স 1
  2. Explore and plan before you make a change. Skip the plan when the scope is clear and small (this tutorial's advice). Source 2সোর্স 2
  3. Name the file, describe the symptom, say what "fixed" looks like, and point to an existing pattern. Source 1সোর্স 1
  4. A focused context gets better answers and costs less. Clear the context between tasks, and send noisy research to subagents. Source 1সোর্স 1
  5. CLAUDE.md is only advice. Hooks always act the same way. Source 1সোর্স 1
  6. Pick the permission mode by risk. Then adjust it with allow and deny rules. Source 2সোর্স 2
  7. Files, web pages, and tool results can contain hostile instructions. Source 3সোর্স 3
  8. Use test techniques to make a small set of test cases that is sufficient. Source 4সোর্স 4

বাংলা ব্যাখ্যা

এই আটটি নীতি সংক্ষেপে:

  1. Claude-কে এমন একটি check দিন যা সে নিজে চালাতে পারে। "কাজ হয়ে গেছে" এমন দাবি নয়, প্রমাণ চান। Source 1সোর্স 1
  2. পরিবর্তন implement করার আগে explore ও plan করুন। scope পরিষ্কার ও ছোট হলে plan বাদ দিন (এই tutorial-এর পরামর্শ)। Source 2সোর্স 2
  3. file-এর নাম দিন, symptom বর্ণনা করুন, "fixed" দেখতে কেমন তা বলুন এবং বিদ্যমান একটি pattern দেখান। Source 1সোর্স 1
  4. কেন্দ্রীভূত (focused) context ভালো উত্তর দেয় এবং খরচ কম হয়। task-গুলোর মাঝে context clear করুন এবং noisy research-এর কাজ subagent-কে দিন। Source 1সোর্স 1
  5. CLAUDE.md শুধু পরামর্শ (advisory)। Hook deterministic, অর্থাৎ প্রতিবার একইভাবে কাজ করে। Source 1সোর্স 1
  6. ঝুঁকি বুঝে permission mode বেছে নিন, তারপর allow ও deny rule দিয়ে সেটি ঠিক করুন। Source 2সোর্স 2
  7. File, web page এবং tool result-এ ক্ষতিকর (hostile) instruction থাকতে পারে। Source 3সোর্স 3
  8. Test technique ব্যবহার করে ছোট কিন্তু যথেষ্ট একটি test case-এর set তৈরি করুন। Source 4সোর্স 4

The principles in detail

1. Verify first

Give Claude something that produces a pass or a fail, such as tests, a build, or a screenshot. Then the loop closes: Claude works, runs the check, reads the result, and iterates until the check passes. Source 1সোর্স 1 Without a check, you become the verification loop, and every mistake waits for you to notice it. Source 1সোর্স 1 The glossary says it this way: without a verification loop, "the only thing deciding the agent is finished is the agent itself". Source 3সোর্স 3

  • Ask Claude to show evidence: the test output, the command and its result, or a screenshot. Source 1সোর্স 1 For a bug report, this tutorial also asks for the file and line, the log message, or the query result that proves the bug.
  • The docs say that without a check, "looks done" is all Claude has to go on, and "In practice that makes you the test suite". Source 1সোর্স 1
  • For risky work, add an independent reviewer in a fresh subagent or a second session, for example /code-review. A reviewer that you tell to find gaps usually reports some, even when the work is sound. So limit it to correctness and the stated requirements. Source 1সোর্স 1

QA example: ask for a failing test that reproduces the bug first. Then ask for the fix, and the same test passing. Details: Prompting for QA.

2. Plan when the scope is unclear

Separate research and planning from implementation, so you do not solve the wrong problem.

Plan mode. In plan mode, Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Source 2সোর্স 2 Enter it with Shift+Tab, with /plan, or with claude --permission-mode plan. Source 2সোর্স 2 Approving the plan exits plan mode and switches the session to the permission mode that the approve option describes, so Claude starts editing. Source 2সোর্স 2

Planning has a cost. Plan when you are unsure of the approach, when many files change, or when you do not know the code. Skip the plan when the scope is clear and small. This is this tutorial's advice. Details: Permission Modes.

3. Be specific and give context

Precise instructions reduce corrections. Name the file, describe the symptom, say what "fixed" looks like, and point to an existing pattern. Source 1সোর্স 1 You do not need to list every file to read. Give context and direction, then trust Claude to work out the details. Source 5সোর্স 5 Details: Prompting for QA.

4. Keep the context small

Most current models have a 1M-token window and Claude Code compacts on its own, so running out is rare. A focused context still gives better answers and costs less. Source 1সোর্স 1

  • Run /clear between unrelated tasks. If you corrected the same thing twice and it is still wrong, run /clear and write one new prompt that includes what you learned. That works better almost every time than a third correction. Source 1সোর্স 1
  • Send noisy research to a subagent, for example "use a subagent to investigate X". It works in its own context and returns a summary. Each subagent costs extra tokens. Source 1সোর্স 1
  • Move knowledge that Claude needs only sometimes into skills. Claude loads them on demand. Source 1সোর্স 1 MCP tool search is on by default, so idle MCP tools use minimal context. Source 6সোর্স 6
  • In a large repository, scope Claude to the part of the codebase that a task touches. Source 7সোর্স 7

Details: How Claude Code Works.

5. Rules in CLAUDE.md, guarantees in hooks

Claude reads CLAUDE.md at the start of every session. Source 1সোর্স 1 Use it for context that Claude cannot infer from the code, such as test commands, code style, and known gotchas. Source 1সোর্স 1

  • Keep each CLAUDE.md file short: the docs target under 200 lines. Longer files use more context and lower adherence. Source 8সোর্স 8 Before you add a line, ask: "Could it find this by reading the code?" and "Would it actually go and look?" If both are yes, leave it out. Source 1সোর্স 1
  • Claude treats CLAUDE.md as context, not as enforced configuration. Source 8সোর্স 8 For an action that must happen every time, use a hook. Hooks are deterministic and guarantee the action. Source 1সোর্স 1 An instruction such as "never edit .env" is a request. A PreToolUse hook that blocks the edit is enforcement. Source 6সোর্স 6
  • Auto memory holds notes that Claude writes itself. Claude Code loads both CLAUDE.md and auto memory at the start of every session. Source 8সোর্স 8
  • Put a rule in CLAUDE.md if Claude should always know it. Put reference material in a skill if Claude needs it only sometimes. Source 6সোর্স 6

This tutorial's example skills are analyze-requirement, explain-code, find-bug, test-design, analyze-security, and analyze-rootcause. They are examples, not a required set. Details: CLAUDE.md & Memory, Hooks, and Skills & Commands.

6. Grant the least permission that works

A permission mode sets which actions Claude can take without asking. The modes are default (Manual), acceptEdits, plan, auto, dontAsk, and bypassPermissions. Source 2সোর্স 2

Example from the docs, for a CI test run: Source 2সোর্স 2

claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"

Checkpoints cannot undo a database write

/rewind undoes file edits. Actions that affect remote systems, such as databases, APIs, and deployments, cannot be checkpointed. Source 5সোর্স 5 Control them with the permission mode and rules before Claude acts.

Details: Permission Modes.

7. Treat outside content as untrusted

Prompt injection is hostile instructions in a file, a web page, or a tool result that try to redirect Claude. Source 3সোর্স 3 For a QA team, that includes test logs, bug tickets, web pages under test, and MCP results.

The security docs give these practices: Source 9সোর্স 9

  • Review suggested commands before you approve them.
  • Do not pipe untrusted content directly to Claude.
  • Verify proposed changes to critical files.
  • Use VMs to run scripts and make tool calls, especially when they reach external web services.

MCP servers. Use MCP servers that you wrote or that come from providers you trust. Anthropic reviews connectors before it adds them to the Anthropic Directory, but it does not security-audit or manage any MCP server. Source 9সোর্স 9 In Manual mode, Claude Code prompts before commands such as curl and wget by default. Source 9সোর্স 9 Details: MCP Servers.

8. Test what matters

Test techniques help you build "a relatively small, but sufficient, set of test cases in a systematic way". Source 4সোর্স 4 More cases are not always better. For example, the rules of a decision table grow exponentially with the number of conditions. A minimized table or a risk-based approach keeps the number down. Source 4সোর্স 4 Details: Test Design with Claude.

সহজ English

  1. Give Claude a check that shows pass or fail, such as tests, a build, or a screenshot. Claude runs it and tries again until it passes. Source 1সোর্স 1 Ask for evidence, such as the test output. Source 1সোর্স 1
  2. Plan first when you are not sure of the approach. In plan mode, Claude reads files and explores, but does not edit your source. Source 2সোর্স 2 Skip the plan for a small, clear change (this tutorial's advice).
  3. Name the file, the symptom, what "fixed" looks like, and an existing pattern. Source 1সোর্স 1
  4. Run /clear between unrelated tasks. Send noisy research to subagents. Source 1সোর্স 1
  5. Claude reads CLAUDE.md at the start of every session. Source 1সোর্স 1 Claude treats it as context, not as enforced configuration. Source 8সোর্স 8 For an action that must happen every time, use a hook. Source 1সোর্স 1
  6. Deny rules block in every mode, including bypassPermissions. Source 2সোর্স 2 /rewind undoes file edits, but not actions on remote systems, such as databases, APIs, and deployments. Source 5সোর্স 5
  7. Hostile instructions in a file, a web page, or a tool result can try to redirect Claude. Source 3সোর্স 3 Review suggested commands before you approve them. Source 9সোর্স 9
  8. Test techniques help you make a small but sufficient set of test cases. Source 4সোর্স 4

বাংলা ব্যাখ্যা

এই অংশে আটটি নীতির প্রতিটি বিস্তারিত বলা হয়েছে।

  1. Claude-কে এমন কিছু দিন যা pass বা fail দেখায়, যেমন test, build বা screenshot। তখন Claude check চালায়, result পড়ে এবং check pass না হওয়া পর্যন্ত আবার চেষ্টা করে। Source 1সোর্স 1 প্রমাণ চান: test output, command ও তার result অথবা screenshot। Source 1সোর্স 1
  2. Approach নিয়ে নিশ্চিত না হলে আগে plan করুন। Plan mode-এ Claude file পড়ে ও explore করে, কিন্তু আপনার source edit করে না। Source 2সোর্স 2 ছোট ও পরিষ্কার পরিবর্তনের জন্য plan বাদ দিন (এই tutorial-এর পরামর্শ)।
  3. file-এর নাম, symptom, "fixed" দেখতে কেমন এবং বিদ্যমান একটি pattern দিন। Source 1সোর্স 1
  4. সম্পর্কহীন task-গুলোর মাঝে /clear চালান এবং research-এর কাজ subagent-কে দিন। Source 1সোর্স 1
  5. Claude প্রতিটি session-এর শুরুতে CLAUDE.md পড়ে। Source 1সোর্স 1 কিন্তু Claude এটিকে context হিসেবে নেয়, enforced configuration হিসেবে নয়। Source 8সোর্স 8 যে কাজ প্রতিবার হতেই হবে, তার জন্য hook ব্যবহার করুন। Source 1সোর্স 1
  6. Deny rule প্রতিটি mode-এ block করে, bypassPermissions-সহ। bypassPermissions শুধু isolated container ও VM-এ ব্যবহার করুন। Source 2সোর্স 2 /rewind file edit undo করে, কিন্তু database, API বা deployment-এর মতো remote system-এর কাজ undo করতে পারে না। Source 5সোর্স 5
  7. File, web page বা tool result-এর ক্ষতিকর instruction Claude-কে অন্য দিকে নিয়ে যাওয়ার চেষ্টা করতে পারে। Source 3সোর্স 3 Approve করার আগে suggested command-গুলো review করুন। Source 9সোর্স 9
  8. Test technique আপনাকে ছোট কিন্তু যথেষ্ট একটি test case-এর set তৈরি করতে সাহায্য করে। Source 4সোর্স 4

A working loop for QA and SDET tasks

This loop is this tutorial's summary of the principles:

  1. Write a short CLAUDE.md with your test commands and conventions. Source 1সোর্স 1 Source 8সোর্স 8
  2. Set permissions and hooks: deny rules for secrets, hooks for rules that must always hold. Source 2সোর্স 2 Source 1সোর্স 1
  3. Explore and plan in plan mode when the scope is unclear. Source 1সোর্স 1 Source 2সোর্স 2
  4. Implement with a check that Claude can run. Source 1সোর্স 1
  5. Review the evidence: the test output, the commands, and their results. Source 1সোর্স 1
  6. Clear the context between tasks, and add lasting lessons to CLAUDE.md. Source 1সোর্স 1

Example: a QA engineer gets ticket PAY-4201 for a refund bug. Claude reads the ticket through a Jira MCP server and the code with its tools, in plan mode. The engineer approves a plan that names the partitions and boundaries to test. Claude writes the tests, runs them, and shows the failing output that proves the bug. A fresh reviewer session checks the tests against the ticket. The Subagents and MCP Servers pages show how to set up each part.

Why the principles work together

Precise prompts, real context, a check that Claude can run, and deterministic guardrails each cover a different risk. This summary is this tutorial's view.

সহজ English

This tutorial sums up the principles as a loop of six steps:

  1. Write a short CLAUDE.md with your test commands and conventions. Source 1সোর্স 1 Source 8সোর্স 8
  2. Set deny rules for secrets, and hooks for rules that must always hold. Source 2সোর্স 2 Source 1সোর্স 1
  3. When the scope is not clear, explore and plan in plan mode. Source 1সোর্স 1 Source 2সোর্স 2
  4. Make the change with a check that Claude can run. Source 1সোর্স 1
  5. Examine the evidence: the test output, the commands, and their results. Source 1সোর্স 1
  6. Clear the context between tasks. Add lessons that last to CLAUDE.md. Source 1সোর্স 1

Example: a QA engineer gets ticket PAY-4201 for a refund bug. In plan mode, Claude reads the ticket through a Jira MCP server, and reads the code with its tools. The engineer approves a plan that names the partitions and boundaries to test. Claude writes the tests, runs them, and shows the failing output that proves the bug. A fresh reviewer session checks the tests against the ticket.

In this tutorial's view, precise prompts, real context, a check that Claude can run, and deterministic guardrails each cover a different risk.

বাংলা ব্যাখ্যা

এই tutorial নীতিগুলোকে ছয় ধাপের একটি loop হিসেবে সংক্ষেপ করে:

  1. আপনার test command ও convention দিয়ে একটি ছোট CLAUDE.md লিখুন। Source 1সোর্স 1 Source 8সোর্স 8
  2. Secret-এর জন্য deny rule এবং যে rule সবসময় মানতে হবে তার জন্য hook সেট করুন। Source 2সোর্স 2 Source 1সোর্স 1
  3. Scope পরিষ্কার না হলে plan mode-এ explore ও plan করুন। Source 1সোর্স 1 Source 2সোর্স 2
  4. এমন একটি check-সহ implement করুন যা Claude চালাতে পারে। Source 1সোর্স 1
  5. প্রমাণ review করুন: test output, command এবং সেগুলোর result। Source 1সোর্স 1
  6. task-গুলোর মাঝে context clear করুন এবং স্থায়ী শিক্ষাগুলো CLAUDE.md-তে যোগ করুন। Source 1সোর্স 1

উদাহরণ: একজন QA engineer একটি refund bug-এর জন্য ticket PAY-4201 পান। Plan mode-এ Claude একটি Jira MCP server-এর মাধ্যমে ticket পড়ে এবং নিজের tool দিয়ে code পড়ে। Engineer এমন একটি plan approve করেন যাতে কোন partition ও boundary test করতে হবে তা লেখা আছে। Claude test লেখে, সেগুলো চালায় এবং bug প্রমাণ করে এমন failing output দেখায়। একটি নতুন reviewer session ticket-এর সাথে test-গুলো মিলিয়ে দেখে।

এই tutorial-এর মতে, precise prompt, real context, Claude যে check চালাতে পারে এবং deterministic guardrail, এগুলোর প্রতিটি আলাদা একটি ঝুঁকি সামলায়।

  1. [1]
    Best practices for Claude Code

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  2. [2]
    Choose a permission mode

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  3. [3]
    Glossary

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  4. [4]
    Certified Tester Foundation Level Syllabus v4.0 (2023)

    ISTQB (hosted by ASTQB) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  5. [5]
    How Claude Code works

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  6. [6]
    Extend Claude Code

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  7. [7]
    Set up Claude Code in a monorepo or large codebase

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  8. [8]
    How Claude remembers your project

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  9. [9]
    Security

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  10. [10]
    Commands

    Anthropic (Claude Code docs) · accessed 2026-11-27দেখা হয়েছে: 2026-11-27