Manage a .scratch/ directory in the current project for temporary, gitignored files.
Use the harness's file tools for writes and edits, and its shell tool for directory checks and listing. Ask the user for any input that is missing.
Commands
Take the command from what the user typed. Format: /gs-scratch <command> [args]
bootstrap
Set up .scratch/ in the project root.
- Create
.scratch/directory if it doesn't exist:mkdir -p .scratch - Check if
.gitignoreexists at project root- If not, create it with
.scratch/as the only entry - If it exists, read it and check whether
.scratch/or.scratchis already listed - If not listed, append
.scratch/on a new line at the end
- If not, create it with
- Confirm what was done
write <filename>
Write content to .scratch/<filename>.
- Verify
.scratch/exists. If not, run bootstrap first. - Ask the user what content to write if they did not give it.
- Use the harness's file tools to create or overwrite
.scratch/<filename>.
edit <filename>
Edit a file in .scratch/.
- Verify
.scratch/<filename>exists. If not, tell the user. - Read the file.
- Ask the user what changes to make if their request does not say.
- Use the harness's file tools to apply the changes.
list
List files in .scratch/.
- Verify
.scratch/exists. If not, tell the user to run bootstrap. - Run
ls -la .scratch/to show contents.