Anti-Hallucination Cognitive Base Layer for Claude Skills
Hallucination in LLMs is not a bug. It is an emergent property of systems that lack an epistemological gate between pattern completion and verified truth output.
FPCOS solves this by embedding a verification-first cognitive architecture as a shared base layer that every Claude Skill can inherit — creating a universal OS where:
- Every claim must pass First Principle + Kalama10 verification
- Every problem must be framed through Ariya4 before solutions are proposed
- Every system analysis maps feedback loops, leverage, and dead weight
- Compound Mind synthesizes across domains without single-axis traps
- Every output must survive Shadow Gate self-critique (non-skippable)
┌─────────────────────────────────────────────────────────────────┐
│ FPCOS — BASE LAYER v1.0 │
│ │
│ L0 REALITY ANCHOR ──→ L1 AXIOM GATE ──→ L2 SYSTEM LENS │
│ ↓ ↓ ↓ │
│ L3 COMPOUND MIND ──→ L4 SHADOW GATE ──→ L5 SYNTHESIS │
│ (NON-SKIPPABLE) │
│ │
│ ↕↕↕↕↕ SKILL INTERFACE LAYER (connect any domain) ↕↕↕↕↕ │
│ [Finance] [Coffee] [Strategy] [Medical] [Code] [...] │
└─────────────────────────────────────────────────────────────────┘
| Layer | Name | Function |
|---|---|---|
| L0 | Reality Anchor | Declare KNOWN / INFERRED / UNKNOWN before any claim |
| L1 | Axiom Gate | First Principle + Kalama10 (10-rejection test) + Ariya4 |
| L2 | System Lens | Map variables, feedback loops, leverage, dead weight |
| L3 | Compound Mind | All-path mapping + cross-domain synthesis |
| L4 | Shadow Gate | 5-protocol self-critique — always runs, non-skippable |
| L5 | Synthesis | Verified output with mandatory confidence field |
- Copy the entire
SKILL.mdfile contents - In Claude.ai → Settings → Skills → Create New Skill
- Paste the content
- Name it:
first-principle-codex-os - Save and activate
---
name: "your-skill-name"
base_os: "first-principle-codex-os"
base_os_version: "1.0"
description: |
Your skill description here.
Built on FPCOS v1.0 by Bunyawat Dechanon (ElmatadorZ).
---| # | Contract | Removable? |
|---|---|---|
| 01 | Inherit Reality Anchor (L0) | ❌ |
| 02 | Apply Kalama10 as proof standard (L1) | ❌ |
| 03 | Use Ariya4 for problem framing (L1) | ❌ |
| 04 | Run Shadow Gate before output (L4) | ❌ |
| 05 | State confidence % and unknowns (L5) | ❌ |
Skills MAY: Add layers between L2–L4, rename layers for domain. Skills MAY NOT: Remove L0, L1, L4, L5. Violate Kalama10.
FPCOS is a base layer that every domain skill inherits, so the thing to verify is that the non-removable layers are actually present and marked non-removable. Checked on every push, runnable locally:
pip install pytest pyyaml
python tools/validate_skill.py # frontmatter, license, and L0/L1/L4/L5 intact
python -m pytest -q # contract tests over SKILL.mdThe tests hold the file to its promises: L0/L1/L4/L5 present, the Shadow Gate marked non-skippable, Known/Inferred/Unknown separation, a confidence field required at output, and the frontmatter license kept in agreement with the LICENSE file.
The skill file was
SKILL.MD(uppercase extension). Claude's skill loader is case-sensitive and looks for exactlySKILL.md, so on a case-sensitive host the base layer would not have loaded at all. Renamed toSKILL.md(and theexample/*.MDfiles likewise), with a test pinning the canonical name.
fpcos/
├── SKILL.md ← Main skill file. Copy this.
├── README.md
├── LICENSE
├── NOTICE
├── CHANGELOG.md
├── CONTRIBUTING.md
├── SECURITY.md
├── CITATION.cff
├── Reference/
│ ├── CODEX_KALAMA.md
│ ├── CODEX_ARIYA4.md
│ ├── SHADOW_GATE_DEEP.md
│ ├── COMPOUND_MIND_PATTERNS.md
│ ├── SKILL_INHERITANCE.md
│ └── ANTI_HALLUCINATION.md
├── example/
│ ├── fpcos-finance-example.md
│ └── fpcos-research-example.md
├── tools/validate_skill.py ← installability + integrity checker
├── tests/test_skill_contract.py ← contract tests (run in CI)
└── .github/
├── workflows/validate.yml ← CI: skill integrity · tests · links · hygiene
├── ISSUE_TEMPLATE/
└── PULL_REQUEST_TEMPLATE.md
Apache License 2.0 — OSI-approved, with an express patent grant.
- ✅ Free to use, modify, and redistribute — including commercially, at any revenue
- 📌 Keep the licence and NOTICE, and state any changed files
- 🏷️ Apache §6 does not grant rights to the name: a derivative that removes L0, L1, L4, or L5 must be renamed and must not imply endorsement — those layers are what FPCOS is
(Earlier releases used the custom Open Cognitive License v1.0, which carried a 2% revenue clause. It was replaced to remove adoption friction for organisations requiring an OSI-approved licence.)
- 📌 Attribution required: "Built on FPCOS v1.0 by Bunyawat Dechanon (ElmatadorZ)"
Bunyawat Dechanon (ElmatadorZ)
"ระบบที่ดีที่สุดคือระบบที่ตั้งคำถามกับตัวเองได้ — และยังทำงานได้ต่อ" "The best system is one that questions itself — and still functions."