astrocode-workflow 0.1.29 → 0.1.31
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/tools/workflow.js
CHANGED
|
@@ -166,6 +166,11 @@ export function createAstroWorkflowProceedTool(opts) {
|
|
|
166
166
|
if (systemConfig.agent && systemConfig.agent[name]) {
|
|
167
167
|
return true;
|
|
168
168
|
}
|
|
169
|
+
// For known stage agents, assume they exist (they are system-provided subagents)
|
|
170
|
+
const knownStageAgents = ["Frame", "Plan", "Spec", "Implement", "Review", "Verify", "Close"];
|
|
171
|
+
if (knownStageAgents.includes(name)) {
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
169
174
|
return false;
|
|
170
175
|
};
|
|
171
176
|
if (!agentExists(agentName)) {
|
|
@@ -64,7 +64,10 @@ export function createRunForStory(db, config, storyKey) {
|
|
|
64
64
|
const isGenesisCandidate = storyKey === 'S-0001' || isInitialStory(db, storyKey) ||
|
|
65
65
|
(story.body_md && story.body_md.length > 100 &&
|
|
66
66
|
(story.title.toLowerCase().includes('implement') || story.body_md.toLowerCase().includes('implement')));
|
|
67
|
-
if (
|
|
67
|
+
// Skip conversion if there are already many stories (spec already decomposed)
|
|
68
|
+
const existingStoriesCount = db.prepare("SELECT COUNT(*) as count FROM stories").get();
|
|
69
|
+
const alreadyDecomposed = existingStoriesCount.count > 10; // Arbitrary threshold
|
|
70
|
+
if (isGenesisCandidate && !alreadyDecomposed) {
|
|
68
71
|
const planningTitle = `Plan and decompose: ${story.title}`;
|
|
69
72
|
const planningBody = `Analyze the requirements and break down "${story.title}" into 50-200 detailed, granular implementation stories. Each story should be focused on a specific, implementable task with clear acceptance criteria.\n\nOriginal request: ${story.body_md || ''}`;
|
|
70
73
|
db.prepare("UPDATE stories SET title=?, body_md=? WHERE story_key=?").run(planningTitle, planningBody, storyKey);
|
package/package.json
CHANGED
package/src/tools/workflow.ts
CHANGED
|
@@ -204,6 +204,11 @@ export function createAstroWorkflowProceedTool(opts: { ctx: any; config: Astroco
|
|
|
204
204
|
if (systemConfig.agent && systemConfig.agent[name]) {
|
|
205
205
|
return true;
|
|
206
206
|
}
|
|
207
|
+
// For known stage agents, assume they exist (they are system-provided subagents)
|
|
208
|
+
const knownStageAgents = ["Frame", "Plan", "Spec", "Implement", "Review", "Verify", "Close"];
|
|
209
|
+
if (knownStageAgents.includes(name)) {
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
207
212
|
return false;
|
|
208
213
|
};
|
|
209
214
|
|
|
@@ -94,7 +94,11 @@ export function createRunForStory(db: SqliteDb, config: AstrocodeConfig, storyKe
|
|
|
94
94
|
(story.body_md && story.body_md.length > 100 &&
|
|
95
95
|
(story.title.toLowerCase().includes('implement') || story.body_md.toLowerCase().includes('implement')));
|
|
96
96
|
|
|
97
|
-
if (
|
|
97
|
+
// Skip conversion if there are already many stories (spec already decomposed)
|
|
98
|
+
const existingStoriesCount = db.prepare("SELECT COUNT(*) as count FROM stories").get() as { count: number };
|
|
99
|
+
const alreadyDecomposed = existingStoriesCount.count > 10; // Arbitrary threshold
|
|
100
|
+
|
|
101
|
+
if (isGenesisCandidate && !alreadyDecomposed) {
|
|
98
102
|
const planningTitle = `Plan and decompose: ${story.title}`;
|
|
99
103
|
const planningBody = `Analyze the requirements and break down "${story.title}" into 50-200 detailed, granular implementation stories. Each story should be focused on a specific, implementable task with clear acceptance criteria.\n\nOriginal request: ${story.body_md || ''}`;
|
|
100
104
|
db.prepare("UPDATE stories SET title=?, body_md=? WHERE story_key=?").run(planningTitle, planningBody, storyKey);
|