/ultracode authors + saves a workflow as a /<name> command (don't auto-run) - #330
Merged
Merged
Conversation
… (don't auto-run) Per user feedback: /ultracode should be a workflow *generator*, not a one-shot launcher. Reshape it to author a reusable pipeline and SAVE it, so the user runs it themselves via /<name> exactly like /deep-research — instead of immediately launching a background run. - Directive (workflows_integration._ULTRACODE_DIRECTIVE): author a sandboxed Python workflow script mirroring src/workflow/bundled/deep_research.py, choose a kebab-case name, Write it to .claude/workflows/<name>.py, and tell the user to run /<name>. Explicitly does NOT call the Workflow tool / does NOT run it. Command description updated to "...save it as a /<name> command". - In-session pickup (repl/core._refresh_workflow_commands): a workflow just saved to .claude/workflows/ becomes a dispatchable + autocompleting /<name> this session (no restart). mtime-gated on the project + personal dirs; registers into the global registry (dispatch + suggestions) and the local one (bare /<name> routes to execution, parity with /deep-research). Called at the run-loop top. The saved file is turned into /<name> by the #303 discovery loader, whose directive runs the existing script via the Workflow tool with script_path — the same mechanism as /deep-research. Verified end-to-end. Tests: directive authors+saves (not launches); _refresh_workflow_commands picks up a new file → /<name> dispatchable + in _built_in_commands; mtime gate no-ops on no change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
peroxider
pushed a commit
to peroxider/clawcodex
that referenced
this pull request
Jun 15, 2026
… authors + saves a /<name> Follow the actual Claude Code approach: ultracode is triggered by the KEYWORD in a prompt, never a slash command. Revert the /ultracode slash command (agentforce314#329/agentforce314#330/agentforce314#331) and route everything through the keyword. - Remove the /ultracode PromptCommand + its directive from workflows_integration.py; bundled_workflow_commands() now contributes only /workflows + /deep-research. - src/workflow/ultracode.py: the keyword reminder (and the /effort ultracode session reminder) now instruct the model to AUTHOR a workflow and SAVE it to .claude/workflows/<name>.py (then run via /<name>) — not run it inline. Keeps the blunt imperative + inline skeleton + anti-tool-hunt language ("no ultracode tool/ skill, do NOT use ToolSearch") that a live failure showed is necessary. The saved file becomes /<name> via load_and_register_workflows, picked up mid-session by _refresh_workflow_commands (unchanged), so the keyword -> /<name> handoff works without a restart — like /deep-research. Tests: assert there is NO /ultracode command (keyword-only); keyword reminder is the author+save imperative; existing keyword detection / session-mode / refresh / effort tests still pass. Full sweep: 267 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
…code-saves-workflow /ultracode authors + saves a workflow as a /<name> command (don't auto-run)
singlaamitesh
pushed a commit
to singlaamitesh/clawcodex
that referenced
this pull request
Jul 7, 2026
… authors + saves a /<name> Follow the actual Claude Code approach: ultracode is triggered by the KEYWORD in a prompt, never a slash command. Revert the /ultracode slash command (agentforce314#329/agentforce314#330/agentforce314#331) and route everything through the keyword. - Remove the /ultracode PromptCommand + its directive from workflows_integration.py; bundled_workflow_commands() now contributes only /workflows + /deep-research. - src/workflow/ultracode.py: the keyword reminder (and the /effort ultracode session reminder) now instruct the model to AUTHOR a workflow and SAVE it to .claude/workflows/<name>.py (then run via /<name>) — not run it inline. Keeps the blunt imperative + inline skeleton + anti-tool-hunt language ("no ultracode tool/ skill, do NOT use ToolSearch") that a live failure showed is necessary. The saved file becomes /<name> via load_and_register_workflows, picked up mid-session by _refresh_workflow_commands (unchanged), so the keyword -> /<name> handoff works without a restart — like /deep-research. Tests: assert there is NO /ultracode command (keyword-only); keyword reminder is the author+save imperative; existing keyword detection / session-mode / refresh / effort tests still pass. Full sweep: 267 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.
Why
Follow-up to #329. You asked:
/ultracode"should only author the multi-agent workflow. Don't immediately run it. Instead, it will add a dynamic workflow to a slash command to run it, similar to the way we run /deep-research."#329 made
/ultracodeauthor and immediately launch a background run. This reshapes it into a workflow generator.New behavior
_ULTRACODE_DIRECTIVE): author a sandboxed-Python workflow mirroringsrc/workflow/bundled/deep_research.py, pick a kebab-case name, Write it to.claude/workflows/<name>.py, and tell the user to run/<name>. Explicitly does NOT call the Workflow tool / does NOT run it. Description → "Author a multi-agent workflow (pipeline) and save it as a / command"._refresh_workflow_commands): a workflow just saved becomes a dispatchable + autocompleting/<name>this session, no restart. mtime-gated on the project + personal.claude/workflowsdirs; registers into the global registry (dispatch + suggestions) and the local one (bare/<name>routes to execution, parity with/deep-research). Runs at the REPL loop top.The saved file →
/<name>is handled by the #303 discovery loader, whose directive runs the existing script via the Workflow tool withscript_path— the same mechanism as/deep-research.Verified end-to-end
Honest caveat
Tests + empirical checks cover the plumbing (directive content, save target, in-session registration, the
/<name>run-directive). Whether the model writes a valid sandboxed-Python script to.claude/workflows/is model behavior — I point it atdeep_research.pyas the template, but I haven't watched a live/ultracodeauthor-then-run round-trip.🤖 Generated with Claude Code