three-shifts/SKILL.md
Cyclic shift execution engine. Plans tasks 3x daily (6 AM, 2 PM, 10 PM), decomposes them into granular steps, then executes via 15-minute cron cycles. Each cycle reads state files, picks the next step, executes it, writes results back. Errors are logged and skipped — never fatal. Planning uses Claude 4.6; execution uses GLM-5.
npx skillsauth add profbernardoj/arbclaw.com three-shiftsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Architecture: Plan once → decompose → execute in 15-minute cycles → each cycle does ONE step → state persists in files between runs.
Why v2: V1 ran everything in one long session. One timeout killed the whole shift. V2 is a state machine — errors get logged, skipped, and retried. 32 cycles per shift, each learning from the last.
All state lives in workspace/shifts/:
shifts/
├── tasks.md # Current shift's step-by-step plan (the state machine)
├── context.md # Stack, constraints, known pitfalls, learned lessons
├── handoff.md # What the previous shift left behind
├── state.json # Machine-readable shift metadata
└── history/ # Archived completed shifts
└── YYYY-MM-DD-{shift}.md
# Afternoon Shift — 2026-02-22
Approved by: user | Approved at: 2:15 PM CST
Shift window: 2:00 PM – 10:00 PM CST
Cycles remaining: ~30
## Task 1: API migration plan [P1]
- [x] Step 1.1: Read current proxy-router config and session economics — DONE (cycle 1)
- [ ] Step 1.2: Research mor-[REDACTED] paid tier pricing and limits
- [!] Step 1.3: Compare cost of paid tier vs local-only — BLOCKED: need pricing from step 1.2
- [ ] Step 1.4: Draft transition recommendation in memory/projects/example/
## Task 2: Commit workspace changes [P1]
- [ ] Step 2.1: Run git status, identify logical commit groups
- [ ] Step 2.2: Stage and commit new skills (three-shifts, relationships)
- [ ] Step 2.3: Stage and commit memory reorganization files
- [ ] Step 2.4: Stage and commit scripts and config changes
- [ ] Step 2.5: Push to remote
## Summary
Total steps: 9 | Done: 1 | Blocked: 1 | Remaining: 7
Last cycle: 2026-02-22 14:15 CST — completed step 1.1
Next target: Step 1.2
Step markers:
[ ] — Not started (available for next cycle)[x] — Completed (with cycle number and brief result)[!] — Blocked (with reason — will be retried after dependencies clear)[~] — In progress (claimed by current cycle, prevents double-execution)[-] — Skipped (manually removed or deprioritized)# Shift Context — Living Document
## Stack & Environment
- macOS arm64, OpenClaw 2026.2.21-2
- Git repos: ~/.openclaw/workspace
- 1Password for secrets (never store raw keys)
- Primary messaging channel for user comms
## Constraints
- Never force push or delete branches
- trash > rm (recoverable beats gone)
- Space Brave searches by 2+ seconds (rate limit)
- MiniMax-M2.5: DO NOT USE (broken streaming)
- Llama 3.3 70B: DO NOT USE
## Known Pitfalls (learned from experience)
- API-specific gotchas go here
- Check messaging connectivity if deliveries fail
- Check provider billing cooldown policies
- Always check git status before committing — avoid partial commits
## Rules for This Shift
- Night shift: no external comms, no financial txns, no destructive ops
- If blocked on user input, skip and note in handoff
- Max 1 web search per cycle (Brave rate limit)
{
"shift": "afternoon",
"date": "2026-02-22",
"status": "executing",
"startedAt": "2026-02-22T20:00:00Z",
"approvedAt": "2026-02-22T20:15:00Z",
"approvedBy": "user",
"planModel": "your-heavy-model (e.g. Claude, GPT-4)",
"execModel": "your-light-model (e.g. GLM-5, GPT-4o-mini)",
"totalSteps": 9,
"completed": 1,
"blocked": 1,
"skipped": 0,
"cyclesRun": 1,
"lastCycleAt": "2026-02-22T20:15:00Z",
"nightAutoApproved": false,
"carryoverFromShift": null
}
| Shift | Plan Cron | Cycle Crons | Window | Character | |-------|-----------|-------------|--------|-----------| | Morning | 6:00 AM | 6:15 AM – 1:45 PM (every 15 min) | 6 AM – 2 PM | Comms, decisions, user-facing | | Afternoon | 2:00 PM | 2:15 PM – 9:45 PM (every 15 min) | 2 PM – 10 PM | Deep work, building, coding | | Night | 10:00 PM | 10:15 PM – 5:45 AM (every 15 min) | 10 PM – 6 AM | Autonomous, research, maintenance |
Model: your-heavy-model (e.g. Claude, GPT-4) (heavy model for quality planning)
When the planning cron fires:
Read these sources:
shifts/handoff.md — what last shift left behindshifts/context.md — rules, constraints, pitfallsshifts/state.json — previous shift statsmemory/daily/YYYY-MM-DD.md — today's activityMEMORY.md — active projects, priorities, deadlinesIf shifts/tasks.md has incomplete [ ] or [!] steps from a previous shift:
[carryover] in the new planPresent to user in this format:
☀️/🌤️/🌙 [SHIFT] SHIFT PLAN
Date: [DATE] | Window: [START]–[END] [TZ]
Exec model: GLM-5 | Cycles: ~32
P1 (Must do):
1. [Task] — [Est. time] — [Why now]
2. ...
P2 (Should do):
3. ...
P3 (Could do):
5. ...
Blocked/Waiting:
- [Item] — [Blocker]
Carryover from last shift:
- [Item] — [Status]
Reply: "Approve" / "Approve all" / "Approve 1,3" / "Add: [task]" / "Skip"
This is the critical v2 step. After approval, before any execution begins:
shifts/tasks.mdshifts/state.jsonDecomposition guidelines for GLM-5:
git status in your project dir" not "check the repo")If it's 10 PM and:
shifts/tasks.md has incomplete steps from today's morning or afternoon shiftsThen:
"nightAutoApproved": true to state.jsonWhen the user responds to a shift plan:
"Approve" / "Approve all":
shifts/state.json — confirm status is awaiting_approvalstatus to "executing", approvedAt to current ISO timestamp, approvedBy to the user's name`"Add: [task]":
shifts/tasks.mdtotalSteps in state.json"executing")"Skip":
status to "cancelled" in state.jsonshifts/handoff.md that the shift was skippedNo response after 30 minutes (morning/afternoon):
awaiting_approval)Model: your-light-model (e.g. GLM-5, GPT-4o-mini) (light model, cost-efficient)
Each cycle is an isolated session — no memory of previous cycles except what's in the files.
1. READ shifts/state.json
→ If status is "completed", "cancelled", "idle", or "awaiting_approval": reply HEARTBEAT_OK (no-op)
→ If status is "executing": continue
2. READ shifts/tasks.md
→ Find first step marked [ ] (not started)
→ If none found, check for [!] (blocked) steps — retry if dependency cleared
→ If all steps are [x], [-], or still [!]: shift is DONE → go to Handoff
3. READ shifts/context.md
→ Load rules, constraints, pitfalls
4. CHECK FOR STALE CLAIMS
→ If any step is marked [~] (claimed by a previous cycle that crashed/timed out):
- Change it back to [ ] — the previous cycle didn't finish
- This step becomes the next available step to claim
5. CLAIM the step
→ Mark it [~] (in progress) in tasks.md
→ Write current timestamp to state.json
6. EXECUTE the step
→ Do the work (one focused action)
→ Stay within the step's scope — do NOT drift to other tasks
7. WRITE RESULTS back to tasks.md
→ Success: [x] Step N.N: description — DONE (cycle X): brief result
→ Blocked: [!] Step N.N: description — BLOCKED (cycle X): reason why
→ If blocked, check if next [ ] step has no dependency on this one → continue to it
8. UPDATE state.json
→ Increment cyclesRun, update completed/blocked counts, lastCycleAt
9. UPDATE shifts/context.md (if learned something new)
→ New pitfall discovered? Add it.
→ Found a useful command? Note it.
→ This is how cycles teach future cycles.
10. IF time permits in this cycle, take the NEXT available [ ] step
→ But only if the current step took <5 minutes
→ Never take more than 2 steps per cycle
When a step is blocked:
[!] with a clear reason[ ] stepIf a [!] step has been blocked for 3+ cycles:
[-] (skipped) and note in handoff for user reviewWhen all steps are [x], [-], or [!], OR when the shift window expires:
Archive the shift:
shifts/tasks.md → shifts/history/YYYY-MM-DD-{shift}.mdWrite handoff.md:
# Handoff: Afternoon → Night | 2026-02-22
## Completed
- Task 1: API migration plan — recommendation written to memory/projects/example/
- Task 2 steps 1-3: Workspace commits (skills, memory reorg)
## Still In Progress
- Task 2 steps 4-5: Script commits and push (2 steps remaining)
## Blocked (needs user)
- Task 1 step 3: Need pricing confirmation for mor-[REDACTED] paid tier
## Lessons Learned This Shift
- GLM-5 handles git operations well but struggles with multi-file diffs
- Brave search rate limit hit on cycle 4 — added 3-second delay to context.md
## Recommendations for Next Shift
- Finish Task 2 push (quick, 1 cycle)
- Review migration recommendation in memory/projects/example/transition.md
Update state.json: Set status to "completed"
Update daily log: Append shift summary to memory/daily/YYYY-MM-DD.md
Notify user (morning/afternoon only): Brief summary via messaging channel
Name: three-shifts-plan-morning
Schedule: cron 0 6 * * * (America/Chicago)
Model: your-heavy-model (e.g. Claude, GPT-4)
Session: isolated
Message: >
Read the three-shifts skill at skills/three-shifts/SKILL.md.
Execute Phase 1 (Planning) for the MORNING shift (6 AM – 2 PM CST).
Read shifts/handoff.md, shifts/context.md, shifts/state.json, and recent memory files.
Generate the shift plan and present for user approval.
If carryover items exist from last night that were already approved, note them.
After approval, decompose all tasks into atomic GLM-5-sized steps and write to shifts/tasks.md.
Name: three-shifts-plan-afternoon
Schedule: cron 0 14 * * * (America/Chicago)
Model: your-heavy-model (e.g. Claude, GPT-4)
Session: isolated
Message: >
Read the three-shifts skill at skills/three-shifts/SKILL.md.
Execute Phase 1 (Planning) for the AFTERNOON shift (2 PM – 10 PM CST).
Read shifts/handoff.md, shifts/context.md, shifts/state.json, and recent memory files.
Generate the shift plan and present for user approval.
After approval, decompose all tasks into atomic GLM-5-sized steps and write to shifts/tasks.md.
Name: three-shifts-plan-night
Schedule: cron 0 22 * * * (America/Chicago)
Model: your-heavy-model (e.g. Claude, GPT-4)
Session: isolated
Message: >
Read the three-shifts skill at skills/three-shifts/SKILL.md.
Execute Phase 1 (Planning) for the NIGHT shift (10 PM – 6 AM CST).
Read shifts/handoff.md, shifts/context.md, shifts/state.json, and recent memory files.
IMPORTANT: If shifts/tasks.md has carryover items already approved today, auto-approve them
and set state.json nightAutoApproved=true. Do NOT ping the user for already-approved carryover.
Only present new tasks for approval.
After approval (or auto-approve), decompose into atomic steps and write to shifts/tasks.md.
Name: three-shifts-cycle
Schedule: cron */15 * * * * (America/Chicago)
Model: your-light-model (e.g. GLM-5, GPT-4o-mini)
Session: isolated
Message: >
You are a cycle executor for the three-shifts system.
Read skills/three-shifts/SKILL.md Phase 2 (Cycle Execution) for your algorithm.
Then read shifts/state.json — if status is not "executing", reply HEARTBEAT_OK.
If executing: read shifts/tasks.md and shifts/context.md.
Find the first [ ] step, claim it [~], execute it, write result back.
If blocked, mark [!] with reason, move to next [ ] step.
Update state.json and context.md as needed.
Stay focused. One step. Write results. Done.
See references/config.md for:
[!] NEEDS_REVIEW instead of executingtools
Security middleware for all XMTP communications in EverClaw. Enforces guarded client usage with validation, integrity checks, and fail-closed security policies. Integrates approval flows for sensitive operations. Use when integrating XMTP messaging, configuring communication security, or auditing guarded client enforcement.
data-ai
Daily standup engine. Plans tasks 3x daily (6 AM, 2 PM, 10 PM) and delivers them for approval. Execution happens in the main session via direct conversation. Night shifts auto-approve carryover from earlier in the day.
tools
A helpful utility skill for agents
development
Fetch and manage GitHub issues via the API