Overview
Write Effective Prompts
- State goals and constraints clearly: Specify not only what to do, but also what not to change and what rules must be followed.
- Provide key context: When dealing with specific files, interfaces, or conventions, name them directly to reduce Qoder’s search overhead.
- Focus on one thing at a time: Break complex requirements into sequential, smaller steps rather than stacking all demands at once for better control.
- Define acceptance criteria: Clearly state “what counts as done” (e.g., a specific test passes, a command runs without errors) so Qoder can self-verify.
Manage Context
- When switching to an unrelated new task, use
/clearto clear historical context. - When a long session reaches a point where context becomes tight, use
/compactto compress history and retain key information. - Write stable project conventions into
AGENTS.mdto avoid repeating explanations in every conversation. See Memory.
Solidify Conventions with Project Instructions
AGENTS.md and rules are key to improving consistency:
- Use
/initin the project root directory to generateAGENTS.md, documenting architecture, directory structure, common commands, and collaboration conventions. - Use rule files under
<project>/.qoder/rules/to split instructions by topic (testing, API, security) to prevent a singleAGENTS.mdfrom becoming too bloated. - When strict restrictions on certain commands or paths are needed, use permissions or Hooks instead of relying solely on instructions. See Permissions and Hooks.
Large Codebase
- Start from a subdirectory: Launch Qoder in the subdirectory you are working on (rather than the repository root) so it prioritizes loading project instructions and rules at that level. Project memory is searched upwards from the current directory. See Memory.
- Narrow the exploration scope: Name relevant modules or files directly to prevent Qoder from searching broadly across the entire repository.
- Hierarchical project instructions: Place respective
AGENTS.mdand rules in key subdirectories to give different modules their own context.
Monorepo
- Organize project instructions by package: Maintain
AGENTS.mdin each package directory, describing the package’s responsibilities, dependencies, and conventions. When Qoder accesses a file in a package, it will load the instructions for that directory and its parent directories as needed. - Work within the target package: When working on a specific package, launch from its directory or explicitly specify the working scope to reduce irrelevant context.
- Work in parallel: Use Worktrees to create independent workspaces for different packages or tasks to avoid interference. See Handling Multiple Tasks in Parallel.
Choose the Right Working Mode
- High impact or uncertain direction: Use Plan to confirm the approach first. See Plan Before Execution (Plan).
- Clear endpoint, hands-off completion: Use Goal for continuous execution. See Continuous Goal Completion (Goal).
- Scripts and pipelines: Use Headless Mode. See Running Qoder CLI in Scripts.
Let Qoder Self-Verify
- Have Qoder proactively run tests or builds after modifying code to form an “implement-verify-correct” closed loop.
- Use
/diffand/reviewto review changes after completion. See Viewing and Reviewing Code Changes. - For significant changes, combine with Git commits and use rollbacks to restore when necessary. See Reverting Changes and Restoring Sessions.