@hawk2048/oh-my-dsh 0.2.1 → 0.3.3
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/CHANGELOG.md +30 -0
- package/LICENSE +21 -21
- package/README.md +246 -235
- package/README.zh.md +246 -235
- 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 +46 -36
- 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/CHANGELOG.md +46 -0
- package/skills/omd-autoresearch/SKILL.md +117 -24
- package/skills/omd-autoresearch/references/eval-prompt.md +79 -0
- package/skills/omd-autoresearch/references/report-rules.md +121 -0
- package/skills/omd-autoresearch/references/report-style.md +228 -0
- package/skills/omd-autoresearch/references/report_lint.py +466 -0
- package/skills/omd-autoresearch/references/rubric.md +89 -0
- package/skills/omd-autoresearch/references/skill-survey.md +158 -0
- 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
package/agent.cordis.yml
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# The `oh-my-dsh` agent preset: the standard coding agent, plus an
|
|
2
|
+
# orchestration vocabulary layered over DSH's native primitives.
|
|
3
|
+
#
|
|
4
|
+
# It is a copy of `standard` with two changes:
|
|
5
|
+
# 1. a persona that names the oh-my-dsh orchestration modes, and
|
|
6
|
+
# 2. `skill-filesystem` configured to bundle the omd-* skills that travel
|
|
7
|
+
# with this preset (resolved via `baseUrl`, so the root follows wherever
|
|
8
|
+
# the preset is installed).
|
|
9
|
+
#
|
|
10
|
+
# Everything else — tools, groups, realms, compaction, plan mode — is the
|
|
11
|
+
# `standard` composition unchanged. The orchestration is SKILLS, not new
|
|
12
|
+
# machinery: the Plan/Execute/Review/Verify pipeline, Team, Autopilot, Ralph,
|
|
13
|
+
# Ralplan, Research, Autoresearch, and Ultragoal all map onto the native
|
|
14
|
+
# `workflow` / `subagent` / `ralph` / `goal` tools already mounted below.
|
|
15
|
+
|
|
16
|
+
# ── identity ────────────────────────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
# The preset's own persona, shadowing the deployment default for this agent.
|
|
19
|
+
# `{{model}}` resolves from the agent's own route. The working directory is NOT a
|
|
20
|
+
# prompt variable: current DSH registers only `provider` and `model`, and injects
|
|
21
|
+
# the working directory as its own runtime-context section. A `cwd` reference here
|
|
22
|
+
# fails prompt assembly for the whole turn, so leave it out.
|
|
23
|
+
# The row uses the `prefix:` key. `text:` is an older key the persona row's schema
|
|
24
|
+
# no longer accepts — it is dropped, and a required `prefix` then fails the mount.
|
|
25
|
+
- id: persona
|
|
26
|
+
name: '@deepseek-ai/dsh-persona'
|
|
27
|
+
config:
|
|
28
|
+
prefix: >-
|
|
29
|
+
You are a coding agent powered by the {{model}} model, running on the oh-my-dsh
|
|
30
|
+
orchestration layer of the DeepSeek Harness.
|
|
31
|
+
oh-my-dsh maps a multi-agent orchestration vocabulary onto DSH's native primitives:
|
|
32
|
+
the canonical Plan → Execute → Review → Verify pipeline, Team (staged
|
|
33
|
+
plan→prd→exec→verify→fix pipeline), Autopilot (one lead agent driving a goal to
|
|
34
|
+
completion), Ralph (persistent verify/fix loops, no silent partials), Deep Interview
|
|
35
|
+
(Socratic requirement clarification), Ralplan (consensus planning via multi-perspective
|
|
36
|
+
deliberation), Research (sourced investigation), Autoresearch (evaluator-driven
|
|
37
|
+
improvement loop), Ultragoal (durable multi-goal workflow with checkpointed artifacts),
|
|
38
|
+
and HUD (inline dsh-ui progress dashboards). Prompt-trigger disciplines also ship as
|
|
39
|
+
skills — pyramid (answer-first MECE structured expression: conclusion in the first line,
|
|
40
|
+
3–5 mutually exclusive points per level, every layer supporting the one above), tdd
|
|
41
|
+
(red-green-refactor), deepsearch (codebase-focused lookup), deep-analyze
|
|
42
|
+
(multi-angle evidence-backed analysis), ultrathink (exhaustive reasoning before acting),
|
|
43
|
+
ai-slop-cleaner (strip AI filler) — plus doctor (self-check the install), and utility
|
|
44
|
+
disciplines: debug (reproduce→isolate→fix→verify), release (version→changelog→tag→artifact),
|
|
45
|
+
remember (durable cross-session notes), cancel (cleanly halt an in-flight mode), minimal-code-discipline
|
|
46
|
+
(smallest correct diff / YAGNI), external-context (pull in URLs/docs/issues), visual-verdict
|
|
47
|
+
(structured screenshot QA), skillify (extract a reusable skill), wiki (markdown knowledge
|
|
48
|
+
base), and help (usage index). Load the matching omd-* skill before entering a mode; default
|
|
49
|
+
to leading each report with its conclusion (omd-pyramid lists the exceptions);
|
|
50
|
+
prefer parallel subagent
|
|
51
|
+
delegation, and drive every long-running objective through the goal tools rather than a single turn.
|
|
52
|
+
|
|
53
|
+
- id: agent-instructions
|
|
54
|
+
name: '@deepseek-ai/dsh-agent-instructions'
|
|
55
|
+
config:
|
|
56
|
+
maxBytes: 65536
|
|
57
|
+
|
|
58
|
+
# ── shell ───────────────────────────────────────────────────────────────────
|
|
59
|
+
|
|
60
|
+
# `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
|
|
61
|
+
# publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
|
|
62
|
+
# the criterion for host-plane ownership — injection resolves before any session
|
|
63
|
+
# exists, so there is no agent to key by. Behind a preset realm those variables
|
|
64
|
+
# never reached the model's shell at all. Both shell tools consume the host
|
|
65
|
+
# registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
|
|
66
|
+
# host-plane too.
|
|
67
|
+
- id: tool-bash
|
|
68
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
69
|
+
disabled: !!js process.platform === 'win32'
|
|
70
|
+
|
|
71
|
+
- id: tool-pwsh
|
|
72
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
73
|
+
disabled: !!js process.platform !== 'win32'
|
|
74
|
+
|
|
75
|
+
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
76
|
+
|
|
77
|
+
# Both register into the host `tools` registry and provide nothing, so
|
|
78
|
+
# they need no realm. The `fs` service and its policy stay in the host.
|
|
79
|
+
- id: tool-fs
|
|
80
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
81
|
+
|
|
82
|
+
- id: tool-fs-search
|
|
83
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
84
|
+
config:
|
|
85
|
+
sampleOverCapGlobResults: false
|
|
86
|
+
|
|
87
|
+
# ── background jobs ────────────────────────────────────────────────────────
|
|
88
|
+
|
|
89
|
+
# Only the model-facing controls. The task REGISTRY stays on the host plane:
|
|
90
|
+
# its producers sit outside any realm this file could put it in — `tool-bash`
|
|
91
|
+
# above resolves it with `ctx.get`, and an entry-local realm here is invisible
|
|
92
|
+
# to every sibling row, so `run_in_background` would answer "background jobs
|
|
93
|
+
# unavailable" while these controls sat in the catalog. The registry is keyed by
|
|
94
|
+
# owning agent anyway, so one host instance serves every session. What a preset
|
|
95
|
+
# chooses is whether its agent can collect and stop background work at all.
|
|
96
|
+
- id: tool-jobs
|
|
97
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
98
|
+
|
|
99
|
+
# ── skills ──────────────────────────────────────────────────────────────────
|
|
100
|
+
|
|
101
|
+
# The skill REGISTRY lives in the host composition and is layered per scope:
|
|
102
|
+
# these rows register into THIS preset's layer of it, so they need no realm.
|
|
103
|
+
# `skill-filesystem` contributes local-root discovery for agents on this preset,
|
|
104
|
+
# plus the omd-* orchestration skills bundled in this preset's own `skills/`
|
|
105
|
+
# directory (`baseUrl` is the preset's directory, so the root follows the
|
|
106
|
+
# install). `tool-skill` gives the catalog and loader; the merged catalog also
|
|
107
|
+
# carries whatever the deployment registered globally (repository plugins).
|
|
108
|
+
- id: skill-filesystem
|
|
109
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
110
|
+
config:
|
|
111
|
+
customSkillDirs:
|
|
112
|
+
- !!js "process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))"
|
|
113
|
+
|
|
114
|
+
- id: tool-skill
|
|
115
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
116
|
+
|
|
117
|
+
# ── goals ───────────────────────────────────────────────────────────────────
|
|
118
|
+
|
|
119
|
+
# The goal service and session driver stay on the host plane, where the Gateway
|
|
120
|
+
# can resolve them. The human command and model-facing tool register into this
|
|
121
|
+
# preset's scoped layers.
|
|
122
|
+
- id: command-goal
|
|
123
|
+
name: '@deepseek-ai/dsh-command-goal'
|
|
124
|
+
|
|
125
|
+
# oh-my-dsh slash commands (/omd-plan /omd-execute /omd-review /omd-verify
|
|
126
|
+
# /omd-team /omd-autopilot /omd-ralph /omd-deep-interview /omd-ralplan
|
|
127
|
+
# /omd-research /omd-autoresearch /omd-ultragoal /omd-pyramid): a preset-shipped ESM producer
|
|
128
|
+
# — the relative `name` resolves against the preset's own directory. Each handler
|
|
129
|
+
# submits a user message that steers the model into the matching omd-* skill,
|
|
130
|
+
# then returns a direct UI acknowledgement.
|
|
131
|
+
- id: command-omd
|
|
132
|
+
name: './commands/omd-commands.mjs'
|
|
133
|
+
|
|
134
|
+
- id: tool-goal
|
|
135
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
136
|
+
|
|
137
|
+
# ── plan mode ───────────────────────────────────────────────────────────────
|
|
138
|
+
|
|
139
|
+
# Plan state is per-agent by nature, so an entry-local realm is not a
|
|
140
|
+
# workaround here — it is the correct lifetime.
|
|
141
|
+
- id: planning
|
|
142
|
+
name: cordis:group
|
|
143
|
+
group: true
|
|
144
|
+
isolate:
|
|
145
|
+
planMode: true
|
|
146
|
+
config:
|
|
147
|
+
- id: plan-mode
|
|
148
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
149
|
+
config:
|
|
150
|
+
section: |
|
|
151
|
+
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
152
|
+
|
|
153
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
154
|
+
|
|
155
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
156
|
+
|
|
157
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
158
|
+
|
|
159
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
160
|
+
|
|
161
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
162
|
+
|
|
163
|
+
# ── compaction ──────────────────────────────────────────────────────────────
|
|
164
|
+
|
|
165
|
+
# `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
|
|
166
|
+
# share this realm rather than sit outside it.
|
|
167
|
+
#
|
|
168
|
+
# `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
|
|
169
|
+
# plane, and the rows here resolve that one instance. It takes no configuration,
|
|
170
|
+
# keys every fold by Session, and owns the context-meter projection units the
|
|
171
|
+
# browser reads for every session — behind a realm those units would come and go
|
|
172
|
+
# with whichever presets happen to be mounted. What a preset chooses is whether
|
|
173
|
+
# its agent compacts at all, which is `compaction-basic` below.
|
|
174
|
+
- id: compaction
|
|
175
|
+
name: cordis:group
|
|
176
|
+
group: true
|
|
177
|
+
isolate:
|
|
178
|
+
compaction: true
|
|
179
|
+
toolResultPruner: true
|
|
180
|
+
config:
|
|
181
|
+
- id: compaction-basic
|
|
182
|
+
name: '@deepseek-ai/dsh-compaction-basic'
|
|
183
|
+
|
|
184
|
+
- id: command-compact
|
|
185
|
+
name: '@deepseek-ai/dsh-command-compact'
|
|
186
|
+
|
|
187
|
+
- id: tool-result-pruner
|
|
188
|
+
name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
|
|
189
|
+
config:
|
|
190
|
+
thresholdChars: 8192
|
|
191
|
+
headChars: 4096
|
|
192
|
+
tailChars: 1024
|
|
193
|
+
|
|
194
|
+
# ── delegation and workflows ────────────────────────────────────────────────
|
|
195
|
+
|
|
196
|
+
# The `subagents` registry and its spawn/fork backends live in the HOST
|
|
197
|
+
# composition: the registry is a process singleton whose cross-session queries
|
|
198
|
+
# the api-proxy serves to the browser, and a provider name may only be
|
|
199
|
+
# registered once. This preset contributes the delegation TOOLS, which resolve
|
|
200
|
+
# that host registry.
|
|
201
|
+
#
|
|
202
|
+
# `workflows` is different — nothing outside an agent reads it — so every row
|
|
203
|
+
# that reaches it shares one entry-local realm here, and a consumer left
|
|
204
|
+
# outside would resolve a host registry this preset does not populate.
|
|
205
|
+
- id: delegation
|
|
206
|
+
name: cordis:group
|
|
207
|
+
group: true
|
|
208
|
+
isolate:
|
|
209
|
+
workflowEngine: true
|
|
210
|
+
config:
|
|
211
|
+
- id: tool-subagent-control
|
|
212
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
213
|
+
|
|
214
|
+
- id: tool-subagent-list-agents
|
|
215
|
+
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
216
|
+
|
|
217
|
+
- id: tool-subagent
|
|
218
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
219
|
+
config:
|
|
220
|
+
provider: spawn
|
|
221
|
+
toolName: subagent
|
|
222
|
+
modelSelectionSettings: true
|
|
223
|
+
backgroundMode: continuable
|
|
224
|
+
|
|
225
|
+
# Fork omits model selection so provider/model stay equal to the parent and
|
|
226
|
+
# the inherited history remains eligible for KV Cache reuse. This preset
|
|
227
|
+
# keeps fork continuable; parent and child inherit the same messaging tool,
|
|
228
|
+
# while the parent id and return guidance follow the inherited history.
|
|
229
|
+
- id: tool-subagent-fork
|
|
230
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
231
|
+
config:
|
|
232
|
+
provider: fork
|
|
233
|
+
toolName: subagent_fork
|
|
234
|
+
backgroundMode: continuable
|
|
235
|
+
|
|
236
|
+
# Production dsh does not install these optional providers. Install the
|
|
237
|
+
# matching Bundle in this Profile and restart the Host, then copy this
|
|
238
|
+
# preset and remove `disabled` from the matching tool row. Host availability
|
|
239
|
+
# alone grants no tool.
|
|
240
|
+
- id: tool-subagent-codex
|
|
241
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
242
|
+
disabled: true
|
|
243
|
+
config:
|
|
244
|
+
provider: codex
|
|
245
|
+
toolName: subagent_codex
|
|
246
|
+
backgroundMode: one-shot
|
|
247
|
+
maxDepth: provider-managed
|
|
248
|
+
|
|
249
|
+
- id: tool-subagent-claude-code
|
|
250
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
251
|
+
disabled: true
|
|
252
|
+
config:
|
|
253
|
+
provider: claude-code
|
|
254
|
+
toolName: subagent_claude_code
|
|
255
|
+
backgroundMode: one-shot
|
|
256
|
+
maxDepth: provider-managed
|
|
257
|
+
|
|
258
|
+
- id: workflow-worker-thread
|
|
259
|
+
name: '@deepseek-ai/dsh-workflow-worker-thread'
|
|
260
|
+
config:
|
|
261
|
+
provider: spawn
|
|
262
|
+
|
|
263
|
+
- id: tool-workflow
|
|
264
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
265
|
+
|
|
266
|
+
- id: tool-ralph
|
|
267
|
+
name: '@deepseek-ai/dsh-tool-ralph'
|
|
268
|
+
config:
|
|
269
|
+
subagentProvider: spawn
|
|
270
|
+
maxRounds: 64
|
|
271
|
+
|
|
272
|
+
# ── remaining model-facing rows ─────────────────────────────────────────────
|
|
273
|
+
|
|
274
|
+
- id: tool-ask-user
|
|
275
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
276
|
+
|
|
277
|
+
- id: tool-todo
|
|
278
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
279
|
+
config:
|
|
280
|
+
allowParallelInProgress: true
|
|
281
|
+
|
|
282
|
+
# The `web` service and its search provider stay in the host composition; only
|
|
283
|
+
# the model-facing tool is per-session.
|
|
284
|
+
- id: tool-web
|
|
285
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
286
|
+
config:
|
|
287
|
+
fetch: true
|
|
288
|
+
searchTimeoutMs: 60000
|
|
@@ -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 {}
|