# Config Domain Schema — Layer 2 Entity Type # KNO Schema Version: 0.0.8 # # Layer 2 domain schema for Config entities — YAML configuration files. # Supports docker-compose, GitHub Actions, Kubernetes, OpenAPI, and more. # # EXTENDS: None (config is distinct from document) # COMPOSES: identity-schema, history-schema, quality-schema (Layer 1) # ENABLES: Config instances in corpus imports # ============================================================================= # BASIC TIER (required per kno-spec.kno) # ============================================================================= $schema: kno@0.0.9 id: 01KGK3V73MWF15DYR4G5309EH7 slug: config-schema type: spec version: 0.0.1 # ============================================================================= # STANDARD TIER # ============================================================================= title: "Config Domain Schema" purpose: | Define the schema for Config entities — structured configuration files. A Config represents a YAML configuration artifact in various formats: - **docker-compose** — Container orchestration - **github-actions** — CI/CD workflows - **kubernetes** — K8s manifests - **openapi** — API specifications - **pre-commit** — Git hook configuration - **cloudformation** — AWS infrastructure - **ansible** — Automation playbooks - **helm** — Kubernetes package charts - **eslint/prettier** — Code formatting - **generic** — Other YAML configuration Configs are stored as .kno files with source content embedded and subtype-specific structure extracted for semantic querying. # ============================================================================= # RICH TIER — Taxonomy # ============================================================================= provenance: origin: id: 01KGK3V73MWF15DYR4G5309EH7 timestamp: "2026-02-04T01:47:56Z" tool: manual-migration taxonomy: topics: - configuration - infrastructure - devops - domain-schemas keywords: - config - yaml - docker - kubernetes - ci-cd - automation # ============================================================================= # RICH TIER — Relationships # ============================================================================= relationships: depends_on: - xri: "kno://specs/kno-spec" reason: "Conforms to KNO format specification v0.0.8" composes: - xri: "kno://specs/identity-schema" reason: "Layer 1: canonical_id, local_ids" - xri: "kno://specs/history-schema" reason: "Layer 1: _history, changelog" - xri: "kno://specs/quality-schema" reason: "Layer 1: quality, validation" related_to: - xri: "kno://specs/document-schema" reason: "Some configs have accompanying documentation" - xri: "kno://concepts/infrastructure-as-code" reason: "Many config subtypes are IaC" enables: - xri: "kno://content/configs/*" reason: "Config instance files" # ============================================================================= # RICH TIER — Quality # ============================================================================= quality: completeness: 0.85 last_reviewed: "2026-01-25" review_status: draft reviewed_by: "claude" # ============================================================================= # HISTORY (P9 Temporal) # ============================================================================= _history: retention: full format: changelog changelog: - version: "0.0.1" date: "2026-01-25" author: "claude" summary: "Initial config domain schema" changes: - "Created fresh for corpus import transformers" - "Supports 12 config subtypes (docker-compose, github-actions, etc.)" - "Includes subtype-specific extracted structure" - "Follows kno-spec v0.0.8 and kaml-spec v0.1.0" # ============================================================================= # SPECIFICATION CONTENT # ============================================================================= spec: status: Draft description: | ## Config Entity Structure A Config entity represents a YAML configuration file. The schema supports multiple config subtypes while maintaining the .kno structure. ### Dual-Layer Architecture Per bedrock, config entities have two complementary layers: | Layer | Field | Purpose | Bedrock Principle | |-------|-------|---------|-------------------| | **Source** | `source` | Original YAML preserved | REQ-04: Source Preservation | | **Semantic** | `structure.extracted` | Subtype-specific structure | REQ-03: Enhancement Over Source | The `source` field holds the original YAML content. The `structure.extracted` field holds parsed semantic data based on subtype. ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ CONFIG ENTITY STRUCTURE │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ BASIC TIER (required) │ │ ├── $schema: "config@0.1" │ │ ├── id: "docker-compose" │ │ ├── type: "config" │ │ └── version: "1.0.0" │ │ │ │ STANDARD TIER │ │ ├── title: "Docker Compose Configuration" │ │ └── purpose: "Container orchestration for local development" │ │ │ │ RICH TIER │ │ ├── taxonomy: { topics, keywords } │ │ ├── relationships: { conforms_to, format, inferred_from } │ │ └── quality: { completeness, review_status } │ │ │ │ DOMAIN FIELDS │ │ ├── subtype: "docker-compose" │ │ ├── source_format: "yaml" │ │ ├── source: "" │ │ ├── source_hash: "sha256:..." │ │ └── structure: │ │ ├── valid_yaml: true │ │ ├── root_type: "object" │ │ └── extracted: │ │ ├── services: [...] (docker-compose specific) │ │ ├── volumes: [...] │ │ └── networks: [...] │ │ │ │ PROVENANCE │ │ └── provenance: { source_path, imported_at, transformer_version } │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` subtypes: - id: docker-compose name: "Docker Compose" detection: "services key at root" extracted_fields: - services: "List of service definitions" - volumes: "Named volumes" - networks: "Network definitions" - id: github-actions name: "GitHub Actions" detection: "on and jobs keys" extracted_fields: - workflow_name: "Workflow name" - triggers: "Event triggers (push, pull_request, etc.)" - jobs: "Job definitions with steps" - id: kubernetes name: "Kubernetes Manifest" detection: "apiVersion and kind keys" extracted_fields: - api_version: "Kubernetes API version" - kind: "Resource kind" - metadata: "Resource metadata" - id: openapi name: "OpenAPI Specification" detection: "openapi or swagger key" extracted_fields: - version: "OpenAPI version" - info: "API information" - paths: "API endpoints" - components: "Reusable components" - id: pre-commit name: "Pre-commit Configuration" detection: "repos key with hooks" extracted_fields: - repos: "Repository hooks" - default_stages: "Default stages" - id: cloudformation name: "AWS CloudFormation" detection: "AWSTemplateFormatVersion key" extracted_fields: - template_version: "CloudFormation version" - resources: "AWS resources" - parameters: "Template parameters" - outputs: "Stack outputs" - id: ansible name: "Ansible Playbook" detection: "hosts or tasks key" extracted_fields: - hosts: "Target hosts" - tasks: "Task definitions" - roles: "Role references" - vars: "Variables" - id: helm name: "Helm Chart" detection: "Chart.yaml or values.yaml patterns" extracted_fields: - chart_name: "Chart name" - chart_version: "Chart version" - app_version: "Application version" - dependencies: "Chart dependencies" - id: yamllint name: "Yamllint Configuration" detection: "rules key with yaml-specific rules" extracted_fields: - extends: "Base configuration" - rules: "Linting rules" - id: eslint name: "ESLint Configuration" detection: "eslint patterns" extracted_fields: - extends: "Base configs" - rules: "ESLint rules" - plugins: "Plugins" - id: prettier name: "Prettier Configuration" detection: "prettier patterns" extracted_fields: - options: "Formatting options" - id: generic name: "Generic YAML" detection: "Fallback for unknown subtypes" extracted_fields: - root_keys: "Top-level keys" - structure_depth: "Nesting depth" field_definitions: - field: subtype type: string required: true description: "The specific configuration format (docker-compose, github-actions, etc.)" - field: source_format type: string required: true description: "Always 'yaml' for config entities" - field: source type: string required: true description: "Original YAML content (P4: Source Preservation)" - field: source_hash type: string required: true description: "SHA-256 hash of source for integrity verification" - field: structure type: object required: true description: "Parsed structure information" properties: - valid_yaml: "Whether the source is valid YAML" - root_type: "Type of root element (object, array)" - multi_document: "Whether source contains multiple YAML documents" - document_count: "Number of YAML documents" - extracted: "Subtype-specific extracted structure" - parse_error: "Error message if parsing failed" # ============================================================================= # KAML: Navigation Index # ============================================================================= _index: - path: "metadata" keywords: [config, schema, yaml, infrastructure] - path: "spec/subtypes" keywords: [docker-compose, github-actions, kubernetes, openapi] - path: "spec/field_definitions" keywords: [subtype, source, structure, extracted] # ============================================================================= # KAML: Contains Manifest # ============================================================================= contains: - xri: "#spec" role: section title: "Specification Content" keywords: [schema, structure, subtypes] - xri: "#spec/subtypes" role: section title: "Supported Subtypes" keywords: [docker, kubernetes, github, ansible] - xri: "#spec/field_definitions" role: section title: "Field Definitions" keywords: [fields, properties, types]