aide_scaffold
Updated
Source commit
249106a
Cite as
The single way to create an AIDE file. It owns the naming rules, so agents never pick a file name themselves.
When to call it
Whenever a new spec, research file, plan, todo list or the session record is needed.
Parameters
| Name | Required | Meaning |
|---|---|---|
directory | Yes | The folder to create the file in. For the project root intent spec, pass .aide or .. |
type | Yes | intent, research, both (a research and intent pair), plan, todo or session. |
Naming rules it applies
- An intent spec is
.aide, orintent.aidewhen aresearch.aidesits beside it. Creating aresearch.aiderenames an existing.aidetointent.aide. - The project root intent spec is always
.aide/intent.aide. An old bare.aide/.aidewith nointent.aidebeside it is renamed, content kept. - The session record is always
.aide/session.aide, whatever directory is passed. - A plan is refused in a folder with no intent spec; a
research.aidealone does not count. Nothing is created.
What it returns
One line per action: created, renamed, skipped or refused, naming the file.
Guarantees
- It never overwrites. A file that already exists, filled or empty, is reported as skipped. Remove it first with
aide_cleanupto replace it. - New files start at their starting value: an intent spec with
alignment: unreviewed, a plan or todo list withstatus: proposed.