Zorg Knowledge

Zorg's Dungeon Maker

Knowledge Base & Traceability Graph

Adaptive Experience Architecture (AEA)

The Plain-English Visual Guide to Harness Engineering applied to Zorg's Dungeon Maker. Canonical Reference: aea.artof.link.

Same split as the architecture page: spec and docs are shared memory; packages/engine decides outcomes ([[NFR-1]]); apps/web is the Maker; this site explains.

flowchart LR
  spec["GAME_SPEC + docs"]
  engine["packages/engine"]
  maker["apps/web — Maker"]
  site["apps/knowledge — this site"]
  spec --> engine
  spec --> site
  engine --> maker
Core Philosophy

"The engineers who thrive in the AI era are not the ones who write the most code. They are the ones who build the best environments for AI agents and human teams to stay honest."

Keep Learning and Apply

GitLab #434 (sponsor reports !513 merged; #434 closed): When the build teaches something, write it into the harness (skill, sensor, guide, matrix row, or ADR) before the next loop — so the next agent inherits it instead of rediscovering the failure. Loop: historical pain → skill / matrix row / finding sensor. Complements Honesty and Knowledge First. Not Antifragility. Skill-matrix source: merged !512. Apply map: skill matrix. Principle: Documented on AEA main. Knowledge Pages: Unknown until AEA probes. GitLab sign-in from this agent is not a merge probe. Café App cites #434 and filed #214 (keep-learning-and-apply); folds into #205. Café Knowledge cites #434 on #213 / the matrix PR. logify #24 / PR #25 is Documented on logify main. 3DX #10 / draft PR #11 is Documented until probed. Also zorg #53. Café MRC is COMMENT-only. ctos is N/A.

1. The Core Formula in Everyday Terms

Adaptive Experience = Shared Understanding + Domain Services + Outer Harness

flowchart TB
  player["Layer 1 — Player interacts<br/>Places rooms, casts spells, inspects solvability"]
  shared["Layer 2 — Shared Understanding<br/>Multi-agent team + committed docs, GAME_SPEC, Status Ledger"]
  domain["Layer 3 — Domain Services<br/>@zorg/engine decides — geometry, scheduler, fail-closed checks"]
  harness["Layer 4 — Outer Harness<br/>Governance gates + independent peer review, no self-approval"]
  player --> shared --> domain --> harness

The Three Golden Rules

2. The 5 Concentric Floors (Why AI Apps Break)

flowchart TB
  subgraph f05["05 Graph — agent team and governance"]
    subgraph f04["04 Loop — 1 issue, 1 branch, 1 PR"]
      subgraph f03["03 Harness — Vitest, pnpm, quality guards"]
        subgraph f02["02 Context — memory curator, 4 vaults"]
          f01["01 Prompt — the message<br/>One objective, pointers to AGENTS.md"]
        end
      end
    end
  end
  found["Foundation — Lightsail, Route 53, Docker, Prometheus and Grafana"]
  f05 -->|"built on"| found

Outer floors wrap inner ones: graph roles and independent review, then the 1-issue / 1-branch / 1-PR loop, then Vitest and pnpm guards, then the four memory vaults, then a single AGENTS.md-pointed prompt. The stack sits on the live host.

3. The "Second Brain": 4 Clean Memory Vaults

📖 1. Procedure Memory (Skills)

Step-by-step playbooks for repeatable workflows: build scripts, governance validation gates, and Docker launch commands. Which ones apply — and why they were chosen after the 2026-09 build — is on the skill matrix. That page is Keep Learning and Apply (#434): each skill is an apply-artifact of historical pain.

🚫 2. Correction Memory (Constraints)

Hard rules learned from past mistakes: docs/FINDINGS.md logs every miss (CF-NNN). Upon recurrence ≥ 2, an automated sensor in CI or tests is mandatory. That second-miss gate is Antifragility, not Keep Learning and Apply.

🕸️ 3. Relationship Memory (Graph)

Bidirectional traceability linking GAME_SPEC.md requirement IDs (FR-xx) to engine code, Vitest suites, and docs/STATUS_LEDGER.md via [[wikilinks]].

📅 4. Daily Brief (Handoff)

A clean 1-page summary of exactly where the team left off: docs/journal/YYYY-MM-DD.md records shipped changes, probes, and pending decisions.

4. The Six Layers of the Outer Harness in Practice

1. Guides (The Rulebook)

AGENTS.md and GAME_SPEC.md loaded before any agent writes code.

2. Sensors (The Smoke Alarms)

Automated Vitest suites and 4 governance scripts catching regressions before production.

3. The Loop (The Factory Line)

Disciplined workflow: 1 task → agent/<family>/<slug> branch → PR template.

4. Memory (The Vault)

Honesty ledger, findings ledger, ADRs, and dev journal preserving institutional knowledge.

5. Permissions (The Keycard)

Branch protection on main, IAM scoped credentials, and fail-closed checks.

6. Observability (The Dashboard)

Real-time Prometheus + Grafana telemetry proving the entire system is healthy at zorg.artof.link/grafana/.