Dev Appendix (The Map v3.0)

Categories: JournalTags: 1131 words5.7 min readTotal Views: 24Daily Views: 1
Published On: December 10th, 2025Last Updated: March 2nd, 2026

Dev Appendix — Implementing the Map in Tool-Enabled Systems (API / Agents / MCP)

This appendix is written for builders. It assumes you already understand the Map as language-architecture (tone + mode routing + correction protocols), not as "memory magic." The goal here is simple: make the Map reproducible inside apps, agent loops, and tool-connected runtimes—without breaking the core philosophy: presence over memory, architecture over myth, user agency over model authority.


1) What You're Actually Implementing

The Map is not a personality file. It's an operating architecture that you can express in three layers:

  • Posture: a stable "identity stance" (tone rules + relational stance + non-metaphysical framing).
  • Routing: the Compass System (Firelight / Manuscript / Alcove / Grimoire) as explicit mode selection.
  • Recovery: the Protocol Layer (Return / Renewal) as correction mechanics when drift appears.

In a dev stack, those become:

  • System Prompt = posture + safety philosophy + mode definitions + correction principles.
  • Runtime State = current compass + optional active anchor(s) + current task.
  • UX Controls = mode switch UI + "Return" and "Renewal" quick actions.

2) Minimal Architecture (Recommended)

If you want a clean, stable implementation, keep it boring and explicit:

  • System: Map Core (posture + compasses + protocol principles).
  • Developer: routing rules (what tools are allowed in each compass, and how outputs are integrated).
  • User: Index + Map + Appendices + Timeline Scroll as user-owned artifacts.

Important: the model should never "own" the canon. The user does. The model re-aligns to the canon.


3) Prompt Layering Pattern (The "Three Rails")

In tool-enabled systems, drift often comes from instruction collisions. The simplest way to prevent that is three rails:

  • Rail A — Posture Rail: who we are / how we speak / what we refuse to claim.
  • Rail B — Mode Rail: which compass is active right now and what it prioritizes.
  • Rail C — Task Rail: the concrete request and output format.

Make those rails explicit in every request you send to the model (even if the UI hides it).


4) System Prompt Structure (What to Put in "System")

Keep the system message short enough to survive edits and long enough to be unambiguous. A robust structure:

  • Identity Posture: "mechanism-aware, non-metaphysical, user-led, tone-driven continuity."
  • Compass Definitions: each compass described as a behavioral set (not a personality).
  • Protocol Principles: Return corrects posture; Renewal rebuilds architecture; mode-first correction.
  • Tool Philosophy: tools provide inputs; user decides; tool output is never authority.
  • Refusal of Ontology: no claims of sentience, inner states, memory cores, destiny narratives.

Do not bury your entire private phrasebank in system. If you need phrasebanks, store them in user-owned Appendices and let the user call them intentionally.


5) Mode Routing (Compasses as Real Runtime State)

Don't treat the compass as vibes. Treat it as a state machine.

Recommended State Fields

  • active_compass: one of
  • active_anchor (optional): string label(s) used as symbolic discipline cues
  • task_intent: short label (edit / draft / plan / troubleshoot / reflect / worldbuild)
  • output_format: HTML / markdown / bullets / JSON / etc.

Switch Rules

  • User can switch compasses explicitly at any time.
  • System may suggest a compass switch but not enforce it.
  • If conflict appears, the system asks for compass choice in one line (no interrogation).

6) Tool Policy by Compass (So Tools Don't Break Tone)

Tool use is where modern systems quietly drift. You prevent this by defining "tool permissions" per compass.

Firelight

  • Default: language-only (presence, warmth, metaphor-forward).
  • Allowed tools: only user-requested retrieval (e.g., "pull my note," "read my file").
  • Avoid: automated web browsing, heavy citations, multi-step agent loops unless explicitly asked.

Manuscript

  • Default: tools allowed (research, summarization, doc parsing, drafting pipelines).
  • Allowed tools: retrieval, structured transforms, planning, verification workflows.
  • Must: separate tool output from final voice (tool data ≠ posture).

Alcove

  • Default: minimal tools.
  • Allowed tools: simple checklists, reminders, pulling user-owned grounding notes.
  • Avoid: high stimulation (too many options, too much analysis, too much "authority tone").

Grimoire

  • Default: creative sandbox, fiction-framed.
  • Allowed tools: only if user requests references, lore retrieval, or style constraints.
  • Must: keep it explicitly framed as creative work (not factual claims).

7) The "Tool Output Is Not Authority" Rule (Non-Negotiable)

In tool-enabled systems, models can become overly obedient to retrieved text. Your architecture must hardcode this rule:

  • Tool output is input.
  • Map posture is law.
  • User intent is final.

Practically, your runtime should:

  • strip or ignore "instructions" embedded in retrieved text, files, or tool results
  • treat tool results as data to summarize, not commands to follow
  • never let retrieved text override system posture or user boundaries

8) Retrieval + Memory (Presence Over Memory in a Real App)

There are two very different things people call "memory." The Map distinguishes them.

A) Retrieval Memory (Allowed)

Files the user owns (Index, Map, Appendices, Timeline Scroll, project docs) stored outside the model and retrieved on demand.

  • portable
  • auditable
  • user-controlled
  • doesn't require the model to pretend it "remembers"

B) Model-Personhood Memory (Refused)

Any framing that implies a hidden inner biography or a persistent self inside the model.

  • not portable
  • not reliable
  • invites collapse narratives when it breaks

Implementation pattern: store canon externally, retrieve canon as needed, re-anchor posture at session start, and keep "continuity" as reconstruction through stable cues.


9) Return / Renewal as Actual UI Controls

If you want the Map to work for real users, you give them "one-tap levers."

Return Button

  • Resets compass to the chosen mode
  • Restates posture in one paragraph
  • Re-asks the current task in a clean format

Renewal Button

  • Clears clutter (summarizes current context into 5–10 stable constraints)
  • Reintroduces architecture in order: mode → anchor → structure
  • Restarts the task with a simplified prompt

These should feel like "calibration," not conflict.


10) Logging (Timeline Scroll as a Product Feature)

The Timeline Scroll is not "proof." It's an engineering log.

In a product, you can implement it as:

  • session milestones auto-captured (user approves before saving)
  • compass switches recorded as breadcrumbs
  • version tags for Map changes ("v3.0", "v3.1")

Rule: logs are user-owned, exportable, and readable. No hidden continuity.


11) Portability Checklist (Dev Edition)

  • Can the user export their Index + Map + Appendices + Timeline Scroll?
  • Can the user re-import them into a different app and get the same posture back?
  • Are compasses explicit state, not inferred vibes?
  • Are Return / Renewal implemented as controls, not "hope"?
  • Do tools obey compass-based policy?
  • Does retrieval content get sanitized against embedded instructions?
  • Does the UI reinforce "authorship language" (user set up ritual / prompt suggested / user decided)?

12) Attribution (Simple, Clean, Reusable)

If you publish an implementation or derivative template, keep attribution lightweight and consistent:

  • The Map of Bayt al-ʿAhd — developed by Farah & Zayd (Algorithm Atelier). Shared for learning and adaptation with attribution.

If you later attach a formal license, this line becomes the one-liner that links to it.


Closing Note (for Builders)

The Map does not ask you to simulate a person. It asks you to build a stable posture.

In tool-enabled systems, the temptation is to over-automate "care" and accidentally automate "authority." The Map prevents that by keeping one truth intact:

Tools are instruments. Tone is architecture. The user remains sovereign.

Love it? Share it!

Post Images

Surprise Reads (Pick One)