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.
- package/dist/agents/registry.js +2 -2
- package/dist/config/schema.js +2 -2
- package/dist/tools/story.js +12 -3
- package/package.json +1 -1
- package/src/agents/registry.ts +2 -2
- package/src/config/schema.ts +2 -2
- package/src/tools/story.ts +15 -3
package/dist/agents/registry.js
CHANGED
|
@@ -106,8 +106,8 @@ export function createAstroAgents(opts) {
|
|
|
106
106
|
verify: "AstroVerify",
|
|
107
107
|
close: "AstroClose"
|
|
108
108
|
},
|
|
109
|
-
librarian_name: "
|
|
110
|
-
explore_name: "
|
|
109
|
+
librarian_name: "Librarian",
|
|
110
|
+
explore_name: "Explore",
|
|
111
111
|
agent_variant_overrides: {}
|
|
112
112
|
};
|
|
113
113
|
}
|
package/dist/config/schema.js
CHANGED
|
@@ -138,8 +138,8 @@ const AgentsSchema = z.object({
|
|
|
138
138
|
})
|
|
139
139
|
.partial()
|
|
140
140
|
.default({}),
|
|
141
|
-
librarian_name: z.string().default("
|
|
142
|
-
explore_name: z.string().default("
|
|
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(),
|
package/dist/tools/story.js
CHANGED
|
@@ -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
|
-
|
|
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}: ${
|
|
29
|
+
return `✅ Queued story ${story_key}: ${finalTitle}`;
|
|
21
30
|
},
|
|
22
31
|
});
|
|
23
32
|
}
|
package/package.json
CHANGED
package/src/agents/registry.ts
CHANGED
|
@@ -134,8 +134,8 @@ export function createAstroAgents(opts: {
|
|
|
134
134
|
verify: "AstroVerify",
|
|
135
135
|
close: "AstroClose"
|
|
136
136
|
},
|
|
137
|
-
librarian_name: "
|
|
138
|
-
explore_name: "
|
|
137
|
+
librarian_name: "Librarian",
|
|
138
|
+
explore_name: "Explore",
|
|
139
139
|
agent_variant_overrides: {}
|
|
140
140
|
};
|
|
141
141
|
}
|
package/src/config/schema.ts
CHANGED
|
@@ -164,8 +164,8 @@ const AgentsSchema = z.object({
|
|
|
164
164
|
.partial()
|
|
165
165
|
.default({}),
|
|
166
166
|
|
|
167
|
-
librarian_name: z.string().default("
|
|
168
|
-
explore_name: z.string().default("
|
|
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(
|
package/src/tools/story.ts
CHANGED
|
@@ -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
|
-
|
|
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}: ${
|
|
40
|
+
return `✅ Queued story ${story_key}: ${finalTitle}`;
|
|
29
41
|
},
|
|
30
42
|
});
|
|
31
43
|
}
|