Register bundled /deep-research into the REPL/TUI command surface - #267
Merged
Conversation
The workflow slash commands (e.g. /deep-research) were produced by the aggregator's get_commands(), but nothing consumes get_commands() for the REPL/TUI command surface: suggestions (build_command_suggestions) and dispatch (execute_command_async) read the GLOBAL command registry that register_builtin_commands populates. So /deep-research had no autocomplete and, when typed, fell through to the model as raw text — which improvised a bogus "Skill" call — instead of injecting the Workflow-tool directive. Surface the cwd-independent bundled workflow commands via get_builtin_commands() (gated by is_workflows_enabled(), mirroring the BUDDY_COMMAND pattern), so they register into the global registry both suggestions and dispatch read. /deep-research now autocompletes and dispatches its directive correctly. cwd-dependent project/personal workflows remain the aggregator's concern (a global singleton can't hold per-cwd commands) — a follow-up. Tests: present-when-enabled / absent-when-disabled / resolved-by-global- registry-with-Workflow-directive. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The /workflows list command was likewise absent from the global registry, so the REPL fell through to the help listing instead of showing runs. Add WORKFLOWS_COMMAND to bundled_workflow_commands() so it dispatches in the REPL (reading runtime_tasks via the command context's tool_context). The TUI keeps its open_dialog fast-path (runs before registry dispatch), and command suggestions dedupe by name so /workflows isn't listed twice. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 11, 2026
peroxider
pushed a commit
to peroxider/clawcodex
that referenced
this pull request
Jun 15, 2026
…oring keyword Closes two gaps in the workflow-engine port (workflow-engine.md §4.1 + §4.7), audited and planned in docs/workflow-commands-and-ultracode-plan.md. 1. Dynamic workflow slash commands were discovered but never dispatchable. load_workflow_commands fed only the aggregator's get_commands(), which has no real REPL consumers, so saved .claude/workflows/*.py never reached the global registry that dispatch + suggestions read (the same orphaning that hid /deep-research until agentforce314#267). Add load_and_register_workflows(registry=None) — mirroring load_and_register_skills, same shadowing guard (builtins/bundled win; project beats personal) — and call it at REPL (_init_command_system) and TUI (app.py) startup. Saved workflows now dispatch AND autocomplete (workflow tag). Confirmed end-to-end: a saved file that was `dispatch: False` is now registered, suggested, and tagged. 2. The `ultracode` authoring keyword (§4.1) was never built (0 hits in src/). New src/workflow/ultracode.py: the standalone `\bultracode\b` keyword in a prompt (one-shot) and `/effort ultracode` (session-long mode) append a <system-reminder> nudging the model to author a workflow via the Workflow tool instead of working turn by turn. Wired into REPL chat() (next to the companion-intro append) and effort_command.py. Gated by is_workflows_enabled() — §4.8: the keyword no-ops and the option leaves the /effort menu when off. (Python's effort pipeline is inert, so /effort ultracode contributes the orchestration mode only, not a reasoning level.) Tests (48 new): saved-workflow registration + precedence + gating (test_workflow_dynamic_commands.py); keyword detection, reminder precedence, session toggle, and /effort ultracode (test_ultracode.py). Three base-effort picker tests gated to workflows-off so they keep asserting the bare option set (ultracode-in-menu is covered separately). Full sweep: 299 passed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
singlaamitesh
pushed a commit
to singlaamitesh/clawcodex
that referenced
this pull request
Jul 7, 2026
…deep-research-slash-command Register bundled /deep-research into the REPL/TUI command surface
singlaamitesh
pushed a commit
to singlaamitesh/clawcodex
that referenced
this pull request
Jul 7, 2026
…oring keyword Closes two gaps in the workflow-engine port (workflow-engine.md §4.1 + §4.7), audited and planned in docs/workflow-commands-and-ultracode-plan.md. 1. Dynamic workflow slash commands were discovered but never dispatchable. load_workflow_commands fed only the aggregator's get_commands(), which has no real REPL consumers, so saved .claude/workflows/*.py never reached the global registry that dispatch + suggestions read (the same orphaning that hid /deep-research until agentforce314#267). Add load_and_register_workflows(registry=None) — mirroring load_and_register_skills, same shadowing guard (builtins/bundled win; project beats personal) — and call it at REPL (_init_command_system) and TUI (app.py) startup. Saved workflows now dispatch AND autocomplete (workflow tag). Confirmed end-to-end: a saved file that was `dispatch: False` is now registered, suggested, and tagged. 2. The `ultracode` authoring keyword (§4.1) was never built (0 hits in src/). New src/workflow/ultracode.py: the standalone `\bultracode\b` keyword in a prompt (one-shot) and `/effort ultracode` (session-long mode) append a <system-reminder> nudging the model to author a workflow via the Workflow tool instead of working turn by turn. Wired into REPL chat() (next to the companion-intro append) and effort_command.py. Gated by is_workflows_enabled() — §4.8: the keyword no-ops and the option leaves the /effort menu when off. (Python's effort pipeline is inert, so /effort ultracode contributes the orchestration mode only, not a reasoning level.) Tests (48 new): saved-workflow registration + precedence + gating (test_workflow_dynamic_commands.py); keyword detection, reminder precedence, session toggle, and /effort ultracode (test_ultracode.py). Three base-effort picker tests gated to workflows-off so they keep asserting the bare option set (ultracode-in-menu is covered separately). Full sweep: 299 passed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Typing
/deep-research …in a session did nothing useful: no autocomplete for/deep-, and the command "ran" as a bogusSkillcall with the model narrating fake progress./workflowslikewise showed only a help listing.Root cause
The workflow slash commands (
/deep-research,/workflows) are produced by the command aggregator (get_commands()), but nothing consumesget_commands()for the actual command surface:build_command_suggestions) source from a hardcoded builtin list + the global command registry + skills.execute_command_async) reads the global command registry.Both read the global registry, which
register_builtin_commandspopulates — and the workflow commands were never registered there. So/deep-researchwas invisible to autocomplete and fell through to the model as raw text (which improvised aSkillcall), and/workflowsfell through to the help listing.(All prior workflow testing drove
run_workflowdirectly, never the slash-command path — so this gap wasn't caught.)Fix
Surface the cwd-independent bundled workflow commands through
get_builtin_commands(), gated byis_workflows_enabled()(mirrors theBUDDY_COMMANDpattern). They now register into the global registry that both suggestions and dispatch read:/deep-researchautocompletes and injects the "Call the Workflow tool withscript_path…" directive (verified working end-to-end: the model launches the Workflow tool)./workflowsdispatches in the Rich REPL, readingruntime_tasksvia the command context'stool_contextto list running/recent runs. The TUI keeps itsopen_dialogfast-path (runs before registry dispatch); suggestions dedupe by name so/workflowsisn't doubled.Tests
tests/test_workflow_command_registration.py— present/absent by gate, both commands resolved by the global registry, the deep-research directive, and the/workflowsviewer listing a run. 68 command-system tests pass.Known follow-up (out of scope)
cwd-dependent project/personal workflows (
.claude/workflows/*.py) still only live in the aggregator — a global singleton can't hold per-cwd commands; wiring those into the session needs a cwd-aware step.🤖 Generated with Claude Code