8e50049ba5
---ci---
phase: 1
milestone: v0.10
status: execute
decisions:
- id: D-080
decision: Three-tier ideation (mechanical, backend-enriched, cross-project)
rationale: Mechanical tier always produces output without backend
confidence: 0.92
- id: D-089
decision: No separate codebase map command
rationale: Git-native + .ciagent/ covers mapping; avoids tree-sitter dep
confidence: 0.88
requirements:
covered:
- IDEATE-01
- IDEATE-02
- IDEATE-03
- IDEATE-17
- MULTI-01
---/ci---
Add IdeationEngine core module with 15 signal collectors:
- Uncovered/partial requirements from REQUIREMENTS.md
- Coverage gaps (documented but unimplemented agents)
- Repeated lessons from git history
- Low-confidence decisions from ---ci--- blocks
- Escalation patterns from git history
- Compound solution patterns
- Architecture drift (ARCHITECTURE.md vs src/)
- Verification inversion (missing test files)
- Improvement patterns (cross-referencing lessons + requirements)
- Spec ambiguity (should/could/might patterns)
- Spec missing (common requirement categories)
- Cascade impact (--affected from git diff)
- External signals (npm audit, dependency staleness)
- Cross-project lesson mining
Add ciagent ideate CLI command with flags:
--category, --affected, --spec, --external, --cross-project, --output
Add active_projects to CIAgentConfig (backwards compatible with active_project).
Add IDEATE pipeline stage between RESEARCH and PLAN.
Update IdeationAgent to delegate to IdeationEngine.
533 tests passing.
100 lines
2.1 KiB
TypeScript
100 lines
2.1 KiB
TypeScript
import { AgentName, PhaseName } from "./config.js";
|
|
|
|
export type PipelineStage =
|
|
| "specify"
|
|
| "clarify"
|
|
| "research"
|
|
| "ideate"
|
|
| "plan"
|
|
| "execute"
|
|
| "test"
|
|
| "verify"
|
|
| "complete";
|
|
|
|
export interface PipelineState {
|
|
project_path: string;
|
|
current_stage: PipelineStage;
|
|
current_phase: number;
|
|
phases_completed: number[];
|
|
specification_loaded: boolean;
|
|
clarify_completed: boolean;
|
|
research_completed: boolean;
|
|
ideate_completed: boolean;
|
|
plan_completed: boolean;
|
|
execute_completed: boolean;
|
|
test_completed: boolean;
|
|
verify_completed: boolean;
|
|
errors: PipelineError[];
|
|
started_at: string;
|
|
last_updated: string;
|
|
}
|
|
|
|
export interface PipelineError {
|
|
stage: PipelineStage;
|
|
phase: number;
|
|
message: string;
|
|
timestamp: string;
|
|
retry_count: number;
|
|
resolved: boolean;
|
|
}
|
|
|
|
export interface PhaseResult {
|
|
phase: number;
|
|
stage: PipelineStage;
|
|
success: boolean;
|
|
artifacts_created: string[];
|
|
decisions_made: number;
|
|
escalations_raised: number;
|
|
duration_ms: number;
|
|
error?: string;
|
|
}
|
|
|
|
export interface OrchestratorResult {
|
|
success: boolean;
|
|
pipeline_state: PipelineState;
|
|
phase_results: PhaseResult[];
|
|
total_decisions: number;
|
|
total_escalations: number;
|
|
total_duration_ms: number;
|
|
completion_report: string;
|
|
}
|
|
|
|
export const STAGE_ORDER: PipelineStage[] = [
|
|
"specify",
|
|
"clarify",
|
|
"research",
|
|
"ideate",
|
|
"plan",
|
|
"execute",
|
|
"test",
|
|
"verify",
|
|
"complete",
|
|
];
|
|
|
|
export function getNextStage(current: PipelineStage): PipelineStage | null {
|
|
const idx = STAGE_ORDER.indexOf(current);
|
|
if (idx < 0 || idx >= STAGE_ORDER.length - 1) return null;
|
|
return STAGE_ORDER[idx + 1];
|
|
}
|
|
|
|
export function createInitialPipelineState(
|
|
project_path: string
|
|
): PipelineState {
|
|
return {
|
|
project_path,
|
|
current_stage: "specify",
|
|
current_phase: 0,
|
|
phases_completed: [],
|
|
specification_loaded: false,
|
|
clarify_completed: false,
|
|
research_completed: false,
|
|
ideate_completed: false,
|
|
plan_completed: false,
|
|
execute_completed: false,
|
|
test_completed: false,
|
|
verify_completed: false,
|
|
errors: [],
|
|
started_at: new Date().toISOString(),
|
|
last_updated: new Date().toISOString(),
|
|
};
|
|
} |