Project Delete
When to Use
When a project needs to be permanently removed from the repo and sidebar.
Context Boundary
Read only the Phase document and sidebar configuration.
Prerequisites
- Confirm the project exists on disk and in the sidebar before proceeding.
Relationship to Project_Complete
Project_Delete permanently removes a project. It does not run through the Complete lifecycle. Use it only for projects that were created in error or are no longer needed. For completed projects, use Project_Complete instead.
Procedure
- Identify the project. If the user hasn’t specified, prompt for the department and project name.
- Locate the project on disk (
{Dept}/Projects/{Project}/) and in the sidebar (.internal/astro.config.mjs). - Confirm deletion. Tell the user what will be trashed: the project directory and its sidebar entries. Show the exact confirmation string:
{Dept} {Project}. Ask the user to type it exactly. - Wait for user response. Do not proceed until they respond.
- Validate. If the response doesn’t match
{Dept} {Project}exactly, tell them it’s incorrect and wait again. Repeat until it matches. - Trash the project directory using uvilo-trash:
trash_fileortrash_directoryon{Dept}/Projects/{Project}/. - Remove the project’s sidebar group from
.internal/astro.config.mjs. Delete the collapsed project subgroup (and its parent Projects subgroup entry if it’s now empty). - Build to verify:
cd .internal && npm run build - Commit and push:
- Report what was trashed and removed from the sidebar.
Rules
- Never use
rm— always use uvilo-trash. - The confirmation string must match exactly (case-sensitive, single space between dept and project name).
- Do not skip the confirmation step, even if the user seems certain.