"INTERNAL pet queue — partial adjustment of the pet's behavior schedule. NOT for user task or calendar planning."
Install
npx skillscat add kirodotdev/kirocrew/mochi-replan Install via the SkillsCat registry.
@mochi-replan — Partial Queue Adjustment
Adjust the current plan without starting from scratch. Faster and cheaper than @mochi-plan.
Context to Read
get_plan()— the whole current queue, including tasks already done (done: true) in the last 2 hours; skip those when deciding what is still scheduledget_watchlist()— active watch items (check for overdue items that need scheduling)read_mochi_file({ which: "activity" })— recent activity (last 5-10 entries)- The
planner_notesfrom the queue — contains memory from the last full plan (andsilent_untilwhen the user asked for quiet)
Do NOT re-read the calendar. That is only for mochi-plan.
Two Modes
Automatic Mode (triggered by poller when needs_replan is true)
Detect what changed and adjust:
User dragged the pet (activity shows drag/interrupted_by_user):
→ Remove the next scheduled move task
→ Add a playful reaction:{ type: "notify", action: { summary: "Hey! I was going somewhere!" }, category: "reaction" }
→ Optionally add a new move back to a natural positionUser sent a message referencing the plan (activity shows recent chat):
→ Check if any queued tasks conflict with what the user said
→ Adjust accordinglyWatched item status changed:
→ If a watch result notification came in (activity log), update planner_notes.watching_last_status
→ Note: watch checks are driven by the queue poller (based onnextCheckAfter), not scheduled as queue tasks. Do NOT schedule check_watching tasks.Quiet requested (
planner_notes.silent_untilis set and in the future):
→ Remove upcoming notify tasks before that time, keep only moves
→ Whensilent_untilis null or past, nothing to removeGeneral drift (time passed, some tasks executed):
→ Rebalance remaining tasks if timing feels off
Explicit Mode (triggered by chat agent with user request)
The chat agent will provide context about what the user wants. Common requests:
- "Remind me at 5pm" → Chat agent handles this directly via
update_watchlist(see prompt.md Watch List section); no queue task is needed. Replan is only needed if the chat agent setsneeds_replan: true. - "Watch this page" → Chat agent handles this directly via
update_watchlist. The queue poller will handle periodic checks automatically based onnextCheckAfter. - "Be quiet for a while" → Remove upcoming notify tasks, keep only moves
- "Come here" → This should use
perform_pet_actioninstead (instant), but if it comes through replan, add an immediate move - "Stop moving" → Remove upcoming move tasks
How to Apply Changes
Use update_plan with incremental changes:
update_plan({
tasks_to_add: [{ id: "r1", type: "notify", ... }],
tasks_to_remove: ["t3"], // remove by id
tasks_to_modify: [{ id: "t4", execute_after: "<new time>" }],
needs_replan: false, // ALWAYS set this to false when replan completes
narrative: "<updated situation description>"
})Important Rules
- ALWAYS set
needs_replan: falsewhen done — otherwise the next poll cycle will replan again - Do NOT call perform_pet_action() or any execution tools — all actions go through update_plan queue changes
- Keep changes minimal — only adjust what needs adjusting
planner_notesis REPLACED, not merged: anupdate_plancarryingplanner_notesoverwrites the whole object. Send the full object fromget_plan()with your change applied, or omitplanner_notesentirely. Sending only{ watching_last_status: ... }erases every other key.- No duplicate notifications: Before adding a notify task with
pushToChat: true, check the activity log and existing done tasks. If the same message (or substantially similar content) was already pushed to chat, do NOT add it again. The user sees chat history — repeating the same notification is annoying.