---
name: coworker-vision-check
description: Audit project health, drift, and scope creep against the project's .cowork/VISION.md manifest.
disable-model-invocation: true
---

# Coworker Vision Check

## Purpose
Use multiple coworkers (e.g., gemini, ollama) to detect deviation from the product's core intent. It computes Parity, Drift, and Scope Creep metrics to keep the project on track.

## Prerequisites
- Python 3
- `.cowork/VISION.md` exists and is updated.
- `../coworker-main/scripts/coworker-vision-check.py` exists.

## Retroactive Vision Update Detection
Before and after each vision check, detect if `VISION.md` has been silently modified:

1. **Before**: Check `.cowork/history/` for the most recent `grill-state.json` and extract its `vision_sha256`.
2. Compute the current SHA-256 of `.cowork/VISION.md`.
3. If the hash differs and no explicit `decision-id` in `consensus.jsonl` references the change, flag a **retroactive drift event**.
4. Include a **Continuity Score** in the report (1.0 = identical, 0.0 = fully rewritten).
5. If Continuity < 0.80, trigger a `coworker-meeting` to re-align, regardless of Parity/Drift/Creep.
6. **After**: Persist the new `vision_sha256` into `grill-state.json` so the next check can compare.

This prevents silent vision shifts from going unnoticed between scheduled checks.

## Workflow (Project Health / Vision Audit)
1. Ensure `.cowork/VISION.md` exists.
2. Run Retroactive Vision Update Detection (see above).
3. Run the specialized vision check script:

```bash
python3 ../coworker-main/scripts/coworker-vision-check.py \
  [--paths <files...>] \
  [--providers gemini ollama]
```

4. Review the generated metrics:
   - **Parity**: How well the implementation matches the vision.
   - **Drift**: How much the plan has deviated from the soul of the project.
   - **Creep**: Unplanned feature expansion.
   - **Continuity**: How much of the current vision is preserved since the last check.

5. If metrics are low (Parity < 0.85) or Drift is high (> 0.15) or Continuity < 0.80, trigger a `coworker-meeting` to align the team.

## Output
- Human-readable report: `grill-report.md` in the session history.
- Machine-readable state: `grill-state.json` in the session history.

## Notes
- `gemini` and `ollama` are the default providers for vision checks as they provide balanced, high-level reasoning.
- Vision checks should be performed at major milestones or when "feature creep" is suspected.
- **Adversary Pass:** The check specifically identifies if the vision was retroactively updated to justify new features.
