Skip to content

feat(cli): add /diff, /release-notes and /bug slash commands (Codex + Claude parity)#150

Merged
oratis merged 2 commits into
mainfrom
feat/cli-slash-parity
Jun 3, 2026
Merged

feat(cli): add /diff, /release-notes and /bug slash commands (Codex + Claude parity)#150
oratis merged 2 commits into
mainfrom
feat/cli-slash-parity

Conversation

@oratis
Copy link
Copy Markdown
Owner

@oratis oratis commented Jun 2, 2026

Summary

Codex and Claude Code both expose /diff and /release-notes; Claude also has /bug (/feedback). DeepCode had none. This adds all three to the REPL:

  • /diffgit status --short + git diff HEAD (truncated to 300 lines) + untracked files, in the session cwd. Prints a clean message outside a git repo.
  • /release-notes — prints the latest CHANGELOG.md section (walks up from cwd to find it).
  • /bug (alias /feedback) — prints a prefilled github.com/oratis/deepcode/issues/new link carrying the current model/mode/effort.

git is spawned with GIT_* stripped from the env (inlined locally to keep this PR independent of #149) so a leaked GIT_DIR can't redirect the call.

Test plan

  • pnpm typecheck
  • pnpm --filter deepcode-cli test — 107 passing, incl. 6 new tests (/diff in a real temp git repo + non-git dir, /release-notes latest-section + missing-file, /bug link + /feedback alias)
  • prettier --check + eslint clean
  • CI green (ubuntu + macOS)

Documentation

  • /help lists them automatically. BEHAVIOR_PARITY.md rows (which mark /bug, /release-notes as missing) are updated in the separate docs-sync PR.

Release notes label

  • release-notes:feature

Related

Codex/Claude Code/DeepCode capability-alignment review. Parity: /diff (Codex+Claude), /release-notes (Claude), /bug /feedback (Claude).

… Claude parity)

Codex and Claude Code both expose /diff and /release-notes; Claude also has
/bug (/feedback). DeepCode had none of them.

- /diff: `git status --short` + `git diff HEAD` (truncated to 300 lines) +
  untracked files, in the session cwd. Clean message outside a git repo.
- /release-notes: prints the latest CHANGELOG.md section (walks up from cwd).
- /bug (alias /feedback): prints a prefilled github.com/oratis/deepcode issue
  link, carrying the current model/mode/effort in the body.

git is spawned with GIT_* stripped from the env (inlined to keep this PR
independent of #149) so a leaked GIT_DIR can't redirect it. Adds 6 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@oratis oratis merged commit 6c05681 into main Jun 3, 2026
@oratis oratis deleted the feat/cli-slash-parity branch June 3, 2026 17:07
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