Remove all generated context artifacts from your project. Use this to reset your context files and start fresh.
stamp context clean [path] [options][path](optional) – Directory to clean. Defaults to the current working directory. Paths can be relative (./src) or absolute.
Default (dry run): Shows what would be removed without actually deleting anything. Safe way to preview the cleanup.
With --all --yes: Deletes all context artifacts. Both flags are required to prevent accidental deletions.
| Option | Description |
|---|---|
--all |
Include all context files in the deletion operation |
--yes |
Confirm deletion (required with --all) |
--quiet |
-q |
--help, -h |
Show help message |
Removes:
context_main.json– Main index file with folder metadata**/context.json– All folder context files (recursively, JSON format)**/context.toon– All folder TOON format bundles**/context_*.toon– TOON format variants (e.g.context_main.toon).logicstamp/– Cache directory (if present, automatically included)
Automatically detects and includes the .logicstamp/ directory if it exists. No separate flag needed.
# Show what would be removed without deleting
stamp context cleanOutput:
🧹 This will remove:
- context_main.json
- src/components/context.json
- src/hooks/context.json
- src/ui/context.json
- .logicstamp/
💡 Run with --all --yes to confirm and delete these files.
# Delete all context files
stamp context clean --all --yesOutput:
🧹 This will remove:
- context_main.json
- src/components/context.json
- src/hooks/context.json
- src/ui/context.json
- .logicstamp/
🗑️ Removing files...
✓ Removed context_main.json
✓ Removed src/components/context.json
✓ Removed src/hooks/context.json
✓ Removed src/ui/context.json
✓ Removed .logicstamp/
✅ Cleaned 4 file(s) and 1 directory
# Clean context files in a specific directory
stamp context clean ./src --all --yes
# Suppress verbose output (quiet mode)
stamp context clean --all --yes --quiet# When no context artifacts are found
stamp context cleanOutput:
✅ No context artifacts found to clean
- Dry run by default – Shows what would be removed without deleting anything unless both
--alland--yesflags are provided - Requires both flags – Both
--alland--yesmust be specified to delete files, preventing accidental deletions - Ignores build directories – Automatically ignores
node_modules/,dist/,build/, and.next/when searching for context files
# Clean all context files
stamp context clean --all --yes
# Generate fresh context
stamp context# Remove context files that might conflict
stamp context clean --all --yes
# Switch branch and regenerate
git checkout feature-branch
stamp context# Generate context to custom output directory
stamp context --out ./output
# Later, clean that directory
stamp context clean ./output --all --yesThe clean command works well with other LogicStamp commands:
# Clean → Generate → Validate workflow
stamp context clean --all --yes
stamp context
stamp context validate# Clean → Generate → Compare workflow
stamp context clean --all --yes
stamp context
stamp context compare- Safe by default – Requires explicit confirmation (
--all --yes) to delete files - Files are searched recursively but build directories (
node_modules,dist,build,.next) are automatically ignored - The
.logicstamp/directory is automatically included if it exists (no separate flag needed) - Exit code is
0on success (whether files were found or not)
stamp context– Generate context filesstamp context compare– Detect drift in context filesstamp context validate– Validate context files