--- description: Clarify CIAgent project ambiguities — generate questions, accept defaults at full autonomy, present at supervised/guided --- # CIAgent Clarify Run the clarification phase for the current CIAgent project. Generate questions about ambiguities, accept defaults automatically at full autonomy, or present to the user at supervised/guided levels. **Usage:** `ciagent-clarify [phase_number]` ## Step 0: Confirm Active Project Check `ci listProjects()` or read `.ciagent/config.json` to determine if multi-project mode is active. If `.ciagent/config.json` has `projects[]` with length > 0: - Confirm `active_project` is correct for this clarification - If not, set it with `ci setActiveProject()` - All commit messages must include `project: ` in `---ci---` block If single-project mode: proceed with existing conventions. ## Step 1: Load Git Context ```bash git log --max-count=20 git branch -a ``` Read `.ciagent/PROJECT.md` and `.ciagent/REQUIREMENTS.md` for the specification. ## Step 2: Identify Ambiguities Analyze the specification and requirements for: 1. **Undefined terms** — words with multiple interpretations 2. **Missing boundaries** — requirements without clear success criteria 3. **Conflicting constraints** — requirements that contradict each other 4. **Implicit assumptions** — things taken for granted but not stated 5. **Scope ambiguity** — unclear what is in/out of scope ## Step 3: Generate Questions For each ambiguity, generate a clarify question with: - The question text - A default answer (CI's best guess) - The reasoning for the default ## Step 4: Resolve Questions Based on autonomy level: | Level | Behavior | |-------|----------| | `full` | Accept all defaults automatically, log decisions | | `supervised` | Present questions, accept defaults after timeout | | `guided` | Present questions, wait for every answer | ## Step 5: Commit Clarifications ``` decision(P##): clarification — [topic] ---ci--- phase: [N] milestone: [vX.X] status: clarify decisions: - id: D-XXX decision: [clarified choice] rationale: [why this answer] confidence: 0.XX alternatives: [alt1, alt2] ---/ci--- ``` ## Step 6: Update .ci/ Files Update `.ciagent/PROJECT.md` with clarified requirements. Update `.ciagent/REQUIREMENTS.md` with refined requirements. ## Step 7: Report Report clarifications made, decisions logged, confidence levels.