AI-Assisted Development#
This project ships first-class support for AI coding agents. A shared instruction set in .agents/ drives every
supported tool — Claude Code, Cursor, GitHub Copilot, Windsurf, Cline, Gemini CLI, Google Antigravity, and OpenAI
Codex — so all agents follow the same rules, patterns, and commands regardless of which editor you use.
Best Practices#
Context Management#
AI agent sessions degrade when the context window fills up — the model loses track of earlier details and responses
become less accurate. Most agents support some form of context compaction (Claude Code uses /compact, Cursor uses
/summarize). The principle is the same regardless of tool: compact early, compact often.
This project’s Claude Code config demonstrates this with two safety nets, but the reasoning applies to any agent:
Auto-compact at 80% — when context usage hits 80%, the agent automatically compresses the conversation history. This is a hard safety net.
Manual compact at 50% — the recommended practice: compact when you’re roughly halfway through the context window. Compacting at 50% preserves more useful context in the summary than waiting for the auto-compact threshold, because the model has more room to write a thorough summary. Waiting until 80% means the summary must be more aggressive, losing detail.
Why 50% matters: After compaction, the agent replaces the full conversation with a compressed summary. The earlier you compact, the higher-quality that summary is — you retain more architectural decisions, debugging context, and in-progress reasoning.
Practical workflow:
Watch for context usage indicators (Cursor’s token counter, etc.)
At roughly 50% usage, look for a natural pause point and compact
If you’re mid-task with no good break point, it’s fine to continue — the auto-compact safety net will catch you
After compacting, briefly re-state any critical context the agent should keep in mind
One Task per Session#
Avoid cramming multiple unrelated tasks into a single agent session. Each task accumulates context — file reads, edits, tool output — and mixing concerns makes the conversation harder to summarize and easier to confuse. Start a fresh session for each distinct task (bug fix, feature, refactor). If a task naturally branches, that’s a good signal to compact or start fresh.
Let the Agent Use Commands#
You don’t need to memorize slash commands. Describe what you want naturally — “scaffold a new extension”, “bump versions
for my changes”, “run the tests for this extension” — and the agent will auto-dispatch the right command from
.agents/commands/. The slash command syntax (/create-extension, /kit-test, etc.) is a shortcut, not a requirement.
Inject Dynamic Context (Claude Code only)#
Use !`command` in your Claude Code prompt to inject the output of a shell command directly into the message. This
gives the agent real-time context without a separate tool call. For example:
/commit !`git diff`— runs the commit command with the current diff already in contextFix the errors in !`git diff --name-only`— tells the agent which files changedExplain !`git log --oneline -5`— feeds recent commit history into the prompt
This syntax is not available in Cursor or other agents at the moment.
Supported Agents#
Agent |
Entry point |
Import mechanism |
|---|---|---|
Claude Code |
|
|
Cursor |
|
Thin wrappers with |
GitHub Copilot |
|
Critical rules inline + pointers to |
Windsurf |
|
Critical rules inline (6K char/file limit, no imports) |
Cline |
|
|
Gemini CLI |
|
Thin pointer to |
Google Antigravity |
|
Shares entry point with Gemini CLI |
OpenAI Codex |
|
Lists commands, points to |
Aider |
(no repo file) |
User runs |
Every agent gets the same project context, code-style rules, engineering standards, and commands. Differences are limited to permission/trust boundaries (which live in each agent’s own config) and import syntax.
Primary Agent Surfaces#
The Toolkit team primarily uses Codex, Claude Code, and Cursor. The exact maintenance protocol lives in
.agents/rules/agent-config.md; this page is the human overview.
Surface |
Purpose |
|---|---|
|
Shared project instruction index |
|
Shared project context and resource pointers |
|
Canonical agent behavior rules |
|
Canonical multi-step procedures |
|
Shared Agent Skills wrappers that point to canonical commands or rules |
|
Canonical specialist role instructions |
|
Shared hook targets |
|
Portable helper launchers used by hooks or commands |
|
Codex, Antigravity, and other OpenAI-compatible entry point |
|
Claude Code entry point |
|
Cursor project rule wrappers |
|
Codex project config, hook config, and subagent wrappers |
|
Claude Code project settings, skills, and subagent wrappers |
|
Cursor hook config that invokes the shared |
|
Shared MCP server configuration |
Agent-specific files should stay thin. Put human-readable setup and rationale in docs_dev/; put agent behavior in
.agents/; put only the wrapper syntax required by each tool under .codex/, .claude/, or .cursor/.
Commands and Skills#
Full procedures live in .agents/commands/. These files are the source of truth for repeatable tasks such as creating
extensions, running Kit tests, committing, preparing MRs, adding pip dependencies, removing extensions, and bumping
extension changelogs.
Shared skill wrappers in .agents/skills/ expose those procedures to tools that support Agent Skills. Claude Code has
matching .claude/skills/ wrappers because Claude discovers project skills there. The wrappers should stay as aliases
to the canonical .agents/ files; do not copy the procedure text into tool-specific folders.
Describe the operation naturally (“create an extension”, “prepare an MR”, “run this extension’s tests”) or use the
slash/skill command if your tool exposes one. If behavior needs to change, edit the .agents/commands/ procedure or
the relevant .agents/rules/ file first, then update wrappers only when discovery changes.
Internal-only procedures live under .agents/commands/internal/ and are indexed from that directory’s README. They are
not listed in the public command tables or shared skill discovery unless a tool needs a deliberate internal wrapper.
Specialist Roles#
Specialist role instructions live in .agents/subagents/. Use them when a task matches the domain: documentation,
unit tests, E2E tests, USD, omni.ui, or review. Claude Code and Codex have tool-specific subagent wrappers that point
back to the same canonical role files. Cursor does not get duplicate role files unless a verified Cursor requirement is
documented in .agents/rules/agent-config.md.
Adding a New Agent#
To add support for a new AI coding tool:
Create an entry-point file in the repo root or tool-specific directory
Import or reference
.agents/instructions.mdusing the tool’s native syntaxAdd command wrappers if the tool supports slash commands
Add MCP server config if the tool supports MCP
Update
.agents/rules/agent-config.mdwith the new entryUpdate this page
See .agents/rules/agent-config.md for the full maintenance protocol.
How It Works#
MCP Servers#
Agents have access to Model Context Protocol servers that provide live API documentation and code search.
The MCP endpoints currently configured in this repo are NVIDIA-internal services. They may require NVIDIA network/VPN
access; external/public checkout users should expect those servers to be unavailable and use docs_dev/, official docs,
and repo patterns instead.
.mcp.json (project root) is the canonical MCP config. It follows the emerging cross-IDE standard and is read
directly by Claude Code (via enableAllProjectMcpServers). For tools that require their own config file, changes are
synced to:
File |
Tool |
|---|---|
|
Codex |
|
Cursor |
|
GitHub Copilot |
|
Windsurf |
When adding or removing an MCP server, edit .mcp.json first, then sync to the tool-specific files.