Skip to main content
Glama

aide_cleanup

Remove a closed module's pipeline ephemerals (plan.aide, todo.aide, brief.aide) only when all plan and todo checkboxes are complete; unchecked items block removal, preserving code and intent specs.

Instructions

Remove a module's pipeline ephemerals (plan.aide, todo.aide, brief.aide) once that module's cycle has closed, leaving the code and the intent specs as the durable record. It never removes, rewrites or reads anything else: intent specs, research specs, code, and .aide/session.aide are all out of reach.

Where plan.aide exists, it refuses unless every plan checkbox is checked and any todo.aide present is fully checked; a missing todo.aide does not block. Where there is no plan.aide, it removes a todo.aide that is fully checked, and refuses a brief.aide (which is removed only together with its plan), a todo.aide with no checkboxes, or a folder with no ephemerals at all. A refusal lists each unchecked item with its file and line, and nothing is removed. By default a plan.aide with no checkboxes is refused; passing allowEmptyPlan: true lets such a plan pass, overrides nothing else, and has no effect where there is no plan.aide.

Call it directly, because the real call is already safe. dryRun is an optional preview for inspection only and is never a required step before the real call.

This is the cross-platform replacement for a shell delete, so it can be permitted by name.

Input Schema

NameRequiredDescriptionDefault
pathYesThe module directory whose ephemerals to remove, relative to the project root
dryRunNoOptional. Removes nothing and only reports what a real call would remove. Agents closing a module omit it.
allowEmptyPlanNoOptional, off by default. Lets a plan.aide with no checkboxes pass. Overrides nothing else, and has no effect where there is no plan.aide.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.1

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses exactly what is destroyed versus protected, the refusal conditions (unchecked items, empty/unchecked todo.aide, brief.aide without plan), the refusal reporting format (each unchecked item with file and line, nothing removed), and the allowEmptyPlan exception. This is unusually rich for a destructive tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is dense but well front-loaded, opening with the core action before enumerating edge cases. Some phrasing about allowEmptyPlan is duplicated between description and schema, but overall every sentence carries decision-relevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive cleanup tool with no annotations and no output schema, the description covers all the behavioral ground an agent needs: scope, protected files, refusal conditions, error reporting, and the two optional flags. Nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all three parameters are already documented in the schema with nearly identical wording to the description (allowEmptyPlan's 'overrides nothing else' phrasing appears in both). The description adds little syntax or format detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource — removing a module's pipeline ephemerals (plan.aide, todo.aide, brief.aide) after the cycle closes — and explicitly bounds it by naming everything it never touches (intent specs, research specs, code, session.aide). An agent can distinguish this cleanup tool from siblings like aide_validate or aide_inspect without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear use conditions (only once a module's cycle has closed, only when checks are complete) and explicit invocation guidance ('Call it directly... dryRun... is never a required step'). It does not name sibling alternatives for the cleanup decision, but the when-to-use context is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.