# Mochi Replan

INTERNAL pet queue, partial adjustment of the pet's behavior schedule.

- Repository: https://github.com/kirodotdev/KiroCrew (4711 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add kirodotdev/KiroCrew --skill mochi-replan -g -a claude-code -y`
Codex: `npx skills add kirodotdev/KiroCrew --skill mochi-replan -g -a codex -y`
Cursor: `npx skills add kirodotdev/KiroCrew --skill mochi-replan -g -a cursor -y`
Gemini CLI: `npx skills add kirodotdev/KiroCrew --skill mochi-replan -g -a gemini-cli -y`

## Description

INTERNAL pet queue, partial adjustment of the pet's behavior schedule. NOT for user task or calendar planning.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# @mochi-replan, Partial Queue Adjustment

Adjust the current plan without starting from scratch. Faster and cheaper than @mochi-plan.

## Context to Read

1. `get_plan()`, the whole current queue, including tasks already done (`done: true`) in the last 2 hours; skip those when deciding what is still scheduled
2. `get_watchlist()`, active watch items (check for overdue items that need scheduling)
3. `read_mochi_file({ which: "activity" })`, recent activity (last 5-10 entries)
4. The `planner_notes` from the queue, contains memory from the last full plan (and `silent_until` when 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 position

- **User sent a message referencing the plan** (activity shows recent chat):
  → Check if any queued tasks conflict with what the user said
  → Adjust accordingly

- **Watched 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 on `nextCheckAfter`), not scheduled as queue tasks. Do NOT schedule check_watching tasks.

- **Quiet requested** (`planner_notes.silent_until` is set and in the future):
  → Remove upcoming notify tasks before that time, keep only moves
  → When `silent_until` is null or past, nothing to remove

- **General 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:

The rest: https://github.com/kirodotdev/KiroCrew/blob/HEAD/src/kiro_crew/apps/builtins/mochi/agents/skills/mochi-replan/SKILL.md
