Orchestrata Ultimate / RTM / 025-code-generation-drivers

RTM: 025-code-generation-drivers

Requirement to symbol to test rows for 025-code-generation-drivers: Code Generation Drivers.

At a glance

Item Value
Requirement IDs 102
Traced from src/ 82 (80.4%)
Untraced 20
Cited from tests/ 3 (2.9%)
Traced in src/ but not cited from tests/ 79

Reading this matrix

This matrix lists each of the 102 requirement IDs of spec 025-code-generation-drivers with the src/ symbols that cite it and the tests that cite it. 82 of them (80.4%) have at least one citing symbol and 20 have none.

3 requirements are also cited from tests/, and 79 are traced in code but never named by a test. A test citation is a @traces on a test function; it shows intent to cover, not that the test runs or reaches the symbol.

Rows showing none in the symbols column are the gaps to close first. The densest untraced groups are REQ-025-* (20).

Requirement to symbols to tests

Requirement Symbols in src/ Tests citing it
REQ-025-001 AsyncCodeDriver defined as runtime_checkable Protocol in base.py orchestrata_ultimate/drivers/base AsyncCodeDriver L9 none
REQ-025-002 Protocol decorated with @traces(spec="025") for traceability orchestrata_ultimate/drivers/base AsyncCodeDriver L9 none
REQ-025-003 execute(task, files, is_fix) method signature enforced on all drivers orchestrata_ultimate/drivers/base AsyncCodeDriver L9
orchestrata_ultimate/drivers/base execute L27
none
REQ-025-004 Return type is tuple[bool, str] — (success, output_text) orchestrata_ultimate/drivers/base AsyncCodeDriver L9
orchestrata_ultimate/drivers/base execute L27
none
REQ-025-005 files parameter accepts list[str] | None (optional, None by default) orchestrata_ultimate/drivers/base AsyncCodeDriver L9 none
REQ-025-006 is_fix boolean parameter signals repair vs new generation invocation orchestrata_ultimate/drivers/base AsyncCodeDriver L9 none
REQ-025-007 get_driver(volk, workspace) reads provider via get_volk_provider(volk) orchestrata_ultimate/drivers/driver_factory get_driver L29 none
REQ-025-008 Default volk is J:Junior when no volk argument provided orchestrata_ultimate/drivers/driver_factory get_driver L29 none
REQ-025-009 Workspace defaults to ORCHESTRATA_WORKSPACE env var if not provided orchestrata_ultimate/drivers/driver_factory get_driver L29 none
REQ-025-010 Workspace falls back to /home/mohamed/workspace if env var unset orchestrata_ultimate/drivers/driver_factory get_driver L29 none
REQ-025-011 Provider claude or anthropic routes to ClaudeAPIDriver orchestrata_ultimate/drivers/driver_factory _get_claude_driver L102
orchestrata_ultimate/drivers/driver_factory get_driver L29
none
REQ-025-012 Provider deepseek routes to DeepSeekCoderDriver orchestrata_ultimate/drivers/driver_factory _get_deepseek_driver L141
orchestrata_ultimate/drivers/driver_factory get_driver L29
none
REQ-025-013 Provider aider routes to AiderDriver orchestrata_ultimate/drivers/driver_factory _get_aider_driver L158
orchestrata_ultimate/drivers/driver_factory get_driver L29
none
REQ-025-014 Provider qwen or ollama routes to QwenDriver orchestrata_ultimate/drivers/driver_factory _get_qwen_driver L173
orchestrata_ultimate/drivers/driver_factory get_driver L29
none
REQ-025-015 Provider qwen_browser routes to BrowserDriver(provider="qwen_chat") orchestrata_ultimate/drivers/driver_factory _get_browser_driver L198
orchestrata_ultimate/drivers/driver_factory get_driver L29
none
REQ-025-016 Provider deepseek_browser routes to BrowserDriver(provider="deepseek_chat") orchestrata_ultimate/drivers/driver_factory _get_browser_driver L198
orchestrata_ultimate/drivers/driver_factory get_driver L29
none
REQ-025-017 Provider kimi_browser routes to BrowserDriver(provider="kimi") orchestrata_ultimate/drivers/driver_factory _get_browser_driver L198
orchestrata_ultimate/drivers/driver_factory get_driver L29
none
REQ-025-018 Unrecognised provider logs a warning and falls back to ClaudeAPIDriver orchestrata_ultimate/drivers/driver_factory get_driver L29 none
REQ-025-019 Binary located via shutil.which("claude") then fallback paths orchestrata_ultimate/drivers/claude_api_driver _find_claude L43
orchestrata_ultimate/drivers/claude_code_driver _find_claude L79
none
REQ-025-020 Fallback paths checked: ~/.local/bin/claude, /usr/bin/claude, /usr/local/bin/claude orchestrata_ultimate/drivers/claude_api_driver _find_claude L43
orchestrata_ultimate/drivers/claude_code_driver _find_claude L79
none
REQ-025-021 Command: claude --print --dangerously-skip-permissions <task> orchestrata_ultimate/drivers/claude_code_driver ClaudeCodeDriver L110
orchestrata_ultimate/drivers/claude_code_driver execute L303
none
REQ-025-022 Output streamed line-by-line from stdout+stderr combined orchestrata_ultimate/drivers/claude_code_driver _run_process L351 none
REQ-025-023 Timeout of 900 seconds enforced via asyncio.wait_for orchestrata_ultimate/drivers/claude_code_driver _get_timeout_seconds L61
orchestrata_ultimate/drivers/claude_code_driver execute L303
none
REQ-025-024 Non-zero exit code returns (False, output) orchestrata_ultimate/drivers/claude_code_driver _run_process L351 none
REQ-025-025 Binary not found returns (False, "Claude Code CLI not found") orchestrata_ultimate/drivers/claude_code_driver execute L303 none
REQ-025-026 Timeout returns (False, "Timed out after 900s") orchestrata_ultimate/drivers/claude_code_driver execute L303 none
REQ-025-027 Task prompt delivered via stdin pipe (avoids E7 arg-list-too-long) orchestrata_ultimate/drivers/claude_api_driver ClaudeAPIDriver L94
orchestrata_ultimate/drivers/claude_api_driver _run_claude L213
none
REQ-025-028 Runs claude init --yes if CLAUDE.md absent from workspace orchestrata_ultimate/drivers/claude_api_driver _init_project L185 none
REQ-025-029 Init skipped silently if CLAUDE.md already present orchestrata_ultimate/drivers/claude_api_driver _init_project L185 none
REQ-025-030 Post-execution workspace scan enumerates created source files orchestrata_ultimate/drivers/claude_api_driver execute L130 none
REQ-025-031 Scan covers extensions: .py, .toml, .cfg, .ini, .yaml, .yml none none
REQ-025-032 Scan skips directories: .venv, __pycache__, .git, node_modules, .claude,... none none
REQ-025-033 Returns (False, "No files generated") when scan finds no source files orchestrata_ultimate/drivers/claude_api_driver execute L130 none
REQ-025-034 Timeout of 1200 seconds enforced via asyncio.wait_for orchestrata_ultimate/drivers/claude_api_driver execute L130 none
REQ-025-035 Binary located via shutil.which("aider") then fallback paths orchestrata_ultimate/drivers/aider_driver AiderDriver L66
orchestrata_ultimate/drivers/aider_driver _find_aider L40
none
REQ-025-036 Command: aider --message <task> --yes-always --no-auto-commits orchestrata_ultimate/drivers/aider_driver AiderDriver L66
orchestrata_ultimate/drivers/aider_driver execute L100
none
REQ-025-037 Each path in files appended as separate --file <path> argument orchestrata_ultimate/drivers/aider_driver AiderDriver L66
orchestrata_ultimate/drivers/aider_driver execute L100
tests/drivers/test_aider_driver.py::test_execute_appends_file_args_for_existing_files
REQ-025-038 Timeout of 300 seconds enforced orchestrata_ultimate/drivers/aider_driver AiderDriver L66
orchestrata_ultimate/drivers/aider_driver _get_timeout_seconds L21
orchestrata_ultimate/drivers/aider_driver execute L100
tests/drivers/test_aider_driver.py::test_execute_times_out
REQ-025-039 Non-zero exit returns (False, output) orchestrata_ultimate/drivers/aider_driver AiderDriver L66
orchestrata_ultimate/drivers/aider_driver _run_process L172
none
REQ-025-040 Binary not found returns (False, "Aider CLI not found") orchestrata_ultimate/drivers/aider_driver AiderDriver L66
orchestrata_ultimate/drivers/aider_driver execute L100
tests/drivers/test_aider_driver.py::test_execute_returns_false_when_cli_missing
REQ-025-041 API key read from DEEPSEEK_API_KEY environment variable none none
REQ-025-042 Missing API key returns (False, error_message) immediately none none
REQ-025-043 Uses model=deepseek-coder for code generation requests none none
REQ-025-044 Constructs system + user message pair for the API call orchestrata_ultimate/drivers/deepseek_coder_driver DeepSeekCoderDriver L272 none
REQ-025-045 API errors return (False, error_message) with error detail orchestrata_ultimate/drivers/deepseek_coder_driver DeepSeekCoderDriver L272 none
REQ-025-046 Binary located via shutil.which("qwen") then fallback paths orchestrata_ultimate/drivers/qwen_driver _find_qwen L61
orchestrata_ultimate/drivers/qwen_driver execute L139
none
REQ-025-047 Task passed as positional argument to the Qwen CLI none none
REQ-025-048 Timeout of 600 seconds enforced orchestrata_ultimate/drivers/qwen_driver _get_timeout_seconds L43
orchestrata_ultimate/drivers/qwen_driver execute L139
none
REQ-025-049 Non-zero exit returns (False, output) none none
REQ-025-050 Binary not found returns (False, "Qwen CLI not found") orchestrata_ultimate/drivers/qwen_driver execute L139 none
REQ-025-051 Uses playwright.async_api with headless Chromium orchestrata_ultimate/drivers/browser_driver BrowserDriver L30
orchestrata_ultimate/drivers/browser_driver _ensure_browser L143
orchestrata_ultimate/drivers/browser_driver _launch_browser L158
none
REQ-025-052 headless parameter controls visible vs headless mode (default: True) orchestrata_ultimate/drivers/browser_driver __init__ L46 none
REQ-025-053 Browser state persisted to .browser_state/<provider>_state.json under workspace orchestrata_ultimate/drivers/browser_driver __init__ L46 none
REQ-025-054 Existing state file loaded via storage_state on launch orchestrata_ultimate/drivers/browser_driver _ensure_browser L143
orchestrata_ultimate/drivers/browser_driver _launch_browser L158
none
REQ-025-055 close() saves storage state before closing browser orchestrata_ultimate/drivers/browser_driver _save_storage_state L401
orchestrata_ultimate/drivers/browser_driver close L130
none
REQ-025-056 Rate limit enforced: waits rate_limit_seconds minimum between requests orchestrata_ultimate/drivers/browser_driver _enforce_rate_limit L207 none
REQ-025-057 Session expiry checked against max_session_minutes on each execute() orchestrata_ultimate/drivers/browser_driver _is_session_expired L195 none
REQ-025-058 Expired session triggers level-2 recovery (restart) before execute orchestrata_ultimate/drivers/browser_driver execute L80 none
REQ-025-059 _session_start timestamp reset on each browser launch orchestrata_ultimate/drivers/browser_driver _ensure_browser L143
orchestrata_ultimate/drivers/browser_driver _launch_browser L158
none
REQ-025-060 Max 3 recovery attempts per execute() call orchestrata_ultimate/drivers/browser_driver execute L80 none
REQ-025-061 Level 1 recovery: navigate page back to base_url orchestrata_ultimate/drivers/browser_driver _recover_session L369 none
REQ-025-062 Level 2 recovery: close browser, wait 3 seconds, relaunch orchestrata_ultimate/drivers/browser_driver _recover_session L369 none
REQ-025-063 Level 1 failure escalates to level 2 automatically orchestrata_ultimate/drivers/browser_driver _recover_session L369 none
REQ-025-064 All attempts exhausted returns (False, "All recovery attempts exhausted") orchestrata_ultimate/drivers/browser_driver execute L80 none
REQ-025-065 FILE: format instructions appended to every prompt orchestrata_ultimate/drivers/browser_driver _build_prompt L250 none
REQ-025-066 File context included in prompt for non-fix tasks when files provided orchestrata_ultimate/drivers/browser_driver _build_prompt L250 none
REQ-025-067 File context truncated at 5000 characters per file orchestrata_ultimate/drivers/browser_driver _read_file_context L283 none
REQ-025-068 Files not found in workspace silently skipped in context orchestrata_ultimate/drivers/browser_driver _read_file_context L283 none
REQ-025-069 extract_file_blocks called first on response text orchestrata_ultimate/drivers/browser_driver _process_response L312 none
REQ-025-070 Falls back to extract_markdown_code_blocks when no FILE: blocks found orchestrata_ultimate/drivers/browser_driver _process_response L312 none
REQ-025-071 No code blocks found returns (False, "No code blocks found in response") orchestrata_ultimate/drivers/browser_driver _process_response L312 none
REQ-025-072 Extracted FILE: blocks written to workspace disk with directory creation orchestrata_ultimate/drivers/browser_driver _write_file_blocks L344 none
REQ-025-073 BrowserProviderConfig is a frozen dataclass orchestrata_ultimate/drivers/browser_providers BrowserProviderConfig L12 none
REQ-025-074 Config contains: name, base_url, login_url, input_selector, submit_selector,... orchestrata_ultimate/drivers/browser_providers BrowserProviderConfig L12 none
REQ-025-075 BROWSER_PROVIDERS dict registers qwen_chat, deepseek_chat, kimi none none
REQ-025-076 get_provider_config(provider) raises ValueError for unrecognised key orchestrata_ultimate/drivers/browser_providers get_provider_config L53 none
REQ-025-077 qwen_chat: rate_limit=5s, max_session=60min, timeout=120s none none
REQ-025-078 deepseek_chat: rate_limit=10s, max_session=30min, timeout=180s none none
REQ-025-079 kimi: rate_limit=8s, max_session=45min, timeout=150s none none
REQ-025-080 extract_file_blocks splits response on ^FILE:\s* (multiline regex) orchestrata_ultimate/drivers/extraction extract_file_blocks L12 none
REQ-025-081 Filename extracted from first line after FILE: marker orchestrata_ultimate/drivers/extraction extract_file_blocks L12 none
REQ-025-082 Fenced code block following filename extracted via state machine orchestrata_ultimate/drivers/extraction _extract_fenced_code L92
orchestrata_ultimate/drivers/extraction extract_file_blocks L12
none
REQ-025-083 Blocks with empty filenames or empty code silently skipped orchestrata_ultimate/drivers/extraction extract_file_blocks L12 none
REQ-025-084 extract_markdown_code_blocks uses DOTALL regex for multi-line blocks orchestrata_ultimate/drivers/extraction extract_markdown_code_blocks L55 none
REQ-025-085 Language tag captured in markdown extraction (empty string if absent) orchestrata_ultimate/drivers/extraction extract_markdown_code_blocks L55 none
REQ-025-086 Blocks with only whitespace content skipped orchestrata_ultimate/drivers/extraction extract_markdown_code_blocks L55 none
REQ-025-087 Package name is orchestrata-drivers, namespace orchestrata.drivers none none
REQ-025-088 __init__.py exports: AsyncCodeDriver, BrowserDriver, BrowserProviderConfig,... none none
REQ-025-089 All public classes and functions carry @traces decorator none none
REQ-025-090 playwright listed as optional dependency under [browser] extra none none
REQ-025-091 ClaudeCodeDriver accepts an optional volk alias and resolves it to a --model... orchestrata_ultimate/drivers/claude_code_driver _build_command L188 none
REQ-025-092 ClaudeCodeDriver appends the shared team persona via --append-system-prompt when a... orchestrata_ultimate/drivers/claude_code_driver _build_command L188 none
REQ-025-093 ClaudeCodeDriver emits --output-format json on every invocation and parses the... orchestrata_ultimate/drivers/claude_code_driver _build_command L188
orchestrata_ultimate/drivers/claude_code_driver _parse_envelope L247
none
REQ-025-094 ClaudeCodeDriver emits --resume <last_session_id> on is_fix when a previous... orchestrata_ultimate/drivers/claude_code_driver _build_command L188
orchestrata_ultimate/drivers/claude_code_driver _parse_envelope L247
none
REQ-025-095 ClaudeCodeDriver emits --settings <path> when ORCHESTRATA_CLAUDE_SETTINGS or... orchestrata_ultimate/drivers/claude_code_driver _build_command L188 none
REQ-025-096 ClaudeCodeDriver.__init__ auto-generates .claude/orchestrata-settings.json when... orchestrata_ultimate/drivers/claude_code_driver __init__ L135
orchestrata_ultimate/drivers/claude_code_driver _resolve_repo_root L25
none
REQ-025-097 write_governance_settings writes a stable, sorted... orchestrata_ultimate/drivers/claude_settings _build_settings L28
orchestrata_ultimate/drivers/claude_settings write_governance_settings L58
none
REQ-025-098 claude_governance_gate reads a JSON payload from stdin and extracts tool_name,... none none
REQ-025-099 claude_governance_gate delegates the allow/deny decision to... none none
REQ-025-100 claude_governance_gate emits the Claude Code deny-decision envelope when the... none none
REQ-025-101 claude_governance_gate fails open (exit 0, allow) on malformed stdin or interceptor... none none
REQ-025-102 claude_governance_gate appends one JSONL audit line per decision when... none none