imMamdouhaboammar/anti-slop-engineering / skills/cognitive-load-and-attention-governor
cognitive-load-and-attention-governor
VerifiedEnforce cognitive bandwidth and attention economy invariants across AI agent outputs, human-in-the-loop interactions, pull request descriptions, standalone deliverables, and multi-agent swarm handoffs. Governs scannability metrics (time-to-point, max wall length, landing anchor density), terminal blocking-question placement, deliverable purity (zero opener/closer fluff), working memory list bounding (Miller's law <= 5), and non-regression constraint preservation.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.1 KB |
| examples/attention-budget-record.json | config | 853 B |
| examples/pure-deliverable-sample.md | markdown | 300 B |
| playbooks/agent-to-agent-swarm.md | markdown | 2.0 KB |
| playbooks/human-agent-interaction.md | markdown | 2.7 KB |
| references/attention-metrics.md | markdown | 3.7 KB |
| references/handoff-contracts.md | markdown | 5.2 KB |
references/attention-metrics.md
View on GitHub# Attention Economy & Scannability Metrics Specification
This document formalizes the mathematical models and empirical thresholds for text shape, scannability, deliverable purity, and blocking-question placement.
---
## 1. Text Shape vs. Vocabulary Models
Traditional readability metrics (Flesch-Kincaid, Gunning Fog, SMOG) compute grades from word length and sentence syllable counts:
$$\text{FKGL} = 0.39 \left(\frac{\text{total words}}{\text{total sentences}}\right) + 11.8 \left(\frac{\text{total syllables}}{\text{total words}}\right) - 15.59$$
**The Fundamental Flaw:** An unbroken, 400-word paragraph composed of simple 4th-grade words scores as "Easy / 4th Grade" under FKGL, yet represents an impenetrable wall of text that readers with ADHD or high cognitive load immediately bounce off of.
Anti-Slop Cognitive Governance measures **Text Geometry & Spatial Anchor Distribution** ($\mathcal{S}$):
### Time-to-Point ($TTP$)
The word offset before the reader encounters the first bold or high-salience anchor:
$$TTP = |\text{words}(\text{text}[0:\text{pos}_{\text{first\_anchor}}])|$$
- **Target:** $TTP \le 20$ words
- **Failure:** $TTP > 40$ words indicates buried bottom-line.
### Maximum Wall Length ($W_{max}$)
The maximum continuous word run within a single paragraph that contains **zero** formatting anchors (no bolding, no list marks, no arrow markers `→`, no code spans):
$$W_{max} = \max_{p \in \text{paras}} \left( |\text{words}(p)| \cdot \mathbb{I}(\text{has\_anchor}(p) = 0) \right)$$
- **Target:** $W_{max} \le 60$ words
- **Blocker:** $W_{max} > 100$ words triggers `ERR_EXCESSIVE_WALL_OF_TEXT`.
### Anchor Density ($\rho_{anchor}$)
The density of visual landing elements per 100 words:
$$\rho_{anchor} = \frac{100 \times (N_{bold} + N_{anchored\_lines})}{N_{words}}$$
- **Target:** $\rho_{anchor} \ge 3.0$ anchors per 100 words.
### Wall Word Fraction ($F_{wall}$)
The proportion of total words located in anchor-free prose paragraphs:
$$F_{wall} = \frac{\sum_{p \in \text{paras}, \neg \text{has\_anchor}(p)} |\text{words}(p)|}{N_{words}}$$
- **Target:** $F_{wall} \le 0.20$ (at least 80% of words sit within anchored or list blocks).
---
## 2. Terminal Blocking-Question Placement Invariant
When an agent needs human confirmation ($Q_{block}$), the placement determines whether the question is seen:
$$\mathcal{B}_{pos} = \begin{cases}
1 & \text{if } Q_{block} \in \text{last\_paragraph}(\text{text}) \land \text{no\_trailing\_prose} \land (\text{flagged}(\text{line}_1) \lor N_{words} < 40) \\
0 & \text{otherwise}
\end{cases}$$
### The Skimmer Invariant:
If $N_{words} \ge 40$, Line 1 must contain a flag keyword matching:
$$\text{Regex}(\backslash b(\text{before I} \mid \text{need} \mid \text{confirm} \mid \text{sign-off} \mid \text{go-ahead} \mid \text{wait} \mid \text{your call})\backslash b) \lor \text{Verdict}(\text{No, Don't, Stop})$$
---
## 3. Deliverable Purity Index ($\mathcal{P}_{deliv}$)
A deliverable $D$ must satisfy:
$$\mathcal{P}_{deliv} = \mathbb{I}(\text{OpenerWrappers}(D) = \emptyset) \land \mathbb{I}(\text{CloserOffers}(D) = \emptyset) \land \mathbb{I}(\text{PreambleLeadIn}(D) = \emptyset)$$
Where:
- $\text{OpenerWrappers}$: `Here is...`, `Below is...`, `Sure!`, `I've drafted...`
- $\text{CloserOffers}$: `Let me know if...`, `Hope this helps!`, `Feel free to...`
- $\text{PreambleLeadIn}$: Lines ending with `:` or `.` immediately preceding markdown blocks.
---
## 4. Working Memory Bounding ($\mathcal{M}_{cap}$)
Based on Miller's Law ($7 \pm 2$ chunks, modern cognitive research: 4-5 chunks for technical working memory):
$$\forall L \in \text{Lists}(\text{text}), \quad |L| \le 5$$
If $|L| > 5$, the list must be decomposed into thematic sub-sections or utilize progressive disclosure.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |