---
name: reset-9a73a93f3145
description: Reset wiki state to a clean scaffold by scope (wiki / raw / log / checkpoints / all). Useful during development or carefree restarts after a botched setup.
argument-hint: "--scope wiki|raw|log|checkpoints|all"
---

# /reset

> Resets the wiki to a clean scaffold by scope. Designed for development iteration and recovery after a failed setup — not a routine operation.

## Trigger

Manual: `/reset --scope wiki` / `--scope raw` / `--scope log` / `--scope checkpoints` / `--scope all`. Multiple scopes may be combined comma-separated: `--scope wiki,log`.

## Inputs

- `--scope` *(required)*: one of
  - `wiki` — delete every `*.md` under `wiki/<entity>/` and `wiki/outputs/`, plus `wiki/index.md`, `wiki/log.md`, and `wiki/graph/` files. Preserves `.gitkeep` and `wiki/CLAUDE.md`.
  - `raw` — delete every entry under `raw/papers/`, `raw/discovered/`, `raw/tmp/`, `raw/notes/`, `raw/web/` (except `.gitkeep`).
  - `log` — reset `wiki/log.md` to the empty header.
  - `checkpoints` — clear batch state via `research_wiki.py checkpoint-clear`.
  - `all` — every scope above.

## Outputs

- Cleared / reset files on disk.
- Console summary of deleted files and reset files.

## Wiki Interaction

### Reads
- All `wiki/<entity>/*.md` (to enumerate the deletion plan).
- `raw/<sub>/*` (to enumerate raw deletions).

### Writes
- Deletes `wiki/<entity>/*.md` (preserves `.gitkeep`).
- Rewrites `wiki/index.md`, `wiki/graph/*`, optionally `wiki/log.md`.
- Deletes `raw/<sub>/*` (except `.gitkeep`).

## Workflow

**Pre-conditions**: working directory contains `wiki/`, `tools/`. Set `WIKI_ROOT=wiki/`.

### Step 1: Build the deletion plan (dry-run)

```bash
python3 tools/reset_wiki.py --scope <scope>
```

This prints a JSON plan listing every file that would be deleted or reset, **without modifying anything**. Display the plan to the user grouped by scope (wiki entity dirs, raw subdirs, log, checkpoints).

### Step 2: Confirm with the user

Print the plan summary and ask for explicit confirmation:

```
About to delete N files and reset M files. Continue? [y/N]
```

If the user says no, exit. **Never proceed without explicit approval** — `/reset` is destructive and `raw/` deletions are not tracked by git.

### Step 3: Execute

```bash
python3 tools/reset_wiki.py --scope <scope> --yes
```

The tool prints a JSON status report (`{deleted_files, reset_files}`).

### Step 4: Log (unless `log` scope was reset)

If the executed scope did not include `log`, append a log entry so future sessions can see the reset happened:

```bash
python3 tools/research_wiki.py log wiki/ "reset | scope: <scope>"
```

### Step 5: Report

Print the result and suggest next steps:

```
## Reset complete — scope: <scope>

Deleted: N files
Reset:   M files

Next steps:
- /init       — bootstrap wiki from raw/
- /prefill    — seed foundational background
- /ingest     — add a single source manually
```

## Constraints

- **Confirm before destructive action**: never call `--yes` without showing the plan and asking the user.
- **Preserves**: `.gitkeep` placeholders, `wiki/CLAUDE.md`, `.claude/` (skills are never touched).
- **`raw/` deletes are irreversible**: PDFs are not in git history. Warn the user before executing `raw` or `all` scopes.
- **`/reset` does not touch `tools/`, `mcp-servers/`, `i18n/`, `.env`, or git state.**
- **Scope is required**: no default action (`/reset` with no flag prompts for scope rather than guessing).

## Error Handling

- **Unknown scope**: print valid scopes and exit nonzero.
- **Missing wiki directory**: report and suggest running `/init`.
- **`checkpoint-clear` failure**: log a warning but do not fail other scopes.

## Dependencies

### Tools (via Bash)
- `python3 tools/reset_wiki.py --scope <scope> [--yes] [--project-root .]` — deterministic destructive helper
- `python3 tools/research_wiki.py log wiki/ "<message>"` — append log
- `reset_wiki.py` clears `wiki/.checkpoints/*.json` directly for `checkpoints` scope (no CLI dispatch — the `checkpoint-clear` subcommand requires a specific `task_id`, while `/reset --scope checkpoints` semantics is "clear everything")


---
Source attribution: skyllwt
Original project: https://github.com/skyllwt/OmegaWiki/blob/f676a037d498563b41dc27fdc884eda3a047c030/.claude/skills/reset/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2026 OmegaWiki Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: skyllwt
Original project: https://github.com/skyllwt/OmegaWiki/blob/f676a037d498563b41dc27fdc884eda3a047c030/.claude/skills/reset/SKILL.md
Attribution basis: Source repository record

Fields of work: Sales
Roles: Customer Success Manager, Sales Development Rep (SDR)
Specialties: Specialty not specified
Tools: Python3
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: d61e91110fcaa52d8aa06d6064afd2c55d2d5fd776917c1005ddfa2143d0ac5b
