|
1 | 1 | from __future__ import annotations |
2 | 2 |
|
3 | 3 | import os |
4 | | -from dataclasses import dataclass |
| 4 | +from dataclasses import dataclass, field |
5 | 5 | from pathlib import Path |
6 | 6 |
|
7 | 7 |
|
8 | 8 | def _project_root() -> Path: |
9 | 9 | return Path(__file__).resolve().parent.parent |
10 | 10 |
|
11 | 11 |
|
| 12 | +def _default_codex_prompt_file() -> Path: |
| 13 | + """Return the default codex prompt file path.""" |
| 14 | + return _project_root() / "CLAUDE.md" |
| 15 | + |
| 16 | + |
12 | 17 | @dataclass(frozen=True) |
13 | 18 | class RalphConfig: |
14 | 19 | """Configuration for Ralph tool execution.""" |
15 | 20 |
|
16 | 21 | # Tool selection |
17 | | - tool: str # amp, claude, codex, or opencode |
18 | | - |
19 | | - # Codex-specific configuration |
20 | | - codex_prompt_file: Path |
21 | | - codex_model: str |
22 | | - codex_reasoning_effort: str |
23 | | - codex_sandbox: str |
24 | | - codex_full_auto: bool |
25 | | - codex_extra_args: str |
| 22 | + tool: str = "amp" # amp, claude, codex, or opencode |
26 | 23 |
|
27 | 24 | # TaskMaster configuration |
28 | 25 | use_mcp: bool = False |
29 | 26 | taskmaster_url: str | None = None |
30 | 27 |
|
| 28 | + # Codex-specific configuration |
| 29 | + codex_prompt_file: Path = field(default_factory=_default_codex_prompt_file) |
| 30 | + codex_model: str = "gpt-5-codex" |
| 31 | + codex_reasoning_effort: str = "high" |
| 32 | + codex_sandbox: str = "workspace-write" |
| 33 | + codex_full_auto: bool = True |
| 34 | + codex_extra_args: str = "" |
| 35 | + |
31 | 36 | # OpenCode-specific configuration |
32 | 37 | opencode_model: str = "gpt-4" |
33 | 38 | opencode_extra_args: str = "" |
|
0 commit comments