mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-16 21:53:07 +00:00
Fix agent output summary for pipeline steps (#812)
* Changes from fix/agent-output-summary-for-pipeline-steps * feat: Optimize pipeline summary extraction and fix regex vulnerability * fix: Use fallback summary for pipeline steps when extraction fails * fix: Strip follow-up session scaffold from pipeline step fallback summaries
This commit is contained in:
@@ -291,6 +291,23 @@ export const DEFAULT_AUTO_MODE_PIPELINE_STEP_PROMPT_TEMPLATE = `## Pipeline Step
|
||||
|
||||
### Pipeline Step Instructions
|
||||
{{stepInstructions}}
|
||||
|
||||
**CRITICAL: After completing the instructions, you MUST output a summary using this EXACT format:**
|
||||
|
||||
<summary>
|
||||
## Summary: {{stepName}}
|
||||
|
||||
### Changes Implemented
|
||||
- [List all changes made in this step]
|
||||
|
||||
### Files Modified
|
||||
- [List all files modified in this step]
|
||||
|
||||
### Outcome
|
||||
- [Describe the result of this step]
|
||||
</summary>
|
||||
|
||||
The <summary> and </summary> tags MUST be on their own lines. This is REQUIRED.
|
||||
`;
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,6 +47,8 @@ export interface ParsedTask {
|
||||
phase?: string;
|
||||
/** Task execution status */
|
||||
status: 'pending' | 'in_progress' | 'completed' | 'failed';
|
||||
/** Optional task summary, e.g., "Created User model with email and password fields" */
|
||||
summary?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -306,6 +306,7 @@ export type {
|
||||
PipelineStatus,
|
||||
FeatureStatusWithPipeline,
|
||||
} from './pipeline.js';
|
||||
export { isPipelineStatus } from './pipeline.js';
|
||||
|
||||
// Port configuration
|
||||
export { STATIC_PORT, SERVER_PORT, RESERVED_PORTS } from './ports.js';
|
||||
|
||||
@@ -19,6 +19,17 @@ export interface PipelineConfig {
|
||||
|
||||
export type PipelineStatus = `pipeline_${string}`;
|
||||
|
||||
/**
|
||||
* Type guard to check if a status string represents a valid pipeline stage.
|
||||
* Requires the 'pipeline_' prefix followed by at least one character.
|
||||
*/
|
||||
export function isPipelineStatus(status: string | null | undefined): status is PipelineStatus {
|
||||
if (typeof status !== 'string') return false;
|
||||
// Require 'pipeline_' prefix with at least one character after it
|
||||
const prefix = 'pipeline_';
|
||||
return status.startsWith(prefix) && status.length > prefix.length;
|
||||
}
|
||||
|
||||
export type FeatureStatusWithPipeline =
|
||||
| 'backlog'
|
||||
| 'ready'
|
||||
@@ -28,3 +39,6 @@ export type FeatureStatusWithPipeline =
|
||||
| 'verified'
|
||||
| 'completed'
|
||||
| PipelineStatus;
|
||||
|
||||
export const PIPELINE_SUMMARY_SEPARATOR = '\n\n---\n\n';
|
||||
export const PIPELINE_SUMMARY_HEADER_PREFIX = '### ';
|
||||
|
||||
Reference in New Issue
Block a user