DivineTree.ICP 1.0.2

dotnet add package DivineTree.ICP --version 1.0.2
                    
NuGet\Install-Package DivineTree.ICP -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DivineTree.ICP" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DivineTree.ICP" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="DivineTree.ICP" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DivineTree.ICP --version 1.0.2
                    
#r "nuget: DivineTree.ICP, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DivineTree.ICP@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DivineTree.ICP&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=DivineTree.ICP&version=1.0.2
                    
Install as a Cake Tool

DivineTree.ICP

Intelligence Carrier Pattern — Sovereign Intelligence Carrier for Agentic Orchestration

NuGet License: MIT .NET 9 Depends on DivineTree.DCP


The Problem

Agentic systems decompose goals into tasks, route tasks across agents, and make reasoning decisions at every step. At each boundary, the intelligence context — who asked, why, what was decided, and how confident was the model — is lost.

Logs capture what happened. ICPEnvelope carries why it happened.

Traditional approaches:

  • Pass raw intent objects between agents — reasoning context stripped at every boundary
  • Reconstruct decisions from logs — expensive, lossy, unreliable for audit
  • Embed orchestration state in domain payloads — violates separation of concerns

The Intelligence Carrier Pattern solves this by making the envelope — not the intent — the unit of agentic intelligence.


What Is ICP?

The Intelligence Carrier Pattern wraps every agentic intent in an ICPEnvelope<TIntent> that carries three intelligence layers:

Layer Interface The Question It Answers
Lineage IICPLineage What reasoning and routing decisions were made?
Context IICPContext Who initiated this goal? From which channel? When?
Audit ICPAuditSummary What is the tamper-evident record of this execution?

The envelope travels with the intent across every orchestration boundary. When the goal completes, the envelope contains a complete, tamper-evident record of every reasoning and routing decision.


Relationship to DivineTree.DCP

ICP and DCP are sovereign peers. They never reference each other at the type level.

DivineTree.DCP          — Data Carrier Pattern
DataEnvelope<T>         — carries domain payloads
IEnvelopeContext        — situational awareness for data
ILineageChain           — transformation history for data

DivineTree.ICP          — Intelligence Carrier Pattern
ICPEnvelope<TIntent>    — carries agentic intelligence
IICPContext             — situational awareness for goals
IICPLineage             — reasoning history for goals

The handoff between ICP and DCP occurs at the service boundary:

ICPEnvelope<GoalRequest> routes the goal
    → CLPlatform receives it
    → Creates DataEnvelope<DomainPayload> for the domain workflow
    → ICP envelope is garbage collected after handoff

ICP extends DCP interfaces — IICPContext extends IEnvelopeContext, IICPStep extends ILineageStep, IICPLineage extends ILineageChain — enabling cross-pattern observability without coupling.


Installation

dotnet add package DivineTree.ICP

This automatically installs DivineTree.DCP as a transitive dependency.


Quick Start

using DivineTree.ICP;

// 1. Create your context — who initiated this goal
var context = new MyICPContext(
    goalId:        Guid.NewGuid().ToString("N"),
    correlationId: traceId,
    userId:        "officer-001",
    channel:       "web");

// 2. Wrap your intent in an envelope
var envelope = new ICPEnvelope<GoalRequest>(goalRequest, context, new MyICPLineage());

// 3. Record reasoning and routing decisions
envelope.AppendStep("goal_received",   "GoalController");
envelope.AppendStep("goal_decomposed", "DecompositionService");
envelope.AppendStep("task_routed",     "GoalRouter");

// 4. Pass the envelope — not the raw intent — across boundaries
await goalRouter.RouteAsync(envelope);

// 5. Persist the audit summary — never persist the full envelope
await auditLogger.WriteAsync(envelope.ToICPAuditSummary());

Envelope Anatomy

ICPEnvelope<TIntent>
├── EnvelopeId       — Unique ID for this envelope instance (from DCP)
├── EnvelopeVersion  — Schema version for forward compatibility (from DCP)
├── Payload          — TIntent — the goal artifact (GoalRequest, TaskGraph, TaskNode)
├── Context          — IICPContext — who, where, when, which goal
├── ICPLineage       — IICPLineage — every reasoning and routing step
└── ToICPAuditSummary() — the only thing persisted

Implementing the Interfaces

DivineTree.ICP ships interfaces and ICPEnvelope<TIntent> only. Your platform provides the implementations.

Minimal IICPContext:

public sealed class MyICPContext : IICPContext
{
    public string GoalId        { get; }
    public string CorrelationId { get; }
    public string UserId        { get; }
    public string Channel       { get; }
    public DateTime CreatedAt   { get; } = DateTime.UtcNow;
    public string WorkflowId    => GoalId;
    public string FacadeId      => Channel;
    public string SchemaVersion => "1.0.0";
    public IReadOnlyDictionary<string, string> Properties { get; }
        = new Dictionary<string, string>();

    public MyICPContext(
        string goalId, string correlationId,
        string userId, string channel)
    {
        GoalId        = goalId;
        CorrelationId = correlationId;
        UserId        = userId;
        Channel       = channel;
    }

    public static MyICPContext New(string userId, string channel) => new(
        goalId:        Guid.NewGuid().ToString("N"),
        correlationId: Guid.NewGuid().ToString("N"),
        userId:        userId,
        channel:       channel);
}

Minimal IICPLineage:

public sealed class MyICPLineage : IICPLineage
{
    private readonly List<ILineageStep> _steps = new();
    public ILineageStep? Origin  => _steps.Count > 0 ? _steps[0]  : null;
    public ILineageStep? Latest  => _steps.Count > 0 ? _steps[^1] : null;
    public IReadOnlyList<ILineageStep> Steps => _steps.AsReadOnly();
    public int StepCount => _steps.Count;

    public void AppendStep(ILineageStep step)
    {
        ArgumentNullException.ThrowIfNull(step);
        _steps.Add(step);
    }

    public void Append(string stepName, string actorId,
        Dictionary<string, string>? metadata = null)
        => _steps.Add(new MyICPStep(stepName, actorId));

    public IReadOnlyList<ILineageStep> GetStepsByActor(string actorId) =>
        _steps.Where(s => s.ActorId.Equals(actorId, StringComparison.OrdinalIgnoreCase))
              .ToList().AsReadOnly();

    public IReadOnlyList<ILineageStep> GetStepsByName(string stepName) =>
        _steps.Where(s => s.StepName.Equals(stepName, StringComparison.OrdinalIgnoreCase))
              .ToList().AsReadOnly();
}

Reasoning Step Naming Convention

Step names must be snake_case and describe the reasoning act, not the actor.

Correct Incorrect
goal_received GoalController
goal_decomposed DecompositionService
task_routed GoalRouter
hitl_escalated HITLService
decision_rendered DecisionAgent

The actor is captured in ActorId. The step name describes what happened to the intelligence.


Creation Responsibility

The orchestration component that receives a goal creates the ICPEnvelope<TIntent>. Infrastructure — message buses, state stores, HTTP middleware — never creates envelopes on behalf of orchestrators.


Audit and Persistence

Only ToICPAuditSummary() should be persisted. The full envelope may contain sensitive goal context.

// Correct — persist the audit summary only
await auditLogger.WriteAsync(envelope.ToICPAuditSummary());

// Wrong — envelope may contain sensitive context
await repository.SaveAsync(envelope);

Standard Reasoning Step Names

Use these standard step names for cross-platform consistency:

Step Name Description
goal_received Goal arrived at the orchestrator entry point
goal_validated Goal passed structural and security validation
goal_decomposed Goal decomposed into a task graph by intelligence
task_routed Task routed to the appropriate agent or service
task_dispatched Task dispatched to the downstream platform
hitl_escalated Goal escalated to a human officer
hitl_resolved Human officer resolved the escalation
goal_completed Goal execution completed successfully
goal_failed Goal execution failed — reason in metadata
sovereign_halt Execution halted by sovereign safety check

Cross-Language Support

The ICP pattern is language-agnostic. DivineTree.ICP is the C# / .NET 9 reference implementation.

Language Package Status
C# / .NET 9 DivineTree.ICP (this package) v1.0.0
Java com.divinetree:icp Planned
Python divinetree-icp Planned
Go github.com/DivineTreeDesigns/icp Planned

Reference Implementation

MajdUAE — Sovereign Agentic Platform for UAE FDI Processing — is the reference implementation of ICP at production scale. AgenticOS.DCP implements DivineTree.ICP across the full goal decomposition and routing pipeline.

Repository: github.com/DivineTreeDesigns/UAEAgentic


Design Principles

  1. The envelope travels with the intent. Never strip it at an orchestration boundary.
  2. The intent is immutable by convention. Do not mutate TIntent after envelope creation.
  3. Only ToICPAuditSummary() is persisted. The full envelope stays in memory.
  4. The orchestrator creates the envelope. Infrastructure never creates envelopes.
  5. Lineage is append-only. Steps cannot be removed, reordered, or modified.
  6. ICP and DCP are sovereign peers. They never reference each other at the type level.

  • DivineTree.DCP — Data Carrier Pattern — domain payload intelligence

License

MIT — see LICENSE.


DivineTreeDesigns — Sovereign Confidential

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DivineTree.ICP:

Package Downloads
DivineTree.ICPVault

Sovereign Intelligence Accumulation Layer — Reasoning Corpus Vault for ICP Envelopes. Persists sanitised, PII-free AI vault records to accumulate a reasoning corpus for training and analytics.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 167 5/14/2026
1.0.1 93 5/13/2026
1.0.0 90 5/13/2026

v1.0.0 — Initial sovereign release. ICPEnvelope<TIntent> · IICPContext · IICPStep · IICPLineage · ICPAuditSummary. Extends DivineTree.DCP. net9.0.