| name | aiwf-rename |
| description | Use when the user wants to rename an entity's slug (the human-readable suffix in the file/dir name). Runs `aiwf rename` so the id is preserved and references stay valid. |
aiwf-rename
The aiwf rename verb changes the slug portion of an entity's path while preserving the id. References to the entity (which use the id) keep working.
A slug set this way is durable. It no longer matches the one the title would derive, so a later aiwf retitle preserves it rather than re-deriving over it — which is what makes this the right verb for an entity whose descriptive title makes an unwieldy path.
Looking to change a title? For changing an entity's title (the prose label, distinct from the slug), use aiwf retitle <id> <new-title> — that is the dedicated verb for title mutations. This skill covers slug renames only. (The two verbs stay separate by design — single-mutation rule keeps reasoning local.)
When to use
The user wants the file or directory name to read better but the entity itself isn't changing identity. Examples: a milestone was named M-003-things and they want it to be M-003-acceptance-criteria.
What to run
aiwf rename <id> <new-slug>
aiwf normalizes the new slug into kebab-case (lowercases, ASCII-only, runs of non-alphanumerics collapse into single hyphens, trailing hyphens trimmed). "Acceptance Criteria!" becomes acceptance-criteria. The verb refuses when normalization yields the empty string. A slug identical to the current one is not a refusal: there is nothing to rename, so it reports that at exit 0 and commits nothing.
What aiwf does
- Looks up the entity by id, computes the new path (
<dir>/<id>-<new-slug>.md or <dir>/<id>-<new-slug>/).
git mv the file or directory to the new path.
- Commits with trailers
aiwf-verb: rename, aiwf-entity: <id>, aiwf-actor: <actor>.
The frontmatter id does not change. The frontmatter title does not change either; if the user wants the displayed title updated too, edit it separately.
Don't
- Don't
git mv by hand — you'll skip the trailer and aiwf history won't show the rename.
- Don't try to rename across kinds (e.g., turn a gap into an epic). That's a different operation; create a new entity and link via
addressed_by or relates_to.
- Don't change the id portion of the slug. Use
aiwf reallocate for that.