@hawk2048/oh-my-dsh 0.2.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +246 -206
- package/README.zh.md +246 -0
- package/agent.cordis.yml +288 -0
- package/commands/omd-commands.mjs +150 -141
- package/cordis.patch.yml +20 -20
- package/index.js +8 -8
- package/install.ps1 +92 -0
- package/install.sh +81 -0
- package/package.json +44 -35
- package/preset.yml +2 -0
- package/skills/omd-ai-slop-cleaner/SKILL.md +43 -43
- package/skills/omd-autopilot/SKILL.md +51 -51
- package/skills/omd-autoresearch/SKILL.md +45 -45
- package/skills/omd-cancel/SKILL.md +36 -36
- package/skills/omd-debug/SKILL.md +35 -35
- package/skills/omd-deep-analyze/SKILL.md +36 -36
- package/skills/omd-deep-interview/SKILL.md +68 -68
- package/skills/omd-deepsearch/SKILL.md +36 -36
- package/skills/omd-doctor/SKILL.md +39 -39
- package/skills/omd-execute/SKILL.md +41 -41
- package/skills/omd-external-context/SKILL.md +36 -36
- package/skills/omd-help/SKILL.md +35 -35
- package/skills/omd-hud/SKILL.md +80 -79
- package/skills/omd-minimal-code-discipline/SKILL.md +36 -36
- package/skills/omd-plan/SKILL.md +51 -51
- package/skills/omd-pyramid/SKILL.md +121 -0
- package/skills/omd-ralph/SKILL.md +62 -62
- package/skills/omd-ralplan/SKILL.md +45 -45
- package/skills/omd-release/SKILL.md +36 -36
- package/skills/omd-remember/SKILL.md +35 -35
- package/skills/omd-research/SKILL.md +40 -38
- package/skills/omd-review/SKILL.md +47 -45
- package/skills/omd-skillify/SKILL.md +36 -36
- package/skills/omd-tdd/SKILL.md +37 -37
- package/skills/omd-team/SKILL.md +96 -96
- package/skills/omd-ultragoal/SKILL.md +46 -46
- package/skills/omd-ultrathink/SKILL.md +39 -39
- package/skills/omd-verify/SKILL.md +44 -44
- package/skills/omd-visual-verdict/SKILL.md +36 -36
- package/skills/omd-wiki/SKILL.md +36 -36
|
@@ -1,141 +1,150 @@
|
|
|
1
|
-
// oh-my-dsh 斜杠命令生产者。
|
|
2
|
-
// 注册 plan/execute/review/verify/team/autopilot/ralph/
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
1
|
+
// oh-my-dsh 斜杠命令生产者。
|
|
2
|
+
// 注册 13 条人类命令:12 条编排命令(plan/execute/review/verify/team/autopilot/ralph/
|
|
3
|
+
// deep-interview/ralplan/research/autoresearch/ultragoal)+ pyramid(金字塔结构化表达)表达纪律命令。
|
|
4
|
+
// 每条 handler 把任务作为一条用户消息提交给模型(唤醒模型并让它加载对应
|
|
5
|
+
// omd-* skill),然后返回一条直接 UI 确认(不进入模型请求)。
|
|
6
|
+
//
|
|
7
|
+
// 说明:本文件作为 preset 内置插件被 Loader 以 ESM 方式加载;为避免依赖
|
|
8
|
+
// harness 内部包(本地 preset 目录无法走 node_modules 向上解析),这里手工
|
|
9
|
+
// 构造 UserMessage,而不是 import createUserMessage。
|
|
10
|
+
|
|
11
|
+
export const name = 'omd-commands'
|
|
12
|
+
export const inject = ['commands']
|
|
13
|
+
|
|
14
|
+
let seq = 0
|
|
15
|
+
function messageId() {
|
|
16
|
+
seq += 1
|
|
17
|
+
return 'omd-' + Date.now().toString(36) + '-' + seq.toString(36) + '-' + Math.random().toString(36).slice(2, 10)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function userMessage(text) {
|
|
21
|
+
return {
|
|
22
|
+
role: 'user',
|
|
23
|
+
source: { kind: 'user' },
|
|
24
|
+
content: [{ type: 'text', text }],
|
|
25
|
+
id: messageId(),
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const MODES = [
|
|
30
|
+
{
|
|
31
|
+
name: 'omd-plan',
|
|
32
|
+
description: '规划:先探索,产出带依赖与验收标准的实现计划(不写代码)',
|
|
33
|
+
hint: '<任务>',
|
|
34
|
+
label: '规划',
|
|
35
|
+
skill: 'omd-plan',
|
|
36
|
+
build: (t) => `请加载 omd-plan skill,对以下任务先探索再产出带依赖与验收标准的实现计划(不写代码),并用 HUD 输出计划概览:${t}`,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'omd-execute',
|
|
40
|
+
description: '执行:按计划实现,多文件改动委托并行子代理,琐碎改动直接做',
|
|
41
|
+
hint: '<任务>',
|
|
42
|
+
label: '执行',
|
|
43
|
+
skill: 'omd-execute',
|
|
44
|
+
build: (t) => `请加载 omd-execute skill,按已确认的计划实现以下任务(多文件改动委托并行 subagent,琐碎改动直接做),并用 HUD 输出进度:${t}`,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'omd-review',
|
|
48
|
+
description: '评审:独立评审改动,产出缺陷清单(不自我背书)',
|
|
49
|
+
hint: '<任务>',
|
|
50
|
+
label: '评审',
|
|
51
|
+
skill: 'omd-review',
|
|
52
|
+
build: (t) => `请加载 omd-review skill,对以下改动作独立评审(用评审 subagent 产出 issues 清单,不自我背书),并用 HUD 输出评审结果:${t}`,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'omd-verify',
|
|
56
|
+
description: '验证:跑测试/构建,对照验收标准收集证据,失败则迭代',
|
|
57
|
+
hint: '<任务>',
|
|
58
|
+
label: '验证',
|
|
59
|
+
skill: 'omd-verify',
|
|
60
|
+
build: (t) => `请加载 omd-verify skill,对以下任务跑测试/构建并对照验收标准收集证据(失败则回 execute/review 迭代),并用 HUD 输出验证结果:${t}`,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'omd-team',
|
|
64
|
+
description: '团队分阶段流水线(规划→规格→实现→验证→修复)',
|
|
65
|
+
hint: '<任务>',
|
|
66
|
+
label: '团队流水线',
|
|
67
|
+
skill: 'omd-team',
|
|
68
|
+
build: (t) => `请加载 omd-team skill,用 Team 分阶段流水线编排完成以下任务,各阶段用 HUD 输出进度:${t}`,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'omd-autopilot',
|
|
72
|
+
description: '自动驾驶:单个主控代理把目标持续做到已验证完成',
|
|
73
|
+
hint: '<目标>',
|
|
74
|
+
label: '自动驾驶',
|
|
75
|
+
skill: 'omd-autopilot',
|
|
76
|
+
build: (t) => `请加载 omd-autopilot skill,用 Autopilot 模式把以下目标持续做到已验证完成,并用 HUD 输出进度:${t}`,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'omd-ralph',
|
|
80
|
+
description: '拉夫持久验证循环:完整完成并验证到全绿,不留静默半成品',
|
|
81
|
+
hint: '<目标>',
|
|
82
|
+
label: '拉夫循环',
|
|
83
|
+
skill: 'omd-ralph',
|
|
84
|
+
build: (t) => `请加载 omd-ralph skill,用 Ralph 持久验证循环完成以下目标直到全绿,并用 HUD 输出进度:${t}`,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'omd-deep-interview',
|
|
88
|
+
description: '深度访谈:写代码前用苏格拉底式追问澄清需求',
|
|
89
|
+
hint: '<主题>',
|
|
90
|
+
label: '深度访谈',
|
|
91
|
+
skill: 'omd-deep-interview',
|
|
92
|
+
build: (t) => `请加载 omd-deep-interview skill,对以下想法做深度访谈澄清需求,先收敛出规格再动手:${t}`,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'omd-ralplan',
|
|
96
|
+
description: '共识规划:多视角并行规划 + 结构化审议,收敛出共识计划',
|
|
97
|
+
hint: '<描述>',
|
|
98
|
+
label: '共识规划',
|
|
99
|
+
skill: 'omd-ralplan',
|
|
100
|
+
build: (t) => `请加载 omd-ralplan skill,对以下描述做多视角并行规划 + 结构化审议,收敛出共识计划,并用 HUD 输出草案/分歧/裁决概览:${t}`,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'omd-research',
|
|
104
|
+
description: '调研:查证一个开放问题,返回有来源依据的结论',
|
|
105
|
+
hint: '<问题>',
|
|
106
|
+
label: '调研',
|
|
107
|
+
skill: 'omd-research',
|
|
108
|
+
build: (t) => `请加载 omd-research skill,对以下问题做有据调研(并行研究子代理 + 每条结论标注来源),并用 HUD 输出调研结论与来源:${t}`,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'omd-autoresearch',
|
|
112
|
+
description: '自动调研改进:评估器驱动的有界改进循环,持续改进到达标',
|
|
113
|
+
hint: '<任务>',
|
|
114
|
+
label: '自动调研',
|
|
115
|
+
skill: 'omd-autoresearch',
|
|
116
|
+
build: (t) => `请加载 omd-autoresearch skill,对以下任务做评估器驱动的有界改进循环直到达标,并用 HUD 输出轮次/评分/差距:${t}`,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'omd-ultragoal',
|
|
120
|
+
description: '持久多目标:拆解多子目标,带 checkpoint 工件与台账,可恢复可审计',
|
|
121
|
+
hint: '<目标>',
|
|
122
|
+
label: '持久目标',
|
|
123
|
+
skill: 'omd-ultragoal',
|
|
124
|
+
build: (t) => `请加载 omd-ultragoal skill,把以下大目标拆成多子目标、带 checkpoint 工件与台账持续推进,并用 HUD 输出子目标进度:${t}`,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'omd-pyramid',
|
|
128
|
+
description: '金字塔表达:把内容重组为结论先行 + MECE 分组 + 层层支撑',
|
|
129
|
+
hint: '<内容或主题>',
|
|
130
|
+
label: '金字塔表达',
|
|
131
|
+
skill: 'omd-pyramid',
|
|
132
|
+
build: (t) => `请加载 omd-pyramid skill,用金字塔原理(结论先行、以上统下、归类分组 MECE、逻辑递进,必要时 SCQA 开场)重组以下内容的表达,并用 HUD 输出结构对照:${t}`,
|
|
133
|
+
},
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
export function apply(ctx) {
|
|
137
|
+
for (const mode of MODES) {
|
|
138
|
+
ctx.commands.register({
|
|
139
|
+
name: mode.name,
|
|
140
|
+
description: mode.description,
|
|
141
|
+
input: { hint: mode.hint },
|
|
142
|
+
handler: (invocation) => {
|
|
143
|
+
const task = (invocation.rawInput || '').trim()
|
|
144
|
+
if (!task) return { kind: 'error', text: `用法:/${mode.name} ${mode.hint}` }
|
|
145
|
+
invocation.agent.followup(userMessage(mode.build(task)))
|
|
146
|
+
return { kind: 'success', text: `${mode.label}已启动:${task}` }
|
|
147
|
+
},
|
|
148
|
+
})
|
|
149
|
+
}
|
|
150
|
+
}
|
package/cordis.patch.yml
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
# oh-my-dsh bundle patch: the composition layer this bundle contributes when a
|
|
2
|
-
# profile lists it. `dsh plugin add` appends this layer after @deepseek-ai/dsh-base
|
|
3
|
-
# and before the user's own overrides.
|
|
4
|
-
#
|
|
5
|
-
# - command-omd (insert) registers the
|
|
6
|
-
# `commands` registry, so every session in the profile sees them.
|
|
7
|
-
# - skill-filesystem (override by id) adds this package's `skills/` to the base
|
|
8
|
-
# host skill-filesystem via customSkillDirs and re-enables the row (the Web app
|
|
9
|
-
# ships the base row disabled because presets own local discovery). Overriding
|
|
10
|
-
# by id keeps a single "filesystem" provider; customSkillDirs is additive over
|
|
11
|
-
# the default roots, so project and user skills keep working alongside omd's.
|
|
12
|
-
- insert:
|
|
13
|
-
- id: command-omd
|
|
14
|
-
name: '@hawk2048/oh-my-dsh/commands'
|
|
15
|
-
|
|
16
|
-
- id: skill-filesystem
|
|
17
|
-
disabled: false
|
|
18
|
-
config:
|
|
19
|
-
customSkillDirs:
|
|
20
|
-
- !!js "process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))"
|
|
1
|
+
# oh-my-dsh bundle patch: the composition layer this bundle contributes when a
|
|
2
|
+
# profile lists it. `dsh plugin add` appends this layer after @deepseek-ai/dsh-base
|
|
3
|
+
# and before the user's own overrides.
|
|
4
|
+
#
|
|
5
|
+
# - command-omd (insert) registers the 13 /omd-* slash commands into the host
|
|
6
|
+
# `commands` registry, so every session in the profile sees them.
|
|
7
|
+
# - skill-filesystem (override by id) adds this package's `skills/` to the base
|
|
8
|
+
# host skill-filesystem via customSkillDirs and re-enables the row (the Web app
|
|
9
|
+
# ships the base row disabled because presets own local discovery). Overriding
|
|
10
|
+
# by id keeps a single "filesystem" provider; customSkillDirs is additive over
|
|
11
|
+
# the default roots, so project and user skills keep working alongside omd's.
|
|
12
|
+
- insert:
|
|
13
|
+
- id: command-omd
|
|
14
|
+
name: '@hawk2048/oh-my-dsh/commands'
|
|
15
|
+
|
|
16
|
+
- id: skill-filesystem
|
|
17
|
+
disabled: false
|
|
18
|
+
config:
|
|
19
|
+
customSkillDirs:
|
|
20
|
+
- !!js "process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))"
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// oh-my-dsh bundle entry.
|
|
2
|
-
//
|
|
3
|
-
// The bundle is a composition layer (`cordis.patch.yml`), not a top-level
|
|
4
|
-
// plugin; its capability modules live under ./commands and its skills under
|
|
5
|
-
// ./skills. This entry exists so the package resolves as a module for the
|
|
6
|
-
// patch rows that reference `oh-my-dsh/commands`; it intentionally exports
|
|
7
|
-
// nothing.
|
|
8
|
-
export {}
|
|
1
|
+
// oh-my-dsh bundle entry.
|
|
2
|
+
//
|
|
3
|
+
// The bundle is a composition layer (`cordis.patch.yml`), not a top-level
|
|
4
|
+
// plugin; its capability modules live under ./commands and its skills under
|
|
5
|
+
// ./skills. This entry exists so the package resolves as a module for the
|
|
6
|
+
// patch rows that reference `oh-my-dsh/commands`; it intentionally exports
|
|
7
|
+
// nothing.
|
|
8
|
+
export {}
|
package/install.ps1
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Install oh-my-dsh as an agent preset (per-session composition) under
|
|
2
|
+
# $DSH_HOME\.agent-presets\oh-my-dsh. Run from a checkout of this repository.
|
|
3
|
+
# This is the "manual preset" path; the primary install is `dsh plugin add`.
|
|
4
|
+
#
|
|
5
|
+
# NON-DESTRUCTIVE by design: the preset directory is never deleted. Your own
|
|
6
|
+
# additions survive an upgrade:
|
|
7
|
+
# - files this repo does not ship (e.g. a locally written skill) are left alone;
|
|
8
|
+
# - a shipped file that WOULD overwrite a locally modified copy is backed up
|
|
9
|
+
# first as <name>.bak-<timestamp>; only then is the shipped version copied.
|
|
10
|
+
# Re-running this script is therefore safe, and reversible.
|
|
11
|
+
|
|
12
|
+
$ErrorActionPreference = 'Stop'
|
|
13
|
+
|
|
14
|
+
$src = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
15
|
+
$dshHome = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path $HOME '.dsh' }
|
|
16
|
+
$dst = Join-Path $dshHome '.agent-presets\oh-my-dsh'
|
|
17
|
+
$stamp = Get-Date -Format 'yyyyMMdd-HHmmss'
|
|
18
|
+
|
|
19
|
+
New-Item -ItemType Directory -Force -Path $dst | Out-Null
|
|
20
|
+
|
|
21
|
+
# Every file this repo ships, relative to the checkout root.
|
|
22
|
+
$shipped = New-Object System.Collections.Generic.List[string]
|
|
23
|
+
$shipped.Add('agent.cordis.yml')
|
|
24
|
+
$shipped.Add('preset.yml')
|
|
25
|
+
foreach ($d in @('skills', 'commands')) {
|
|
26
|
+
$root = Join-Path $src $d
|
|
27
|
+
if (Test-Path $root) {
|
|
28
|
+
Get-ChildItem -Path $root -Recurse -File | ForEach-Object {
|
|
29
|
+
$shipped.Add($_.FullName.Substring($src.Length + 1))
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function Backup-IfDiffers {
|
|
35
|
+
param([string]$Rel)
|
|
36
|
+
$destPath = Join-Path $dst $Rel
|
|
37
|
+
$srcPath = Join-Path $src $Rel
|
|
38
|
+
if (-not (Test-Path $destPath -PathType Leaf)) { return }
|
|
39
|
+
if (-not (Test-Path $srcPath -PathType Leaf)) { return }
|
|
40
|
+
$localHash = (Get-FileHash -Path $destPath -Algorithm SHA256).Hash
|
|
41
|
+
$shippedHash = (Get-FileHash -Path $srcPath -Algorithm SHA256).Hash
|
|
42
|
+
if ($localHash -ne $shippedHash) {
|
|
43
|
+
Copy-Item -Path $destPath -Destination "$destPath.bak-$stamp" -Force
|
|
44
|
+
Write-Host " backed up local $Rel -> $Rel.bak-$stamp"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
foreach ($rel in $shipped) { Backup-IfDiffers -Rel $rel }
|
|
49
|
+
|
|
50
|
+
# Merge-copy: add/overwrite the files this repo ships and touch nothing else.
|
|
51
|
+
Copy-Item (Join-Path $src 'agent.cordis.yml') $dst -Force
|
|
52
|
+
Copy-Item (Join-Path $src 'preset.yml') $dst -Force
|
|
53
|
+
|
|
54
|
+
# Copy the CONTENTS of skills/ and commands/, never those directories themselves.
|
|
55
|
+
# `Copy-Item <src>\skills <dst>\skills -Recurse` into a directory that already
|
|
56
|
+
# exists copies the whole tree INSIDE it, producing <dst>\skills\skills and
|
|
57
|
+
# leaving the real skill files at their old version -- an upgrade that reports
|
|
58
|
+
# success while shipping nothing. Enumerate the children and copy those.
|
|
59
|
+
foreach ($d in @('skills', 'commands')) {
|
|
60
|
+
$srcDir = Join-Path $src $d
|
|
61
|
+
if (-not (Test-Path $srcDir -PathType Container)) { continue }
|
|
62
|
+
$dstDir = Join-Path $dst $d
|
|
63
|
+
New-Item -ItemType Directory -Force -Path $dstDir | Out-Null
|
|
64
|
+
$children = Get-ChildItem -Path $srcDir -Force
|
|
65
|
+
if ($children) {
|
|
66
|
+
Copy-Item -Path $children.FullName -Destination $dstDir -Recurse -Force
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
Write-Host "installed oh-my-dsh preset to $dst"
|
|
71
|
+
|
|
72
|
+
# Report -- never delete -- a duplicate tree that an older version of this script
|
|
73
|
+
# nested. Those files are not what the preset loads, so they are dead weight.
|
|
74
|
+
foreach ($d in @('skills', 'commands')) {
|
|
75
|
+
$nested = Join-Path $dst (Join-Path $d $d)
|
|
76
|
+
if (Test-Path $nested -PathType Container) {
|
|
77
|
+
Write-Host " WARNING duplicate tree from an older installer: $nested"
|
|
78
|
+
Write-Host " nothing loads it; delete it after you have checked it."
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
# Report what the upgrade left alone, so nothing local disappears silently.
|
|
83
|
+
$installed = Get-ChildItem -Path $dst -Recurse -File |
|
|
84
|
+
Where-Object { $_.Name -notmatch '\.bak-\d{8}-\d{6}$' } |
|
|
85
|
+
ForEach-Object { $_.FullName.Substring($dst.Length + 1) }
|
|
86
|
+
$preserved = $installed | Where-Object { -not $shipped.Contains($_) }
|
|
87
|
+
if ($preserved) {
|
|
88
|
+
Write-Host "preserved files that this repo does not ship (left untouched):"
|
|
89
|
+
$preserved | ForEach-Object { Write-Host " $_" }
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
Write-Host "start a new session and select 'oh-my-dsh' from the preset picker."
|
package/install.sh
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# Install oh-my-dsh as an agent preset (per-session composition) under
|
|
3
|
+
# $DSH_HOME/.agent-presets/oh-my-dsh. Run from a checkout of this repository.
|
|
4
|
+
# This is the "manual preset" path; the primary install is `dsh plugin add`.
|
|
5
|
+
#
|
|
6
|
+
# NON-DESTRUCTIVE by design: the preset directory is never deleted. Your own
|
|
7
|
+
# additions survive an upgrade:
|
|
8
|
+
# - files this repo does not ship (e.g. a locally written skill) are left alone;
|
|
9
|
+
# - a shipped file that WOULD overwrite a locally modified copy is backed up
|
|
10
|
+
# first as <name>.bak-<timestamp>; only then is the shipped version copied.
|
|
11
|
+
# Re-running this script is therefore safe, and reversible.
|
|
12
|
+
|
|
13
|
+
set -eu
|
|
14
|
+
|
|
15
|
+
SRC="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
|
16
|
+
DSH_HOME="${DSH_HOME:-$HOME/.dsh}"
|
|
17
|
+
DST="$DSH_HOME/.agent-presets/oh-my-dsh"
|
|
18
|
+
STAMP="$(date +%Y%m%d-%H%M%S)"
|
|
19
|
+
|
|
20
|
+
mkdir -p "$DST"
|
|
21
|
+
|
|
22
|
+
# Back up $1 (relative to the preset root) when the local copy differs from ours.
|
|
23
|
+
backup_if_differs() {
|
|
24
|
+
rel="$1"
|
|
25
|
+
if [ -f "$DST/$rel" ] && [ -f "$SRC/$rel" ] && ! cmp -s "$SRC/$rel" "$DST/$rel"; then
|
|
26
|
+
cp -p "$DST/$rel" "$DST/$rel.bak-$STAMP"
|
|
27
|
+
echo " backed up local $rel -> $rel.bak-$STAMP"
|
|
28
|
+
fi
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
backup_if_differs agent.cordis.yml
|
|
32
|
+
backup_if_differs preset.yml
|
|
33
|
+
|
|
34
|
+
for d in skills commands; do
|
|
35
|
+
[ -d "$SRC/$d" ] || continue
|
|
36
|
+
find "$SRC/$d" -type f -print | while IFS= read -r f; do
|
|
37
|
+
backup_if_differs "${f#"$SRC"/}"
|
|
38
|
+
done
|
|
39
|
+
done
|
|
40
|
+
|
|
41
|
+
# Merge-copy: add/overwrite the files this repo ships and touch nothing else.
|
|
42
|
+
cp "$SRC/agent.cordis.yml" "$SRC/preset.yml" "$DST/"
|
|
43
|
+
|
|
44
|
+
# Copy the CONTENTS of skills/ and commands/ (note the trailing `/.`), so the
|
|
45
|
+
# copy merges into the existing directory on every re-run instead of depending
|
|
46
|
+
# on how this machine's cp treats an already-existing destination directory.
|
|
47
|
+
for d in skills commands; do
|
|
48
|
+
[ -d "$SRC/$d" ] || continue
|
|
49
|
+
mkdir -p "$DST/$d"
|
|
50
|
+
cp -R "$SRC/$d/." "$DST/$d/"
|
|
51
|
+
done
|
|
52
|
+
|
|
53
|
+
echo "installed oh-my-dsh preset to $DST"
|
|
54
|
+
|
|
55
|
+
# Report -- never delete -- a duplicate tree that the PowerShell installer of an
|
|
56
|
+
# older version nested. Nothing loads those files.
|
|
57
|
+
for d in skills commands; do
|
|
58
|
+
if [ -d "$DST/$d/$d" ]; then
|
|
59
|
+
echo " WARNING duplicate tree from an older installer: $DST/$d/$d"
|
|
60
|
+
echo " nothing loads it; delete it after you have checked it."
|
|
61
|
+
fi
|
|
62
|
+
done
|
|
63
|
+
|
|
64
|
+
# Report what the upgrade left alone, so nothing local disappears silently.
|
|
65
|
+
LIST_DIR="$(mktemp -d)"
|
|
66
|
+
trap 'rm -rf "$LIST_DIR"' EXIT
|
|
67
|
+
find "$DST" -type f ! -name '*.bak-*' | sed "s|^$DST/||" | sort >"$LIST_DIR/installed"
|
|
68
|
+
{
|
|
69
|
+
echo agent.cordis.yml
|
|
70
|
+
echo preset.yml
|
|
71
|
+
for d in skills commands; do
|
|
72
|
+
[ -d "$SRC/$d" ] && find "$SRC/$d" -type f | sed "s|^$SRC/||"
|
|
73
|
+
done
|
|
74
|
+
} | sort >"$LIST_DIR/shipped"
|
|
75
|
+
PRESERVED="$(comm -23 "$LIST_DIR/installed" "$LIST_DIR/shipped")"
|
|
76
|
+
if [ -n "$PRESERVED" ]; then
|
|
77
|
+
echo "preserved files that this repo does not ship (left untouched):"
|
|
78
|
+
echo "$PRESERVED" | sed 's/^/ /'
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
echo "start a new session and select 'oh-my-dsh' from the preset picker."
|
package/package.json
CHANGED
|
@@ -1,35 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@hawk2048/oh-my-dsh",
|
|
3
|
-
"version": "0.2
|
|
4
|
-
"description": "oh-my-dsh: DeepSeek Harness multi-agent orchestration layer — OMC-style workflow skills, slash commands, and an agent preset.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./index.js",
|
|
9
|
-
"./commands": "./commands/omd-commands.mjs"
|
|
10
|
-
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@hawk2048/oh-my-dsh",
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "oh-my-dsh: DeepSeek Harness multi-agent orchestration layer — OMC-style workflow skills, slash commands, and an agent preset.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./commands": "./commands/omd-commands.mjs"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "node tests/run.mjs"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"index.js",
|
|
16
|
+
"commands/",
|
|
17
|
+
"skills/",
|
|
18
|
+
"cordis.patch.yml",
|
|
19
|
+
"preset.yml",
|
|
20
|
+
"agent.cordis.yml",
|
|
21
|
+
"install.sh",
|
|
22
|
+
"install.ps1",
|
|
23
|
+
"README.md",
|
|
24
|
+
"README.zh.md"
|
|
25
|
+
],
|
|
26
|
+
"dsh": {
|
|
27
|
+
"bundle": {
|
|
28
|
+
"patch": "./cordis.patch.yml"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"keywords": [
|
|
33
|
+
"dsh-plugin",
|
|
34
|
+
"deepseek-harness",
|
|
35
|
+
"orchestration",
|
|
36
|
+
"multi-agent",
|
|
37
|
+
"workflow",
|
|
38
|
+
"agent-preset"
|
|
39
|
+
],
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/hawk2048/oh-my-dsh.git"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/preset.yml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
name: oh-my-dsh 编排
|
|
2
|
+
description: 多智能体编排层:核心流水线 Plan→Execute→Review→Verify,加 Team/Autopilot/Ralph/Deep-Interview/Ralplan/Research/Autoresearch/Ultragoal 与 HUD;另含表达与推理纪律(pyramid 金字塔结构化表达、tdd、deepsearch、deep-analyze、ultrathink、ai-slop-cleaner)与工具 skill(doctor、debug、release、remember、cancel、minimal-code-discipline、external-context、visual-verdict、skillify、wiki、help)。30 个 skill + 13 条 /omd-* 斜杠命令,全部封装在 DSH 原生 workflow/subagent/ralph/goal 工具之上。
|