Feature: dynamic workflows (Claude Code parity)

未关闭
#1,116 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript

调研方向

Start by reading the existing agent and agent_output delegation entry points, then trace how the CLI handles background work and interactive views. The issue describes a new workflow script API, resumable orchestration, progress controls, and workflow storage, but does not identify files or tests; first map the relevant subsystems and discuss scope with maintainers. Done means scripts can fan out agents and return a final result, with saved runs and the requested controls covered by tests.

由索引模型根据 Issue 内容生成。

描述

Feature Description

Add dynamic workflows, like Claude Code's: a workflow tool that takes a JavaScript orchestration script, runs it in the background, and fans work out across dozens to hundreds of subagents. Intermediate results stay in script variables, so the main session only receives the final answer and stays responsive while agents run.

The script gets a small API: agent(prompt, opts) to spawn one subagent (optionally returning JSON that matches a schema), pipeline(items, fn) and parallel([...]) to fan out, and phase() / log() for progress. A /workflows view shows phases and per-agent progress, with pause, stop, restart, and save.

Runs can be saved to .commandcode/workflows/ (project) or ~/.commandcode/workflows/ (personal) and re-run as /<name>.

Use Case

Today delegation is turn-by-turn through agent / agent_output: one prompt at a time, and every result lands back in the parent's context. That doesn't fit tasks needing more agents than one conversation can coordinate:

  • audit every route handler for missing auth, then verify each finding
  • migrate hundreds of files, each in its own isolated copy
  • review every changed file in a PR and merge the findings into one ranked summary
  • keep fixing type errors until tsc --noEmit passes or two rounds make no progress

A workflow moves the plan into code, so the orchestration is repeatable and the parent context holds only the final report.

Additional Context

Reference behavior and API: https://code.claude.com/docs/en/workflows

Minimal script shape:

export const meta = { name: 'audit-routes', description: 'Audit handlers for missing auth' }

const { files } = await agent('List every .ts file under src/routes/.', {
  schema: { type: 'object', required: ['files'], properties: { files: { type: 'array', items: { type: 'string' } } } },
})

const audits = await pipeline(files, (file) =>
  agent(`Audit ${file} for missing authentication checks.`, { label: file }),
)

return audits.filter(Boolean)

Worth keeping from the reference design: approval before the first launch, resumable runs (completed agents return cached results on relaunch), a configurable concurrency cap (default ~16), and a total-agent cap. The script itself should have no filesystem or shell access — agents do the work.

How important is this to you?

Important for my workflow

主要语言
没有语言数据
星标
4.2k
派生
377
平均合并
1 天 17 分钟
30 天内合并 PR
7

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CommandCodeAI/command-code 的其他 Issue

查看 CommandCodeAI/command-code 的全部 Issue

相似的 Issue

更多 AI Infra & Agents Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。