Skip to content

Commit 2c2b9d6

Browse files
author
catlog22
committed
Refactor code structure for improved readability and maintainability
1 parent 0d5cc4a commit 2c2b9d6

2 files changed

Lines changed: 7265 additions & 12 deletions

File tree

.ccw/workflows/cli-tools-usage.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,14 @@ Tools are selected based on **tags** defined in the configuration. Use tags to m
8585

8686
```bash
8787
# Explicit tool selection
88-
ccw cli -p "<PROMPT>" --tool <tool-id> --mode <analysis|write|review>
88+
ccw cli -p "<PROMPT>" --tool <tool-id> --mode <analysis|write>
8989

9090
# Model override
9191
ccw cli -p "<PROMPT>" --tool <tool-id> --model <model-id> --mode <analysis|write>
9292

93-
# Code review (codex only)
93+
# Code review (codex only - review mode and target flags are invalid for other tools)
9494
ccw cli -p "<PROMPT>" --tool codex --mode review
95+
ccw cli --tool codex --mode review --commit <hash>
9596

9697
# Tag-based auto-selection (future)
9798
ccw cli -p "<PROMPT>" --tags <tag1,tag2> --mode <analysis|write>
@@ -292,11 +293,8 @@ ccw cli -p "..." --tool gemini --mode analysis --rule analysis-review-architectu
292293
- **`review`**
293294
- Permission: Read-only (code review output)
294295
- Use For: Git-aware code review of uncommitted changes, branch diffs, specific commits
295-
- Specification: **codex only** - uses `codex review` subcommand
296-
- Tool Behavior:
297-
- `codex`: Executes `codex review` for structured code review
298-
- Other tools (gemini/qwen/claude): Accept mode but no operation change (treated as analysis)
299-
- **Constraint**: Target flags (`--uncommitted`, `--base`, `--commit`) and prompt are mutually exclusive
296+
- Specification: **codex only** - uses `codex review` subcommand. Other tools MUST NOT use this mode
297+
- **Constraint**: Target flags (`--uncommitted`, `--base`, `--commit`) are **codex-only** and mutually exclusive with prompt
300298
- With prompt only: `ccw cli -p "Focus on security" --tool codex --mode review` (reviews uncommitted by default)
301299
- With target flag only: `ccw cli --tool codex --mode review --commit abc123` (no prompt allowed)
302300

@@ -309,7 +307,7 @@ ccw cli -p "..." --tool gemini --mode analysis --rule analysis-review-architectu
309307
- **`--mode <mode>`**
310308
- Description: **REQUIRED**: analysis, write, review
311309
- Default: **NONE** (must specify)
312-
- Note: `review` mode triggers `codex review` subcommand for codex tool only
310+
- Note: `review` mode is **codex-only**. Using `--mode review` with other tools (gemini/qwen/claude) is invalid and should be rejected
313311

314312
- **`--model <model>`**
315313
- Description: Model override
@@ -446,7 +444,7 @@ ccw cli --tool codex --mode review --base main
446444
ccw cli --tool codex --mode review --commit abc123
447445
```
448446

449-
> **Note**: `--mode review` only triggers special behavior for `codex` tool. Target flags (`--uncommitted`, `--base`, `--commit`) and prompt are **mutually exclusive** - use one or the other, not both.
447+
> **Note**: `--mode review` and target flags (`--uncommitted`, `--base`, `--commit`) are **codex-only**. Using them with other tools is invalid. When using codex, target flags and prompt are **mutually exclusive** - use one or the other, not both.
450448
451449
---
452450

@@ -455,9 +453,9 @@ ccw cli --tool codex --mode review --commit abc123
455453
**Single-Use Authorization**: Each execution requires explicit user instruction. Previous authorization does NOT carry over.
456454

457455
**Mode Hierarchy**:
458-
- `analysis`: Read-only, safe for auto-execution
459-
- `write`: Create/Modify/Delete files, full operations - requires explicit `--mode write`
460-
- `review`: Git-aware code review (codex only), read-only output - requires explicit `--mode review`
456+
- `analysis`: Read-only, safe for auto-execution. Available for all tools
457+
- `write`: Create/Modify/Delete files, full operations - requires explicit `--mode write`. Available for all tools
458+
- `review`: **codex-only**. Git-aware code review, read-only output. Invalid for other tools (gemini/qwen/claude)
461459
- **Exception**: User provides clear instructions like "modify", "create", "implement"
462460

463461
---

0 commit comments

Comments
 (0)