Skip to content

Context Bundles

viamu edited this page Feb 28, 2026 · 2 revisions

πŸ“¦ Context Bundles

Context bundles let you package agent instructions as reusable Markdown directories instead of inlining everything in YAML.

steps:
  - name: "Plan"
    context: "contexts/planner"     # ← references a bundle

πŸ“ Directory Structure

contexts/planner/
β”œβ”€β”€ CONTEXT.md                  # General instructions (loaded first)
β”œβ”€β”€ agents/
β”‚   └── architect.md            # Agent definition with frontmatter
└── skills/
    └── plan-format/
        └── SKILL.md            # Additional skill instructions

πŸ“ Agent Frontmatter

Agent .md files support YAML frontmatter for configuration:

---
model: claude-opus-4-6
tools: Read, Grep, Glob
maxTurns: 1
prompt: "Analyze and plan the following task:\nTask: {{task}}"
---

# Software Architect

You are a senior software architect...

The Markdown body becomes the system prompt. Frontmatter fields override pipeline-level settings.

Frontmatter Field Maps To
model Step model override
tools allowed_tools
maxTurns max_turns
prompt Step prompt

πŸ”’ Loading Priority

When a context bundle is loaded, values are resolved in this order:

graph TD
    A["1️⃣ Agent frontmatter<br/>(agents/*.md)"] --> B["2️⃣ Pipeline YAML step config"]
    B --> C["3️⃣ Pipeline YAML global settings"]
    style A fill:#2d5016,color:#fff
Loading

Note

First defined wins β€” agent frontmatter takes highest priority.

🧬 CodeGenesis

🏠 Home


πŸ“˜ Guides

πŸ“‹ Pipeline

πŸ”§ Internals


CI

Clone this wiki locally