hermes-agent/skills
teknium1 0fa5e41c86 feat(diff): cross-surface /diff with staged/all/session modes
Widen the cherry-picked /diff base (#4839 by @SHL0MS) into one
cross-surface implementation, folding in the review feedback and the
best ideas from the two sibling PRs (#22703, #53527):

- tools/working_diff.py: shared git collection layer — unstaged
  (default), staged, and all (vs HEAD) modes; untracked files folded in
  via `git diff --no-index` so new files appear as additions (Codex
  /diff parity); shlex-split arguments preserve quoted paths.
- CLI: handler moved to hermes_cli/cli_commands_mixin.py per the
  current god-file decomposition (dispatch stays in cli.py), renders
  through the rich console with a 400-line terminal-flood guard.
- Gateway: _handle_diff_command in gateway/slash_commands.py + dispatch
  in gateway/run.py; fenced ```diff output truncated to 60 lines /
  3000 chars before the platform senders apply their own per-platform
  message clamps (tool-progress-style layered truncation). Localized
  strings in all 17 locale catalogs.
- /diff session (from #53527): cumulative checkpoint-baseline diff of
  everything Hermes changed, via new CheckpointManager.session_diff();
  docstring records the retained-baseline approximation caveat from
  review. Works on both surfaces; degrades with an actionable message
  when checkpoints are off.
- Slack: /diff routed via /hermes diff (50-slash cap; keeps
  telegram-parity test green and /version native).
- Registry: cross-surface CommandDef with staged|all|session
  subcommands; docs: slash-commands reference (CLI + gateway tables +
  both-surfaces list) and hermes-agent skill reference.
- Tests: tests/tools/test_working_diff.py (real git repos),
  tests/hermes_cli/test_diff_command.py (real git + stubbed checkpoint
  manager), tests/gateway/test_diff_command.py (end-to-end handler,
  real checkpoint store), TestSessionDiff in
  tests/tools/test_checkpoint_manager.py.

Salvaged from the /diff PR cluster #4839 + #22703 + #53527.

Co-authored-by: Ninso112 <ninso112@proton.me>
Co-authored-by: Harshkamdar67 <harshkamdar67@gmail.com>
2026-07-26 18:28:20 -07:00
..
apple fix(skills): sync bundled + misc CLI skills to current upstream 2026-07-24 08:29:59 -07:00
autonomous-ai-agents feat(diff): cross-surface /diff with staged/all/session modes 2026-07-26 18:28:20 -07:00
creative fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
email docs(skills): fix himalaya CLI arg order and download flag 2026-06-20 20:42:49 -07:00
github fix(skills/github): resolve .env via HERMES_HOME, not hardcoded ~/.hermes 2026-06-10 15:10:11 -07:00
index-cache Release set of skills 2026-02-25 05:21:17 -08:00
media refactor(skills): move heartmula + audiocraft to optional-skills/creative 2026-07-23 19:47:21 -07:00
mlops fix(skills): sync bundled + misc CLI skills to current upstream 2026-07-24 08:29:59 -07:00
note-taking fix(skills): widen HERMES_HOME-aware .env resolution to all sibling skills 2026-06-10 15:10:11 -07:00
productivity fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
research docs(skills): fix broken related_skills references (#37338) 2026-07-24 07:54:05 -07:00
smart-home fix(skills): sync bundled + misc CLI skills to current upstream 2026-07-24 08:29:59 -07:00
social-media fix(skills): keep xurl SKILL self-contained; move x_search routing to gated surfaces 2026-07-23 21:06:47 -07:00
software-development docs(skills): fix remaining 13 broken related_skills refs repo-wide 2026-07-24 07:54:05 -07:00