OMNISKILL v3.0 β 6-Layer Architecture
Overview
OMNISKILL is built as a 6-layer stack where each layer has a single responsibility and strict boundaries. Control flows top-down (bootstrap β agents β skills), data flows bottom-up (artifacts β pipelines β users). Layer 5 (v3.0) wraps the entire runtime with enforced contracts β sessions, policy engine, telemetry, and MCP trust routing.
View original ASCII
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Layer 5: RUNTIME CONTRACTS (v3.0) β
β Sessions, policy, telemetry, replay, MCP β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Layer 4: ARTIFACT LAYER β
β Pipeline outputs, validated JSON, audit trails β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Layer 3: PIPELINE LAYER β
β sdd β ux β debug β skill-factory β full-product β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Layer 2: SKILL LAYER β
β 83 skills, each with manifest.yaml β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Layer 1: AGENT LAYER β
β 10 agents with guardrails & manifests β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Layer 0: BOOTSTRAP & DISCIPLINE β
β Hooks, synapses, anti-rationalization β
βββββββββββββββββββββββββββββββββββββββββββββββββββLayer 0: Bootstrap & Discipline
Directory: hooks/
Layer 0 fires before any agent starts. It establishes the cognitive discipline that prevents agents from going off-rails.
Hook System
| Hook | File | Fires When |
|---|---|---|
| Session Start | hooks/session_start.py |
Agent session begins |
| Pre-Step | hooks/pre_step.py |
Before each pipeline step |
| Post-Step | hooks/post_step.py |
After each pipeline step |
| On Failure | hooks/on_failure.py |
Any step fails |
| On Deviation | hooks/on_deviation.py |
Agent deviates from spec |
Bootstrap Sequence
When any OMNISKILL session starts, the following sequence executes:
View original ASCII
session_start hook
β
βββΊ Load core synapses from synapses/
β βββ anti-rationalization.md
β βββ sequential-thinking.md
β βββ metacognition.md
β
βββΊ Inject anti-rationalization rules
β βββ 10 Iron Laws activated
β
βββΊ Inject sequential thinking protocol
β βββ [THINKING] blocks required for complex tasks
β
βββΊ Inject metacognition synapse
βββ Complexity scaling activatedThe bootstrap is non-negotiable β no agent can bypass it. The session_start.py hook validates that all required synapses exist and are syntactically valid before allowing the session to proceed.
Why Layer 0 Exists
Without discipline enforcement, AI agents will: - Skip steps they consider "unnecessary" - Rationalize incomplete work as complete - Deviate from specifications mid-task
Layer 0 prevents all three by making discipline a system property, not a suggestion.
Layer 1: Agent Layer
Directory: agents/
Ten specialized agents, each with a single role and an agent-manifest.yaml that defines its guardrails.
| Agent | Role | Primary Skill Dependencies |
|---|---|---|
spec-writer |
Specification Architect | spec-writer skill |
implementer |
Implementation Engineer | implementer skill |
reviewer |
Compliance Reviewer | reviewer skill |
debugger |
Root-Cause Investigator | systematic-debugging |
ux-research |
UX Researcher | ux-research |
ui-design |
Visual Designer | ui-visual-design, frontend-design |
qa-master |
QA Engineer | qa-test-planner, e2e-testing-patterns |
context-curator |
Pipeline Handoff Curator | context-curator |
dissector |
Codebase Analyst | dissector skill |
Agent Manifest Structure
Each agent's agent-manifest.yaml contains:
name: implementer
role: Implementation Engineer
guardrails:
must-do:
- Follow spec section by section
- Write tests before implementation
- Verify each section compiles before proceeding
must-not:
- Skip sections marked as required
- Add features not in the spec
- Modify existing tests without justification
on-violation: halt-and-report
skills:
- implementer
- systematic-debugging
triggers:
- "implement the spec"
- "build from spec"
Agent β Skill Relationship
Agents invoke skills; skills are never invoked directly by users. This separation ensures that skills always run within the guardrail context of an agent.
View original ASCII
User Request
β
βΌ
Agent (guardrails active)
β
βββΊ Skill A (focused capability)
βββΊ Skill B (focused capability)
βββΊ Skill C (focused capability)
β
βΌ
Validated OutputLayer 2: Skill Layer
Directory: skills/
83 skills, each a self-contained capability with a manifest.yaml. Skills contain the actual domain knowledge β how to write React components, how to debug GDScript, how to design wireframes.
Skill Manifest Format
name: react-best-practices
description: React development guidelines with hooks, patterns, and optimization
version: 1.0.0
triggers:
- React component
- React hooks
- React performance
platforms:
- copilot-cli
- cursor
- claude-code
Skill Bundles
Skills are grouped into installable bundles for common workflows:
View original ASCII
godot-kit β 5 Godot skills
web-dev-kit β 5 web development skills
ux-design-kit β 7 UX/UI skills
django-kit β 4 Django skills
sdd-kit β 6 spec-driven development skills
testing-kit β 4 testing skills
mobile-kit β 2 mobile skills
meta-kit β 5 meta/tooling skillsInstall a bundle: python scripts/install.py --bundle web-dev-kit
Layer 3: Pipeline Layer
Directory: pipelines/
Eight orchestrated workflows that chain agents together with context curation between steps.
Pipeline State Machine
View original ASCII
ββββββββββββ
β pending β
ββββββ¬βββββββ
β validate
ββββββΌβββββββ
β validating β
ββββββ¬βββββββ
β execute
ββββββΌβββββββ ββββββββββββ
β executing ββββββΊβ paused β
ββββββ¬βββββββ ββββββ¬ββββββ
β β resume
ββββββΌββββββββββββββββββΌββββββ
β step loop β
ββββββ¬βββββββ¬βββββββ¬ββββββββββ
β β β
ββββββΌβββ βββΌβββββ ββΌββββββββββ
βcompletedβ βfailedβ βcancelled β
ββββββββββ ββββββββ ββββββββββββPipeline Execution
The PipelineExecutor in src/omniskill/core/pipeline_engine.py drives all pipelines. Each step:
- Runs
pre_step.pyhook (validates prerequisites) - Invokes the designated agent
- Runs
post_step.pyhook (validates outputs) - Curates context for the next step via
context-curator
Available Pipelines
| Pipeline | Steps |
|---|---|
| sdd | spec-writer β context-curator β implementer β context-curator β reviewer |
| ux | research β context-curator β wireframe β context-curator β visual β review β handoff |
| debug | debugger β context-curator β implementer β tester β reviewer |
| skill-factory | prompt β spec β context-curator β implement β validate β review |
| full-product | ux-pipeline β context-curator β sdd-pipeline β testing |
Layer 4: Artifact Layer
Pipeline outputs are validated and persisted as structured artifacts.
Artifact Validation
The ArtifactValidator checks every pipeline output against its schema:
- expected_artifacts β which files must exist
- required_sections β which headings must appear
- min_word_count β minimum content length
Persistence
Pipeline state is persisted at:
~/.copilot/.omniskill/pipeline-states/
βββ sdd-pipeline-<id>.json
βββ ux-pipeline-<id>.json
βββ ...
Each state file is human-readable JSON containing: - Current step and status - Accumulated decisions, constraints, and tech stack - Artifact paths and validation results - Thinking traces for audit
Why JSON?
Artifacts are JSON (not binary) so that:
1. Humans can inspect pipeline state at any time
2. Agents can resume from any checkpoint
3. Version control can track changes
4. Debugging is straightforward β cat the state file
Cross-Layer Data Flow
User: "build feature X from scratch"
β
βΌ
Layer 0: Bootstrap fires, synapses loaded
β
βΌ
Layer 3: Pipeline engine selects sdd-pipeline
β
βββΊ Layer 1: spec-writer agent activated
β βββΊ Layer 2: spec-writer skill invoked
β βββΊ Layer 4: spec artifact produced
β
βββΊ Layer 1: context-curator curates handoff
β
βββΊ Layer 1: implementer agent activated
β βββΊ Layer 2: implementer skill invoked
β βββΊ Layer 4: code artifact produced
β
βββΊ Layer 1: context-curator curates handoff
β
βββΊ Layer 1: reviewer agent activated
βββΊ Layer 2: reviewer skill invoked
βββΊ Layer 4: review report produced
Every transition between agents passes through the context-curator to ensure only relevant context propagates forward β preventing context bloat and token waste.
Layer 5: Runtime Contracts (v3.0)
Directory: src/omniskill/core/ (v3 modules)
Layer 5 wraps the entire runtime with enforced contracts. No tool executes without a policy decision, no session transitions without state machine validation, and no completion claim without evidence.
Session Lifecycle
The SessionManager enforces an 8-state lifecycle with strict transition rules. Invalid transitions raise InvalidTransitionError.
Every event is logged with a correlation ID that links sessions to pipeline traces.
Central Policy Engine
The PolicyEngine gates every tool invocation through 4 checks:
- Schema validation β tool arguments checked against registered schemas
- Permission rules β evaluated in order, first match wins
- Trust tier precedence β builtin > verified > community > untrusted
- Decision artifact β machine-readable
PolicyDecisionwith rationale
Default action is deny β tools must have an explicit allow rule. Denied decisions are queryable from the audit log.
Telemetry & Replay
The TelemetryCollector normalizes all events to versioned envelopes:
TelemetryEnvelope:
envelope_id: tel-xxxxxxxxxxxx
schema_version: 3.0.0
event_type: policy_decision | session_start | ...
correlation_id: corr-xxxxxxxxxxxx
source: {component, session_id, pipeline_name, step_name}
payload: {...}
retention_class: standard | audit
The ReplayHarness captures session snapshots and compares checksums for determinism β timestamps are excluded so structure-only comparison works across environments.
MCP Trust Routing
The MCPConnectorManager routes to MCP servers by capability and trust tier:
- Connectors register with trust tier and capabilities
- Routing selects the highest-trust healthy connector for a capability
- Unhealthy connectors are excluded automatically
- Routing is deterministic (same inputs β same output)
v3 Contract Schemas
Six new schemas define the wire format for all v3 contracts:
| Schema | Purpose |
|---|---|
session.schema.yaml | Session lifecycle states and transitions |
tool-invocation.schema.yaml | Tool call with required policy decision |
permission.schema.yaml | Permission rules with trust tiers |
hook-event.schema.yaml | Normalized hook bus events |
telemetry-envelope.schema.yaml | Versioned telemetry format |
context-handoff.schema.yaml | Phase handoff with pinned constraints and evidence |
Release Gates
The ReleaseGateValidator validates 6 hard gates before any release:
| Gate | What It Checks |
|---|---|
| SchemaAndContracts | All v3 schemas present and version 3.x |
| PolicyAndSecurity | Policy engine and permission schema present |
| ReplayDeterminism | Telemetry module and replay tests present |
| ContextIntegrity | Handoff schema enforces pinned_constraints and evidence_links |
| PromptQuality | Prompt files present, schema validator functional |
| MigrationReadiness | Migration dry-run passes with zero blockers |
All 6 must pass and the weighted score must reach 90+ for a GO recommendation.
v3 is fully backward compatible β all v2 skills, agents, pipelines, and schemas continue to work without modification. See the Migration v3 Guide for upgrade details.