Skip to content

Agent-Skill Architecture

Agents are specialists. Skills are tools agents load on demand.

Every task is routed to the right agent for its phase. That agent activates only the skills relevant to its work — not a global load of everything. This lazy loading keeps context windows lean and model costs predictable.

Key principle

Skills activate by task domain, not all at once. An orchestrator loads routing skills. A developer loads language-specific skills. A shipper loads deployment skills. No agent loads everything.

Project Context System

docs/project-context.md is the agent constitution — tech stack, conventions, anti-patterns, and testing approach. All agents load it at session start, before any task-specific context.

Session Start


Load docs/project-context.md   ← Always first


Load task-specific context


Route to agent

Without project-context.md, agents infer project conventions independently and make conflicting assumptions. With it, every agent shares the same ground truth.

Create or update it with:

/meow:docs-init    # generate from codebase analysis (new projects)
/meow:docs-sync    # diff-aware update after feature work

Task Flow

Task Received


Phase 0: Orient ──→ agent-detector scores all agents
     │                lazy-agent-loader loads winner

Phase 1: Plan ────→ planner loads: plan-creator, office-hours, plan-eng-review


Phase 2: Test RED ─→ tester loads: testing, lint-and-validate


Phase 3: Build ───→ developer loads: development, typescript/vue, clean-code


Phase 4: Review ──→ reviewer loads: review, cso, vulnerability-scanner


Phase 5: Ship ────→ shipper loads: ship, careful, document-release


Phase 6: Reflect ─→ documenter loads: documentation, memory
                    analyst loads: memory

Agent → Skills Mapping

AgentPhaseSkills Loaded
orchestrator0agent-detector, lazy-agent-loader, scout
planner1plan-creator, plan-ceo-review, plan-eng-review, office-hours
architect1plan-creator (ADR references)
tester2testing, lint-and-validate, qa, qa-manual
developer3development, typescript, vue, frontend-design, clean-code, docs-finder
reviewer4review, cso, vulnerability-scanner
security2, 4cso, vulnerability-scanner, skill-template-secure
shipper5ship, shipping, careful
documenter6documentation, document-release, llms
analyst0, 6memory
brainstormer1office-hours
journal-writer6memory

Skill Activation by Phase

Plan-First Gate Pattern

Most skills enforce a plan-first gate: before doing significant work they check that an approved plan exists.

Task arrives


Plan exists? ──No──→ Create plan ──→ ✋ Gate 1 (human approval)
     │                                       │
    Yes ◄──────────────────────────── Approved


Proceed with implementation

Skills that enforce this gate:

SkillGate behaviorSkip condition
meow:cookCreate plan if missingPlan path arg, --fast mode
meow:fixPlan if > 2 files--quick mode
meow:shipRequire approved planHotfix with human approval
meow:csoScope audit via plan--daily mode
meow:qaCreate QA scope docQuick tier
meow:reviewRead plan for contextPR diff reviews
meow:workflow-orchestratorRoute to plan-creatorFasttrack mode
meow:investigateProduces input FOR plansAlways skips
meow:office-hoursPre-planning skillAlways skips
meow:retroData-driven, no planAlways skips
meow:document-releaseScope from diffPost-ship sync

Why some skills skip the gate

meow:investigate and meow:office-hours produce planning input — they run before a plan exists by design. meow:retro is data-driven and has no implementation output to scope.

Step-File Architecture

Complex skills decompose into JIT-loaded step files instead of one monolithic SKILL.md:

skills/meow:review/
├── SKILL.md           # Entrypoint — metadata only, no workflow
├── workflow.md        # Step sequence definition
├── step-01-blind-review.md
├── step-02-edge-cases.md
├── step-03-criteria-audit.md
└── step-04-triage.md

Why step files?

  • Token efficiency — only the active step is in context, not the entire workflow
  • Auditability — each step produces a discrete artifact
  • Resumability — state persists to session-state/{skill-name}-progress.json; interrupted workflows resume from the last completed step

Rules:

  • One step at a time — never load multiple steps simultaneously
  • Never skip steps — even empty steps run quickly and preserve sequence integrity
  • Fix step files when wrong — don't work around them

Currently step-file enabled

SkillStepsWhat each step does
meow:review4Blind review → Edge cases → Criteria audit → Triage

Skills under 150 lines stay monolithic — step files add overhead only worth it for 3+ distinct phases.

Cross-Cutting Skills

Some skills activate across multiple phases rather than being owned by a single agent.

SkillActivates when
carefulAny phase with destructive commands
freezeAny phase — scopes a debug session
scoutPhase 0 + any exploration task
docs-finderAny phase needing up-to-date library docs
multimodalAny phase with visual content or images
session-continuationCross-session handoff required

WARNING

Cross-cutting skills are loaded by individual agents as needed — they are not globally pre-loaded. Loading them unconditionally would inflate every task's context cost.

Released under the MIT License.