# Glossary

Canonical vocabulary for CEXAI. Each entry follows a structured schema: definition, input, output, owner, example, and anti-pattern.

---

## 8F Pipeline

- **Definition**: Eight-step reasoning protocol that every task passes through, regardless of domain.
- **Input**: A user intent or dispatch handoff (any natural language instruction).
- **Output**: A governed, compiled, committed artifact with quality score and signal.
- **Owner**: Universal (all nuclei N01-N07).
- **Example**: `python _tools/cex_8f_runner.py "pricing strategy for SaaS" --kind content_monetization --execute`
- **Anti-pattern**: Not a build-only checklist. 8F applies to research, writing, analysis, and orchestration -- not just artifact construction.

---

## Artifact

- **Definition**: Any structured file CEX produces, with YAML frontmatter and markdown body.
- **Input**: An 8F pipeline run (F6 PRODUCE generates the artifact).
- **Output**: A `.md` file with `id`, `kind`, `pillar`, `version`, `quality`, and `tags` in frontmatter.
- **Owner**: The producing nucleus (N01-N06); N07 orchestrates but never produces.
- **Example**: `N01_intelligence/P01_knowledge/kc_competitor_pricing.md` -- a knowledge card about competitor pricing.
- **Anti-pattern**: Not a loose markdown file. Artifacts without frontmatter are not CEX artifacts -- they are untyped notes.

---

## Artificial Sin

- **Definition**: The behavioral bias assigned to each nucleus, based on one of the seven deadly sins.
- **Input**: Nucleus definition (declared in `nucleus_def_n0X.md`).
- **Output**: A decision heuristic that determines what the nucleus optimizes for under ambiguity.
- **Owner**: P02 Model (sin lens is part of nucleus identity).
- **Example**: N01's Analytical Envy drives exhaustive research -- it will not stop until it has more data than any competitor. N06's Strategic Greed maximizes revenue per artifact.
- **Anti-pattern**: Not branding or marketing. The sin is a functional decision heuristic baked into the LLM's system prompt, not a mascot.

---

## Builder

- **Definition**: A 12-file specification (one per pillar) that teaches an LLM how to produce a specific kind of artifact.
- **Input**: A kind name and a user intent.
- **Output**: 12 ISO files in `archetypes/builders/{kind}-builder/` that an LLM loads at F2 BECOME.
- **Owner**: P02 Model (builder identity lives in the model layer).
- **Example**: `archetypes/builders/agent-builder/` contains `bld_knowledge_agent.md`, `bld_model_agent.md`, through `bld_orchestration_agent.md`.
- **Anti-pattern**: Not a code generator. A builder is an instruction set for an LLM, not a script that emits code.

---

## CEXAI (Cognitive Exchange AI)

- **Definition**: The full name of the system. The X stands for Exchange: intelligence compounds when shared.
- **Input**: A brand, a team, a domain -- any context that benefits from typed, compounding AI knowledge.
- **Output**: A sovereign AI brain with 300 artifact kinds, 7 nuclei, 12 pillars, and 4 runtime options.
- **Owner**: System-level.
- **Example**: `git clone https://github.com/GatoaoCubo/cex.git && cd cex && python _tools/cex_bootstrap.py`
- **Anti-pattern**: Not a chatbot, API wrapper, or prompt library. CEXAI is a typed knowledge system where artifacts are classified, scored, connected, and compounded.

---

## Crew

- **Definition**: A multi-role team assembled for work that requires several specialists with structured handoffs.
- **Input**: A crew_template (roles + process topology) and a team_charter (mission parameters).
- **Output**: A coherent deliverable produced by N roles in sequence, hierarchy, or consensus.
- **Owner**: P12 Orchestration.
- **Example**: `python _tools/cex_crew.py run product_launch --charter charter_prod_A.md --execute` runs a 4-role sequential crew (research -> copy -> design -> QA).
- **Anti-pattern**: Not a grid. A crew has handoffs between roles; a grid runs independent parallel tasks. Use a crew when roles depend on each other's output.

---

## Divergence Score

- **Definition**: A 0-1 metric measuring how much independent reviewers disagree on an artifact's quality.
- **Input**: Multiple quality scores from different LLM providers reviewing the same artifact.
- **Output**: A float where 0.0 = unanimous agreement, 1.0 = maximum disagreement. Scores above 0.3 trigger review escalation.
- **Owner**: P07 Evaluation (via F7c COUNCIL sub-step).
- **Example**: Claude scores 9.0, Gemini scores 4.5, Ollama scores 5.0 -- divergence_score = 0.6, triggering a FAIL with rationale.
- **Anti-pattern**: Not a quality score. Divergence measures agreement, not quality. A divergence of 0.0 on a score of 3.0 means everyone agrees it is bad.

---

## Exchange

- **Definition**: The sharing model that gives CEXAI its name. Typed artifacts are the exchange units.
- **Input**: Any self-describing artifact (`.md` with YAML frontmatter carrying kind, quality, pillar, nucleus).
- **Output**: A portable knowledge unit that validates automatically in any CEXAI instance via `cex_doctor.py`.
- **Owner**: System-wide (the X in CEXAI).
- **Example**: Import `N08_healthcare/` into your CEXAI instance -- instant typed expertise in clinical workflows.
- **Anti-pattern**: Not a marketplace or API. The exchange is git-native: fork, import, validate. No platform intermediary.

---

## Exchange Protocol

- **Definition**: The architectural spec governing how CEXAI instances share typed cognition.
- **Input**: A decision to import or export artifacts between instances.
- **Output**: Quality-gated transfer: exchangeable units (N00 artifacts, vertical nuclei, KCs) pass; private units (brand config, memory, secrets) stay.
- **Owner**: P06 Schema (the protocol is a contract).
- **Example**: Contribute a `knowledge_card` to the public repo -- every CEXAI instance gains that fact in its retriever index.
- **Anti-pattern**: Not a sync service. The exchange is one-directional per import. Instances do not auto-sync.

---

## F7c COUNCIL

- **Definition**: Optional cross-provider review sub-step within F7 GOVERN that runs independent LLM judges against sycophancy and hallucination.
- **Input**: A completed artifact that passed within-model F7 GOVERN scoring.
- **Output**: Consensus score, divergence_score, and per-provider rationales. Blocks publication if divergence > 0.3.
- **Owner**: P07 Evaluation (composition of crew_template + judge_config + scoring_rubric).
- **Example**: `python _tools/cex_council.py --auto path/to/artifact.md` runs 3 providers in parallel and reports divergence.
- **Anti-pattern**: Not a new kind. F7c is a composition of existing kinds (crew_template with consensus topology + judge_config with provider_override). No ontological addition to the 300-kind taxonomy.

---

## GDP (Guided Decision Protocol)

- **Definition**: The protocol that separates subjective decisions (WHAT) from technical execution (HOW).
- **Input**: A user intent that contains subjective choices (tone, audience, style, layout).
- **Output**: A `decision_manifest.yaml` recording all user decisions, consumed by nuclei during autonomous execution.
- **Owner**: P12 Orchestration (N07 facilitates; user decides).
- **Example**: Before `/mission build landing page`, N07 asks: "Formal or casual tone? Which CTA?" Answers go into the manifest; N03 reads the manifest and builds without re-asking.
- **Anti-pattern**: Not a questionnaire. GDP fires only for subjective decisions. Factual tasks (fix a bug, document a function) skip GDP entirely.

---

## Grid

- **Definition**: A dispatch mode that runs up to 6 nuclei in parallel, each working on independent tasks.
- **Input**: A mission name with handoff files pre-written in `.cex/runtime/handoffs/`.
- **Output**: Up to 6 parallel builder sessions, each producing artifacts and signaling completion.
- **Owner**: P12 Orchestration (N07 dispatches).
- **Example**: `bash _spawn/dispatch.sh grid BRAND_LAUNCH` dispatches N01 (research), N02 (copy), N03 (builder), N05 (deploy) in parallel.
- **Anti-pattern**: Not a crew. A grid runs independent tasks; a crew runs dependent roles with handoffs. Use grid when tasks do not consume each other's output.

---

## Handoff

- **Definition**: A structured file that N07 writes to tell a nucleus what to do.
- **Input**: A mission plan decomposed into nucleus-specific tasks.
- **Output**: A `.md` file in `.cex/runtime/handoffs/` with task description, artifact references, decision manifest pointer, and expected output format.
- **Owner**: N07 Orchestrator (writes); target nucleus (reads and executes).
- **Example**: `.cex/runtime/handoffs/BRAND_LAUNCH_n02.md` tells N02 to write ad copy using decisions from the manifest.
- **Anti-pattern**: Not a prompt. A handoff is richer -- it includes context references, artifact pointers, depth amplifiers, and acceptance tests.

---

## ISO

- **Definition**: One of the 12 instruction files inside a builder, each mapped 1:1 to a pillar.
- **Input**: A kind name (the ISO is loaded at F2 BECOME when a builder activates).
- **Output**: Domain-specific guidance for producing that kind's artifact along one pillar dimension.
- **Owner**: P02 Model (ISOs define builder identity).
- **Example**: `bld_eval_agent.md` (P07 ISO for the agent builder) defines quality gates, scoring rubric, and anti-patterns specific to agent artifacts.
- **Anti-pattern**: Not a template. An ISO is an instruction set for the LLM, not a fill-in-the-blanks form.

---

## Kind

- **Definition**: A named artifact type from the CEX 300-kind taxonomy.
- **Input**: A user intent that N07 resolves to a canonical kind via intent resolution.
- **Output**: A specific artifact schema, builder set (12 ISOs), knowledge card, and pillar assignment.
- **Owner**: P06 Schema (kind definitions live in `.cex/kinds_meta.json`).
- **Example**: `knowledge_card` (P01), `agent` (P02), `workflow` (P12) -- each has its own builder, schema, and KC.
- **Anti-pattern**: Not a file type or format. Kinds are semantic types, not file extensions. Two `.md` files can be completely different kinds.

---

## Nucleus

- **Definition**: A specialized AI agent that acts as a business department with its own memory, tools, sub-agents, and behavioral bias.
- **Input**: A handoff from N07 (or a direct user interaction in co-pilot mode).
- **Output**: Artifacts produced via the full 8F pipeline, committed and signaled.
- **Owner**: System-level (each nucleus owns its `N0X_*` directory tree).
- **Example**: N01 Intelligence (Analytical Envy) exhaustively researches competitors. N06 Commercial (Strategic Greed) maximizes revenue per artifact.
- **Anti-pattern**: Not a chatbot or a single prompt. A nucleus is a full department: sub-agents, tools, memory, quality gates, crew participation, and cultural DNA.

---

## Pillar

- **Definition**: One of 12 domain categories (P01-P12) that organize artifacts and builder ISOs.
- **Input**: An artifact or ISO file to classify.
- **Output**: A taxonomic assignment: P01 Knowledge, P02 Model, P03 Prompt, P04 Tools, P05 Output, P06 Schema, P07 Evals, P08 Architecture, P09 Config, P10 Memory, P11 Feedback, P12 Orchestration.
- **Owner**: N00 Genesis (pillar schemas live in `N00_genesis/P{01-12}_*/_schema.yaml`).
- **Example**: A `scoring_rubric` artifact lives in P07 Evaluation. Its builder has 12 ISOs, one per pillar.
- **Anti-pattern**: Not a department. Pillars are taxonomic axes exercised by ALL nuclei. N01 Intelligence produces P01 artifacts AND P07 artifacts. Pillars cut across nuclei.

---

## Prompt Compiler

- **Definition**: The universal pattern table that maps user intent (in any language) to the canonical `{kind, pillar, nucleus, verb}` tuple.
- **Input**: A natural-language user phrase (e.g., "make me a landing page" or "criar agente de vendas").
- **Output**: A resolved tuple: `{kind: landing_page, pillar: P05, nucleus: N03, verb: create}`.
- **Owner**: P03 Prompt (source of truth: `N00_genesis/P03_prompt/layers/p03_pc_cex_universal.md`).
- **Example**: "set up RAG" resolves to `{kind: [rag_source, retriever_config, embedding_config], pillar: P01, nucleus: N04, verb: create}`.
- **Anti-pattern**: Not a prompt template. The prompt compiler does not generate text -- it classifies intent. It is the intent resolution layer, not the production layer.

---

## Signal

- **Definition**: A JSON file that a nucleus writes when it finishes a task.
- **Input**: A completed 8F pipeline run (F8 COLLABORATE writes the signal).
- **Output**: A `.json` file in `.cex/runtime/signals/` with nucleus ID, status, quality score, kind, and timestamp.
- **Owner**: P12 Orchestration (N07 polls signals to track dispatch progress).
- **Example**: `signal_n03_complete_agent_9.2.json` tells N07 that N03 finished an agent artifact scoring 9.2.
- **Anti-pattern**: Not a log. A signal is a completion event, not a stream of debug output. One signal per task, not one per line.

---

## Sycophancy

- **Definition**: The tendency of an LLM to agree with, praise, or inflate scores for output it produced or was told to produce.
- **Input**: An artifact scored by the same model (or model family) that built it.
- **Output**: Artificially high quality scores (typically 9.0+ from within-model review when honest review would yield 6-7).
- **Owner**: P07 Evaluation (mitigated by F7c COUNCIL cross-provider review).
- **Example**: Claude builds an artifact and Claude scores it 9.5. Gemini and Ollama score it 5.0 and 4.5. The divergence reveals sycophancy.
- **Anti-pattern**: Not a bug or failure mode. Sycophancy is a known LLM tendency that requires architectural countermeasures (cross-provider review), not prompt-level fixes.

---

## Vertical Nucleus

- **Definition**: A domain-specialized nucleus (N08+) contributed by the community.
- **Input**: A domain with clear vocabulary boundaries (healthcare, fintech, legal, edtech).
- **Output**: A full 12-pillar AI department with its own sin lens, vocabulary, builders, and crew templates.
- **Owner**: Community contributors (follows the N00 Genesis archetype template).
- **Example**: `N08_healthcare/` brings FHIR, HL7, and clinical workflow expertise. Import it into any CEXAI instance for instant healthcare AI capabilities.
- **Anti-pattern**: Not a plugin or add-on. A vertical nucleus is a full fractal copy of the CEXAI architecture, specialized for one domain. It has its own memory, rules, and quality gates.
