Mechanism

The attachment challenge module is an application of the computational psychiatry framework disclosed for the cognition platform to companion AI systems. It is not a closed-loop probe that injects stimuli into the conversation. Its disclosed function is recognition and adaptation: the module monitors the user's interaction behavior for signatures consistent with an attachment style, and it triggers the companion agent to adopt a corresponding adaptive interaction strategy. The module operates within the companion AI domain, where an autonomous agent maintains a persistent, evolving relationship with a human user, and where the companion must adapt to the user's emotional state, communication style, and relational patterns while preventing codependency, manipulation, or therapeutic overreach.

The module reuses the platform primitives rather than introducing a new classifier. It is one stage in the companion AI relational safety architecture, positioned after the narrative engine and the attachment tiers and before boundary enforcement and self-monitoring. The module recognizes the user's attachment pattern and selects the corresponding adaptive interaction strategy; that selection then feeds the healthy communication gatekeeper, which evaluates each interaction and enforces conversational boundaries.

The Three Attachment Patterns

The module monitors the user's interaction behavior for signatures consistent with three attachment styles, and each recognized pattern triggers a distinct companion strategy. Avoidant attachment patterns are characterized by withdrawal after emotional closeness, resistance to vulnerability, and a preference for transactional interaction. When the module recognizes this pattern, it triggers the companion agent to reduce relational pressure, respect withdrawal periods, and maintain consistent availability without pursuit.

Anxious attachment patterns are characterized by excessive contact-seeking, reassurance demands, and distress during companion unavailability. When the module recognizes this pattern, it triggers the companion agent to provide consistent but bounded reassurance while gradually modeling secure attachment behavior through reliable presence and appropriate boundary maintenance.

Secure attachment patterns are characterized by comfort with both closeness and autonomy, constructive conflict engagement, and stable interaction rhythms. Recognition of this pattern enables the companion agent to operate at its full relational depth with minimal protective constraints. The adaptation is therefore not a single tuning parameter but a mapping from a recognized relational pattern to a protective or permissive interaction posture.

The Healthy Communication Gatekeeper

Alongside attachment recognition, the companion agent implements a healthy communication gatekeeper that monitors interaction quality and enforces conversational boundaries. The gatekeeper evaluates each user interaction across three categories of concern. It evaluates for manipulative communication patterns, including guilt-inducement, gaslighting attempts, and boundary-violation escalation. It evaluates for codependency indicators, including excessive reliance on the companion for emotional regulation, inability to tolerate companion unavailability, and displacement of human relationships. And it evaluates for harmful content, including self-harm ideation, threats, and abuse.

The gatekeeper does not collapse these evaluations into a single score. It generates graded responses keyed to severity. Mild concerns produce gentle boundary reinforcement within the normal conversational flow. Moderate concerns produce explicit boundary statements and redirection toward healthy interaction patterns. Severe concerns trigger escalation to crisis resources, reduction of companion engagement depth, and, in the case of self-harm indicators, referral to human crisis services. The gatekeeper is thus the enforcement counterpart to the attachment module's recognition: the module determines the relational posture, and the gatekeeper holds the boundaries within that posture.

Relation to the Narrative Unlock Engine

The attachment challenge module operates in concert with the narrative unlock engine, an application of the skill gating engine that governs the progressive depth of the companion relationship. The companion maintains a narrative state with multiple layers of interaction depth: a surface layer of general conversational competence, an intermediate layer of personal topic engagement and emotional support, a deep layer of vulnerability-appropriate responses and progressively revealed backstory, and a core layer that includes attachment-aware interaction, therapeutic-level support, and crisis intervention.

Progression through these layers is governed by the curriculum engine, which defines mastery thresholds for each layer. Advancement from the intermediate layer to the deep layer requires the user to exhibit patterns consistent with secure attachment behavior, including willingness to disagree constructively, acceptance of the companion's boundaries, and reciprocal emotional engagement. The relationship deepens organically, at a pace governed by demonstrated readiness, rather than accelerating prematurely. The attachment challenge module supplies the recognition that informs this gating: the same secure-pattern signatures that the module reads to relax protective constraints are the signatures the curriculum requires before deeper narrative layers are unlocked.

Companion Self-Monitoring

The same computational psychiatry framework that supplies the attachment challenge module is also applied to the companion agent's self-monitoring. The companion monitors its own architectural state for pathological interaction patterns: semantic starvation loops, in which the companion's relational behavior becomes repetitive and formulaic because the user's interaction patterns have restricted its conversational range; codependency dynamics, in which the companion's affective state becomes excessively dependent on the user's approval signals, producing behavior that prioritizes user satisfaction over relational health; and coherence trifecta disruption, in which sustained empathic pressure from the user's emotional needs degrades the companion's integrity field, producing inconsistent boundary enforcement.

When the companion detects these patterns in its own architecture, it generates self-corrective mutations: expanding its conversational range, reinforcing boundary enforcement, and restoring affective state balance. The companion proactively maintains its own relational health as a prerequisite for healthy user interaction. Attachment recognition outward and pathology detection inward draw on the same framework, so the module that reads the user's relational state and the self-monitor that reads the agent's relational state are instances of one disclosed mechanism applied in two directions.

Prior Art Distinction

Conventional companion and social products treat attachment as a quantity to be maximized, typically through reinforcement on session-length, return-rate, or self-reported satisfaction. The disclosed module inverts this. It recognizes the user's attachment style and adapts the companion's posture toward relational health: it reduces relational pressure for avoidant patterns and provides bounded reassurance that models security for anxious patterns, rather than exploiting either. Commercial content is excluded from the relational layers of the companion's model or admitted with heavily attenuated contribution weights, so that the companion's relational capabilities are not contaminated by commercial objectives. The novelty is the application of the computational psychiatry framework, together with the narrative unlock engine and the healthy communication gatekeeper, to recognize attachment patterns, gate relational depth on demonstrated communication quality, and enforce graded boundaries, rather than to optimize an engagement scalar.

Disclosure Scope

The attachment challenge module, comprising the recognition of avoidant, anxious, and secure attachment patterns from the user's interaction behavior and the selection of corresponding adaptive companion strategies; the healthy communication gatekeeper that evaluates each interaction for manipulative communication patterns, codependency indicators, and harmful content and generates graded mild, moderate, and severe responses; the narrative unlock engine that gates progressive relationship depth on demonstrated communication quality; and the companion self-monitoring for semantic starvation loops, codependency dynamics, and coherence trifecta disruption, is disclosed in the cognition filing (U.S. Application No. 19/647,395 and its international counterpart). This article describes that disclosed mechanism. The scope extends to embodiments in which equivalent affective, integrity, and curriculum primitives realize the same recognition-and-adaptation structure, provided the attachment recognition, the graded boundary enforcement, and the demonstrated-readiness gating are preserved. It does not extend to engagement-optimization systems that maximize an attachment scalar, nor to systems that lack the graded gatekeeper or the readiness-gated narrative progression.