diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8fbc5d930..59c972b14 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -19,6 +19,7 @@ body: - Local — Codex - Local — Cursor - Local — Claude Code + - Local — DeepSeek Harness - Local — installer / CLI validations: required: true diff --git a/docs/local/editions.md b/docs/local/editions.md index 0dfeaf3bd..bd1f1c9e4 100644 --- a/docs/local/editions.md +++ b/docs/local/editions.md @@ -6,7 +6,7 @@ LoopForge Local 内置两套工作流,源码位于 `local/`。为避免同一 | Edition | 仓库事实源 | 入口 | 维护方式 | | --- | --- | --- | --- | -| Portable | `skills/` | CodeBuddy/Cursor/Claude/DeepSeek Harness/Hermes 使用 `/devflow`,Codex 使用 `$devflow`,Pi 使用 `/skill:devflow` | 修改 canonical Skill 和 adapter manifest | +| Portable | `skills/` | CodeBuddy/Cursor/Claude/Hermes 使用 `/devflow`,Codex 使用 `$devflow`,Pi 使用 `/skill:devflow`;DeepSeek Harness 通过技能工具或技能目录调用 `devflow` | 修改 canonical Skill 和 adapter manifest | | Classic(默认) | `.codebuddy/`、`.codex/`、`.cursor/`、`.claude/` | CodeBuddy/Cursor/Claude 使用 `/start-devflow`,Codex 使用 `$devflow-codex` | 以 `.codebuddy` 为参考行为;Cursor/Claude 由生成器产生 | 表中路径均相对于 `local/`。安装器将对应资产安装到目标项目的宿主原生目录, diff --git a/docs/local/usage.md b/docs/local/usage.md index 3cd48a933..6cb77c352 100644 --- a/docs/local/usage.md +++ b/docs/local/usage.md @@ -23,7 +23,7 @@ Requires Node.js 20+ and Python 3.8+. Replace `X.Y.Z` in the commands below with | Codex | `npx -y loopforge-cli@X.Y.Z install codex` | `$devflow-codex ""` | | Cursor | `npx -y loopforge-cli@X.Y.Z install cursor` | `/start-devflow ""` | | Claude Code | `npx -y loopforge-cli@X.Y.Z install claude` | `/start-devflow ""` | -| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | `/devflow ""` | +| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | Ask DSH to use the `devflow` Skill with your request | | Hermes Agent | `npx -y loopforge-cli@X.Y.Z skills install hermes` then `hermes skills trust .` | `/devflow ""` | For example, with Claude Code: @@ -149,7 +149,7 @@ Use the Portable Edition for the portable Agent Skills workflow. To prevent one | Cursor | `npx -y loopforge-cli@X.Y.Z skills install cursor` | `/devflow ""` | | Claude Code | `npx -y loopforge-cli@X.Y.Z skills install claude` | `/devflow ""` | | Pi | `npx -y loopforge-cli@X.Y.Z skills install pi`, then `pi install npm:pi-subagents` | `/skill:devflow ""` | -| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | `/devflow ""` | +| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | Ask DSH to use the `devflow` Skill with your request | | Hermes Agent | `npx -y loopforge-cli@X.Y.Z skills install hermes`, then `hermes skills trust .` | `/devflow ""` (optional plugin: `/loopforge`) | See [Edition selection](editions.md) for the complete boundaries and directory layout. diff --git a/docs/local/usage.zh-CN.md b/docs/local/usage.zh-CN.md index cf939bcbe..eb5420b13 100644 --- a/docs/local/usage.zh-CN.md +++ b/docs/local/usage.zh-CN.md @@ -23,7 +23,7 @@ | Codex | `npx -y loopforge-cli@X.Y.Z install codex` | `$devflow-codex "<需求>"` | | Cursor | `npx -y loopforge-cli@X.Y.Z install cursor` | `/start-devflow "<需求>"` | | Claude Code | `npx -y loopforge-cli@X.Y.Z install claude` | `/start-devflow "<需求>"` | -| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | `/devflow "<需求>"` | +| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | 请 DSH 使用 `devflow` Skill 处理需求 | | Hermes Agent | `npx -y loopforge-cli@X.Y.Z skills install hermes`,然后 `hermes skills trust .` | `/devflow "<需求>"` | 以 Claude Code 为例: @@ -148,7 +148,7 @@ LoopForge 尤其适合这些任务: | Cursor | `npx -y loopforge-cli@X.Y.Z skills install cursor` | `/devflow "<需求>"` | | Claude Code | `npx -y loopforge-cli@X.Y.Z skills install claude` | `/devflow "<需求>"` | | Pi | `npx -y loopforge-cli@X.Y.Z skills install pi`,然后 `pi install npm:pi-subagents` | `/skill:devflow "<需求>"` | -| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | `/devflow "<需求>"` | +| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | 请 DSH 使用 `devflow` Skill 处理需求 | | Hermes Agent | `npx -y loopforge-cli@X.Y.Z skills install hermes`,然后 `hermes skills trust .` | `/devflow "<需求>"`(可选插件:`/loopforge`) | 完整边界和目录说明见 [Classic / Portable 说明](editions.md)。 diff --git a/local/README.md b/local/README.md index 3a9fdaf35..4239448e2 100644 --- a/local/README.md +++ b/local/README.md @@ -25,7 +25,7 @@ npx -y loopforge-cli@X.Y.Z install claude npx -y loopforge-cli@X.Y.Z status claude ``` -Start with `/start-devflow ""` in Claude Code. Replace `claude` with `codebuddy`, `codex`, or `cursor` when installing for another host; use `skills install pi`, `skills install dsh`, or `skills install hermes` for Portable hosts. DSH uses `/devflow ""` after installing the Skill, and the optional DSH plugin adds `/loopforge` task controls. Hermes loads the project skill after `hermes skills trust .`; its optional native plugin adds the same `/loopforge` controls. +Start with `/start-devflow ""` in Claude Code. Replace `claude` with `codebuddy`, `codex`, or `cursor` when installing for another host; use `skills install pi`, `skills install dsh`, or `skills install hermes` for Portable hosts. After installing the Skill, ask DSH to use `devflow` with your request; the optional DSH plugin adds `/loopforge` task controls. Hermes loads the project skill after `hermes skills trust .`; its optional native plugin adds the same `/loopforge` controls. 在 Claude Code 中通过 `/start-devflow "<需求>"` 启动。其他宿主的安装命令、入口及 Portable 用法见统一文档。 diff --git a/local/dsh-plugin/README.md b/local/dsh-plugin/README.md index 0896e1081..3a261f923 100644 --- a/local/dsh-plugin/README.md +++ b/local/dsh-plugin/README.md @@ -12,6 +12,9 @@ LoopForge Local 接入 DeepSeek Harness(DSH)Profile。它复用项目中 loopforge skills install dsh ``` +所用 CLI 版本必须支持 `dsh` 目标;不同发布版本支持的宿主可能不同,见 +[Local 使用说明](../../docs/local/usage.zh-CN.md#快速开始)。 + 再从 LoopForge 源码目录把 bundle 加入目标 DSH profile(`web` 也可以换成你自己的 profile 名称): @@ -31,15 +34,22 @@ dsh --profile web --dump-config-schema 输出应包含 `@tencent/loopforge-dsh`、`loopforge-dsh`,且 schema 的 `diagnostics` 为空。 -重启 DSH 后可用: +## 使用 + +完整工作流由单独安装的 `devflow` Skill 提供。在 DSH 的技能工具或技能目录中调用 +`devflow` 并提供需求,让 Agent 按 Skill 执行流程。 + +重启 DSH 后,这个 bundle 提供以下任务控制命令和状态工具: -- `/devflow <需求>`:直接按 Skill 执行完整工作流。 - `/loopforge start <需求>`:初始化一个 medium 任务并显示状态文件位置。 - `/loopforge status`:查看最近任务、当前阶段和待审批门禁。 - `/loopforge result`:查看任务状态和产物目录。 - `/loopforge approve [阶段]`:批准当前人工门禁;REQUIREMENT 会强制带用户确认。 - `loopforge_status`:供 DSH Agent 读取结构化状态。 +`/loopforge start` 只初始化任务,后续阶段仍由 Agent 按 `devflow` Skill 推进。 +这个 bundle 注册的是 `/loopforge` 命令和 `loopforge_status` 工具,不注册 `/devflow` 命令。 + 阶段 Agent 使用 DSH 的 `subagent` 工具。没有该工具时,工作流必须按协议记录 `single-context` 降级原因,不能伪造隔离执行器。 diff --git a/local/skills/devflow/adapters/dsh/adapter.md b/local/skills/devflow/adapters/dsh/adapter.md index 96fdf4c57..8ef3096f7 100644 --- a/local/skills/devflow/adapters/dsh/adapter.md +++ b/local/skills/devflow/adapters/dsh/adapter.md @@ -22,6 +22,7 @@ DSH 没有 LoopForge 专用的 send/close 生命周期 API。不要伪造 execut ## 使用入口 -安装 Portable Skill 后,在 DSH 中使用 `/devflow <需求>`,或通过 LoopForge DSH 插件的 -`/loopforge start <需求>` 初始化任务。任务状态和产物保存在项目的 +安装 Portable Skill 后,通过 DSH 的技能工具或技能目录调用 `devflow` 并提供需求。 +可选的 LoopForge DSH 插件提供 `/loopforge start <需求>` 来初始化任务,后续仍由 +Agent 按 Skill 推进;该插件不注册 `/devflow` 命令。任务状态和产物保存在项目的 `artifacts//` 下;需要人工确认时,插件会显示待批准阶段和批准命令。 diff --git a/local/src/devflow_cli/cli.py b/local/src/devflow_cli/cli.py index 741edcac2..4ba74cd7d 100644 --- a/local/src/devflow_cli/cli.py +++ b/local/src/devflow_cli/cli.py @@ -81,6 +81,15 @@ def parser() -> argparse.ArgumentParser: return result +def _print_next_entrypoint(host: str, edition: str) -> None: + entry = entrypoint_for(edition, host) + if host == "dsh" and edition == "portable": + action = f"ask it to use the {entry} Skill for <你的需求>" + else: + action = f"run {entry} <你的需求>" + print(f"Next: reopen {host_label(host)} and {action}") + + def main(argv=None) -> int: args = parser().parse_args(argv) try: @@ -140,10 +149,7 @@ def main(argv=None) -> int: f"OK: {args.command} edition={args.edition} host={args.host} " f"project={project_root} written={installed} unchanged={unchanged}" ) - print( - f"Next: reopen {host_label(args.host)} and run " - f"{entrypoint_for(args.edition, args.host)} <你的需求>" - ) + _print_next_entrypoint(args.host, args.edition) if args.host == "pi" and args.edition == "portable": print("Note: Pi isolated mode also needs the public extension: pi install npm:pi-subagents") if args.host == "hermes" and args.edition == "portable": @@ -164,10 +170,7 @@ def main(argv=None) -> int: f"OK: skills {args.skills_command} host={args.host} " f"project={project_root} written={installed} unchanged={unchanged}" ) - print( - f"Next: reopen {host_label(args.host)} and run " - f"{entrypoint_for('portable', args.host)} <你的需求>" - ) + _print_next_entrypoint(args.host, "portable") if args.host == "pi": print("Note: Pi isolated mode also needs the public extension: pi install npm:pi-subagents") if args.host == "hermes": diff --git a/local/src/devflow_cli/editions.py b/local/src/devflow_cli/editions.py index 2e3d2d75e..4a16743d9 100644 --- a/local/src/devflow_cli/editions.py +++ b/local/src/devflow_cli/editions.py @@ -26,7 +26,7 @@ "cursor": "/devflow", "claude": "/devflow", "pi": "/skill:devflow", - "dsh": "/devflow", + "dsh": "devflow", # Skill name; DSH invokes it through its skill tool/catalog. "hermes": "/devflow", }, }, diff --git a/local/tests/test_installer.py b/local/tests/test_installer.py index 138daa981..eebfe95ae 100644 --- a/local/tests/test_installer.py +++ b/local/tests/test_installer.py @@ -1,4 +1,5 @@ import os +import json import stat import subprocess import sys @@ -226,6 +227,30 @@ def test_install_output_names_project_and_next_entrypoint(self): self.assertIn("edition=classic", text) self.assertIn("run /start-devflow <你的需求>", text) + def test_dsh_install_and_update_hints_use_skill_catalog(self): + with tempfile.TemporaryDirectory() as temporary: + project = self.project(temporary) + for args in ( + ["install", "dsh", "--edition", "portable"], + ["skills", "install", "dsh"], + ["update", "dsh", "--edition", "portable"], + ["skills", "update", "dsh"], + ): + with self.subTest(args=args): + output = StringIO() + with redirect_stdout(output): + self.assertEqual(0, main(args + ["--project-root", str(project)])) + self.assertIn("ask it to use the devflow Skill", output.getvalue()) + self.assertNotIn("run /devflow", output.getvalue()) + + def test_dsh_plan_names_skill_entrypoint(self): + output = StringIO() + with redirect_stdout(output): + self.assertEqual(0, main(["plan", "dsh", "--edition", "portable", "--json"])) + plan = json.loads(output.getvalue()) + self.assertEqual("devflow", plan["entrypoint"]) + self.assertIn(".dsh/skills/devflow/SKILL.md", plan["files"]) + def test_skills_command_installs_and_manages_portable_edition(self): with tempfile.TemporaryDirectory() as temporary: project = self.project(temporary)