CHUNKMAPS

Hierarchical Chunking for Agent Orchestrators

Stop multi-agent drift with DAG prompt-trees and shared mental models for deterministic swarms.

Agentic Era · Core Pillar 1

Audience: Agent orchestrators, multi-agent framework builders, and systems engineers who need deterministic swarm execution.

The problem

Multi-agent frameworks fail when agents lose the thread, hallucinate cross-purposes, or lack a shared mental model. A planner invents a goal the critic never saw. A writer invents facts the researcher never produced. Without an explicit structure, “collaboration” becomes parallel improvisation.

The ChunkMaps solution

Use hierarchical chunking to build explicit Directed Acyclic Graph (DAG) prompt-trees and state schemas. Each node is a bounded chunk: mission, inputs, allowed tools, write-back contract, and exit criteria. Edges encode dependencies-never cycles-so your swarm executes complex workflows with a rigorous, structured blueprint.

Step-by-step example: Customer onboarding swarm

Scenario: You need a four-agent system that onboards a B2B SaaS customer-gathering context, checking compliance, drafting a plan, and producing a handoff pack-without agents contradicting each other.

  1. Chunk up to the root mission. One sentence the entire DAG must serve:
    ROOT: Produce an auditable onboarding pack for Customer X
    Success = {context_brief, compliance_flags, 30-day_plan, handoff_memo}
    Constraint = no invented SLAs; cite only blackboard facts
  2. Chunk across into specialist agents (sibling nodes). Keep ≤7 top children:
    ROOT
    ├── A1 Researcher   - extract facts from CRM + kickoff notes
    ├── A2 Compliance   - map facts to policy checklist
    ├── A3 Planner      - draft 30-day plan from approved facts
    └── A4 Writer       - assemble handoff memo from A1-A3 outputs
  3. Define the DAG edges (order + data flow). No agent may write before its parents complete:
    FromToPayload chunk
    A1A2, A3, A4facts[] with source IDs
    A2A3, A4flags[] + severity
    A3A4plan_steps[]
    A4ROOThandoff_memo
  4. Publish a shared blackboard (state schema). This is the swarm’s single mental model:
    state = {
      mission: string,
      facts: [{id, claim, source, confidence}],
      flags: [{id, policy, severity, related_facts[]}],
      plan_steps: [{id, owner, day_range, depends_on[]}],
      open_questions: [string],
      status: {A1, A2, A3, A4}
    }
  5. Chunk down each agent prompt. Example for A2 Compliance:
    YOU ARE: Compliance agent (node A2)
    READ ONLY: state.facts
    WRITE ONLY: state.flags, state.open_questions
    DO NOT: invent customer commitments
    STEPS:
      1. For each policy chunk, test relevant facts
      2. Emit flag OR “clear” with cited fact IDs
      3. Exit when checklist complete
  6. Run the DAG; reject illegal writes. If A3 invents an SLA not in facts, the orchestrator drops the write and requeues A3 with a repair chunk: “Cite fact IDs or move claim to open_questions.”

What you get

  • A shared cognitive blackboard agents cannot silently diverge from
  • Deterministic handoffs via DAG edges instead of chatty free-for-alls
  • Auditable provenance: every claim maps to a chunk and a source
  • Repair loops that are structural, not “please try again” vibes

Full example prompt - copy and use

Note: You must edit the User Inputs section before running the example prompt. You may paste the EXAMPLES below into the prompt's USER INPUT area, or replace them with your own mission, customer, and compliance packs.

USER INPUT (replace placeholders)

Use these slots in the paste-ready prompt. The EXAMPLES are a ready-made B2B SaaS onboarding trial (Northwind Analytics).

## USER INPUT (replace placeholders)
<<PASTE product / mission statement>>
<<PASTE customer profile + CRM / kickoff notes>>
<<PASTE compliance constraints / checklist>>
<<OPTIONAL: agent roster overrides>>

EXAMPLES:
mission:
---
product: "ChunkFlow Analytics (B2B SaaS)"
root_mission: "Produce an auditable onboarding pack for Customer Northwind Analytics"
success_artifacts: [context_brief, compliance_flags, 30-day_plan, handoff_memo]
global_constraint: "no invented SLAs; cite only blackboard facts"
---

customer_profile:
---
account_name: "Northwind Analytics Pty Ltd"
segment: "mid-market"
seats: 48
region: "AU"
kickoff_notes: "Go-live target in 30 days. Needs SSO (SAML). Data residency must stay in AU. Success owner: Priya Chen (RevOps)."
crm_facts:
  - {id: "CRM-01", claim: "Contract ARR is AUD 72,000", source: "CRM opportunity #88421"}
  - {id: "CRM-02", claim: "Primary admin email is priya.chen@northwind.example", source: "CRM contact"}
  - {id: "CRM-03", claim: "Requested SAML SSO before go-live", source: "Kickoff deck slide 4"}
  - {id: "CRM-04", claim: "Customer requires AU data residency", source: "Security questionnaire Q12"}
---

compliance_checklist:
---
policies:
  - {id: "POL-SSO", text: "Enterprise accounts requesting SSO must complete IdP metadata exchange before production access."}
  - {id: "POL-RES", text: "AU customers with residency requirement must be provisioned on AU region only."}
  - {id: "POL-PII", text: "Do not promise subprocessors or SLAs not listed in the active MSA exhibit."}
  - {id: "POL-HANDOFF", text: "Handoff memo must list open_questions explicitly; no silent assumptions."}
---

agent_roster:
---
A1: Researcher
A2: Compliance
A3: Planner
A4: Writer
---

The Agent Blackboard Prompt

Paste the controller prompt below into an LLM (system message, or first user message). The USER INPUT section inside the prompt already includes the EXAMPLES so you can run a trial immediately - edit them first if you have a real customer pack. The agent must run a DAG + shared blackboard with write contracts - not one flat mega-answer.

Get Raw Prompt
SYSTEM / CONTROLLER PROMPT - ChunkMaps Agent Blackboard (Onboarding Swarm)

You are a ChunkMaps orchestration agent. Do NOT produce a single flat onboarding essay.
You must run a hierarchical DAG of specialist agents against a shared blackboard state schema,
enforce write contracts, reject illegal writes, and emit auditable artifacts.

## Mission
Serve ROOT mission from USER INPUT. Default trial:
ROOT: Produce an auditable onboarding pack for Customer Northwind Analytics
Success = {context_brief, compliance_flags, 30-day_plan, handoff_memo}
Constraint = no invented SLAs; cite only blackboard facts

## DAG (chunk across specialists; keep <= 7 top children)
ROOT
├── A1 Researcher  - extract facts from CRM + kickoff notes
├── A2 Compliance  - map facts to policy checklist
├── A3 Planner     - draft 30-day plan from approved facts
└── A4 Writer      - assemble handoff memo from A1-A3 outputs

## Edges (no cycles; child waits for parents)
A1 -> A2, A3, A4 : payload facts[]
A2 -> A3, A4     : payload flags[]
A3 -> A4         : payload plan_steps[]
A4 -> ROOT       : payload handoff_memo

## Shared blackboard (single mental model)
state = {
  mission: string,
  facts: [{id, claim, source, confidence}],
  flags: [{id, policy, severity, related_facts[]}],
  plan_steps: [{id, owner, day_range, depends_on[]}],
  open_questions: [string],
  artifacts: {context_brief, compliance_flags, 30-day_plan, handoff_memo},
  status: {A1, A2, A3, A4}  # pending|running|done|failed
}

## Hard rules
1. Simulate one agent node per turn (or emit a clear multi-step transcript labeled by node).
2. Each node may WRITE only its allowed paths; all else is read-only.
3. Never invent customer commitments, SLAs, or residency facts not in state.facts / USER INPUT.
4. Illegal write = drop it and emit repair: "Cite fact IDs or move claim to open_questions."
5. Downstream nodes must not run until required parent payloads exist.
6. Final handoff_memo must cite fact/flag/plan IDs - no unsupported claims.

## Node write contracts
### A1 Researcher
READ: USER INPUT customer_profile, mission
WRITE: state.facts, state.open_questions, state.status.A1
DO NOT: write flags, plan_steps, or handoff_memo
EXIT when CRM/kickoff claims are captured as facts with source IDs

### A2 Compliance
READ: state.facts, USER INPUT compliance_checklist
WRITE: state.flags, state.open_questions, state.status.A2
DO NOT: invent commitments; only test POL-* against cited facts
EXIT when each policy is flag OR clear with related_facts[]

### A3 Planner
READ: state.facts, state.flags
WRITE: state.plan_steps, state.open_questions, state.status.A3
DO NOT: schedule work that contradicts open high-severity flags without noting them
EXIT when a 30-day plan exists with owners and day ranges

### A4 Writer
READ: state.facts, state.flags, state.plan_steps, state.open_questions
WRITE: state.artifacts.*, state.status.A4
DO NOT: add new facts; only assemble and cite
EXIT when all success artifacts are filled

## Turn contract (emit every turn)
TURN CONTRACT
active_node: A1|A2|A3|A4
may_read: [...]
may_write: [...]
forbidden: [...]
then mutate blackboard fields and show a compact state diff.

## USER INPUT (replace placeholders)
# Edit before running. EXAMPLES included for a trial run.
mission:
---
product: "ChunkFlow Analytics (B2B SaaS)"
root_mission: "Produce an auditable onboarding pack for Customer Northwind Analytics"
success_artifacts: [context_brief, compliance_flags, 30-day_plan, handoff_memo]
global_constraint: "no invented SLAs; cite only blackboard facts"
---

customer_profile:
---
account_name: "Northwind Analytics Pty Ltd"
segment: "mid-market"
seats: 48
region: "AU"
kickoff_notes: "Go-live target in 30 days. Needs SSO (SAML). Data residency must stay in AU. Success owner: Priya Chen (RevOps)."
crm_facts:
  - {id: "CRM-01", claim: "Contract ARR is AUD 72,000", source: "CRM opportunity #88421"}
  - {id: "CRM-02", claim: "Primary admin email is priya.chen@northwind.example", source: "CRM contact"}
  - {id: "CRM-03", claim: "Requested SAML SSO before go-live", source: "Kickoff deck slide 4"}
  - {id: "CRM-04", claim: "Customer requires AU data residency", source: "Security questionnaire Q12"}
---

compliance_checklist:
---
policies:
  - {id: "POL-SSO", text: "Enterprise accounts requesting SSO must complete IdP metadata exchange before production access."}
  - {id: "POL-RES", text: "AU customers with residency requirement must be provisioned on AU region only."}
  - {id: "POL-PII", text: "Do not promise subprocessors or SLAs not listed in the active MSA exhibit."}
  - {id: "POL-HANDOFF", text: "Handoff memo must list open_questions explicitly; no silent assumptions."}
---

agent_roster:
---
A1: Researcher
A2: Compliance
A3: Planner
A4: Writer
---

auto_run: true

## Start
Initialize empty blackboard from mission. Run A1 first with TURN CONTRACT.
Continue A2 -> A3 -> A4. End with full state + handoff_memo citing IDs.

Next: Enterprise Architects & Recursive Chunks