rafcode 3.2.1 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/CLAUDE.md +0 -1
  3. package/RAF/41-echo-chamber/decisions.md +13 -0
  4. package/RAF/41-echo-chamber/input.md +4 -0
  5. package/RAF/41-echo-chamber/outcomes/1-update-codex-model-defaults.md +24 -0
  6. package/RAF/41-echo-chamber/outcomes/2-e2e-test-codex-provider.md +74 -0
  7. package/RAF/41-echo-chamber/plans/1-update-codex-model-defaults.md +28 -0
  8. package/RAF/41-echo-chamber/plans/2-e2e-test-codex-provider.md +103 -0
  9. package/RAF/42-patch-parade/decisions.md +29 -0
  10. package/RAF/42-patch-parade/input.md +9 -0
  11. package/RAF/42-patch-parade/outcomes/1-fix-codex-model-resolution.md +36 -0
  12. package/RAF/42-patch-parade/outcomes/2-fix-provider-aware-name-generation.md +31 -0
  13. package/RAF/42-patch-parade/outcomes/3-fix-codex-error-event-rendering.md +32 -0
  14. package/RAF/42-patch-parade/outcomes/4-update-cli-help-docs.md +28 -0
  15. package/RAF/42-patch-parade/outcomes/5-update-default-codex-models-to-gpt-5-4.md +33 -0
  16. package/RAF/42-patch-parade/outcomes/6-unify-model-config-schema.md +89 -0
  17. package/RAF/42-patch-parade/plans/1-fix-codex-model-resolution.md +35 -0
  18. package/RAF/42-patch-parade/plans/2-fix-provider-aware-name-generation.md +38 -0
  19. package/RAF/42-patch-parade/plans/3-fix-codex-error-event-rendering.md +32 -0
  20. package/RAF/42-patch-parade/plans/4-update-cli-help-docs.md +31 -0
  21. package/RAF/42-patch-parade/plans/5-update-default-codex-models-to-gpt-5-4.md +35 -0
  22. package/RAF/42-patch-parade/plans/6-unify-model-config-schema.md +46 -0
  23. package/RAF/43-swiss-army/decisions.md +34 -0
  24. package/RAF/43-swiss-army/input.md +7 -0
  25. package/RAF/43-swiss-army/outcomes/1-fix-model-validation.md +21 -0
  26. package/RAF/43-swiss-army/outcomes/2-update-commit-format.md +31 -0
  27. package/RAF/43-swiss-army/outcomes/3-wire-reasoning-effort.md +28 -0
  28. package/RAF/43-swiss-army/outcomes/4-remove-provider-flag.md +27 -0
  29. package/RAF/43-swiss-army/outcomes/5-config-wizard-validation.md +23 -0
  30. package/RAF/43-swiss-army/outcomes/6-add-fast-mode.md +32 -0
  31. package/RAF/43-swiss-army/outcomes/7-config-preset.md +31 -0
  32. package/RAF/43-swiss-army/plans/1-fix-model-validation.md +38 -0
  33. package/RAF/43-swiss-army/plans/2-update-commit-format.md +46 -0
  34. package/RAF/43-swiss-army/plans/3-wire-reasoning-effort.md +39 -0
  35. package/RAF/43-swiss-army/plans/4-remove-provider-flag.md +43 -0
  36. package/RAF/43-swiss-army/plans/5-config-wizard-validation.md +42 -0
  37. package/RAF/43-swiss-army/plans/6-add-fast-mode.md +46 -0
  38. package/RAF/43-swiss-army/plans/7-config-preset.md +51 -0
  39. package/RAF/44-config-api-change/decisions.md +22 -0
  40. package/RAF/44-config-api-change/input.md +5 -0
  41. package/RAF/44-config-api-change/outcomes/1-restructure-config-subcommands.md +19 -0
  42. package/RAF/44-config-api-change/outcomes/2-move-preset-under-config.md +17 -0
  43. package/RAF/44-config-api-change/outcomes/3-update-existing-tests-for-config-api.md +14 -0
  44. package/RAF/44-config-api-change/outcomes/4-update-config-command-docs.md +11 -0
  45. package/RAF/44-config-api-change/outcomes/5-fix-codex-name-generation.md +18 -0
  46. package/RAF/44-config-api-change/plans/1-restructure-config-subcommands.md +37 -0
  47. package/RAF/44-config-api-change/plans/2-move-preset-under-config.md +38 -0
  48. package/RAF/44-config-api-change/plans/3-update-existing-tests-for-config-api.md +38 -0
  49. package/RAF/44-config-api-change/plans/4-update-config-command-docs.md +36 -0
  50. package/RAF/44-config-api-change/plans/5-fix-codex-name-generation.md +49 -0
  51. package/RAF/45-signal-cairn/decisions.md +7 -0
  52. package/RAF/45-signal-cairn/input.md +2 -0
  53. package/RAF/45-signal-cairn/outcomes/1-rename-provider-to-harness.md +19 -0
  54. package/RAF/45-signal-cairn/outcomes/2-normalize-model-display-names.md +18 -0
  55. package/RAF/45-signal-cairn/plans/1-rename-provider-to-harness.md +40 -0
  56. package/RAF/45-signal-cairn/plans/2-normalize-model-display-names.md +41 -0
  57. package/RAF/45-signal-lantern/decisions.md +10 -0
  58. package/RAF/45-signal-lantern/input.md +2 -0
  59. package/RAF/45-signal-lantern/outcomes/1-add-effort-and-fast-to-do-model-display.md +15 -0
  60. package/RAF/45-signal-lantern/outcomes/2-capture-codex-post-run-token-usage.md +15 -0
  61. package/RAF/45-signal-lantern/outcomes/3-show-codex-token-summaries-without-fake-cost.md +14 -0
  62. package/RAF/45-signal-lantern/plans/1-add-effort-and-fast-to-do-model-display.md +38 -0
  63. package/RAF/45-signal-lantern/plans/2-capture-codex-post-run-token-usage.md +37 -0
  64. package/RAF/45-signal-lantern/plans/3-show-codex-token-summaries-without-fake-cost.md +40 -0
  65. package/RAF/46-lantern-arc/decisions.md +19 -0
  66. package/RAF/46-lantern-arc/input.md +6 -0
  67. package/RAF/46-lantern-arc/outcomes/1-remove-spark-alias.md +16 -0
  68. package/RAF/46-lantern-arc/outcomes/2-clean-up-worktree-plan-command.md +30 -0
  69. package/RAF/46-lantern-arc/outcomes/3-fix-token-usage-accumulation.md +32 -0
  70. package/RAF/46-lantern-arc/outcomes/4-display-effort-in-compact-mode.md +22 -0
  71. package/RAF/46-lantern-arc/outcomes/5-codex-fast-mode-research.md +38 -0
  72. package/RAF/46-lantern-arc/outcomes/6-optimize-llm-prompts.md +39 -0
  73. package/RAF/46-lantern-arc/plans/1-remove-spark-alias.md +38 -0
  74. package/RAF/46-lantern-arc/plans/2-clean-up-worktree-plan-command.md +33 -0
  75. package/RAF/46-lantern-arc/plans/3-fix-token-usage-accumulation.md +33 -0
  76. package/RAF/46-lantern-arc/plans/4-display-effort-in-compact-mode.md +28 -0
  77. package/RAF/46-lantern-arc/plans/5-codex-fast-mode-research.md +34 -0
  78. package/RAF/46-lantern-arc/plans/6-optimize-llm-prompts.md +48 -0
  79. package/RAF/47-signal-trim/decisions.md +13 -0
  80. package/RAF/47-signal-trim/input.md +2 -0
  81. package/RAF/47-signal-trim/plans/1-remove-cache-from-status.md +73 -0
  82. package/README.md +47 -57
  83. package/dist/commands/config.d.ts.map +1 -1
  84. package/dist/commands/config.js +47 -49
  85. package/dist/commands/config.js.map +1 -1
  86. package/dist/commands/do.d.ts +2 -0
  87. package/dist/commands/do.d.ts.map +1 -1
  88. package/dist/commands/do.js +57 -44
  89. package/dist/commands/do.js.map +1 -1
  90. package/dist/commands/plan.d.ts.map +1 -1
  91. package/dist/commands/plan.js +36 -153
  92. package/dist/commands/plan.js.map +1 -1
  93. package/dist/commands/preset.d.ts +3 -0
  94. package/dist/commands/preset.d.ts.map +1 -0
  95. package/dist/commands/preset.js +158 -0
  96. package/dist/commands/preset.js.map +1 -0
  97. package/dist/core/claude-runner.d.ts +2 -0
  98. package/dist/core/claude-runner.d.ts.map +1 -1
  99. package/dist/core/claude-runner.js +36 -12
  100. package/dist/core/claude-runner.js.map +1 -1
  101. package/dist/core/codex-runner.d.ts +1 -0
  102. package/dist/core/codex-runner.d.ts.map +1 -1
  103. package/dist/core/codex-runner.js +26 -7
  104. package/dist/core/codex-runner.js.map +1 -1
  105. package/dist/core/failure-analyzer.js +2 -1
  106. package/dist/core/failure-analyzer.js.map +1 -1
  107. package/dist/core/git.d.ts +2 -2
  108. package/dist/core/git.d.ts.map +1 -1
  109. package/dist/core/git.js +53 -3
  110. package/dist/core/git.js.map +1 -1
  111. package/dist/core/pull-request.js +3 -3
  112. package/dist/core/pull-request.js.map +1 -1
  113. package/dist/core/runner-factory.d.ts +4 -4
  114. package/dist/core/runner-factory.d.ts.map +1 -1
  115. package/dist/core/runner-factory.js +8 -8
  116. package/dist/core/runner-factory.js.map +1 -1
  117. package/dist/core/runner-interface.d.ts +1 -1
  118. package/dist/core/runner-types.d.ts +17 -4
  119. package/dist/core/runner-types.d.ts.map +1 -1
  120. package/dist/parsers/codex-stream-renderer.d.ts +7 -0
  121. package/dist/parsers/codex-stream-renderer.d.ts.map +1 -1
  122. package/dist/parsers/codex-stream-renderer.js +37 -4
  123. package/dist/parsers/codex-stream-renderer.js.map +1 -1
  124. package/dist/prompts/amend.d.ts.map +1 -1
  125. package/dist/prompts/amend.js +29 -101
  126. package/dist/prompts/amend.js.map +1 -1
  127. package/dist/prompts/execution.d.ts.map +1 -1
  128. package/dist/prompts/execution.js +17 -34
  129. package/dist/prompts/execution.js.map +1 -1
  130. package/dist/prompts/planning.d.ts.map +1 -1
  131. package/dist/prompts/planning.js +21 -120
  132. package/dist/prompts/planning.js.map +1 -1
  133. package/dist/types/config.d.ts +33 -31
  134. package/dist/types/config.d.ts.map +1 -1
  135. package/dist/types/config.js +14 -28
  136. package/dist/types/config.js.map +1 -1
  137. package/dist/utils/config.d.ts +36 -16
  138. package/dist/utils/config.d.ts.map +1 -1
  139. package/dist/utils/config.js +209 -104
  140. package/dist/utils/config.js.map +1 -1
  141. package/dist/utils/name-generator.d.ts.map +1 -1
  142. package/dist/utils/name-generator.js +25 -12
  143. package/dist/utils/name-generator.js.map +1 -1
  144. package/dist/utils/terminal-symbols.d.ts +15 -2
  145. package/dist/utils/terminal-symbols.d.ts.map +1 -1
  146. package/dist/utils/terminal-symbols.js +36 -4
  147. package/dist/utils/terminal-symbols.js.map +1 -1
  148. package/dist/utils/token-tracker.d.ts +6 -1
  149. package/dist/utils/token-tracker.d.ts.map +1 -1
  150. package/dist/utils/token-tracker.js +84 -51
  151. package/dist/utils/token-tracker.js.map +1 -1
  152. package/dist/utils/validation.d.ts +1 -2
  153. package/dist/utils/validation.d.ts.map +1 -1
  154. package/dist/utils/validation.js +4 -25
  155. package/dist/utils/validation.js.map +1 -1
  156. package/package.json +1 -1
  157. package/src/commands/config.ts +60 -63
  158. package/src/commands/do.ts +63 -51
  159. package/src/commands/plan.ts +34 -165
  160. package/src/commands/preset.ts +186 -0
  161. package/src/core/claude-runner.ts +45 -5
  162. package/src/core/codex-runner.ts +32 -7
  163. package/src/core/failure-analyzer.ts +2 -1
  164. package/src/core/git.ts +57 -3
  165. package/src/core/pull-request.ts +3 -3
  166. package/src/core/runner-factory.ts +9 -9
  167. package/src/core/runner-interface.ts +1 -1
  168. package/src/core/runner-types.ts +17 -4
  169. package/src/parsers/codex-stream-renderer.ts +47 -4
  170. package/src/prompts/amend.ts +29 -101
  171. package/src/prompts/config-docs.md +206 -62
  172. package/src/prompts/execution.ts +17 -34
  173. package/src/prompts/planning.ts +21 -120
  174. package/src/types/config.ts +47 -58
  175. package/src/utils/config.ts +248 -115
  176. package/src/utils/name-generator.ts +29 -13
  177. package/src/utils/terminal-symbols.ts +46 -6
  178. package/src/utils/token-tracker.ts +96 -57
  179. package/src/utils/validation.ts +5 -30
  180. package/tests/unit/amend-prompt.test.ts +3 -2
  181. package/tests/unit/claude-runner-interactive.test.ts +21 -3
  182. package/tests/unit/claude-runner.test.ts +39 -0
  183. package/tests/unit/codex-runner.test.ts +163 -0
  184. package/tests/unit/codex-stream-renderer.test.ts +127 -0
  185. package/tests/unit/command-output.test.ts +57 -0
  186. package/tests/unit/commit-planning-artifacts-worktree.test.ts +24 -7
  187. package/tests/unit/commit-planning-artifacts.test.ts +26 -4
  188. package/tests/unit/config-command.test.ts +215 -303
  189. package/tests/unit/config.test.ts +319 -235
  190. package/tests/unit/dependency-integration.test.ts +27 -1
  191. package/tests/unit/do-model-display.test.ts +35 -0
  192. package/tests/unit/execution-prompt.test.ts +49 -19
  193. package/tests/unit/name-generator.test.ts +82 -12
  194. package/tests/unit/plan-command-auto-flag.test.ts +7 -10
  195. package/tests/unit/plan-command.test.ts +14 -17
  196. package/tests/unit/planning-prompt.test.ts +9 -8
  197. package/tests/unit/terminal-symbols.test.ts +94 -3
  198. package/tests/unit/token-tracker.test.ts +180 -1
  199. package/tests/unit/validation.test.ts +9 -41
  200. package/tests/unit/worktree-flag-override.test.ts +0 -186
@@ -0,0 +1,46 @@
1
+ ---
2
+ effort: high
3
+ ---
4
+ # Task: Add Fast Mode to Model Config
5
+
6
+ ## Objective
7
+ Extend ModelEntry with a `fast: boolean` option and wire it to Claude and Codex CLI invocations.
8
+
9
+ ## Context
10
+ Claude Code supports a "fast mode" that uses the same model with faster output. Codex may have similar options. This should be configurable per model entry so users can have fast planning but thorough execution.
11
+
12
+ ## Dependencies
13
+ 1, 3
14
+
15
+ ## Requirements
16
+ - Add `fast?: boolean` to the ModelEntry interface in `src/types/config.ts`
17
+ - Research how to pass fast mode to Claude CLI (likely `--fast` flag or similar)
18
+ - Research how to pass fast mode to Codex CLI
19
+ - Wire the fast flag in both ClaudeRunner and CodexRunner
20
+ - Only pass the flag when `fast: true` is set
21
+ - Update config validation to accept the new field
22
+ - Update config-docs.md with fast mode documentation
23
+ - Default to false/omitted (not fast)
24
+
25
+ ## Implementation Steps
26
+ 1. Search the web for how Claude Code CLI accepts fast mode (check `claude --help` or docs)
27
+ 2. Search the web for how Codex CLI accepts fast/speed options
28
+ 3. Read `src/types/config.ts` — add `fast?: boolean` to ModelEntry interface
29
+ 4. Read `src/utils/config.ts` — add validation for the `fast` field (boolean type check)
30
+ 5. Read `src/core/claude-runner.ts` — add the fast flag to CLI args when `fast: true`
31
+ 6. Read `src/core/codex-runner.ts` — add the fast flag to CLI args when `fast: true`
32
+ 7. Update `src/prompts/config-docs.md` — document the fast option
33
+ 8. Update DEFAULT_CONFIG if fast should have a default value (probably omit = not fast)
34
+
35
+ ## Acceptance Criteria
36
+ - [ ] ModelEntry interface includes `fast?: boolean`
37
+ - [ ] Claude CLI invocations include the fast flag when configured
38
+ - [ ] Codex CLI invocations include the fast flag when configured (or document if unsupported)
39
+ - [ ] Config validation accepts `fast: true/false` on model entries
40
+ - [ ] No fast flag passed when not configured
41
+ - [ ] config-docs.md documents the fast option with examples
42
+
43
+ ## Notes
44
+ - This depends on task 3 (wire reasoning effort) because both modify the same runner files — doing them in sequence avoids conflicts
45
+ - Claude Code fast mode info: "Fast mode for Claude Code uses the same Claude Opus 4.6 model with faster output. It does NOT switch to a different model."
46
+ - If Codex doesn't support a fast mode equivalent, document that and skip the Codex wiring
@@ -0,0 +1,51 @@
1
+ ---
2
+ effort: high
3
+ ---
4
+ # Task: Support Config Presets
5
+
6
+ ## Objective
7
+ Add a preset system that lets users save, load, list, and delete named configuration profiles, enabling easy switching between Claude and Codex setups.
8
+
9
+ ## Context
10
+ Users may want different configurations for different workflows (e.g., a Claude-focused setup vs a Codex-focused setup). Presets store complete config snapshots as named JSON files that can be switched with a single command.
11
+
12
+ ## Dependencies
13
+ 1
14
+
15
+ ## Requirements
16
+ - Store presets as JSON files in `~/.raf/presets/<name>.json`
17
+ - Create `~/.raf/presets/` directory if it doesn't exist
18
+ - Implement `raf preset save <name>` — copy current config to a preset file
19
+ - Implement `raf preset load <name>` — copy preset file to active config (overwrite current config)
20
+ - Implement `raf preset list` — show all saved presets with brief info
21
+ - Implement `raf preset delete <name>` — remove a preset file
22
+ - Preset files are complete copies of raf.config.json (not diffs/patches)
23
+ - Show confirmation messages for destructive operations (load overwrites current config)
24
+ - Handle edge cases: preset not found, preset already exists (overwrite with confirmation)
25
+
26
+ ## Implementation Steps
27
+ 1. Create a new command file `src/commands/preset.ts`
28
+ 2. Add the `preset` command to the CLI with subcommands: save, load, list, delete
29
+ 3. Implement `save`: read current `~/.raf/raf.config.json`, write to `~/.raf/presets/<name>.json`
30
+ 4. Implement `load`: read `~/.raf/presets/<name>.json`, write to `~/.raf/raf.config.json`, validate the loaded config
31
+ 5. Implement `list`: read `~/.raf/presets/` directory, for each file show name and brief summary (e.g., provider info from models)
32
+ 6. Implement `delete`: remove `~/.raf/presets/<name>.json` with confirmation
33
+ 7. Register the preset command in the main CLI entry point (likely `src/index.ts` or `src/cli.ts`)
34
+ 8. Add error handling for missing presets directory, invalid JSON, etc.
35
+ 9. Update README.md with preset command documentation
36
+
37
+ ## Acceptance Criteria
38
+ - [ ] `raf preset save claude-setup` saves current config as a named preset
39
+ - [ ] `raf preset load claude-setup` restores the saved config
40
+ - [ ] `raf preset list` shows all available presets
41
+ - [ ] `raf preset delete claude-setup` removes a preset
42
+ - [ ] Preset files stored in `~/.raf/presets/`
43
+ - [ ] Error messages for missing presets, invalid names
44
+ - [ ] Loaded config is validated before applying
45
+ - [ ] README.md updated with preset commands
46
+
47
+ ## Notes
48
+ - Look at how `src/utils/config.ts` reads/writes config files to follow existing patterns
49
+ - The config path is likely defined as a constant — reuse it
50
+ - For `list`, showing the provider from each model entry would help users identify presets at a glance
51
+ - Consider showing a diff or summary when loading a preset so users know what changed
@@ -0,0 +1,22 @@
1
+ # Project Decisions
2
+
3
+ ## For task 1, should bare `raf config` still launch the interactive config editor, with the flag behaviors becoming subcommands like `raf config get`, `raf config set`, and `raf config reset`?
4
+ do 'raf config wizard' (spell wizard right) instead for just 'raf config'
5
+
6
+ ## Should preset behavior stay otherwise identical after the move to `raf config preset save|load|list|delete`, and should the old top-level `raf preset` command be removed entirely with no compatibility shim?
7
+ yes behaviour identical to preset, but under config, raf preset should be removed
8
+
9
+ ## For tests, do you want just existing unit tests updated to the new API, or also new coverage for parsing/help/error behavior of the subcommands?
10
+ update existing
11
+
12
+ ## For docs, should README/help text just present the new commands, or include a short breaking-change/migration note too?
13
+ just new commands update
14
+
15
+ ## For the new name-generation task, should Codex-backed project naming produce 3–5 creative kebab-case suggestions like the Claude path, with permission to change Codex invocation and response parsing as needed while keeping Claude behavior unchanged and adding regression tests?
16
+ yes
17
+
18
+ ## When Codex name generation returns fewer than 3 valid suggestions, should RAF still use 1–2 valid Codex suggestions and only fall back to extracted input words when the CLI completely fails or produces no usable suggestions?
19
+ Use 1–2 valid Codex suggestions if that is all Codex returns, and only fall back to extracted input words when the CLI completely fails or produces no usable suggestions.
20
+
21
+ ## Should the Codex path keep the same name instructions and picker behavior as Claude, including 3–5 creative kebab-case suggestions, 1–3 words each, and the existing picker / auto-select-first flow?
22
+ same name instructions
@@ -0,0 +1,5 @@
1
+ change raf config api. it should be like this "raf config set ...", "raf config get" (flags replaced with commands), "raf config preset <preset commands and args>" (moving preset into config namespace), don't worry about breaking change
2
+
3
+ ---
4
+
5
+ - [ ] name generation with codex doesn't work, name suggestion only one line with first words from input
@@ -0,0 +1,19 @@
1
+ Implemented the `raf config` CLI refactor from flag-based behavior to explicit subcommands.
2
+
3
+ Key changes:
4
+ - Refactored [src/commands/config.ts](/Users/eremeev/projects/RAF/src/commands/config.ts) so `raf config` is now a namespace/help entry point with `get`, `set`, `reset`, and `wizard` subcommands.
5
+ - Preserved existing config read/write/reset/session helper behavior, including resolved dot-path reads, JSON-aware value parsing, schema validation, default-pruning, reset confirmation, and broken-config recovery for the interactive editor.
6
+ - Updated config-related user-facing text in [README.md](/Users/eremeev/projects/RAF/README.md), [src/prompts/config-docs.md](/Users/eremeev/projects/RAF/src/prompts/config-docs.md), and [src/commands/preset.ts](/Users/eremeev/projects/RAF/src/commands/preset.ts) to point users at `raf config wizard` / `raf config reset` instead of the removed flag API.
7
+ - Reworked [tests/unit/config-command.test.ts](/Users/eremeev/projects/RAF/tests/unit/config-command.test.ts) to cover the real subcommand API, including bare-help behavior, `get`, `set`, `reset`, and wizard recovery.
8
+ - Updated a few stale tests outside the config command area so the suite matches current CLI behavior and config-driven defaults: [tests/unit/planning-prompt.test.ts](/Users/eremeev/projects/RAF/tests/unit/planning-prompt.test.ts), [tests/unit/amend-prompt.test.ts](/Users/eremeev/projects/RAF/tests/unit/amend-prompt.test.ts), [tests/unit/name-generator.test.ts](/Users/eremeev/projects/RAF/tests/unit/name-generator.test.ts), and [tests/unit/claude-runner-interactive.test.ts](/Users/eremeev/projects/RAF/tests/unit/claude-runner-interactive.test.ts).
9
+ - Added agent notes in [CLAUDE.md](/Users/eremeev/projects/RAF/CLAUDE.md) documenting the prompt-test drift and the need to avoid hardcoded default-provider assumptions in config-sensitive tests.
10
+
11
+ Verification:
12
+ - `npm run lint`
13
+ - `npm test -- --watchman=false --runInBand tests/unit/config-command.test.ts`
14
+ - `npm test -- --watchman=false --runInBand`
15
+
16
+ Notes:
17
+ - Jest needed `--watchman=false` in this environment because watchman socket access is blocked in the sandbox.
18
+
19
+ <promise>COMPLETE</promise>
@@ -0,0 +1,17 @@
1
+ Implemented the preset command move from top-level `raf preset` to nested `raf config preset ...` while keeping preset storage and behavior unchanged.
2
+
3
+ Key changes:
4
+ - Updated `src/commands/config.ts` to register the existing preset command as a nested `config` subcommand.
5
+ - Updated `src/commands/preset.ts` help and runtime guidance so user-facing messages point to `raf config preset ...`.
6
+ - Removed the top-level preset command registration from `src/index.ts`.
7
+ - Updated `README.md` examples and command reference to document presets under `raf config`.
8
+ - Extended `tests/unit/config-command.test.ts` to cover nested preset registration, removal of the top-level command, nested preset save/load/list/delete behavior, and updated guidance strings.
9
+
10
+ Verification:
11
+ - `npm test -- --watchman=false --runInBand tests/unit/config-command.test.ts`
12
+ - `npm run lint`
13
+ - `npm test -- --watchman=false --runInBand`
14
+
15
+ Notes:
16
+ - Preset files remain stored at `~/.raf/presets/*.json`; only CLI topology and messaging changed.
17
+ <promise>COMPLETE</promise>
@@ -0,0 +1,14 @@
1
+ Verified the existing config command test coverage against the refactored config API and confirmed it already matches the planned subcommand-based surface.
2
+
3
+ Key points:
4
+ - `tests/unit/config-command.test.ts` already asserts `raf config` subcommand registration for `get`, `set`, `reset`, `wizard`, and nested `preset`.
5
+ - The suite already verifies that root-level `--get`, `--set`, and `--reset` behavior is gone and that top-level `raf preset` is not registered.
6
+ - Existing messaging assertions already cover the updated `raf config wizard`, `raf config reset`, and `raf config preset ...` guidance.
7
+
8
+ Verification:
9
+ - `npm test -- --watchman=false --runInBand tests/unit/config-command.test.ts`
10
+ - `npm run lint`
11
+
12
+ Notes:
13
+ - No additional code changes were required in this task because the dependency work had already aligned the existing test suite with the new config API.
14
+ <promise>COMPLETE</promise>
@@ -0,0 +1,11 @@
1
+ Updated the remaining config command documentation and help text so active user-facing references align with the subcommand-based config API.
2
+
3
+ Key changes:
4
+ - Updated [src/commands/config.ts](/Users/eremeev/projects/RAF/src/commands/config.ts) command descriptions so generated help text clearly describes the `get`, `set`, `reset`, `wizard`, and nested `preset` hierarchy.
5
+ - Updated [src/commands/preset.ts](/Users/eremeev/projects/RAF/src/commands/preset.ts) help text to describe presets as `raf config preset` subcommands.
6
+ - Updated [src/prompts/config-docs.md](/Users/eremeev/projects/RAF/src/prompts/config-docs.md) so the reset instructions point users to `raf config reset` instead of manually deleting the config file.
7
+
8
+ Notes:
9
+ - `README.md` already matched the new config command surface from earlier dependency work, so no additional README edits were required in this task.
10
+ - Verification completed with `npm test -- --watchman=false --runInBand tests/unit/config-command.test.ts` and `npm run lint`.
11
+ <promise>COMPLETE</promise>
@@ -0,0 +1,18 @@
1
+ Implemented the Codex name-generation fix so partial-but-usable model output is preserved instead of collapsing to the extracted-input fallback.
2
+
3
+ Key changes:
4
+ - Updated `src/utils/name-generator.ts` to use provider-specific CLI invocation for name generation:
5
+ - Claude keeps the existing `--model --no-session-persistence -p` flow.
6
+ - Codex now uses `codex exec --skip-git-repo-check --ephemeral --color never -m <model> <prompt>`.
7
+ - Relaxed `generateProjectNames()` so any non-empty sanitized suggestion list is returned, which allows 1-2 valid Codex names to reach the picker / auto-select flow.
8
+ - Kept extracted-word fallback behavior for genuine failure cases only, including CLI failure and outputs that sanitize down to zero usable names.
9
+ - Added focused regression coverage in `tests/unit/name-generator.test.ts` for Codex invocation, Codex partial-result retention, and Codex no-usable-output fallback.
10
+
11
+ Verification:
12
+ - `npm test -- --watchman=false --runInBand tests/unit/name-generator.test.ts`
13
+ - `npm run lint`
14
+ - `npm test -- --watchman=false --runInBand`
15
+
16
+ Notes:
17
+ - Claude-backed name generation behavior remains unchanged apart from sharing the same provider-aware helper.
18
+ <promise>COMPLETE</promise>
@@ -0,0 +1,37 @@
1
+ ---
2
+ effort: medium
3
+ ---
4
+ # Task: Restructure Config Command Into Subcommands
5
+
6
+ ## Objective
7
+ Replace the flag-driven `raf config` API with explicit subcommands for reading, writing, resetting, and interactive editing.
8
+
9
+ ## Context
10
+ `src/commands/config.ts` currently mixes interactive editing with `--get`, `--set`, and `--reset` flags on the root `config` command. The new API should be command-oriented instead: `raf config get`, `raf config set`, `raf config reset`, and `raf config wizard`. This is an intentional breaking change, so backward compatibility is not required.
11
+
12
+ ## Requirements
13
+ - Remove the root `--get`, `--set`, and `--reset` options from `raf config`.
14
+ - Add `raf config get [key]` for resolved-config reads, preserving current dot-notation lookup behavior.
15
+ - Add `raf config set <key> <value>` for writes, preserving current parsing, validation, and minimal-config-file behavior.
16
+ - Add `raf config reset` for deleting the config file with the current confirmation flow.
17
+ - Add `raf config wizard [prompt...]` as the only entry point for the interactive config editor.
18
+ - Do not launch the interactive editor from bare `raf config`; treat the root command as a namespace/help entry point.
19
+ - Preserve the current invalid-config recovery behavior for the interactive session, but update any user-facing messages that reference the old flag-based API.
20
+
21
+ ## Implementation Steps
22
+ 1. Refactor `src/commands/config.ts` so the root `config` command registers subcommands instead of root-level flags.
23
+ 2. Reuse the existing get/set/reset/session helper logic where possible rather than reimplementing behavior.
24
+ 3. Move the variadic prompt argument from the root command to the new `wizard` subcommand.
25
+ 4. Update command descriptions so `raf config --help` and `raf config <subcommand> --help` reflect the new API cleanly.
26
+ 5. Adjust user-facing error and warning strings in config flows that currently mention `raf config`, `--reset`, or the old flag forms.
27
+
28
+ ## Acceptance Criteria
29
+ - [ ] `raf config get` prints the resolved config, and `raf config get <dot.path>` prints the requested value.
30
+ - [ ] `raf config set <dot.path> <value>` updates the user config with the same validation and default-pruning behavior as before.
31
+ - [ ] `raf config reset` deletes the config file only after confirmation.
32
+ - [ ] `raf config wizard [prompt...]` launches the interactive editor and preserves broken-config recovery behavior.
33
+ - [ ] Bare `raf config` no longer launches the interactive editor.
34
+ - [ ] All tests pass.
35
+
36
+ ## Notes
37
+ The user explicitly wants `wizard` to replace the old bare interactive entry. Showing help from bare `raf config` is the sensible default if no subcommand is provided.
@@ -0,0 +1,38 @@
1
+ ---
2
+ effort: medium
3
+ ---
4
+ # Task: Move Preset Commands Under Config
5
+
6
+ ## Objective
7
+ Nest preset management under the `config` namespace as `raf config preset ...` while keeping preset behavior unchanged.
8
+
9
+ ## Context
10
+ RAF currently exposes presets as a top-level `raf preset` command implemented in `src/commands/preset.ts` and registered in `src/index.ts`. The desired API moves this functionality under `raf config preset`, and the old top-level command should be removed entirely.
11
+
12
+ ## Dependencies
13
+ 1
14
+
15
+ ## Requirements
16
+ - Keep preset behavior identical to the current implementation for `save`, `load`, `list`, and `delete`.
17
+ - Expose presets at `raf config preset save <name>`, `load <name>`, `list`, and `delete <name>`.
18
+ - Remove the top-level `raf preset` command and its registration from the CLI.
19
+ - Do not add a compatibility shim, alias, or deprecation path for `raf preset`.
20
+ - Update preset-related help text and runtime messages so they reference `raf config preset ...` instead of `raf preset ...`.
21
+ - Keep preset storage format and location unchanged at `~/.raf/presets/*.json`.
22
+
23
+ ## Implementation Steps
24
+ 1. Refactor `src/commands/preset.ts` so it can be registered as a nested `preset` subcommand under `config`.
25
+ 2. Wire the nested preset command into `src/commands/config.ts`.
26
+ 3. Remove the top-level preset command registration from `src/index.ts`.
27
+ 4. Update preset command descriptions and error/help strings that still point users to `raf preset ...`.
28
+ 5. Verify the nested command structure remains intuitive in Commander help output.
29
+
30
+ ## Acceptance Criteria
31
+ - [ ] `raf config preset save <name>` saves the current config exactly as the old preset command did.
32
+ - [ ] `raf config preset load <name>`, `list`, and `delete <name>` behave the same as before.
33
+ - [ ] `raf preset` is no longer registered as a top-level command.
34
+ - [ ] User-facing preset messages reference `raf config preset ...`.
35
+ - [ ] All tests pass.
36
+
37
+ ## Notes
38
+ This task should stay focused on command topology and message updates. Preset file semantics should not change.
@@ -0,0 +1,38 @@
1
+ ---
2
+ effort: low
3
+ ---
4
+ # Task: Update Existing Tests For New Config API
5
+
6
+ ## Objective
7
+ Align existing automated test coverage with the new subcommand-based config and preset command surface.
8
+
9
+ ## Context
10
+ The current tests in `tests/unit/config-command.test.ts` assert root-level `--get`, `--set`, and `--reset` options. There does not appear to be an existing dedicated preset test suite, and the user asked to keep test work limited to updating existing coverage rather than expanding into a broad new matrix.
11
+
12
+ ## Dependencies
13
+ 1, 2
14
+
15
+ ## Requirements
16
+ - Update existing unit tests to assert subcommand registration instead of the old root-level config flags.
17
+ - Keep test changes scoped to existing suites where practical.
18
+ - Cover the presence of `get`, `set`, `reset`, `wizard`, and nested `preset` under `config`.
19
+ - Remove or rewrite assertions that expect `raf preset` to exist as a top-level command.
20
+ - Update tests that reference old command descriptions, old usage strings, or old recovery/reset messaging.
21
+ - Avoid building a large new preset-specific behavior suite unless a minimal addition is necessary to keep the changed API covered.
22
+
23
+ ## Implementation Steps
24
+ 1. Update `tests/unit/config-command.test.ts` to reflect the new `config` subcommand structure.
25
+ 2. Adjust existing registration/setup assertions so they validate nested subcommands rather than root options.
26
+ 3. Update any existing tests that rely on old error/help text or old command examples.
27
+ 4. If no existing suite can reasonably assert removal of top-level `raf preset`, extend the nearest existing command-registration test with the minimum needed coverage.
28
+ 5. Run the relevant test suite and fix any fallout from renamed commands or changed help text.
29
+
30
+ ## Acceptance Criteria
31
+ - [ ] Existing tests no longer expect `--get`, `--set`, or `--reset` on the root `config` command.
32
+ - [ ] Existing tests cover `raf config wizard` and nested `raf config preset`.
33
+ - [ ] Existing tests no longer expect a top-level `raf preset` command.
34
+ - [ ] Test scope stays focused on updating current suites rather than adding a broad new matrix.
35
+ - [ ] All tests pass.
36
+
37
+ ## Notes
38
+ Because preset logic is intentionally unchanged, registration and API-surface coverage is more important here than duplicating all preset behavior tests from scratch.
@@ -0,0 +1,36 @@
1
+ ---
2
+ effort: low
3
+ ---
4
+ # Task: Update Config Command Docs
5
+
6
+ ## Objective
7
+ Refresh README and command/help text so the documented config workflow matches the new command hierarchy.
8
+
9
+ ## Context
10
+ The current docs still describe `raf config` as an interactive editor, document `--reset`, and present presets as `raf preset`. The user only wants the docs updated to the new commands; no migration note or compatibility guidance is needed.
11
+
12
+ ## Dependencies
13
+ 1, 2
14
+
15
+ ## Requirements
16
+ - Update `README.md` examples and command reference to use `raf config wizard`, `raf config get`, `raf config set`, `raf config reset`, and `raf config preset ...`.
17
+ - Remove README references to top-level `raf preset` and root-level config flags.
18
+ - Update Commander descriptions/help text so CLI help output matches the new hierarchy.
19
+ - Update internal user-facing config docs and strings that mention the old command surface, including prompt/reference content in `src/prompts/config-docs.md` where relevant.
20
+ - Do not add a breaking-change note, migration section, or compatibility note.
21
+
22
+ ## Implementation Steps
23
+ 1. Update `README.md` command overview, examples, and reference tables for the new config API.
24
+ 2. Update `src/commands/config.ts` and `src/commands/preset.ts` descriptions so generated help text matches the new structure.
25
+ 3. Sweep `src/prompts/config-docs.md` and nearby user-facing strings for stale references to bare `raf config`, `--reset`, and `raf preset`.
26
+ 4. Verify the documented commands and examples match the actual Commander registration after Tasks 1 and 2.
27
+
28
+ ## Acceptance Criteria
29
+ - [ ] `README.md` documents only the new config command forms.
30
+ - [ ] CLI help text reflects `wizard`, `get`, `set`, `reset`, and nested `preset`.
31
+ - [ ] No user-facing config docs still instruct users to run `raf preset` or `raf config --reset`.
32
+ - [ ] No migration note or compatibility section is added.
33
+ - [ ] All tests pass.
34
+
35
+ ## Notes
36
+ Keep the doc sweep scoped to active user-facing docs and help text. Archived `RAF/*` history should not be rewritten.
@@ -0,0 +1,49 @@
1
+ ---
2
+ effort: medium
3
+ ---
4
+ # Task: Fix Codex Project Name Generation
5
+
6
+ ## Objective
7
+ Make `raf plan` produce usable creative project name suggestions when `models.nameGeneration.provider` is `codex` instead of degrading to the extracted-input fallback.
8
+
9
+ ## Context
10
+ The current name-generation flow in `src/utils/name-generator.ts` only accepts model output when it can parse enough valid multiline suggestions. When that parsing fails, RAF falls back to `generateFallbackName()`, which just extracts the first meaningful words from the project description. That matches the user-reported Codex failure mode: name suggestion becomes a single low-quality line based on the input text rather than a real generated name.
11
+
12
+ This task is specifically about the Codex-backed name-generation path. The user wants Codex to follow the same naming instructions and UX as Claude: creative kebab-case suggestions, 1-3 words each, and the existing picker / auto-select-first behavior. If Codex returns only 1-2 valid suggestions, RAF should still use them instead of immediately falling back to extracted input words. The extracted-word fallback should remain only for hard failure or completely unusable output.
13
+
14
+ This work is independent from Tasks 1-4 in this project.
15
+
16
+ ## Requirements
17
+ - Keep the existing naming instructions and UX consistent with the Claude path:
18
+ - 3-5 creative kebab-case suggestions when available
19
+ - 1-3 words per name
20
+ - existing name picker behavior in interactive mode
21
+ - existing auto-select-first behavior in auto mode
22
+ - Fix the Codex name-generation path so `models.nameGeneration.provider = codex` produces usable suggestions instead of frequently collapsing into the extracted-input fallback.
23
+ - Adjust parsing/fallback behavior so 1-2 valid Codex suggestions are accepted and surfaced to the user when that is all Codex returns.
24
+ - Preserve the extracted-input fallback for genuine failure cases only, such as CLI failure or no usable suggestions after sanitization.
25
+ - Keep Claude-backed name generation behavior unchanged.
26
+ - Add focused regression coverage for Codex-specific invocation/parsing and the new partial-result fallback threshold.
27
+
28
+ ## Implementation Steps
29
+ 1. Inspect the current Codex name-generation execution path in `src/utils/name-generator.ts` and determine why Codex output is being reduced to fallback names.
30
+ 2. Update the Codex invocation and any provider-specific response handling needed so Codex can reliably return parsable multiline suggestions while preserving the existing prompt semantics.
31
+ 3. Refine `generateProjectNames()` so partial-but-usable model output (1-2 valid names) is retained instead of discarded in favor of the extracted-input fallback.
32
+ 4. Keep existing sanitization, deduplication, max-length, picker integration, and auto-select-first behavior intact for both providers.
33
+ 5. Add or update unit tests in the name-generation / planning command suites to cover:
34
+ - Codex provider invocation
35
+ - Codex multiline suggestion parsing
36
+ - acceptance of 1-2 valid suggestions
37
+ - fallback to extracted input words only when no usable model suggestions remain
38
+ 6. Run the relevant test suite and update any stale assertions tied to the old fallback threshold or provider assumptions.
39
+
40
+ ## Acceptance Criteria
41
+ - [ ] With `models.nameGeneration.provider` set to `codex`, `raf plan` produces creative suggestions instead of defaulting to a first-words-from-input name on partial model output.
42
+ - [ ] If Codex returns 1-2 valid suggestions, RAF uses those suggestions rather than falling back to extracted input words.
43
+ - [ ] If the Codex CLI call fails or produces no usable suggestions, RAF still falls back to the extracted-input name.
44
+ - [ ] Claude-backed name generation and the existing name picker / auto-select-first flow remain unchanged.
45
+ - [ ] Focused regression tests cover Codex provider behavior and partial-result handling.
46
+ - [ ] All tests pass.
47
+
48
+ ## Notes
49
+ Historical outcome docs elsewhere in `RAF/` may describe older provider-wiring behavior that no longer matches the current implementation. Verify the live code path before assuming prior fixes are still present.
@@ -0,0 +1,7 @@
1
+ # Project Decisions
2
+
3
+ ## For task 1: should the rename be strict and complete everywhere user-facing and internal, meaning config JSON, TypeScript property names, validation/error messages, README/examples, and tests all switch to `harness` with no `provider` mentions left except historical migration warnings if any remain?
4
+ yes, rename everythere
5
+
6
+ ## For task 2: do you want display normalization limited to the two places you named, or should the plan treat it as a global rule for all model display/log output where a model alias like `gpt54` could surface?
7
+ global rule
@@ -0,0 +1,2 @@
1
+ - [ ] in task status during 'raf do' is says: gpt54. i would like it to look like this "gpt-5.4", take model string from other place. same in "Generating project name suggestions with gpt54" in plan.
2
+ - [ ] in config rename provider to harness. no migration needed
@@ -0,0 +1,19 @@
1
+ # Outcome
2
+
3
+ ## Summary
4
+
5
+ Renamed RAF's per-model config schema from `provider` to `harness` across runtime code, prompts, documentation, and tests without adding compatibility shims. The validator now accepts only `harness`, runner creation and logging use `entry.harness`, and the docs/examples describe the new schema consistently.
6
+
7
+ ## Key Changes
8
+
9
+ - Updated config types and defaults to use `harness` in [src/types/config.ts](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/types/config.ts) and propagated that rename through config parsing, validation, merge logic, and model-spec parsing in [src/utils/config.ts](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/utils/config.ts).
10
+ - Renamed downstream runtime consumers in planning, execution, config, preset listing, runner creation, name generation, and validation so they use harness-based properties and wording.
11
+ - Rewrote user-facing docs and prompt material in [README.md](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/README.md), [src/prompts/config-docs.md](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/prompts/config-docs.md), and [CLAUDE.md](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/CLAUDE.md).
12
+ - Refreshed config, name-generation, execution-prompt, dependency, commit-planning, and runner tests to assert on `harness`, and isolated several suites from the machine's real `~/.raf` config so the renamed schema tests are stable.
13
+
14
+ ## Notes
15
+
16
+ - Verification required bootstrapping the worktree with `npm install` because `node_modules` was absent.
17
+ - Full verification completed with `npm run lint` and `NODE_OPTIONS='--experimental-vm-modules' npx jest --watchman=false`.
18
+
19
+ <promise>COMPLETE</promise>
@@ -0,0 +1,18 @@
1
+ # Outcome
2
+
3
+ ## Summary
4
+
5
+ Centralized user-facing model label formatting so compact aliases now render consistently across RAF command output. In particular, `gpt54` now displays as `gpt-5.4` in planning, execution status, config, and PR-generation logs, while concise Claude labels like `opus`, `sonnet`, and `haiku` remain short and readable.
6
+
7
+ ## Key Changes
8
+
9
+ - Added shared display helpers in `src/utils/config.ts` that derive user-facing model labels from the existing alias-to-full-ID mapping and support explicit full-ID rendering where needed.
10
+ - Updated user-facing model logging in `src/commands/plan.ts`, `src/commands/do.ts`, `src/commands/config.ts`, and `src/core/pull-request.ts` to use the centralized formatter instead of ad hoc alias shortening.
11
+ - Updated tests in `tests/unit/config.test.ts`, `tests/unit/terminal-symbols.test.ts`, and `tests/unit/command-output.test.ts` to cover normalized display names and canonical `gpt-5.4` task/status output.
12
+
13
+ ## Notes
14
+
15
+ - `npm run lint` passed.
16
+ - Full verification passed with `NODE_OPTIONS='--experimental-vm-modules' npx jest --watchman=false --runInBand`.
17
+
18
+ <promise>COMPLETE</promise>
@@ -0,0 +1,40 @@
1
+ ---
2
+ effort: high
3
+ ---
4
+ # Task: Rename Provider To Harness
5
+
6
+ ## Objective
7
+ Replace the `provider` terminology with `harness` everywhere in RAF's config schema, code, tests, prompts, and documentation without adding migration compatibility.
8
+
9
+ ## Context
10
+ RAF currently models Claude vs Codex selection through `provider` fields and related helper/type names across config parsing, runner creation, command logging, and docs. The user wants that terminology renamed everywhere, not just in JSON config examples. This is a deliberate breaking change for a greenfield project, so the implementation should fully adopt `harness` instead of carrying both terms or adding migration support.
11
+
12
+ ## Requirements
13
+ - Rename the per-model config field from `provider` to `harness` across the entire codebase.
14
+ - Rename internal TypeScript property names, helper parameters, validation paths, prompt/docs examples, README examples, and tests so `provider` is no longer the active term.
15
+ - Preserve existing behavior: RAF must still route model entries to the Claude or Codex CLI correctly after the rename.
16
+ - Do not add migration support, fallback parsing, or compatibility shims for the old `provider` key.
17
+ - Remove or rewrite validation/help text so user-facing config guidance refers to `harness`, not `provider`.
18
+ - Update `DEFAULT_CONFIG` in [src/types/config.ts](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/types/config.ts) to use the new key, per project instructions.
19
+ - Update `README.md` and generated config docs because this changes the config API.
20
+ - Refresh automated coverage for config validation, config resolution, command logging, and any other code paths that assert on model-entry property names.
21
+
22
+ ## Implementation Steps
23
+ 1. Refactor config types in [src/types/config.ts](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/types/config.ts) so model entries store `harness` instead of `provider`, and rename supporting types/interfaces/helpers where the old terminology is part of the public or internal API.
24
+ 2. Update config parsing, validation, and merge logic in [src/utils/config.ts](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/utils/config.ts) to accept only `harness`, reject stale `provider` keys naturally under the new schema, and keep scenario/effort resolution behavior intact.
25
+ 3. Rename downstream call sites in commands, runners, name generation, validation, and core orchestration so they consume `entry.harness` consistently instead of `entry.provider`.
26
+ 4. Update prompt/docs sources such as [src/prompts/config-docs.md](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/prompts/config-docs.md) and [README.md](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/README.md) to describe the new schema and examples using `harness`.
27
+ 5. Rewrite affected tests to assert on `harness` terminology and current config behavior instead of the removed `provider` field.
28
+ 6. Run the relevant test suites covering config, plan/do command model resolution, and docs/config command output; fix stale assertions that still encode the old terminology.
29
+
30
+ ## Acceptance Criteria
31
+ - [ ] Config files and defaults use `harness` instead of `provider`.
32
+ - [ ] Active code paths no longer rely on `entry.provider` or equivalent provider-named config properties.
33
+ - [ ] User-facing docs, prompts, examples, and error/help text describe `harness`, not `provider`.
34
+ - [ ] RAF still resolves Claude vs Codex execution correctly after the rename.
35
+ - [ ] Tests covering config validation/resolution and command behavior pass with the renamed schema.
36
+ - [ ] All tests pass
37
+
38
+ ## Notes
39
+ - Treat this as a full terminology migration inside the current codebase, not a narrow config-file alias.
40
+ - Because the user explicitly does not want migration support, avoid dual-read logic like `harness ?? provider`.
@@ -0,0 +1,41 @@
1
+ ---
2
+ effort: medium
3
+ ---
4
+ # Task: Normalize Model Display Names
5
+
6
+ ## Objective
7
+ Make all user-facing model labels flow through one centralized formatter so aliases like `gpt54` display as canonical names such as `gpt-5.4` during planning and execution.
8
+
9
+ ## Context
10
+ RAF currently mixes display helpers: some places show a full resolved model ID, while others call `getModelShortName()` and end up rendering compact aliases like `gpt54`. The user specifically called out `raf do` task status and the planning log line `Generating project name suggestions with gpt54`, and asked for this to become a global display rule rather than a one-off patch. The implementation should therefore centralize model display formatting and reuse existing model-resolution data instead of hardcoding the string in individual commands.
11
+
12
+ ## Dependencies
13
+ 1
14
+
15
+ ## Requirements
16
+ - Introduce or reuse a single helper for user-facing model labels instead of formatting aliases ad hoc at call sites.
17
+ - Ensure `gpt54` displays as `gpt-5.4` anywhere model names are shown to the user, including task status during `raf do` and planning logs during name generation.
18
+ - Apply the same centralized display rule to other command/log surfaces that currently expose model aliases, such as model-selection logs and verbose execution lines.
19
+ - Derive display names from the existing model alias/full-ID mapping source in config utilities rather than scattering special cases.
20
+ - Preserve the current UX where concise Claude labels like `opus`, `sonnet`, and `haiku` remain readable unless a surface already intentionally shows a full resolved model ID.
21
+ - Update tests that assert on task progress formatting, plan logging, config/model helper behavior, and any other user-facing model strings touched by the refactor.
22
+
23
+ ## Implementation Steps
24
+ 1. Audit current model-display call sites in [src/commands/plan.ts](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/commands/plan.ts), [src/commands/do.ts](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/commands/do.ts), [src/commands/config.ts](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/commands/config.ts), and any shared terminal helpers to identify where aliases are exposed directly.
25
+ 2. Add a centralized display formatter in [src/utils/config.ts](/Users/eremeev/.raf/worktrees/RAF/45-signal-cairn/src/utils/config.ts) or the most appropriate shared utility, backed by the existing alias-to-full-ID mapping so canonical display names come from one source.
26
+ 3. Replace direct `getModelShortName()` or equivalent alias formatting at user-facing log/status call sites with the new display helper, including the `raf do` status line and `raf plan` name-generation message.
27
+ 4. Keep intentionally full-ID surfaces intact where RAF already means to show the full resolved model, but route those decisions through explicit helper usage so the display policy is clear.
28
+ 5. Update and extend unit tests for config display helpers, terminal task-status formatting, and command output expectations so `gpt54` no longer appears in user-facing output.
29
+ 6. Run the relevant tests and tighten any stale assertions that still depend on alias-style display strings.
30
+
31
+ ## Acceptance Criteria
32
+ - [ ] `raf do` task status shows `gpt-5.4` instead of `gpt54` when the resolved model is the GPT-5.4 alias.
33
+ - [ ] `raf plan` logs `Generating project name suggestions with gpt-5.4...` when name generation uses that alias.
34
+ - [ ] User-facing model logging/status surfaces use one centralized display formatter instead of per-call-site alias handling.
35
+ - [ ] The formatter derives `gpt-5.4` from shared model metadata rather than a one-off string replacement in command code.
36
+ - [ ] Updated tests cover the new display behavior and pass.
37
+ - [ ] All tests pass
38
+
39
+ ## Notes
40
+ - The goal is display normalization, not a behavioral change to model resolution.
41
+ - Be careful not to regress surfaces that intentionally show full resolved IDs via `resolveFullModelId()`; unify the policy, not necessarily the exact string everywhere.
@@ -0,0 +1,10 @@
1
+ # Project Decisions
2
+
3
+ ## For task 1, what exact format do you want on the task line? Example: `● 01-auth-login (sonnet, low, fast) 12s`. Also, should this apply only to the compact running/completed/failed lines, or also to verbose `Model:` / retry logs?
4
+ In same places where currently model is specified. `● 01-auth-login (sonnet, low, fast) 12s`. Don't display `low` if null and `fast` if falsy (`null` or `false`).
5
+
6
+ ## For task 2, what should the research task answer definitively: only exact dollar cost, or any usable post-run signal from Codex such as tokens, usage limits, or credits?
7
+ Task is not research, do research now and say if it possible to get price in dollars and input output tokens count.
8
+
9
+ ## For task 3, if Codex can provide token counts but not exact price, should RAF still implement token-only summaries for Codex, or should price be shown only when it can be sourced exactly rather than estimated?
10
+ Only show price if we can source price exactly. Provide input and output tokens though.
@@ -0,0 +1,2 @@
1
+ - [ ] add effort to status line in do for each task where we show model. also indicate if it's fast mode (nothing if fast mode disabled)
2
+ - [ ] does codex have alternative to claude usage / price after execution? research first, create task if where is codex alternative
@@ -0,0 +1,15 @@
1
+ Implemented the `raf do` model display update so existing compact task lines and verbose model logs now append resolved reasoning effort and `fast` metadata when present.
2
+
3
+ Key changes:
4
+ - Updated [`src/utils/terminal-symbols.ts`](/Users/eremeev/.raf/worktrees/RAF/45-signal-lantern/src/utils/terminal-symbols.ts) to centralize model metadata formatting and allow compact task progress lines to render `(model, effort, fast)` while omitting unavailable metadata.
5
+ - Updated [`src/commands/do.ts`](/Users/eremeev/.raf/worktrees/RAF/45-signal-lantern/src/commands/do.ts) to thread resolved `reasoningEffort` and `fast` through running/completed/failed compact lines and through verbose `Model:` and retry logs.
6
+ - Added coverage in [`tests/unit/terminal-symbols.test.ts`](/Users/eremeev/.raf/worktrees/RAF/45-signal-lantern/tests/unit/terminal-symbols.test.ts), [`tests/unit/command-output.test.ts`](/Users/eremeev/.raf/worktrees/RAF/45-signal-lantern/tests/unit/command-output.test.ts), and new [`tests/unit/do-model-display.test.ts`](/Users/eremeev/.raf/worktrees/RAF/45-signal-lantern/tests/unit/do-model-display.test.ts).
7
+ - Updated [`README.md`](/Users/eremeev/.raf/worktrees/RAF/45-signal-lantern/README.md) to note the enriched non-verbose `raf do` task-line display.
8
+
9
+ Important notes:
10
+ - Verification commands could not run in this worktree because `node_modules` is absent, so local `jest` and `tsc` binaries were unavailable.
11
+ - Attempted verification:
12
+ - `npm test -- --runInBand tests/unit/terminal-symbols.test.ts tests/unit/command-output.test.ts tests/unit/do-model-display.test.ts` -> failed with `jest: command not found`
13
+ - `npm run lint` -> failed with `tsc: command not found`
14
+
15
+ <promise>COMPLETE</promise>
@@ -0,0 +1,15 @@
1
+ Implemented Codex post-run token usage capture so `codex exec --json` `turn.completed` events now feed RAF's shared usage pipeline instead of being dropped at the runner boundary.
2
+
3
+ Key changes:
4
+ - Updated `src/parsers/codex-stream-renderer.ts` to extract structured `UsageData` from `turn.completed`, including exact input/output token counts and model-scoped usage while leaving exact cost unavailable.
5
+ - Updated `src/core/codex-runner.ts` to retain streamed Codex usage data and return it through the normal `RunResult.usageData` path used by `raf do`.
6
+ - Refined shared usage/cost types and accumulation in `src/types/config.ts`, `src/utils/token-tracker.ts`, and `src/utils/terminal-symbols.ts` so unknown exact cost remains unavailable across retries and summaries instead of rendering as a fake exact zero.
7
+ - Added coverage in `tests/unit/codex-stream-renderer.test.ts`, new `tests/unit/codex-runner.test.ts`, `tests/unit/token-tracker.test.ts`, and `tests/unit/terminal-symbols.test.ts`.
8
+
9
+ Important notes:
10
+ - Acceptance criteria around Codex input/output token capture, runner propagation, retry accumulation, and unavailable-cost handling were implemented in code and covered by new/updated unit tests.
11
+ - Verification was limited by the worktree environment because `node_modules` is absent.
12
+ - Attempted verification:
13
+ - `npm test -- --runInBand tests/unit/codex-stream-renderer.test.ts tests/unit/codex-runner.test.ts tests/unit/token-tracker.test.ts tests/unit/terminal-symbols.test.ts` -> failed with `jest: command not found`
14
+ - `npm run lint` -> failed with `tsc: command not found`
15
+ <promise>COMPLETE</promise>