Core Concepts
Understand skills, rules, domain context, agents, prompts, instructions, templates, registry, and governance.
Core Concepts
What is a Context Pack?
A Context Pack is the installable package that contains all AI context for a project, workflow, framework, or business domain.
It can contain:
- Skills
- Rules
- Domain context
- Prompts
- Instructions
- Agents
- Reference files
- UML-generated outputs
- Templates and variables
A published context pack is installed using:
ai-skill install rb-testcontext
What is a Skill?
A Skill is a task-specific instruction file that tells an AI IDE how to do a type of work.
Example skills:
- Build a Next.js page using the project architecture.
- Review a React component for accessibility.
- Generate API handlers using the backend conventions.
- Refactor code without changing public behavior.
- Add tests using the team’s testing style.
A skill should explain:
- When to use it
- What inputs it needs
- What steps to follow
- What output is expected
- Which rules and domain files it depends on
What is a Rule?
A Rule is a constraint the AI should not violate.
Rules can be:
- Architecture rules
- UI rules
- Security rules
- API rules
- Business rules
- Naming conventions
- Testing rules
- Accessibility rules
Example:
# Rule: Do not call APIs directly from client components
Use server actions or route handlers unless the feature explicitly requires client-side fetching.
Rules are useful because AI tools often produce generic code unless strict boundaries are supplied.
What is Domain Context?
Domain Context captures business meaning.
It tells the AI:
- Product vocabulary
- Entity definitions
- User roles
- Workflow states
- Bounded contexts
- Business invariants
- Exceptions and edge cases
Example domain concepts:
- Workspace
- Project
- Context Pack
- Published Version
- Registry Key
- CLI Sync
- Team Member
- Approval Flow
Good domain context prevents the AI from inventing incorrect product behavior.
What is an Instruction?
An Instruction is direct guidance for how the AI should behave during implementation.
Examples:
- Use existing components before creating new ones.
- Do not change the marketing site while editing admin pages.
- Keep server-only logic out of client components.
- Prefer typed helpers over inline object manipulation.
- Preserve current UI theme and spacing.
Instructions are usually more procedural than rules.
What is a Prompt?
A Prompt is a reusable command or request template.
Examples:
Create a CRUD page for {{entityName}} using the existing admin table pattern.
Review this file for security, accessibility, and maintainability issues.
Prompts are useful when teams repeatedly ask AI tools to perform the same work.
What is an Agent?
An Agent describes a role-based AI behavior.
Example agents:
- Frontend reviewer
- Backend architect
- Security reviewer
- QA test generator
- Migration planner
- Documentation writer
Agents should define:
- Responsibility
- Inputs
- Decision rules
- Output format
- Escalation cases
What is a Template Variable?
A Template Variable is a placeholder used inside prompts or generated markdown.
Examples:
{{projectName}}
{{entityName}}
{{apiBaseUrl}}
{{componentPath}}
{{targetIDE}}
Variables make context reusable without rewriting the same prompt for every project.
What is a Registry?
The Registry is where published context packs are discovered and installed from.
The CLI uses registry APIs to resolve:
ai-skill install rb-testcontext
to the latest published pack and its files.
What is CLI Sync?
CLI Sync is the process of pulling published context into a developer’s local AI IDE workspace.
It writes files into locations such as:
.cursor/skills.claude/skills.agents/skills.ai/skills
What is Governance?
Governance controls the lifecycle:
Draft → In Review → Approved → Published
Use governance to avoid unreviewed instructions spreading across the team.