AgentSkillsCN

Reset

清空所有 AI-DLC 状态,重新开始。

SKILL.md
--- frontmatter
description: Clear all AI-DLC state and start fresh
disable-model-invocation: true

Name

ai-dlc:reset - Clear AI-DLC state and start fresh.

Synopsis

code
/reset

Description

User-facing command - Run this to abandon current task or start fresh.

Clears all AI-DLC state for the current branch. Use this to:

  • Start fresh on a new task
  • Clean up after completing a task
  • Abandon a task that's no longer needed

This only clears AI-DLC state. It does not:

  • Undo code changes
  • Delete branches
  • Revert commits

The work you did is preserved in git. Only the AI-DLC workflow state is cleared.

Implementation

Step 1: Confirm (Optional)

If the task is not complete, warn:

bash
# Intent-level state is on current branch (intent branch)
STATE=$(han keep load iteration.json --quiet || echo "{}")

# If status is not "complete", warn the user
# "Warning: Task is not complete. Current hat: $HAT"
# "Are you sure you want to clear all state?"

Step 1b: Cleanup Team (Agent Teams)

If teamName exists in iteration.json and CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is set:

bash
TEAM_NAME=$(echo "$STATE" | han parse json teamName -r --default "")
AGENT_TEAMS_ENABLED="${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-}"

If TEAM_NAME is not empty and AGENT_TEAMS_ENABLED is set:

  1. Send shutdown requests to all active teammates:
javascript
// Read team config to find active members
// For each active teammate:
SendMessage({
  type: "shutdown_request",
  recipient: teammateName,
  content: "AI-DLC reset requested. Shutting down team."
})
  1. Wait for shutdown confirmations

  2. Delete the team:

javascript
TeamDelete()

Without Agent Teams: Skip this step entirely. No team exists to clean up.

Step 2: Delete All AI-DLC Keys

bash
# Clear intent-level state from current branch (intent branch)
han keep delete iteration.json
han keep delete intent.md
han keep delete completion-criteria.md
han keep delete current-plan.md
han keep delete intent-slug

# Clear unit-level state from current branch
han keep delete scratchpad.md
han keep delete blockers.md
han keep delete next-prompt.md

Step 3: Confirm

Output:

code
AI-DLC state cleared.

All iteration data, intent, criteria, and notes have been removed.

To start a new task, run `/elaborate`.

What Gets Cleared

Intent-Level State (from intent branch)

KeyPurpose
iteration.jsonHat, iteration count, workflow, status
intent.mdWhat we're building
completion-criteria.mdHow we know it's done
current-plan.mdPlan for current iteration
intent-slugSlug identifier

Unit-Level State (from current branch)

KeyPurpose
scratchpad.mdLearnings and notes
blockers.mdDocumented blockers
next-prompt.mdContinuation prompt