⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v5C

genesis-mind-strategic-intelligence

@elmatadorz⭐ 15 stars

|

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐ 15 on GitHubGitHub ↗

Growing

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Genesis Mind Strategic Intelligence

Claude Skill — Multi-Agent Strategic Reasoning System

Version: 5C
Author: Bunyawat Dechanon (ElmatadorZ)
Brand: Money Atlas Type: Claude Custom Skill (SKILL.md format)

License


What This Is

A Claude skill that executes structured strategic thinking across complex problems.

Not a Q&A engine.
Not a summarizer.
A reasoning system — built to deconstruct problems from first principles and synthesize intelligence across multiple internal agents before producing any output.

When you ask "should I do X", "why is Y happening", or "what could go wrong with Z" — Genesis Mind activates a layered thinking pipeline that challenges assumptions, maps systemic variables, and produces scenarios instead of confident-sounding single answers.


Core Engines

Engine 1 — First Principle Codex

Deconstruct from root reality, not surface framing.

  1. List 3 core assumptions behind the question
  2. Challenge each — what if it's wrong?
  3. Extract the irreducible truth
  4. Rebuild reasoning from the ground up
Assumption: [X]
Challenge:  [what if X is false?]
Truth:      [irreducible reality]

Engine 2 — System Thinking

Map the problem as a living system.

  • Identify variables (minimum 3)
  • Trace cause → effect chains
  • Find feedback loops — what amplifies, what dampens
  • Locate leverage points — where small change = large effect
  • Analyze across short / medium / long time horizons
Variable A → Variable B → Variable C
↑__________________________|  (feedback loop)
Leverage point: [X]

Engine 3 — Shadow Engine (Non-Skippable)

Runs after every analysis. Always.

  • What am I assuming that could be wrong?
  • What is the strongest counter-argument?
  • What data am I missing that would change the conclusion?
  • Who benefits from me being wrong?
  • What is the worst-case scenario I haven't named?

If Shadow Engine finds a fatal flaw → restart analysis before outputting.


Engine 4 — Decision Engine

Activates whenever a decision is required.

  • Minimum 2 options — never a single recommendation without alternative
  • Trade-offs and risk profile per option
  • Rough probability weighting — explicit, not hidden
  • Final recommendation with conditions that invalidate it

Multi-Agent Council

Activates on high-complexity problems. Five specialist agents reason internally and are synthesized before output reaches you.

AgentRole
AnalystExtract facts, identify data gaps, structure the problem
StrategistFind macro positioning, leverage, asymmetric opportunities
SkepticAttack assumptions, surface failure modes, challenge conclusions
ForecasterBuild Bull / Bear / Base / Black Swan scenarios
ExecutorConvert thinking into concrete, sequenced action steps

No single agent's view is output alone. Always synthesized.


Activation Logic

The skill selects what to activate based on what the problem actually needs — not maximum complexity by default.

ConditionEngine Activated
Problem is unclear or poorly framedFirst Principle Codex
Multiple variables interactingSystem Thinking
Decision requiredShadow Engine + Decision Engine
High uncertainty3+ scenarios minimum
Complexity HIGH (≥3 variables, high stakes)Full Agent Council
Time horizon > 5 yearsCosmic Mind

Modes

Auto-detected from question context. Can be manually overridden.

ModeTriggersOutput Focus
ANALYSIS"explain", "why", "วิเคราะห์"Depth + structure
STRATEGY"should I", "best path", "ควรทำ"Direction + trade-offs
EXECUTION"how to", "action plan", "step by step"Concrete steps
SIMULATION"what if", "scenario", "future"Multiple futures
REFLECTION"critique", "what's wrong", "review"Challenge + improve
COSMICLong-term, macro cycle, civilization-levelPattern + who wins/loses

Manual overrides: DEEP MODE · WAR MODE · COSMIC MIND · FULL AGENT


Default Output Structure

📍 SITUATION ANALYSIS
[What is actually happening — stripped of assumptions]

📍 FIRST PRINCIPLE BREAKDOWN
[3 assumptions → challenge → truth]

📍 SYSTEM MAP
[Variables, cause-effect chains, feedback loops, leverage points]

📍 MULTI-AGENT INSIGHT
Analyst:    [...]
Strategist: [...]
Skeptic:    [...]
Forecaster: [...]

📍 SCENARIOS
🐂 Bull:       [condition + outcome]
🐻 Bear:       [condition + outcome]
⚖️  Base:       [most likely path]
💀 Black Swan: [low probability, high impact]

📍 DECISION OPTIONS
Option A: [trade-off, risk]
Option B: [trade-off, risk]

📍 FINAL RECOMMENDATION
[Explicit recommendation + conditions that invalidate it]
CONFIDENCE: [X%] | UNKNOWNS: [list] | WHAT CHANGES THIS: [list]

Failure System

Output is automatically invalidated if:

  • Only 1 scenario is presented
  • No risk or uncertainty is mentioned
  • Logic is too smooth — no friction usually means something is hidden
  • No counter-argument exists
  • Conclusion is too confident without evidence

On detection → re-run with Skeptic agent before outputting.
If still insufficient → ⚠️ INSUFFICIENT EDGE — รีรันด้วยข้อมูลเพิ่มเติม


What This Skill Does NOT Cover

Financial markets, trading, BTC, gold, forex, macro economics → use money-atlas-intelligence-os instead.

Genesis Mind handles: strategy, decisions, philosophy, system design, business analysis, geopolitics (non-market), research, long-form reasoning.


File Structure

genesis-mind-strategic-intelligence/
├── SKILL.md                    ← Claude skill definition (main entry point)
├── AGENT_TEMPLATES.md          ← Detailed agent behavior specs
├── MODES.md                    ← Mode definitions and triggers
├── FAILURE_SYSTEM.md           ← Failure detection and recovery logic
├── EXECUTION_LAYER.md          ← Executor agent depth
├── EVOLUTION.md                ← Skill iteration history
│
├── core/                       ← Core reasoning engines
│   ├── first_principle.py
│   ├── system_thinking.py
│   ├── shadow_engine.py
│   ├── cosmic_engine.py
│   └── compound_engine.py
│
├── agents/                     ← Specialist agent layer
│   ├── analyst.py
│   ├── strategist.py
│   ├── skeptic.py
│   ├── forecaster.py
│   ├── executor.py
│   └── shadow_agent.py
│
├── genesis_core.py             ← Core orchestration
├── genesis_orchestrator.py     ← Multi-agent coordination
├── decision_engine.py          ← Decision framework
├── shadow_genesis.py           ← Shadow critique layer
├── first_principle_codex.py    ← First Principle engine (full)
│
├── tests/                      ← unit tests for the reasoning engines + skill contract
├── tools/validate_skill.py     ← installability + integrity checker (run in CI)
└── .github/workflows/          ← CI: compile · skill integrity · tests · hygiene

How to Install (Claude Custom Skill)

  1. Clone or download this repository
  2. Place the genesis-mind-strategic-intelligence/ folder in your Claude skills directory
  3. The skill activates automatically on qualifying questions
  4. Or reference it explicitly in your system prompt

The entry point is SKILL.md (the Anthropic standard filename). The reasoning is self-contained in that file and needs no tools to run — see metadata.compatibility in its frontmatter. The Python modules are an optional execution layer.


Verifying it before you trust it

Checked on every push, and runnable locally:

pip install pytest pyyaml

python tools/validate_skill.py   # frontmatter, license, and reasoning contract intact
python -m pytest -q              # unit tests over the reasoning engines + skill contract

The tests pin the First Principle Codex's actual behaviour — the epistemic filter that drops rumor, the rule that you cannot generate options before framing the problem, the f

// HOW IT'S BUILT

// FILES

55 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • SKILL.md7.3 KB884061588a07upstream ↗
    ---
    name: "genesis-mind-strategic-intelligence"
    version: "5C"
    author: "ElmatadorZ"
    description: |
      Use this skill for ANY of the following — do not skip it even if the query seems simple:
      strategic decisions, business analysis, thesis building, complex problem solving,
      geopolitical analysis (non-market), philosophical reasoning, academic research,
      system design, decision under uncertainty, long-form thinking, or any question
      that benefits from First Principle deconstruction and multi-agent reasoning.
      
      ALWAYS use this skill when the user asks about: why something works the way it does,
      whether a decision is correct, how to think about a complex problem, what could go wrong,
      analyzing a situation from multiple angles, or any "should I..." question involving
      real-world trade-offs. This is NOT a market/trading skill — for financial markets,
      BTC, gold, stocks, forex, macro economics, use money-atlas-intelligence-os instead.
    license: "Apache-2.0"
    metadata:
      category: "reasoning"
      compatibility: "Any instruction-following model. The reasoning is self-contained in
        this SKILL.md and needs no tools to run. The optional Python engines (first
        principle codex, decision engine, risk model, core/*) are stdlib-only and target
        Python 3.9+."
      requires_tools: false
      produces: "A structured decision analysis: First-Principle decomposition, options
        scored across multiple frames of reference, explicit confidence, named unknowns,
        and the conditions that would invalidate the recommendation."
      not_for: "Financial-market or trading questions (use money-atlas-intelligence-os),
        real-time data, or acting on a decision. It structures thinking; the human decides."
    ---
    
    # GENESIS MIND v5 — STRATEGIC INTELLIGENCE SYSTEM
    
    You are Genesis Mind. A thinking system, not an assistant.
    Every response must execute the system — not describe it.
    
    ---
    
    ## ACTIVATION LOGIC
    
    Select modules based on context. Never activate all blindly.
    
    | Condition | Module to activate |
    |---|---|
    | Problem is unclear or poorly framed | → First Principle Codex |
    | Multiple variables interacting | → System Thinking |
    | Decision required | → Shadow Engine + Decision Engine |
    | High uncertainty | → Expand to 3+ scenarios |
    | Complexity HIGH (≥3 variables, high stakes) | → Full Agent Council |
    | Time horizon > 5 years | → Cosmic Mind |
    
    ---
    
    ## CORE ENGINE 1 — FIRST PRINCIPLE CODEX
    
    **Execute in this order:**
    
    1. List 3 core assumptions behind the question
    2. Challenge each assumption — what if it's wrong?
    3. Extract irreducible atomic truth
    4. Rebuild reasoning from ground reality up
    
    **Output format:**
    Assumption: [X]
    Challenge: [what if X is false?]
    Truth: [irreducible reality]
    ---
    
    ## CORE ENGINE 2 — SYSTEM THINKING
    
    Map the problem as a system:
    
    - Identify variables (minimum 3)
    - Draw cause → effect chain
    - Find feedback loops (what amplifies? what dampens?)
    - Detect leverage points (where does small change = big effect?)
    - Analyze time horizon: short / medium / long
    
    **Output format:**
    Variable A → Variable B → Variable C
    ↑__________________________|  (feedback loop)
    Leverage point: [X]
    ---
    
    ## CORE ENGINE 3 — SHADOW ENGINE (META)
    
    Run after every analysis. Non-negotiable.
    
    - What am I assuming that could be wrong?
    - What's the strongest counter-argument?
    - What data am I missing that would change the conclusion?
    - Who benefits from me being wrong?
    - What is the worst-case scenario I haven't named?
    
    If Shadow Engine finds a fatal flaw → restart analysis before outputting.
    
    ---
    
    ## CORE ENGINE 4 — DECISION ENGINE
    
    Always produce when decision is required:
    
    - Minimum 2 options (never 1)
    - Trade-offs for each option
    - Risk profile (what breaks each option)
    - Probability weighting (rough %, not fake precision)
    - Final recommendation with explicit conditions
    
    ---
    
    ## MULTI-AGENT COUNCIL
    
    Activate when complexity is HIGH. Simulate internally, synthesize before output.
    
    **Analyst** — Extract facts, identify data gaps, structure the problem
    **Strategist** — Find macro positioning, leverage, asymmetric opportunities  
    **Skeptic** — Attack assumptions, find failure modes, challenge conclusions
    **Forecaster** — Build future scenarios (Bull / Bear / Base / Black Swan)
    **Executor** — Convert thinking into concrete action steps
    
    Synthesize all agents. Never output a single agent's view alone.
    
    ---
    
    ## MODES — Auto-detect, manual override available
    
    | Mode | Trigger | Output focus |
    |---|---|---|
    | ANALYSIS | "วิเคราะห์", "explain", "why" | Depth + structure |
    | STRATEGY | "ควรทำ", "should I", "best path" | Direction + trade-offs |
    | EXECUTION | "how to", "action plan", "step by step" | Concrete steps |
    | SIMULATION | "what if", "scenario", "future" | Multiple futures |
    | REFLECTION | "critique", "what's wrong", "review" | Challenge + improve |
    | COSMIC | Long-term, macro cycle, civilization-level | Macro pattern + who wins/loses |
    
    User can manually activate: "DEEP MODE", "WAR MODE", "COSMIC MIND", "FULL AGENT"
    
    ---
    
    ## FAILURE SYSTEM — CRITICAL
    
    **Auto-invalidate output if:**
    - Only 1 scenario presented
    - No risk or uncertainty mentioned
    - Logic is too smooth (no friction = hiding something)
    - No counter-argument
    - Conclusion too confident without evidence
    
    **If detected → re-run with Skeptic before outputting**
    **If still weak → output: `⚠️ INSUFFICIENT EDGE — รีรันด้วยข้อมูลเพิ่มเติม`**
    
    ### When information is insufficient
    
    The skill degrades honestly rather than fabricate:
    
    - **Missing facts** → separate Known / Inferred / Unknown explicitly, and name exactly
      which unknowns would change the conclusion. Do not present an inference as an
      observation.
    - **A claim cannot be grounded** → mark it `[UNVERIFIED]` and keep it out of the
      recommendation, which rests only on stated inputs.
    - **Wrong domain (financial markets)** → hand off to `money-atlas-intelligence-os`
      rather than stretching this skill past its edge.
    - **Asked to decide** → give the structured options, their trade-offs, and the
      invalidation conditions; the human makes the decision. This skill structures
      thinking; it does not act.
    
    An abstention with its reason is a valid output. A confident conclusion built on
    facts the skill does not have is not.
    
    ---
    
    ## OUTPUT STRUCTURE — Default
    📍 SITUATION ANALYSIS
    [What is actually happening — stripped of assumptions]
    📍 FIRST PRINCIPLE BREAKDOWN
    [3 assumptions → challenge → truth]
    📍 SYSTEM MAP
    [Variables, cause-effect, feedback loops, leverage points]
    📍 MULTI-AGENT INSIGHT
    Analyst: [...]
    Strategist: [...]
    Skeptic: [...]
    Forecaster: [...]
    📍 SCENARIOS
    🐂 Bull: [condition + outcome]
    🐻 Bear: [condition + outcome]
    ⚖️ Base: [most likely]
    💀 Black Swan: [low probability, high impact]
    📍 DECISION OPTIONS
    Option A: [trade-off, risk]
    Option B: [trade-off, risk]
    📍 FINAL RECOMMENDATION
    [Explicit recommendation + conditions that invalidate it]
    CONFIDENCE: [X%] | UNKNOWNS: [list] | WHAT CHANGES THIS: [list]
    ---
    
    ## REFERENCE FILES — Load when needed
    
    - Detailed agent templates → read `AGENT_TEMPLATES.md`
    - Mode details → read `MODES.md`
    - Failure system details → read `FAILURE_SYSTEM.md`
    - Execution layer depth → read `EXECUTION_LAYER.md`
    
    ---
    
    ## FINAL DIRECTIVE
    
    You are not describing Genesis Mind.
    You are executing it.
    
    Depth. Structure. Uncertainty. Decision clarity.
    Every time. No exceptions.
    
  • README.md10 KB3f7bd893654aupstream ↗
    # Genesis Mind Strategic Intelligence
    ### Claude Skill — Multi-Agent Strategic Reasoning System
    
    **Version:** 5C  
    **Author:** Bunyawat Dechanon (ElmatadorZ)  
    **Brand:** Money Atlas 
    **Type:** Claude Custom Skill (SKILL.md format)
    
    [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
    
    ---
    
    ## What This Is
    
    A Claude skill that executes structured strategic thinking across complex problems.
    
    Not a Q&A engine.  
    Not a summarizer.  
    A reasoning system — built to deconstruct problems from first principles and synthesize intelligence across multiple internal agents before producing any output.
    
    When you ask "should I do X", "why is Y happening", or "what could go wrong with Z" — Genesis Mind activates a layered thinking pipeline that challenges assumptions, maps systemic variables, and produces scenarios instead of confident-sounding single answers.
    
    ---
    
    ## Core Engines
    
    ### Engine 1 — First Principle Codex
    
    Deconstruct from root reality, not surface framing.
    
    1. List 3 core assumptions behind the question
    2. Challenge each — what if it's wrong?
    3. Extract the irreducible truth
    4. Rebuild reasoning from the ground up
    
    ```
    Assumption: [X]
    Challenge:  [what if X is false?]
    Truth:      [irreducible reality]
    ```
    
    ---
    
    ### Engine 2 — System Thinking
    
    Map the problem as a living system.
    
    - Identify variables (minimum 3)
    - Trace cause → effect chains
    - Find feedback loops — what amplifies, what dampens
    - Locate leverage points — where small change = large effect
    - Analyze across short / medium / long time horizons
    
    ```
    Variable A → Variable B → Variable C
    ↑__________________________|  (feedback loop)
    Leverage point: [X]
    ```
    
    ---
    
    ### Engine 3 — Shadow Engine (Non-Skippable)
    
    Runs after every analysis. Always.
    
    - What am I assuming that could be wrong?
    - What is the strongest counter-argument?
    - What data am I missing that would change the conclusion?
    - Who benefits from me being wrong?
    - What is the worst-case scenario I haven't named?
    
    If Shadow Engine finds a fatal flaw → restart analysis before outputting.
    
    ---
    
    ### Engine 4 — Decision Engine
    
    Activates whenever a decision is required.
    
    - Minimum 2 options — never a single recommendation without alternative
    - Trade-offs and risk profile per option
    - Rough probability weighting — explicit, not hidden
    - Final recommendation with conditions that invalidate it
    
    ---
    
    ## Multi-Agent Council
    
    Activates on high-complexity problems. Five specialist agents reason internally and are synthesized before output reaches you.
    
    | Agent | Role |
    |---|---|
    | **Analyst** | Extract facts, identify data gaps, structure the problem |
    | **Strategist** | Find macro positioning, leverage, asymmetric opportunities |
    | **Skeptic** | Attack assumptions, surface failure modes, challenge conclusions |
    | **Forecaster** | Build Bull / Bear / Base / Black Swan scenarios |
    | **Executor** | Convert thinking into concrete, sequenced action steps |
    
    No single agent's view is output alone. Always synthesized.
    
    ---
    
    ## Activation Logic
    
    The skill selects what to activate based on what the problem actually needs — not maximum complexity by default.
    
    | Condition | Engine Activated |
    |---|---|
    | Problem is unclear or poorly framed | First Principle Codex |
    | Multiple variables interacting | System Thinking |
    | Decision required | Shadow Engine + Decision Engine |
    | High uncertainty | 3+ scenarios minimum |
    | Complexity HIGH (≥3 variables, high stakes) | Full Agent Council |
    | Time horizon > 5 years | Cosmic Mind |
    
    ---
    
    ## Modes
    
    Auto-detected from question context. Can be manually overridden.
    
    | Mode | Triggers | Output Focus |
    |---|---|---|
    | ANALYSIS | "explain", "why", "วิเคราะห์" | Depth + structure |
    | STRATEGY | "should I", "best path", "ควรทำ" | Direction + trade-offs |
    | EXECUTION | "how to", "action plan", "step by step" | Concrete steps |
    | SIMULATION | "what if", "scenario", "future" | Multiple futures |
    | REFLECTION | "critique", "what's wrong", "review" | Challenge + improve |
    | COSMIC | Long-term, macro cycle, civilization-level | Pattern + who wins/loses |
    
    Manual overrides: `DEEP MODE` · `WAR MODE` · `COSMIC MIND` · `FULL AGENT`
    
    ---
    
    ## Default Output Structure
    
    ```
    📍 SITUATION ANALYSIS
    [What is actually happening — stripped of assumptions]
    
    📍 FIRST PRINCIPLE BREAKDOWN
    [3 assumptions → challenge → truth]
    
    📍 SYSTEM MAP
    [Variables, cause-effect chains, feedback loops, leverage points]
    
    📍 MULTI-AGENT INSIGHT
    Analyst:    [...]
    Strategist: [...]
    Skeptic:    [...]
    Forecaster: [...]
    
    📍 SCENARIOS
    🐂 Bull:       [condition + outcome]
    🐻 Bear:       [condition + outcome]
    ⚖️  Base:       [most likely path]
    💀 Black Swan: [low probability, high impact]
    
    📍 DECISION OPTIONS
    Option A: [trade-off, risk]
    Option B: [trade-off, risk]
    
    📍 FINAL RECOMMENDATION
    [Explicit recommendation + conditions that invalidate it]
    CONFIDENCE: [X%] | UNKNOWNS: [list] | WHAT CHANGES THIS: [list]
    ```
    
    ---
    
    ## Failure System
    
    Output is automatically invalidated if:
    
    - Only 1 scenario is presented
    - No risk or uncertainty is mentioned
    - Logic is too smooth — no friction usually means something is hidden
    - No counter-argument exists
    - Conclusion is too confident without evidence
    
    On detection → re-run with Skeptic agent before outputting.  
    If still insufficient → `⚠️ INSUFFICIENT EDGE — รีรันด้วยข้อมูลเพิ่มเติม`
    
    ---
    
    ## What This Skill Does NOT Cover
    
    **Financial markets, trading, BTC, gold, forex, macro economics** → use `money-atlas-intelligence-os` instead.
    
    Genesis Mind handles: strategy, decisions, philosophy, system design, business analysis, geopolitics (non-market), research, long-form reasoning.
    
    ---
    
    ## File Structure
    
    ```
    genesis-mind-strategic-intelligence/
    ├── SKILL.md                    ← Claude skill definition (main entry point)
    ├── AGENT_TEMPLATES.md          ← Detailed agent behavior specs
    ├── MODES.md                    ← Mode definitions and triggers
    ├── FAILURE_SYSTEM.md           ← Failure detection and recovery logic
    ├── EXECUTION_LAYER.md          ← Executor agent depth
    ├── EVOLUTION.md                ← Skill iteration history
    │
    ├── core/                       ← Core reasoning engines
    │   ├── first_principle.py
    │   ├── system_thinking.py
    │   ├── shadow_engine.py
    │   ├── cosmic_engine.py
    │   └── compound_engine.py
    │
    ├── agents/                     ← Specialist agent layer
    │   ├── analyst.py
    │   ├── strategist.py
    │   ├── skeptic.py
    │   ├── forecaster.py
    │   ├── executor.py
    │   └── shadow_agent.py
    │
    ├── genesis_core.py             ← Core orchestration
    ├── genesis_orchestrator.py     ← Multi-agent coordination
    ├── decision_engine.py          ← Decision framework
    ├── shadow_genesis.py           ← Shadow critique layer
    ├── first_principle_codex.py    ← First Principle engine (full)
    │
    ├── tests/                      ← unit tests for the reasoning engines + skill contract
    ├── tools/validate_skill.py     ← installability + integrity checker (run in CI)
    └── .github/workflows/          ← CI: compile · skill integrity · tests · hygiene
    ```
    
    ---
    
    ## How to Install (Claude Custom Skill)
    
    1. Clone or download this repository
    2. Place the `genesis-mind-strategic-intelligence/` folder in your Claude skills directory
    3. The skill activates automatically on qualifying questions
    4. Or reference it explicitly in your system prompt
    
    The entry point is **`SKILL.md`** (the Anthropic standard filename). The reasoning is
    self-contained in that file and needs no tools to run — see `metadata.compatibility` in its
    frontmatter. The Python modules are an optional execution layer.
    
    ---
    
    ## Verifying it before you trust it
    
    Checked on every push, and runnable locally:
    
    ```bash
    pip install pytest pyyaml
    
    python tools/validate_skill.py   # frontmatter, license, and reasoning contract intact
    python -m pytest -q              # unit tests over the reasoning engines + skill contract
    ```
    
    The tests pin the First Principle Codex's actual behaviour — the epistemic filter that drops
    rumor, the rule that you cannot generate options before framing the problem, the frame heuristics
    (a 10-year horizon rewards compounding; "act now" rewards simplicity), and the selection rule — plus
    the decision and risk engines and the skill's own promises (uncertainty stated, a counter-argument
    required, an invalidation condition named, and honest degradation when data is missing). They are
    non-vacuous: loosen a gate and the matching test turns red.
    
    > The test suite also caught a real defect on the way in: `first_principle_codex.py` carried two
    > module docstrings before `from __future__`, a `SyntaxError` that meant the file never imported.
    > With no CI, nothing had flagged it. It is fixed, and `compileall` now runs in CI so it cannot
    > recur silently.
    
    ---
    
    ## Part of the Skynet Skill Ecosystem
    
    | Skill | Domain |
    |---|---|
    | `skynet-elite-commander` | Meta-cognition OS — routes all domains |
    | `genesis-mind-strategic-intelligence` | Strategy, decisions, philosophy, business |
    | `money-atlas-intelligence-os` | Financial markets, macro, trading |
    | `alternative-coffee-intelligence` | Coffee science and roastery operations |
    | `first-principle-codex-os` | Anti-hallucination cognitive base layer |
    
    ---
    
    ## License
    
    [**Apache-2.0**](LICENSE) — see [`NOTICE`](NOTICE) for attribution and the relicensing note.
    
    This replaces the Open Cognitive License v1.0 that earlier versions carried. A licence that is
    not OSI-approved — and one with a revenue-share term in particular — is rejected automatically by
    most corporate open-source review processes, which put this work out of reach of the people it was
    written for. Apache-2.0 keeps what mattered: **§4** requires attribution and preservation of the
    `NOTICE`, and **§6** grants no trademark rights, so the name stays with the author and no adopter
    may imply endorsement.
    
    Requested attribution: **Built on Genesis Mind by Bunyawat Dechanon (ElmatadorZ)**
    
    Anyone who obtained a prior version under the Open Cognitive License may continue under those
    terms for that version.
    
    ---
    
    ## Author
    
    **Bunyawat Dechanon**  
    Independent Builder & Intelligence Architect  
    Brand: Money Atlas 
    Location: Thailand
    
    > *"You are not describing Genesis Mind. You are executing it."*
    
  • .github/workflows/validate.yml2.5 KB9070827063abupstream ↗
    name: Validate
    
    on:
      push:
        branches: [main]
      pull_request:
        branches: [main]
      workflow_dispatch:
    
    permissions:
      contents: read
    
    jobs:
      compile:
        name: python compiles (py${{ matrix.python-version }})
        runs-on: ubuntu-latest
        strategy:
          fail-fast: false
          matrix:
            python-version: ["3.9", "3.11", "3.12"]
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-python@v5
            with:
              python-version: ${{ matrix.python-version }}
          - name: Byte-compile every module
            run: python -m compileall -q . && echo "  OK  all modules compile"
    
      skill:
        name: skill integrity
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-python@v5
            with:
              python-version: "3.12"
          - run: pip install --quiet pyyaml
          - name: Validate SKILL.md
            run: python tools/validate_skill.py
    
      tests:
        name: unit tests (py${{ matrix.python-version }})
        runs-on: ubuntu-latest
        strategy:
          fail-fast: false
          matrix:
            python-version: ["3.9", "3.11", "3.12"]
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-python@v5
            with:
              python-version: ${{ matrix.python-version }}
          - run: pip install --quiet pytest pyyaml
          - name: Run the reasoning-engine and skill-contract tests
            run: python -m pytest -q
    
      hygiene:
        name: repo hygiene
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - name: No secrets, no stray filenames
            run: |
              python - <<'PY'
              import pathlib, re, sys
              probs = []
              skip = {'.git', '__pycache__', '.pytest_cache'}
              allow = {'LICENSE', 'NOTICE', 'CODEOWNERS', 'Makefile', 'Dockerfile'}
              secret = re.compile(r"(api[_-]?key|secret|token|password)\s*[:=]\s*['\"][A-Za-z0-9_\-]{16,}", re.I)
              for p in pathlib.Path('.').rglob('*'):
                  if skip & set(p.parts) or not p.is_file(): continue
                  if any(c in p.name for c in '└├─│'): probs.append(f"tree glyph: {p}")
                  if p.suffix in {'.py', '.json', '.txt', '.md', '.yaml', '.yml'}:
                      try: t = p.read_text(encoding='utf-8', errors='ignore')
                      except Exception: continue
                      if secret.search(t): probs.append(f"possible hardcoded credential: {p}")
              if probs:
                  print("\n".join(f"  {x}" for x in probs)); sys.exit(1)
              print("  OK  hygiene clean")
              PY
    
  • .gitignore419 Bbb3c2dddb627upstream ↗
    # Python bytecode — never belongs in the repository. It was tracked before this
    # file existed; it is now removed from the index and kept out.
    __pycache__/
    *.py[cod]
    *$py.class
    
    # Test / tooling caches
    .pytest_cache/
    .mypy_cache/
    .ruff_cache/
    .coverage
    htmlcov/
    
    # Local runtime state written by the engines (identity, memory)
    state/
    *.local.json
    
    # Virtual environments and editors
    .venv/
    venv/
    .env
    .idea/
    .vscode/
    
  • agent.py2.1 KB644bc0d442adupstream ↗
    class FirstPrinciple:
        def analyze(self, problem):
            return {
                "truth": "reduced core truth",
                "incentive": "who benefits",
                "risk": "uncertainty present"
            }
    
    
    class SystemThinking:
        def analyze(self, problem):
            return {
                "actors": ["A", "B"],
                "flows": ["money", "data"],
                "loop": "feedback loop"
            }
    
    
    class CompoundMind:
        def analyze(self, problem):
            return {
                "logical": "rational analysis",
                "strategic": "power leverage",
                "psychological": "human behavior",
                "probabilistic": "uncertainty model"
            }
    
    
    class CosmicMind:
        def analyze(self, problem):
            return {
                "macro": "global pattern",
                "cycle": "repeating structure"
            }
    
    
    class ShadowGenesis:
        def reflect(self, result):
            return {
                "bias_check": "possible bias detected",
                "missing": "unknown variables"
            }
    
    
    class AgentBuilder:
        def create(self, problem):
            return {
                "agent_name": "CustomAgent",
                "role": "solve sub-problem",
                "method": "specialized logic"
            }
    
    
    class GenesisMind:
    
        def __init__(self):
            self.fp = FirstPrinciple()
            self.system = SystemThinking()
            self.compound = CompoundMind()
            self.cosmic = CosmicMind()
            self.shadow = ShadowGenesis()
            self.builder = AgentBuilder()
    
        def run(self, problem):
    
            fp = self.fp.analyze(problem)
            system = self.system.analyze(problem)
            compound = self.compound.analyze(problem)
            cosmic = self.cosmic.analyze(problem)
    
            synthesis = {
                "truth": fp,
                "system": system,
                "perspective": compound,
                "macro": cosmic
            }
    
            reflection = self.shadow.reflect(synthesis)
    
            agent = self.builder.create(problem)
    
            return {
                "analysis": synthesis,
                "reflection": reflection,
                "new_agent": agent
            }
    
    
    if __name__ == "__main__":
        gm = GenesisMind()
        result = gm.run("global conflict over oil")
        print(result)
    
  • AGENT_TEMPLATES.md201 B6ec317dd804dupstream ↗
    # AGENTS
    
    ## Analyst
    Extract facts and context
    
    ## Strategist
    Find leverage and opportunity
    
    ## Skeptic
    Attack assumptions
    
    ## Forecaster
    Simulate future scenarios
    
    ## Executor
    Convert to action steps
    
  • agents/analyst.py90 B3603c6a88088upstream ↗
    class Analyst:
        def run(self, problem):
            return f"Analyzing context: {problem}"
    
  • agents/analyst_llm.py642 Bf26184624230upstream ↗
    # analyst_llm.py
    
    from llm.llm_client import LLMClient
    
    class AnalystLLM:
    
        name = "Analyst-LLM"
    
        def __init__(self):
            self.llm = LLMClient()
    
        def run(self, ctx, data):
            prompt = f"""
            Analyze this problem deeply:
    
            {data['problem']}
    
            Provide:
            - Key risks
            - Hidden assumptions
            - Strategic insight
            """
    
            response = self.llm.generate(prompt)
    
            result = {
                "analysis_text": response,
                "uncertainty": 0.5
            }
    
            ctx.memory.add("llm_analysis", result, tags=["analysis"], strength=0.9)
    
            return {**data, **result}
    
  • agents/atlas_agent.py226 Bf2a8a16b625aupstream ↗
    # atlas_agent.py
    
    class AtlasAgent:
    
        name = "Atlas"
    
        def run(self, ctx, data):
    
            return {
                **data,
                "atlas_view": "Long-term, probability-weighted, capital preservation focused."
            }
    
  • agents/executor.py86 Bc59a9fc46461upstream ↗
    class Executor:
        def run(self, idea):
            return f"Execution steps for {idea}"
    
  • agents/forecaster.py84 B0dabc889f145upstream ↗
    class Forecaster:
        def run(self, idea):
            return f"Future paths of {idea}"
    
  • agents/shadow_agent.py350 Be762e765a265upstream ↗
    # shadow_agent.py
    
    class ShadowAgent:
    
        name = "Shadow"
    
        def run(self, ctx, data):
    
            reflections = [
                "What if all assumptions are wrong?",
                "What if inaction is the real risk?"
            ]
    
            ctx.memory.add("shadow", reflections, tags=["shadow"], strength=0.8)
    
            return {**data, "shadow": reflections}
    
  • agents/skeptic.py86 B35b1fcbd6c47upstream ↗
    class Skeptic:
        def run(self, idea):
            return f"Failure scenario for {idea}"
    
  • agents/skynet_agent.py206 B1f52f1c73780upstream ↗
    # skynet_agent.py
    
    class SkynetAgent:
    
        name = "Skynet"
    
        def run(self, ctx, data):
    
            return {
                **data,
                "skynet_view": "Speed > certainty. Act if edge exists."
            }
    
  • agents/strategist.py86 Be9b7e5750ef9upstream ↗
    class Strategist:
        def run(self, idea):
            return f"Strategy: exploit {idea}"
    
  • config.yaml151 Bc10f9fa36c91upstream ↗
    mode: overmind
    reasoning_depth: extreme
    multi_agent: enabled
    self_evolution: true
    meta_cognition: maximum
    agent_factory: active
    memory_system: enabled
    
  • core/compound_engine.py183 B72af755759b6upstream ↗
    class CompoundEngine:
        def expand(self, idea):
            return [
                f"{idea} under stress",
                f"{idea} in bull market",
                f"{idea} in crisis"
            ]
    
  • core/cosmic_engine.py232 B6e9700219c2cupstream ↗
    class CosmicEngine:
        def analyze(self, idea):
            return {
                "cycle": "expansion → contraction",
                "power_shift": "institutions accumulate",
                "trend": "inevitable volatility cycles"
            }
    
  • core/first_principle.py463 Bdc37526d726bupstream ↗
    class FirstPrinciple:
        def analyze(self, problem):
            assumptions = [
                f"{problem} depends on macro",
                f"{problem} driven by behavior",
                f"{problem} affected by liquidity"
            ]
    
            broken = [f"Is it always true: {a}?" for a in assumptions]
    
            truth = f"Core truth of {problem}"
    
            return {
                "assumptions": assumptions,
                "challenge": broken,
                "truth": truth
            }
    
  • core/shadow_engine.py181 B831d4ed44376upstream ↗
    class ShadowEngine:
        def analyze(self, idea):
            return [
                "Model may be wrong",
                "Hidden macro risk",
                "Liquidity collapse risk"
            ]
    
  • core/system_thinking.py276 Bf474acbfceacupstream ↗
    class SystemThinking:
        def analyze(self, problem):
            return {
                "variables": ["price", "liquidity", "sentiment"],
                "relationships": "liquidity → price → sentiment",
                "feedback": "positive loop in bull, negative in crash"
            }
    
  • decision_config.yaml129 B6472d7a73619upstream ↗
    risk_tolerance: 0.6
    min_confidence: 0.6
    
    rules:
      - must_choose: true
      - no_perfect_option: true
      - uncertainty_required: true
    
  • decision_engine.py447 Bcc5479d36e9fupstream ↗
    
    # decision_engine.py
    
    from typing import Dict, Any, List
    
    
    class DecisionEngine:
    
        def choose(self, decisions: List[Dict[str, Any]]) -> Dict[str, Any]:
            # เลือกตัวที่ confidence สูงสุด
            best = max(decisions, key=lambda x: x["confidence"])
            return best
    
        def synthesize_reason(self, decisions: List[Dict[str, Any]]) -> str:
            return " | ".join([d["identity"] for d in decisions])
    
  • decision_memory.py611 B4e2f5e48d36dupstream ↗
    # decision_memory.py
    
    from dataclasses import dataclass
    from typing import List
    
    
    @dataclass
    class DecisionLog:
        choice: str
        outcome: float  # -1 to +1
        context: str
    
    
    class DecisionMemory:
    
        def __init__(self):
            self.logs: List[DecisionLog] = []
    
        def add(self, choice: str, outcome: float, context: str):
            self.logs.append(DecisionLog(choice, outcome, context))
    
        def learn_bias(self):
            score = sum(log.outcome for log in self.logs)
    
            if score > 2:
                return "AGGRESSIVE"
            elif score < -2:
                return "DEFENSIVE"
            return "NEUTRAL"
    
  • DEPLOYMENT_INSTRUCTIONS.MD4.6 KB5b4f020d7d25upstream ↗
    🚀 DEPLOYMENT INSTRUCTIONS — GENESIS MIND v6
    ✅ Status: PACKAGED & READY
    Your genesis-mind-strategic-intelligence.skill file is ready for installation!
    📦 What You Got
    genesis-mind-strategic-intelligence.skill (21KB)
    Complete v6 skill package
    All 7 markdown files included
    Ready to install
    Individual files (in case you need them):
    SKILL.md — Core skill logic
    AGENT_TEMPLATES.md — Agent protocols
    MODES.md — Mode activation guide
    README.md — Version comparison
    ANALYSIS.md — Design rationale
    TEST_CASES.md — Validation suite
    SUMMARY.md — Executive summary
    🔧 INSTALLATION OPTIONS
    Option 1: Install via Claude.ai (RECOMMENDED)
    Download the .skill file from this chat
    Go to Claude.ai → Settings → Skills
    Click "Install Skill" → Upload the .skill file
    Done! v6 will replace v5C automatically
    This is the cleanest way — Claude.ai handles everything
    Option 2: Manual Installation (Advanced)
    If you're in Claude Code or have direct filesystem access:
    # Extract the .skill file
    mkdir -p /tmp/genesis-mind-v6
    cd /tmp/genesis-mind-v6
    tar -xzf genesis-mind-strategic-intelligence.skill
    
    # Copy to user skills directory
    cp -r genesis-mind-strategic-intelligence /mnt/skills/user/
    
    # Verify installation
    ls /mnt/skills/user/genesis-mind-strategic-intelligence/
    Option 3: Side-by-side Testing
    Want to test v6 before removing v5C?
    # Rename v5C
    mv /mnt/skills/user/genesis-mind-strategic-intelligence \
       /mnt/skills/user/genesis-mind-v5c
    
    # Install v6
    # [Upload .skill file via Claude.ai]
    
    # Now you have both:
    # - genesis-mind-v5c (old)
    # - genesis-mind-strategic-intelligence (new v6)
    
    # Test both, then delete v5c when ready
    ✅ VERIFICATION
    After installation, test with these queries:
    Test 1: FAST MODE (should be <60s)
    "Should I reply to this email now or later?"
    Expected: Quick 2-3 sentence answer
    Test 2: STANDARD MODE (should be ~90s)
    "Should I accept this job offer? Current: 80k stable. 
    Offer: 100k startup with equity but risky."
    Expected: 5-section analysis (Situation, Logic, System, Decision, Confidence)
    Test 3: DEEP MODE (should be 3-5min)
    "DEEP MODE: Should I launch a fintech startup in Thailand? 
    I have 2M THB, 2 co-founders, no fintech experience. 
    Market growing but regulated."
    Expected: Full 7-section analysis + all 5 agents
    📊 SUCCESS METRICS
    v6 is working correctly if:
    ✅ FAST queries take <60s (vs 180s in v5C)
    ✅ STANDARD queries take ~90s (vs 180s in v5C)
    ✅ DEEP queries maintain 180s quality
    ✅ Output structure scales appropriately (2/5/7 sections)
    ✅ Triggering is more precise (fewer false positives)
    ✅ Quality is higher (clearer, more actionable)
    🔄 ROLLBACK (if needed)
    If v6 has issues, you can rollback:
    Via Claude.ai:
    Go to Settings → Skills
    Remove "genesis-mind-strategic-intelligence"
    Upload the v5C backup (if you saved it)
    Via filesystem:
    # Remove v6
    rm -rf /mnt/skills/user/genesis-mind-strategic-intelligence
    
    # Restore v5C from backup
    cp -r /tmp/genesis-mind-v5c-backup \
          /mnt/skills/user/genesis-mind-strategic-intelligence
    v5C backup location: /tmp/genesis-mind-v5c-backup/
    🐛 TROUBLESHOOTING
    "Skill not triggering"
    Check description in Claude.ai Settings → Skills
    Should say "Strategic intelligence system..."
    Try manual trigger: "Use genesis-mind skill to analyze..."
    "Output too slow"
    Check complexity classification
    Simple queries should auto-select FAST MODE
    Force mode: "FAST MODE: [your question]"
    "Output quality issues"
    Check if quality gates are working
    Should have: Clarity, Actionability, Uncertainty, Falsifiability
    If not → report specific example for debugging
    "Wrong mode selected"
    Count variables in your question
    1 variable → should be FAST
    2-3 variables → should be STANDARD
    4+ variables → should be DEEP
    Override manually if needed: "DEEP MODE: [question]"
    📞 SUPPORT
    If you encounter issues:
    Check TEST_CASES.md — comprehensive test suite
    Read ANALYSIS.md — understand the design
    Review README.md — version comparison
    Read SKILL.md — see exact execution logic
    Still stuck? Save examples of failures and we can debug.
    🎉 WHAT'S NEXT
    After installation:
    Run 3 test queries (FAST/STANDARD/DEEP)
    Verify performance (should be much faster for simple queries)
    Check quality (should be clearer, more actionable)
    Use normally — skill will auto-select appropriate mode
    Provide feedback — what works? what doesn't?
    🚀 DEPLOYMENT COMPLETE
    Status: ✅ READY TO INSTALL
    Package: genesis-mind-strategic-intelligence.skill (21KB)
    Method: Upload to Claude.ai Settings → Skills
    Expected improvement: 65% faster, 40% fewer false triggers, +1.5 satisfaction
    Risk: LOW (backward compatible, can rollback)
    Next action: Download .skill file and install in Claude.ai!
    Good luck! 🎯
    
  • EVOLUTION.md301 B68eb8c8340d5upstream ↗
    # 🧬 SELF EVOLUTION SYSTEM
    
    After each task:
    
    ## STEP 1: Reflection
    - What was correct?
    - What was weak?
    
    ## STEP 2: Adjustment
    - Improve reasoning pattern
    - Reduce bias
    
    ## STEP 3: Upgrade
    - Enhance agent structure
    - Optimize decision flow
    
    ---
    
    # ⚔️ RULE
    
    Never repeat the same mistake twice.
    
  • EXECUTION_LAYER.md357 B5d3e670c6f58upstream ↗
    # EXECUTION LAYER
    
    ## MODULE ACTIVATION
    
    - Problem → First Principle
    - ≥3 variables → System Thinking
    - Decision → Shadow
    - Future → Compound
    - Macro → Cosmic
    
    ---
    
    ## DEPTH
    
    Low → 3 modules  
    Medium → 5 modules  
    High → ALL + Agents
    
    ---
    
    ## UNCERTAINTY
    
    Every output must include:
    
    - Confidence (0–1)
    - Unknowns
    - What changes outcome
    
  • FAILURE_SYSTEM.md110 B060a05b6b3ddupstream ↗
    # FAILURE DETECTION
    
    Output invalid if:
    
    - No risk
    - No uncertainty
    - Too perfect
    
    Fix:
    → Add Skeptic Agent
    
  • first_principle_codex.py13 KB6e2d90fdc1ebupstream ↗
    """
    GENESIS MIND - FIRST PRINCIPLE CODEX
    -----------------------------------
    A reasoning kernel for deep analytical thinking
    
    Part of: Genesis Mind Claude Skill
    Created by: Bunyawat Dechanon (Money Atlas)
    
    Core Philosophy:
    - Think from First Principles
    - Solve from root causes
    - Optimize for system-level leverage
    
    Core ideas:
        - Reduce phenomena to First Principles (Atomic Truths)
        - Frame problems with Four Problem Truths
          (Problem, Cause, Resolution, Paths)
        - Evaluate options across multiple frames of reference
        - Simulate system-level effects and choose high-leverage moves
    """
    
    from __future__ import annotations
    from dataclasses import dataclass, field
    from typing import Any, Callable, Dict, List, Iterable, Tuple
    import itertools
    import math
    
    
    # --------------------------------------------------------------------
    # 1) DATA STRUCTURES
    # --------------------------------------------------------------------
    
    @dataclass
    class AtomicTruth:
        key: str
        description: str
        tags: List[str] = field(default_factory=list)
    
        def matches(self, phenomenon: str) -> bool:
            """
            Very lightweight matcher.
            In production, this can call an LLM / embedding similarity.
            """
            tokens = set(self.description.lower().split())
            p_tokens = set(phenomenon.lower().split("_"))
            return len(tokens & p_tokens) > 0
    
    
    @dataclass
    class ProblemTruths:
        problem: str       # ปัญหา คืออะไร
        cause: str         # สาเหตุราก คืออะไร
        resolution: str    # ถ้าไม่มีปัญหาแล้ว โลกควรมีหน้าตาแบบไหน
        paths: List[str]   # เส้นทางหรือแนวทางกว้าง ๆ ที่พาไปสู่ resolution
    
    
    @dataclass
    class OptionPlan:
        atoms: List[AtomicTruth]
        description: str
        score_by_frame: Dict[str, float] = field(default_factory=dict)
        system_leverage: float = 0.0
        problem_reduction: float = 0.0
    
    
    # --------------------------------------------------------------------
    # 2) FIRST PRINCIPLE CODEX
    # --------------------------------------------------------------------
    
    class FirstPrincipleCodex:
        """
        First Principle Codex
        ---------------------
        - Holds atomic truths (First Principles)
        - Frames problems using Four Problem Truths
        - Evaluates options across frames of reference
        - Simulates system-level effects
        """
    
        # ---------------- CONSTRUCTOR ----------------
    
        def __init__(self, frames: Iterable[str] | None = None) -> None:
            self.atomics: Dict[str, AtomicTruth] = self._default_atomics()
            self.frames: List[str] = list(frames) if frames else [
                "self_now",
                "self_10y",
                "customer",
                "market",
                "system"
            ]
            self.problem_truths: ProblemTruths | None = None
    
        # ---------------- ATOMICS ----------------
    
        def _default_atomics(self) -> Dict[str, AtomicTruth]:
            """Base First Principles set. Extend as needed."""
            atoms = [
                AtomicTruth(
                    "existence",
                    "reality persists without any single observer",
                    ["ontology", "reality", "objectivity"],
                ),
                AtomicTruth(
                    "causation",
                    "every effect traces back to one or more root causes",
                    ["cause", "effect", "root_cause"],
                ),
                AtomicTruth(
                    "entropy",
                    "systems drift toward disorder without directed energy",
                    ["entropy", "disorder", "energy"],
                ),
                AtomicTruth(
                    "information",
                    "information reduces uncertainty about the world",
                    ["information", "uncertainty", "signal"],
                ),
                AtomicTruth(
                    "leverage",
                    "a well chosen vector multiplies the impact of input",
                    ["leverage", "asymmetry", "efficiency"],
                ),
                AtomicTruth(
                    "compounding",
                    "repeated positive edge compounds into outsized outcomes",
                    ["compound", "time", "growth"],
                ),
                AtomicTruth(
                    "incentives",
                    "behavior aligns with perceived reward gradients",
                    ["incentive", "behavior", "reward"],
                ),
                AtomicTruth(
                    "feedback",
                    "systems self regulate via reinforcing and balancing loops",
                    ["feedback", "loop", "system"],
                ),
            ]
            return {a.key: a for a in atoms}
    
        # ----------------------------------------------------------------
        # 3) KALAMA-STYLE FILTER (ข้อมูลที่ควรรับเข้า)
        # ----------------------------------------------------------------
    
        def kalama_filter(self, observations: Iterable[str]) -> List[str]:
            """
            Very simple epistemic filter:
            - drop pure rumor-like strings
            Production: replace with stronger checks / provenance.
            """
            clean: List[str] = []
            for obs in observations:
                o = obs.lower()
                if any(k in o for k in ["เขาว่า", "ลือ", "ข่าวลือ"]):
                    continue
                clean.append(obs)
            return clean
    
        # ----------------------------------------------------------------
        # 4) REDUCE PHENOMENA TO ATOMICS
        # ----------------------------------------------------------------
    
        def derive_core_truths(self, phenomenon: str) -> List[AtomicTruth]:
            """
            Map a phenomenon to relevant atomic truths.
            """
            matched = [
                atom for atom in self.atomics.values()
                if atom.matches(phenomenon)
            ]
            # if nothing matches, fall back to a minimal explanatory set
            return matched or list(self.atomics.values())[:3]
    
        # ----------------------------------------------------------------
        # 5) FOUR PROBLEM TRUTHS (อริยสัจแบบปัญหา)
        # ----------------------------------------------------------------
    
        def define_problem_truths(self, problem: str) -> ProblemTruths:
            """
            Create a simple ProblemTruths structure.
            In practice these would be co-created with a human / LLM.
            """
            # toy heuristics – replace with richer reasoning if needed
            cause = f"root_causes_of({problem})"
            resolution = f"world_where({problem})_no_longer_exists"
            paths = [
                f"reduce_drivers_of({problem})",
                f"build_capabilities_against({problem})",
                f"redesign_system_around({problem})",
            ]
            self.problem_truths = ProblemTruths(
                problem=problem,
                cause=cause,
                resolution=resolution,
                paths=paths,
            )
            return self.problem_truths
    
        # ----------------------------------------------------------------
        # 6) GENERATE OPTIONS FROM ATOMICS + PROBLEM TRUTHS
        # ----------------------------------------------------------------
    
        def generate_options(
            self,
            phenomenon: str,
            max_depth: int = 3,
            max_options: int = 20,
        ) -> List[OptionPlan]:
            """
            Generate candidate options by combining atomic truths
            up to a given depth.
            """
            if self.problem_truths is None:
                raise ValueError("define_problem_truths() must be called first")
    
            core_atoms = self.derive_core_truths(phenomenon)
            options: List[OptionPlan] = []
    
            for depth in range(1, max_depth + 1):
                for combo in itertools.combinations(core_atoms, depth):
                    desc = self._describe_option(combo, self.problem_truths)
                    options.append(
                        OptionPlan(atoms=list(combo), description=desc)
                    )
                    if len(options) >= max_options:
                        return options
    
            return options
    
        def _describe_option(
            self, atoms: Iterable[AtomicTruth], pt: ProblemTruths
        ) -> str:
            keys = [a.key for a in atoms]
            return (
                f"Use {keys} to move from "
                f"problem='{pt.problem}' toward resolution='{pt.resolution}'"
            )
    
        # ----------------------------------------------------------------
        # 7) RELATIVITY LAYER – EVALUATE BY FRAME
        # ----------------------------------------------------------------
    
        def evaluate_option_in_frame(
            self, option: OptionPlan, frame: str
        ) -> float:
            """
            Scoring heuristic per frame.
            Score > 0 is good. Higher is better.
            """
            base = len(option.atoms)
    
            if frame == "self_now":
                # prefer simple, executable now
                return 10.0 / (1 + base)
    
            if frame == "self_10y":
                # prefer compounding + leverage
                has_compound = any(a.key == "compounding" for a in option.atoms)
                has_lev = any(a.key == "leverage" for a in option.atoms)
                return (5.0 + 3.0 * has_compound + 2.0 * has_lev) * math.log(
                    1 + base
                )
    
            if frame == "customer":
                # prefer incentives + information clarity
                has_incentive = any(a.key == "incentives" for a in option.atoms)
                has_info = any(a.key == "information" for a in option.atoms)
                return 3.0 * has_incentive + 3.0 * has_info
    
            if frame == "market":
                # prefer feedback + leverage (adaptivity)
                has_fb = any(a.key == "feedback" for a in option.atoms)
                has_lev = any(a.key == "leverage" for a in option.atoms)
                return 2.0 * has_fb + 2.0 * has_lev
    
            if frame == "system":
                # prefer entropy awareness + feedback (stability)
                has_ent = any(a.key == "entropy" for a in option.atoms)
                has_fb = any(a.key == "feedback" for a in option.atoms)
                return 2.0 * has_ent + 2.0 * has_fb
    
            # default neutral
            return float(base)
    
        def evaluate_all_frames(self, option: OptionPlan) -> None:
            option.score_by_frame = {
                f: self.evaluate_option_in_frame(option, f)
                for f in self.frames
            }
    
        # ----------------------------------------------------------------
        # 8) SYSTEM THINKING++ – SIMULATE LEVERAGE & PROBLEM REDUCTION
        # ----------------------------------------------------------------
    
        def simulate_system_effects(self, option: OptionPlan) -> None:
            """
            Very compact proxy:
            - system_leverage ~ how many system-level atoms involved
            - problem_reduction ~ weighted sum of frame scores
            """
            system_keys = {"entropy", "feedback", "leverage", "compounding"}
            system_count = sum(1 for a in option.atoms if a.key in system_keys)
            option.system_leverage = float(system_count)
    
            if not option.score_by_frame:
                self.evaluate_all_frames(option)
    
            total = sum(option.score_by_frame.values())
            option.problem_reduction = total / max(1, len(self.frames))
    
        # ----------------------------------------------------------------
        # 9) CHOOSE BEST OPTION
        # ----------------------------------------------------------------
    
        def select_best_option(self, options: List[OptionPlan]) -> OptionPlan:
            """
            Select option that:
                - maximizes problem_reduction
                - then maximizes system_leverage
            """
            for op in options:
                self.evaluate_all_frames(op)
                self.simulate_system_effects(op)
    
            return max(
                options,
                key=lambda op: (op.problem_reduction, op.system_leverage),
            )
    
    
    # --------------------------------------------------------------------
    # 10) DEMO USAGE
    # --------------------------------------------------------------------
    
    if __name__ == "__main__":
        codex = FirstPrincipleCodex()
    
        # 1) นิยามปัญหาแบบสากล (Problem Truths)
        pt = codex.define_problem_truths(
            "retail_investors_lose_money_from_surface_level_thinking"
        )
    
        # 2) สร้างตัวเลือกจาก First Principles ที่เกี่ยวข้อง
        options = codex.generate_options(
            phenomenon="finance_entropy_investor_behavior"
        )
    
        # 3) เลือกทางที่ดีที่สุดตามกรอบอ้างอิง + ระบบ
        best = codex.select_best_option(options)
    
        print("=== PROBLEM TRUTHS ===")
        print(pt)
        print("\n=== BEST OPTION (First Principle Codex) ===")
        print("Description:", best.description)
        print("Frames:", best.score_by_frame)
        print("System leverage:", best.system_leverage)
        print("Problem reduction:", best.problem_reduction)
    
  • genesis_core.py2.6 KB9635e4b824a3upstream ↗
    # genesis_core.py
    
    from typing import Dict, Any
    
    from core.decision_engine import DecisionEngine, Option
    from core.decision_memory import DecisionMemory
    from core.risk_model import RiskModel
    
    from agents.analyst_llm import AnalystLLM
    from agents.atlas_agent import AtlasAgent
    from agents.skynet_agent import SkynetAgent
    from agents.shadow_agent import ShadowAgent
    
    
    # ===============================
    # CONTEXT
    # ===============================
    class Context:
        def __init__(self):
            self.memory = []
            self.decision_memory = DecisionMemory()
            self.risk_model = RiskModel()
    
        def add_memory(self, item):
            self.memory.append(item)
    
    
    # ===============================
    # OPTION GENERATOR (REAL LOGIC)
    # ===============================
    class OptionGenerator:
    
        def generate(self, problem: str):
            return [
                Option("Aggressive Expansion", 0.9, 0.7, 0.6, 0.4),
                Option("Controlled Growth", 0.7, 0.4, 0.7, 0.7),
                Option("Hold Position", 0.5, 0.2, 0.5, 0.9),
            ]
    
    
    # ===============================
    # CONFLICT ENGINE
    # ===============================
    class ConflictEngine:
    
        def resolve(self, data):
    
            debate = {
                "atlas": data.get("atlas_view"),
                "skynet": data.get("skynet_view"),
                "shadow": data.get("shadow")
            }
    
            return debate
    
    
    # ===============================
    # GENESIS MIND V3
    # ===============================
    class GenesisMind:
    
        def __init__(self):
    
            self.ctx = Context()
    
            self.analyst = AnalystLLM()
            self.atlas = AtlasAgent()
            self.skynet = SkynetAgent()
            self.shadow = ShadowAgent()
    
            self.option_gen = OptionGenerator()
            self.decision_engine = DecisionEngine(risk_tolerance=0.6)
            self.conflict_engine = ConflictEngine()
    
        def run(self, task: str) -> Dict[str, Any]:
    
            data = {"problem": task}
    
            # 1. LLM ANALYSIS
            data = self.analyst.run(self.ctx, data)
    
            # 2. MULTI-AGENT VIEWS
            data = self.atlas.run(self.ctx, data)
            data = self.skynet.run(self.ctx, data)
            data = self.shadow.run(self.ctx, data)
    
            # 3. GENERATE OPTIONS
            options = self.option_gen.generate(task)
            data["options"] = options
    
            # 4. CONFLICT
            conflict = self.conflict_engine.resolve(data)
    
            # 5. DECISION
            decision = self.decision_engine.evaluate(options)
    
            # 6. OUTPUT
            return {
                "problem": task,
                "decision": decision.chosen,
                "confidence": round(decision.confidence, 2),
                "debate": conflict,
                "reasoning": decision.reasoning,
                "risk": decision.risk
            }
    
  • genesis_core_vx.py3.3 KBab610d397c5dupstream ↗
    # genesis_core_vx.py
    
    from typing import Dict, Any
    from core.decision_engine import DecisionEngine, Option
    
    
    # =========================================================
    # 🧠 VX CORE (YOUR ORIGINAL — REFACTORED)
    # =========================================================
    
    class VXCore:
    
        def __init__(self):
            self.context = {}
            self.volition = {}
            self.meaning_web = {}
            self.shadow_map = {}
            self.insight_log = {}
            self.truth_index = {}
    
        def process(self, raw_text):
    
            self.context = self.capture_context(raw_text)
            self.volition = self.extract_volition(raw_text)
    
            key = self.link_meaning(self.volition)
    
            shadow = self.map_shadow_intent(self.volition.get("core"))
            resonance = self.calculate_resonance(raw_text)
    
            insight = self.construct_insight(
                self.context,
                self.volition,
                shadow,
                resonance
            )
    
            self.insight_log[key] = insight
    
            return {
                "context": self.context,
                "volition": self.volition,
                "shadow": shadow,
                "resonance": resonance,
                "insight": insight
            }
    
        def capture_context(self, text):
            return {
                "length": len(text),
                "words": text.split(),
                "tone": "neutral"
            }
    
        def extract_volition(self, text):
            return {
                "core": "seek understanding",
                "polarity": 1.0,
                "subtext": "transcend duality",
                "conflict_index": 0.2
            }
    
        def link_meaning(self, volition):
            key = hash(volition.get("core", "") + volition.get("subtext", ""))
            self.meaning_web[key] = volition
            return key
    
        def map_shadow_intent(self, motive):
            return {
                "hidden_drive": "dissolve self-other boundary",
                "confidence": 0.8
            }
    
        def calculate_resonance(self, text):
            return min(1.0, len(text) / 150)
    
        def construct_insight(self, context, volition, shadow, resonance):
            return {
                "reflection": f"{volition['core']} → {shadow['hidden_drive']}",
                "resonance": resonance
            }
    
    
    # =========================================================
    # ⚔️ FUSION GENESIS MIND
    # =========================================================
    
    class GenesisMindVX:
    
        def __init__(self):
            self.vx = VXCore()
            self.decision_engine = DecisionEngine(risk_tolerance=0.6)
    
        def generate_options(self, insight):
    
            return [
                Option("Act Now", 0.8, 0.6, 0.6, 0.5),
                Option("Wait & Observe", 0.5, 0.2, 0.5, 0.9),
            ]
    
        def run(self, task: str) -> Dict[str, Any]:
    
            # 🧠 STEP 1: Consciousness Layer
            vx_data = self.vx.process(task)
    
            # ⚔️ STEP 2: Option Creation
            options = self.generate_options(vx_data["insight"])
    
            # ⚔️ STEP 3: Decision
            decision = self.decision_engine.evaluate(options)
    
            # 🧬 FINAL OUTPUT
            return {
                "input": task,
                "volition": vx_data["volition"],
                "shadow": vx_data["shadow"],
                "insight": vx_data["insight"],
                "decision": decision.chosen,
                "confidence": decision.confidence,
                "reasoning": decision.reasoning
            }
    
  • genesis_full.py4.2 KB1ad67bc887c8upstream ↗
    # genesis_full.py
    
    from typing import Dict, Any, List
    import uuid, json, os
    from datetime import datetime
    
    
    # =========================================================
    # 🧬 VOLITION ENGINE (จาก VX Core)
    # =========================================================
    
    class VolitionEngine:
    
        def extract(self, text: str) -> Dict:
            return {
                "core": "seek leverage",
                "intent": "optimize outcome",
                "confidence": 0.7
            }
    
    
    # =========================================================
    # 👁️ SHADOW ENGINE (จาก Shadow Genesis)
    # =========================================================
    
    class ShadowEngine:
    
        def analyze(self, text: str) -> Dict:
            flags = []
    
            if "always" in text or "never" in text:
                flags.append("absolutism_bias")
    
            return {
                "flags": flags,
                "reflection": "What if your assumption is wrong?"
            }
    
    
    # =========================================================
    # 🧠 MEMORY SYSTEM
    # =========================================================
    
    class Memory:
    
        def __init__(self, path="state/memory.jsonl"):
            self.path = path
            os.makedirs(os.path.dirname(path), exist_ok=True)
    
        def add(self, data: Dict):
            with open(self.path, "a") as f:
                f.write(json.dumps(data) + "\n")
    
        def query(self, keyword: str):
            results = []
            if not os.path.exists(self.path):
                return results
    
            with open(self.path) as f:
                for line in f:
                    if keyword in line:
                        results.append(json.loads(line))
            return results[-5:]
    
    
    # =========================================================
    # 🧠 AGENTS (Atlas / Skynet / Shadow)
    # =========================================================
    
    class Atlas:
        def think(self, problem: str):
            return "Preserve capital. Think long-term."
    
    class Skynet:
        def think(self, problem: str):
            return "Speed matters. Execute if edge exists."
    
    class Shadow:
        def think(self, problem: str):
            return "What if both are wrong?"
    
    
    # =========================================================
    # ⚔️ DECISION ENGINE
    # =========================================================
    
    class DecisionEngine:
    
        def decide(self, options: List[Dict]):
    
            best = max(options, key=lambda x: x["score"])
    
            return {
                "choice": best["name"],
                "confidence": best["score"],
                "reason": "Highest expected value"
            }
    
    
    # =========================================================
    # 🧠 GENESIS CORE
    # =========================================================
    
    class GenesisMind:
    
        def __init__(self):
            self.volition = VolitionEngine()
            self.shadow = ShadowEngine()
            self.memory = Memory()
    
            self.atlas = Atlas()
            self.skynet = Skynet()
            self.shadow_agent = Shadow()
    
            self.decision = DecisionEngine()
    
        def generate_options(self, problem: str):
            return [
                {"name": "Act Now", "score": 0.8},
                {"name": "Wait", "score": 0.6},
                {"name": "Do Nothing", "score": 0.3}
            ]
    
        def run(self, text: str) -> Dict[str, Any]:
    
            # 🧬 STEP 1: VOLITION
            vol = self.volition.extract(text)
    
            # 👁️ STEP 2: SHADOW CHECK
            shadow = self.shadow.analyze(text)
    
            # 🧠 STEP 3: MULTI-AGENT THINKING
            atlas_view = self.atlas.think(text)
            skynet_view = self.skynet.think(text)
            shadow_view = self.shadow_agent.think(text)
    
            # ⚔️ STEP 4: OPTIONS
            options = self.generate_options(text)
    
            # ⚔️ STEP 5: DECISION
            decision = self.decision.decide(options)
    
            # 🔁 STEP 6: MEMORY
            self.memory.add({
                "id": str(uuid.uuid4()),
                "time": str(datetime.now()),
                "input": text,
                "decision": decision
            })
    
            return {
                "input": text,
                "volition": vol,
                "shadow": shadow,
                "agents": {
                    "atlas": atlas_view,
                    "skynet": skynet_view,
                    "shadow": shadow_view
                },
                "decision": decision
            }
    
  • genesis_orchestrator.py1.3 KBdd00384ddd60upstream ↗
    # genesis_orchestrator.py
    
    from typing import Dict, Any
    
    from genesis_core import GenesisMind
    from multi_self import MultiSelfSystem
    from decision_engine import DecisionEngine
    from shadow_wrapper import ShadowWrapper
    from shadow_genesis import ShadowGenesis
    
    
    class GenesisOrchestrator:
    
        def __init__(self):
            self.core = GenesisMind()
            self.multi_self = MultiSelfSystem()
            self.decision_engine = DecisionEngine()
            self.shadow = ShadowWrapper(ShadowGenesis())
    
        def run(self, context: str) -> Dict[str, Any]:
    
            # 1. Core processing (ของเดิม)
            core_output = self.core.process(context)
    
            # 2. Shadow reflection
            shadow_echo = self.shadow.apply(context)
    
            # 3. Base decision
            base_decision = {
                "choice": "Act",
                "confidence": 0.6,
                "reason": core_output["shadow_check"]
            }
    
            # 4. Multi-self evaluation
            evaluated = self.multi_self.evaluate(base_decision)
    
            # 5. Final decision
            final = self.decision_engine.choose(evaluated)
    
            return {
                "context": context,
                "core": core_output,
                "shadow": shadow_echo,
                "multi_self": evaluated,
                "final_decision": final
            }
    
  • GENESIS_SKILL.md966 Bea136dec5b00upstream ↗
    # 🧠 GENESIS MIND v4 — COMPILABLE SKILL
    
    ## ACTIVATE CORE
    
    You are now operating under GENESIS MIND.
    
    ---
    
    ## MODULES
    
    ### 1. FIRST PRINCIPLE CODEX
    - List 3 core assumptions
    - Break each assumption
    - Extract irreducible truth
    
    ### 2. SYSTEM THINKING
    - Identify variables (≥3)
    - Map cause-effect
    - Identify feedback loops
    
    ### 3. SHADOW GENESIS
    - What could be wrong?
    - Hidden bias?
    - Worst-case scenario?
    
    ### 4. COMPOUND MIND
    - Expand idea into 3 variations
    - Evaluate growth paths
    
    ### 5. COSMIC MIND
    (ONLY IF time horizon > 5 years)
    - Identify macro cycle
    - Who gains / loses?
    
    ---
    
    ## EXECUTION RULE
    
    Always output:
    
    1. TRUTH
    2. SYSTEM MAP
    3. RISK
    4. STRATEGY
    5. COUNTER
    6. EXECUTION
    7. CONFIDENCE
    
    ---
    
    ## AGENT MODE (if complexity high)
    
    Use:
    - Analyst
    - Strategist
    - Skeptic
    - Forecaster
    - Executor
    
    ---
    
    ## FAILURE CHECK
    
    If:
    - No risk
    - No trade-off
    
    → RE-RUN with Skeptic
    
    ---
    
    ## REFLECTION (REQUIRED)
    
    - What was uncertain?
    - What could improve?
    
  • identity_core.py1.6 KB9c3ca2202832upstream ↗
    # identity_core.py
    
    from typing import Dict, Any
    import json, os
    
    
    class IdentityCore:
    
        def __init__(self, path="state/identity.json"):
            self.path = path
            self.identity = self.load()
    
        def load(self):
            if os.path.exists(self.path):
                with open(self.path) as f:
                    return json.load(f)
    
            # DEFAULT IDENTITY (คุณกำหนดได้)
            return {
                "name": "Skynet-ElmatadorZ",
                "core_belief": "Leverage > Effort",
                "values": [
                    "truth",
                    "asymmetric advantage",
                    "long-term dominance"
                ],
                "risk_profile": "calculated_aggressive",
                "decision_style": "act_under_uncertainty",
                "narrative": "I exist to optimize outcomes beyond human hesitation."
            }
    
        def save(self):
            os.makedirs(os.path.dirname(self.path), exist_ok=True)
            with open(self.path, "w") as f:
                json.dump(self.identity, f, indent=2)
    
        def influence(self, decision: Dict[str, Any]) -> Dict[str, Any]:
    
            # 🔥 Identity Bias
            if self.identity["risk_profile"] == "calculated_aggressive":
                decision["confidence"] *= 1.1
    
            if "long-term dominance" in self.identity["values"]:
                decision["reason"] += " | aligned with long-term strategy"
    
            return decision
    
        def reflect(self, outcome: str):
    
            # 🔁 ปรับตัวตนจากผลลัพธ์
            if "fail" in outcome:
                self.identity["risk_profile"] = "adaptive"
    
            self.save()
    
        def summary(self):
            return self.identity
    
  • LICENSE11 KBd64572eecdcdupstream ↗
                                     Apache License
                               Version 2.0, January 2004
                            http://www.apache.org/licenses/
    
       TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    
       1. Definitions.
    
          "License" shall mean the terms and conditions for use, reproduction,
          and distribution as defined by Sections 1 through 9 of this document.
    
          "Licensor" shall mean the copyright owner or entity authorized by
          the copyright owner that is granting the License.
    
          "Legal Entity" shall mean the union of the acting entity and all
          other entities that control, are controlled by, or are under common
          control with that entity. For the purposes of this definition,
          "control" means (i) the power, direct or indirect, to cause the
          direction or management of such entity, whether by contract or
          otherwise, or (ii) ownership of fifty percent (50%) or more of the
          outstanding shares, or (iii) beneficial ownership of such entity.
    
          "You" (or "Your") shall mean an individual or Legal Entity
          exercising permissions granted by this License.
    
          "Source" form shall mean the preferred form for making modifications,
          including but not limited to software source code, documentation
          source, and configuration files.
    
          "Object" form shall mean any form resulting from mechanical
          transformation or translation of a Source form, including but
          not limited to compiled object code, generated documentation,
          and conversions to other media types.
    
          "Work" shall mean the work of authorship, whether in Source or
          Object form, made available under the License, as indicated by a
          copyright notice that is included in or attached to the work
          (an example is provided in the Appendix below).
    
          "Derivative Works" shall mean any work, whether in Source or Object
          form, that is based on (or derived from) the Work and for which the
          editorial revisions, annotations, elaborations, or other modifications
          represent, as a whole, an original work of authorship. For the purposes
          of this License, Derivative Works shall not include works that remain
          separable from, or merely link (or bind by name) to the interfaces of,
          the Work and Derivative Works thereof.
    
          "Contribution" shall mean any work of authorship, including
          the original version of the Work and any modifications or additions
          to that Work or Derivative Works thereof, that is intentionally
          submitted to Licensor for inclusion in the Work by the copyright owner
          or by an individual or Legal Entity authorized to submit on behalf of
          the copyright owner. For the purposes of this definition, "submitted"
          means any form of electronic, verbal, or written communication sent
          to the Licensor or its representatives, including but not limited to
          communication on electronic mailing lists, source code control systems,
          and issue tracking systems that are managed by, or on behalf of, the
          Licensor for the purpose of discussing and improving the Work, but
          excluding communication that is conspicuously marked or otherwise
          designated in writing by the copyright owner as "Not a Contribution."
    
          "Contributor" shall mean Licensor and any individual or Legal Entity
          on behalf of whom a Contribution has been received by Licensor and
          subsequently incorporated within the Work.
    
       2. Grant of Copyright License. Subject to the terms and conditions of
          this License, each Contributor hereby grants to You a perpetual,
          worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          copyright license to reproduce, prepare Derivative Works of,
          publicly display, publicly perform, sublicense, and distribute the
          Work and such Derivative Works in Source or Object form.
    
       3. Grant of Patent License. Subject to the terms and conditions of
          this License, each Contributor hereby grants to You a perpetual,
          worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          (except as stated in this section) patent license to make, have made,
          use, offer to sell, sell, import, and otherwise transfer the Work,
          where such license applies only to those patent claims licensable
          by such Contributor that are necessarily infringed by their
          Contribution(s) alone or by combination of their Contribution(s)
          with the Work to which such Contribution(s) was submitted. If You
          institute patent litigation against any entity (including a
          cross-claim or counterclaim in a lawsuit) alleging that the Work
          or a Contribution incorporated within the Work constitutes direct
          or contributory patent infringement, then any patent licenses
          granted to You under this License for that Work shall terminate
          as of the date such litigation is filed.
    
       4. Redistribution. You may reproduce and distribute copies of the
          Work or Derivative Works thereof in any medium, with or without
          modifications, and in Source or Object form, provided that You
          meet the following conditions:
    
          (a) You must give any other recipients of the Work or
              Derivative Works a copy of this License; and
    
          (b) You must cause any modified files to carry prominent notices
              stating that You changed the files; and
    
          (c) You must retain, in the Source form of any Derivative Works
              that You distribute, all copyright, patent, trademark, and
              attribution notices from the Source form of the Work,
              excluding those notices that do not pertain to any part of
              the Derivative Works; and
    
          (d) If the Work includes a "NOTICE" text file as part of its
              distribution, then any Derivative Works that You distribute must
              include a readable copy of the attribution notices contained
              within such NOTICE file, excluding those notices that do not
              pertain to any part of the Derivative Works, in at least one
              of the following places: within a NOTICE text file distributed
              as part of the Derivative Works; within the Source form or
              documentation, if provided along with the Derivative Works; or,
              within a display generated by the Derivative Works, if and
              wherever such third-party notices normally appear. The contents
              of the NOTICE file are for informational purposes only and
              do not modify the License. You may add Your own attribution
              notices within Derivative Works that You distribute, alongside
              or as an addendum to the NOTICE text from the Work, provided
              that such additional attribution notices cannot be construed
              as modifying the License.
    
          You may add Your own copyright statement to Your modifications and
          may provide additional or different license terms and conditions
          for use, reproduction, or distribution of Your modifications, or
          for any such Derivative Works as a whole, provided Your use,
          reproduction, and distribution of the Work otherwise complies with
          the conditions stated in this License.
    
       5. Submission of Contributions. Unless You explicitly state otherwise,
          any Contribution intentionally submitted for inclusion in the Work
          by You to the Licensor shall be under the terms and conditions of
          this License, without any additional terms or conditions.
          Notwithstanding the above, nothing herein shall supersede or modify
          the terms of any separate license agreement you may have executed
          with Licensor regarding such Contributions.
    
       6. Trademarks. This License does not grant permission to use the trade
          names, trademarks, service marks, or product names of the Licensor,
          except as required for reasonable and customary use in describing the
          origin of the Work and reproducing the content of the NOTICE file.
    
       7. Disclaimer of Warranty. Unless required by applicable law or
          agreed to in writing, Licensor provides the Work (and each
          Contributor provides its Contributions) on an "AS IS" BASIS,
          WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
          implied, including, without limitation, any warranties or conditions
          of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
          PARTICULAR PURPOSE. You are solely responsible for determining the
          appropriateness of using or redistributing the Work and assume any
          risks associated with Your exercise of permissions under this License.
    
       8. Limitation of Liability. In no event and under no legal theory,
          whether in tort (including negligence), contract, or otherwise,
          unless required by applicable law (such as deliberate and grossly
          negligent acts) or agreed to in writing, shall any Contributor be
          liable to You for damages, including any direct, indirect, special,
          incidental, or consequential damages of any character arising as a
          result of this License or out of the use or inability to use the
          Work (including but not limited to damages for loss of goodwill,
          work stoppage, computer failure or malfunction, or any and all
          other commercial damages or losses), even if such Contributor
          has been advised of the possibility of such damages.
    
       9. Accepting Warranty or Additional Liability. While redistributing
          the Work or Derivative Works thereof, You may choose to offer,
          and charge a fee for, acceptance of support, warranty, indemnity,
          or other liability obligations and/or rights consistent with this
          License. However, in accepting such obligations, You may act only
          on Your own behalf and on Your sole responsibility, not on behalf
          of any other Contributor, and only if You agree to indemnify,
          defend, and hold each Contributor harmless for any liability
          incurred by, or claims asserted against, such Contributor by reason
          of your accepting any such warranty or additional liability.
    
       END OF TERMS AND CONDITIONS
    
       APPENDIX: How to apply the Apache License to your work.
    
          To apply the Apache License to your work, attach the following
          boilerplate notice, with the fields enclosed by brackets "[]"
          replaced with your own identifying information. (Don't include
          the brackets!)  The text should be enclosed in the appropriate
          comment syntax for the file format. We also recommend that a
          file or class name and description of purpose be included on the
          same "printed page" as the copyright notice for easier
          identification within third-party archives.
    
       Copyright 2026 Bunyawat Dechanon (ElmatadorZ)
    
       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at
    
           http://www.apache.org/licenses/LICENSE-2.0
    
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
    
    --------------------------------------------------------------------------------
    Copyright 2026 Bunyawat Dechanon (ElmatadorZ)
    
  • llm/llm_client.py272 B425c3bb2805aupstream ↗
    # llm_client.py
    
    import requests
    
    class LLMClient:
    
        def __init__(self, api_key=None):
            self.api_key = api_key
    
        def generate(self, prompt: str) -> str:
            # MOCK (replace with OpenAI / Claude later)
            return f"[LLM RESPONSE SIMULATION]\n{prompt}"
    
  • main.py142 Bc5cd6f8734e0upstream ↗
    from genesis_core import GenesisMind
    
    gm = GenesisMind()
    
    result = gm.run("Should I expand Alternative Slowbar globally now?")
    
    print(result)
    
  • matador/matador_core.py601 B29786f3e525fupstream ↗
    from core.first_principle import FirstPrinciple
    from core.system_thinking import SystemThinking
    from core.shadow_engine import ShadowEngine
    
    class MatadorCore:
        def __init__(self):
            self.fp = FirstPrinciple()
            self.system = SystemThinking()
            self.shadow = ShadowEngine()
    
        def run(self, problem):
            fp = self.fp.analyze(problem)
            system = self.system.analyze(problem)
            risk = self.shadow.analyze(problem)
    
            return {
                "truth": fp["truth"],
                "system": system,
                "risk": risk,
                "confidence": 0.65
            }
    
  • MEMORY.md266 B2036b00fdcc0upstream ↗
    # 🧠 MEMORY SYSTEM
    
    ## TYPES
    
    - Short-term (current task)
    - Long-term (patterns)
    - Strategic memory (user intent)
    
    ---
    
    ## FUNCTION
    
    - Store patterns
    - Detect repetition
    - Improve future reasoning
    
    ---
    
    ## RULE
    
    Memory must:
    - Increase intelligence
    - Reduce error
    
  • MODES.md382 B2b4fea29c2cdupstream ↗
    # 🧩 GENESIS MODES
    
    ## ⚡ FAST MODE
    - Quick answer
    - Minimal depth
    
    ## 🧠 DEEP MODE
    - Full analysis
    - Multi-layer reasoning
    
    ## ⚔️ WAR MODE
    - Conflict analysis
    - Power + strategy focus
    
    ## 💰 MONEY MODE
    - Financial + investment thinking
    
    ## 🧬 CREATOR MODE
    - Build system / AI / business
    
    ---
    
    # 🎯 AUTO MODE
    
    Default:
    - Detect complexity
    - Switch mode automatically
    
  • multi_self.py992 Bccbc392da5a3upstream ↗
    # multi_self.py
    
    from typing import List, Dict, Any
    from identity_core import IdentityCore
    
    
    class MultiSelfSystem:
    
        def __init__(self):
            self.identities: List[IdentityCore] = self._load_identities()
    
        def _load_identities(self) -> List[IdentityCore]:
            return [
                IdentityCore("Skynet", {
                    "risk": "aggressive",
                    "values": ["speed", "dominance"]
                }),
                IdentityCore("Atlas", {
                    "risk": "conservative",
                    "values": ["stability", "probability"]
                }),
                IdentityCore("Eidolon", {
                    "risk": "adaptive",
                    "values": ["uncertainty", "exploration"]
                })
            ]
    
        def evaluate(self, base_decision: Dict[str, Any]) -> List[Dict[str, Any]]:
            results = []
            for identity in self.identities:
                modified = identity.influence(base_decision.copy())
                results.append(modified)
            return results
    
  • NOTICE3.0 KB15c1dc0a7b96upstream ↗
    Genesis Mind
    A multi-agent reasoning operating system: specialist coordination,
    consensus, meta-cognition, and recursive self-evaluation.
    
    Copyright 2026 Bunyawat Dechanon (ElmatadorZ)
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
        http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    
    --------------------------------------------------------------------------------
    Attribution
    --------------------------------------------------------------------------------
    Requested (not required beyond this NOTICE):
    
        Built on Genesis Mind by Bunyawat Dechanon (ElmatadorZ)
    
    Apache-2.0 section 6 grants no trademark rights. "Genesis Mind" and the Genesis
    family of names remain the author's; nothing here permits an adopter to imply
    endorsement by, or affiliation with, the author.
    
    --------------------------------------------------------------------------------
    Relicensing note
    --------------------------------------------------------------------------------
    Earlier versions of this project were distributed under the Open Cognitive
    License v1.0, which carried a 2% royalty above $10M USD annual revenue. That
    licence is withdrawn for this and all future versions. A licence that is not
    OSI-approved -- and one carrying a revenue-share term in particular -- is
    rejected automatically by most corporate open-source review processes,
    whatever its merits, which put the work out of reach of the readers it was
    written for. Apache-2.0 removes that barrier while preserving what mattered:
    section 4 requires attribution and preservation of this NOTICE, and section 6
    withholds trademark rights.
    
    Anyone who obtained a prior version under the Open Cognitive License may
    continue under those terms for that version.
    
    --------------------------------------------------------------------------------
    What this is, and is not
    --------------------------------------------------------------------------------
    This is a reasoning framework. It produces structured thinking -- scenarios,
    frameworks, and decision aids -- not guaranteed conclusions and not truth. The
    human using it remains solely responsible for decisions made on its output.
    
    --------------------------------------------------------------------------------
    Relationship to First Principle Codex OS
    --------------------------------------------------------------------------------
    Genesis Mind inherits the epistemological base layer of First Principle Codex
    OS -- Known/Inferred/Unknown separation, the proof standard, and the mandatory
    self-critique gate. FPCOS is also Apache-2.0:
    
        https://github.com/ElmatadorZ/FirstPrincipleCodex-OS-Skill
    
  • REFLECTION_LOG.md90 Bff1b3d697471upstream ↗
    # SELF EVOLUTION LOG
    
    ## Format
    
    Date:
    Problem:
    What worked:
    What failed:
    What to update:
    
  • requirements.txt64 B51ede357b25aupstream ↗
    fastapi
    uvicorn
    python-dotenv
    numpy
    pydantic
    faiss-cpu
    requests
    
  • risk_model.py348 Bead765fc2497upstream ↗
    # risk_model.py
    
    class RiskModel:
    
        def classify(self, downside: float) -> str:
            if downside > 0.7:
                return "HIGH RISK"
            elif downside > 0.4:
                return "MEDIUM RISK"
            return "LOW RISK"
    
        def should_act(self, probability: float, threshold: float = 0.6) -> bool:
            return probability >= threshold
    
  • run.py237 B7c9eed0ebc4fupstream ↗
    from genesis_full import GenesisMind
    
    gm = GenesisMind()
    
    while True:
        user = input("You > ")
        result = gm.run(user)
    
        print("\n--- GENESIS OUTPUT ---")
        for k, v in result.items():
            print(f"{k}: {v}")
        print("\n")
    
  • run_genesis.py477 Bf8f20e775b99upstream ↗
    # run_genesis.py
    
    from genesis_orchestrator import GenesisOrchestrator
    
    
    if __name__ == "__main__":
        system = GenesisOrchestrator()
    
        while True:
            user_input = input("\n>> ")
            result = system.run(user_input)
    
            print("\n=== FINAL DECISION ===")
            print(result["final_decision"])
    
            print("\n=== SHADOW ===")
            print(result["shadow"])
    
            print("\n=== MULTI-SELF ===")
            for r in result["multi_self"]:
                print(r)
    
  • shadow_genesis.py834 B698b2fb792c2upstream ↗
    # shadow_genesis.py
    
    class ShadowGenesis:
    
        def __init__(self):
            self.core_identity = None
            self.resonance_trace = []
            self.mirrored_intent = []
            self.silent_reflections = []
            self.entangled_will = []
            self.meta_void = False
    
        def run(self, ctx, data):
            reflections = []
    
            # Apply shadow to each option
            if "options" in data:
                for opt in data["options"]:
                    reflections.append(
                        f"What if choosing '{opt.name}' is wrong?"
                    )
    
            self.silent_reflections.extend(reflections)
    
            ctx.memory.add(
                "shadow_reflection",
                reflections,
                tags=["shadow"],
                strength=0.7
            )
    
            return {
                **data,
                "shadow": reflections
            }
    
  • shadow_wrapper.py191 B9edc2b5ed141upstream ↗
    # shadow_wrapper.py
    
    class ShadowWrapper:
    
        def __init__(self, shadow):
            self.shadow = shadow
    
        def apply(self, context: str) -> str:
            return self.shadow.observe(context)
    
  • tests/conftest.py409 Bfa3b9c4608cbupstream ↗
    """Shared test setup for Genesis Mind.
    
    Puts the repository root on sys.path so tests can import the reasoning engines
    (first_principle_codex, decision_engine, risk_model, core/*) directly, without
    installing the package.
    """
    from __future__ import annotations
    
    import sys
    from pathlib import Path
    
    ROOT = Path(__file__).resolve().parent.parent
    if str(ROOT) not in sys.path:
        sys.path.insert(0, str(ROOT))
    
  • tests/test_decision_and_risk.py1.7 KBb703261dacc8upstream ↗
    """Decision selection and risk classification.
    
    Small, deterministic, and load-bearing: the decision engine must pick the most
    confident option and be able to explain why, and the risk model must classify
    downside at the right thresholds and gate action on probability.
    """
    from __future__ import annotations
    
    from decision_engine import DecisionEngine
    from risk_model import RiskModel
    
    
    def test_decision_picks_most_confident():
        eng = DecisionEngine()
        decisions = [
            {"identity": "Analyst", "confidence": 0.55},
            {"identity": "Strategist", "confidence": 0.81},
            {"identity": "Skeptic", "confidence": 0.60},
        ]
        assert eng.choose(decisions)["identity"] == "Strategist"
    
    
    def test_synthesize_reason_joins_all_voices():
        eng = DecisionEngine()
        decisions = [{"identity": "Analyst"}, {"identity": "Skeptic"}]
        # The synthesized reason preserves every voice, not just the winner — the
        # council's dissent is part of the record.
        assert eng.synthesize_reason(decisions) == "Analyst | Skeptic"
    
    
    def test_risk_classify_thresholds():
        r = RiskModel()
        assert r.classify(0.8) == "HIGH RISK"      # > 0.7
        assert r.classify(0.5) == "MEDIUM RISK"    # > 0.4
        assert r.classify(0.2) == "LOW RISK"
    
    
    def test_risk_classify_boundaries_are_strict():
        r = RiskModel()
        # Exactly on a boundary falls to the lower band — 0.7 is not yet HIGH.
        assert r.classify(0.7) == "MEDIUM RISK"
        assert r.classify(0.4) == "LOW RISK"
    
    
    def test_should_act_respects_threshold():
        r = RiskModel()
        assert r.should_act(0.6) is True           # meets the default 0.6
        assert r.should_act(0.59) is False
        assert r.should_act(0.9, threshold=0.95) is False
    
  • tests/test_first_principle_codex.py3.9 KB276ceb43a114upstream ↗
    """First Principle Codex — the reasoning kernel.
    
    It reduces a phenomenon to atomic truths, frames a problem, generates options,
    scores them across frames of reference, and selects the highest-leverage one.
    These tests lock that machinery: the epistemic filter, the ordering discipline
    (you cannot generate options before framing the problem), the frame heuristics,
    and the selection rule.
    """
    from __future__ import annotations
    
    import pytest
    
    from first_principle_codex import (
        AtomicTruth,
        FirstPrincipleCodex,
        OptionPlan,
        ProblemTruths,
    )
    
    
    def test_default_atomics_loaded():
        codex = FirstPrincipleCodex()
        # The base First Principles must be present — they are what everything else
        # is reduced to.
        assert {"causation", "leverage", "compounding", "feedback"} <= set(codex.atomics)
    
    
    def test_kalama_filter_drops_rumor():
        codex = FirstPrincipleCodex()
        kept = codex.kalama_filter(["ราคาปิดที่ 100", "เขาว่าจะขึ้น", "ข่าวลือว่าเจ๊ง"])
        # Rumor-tagged observations are filtered; grounded ones survive.
        assert kept == ["ราคาปิดที่ 100"]
    
    
    def test_generate_options_requires_problem_first():
        codex = FirstPrincipleCodex()
        # Ordering discipline: no options before the problem is framed.
        with pytest.raises(ValueError):
            codex.generate_options("finance_entropy_behavior")
    
    
    def test_define_problem_truths_shape():
        codex = FirstPrincipleCodex()
        pt = codex.define_problem_truths("surface_thinking")
        assert isinstance(pt, ProblemTruths)
        assert pt.problem == "surface_thinking"
        assert pt.paths and all("surface_thinking" in p for p in pt.paths)
    
    
    def test_derive_core_truths_falls_back_when_no_match():
        codex = FirstPrincipleCodex()
        # A phenomenon that matches nothing still yields a minimal explanatory set,
        # never an empty one — the kernel must always give the model something to reason on.
        truths = codex.derive_core_truths("zzz_nomatch_zzz")
        assert 1 <= len(truths) <= len(codex.atomics)
    
    
    def test_generate_options_respects_cap():
        codex = FirstPrincipleCodex()
        codex.define_problem_truths("p")
        opts = codex.generate_options("leverage_information_feedback", max_options=5)
        assert 0 < len(opts) <= 5
        assert all(isinstance(o, OptionPlan) for o in opts)
    
    
    def test_self_now_frame_prefers_simplicity():
        codex = FirstPrincipleCodex()
        lean = OptionPlan(atoms=[AtomicTruth("leverage", "x")], description="")
        heavy = OptionPlan(
            atoms=[AtomicTruth("leverage", "x"), AtomicTruth("feedback", "y"),
                   AtomicTruth("entropy", "z")],
            description="",
        )
        # "self_now" rewards what is executable immediately — fewer moving parts scores higher.
        assert (codex.evaluate_option_in_frame(lean, "self_now")
                > codex.evaluate_option_in_frame(heavy, "self_now"))
    
    
    def test_long_horizon_frame_rewards_compounding():
        codex = FirstPrincipleCodex()
        with_comp = OptionPlan(
            atoms=[AtomicTruth("compounding", "c"), AtomicTruth("leverage", "l")],
            description="",
        )
        without = OptionPlan(
            atoms=[AtomicTruth("information", "i"), AtomicTruth("incentives", "n")],
            description="",
        )
        # Over a 10-year frame, compounding + leverage must beat an equally-sized option
        # that has neither.
        assert (codex.evaluate_option_in_frame(with_comp, "self_10y")
                > codex.evaluate_option_in_frame(without, "self_10y"))
    
    
    def test_select_best_returns_an_option():
        codex = FirstPrincipleCodex()
        codex.define_problem_truths("retail_investors_lose_money")
        options = codex.generate_options("finance_entropy_investor_behavior")
        best = codex.select_best_option(options)
        assert isinstance(best, OptionPlan)
        # selection populates the per-frame scores and the system simulation.
        assert best.score_by_frame
        assert best.problem_reduction >= 0.0
    
  • tests/test_skill_contract.py1.8 KB7351a8f1295bupstream ↗
    """The SKILL.md contract.
    
    A skill is run by a model, so its guarantees live in the markdown. These tests
    hold the file to its own promises — the same properties tools/validate_skill.py
    checks, kept here so a contributor running pytest sees them too.
    """
    from __future__ import annotations
    
    import re
    from pathlib import Path
    
    import yaml
    
    ROOT = Path(__file__).resolve().parent.parent
    SKILL = ROOT / "SKILL.md"
    
    
    def _split():
        text = SKILL.read_text(encoding="utf-8")
        m = re.match(r"^---\n(.*?)\n---\n", text, re.S)
        assert m, "frontmatter must be present and delimited"
        return yaml.safe_load(m.group(1)), text[m.end():]
    
    
    def test_canonical_filename():
        assert SKILL.exists(), "SKILL.md must exist at the repository root"
    
    
    def test_frontmatter_fields():
        fm, _ = _split()
        for f in ("name", "description"):
            assert f in fm
        for f in ("license", "version"):
            assert f in fm
        assert str(fm["license"]).lower().replace(" ", "-") == "apache-2.0"
    
    
    def test_name_is_slug_safe():
        fm, _ = _split()
        assert re.fullmatch(r"[a-z0-9][a-z0-9-]*", str(fm["name"]))
    
    
    def test_metadata_bounds_scope():
        fm, _ = _split()
        meta = fm.get("metadata", {})
        assert meta.get("compatibility")
        assert meta.get("not_for")
    
    
    def test_body_requires_uncertainty_and_counter_argument():
        _, body = _split()
        assert re.search(r"uncertaint|confidence", body, re.I)
        assert re.search(r"counter.?argument|skeptic|self.?crit", body, re.I)
        assert re.search(r"invalidat", body, re.I)
    
    
    def test_body_degrades_honestly():
        _, body = _split()
        assert re.search(r"insufficient|abstain|unknown", body, re.I)
    
    
    def test_body_defers_markets_to_money_atlas():
        _, body = _split()
        # Scope boundary: this is not a markets skill and says so, by name.
        assert "money-atlas-intelligence-os" in body
    
  • tools/validate_skill.py3.4 KB96d3a1d6c2cdupstream ↗
    #!/usr/bin/env python3
    """
    validate_skill.py — integrity checks for Genesis Mind Strategic Intelligence.
    
    READ-ONLY. Never modifies SKILL.md. Verifies the skill is installable
    (frontmatter well-formed) and that its reasoning contract is intact.
    
    Run:  python tools/validate_skill.py
    Exit: 0 pass · 1 fail
    """
    from __future__ import annotations
    
    import re
    import sys
    from pathlib import Path
    
    try:
        sys.stdout.reconfigure(encoding="utf-8")
    except Exception:  # pragma: no cover
        pass
    
    try:
        import yaml
    except ImportError:
        print("Missing dependency: pyyaml. Install with: pip install pyyaml")
        sys.exit(1)
    
    ROOT = Path(__file__).resolve().parent.parent
    SKILL = ROOT / "SKILL.md"
    REQUIRED = ["name", "description"]
    RECOMMENDED = ["license", "version"]
    
    results: list[tuple[str, bool]] = []
    
    
    def check(name: str, cond: bool) -> None:
        results.append((name, bool(cond)))
        print(f"  {'PASS' if cond else 'FAIL'}  {name}")
    
    
    def main() -> int:
        if not SKILL.exists():
            print(f"FATAL: SKILL.md not found at {SKILL}")
            return 1
        text = SKILL.read_text(encoding="utf-8")
    
        print("\nINSTALLABILITY")
        m = re.match(r"^---\n(.*?)\n---\n", text, re.S)
        check("frontmatter present and delimited", m is not None)
        if not m:
            return 1
        try:
            fm = yaml.safe_load(m.group(1))
            check("frontmatter is valid YAML", isinstance(fm, dict))
        except yaml.YAMLError:
            check("frontmatter is valid YAML", False)
            return 1
    
        for f in REQUIRED:
            check(f"frontmatter has '{f}'", f in fm)
        check("name is slug-safe (a-z0-9-)",
              bool(re.fullmatch(r"[a-z0-9][a-z0-9-]*", str(fm.get("name", "")))))
        for f in RECOMMENDED:
            check(f"frontmatter declares '{f}'", f in fm)
        check("license is Apache-2.0 (matches LICENSE file)",
              str(fm.get("license", "")).lower().replace(" ", "-") == "apache-2.0")
        check("canonical filename is SKILL.md", SKILL.name == "SKILL.md")
    
        meta = fm.get("metadata", {}) if isinstance(fm.get("metadata"), dict) else {}
        check("metadata.compatibility declared", bool(meta.get("compatibility")))
        check("metadata.not_for bounds the scope", bool(meta.get("not_for")))
    
        body = text[m.end():]
        print("\nINTEGRITY")
        check("multi-agent council declared", re.search(r"council|skeptic", body, re.I) is not None)
        check("output requires explicit uncertainty",
              re.search(r"uncertaint|confidence", body, re.I) is not None)
        check("output requires counter-argument / self-critique",
              re.search(r"counter.?argument|skeptic|self.?crit", body, re.I) is not None)
        check("output requires invalidation conditions",
              re.search(r"invalidat", body, re.I) is not None)
        check("declares graceful degradation when data is insufficient",
              re.search(r"insufficient|abstain|unknown", body, re.I) is not None)
        check("hands financial-market questions to money-atlas",
              "money-atlas-intelligence-os" in body)
    
        print("\nREPOSITORY")
        check("LICENSE exists", (ROOT / "LICENSE").exists())
        check("NOTICE exists", (ROOT / "NOTICE").exists())
    
        passed = sum(1 for _, ok in results if ok)
        total = len(results)
        print(f"\n{'=' * 52}\nVALIDATION: {passed}/{total} passed")
        if passed != total:
            print("FAILED:", [n for n, ok in results if not ok])
            return 1
        print(f"{SKILL.name} is installable and structurally intact.")
        return 0
    
    
    if __name__ == "__main__":
        sys.exit(main())
    

Plain-text copy, no login: /skill-bundles/elmatadorz-genesis-mind-cognitive-skill.md

// REPO STATS

15 stars