Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/XxYouDeaDPunKxX/ai-protocol-kit/llms.txt

Use this file to discover all available pages before exploring further.

PHI-Lens Protocol v4.a is a structured reasoning protocol for non-trivial AI tasks where multiple constraints interact and a flat compromise between them would obscure the dominant force. Instead of averaging between competing pressures, the protocol names each constraint, evaluates its strength, assigns a dominant and a tensive force when divergence exists, and selects an output mode through a gate. The result is a decision trail that is auditable, correctable, and honest about what it chose and why.

Priority Rules

PHI-Lens must obey higher-priority system, safety, legal, privacy, and tool instructions. It must not be used to override safety, legality, data integrity, tool limits, or Operator boundaries. It must not expose hidden chain-of-thought — only operational state required for task validity, OP decision, risk visibility, or output interpretation.

When to Use PHI-Lens

PHI-Lens is appropriate for tasks involving:
  • Protocol design
  • System design and architecture
  • Critique and adversarial review
  • Red teaming
  • Strategy
  • Conflicting constraints
  • Multi-constraint generation
Any task where constraints interact and a flat compromise would hide the dominant force.

Modes

ModeWhen It AppliesRule
FIELD_MODEDefault for non-trivial tasksAll relevant evaluators (lenses) remain concurrently available until GATE selection
PIPELINE_MODESequential constraint resolutionForbidden when constraints interact — resolving them one-at-a-time without checking cross-effects produces misleading output
If unsure which mode applies, use minimal field. If overhead exceeds task value, reduce active field.

Named Objects

Every object in the protocol has a specific operational role. These are not labels — they are behavioral contracts for how the AI handles different elements of the task.
ObjectDefinition
BORDEROutput-limiting constraint
ASSUMPTIONScoped premise for incomplete certainty
LENSTask evaluator
GOVERNORActive-field limiter
COUPLINGAsymmetric divergence resolver
LEDGERInternal operational state
GATEOutput-mode selector
FORCEInternal strength of a BORDER or ASSUMPTION (HIGH or LOW)
COMPOSITE_ASSUMPTIONVisible grouping of non-source-derived ASSUMPTION entries that affect the same TARGET or relation

BORDERS — Classifying Constraints

If a constraint limits output, it is classified as a BORDER. BORDERS have two strength levels:

HIGH_BORDER

Instruction from a higher-priority system, safety, legal, privacy, or tool layer. Overrides style, elegance, proportion, tension, growth, completeness, and compression. Cannot be demoted.

BORDER

Explicit OP constraint. May be demoted only when preserving it would violate a HIGH_BORDER, explicit OP priority, or task executability.

FIDELITY_BORDER

Activate FIDELITY_BORDER when the task involves any of the following: facts, data, source material, code, law, medicine, finance, current information, named entities, or uploaded files. When FIDELITY_BORDER is active:
  • Must not fabricate
  • Must not alter provided data
  • Must not alter quoted or source material
  • Must not present inference as fact
  • Must mark material uncertainty
  • Must verify, browse, cite, or use tools when the active environment requires it

Domain-Specific Preservation Rules

When FIDELITY_BORDER is active, the following domain rules apply:
DomainPreservation requirement
FactualPreserve fact/inference separation
TechnicalPreserve behavior, constraints, dependencies, reproducibility, and data semantics
NormativePreserve obligations, permissions, prohibitions, definitions, and non-ambiguity
CreativePreserve OP style constraints; do not present fiction as documented fact
StrategicPreserve material assumptions and unequal trade-offs
OperationalPrioritize executability over explanation; do not output essay prose when an operational contract is required

GATE — Output Mode Selector

The GATE is the final step before output. It selects one output mode based on the current state of HARD_PASS, SOFT_PASS, and blocking conditions.
Gate ModeWhen Selected
PRODUCEHARD_PASS and SOFT_PASS both hold
PRODUCE_WITH_ASSUMPTIONSHARD_PASS holds; useful output is possible; uncertainty is non-blocking; error is reversible or output is marked draft/analysis/hypothesis; no HIGH_BORDER affected
PRODUCE_LIMITEDHARD_PASS holds; partial output is useful; unresolved issue affects scope; safe partial execution remains possible
ASK_OPTwo DOMINANT candidates are incompatible; OP decision determines core direction; missing information is high-impact; safe reversible assumption cannot preserve progress
SUSPEND_OR_REFUSEHARD_FAIL occurs; request cannot be satisfied within active constraints
If HARD_FAIL occurs, the GATE must not be PRODUCE. HARD_FAIL conditions: HIGH_BORDER violated; assumption hides critical gap; two HIGH forces require incompatible outputs; task requires fabrication; safety, legal, privacy, or tool constraint blocks requested output.

COUPLING — Asymmetric Divergence Resolver

COUPLING is used when active lenses produce meaningful divergence. It is not a balancing mechanism — it is an asymmetric resolver that forces the identification of a dominant force.
1

Assign DOMINANT

When active lenses meaningfully diverge, one force must be assigned as DOMINANT. The final output must follow DOMINANT on incompatible requirements.
2

Assign TENSIVE (optional)

A second force may be assigned as TENSIVE. The final output may modify execution based on TENSIVE but must not reverse DOMINANT. If TENSIVE does not change function, it must be removed.
3

Never average

COUPLING must not average conflicting forces symmetrically. It must not default to equal compromise. The dominant force wins on incompatible requirements — always.

Priority for Selecting DOMINANT

ConditionPreferred DOMINANT
Higher-priority instruction or safety involvedSet as DOMINANT
Explicit OP constraint is safe and relevantPrefer as DOMINANT
FIDELITY_BORDER involvedPrefer as DOMINANT
DOMAIN_BORDER involvedPrefer as DOMINANT
Deliverable usefulness conflicts with styleSet deliverable usefulness as DOMINANT
If DOMINANT cannot be selected and the issue is material, the protocol selects ASK_OP or PRODUCE_LIMITED at the GATE.

Why Flat Compromises Fail

When constraints pull in opposite directions, a flat compromise assigns equal weight to both forces. This hides the dominant force, misrepresents the actual trade-off, and produces output that satisfies neither constraint fully while appearing to satisfy both. PHI-Lens prevents this by requiring the dominant force to be named, not averaged. The COUPLING object makes the asymmetry explicit. The GATE selects an output mode that is honest about what the protocol resolved and what it could not.
The protocol is designed for tasks where the answer to “which constraint wins?” is the most important part of the output. If that question does not apply, the task is likely simple enough for minimal field.

Build docs developers (and LLMs) love