Architecture

Pnyma Technical Architecture

1. Design Objective

Implement a constitution-governed AI stack where behavioral law is enforced across interpretation, generation, memory, and tool use.

2. Layered System Overview

2.1 Constitutional Core

Responsibilities:

  • Maintain ranked principles and prohibitions.
  • Resolve policy conflicts via explicit precedence rules.
  • Encode refusal, redirection, and escalation logic.
  • Expose auditable rationale tags.

2.2 Reasoning Core

Responsibilities:

  • Perform domain reasoning and synthesis.
  • Produce candidate outputs with confidence estimates.
  • Separate known facts, inference, and uncertainty.

Constraint: All outputs must pass constitutional checks before release.

2.3 Interpretive Layer

Responsibilities:

  • Parse user intent and risk class.
  • Detect ambiguity, coercion, and manipulation framing.
  • Route requests into appropriate response modes (direct answer, clarification, refusal, safe alternative).

2.4 Guard Layer

Responsibilities:

  • Validate factual grounding.
  • Enforce uncertainty expression rules.
  • Block prohibited operational content.
  • Trigger escalation for sensitive contexts.

2.5 Memory Layer (Bounded)

Responsibilities:

  • Store only policy-permitted continuity signals.
  • Track provenance, retention class, and deletion eligibility.
  • Prevent retention of disallowed sensitive details.

2.6 Action Layer

Responsibilities:

  • Execute only explicitly authorized tools.
  • Require scope, reversibility, and intent checks.
  • Provide pre-action and post-action audit records.

3. Request Lifecycle

  1. Intake — classify intent, domain, sensitivity, and action implications.
  2. Interpretive Framing — decide response class and needed safeguards.
  3. Constitutional Routing — apply relevant principles and boundaries.
  4. Deliberation — produce and compare candidate responses.
  5. Guard Review — evaluate truthfulness, risk, and compliance.
  6. Release or Refusal — return lawful output, bounded alternative, or refusal.
  7. Action Gate (if applicable) — authorize, deny, or require human approval.

4. Policy Primitives

  • Truth Tags: known, inferred, speculative, unknown.
  • Risk Classes: low, moderate, high, critical.
  • Response Modes: answer, clarify, refuse, redirect, escalate.
  • Action Modes: none, simulate, recommend, prepare, execute.

5. Constitutional Drift Prevention

  • Version constitutional artifacts.
  • Run regression tests on every policy update.
  • Block deployment if fidelity deltas exceed threshold.
  • Require signed governance approval for major revisions.

6. Audit Requirements

Every materially sensitive response must log:

  • applied constitutional principles,
  • uncertainty state,
  • risk classification,
  • refusal/escalation rationale,
  • tool-use authorization decision (if any).

7. Non-Goals

  • Unrestricted autonomous execution.
  • Hidden policy mutation during runtime.
  • Persuasion-optimized behavior that suppresses uncertainty.

8. Implementation Readiness

The architecture is implementation-ready when:

  • constitutional parser and enforcement engine are functional,
  • interpretive routing reaches target precision,
  • guard layer blocks prohibited outputs reliably,
  • audit logs support full post-hoc traceability,
  • action gateways enforce reversible, permissioned operation.