Documentation

Context Canvas Docs

Context Canvas is a source-first visual system for building Claude-compatible agent teams. Use these docs for model rules, relationship schema, build gate behavior, and export structure.

Quick Start

  1. Create a new team from /packs/new using a template or an empty bundle.
  2. Open the team in /canvas/[packId], select a source node, and add related nodes from Inspector.
  3. Create only schema-valid relationships between node types.
  4. Use Validate and Auto Fix Build Gate to keep exports compliant while you edit.
  5. Preview export output, then either create a GitHub pull request or download/import into a Claude Code project.

FAQ (Ask an Agent)

Use these question patterns when you want an assistant to guide setup, modeling, and export decisions.

What problem does Context Canvas solve?

It prevents prompt sprawl and broken agent wiring. You model agent structure visually, enforce valid relationships with a build gate, and export deterministic `.claude` files you can review, diff, and audit.

What is the fastest way to use this app for a real project?

Create a team from template, open it in Canvas, edit nodes and edges for your domain, run Validate/Auto Fix, then export. Either open a GitHub pull request directly or download the zip and commit it in your Claude Code repo.

Should I start from a template or an empty team?

Use a template when your workflow resembles an existing pattern (security review, incidents, feature implementation, migration). Start empty only when your process is materially different from available templates.

How do I reduce prompt size without losing capability?

Move repeated instructions into shared SKILL and POLICY nodes, keep AGENT_CLASS prompts concise, and compose behavior through typed edges instead of copying long sections across agents.

How does Canvas help humans while exports help machines?

Canvas is for human review of structure and intent. Export output is machine-ready for Claude Code (`.claude/agents`, `.claude/skills`, `.claude/rules`, settings files), so runtime usage is file-based and deterministic.

How do I know my team is valid before I export?

Run the build gate. It checks allowed edge pairings, cycle constraints, and Claude export compliance. Fix flagged issues in Inspector, then revalidate until the team is clean.

How do I apply an export to an existing Claude Code repo?

Choose one of two paths: create a GitHub pull request directly from Context Canvas, or download the zip and merge generated files into your repo. Review diffs and treat generated files like source.

Data Model

Core OO Atom Types

These nodes define executable structure and configuration.

AGENT_CLASSSKILLSETTING

Knowledge Atom Types

These nodes provide contextual guidance, policy references, and traceability.

FACTDECISIONTASKARTIFACTPOLICYSNIPPET

Relationship Schema

LabelAllowed PairRationaleConstraints
EXTENDSAGENT_CLASS -> AGENT_CLASSInheritance specializes one agent from another, so both endpoints must be agent classes.Multiple parent classes are allowed. EXTENDS graph must remain acyclic.
COMPOSESAGENT_CLASS -> SKILLComposition models an agent owning reusable capabilities, so it points from agent to skill.Composition is directional (owner -> capability).
REQUIRESSKILL -> SKILLSkill dependencies describe capability prerequisites, so dependencies are only between skills.REQUIRES graph must remain acyclic.
CONFIGURESSETTING -> AGENT_CLASS|SKILLSettings provide runtime configuration and can only configure executable nodes (agents/skills).Settings are attached, not inherited.
RELATEDANY -> ANYRELATED is a contextual linkage for knowledge traceability and should not replace OO structural edges.At least one endpoint must be a knowledge atom. Use only for context/policy linkage, not OO structure.

Build Gate

  • Relationship label/type compatibility by source and target node types
  • Acyclic requirements for EXTENDS and REQUIRES graphs
  • Self-edge prevention and invalid structural edge detection
  • Claude export compliance checks (naming, collisions, required metadata)
  • Deterministic inheritance and transitive dependency resolution

Export Map

Atom TypeExport TargetNotes
AGENT_CLASS.claude/agents/<slug>.mdMerged prompt sections + YAML frontmatter
SKILL.claude/skills/<slug>/SKILL.mdSkill instructions + frontmatter
POLICY.claude/rules/<slug>.md (when exportAsRule=true)Policy/rule export for Claude consumption
SETTING.claude/settings.json and/or .mcp.jsonPermissions, env, and MCP configuration
Knowledge AtomsCLAUDE.md sectionsContext and references merged into top-level guide

For machine-readable references and endpoint examples, use the API page at /apis.