$npx -y skills add Archive228/loopkit --skill spec-firstWrite the goal spec on disk before the agent acts, so it can't drift. Use before any multi-step task.
| 1 | # Spec First |
| 2 | Without an external contract, the agent drifts after ~3 iterations — and the failure looks like progress (code written, tests pass, wrong goal solved). |
| 3 | Write `PROMPT.md` BEFORE acting: |
| 4 | - **Goal** — one sentence. |
| 5 | - **Done when** — concrete, checkable conditions. "Test suite green: <cmd>". |
| 6 | - **Never touch** — files/areas off-limits. |
| 7 | - **Stop if** — more than N files outside scope change; a passing test starts failing. |
| 8 | The agent re-reads this file every iteration. State (what's done) goes in a separate `IMPLEMENTATION_PLAN.md` it updates in place. If you can't write "done when" concretely, the task isn't ready — clarify before coding. |