Skip to content

feat: add context-collapse-detection skill for AI agent self-monitoring#372

Draft
fcfsprojects wants to merge 3 commits into
BankrBot:mainfrom
fcfsprojects:context-collapse-detection-skill
Draft

feat: add context-collapse-detection skill for AI agent self-monitoring#372
fcfsprojects wants to merge 3 commits into
BankrBot:mainfrom
fcfsprojects:context-collapse-detection-skill

Conversation

@fcfsprojects
Copy link
Copy Markdown

Context Collapse Detection Skill

This PR introduces a new AI agent skill that detects when agents are losing coherence, drifting off-goal, stuck in loops, or missing critical context — before mistakes compound.

What This Skill Does

Four collapse signals detected:

  • Coherence drift — outputs no longer connect to original goal
  • Goal displacement — agent solving different problem than assigned
  • Loop trap — agent repeating same actions without progress
  • Memory gap — agent missing information needed to proceed

Key Features

✅ Non-blocking by design — runs as parallel evaluation
✅ Self-monitoring layer — lightweight checks at key agent loop moments
✅ Recovery protocol — structured response when collapse detected
✅ Universal compatibility — Claude Code, Copilot Agent, any MCP-compatible agent
✅ Zero dependencies — no external API calls

When It Triggers

  • Before any irreversible action (delete, send, deploy, purchase)
  • Every 3–5 steps in a long task
  • When switching between subtasks
  • Before reporting results to user

Files Added

  • skills/context-collapse-detection/SKILL.md — Core implementation
  • skills/context-collapse-detection/README.md — User documentation
  • skills/context-collapse-detection/LICENSE — MIT License

@fcfsprojects fcfsprojects marked this pull request as draft May 16, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant