Skip to content
This project is under active development and subject to breaking changes. See the changelog for release notes.

Extensibility

The framework is designed to be extended. Six mechanisms are available, each with different activation models, context costs, and complexity.

MechanismActivationContext CostSize
InstructionsDeterministic (file glob)Always loaded in scope< 50 lines
SkillsSemantic (description)On demand50-200 lines
AgentsExplicit (invocation)Isolated> 200 lines
HooksAutomatic (lifecycle)Zero (external)Any
MCP ServersPer tool callOn demandAny
Tool ExtensionsPer syncSame as base agentYAML patch
flowchart TD
  start["I need to add specific<br/>knowledge to the framework"]

  start --> q1{"Does the knowledge apply<br/>whenever a specific file<br/>type is edited?"}
  q1 -->|Yes| instruction["Instruction<br/>(applyTo: file glob)"]
  q1 -->|No| q2{"Is the knowledge<br/>reusable by<br/>multiple agents?"}

  q2 -->|Yes| q3{"Is it over 200 lines<br/>or needs its own tools?"}
  q3 -->|Yes| agent["Agent<br/>(specialized sub-agent)"]
  q3 -->|No| skill["Skill<br/>(loaded by relevance)"]

  q2 -->|No| q4{"Is it a deterministic<br/>post-action<br/>validation?"}
  q4 -->|Yes| hook["Hook<br/>(lifecycle script)"]
  q4 -->|No| q5{"Does it need access<br/>to an external system<br/>via API?"}
  q5 -->|Yes| q6{"Should existing plugin agents<br/>use these tools?"}
  q6 -->|Yes| toolext["Tool Extension<br/>(overlay generation)"]
  q6 -->|No| mcp["MCP Server<br/>(standalone config)"]
  q5 -->|No| agent2["Agent or Skill<br/>(depends on volume)"]

Path-scoped rules applied when editing matching files.

  • Use applyTo glob in frontmatter
  • Keep under 50 lines
  • Concise, actionable rules (not documentation)
  • One per artifact type

Example:

.github/instructions/python.instructions.md
---
applyTo: "**/*.py"
---
# Python - Project Conventions
- Type hints required on every public signature
- Domain errors inherit from `AppError` (src/core/errors.py)
- Async by default for I/O (httpx, asyncpg)
- Tests with pytest; shared fixtures in conftest.py
- Imports organized: stdlib, third-party, local
  • Directory.github/
    • Directoryinstructions/ (deterministic, by file glob)
    • Directoryskills/ (semantic, on demand)
      • Directoryresilience-patterns/
        • SKILL.md
    • Directoryagents/ (explicit invocation)
      • devsquad.implement-python.agent.md
    • Directoryplugins/devsquad/
      • Directoryhooks/ (lifecycle scripts)
        • hooks.json
    • Directorydevsquad/
      • Directorytool-extensions/ (MCP tool injection)