Cognitive Architecture SOP

Standard Operating Procedure for multi-agent orchestration using the Softmax Router pattern.


Purpose

Orchestrate multiple AI specialists using attention-inspired routing for complex knowledge work tasks.


When to Use


Process

Phase 1: Context Analysis

Input: User request + available context

Steps:

  1. Extract ContextSnapshot
  2. Bind terms to ConceptIds (Knowledge Graph lookup)
  3. Identify required capabilities

Output: ContextSnapshot with semantic anchoring


Phase 2: Router Agent Allocation

Input: ContextSnapshot

Steps:

  1. Evaluate specialist relevance (attention weights)
  2. Normalize weights (softmax)
  3. Allocate attention budget
  4. Scope tool permissions per specialist

Output: Specialist assignments with attention weights

Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
specialists:
  - id: "semantic-mapper"
    relevance: 0.40  # 40% attention
    capabilities: ["concept-binding", "ontology-query"]

  - id: "rule-analyst"
    relevance: 0.30  # 30% attention
    capabilities: ["policy-validation", "sbvr-check"]

  - id: "arch-checker"
    relevance: 0.20  # 20% attention
    capabilities: ["calm-validation", "dependency-check"]

  - id: "retrieval-agent"
    relevance: 0.10  # 10% attention
    capabilities: ["doc-search", "example-retrieval"]

Phase 3: Parallel Specialist Execution

Input: Specialist assignments

Steps:

  1. Invoke specialists in parallel
  2. Each specialist operates within bounded capability
  3. Each produces weighted delta (contribution)

Output: Specialist contributions with provenance

Example:

1
2
3
4
5
6
7
8
9
10
11
12
contributions:
  - specialist: "semantic-mapper"
    weight: 0.40
    delta:
      concepts: ["sea:BoundedContext", "sea:Adapter"]
      relationships: [...]

  - specialist: "rule-analyst"
    weight: 0.30
    delta:
      violations: []
      recommendations: [...]

Phase 4: Aggregation & Synthesis

Input: Weighted specialist contributions

Steps:

  1. Combine deltas with attention weights
  2. Resolve conflicts (prioritize by weight)
  3. Track provenance (which specialist contributed what)

Output: Synthesized result


Phase 5: Validation & Governance

Input: Synthesized result

Steps:

  1. Schema conformance check
  2. ConceptId persistence validation
  3. Policy limit enforcement (SBVR, CALM)

Output: Validated final result or error report


Quality Gates


Example: Generate ADR for New Bounded Context

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
request: "Help me decide if inventory management needs its own bounded context"

phase1_context:
  concepts: ["BoundedContext", "DomainLogic", "BusinessCapability"]

phase2_routing:
  specialists:
    - semantic-mapper: 0.35  # Map business terms to concepts
    - rule-analyst: 0.25     # Check naming/boundary rules
    - arch-checker: 0.25     # Validate against existing contexts
    - retrieval-agent: 0.15  # Find similar past decisions

phase3_execution:
  semantic-mapper:
    result: "Inventory is distinct capability per DDD"
  rule-analyst:
    result: "No policy violations, follows naming convention"
  arch-checker:
    result: "No overlap with existing contexts"
  retrieval-agent:
    result: "Similar: ADR-021 (case-management as BC)"

phase4_synthesis:
  recommendation: "Yes, create new bounded context"
  rationale: "Distinct business capability (35%), no violations (25%), no overlap (25%)"

phase5_validation:
  schema: PASS
  concepts: PASS
  policies: PASS