⚑ OMNISKILL v3.0 Documentation

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.

block-beta columns 1 block:L5["Layer 5: RUNTIME CONTRACTS (v3.0)\nSessions, policy engine, telemetry, replay, MCP routing"]:1 end block:L4["Layer 4: ARTIFACT LAYER\nPipeline outputs, validated JSON, audit trails"]:1 end block:L3["Layer 3: PIPELINE LAYER\nsdd | ux | debug | skill-factory | full-product"]:1 end block:L2["Layer 2: SKILL LAYER\n83 skills, each with manifest.yaml"]:1 end block:L1["Layer 1: AGENT LAYER\n10 agents with guardrails & manifests"]:1 end block:L0["Layer 0: BOOTSTRAP & DISCIPLINE\nHooks, synapses, anti-rationalization"]:1 end style L5 fill:#E91E63,color:#fff,stroke:#AD1457 style L4 fill:#4CAF50,color:#fff,stroke:#388E3C style L3 fill:#2196F3,color:#fff,stroke:#1565C0 style L2 fill:#FF9800,color:#fff,stroke:#E65100 style L1 fill:#9C27B0,color:#fff,stroke:#6A1B9A style L0 fill:#F44336,color:#fff,stroke:#C62828
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:

flowchart TD A["πŸš€ session_start hook"] --> B["Load core synapses"] B --> B1["anti-rationalization.md"] B --> B2["sequential-thinking.md"] B --> B3["metacognition.md"] A --> C["Inject anti-rationalization rules"] C --> C1["10 Iron Laws activated"] A --> D["Inject sequential thinking protocol"] D --> D1["[THINKING] blocks required"] A --> E["Inject metacognition synapse"] E --> E1["Complexity scaling activated"] style A fill:#F44336,color:#fff style B fill:#FF9800,color:#fff style C fill:#FF9800,color:#fff style D fill:#FF9800,color:#fff style E fill:#FF9800,color:#fff
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 activated

The 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.

flowchart TD U["πŸ‘€ User Request"] --> AG["πŸ€– Agent\n(guardrails active)"] AG --> S1["Skill A\n(focused capability)"] AG --> S2["Skill B\n(focused capability)"] AG --> S3["Skill C\n(focused capability)"] S1 --> O["βœ… Validated Output"] S2 --> O S3 --> O style U fill:#607D8B,color:#fff style AG fill:#9C27B0,color:#fff style S1 fill:#FF9800,color:#fff style S2 fill:#FF9800,color:#fff style S3 fill:#FF9800,color:#fff style O fill:#4CAF50,color:#fff
View original ASCII
User Request
    β”‚
    β–Ό
Agent (guardrails active)
    β”‚
    β”œβ”€β–Ί Skill A (focused capability)
    β”œβ”€β–Ί Skill B (focused capability)
    └─► Skill C (focused capability)
    β”‚
    β–Ό
Validated Output

Layer 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:

stateDiagram-v2 [*] --> pending pending --> validating : validate validating --> executing : execute executing --> paused : pause/deviation paused --> executing : resume executing --> completed : all steps done executing --> failed : unrecoverable error executing --> cancelled : user cancel state executing { [*] --> step_loop step_loop --> step_loop : next step }
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 skills

Install 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

flowchart TD U["πŸ‘€ User: build feature X"] --> L0["Layer 0: Bootstrap fires"] L0 --> L3["Layer 3: Pipeline selects sdd-pipeline"] L3 --> SW["Layer 1: spec-writer agent"] SW --> SWS["Layer 2: spec-writer skill"] SWS --> SWA["Layer 4: spec artifact"] L3 --> CC1["Layer 1: context-curator curates"] L3 --> IM["Layer 1: implementer agent"] IM --> IMS["Layer 2: implementer skill"] IMS --> IMA["Layer 4: code artifact"] L3 --> CC2["Layer 1: context-curator curates"] L3 --> RV["Layer 1: reviewer agent"] RV --> RVS["Layer 2: reviewer skill"] RVS --> RVA["Layer 4: review report"] style U fill:#607D8B,color:#fff style L0 fill:#F44336,color:#fff style L3 fill:#2196F3,color:#fff style SW fill:#9C27B0,color:#fff style IM fill:#9C27B0,color:#fff style RV fill:#9C27B0,color:#fff style CC1 fill:#00BCD4,color:#fff style CC2 fill:#00BCD4,color:#fff style SWS fill:#FF9800,color:#fff style IMS fill:#FF9800,color:#fff style RVS fill:#FF9800,color:#fff style SWA fill:#4CAF50,color:#fff style IMA fill:#4CAF50,color:#fff style RVA fill:#4CAF50,color:#fff
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:

  1. Runs pre_step.py hook (validates prerequisites)
  2. Invokes the designated agent
  3. Runs post_step.py hook (validates outputs)
  4. 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.

stateDiagram-v2 [*] --> created created --> active : activate active --> waiting_tool : wait_for_tool active --> waiting_permission : wait_for_permission active --> idle : idle active --> error : fail active --> archived : complete waiting_tool --> active : resume waiting_permission --> active : resume idle --> active : resume error --> recovering : recover recovering --> active : resume

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:

  1. Schema validation β€” tool arguments checked against registered schemas
  2. Permission rules β€” evaluated in order, first match wins
  3. Trust tier precedence β€” builtin > verified > community > untrusted
  4. Decision artifact β€” machine-readable PolicyDecision with 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:

v3 Contract Schemas

Six new schemas define the wire format for all v3 contracts:

SchemaPurpose
session.schema.yamlSession lifecycle states and transitions
tool-invocation.schema.yamlTool call with required policy decision
permission.schema.yamlPermission rules with trust tiers
hook-event.schema.yamlNormalized hook bus events
telemetry-envelope.schema.yamlVersioned telemetry format
context-handoff.schema.yamlPhase handoff with pinned constraints and evidence

Release Gates

The ReleaseGateValidator validates 6 hard gates before any release:

GateWhat It Checks
SchemaAndContractsAll v3 schemas present and version 3.x
PolicyAndSecurityPolicy engine and permission schema present
ReplayDeterminismTelemetry module and replay tests present
ContextIntegrityHandoff schema enforces pinned_constraints and evidence_links
PromptQualityPrompt files present, schema validator functional
MigrationReadinessMigration 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.