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.
45 lines
1.6 KiB
TypeScript
45 lines
1.6 KiB
TypeScript
import { getNextStage, createInitialPipelineState, STAGE_ORDER } from "../types/pipeline.js";
|
|
import { confidenceToLevel, shouldEscalate } from "../types/decisions.js";
|
|
import { ESCALATION_TYPES } from "../types/escalation.js";
|
|
import { parseSpecification } from "../types/specification.js";
|
|
import { createClarifyQuestion } from "../types/clarify.js";
|
|
import { DEFAULT_CIAGENT_CONFIG } from "../types/config.js";
|
|
|
|
describe("Type exports", () => {
|
|
it("pipeline types are importable and functional", () => {
|
|
expect(STAGE_ORDER).toHaveLength(9);
|
|
expect(getNextStage("specify")).toBe("clarify");
|
|
const state = createInitialPipelineState("/tmp/test");
|
|
expect(state.current_stage).toBe("specify");
|
|
});
|
|
|
|
it("decision types are importable and functional", () => {
|
|
expect(confidenceToLevel(0.9)).toBe("high");
|
|
expect(shouldEscalate(0.5, 0.6)).toBe(true);
|
|
});
|
|
|
|
it("escalation types are importable and functional", () => {
|
|
expect(Object.keys(ESCALATION_TYPES)).toHaveLength(5);
|
|
});
|
|
|
|
it("specification parser is importable and functional", () => {
|
|
const spec = parseSpecification("# Test\n## Objective\nBuild it.", "inline");
|
|
expect(spec.title).toBe("Test");
|
|
});
|
|
|
|
it("clarify question factory is importable and functional", () => {
|
|
const q = createClarifyQuestion({
|
|
question: "Test?",
|
|
context: "Test",
|
|
default_answer: "Yes",
|
|
rationale: "Why not",
|
|
impact: "low",
|
|
category: "test",
|
|
});
|
|
expect(q.id).toMatch(/^Q-/);
|
|
});
|
|
|
|
it("config defaults are importable", () => {
|
|
expect(DEFAULT_CIAGENT_CONFIG.autonomy.level).toBe("full");
|
|
});
|
|
}); |