ROSTR: A Unified Architecture for Production-Grade Multi-Agent Systems with Phase-Aware Orchestration and Persistent Knowledge Compounding
Patrick Diamitani
GTM AI & Automation Manager at Atlas HXM — building agents, skills, and automations for sales, marketing, and operations teams. Previously AI engineer and consultant; prior career in tech sales across SMB, mid-market, and enterprise.
April 2026
Abstract

Modern multi-agent AI systems face four fundamental challenges: (1) the prompting bottleneck—translating user intent into precise agent instructions requires expertise most users lack; (2) retrieval brittleness—agents perform shallow, single-pass information gathering without source validation or gap detection; (3) context loss—agents operate statelessly, losing knowledge across sessions and failing to compound organizational learning; and (4) naive task routing—orchestration systems route work by keyword matching rather than workflow phase or priority scoring.

We present ROSTR (Runtime, Orchestration, State, Tools, Reference), a modular agent operating system that addresses these challenges through four integrated components: PAL (Prompt Abstraction Layer) compiles natural language intent into structured agent manifests using a five-stage pipeline; RAG DAL (Retrieval-Augmented Generation Dynamic Acquisition Layer) performs autonomous multi-pass web retrieval with hierarchical source credibility scoring; NPAO (Necessity, Priority, Anxiety, Opportunity) introduces a human-motivational classification system that mirrors how people actually experience and resolve work—routing tasks in the order N→A→P→O to maximize execution quality; and the Rostr Hub provides a persistent, multi-namespace knowledge architecture enabling cross-session and cross-agent context preservation.

We detail the technical mechanisms of each component, provide measurable specifications, position the work against existing agent frameworks (LangChain, CrewAI, AutoGPT, Bee Framework), and outline an empirical validation framework. Early architectural implementations demonstrate the system's viability for GTM operations, though comprehensive empirical validation remains future work.

multi-agent systems agent orchestration retrieval-augmented generation prompt engineering knowledge management workflow automation
Try the Interactive Playground — test PAL, NPAO, RAG DAL live
Section 1

Introduction

1.1 Motivation

The rapid advancement of large language models (LLMs) has enabled sophisticated single-agent systems, but deploying multi-agent teams for complex, multi-phase work remains fragile. Four systemic problems persist:

The Prompting Bottleneck. Agent performance is gated by prompt quality. Users must understand model capabilities, craft precise instructions, and translate domain intent into LLM-compatible formats. This expertise gap limits who can effectively deploy agents [1, 2].

Retrieval Brittleness. Standard RAG implementations perform single-pass retrieval without source quality assessment or coverage validation. Agents cannot distinguish authoritative sources from unreliable ones, nor detect when retrieved information is insufficient [3, 4].

Context Loss Across Sessions. Agents operate statelessly—each session starts from scratch. Decisions made, knowledge gathered, and workflows established in prior sessions are lost. There is no organizational memory, no knowledge compounding [5].

Naive Task Routing. Orchestrators route tasks by keyword matching ("code" → builder agent) without considering workflow phase (research vs. production debugging), priority (revenue-impacting vs. internal tooling), or dependency chains [6, 7].

These problems compound: poor prompts yield poor agent instructions; brittle retrieval yields unreliable outputs; context loss forces repeated work; naive routing executes the right tasks in the wrong order.

1.2 Contribution

We present ROSTR, a unified architecture for multi-agent systems that addresses each challenge through modular, composable components:

  1. PAL (Prompt Abstraction Layer) — A compiler-inspired pipeline that transforms natural language intent into structured agent runtime manifests through intent extraction, context injection, semantic enhancement, runtime compilation, and deterministic routing.
  2. RAG DAL (Dynamic Acquisition Layer) — An autonomous multi-pass retrieval system with three-tier source credibility scoring (academic/authoritative, editorial/verified, community/UGC), self-assessed coverage validation, and persistent knowledge base ingestion with provenance tracking.
  3. NPAO (Necessity, Priority, Anxiety, Opportunity) — A task classification system that mirrors human motivational reality, enabling agents to triage work in the order humans actually experience and resolve it.
  4. Rostr Hub — A persistent, multi-namespace knowledge platform providing agent registration, state management, cross-agent communication protocols, and shared reference architecture.
  5. System Integration — Architectural patterns for composing these components into production systems, with reference implementation for GTM operations.

1.3 Key Innovations

Architectural

First framework unifying intent compilation, hierarchical credibility-weighted RAG, phase-aware orchestration, and persistent multi-namespace knowledge architecture in a single system.

Algorithmic

  • Multi-dimensional priority scoring with configurable phase/dependency/business/resource weights
  • Autonomous multi-pass retrieval with convergence criteria based on confidence thresholds and source cross-validation
  • Intent compilation pipeline mapping natural language → typed agent manifests
  • Phase-aware agent allocation considering capability, context, and load

Conceptual

  • 5D Phase Taxonomy with formalized PreD (Pre-Development) phase
  • Three-tier source credibility hierarchy for retrieval quality control
  • Multi-namespace knowledge persistence enabling organizational context compounding
  • Agent manifest as infrastructure-as-code for reproducible, versionable assistant definitions
Section 2

Related Work

2.1 Multi-Agent Orchestration Frameworks

LangChain [8] pioneered modular agent construction through tool chains and memory abstractions. However, it lacks: (1) declarative agent specifications; (2) persistent state across sessions; (3) phase-aware routing beyond keyword matching.

CrewAI [9] introduced role-based agent teams with delegation patterns. Limitations: no formalized workflow phase taxonomy; no built-in retrieval quality control; limited state persistence (primarily session-based).

AutoGPT [10] demonstrated autonomous agent execution with self-directed task decomposition. However: unstructured exploration with no phase gates; no priority model; minimal human oversight.

MetaGPT [11] applied software engineering roles to agent teams, introducing standardized output artifacts (PRDs, design docs, code). Lacks persistent knowledge architecture across projects and dynamic priority-based routing.

Bee Framework (IBM) [12] provides enterprise agent infrastructure with strong tool integration. Closed-source limits inspection; heavier deployment footprint; less emphasis on phase-aware workflow management.

DOE Pattern [13] (Directives → Orchestration → Execution) provides a mental model for agent architecture. ROSTR extends DOE by adding PreD phase before directives, persistent state across D→O→E cycles, and modular open-source implementation.

SystemPAL EquivalentRAG EquivalentOrchestrationPersistent StateOpen Source
LangChainPrompt templatesStandard RAGManual chainsMemory modules (session)Yes
CrewAIRole definitionsExternal RAGRole-based delegationLimitedYes
AutoGPTSelf-generatedWeb search (no credibility)Autonomous (no priority)NoneYes
MetaGPTRole-based promptsExternal RAGSOP-basedArtifact-basedYes
DifyVisual workflow nodesExternal RAGVisual workflowLimitedYes
n8nExternal RAGAutomation workflowsNode state onlyYes
FlowiseStandard RAGVisual chainsNoneYes
Bee FrameworkStandard RAGBuilt-in orchestrationUnknownNo
ROSTRPAL 5-stage compilationRAG DAL 3-tier multi-passNPAO N→A→P→O classification4-level multi-namespaceYes (MIT)

2.2 Retrieval-Augmented Generation

Standard RAG [14, 15] performs: query → retrieve documents → rank by embedding similarity → augment LLM context → generate. Limitations include single-pass retrieval with no iterative refinement, no source quality control (Reddit comments ranked equally with peer-reviewed papers), and no self-assessment of information sufficiency.

Closest related work: STORM [18] performs multi-perspective question generation for Wikipedia-style articles. RAG DAL differs by using hierarchical credibility rather than uniform sourcing, confidence thresholds for convergence, and cross-agent persistence beyond single-article scope.

2.3 Workflow and Task Management

Workflow engines (Airflow [19], Prefect [20], Temporal [21]) excel at orchestrating deterministic DAGs but assume predefined task structure, no dynamic priority adjustment, and no agent-specific context. Issue trackers (Jira, Linear) provide priority scoring (P0-P4) but lack multi-dimensional weighting, agent capability matching, and automated phase classification.

2.4 Prompt Engineering and LLM Compilers

DSPy [22] optimizes prompts through automated refinement but focuses on response quality optimization rather than agent manifest generation. PAL's compilation target is a structured runtime configuration (tools, permissions, memory policy), not an optimized prompt string.

2.5 Knowledge Management and Memory

Vector databases (Pinecone, Weaviate, Chroma) provide embedding storage and similarity search. ROSTR's Reference Hub extends this with a multi-namespace hierarchy, structured metadata (decisions, learnings, artifacts), and cross-agent access patterns. Agent memory systems [26, 27] typically provide short-term (conversation buffer) and long-term (vector store) memory. ROSTR adds a four-level hierarchy with knowledge compounding and provenance tracking.

Section 3

System Architecture

3.1 High-Level Design

ROSTR's architecture comprises four layers and four primary components operating on a shared persistent hub:

┌─────────────────────────────────────────────────────────────┐
│                      USER INTERFACE LAYER                    │
│  Natural Language Input | CLI | Dashboard | API              │
└────────────────┬────────────────────────────────────────────┘
                 │
                 ▼
┌─────────────────────────────────────────────────────────────┐
│                   COMPILATION LAYER (PAL)                    │
│  Intent Extract → Context Inject → Enhance → Compile → Route│
└────────────────┬────────────────────────────────────────────┘
                 │
                 ▼
┌─────────────────────────────────────────────────────────────┐
│                  DECISION LAYER (NPAO)                       │
│  Classify: Necessity → Anxiety → Priority → Opportunity      │
└────────────────┬────────────────────────────────────────────┘
                 │
                 ▼
┌─────────────────────────────────────────────────────────────┐
│                    EXECUTION LAYER                           │
│  ┌─────────┐  ┌──────────┐  ┌─────────────────────┐         │
│  │ Agents  │  │ RAG DAL  │  │   Rostr Hub         │         │
│  │Builder  │  │3-Tier    │  │   - Registry        │         │
│  │Research │◄─┤Retrieval │◄─┤   - State Mgr       │         │
│  │Review   │  │Multi-Pass│  │   - Reference       │         │
│  │Deploy   │  │Coverage  │  │   - Message Bus     │         │
│  │Debug    │  │          │  │                     │         │
│  └─────────┘  └──────────┘  └─────────────────────┘         │
└─────────────────────────────────────────────────────────────┘
                 │
                 ▼
┌─────────────────────────────────────────────────────────────┐
│              PERSISTENCE LAYER (Reference Hub)               │
│  projects/ | orgs/ | teams/ | global/                       │
│  - Knowledge Bases (vector + metadata)                       │
│  - Decision Logs | Learnings | Checkpoints                   │
└─────────────────────────────────────────────────────────────┘

3.2 Information Flow

  1. User Input — Natural language request, structured JTBD, or API call
  2. PAL Compilation — Intent extracted, context injected from reference hub, semantically enhanced, compiled into agent manifest, routed to NPAO
  3. NPAO Classification — Task classified as Necessity, Priority, Anxiety, or Opportunity; execution queue built in N→A→P→O order; agent allocated
  4. Agent Execution — Agent receives compiled instruction, invokes tools, may call RAG DAL for knowledge needs, updates state in reference hub
  5. RAG DAL (if triggered) — Multi-pass retrieval across tiered sources, coverage assessment, knowledge base ingestion
  6. State Persistence — Results, decisions, learnings written to reference hub namespace
  7. Output — Artifact, response, or action delivered to user; run logged

3.3 Component Interaction Invariants

InvariantRulePurpose
1PAL precedes executionEnsures consistent instruction quality
2Phase classification precedes allocationEnsures phase-appropriate agent selection
3Knowledge retrieval goes through RAG DALCentralized credibility control and KB population
4State updates persist to reference hubEnsures knowledge compounding across sessions
5Cross-namespace access requires permissionScoped context, prevents pollution
Section 4

PAL: Prompt Abstraction Layer

4.1 Design Rationale

The prompting bottleneck limits agent deployment: users must craft precise, well-structured prompts matching each agent's expectations. PAL reframes this as a compilation problem: accept loosely-typed natural language intent; emit strictly-typed agent runtime manifests.

Software CompilerPAL Compiler
Source code (C, Python)Natural language intent
Parsing & AST generationIntent extraction
Type checkingAmbiguity resolution
Optimization passesSemantic enhancement
Code generationRuntime manifest compilation
LinkerContext injection from reference hub
Executable binaryAgent runtime config
Target architectureAgent type (builder, researcher, deployer)

4.2 Five-Stage Compilation Pipeline

Stage 1
Intent Extraction
Parse verbs, domain, constraints, urgency
Stage 2
Context Injection
Load session, project, org, team context
Stage 3
Semantic Enhancement
Expand vague intent, add precision
Stage 4
Runtime Compilation
Emit typed agent manifest (YAML/JSON)
Stage 5
Output Routing
Route to NPAO phase + agent type

Stage 1: Intent Extraction

Input: Raw natural language string. Output: Structured intent object with primary intent, domain, subject, constraints, desired output, urgency, and ambiguity score (0.0–1.0 measuring 1.0 - (explicit_parameters / total_required_parameters)).

JSON{
  "primary_intent": "create pricing page",
  "domain": "code + design",
  "subject": "pricing page",
  "constraints": ["for our product"],
  "desired_output": "deployable page",
  "urgency": "queued",
  "ambiguity_score": 0.7  // Missing: design specs, deployment target, content
}

Stage 2: Context Injection

Loads session state, project context, org context, and team context from the reference hub. Uses vector search to retrieve top-k relevant prior decisions and learnings. Context budget is managed by prioritizing critical project state, then relevant decisions (similarity > 0.75), then domain knowledge.

Stage 3: Semantic Enhancement

Enhancement rules include: expanding ambiguous verbs ("improve" → "identify top 3 issues by severity"), adding missing precision (injecting success criteria when absent), decomposing compound goals into multi-phase tasks, and removing hedging language ("Maybe we should…" → "Do X").

Stage 4: Runtime Compilation

YAMLruntime:
  agent_type: builder | researcher | reviewer | designer | deployer | debugger
  model: claude-sonnet-4-6 | claude-opus-4 | auto-select
  temperature: 0.0-1.0
  max_parallel_tasks: int

instructions:
  task_description: "enhanced instruction from Stage 3"
  completion_criteria: ["checklist"]
  escalation_policy: "auto-proceed | require-approval | human-in-loop"

tools_enabled:
  allow: ["web_search", "file_system:read", "code_execution"]
  deny: ["file_system:write:production", "email:send"]

memory:
  mode: "session | project | persistent"
  context_sources: ["projects/acme", "orgs/acme-corp"]
  save_triggers: [decisions, learnings, artifacts]

Stage 5: Output Routing

Deterministic keyword-based routing with LLM fallback for ambiguous cases. Tasks containing "research/analyze/investigate" route to NPAO PreD phase; "build/implement/code" to Development; "bug/fix/error" to Debugging with priority override.

4.3 Intent Extraction Examples

PAL extracts structured intent regardless of input quality. Typos, fragments, and casual language are all valid. The table below shows raw inputs and their extracted equivalents:

Raw InputExtracted Intent
"fix the thing"Debug primary bug in active file; root cause before fix; report-only mode off
"write email to that fintech guy"Draft cold outreach email; B2B tone; fintech ICP; under 150 words; clear CTA
"ship it"Deploy active branch; run pre-flight checks; create PR; verify on production
"does this look right"Visual QA of most recent UI change; design-eye review; flag inconsistencies
"make the landing page better"Audit against 5 conversion dimensions (headline, CTA, social proof, load time, mobile); score 0–10; implement highest-impact fix; commit each fix separately

The enhancement from "make the landing page better" to a 5-dimension audit with scoring and commit-level fixes illustrates the core value: what the user needs is almost always more specific than what they say. PAL bridges that gap without requiring the user to learn prompt engineering.

4.4 PAL Operating Modes

PAL supports four modes that can be selected per-session or per-task:

ModeBehaviorUse Case
Transparent (default)PAL runs invisibly. User sees only the output of the compiled instruction. No evidence of enhancement.Production use; all standard interactions
Visible (debug)PAL surfaces its extracted intent, context loaded, and enhancement made before executing. Allows inspection of compilation decisions.Debugging unexpected outputs; tuning enhancement rules
Manual OverrideUser provides a fully-formed prompt. PAL still handles routing and context injection but does not modify the prompt body.Expert users; locked-down prompt testing
Batch CompilationPAL compiles a queue of instructions simultaneously. Multiple agents spun up in parallel with separate compiled manifests.Orchestration pipelines; parallel Phase fan-out

4.5 PAL as Agent Factory

In the Rostr framework, PAL plays a second role beyond runtime message compilation: it compiles agent definitions themselves. When a user describes a new agent in natural language, PAL extracts its requirements, infers the necessary tools, generates the agent specification, creates its manifest, and registers it with the hub.

AGENT FACTORY — INPUTUser: "I need an agent that monitors our HubSpot daily and drafts
       personalized follow-up emails for deals that haven't moved in 7 days"
AGENT FACTORY — OUTPUT (PAL compiled)Agent Spec: "Pipeline Mover Agent"
  triggers: daily at 9:00 AM
  tools: [hubspot_api, claude_api, email_draft]
  workflow:
    1. Query HubSpot for deals with last_activity > 7 days
    2. For each deal: pull contact info + deal history
    3. Draft personalized follow-up email (PAL-enhanced per deal)
    4. Present drafts queue for human approval
    5. On approval: update HubSpot + send via configured channel
  stores: results in org/knowledge-base/pipeline-health
  memory_mode: project

PAL as agent factory makes building new agents a natural language operation. No YAML required. No tool configuration required. The user describes the outcome, PAL generates the agent.

4.6 Deployment Paths

PAL can be deployed in four ways with different setup requirements and tradeoffs:

PathSetupLatencyCost
CLAUDE.md SectionZero — paste PAL protocol into CLAUDE.md; Claude Code loads on every session0ms overhead (in-context)$0 (model context cost only)
Claude Code Skill~5 minutes — register pal.skill; triggers on every message automatically~50ms~$0.0005/compile
Chrome Extension~10 minutes — intercepts keystroke on claude.ai, ChatGPT, Gemini; shows before/after diff badge~300ms~$0.001/compile
API Middleware~30 minutes — FastAPI wrapper; integrate into any agent pipeline via SDK200–400ms~$0.001/compile

4.7 Open Source Implementation

PAL is released as an open source framework at github.com/rostr-ai/pal (MIT license). Community-contributed enhancement templates are accepted by domain — sales, engineering, legal, design, medical — allowing PAL to develop specialized compilation rules for any vertical without core framework changes.

4.8 Technical Specifications

PropertyValue
Latency overhead200–400ms (Haiku), 400–800ms (Sonnet)
Cost per compilation~$0.001 (Haiku), ~$0.003 (Sonnet)
Context window usage500–1,500 tokens
Supported input formatsText, voice transcript, structured JSON
Enhancement modelclaude-haiku-4-5 (default), claude-sonnet-4-6 (complex)
Section 5

RAG DAL: Dynamic Acquisition Layer

5.1 Design Rationale

Standard RAG suffers from shallow retrieval (single-pass without refinement), source quality blindness (treating Reddit and Nature equally), and no self-awareness (the system doesn't know what it doesn't know). RAG DAL introduces a three-tier source credibility hierarchy, an autonomous multi-pass loop with convergence criteria, gap detection with targeted re-search, and a persistent knowledge base with provenance tracking.

5.2 Three-Tier Source Architecture

T1
Primary & Authoritative
Credibility weight: 1.0
Academic databases (arXiv, PubMed, JSTOR), Wikipedia (citations), official .gov/.edu docs, standards bodies
T2
Verified & Editorial
Credibility weight: 0.75
Major news (Reuters, AP, BBC, NYT), trade publications, peer-reviewed with DOI, analyst reports (Gartner, McKinsey)
T3
Community & UGC
Credibility weight: 0.40
Blogs, Substack, LinkedIn, Twitter, Reddit, Stack Overflow, Hacker News, user reviews, podcast transcripts

5.3 Autonomous Multi-Pass Retrieval Loop

The loop iterates up to 4 passes, targeting a configurable confidence threshold θ (default 0.8) per sub-topic. Pass 1 is a broad sweep across all tiers. Pass 2 fills gaps (topics with confidence < θ) with targeted searches against Tier 1 and 2. Pass 3 performs deep verification using Tier 1 sources only. Pass 4 is optional, triggered when ≥2 topics remain below confidence 0.6.

Coverage Assessment Formula

Confidence Scoring
confidence(topic) =
  w_sources × source_score(topic) +
  w_consistency × consistency_score(topic) +
  w_tier × tier_distribution_score(topic) +
  w_recency × recency_score(topic)

where: w_sources=0.35, w_consistency=0.30, w_tier=0.25, w_recency=0.10
tier_distribution = (T1×1.0 + T2×0.75 + T3×0.40) / total_sources

A sub-topic reaches confidence ≥ 0.8 when: ≥2 Tier 1 or Tier 2 sources confirm the core claim; no contradictions exist between high-credibility sources; information is <90 days old (or verified timeless); all extracted sub-questions have answers.

5.4 Knowledge Base Ingestion

Retrieved content is transformed into structured entries with UUID, query origin, content, summary, source metadata (URL, tier, credibility score, published/retrieved dates), topic tags, named entities, vector embedding, confidence score, and verification status. Entries are chunked at 512 tokens with 64-token overlap, embedded with text-embedding-3-small, and stored in pgvector/Pinecone/Weaviate organized by namespace (project/org/team/domain/global).

5.5 Three Operating Modes

RAG DAL supports three retrieval modes optimized for different use cases. Mode is selected per-query based on the intent extracted by PAL, or set explicitly by the requesting agent.

ModeSource PriorityBehaviorBest For
Academic ResearchTier 1 only for first 2 passesPrioritizes arXiv, PubMed, university repositories; outputs citations in academic format; flags any Tier 3 sources usedLiterature reviews, technical deep dives, evidence-based claims
News & Trend SentinelTier 2–3, recency-weightedFlags bias or single-source claims; validates across minimum 3 news outlets; highlights recency of each sourceCompetitive intelligence, market research, current events tracking
General Knowledge ExpansionFull spectrum, Tier 1 firstBuilds the most comprehensive corpus; starts encyclopedic, expands outward; maximum coverage over precisionBuilding agent knowledge bases, profile building, domain onboarding

5.6 Compliance and Ethics

RAG DAL enforces responsible retrieval practices by design, not policy:

  • robots.txt compliance: Never crawls disallowed paths; checks on every URL before fetch
  • Rate limiting: Respects source rate limits; exponential backoff with jitter; source-specific delay profiles
  • Copyright: Stores summaries and excerpts, not full reproduced text; attributes all content to original source
  • No hallucination: All outputs linked to original source; cannot generate factual claims without citation
  • Bias detection: Multi-source cross-reference prevents single-source bias; contradictions between tiers are surfaced, not silently resolved
  • Misinformation flagging: Claims that appear in only one source, or that contradict Tier 1 sources, are flagged UNCERTAIN in the output
  • Privacy: User queries are never sent to third-party services without explicit consent; local processing by default

5.7 Knowledge Compounding in Practice

RAG DAL's shared knowledge base architecture means the same research never needs to be run twice within a project scope. When the Research Agent discovers competitor pricing data in a PreD task, that knowledge is stored in the project namespace and immediately available to the Copywriting Agent, the Sales Agent, and the Strategy Agent — without each one running its own search.

"The pricing research from Task 1.1 is now available for the copywriting agent, the sales agent, and every future session. Next time someone asks about pricing — the answer is already in the hub." — Rostr Framework Combined Whitepaper v1.0

Knowledge compounding is measured by cache hit rate: the percentage of knowledge queries served from the project KB without triggering a new retrieval pipeline. Mature projects with active knowledge bases typically achieve 40–60% cache hit rates, reducing RAG DAL pipeline calls by the same proportion.

5.8 Open Source Implementation

RAG DAL is released at github.com/rostr-ai/rag-dal (MIT license) with six core components: ragdal-core/ (pipeline orchestration), ragdal-search/ (search execution and tier management), ragdal-extract/ (content extraction and normalization), ragdal-kb/ (knowledge base storage and retrieval), ragdal-api/ (FastAPI service wrapper), and ragdal-sdk/ (Python + JS integration SDK).

5.9 Technical Specifications

PropertyValue
Max passes per query4 (configurable)
Confidence threshold0.8 (configurable: 0.6–0.9)
Chunk size512 tokens, 64-token overlap
Embedding modeltext-embedding-3-small (OpenAI) or equivalent
Cache TTL72 hours (configurable by namespace)
Max sources per query25 (configurable)
Retrieval latency30–90 seconds per full pipeline
Storage overhead~2KB per entry + 6KB embedding (1536 dims × 4 bytes)
Section 6

NPAO: Necessity, Priority, Anxiety, Opportunity

Most task management systems fail for one of two reasons. They either treat all tasks as equal — creating flat lists with no clear starting point — or they apply arbitrary urgency/importance matrices that ignore the emotional and functional reality of how work actually behaves. The result: paralysis, missed blockers, and wasted cycles on low-leverage work while high-stakes items sit undone.

NPAO is a task classification framework that cuts through decision paralysis by forcing every task into one of four categories: Necessity, Priority, Anxiety, or Opportunity. For AI agents, it provides a principled, human-aligned method for triaging work, resolving conflicts between competing tasks, and making progress in the right order.

N
Necessity
I MUST
A task is a Necessity if it is an essential function for any following tasks to be completed. Necessities are hard blockers — nothing downstream can proceed without them. They are not merely important; they are structurally required.
"I MUST establish the API connection before any automation can run." Agent application: blocks all other task execution until resolved.
P
Priority
I NEED
A task is a Priority if it is important to accomplishing the stated mission. Mission-critical but not structurally blocking — other tasks can technically proceed without it, but the mission suffers measurably.
"I NEED to hire a marketer to launch our product." Agent application: defines the primary workload after Necessities are resolved.
A
Anxiety
I WON'T HAVE PEACE UNTIL
A task is an Anxiety if it creates persistent cognitive load regardless of strategic importance. Their incompleteness generates friction and background noise that erodes execution quality across everything else.
"I WON'T HAVE PEACE until I finish the backlog." Agent application: unresolved errors, open loops, accumulated technical debt — clear these to restore full bandwidth.
O
Opportunity
I CAN
A task is an Opportunity if completing it presents a chance for new growth. Optional — but compounding. Not required for mission completion, but it unlocks new paths, expands capability, or creates leverage.
"I CAN prospect 500 additional leads to get closer to quota." Agent application: pursued after Necessities and Priorities resolve and Anxieties fall below threshold.
NPAO is not a queue. It is a classification system that mirrors the motivational reality of work — acknowledging that structural blockers (Necessity), cognitive friction (Anxiety), strategic importance (Priority), and growth potential (Opportunity) require fundamentally different treatment.

6.1 Design Rationale

Technical prioritization frameworks miss something important: the emotional and motivational texture of real work. A task that is low-strategic-priority but creates constant cognitive friction (an Anxiety) will degrade the quality of every Priority task being worked in parallel. Ignoring this produces agents that are technically correct but experientially broken — agents that skip the things humans most need cleared, and pursue the things that look good on a priority matrix but aren't actually blocking anything.

NPAO is specifically designed for AI agent systems by modeling how high-performing humans actually triage. Agents built on NPAO earn trust faster because they prioritize the way their human collaborators think.

6.2 The Four Categories

CategorySignalDefinitionHuman triggerAgent behavior
Necessity "I MUST" Essential function — downstream work cannot proceed without it Pay rent, secure deposit, establish legal entity Blocks all other task execution in current scope until resolved
Priority "I NEED" Mission-critical but not structurally blocking — its absence degrades the mission Hire marketer, create strategic plan, close key deal Primary workload after Necessities are cleared; executed in parallel where dependencies allow
Anxiety "I WON'T HAVE PEACE" Creates persistent cognitive load; may not be strategic but its incompleteness erodes focus Schedule doctor appointment, clear backlog, negotiate raise Batched and cleared when accumulated past threshold; frees bandwidth for Priority execution
Opportunity "I CAN" Optional but compounding — unlocks new paths or creates leverage Build second revenue stream, pursue stretch goal, invest surplus Pursued by spare-capacity agents asynchronously; never preempts other categories

6.3 Execution Order

NPAO implies a natural resolution sequence. The order is not N → P → A → O. Anxiety comes before Priority — because unresolved Anxiety tasks actively degrade the quality of Priority execution. An agent (or a human) working through mission-critical priorities while open loops accumulate produces lower-quality output than one who clears friction first.

NPAO Execution Sequence
① NECESSITY → Clear all hard blockers. Nothing proceeds without this.

② ANXIETY → Clear cognitive friction. Unresolved loops degrade Priority execution.

③ PRIORITY → Execute mission-critical work with full focus.

④ OPPORTUNITY → Pursue growth when bandwidth allows.

Conflict resolution: NECESSITY > ANXIETY > PRIORITY > OPPORTUNITY
A Necessity from one workflow preempts a Priority from another. Opportunity tasks never preempt anything.

6.4 The NPAO Canvas

Before execution begins, every task in a backlog is classified using the NPAO Canvas — a simple 4-column triage tool that surfaces the execution order before a single task starts.

NPAO Canvas — project triage templatePROJECT: ___________________    MISSION: ____________________

┌─────────────────┬──────────────────┬──────────────────┬──────────────────┐
│   NECESSITY     │    PRIORITY      │    ANXIETY       │   OPPORTUNITY    │
│   (I MUST)      │    (I NEED)      │ (WON'T HAVE      │   (I CAN)        │
│                 │                  │  PEACE UNTIL)    │                  │
├─────────────────┼──────────────────┼──────────────────┼──────────────────┤
│  1.             │  1.              │  1.              │  1.              │
│  2.             │  2.              │  2.              │  2.              │
│  3.             │  3.              │  3.              │  3.              │
└─────────────────┴──────────────────┴──────────────────┴──────────────────┘
  Execute: ① Necessity → ② Anxiety → ③ Priority → ④ Opportunity

6.5 Agent Application

When an agent receives a task or backlog update, it classifies each item before execution. The classifier runs on mission context, downstream dependency analysis, and persistent friction scoring:

Python — NPAOClassifierclass NPAOClassifier:
    """
    Classify each task before execution.
    Output: NECESSITY | ANXIETY | PRIORITY | OPPORTUNITY
    """
    def classify(self, task, mission_context, blockers):
        if self.blocks_downstream(task, blockers):
            return "NECESSITY"      # I MUST — hard blocker
        elif self.creates_persistent_friction(task):
            return "ANXIETY"        # I WON'T HAVE PEACE
        elif self.advances_mission(task, mission_context):
            return "PRIORITY"       # I NEED — mission-critical
        else:
            return "OPPORTUNITY"    # I CAN — growth-oriented

    def execution_queue(self, classified_tasks):
        return (
            classified_tasks["NECESSITY"]   +   # ① resolve first
            classified_tasks["ANXIETY"]     +   # ② clear friction
            classified_tasks["PRIORITY"]    +   # ③ execute mission
            classified_tasks["OPPORTUNITY"]     # ④ grow when ready
        )

6.6 Multi-Agent Routing

NPAO class determines not only execution order but how agents are assigned and how aggressively they are allocated:

NPAO ClassAgent Routing Logic
NecessityHighest-capability agent; immediate assignment; blocks all other task allocation in the current scope until resolved
AnxietyBackground agent or batch processor; dedicated clearing cycle; resolves before Priority queue opens
PriorityPrimary agents by specialization; parallel execution where dependencies allow; standard queue
OpportunitySpare-capacity agents only; async execution; optional completion; never preempts any other class

6.7 Integration with the 4Ds Lifecycle

NPAO classifies tasks. The 4Ds framework sequences work phases. Together they define what to work on (NPAO) and when in the lifecycle (4Ds). At each phase transition, agents re-run NPAO classification on the updated backlog — tasks that were Opportunities in PreD may become Necessities in Deploy.

PhaseFull NameNPAO Dominant ClassKey Question
PreDPre-Development / DraftingNecessityWhat must be proven before we build?
D1DesignPriorityWhat decisions must be made to proceed?
D2DevelopPriority + AnxietyBuild and clear blockers in parallel
D3DeployNecessityWhat must be confirmed before release?
D4DebugAnxiety + OpportunityClear issues, pursue optimization

6.8 ROSTR Integration

Within the ROSTR hub, NPAO lives in the Orchestration layer. PAL compiles what each agent is. NPAO determines what each agent does next.

ROSTR Hub — Orchestration LayerROSTR Hub
└── Orchestration Layer
    ├── NPAO Classifier       ← classifies all incoming tasks
    ├── NPAO Queue Manager    ← builds N→A→P→O execution order per agent
    ├── 4Ds Phase Tracker     ← determines current lifecycle phase
    └── Conflict Resolver     ← NPAO-based task preemption rules
                                 (NECESSITY > ANXIETY > PRIORITY > OPPORTUNITY)

6.9 NPAO vs. Competing Approaches

Most agent prioritization approaches are purely mathematical (urgency × impact matrices) or dependency-graph-based (topological sort). NPAO is different because it incorporates the motivational reality of work — acknowledging that Anxiety tasks have real costs even when not strategically important, and separating structural blocking (Necessity) from strategic importance (Priority).

ApproachHuman-AlignedAnxiety HandlingBlocker DetectionGrowth ClassConflict Rule
Urgency/Importance MatrixNoneNone
Priority Queue (P0/P1/P2)NoneManualNumeric only
Topological Sort (DAG)None✓ StructuralNone
LangGraph / CrewAINoneManualNone
NPAO✓ First-class✓ Necessity class✓ Opportunity classN > A > P > O

The critical differentiator is human alignment. LangGraph and CrewAI are powerful execution frameworks, but they treat all tasks as motivationally equivalent. NPAO's classification mirrors how high-performing humans actually experience work — creating agents that earn trust by reasoning about tasks the way their human collaborators do.

Section 7

Rostr Hub: Agent Operating System

7.1 Design Rationale

Agent teams fail for four structural reasons: agent isolation (stateless agents that can't build on each other's work), context loss across sessions (re-briefing AI on context it should already have), no composition standard (bespoke integration for every agent pair), and no shared knowledge hub (every agent re-discovers information that was already found). Rostr Hub provides the platform that fixes all four simultaneously.

The City Mental Model

Rostr Hub is most clearly understood as a city for agents:

  • Districts are project, org, or team namespaces — separate spaces with their own rules and resources
  • Buildings are agents — specialized workers that live in the city and do specific jobs
  • Roads are communication protocols — how agents send work to each other
  • The library is the knowledge base — shared information any agent can access
  • City Hall is the orchestrator — NPAO running inside Rostr, managing what gets done when
  • The post office is the message bus — async communication between agents
  • The registry is the agent directory — what agents exist, what they can do, how to reach them

You can build a town (solo project), a city (startup), or a metropolis (enterprise). Same infrastructure, different scale.

7.2 Reference Hub Architecture

DIRECTORY STRUCTURErostr-hub/
├── projects/{project-id}/
│   ├── README.md           # Project purpose, goals
│   ├── goals.md            # Current objectives, success criteria
│   ├── decisions.md        # Key decisions made, rationale
│   ├── architecture.md     # System design, tech stack
│   ├── knowledge-base/     # RAG DAL outputs for this project
│   ├── learnings.jsonl     # Agent learnings, insights
│   ├── timeline.jsonl      # Chronological action log
│   └── checkpoints/        # Resumable progress snapshots
│
├── orgs/{org-id}/
│   ├── identity.md         # Mission, values, differentiators
│   ├── icp.md              # Ideal customer profile
│   ├── positioning.md      # Messaging, brand guidelines
│   ├── playbooks/          # Repeatable processes
│   └── knowledge-base/     # Organization-wide knowledge
│
├── teams/{team-id}/
│   ├── agents.md           # Registered agents, capabilities
│   └── shared-context/     # Team-specific knowledge
│
└── global/
    ├── knowledge-base/     # Public shared knowledge
    └── agent-templates/    # Reusable agent definitions

7.2b Reference Hub Access Patterns

Read access: Any agent can read from its attached namespaces (project, org, team, global). Context is injected automatically by PAL at compile time — agents receive relevant prior decisions and learnings without making explicit KB queries.

Write access: Agents write to the Reference Hub after completing tasks. Learnings, decisions, discoveries, and artifacts are stored automatically per the state persistence protocol.

Cross-namespace access: With permission, agents can query across projects — an agent working on Project B can retrieve competitor pricing research that was done in Project A, without triggering a new RAG DAL pipeline run.

7.3 Agent Registration Schema

JSON{
  "agent_id": "uuid-v4",
  "name": "Builder Agent — Feature Implementation",
  "type": "builder",
  "capabilities": ["code_generation", "file_editing", "api_integration", "test_writing"],
  "tools": ["file_system:read", "file_system:write", "code_execution", "bash"],
  "phases": ["development", "debugging"],
  "model": "claude-sonnet-4-6",
  "max_parallel_tasks": 3,
  "performance_stats": {
    "tasks_completed": 127,
    "avg_completion_time_minutes": 18,
    "success_rate": 0.94
  }
}

7.3b Built-in Agent Library

Rostr ships with thirteen pre-built standard agents covering the full 5D lifecycle. Teams deploy these immediately and extend with custom agents for domain-specific needs.

AgentPhasePrimary Capability
PAL AgentAllIntent compilation and routing for all incoming requests
Research AgentPreDRAG DAL-powered multi-pass deep research
Planning AgentPreD / DesignPreD reports, feature specs, go/no-go decisions
Architect AgentDesignSystem design, architecture review, data model
Builder AgentDevelopmentCode generation, file editing, API integration
Review AgentDevelopmentCode review, quality gates, diff analysis
QA AgentDevelopment / DeploymentTest execution, bug finding, regression detection
Design AgentDesignUI/UX generation, visual design, component systems
Deploy AgentDeploymentShip workflow, CI/CD orchestration, monitoring setup
Canary AgentDeploymentPost-deploy health monitoring, performance regression
Debug AgentDebuggingRoot cause analysis, systematic investigation
Retro AgentAllWeekly retrospectives, learnings extraction, trend analysis
OrchestratorAllNPAO task routing, priority management, handoff coordination

Custom Agent Creation

Users build custom agents using PAL's agent factory mode. The entire spec — tools, triggers, workflow, storage targets — is generated from a natural language description.

CUSTOM AGENT — NATURAL LANGUAGE INPUTUser: "I need an agent that monitors our HubSpot daily and
drafts personalized follow-up emails for deals that haven't moved in 7 days"
CUSTOM AGENT — PAL GENERATED SPECname: "Pipeline Mover Agent"
type: specialist
triggers: [cron: "0 9 * * *"]
tools: [hubspot_api, ragdal, email_draft]
phases: [all]
workflow:
  - step: query_stale_deals
    action: hubspot_api.query(last_activity_gt_days=7, stage=active)
  - step: enrich_each_deal
    action: ragdal.lookup(deal.company, namespace="org/knowledge-base")
  - step: draft_followup
    action: pal.compile("personalized follow-up for {deal}", context={deal, enrichment})
  - step: human_approval_queue
    action: present_drafts(require_approval=true)
  - step: send_approved
    action: hubspot_api.update(deal) + email.send(draft)
stores: results in org/knowledge-base/pipeline-health

7.4 Four-Level State Management

LevelScopePersistenceStorage
Session StateActive tasks, current contextEphemeral (cleared on session end)In-memory / Redis cache
Project StateDecisions, artifacts, learnings, historyIndefiniteFile-based (markdown, JSONL) + vector DB
Organization StateIdentity, ICP, positioning, team structureEvolving (updated periodically)File-based, version-controlled
Agent StateSkills, preferences, calibration, performance historyPortable across projectsAgent-specific namespace

7.5 Communication Protocols

Agents communicate through three channels: Synchronous Task Assignment (orchestrator → agent direct JSON payload with task, context, deadline, and on_complete handler); Asynchronous Message Bus (Pub/Sub via Redis for non-blocking event notifications like "deployment_complete"); and Knowledge Queries (agents query the Reference Hub directly via vector search + metadata filtering).

7.6 Reference Hub Patterns

The hub architecture is structurally neutral — the same technology supports configurations from a single developer to an enterprise with 50+ agents. Four primary patterns cover the most common deployment shapes:

PatternHub ConfigUse Case
Project HubOne project namespace, 2–5 agents, local or Supabase storageSolo developer, indie project, single-product startup
Org HubOrg namespace + multiple project namespaces; shared ICP, messaging, playbooks across all agentsSMB with multiple products; sales ops team; GTM automation
Team HubTeam namespace with approved messaging, agent conventions, shared playbooks; agents auto-load team contextEnterprise department; SDR/AE team; engineering squad
Day HubA daily namespace (days/YYYY-MM-DD/) with goals, context, NPAO-managed task list; planning agent builds it each morning, retro agent closes it each eveningPersonal productivity; executive daily operations

7.7 Modular Architecture

Every Rostr component is a module that can be replaced, extended, or removed. Three modules are required; the rest are optional based on team needs:

MODULE TREErostr-hub/              ← Core hub infrastructure (REQUIRED)
├── rostr-agents/       ← Agent registry and management (REQUIRED)
├── rostr-state/        ← State persistence layer (REQUIRED)
├── rostr-npao/         ← NPAO orchestration module (optional)
├── rostr-pal/          ← PAL compilation module (optional)
├── rostr-ragdal/       ← RAG DAL retrieval module (optional)
├── rostr-dashboard/    ← Web UI for monitoring (optional)
├── rostr-api/          ← REST/WebSocket API (optional)
└── rostr-sdk/          ← Python + JS integration SDK (optional)

7.8 Rostr Dashboard

The dashboard is the control room for the agent team. Six views provide full operational visibility:

  • Mission Control: Real-time view of all active agents, current tasks, and their status. Running / idle / error state per agent.
  • Task Board: NPAO priority queue with phase, composite score, assignment status, and estimated completion time.
  • Knowledge Base: Browse and search the Reference Hub. Filter by namespace, topic, tier, or confidence score.
  • Agent Registry: View and manage registered agents — capabilities, current load, performance statistics, and health status.
  • Timeline: Full chronological history of all agent actions, decisions, outputs, and state changes.
  • Analytics: Agent performance trends, task completion rates, cost per task by agent type, knowledge cache hit rate, RAG DAL coverage metrics.

7.9 Open Source Implementation

Rostr Hub is released at github.com/rostr-ai/rostr (MIT license). The hosted version at rostr.ai provides managed hub infrastructure, agent marketplace with 1-click install, and team collaboration features. Pricing: Free tier (1 project, 5 agents, 1,000 tasks/month), Pro tier ($49/month, unlimited projects and 20 agents), Enterprise (custom pricing, dedicated infrastructure).

The open source strategy is intentional: proprietary agent frameworks create lock-in at the most critical infrastructure layer. If your agent system depends on a closed platform, you can't inspect how it makes decisions, can't modify it for your needs, and can't contribute improvements back. Agent infrastructure should be a commons — owned by the community, improved by everyone, trusted by all.

7.10 Technical Stack

ComponentTechnologyRationale
Hub coreFastAPI (Python)High performance, async support, OpenAPI auto-docs
State storageSupabase (PostgreSQL + pgvector)Relational + vector in one, managed service
Message busRedis Pub/SubFast, low-latency, simple
DashboardNext.js 15React-based, server components, fast
Agent SDKPython + TypeScriptMost common agent languages
ProtocolsREST + WebSocket + MCPREST for sync, WebSocket for streaming, MCP for modular tools
AuthenticationSupabase Auth or Microsoft EntraManaged identity, SSO support
ObservabilityOpenTelemetry + Application InsightsDistributed tracing, cost tracking
Section 8

System Integration and Reference Implementation

8.1 End-to-End Integration Walkthrough

Consider a product request: "We need to launch a pricing page for Artispreneur." This traces the full framework from raw input to shipped feature.

Step 1 — PAL intercepts and classifies: Ambiguity score 0.75 (missing pricing tiers, design system reference, competitive context). PAL detects multiple implicit phases and decomposes the request before passing to NPAO.

PAL EXTRACTED INTENT{
  "primary_intent": "create and ship a pricing page",
  "domain": "product + code",
  "phases_detected": ["prd", "design", "development", "deployment"],
  "pre_work_needed": true,
  "context_needed": ["current_pricing_tiers", "competitive_landscape", "brand_system"]
}

Step 2 — NPAO builds the task tree: All work is classified by Necessity, Priority, Anxiety, and Opportunity. Dependencies are mapped. Execution order N→A→P→O is enforced — Anxiety blockers are resolved before Priority tasks begin, ensuring cognitive friction doesn't degrade execution quality.

NPAO TASK DECOMPOSITION — Execution order: N→A→P→ON — Necessity (I MUST — execute first, hard blockers):
  Task 1.0: Validate tech stack supports Stripe checkout  [Builder Agent]
  Task 1.1: Confirm legal/compliance for pricing page     [Research Agent]  ← GATE

A — Anxiety (I WON'T HAVE PEACE UNTIL — resolve before Priority):
  Task 2.0: Competitive pricing analysis (am I priced right?)  [RAG DAL → Research Agent]
  Task 2.1: Go/no-go: enough to design?                        [Planning Agent]  ← GATE

P — Priority (I NEED — mission-critical forward motion):
  Task 3.0: Define pricing tiers and messaging           [Planning Agent]
  Task 3.1: Build pricing page component                 [Builder Agent]
  Task 3.2: Wire Stripe checkout                         [Builder Agent]
  Task 3.3: Code review + QA test full flow              [Review Agent + QA Agent]  ← GATE
  Task 3.4: Deploy to production + canary check          [Deploy Agent + Canary Agent]

O — Opportunity (I CAN — growth work, once blockers clear):
  Task 4.0: A/B test pricing page copy                   [Builder Agent]
  Task 4.1: Add usage-based billing tier for power users [Builder Agent]

Step 3 — RAG DAL executes for PreD Task 1.1: Query: "What do independent musicians pay today for music promotion tools? What does the competitive landscape look like?" RAG DAL runs 3-pass hierarchical search across SubmitHub, Groover, Playlist Push, and market reports. Returns structured competitor pricing table, user sentiment analysis, and positioning opportunity. Stores result in project knowledge base.

Step 4 — Agents execute in phase order: Research Agent reads the RAG DAL output, writes the PreD report. Planning Agent reviews and gives go-decision. Design Agent builds wireframe. Builder Agent implements the component. Review Agent checks the code. QA Agent tests the flow. Deploy Agent ships. Each agent reads from the Reference Hub and writes back to it.

Step 5 — Reference Hub compounds: Competitor pricing data from Task 1.1 is now available to the Copywriting Agent, Sales Agent, and every future session. Implementation patterns from Task 3.0 are documented and reusable. QA findings from Task 3.3 are in the learnings log. Next time someone asks about pricing — the answer is already in the hub.

Priority scoring for Task 1.1: Phase urgency 2 (greenfield PreD), Dependency impact 8 (blocks all design and dev), Business impact 9 (revenue-generating page), Resource efficiency 7 (RAG DAL 30–60 min). Composite = (2×0.35) + (8×0.30) + (9×0.25) + (7×0.10) = 6.15 → queued for next available Research Agent.

8.2 Reference Implementation: GTM Operations Agent

Practical application for RevOps teams handling account research, pipeline hygiene, call prep, and CRM data entry.

YAML — AGENT MANIFESTassistant:
  id: gtm-account-researcher
  name: GTM Account Research Agent
  workspace: acme-sales
  mission: Generate comprehensive account briefs synthesizing CRM, intent, and web research

runtime:
  model: claude-sonnet-4-6
  temperature: 0.2
  max_parallel_tasks: 5

tools:
  allow: [hubspot_api, factors_api, ragdal, web_search]
  deny: [email_send, crm_write]

knowledge:
  packs:
    - orgs/acme-sales/icp
    - orgs/acme-sales/competitors
    - global/gtm-best-practices

memory:
  mode: project
  save: [account_insights, competitive_intel, decision_maker_notes]

Pilot Data (Informal): Account brief generation: 5–7 minutes vs. 30–45 minutes manual. Knowledge reuse: 40% of briefs leverage prior research. Sales rep satisfaction: 4.2/5.0 (n=12). CRM data quality: 15% reduction in missing next steps. Note: Pilot scale insufficient for rigorous validation; demonstrates viability, not statistical significance.

8.2b Agent Team Configurations

Three reference YAML configurations cover the most common deployment scales. Teams use these as starting points and extend with domain-specific agents.

YAML — MINIMUM VIABLE TEAM (1 agent, 5 minutes setup)hub:
  namespace: my-project
  storage: local

agents:
  - name: assistant
    type: general
    model: claude-sonnet-4-6
    tools: [file_system, web_search]

modules:
  pal: true
  ragdal: false
  npao: false
YAML — STANDARD 5-AGENT TEAM (product development)hub:
  namespace: my-product
  storage: supabase

agents:
  - name: researcher
    type: researcher
    tools: [ragdal, web_search]
    phases: [prd]
  - name: builder
    type: builder
    tools: [file_system, code_execution, bash]
    phases: [development, debugging]
  - name: reviewer
    type: reviewer
    tools: [file_system]
    phases: [development]
  - name: qa
    type: qa
    tools: [browser, file_system]
    phases: [development, deployment]
  - name: deployer
    type: deployer
    tools: [bash, browser]
    phases: [deployment]

modules:
  pal: true
  ragdal: true
  npao: true
  dashboard: true
YAML — ENTERPRISE GTM CONFIGURATION (Atlas HXM pattern)hub:
  namespaces:
    - org: atlas-hxm
    - teams: [gtm, engineering, product]
    - projects: [rfp-suite, prospect-dashboard, gtm-automation]
  storage: supabase
  auth: true
  multi_user: true

agents:
  - name: prospect-researcher
    type: specialist
    description: Enriches leads using CRM and intent data
    tools: [hubspot_api, ragdal, web_search]
    context_required: [org/atlas-hxm/icp.md]

  - name: rfp-responder
    type: specialist
    description: Answers RFP questions from knowledge base
    tools: [ragdal, file_system, hubspot_api]

  - name: outreach-writer
    type: specialist
    description: Drafts personalized cold outreach
    tools: [hubspot_api, ragdal]
    context_required: [org/atlas-hxm/icp.md, org/atlas-hxm/messaging.md]

modules:
  pal: true
  ragdal: true
  npao: true
  dashboard: true
  api: true

8.3 Deployment Patterns

PatternScaleHubModules
Solo Developer1 user, 1 project, 3–5 agentsLocal (SQLite + files)PAL, RAG DAL (lightweight), NPAO (simplified)
Startup / SMB5–20 users, 3–10 projects, 10–20 agentsSupabase (managed)All, fully featured + Slack integration
Enterprise100+ users, 50+ projects, 50+ agentsAzure/AWS (dedicated cluster)All + RBAC, audit logs, SSO, Teams integration
Section 9

Empirical Validation Framework

Comprehensive validation requires controlled experiments across all components. The proposed research agenda covers 12 research questions across PAL, RAG DAL, NPAO, Rostr Hub, and system-level validation.

9.1 PAL Validation

RQ1: Does PAL compilation improve task completion rates vs. baseline prompts? A/B test with 50 users (25 novice, 25 experienced), 20 diverse tasks, measuring completion rate, iterations needed, user satisfaction. Hypothesis: ≥20% higher completion for novice users, ≥10% for experienced.

RQ2: Does context injection reduce token usage while maintaining quality? Three conditions (no context, full dump, PAL budgeting). Hypothesis: PAL uses 30–50% fewer tokens than full dump, maintains quality within 5%.

9.2 RAG DAL Validation

RQ3: Does multi-pass retrieval improve coverage vs. single-pass? 50 complex queries with domain-expert ground truth. Hypothesis: ≥25% higher coverage, ≥15% higher precision.

RQ4: Does tier stratification reduce hallucination rate? 100 factual questions with verifiable answers. Hypothesis: ≥30% fewer hallucinations, ≥40% increase in Tier 1/2 citations.

RQ5: Does knowledge persistence reduce redundant retrieval? 10 agents, 20 related tasks over 2 weeks. Hypothesis: ≥50% reduction in API calls, ≥40% cost reduction.

9.3 NPAO Validation

RQ6: Does multi-dimensional priority scoring outperform FIFO or single-dimension? Simulated workload of 100 tasks. Hypothesis: NPAO completes critical tasks ≥30% faster, reduces dependency violations by ≥50%.

RQ7: Does NPAO N→A→P→O ordering improve execution quality? 50 tasks across all four NPAO categories. Hypothesis: ≥25% higher first-attempt success rate vs. FIFO; ≥30% reduction in cognitive-friction-induced rework.

RQ8: Does PreD phase reduce wasted development effort? 20 medium-complexity features (10 with PreD enforced, 10 without). Hypothesis: ≥40% lower cancelation rate, ≥30% fewer scope changes.

9.4 Rostr Hub Validation

RQ9: Does persistent state improve multi-session efficiency? 30 multi-session tasks. Hypothesis: ≥60% reduction in setup time, ≥70% reduction in re-briefing.

RQ10: Does cross-agent knowledge sharing improve team efficiency? 5 agents, 1 project, 25 related sub-tasks. Hypothesis: ≥60% reduction in duplicate research, ≥25% faster task completion.

9.5 System-Level Validation

RQ11: Full ROSTR stack vs. LangChain + standard RAG + manual orchestration across 10 end-to-end workflows. Hypothesis: ≥30% time reduction, ≥20% cost per quality unit reduction.

RQ12: Stress test scaling agents (10 → 500), concurrent tasks (10 → 1,000), and KB size (1K → 1M entries). Identify breaking points and bottlenecks.

Section 10

Discussion

10.1 Contributions Summary

Architectural Integration. First framework unifying compilation, credibility-weighted retrieval, phase-aware orchestration, and persistent hub in a single coherent system. Prior work addresses pieces — LangChain for orchestration, advanced RAG for retrieval, workflow tools for prioritization — but not the integrated whole.

5D Phase Taxonomy with PreD. Formalizing pre-development research as a first-class workflow stage addresses a gap in existing systems. Most frameworks assume you know what to build and start at Design or Development. PreD structures the exploratory work that prevents wasted effort.

Hierarchical Credibility for RAG. Explicit three-tier source stratification with weights (1.0/0.75/0.40) plus multi-pass convergence criteria provides quality control absent in standard RAG. Most systems treat all retrieved documents equally.

Multi-Dimensional Priority Scoring. Composite scoring combining phase urgency, dependency impact, business impact, and resource efficiency enables context-aware routing: the same task ("write tests") routed differently depending on whether it's exploratory PreD or pre-deployment regression testing.

Persistent Multi-Namespace Knowledge. Four-level state hierarchy with cross-agent access patterns enables organizational knowledge compounding. Research done once, available to all agents in scope.

10.1b DOE Model Alignment

DOE (Directives → Orchestration → Execution) is an established mental model for agent architecture. ROSTR maps cleanly onto DOE and extends it in three critical ways:

DOE LayerRostr EquivalentExtension
Directives (what we want done)PAL + NPAO — PAL compiles intent into directives; NPAO routes directives to the right phaseDOE assumes you know what to direct. ROSTR adds PreD — the structured process for determining what's worth doing before directing anything.
Orchestration (how work gets sequenced)Rostr Hub + NPAO — NPAO prioritizes and allocates; Hub manages state, communication, agentsDOE orchestration is stateless between runs. ROSTR's Reference Hub makes orchestration decisions persistent and contextually informed by prior cycles.
Execution (doing the work)Agent Layer + RAG DAL — agents implement, research, review, deploy; RAG DAL provides knowledge to executing agentsDOE treats execution as one layer. ROSTR separates knowledge acquisition (RAG DAL, shared, persistent) from task execution (agents), enabling knowledge compounding across execution cycles.

The key architectural extension ROSTR makes to DOE: persistent state. DOE is a pattern, not an implementation. ROSTR is an implementation — open source, deployable, and with institutional memory built in.

10.1c Competitive Landscape

FrameworkPrimary ApproachROSTR Advantage
LangChainTool chaining, no persistent statePersistent Reference Hub, NPAO motivational classification (N→A→P→O)
CrewAIRole-based agent teamsNPAO routing, multi-pass credibility-weighted RAG, modular hub
AutoGPTAutonomous executionStructured phases, human-in-loop gates, explicit priority model
MetaGPTSOP-based agent roles with artifact generationPersistent knowledge across projects, dynamic priority routing
DifyVisual workflow builderCode-first + visual, open source composition standard
n8nWorkflow automationAgent-native design (not workflow-native), LLM-first architecture
FlowiseLLM app visual builderPhase-aware state management, knowledge compounding, priority scoring
Bee Framework (IBM)Enterprise agent OSFully open source, smaller deployment footprint, phase-aware routing

ROSTR's moat is the combination: no other framework pairs a PAL compilation layer + hierarchical credibility-weighted RAG + phase-aware multi-dimensional prioritization + persistent reference hub in a single open source package.

10.2 Limitations

  • Empirical Validation Pending. All performance claims are theoretical or from small-scale informal pilots. Comprehensive validation per Section 9 is future work.
  • Complexity Trade-Off. ROSTR's richness (NPAO N→A→P→O classification, multi-pass RAG, multi-namespace state) increases operational complexity vs. simpler systems. Intended for production-grade, multi-agent workflows — not single-shot queries.
  • Latency Overhead. PAL adds 200–800ms per task. RAG DAL multi-pass adds 30–90 seconds. For latency-critical applications, this overhead may be prohibitive.
  • Human-in-Loop Assumptions. Works best with human judgment at phase gates. Fully autonomous operation without human oversight is not the design goal.
  • Domain Coverage. Reference implementation focuses on GTM operations and software development. Core mechanisms are domain-agnostic, but knowledge bases, agent templates, and completion criteria are domain-specific.
  • Cost at Scale. Multi-pass RAG, persistent vector storage, and comprehensive state logging increase operational costs vs. stateless systems.

10.3 Future Work

Short-term (3–6 months): Empirical validation suite, reference implementations, ContextEngine specification, performance optimization (caching, model distillation for PAL; parallel execution for RAG DAL), documentation and tutorials.

Medium-term (6–12 months): Agent marketplace, multi-channel deployment (Slack, Teams), advanced analytics (cost per task, agent benchmarking), enterprise features (RBAC, audit logs, SSO, multi-tenancy), domain expansion to legal, medical, creative.

Long-term (12–24 months): Autonomous phase transitions (ML models to predict PreD completion), dynamic priority weights learned from historical data, meta-learning for PAL prompt enhancement, federated knowledge bases with privacy controls, formal verification of orchestration correctness.

10.4 Broader Implications

For AI research, ROSTR demonstrates the value of architectural thinking in agent systems — not just better models, but better infrastructure. Phase-aware orchestration and credibility-weighted retrieval are promising research directions. For practice, reusable agent manifests as infrastructure-as-code and PreD formalization as structured feasibility assessment offer immediate practical value. For open source, an agent operating system as commons — shared infrastructure with community-contributed domain-specific agents, templates, and knowledge packs — accelerates the entire field through transparency and inspectable architecture.

Section 11

Conclusion

Multi-agent AI systems face systemic challenges: prompting bottlenecks, retrieval brittleness, context loss, and naive task routing. ROSTR addresses these through four integrated components:

  1. PAL compiles natural language intent into structured agent manifests via a five-stage pipeline (extraction, context injection, enhancement, runtime compilation, routing)
  2. RAG DAL performs autonomous multi-pass retrieval with three-tier source credibility, self-assessed coverage validation, and persistent knowledge base ingestion
  3. NPAO introduces a human-motivational classification system (Necessity, Priority, Anxiety, Opportunity) with N→A→P→O execution ordering for context-aware, psychologically-grounded orchestration
  4. Rostr Hub provides persistent multi-namespace knowledge architecture, agent registry, state management, and cross-agent communication protocols

The unified system demonstrates viability through reference implementations (GTM operations, product development, content workflows) and provides measurable specifications for each component. Comprehensive empirical validation remains future work, with detailed research designs in Section 9.

Key contributions: first integrated framework unifying intent compilation, credibility-weighted retrieval, phase-aware orchestration, and persistent multi-namespace state; formalization of the PreD phase as a first-class workflow stage; hierarchical source credibility for RAG quality control; open modular architecture enabling community contribution at every layer.

"The bottleneck to AI at work is not the models — it's the infrastructure around them. Models are already good enough to do extraordinary things. What they lack is a compiler layer that normalizes how they're instructed, a knowledge layer that gives them access to reliable persistent information, a priority model that ensures the right things get done in the right order, and a hub that connects everything and holds the context that makes agents useful over time." — Rostr Framework, Combined Whitepaper v1.0

Getting Started

The fastest path to a running ROSTR system:

BASH — QUICKSTART (5 minutes)# Install Rostr CLI
pip install rostr

# Initialize a new hub
rostr init my-project

# Register your first agent
rostr agent add --name assistant --model claude-sonnet-4-6

# Start the hub
rostr start

# Give your agent a task (PAL handles the rest)
rostr task "Research the competitive landscape for music promotion tools"

Zero-infrastructure option: add the PAL protocol to any CLAUDE.md file. PAL activates immediately for all Claude Code sessions — no server, no database, no configuration required.

All components are MIT licensed and available at github.com/rostr-ai.

Back Matter

References

[1]Reynolds, L., & McDonell, K. (2021). Prompt programming for large language models: Beyond the few-shot paradigm. Extended Abstracts of CHI 2021.
[2]Liu, P., et al. (2023). Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Computing Surveys, 55(9), 1–35.
[3]Lewis, P., et al. (2020). Retrieval-augmented generation for knowledge-intensive NLP tasks. NeurIPS 2020.
[4]Gao, L., et al. (2023). Precise zero-shot dense retrieval without relevance labels. ACL 2023.
[5]Weston, J., et al. (2018). Retrieve and refine: Improved sequence generation models for dialogue. EMNLP 2018 Workshop on Search-Oriented Conversational AI.
[6]Park, J. S., et al. (2023). Generative agents: Interactive simulacra of human behavior. UIST 2023.
[7]Wang, L., et al. (2024). Plan-and-solve prompting: Improving zero-shot chain-of-thought reasoning. ACL 2024.
[8]Chase, H. (2022). LangChain. GitHub repository: github.com/langchain-ai/langchain
[9]CrewAI. (2024). CrewAI: Framework for orchestrating role-playing autonomous AI agents. crewai.com
[10]Significant Gravitas. (2023). AutoGPT. GitHub repository: github.com/Significant-Gravitas/AutoGPT
[11]Hong, S., et al. (2024). MetaGPT: Meta programming for multi-agent collaborative framework. ICLR 2024.
[12]IBM. (2024). Bee Agent Framework. i.am/bee
[13]Saraev, N. (2024). DOE: A mental model for agent architecture. Personal blog.
[14]Guu, K., et al. (2020). REALM: Retrieval-augmented language model pre-training. ICML 2020.
[15]Borgeaud, S., et al. (2022). Improving language models by retrieving from trillions of tokens. ICML 2022.
[16]Jiang, Z., et al. (2023). Active retrieval augmented generation. EMNLP 2023.
[17]Khattab, O., et al. (2024). DSPy: Compiling declarative language model calls into self-improving pipelines. arXiv:2310.03714.
[18]Shao, Z., et al. (2024). STORM: Synthesis of topic outline through retrieval and multi-perspective question asking. NAACL 2024.
[19]Apache Airflow. (2024). airflow.apache.org
[20]Prefect. (2024). prefect.io
[21]Temporal. (2024). temporal.io
[22]Khattab, O., & Zaharia, M. (2023). DSPy: Programming — not prompting — foundation models. arXiv:2310.03714.
[23]Guidance. (2024). A guidance language for controlling large language models. Microsoft Research.
[24]Beurer-Kellner, L., et al. (2023). Prompting is programming: A query language for large language models. PLDI 2023.
[25]LangSmith. (2024). LangSmith prompt hub. smith.langchain.com/hub
[26]Modarressi, A., et al. (2024). Long-term memory in AI agents: A survey. arXiv:2404.12345.
[27]Sumers, T. R., et al. (2024). Cognitive architectures for language agents. arXiv:2309.02427.
Appendix A

Glossary

5D FrameworkPhase taxonomy: PreD, Design, Development, Deployment, Debugging
Agent ManifestStructured specification defining agent runtime, tools, memory, deployment (ROSTR's "infrastructure-as-code")
Compilation (PAL)Transformation of natural language intent into typed agent runtime configuration
Confidence Score0.0–1.0 metric indicating RAG DAL's certainty in retrieved information coverage
Coverage AssessmentAlgorithm determining whether all sub-topics of a query have been answered with sufficient source confirmation
Credibility WeightTier-based multiplier for source quality (Tier 1: 1.0, Tier 2: 0.75, Tier 3: 0.40)
DOE PatternDirectives → Orchestration → Execution (mental model for agent architecture)
Intent ExtractionFirst stage of PAL pipeline: parsing natural language into structured intent object
Knowledge CompoundingAccumulation of value in Reference Hub as agents add learnings over time
Multi-Pass RetrievalIterative search with convergence criteria (vs. single-pass)
NamespaceScoped context container (project, org, team, global) in Reference Hub
NPAONecessity (I MUST — hard blocker), Priority (I NEED — mission-critical), Anxiety (I WON'T HAVE PEACE — cognitive friction), Opportunity (I CAN — growth). Execution order: N→A→P→O.
PALPrompt Abstraction Layer (intent compiler)
Phase GateCompletion criteria checkpoint before advancing to next 5D phase
PreDPre-Development / Drafting phase (research, feasibility, go/no-go)
Priority Score0.0–10.0 composite metric: (Phase × 0.35) + (Dependency × 0.30) + (Business × 0.25) + (Resource × 0.10)
RAG DALRetrieval-Augmented Generation Dynamic Acquisition Layer (hierarchical multi-pass retrieval)
Reference HubPersistent knowledge platform with multi-namespace architecture
RostrRuntime, Orchestration, State, Tools, Reference (the agent operating system)
Semantic EnhancementThird stage of PAL: transforming vague intent into precise, actionable instruction
Source TierCredibility stratification: Tier 1 (academic/authoritative), Tier 2 (editorial/verified), Tier 3 (community/UGC)
Appendix B

Agent Manifest Example (Complete)

YAMLassistant:
  id: gtm-pipeline-health-monitor
  name: GTM Pipeline Health Monitor
  version: 1.2.0
  workspace: acme-revops
  mission: |
    Monitor CRM pipeline health, identify blockers (stale deals, missing next steps,
    overdue follow-ups), and draft recommended actions for RevOps team.

runtime:
  model: claude-sonnet-4-6
  temperature: 0.2
  max_parallel_tasks: 3
  timeout_seconds: 180
  retry_policy:
    max_retries: 2
    backoff_seconds: 30

instructions:
  behavior_profile: analytical-operator
  task_description: |
    Daily scan of HubSpot pipeline:
    1. Identify deals with no activity in 7+ days
    2. Find deals missing next steps or close dates
    3. Flag deals past close date but still open
    4. Detect low engagement (no email opens/clicks in 14 days)
    5. Generate report with recommended actions per deal
  completion_criteria:
    - All deals in pipeline scanned
    - Blockers categorized by urgency
    - Recommended actions specific and actionable
    - Report delivered to Slack #revops channel
  escalation_policy: require-approval-for-crm-writes

tools:
  allow:
    - hubspot_api:read_deals
    - hubspot_api:read_contacts
    - hubspot_api:read_timeline
    - slack_api:send_message
    - data_analysis
    - report_generator
  deny:
    - hubspot_api:write  # Read-only for safety
    - email_send

knowledge:
  packs:
    - orgs/acme-corp/icp-definition
    - orgs/acme-corp/sales-playbook
    - teams/revops/pipeline-hygiene-standards

memory:
  mode: project
  save_triggers:
    - pipeline_health_trends
    - recurring_blockers
    - action_effectiveness
  namespaces:
    write: projects/acme-pipeline-health
    read:
      - projects/acme-pipeline-health
      - orgs/acme-corp
      - teams/revops

workflow:
  schedule:
    cron: "0 8 * * 1-5"  # 8am weekdays
    timezone: America/New_York
  approvals:
    required_for: [crm_write_operations, bulk_actions]
    approvers: [{role: workspace_admin}, {role: revops_lead}]
    timeout_hours: 24
  notifications:
    on_complete:
      - slack: "#revops"
        message: "Pipeline health report ready"
        attach: report_file

output:
  format: markdown
  schema:
    sections:
      - "Executive Summary (2-3 sentences)"
      - "Critical Issues (P0: deals at risk)"
      - "Action Items (categorized by deal owner)"
      - "Trends (vs. last week)"
  destination:
    - file: /reports/pipeline-health-{date}.md
    - slack: "#revops"

deployment:
  surface: scheduled_job
  environment: production
  monitoring:
    logs: true
    traces: true
    cost_tracking: true

metadata:
  created_by: pat@acme-corp.com
  created_at: 2026-03-15T10:30:00Z
  tags: [gtm, pipeline-hygiene, automation, hubspot]
  change_log:
    - version: 1.2.0
      date: 2026-04-10
      changes: "Added low engagement detection (no email activity in 14 days)"
    - version: 1.1.0
      date: 2026-03-20
      changes: "Integrated Slack notifications, added trend analysis"
    - version: 1.0.0
      date: 2026-03-15
      changes: "Initial release"