PENGO Workbench
Workbench / Lenses / Interface Contract Lens

LEN-0200

Interface Contract Lens

Compares declared interface structure to observed runtime structure to detect contract deviations.

Primary Pattern Matches

PAT-0150

Interface Mismatch

A structural condition where observed interface behavior, shape, or exchange differs from the declared interface contract.

Lens Application

The Interface Contract Lens is a primary inspection mechanism for Interface Mismatch because it aligns declared interface expectations with observed runtime evidence. It helps surface where inputs, outputs, schemas, methods, timing, or exchange patterns diverge from the stated contract without treating the mismatch as already resolved.

Inspect For

  • Declared fields, types, or methods missing at runtime
  • Runtime payloads that differ from documented schemas
  • Version, protocol, or endpoint behavior drift
  • Error patterns caused by incompatible assumptions

Avoid

Treat a detected deviation as an inspection signal rather than conclusive evidence without checking context, versioning, adapters, or intentional contract evolution.

PAT-0160

Schema Breakage

A structural condition where an instance, graph, payload, or object violates the type, shape, or rule requirements of a declared schema.

Lens Application

The Interface Contract Lens is a primary inspection mechanism for Schema Breakage because it compares what an interface declares against what instances, payloads, or objects actually contain. It helps surface contract deviations such as missing fields, unexpected structures, invalid types, or shape mismatches.

Inspect For

  • Missing required fields or properties
  • Unexpected fields, nesting, or object shapes
  • Type mismatches between declared and observed values
  • Runtime payloads that violate interface rules

Avoid

Treat contract deviations as inspection signals that need correlation with schema rules and runtime context, not as confirmation that Schema Breakage has been established.

Secondary Pattern Matches

PAT-0130

Incomplete Declaration

A structural condition where an element is declared but required attributes, dependencies, or linked definitions are missing.

Lens Application

The Interface Contract Lens supports inspection of Incomplete Declaration by highlighting mismatches between what an interface declares and what appears during runtime. For incomplete declarations, those mismatches may point to absent fields, unresolved dependencies, or interface elements that are structurally present but not sufficiently connected.

Inspect For

  • Declared fields absent at runtime
  • Required dependencies not resolved
  • Linked definitions missing or unreachable
  • Runtime structures with partial contract coverage

Avoid

Treat contract deviations as signals for further inspection rather than confirmation that an incomplete declaration exists.

PAT-0330

Invariant Breakage

A structural condition where an observed state violates a declared invariant that is supposed to remain true.

Lens Application

As a secondary lens, the Interface Contract Lens supports inspection of Invariant Breakage by highlighting mismatches between declared interface contracts and observed runtime structures. Contract deviations may indicate where an invariant assumption no longer matches actual system behavior, especially when runtime shape, type, nullability, or cardinality changes affect conditions that were supposed to remain true.

Inspect For

  • Runtime fields or shapes missing from declared contracts
  • Extra or unexpected interface members
  • Type, nullability, or cardinality mismatches
  • Contract changes that alter invariant assumptions

Avoid

Treat an interface mismatch as an inspection signal rather than sufficient evidence of Invariant Breakage without checking the related invariant expectation and runtime context.

Related Issues

ISS-0087

Agent Cannot Choose Tool Without Tool Result

The agent needs a tool result to choose the right tool, but cannot obtain that result without choosing a tool first.

ISS-0115

Agent Gets Conflicting Tool Authority

An agent receives conflicting authority signals about whether, when, or how it may use a tool, connector, function, or integration.

ISS-0026

AI Output Breaks Parser

The AI output causes a parser, validator, importer, or structured-output consumer to fail.

ISS-0002

Answer Has No Traceable Source Link

The answer makes a claim, recommendation, citation, or factual statement without a source link or trace path that allows the user to verify where it came from.

ISS-0003

Citation Points to Wrong Source

A citation, reference, link, or source pointer is present, but it points to the wrong source, wrong passage, wrong document, or unsupported evidence.

ISS-0077

Diagnostic Area Has No Coverage

A known diagnostic area, failure mode, requirement, or review dimension has no Issue, check, rubric item, or workflow coverage.

ISS-0097

Downstream Steps Magnify Hallucinated Claim

A hallucinated or unsupported claim from an AI output is reused by later workflow steps until it becomes more influential than the evidence supports.

ISS-0027

Duplicate Fields With Same Meaning

The AI returns multiple fields, labels, sections, or structured elements that carry the same meaning and create ambiguity about which one should be used.

ISS-0066

Duplicate Output Sections

The AI repeats sections, headings, blocks, or output areas in a way that creates redundancy, confusion, or downstream handling problems.

ISS-0081

Evaluation Rubric Has Coverage Gap

An evaluation rubric, grading standard, or review checklist leaves part of the required evaluation space uncovered.

ISS-0014

Fallback Authority Is Missing

The system does not declare who or what has authority when the primary owner, rule, tool, source, or decision path is unavailable or inconclusive.

ISS-0028

Format Rule Too Weak

The format instruction is too vague, incomplete, or optional to reliably produce output that satisfies the expected structure.

ISS-0023

Hallucinated Fields

The AI adds fields, keys, attributes, columns, or structured elements that were not declared, requested, or allowed by the expected schema.

ISS-0021

Invalid JSON Output

The AI returns malformed JSON or structured output that cannot be parsed.

ISS-0074

Missing Fallback for Unavailable Information

The task does not declare what the AI should do when required information, sources, tools, fields, or evidence are unavailable.

ISS-0022

Missing Required Fields

The AI returns structured output that omits fields required by the schema, workflow, parser, form, or downstream consumer.

ISS-0038

Model and Workflow Disagree on Next Step

The AI model recommends or selects a next step that conflicts with the workflow state, required handoff, routing rule, or process sequence.

ISS-0025

Nested Fields Do Not Match

The AI returns nested structured fields whose internal shape, hierarchy, parent-child relationship, or contained values do not match the expected structure.

ISS-0018

Output Breaks the Next Step

The AI output looks acceptable by itself but cannot be used by the next tool, workflow step, parser, reviewer, or downstream consumer.

ISS-0079

Policy Area Has No Examples

A policy, rule, standard, or guidance area has no examples showing how it should apply to real cases.

ISS-0090

Policy Decision Depends on Itself

A policy decision requires the outcome of the same policy decision before it can be made.

ISS-0054

Prompt Changed but Workflow Did Not

A prompt changes but the workflow, parser, review step, routing rule, or downstream expectation still assumes the old prompt behavior.

ISS-0080

Relationship Map Has Missing Links

A map of related Issues, rules, patterns, cases, fields, tools, or workflow steps is missing links needed to navigate or reason over the structure.

ISS-0075

Review Rubric Missing Required Criteria

A review rubric, grading rule, evaluation checklist, or classification standard lacks criteria required to make the review reliable.

ISS-0057

Same Contract Name Has Different Meanings

The same prompt, schema, field, policy, tool, or workflow contract name is used in different places with different meanings.

ISS-0033

Saved Memory Not Used

A saved memory, preference, instruction, or durable context item exists but does not affect the AI output when it should.

ISS-0091

Schema Reference Loops Without Base Case

A schema, field, type, object, or structured reference points through a loop without a base case that allows validation or interpretation to resolve.

ISS-0107

Single Field Carries Too Many Obligations

One field, label, score, status, or structured value is expected to carry too many meanings, decisions, or workflow obligations.

ISS-0011

Task Has No Clear Limit

The task does not declare where the AI should stop, what is out of scope, or what counts as enough work.

ISS-0017

Tool Call Contract Mismatch

The AI or agent calls a tool with names, arguments, types, modes, or shapes that do not match the declared tool interface.

ISS-0108

Tool Can Act Without Responsible Authority

A tool, connector, function, or integration can perform an action without a declared responsible authority for that action.

ISS-0020

Tool Exists but Required Inputs Are Missing

A usable tool or integration exists, but the AI or agent does not have the required inputs, permissions, fields, identifiers, or context needed to call it correctly.

ISS-0019

Tool Result Not Integrated Correctly

The AI receives a tool result but misreads, ignores, overwrites, misplaces, or fails to incorporate it correctly into the final output or workflow state.

ISS-0110

Tool Rules and Prompt Rules Conflict

Tool, connector, function, or MCP rules conflict with prompt instructions, causing the AI or agent to face incompatible requirements.

ISS-0006

Validation Result Changes on Retry

A validation, grading, review, classification, or pass/fail result changes after retry even though the input and declared validation rules did not change.

ISS-0078

Workflow Stage Has Too Few Checks

A workflow stage lacks enough checks, gates, criteria, or review conditions to safely support the work it controls.

ISS-0013

Workflow Step Has No Decision Owner

A workflow step requires a decision, approval, judgment, or routing choice, but no owner is declared for making it.

ISS-0073

Workflow Step Lacks Required Conditions

A workflow step can run, route, approve, reject, or continue without the required conditions being declared or checked.

ISS-0024

Wrong Field Types

The AI returns fields with values whose types do not match the expected schema, such as strings where numbers, booleans, arrays, objects, or enums are required.