@joshski/dust 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,4 +22,4 @@ export interface CreateIdeaTransitionTaskResult {
22
22
  export declare function createRefineIdeaTask(fileSystem: FileSystem, dustPath: string, ideaSlug: string, description?: string): Promise<CreateIdeaTransitionTaskResult>;
23
23
  export declare function createTaskFromIdea(fileSystem: FileSystem, dustPath: string, ideaSlug: string, description?: string): Promise<CreateIdeaTransitionTaskResult>;
24
24
  export declare function createShelveIdeaTask(fileSystem: FileSystem, dustPath: string, ideaSlug: string, description?: string): Promise<CreateIdeaTransitionTaskResult>;
25
- export declare function createCaptureIdeaTask(fileSystem: FileSystem, dustPath: string, description: string): Promise<CreateIdeaTransitionTaskResult>;
25
+ export declare function createCaptureIdeaTask(fileSystem: FileSystem, dustPath: string, title: string, description: string): Promise<CreateIdeaTransitionTaskResult>;
@@ -83,16 +83,21 @@ async function createTaskFromIdea(fileSystem, dustPath, ideaSlug, description) {
83
83
  async function createShelveIdeaTask(fileSystem, dustPath, ideaSlug, description) {
84
84
  return createIdeaTask(fileSystem, dustPath, "Shelve Idea: ", ideaSlug, (ideaTitle) => `Archive this idea and remove it from the active backlog. See [${ideaTitle}](../ideas/${ideaSlug}.md).`, ["Idea file is deleted", "Rationale is recorded in the commit message"], description);
85
85
  }
86
- async function createCaptureIdeaTask(fileSystem, dustPath, description) {
86
+ async function createCaptureIdeaTask(fileSystem, dustPath, title, description) {
87
+ if (!title || !title.trim()) {
88
+ throw new Error("title is required and must not be whitespace-only");
89
+ }
87
90
  if (!description || !description.trim()) {
88
91
  throw new Error("description is required and must not be whitespace-only");
89
92
  }
90
- const taskTitle = "Capture Idea";
93
+ const taskTitle = `Add Idea: ${title}`;
91
94
  const filename = titleToFilename(taskTitle);
92
95
  const filePath = `${dustPath}/tasks/${filename}`;
93
- const content = renderTask(taskTitle, "Research and capture a new idea in the dust backlog.", [
94
- "A new idea file is created in .dust/ideas/",
95
- "Idea has a clear title and description"
96
+ const ideaFilename = titleToFilename(title);
97
+ const ideaPath = `.dust/ideas/${ideaFilename}`;
98
+ const content = renderTask(taskTitle, `Create a new idea file at \`${ideaPath}\` with the title "${title}" and the following description:`, [
99
+ `Idea file exists at ${ideaPath}`,
100
+ `Idea file has an H1 title matching "${title}"`
96
101
  ], description);
97
102
  await fileSystem.writeFile(filePath, content);
98
103
  return { filePath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joshski/dust",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "Flow state for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {