Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
},
"metadata": {
"description": "Thinloop skills and continuity hooks for Issue-backed discovery, read-only project-status navigation, multi-Issue project DAG decomposition and execution, evidence-backed reengineering and delivery, and approved skill evolution.",
"version": "0.17.0"
"version": "0.17.1"
},
"plugins": [
{
"name": "thinloop",
"source": ".",
"description": "Discovery, Web UIUX, architecture, Next project-status navigation, Project DAG decomposition, Execute READY-wave orchestration, Reengineering gates, QuickDev delivery, maintenance, knowledge, and evolution skills with continuity checks; Project itself remains non-executing.",
"version": "0.17.0"
"version": "0.17.1"
}
]
}
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thinloop",
"version": "0.17.0",
"version": "0.17.1",
"description": "Simplify complex development with Issue-backed discovery, risk-adaptive Web experience and architecture design, non-executing multi-Issue project decomposition into dependency DAGs, bounded READY-wave execution, read-only project-status navigation, project-scale refactoring and cross-stack reimplementation, autonomous single-Issue PR delivery, evidence-backed maintenance, concise experiential knowledge, and human-approved skill evolution.",
"author": {
"name": "mindcarver"
Expand Down
4 changes: 2 additions & 2 deletions .codebuddy-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
},
"metadata": {
"description": "Thinloop skills and continuity hooks for Issue-backed discovery, read-only project-status navigation, multi-Issue project DAG decomposition and execution, evidence-backed reengineering and delivery, and approved skill evolution.",
"version": "0.17.0"
"version": "0.17.1"
},
"plugins": [
{
"name": "thinloop",
"source": ".",
"description": "Discovery, Web UIUX, architecture, Next project-status navigation, Project DAG decomposition, Execute READY-wave orchestration, Reengineering gates, QuickDev delivery, maintenance, knowledge, and evolution skills with continuity checks; Project itself remains non-executing.",
"version": "0.17.0"
"version": "0.17.1"
}
]
}
2 changes: 1 addition & 1 deletion .codebuddy-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thinloop",
"version": "0.17.0",
"version": "0.17.1",
"description": "Simplify complex development with Issue-backed discovery, risk-adaptive Web experience and architecture design, non-executing multi-Issue project decomposition into dependency DAGs, bounded READY-wave execution, read-only project-status navigation, project-scale refactoring and cross-stack reimplementation, autonomous single-Issue PR delivery, evidence-backed maintenance, concise experiential knowledge, and human-approved skill evolution.",
"author": {
"name": "mindcarver"
Expand Down
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thinloop",
"version": "0.17.0",
"version": "0.17.1",
"description": "Simplify complex development with Issue-backed discovery, risk-adaptive Web experience and architecture design, non-executing multi-Issue project decomposition into dependency DAGs, bounded READY-wave execution, read-only project-status navigation, project-scale refactoring and cross-stack reimplementation, autonomous single-Issue PR delivery, evidence-backed maintenance, concise experiential knowledge, and human-approved skill evolution.",
"author": {
"name": "mindcarver"
Expand Down
74 changes: 56 additions & 18 deletions .dsh-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,73 @@ SCD 管理但不可恢复,就 `agent.steer(...)` 一条纠正消息,让 Agen
`PreCompact` 的一半不在此移植;压缩后由 DSH 自身的 `AGENTS.md` 基线机制
重新注入指令。

## 挂载层:宿主级用户 patch,而非 agent preset

推荐把插件挂载到 **home 级用户 patch 层** `$DSH_HOME/cordis.patch.yml`
(默认 `~/.dsh/cordis.patch.yml`)。理由:

- DSH 的 profile 组合顺序是 bundle patch → profile 自身
`cordis.patch.yml` → home 级 `$DSH_HOME/cordis.patch.yml` → `--patch`
overlay。desktop(Electron)宿主通过同一个 `runProfile` 组合代码启动
desktop profile,因此 home 级一行的效果覆盖 **所有 profile、所有 agent
preset**(standard、ptc、cordis 与用户自建 preset),无需复制任何 preset。
- `agent/turn-stopping` 是按 Agent 作用域派发的 scoped 事件,而 DSH 的
scope 事件过滤规则对 **未打标签的监听器始终放行**(祖先作用域可以观察
后代活动)。宿主层注册的 `ctx.on("agent/turn-stopping", ...)` 能收到每个
Agent 的停止事件——官方 `dsh-hooks-codex` / `dsh-hooks-claude-code` 桥
插件正是以同样的挂载形态实现各自的 `Stop` 语义。
- 不复制 preset 就不会随 DSH 升级漂移:shipped preset 属于部署,升级会
覆盖它;任何 preset 拷贝都会与新版 `standard` 逐渐失配。

需要把闸门限制到单个 preset 时,才把同样的行写进该 preset 的
`agent.cordis.yml`(用户自建 preset 位于 `$DSH_HOME/.agent-presets/<id>/`)。
注意 preset 是整份会话组合的拷贝,DSH 升级后需要人工同步,且与宿主级挂载
同时启用会对同一停止事件各 steer 一次;两者选其一。

## 安装

1. 确认 `.dsh-plugin/` 与 `hooks/` 都留在同一份 Thinloop 检出内,插件通过
1. 确认 `.dsh-plugin/` 与 `hooks/` 都留在同一份 Thinloop 检出内:插件通过
相对路径导入 `../hooks/validate-state.mjs`,两处必须同时存在。
2. 找到要启用的 Agent preset 的 `agent.cordis.yml`(Agent 平面组合,而非
宿主 `cordis.patch.yml`;生命周期事件在 Agent 作用域派发)。系统内置
preset 位于 DSH 的 `config/agent-presets/<id>/agent.cordis.yml`。
3. 在该组合文件的顶层列表追加一行:
2. 把十二个 Skill 链接到 `$DSH_HOME/skills`(见
[docs/installation.md](../docs/installation.md) 的统一链接脚本)。
3. 在 `$DSH_HOME/cordis.patch.yml` 顶层列表追加一个 `insert` 块(文件为
`[]` 时替换为下面内容;已有其他条目时保留它们):

```yaml
- id: thinloop-continuity
name: /绝对路径/thinloop/.dsh-plugin/continuity.mjs
- insert:
- id: thinloop-continuity
name: file:///绝对路径/thinloop/.dsh-plugin/continuity.mjs
```

`name` 既可以是包名,也可以是与组合文件目录相对的路径(如
`./thinloop/.dsh-plugin/continuity.mjs`),或 `file:///` 绝对 URL;
Windows 下请优先使用 `file:///D:/path/to/thinloop/.dsh-plugin/continuity.mjs`
形式,避免把盘符误解为 URL scheme。
4. 重启或新建 DSH 会话,让新组合生效。
注意 `cordis.patch.yml` 是 **patch 层**:新增条目必须用 `insert` 列表,
直接写 `- id: thinloop-continuity` 裸行会被当作按 id 更新既有条目,组合
时报 `entry "thinloop-continuity" not found`。裸行形式只适用于
`cordis.yml` 组合文件(例如 agent preset 的 `agent.cordis.yml`)。
`name` 既可以是包名,也可以是 `file:///` 绝对 URL;macOS/Linux 也可写
绝对路径(如 `/Users/me/thinloop/.dsh-plugin/continuity.mjs`)。Windows
下请使用 `file:///D:/path/to/thinloop/.dsh-plugin/continuity.mjs` 形式,
避免把盘符误解为 URL scheme。profile 自身的
`$DSH_HOME/profiles/<name>/cordis.patch.yml` 是等效挂载点(同样用
`insert` 块),只影响该 profile。
4. 重启 DSH 或新建会话,让新组合生效(home 级与 profile 级 patch 在启动时
应用;配置了 `patchReload: live` 的 profile 会被 watcher 热加载)。

## 验证

- 静态检查:`node --check .dsh-plugin/continuity.mjs`;共享校验器由
`tests/validate-state.test.mjs` 覆盖。
- 运行时验证为手动项:新会话写入一份 `managed_by` 为 `scd-quickdev` /
`scd-discovery` 但缺少章节的 `.scd/tasks/current.md`,确认 Agent 停止前被
纠正消息打断、补齐状态后才允许停下;没有 SCD 状态文件时应静默不干预。
本仓库的统一只读检查器(`scripts/verify-install.mjs`)没有可依赖的 DSH
CLI,无法自动验证插件挂载,因此该项保持 `MANUAL`。
`tests/validate-state.test.mjs` 覆盖,插件结构由
`tests/plugin-compatibility.test.mjs` 覆盖。
- 组合检查(只读,不启动会话):`dsh --profile web --dump-config` 输出的
组合树应包含 `thinloop-continuity` 行。`desktop` profile 由 Electron 独占
管理,CLI 拒绝对它做 config-dump,但 home 级层对它同样生效。
- 统一只读检查器:`node scripts/verify-install.mjs --platform dsh` 读取
`$DSH_HOME/cordis.patch.yml` 与 `$DSH_HOME/profiles/*/cordis.patch.yml`,
挂载行指向当前源码的 `.dsh-plugin/continuity.mjs` 时 `hooks` 检查为
`PASS`;未挂载时保持 `MANUAL`(skills-only 仍是受支持安装形态)。
- 运行时行为:临时目录写入一份 `managed_by` 为 `scd-quickdev` 但缺章节的
`.scd/tasks/current.md`,在该目录运行
`dsh --profile headless "简单任务"`,确认 Agent 停止前被纠正消息打断、
补齐状态后才允许停下;没有 SCD 状态文件时应静默不干预。

## 与 Claude Code / WorkBuddy / ZCode 的差异

Expand Down
9 changes: 6 additions & 3 deletions .dsh-plugin/continuity.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@ import { RELATIVE_STATE_PATH, validateState } from "../hooks/validate-state.mjs"
export const name = "thinloop-continuity";
export const inject = [];

// A minimal user message matching the runtime `UserMessage` shape
// ({ id, role: 'user', content: [{ type: 'text', text }], source: { kind: 'user' } }).
// A corrective user-role message matching the runtime `UserMessage` shape
// ({ id, role: 'user', content: [{ type: 'text', text }], source }). Provenance
// is the plugin itself — the same `MessageSourceMap['plugin']` shape the
// official `dsh-hooks-codex` Stop bridge steers with — so the transcript keeps
// attributing the correction to Thinloop instead of spoofing the human user.
function correctiveMessage(text) {
return {
id: `thinloop-continuity-${Date.now().toString(36)}-${Math.random()
.toString(36)
.slice(2)}`,
role: "user",
content: [{ type: "text", text }],
source: { kind: "user" },
source: { kind: "plugin", plugin: "thinloop-continuity" },
};
}

Expand Down
2 changes: 1 addition & 1 deletion .zcode-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thinloop",
"version": "0.17.0",
"version": "0.17.1",
"description": "Simplify complex development with Issue-backed discovery, risk-adaptive Web experience and architecture design, non-executing multi-Issue project decomposition into dependency DAGs, bounded READY-wave execution, read-only project-status navigation, project-scale refactoring and cross-stack reimplementation, autonomous single-Issue PR delivery, evidence-backed maintenance, concise experiential knowledge, and human-approved skill evolution.",
"author": {
"name": "mindcarver"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>

<p align="center">
<kbd>v0.17.0</kbd>
<kbd>v0.17.1</kbd>
&nbsp;
<kbd>ISSUE-DRIVEN</kbd>
&nbsp;
Expand Down
14 changes: 11 additions & 3 deletions config/platform-capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"environment": "DSH_HOME",
"suffix": "skills"
},
"summary": "把十二个 Skill 链接到 `~/.dsh/skills`",
"summary": "把十二个 Skill 链接到 `~/.dsh/skills`,并在 `$DSH_HOME/cordis.patch.yml` 挂载 `.dsh-plugin/continuity.mjs`(宿主级 Cordis 插件行)",
"takesEffect": "新会话(filesystem provider 的 watcher 会自动失效并更新目录)"
},
"capabilities": {
Expand All @@ -143,13 +143,21 @@
{
"event": "agent/turn-stopping",
"source": ".dsh-plugin/continuity.mjs",
"kind": "cordis-plugin"
"kind": "cordis-plugin",
"mount": {
"layer": "host-user-patch",
"row": "thinloop-continuity",
"patchFiles": [
"cordis.patch.yml",
"profiles/*/cordis.patch.yml"
]
}
}
]
},
"verification": {
"mode": "skill-links",
"summary": "十二个 Skill 链接均指向当前源码;新会话的 skill 工具可发现 `scd-next`、`scd-execute`、`scd-project` 与 `scd-quickdev`"
"summary": "十二个 Skill 链接均指向当前源码;新会话的 skill 工具可发现 `scd-next`、`scd-execute`、`scd-project` 与 `scd-quickdev`;只读检查器核对 home 级与 profile 级 `cordis.patch.yml` 中的挂载行,已挂载为 `PASS`,未挂载为 `MANUAL`"
}
},
{
Expand Down
37 changes: 28 additions & 9 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
| Pi | 把十二个 Skill 链接到 `~/.pi/agent/skills` | 新会话或执行 `/reload` |
| CodeWhale | 把十二个 Skill 链接到 `~/.codewhale/skills` | 新会话 |
| Reasonix | 把十二个 Skill 链接到 `~/.reasonix/skills` | 新会话 |
| DeepSeek Harness | 把十二个 Skill 链接到 `~/.dsh/skills` | 新会话(filesystem provider 的 watcher 会自动失效并更新目录) |
| DeepSeek Harness | 把十二个 Skill 链接到 `~/.dsh/skills`,并在 `$DSH_HOME/cordis.patch.yml` 挂载 `.dsh-plugin/continuity.mjs`(宿主级 Cordis 插件行) | 新会话(filesystem provider 的 watcher 会自动失效并更新目录) |
| Claude Code | 安装完整插件 | 更新后重启或重新加载插件 |
| WorkBuddy | 安装完整插件 | 更新后重启 WorkBuddy |
| ZCode | 安装完整插件 | 更新后新建会话 |

Skill 链接随源码仓库更新,但默认不启用连续性 Hook;Claude Code、WorkBuddy
和 ZCode 的完整插件会额外启用各自支持的 Hook,DeepSeek Harness 则通过手动
挂载 `.dsh-plugin/continuity.mjs` 插件启用 `agent/turn-stopping` 连续性闸门。
不要在同一个 Agent 中同时安装完整插件和个人 Skill 链接,以免重复暴露同名
能力。
和 ZCode 的完整插件会额外启用各自支持的 Hook,DeepSeek Harness 则通过把
`.dsh-plugin/continuity.mjs` 挂载到 DSH 的 home 级用户 patch 层启用
`agent/turn-stopping` 连续性闸门。不要在同一个 Agent 中同时安装完整插件和
个人 Skill 链接,以免重复暴露同名能力。

## Codex、OpenCode、Pi、CodeWhale、Reasonix 与 DeepSeek Harness

Expand Down Expand Up @@ -141,10 +141,22 @@ skill 工具即可发现并加载 `scd-next`、`scd-execute`、`scd-project`、
「JSON Hook 清单 + 子进程处理程序」的声明式 Hook,但提供可编程的 Cordis
插件生命周期事件系统:Thinloop 通过 `.dsh-plugin/continuity.mjs` 插件注册
`agent/turn-stopping`(`Stop` 的等价物)监听器,在状态不可恢复时
`agent.steer(...)` 让 Agent 继续补齐,而不是在不可恢复的状态上停下。该插件
需手动挂载到 Agent preset 的 `agent.cordis.yml`(详见
`.dsh-plugin/README.md`);DSH 未暴露第三方可用的压缩前否决点,压缩后仍由
`AGENTS.md` 基线机制重新注入指令。
`agent.steer(...)` 让 Agent 继续补齐,而不是在不可恢复的状态上停下。启用
方式是把挂载块写进 **home 级用户 patch 层** `$DSH_HOME/cordis.patch.yml`
(等效挂载点为各 profile 的 `$DSH_HOME/profiles/<name>/cordis.patch.yml`):

```yaml
- insert:
- id: thinloop-continuity
name: file:///绝对路径/thinloop/.dsh-plugin/continuity.mjs
```

patch 层新增条目必须用 `insert` 列表;裸行会被当作按 id 更新既有条目而报
`entry "thinloop-continuity" not found`。该层对所有 profile 生效(含
Electron desktop 宿主与全部 agent preset),无需复制 preset;挂载细节、事件
作用域依据与 Windows 路径注意事项见
[`.dsh-plugin/README.md`](../.dsh-plugin/README.md)。DSH 未暴露第三方可用的
压缩前否决点,压缩后仍由 `AGENTS.md` 基线机制重新注入指令。

## Evolve 权威源码

Expand Down Expand Up @@ -306,6 +318,13 @@ codebuddy plugin update thinloop@thinloop --scope user
页面证据、高风险确认、main 核验和精确清理门继续有效。评分器保留 unknown,
完整交付协议与真实模型证据分开记录;每次交付核对 ZCode、Claude Code、Codex,
同版本载荷漂移也需修复。范围和测量限制见 [`v0.17.0`](./releases/v0.17.0.md)。
- 升级到 v0.17.1:DSH 连续性插件的挂载方式改为宿主级用户 patch 层——在
`$DSH_HOME/cordis.patch.yml` 以 `insert` 列表追加 `thinloop-continuity`
条目即可对全部 profile 与 preset 生效,不再复制 agent preset;纠正消息的
来源标记改为 `plugin`。`verify-install.mjs --platform dsh` 会读取 home 级
与 profile 级 patch 文件核对挂载,未挂载保持 `MANUAL`。升级后重启 DSH 使
新组合生效,并移除旧的 `standard-thinloop` 之类 preset 拷贝,避免双重
纠正。范围见 [`v0.17.1`](./releases/v0.17.1.md)。
- 若从 v0.6.x 升级,另确认旧 `scd-dev-loop` 已消失。

更新后可以在 Thinloop 源码仓库运行只读检查器:
Expand Down
37 changes: 37 additions & 0 deletions docs/releases/v0.17.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Thinloop v0.17.1

## 范围

- DeepSeek Harness 连续性插件的挂载方式改为宿主级用户 patch 层:在
`$DSH_HOME/cordis.patch.yml`(或单个 profile 的
`$DSH_HOME/profiles/<name>/cordis.patch.yml`)以 `insert` 列表追加
`thinloop-continuity` 条目,即可对全部 profile 与 agent preset 生效,
包括 Electron desktop 宿主;不再要求复制 agent preset 的
`agent.cordis.yml`,避免随 DSH 升级漂移。
- 依据:DSH 的 scope 事件过滤对未打标签的宿主监听器始终放行,宿主层注册的
`agent/turn-stopping` 监听器可收到每个 Agent 的停止事件,与官方
`dsh-hooks-codex` / `dsh-hooks-claude-code` 桥的挂载形态一致;desktop 宿主
经 `runProfile` 使用与 CLI 相同的 profile 组合代码,home 级层必然叠加。
- `.dsh-plugin/continuity.mjs` 的纠正消息 `source` 从 `{ kind: "user" }` 改为
`{ kind: "plugin", plugin: "thinloop-continuity" }`,与官方桥的 Stop 处理
一致,transcript 不再把纠正归因于人类用户。
- `verify-install.mjs --platform dsh` 新增只读挂载检查:扫描 home 级与
profile 级 `cordis.patch.yml`,挂载行指向当前源码时 `hooks` 报 `PASS`,
未挂载保持 `MANUAL`(skills-only 仍是受支持安装形态);不运行任何 CLI
探测。
- `.dsh-plugin/README.md`、`docs/installation.md`、`docs/verification.md` 同步
新挂载与验证方式;插件版本、市场清单、README 与升级入口统一为 0.17.1。

## 验证与边界

- fixture 测试覆盖挂载与未挂载两态的检查器输出,插件结构测试覆盖导出形状
与 `plugin` 来源标记。
- 真实行为验收使用 `dsh --profile headless`:存在 SCD 管理但不可恢复的
`.scd/tasks/current.md` 时 Agent 停止前被纠正消息打断并补齐;无状态文件时
静默不干预。
- `dsh --profile web --dump-config` 提供只读组合核对;`desktop` profile 由
Electron 独占管理,CLI 拒绝对它做 config-dump,home 级挂载需重启 desktop
宿主后生效,该项为运行时手动核验。
- 挂载行指向源码检出内的 `.dsh-plugin/continuity.mjs`,仓库更新即生效,无
载荷拷贝;本补丁不改变其他平台的安装与验证协议,也不表示模型效果或完整
交付评测有变化。
Loading
Loading