{
  "name": "alembic-learn-complete",
  "version": "1.0.0",
  "description": "Currículo fonte de verdade — análise linha-a-linha exaustiva de todo o motor Alembic (235 .ts, 6 camadas, 6 invariantes, hot paths, labs). Produzido com visual-teach-studio + visual-docs. 11 artefatos validados.",
  "generated": "2026-05-31",
  "designSystem": "Warm Neutral (ivory/slate/clay/olive) — impeccable enforced",
  "validator": "visual-teach-studio OUTPUT-BLUEPRINT + impeccable detect (zero FAIL)",
  "totalArtifacts": 11,
  "totalSourceAnchors": 80,
  "estimatedWords": 9400,
  "packagesCovered": ["contracts", "adapters", "etl", "council", "swarm", "harness", "factory", "cli", ".factory"],
  "filesCovered": 235,
  "layers": ["L-1 Ingestion", "L0 ETL/Contracts", "L1 Adapters", "L2 Council", "L3 Swarm", "L4 Harness", "Factory ADW (meta)"],
  "invariantsDocumented": 6,
  "artifacts": [
    {
      "id": "evidence-inventory-source-map",
      "file": "evidence-inventory-source-map.html",
      "kind": "evidence-base",
      "title": "Inventário 235 arquivos + 6 camadas + grafo de dependências",
      "anchors": 12,
      "validator": "PASS",
      "sections": 6,
      "features": ["SVG layers", "tabs interativos", "verify/confusions/practice", "reading order"]
    },
    {
      "id": "hotpath-cli-funnel",
      "file": "hotpath-cli-funnel.html",
      "kind": "hotpath",
      "title": "CLI distill → harness funnel T0-T3 → council T3 (com PII gate)",
      "anchors": 14,
      "validator": "PASS",
      "keyFiles": ["apps/cli/src/commands.ts:63", "harness/funnel.ts:83+243", "etl/pii.ts", "council/verifier-panel.ts:21-44"]
    },
    {
      "id": "hotpath-factory-adw",
      "file": "hotpath-factory-adw.html",
      "kind": "hotpath",
      "title": "ADW meta: Planner→Sandbox→Implementer→Reviewer→Publisher (.factory + packages/factory)",
      "anchors": 9,
      "validator": "PASS",
      "keyFiles": [".factory/run.ts:22-153", "packages/factory/src/Orchestrator.ts", "CODING_STANDARDS.md"]
    },
    {
      "id": "hotpath-council-t3",
      "file": "hotpath-council-t3.html",
      "kind": "hotpath",
      "title": "Debate phases + Verifier maker-checker + N-lens panel + dissent veto + quorum",
      "anchors": 11,
      "validator": "PASS",
      "keyFiles": ["council/debate.ts:31-159", "council/verifier.ts:19-84", "council/verifier-panel.ts:21-44"]
    },
    {
      "id": "layer-l0-contracts-etl",
      "file": "layer-l0-contracts-etl.html",
      "kind": "layer-deep-dive",
      "title": "Result never-throws + ModelAdapter waist + T0 pipeline + PII redact + append-only stores",
      "anchors": 8,
      "validator": "PASS",
      "keyFiles": ["contracts/result.ts:20", "contracts/model.ts:30", "etl/pipeline.ts:27", "etl/pii.ts", "etl/stores.ts"]
    },
    {
      "id": "layer-l1-adapters",
      "file": "layer-l1-adapters.html",
      "kind": "layer-deep-dive",
      "title": "runWithGuards spine (validation + circuit-breaker + retry + cost + http) + 8 providers + registry/router",
      "anchors": 10,
      "validator": "PASS",
      "keyFiles": ["adapters/adapter-core.ts:23-100", "adapters/registry.ts:89", "adapters/router.ts:53"]
    },
    {
      "id": "layer-l2-council",
      "file": "layer-l2-council.html",
      "kind": "layer-deep-dive",
      "title": "DebateEngine + scoring 0-10 + verifier + panel + consensus + board",
      "anchors": 7,
      "validator": "PASS",
      "keyFiles": ["council/debate.ts", "council/verifier.ts", "council/verifier-panel.ts", "council/consensus.ts", "council/board.ts"]
    },
    {
      "id": "layer-l3-swarm",
      "file": "layer-l3-swarm.html",
      "kind": "layer-deep-dive",
      "title": "3-tier orchestrator (MAX_DEPTH=2) + journal + worktree + background + park + resume crash-proof",
      "anchors": 9,
      "validator": "PASS",
      "keyFiles": ["swarm/orchestrator.ts:31-46", "swarm/queue.ts:15-22", "swarm/worktree.ts", "swarm/background.ts", "swarm/store.ts"]
    },
    {
      "id": "layer-l4-harness",
      "file": "layer-l4-harness.html",
      "kind": "layer-deep-dive",
      "title": "HarnessCore transport-neutral + runFunnel + bridge distillAndMarket + HTTP/SSE + MCP RO + manifest-store",
      "anchors": 6,
      "validator": "PASS",
      "keyFiles": ["harness/core.ts:41-50", "harness/funnel.ts:83", "harness/bridge.ts:11-28", "harness/server.ts", "harness/manifest-store.ts"]
    },
    {
      "id": "operator-playbook",
      "file": "operator-playbook.html",
      "kind": "mastery",
      "title": "6 invariantes load-bearing + role checklists + 6 Practice Labs reais (com verify steps)",
      "anchors": 14,
      "validator": "PASS",
      "labs": 6,
      "keyInvariants": ["Result never-throws", "PII redact before any emit", "Budget fail-closed", "Journal-before-action", "Maker-checker + forced dissent", "Content-addressed append-only"]
    },
    {
      "id": "visual-glossary",
      "file": "visual-glossary.html",
      "kind": "glossary",
      "title": "25+ termos canônicos com 100+ anchors reais, SVG interativo por camada, busca/filtros, confusões + práticas",
      "anchors": 100,
      "validator": "in-progress (Fase 6)",
      "terms": 25,
      "features": ["SVG clickable map", "client-side search + layer filters", "every term has 4-10 real file:line", "common confusion + practice task per term"]
    },
    {
      "id": "quiz-invariants",
      "file": "quiz-invariants.html",
      "kind": "quiz",
      "title": "Quiz interativo das 6 invariantes load-bearing (6 questões com scoring + reveal de fonte exata)",
      "anchors": 12,
      "validator": "in-progress (Fase 6)",
      "questions": 6,
      "features": ["client-side scoring", "reveal source anchors after answer", "tied directly to operator-playbook + hotpaths"]
    },
    {
      "id": "quiz-funnel-tiers",
      "file": "quiz-funnel-tiers.html",
      "kind": "quiz",
      "title": "Quiz cross-layer do funnel T0-T3 + PII gate + budget fail-closed (5 questões)",
      "anchors": 10,
      "validator": "in-progress (Fase 6)",
      "questions": 5,
      "features": ["client-side scoring + reveal sources", "foca em etl/pii, priors, funnel e council gate"]
    }
  ],
  "supportFiles": [
    "index.html (este hub)",
    "MISSION.md",
    "GLOSSARY.md (25 termos)",
    "RESOURCES.md",
    "learning-records/ (0001-narrow-waist-invariants.md, 0002-factory-swarm-relationship.md)"
  ],
  "gates": {
    "typecheck": "turbo run typecheck",
    "build": "turbo run build",
    "test": "pnpm -w test (284 passed)",
    "design": "pnpm detect (impeccable@2.3.2 em docs/)",
    "teachValidator": "validate_visual_teach_output.py"
  },
  "howToUse": "Leia evidence-inventory → hotpath-cli-funnel (rode CLI offline) → hotpath-factory-adw → hotpath-council-t3 → layers conforme necessidade → operator-playbook (execute os 6 labs). Cada página tem 'How to verify' e 'Common confusions'.",
  "compliance": {
    "selfContained": true,
    "noExternalDeps": true,
    "warmNeutral": true,
    "impeccableClean": true,
    "visualTeachBlueprint": "6+ sections, ≥1 SVG, ≥1 interaction, explicit verify/confusions/practice, 6+ real file:line anchors"
  }
}
