Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ body:
- Local — Codex
- Local — Cursor
- Local — Claude Code
- Local — DeepSeek Harness
- Local — installer / CLI
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion docs/local/editions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/`。安装器将对应资产安装到目标项目的宿主原生目录,
Expand Down
4 changes: 2 additions & 2 deletions docs/local/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<request>"` |
| Cursor | `npx -y loopforge-cli@X.Y.Z install cursor` | `/start-devflow "<request>"` |
| Claude Code | `npx -y loopforge-cli@X.Y.Z install claude` | `/start-devflow "<request>"` |
| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | `/devflow "<request>"` |
| 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 "<request>"` |

For example, with Claude Code:
Expand Down Expand Up @@ -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 "<request>"` |
| Claude Code | `npx -y loopforge-cli@X.Y.Z skills install claude` | `/devflow "<request>"` |
| Pi | `npx -y loopforge-cli@X.Y.Z skills install pi`, then `pi install npm:pi-subagents` | `/skill:devflow "<request>"` |
| DeepSeek Harness | `npx -y loopforge-cli@X.Y.Z skills install dsh` | `/devflow "<request>"` |
| 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 "<request>"` (optional plugin: `/loopforge`) |

See [Edition selection](editions.md) for the complete boundaries and directory layout.
Expand Down
4 changes: 2 additions & 2 deletions docs/local/usage.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 为例:
Expand Down Expand Up @@ -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)。
Expand Down
2 changes: 1 addition & 1 deletion local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<request>"` 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 "<request>"` 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 "<request>"` 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 用法见统一文档。

Expand Down
14 changes: 12 additions & 2 deletions local/dsh-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 名称):

Expand All @@ -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` 降级原因,不能伪造隔离执行器。

Expand Down
5 changes: 3 additions & 2 deletions local/skills/devflow/adapters/dsh/adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<task_slug>/` 下;需要人工确认时,插件会显示待批准阶段和批准命令。
19 changes: 11 additions & 8 deletions local/src/devflow_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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":
Expand All @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion local/src/devflow_cli/editions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
Expand Down
25 changes: 25 additions & 0 deletions local/tests/test_installer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import json
import stat
import subprocess
import sys
Expand Down Expand Up @@ -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)
Expand Down