Merge branch 'main' into new-project-from-template

This commit is contained in:
Cody Seibert
2025-12-12 20:51:23 -05:00
39 changed files with 606 additions and 11658 deletions

View File

@@ -313,6 +313,46 @@ export class AutoModeService {
// No worktree, use project path
}
// Load feature info for context
const feature = await this.loadFeature(projectPath, featureId);
// Load previous agent output if it exists
const contextPath = path.join(
projectPath,
".automaker",
"features",
featureId,
"agent-output.md"
);
let previousContext = "";
try {
previousContext = await fs.readFile(contextPath, "utf-8");
} catch {
// No previous context
}
// Build complete prompt with feature info, previous context, and follow-up instructions
let fullPrompt = `## Follow-up on Feature Implementation
${feature ? this.buildFeaturePrompt(feature) : `**Feature ID:** ${featureId}`}
`;
if (previousContext) {
fullPrompt += `
## Previous Agent Work
The following is the output from the previous implementation attempt:
${previousContext}
`;
}
fullPrompt += `
## Follow-up Instructions
${prompt}
## Task
Address the follow-up instructions above. Review the previous work and make the requested changes or fixes.`;
this.runningFeatures.set(featureId, {
featureId,
projectPath,
@@ -326,11 +366,14 @@ export class AutoModeService {
this.emitAutoModeEvent("auto_mode_feature_start", {
featureId,
projectPath,
feature: { id: featureId, title: "Follow-up", description: prompt.substring(0, 100) },
feature: feature || { id: featureId, title: "Follow-up", description: prompt.substring(0, 100) },
});
try {
await this.runAgent(workDir, featureId, prompt, abortController, imagePaths);
await this.runAgent(workDir, featureId, fullPrompt, abortController, imagePaths);
// Mark as waiting_approval for user review
await this.updateFeatureStatus(projectPath, featureId, "waiting_approval");
this.emitAutoModeEvent("auto_mode_feature_complete", {
featureId,