- Add Orchestrator class with handle_message() and handle_callback() entry points
- Command parsing via regex: /gsd:* pattern extraction
- Auto-session-creation per CONTEXT.md decision
- Error handling with try/except returning format_error() cards
- Approval detection integration with ApprovalHandler
- Output truncation to 2000 chars for Feishu card limits
- 18 tests passing with full coverage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test orchestrator initialization with dependencies
- Test command parsing for /gsd:* pattern extraction
- Test handle_message routing (session creation, command execution, error handling)
- Test handle_callback routing for approval workflow
- Add integration-style tests for full flows
18 tests total covering all orchestrator functionality.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ProgressInfo dataclass for progress data
- Add ProgressMonitor class with:
- PROGRESS_PATTERNS for extraction (percentage, fraction, phase, completion)
- extract_progress() to find progress indicators in output
- should_send_update() with 60 second throttling
- create_progress_card() for Feishu card formatting
- Fix fraction pattern to allow content after fraction (e.g., [3/5 tasks])
- Fix should_send_update() to return False on first call
- Fix test assertions to use kwargs instead of positional args
All 7 tests pass for progress monitoring.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ApprovalState dataclass for approval workflow state
- Add ApprovalHandler class with:
- APPROVAL_PATTERNS for detection (AskUserQuestion, ExitPlanMode, 需要确认, Please confirm)
- detect_approval_request() to find approval requests in output
- create_approval_card() with confirm/reject buttons using CardButton
- handle_callback() to process approval actions
- In-memory pending_approvals cache
- Fix test assertions to use kwargs instead of positional args
All 8 tests pass for approval handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add CommandResult dataclass for storing execution results
- Add OutputCapture class with prompt detection and stabilization
- Add CommandExecutor class for command execution and error detection
- Support common shell prompts ($, ❯, ➜, >)
- Detect errors in both English and Chinese
- Use 60s default timeout from CONTEXT.md decision
- Mock-based testing (no real tmux required)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test OutputCapture._is_prompt for prompt pattern detection
- Test OutputCapture.capture_until_complete for output capture
- Test CommandExecutor._detect_errors for error keyword detection
- Test CommandExecutor.execute for full command execution flow
- Test CommandResult dataclass for result storage
- Test CommandExecutor.send_command for pane interaction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test SKILL.md file exists at skill/SKILL.md
- Test SKILL.md has valid YAML frontmatter
- Test SKILL.md has name field
- Test SKILL.md has description field
- Test description contains /gsd: trigger pattern
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test format_success returns valid card with green theme
- Test format_error returns red theme
- Test format_info returns blue theme
- Test format with buttons includes actions element
- Test format_paginated adds [N/M] marker
- Test card has required structure (schema 2.0, config, elements)
TDD RED phase - tests will fail until implementation is added.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- TestPromptTemplatesExist: 4 tests for template file existence
- TestPromptLoader: 6 tests for loading and rendering templates
- Tests fail (RED phase) - no templates or loader implemented yet
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>