astrocode-workflow 0.0.2 → 0.0.5

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.
@@ -106,8 +106,8 @@ export function createAstroAgents(opts) {
106
106
  verify: "AstroVerify",
107
107
  close: "AstroClose"
108
108
  },
109
- librarian_name: "AstroLibrarian",
110
- explore_name: "AstroExplore",
109
+ librarian_name: "Librarian",
110
+ explore_name: "Explore",
111
111
  agent_variant_overrides: {}
112
112
  };
113
113
  }
@@ -138,8 +138,8 @@ const AgentsSchema = z.object({
138
138
  })
139
139
  .partial()
140
140
  .default({}),
141
- librarian_name: z.string().default("Astro — Librarian"),
142
- explore_name: z.string().default("Astro — Explore"),
141
+ librarian_name: z.string().default("Librarian"),
142
+ explore_name: z.string().default("Explore"),
143
143
  agent_variant_overrides: z
144
144
  .record(z.string(), z.object({
145
145
  variant: z.string().optional(),
@@ -13,11 +13,20 @@ export function createAstroStoryQueueTool(opts) {
13
13
  priority: tool.schema.number().int().default(0),
14
14
  },
15
15
  execute: async ({ title, body_md, epic_key, priority }) => {
16
- const now = nowISO();
16
+ // If the story seems like a large implementation, convert to planning story
17
+ const isLargeImplementation = title.toLowerCase().includes('implement') &&
18
+ (body_md?.length || 0) > 200 &&
19
+ (body_md?.toLowerCase().includes('full') || body_md?.toLowerCase().includes('complete'));
20
+ let finalTitle = title;
21
+ let finalBody = body_md;
22
+ if (isLargeImplementation) {
23
+ finalTitle = `Plan and decompose: ${title}`;
24
+ finalBody = `Analyze the requirements in the provided spec and break down "${title}" into 50-200 detailed, granular implementation stories. Each story should be focused on a specific, implementable task with clear acceptance criteria.\n\nOriginal description: ${body_md}`;
25
+ }
17
26
  const story_key = withTx(db, () => {
18
- return insertStory(db, { title, body_md, epic_key: epic_key ?? null, priority: priority ?? 0, state: 'queued' });
27
+ return insertStory(db, { title: finalTitle, body_md: finalBody, epic_key: epic_key ?? null, priority: priority ?? 0, state: 'queued' });
19
28
  });
20
- return `✅ Queued story ${story_key}: ${title}`;
29
+ return `✅ Queued story ${story_key}: ${finalTitle}`;
21
30
  },
22
31
  });
23
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astrocode-workflow",
3
- "version": "0.0.2",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -134,8 +134,8 @@ export function createAstroAgents(opts: {
134
134
  verify: "AstroVerify",
135
135
  close: "AstroClose"
136
136
  },
137
- librarian_name: "AstroLibrarian",
138
- explore_name: "AstroExplore",
137
+ librarian_name: "Librarian",
138
+ explore_name: "Explore",
139
139
  agent_variant_overrides: {}
140
140
  };
141
141
  }
@@ -164,8 +164,8 @@ const AgentsSchema = z.object({
164
164
  .partial()
165
165
  .default({}),
166
166
 
167
- librarian_name: z.string().default("Astro — Librarian"),
168
- explore_name: z.string().default("Astro — Explore"),
167
+ librarian_name: z.string().default("Librarian"),
168
+ explore_name: z.string().default("Explore"),
169
169
 
170
170
  agent_variant_overrides: z
171
171
  .record(
@@ -20,12 +20,24 @@ export function createAstroStoryQueueTool(opts: { ctx: any; config: AstrocodeCon
20
20
  priority: tool.schema.number().int().default(0),
21
21
  },
22
22
  execute: async ({ title, body_md, epic_key, priority }) => {
23
- const now = nowISO();
23
+ // If the story seems like a large implementation, convert to planning story
24
+ const isLargeImplementation = title.toLowerCase().includes('implement') &&
25
+ (body_md?.length || 0) > 200 &&
26
+ (body_md?.toLowerCase().includes('full') || body_md?.toLowerCase().includes('complete'));
27
+
28
+ let finalTitle = title;
29
+ let finalBody = body_md;
30
+
31
+ if (isLargeImplementation) {
32
+ finalTitle = `Plan and decompose: ${title}`;
33
+ finalBody = `Analyze the requirements in the provided spec and break down "${title}" into 50-200 detailed, granular implementation stories. Each story should be focused on a specific, implementable task with clear acceptance criteria.\n\nOriginal description: ${body_md}`;
34
+ }
35
+
24
36
  const story_key = withTx(db, () => {
25
- return insertStory(db, { title, body_md, epic_key: epic_key ?? null, priority: priority ?? 0, state: 'queued' });
37
+ return insertStory(db, { title: finalTitle, body_md: finalBody, epic_key: epic_key ?? null, priority: priority ?? 0, state: 'queued' });
26
38
  });
27
39
 
28
- return `✅ Queued story ${story_key}: ${title}`;
40
+ return `✅ Queued story ${story_key}: ${finalTitle}`;
29
41
  },
30
42
  });
31
43
  }