skills/reset/SKILL.md
Reset Nazgul state to a clean slate. Archives current state and recreates from templates. Use when Nazgul gets into a corrupted or confusing state.
npx skillsauth add OrodruinLabs/nazgul nazgul:resetInstall 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.
/nazgul:reset — Archive current state and reset to clean slate (with confirmation)/nazgul:reset --hard — Reset immediately without confirmation prompt/nazgul:reset --preserve-context — Reset but keep the context/ directory intact$ARGUMENTS
test -f nazgul/config.json && echo "YES" || echo "NO"ls nazgul/tasks/TASK-*.md 2>/dev/null | wc -l | tr -d ' 'ls nazgul/checkpoints/iteration-*.json 2>/dev/null | wc -l | tr -d ' 'Pre-load: Run ToolSearch with query select:AskUserQuestion to load the interactive prompt tool (deferred by default). Do this BEFORE any step that uses AskUserQuestion.
Reset Nazgul state to a clean slate by archiving existing state and recreating from templates.
If config does not exist (shows "NO"):
/nazgul:init to set up."Check $ARGUMENTS for flags:
--hard — Skip confirmation, proceed immediately--preserve-context — Keep the nazgul/context/ directory intact (architecture map, style conventions, test strategy, etc.)Unless --hard flag is present, show the summary, then use AskUserQuestion to confirm:
First, display what will be archived:
Nazgul Reset
═══════════════════════════════════════
This will archive and reset the following:
- Plan: nazgul/plan.md
- Tasks: [N] task file(s)
- Checkpoints: [N] checkpoint file(s)
- Reviews: nazgul/reviews/
- Docs: nazgul/docs/
- Logs: nazgul/logs/
Context directory: [WILL BE RESET | WILL BE PRESERVED (--preserve-context)]
Everything will be archived to nazgul/archive/[timestamp]/ before deletion.
Then use AskUserQuestion:
If Abort: stop immediately.
Generate a timestamp-based archive directory:
ARCHIVE_DIR="nazgul/archive/$(date +%Y-%m-%d-%H%M%S)"
mkdir -p "$ARCHIVE_DIR"
Move the following into the archive directory (if they exist):
nazgul/plan.md → $ARCHIVE_DIR/plan.mdnazgul/tasks/ → $ARCHIVE_DIR/tasks/nazgul/checkpoints/ → $ARCHIVE_DIR/checkpoints/nazgul/reviews/ → $ARCHIVE_DIR/reviews/nazgul/docs/ → $ARCHIVE_DIR/docs/nazgul/logs/ → $ARCHIVE_DIR/logs/If --preserve-context is NOT set:
8. nazgul/context/ → $ARCHIVE_DIR/context/
Use mv for each item. Skip items that do not exist.
nazgul/config.json and extract project.* fields (project name, language, framework, test command, etc.)nazgul/config.json with:
project.* fields restoredpaused: falsecurrent_iteration: 0objective: nullobjectives_history array (the old history is in the archive)Use jq for all JSON manipulation:
# Extract project fields from current config
PROJECT=$(jq '.project' nazgul/config.json)
# After writing fresh config, restore project fields
jq --argjson project "$PROJECT" '.project = $project' nazgul/config.json > nazgul/config.json.tmp && mv nazgul/config.json.tmp nazgul/config.json
Ensure the following empty directories exist for the next run:
mkdir -p nazgul/tasks
mkdir -p nazgul/checkpoints
mkdir -p nazgul/reviews
mkdir -p nazgul/docs
mkdir -p nazgul/logs
If --preserve-context was NOT set:
mkdir -p nazgul/context
Nazgul Reset Complete
═══════════════════════════════════════
Archived to: nazgul/archive/[timestamp]/
- Plan: [archived | not found]
- Tasks: [N] file(s) archived
- Checkpoints: [N] file(s) archived
- Reviews: [archived | not found]
- Docs: [archived | not found]
- Logs: [archived | not found]
- Context: [archived | PRESERVED]
Config reset with project settings preserved.
Next steps:
- /nazgul:start Start a fresh run
- /nazgul:start "objective" Start with a specific objective
- /nazgul:status Verify clean state
testing
Human acceptance testing — structured verification that work actually works. Run standalone or integrated in HITL review cycle.
devops
Task lifecycle management — skip, unblock, add, prioritize, info, and list tasks. Use when you need to manage individual tasks in the Nazgul pipeline.
development
Check the current state of a Nazgul autonomous loop. Use when asked about loop progress, task status, iteration count, review board status, or how the Nazgul loop is going.
development
Start or resume a Nazgul autonomous development loop. Use when user says "start nazgul", "run nazgul", "begin development", "resume the loop", or passes an objective for new work. Auto-detects project state — no arguments needed.