Make artifact naming destination-driven
This commit is contained in:
@@ -50,20 +50,27 @@ Done when the user has reached an explicit verdict or stated that the prototype
|
||||
Commit the complete prototype to a throwaway branch outside main.
|
||||
The branch is the primary source.
|
||||
|
||||
Resolve the AI artifacts vault through `$(xdg-user-dir DOCUMENTS)/ai-artifacts` and read its `AGENTS.md` before writing.
|
||||
Use the lowercase basename of the current working directory as the project.
|
||||
Resolve the artifact destination before naming the file.
|
||||
When the caller provides a destination directory, use it exactly.
|
||||
Otherwise, default to `$(xdg-user-dir DOCUMENTS)/ai-artifacts/projects/<project>` when the AI artifacts vault is available, where `<project>` is the lowercase basename of the current working directory.
|
||||
If that vault is unavailable, fall back to `./docs` in the current project.
|
||||
Create the destination directory only when needed.
|
||||
|
||||
When the caller provides an allocated filename and `parent`, use them exactly and do not advance `.counter`.
|
||||
Before choosing a filename, read the destination's `AGENTS.md`.
|
||||
Use the naming convention declared there, or infer it from nearby artifacts when the file delegates naming to local context.
|
||||
Do not assume a counter, numeric prefix, slug shape, or artifact-type suffix unless the destination convention requires it.
|
||||
If no convention can be determined, choose the least surprising lowercase descriptive Markdown filename and state that the destination did not define a naming convention.
|
||||
|
||||
When the caller provides an allocated filename and `parent`, use them exactly and do not advance any counter.
|
||||
Create only the Prototype artifact and leave the parent artifact unchanged.
|
||||
Otherwise, allocate the next vault-sequence identifier and name the artifact `<NNN>-<project>-<subject-slug>-prototype.md`.
|
||||
Include `parent` only when an earlier artifact directly caused the prototype.
|
||||
Otherwise, allocate any identifier required by the destination convention and include `parent` only when an earlier artifact directly caused the prototype.
|
||||
|
||||
The Prototype artifact links the throwaway branch and preserves the question, run instructions, verdict, and branch-appropriate evidence:
|
||||
|
||||
- UI evidence uses screenshots.
|
||||
- Logic evidence uses useful code snippets and, where needed, a short interaction transcript.
|
||||
|
||||
Done when the complete prototype is committed outside main and exactly one Prototype artifact preserves the result according to the vault convention.
|
||||
Done when the complete prototype is committed outside main and exactly one Prototype artifact preserves the result according to the destination convention.
|
||||
|
||||
## 4. Fold in the decision when permitted
|
||||
|
||||
|
||||
Reference in New Issue
Block a user