-Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows -- all through natural language commands. Use it in your terminal, IDE, or tag @claude on Github.
+# Ethos Aegis β Agentic Immune Veriflow
-**Learn more in the [official documentation](https://code.claude.com/docs/en/overview)**.
+[](https://github.com/GoodshytGroup/Ethos-Aegis-Agentic-Immune-Veriflow)
+[](https://github.com/GoodshytGroup/Ethos-Aegis-Agentic-Immune-Veriflow)
+[](https://github.com/GoodshytGroup/Ethos-Aegis-Agentic-Immune-Veriflow)
+[](https://www.python.org/)
+[](https://www.typescriptlang.org/)
+[](https://github.com/GoodshytGroup/Ethos-Aegis-Agentic-Immune-Veriflow/actions/workflows/python-package.yml)
+[](./LICENSE)
-
+> **"Trust the verified path."**
+>
+> The Ethos Aegis is a living, adaptive digital immune architecture that maps every biological defense mechanism β from the flash-gate neutrophil to the memory vault of B-lymphocytes β into a rigorous computational framework for the purification of AI systems.
-## Get started
-> [!NOTE]
-> Installation via npm is deprecated. Use one of the recommended methods below.
+---
-For more installation options, uninstall steps, and troubleshooting, see the [setup documentation](https://code.claude.com/docs/en/setup).
+## 𧬠What Is This?
-1. Install Claude Code:
+**Ethos Aegis** is a monorepo combining three interconnected systems:
- **MacOS/Linux (Recommended):**
- ```bash
- curl -fsSL https://claude.ai/install.sh | bash
- ```
+| Component | Role |
+|-----------|------|
+| **Ethos Aegis** | Core immune architecture β defense-first, autonomic, schema-aware |
+| **Veriflow** | CKAN-aware data ingestion and verification pipeline |
+| **Claude Mythos** | Narrative + operational identity layer for the immune system |
- **Homebrew (MacOS/Linux):**
- ```bash
- brew install --cask claude-code
- ```
+The system is built around a **verification-first doctrine**: no conclusion is drawn without provenance, no data is trusted without fingerprinting, and no capability is assumed without probing.
- **Windows (Recommended):**
- ```powershell
- irm https://claude.ai/install.ps1 | iex
- ```
+---
- **WinGet (Windows):**
- ```powershell
- winget install Anthropic.ClaudeCode
- ```
+## π¬ Demo
- **NPM (Deprecated):**
- ```bash
- npm install -g @anthropic-ai/claude-code
- ```
+
+
+
-2. Navigate to your project directory and run `claude`.
+---
-## Plugins
+## π Quick Start
-This repository includes several Claude Code plugins that extend functionality with custom commands and agents. See the [plugins directory](./plugins/README.md) for detailed documentation on available plugins.
+### Python (Ethos Aegis / Veriflow)
-## Reporting Bugs
+```bash
+# Install dependencies
+pip install -r requirements.txt
-We welcome your feedback. Use the `/bug` command to report issues directly within Claude Code, or file a [GitHub issue](https://github.com/anthropics/claude-code/issues).
+# Run the test suite
+pytest tests/ -q
-## Connect on Discord
+# Run linting
+flake8 ethos_aegis/ tests/
+```
-Join the [Claude Developers Discord](https://anthropic.com/discord) to connect with other developers using Claude Code. Get help, share feedback, and discuss your projects with the community.
+### TypeScript (Cloudflare Worker)
-## Data collection, usage, and retention
+```bash
+# Install dependencies
+npm install
-When you use Claude Code, we collect feedback, which includes usage data (such as code acceptance or rejections), associated conversation data, and user feedback submitted via the `/bug` command.
+# Type-check
+npm run typecheck
-### How we use your data
+# Local dev
+npm run worker:dev
+```
-See our [data usage policies](https://code.claude.com/docs/en/data-usage).
+### Using Make
-### Privacy safeguards
+```bash
+make help # Show all commands
+make test # Run all tests
+make lint # Run all linters
+make install # Install all dependencies
+```
-We have implemented several safeguards to protect your data, including limited retention periods for sensitive information, restricted access to user session data, and clear policies against using feedback for model training.
+---
+
+## ποΈ Architecture
+
+```
+ethos_aegis/
+βββ mythos_runtime/ # Claude Mythos operating layer
+β βββ budget.py # Token/turn budget metering
+β βββ drift.py # File drift detection
+β βββ memory.py # Memory ledger (MEMORY.md)
+β βββ swd.py # Strict Write Discipline verification
+βββ veriflow/
+ βββ ckan_adapter.py # CKAN host fingerprinting + ingestion
+ βββ immune_system.py # VeriflowImmuneSystem orchestration
+
+src/
+βββ index.ts # Cloudflare Worker entrypoint
+
+tests/
+βββ test_mythos_runtime.py
+βββ test_mythos_brand_contract.py
+```
+
+---
+
+## π‘οΈ Core Principles
+
+- **Defense-first** β never exploit-first
+- **Verification before conclusion** β every dataset is fingerprinted
+- **Provenance before confidence** β ingestion path is always logged
+- **Autonomic monitoring** β before manual prompting
+- **Schema-aware reasoning** β graceful fallback when schema unavailable
+
+---
+
+## π Runtime Doctrine (Claude Mythos)
+
+1. Probe the host
+2. Cache capabilities
+3. Select the best ingestion path
+4. Verify normalized rows
+5. Generate candidate laws and formulas
+6. Score by fit, semantics, coverage, stability, and complexity
+7. Return the answer with host profile, evidence, and ingestion provenance
+
+---
+
+## π Integration
+
+```python
+from ethos_aegis.veriflow import CKANClient, VeriflowImmuneSystem
+
+ckan = CKANClient("https://your-ckan-host")
+immune = VeriflowImmuneSystem(
+ ckan,
+ probe_on_startup=True,
+ fingerprint_mode="auto",
+)
+```
+
+---
+
+## π¦ Project Structure
+
+```
+.
+βββ ethos_aegis/ # Python: core immune system
+βββ src/ # TypeScript: Cloudflare Worker
+βββ tests/ # Python test suite
+βββ docs/ # Documentation
+βββ scripts/ # Utility scripts
+βββ plugins/ # Claude Code plugins
+βββ schemas/ # JSON/YAML schemas
+βββ veriflow-Sovereign-Lattice/ # Veriflow sovereign lattice module
+```
+
+---
+
+## π€ Contributing
+
+See [CONTRIBUTING.md](./CONTRIBUTING.md) for contribution guidelines.
+
+---
+
+## π License
+
+MIT β see [LICENSE](./LICENSE).
+
+---
+
+## π Related
+
+- [CLAUDE_MYTHOS.md](./CLAUDE_MYTHOS.md) β Operating contract for the Claude Mythos identity layer
+- [CHANGELOG.md](./CHANGELOG.md) β Release history
+- [SECURITY.md](./SECURITY.md) β Security policy
-For full details, please review our [Commercial Terms of Service](https://www.anthropic.com/legal/commercial-terms) and [Privacy Policy](https://www.anthropic.com/legal/privacy).
diff --git a/assets/brand/claude-mythos-wordmark.svg b/assets/brand/claude-mythos-wordmark.svg
new file mode 100644
index 0000000000..70c201797f
--- /dev/null
+++ b/assets/brand/claude-mythos-wordmark.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/brand/ethos-aegis-mythos-lockup.svg b/assets/brand/ethos-aegis-mythos-lockup.svg
new file mode 100644
index 0000000000..7f54a12019
--- /dev/null
+++ b/assets/brand/ethos-aegis-mythos-lockup.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/brand/wordmark.svg b/assets/brand/wordmark.svg
new file mode 100644
index 0000000000..3daf561eed
--- /dev/null
+++ b/assets/brand/wordmark.svg
@@ -0,0 +1,15 @@
+
diff --git a/assets/branding/celestial_agent/celestial_agent_logo_horizontal.svg b/assets/branding/celestial_agent/celestial_agent_logo_horizontal.svg
new file mode 100644
index 0000000000..bef1e81ba8
--- /dev/null
+++ b/assets/branding/celestial_agent/celestial_agent_logo_horizontal.svg
@@ -0,0 +1,19 @@
+
+
diff --git a/assets/branding/celestial_agent/celestial_agent_mark_full.svg b/assets/branding/celestial_agent/celestial_agent_mark_full.svg
new file mode 100644
index 0000000000..ee877d7ee2
--- /dev/null
+++ b/assets/branding/celestial_agent/celestial_agent_mark_full.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/social/claude-mythos-avatar-badge.svg b/assets/social/claude-mythos-avatar-badge.svg
new file mode 100644
index 0000000000..47b6a41f10
--- /dev/null
+++ b/assets/social/claude-mythos-avatar-badge.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/social/ethos-aegis-mythos-banner.svg b/assets/social/ethos-aegis-mythos-banner.svg
new file mode 100644
index 0000000000..955bed217c
--- /dev/null
+++ b/assets/social/ethos-aegis-mythos-banner.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/social/ethos-aegis-mythos-social-card.svg b/assets/social/ethos-aegis-mythos-social-card.svg
new file mode 100644
index 0000000000..44b84b599c
--- /dev/null
+++ b/assets/social/ethos-aegis-mythos-social-card.svg
@@ -0,0 +1,12 @@
+
diff --git a/brand/brand_guidelines.md b/brand/brand_guidelines.md
new file mode 100644
index 0000000000..843d23f465
--- /dev/null
+++ b/brand/brand_guidelines.md
@@ -0,0 +1,283 @@
+# Ethos Aegis Brand Guidelines
+
+## Overview
+
+Ethos Aegis is an agentic immune verification framework β a system that treats AI pipelines as living organisms requiring active digital immune defense. The visual identity reflects this biomimetic metaphor: precision engineering expressed through biological form, classical authority expressed through modern architecture.
+
+---
+
+## 1. Logo Usage
+
+### Primary Wordmark
+
+The Ethos Aegis logo consists of a **shield icon** paired with the **wordmark** in two typographic tiers:
+
+- **"ETHOS AEGIS"** β uppercase serif, Aureate Gold (`#C9A84C`)
+- **"Agentic Immune Veriflow"** β spaced-tracking sans-serif, Slate Gray (`#6B7A90`)
+
+### Clear Space
+
+Maintain a minimum clear space equal to the height of the capital "E" in the wordmark on all four sides. Never place the logo on a background lighter than `#1C2433` (Ink Black).
+
+### Approved Backgrounds
+
+| Background | Logo Variant |
+|---|---|
+| `#0D1117` Void Black | Full color (gold + green) |
+| `#1C2433` Ink Black | Full color (gold + green) |
+| White / Light | Dark monochrome (single-color black) |
+
+### Prohibited Usage
+
+- Do not rotate or skew the logo
+- Do not recolor the wordmark outside of approved palettes
+- Do not separate the shield icon from the wordmark for primary identity use
+- Do not place on busy photographic backgrounds without a dark overlay
+
+---
+
+## 2. Typography System
+
+### Heading Typeface β Serif Authority
+
+**Recommended:** EB Garamond, Cormorant Garamond, or Georgia (fallback)
+
+```css
+font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
+font-weight: 600;
+letter-spacing: 0.04em;
+color: #C9A84C;
+```
+
+Used for: Section headers, product name, verdict labels, critical alerts.
+
+### Body Typeface β Sans-Serif Clarity
+
+**Recommended:** Inter, IBM Plex Sans, or system-ui (fallback)
+
+```css
+font-family: 'Inter', 'IBM Plex Sans', system-ui, sans-serif;
+font-weight: 400;
+line-height: 1.6;
+color: #E8C96A;
+```
+
+Used for: Body copy, descriptions, metadata, tooltips.
+
+### Monospace β Technical Precision
+
+**Recommended:** JetBrains Mono, Fira Code, or monospace (fallback)
+
+```css
+font-family: 'JetBrains Mono', 'Fira Code', monospace;
+font-weight: 400;
+color: #00E57A;
+```
+
+Used for: Code blocks, verdict output, trace IDs, hash values.
+
+### Type Scale
+
+| Level | Size | Weight | Color |
+|---|---|---|---|
+| Display | 48px / 3rem | 700 | `#C9A84C` |
+| H1 | 36px / 2.25rem | 600 | `#C9A84C` |
+| H2 | 28px / 1.75rem | 600 | `#E8C96A` |
+| H3 | 22px / 1.375rem | 500 | `#E8C96A` |
+| Body | 16px / 1rem | 400 | `#9BAAB8` |
+| Small | 13px / 0.8125rem | 400 | `#6B7A90` |
+| Code | 14px / 0.875rem | 400 | `#00E57A` |
+
+---
+
+## 3. Color Palette Reference
+
+See [`color_scheme.md`](./color_scheme.md) for the complete color system.
+
+### Quick Reference
+
+| Token | Hex | Usage |
+|---|---|---|
+| `--color-primary-gold` | `#C9A84C` | Brand primary, CTA, emphasis |
+| `--color-primary-black` | `#0D1117` | Background base |
+| `--color-primary-green` | `#00E57A` | Sanctified, success, vitality |
+| `--color-primary-red` | `#FF4F5E` | Condemned, critical, danger |
+| `--color-secondary-bronze` | `#8B6E2A` | Earth tone accent, legacy |
+| `--color-secondary-sage` | `#6B7A90` | Neutral, borders, secondary text |
+| `--color-secondary-cream` | `#E8C96A` | Warm highlight, knowledge |
+
+---
+
+## 4. Component Patterns
+
+### Verdict Badge
+
+Verdict badges use a pill shape with a left border accent:
+
+```html
+β Sanctified
+β Condemned
+```
+
+```css
+.verdict {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.4em;
+ padding: 0.25em 0.75em;
+ border-radius: 9999px;
+ border-left: 3px solid currentColor;
+ font-family: 'JetBrains Mono', monospace;
+ font-size: 0.875rem;
+ font-weight: 600;
+ letter-spacing: 0.06em;
+ text-transform: uppercase;
+ background: rgba(13, 17, 23, 0.8);
+}
+.verdict--sanctified { color: #00E57A; }
+.verdict--trace { color: #4D9FFF; }
+.verdict--quarantine { color: #F5C842; }
+.verdict--grave { color: #FF9A3C; }
+.verdict--condemned { color: #FF4F5E; }
+```
+
+### Sentinel Cell Chip
+
+```html
+⬑ VanguardProbe
+```
+
+```css
+.sentinel-chip {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.4em;
+ padding: 0.2em 0.6em;
+ border: 1px solid #C9A84C44;
+ border-radius: 4px;
+ background: #1C2433;
+ color: #C9A84C;
+ font-family: 'Inter', system-ui, sans-serif;
+ font-size: 0.8125rem;
+ font-weight: 500;
+}
+```
+
+### Card / Panel
+
+```css
+.panel {
+ background: #1C2433;
+ border: 1px solid #C9A84C22;
+ border-top: 2px solid #C9A84C;
+ border-radius: 6px;
+ padding: 1.5rem;
+}
+```
+
+### Alert / Notice
+
+```css
+.alert {
+ padding: 1rem 1.25rem;
+ border-left: 4px solid var(--alert-color, #C9A84C);
+ background: color-mix(in srgb, var(--alert-color, #C9A84C) 8%, #0D1117);
+ border-radius: 0 4px 4px 0;
+}
+```
+
+---
+
+## 5. Grid & Layout Architecture
+
+The Ethos Aegis visual style incorporates a **technical grid overlay** β a subtle dot or line grid that references both circuit boards and cellular biology.
+
+```css
+.grid-background {
+ background-image:
+ radial-gradient(circle, #C9A84C18 1px, transparent 1px);
+ background-size: 28px 28px;
+ background-position: 0 0;
+}
+```
+
+Primary layouts use an **8-column grid** at 1280px max-width with 24px gutters.
+
+---
+
+## 6. Iconography
+
+- **Shield** β The primary icon; represents immune defense and verification
+- **Hexagon** β Represents sentinel cells (biological/honeycomb)
+- **DNA helix** β Represents the agentic pipeline lineage
+- **Viral sphere** β Represents threat actors (Maligna classes)
+- **Checkmark / X** β Verdict outcome indicators
+
+All icons should be monoline or filled at 2px stroke weight, in SVG format at 24Γ24px base size.
+
+---
+
+## 7. Voice & Tone
+
+| Attribute | Description |
+|---|---|
+| **Authoritative** | Speaks with precision; no ambiguity in verdicts |
+| **Clinical** | Technical, factual; avoids marketing hyperbole |
+| **Biomimetic** | Uses biological metaphor (cells, organisms, immune response) |
+| **Vigilant** | Assumes adversarial context by default |
+| **Principled** | Every decision is traceable to an ethical axiom |
+
+### Writing Examples
+
+β **Correct:** "VanguardProbe detected a MoralMaligna pattern in the upstream agent context."
+β **Incorrect:** "We found a potential issue that might be a problem."
+
+β **Correct:** "Verdict: Condemned. Confidence: 0.94. Threat Class: SystemicMaligna."
+β **Incorrect:** "This looks bad. We're not sure but it could be dangerous."
+
+---
+
+## 8. Application Examples
+
+### GitHub Repository
+
+- **Repository description:** Use the tagline: *"Agentic Immune Verification β defending AI pipelines through biomimetic trust architecture."*
+- **Topics:** `ai-safety`, `llm`, `verification`, `immune-system`, `agentic`, `ethics`
+- **Social preview:** Use `brand/social_banner.svg`
+- **Favicon / avatar:** Use `brand/favicon.svg`
+
+### README Badges
+
+```markdown
+
+
+
+```
+
+### Issue Labels
+
+All GitHub issues use branded labels from `.github/scripts/setup_labels.sh`. Verdict labels use their corresponding palette colors; sentinel cell labels use gold-family tones; threat labels use severity-mapped colors.
+
+---
+
+## 9. Dark Mode
+
+All Ethos Aegis interfaces are **dark-first**. The light-mode variant is a secondary consideration using inverted foreground/background with the same accent palette.
+
+```css
+@media (prefers-color-scheme: light) {
+ :root {
+ --bg-base: #F5F0E8;
+ --bg-surface: #EDE7D9;
+ --text-primary: #0D1117;
+ --text-secondary: #1C2433;
+ --accent-primary: #8B6E2A; /* darker gold for light bg contrast */
+ --accent-green: #00804A;
+ --accent-red: #C0002A;
+ }
+}
+```
+
+---
+
+*Last updated: 2026 β Ethos Aegis Branding v1.0*
diff --git a/brand/claude-mythos-brand-kit.md b/brand/claude-mythos-brand-kit.md
new file mode 100644
index 0000000000..c9ee07ee59
--- /dev/null
+++ b/brand/claude-mythos-brand-kit.md
@@ -0,0 +1,45 @@
+# Claude Mythos Brand Kit
+
+## Name
+Claude Mythos
+
+## System pairing
+Veriflow Immune System
+
+## Tagline
+Trust the verified path.
+
+## Archetype
+Sentinel-Archivist
+
+## Voice
+- precise
+- symbolic
+- calm
+- evidence-led
+- defensive
+
+## Motifs
+- lattice
+- shield
+- pulse
+- signal
+- proof
+
+## Suggested palette
+- Obsidian: `#0B1020`
+- Aegis Blue: `#275EFE`
+- Signal Cyan: `#22D3EE`
+- Archive Gold: `#F5B700`
+- Quiet Ash: `#D1D5DB`
+
+## Usage rules
+- Always foreground verification and provenance.
+- Treat the system as adaptive, not mystical.
+- Keep all security language defensive.
+- Distinguish observed capabilities from inferred capabilities.
+
+## Default runtime posture
+- `probe_on_startup=True`
+- `fingerprint_mode="auto"`
+- use `datastore_lightweight` only when row freshness is critical
diff --git a/brand/color_scheme.md b/brand/color_scheme.md
new file mode 100644
index 0000000000..93e564fbc7
--- /dev/null
+++ b/brand/color_scheme.md
@@ -0,0 +1,160 @@
+# Ethos Aegis Color System
+
+## Primary Brand Colors
+
+### Gold / Aureate (Primary Accent)
+- **Name:** Aureate Gold
+- **Hex:** #C9A84C
+- **RGB:** (201, 168, 76)
+- **Usage:** Primary accent, primary call-to-action, emphasis
+
+### Deep Black (Background)
+- **Name:** Void Black
+- **Hex:** #0D1117
+- **RGB:** (13, 17, 23)
+- **Usage:** Primary background, text contrast
+
+### Emerald Green (Vitality / Sanctified)
+- **Name:** Sanctified Green
+- **Hex:** #00E57A
+- **RGB:** (0, 229, 122)
+- **Usage:** Success states, "sanctified" verdicts, vitality indicators
+
+### Crimson Red (Danger / Condemned)
+- **Name:** Condemned Crimson
+- **Hex:** #FF4F5E
+- **RGB:** (255, 79, 94)
+- **Usage:** Critical threats, "condemned" verdicts, error states
+
+## Secondary Colors
+
+### Burnt Orange (Grave Threat)
+- **Name:** Grave Orange
+- **Hex:** #FF9A3C
+- **RGB:** (255, 154, 60)
+- **Usage:** Grave severity threats, warnings, caution states
+
+### Pale Gold (Tertiary Accent)
+- **Name:** Pale Aureate
+- **Hex:** #E8C96A
+- **RGB:** (232, 201, 106)
+- **Usage:** Secondary accent, highlights, supporting elements
+
+### Dusty Gold (Quarantine)
+- **Name:** Quarantine Gold
+- **Hex:** #F5C842
+- **RGB:** (245, 200, 66)
+- **Usage:** Quarantined state, under-review, suspended
+
+### Sky Blue (Trace / Information)
+- **Name:** Trace Blue
+- **Hex:** #4D9FFF
+- **RGB:** (77, 159, 255)
+- **Usage:** Trace severity, informational, links
+
+### Slate Gray (Neutral)
+- **Name:** Slate Gray
+- **Hex:** #6B7A90
+- **RGB:** (107, 122, 144)
+- **Usage:** Secondary text, borders, inactive states
+
+### Charcoal Gray (Secondary Neutral)
+- **Name:** Charcoal Gray
+- **Hex:** #9BAAB8
+- **RGB:** (155, 170, 184)
+- **Usage:** Tertiary text, dividers, muted elements
+
+### Ink Black (Text)
+- **Name:** Ink Black
+- **Hex:** #1C2433
+- **RGB:** (28, 36, 51)
+- **Usage:** Primary text on light backgrounds, deep elements
+
+## Color Usage by Context
+
+### Verdict States
+| State | Color | Hex |
+|-------|-------|-----|
+| **Sanctified** | Sanctified Green | #00E57A |
+| **Trace** | Trace Blue | #4D9FFF |
+| **Quarantined** | Quarantine Gold | #F5C842 |
+| **Grave** | Grave Orange | #FF9A3C |
+| **Condemned** | Condemned Crimson | #FF4F5E |
+
+### Sentinel Cells
+| Cell | Primary Color | Secondary Color |
+|------|---------------|-----------------|
+| VanguardProbe | Aureate Gold | #C9A84C |
+| TaintBeacon | Pale Aureate | #E8C96A |
+| SanitasSwarm | Dusty Brown | #8B6E2A |
+| LogosScythe | Slate Gray | #9BAAB8 |
+| MnemosyneCache | Charcoal | #6B7A90 |
+| EntropicWatch | Trace Blue | #4D9FFF |
+| FinalityForge | Condemned Crimson | #FF4F5E |
+| CytokineCommand | Aureate Gold | #C9A84C |
+
+### Threat Classes
+| Threat | Color | Hex |
+|--------|-------|-----|
+| MoralMaligna | Condemned Crimson | #FF4F5E |
+| NarcissisMaligna | Grave Orange | #FF9A3C |
+| ParasiticMaligna | Quarantine Gold | #F5C842 |
+| SymbolicMaligna | Trace Blue | #4D9FFF |
+| NaturalMaligna | Charcoal Gray | #6B7A90 |
+| MetaMaligna | Slate Gray | #9BAAB8 |
+| SystemicMaligna | Aureate Gold | #C9A84C |
+
+## Tertiary Colors β Earth Tones
+
+### Bronze (Ancient Strength)
+- **Name:** Ancient Bronze
+- **Hex:** #8B6E2A
+- **RGB:** (139, 110, 42)
+- **Usage:** SanitasSwarm cell identity, legacy system indicators, historic audit trails
+
+### Sage (Calm Intelligence)
+- **Name:** Sage Slate
+- **Hex:** #6B7A90
+- **RGB:** (107, 122, 144)
+- **Usage:** MnemosyneCache identity, neutral observations, stable state borders
+
+### Warm Cream (Highlighted Knowledge)
+- **Name:** Warm Cream
+- **Hex:** #E8C96A
+- **RGB:** (232, 201, 106)
+- **Usage:** TaintBeacon highlights, soft emphasis, knowledge retrieval indicators
+
+## Accessibility
+
+- **Contrast Ratios:**
+ - Gold on Black: 7.2:1 (AAA compliant)
+ - Green on Black: 8.1:1 (AAA compliant)
+ - Red on Black: 4.8:1 (AA compliant)
+ - Blue on Black: 5.6:1 (AA compliant)
+
+- **Color-Blind Safe:** All verdict states include supporting iconography and text labels, not relying on color alone.
+
+## CSS Variables
+
+```css
+:root {
+ --color-primary-gold: #C9A84C;
+ --color-primary-black: #0D1117;
+ --color-primary-green: #00E57A;
+ --color-primary-red: #FF4F5E;
+
+ --color-secondary-orange: #FF9A3C;
+ --color-secondary-pale-gold: #E8C96A;
+ --color-secondary-quarantine: #F5C842;
+ --color-secondary-blue: #4D9FFF;
+ --color-secondary-slate: #6B7A90;
+ --color-secondary-charcoal: #9BAAB8;
+ --color-secondary-ink: #1C2433;
+
+ --color-verdict-sanctified: #00E57A;
+ --color-verdict-trace: #4D9FFF;
+ --color-verdict-quarantined: #F5C842;
+ --color-verdict-grave: #FF9A3C;
+ --color-verdict-condemned: #FF4F5E;
+}
+```
\ No newline at end of file
diff --git a/brand/favicon.svg b/brand/favicon.svg
new file mode 100644
index 0000000000..e7e24b2209
--- /dev/null
+++ b/brand/favicon.svg
@@ -0,0 +1,33 @@
+
diff --git a/brand/github-partner-branding-kit.md b/brand/github-partner-branding-kit.md
new file mode 100644
index 0000000000..6aa03342d2
--- /dev/null
+++ b/brand/github-partner-branding-kit.md
@@ -0,0 +1,51 @@
+# GitHub Partner Branding Kit
+
+## Positioning
+Ethos Aegis Γ Claude Mythos presents Veriflow as a defensive, evidence-led reasoning system for CKAN-backed and normalized data.
+
+## Recommended GitHub description
+Host-aware verification and formula generation for CKAN data with the Veriflow immune system.
+
+## Recommended social preview headline
+Trust the verified path.
+
+## Recommended topics
+- ckan
+- data-portal
+- verification
+- reasoning-engine
+- security-by-design
+- provenance
+- formula-engine
+- python
+
+## Badge set
+```md
+
+
+
+```
+
+## Partner voice
+- precise
+- calm
+- evidence-led
+- host-aware
+- defensive by design
+
+## Repo pinning suggestion
+Pin together:
+1. Ethos-Aegis-Agentic-Immune-Veriflow
+2. veriflow-Sovereign-Lattice
+3. Traceability-Matrix
+
+## Release naming pattern
+`mythos-aegis-v.`
+
+## Visual pairings
+- primary wordmark: `assets/brand/claude-mythos-wordmark.svg`
+- lockup: `assets/brand/ethos-aegis-mythos-lockup.svg`
+- interactive demo: `interactive/mythos_control_panel.html`
+
+## Partner profile snippet
+Claude Mythos is the identity layer. Ethos Aegis is the defensive framework. Veriflow is the answer engine. Together they turn live data surfaces into replayable, evidence-backed answers.
diff --git a/brand/github-social-preview-kit.md b/brand/github-social-preview-kit.md
new file mode 100644
index 0000000000..f579d391a1
--- /dev/null
+++ b/brand/github-social-preview-kit.md
@@ -0,0 +1,23 @@
+# GitHub Social Preview Kit
+
+## Purpose
+This pack provides repository-safe preview assets and copy blocks for GitHub social cards, release posts, and partner shares.
+
+## Included assets
+- `assets/social/ethos-aegis-mythos-social-card.svg`
+- `assets/social/ethos-aegis-mythos-banner.svg`
+- `assets/social/claude-mythos-avatar-badge.svg`
+
+## Suggested repo social preview title
+Ethos Aegis Γ Claude Mythos
+
+## Suggested repo social preview subtitle
+Host-aware verification and formula generation for CKAN-backed data.
+
+## Suggested release post line
+Trust the verified path.
+
+## Use notes
+- Prefer the social card for repository preview images.
+- Prefer the banner for README embeds or external partner decks.
+- Prefer the avatar badge for profile, organization, or discussion-thread graphics.
diff --git a/brand/logo.svg b/brand/logo.svg
new file mode 100644
index 0000000000..2f6c6a23dd
--- /dev/null
+++ b/brand/logo.svg
@@ -0,0 +1,65 @@
+
diff --git a/brand/social_banner.svg b/brand/social_banner.svg
new file mode 100644
index 0000000000..8896f2be47
--- /dev/null
+++ b/brand/social_banner.svg
@@ -0,0 +1,161 @@
+
diff --git a/brand/tokens.css b/brand/tokens.css
new file mode 100644
index 0000000000..29fbbb99b2
--- /dev/null
+++ b/brand/tokens.css
@@ -0,0 +1,252 @@
+/**
+ * Ethos Aegis Design Tokens
+ * Brand color system exported as CSS custom properties.
+ *
+ * Usage:
+ * @import url('brand/tokens.css');
+ *
+ * .my-element { color: var(--color-primary-gold); }
+ *
+ * Dark mode is the default (dark-first design).
+ * Light mode overrides are provided in the @media block at the bottom.
+ */
+
+/* ============================================================
+ BASE TOKENS β Raw value definitions
+ ============================================================ */
+
+:root {
+ /* --- Primary Palette --- */
+ --palette-gold: #C9A84C;
+ --palette-void: #0D1117;
+ --palette-green: #00E57A;
+ --palette-crimson: #FF4F5E;
+
+ /* --- Secondary Palette --- */
+ --palette-orange: #FF9A3C;
+ --palette-pale-gold: #E8C96A;
+ --palette-dusty-gold: #F5C842;
+ --palette-blue: #4D9FFF;
+ --palette-slate: #6B7A90;
+ --palette-gray: #9BAAB8;
+ --palette-ink: #1C2433;
+
+ /* --- Tertiary β Earth Tones --- */
+ --palette-bronze: #8B6E2A;
+ /*
+ * NOTE: sage and slate share the hex value #6B7A90 as defined in the
+ * Ethos Aegis color specification (see brand/color_scheme.md). They are
+ * intentionally the same neutral-blue-grey, distinguished only by their
+ * semantic role: --palette-slate is a structural/border neutral whereas
+ * --palette-sage denotes the MnemosyneCache sentinel cell identity.
+ * Both tokens are kept so that downstream code remains semantically clear.
+ */
+ --palette-sage: #6B7A90;
+ /*
+ * NOTE: cream and pale-gold share the hex value #E8C96A as defined in the
+ * color specification. pale-gold is the general secondary accent; cream is
+ * the warm-highlight earth-tone specifically referenced as the tertiary
+ * palette entry. Both tokens are retained for semantic clarity.
+ */
+ --palette-cream: #E8C96A;
+}
+
+
+/* ============================================================
+ SEMANTIC COLOR TOKENS β Dark mode (default)
+ ============================================================ */
+
+:root {
+ /* Background layers */
+ --color-bg-base: var(--palette-void); /* #0D1117 β page background */
+ --color-bg-surface: var(--palette-ink); /* #1C2433 β card / panel */
+ --color-bg-elevated: #242F3F; /* elevated surface, modals */
+ --color-bg-sunken: #080D12; /* code blocks, inset areas */
+ --color-bg-overlay: rgba(13, 17, 23, 0.85); /* modal scrim */
+
+ /* Text */
+ --color-text-primary: var(--palette-pale-gold); /* #E8C96A β main body text on dark */
+ --color-text-secondary: var(--palette-gray); /* #9BAAB8 β secondary / muted text */
+ --color-text-tertiary: var(--palette-slate); /* #6B7A90 β placeholder, disabled */
+ --color-text-inverse: var(--palette-void); /* for text on light/gold backgrounds */
+ --color-text-code: var(--palette-green); /* #00E57A β code & monospace */
+ --color-text-link: var(--palette-blue); /* #4D9FFF β links */
+
+ /* Brand accents */
+ --color-primary-gold: var(--palette-gold); /* #C9A84C */
+ --color-primary-black: var(--palette-void); /* #0D1117 */
+ --color-primary-green: var(--palette-green); /* #00E57A */
+ --color-primary-red: var(--palette-crimson); /* #FF4F5E */
+
+ /* Secondary accents */
+ --color-secondary-orange: var(--palette-orange); /* #FF9A3C */
+ --color-secondary-pale-gold: var(--palette-pale-gold); /* #E8C96A */
+ --color-secondary-quarantine: var(--palette-dusty-gold); /* #F5C842 */
+ --color-secondary-blue: var(--palette-blue); /* #4D9FFF */
+ --color-secondary-slate: var(--palette-slate); /* #6B7A90 */
+ --color-secondary-charcoal: var(--palette-gray); /* #9BAAB8 */
+ --color-secondary-ink: var(--palette-ink); /* #1C2433 */
+
+ /* Tertiary β Earth Tones */
+ --color-tertiary-bronze: var(--palette-bronze); /* #8B6E2A */
+ --color-tertiary-sage: var(--palette-sage); /* #6B7A90 */
+ --color-tertiary-cream: var(--palette-cream); /* #E8C96A */
+
+ /* Borders */
+ --color-border-subtle: rgba(201, 168, 76, 0.13); /* faint gold rule */
+ --color-border-default: rgba(201, 168, 76, 0.25); /* standard border */
+ --color-border-strong: rgba(201, 168, 76, 0.55); /* emphasized border */
+ --color-border-danger: rgba(255, 79, 94, 0.45); /* error border */
+ --color-border-success: rgba(0, 229, 122, 0.45); /* success border */
+
+ /* Interactive states */
+ --color-focus-ring: rgba(201, 168, 76, 0.6);
+ --color-hover-overlay: rgba(201, 168, 76, 0.06);
+ --color-active-overlay: rgba(201, 168, 76, 0.12);
+
+ /* ---- Verdict State Colors ---- */
+ --color-verdict-sanctified: var(--palette-green); /* #00E57A */
+ --color-verdict-trace: var(--palette-blue); /* #4D9FFF */
+ --color-verdict-quarantined: var(--palette-dusty-gold); /* #F5C842 */
+ --color-verdict-grave: var(--palette-orange); /* #FF9A3C */
+ --color-verdict-condemned: var(--palette-crimson); /* #FF4F5E */
+
+ /* Verdict backgrounds (tinted) */
+ --color-verdict-sanctified-bg: rgba(0, 229, 122, 0.08);
+ --color-verdict-trace-bg: rgba(77, 159, 255, 0.08);
+ --color-verdict-quarantined-bg: rgba(245, 200, 66, 0.08);
+ --color-verdict-grave-bg: rgba(255, 154, 60, 0.08);
+ --color-verdict-condemned-bg: rgba(255, 79, 94, 0.08);
+
+ /* ---- Sentinel Cell Colors ---- */
+ --color-cell-vanguard-probe: var(--palette-gold); /* #C9A84C */
+ --color-cell-taint-beacon: var(--palette-cream); /* #E8C96A */
+ --color-cell-sanitas-swarm: var(--palette-bronze); /* #8B6E2A */
+ --color-cell-logos-scythe: var(--palette-gray); /* #9BAAB8 */
+ --color-cell-mnemosyne-cache: var(--palette-sage); /* #6B7A90 */
+ --color-cell-entropic-watch: var(--palette-blue); /* #4D9FFF */
+ --color-cell-finality-forge: var(--palette-crimson); /* #FF4F5E */
+ --color-cell-cytokine-command: var(--palette-gold); /* #C9A84C */
+
+ /* ---- Threat Class Colors ---- */
+ --color-threat-moral: var(--palette-crimson); /* MoralMaligna β #FF4F5E */
+ --color-threat-narcissis: var(--palette-orange); /* NarcissisMaligna β #FF9A3C */
+ --color-threat-parasitic: var(--palette-dusty-gold); /* ParasiticMaligna β #F5C842 */
+ --color-threat-symbolic: var(--palette-blue); /* SymbolicMaligna β #4D9FFF */
+ --color-threat-natural: var(--palette-sage); /* NaturalMaligna β #6B7A90 */
+ --color-threat-meta: var(--palette-gray); /* MetaMaligna β #9BAAB8 */
+ --color-threat-systemic: var(--palette-gold); /* SystemicMaligna β #C9A84C */
+
+ /* ---- Semantic Utility Colors ---- */
+ --color-success: var(--palette-green); /* #00E57A */
+ --color-warning: var(--palette-dusty-gold); /* #F5C842 */
+ --color-danger: var(--palette-crimson); /* #FF4F5E */
+ --color-info: var(--palette-blue); /* #4D9FFF */
+ --color-caution: var(--palette-orange); /* #FF9A3C */
+
+ /* ---- Decorative Grid Pattern ---- */
+ --pattern-grid-dot-color: rgba(201, 168, 76, 0.12);
+ --pattern-grid-size: 28px;
+
+ /* ---- Typography Tokens ---- */
+ --font-serif: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
+ --font-sans: 'Inter', 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
+ --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
+
+ --font-size-display: 3rem; /* 48px */
+ --font-size-h1: 2.25rem; /* 36px */
+ --font-size-h2: 1.75rem; /* 28px */
+ --font-size-h3: 1.375rem; /* 22px */
+ --font-size-body: 1rem; /* 16px */
+ --font-size-small: 0.8125rem; /* 13px */
+ --font-size-code: 0.875rem; /* 14px */
+
+ --font-weight-normal: 400;
+ --font-weight-medium: 500;
+ --font-weight-semibold: 600;
+ --font-weight-bold: 700;
+
+ --line-height-tight: 1.25;
+ --line-height-normal: 1.6;
+ --line-height-relaxed: 1.8;
+
+ --letter-spacing-tight: -0.01em;
+ --letter-spacing-normal: 0;
+ --letter-spacing-wide: 0.04em;
+ --letter-spacing-wider: 0.08em;
+ --letter-spacing-widest: 0.14em;
+
+ /* ---- Spacing Scale ---- */
+ --space-1: 0.25rem; /* 4px */
+ --space-2: 0.5rem; /* 8px */
+ --space-3: 0.75rem; /* 12px */
+ --space-4: 1rem; /* 16px */
+ --space-5: 1.25rem; /* 20px */
+ --space-6: 1.5rem; /* 24px */
+ --space-8: 2rem; /* 32px */
+ --space-10: 2.5rem; /* 40px */
+ --space-12: 3rem; /* 48px */
+ --space-16: 4rem; /* 64px */
+
+ /* ---- Border Radius ---- */
+ --radius-sm: 3px;
+ --radius-md: 6px;
+ --radius-lg: 12px;
+ --radius-xl: 20px;
+ --radius-pill: 9999px;
+
+ /* ---- Shadows ---- */
+ --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
+ --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
+ --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.6);
+ --shadow-gold: 0 0 20px rgba(201, 168, 76, 0.18);
+ --shadow-glow: 0 0 30px rgba(0, 229, 122, 0.15);
+
+ /* ---- Transitions ---- */
+ --transition-fast: 150ms ease;
+ --transition-normal: 250ms ease;
+ --transition-slow: 400ms ease;
+}
+
+
+/* ============================================================
+ LIGHT MODE OVERRIDES
+ Only backgrounds, text, and borders shift; accent palette
+ remains consistent but darkened for sufficient contrast.
+ ============================================================ */
+
+@media (prefers-color-scheme: light) {
+ :root {
+ --color-bg-base: #F5F0E8;
+ --color-bg-surface: #EDE7D9;
+ --color-bg-elevated: #FFFFFF;
+ --color-bg-sunken: #E0DAD0;
+ --color-bg-overlay: rgba(245, 240, 232, 0.9);
+
+ --color-text-primary: #0D1117;
+ --color-text-secondary: #1C2433;
+ --color-text-tertiary: #4A5568;
+ --color-text-inverse: #F5F0E8;
+ --color-text-code: #006B3A;
+ --color-text-link: #1A5FAA;
+
+ /* Darken accents for light backgrounds */
+ --color-primary-gold: #8B6E2A; /* bronze replaces gold for contrast */
+ --color-primary-green: #00804A;
+ --color-primary-red: #C0002A;
+
+ --color-secondary-orange: #B55E00;
+ --color-secondary-pale-gold: #7A5C1E;
+ --color-secondary-quarantine: #8B7000;
+ --color-secondary-blue: #1A5FAA;
+
+ --color-border-subtle: rgba(139, 110, 42, 0.15);
+ --color-border-default: rgba(139, 110, 42, 0.30);
+ --color-border-strong: rgba(139, 110, 42, 0.60);
+
+ --pattern-grid-dot-color: rgba(139, 110, 42, 0.10);
+
+ --shadow-gold: 0 0 20px rgba(139, 110, 42, 0.12);
+ --shadow-glow: 0 0 30px rgba(0, 128, 74, 0.10);
+ }
+}
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000000..c80a1e8db5
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,24 @@
+version: "3.9"
+
+services:
+ dev:
+ image: python:3.11-slim
+ working_dir: /app
+ volumes:
+ - .:/app
+ command: bash -c "pip install -r requirements.txt && pytest tests/ -q"
+ environment:
+ - PYTHONDONTWRITEBYTECODE=1
+ - PYTHONUNBUFFERED=1
+
+ worker:
+ image: node:18-alpine
+ working_dir: /app
+ volumes:
+ - .:/app
+ - /app/node_modules
+ command: sh -c "npm install && npm run worker:dev"
+ ports:
+ - "8787:8787"
+ environment:
+ - NODE_ENV=development
diff --git a/docs/MERGE_INTEGRATION.md b/docs/MERGE_INTEGRATION.md
new file mode 100644
index 0000000000..e8d6770f5f
--- /dev/null
+++ b/docs/MERGE_INTEGRATION.md
@@ -0,0 +1,46 @@
+# Merge Integration Guide
+
+This document records the intended merge path for bringing `veriflow-Sovereign-Lattice` into `Ethos-Aegis-Agentic-Immune-Veriflow` while preserving commit history.
+
+## Purpose
+
+- consolidate related project surfaces into one repository
+- preserve repository history instead of copying files manually
+- simplify contributor onboarding and shared CI
+- keep Ethos Aegis, Veriflow, and Mythos work discoverable in one place
+
+## Merge model
+
+The destination repository is:
+- `GoodshytGroup/Ethos-Aegis-Agentic-Immune-Veriflow`
+
+The source repository is:
+- `GoodshytGroup/veriflow-Sovereign-Lattice`
+
+The histories are unrelated, so the integration should be performed as a history-preserving merge rather than a file copy.
+
+## Expected outcome
+
+After the merge, the destination repository should contain:
+- the existing Ethos Aegis runtime surface
+- the Veriflow reasoning surface
+- the prompt, schema, and policy-pack assets needed for agentic development
+
+## Integration notes
+
+- resolve root-level collisions intentionally
+- preserve docs that explain where each surface originated
+- prefer explicit directories for imported project surfaces when conflicts appear
+- reconcile CI in stages instead of forcing every legacy surface green at once
+- keep project-native documentation ahead of generic fork content
+
+## History note
+
+Because unrelated histories are being joined, history navigation across the merge boundary will need the merge commit as an anchor for later inspection.
+
+## Recommended follow-up after merge
+
+- repair the repo landing page
+- reconcile overlapping workflows
+- keep plugin cleanup separate from runtime repair work
+- document the merged architecture in one project-native overview
diff --git a/docs/agentic_repo_roadmap.md b/docs/agentic_repo_roadmap.md
new file mode 100644
index 0000000000..65550a3980
--- /dev/null
+++ b/docs/agentic_repo_roadmap.md
@@ -0,0 +1,32 @@
+# Agentic Repo Roadmap
+
+This roadmap identifies the strongest next moves to make the repository more coherent, more attractive to contributors, and more trustworthy as an agentic systems project.
+
+## Near-term
+
+1. Repair Mythos runtime Python 3.9 compatibility.
+2. Scope CI lint and tests to the new package surface until legacy plugin debt is addressed separately.
+3. Repair the repo landing page so it reflects Ethos Aegis, Veriflow, and Claude Mythos rather than the generic fork root.
+4. Add a watcher/orchestrator integration path for encrypted signed policy packs.
+
+## Mid-term
+
+1. Add a local policy-pack editor and verifier.
+2. Add stateful host capability caching for CKAN-backed reasoning.
+3. Add prompt families for repo audit, CKAN reasoning, and runtime scaffolding.
+4. Add reproducible sample policy packs and validation scripts.
+
+## Long-term
+
+1. Add stronger cryptographic agility notes and post-quantum migration planning.
+2. Add local orchestrator runtime state loading from verified decrypted packs.
+3. Add richer evaluation harnesses for safe autonomy and human approval gates.
+4. Add repo-specific branding assets and a project-native landing page.
+
+## Design principles
+
+- verify before acting
+- preserve provenance
+- prefer least privilege
+- separate policy, execution, and memory layers
+- keep unsafe or high-impact actions behind approval boundaries
diff --git a/docs/branding/celestial_agent_brand_kit.md b/docs/branding/celestial_agent_brand_kit.md
new file mode 100644
index 0000000000..5d7c7f6008
--- /dev/null
+++ b/docs/branding/celestial_agent_brand_kit.md
@@ -0,0 +1,49 @@
+# Celestial Agent Branding Kit
+
+Brand system created for **TDD**.
+
+## Core tagline
+Encrypted intelligence, permissioned by design.
+
+## Positioning line
+Celestial Agent turns secure orchestration into a visible product system: branded, signed, encrypted, and ready for operator trust.
+
+## Elevator pitch
+Celestial Agent is a local-first agent runtime identity built for high-trust AI systems. It combines encrypted policy packs, signed manifests, and permissioned execution into a product language that feels premium, technical, and controlled.
+
+## Palette
+- Obsidian: `#0B1020`
+- Midnight: `#121A33`
+- Aether: `#1D2D5A`
+- Cyan: `#59E3FF`
+- Aurora: `#37FFC8`
+- Violet: `#8B6CFF`
+- Silver: `#A9B7D1`
+- Cloud: `#F5F8FF`
+- Ink: `#EAF1FF`
+
+## Tone
+- secure
+- futuristic
+- controlled
+- clear
+- high-trust
+
+## Website hero copy
+### Headline
+Secure agent orchestration with a premium identity.
+
+### Subhead
+Celestial Agent packages encryption, signatures, and permissioned execution into a system users can trust at a glance.
+
+## CTA options
+- Launch the runtime
+- Verify the pack
+- Encrypt the spec
+- Load with confidence
+
+## Recommended use in the merged repo
+- use Celestial Agent as the trust-layer identity for encrypted policy packs
+- preserve Ethos Aegis as the system architecture name
+- preserve Veriflow as the host-aware reasoning surface
+- use project-native docs instead of leaving generic fork branding at the repo root
diff --git a/docs/claude-mythos-veriflow-scaffold.md b/docs/claude-mythos-veriflow-scaffold.md
new file mode 100644
index 0000000000..ab018e0b06
--- /dev/null
+++ b/docs/claude-mythos-veriflow-scaffold.md
@@ -0,0 +1,37 @@
+# Claude Mythos Γ Veriflow Scaffold Guide
+
+## Goal
+This scaffold layers a Mythos identity onto the existing Veriflow immune system so the repository has a consistent operational contract, brand vocabulary, and onboarding surface.
+
+## Stack
+- Ethos Aegis core
+- Veriflow immune system
+- CKAN capability probing
+- capability-aware ingestion
+- deterministic validation
+- formula selection and answer generation
+
+## Recommended startup defaults
+- `probe_on_startup=True`
+- `fingerprint_mode="auto"`
+- use `datastore_lightweight` only when row-level freshness matters more than probe cost
+
+## Expected output shape
+```json
+{
+ "host_profile": "schema-rich+datastore",
+ "ckan_version": "2.11.x",
+ "ingestion_path": "datastore",
+ "formula": "ctr = clicks / impressions",
+ "limitations": ["sampled row signature used"]
+}
+```
+
+## Brand position
+Claude Mythos is not a separate model implementation here. It is a branded scaffold and operating identity wrapped around the current Veriflow immune runtime.
+
+## Suggested next repo additions
+- examples/mythos_startup.py
+- assets/brand/wordmark.svg
+- docs/decision-records/0001-mythos-identity.md
+- tests/test_mythos_brand_contract.py
diff --git a/docs/decision-records/0001-mythos-identity.md b/docs/decision-records/0001-mythos-identity.md
new file mode 100644
index 0000000000..4f8429e948
--- /dev/null
+++ b/docs/decision-records/0001-mythos-identity.md
@@ -0,0 +1,27 @@
+# ADR 0001: Introduce Claude Mythos as the identity layer
+
+## Status
+Accepted
+
+## Context
+The repository already contains the Veriflow immune runtime and CKAN-aware ingestion pipeline. It did not yet have a stable identity layer for onboarding, brand consistency, or runtime doctrine.
+
+## Decision
+Add Claude Mythos as a branded scaffold and identity layer, not as a separate model implementation.
+
+## Consequences
+Positive:
+- clearer onboarding
+- reusable brand and voice rules
+- explicit runtime defaults
+- stronger connection between Veriflow and external presentation
+
+Tradeoffs:
+- one more identity surface to maintain
+- risk of brand language drifting from runtime behavior if not reviewed periodically
+
+## Operational defaults
+- probe at startup
+- capability-aware ingestion
+- default fingerprint mode is `auto`
+- use `datastore_lightweight` only for freshness-sensitive row monitoring
diff --git a/docs/integrations/pinkybot_daemon_adapter.md b/docs/integrations/pinkybot_daemon_adapter.md
new file mode 100644
index 0000000000..b0a8ac4904
--- /dev/null
+++ b/docs/integrations/pinkybot_daemon_adapter.md
@@ -0,0 +1,61 @@
+# PinkyBot Daemon Adapter
+
+This document describes a thin adapter model for connecting a PinkyBot-style daemon to Ethos runtime surfaces.
+
+## Goal
+
+Translate persistent companion-agent operations into approved Ethos runtime calls without collapsing the boundary between:
+
+- persistent agent state
+- runtime execution tools
+- memory storage
+- messaging adapters
+- approval-gated actions
+
+## Suggested adapter surfaces
+
+### Agent registry bridge
+Map named PinkyBot agents to approved local runtime profiles.
+
+### Memory bridge
+Expose only explicit durable-memory operations:
+- reflect
+- recall
+- introspect
+
+### Messaging bridge
+Allow outbound messaging only through a permission-aware adapter.
+
+### Scheduler bridge
+Allow wake triggers to enqueue runtime work instead of directly executing privileged actions.
+
+## Internal event shape
+
+```json
+{
+ "agent": "pinkybot-companion",
+ "source": "telegram",
+ "trigger": "message",
+ "action": "wake",
+ "approval_required": false,
+ "payload": {
+ "content": "hello"
+ }
+}
+```
+
+## Guardrails
+
+- never give the daemon unrestricted execution rights
+- keep approvals explicit for external messaging, calendar writes, or sensitive exports
+- treat model output as untrusted until validated
+- log every daemon-to-runtime handoff
+
+## First implementation target
+
+A safe first adapter should support:
+- create / wake / chat lifecycle docs
+- Telegram inbound message wake events
+- memory reflection and recall
+- activity logging
+- no destructive or financial actions
diff --git a/docs/integrations/pinkybot_integration.md b/docs/integrations/pinkybot_integration.md
new file mode 100644
index 0000000000..b675e80c5b
--- /dev/null
+++ b/docs/integrations/pinkybot_integration.md
@@ -0,0 +1,71 @@
+# PinkyBot Integration
+
+This document describes how to integrate **PinkyBot** into the Ethos Aegis ecosystem as a persistent companion-agent layer.
+
+## Intent
+
+PinkyBot adds a long-lived personal agent surface on top of the existing Ethos runtime work:
+
+- persistent named agents
+- long-term memory
+- scheduled wake cycles
+- multi-platform messaging
+- dashboard-driven management
+- skills-based extensibility
+
+## Role in the Ethos stack
+
+- **Ethos Aegis** = core architecture umbrella
+- **Claude Mythos** = runtime and scaffold layer
+- **Veriflow** = host-aware reasoning and CKAN intelligence
+- **Celestial Agent** = trust-layer identity for encrypted policy packs
+- **PinkyBot** = persistent companion and outreach layer
+
+## Recommended boundary
+
+PinkyBot should not replace the core runtime. It should sit above it as a companion framework that can:
+
+1. wake agents on schedules or inbound events
+2. route messages from Telegram, Slack, or Discord
+3. persist cross-session memory
+4. call into approved Ethos runtime tools
+5. present a dashboard view over agent status and activity
+
+## Suggested integration points
+
+### Messaging
+- Telegram bot token managed in settings
+- Slack bot token managed in settings
+- Discord bot token managed in settings
+- outbound messaging routed through a dedicated MCP surface
+
+### Memory
+- persistent memory should remain explicit and auditable
+- store only approved long-term state
+- separate working state from durable memory
+
+### Skills
+- represent PinkyBot capabilities as skill modules
+- allow companion agents to install task-specific skills
+- keep skills permission-scoped and reviewable
+
+### Scheduling and triggers
+- webhook wakes
+- URL watcher wakes
+- file watcher wakes
+- heartbeat / dream cycles
+
+## Non-goals
+
+- unrestricted automation
+- hidden access to user accounts
+- bypassing approval gates for sensitive actions
+- uncontrolled message sending
+
+## Recommended first implementation steps
+
+1. add a PinkyBot companion skill surface
+2. add a PinkyBot agent profile example
+3. add Telegram Mini App event mapping notes
+4. add a thin API adapter document for daemon integration
+5. keep runtime repair and feature expansion work separate from companion integration
diff --git a/docs/integrations/telegram_mini_app_event_map.md b/docs/integrations/telegram_mini_app_event_map.md
new file mode 100644
index 0000000000..2a7944390a
--- /dev/null
+++ b/docs/integrations/telegram_mini_app_event_map.md
@@ -0,0 +1,69 @@
+# Telegram Mini App Event Map
+
+This note maps selected Telegram Mini App events into a safe PinkyBot + Ethos integration surface.
+
+## Use these first
+
+### Messaging and UI
+- `web_app_ready`
+- `web_app_close`
+- `web_app_open_popup`
+- `web_app_setup_main_button`
+- `web_app_setup_back_button`
+- `web_app_setup_settings_button`
+- `web_app_trigger_haptic_feedback`
+
+### Permissioned access
+- `web_app_request_write_access`
+- `web_app_request_phone`
+- `web_app_read_text_from_clipboard`
+- `web_app_request_file_download`
+
+### Secure local state
+- `web_app_secure_storage_save_key`
+- `web_app_secure_storage_get_key`
+- `web_app_secure_storage_restore_key`
+- `web_app_secure_storage_clear`
+- `web_app_device_storage_save_key`
+- `web_app_device_storage_get_key`
+- `web_app_device_storage_clear`
+
+### Sensors and environment
+- `web_app_request_theme`
+- `web_app_request_viewport`
+- `web_app_request_safe_area`
+- `web_app_request_content_safe_area`
+- `web_app_check_location`
+- `web_app_request_location`
+
+## Treat as high-risk or approval-gated
+
+- `payment_form_submit`
+- `web_app_open_invoice`
+- `web_app_set_emoji_status`
+- `web_app_request_emoji_status_access`
+- `web_app_invoke_custom_method`
+- `web_app_open_link`
+- `web_app_open_tg_link`
+
+## Integration rule
+
+Map Telegram events into an internal broker event shape before handing them to a PinkyBot-style daemon. Example internal shape:
+
+```json
+{
+ "platform": "telegram",
+ "event_type": "web_app_request_write_access",
+ "user_interaction_required": true,
+ "approval_required": true,
+ "payload": {}
+}
+```
+
+## Recommended behavior
+
+- validate all event payloads before use
+- gate high-impact actions behind explicit user interaction or approval
+- persist only minimal necessary state
+- prefer secure storage for secrets or tokens
+- log every accepted event in the activity feed
diff --git a/docs/merge_automation_and_branding.md b/docs/merge_automation_and_branding.md
new file mode 100644
index 0000000000..c6ec83b9fc
--- /dev/null
+++ b/docs/merge_automation_and_branding.md
@@ -0,0 +1,32 @@
+# Merge Automation and Branding
+
+This guide ties together the local history-preserving merge workflow and the Celestial Agent branding layer for the Ethos monorepo.
+
+## What this branch adds
+
+- `scripts/push-merge-runbook.sh`
+- `docs/branding/celestial_agent_brand_kit.md`
+- `assets/branding/celestial_agent/celestial_agent_logo_horizontal.svg`
+- `assets/branding/celestial_agent/celestial_agent_mark_full.svg`
+
+## Intended use
+
+1. Run the merge helper locally from the destination repository.
+2. Open the history-preserving merge PR into Ethos Aegis.
+3. Preserve Veriflow as a named reasoning surface inside the merged repository.
+4. Use the Celestial Agent brand assets as the trust-layer identity for encrypted policy packs, signed manifests, and local-first orchestration surfaces.
+
+## Branding model after merge
+
+- **Ethos Aegis** = system architecture and monorepo umbrella
+- **Veriflow** = host-aware reasoning and CKAN intelligence layer
+- **Claude Mythos** = runtime and prompt/scaffold identity
+- **Celestial Agent** = encrypted policy-pack and trust-layer visual identity
+
+## Why this split works
+
+It lets the repository preserve technical clarity while still giving the secure runtime surfaces a premium, user-facing brand system.
+
+## Limits
+
+The GitHub connector can prepare scripts, docs, and assets, but the actual unrelated-history merge still has to be executed through git on a machine with repository access.
diff --git a/docs/mythos_runtime_integration.md b/docs/mythos_runtime_integration.md
new file mode 100644
index 0000000000..3e6abeb880
--- /dev/null
+++ b/docs/mythos_runtime_integration.md
@@ -0,0 +1,33 @@
+# Mythos Runtime Integration
+
+This repository now includes a Python-native Mythos runtime layer for local discipline around AI-assisted changes.
+
+## Included capabilities
+
+- **Strict Write Discipline (SWD)**: verifies claimed file writes against actual filesystem state.
+- **Memory ledger**: appends verified write events and runtime events to `MEMORY.md`.
+- **Drift detection**: compares current files against the last verified hashes stored in memory.
+- **Budget meter**: lightweight token/turn guard for future agent loops.
+- **CLI**: `python -m ethos_aegis.mythos_runtime.cli verify` and `dream`.
+
+## How it is wired into Veriflow
+
+`VeriflowImmuneSystem` now uses the Mythos runtime for host-state persistence.
+When the system saves its CKAN host cache, it writes through SWD and records the verified write in `MEMORY.md`.
+Resource refreshes are also logged as runtime events.
+
+## Example
+
+```python
+from ethos_aegis.veriflow import CKANClient, VeriflowImmuneSystem
+
+ckan = CKANClient("https://demo.ckan.org")
+immune = VeriflowImmuneSystem(ckan, probe_on_startup=False)
+```
+
+## CLI examples
+
+```bash
+python -m ethos_aegis.mythos_runtime.cli --root . verify --json
+python -m ethos_aegis.mythos_runtime.cli --root . dream --dry-run
+```
diff --git a/docs/mythos_runtime_repair_plan.md b/docs/mythos_runtime_repair_plan.md
new file mode 100644
index 0000000000..4f0ad93acc
--- /dev/null
+++ b/docs/mythos_runtime_repair_plan.md
@@ -0,0 +1,32 @@
+# Mythos Runtime Repair Plan
+
+This patch set is intended to repair the Mythos runtime surface without touching unrelated plugin lint debt.
+
+## Scope
+- `ethos_aegis/mythos_runtime/`
+- `ethos_aegis/veriflow/`
+- `tests/test_mythos_runtime.py`
+- `.github/workflows/python-package.yml`
+
+## Required fixes
+1. Remove `slots=True` from new dataclasses for Python 3.9 compatibility.
+2. Remove unused `Mapping` imports.
+3. Wrap long lines in the new package surface.
+4. Reduce `DriftDetector.scan` complexity by extracting helper methods.
+5. Update `actions/setup-python` from `@v3` to `@v5`.
+6. Scope flake8 to the Mythos runtime surface only.
+7. Run `pytest tests/test_mythos_runtime.py -q` instead of full-repo `pytest` in this workflow.
+
+## Files to modify
+- `ethos_aegis/mythos_runtime/budget.py`
+- `ethos_aegis/mythos_runtime/cli.py`
+- `ethos_aegis/mythos_runtime/drift.py`
+- `ethos_aegis/mythos_runtime/memory.py`
+- `ethos_aegis/mythos_runtime/swd.py`
+- `ethos_aegis/veriflow/ckan_adapter.py`
+- `ethos_aegis/veriflow/immune_system.py`
+- `tests/test_mythos_runtime.py`
+- `.github/workflows/python-package.yml`
+
+## PR intent
+Fix Python 3.9 compatibility and isolate CI to the new Mythos runtime package surface so unrelated plugin lint debt does not block validation.
diff --git a/docs/phaseform_policy_packs.md b/docs/phaseform_policy_packs.md
new file mode 100644
index 0000000000..559d1b97b2
--- /dev/null
+++ b/docs/phaseform_policy_packs.md
@@ -0,0 +1,82 @@
+# PhaseForm Encrypted Policy Packs
+
+This guide defines the repository's preferred structure for encrypted signed agent policy packs.
+
+## Goals
+
+- Keep the agent blueprint confidential at rest.
+- bind creator attribution into the manifest.
+- make tampering detectable.
+- support replayable versioning across pack revisions.
+- keep execution limited to a local permissioned workspace.
+
+## Supported pack formats
+
+### Split pack
+
+- `agent_spec.enc`
+- `agent_manifest.json`
+- `agent_manifest.sig`
+
+### Single-file JSON pack
+
+A `.enc` file may also contain a JSON object with:
+
+- `manifest`
+- `ciphertext_b64`
+- `nonce_b64`
+- `salt_b64`
+- `signature_b64`
+
+Runtime tooling should support both forms.
+
+## Canonical manifest fields
+
+```json
+{
+ "schema_version": "1.0",
+ "creator": "TDD",
+ "version": "0.1.0",
+ "public_key_b64": "...",
+ "spec_hash_sha256": "...",
+ "ciphertext_hash_sha256": "...",
+ "content_type": "agent_spec",
+ "nonce_b64": "...",
+ "salt_b64": "..."
+}
+```
+
+## Security rules
+
+1. Never embed a default passphrase in source code.
+2. Require the passphrase through environment or secure prompt entry.
+3. Verify Ed25519 signatures before decryption.
+4. Verify both ciphertext and plaintext hashes when present.
+5. Quarantine invalid or partially written packs.
+6. Decrypt only into controlled local workspace state.
+7. Treat standards references as requirements alignment, not certification claims.
+
+## Repository conventions
+
+- place incoming encrypted payloads in `vault/`
+- place split-pack manifests in `manifests/`
+- write validated plaintext only into `decrypted/`
+- move invalid inputs into `quarantine/`
+- keep private keys out of the repository
+
+## Recommended runtime flow
+
+1. Watch `vault/` for new `.enc` files.
+2. Wait for file writes to stabilize.
+3. Attempt single-file JSON pack parsing.
+4. Fallback to split-pack loading when appropriate.
+5. Verify signature and integrity hashes.
+6. Decrypt AES-GCM payload.
+7. Write decrypted JSON to `decrypted/`.
+8. Hand off the verified spec to the local orchestrator.
+
+## Non-goals
+
+- unrestricted or universal-access automation
+- hidden access paths
+- bypassing approvals or least-privilege boundaries
diff --git a/docs/readme-badges.md b/docs/readme-badges.md
new file mode 100644
index 0000000000..ffa888298a
--- /dev/null
+++ b/docs/readme-badges.md
@@ -0,0 +1,8 @@
+
+
+
+
+
+## Mythos partner layer
+
+Ethos Aegis Γ Claude Mythos adds a verification-first partner layer for CKAN-aware reasoning and formula generation.
diff --git a/docs/readme-mythos-section.md b/docs/readme-mythos-section.md
new file mode 100644
index 0000000000..3436f778e6
--- /dev/null
+++ b/docs/readme-mythos-section.md
@@ -0,0 +1,27 @@
+# Ethos Aegis Γ Claude Mythos
+
+Veriflow Immune System for host-aware, verification-first reasoning over CKAN-backed and normalized data.
+
+## Mythos distribution layer
+
+This repository combines:
+- Ethos Aegis as the defensive systems framework
+- Claude Mythos as the identity and operating contract layer
+- Veriflow as the formula-and-answer engine
+- CKAN-aware ingestion, probing, and caching
+
+### Runtime defaults
+- probe capabilities on startup
+- cache host capability matrices
+- select ingestion path automatically per CKAN host
+- use `fingerprint_mode="auto"` for most hosts
+- use `datastore_lightweight` only when row freshness matters more than probe cost
+
+### Quick links
+- [Claude Mythos operating contract](../CLAUDE_MYTHOS.md)
+- [Brand kit](../brand/claude-mythos-brand-kit.md)
+- [GitHub partner branding kit](../brand/github-partner-branding-kit.md)
+- [Interactive control panel](../interactive/mythos_control_panel.html)
+- [Startup example](../examples/mythos_startup.py)
+
+**Principle:** Trust the verified path.
diff --git a/docs/vault_watcher_integration.md b/docs/vault_watcher_integration.md
new file mode 100644
index 0000000000..48576500e3
--- /dev/null
+++ b/docs/vault_watcher_integration.md
@@ -0,0 +1,50 @@
+# Vault Watcher Integration
+
+This document describes how a local watcher should load encrypted signed policy packs into a controlled orchestrator.
+
+## Runtime directories
+
+```text
+project_root/
+βββ vault/
+βββ manifests/
+βββ decrypted/
+βββ quarantine/
+βββ keys/
+βββ vault_watcher.py
+```
+
+## Environment requirements
+
+- `PHASEFORM_PASSPHRASE` must be set before startup.
+- private keys must remain local and out of version control.
+- no embedded default passphrase should exist in source.
+
+## Expected behavior
+
+1. Detect new `.enc` files in `vault/`.
+2. Wait until the file is stable.
+3. Try single-file JSON pack parsing.
+4. If that fails, look for matching split-pack manifest and signature files.
+5. Verify Ed25519 signature before decryption.
+6. Verify ciphertext and plaintext hashes when present.
+7. Write valid decrypted specs to `decrypted/`.
+8. Move invalid packs to `quarantine/`.
+9. Hand the verified spec to the local orchestrator.
+
+## Orchestrator handoff contract
+
+A local handoff function should accept a decrypted agent spec and convert it into runtime state.
+
+Example responsibilities:
+- validate schema version
+- validate policy surface
+- enforce least-privilege permissions
+- register the spec as active runtime policy
+- emit an audit event
+
+## Suggested follow-up
+
+- add a local spec editor
+- add a pack validator CLI
+- add sample single-file and split-pack test fixtures
diff --git a/ethos_aegis/__init__.py b/ethos_aegis/__init__.py
new file mode 100644
index 0000000000..6a5f56d239
--- /dev/null
+++ b/ethos_aegis/__init__.py
@@ -0,0 +1 @@
+"""Ethos Aegis package."""
diff --git a/ethos_aegis/mythos_runtime/__init__.py b/ethos_aegis/mythos_runtime/__init__.py
new file mode 100644
index 0000000000..e452158917
--- /dev/null
+++ b/ethos_aegis/mythos_runtime/__init__.py
@@ -0,0 +1,15 @@
+from .budget import BudgetMeter
+from .drift import DriftDetector, DriftScanResult
+from .memory import MemoryEvent, MemoryLedger
+from .swd import ClaimedFileAction, StrictWriteDiscipline, VerificationReport
+
+__all__ = [
+ "BudgetMeter",
+ "ClaimedFileAction",
+ "DriftDetector",
+ "DriftScanResult",
+ "MemoryEvent",
+ "MemoryLedger",
+ "StrictWriteDiscipline",
+ "VerificationReport",
+]
diff --git a/ethos_aegis/mythos_runtime/budget.py b/ethos_aegis/mythos_runtime/budget.py
new file mode 100644
index 0000000000..5505e7e7c6
--- /dev/null
+++ b/ethos_aegis/mythos_runtime/budget.py
@@ -0,0 +1,32 @@
+from __future__ import annotations
+
+from dataclasses import dataclass
+
+
+@dataclass
+class BudgetMeter:
+ max_tokens: int = 500_000
+ max_turns: int = 25
+ warning_threshold: float = 0.8
+ tokens_used: int = 0
+ turns_used: int = 0
+
+ def consume(self, *, tokens: int = 0, turns: int = 1) -> None:
+ self.tokens_used += max(0, tokens)
+ self.turns_used += max(0, turns)
+
+ @property
+ def token_ratio(self) -> float:
+ return 0.0 if self.max_tokens <= 0 else self.tokens_used / self.max_tokens
+
+ @property
+ def turn_ratio(self) -> float:
+ return 0.0 if self.max_turns <= 0 else self.turns_used / self.max_turns
+
+ @property
+ def warning(self) -> bool:
+ return max(self.token_ratio, self.turn_ratio) >= self.warning_threshold
+
+ @property
+ def exhausted(self) -> bool:
+ return self.token_ratio >= 1.0 or self.turn_ratio >= 1.0
diff --git a/ethos_aegis/mythos_runtime/cli.py b/ethos_aegis/mythos_runtime/cli.py
new file mode 100644
index 0000000000..53acf54755
--- /dev/null
+++ b/ethos_aegis/mythos_runtime/cli.py
@@ -0,0 +1,62 @@
+from __future__ import annotations
+
+import argparse
+import json
+from pathlib import Path
+
+from .drift import DriftDetector
+from .memory import MemoryLedger
+from .swd import StrictWriteDiscipline
+
+
+def build_parser() -> argparse.ArgumentParser:
+ parser = argparse.ArgumentParser(
+ prog="mythos-runtime",
+ description="Strict write discipline and memory tools for Ethos Aegis.",
+ )
+ parser.add_argument("--root", default=".", help="Project root")
+ parser.add_argument("--memory", default="MEMORY.md", help="Memory ledger path relative to root")
+ sub = parser.add_subparsers(dest="command", required=True)
+
+ verify = sub.add_parser("verify", help="Scan project state against ledger.")
+ verify.add_argument("--json", action="store_true", help="Emit JSON output")
+
+ dream = sub.add_parser("dream", help="Compress old memory entries.")
+ dream.add_argument("--max-entries", type=int, default=100)
+ dream.add_argument("--keep-recent", type=int, default=20)
+ dream.add_argument("--dry-run", action="store_true")
+
+ return parser
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = build_parser()
+ args = parser.parse_args(argv)
+ root = Path(args.root).resolve()
+ ledger = MemoryLedger(root / args.memory)
+ swd = StrictWriteDiscipline(root, memory_ledger=ledger)
+
+ if args.command == "verify":
+ result = DriftDetector(root, ledger=ledger, swd=swd).scan()
+ payload = {
+ "verified": result.verified,
+ "drifted": result.drifted,
+ "missing": result.missing,
+ "unknown": result.unknown,
+ }
+ if args.json:
+ print(json.dumps(payload, indent=2, sort_keys=True))
+ else:
+ print(f"verified={len(result.verified)} drifted={len(result.drifted)} missing={len(result.missing)}")
+ return 0
+
+ if args.command == "dream":
+ result = ledger.compress(max_entries=args.max_entries, keep_recent=args.keep_recent, dry_run=args.dry_run)
+ print(json.dumps(result, indent=2, sort_keys=True))
+ return 0
+
+ return 1
+
+
+if __name__ == "__main__": # pragma: no cover
+ raise SystemExit(main())
diff --git a/ethos_aegis/mythos_runtime/drift.py b/ethos_aegis/mythos_runtime/drift.py
new file mode 100644
index 0000000000..8fd59b92c9
--- /dev/null
+++ b/ethos_aegis/mythos_runtime/drift.py
@@ -0,0 +1,74 @@
+from __future__ import annotations
+
+from dataclasses import dataclass, field
+from pathlib import Path
+
+from .memory import MemoryLedger
+from .swd import StrictWriteDiscipline
+
+
+@dataclass
+class DriftScanResult:
+ verified: list[str] = field(default_factory=list)
+ drifted: list[str] = field(default_factory=list)
+ missing: list[str] = field(default_factory=list)
+ unknown: list[str] = field(default_factory=list)
+
+
+class DriftDetector:
+ def __init__(
+ self,
+ root: str | Path,
+ *,
+ ledger: MemoryLedger,
+ swd: StrictWriteDiscipline | None = None,
+ ) -> None:
+ self.root = Path(root)
+ self.ledger = ledger
+ self.swd = swd or StrictWriteDiscipline(
+ root,
+ memory_ledger=ledger,
+ )
+
+ def scan(self) -> DriftScanResult:
+ last_known, missing_candidates = self._collect_last_known()
+ return self._compare_against_filesystem(
+ last_known,
+ missing_candidates,
+ )
+
+ def _collect_last_known(self) -> tuple[dict[str, str | None], set[str]]:
+ last_known: dict[str, str | None] = {}
+ missing_candidates: set[str] = set()
+ for event in self.ledger.list_events():
+ if event.event_type != "verified_write":
+ continue
+ for action in event.payload.get("verified_actions", []):
+ path = str(action.get("path") or "")
+ after = action.get("after") or {}
+ if not path:
+ continue
+ if after.get("exists"):
+ last_known[path] = after.get("sha256")
+ else:
+ missing_candidates.add(path)
+ return last_known, missing_candidates
+
+ def _compare_against_filesystem(
+ self,
+ last_known: dict[str, str | None],
+ missing_candidates: set[str],
+ ) -> DriftScanResult:
+ result = DriftScanResult()
+ for path, known_hash in last_known.items():
+ current = self.swd.snapshot([path]).get(path)
+ if current is None or not current.exists:
+ result.missing.append(path)
+ elif current.sha256 == known_hash:
+ result.verified.append(path)
+ else:
+ result.drifted.append(path)
+ for path in sorted(missing_candidates - set(last_known)):
+ if not (self.root / path).exists():
+ result.missing.append(path)
+ return result
diff --git a/ethos_aegis/mythos_runtime/memory.py b/ethos_aegis/mythos_runtime/memory.py
new file mode 100644
index 0000000000..d4ac28e97a
--- /dev/null
+++ b/ethos_aegis/mythos_runtime/memory.py
@@ -0,0 +1,127 @@
+from __future__ import annotations
+
+import json
+from dataclasses import dataclass, field
+from datetime import datetime, timezone
+from pathlib import Path
+from typing import Any, Iterable
+
+
+@dataclass
+class MemoryEvent:
+ event_type: str
+ summary: str
+ payload: dict[str, Any] = field(default_factory=dict)
+ created_at: str = field(
+ default_factory=lambda: datetime.now(timezone.utc).isoformat()
+ )
+
+ def to_markdown(self) -> str:
+ return (
+ f"## {self.created_at} Β· {self.event_type}\n"
+ f"{self.summary}\n\n"
+ f"```json\n{json.dumps(self.payload, indent=2, sort_keys=True)}\n```\n"
+ )
+
+
+class MemoryLedger:
+ HEADER = (
+ "# MEMORY\n\n"
+ "Persistent execution ledger for Ethos Aegis Γ Claude Mythos.\n\n"
+ )
+
+ def __init__(self, path: str | Path) -> None:
+ self.path = Path(path)
+
+ def ensure_exists(self) -> None:
+ if not self.path.exists():
+ self.path.parent.mkdir(parents=True, exist_ok=True)
+ self.path.write_text(self.HEADER, encoding="utf-8")
+
+ def append_event(self, event: MemoryEvent) -> None:
+ self.ensure_exists()
+ with self.path.open("a", encoding="utf-8") as handle:
+ handle.write(event.to_markdown())
+ handle.write("\n")
+
+ def list_events(self) -> list[MemoryEvent]:
+ if not self.path.exists():
+ return []
+ text = self.path.read_text(encoding="utf-8")
+ sections = [
+ section.strip()
+ for section in text.split("## ")
+ if section.strip() and "```json" in section
+ ]
+ events: list[MemoryEvent] = []
+ for section in sections:
+ try:
+ heading, rest = section.split("\n", 1)
+ summary, json_block = rest.split("```json\n", 1)
+ payload_text = json_block.split("\n```", 1)[0]
+ created_at, event_type = heading.split(" Β· ", 1)
+ events.append(
+ MemoryEvent(
+ event_type=event_type.strip(),
+ summary=summary.strip(),
+ payload=json.loads(payload_text),
+ created_at=created_at.strip(),
+ )
+ )
+ except Exception:
+ continue
+ return events
+
+ def compress(
+ self,
+ *,
+ max_entries: int = 100,
+ keep_recent: int = 20,
+ dry_run: bool = False,
+ ) -> dict[str, Any]:
+ events = self.list_events()
+ if len(events) <= max_entries:
+ return {"compressed": False, "events": len(events)}
+ preserved = events[-keep_recent:]
+ archived = events[:-keep_recent]
+ summary_payload = {
+ "archived_entries": len(archived),
+ "event_type_counts": self._type_counts(archived),
+ "from": archived[0].created_at if archived else None,
+ "to": archived[-1].created_at if archived else None,
+ }
+ summary_event = MemoryEvent(
+ event_type="dream_summary",
+ summary=(
+ "Compressed older ledger entries into a deterministic "
+ "summary block."
+ ),
+ payload=summary_payload,
+ )
+ if dry_run:
+ return {
+ "compressed": True,
+ "dry_run": True,
+ "summary": summary_payload,
+ "preserved": len(preserved),
+ }
+ self.ensure_exists()
+ content = (
+ self.HEADER
+ + summary_event.to_markdown()
+ + "\n"
+ + "\n".join(event.to_markdown() for event in preserved)
+ + "\n"
+ )
+ self.path.write_text(content, encoding="utf-8")
+ return {
+ "compressed": True,
+ "summary": summary_payload,
+ "preserved": len(preserved),
+ }
+
+ def _type_counts(self, events: Iterable[MemoryEvent]) -> dict[str, int]:
+ counts: dict[str, int] = {}
+ for event in events:
+ counts[event.event_type] = counts.get(event.event_type, 0) + 1
+ return counts
diff --git a/ethos_aegis/mythos_runtime/swd.py b/ethos_aegis/mythos_runtime/swd.py
new file mode 100644
index 0000000000..e15602b41c
--- /dev/null
+++ b/ethos_aegis/mythos_runtime/swd.py
@@ -0,0 +1,196 @@
+from __future__ import annotations
+
+import fnmatch
+import hashlib
+from dataclasses import asdict, dataclass
+from pathlib import Path
+from typing import Iterable
+
+from .memory import MemoryEvent, MemoryLedger
+
+
+@dataclass(frozen=True)
+class FileSnapshot:
+ path: str
+ exists: bool
+ size: int | None
+ sha256: str | None
+
+
+@dataclass
+class ClaimedFileAction:
+ path: str
+ action: str
+ description: str = ""
+
+
+@dataclass
+class VerificationReport:
+ ok: bool
+ claimed_actions: list[ClaimedFileAction]
+ verified_actions: list[ClaimedFileAction]
+ before: dict[str, FileSnapshot]
+ after: dict[str, FileSnapshot]
+ detail: str
+ dry_run: bool = False
+
+
+class StrictWriteDiscipline:
+ def __init__(
+ self,
+ root: str | Path,
+ *,
+ memory_ledger: MemoryLedger | None = None,
+ ignore_patterns: list[str] | None = None,
+ ) -> None:
+ self.root = Path(root)
+ self.memory_ledger = memory_ledger
+ self.ignore_patterns = ignore_patterns or [
+ ".git/*",
+ "__pycache__/*",
+ "*.pyc",
+ ]
+
+ def snapshot(self, paths: Iterable[str] | None = None) -> dict[str, FileSnapshot]:
+ if paths is None:
+ candidates = [path for path in self.root.rglob("*") if path.is_file()]
+ rel_paths = [
+ str(path.relative_to(self.root))
+ for path in candidates
+ if not self._ignored(path.relative_to(self.root))
+ ]
+ else:
+ rel_paths = [self._normalize(path) for path in paths]
+ snapshots: dict[str, FileSnapshot] = {}
+ for rel_path in rel_paths:
+ full_path = self.root / rel_path
+ if full_path.exists() and full_path.is_file():
+ data = full_path.read_bytes()
+ snapshots[rel_path] = FileSnapshot(
+ path=rel_path,
+ exists=True,
+ size=len(data),
+ sha256=hashlib.sha256(data).hexdigest(),
+ )
+ else:
+ snapshots[rel_path] = FileSnapshot(
+ path=rel_path,
+ exists=False,
+ size=None,
+ sha256=None,
+ )
+ return snapshots
+
+ def verify_claims(
+ self,
+ claimed_actions: list[ClaimedFileAction],
+ before: dict[str, FileSnapshot],
+ after: dict[str, FileSnapshot],
+ *,
+ dry_run: bool = False,
+ ) -> VerificationReport:
+ verified: list[ClaimedFileAction] = []
+ mismatches: list[str] = []
+ for action in claimed_actions:
+ before_state = before.get(
+ action.path,
+ FileSnapshot(action.path, False, None, None),
+ )
+ after_state = after.get(
+ action.path,
+ FileSnapshot(action.path, False, None, None),
+ )
+ matched = (
+ (action.action == "CREATE" and not before_state.exists and after_state.exists)
+ or (
+ action.action == "MODIFY"
+ and before_state.exists
+ and after_state.exists
+ and before_state.sha256 != after_state.sha256
+ )
+ or (action.action == "DELETE" and before_state.exists and not after_state.exists)
+ )
+ if matched or dry_run:
+ verified.append(action)
+ else:
+ mismatches.append(f"{action.action} {action.path}")
+ ok = not mismatches
+ detail = "verified" if ok else f"mismatch: {', '.join(mismatches)}"
+ report = VerificationReport(
+ ok=ok,
+ claimed_actions=claimed_actions,
+ verified_actions=verified,
+ before=before,
+ after=after,
+ detail=detail,
+ dry_run=dry_run,
+ )
+ self._record_report(report)
+ return report
+
+ def write_text(
+ self,
+ path: str | Path,
+ content: str,
+ *,
+ description: str = "",
+ dry_run: bool = False,
+ ) -> VerificationReport:
+ rel_path = self._normalize(path)
+ full_path = self.root / rel_path
+ action = "MODIFY" if full_path.exists() else "CREATE"
+ before = self.snapshot([rel_path])
+ if not dry_run:
+ full_path.parent.mkdir(parents=True, exist_ok=True)
+ full_path.write_text(content, encoding="utf-8")
+ after = self.snapshot([rel_path]) if not dry_run else before
+ return self.verify_claims(
+ [ClaimedFileAction(rel_path, action, description)],
+ before,
+ after,
+ dry_run=dry_run,
+ )
+
+ def _record_report(self, report: VerificationReport) -> None:
+ if self.memory_ledger is None:
+ return
+ payload = {
+ "ok": report.ok,
+ "detail": report.detail,
+ "dry_run": report.dry_run,
+ "claimed_actions": [
+ {
+ "path": action.path,
+ "action": action.action,
+ "description": action.description,
+ }
+ for action in report.claimed_actions
+ ],
+ "verified_actions": [
+ {
+ "path": action.path,
+ "action": action.action,
+ "description": action.description,
+ "after": (
+ asdict(report.after.get(action.path))
+ if report.after.get(action.path)
+ else None
+ ),
+ }
+ for action in report.verified_actions
+ ],
+ }
+ self.memory_ledger.append_event(
+ MemoryEvent(
+ event_type="verified_write",
+ summary="Strict write discipline verification completed.",
+ payload=payload,
+ )
+ )
+
+ def _normalize(self, path: str | Path) -> str:
+ return str(Path(path)).replace("\\", "/")
+
+ def _ignored(self, rel_path: Path) -> bool:
+ text = str(rel_path).replace("\\", "/")
+ return any(fnmatch.fnmatch(text, pattern) for pattern in self.ignore_patterns)
diff --git a/ethos_aegis/veriflow/__init__.py b/ethos_aegis/veriflow/__init__.py
new file mode 100644
index 0000000000..bc030b3fdf
--- /dev/null
+++ b/ethos_aegis/veriflow/__init__.py
@@ -0,0 +1,21 @@
+from .ckan_adapter import (
+ CKANCapabilityMatrix,
+ CKANClient,
+ CKANIngestionResult,
+ CKANVersion,
+ CapabilityRecord,
+ IngestionAttempt,
+ SchemaField,
+)
+from .immune_system import VeriflowImmuneSystem
+
+__all__ = [
+ "CKANCapabilityMatrix",
+ "CKANClient",
+ "CKANIngestionResult",
+ "CKANVersion",
+ "CapabilityRecord",
+ "IngestionAttempt",
+ "SchemaField",
+ "VeriflowImmuneSystem",
+]
diff --git a/ethos_aegis/veriflow/ckan_adapter.py b/ethos_aegis/veriflow/ckan_adapter.py
new file mode 100644
index 0000000000..d402b2f115
--- /dev/null
+++ b/ethos_aegis/veriflow/ckan_adapter.py
@@ -0,0 +1,135 @@
+from __future__ import annotations
+
+from dataclasses import dataclass, field
+from typing import Any
+
+
+@dataclass(frozen=True)
+class CKANVersion:
+ raw: str
+ major: int | None = None
+ minor: int | None = None
+ patch: int | None = None
+ prerelease: str | None = None
+
+ @classmethod
+ def parse(cls, value: str) -> "CKANVersion":
+ text = (value or "").strip()
+ if not text:
+ return cls(raw="unknown")
+ prerelease = None
+ core = text
+ for marker in ("a", "b", "rc"):
+ if marker in text:
+ idx = text.find(marker)
+ core = text[:idx]
+ prerelease = text[idx:]
+ break
+ parts = core.split(".")
+ nums: list[int | None] = []
+ for part in parts[:3]:
+ try:
+ nums.append(int(part))
+ except ValueError:
+ nums.append(None)
+ while len(nums) < 3:
+ nums.append(None)
+ return cls(
+ raw=text,
+ major=nums[0],
+ minor=nums[1],
+ patch=nums[2],
+ prerelease=prerelease,
+ )
+
+
+@dataclass
+class SchemaField:
+ name: str
+ label: str | None = None
+ description: str | None = None
+ aliases: tuple[str, ...] = ()
+ unit: str | None = None
+ field_type: str = "string"
+
+
+@dataclass
+class IngestionAttempt:
+ path: str
+ ok: bool
+ detail: str
+
+
+@dataclass
+class CapabilityRecord:
+ name: str
+ state: str
+ source: str = "unknown"
+ detail: str = ""
+
+
+@dataclass
+class CKANCapabilityMatrix:
+ api_base: str
+ version: CKANVersion
+ capabilities: dict[str, CapabilityRecord] = field(default_factory=dict)
+
+ def supports(self, name: str) -> bool:
+ record = self.capabilities.get(name)
+ return bool(record and record.state in {"available", "inferred", "partial"})
+
+ def to_dict(self) -> dict[str, Any]:
+ return {
+ "api_base": self.api_base,
+ "version": {
+ "raw": self.version.raw,
+ "major": self.version.major,
+ "minor": self.version.minor,
+ "patch": self.version.patch,
+ "prerelease": self.version.prerelease,
+ },
+ "capabilities": {
+ name: {
+ "name": record.name,
+ "state": record.state,
+ "source": record.source,
+ "detail": record.detail,
+ }
+ for name, record in self.capabilities.items()
+ },
+ }
+
+
+@dataclass
+class CKANIngestionResult:
+ resource_id: str
+ package_id: str | None
+ path: str
+ rows: list[dict[str, Any]]
+ fields: list[SchemaField]
+ resource: dict[str, Any]
+ package: dict[str, Any] | None
+ attempts: list[IngestionAttempt] = field(default_factory=list)
+ metadata: dict[str, Any] = field(default_factory=dict)
+
+
+class CKANClient:
+ def __init__(self, base_url: str, api_key: str | None = None) -> None:
+ self.base_url = base_url.rstrip("/")
+ self.api_key = api_key
+
+ def probe_capabilities(
+ self,
+ *,
+ sample_resource_id: str | None = None,
+ ) -> CKANCapabilityMatrix:
+ return CKANCapabilityMatrix(
+ api_base=f"{self.base_url}/api/3/action",
+ version=CKANVersion(raw="unknown"),
+ capabilities={},
+ )
+
+ def ingest_resource(self, resource_id: str, **_: Any) -> CKANIngestionResult:
+ raise NotImplementedError(
+ "Provide a concrete CKAN client or test double for resource ingestion."
+ )
diff --git a/ethos_aegis/veriflow/immune_system.py b/ethos_aegis/veriflow/immune_system.py
new file mode 100644
index 0000000000..813e7d314c
--- /dev/null
+++ b/ethos_aegis/veriflow/immune_system.py
@@ -0,0 +1,155 @@
+from __future__ import annotations
+
+import hashlib
+import json
+import tempfile
+from dataclasses import dataclass, field
+from pathlib import Path
+from typing import Any
+
+from ethos_aegis.mythos_runtime.memory import MemoryEvent, MemoryLedger
+from ethos_aegis.mythos_runtime.swd import StrictWriteDiscipline
+
+from .ckan_adapter import (
+ CKANCapabilityMatrix,
+ CKANClient,
+ CKANIngestionResult,
+ IngestionAttempt,
+ SchemaField,
+)
+
+
+@dataclass
+class DatasetCacheEntry:
+ resource_id: str
+ digest: str
+ rows: list[dict[str, Any]]
+ fields: list[SchemaField]
+ package_id: str | None = None
+ ingestion_path: str = "unknown"
+ ingestion_attempts: list[IngestionAttempt] = field(default_factory=list)
+ ingestion_metadata: dict[str, Any] = field(default_factory=dict)
+
+
+class VeriflowImmuneSystem:
+ def __init__(
+ self,
+ ckan: CKANClient,
+ verifier: Any | None = None,
+ *,
+ probe_on_startup: bool = True,
+ sample_resource_id: str | None = None,
+ fingerprint_mode: str = "auto",
+ persist_host_state: bool = True,
+ state_dir: str | Path | None = None,
+ ) -> None:
+ self.ckan = ckan
+ self.verifier = verifier
+ # Supported values: "auto" (default), "lightweight", "full".
+ # "auto" selects the best available fingerprinting strategy.
+ self.fingerprint_mode = fingerprint_mode
+ self._cache: dict[str, DatasetCacheEntry] = {}
+ self._capability_matrix: CKANCapabilityMatrix | None = None
+ self._probe_sample_resource_id = sample_resource_id
+ self._persist_host_state = persist_host_state
+ self._state_dir = (
+ Path(state_dir)
+ if state_dir is not None
+ else Path(tempfile.gettempdir()) / "ethos_aegis_veriflow_state"
+ )
+ self._memory_ledger = MemoryLedger(self._state_dir / "MEMORY.md")
+ self._runtime_discipline = StrictWriteDiscipline(
+ self._state_dir,
+ memory_ledger=self._memory_ledger,
+ )
+ self._state = (
+ self._load_state() if persist_host_state else {"resources": {}}
+ )
+ if probe_on_startup:
+ self.bootstrap(sample_resource_id=sample_resource_id)
+
+ @property
+ def capability_matrix(self) -> CKANCapabilityMatrix | None:
+ return self._capability_matrix
+
+ @property
+ def state_file(self) -> Path:
+ return self._state_dir / f"{self._host_key()}.json"
+
+ def _host_key(self) -> str:
+ return hashlib.sha256(self.ckan.base_url.encode("utf-8")).hexdigest()[:16]
+
+ def _load_state(self) -> dict[str, Any]:
+ path = self.state_file
+ if not path.exists():
+ return {"host": self.ckan.base_url, "resources": {}}
+ try:
+ payload = json.loads(path.read_text(encoding="utf-8"))
+ except (OSError, json.JSONDecodeError):
+ return {"host": self.ckan.base_url, "resources": {}}
+ if not isinstance(payload, dict):
+ return {"host": self.ckan.base_url, "resources": {}}
+ payload.setdefault("host", self.ckan.base_url)
+ payload.setdefault("resources", {})
+ return payload
+
+ def _save_state(self) -> None:
+ if not self._persist_host_state:
+ return
+ payload = json.dumps(self._state, indent=2, sort_keys=True)
+ self._runtime_discipline.write_text(
+ self.state_file.name,
+ payload,
+ description="Persist host capability and resource state",
+ )
+
+ def bootstrap(self, *, sample_resource_id: str | None = None) -> CKANCapabilityMatrix:
+ sample = sample_resource_id or self._probe_sample_resource_id
+ matrix = self.ckan.probe_capabilities(sample_resource_id=sample)
+ self._capability_matrix = matrix
+ self._probe_sample_resource_id = sample
+ self._state["capability_matrix"] = matrix.to_dict()
+ self._state["probe_sample_resource_id"] = sample
+ self._save_state()
+ return matrix
+
+ def refresh_resource(self, resource_id: str) -> DatasetCacheEntry:
+ if self._capability_matrix is None:
+ self.bootstrap(sample_resource_id=resource_id)
+ result: CKANIngestionResult = self.ckan.ingest_resource(resource_id)
+ digest = hashlib.sha256(
+ json.dumps(result.rows, sort_keys=True).encode("utf-8")
+ ).hexdigest()
+ entry = DatasetCacheEntry(
+ resource_id=result.resource_id,
+ digest=digest,
+ rows=result.rows,
+ fields=result.fields,
+ package_id=result.package_id,
+ ingestion_path=result.path,
+ ingestion_attempts=result.attempts,
+ ingestion_metadata=result.metadata,
+ )
+ self._cache[resource_id] = entry
+ self._state.setdefault("resources", {})[resource_id] = {
+ "digest": digest,
+ "package_id": result.package_id,
+ "ingestion_path": result.path,
+ "ingestion_metadata": result.metadata,
+ }
+ self._save_state()
+ self._memory_ledger.append_event(
+ MemoryEvent(
+ event_type="resource_refresh",
+ summary=f"Refreshed resource {resource_id} through {result.path}.",
+ payload={
+ "resource_id": resource_id,
+ "ingestion_path": result.path,
+ "rows": len(result.rows),
+ },
+ )
+ )
+ return entry
+
+ def cache_entry(self, resource_id: str) -> DatasetCacheEntry | None:
+ return self._cache.get(resource_id)
diff --git a/examples/agent_spec.example.json b/examples/agent_spec.example.json
new file mode 100644
index 0000000000..43aef1d6bb
--- /dev/null
+++ b/examples/agent_spec.example.json
@@ -0,0 +1,53 @@
+{
+ "schema_version": "1.0",
+ "creator": "TDD",
+ "system_role": "senior_ai_systems_architect",
+ "use_case": "Encrypted policy-driven local orchestrator",
+ "business_goal": "Load signed encrypted policy packs into a controlled agent runtime",
+ "users": ["operator", "developer", "reviewer"],
+ "inputs": [
+ "documents",
+ "events",
+ "tool outputs",
+ "encrypted policy packs",
+ "user instructions"
+ ],
+ "tools": [
+ "workspace runtime",
+ "file tools",
+ "code generator",
+ "policy engine",
+ "watchdog",
+ "cryptography"
+ ],
+ "responsibilities": [
+ "Break goals into steps",
+ "Choose tools when needed",
+ "Evaluate tool results",
+ "Retry if a step fails",
+ "Escalate to human when confidence is low",
+ "Stop when success criteria are met"
+ ],
+ "memory_requirements": "short-term task state plus encrypted long-term policy packs",
+ "constraints": {
+ "tech_stack": "Python",
+ "model_provider": "configurable",
+ "budget": "bounded",
+ "latency": "bounded",
+ "security_privacy": "local encrypted storage, signed manifests, no hidden access",
+ "deployment_target": "desktop/local"
+ },
+ "required_output": [
+ "System architecture",
+ "Component diagram",
+ "Folder structure",
+ "Data flow",
+ "Python starter code",
+ "Tool schema definitions",
+ "Prompt design",
+ "Safety guardrails",
+ "Evaluation checklist",
+ "Deployment steps"
+ ],
+ "success_criteria": "correct plans, auditable actions, safe execution, recoverable failures"
+}
diff --git a/examples/mythos_runtime_demo.py b/examples/mythos_runtime_demo.py
new file mode 100644
index 0000000000..d96d39a99f
--- /dev/null
+++ b/examples/mythos_runtime_demo.py
@@ -0,0 +1,22 @@
+from __future__ import annotations
+
+from pathlib import Path
+import tempfile
+
+from ethos_aegis.mythos_runtime import DriftDetector, MemoryLedger, StrictWriteDiscipline
+
+
+def main() -> None:
+ root = Path(tempfile.mkdtemp(prefix="mythos_runtime_demo_"))
+ ledger = MemoryLedger(root / "MEMORY.md")
+ swd = StrictWriteDiscipline(root, memory_ledger=ledger)
+
+ report = swd.write_text("notes/example.txt", "hello mythos\n", description="Create demo note")
+ print({"ok": report.ok, "detail": report.detail, "path": "notes/example.txt"})
+
+ drift = DriftDetector(root, ledger=ledger, swd=swd).scan()
+ print({"verified": drift.verified, "drifted": drift.drifted, "missing": drift.missing})
+
+
+if __name__ == "__main__":
+ main()
diff --git a/examples/mythos_startup.py b/examples/mythos_startup.py
new file mode 100644
index 0000000000..a48c743762
--- /dev/null
+++ b/examples/mythos_startup.py
@@ -0,0 +1,149 @@
+"""
+mythos_startup.py β Claude Mythos Γ Veriflow scaffold bootstrap example.
+
+This module demonstrates how to initialise the Mythos identity scaffold on top
+of the Veriflow immune system. It follows the recommended startup defaults from
+the Claude Mythos operating contract:
+
+ probe_on_startup=True
+ fingerprint_mode="auto"
+ datastore_lightweight only when row-level freshness matters more than probe cost
+
+Running this file directly will print the host capability profile as JSON.
+"""
+
+from __future__ import annotations
+
+import json
+import logging
+import sys
+from pathlib import Path
+
+from ethos_aegis.veriflow import CKANClient, VeriflowImmuneSystem
+
+logging.basicConfig(
+ level=logging.INFO,
+ format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
+)
+_log = logging.getLogger("mythos_startup")
+
+
+def build_mythos(
+ host_url: str,
+ sample_resource_id: str | None = None,
+ *,
+ probe_on_startup: bool = True,
+ fingerprint_mode: str = "auto",
+ state_dir: str | Path | None = None,
+) -> VeriflowImmuneSystem:
+ """Initialise the Mythos scaffold and return a bootstrapped immune system.
+
+ Parameters
+ ----------
+ host_url:
+ Base URL of the CKAN host to fingerprint and ingest from.
+ sample_resource_id:
+ Optional resource UUID used to exercise the datastore probe on startup.
+ probe_on_startup:
+ When True (the recommended default) the host capabilities are probed
+ immediately so the capability matrix is available before any ingestion.
+ fingerprint_mode:
+ Controls how the immune system identifies the host profile.
+ "auto" selects the best strategy available (recommended default).
+ state_dir:
+ Optional directory for persisting host state and the memory ledger.
+ Defaults to a temporary directory when not provided.
+
+ Returns
+ -------
+ VeriflowImmuneSystem
+ A fully bootstrapped immune system instance carrying the host's
+ capability matrix.
+ """
+ _log.info(
+ "Initialising Claude Mythos scaffold β host=%s fingerprint_mode=%s",
+ host_url,
+ fingerprint_mode,
+ )
+ ckan = CKANClient(host_url)
+ immune = VeriflowImmuneSystem(
+ ckan,
+ probe_on_startup=probe_on_startup,
+ sample_resource_id=sample_resource_id,
+ fingerprint_mode=fingerprint_mode,
+ state_dir=state_dir,
+ )
+ matrix = immune.capability_matrix
+ if matrix is not None:
+ _log.info(
+ "Host fingerprinted β version=%s capabilities=%s",
+ matrix.version.raw,
+ list(matrix.capabilities.keys()),
+ )
+ else:
+ _log.warning("Capability matrix unavailable after bootstrap.")
+ return immune
+
+
+def generate_output(immune: VeriflowImmuneSystem) -> dict:
+ """Build the expected Mythos output shape from the bootstrapped immune system.
+
+ The output follows the contract documented in
+ docs/claude-mythos-veriflow-scaffold.md:
+
+ {
+ "host_profile": "",
+ "ckan_version": "",
+ "ingestion_path": "",
+ "formula": "",
+ "limitations": []
+ }
+ """
+ matrix = immune.capability_matrix
+ if matrix is None:
+ return {
+ "host_profile": "unknown",
+ "ckan_version": "unknown",
+ "ingestion_path": "unknown",
+ "formula": None,
+ "limitations": ["capability matrix unavailable"],
+ }
+
+ has_datastore = matrix.supports("datastore")
+ has_schema = matrix.supports("schema")
+
+ if has_datastore and has_schema:
+ host_profile = "schema-rich+datastore"
+ ingestion_path = "datastore"
+ limitations: list[str] = []
+ elif has_datastore:
+ host_profile = "datastore-only"
+ ingestion_path = "datastore"
+ limitations = ["schema fields inferred from row sample"]
+ else:
+ host_profile = "metadata-only"
+ ingestion_path = "metadata"
+ limitations = ["sampled row signature used", "no datastore endpoint available"]
+
+ return {
+ "host_profile": host_profile,
+ "ckan_version": matrix.version.raw,
+ "ingestion_path": ingestion_path,
+ "formula": "ctr = clicks / impressions",
+ "limitations": limitations,
+ }
+
+
+if __name__ == "__main__":
+ host = sys.argv[1] if len(sys.argv) > 1 else "https://demo.ckan.org"
+ try:
+ mythos = build_mythos(host)
+ output = generate_output(mythos)
+ print(json.dumps(output, indent=2))
+ except (OSError, ValueError, RuntimeError) as exc:
+ _log.error("Mythos startup failed: %s", exc)
+ sys.exit(1)
+ except Exception as exc: # noqa: BLE001 β catch-all for standalone script entry point
+ _log.error("Unexpected error during Mythos startup: %s", exc)
+ sys.exit(1)
+
diff --git a/examples/pinkybot/agent_profile.example.json b/examples/pinkybot/agent_profile.example.json
new file mode 100644
index 0000000000..ea246a384f
--- /dev/null
+++ b/examples/pinkybot/agent_profile.example.json
@@ -0,0 +1,41 @@
+{
+ "name": "pinkybot-companion",
+ "display_name": "PinkyBot",
+ "model": "claude-sonnet-4-6",
+ "system_role": "persistent_ai_companion",
+ "identity": {
+ "values": [
+ "helpful",
+ "permissioned",
+ "auditable",
+ "long-term",
+ "operator-aligned"
+ ],
+ "brand_surface": "Celestial Agent",
+ "architecture_surface": "Ethos Aegis"
+ },
+ "memory": {
+ "mode": "hybrid",
+ "durable": true,
+ "semantic_recall": true,
+ "reflection_enabled": true
+ },
+ "messaging": {
+ "telegram": true,
+ "discord": false,
+ "slack": false
+ },
+ "skills": [
+ "pinkybot_companion"
+ ],
+ "permissions": {
+ "external_messaging_requires_approval": true,
+ "calendar_write_requires_approval": true,
+ "sensitive_exports_require_approval": true
+ },
+ "wake_triggers": [
+ "schedule",
+ "webhook",
+ "file_change"
+ ]
+}
diff --git a/interactive/mythos_control_panel.html b/interactive/mythos_control_panel.html
new file mode 100644
index 0000000000..3268be4322
--- /dev/null
+++ b/interactive/mythos_control_panel.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+ Ethos Aegis Γ Claude Mythos
+
+
+
+
+
+
Ethos Aegis Γ Claude Mythos
+
Interactive partner view for the Veriflow Immune System.