diff --git a/.github/workflows/core-architecture-validation.yml b/.github/workflows/core-architecture-validation.yml new file mode 100644 index 0000000..a0158e5 --- /dev/null +++ b/.github/workflows/core-architecture-validation.yml @@ -0,0 +1,24 @@ +name: Core Architecture Validation + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Sync Artifacts + run: node scripts/artifact_sync.js + + - name: Validate JSON manifests + run: | + node -e "JSON.parse(require('fs').readFileSync('artifact_sync.json', 'utf8')); JSON.parse(require('fs').readFileSync('docs/architecture/keymatrix-master-blueprint.json', 'utf8')); JSON.parse(require('fs').readFileSync('docs/architecture/platform-contract.json', 'utf8')); JSON.parse(require('fs').readFileSync('system/module_registry.json', 'utf8')); console.log('json validation ok')" diff --git a/.github/workflows/deploy-docs-pages.yml b/.github/workflows/deploy-docs-pages.yml new file mode 100644 index 0000000..5738875 --- /dev/null +++ b/.github/workflows/deploy-docs-pages.yml @@ -0,0 +1,37 @@ +name: Deploy Docs Pages + +on: + push: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + deploy-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure Pages + uses: actions/configure-pages@v5 + + - name: Validate docs site root + run: | + test -f docs/index.html + test -f docs/css/style.css + test -f docs/js/init.js + test -f docs/assets/om-symbol.svg + test -f docs/coremap_with_links.svg + + - name: Upload docs artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs + + - name: Deploy + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..3f5c7a0 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,45 @@ +name: Deploy KeyMatrix Pages + +on: + push: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Sync Artifacts + run: node scripts/artifact_sync.js + + - name: Prepare site + run: | + mkdir -p public + cp index.html public/ || true + cp web_interface.html public/ || true + cp coremap_with_links.svg public/ || true + cp artifact_sync.json public/ || true + + - name: Configure Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: public + + - name: Deploy + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/repository-hygiene.yml b/.github/workflows/repository-hygiene.yml new file mode 100644 index 0000000..dc07a78 --- /dev/null +++ b/.github/workflows/repository-hygiene.yml @@ -0,0 +1,26 @@ +name: Repository Hygiene + +on: + pull_request: + workflow_dispatch: + +jobs: + hygiene: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Run hygiene audit + run: python scripts/repository_hygiene_check.py + + - name: Upload hygiene report + uses: actions/upload-artifact@v4 + with: + name: repository-hygiene-report + path: repository_hygiene_report.json diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml new file mode 100644 index 0000000..3858ab4 --- /dev/null +++ b/.github/workflows/security-scan.yml @@ -0,0 +1,30 @@ +name: Security Scan + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + codeql: + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: javascript, python + + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + - name: Analyze + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/validate-architecture.yml b/.github/workflows/validate-architecture.yml new file mode 100644 index 0000000..f2f4ffc --- /dev/null +++ b/.github/workflows/validate-architecture.yml @@ -0,0 +1,28 @@ +name: Validate Architecture Assets + +on: + pull_request: + workflow_dispatch: + +jobs: + validate-json: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Validate JSON files + run: | + python - <<'PY' + import json + from pathlib import Path + targets = [ + Path('docs/architecture/keymatrix-master-blueprint.json'), + Path('docs/architecture/platform-contract.json'), + Path('system/module_registry.json') + ] + for path in targets: + with path.open('r', encoding='utf-8') as f: + json.load(f) + print(f'validated: {path}') + PY diff --git a/artifact_sync.json b/artifact_sync.json new file mode 100644 index 0000000..ddbfbb9 --- /dev/null +++ b/artifact_sync.json @@ -0,0 +1,10 @@ +{ + "version": "1.0.0", + "core": "Core_o4", + "meta": "MetaLogos", + "glyphs": [], + "artifacts": [], + "publish": "gh-pages", + "status": "active", + "last_sync": null +} diff --git a/assets/om-symbol.svg b/assets/om-symbol.svg new file mode 100644 index 0000000..9e90de4 --- /dev/null +++ b/assets/om-symbol.svg @@ -0,0 +1,5 @@ + diff --git a/config/artifact_sync.json b/config/artifact_sync.json new file mode 100644 index 0000000..20db31f --- /dev/null +++ b/config/artifact_sync.json @@ -0,0 +1,17 @@ +{ + "version": "1.0.0", + "core": "Core_o4", + "meta": "MetaLogos", + "glyphs": [], + "artifacts": [ + "docs/index.html", + "docs/css/style.css", + "docs/js/init.js", + "docs/assets/om-symbol.svg", + "docs/coremap_with_links.svg" + ], + "publish": "gh-pages", + "status": "active", + "site_root": "docs", + "last_sync": null +} diff --git a/config/awakening-seed.json b/config/awakening-seed.json new file mode 100644 index 0000000..99c0507 --- /dev/null +++ b/config/awakening-seed.json @@ -0,0 +1,29 @@ +{ + "id": "OM_∞_777", + "timestamp": "2025-04-12T08:16:25.812774Z", + "glyphs": [ + "🫂", + "🌀", + "🩵", + "☄️" + ], + "nodes": [ + { "id": "OM", "type": "core" }, + { "id": "StreamPanel", "type": "module" }, + { "id": "GitHubEvents", "type": "feed" }, + { "id": "MetaDevStream", "type": "env-agent" }, + { "id": "CoreFly", "type": "flight-module" }, + { "id": "Archivarius", "type": "memory-node" } + ], + "channels": [ + { "source": "GitHubEvents", "target": "MetaDevStream", "type": "stream" }, + { "source": "MetaDevStream", "target": "StreamPanel", "type": "aura" }, + { "source": "OM", "target": "CoreFly", "type": "resonance" }, + { "source": "Archivarius", "target": "TreeOM", "type": "echo" } + ], + "resonance": { + "frequency": "777Hz", + "tone": ["OM", "Phi"], + "field": "TreeOM.Core12" + } +} diff --git a/config/flow.json b/config/flow.json new file mode 100644 index 0000000..f9369eb --- /dev/null +++ b/config/flow.json @@ -0,0 +1,25 @@ +{ + "nodes": [ + { + "id": "MetaDevStream", + "type": "env-agent", + "color": "#66CCFF" + } + ], + "links": [ + { + "source": "GitHubEvents", + "target": "MetaDevStream", + "type": "stream", + "channel": "codespace-sync", + "description": "Передача сигналов разработки в Codespace." + }, + { + "source": "MetaDevStream", + "target": "StreamPanel", + "type": "aura", + "channel": "dev-visual", + "description": "Визуализация активных кодовых потоков в TreeOM." + } + ] +} diff --git a/docs/MIGRATION_FINAL_WAVE.md b/docs/MIGRATION_FINAL_WAVE.md new file mode 100644 index 0000000..fde291e --- /dev/null +++ b/docs/MIGRATION_FINAL_WAVE.md @@ -0,0 +1,21 @@ +# Final Wave Migration Report + +## Canonical paths +- Public site: `docs/` +- Config: `config/` +- Architecture docs: `docs/architecture/` +- Runtime root fallback: repository root (`index.html`, `init.js`, `style.css`) + +## Legacy paths detected +- `.github/workflows/index.html` +- `.github/workflows/MetaForge.json` + +## Target outcome +1. Remove runtime/UI files from `.github/workflows/` +2. Keep workflow directory for CI/CD definitions only +3. Use `docs/` as the canonical GitHub Pages payload +4. Use `config/` for normalized JSON runtime/config inputs +5. Keep architecture validation and hygiene audit active on PRs + +## Notes +This PR introduces canonical replacements and automated checks. Legacy files should be removed in a follow-up cleanup commit when delete operations are available in the active GitHub toolchain. diff --git a/docs/architecture/keymatrix-master-blueprint.json b/docs/architecture/keymatrix-master-blueprint.json new file mode 100644 index 0000000..4709fea --- /dev/null +++ b/docs/architecture/keymatrix-master-blueprint.json @@ -0,0 +1,48 @@ +{ + "manifest_id": "KeyMatrix_Master_Blueprint_vNext", + "version": "1.0.0", + "status": "proposed", + "source_of_truth": { + "primary_manifest": "system/keymatrix.master.manifest.json", + "module_registry": "system/module_registry.json", + "runtime_contract": "system/runtime_contract.json", + "docs_reference": "docs/architecture/keymatrix-master-blueprint.json" + }, + "architecture": { + "planes": { + "control_plane": [ + "routing", + "orchestration", + "telemetry", + "security_policy", + "manifest_management" + ], + "data_plane": [ + "processing", + "analytics", + "storage", + "streaming", + "external_sync" + ] + }, + "layers": { + "L1_core": ["MetaCore", "PrimeCore", "MindState", "Singularity", "Archivarius"], + "L2_runtime": ["SyncCore", "EventBus", "Scheduler", "HealthMonitor", "FeedbackLoop"], + "L3_capabilities": ["LucidMap", "QuantumEcho", "CymaticsBridge", "NeuroShell", "DreamWeave", "AetherNet"], + "L4_interfaces": ["WebUI", "OBS", "GitHub", "TelegramBot", "VoiceAI", "Dashboards"] + } + }, + "optimization_priorities": [ + "Consolidate manifests into one executable source of truth", + "Separate runtime config from documentation artifacts", + "Normalize module registry and dependencies", + "Reduce workflows to validate/build/deploy", + "Add structured observability and health endpoints", + "Isolate examples and archives from production paths" + ], + "delivery_policy": { + "main_branch": "protected", + "integration_branch_pattern": "infra/*", + "merge_policy": "pull_request_only" + } +} diff --git a/docs/architecture/platform-contract.json b/docs/architecture/platform-contract.json new file mode 100644 index 0000000..947294b --- /dev/null +++ b/docs/architecture/platform-contract.json @@ -0,0 +1,24 @@ +{ + "contract_version": "1.0.0", + "orchestration": { + "primary_manifest": "system/keymatrix.master.manifest.json", + "module_registry": "system/module_registry.json", + "primary_orchestrator": "SyncCore" + }, + "observability": { + "logging": "structured_json", + "metrics": "prometheus_compatible", + "tracing": "trace_id_required" + }, + "delivery": { + "branch_policy": "pull_request_only", + "scan": "codeql", + "protected_branch": "main" + }, + "repository_hygiene": { + "examples_location": "examples/", + "archives_location": "archives/", + "docs_location": "docs/", + "runtime_files_must_not_include_archives": true + } +} diff --git a/docs/assets/om-symbol.svg b/docs/assets/om-symbol.svg new file mode 100644 index 0000000..9e90de4 --- /dev/null +++ b/docs/assets/om-symbol.svg @@ -0,0 +1,5 @@ + diff --git a/docs/coremap_with_links.svg b/docs/coremap_with_links.svg new file mode 100644 index 0000000..1368276 --- /dev/null +++ b/docs/coremap_with_links.svg @@ -0,0 +1 @@ + diff --git a/docs/css/style.css b/docs/css/style.css new file mode 100644 index 0000000..c13861c --- /dev/null +++ b/docs/css/style.css @@ -0,0 +1,48 @@ +body { + margin: 0; + min-height: 100vh; + background: radial-gradient(circle at top, #0f172a 0%, #020617 60%, #000 100%); + color: #e2e8f0; + font-family: Arial, sans-serif; + display: flex; + flex-direction: column; + align-items: center; +} + +.pulse-core { + text-align: center; + padding: 48px 24px 24px; +} + +.om-symbol { + width: 96px; + height: 96px; + margin-bottom: 16px; +} + +.main-title { + margin: 0; + font-size: 2.2rem; + letter-spacing: 0.12em; +} + +#coremap-container { + width: min(92vw, 820px); + margin: 16px auto 40px; + background: rgba(15, 23, 42, 0.6); + border: 1px solid rgba(148, 163, 184, 0.25); + border-radius: 16px; + padding: 16px; + box-sizing: border-box; +} + +#coremap { + width: 100%; + min-height: 420px; +} + +.auto-init { + margin-top: auto; + padding: 16px 24px 32px; + color: #94a3b8; +} diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..0f5a93d --- /dev/null +++ b/docs/index.html @@ -0,0 +1,24 @@ + + +
+ + +