LEN-0200
Interface Contract Lens
Compares declared interface structure to observed runtime structure to detect contract deviations.
Primary Pattern Matches
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.
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
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.
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
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.
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.
AI Output Breaks Parser
The AI output causes a parser, validator, importer, or structured-output consumer to fail.
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.
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.
Diagnostic Area Has No Coverage
A known diagnostic area, failure mode, requirement, or review dimension has no Issue, check, rubric item, or workflow coverage.
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.
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.
Duplicate Output Sections
The AI repeats sections, headings, blocks, or output areas in a way that creates redundancy, confusion, or downstream handling problems.
Evaluation Rubric Has Coverage Gap
An evaluation rubric, grading standard, or review checklist leaves part of the required evaluation space uncovered.
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.
Format Rule Too Weak
The format instruction is too vague, incomplete, or optional to reliably produce output that satisfies the expected structure.
Hallucinated Fields
The AI adds fields, keys, attributes, columns, or structured elements that were not declared, requested, or allowed by the expected schema.
Invalid JSON Output
The AI returns malformed JSON or structured output that cannot be parsed.
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.
Missing Required Fields
The AI returns structured output that omits fields required by the schema, workflow, parser, form, or downstream consumer.
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.
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.
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.
Policy Area Has No Examples
A policy, rule, standard, or guidance area has no examples showing how it should apply to real cases.
Policy Decision Depends on Itself
A policy decision requires the outcome of the same policy decision before it can be made.
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.
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.
Review Rubric Missing Required Criteria
A review rubric, grading rule, evaluation checklist, or classification standard lacks criteria required to make the review reliable.
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.
Saved Memory Not Used
A saved memory, preference, instruction, or durable context item exists but does not affect the AI output when it should.
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.
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.
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.
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.
Tool Can Act Without Responsible Authority
A tool, connector, function, or integration can perform an action without a declared responsible authority for that action.
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.
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.
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.
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.
Workflow Stage Has Too Few Checks
A workflow stage lacks enough checks, gates, criteria, or review conditions to safely support the work it controls.
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.
Workflow Step Lacks Required Conditions
A workflow step can run, route, approve, reject, or continue without the required conditions being declared or checked.
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.