Skip to content

fix(cli): derive /effort table from core EFFORT_PARAMS (single source of truth)#147

Merged
oratis merged 1 commit into
mainfrom
fix/cli-effort-tiers-ssot
Jun 3, 2026
Merged

fix(cli): derive /effort table from core EFFORT_PARAMS (single source of truth)#147
oratis merged 1 commit into
mainfrom
fix/cli-effort-tiers-ssot

Conversation

@oratis
Copy link
Copy Markdown
Owner

@oratis oratis commented Jun 2, 2026

Summary

The CLI /effort picker hardcoded a maxTokens/temperature table that diverged from EFFORT_PARAMS in @deepcode/core — so /effort told users "max = 32768 tokens, temp 0.7" while the REPL and headless paths actually sent max_tokens=8192, temperature=0.8. The desktop UI already reads the real values; only the CLI lied. This derives the picker rows from EFFORT_PARAMS so there is one source of truth, keeping only the human-readable use-case hint CLI-local.

Test plan

  • pnpm typecheck
  • pnpm --filter deepcode-cli test — 102 passing, incl. a new regression test
  • pnpm lint + prettier --check clean
  • CI green (ubuntu + macOS)

New test /effort table reflects core EFFORT_PARAMS (single source of truth) asserts every tier renders the real maxTokens/temperature and that the stale numbers (32768/16384) never reappear.

Documentation

  • N/A — internal correctness fix, no user-facing surface change

Release notes label

  • release-notes:fix

Related

Discovered during a Codex / Claude Code / DeepCode capability-alignment review.

… of truth)

The /effort picker hardcoded a maxTokens/temperature table (low=1024 … max=32768,
temps 0.0–0.7) that diverged from EFFORT_PARAMS in @deepcode/core — the values the
REPL and headless paths actually send to DeepSeek (low=1500 … max=8192, temps
0.2–0.8). Users running /effort saw "max = 32768 tokens, temp 0.7" while the
provider really capped at 8192 tokens, temp 0.8 — pure misinformation.

Derive the picker rows from EFFORT_PARAMS so there is one source of truth; keep
only the human-readable use-case hint CLI-local. Adds a regression test asserting
the rendered table matches EFFORT_PARAMS and never shows the stale numbers.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@oratis oratis merged commit 2d01b5d into main Jun 3, 2026
3 checks passed
@oratis oratis deleted the fix/cli-effort-tiers-ssot branch June 3, 2026 17:04
oratis added a commit that referenced this pull request Jun 4, 2026
…code (#154)

* docs(behavior-parity): audit slash-command + CLI-flag tables against code

Reconcile docs/BEHAVIOR_PARITY.md with the actual source. Verified every row
in the Slash-commands, CLI-flags, and Tools tables by grepping the code rather
than trusting the doc.

Slash commands (apps/cli/src/commands.ts BUILTIN_COMMANDS):
- /init  🔄 → ✅  — runInitFlow is a real 3-phase REPL flow (scan → draft →
  approve-write AGENTS.md), wired in repl.ts; no longer a stub.
- /bug  ✗ → ✅  and  /release-notes  ✗ → ✅  — both registered since PR #150.
- /upgrade  ✓/🟡 → ✗/🔄  — there is no /upgrade slash command; it is the
  `deepcode upgrade` CLI subcommand (cli.ts) that prints an upgrade hint.
- add missing rows: /diff (✅, PR #150) and /keybindings (🆕, DeepCode-only).
- /effort wording: CLI prints the EFFORT_PARAMS-derived tier table (PR #147).
- header count ~20 → ~28 shipped.
- genuinely-missing commands kept 🔄 (/btw /recap /voice /teleport /desktop
  /background /batch /tasks /plan /login /logout /pr_comments /terminal-setup
  /privacy-settings /migrate-installer); skill-backed kept 🟡 (/review,
  /security-review, /schedule, /loop — skills confirmed under packages/core/skills).

CLI flags (apps/cli/src/parse-args.ts + cli.ts):
- split `--mode` / `--permission-mode`: the latter is parsed + validated but
  never consumed (cli.ts forwards only args.mode) → 🔄 not wired.
- add `-C` / `--cd <dir>` (✅, wired via process.chdir in cli.ts, PR #148).

Tools table (de-staled by PR #151) re-verified row-by-row — all markers hold:
TaskTool + ctx.runSubAgent (agent.ts), all 7 TASK_TOOLS, NotebookEdit,
AskUserQuestion, Enter/ExitPlanMode, Enter/ExitWorktree, ToolSearch, Cron*;
ScheduleWakeup correctly ⚠️ (not a tool — use CronCreate).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* docs(behavior-parity): fix /keybindings — it's a Claude Code built-in, not DeepCode-only

Verified against Claude Code's built-in command set: /keybindings ships in
Claude Code ("open or create your keybindings config file"). DeepCode's
/keybindings only lists bindings (read-only; edit ~/.deepcode/keybindings.json
by hand), so mark it ✓ / ✓ (read-only) / 🟡 — same shape as /config and
/permissions — rather than 🆕 DeepCode-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: t <t@t>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant