WisdomEye Logo
WisdomEye

QuadCode: Practical Tips for AI-Powered Coding

Summary

This video provides practical tips and tricks for using QuadCode, an agentic AI assistant for building features and writing code. It emphasizes QuadCode's compatibility with existing workflows and various IDEs. Key recommendations include starting with codebase Q&A for onboarding, using QuadCode for code editing with a brainstorm-first approach, enabling iteration with feedback tools, and providing extensive context through ClaudeMD files and other methods. Advanced users can leverage the SDK for CI/CD pipelines and explore multimodal capabilities, with a focus on enhancing productivity through these AI-assisted coding practices.

Key Insights

QuadCode is an agentic AI assistant for building features, writing entire files, and fixing bugs.

Unlike AI assistants that complete code line-by-line, QuadCode is designed to be fully agentic, enabling it to build entire features, write complete files, and fix complex bugs autonomously. It aims to assist in larger, more comprehensive coding tasks.

Starting with codebase Q&A is the recommended onboarding method for new users.

For new users or teams, the primary recommendation is to begin with codebase Q&A. This involves asking questions about the codebase, which helps users learn how to prompt effectively and understand QuadCode's capabilities without immediately diving into code editing.

QuadCode Q&A significantly reduces technical onboarding time from weeks to days.

At Anthropic, QuadCode has drastically cut down technical onboarding time for new hires from two-three weeks to two-three days by allowing them to ask questions directly to the AI instead of relying heavily on human colleagues.

Instruct QuadCode to brainstorm or make a plan before writing code to ensure desired outcomes.

To improve the accuracy of generated code, it's recommended to ask QuadCode to brainstorm or create a plan before it starts writing code. This 'think first' approach, achieved simply by asking it to plan, helps align the AI's output with user expectations.

Enable iteration by providing QuadCode with tools to check its work, like unit tests or screenshots.

QuadCode's ability to iterate and improve is significantly enhanced when given tools to check its work. Providing capabilities like writing unit tests, taking screenshots (via Puppeteer or simulators), allows the AI to self-correct and refine its output, leading to near-perfect results.

Sections

Introduction to QuadCode

QuadCode is an agentic AI assistant for building features, writing entire files, and fixing bugs.

Unlike AI assistants that complete code line-by-line, QuadCode is designed to be fully agentic, enabling it to build entire features, write complete files, and fix complex bugs autonomously. It aims to assist in larger, more comprehensive coding tasks.

QuadCode integrates seamlessly with existing developer tools and workflows.

QuadCode is designed to work with any IDE (VS Code, Xcode, JetBrains IDEs) and terminal environments, including local, remote SSH, and Tmux. Users do not need to change their existing workflow or tools to start using QuadCode, ensuring a less disruptive integration.

QuadCode offers a prompt-based interface for open-ended use as a powerful tool.

As a power tool, QuadCode provides a free-form interface with a prompt bar, allowing engineers to use it for various tasks without a prescribed workflow. Users are encouraged to find their own methods for leveraging its capabilities.


Getting Started and Setup

Basic setup includes enabling shift-enter for new lines and theming options.

To enhance usability, users can set up terminal features like enabling 'shift+enter' for new lines (avoiding backslashes) and changing themes (light/dark/custom) using slash commands.

Install the GitHub app to mention Claude on GitHub issues and pull requests.

A GitHub app can be installed via a terminal command, allowing users to mention Claude directly within GitHub issues and pull requests, integrating QuadCode's capabilities into the GitHub workflow.

Customize allowed tools to avoid frequent prompts and improve efficiency.

Users can customize the set of tools that QuadCode is allowed to use, which streamlines the workflow by eliminating the need to approve tool usage repeatedly for frequently used tools.

Utilize macOS dictation for speaking prompts to QuadCode, enhancing speed and ease of use.

On macOS, dictation can be enabled in system settings, allowing users to speak their prompts to QuadCode by double-tapping the dictation key. This is particularly helpful for formulating specific and detailed prompts without typing.


Core Use Case: Codebase Q&A

Starting with codebase Q&A is the recommended onboarding method for new users.

For new users or teams, the primary recommendation is to begin with codebase Q&A. This involves asking questions about the codebase, which helps users learn how to prompt effectively and understand QuadCode's capabilities without immediately diving into code editing.

QuadCode Q&A significantly reduces technical onboarding time from weeks to days.

At Anthropic, QuadCode has drastically cut down technical onboarding time for new hires from two-three weeks to two-three days by allowing them to ask questions directly to the AI instead of relying heavily on human colleagues.

Codebase Q&A operates locally without uploading or training on user code, ensuring privacy.

QuadCode's Q&A feature does not use any form of indexing or remote databases for user code. Code remains local, is not uploaded, and is not used to train generative models, providing a secure and private experience with no setup delay.

Ask specific questions about code usage, instantiation, and examples.

Users can ask detailed questions like 'how is this code used?' or 'how do I instantiate this thing?'. QuadCode goes beyond simple text search to find code examples and provide deeper, more useful answers than traditional documentation or search.

Leverage Git history analysis for context on function arguments and design decisions.

QuadCode can analyze Git history to explain why functions have numerous arguments, the rationale behind argument names, historical changes, and associated issues, providing valuable context that would otherwise require manual investigation.

Query GitHub issues and pull request context using web fetching capabilities.

QuadCode can utilize web fetching tools to access and summarize information from GitHub issues and pull requests, providing context relevant to the codebase or specific changes.

Automate weekly 'what I shipped' reports by querying Git logs.

Users can ask QuadCode to review their Git logs to generate a summary of shipped work for a specific period, which can then be easily copied into documentation or reports.


Code Editing and Interaction

Edit code by giving QuadCode tools like file editing, bash commands, and search.

After mastering Q&A, users can engage in code editing. QuadCode is equipped with tools for editing files, running bash commands, and searching files. It intelligently strings these tools together to explore code and make edits.

Instruct QuadCode to brainstorm or make a plan before writing code to ensure desired outcomes.

To improve the accuracy of generated code, it's recommended to ask QuadCode to brainstorm or create a plan before it starts writing code. This 'think first' approach, achieved simply by asking it to plan, helps align the AI's output with user expectations.

Use 'commit push PR' command for automated commit, push, and pull request creation.

A powerful command incantation, 'commit push PR', enables QuadCode to automatically create a commit, push it to a branch, create a new branch if necessary, and open a pull request on GitHub, intelligently inferring commit formats from history.

Enable iteration by providing QuadCode with tools to check its work, like unit tests or screenshots.

QuadCode's ability to iterate and improve is significantly enhanced when given tools to check its work. Providing capabilities like writing unit tests, taking screenshots (via Puppeteer or simulators), allows the AI to self-correct and refine its output, leading to near-perfect results.


Integrating Team Tools

Teach QuadCode to use team-specific bash or MCP tools by describing them.

To leverage team workflows, tell QuadCode about your team's specific bash or MCP tools. It can learn to use them, even understanding `--help` flags, and this configuration can be saved in a CloudMD file for persistence across sessions.

Provide QuadCode with access to your team's custom tools for seamless integration.

By informing QuadCode about the tools your team uses, it can employ them on your behalf. This is especially powerful when working with new codebases, as the AI can immediately utilize established team tooling.


Providing Context with ClaudeMD

Use ClaudeMD files to provide persistent context to QuadCode sessions.

ClaudeMD is a special markdown file that provides context. Placing it in the project root makes it automatically read at the start of every session. It can be shared with a team via source control.

Create local, untracked ClaudeMD for personal notes like common commands or architectural decisions.

A local ClaudeMD file, not checked into source control, can be used for personal notes, such as common bash commands, MCP tools, important files, or architectural decisions specific to an individual's workflow.

Nested ClaudeMD files are pulled in on-demand when QuadCode navigates to their directories.

ClaudeMD files can be placed in nested subdirectories. QuadCode will automatically pull these context files in when it starts working within those specific directories, providing relevant, localized context.

Enterprise ClaudeMDs can be managed centrally for consistent context across all projects.

For organizations, an enterprise ClaudeMD can be set up at a central location. This provides consistent context to all users across different codebases, managed centrally on their behalf.

Tune context by considering its purpose, audience, and update frequency for optimal performance.

Take time to tune context provided via ClaudeMD. Consider if it's for personal use, team sharing, on-demand, or always included. Proper tuning can dramatically improve QuadCode's performance.

Manage context hierarchy including ClaudeMD, slash commands, configs, and enterprise policies.

QuadCode supports a hierarchy of context management, including ClaudeMD, slash commands, personal configurations, team configs, global configs, and enterprise policies. This allows for fine-grained control over the information QuadCode uses.

Enterprise policies can manage shared slash commands, permissions, and block/allow lists for safety.

Enterprise policies allow central management of shared slash commands, auto-approval for specific bash commands, and blocking unsafe commands or URLs. This enhances both productivity and security across the team.

Configure MCP JSON files in codebases to prompt team-wide installation of necessary servers.

An MCP JSON file can be checked into a codebase to prompt all engineers working in that repository to install the required MCP servers, ensuring uniformity and proper setup across the team.

Use slash memory to view and edit different memory files, organizing QuadCode's knowledge.

The slash memory command allows users to view all loaded memory files (enterprise policies, user memory, project ClaudeMD, nested ClaudeMDs) and edit them. The pound sign (#) can be used to direct new memories to specific files.


Advanced Terminal Usage and Key Bindings

Use Shift + Tab to enter 'auto accept edits' mode for faster iteration.

Hitting Shift + Tab enters 'auto accept edits' mode, where code edits are automatically accepted (bash commands still require approval). This is useful for iterative tasks like writing unit tests, allowing edits to be accepted without manual confirmation.

Use the pound sign (#) to tell QuadCode to remember specific information or corrections.

Typing '#' followed by a message prompts QuadCode to remember that information, which is automatically incorporated into ClaudeMD. This is useful for correcting its behavior or reinforcing certain practices.

Use the exclamation mark (!) to drop down to bash mode for direct command execution.

An exclamation mark precedes a command to enter bash mode, executing the command locally. The command and its output are then added to the context window for QuadCode's awareness.

Press Escape to stop QuadCode's current action, allowing for mid-task redirection or correction.

Pressing Escape at any time stops QuadCode's current operation safely. Users can then provide new instructions, correct parts of an edit, or ask it to redo the task with modifications.

Hit Escape twice to jump back through the session's history.

Double-tapping Escape allows users to navigate back through the previous states or actions within the current session, providing a way to revert changes or review past steps.

Use 'resume' or '--continue' flags to start QuadCode sessions from where they left off.

When starting QuadCode, using the 'resume' or '--continue' flags allows users to pick up a previous session exactly where it was left, preserving the state and continuity of work.

Use Control + R to view the full output and context QuadCode is working with.

Control + R expands the view to show all the output and content within QuadCode's context window, providing transparency into what the AI can 'see' and process.


QuadCode SDK and Advanced Workflows

The QuadCode SDK (CLI) allows programmatic interaction with QuadCode for pipelines and automation.

The QuadCode SDK, accessible via the `-p` flag, functions like a Unix utility. It allows users to pass prompts, specify allowed tools, and receive output in formats like JSON or streaming JSON, enabling integration into CI/CD pipelines and other automated workflows.

Combine the SDK with other tools like Git and JQ for powerful data processing pipelines.

The SDK can be piped into and out of, allowing for complex combinations. For example, piping `git status` output into the SDK, processed by `jq`, creates versatile data manipulation workflows.

Use the SDK to process large datasets like logs from GCP buckets or Sentry CLI outputs.

The SDK can ingest large amounts of data from various sources, such as logs from GCP buckets or data from Sentry CLI. QuadCode can then analyze this data to identify interesting patterns or provide insights.

Advanced users run multiple parallel QuadCode sessions using SSH, Tmux, and Git worktrees.

Power users often run numerous QuadCode sessions in parallel. This involves techniques like using SSH, Tmux tunnels, multiple checkouts of the same repository, or Git worktrees to manage and isolate concurrent tasks.


Multimodal Capabilities and Design Choices

QuadCode is fully multimodal, accepting images via drag-and-drop, file paths, or copy-paste.

QuadCode fully supports multimodal input, including images. Users can drag and drop images into the terminal, provide file paths, or paste images directly. This enables use cases like creating UIs from mockups.

The CLI-based design avoids IDE lock-in and anticipates rapid model evolution.

QuadCode was built as a command-line tool rather than an IDE plugin to work universally across all IDEs and become a common denominator. This approach also future-proofs the tool by avoiding heavy UI investment, anticipating that models may soon make current IDE interfaces less relevant.

QuadCode is extensively used internally at Anthropic for ML tasks and research.

Within Anthropic, QuadCode is used daily by researchers and engineers for machine learning tasks, including editing and running notebooks via tools like the notebook tool. Approximately 80% of technical staff use QuadCode daily.


Safety and Security

Balancing safety and productivity in bash command execution is a key challenge.

Making bash commands safe without hindering productivity is a complex challenge. Manually approving every command is inefficient, so QuadCode uses read-only command distinctions, static analysis, and a tiered permission system to balance safety and speed.


Ask a Question

*Uses 1 Wisdom coin from your coin balance

Watch Post / Video

WisdomEye Avatar
Got a minute?