Skip to main content
Glama
alphaparkinc

Personal Agent Attention Residue Context Switch

README.md
# genpark-personal-agent-attention-residue-context-switch-skill

![Tests](https://img.shields.io/badge/tests-passing-brightgreen)
![License](https://img.shields.io/badge/license-MIT-blue)
![Python](https://img.shields.io/badge/python-3.10%2B-blue)
![Dependencies](https://img.shields.io/badge/dependencies-zero-success)
![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)

GenPark Personal Agent Attention Residue Context Switch models Sophie Leroy's attention residue theory and Shannon application entropy to protect personal deep work.

```mermaid
flowchart TD
    A[Task Switch Log & Unfinished Task States] --> B[Leroy Attention Residue Decay Engine]
    B --> C[Cognitive Tax Minutes Lost Per Switch]
    D[Active Application Time Distribution] --> E[Shannon Fragmentation Entropy Calculator]
    F[Unstructured To-Do List] --> G[Optimal Context Batching Optimizer]
    C & E & G --> H[Recovered Deep Work Hours]
```

## Features
- **Attention Residue Quantification**: Calculates minutes of mental capacity lost to unfinished task transitions.
- **Application Entropy Scoring**: Measures digital multitasking thrashing across active desktop windows.
- **Intelligent Context Batching**: Groups related tasks to eliminate up to 75% of daily context switches.

## Quickstart

```python
from client import PersonalAgentAttentionResidueContextSwitch

residue = PersonalAgentAttentionResidueContextSwitch()
res = residue.optimize_task_batching_schedule([{"title": "Email 1", "category": "INBOX"}, {"title": "Email 2", "category": "INBOX"}])
print("Recovered Focus Minutes:", res["estimated_recovered_focus_minutes"])
```

## FastMCP Integration

```bash
python -m genpark-personal-agent-attention-residue-context-switch-skill.mcp_server
```

## License
MIT