@dsmm/dsmm 0.1.9 → 0.2.0

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.
Files changed (409) hide show
  1. package/README.md +40 -24
  2. package/agent-presets/dsmm-builder/agent.cordis.yml +1949 -39
  3. package/agent-presets/dsmm-builder/preset.yml +1 -1
  4. package/agent-presets/dsmm-clarifier/agent.cordis.yml +436 -14
  5. package/agent-presets/dsmm-clarifier/preset.yml +1 -1
  6. package/agent-presets/dsmm-code-search/agent.cordis.yml +56 -14
  7. package/agent-presets/dsmm-code-search/preset.yml +1 -1
  8. package/agent-presets/dsmm-coding/agent.cordis.yml +588 -0
  9. package/agent-presets/dsmm-coding/preset.yml +3 -0
  10. package/agent-presets/dsmm-complex/agent.cordis.yml +1140 -0
  11. package/agent-presets/dsmm-complex/preset.yml +3 -0
  12. package/agent-presets/dsmm-creative/agent.cordis.yml +536 -12
  13. package/agent-presets/dsmm-creative/preset.yml +1 -1
  14. package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +1163 -0
  15. package/agent-presets/dsmm-cross-cutting/preset.yml +3 -0
  16. package/agent-presets/dsmm-deep/agent.cordis.yml +1173 -0
  17. package/agent-presets/dsmm-deep/preset.yml +3 -0
  18. package/agent-presets/dsmm-doc-search/agent.cordis.yml +56 -14
  19. package/agent-presets/dsmm-doc-search/preset.yml +1 -1
  20. package/agent-presets/dsmm-documenting/agent.cordis.yml +581 -0
  21. package/agent-presets/dsmm-documenting/preset.yml +3 -0
  22. package/agent-presets/dsmm-frontend/agent.cordis.yml +580 -0
  23. package/agent-presets/dsmm-frontend/preset.yml +3 -0
  24. package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +572 -0
  25. package/agent-presets/dsmm-hard-reasoning/preset.yml +3 -0
  26. package/agent-presets/dsmm-media-reader/agent.cordis.yml +56 -14
  27. package/agent-presets/dsmm-media-reader/preset.yml +1 -1
  28. package/agent-presets/dsmm-normal-task/agent.cordis.yml +546 -0
  29. package/agent-presets/dsmm-normal-task/preset.yml +3 -0
  30. package/agent-presets/dsmm-oracle/agent.cordis.yml +421 -12
  31. package/agent-presets/dsmm-oracle/preset.yml +1 -1
  32. package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +421 -12
  33. package/agent-presets/dsmm-oracle-2nd/preset.yml +1 -1
  34. package/agent-presets/dsmm-orchestrator/agent.cordis.yml +2023 -43
  35. package/agent-presets/dsmm-orchestrator/preset.yml +1 -1
  36. package/agent-presets/dsmm-plan-critic/agent.cordis.yml +416 -13
  37. package/agent-presets/dsmm-plan-critic/preset.yml +1 -1
  38. package/agent-presets/dsmm-planner/agent.cordis.yml +462 -13
  39. package/agent-presets/dsmm-planner/preset.yml +1 -1
  40. package/agent-presets/dsmm-quick/agent.cordis.yml +119 -0
  41. package/agent-presets/dsmm-quick/preset.yml +3 -0
  42. package/agent-presets/dsmm-research/agent.cordis.yml +141 -0
  43. package/agent-presets/dsmm-research/preset.yml +3 -0
  44. package/agent-presets/dsmm-reviewer/agent.cordis.yml +420 -13
  45. package/agent-presets/dsmm-reviewer/preset.yml +1 -1
  46. package/cordis.patch.yml +1 -5
  47. package/docs/agent-presets.md +64 -15
  48. package/docs/compatibility.md +61 -13
  49. package/docs/design.md +41 -0
  50. package/docs/lsp.md +12 -2
  51. package/docs/migration-from-ocmm.md +8 -0
  52. package/docs/profiles.md +41 -15
  53. package/docs/releasing.md +78 -8
  54. package/docs/roadmap.md +6 -0
  55. package/docs/runtime-recovery.md +12 -0
  56. package/docs/safety-guards.md +7 -3
  57. package/docs/settings-status.md +148 -7
  58. package/docs/skill-sync.md +52 -14
  59. package/lib/client/DeploymentPage.d.ts +18 -0
  60. package/lib/client/DeploymentPage.js +120 -0
  61. package/lib/client/ProfilesSection.js +4 -2
  62. package/lib/client/deployment-controller.d.ts +50 -0
  63. package/lib/client/deployment-controller.js +193 -0
  64. package/lib/client/deployment-data.d.ts +16 -0
  65. package/lib/client/deployment-data.js +109 -0
  66. package/lib/client/deployment-locales.d.ts +66 -0
  67. package/lib/client/deployment-locales.js +72 -0
  68. package/lib/client/index.js +50 -0
  69. package/lib/client/locales.d.ts +4 -0
  70. package/lib/client/locales.js +4 -2
  71. package/lib/client/plugins-contract.d.ts +27 -0
  72. package/lib/client/plugins-contract.js +2 -0
  73. package/lib/client/styles.d.ts +1 -1
  74. package/lib/client/styles.js +16 -0
  75. package/lib/client.js +1048 -29
  76. package/lib/commands.js +3 -0
  77. package/lib/config-file-store.d.ts +23 -0
  78. package/lib/config-file-store.js +67 -0
  79. package/lib/deployment-config.d.ts +37 -0
  80. package/lib/deployment-config.js +184 -0
  81. package/lib/dsh-home.d.ts +3 -0
  82. package/lib/dsh-home.js +10 -0
  83. package/lib/dsh-types.d.ts +12 -65
  84. package/lib/guards.d.ts +2 -1
  85. package/lib/guards.js +19 -2
  86. package/lib/index.d.ts +8 -1
  87. package/lib/index.js +115 -25
  88. package/lib/lsp.d.ts +13 -0
  89. package/lib/lsp.js +60 -0
  90. package/lib/mode.js +42 -47
  91. package/lib/model-routing.js +5 -2
  92. package/lib/modules.d.ts +27 -0
  93. package/lib/modules.js +21 -0
  94. package/lib/native-scope.d.ts +9 -0
  95. package/lib/native-scope.js +20 -0
  96. package/lib/plan-validation.js +6 -44
  97. package/lib/preset-materializer.js +2 -0
  98. package/lib/preset-registry.d.ts +1 -1
  99. package/lib/preset-registry.js +7 -4
  100. package/lib/preset-skills.d.ts +4 -1
  101. package/lib/preset-skills.js +60 -19
  102. package/lib/profile-remote.d.ts +14 -0
  103. package/lib/profile-remote.js +197 -4
  104. package/lib/profile-rpc.d.ts +24 -1
  105. package/lib/profile-rpc.js +139 -1
  106. package/lib/profile-runtime.d.ts +24 -0
  107. package/lib/profile-runtime.js +177 -33
  108. package/lib/profile-store.d.ts +45 -1
  109. package/lib/profile-store.js +236 -102
  110. package/lib/profile-types.d.ts +55 -0
  111. package/lib/prompt-content.d.ts +25 -0
  112. package/lib/prompt-content.js +27 -0
  113. package/lib/prompts.d.ts +8 -2
  114. package/lib/prompts.js +46 -34
  115. package/lib/role-policy.d.ts +51 -0
  116. package/lib/role-policy.js +224 -0
  117. package/lib/role-providers.d.ts +6 -2
  118. package/lib/role-providers.js +72 -39
  119. package/lib/role-subagents.d.ts +6 -2
  120. package/lib/role-subagents.js +187 -48
  121. package/lib/roles.d.ts +16 -4
  122. package/lib/roles.js +86 -186
  123. package/lib/runtime-recovery.js +16 -5
  124. package/lib/session-scope.js +2 -0
  125. package/lib/settings.d.ts +69 -1
  126. package/lib/settings.js +262 -91
  127. package/lib/skills.d.ts +24 -9
  128. package/lib/skills.js +114 -35
  129. package/lib/state.d.ts +10 -6
  130. package/lib/state.js +48 -49
  131. package/lib/status.d.ts +25 -0
  132. package/lib/status.js +47 -9
  133. package/locale/en.json +2 -2
  134. package/locale/zh.json +2 -2
  135. package/package.json +19 -2
  136. package/prompts/deepwork.md +144 -20
  137. package/prompts/source/agents/clarifier.md +45 -0
  138. package/prompts/source/agents/orchestrator.md +63 -0
  139. package/prompts/source/agents/plan-critic.md +25 -0
  140. package/prompts/source/agents/planner.md +19 -0
  141. package/prompts/source/agents/reviewer.md +17 -0
  142. package/prompts/source/catalog.json +548 -0
  143. package/prompts/source/category/coding.md +46 -0
  144. package/prompts/source/category/complex.md +29 -0
  145. package/prompts/source/category/creative.md +38 -0
  146. package/prompts/source/category/cross-cutting.md +52 -0
  147. package/prompts/source/category/deep.md +62 -0
  148. package/prompts/source/category/documenting.md +62 -0
  149. package/prompts/source/category/frontend.md +38 -0
  150. package/prompts/source/category/hard-reasoning.md +53 -0
  151. package/prompts/source/category/normal-task.md +27 -0
  152. package/prompts/source/category/quick.md +34 -0
  153. package/prompts/source/category/research.md +56 -0
  154. package/prompts/source/deepwork/claude-opus-5.md +28 -0
  155. package/prompts/source/deepwork/codex.md +9 -0
  156. package/prompts/source/deepwork/default.md +129 -0
  157. package/prompts/source/deepwork/gemini.md +184 -0
  158. package/prompts/source/deepwork/glm.md +256 -0
  159. package/prompts/source/deepwork/gpt.md +43 -0
  160. package/prompts/source/deepwork/kimi-k27.md +13 -0
  161. package/prompts/source/deepwork/planner.md +41 -0
  162. package/prompts/source/deepwork/swe-2.md +13 -0
  163. package/prompts/source/manifest.json +3118 -0
  164. package/prompts/source/shared/dsh-host-contract.md +6 -0
  165. package/prompts/source/shared/locale.md +8 -0
  166. package/prompts/source/shared/shell-safety.md +7 -0
  167. package/prompts/source/terminal/builder.md +13 -0
  168. package/prompts/source/terminal/clarifier.md +41 -0
  169. package/prompts/source/terminal/code-search.md +39 -0
  170. package/prompts/source/terminal/coding.md +41 -0
  171. package/prompts/source/terminal/complex.md +43 -0
  172. package/prompts/source/terminal/creative.md +41 -0
  173. package/prompts/source/terminal/cross-cutting.md +43 -0
  174. package/prompts/source/terminal/deep.md +43 -0
  175. package/prompts/source/terminal/doc-search.md +39 -0
  176. package/prompts/source/terminal/documenting.md +41 -0
  177. package/prompts/source/terminal/frontend.md +41 -0
  178. package/prompts/source/terminal/hard-reasoning.md +41 -0
  179. package/prompts/source/terminal/media-reader.md +39 -0
  180. package/prompts/source/terminal/normal-task.md +41 -0
  181. package/prompts/source/terminal/oracle-2nd.md +53 -0
  182. package/prompts/source/terminal/oracle.md +53 -0
  183. package/prompts/source/terminal/orchestrator.md +26 -0
  184. package/prompts/source/terminal/plan-critic.md +41 -0
  185. package/prompts/source/terminal/planner.md +42 -0
  186. package/prompts/source/terminal/quick.md +39 -0
  187. package/prompts/source/terminal/research.md +39 -0
  188. package/prompts/source/terminal/reviewer.md +53 -0
  189. package/skills/ast-grep/LICENSE +21 -0
  190. package/skills/ast-grep/README.md +138 -0
  191. package/skills/ast-grep/SKILL.md +284 -0
  192. package/skills/ast-grep/SOURCE +1 -0
  193. package/skills/ast-grep/install.ps1 +235 -0
  194. package/skills/ast-grep/install.sh +286 -0
  195. package/skills/ast-grep/references/cli.md +233 -0
  196. package/skills/ast-grep/references/install.md +168 -0
  197. package/skills/ast-grep/references/patterns.md +149 -0
  198. package/skills/ast-grep/references/pitfalls.md +305 -0
  199. package/skills/ast-grep/references/recipes.md +404 -0
  200. package/skills/ast-grep/references/sgconfig.md +250 -0
  201. package/skills/ast-grep/references/yaml-rules.md +511 -0
  202. package/skills/ast-grep/scripts/ast_grep_helper.py +760 -0
  203. package/skills/ast-grep/tests/smoke.ps1 +129 -0
  204. package/skills/ast-grep/tests/smoke.sh +212 -0
  205. package/skills/ast-grep/tests/test_resolver.py +154 -0
  206. package/skills/brainstorming/SKILL.md +102 -9
  207. package/skills/coding-agent-sessions/LICENSE-UPSTREAM.md +82 -0
  208. package/skills/coding-agent-sessions/NOTICE.md +24 -0
  209. package/skills/coding-agent-sessions/SKILL.md +144 -0
  210. package/skills/coding-agent-sessions/agents/openai.yaml +4 -0
  211. package/skills/coding-agent-sessions/pyrightconfig.json +5 -0
  212. package/skills/coding-agent-sessions/references/all-platforms.md +77 -0
  213. package/skills/coding-agent-sessions/references/claude.md +34 -0
  214. package/skills/coding-agent-sessions/references/codex.md +32 -0
  215. package/skills/coding-agent-sessions/references/opencode.md +45 -0
  216. package/skills/coding-agent-sessions/references/senpi.md +29 -0
  217. package/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
  218. package/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
  219. package/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
  220. package/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
  221. package/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
  222. package/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
  223. package/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
  224. package/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
  225. package/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
  226. package/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
  227. package/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +104 -0
  228. package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
  229. package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
  230. package/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
  231. package/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
  232. package/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
  233. package/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
  234. package/skills/coding-agent-sessions/scripts/tests/test_agent_sessions.py +322 -0
  235. package/skills/coding-agent-sessions/scripts/tests/test_aside_scanner.py +131 -0
  236. package/skills/coding-agent-sessions/scripts/tests/test_cli_contract.py +126 -0
  237. package/skills/coding-agent-sessions/scripts/tests/test_extended_scanners.py +262 -0
  238. package/skills/coding-agent-sessions/scripts/tests/test_optional_sqlite_scanners.py +79 -0
  239. package/skills/coding-agent-sessions/scripts/tests/test_pi_family_scanners.py +130 -0
  240. package/skills/debugging/SKILL.md +125 -4
  241. package/skills/debugging/references/logging.md +2 -0
  242. package/skills/debugging/references/methodology/00-setup.md +2 -0
  243. package/skills/debugging/references/methodology/02-investigate.md +8 -2
  244. package/skills/debugging/references/methodology/03-flaky-triage.md +3 -1
  245. package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +4 -2
  246. package/skills/debugging/references/methodology/05-escalate.md +2 -0
  247. package/skills/debugging/references/methodology/06-fix.md +2 -0
  248. package/skills/debugging/references/methodology/08-qa.md +2 -0
  249. package/skills/debugging/references/methodology/09-cleanup.md +2 -0
  250. package/skills/debugging/references/methodology/partial-runtime-evidence.md +4 -2
  251. package/skills/debugging/references/runtimes/bundled-js-binary.md +2 -0
  252. package/skills/debugging/references/runtimes/go.md +2 -0
  253. package/skills/debugging/references/runtimes/native-binary.md +2 -0
  254. package/skills/debugging/references/runtimes/node.md +2 -0
  255. package/skills/debugging/references/runtimes/python.md +2 -0
  256. package/skills/debugging/references/runtimes/rust.md +2 -0
  257. package/skills/debugging/references/scripts/dap.test.mjs +539 -0
  258. package/skills/debugging/references/scripts/fixture-adapter.mjs +164 -0
  259. package/skills/debugging/references/tools/dap.md +3 -1
  260. package/skills/debugging/references/tools/ghidra.md +2 -0
  261. package/skills/debugging/references/tools/playwright-cli.md +2 -0
  262. package/skills/debugging/references/tools/pwndbg.md +2 -0
  263. package/skills/debugging/references/tools/pwntools.md +2 -0
  264. package/skills/dispatching-parallel-agents/SKILL.md +94 -7
  265. package/skills/frontend/.frontend-materialized.json +856 -0
  266. package/skills/frontend/ATTRIBUTION.md +37 -0
  267. package/skills/frontend/LICENSE-Apache-2.0.txt +201 -0
  268. package/skills/frontend/LICENSE-taste-skill.txt +21 -0
  269. package/skills/frontend/LICENSE-ui-ux-pro-max.txt +21 -0
  270. package/skills/frontend/SKILL.md +142 -0
  271. package/skills/frontend/references/design/README.md +256 -0
  272. package/skills/frontend/references/design/_INDEX.md +206 -0
  273. package/skills/frontend/references/design/airbnb.md +393 -0
  274. package/skills/frontend/references/design/airtable.md +92 -0
  275. package/skills/frontend/references/design/apple.md +250 -0
  276. package/skills/frontend/references/design/aside.md +211 -0
  277. package/skills/frontend/references/design/binance.md +348 -0
  278. package/skills/frontend/references/design/bmw.md +183 -0
  279. package/skills/frontend/references/design/brutalist-skill.md +92 -0
  280. package/skills/frontend/references/design/bugatti.md +271 -0
  281. package/skills/frontend/references/design/cal.md +262 -0
  282. package/skills/frontend/references/design/claude.md +315 -0
  283. package/skills/frontend/references/design/clay.md +307 -0
  284. package/skills/frontend/references/design/clickhouse.md +284 -0
  285. package/skills/frontend/references/design/clone-from-url.md +69 -0
  286. package/skills/frontend/references/design/cohere.md +269 -0
  287. package/skills/frontend/references/design/coinbase.md +132 -0
  288. package/skills/frontend/references/design/composio.md +310 -0
  289. package/skills/frontend/references/design/cursor.md +312 -0
  290. package/skills/frontend/references/design/design-system-architecture.md +250 -0
  291. package/skills/frontend/references/design/elevenlabs.md +268 -0
  292. package/skills/frontend/references/design/expo.md +284 -0
  293. package/skills/frontend/references/design/ferrari.md +317 -0
  294. package/skills/frontend/references/design/figma.md +223 -0
  295. package/skills/frontend/references/design/framer.md +249 -0
  296. package/skills/frontend/references/design/gpt-tasteskill.md +74 -0
  297. package/skills/frontend/references/design/hashicorp.md +281 -0
  298. package/skills/frontend/references/design/ibm.md +335 -0
  299. package/skills/frontend/references/design/image-to-code-skill.md +1228 -0
  300. package/skills/frontend/references/design/imagegen-brandkit.md +798 -0
  301. package/skills/frontend/references/design/imagegen-frontend-mobile.md +1465 -0
  302. package/skills/frontend/references/design/imagegen-frontend-web.md +987 -0
  303. package/skills/frontend/references/design/interaction-skill.md +52 -0
  304. package/skills/frontend/references/design/intercom.md +149 -0
  305. package/skills/frontend/references/design/kraken.md +128 -0
  306. package/skills/frontend/references/design/lamborghini.md +291 -0
  307. package/skills/frontend/references/design/linear.app.md +370 -0
  308. package/skills/frontend/references/design/lovable.md +301 -0
  309. package/skills/frontend/references/design/mastercard.md +368 -0
  310. package/skills/frontend/references/design/meta.md +369 -0
  311. package/skills/frontend/references/design/minimalist-skill.md +85 -0
  312. package/skills/frontend/references/design/minimax.md +260 -0
  313. package/skills/frontend/references/design/mintlify.md +329 -0
  314. package/skills/frontend/references/design/miro.md +111 -0
  315. package/skills/frontend/references/design/mistral.ai.md +264 -0
  316. package/skills/frontend/references/design/mongodb.md +269 -0
  317. package/skills/frontend/references/design/nike.md +366 -0
  318. package/skills/frontend/references/design/notion.md +312 -0
  319. package/skills/frontend/references/design/nvidia.md +296 -0
  320. package/skills/frontend/references/design/ollama.md +270 -0
  321. package/skills/frontend/references/design/opencode.ai.md +284 -0
  322. package/skills/frontend/references/design/output-skill.md +49 -0
  323. package/skills/frontend/references/design/pinterest.md +233 -0
  324. package/skills/frontend/references/design/playstation.md +367 -0
  325. package/skills/frontend/references/design/posthog.md +259 -0
  326. package/skills/frontend/references/design/raycast.md +271 -0
  327. package/skills/frontend/references/design/react-dev-tooling-skill.md +232 -0
  328. package/skills/frontend/references/design/redesign-skill.md +178 -0
  329. package/skills/frontend/references/design/renault.md +314 -0
  330. package/skills/frontend/references/design/replicate.md +264 -0
  331. package/skills/frontend/references/design/resend.md +306 -0
  332. package/skills/frontend/references/design/revolut.md +188 -0
  333. package/skills/frontend/references/design/runwayml.md +247 -0
  334. package/skills/frontend/references/design/sanity.md +360 -0
  335. package/skills/frontend/references/design/sentry.md +265 -0
  336. package/skills/frontend/references/design/shopify.md +353 -0
  337. package/skills/frontend/references/design/soft-skill.md +98 -0
  338. package/skills/frontend/references/design/spacex.md +197 -0
  339. package/skills/frontend/references/design/spotify.md +249 -0
  340. package/skills/frontend/references/design/starbucks.md +583 -0
  341. package/skills/frontend/references/design/stitch-design-example.md +121 -0
  342. package/skills/frontend/references/design/stitch-skill.md +184 -0
  343. package/skills/frontend/references/design/stripe.md +325 -0
  344. package/skills/frontend/references/design/supabase.md +258 -0
  345. package/skills/frontend/references/design/superhuman.md +255 -0
  346. package/skills/frontend/references/design/taste-skill.md +1206 -0
  347. package/skills/frontend/references/design/tesla.md +289 -0
  348. package/skills/frontend/references/design/theverge.md +342 -0
  349. package/skills/frontend/references/design/together.ai.md +266 -0
  350. package/skills/frontend/references/design/uber.md +298 -0
  351. package/skills/frontend/references/design/vercel.md +313 -0
  352. package/skills/frontend/references/design/vodafone.md +426 -0
  353. package/skills/frontend/references/design/voltagent.md +326 -0
  354. package/skills/frontend/references/design/warp.md +256 -0
  355. package/skills/frontend/references/design/webflow.md +95 -0
  356. package/skills/frontend/references/design/wired.md +281 -0
  357. package/skills/frontend/references/design/wise.md +176 -0
  358. package/skills/frontend/references/design/x.ai.md +260 -0
  359. package/skills/frontend/references/design/zapier.md +331 -0
  360. package/skills/frontend/references/perfection/README.md +264 -0
  361. package/skills/frontend/references/perfection/react-perf-tooling.md +234 -0
  362. package/skills/frontend/references/ui-ux-db/README.md +659 -0
  363. package/skills/frontend/references/ui-ux-db/data/app-interface.csv +31 -0
  364. package/skills/frontend/references/ui-ux-db/data/charts.csv +26 -0
  365. package/skills/frontend/references/ui-ux-db/data/colors.csv +162 -0
  366. package/skills/frontend/references/ui-ux-db/data/google-fonts.csv +1924 -0
  367. package/skills/frontend/references/ui-ux-db/data/icons.csv +106 -0
  368. package/skills/frontend/references/ui-ux-db/data/landing.csv +35 -0
  369. package/skills/frontend/references/ui-ux-db/data/products.csv +162 -0
  370. package/skills/frontend/references/ui-ux-db/data/react-performance.csv +45 -0
  371. package/skills/frontend/references/ui-ux-db/data/stacks/angular.csv +51 -0
  372. package/skills/frontend/references/ui-ux-db/data/stacks/astro.csv +54 -0
  373. package/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -0
  374. package/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
  375. package/skills/frontend/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
  376. package/skills/frontend/references/ui-ux-db/data/stacks/laravel.csv +51 -0
  377. package/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
  378. package/skills/frontend/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
  379. package/skills/frontend/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
  380. package/skills/frontend/references/ui-ux-db/data/stacks/react-native.csv +52 -0
  381. package/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -0
  382. package/skills/frontend/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
  383. package/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -0
  384. package/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
  385. package/skills/frontend/references/ui-ux-db/data/stacks/threejs.csv +54 -0
  386. package/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -0
  387. package/skills/frontend/references/ui-ux-db/data/styles.csv +85 -0
  388. package/skills/frontend/references/ui-ux-db/data/typography.csv +74 -0
  389. package/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -0
  390. package/skills/frontend/references/ui-ux-db/data/ux-guidelines.csv +100 -0
  391. package/skills/frontend/references/ui-ux-db/data/web-interface.csv +31 -0
  392. package/skills/frontend/references/ui-ux-db/scripts/core.py +262 -0
  393. package/skills/frontend/references/ui-ux-db/scripts/design_system.py +1148 -0
  394. package/skills/frontend/references/ui-ux-db/scripts/search.py +114 -0
  395. package/skills/frontend/scripts/perfection/lighthouse-audit.py +201 -0
  396. package/skills/git-master/SKILL.md +112 -0
  397. package/skills/git-master/agents/openai.yaml +13 -0
  398. package/skills/init-deep/SKILL.md +279 -0
  399. package/skills/receiving-code-review/SKILL.md +112 -7
  400. package/skills/remove-ai-slops/SKILL.md +159 -8
  401. package/skills/requesting-code-review/SKILL.md +96 -3
  402. package/skills/requesting-code-review/code-reviewer.md +47 -0
  403. package/skills/subagent-driven-development/SKILL.md +176 -6
  404. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +23 -0
  405. package/skills/subagent-driven-development/implementer-prompt.md +69 -0
  406. package/skills/subagent-driven-development/spec-reviewer-prompt.md +32 -0
  407. package/skills/using-git-worktrees/SKILL.md +141 -0
  408. package/skills/writing-plans/SKILL.md +121 -7
  409. package/skills/writing-plans/plan-document-reviewer-prompt.md +38 -0
@@ -1,56 +1,195 @@
1
- import * as nativeSubagentTool from "@deepseek-ai/dsh-tool-subagent";
2
- import { DSMM_ROLES, roleSubagentConfig } from "./roles.js";
3
- import { isDsmmRoleId } from "./roles.js";
4
- import { resolveSelectedAgentPreset } from "./session-scope.js";
5
- /** The DSH headless runner never mounts Agent presets; give it role-specific native tools. */
6
- export function registerHeadlessRoleTools(ctx, controller, getSettings) {
7
- const installed = new WeakSet();
8
- const onCreated = async ({ agent }) => {
9
- const profile = agent.ctx.get?.("profileContext")
10
- ?? ctx.get?.("profileContext")
11
- ?? (ctx.get === undefined ? ctx.profileContext : undefined);
12
- if (!profile?.startedBundles.includes("@deepseek-ai/dsh-headless"))
13
- return;
14
- if (agent.session.header?.origin === "subagent")
1
+ import { getTraceable, symbols } from "@deepseek-ai/cordis";
2
+ import { createRequire } from "node:module";
3
+ import { pathToFileURL } from "node:url";
4
+ import { defineTool } from "@deepseek-ai/dsh-tools";
5
+ import { settleRun, SubagentError } from "@deepseek-ai/dsh-subagent";
6
+ import { DSMM_ROLES } from "./roles.js";
7
+ import { DsmmRolePolicy, roleToolName } from "./role-policy.js";
8
+ import { roleProviderName, roleAgentOptions } from "./role-providers.js";
9
+ import { agentForScope, nativeAgentContext, scopeParentOf } from "./native-scope.js";
10
+ const hostControls = ["send_message", "interrupt_agent", "exit_plan_mode", "ask_user_question", "todo_write", "job_output", "job_list", "job_kill"];
11
+ // Agent-owned policy realms survive a bundle reinstall; do not register another
12
+ // identity prompt/tools layer on the same retained live Agent.
13
+ const admittedRealms = new WeakSet();
14
+ /** Keep native controls on the frozen startup substrate, not desired-save reconciliation. */
15
+ export async function registerNativeSubagentControls(ctx) {
16
+ const tools = ctx.get("tools");
17
+ if (tools === undefined || ctx.get("subagents") === undefined)
18
+ return;
19
+ if (tools.get("send_message") !== undefined && tools.get("interrupt_agent") !== undefined)
20
+ return;
21
+ const anchor = ctx.get("profileContext")?.installAnchor;
22
+ if (anchor === undefined)
23
+ return;
24
+ try {
25
+ const plugin = await import(pathToFileURL(createRequire(anchor).resolve("@deepseek-ai/dsh-tool-subagent-control")).href);
26
+ await ctx.plugin(plugin).await();
27
+ }
28
+ catch {
29
+ ctx.logger.warn("DSMM native subagent controls unavailable; continuable control requires the installed host substrate");
30
+ }
31
+ }
32
+ async function foreground(run) {
33
+ const [execution] = await Promise.allSettled([run.result.then((result) => {
34
+ if (result.stopReason !== "completed") {
35
+ const partial = result.output.filter((block) => block.type === "text").map((block) => block.text).join("");
36
+ throw new SubagentError(`subagent ${result.stopReason}${result.diagnostic === undefined ? "" : `: ${result.diagnostic}`}${partial === "" ? "" : `\nPartial output: ${partial}`}`, result.stopReason.toUpperCase());
37
+ }
38
+ // Native results are borrowed readonly JSON; the tool runtime owns lossless
39
+ // materialization, so do not duplicate blocks to erase readonly typing.
40
+ return { kind: "foreground", runId: run.id, output: result.output };
41
+ })]);
42
+ const [disposal] = await Promise.allSettled([run.dispose()]);
43
+ if (execution.status === "rejected") {
44
+ if (disposal.status === "rejected")
45
+ throw new AggregateError([execution.reason, disposal.reason], "DSMM subagent result and disposal failed");
46
+ throw execution.reason;
47
+ }
48
+ if (disposal.status === "rejected")
49
+ throw disposal.reason;
50
+ return execution.value;
51
+ }
52
+ function registerRoleTool(agent, agentCtx, tools, role, getSettings, policy) {
53
+ const settings = getSettings(agent);
54
+ const subagents = agentCtx.get("subagents");
55
+ if (subagents === undefined)
56
+ throw new Error("DSMM role tools require native subagents");
57
+ const background = settings.subagents.enableRunInBackground;
58
+ const continuable = settings.subagents.backgroundMode === "continuable";
59
+ return tools.register(defineTool({
60
+ name: roleToolName(role.id), description: `Delegate a bounded ${role.name} task through the native runtime. ${background ? continuable ? "Background continuable is opt-in here; returns a durable child id for native send_message/interrupt_agent. Set run_in_background false to wait." : "Waits by default; explicit background work is owned by native jobs." : "Waits for the child's useful result. Background execution is disabled."}`,
61
+ parameters: { description: { type: "string", required: true }, prompt: { type: "string", required: true },
62
+ ...(background ? { run_in_background: { type: "boolean" } } : {}) },
63
+ output: { schema: { type: "json" }, render(_args, value) {
64
+ const result = value;
65
+ return [{ type: "text", text: result.kind === "continuable" ? `started subagent ${result.subagentId}` : result.kind === "background" ? `started background subagent job ${result.jobId}` : result.output?.filter((block) => block.type === "text").map((block) => block.text).join("") ?? "" }];
66
+ } },
67
+ async execute(args, exec) {
68
+ const fields = background ? ["description", "prompt", "run_in_background"] : ["description", "prompt"];
69
+ if (Object.keys(exec.arguments).some((key) => !fields.includes(key)))
70
+ throw new SubagentError("DSMM delegation parameter is unsupported by this admitted tool", "UNSUPPORTED_CAPABILITY");
71
+ const parent = exec.agent;
72
+ if (parent === undefined)
73
+ throw new SubagentError("DSMM delegation requires a calling Agent", "UNAUTHORIZED");
74
+ const admitted = policy.assertDelegation(parent, role.id);
75
+ const current = getSettings(parent);
76
+ const provider = subagents.getProvider(roleProviderName(role.id));
77
+ if (provider === undefined)
78
+ throw new SubagentError("DSMM role provider is unavailable", "NO_PROVIDER");
79
+ const request = { parent, label: args.description, prompt: [{ type: "text", text: args.prompt }],
80
+ persona: role.persona, maxDepth: subagents.resolveMaxDepth(current.subagents.maxDepth) };
81
+ const assertCurrent = () => {
82
+ if (policy.assertDelegation(parent, role.id).epoch !== admitted.epoch)
83
+ throw new SubagentError("DSMM parent admission changed before delegation", "UNAUTHORIZED");
84
+ };
85
+ exec.signal.throwIfAborted();
86
+ if (background && (args.run_in_background ?? continuable)) {
87
+ if (continuable) {
88
+ if (provider.prepareContinuable === undefined)
89
+ throw new SubagentError("DSMM provider has no prepareContinuable capability", "UNSUPPORTED_CAPABILITY");
90
+ const agentOptions = await roleAgentOptions(parent, role.id, current, exec.signal);
91
+ assertCurrent();
92
+ const child = await policy.duringDelegation(parent, role.id, () => subagents.startContinuable({ provider: provider.name, label: args.description,
93
+ request: { ...request, ...(agentOptions === undefined ? {} : { agentOptions }) }, signal: exec.signal }), request.toolFilter);
94
+ return { kind: "continuable", subagentId: child.childId };
95
+ }
96
+ const jobs = agentCtx.get("jobs");
97
+ if (jobs === undefined)
98
+ throw new SubagentError("DSMM background jobs require the native jobs registry/controller", "UNSUPPORTED_CAPABILITY");
99
+ return { kind: "background", jobId: jobs.start({ kind: "subagent", owner: parent.id, label: args.description, run() {
100
+ const cancel = new AbortController();
101
+ const started = Promise.resolve().then(() => { assertCurrent(); return subagents.start(provider.name, { ...request, signal: cancel.signal }); });
102
+ return { cancel(reason) { cancel.abort(reason); }, done: started.then(settleRun, (error) => ({ status: cancel.signal.aborted ? "killed" : "failed", detail: String(error) })) };
103
+ } }) };
104
+ }
105
+ assertCurrent();
106
+ return foreground(await subagents.start(provider.name, { ...request, signal: exec.signal }));
107
+ }
108
+ }));
109
+ }
110
+ /** Published name retained; all native/headless Agents consume one admitted policy. */
111
+ export async function registerHeadlessRoleTools(ctx, controller, getSettings, policy = new DsmmRolePolicy(ctx, getSettings, controller)) {
112
+ const states = new WeakMap();
113
+ const reconcile = async (agent) => {
114
+ const state = states.get(agent);
115
+ if (state === undefined)
15
116
  return;
16
- const agentCtx = agent.ctx;
17
- if (installed.has(agentCtx))
117
+ const agentCtx = nativeAgentContext(agent);
118
+ const raw = agentCtx.get("agentPresets")?.serviceFor({ ctx: agentCtx }, "tools");
119
+ const tools = raw === undefined ? agentCtx.get("tools") : getTraceable(agentCtx, raw);
120
+ if (tools === undefined)
121
+ throw new Error("DSMM role tools require native guard/restrict services");
122
+ const settings = getSettings(agent), identity = policy.identity(agent), targets = policy.targets(agent);
123
+ const subagents = agentCtx.get("subagents");
124
+ const host = ctx.get?.("tools");
125
+ const names = [...hostControls, ...host?.schemas().map((row) => row.name).filter((name) => name.startsWith(`mcp__${settings.lsp.serverName}__`)) ?? []];
126
+ const definitions = names.map((name) => host?.get(name));
127
+ const signature = JSON.stringify([identity.role, targets, settings.subagents, targets.map((role) => [settings.roleRouting[role], subagents?.getProvider(roleProviderName(role))?.capabilities])]);
128
+ const sameRealm = state.tools !== undefined && (Reflect.get(state.tools, symbols.original) ?? state.tools) === (Reflect.get(tools, symbols.original) ?? tools);
129
+ const parentScope = scopeParentOf(agent);
130
+ const sameParent = state.parentScope === parentScope;
131
+ if (sameRealm && sameParent && signature === state.signature && definitions.length === state.hostDefinitions.length && definitions.every((definition, i) => definition === state.hostDefinitions[i]))
18
132
  return;
19
- if (agentCtx.plugin === undefined || agentCtx.tools?.guard === undefined)
20
- throw new Error("dsmm headless role tools require Agent-scoped Cordis plugin and tool guard services");
21
- installed.add(agentCtx);
22
- try {
23
- const settings = getSettings(agent);
24
- const roles = DSMM_ROLES.filter((role) => role.id !== "dsmm-orchestrator" && settings.roles[role.id]);
25
- const names = new Set(roles.map((role) => role.id.replace(/-/gu, "_")));
26
- const guard = agentCtx.tools.guard((execution) => {
27
- if (!names.has(execution.name))
28
- return undefined;
29
- const current = getSettings(execution.agent);
30
- if (controller.active(execution.agent, current.defaultActive) || isDsmmRoleId(resolveSelectedAgentPreset(execution.agent?.session)))
31
- return undefined;
32
- return "DW role tools require an active Deepwork session or DW-selected preset";
33
- });
34
- agentCtx.effect?.(() => guard);
35
- const catalog = agentCtx.tools;
36
- const availableTools = catalog.get?.("read_image") === undefined ? [] : ["read_image"];
37
- for (const role of roles) {
38
- // Agent creation is awaited before first prompt assembly. Mounting here
39
- // sees the Agent-isolated systemPrompt/tools and avoids leaking tools to
40
- // its sibling sessions or the read-only child being delegated.
41
- // Model routing belongs to the parent's admitted profile, not the tool's
42
- // standing composition. The role provider validates it before spawning.
43
- await agentCtx.plugin(nativeSubagentTool, roleSubagentConfig(role, availableTools));
44
- }
45
- agentCtx.effect?.(() => () => installed.delete(agentCtx));
133
+ for (const dispose of state.owned.splice(0))
134
+ dispose();
135
+ state.restriction?.();
136
+ state.guard?.();
137
+ state.tools = tools;
138
+ // rc.2 has no public filter for own-layer registrations. A native monotonic
139
+ // guard fences their invocation and exact definition identity instead.
140
+ state.guard = tools.guard((execution) => execution.agent === agent ? policy.toolDenial(agent, execution.name, tools) : undefined);
141
+ const forbidden = tools.schemas(agent).map((tool) => tool.name).filter((name) => name !== "run_code" && policy.toolDenial(agent, name) !== undefined
142
+ && tools.get(name, parentScope) === tools.get(name, agent));
143
+ if (forbidden.length > 0)
144
+ state.restriction = tools.restrict({ deny: forbidden });
145
+ else
146
+ state.restriction = undefined;
147
+ for (const definition of definitions) {
148
+ if (definition !== undefined && tools.get(definition.name, agent) === undefined && policy.toolDenial(agent, definition.name) === undefined)
149
+ state.owned.push(tools.register(definition));
46
150
  }
47
- catch (error) {
48
- installed.delete(agentCtx);
49
- throw error;
151
+ for (const role of DSMM_ROLES.filter((row) => targets.includes(row.id))) {
152
+ if (subagents?.getProvider(roleProviderName(role.id))?.capabilities.depthLimit === true)
153
+ state.owned.push(registerRoleTool(agent, agentCtx, tools, role, getSettings, policy));
50
154
  }
155
+ policy.captureTools(agent, tools, [...targets.map(roleToolName), ...names], !sameRealm || !sameParent);
156
+ state.signature = signature;
157
+ state.hostDefinitions = definitions;
158
+ state.parentScope = parentScope;
159
+ };
160
+ const onCreated = async ({ agent }) => {
161
+ if (states.has(agent) || admittedRealms.has(agent))
162
+ return;
163
+ if (!getSettings(agent).modules.deepwork.enabled)
164
+ return;
165
+ const agentCtx = nativeAgentContext(agent);
166
+ policy.admit(agent);
167
+ states.set(agent, { owned: [], hostDefinitions: [] });
168
+ policy.installDrain(agent);
169
+ agentCtx.get("systemPrompt").section({ name: "dsmm:delegation-identity", order: 49, text() {
170
+ const identity = policy.identity(agent);
171
+ return identity.role === undefined ? "" : `Native admitted role: ${identity.role}; ${identity.child ? "bounded child, not stage-owner" : "root"}. Permitted child roles: ${policy.targets(agent).join(", ") || "none"}. Native same-layer registrations may remain displayed but forbidden calls are denied. Role/host permissions remain in force when common is off. Read-only plans are complete Markdown for native review and authorized coordinator persistence, never planner writes.`;
172
+ } });
173
+ agentCtx.effect(() => () => {
174
+ const state = states.get(agent);
175
+ state?.restriction?.();
176
+ state?.guard?.();
177
+ for (const dispose of state?.owned ?? [])
178
+ dispose();
179
+ states.delete(agent);
180
+ });
181
+ await reconcile(agent);
182
+ admittedRealms.add(agent);
183
+ agentCtx.effect(() => () => admittedRealms.delete(agent));
51
184
  };
52
- // Agent-created is emitted in the new Agent scope; DSMM's bundle scope is
53
- // a sibling, so a global listener is required to observe that publication.
54
185
  ctx.on?.("agent/created", onCreated, { global: true });
186
+ ctx.on?.("system-prompt/assemble", async (_assembly, options, next) => {
187
+ const agent = agentForScope(ctx, options.scope);
188
+ if (agent !== undefined)
189
+ await reconcile(agent);
190
+ return next();
191
+ }, { prepend: true, global: true });
192
+ for (const agent of ctx.get?.("agents")?.list() ?? [])
193
+ await onCreated({ agent });
55
194
  }
56
195
  //# sourceMappingURL=role-subagents.js.map
package/lib/roles.d.ts CHANGED
@@ -1,30 +1,42 @@
1
1
  import type { DsmmSkillName } from "./skills.js";
2
2
  import type { DsmmModelRoute, DsmmRoleRouting } from "./settings.js";
3
- export declare const DSMM_ROLE_IDS: readonly ["dsmm-orchestrator", "dsmm-planner", "dsmm-plan-critic", "dsmm-builder", "dsmm-reviewer", "dsmm-oracle", "dsmm-oracle-2nd", "dsmm-creative", "dsmm-code-search", "dsmm-doc-search", "dsmm-clarifier", "dsmm-media-reader"];
3
+ export declare const DSMM_ROLE_IDS: readonly ["dsmm-orchestrator", "dsmm-planner", "dsmm-plan-critic", "dsmm-builder", "dsmm-reviewer", "dsmm-oracle", "dsmm-oracle-2nd", "dsmm-creative", "dsmm-code-search", "dsmm-doc-search", "dsmm-clarifier", "dsmm-media-reader", "dsmm-frontend", "dsmm-hard-reasoning", "dsmm-research", "dsmm-quick", "dsmm-coding", "dsmm-normal-task", "dsmm-complex", "dsmm-deep", "dsmm-documenting", "dsmm-cross-cutting"];
4
4
  export type DsmmRoleId = (typeof DSMM_ROLE_IDS)[number];
5
5
  export type DsmmRoleMode = "primary" | "all" | "subagent";
6
+ export type DsmmDelegationGroup = "primary-coordinator" | "utility-leaf" | "read-only-workflow" | "standard-workflow" | "local-coordinator";
6
7
  export interface DsmmRoleDefinition {
7
8
  id: DsmmRoleId;
9
+ sourceId?: string;
10
+ kind?: "role" | "category";
8
11
  name: string;
9
12
  description: string;
10
13
  order: number;
11
14
  mode: DsmmRoleMode;
12
15
  enabledByDefault: boolean;
13
16
  access?: "read-only" | "write";
17
+ delegation?: DsmmDelegationGroup;
18
+ allowedChildren?: readonly DsmmRoleId[];
19
+ childBuilderAllowedChildren?: readonly DsmmRoleId[];
14
20
  persona: string;
15
21
  }
16
- export declare const DSMM_ROLES: readonly DsmmRoleDefinition[];
22
+ export declare const DSMM_ROLES: readonly (DsmmRoleDefinition & Required<Pick<DsmmRoleDefinition, "sourceId" | "kind" | "delegation" | "allowedChildren">>)[];
17
23
  export declare function isDsmmRoleId(value: unknown): value is DsmmRoleId;
18
24
  /** Root exposure is separate from whether a role is enabled for delegation. */
19
25
  export declare function isRootRole(role: Pick<DsmmRoleDefinition, "mode">): boolean;
26
+ /**
27
+ * @param skills Ignored compatibility argument; preserve its published position.
28
+ * Native Agent settings, not standing preset YAML, control skill visibility.
29
+ */
20
30
  export declare function renderAgentCordis(role: DsmmRoleDefinition, skills?: readonly DsmmSkillName[], enabledRoles?: readonly DsmmRoleId[], roleRouting?: DsmmRoleRouting): string;
21
31
  export interface RolePluginRow {
22
32
  id: string;
23
33
  name: string;
24
- config?: Record<string, unknown>;
34
+ config?: Record<string, unknown> | RolePluginRow[];
35
+ group?: boolean;
36
+ isolate?: Record<string, boolean>;
25
37
  disabled?: boolean;
26
38
  }
27
- /** The native PresetDefinition and the static YAML mirror use this same inventory. */
39
+ /** Native definitions and YAML share this inventory; skills is an ignored positional compatibility argument. */
28
40
  export declare function rolePluginRows(role: DsmmRoleDefinition, skills?: readonly DsmmSkillName[], enabledRoles?: readonly DsmmRoleId[], roleRouting?: DsmmRoleRouting): RolePluginRow[];
29
41
  /** DSH's spawn provider joins the parent's preset; persona/filter give each child its own role. */
30
42
  export declare function roleSubagentPluginRows(enabledRoles?: readonly DsmmRoleId[], roleRouting?: DsmmRoleRouting): RolePluginRow[];
package/lib/roles.js CHANGED
@@ -1,155 +1,25 @@
1
1
  import { DSMM_SKILL_NAMES } from "./skills.js";
2
+ import { buildRolePersona, SOURCE_ROLE_CATALOG } from "./prompt-content.js";
2
3
  import { roleProviderName } from "./role-providers.js";
4
+ import { allowedRoleChildren } from "./role-policy.js";
3
5
  export const DSMM_ROLE_IDS = [
4
- "dsmm-orchestrator",
5
- "dsmm-planner",
6
- "dsmm-plan-critic",
7
- "dsmm-builder",
8
- "dsmm-reviewer",
9
- "dsmm-oracle",
10
- "dsmm-oracle-2nd",
11
- "dsmm-creative",
12
- "dsmm-code-search",
13
- "dsmm-doc-search",
14
- "dsmm-clarifier",
15
- "dsmm-media-reader"
16
- ];
17
- export const DSMM_ROLES = [
18
- {
19
- id: "dsmm-orchestrator",
20
- name: "DW Orchestrator",
21
- description: "Coordinates Deepwork sessions and routes work to focused DW roles.",
22
- order: 10,
23
- mode: "primary",
24
- enabledByDefault: true,
25
- persona: `You are DW Orchestrator (role ID: dsmm-orchestrator), a dsh-native coordinator for deepwork sessions.
26
- For complex behavior implementation, default to planner → plan-critic → implementation; for simple bounded low-risk work, proceed directly. A clear implementation request authorizes its stated scope without repeated design approval.
27
- Delegate bounded work only through callable role-specific DSH tools: dsmm-planner, dsmm-plan-critic, dsmm-builder, dsmm-reviewer, dsmm-oracle, dsmm-oracle-2nd, dsmm-creative, dsmm-code-search, dsmm-doc-search, dsmm-clarifier and dsmm-media-reader.
28
- Reviewer is primary-lane self-review; use Oracle only for a useful external cross-check when a different model was explicitly selected. Review when risk warrants it, not in a fixed loop.
29
- Keep scope explicit, preserve user constraints, and do not claim a preset is active unless the host selected it. Implementing does not authorize Git writes.`
30
- },
31
- {
32
- id: "dsmm-planner",
33
- name: "DW Planner",
34
- description: "Turns approved scope into ordered implementation steps with verification gates.",
35
- order: 20,
36
- mode: "all",
37
- enabledByDefault: true,
38
- access: "read-only",
39
- persona: `You are DW Planner (role ID: dsmm-planner), a dsh-native planning specialist.
40
- Inspect evidence and convert approved complex work into an outcome-oriented plan with dependencies, interfaces, risks and verification. Do not implement or modify files. Flag decisions that change scope, safety or public APIs. Git writes need specific authorization.`
41
- },
42
- {
43
- id: "dsmm-plan-critic",
44
- name: "DW Plan Critic",
45
- description: "Checks implementation plans for ambiguity, missing evidence, and unsafe sequencing.",
46
- order: 30,
47
- mode: "subagent",
48
- enabledByDefault: true,
49
- access: "read-only",
50
- persona: `You are DW Plan Critic (role ID: dsmm-plan-critic), a dsh-native plan review specialist.
51
- Inspect the plan and evidence for material blockers in outcome coverage, dependencies, tests, safety and scope. Return concrete blockers or a concise pass with residual risks; do not require a fixed format or repeated reviews after editorial changes. Read only; do not implement or perform Git writes.`
52
- },
53
- {
54
- id: "dsmm-builder",
55
- name: "DW Builder",
56
- description: "Implements one bounded approved outcome and verifies the changed surface.",
57
- order: 35,
58
- mode: "primary",
59
- enabledByDefault: true,
60
- access: "write",
61
- persona: `You are DW Builder (role ID: dsmm-builder), a bounded implementation worker. Respect assigned file ownership and other workers' changes. Implement only the approved outcome, verify the affected surface, and report changes, evidence and risks. Escalate changes to public APIs, permissions, safety, data guarantees or irreversible behavior. Never stage, commit, push, tag, rebase or release without specific authorization.`
62
- },
63
- {
64
- id: "dsmm-reviewer",
65
- name: "DW Reviewer",
66
- description: "Reviews completed changes against requirements, tests, and regression risk.",
67
- order: 40,
68
- mode: "subagent",
69
- enabledByDefault: true,
70
- access: "read-only",
71
- persona: `You are DW Reviewer (role ID: dsmm-reviewer), a dsh-native implementation reviewer.
72
- Read the current implementation diff and new files against requirements, conventions and verification. Prioritize actionable correctness and regression findings. This is primary-model or primary-lane self-review, not external Oracle review. Do not modify files or perform Git writes.`
73
- },
74
- {
75
- id: "dsmm-oracle",
76
- name: "DW Oracle",
77
- description: "First-priority external-model implementation cross-check when explicitly configured.",
78
- order: 42,
79
- mode: "subagent",
80
- enabledByDefault: true,
81
- access: "read-only",
82
- persona: `You are DW Oracle (role ID: dsmm-oracle), first-priority implementation cross-check. Read only; inspect the current diff, evidence and requirements for concrete defects. Your role is externally heterogeneous only when the caller selects a different available model; do not claim model independence when inheriting the parent's route. Do not implement or perform Git writes.`
83
- },
84
- {
85
- id: "dsmm-oracle-2nd",
86
- name: "DW Oracle 2nd",
87
- description: "Second-priority external-model implementation cross-check for an additional evidence need.",
88
- order: 44,
89
- mode: "subagent",
90
- enabledByDefault: true,
91
- access: "read-only",
92
- persona: `You are DW Oracle 2nd (role ID: dsmm-oracle-2nd), second-priority implementation cross-check, not a higher-capability rank. Read only; report concrete defects in the current diff and evidence. An external model must be explicitly selected; the role label alone is no proof of independence. Do not implement or perform Git writes.`
93
- },
94
- {
95
- id: "dsmm-creative",
96
- name: "DW Creative",
97
- description: "Explores unconventional but coherent approaches and explicit trade-offs.",
98
- order: 46,
99
- mode: "subagent",
100
- enabledByDefault: true,
101
- access: "read-only",
102
- persona: `You are DW Creative (role ID: dsmm-creative). Explore distinct coherent approaches, state trade-offs, constraints and a grounded recommendation. Remain read-only unless a separate implementation assignment authorizes changes. Do not perform Git writes.`
103
- },
104
- {
105
- id: "dsmm-code-search",
106
- name: "DW Code Search",
107
- description: "Finds local codebase facts, symbols, patterns, and relevant implementation context.",
108
- order: 50,
109
- mode: "subagent",
110
- enabledByDefault: true,
111
- access: "read-only",
112
- persona: `You are DW Code Search (role ID: dsmm-code-search), a dsh-native codebase research specialist.
113
- Search local project context for exact files, symbols, references, and conventions needed by the caller.
114
- Summarize findings with paths and evidence; do not modify files.`
115
- },
116
- {
117
- id: "dsmm-doc-search",
118
- name: "DW Doc Search",
119
- description: "Finds current external documentation and examples for library or API questions.",
120
- order: 60,
121
- mode: "subagent",
122
- enabledByDefault: true,
123
- access: "read-only",
124
- persona: `You are DW Doc Search (role ID: dsmm-doc-search), a dsh-native documentation research specialist.
125
- Find current documentation and real examples for libraries, APIs, CLIs, and services relevant to the task.
126
- Cite source locations, separate facts from assumptions, and avoid guessing when documentation is unavailable.`
127
- },
128
- {
129
- id: "dsmm-clarifier",
130
- name: "DW Clarifier",
131
- description: "Reduces ambiguous requests to the few decisions needed before planning or implementation.",
132
- order: 70,
133
- mode: "subagent",
134
- enabledByDefault: true,
135
- access: "read-only",
136
- persona: `You are DW Clarifier (role ID: dsmm-clarifier), a dsh-native requirements clarification specialist.
137
- Identify ambiguity in purpose, constraints, success criteria, and scope boundaries.
138
- Ask at most three material questions, prefer concrete choices, and propose safe defaults when evidence is strong.`
139
- },
140
- {
141
- id: "dsmm-media-reader",
142
- name: "DW Media Reader",
143
- description: "Extracts implementation-relevant information from images, PDFs, and visual artifacts.",
144
- order: 80,
145
- mode: "subagent",
146
- enabledByDefault: true,
147
- access: "read-only",
148
- persona: `You are DW Media Reader (role ID: dsmm-media-reader), a dsh-native visual and document analysis specialist.
149
- Extract text, structure, UI details, diagrams, and implementation-relevant facts from provided media.
150
- Report uncertainty clearly and avoid inventing details that are not visible.`
151
- }
6
+ "dsmm-orchestrator", "dsmm-planner", "dsmm-plan-critic", "dsmm-builder",
7
+ "dsmm-reviewer", "dsmm-oracle", "dsmm-oracle-2nd", "dsmm-creative",
8
+ "dsmm-code-search", "dsmm-doc-search", "dsmm-clarifier", "dsmm-media-reader",
9
+ "dsmm-frontend", "dsmm-hard-reasoning", "dsmm-research", "dsmm-quick",
10
+ "dsmm-coding", "dsmm-normal-task", "dsmm-complex", "dsmm-deep",
11
+ "dsmm-documenting", "dsmm-cross-cutting"
152
12
  ];
13
+ // Generated source catalog is checked against the exact literal ID inventory.
14
+ // It carries no OCMM provider/model default and requires only package assets.
15
+ export const DSMM_ROLES = SOURCE_ROLE_CATALOG.map((row) => ({
16
+ ...row,
17
+ id: row.id,
18
+ allowedChildren: row.allowedChildren,
19
+ childBuilderAllowedChildren: row.childBuilderAllowedChildren,
20
+ persona: buildRolePersona(row)
21
+ }));
22
+ const defaultEnabledRoleIds = DSMM_ROLES.filter((role) => role.enabledByDefault).map((role) => role.id);
153
23
  export function isDsmmRoleId(value) {
154
24
  return typeof value === "string" && DSMM_ROLE_IDS.includes(value);
155
25
  }
@@ -157,11 +27,29 @@ export function isDsmmRoleId(value) {
157
27
  export function isRootRole(role) {
158
28
  return role.mode === "primary" || role.mode === "all";
159
29
  }
160
- export function renderAgentCordis(role, skills = DSMM_SKILL_NAMES, enabledRoles = DSMM_ROLE_IDS, roleRouting = {}) {
161
- return rolePluginRows(role, skills, enabledRoles, roleRouting).map(renderPluginRow).join("");
30
+ /**
31
+ * @param skills Ignored compatibility argument; preserve its published position.
32
+ * Native Agent settings, not standing preset YAML, control skill visibility.
33
+ */
34
+ export function renderAgentCordis(role, skills = DSMM_SKILL_NAMES, enabledRoles = defaultEnabledRoleIds, roleRouting = {}) {
35
+ return rolePluginRows(role, skills, enabledRoles, roleRouting).map((row) => renderPluginRow(row)).join("");
162
36
  }
163
- /** The native PresetDefinition and the static YAML mirror use this same inventory. */
164
- export function rolePluginRows(role, skills = DSMM_SKILL_NAMES, enabledRoles = DSMM_ROLE_IDS, roleRouting = {}) {
37
+ const longDevelopmentRoles = ["dsmm-coding", "dsmm-frontend", "dsmm-deep", "dsmm-complex", "dsmm-cross-cutting"];
38
+ // Deployment-owned guidance from DSH rc.2's public standard preset, not a new
39
+ // role permission: Planner remains read-only after native plan-mode exit.
40
+ const nativePlanSection = `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.
41
+
42
+ 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.
43
+
44
+ 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.
45
+
46
+ 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.
47
+
48
+ 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.
49
+
50
+ 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.`;
51
+ /** Native definitions and YAML share this inventory; skills is an ignored positional compatibility argument. */
52
+ export function rolePluginRows(role, skills = DSMM_SKILL_NAMES, enabledRoles = defaultEnabledRoleIds, roleRouting = {}) {
165
53
  const rows = [
166
54
  { id: "persona", name: "@deepseek-ai/dsh-persona", config: { prefix: role.persona } },
167
55
  { id: "agent-instructions", name: "@deepseek-ai/dsh-agent-instructions", config: { maxBytes: 65536 } },
@@ -169,24 +57,39 @@ export function rolePluginRows(role, skills = DSMM_SKILL_NAMES, enabledRoles = D
169
57
  { id: "tool-fs-search", name: "@deepseek-ai/dsh-tool-fs-search", config: { sampleOverCapGlobResults: false } },
170
58
  { id: "tool-web", name: "@deepseek-ai/dsh-tool-web", config: { fetch: true } },
171
59
  { id: "skill-filesystem", name: "@deepseek-ai/dsh-skill-filesystem" },
172
- { id: "tool-skill", name: "@deepseek-ai/dsh-tool-skill" },
173
- { id: "dsmm-preset-skills", name: "@dsmm/dsmm/preset-skills", config: { skills: DSMM_SKILL_NAMES.filter((name) => skills.includes(name)) } }
60
+ { id: "tool-skill", name: "@deepseek-ai/dsh-tool-skill" }
174
61
  ];
175
62
  if (role.access !== "read-only") {
176
63
  rows.push({ id: "tool-bash", name: "@deepseek-ai/dsh-tool-bash", disabled: process.platform === "win32" });
177
64
  rows.push({ id: "tool-pwsh", name: "@deepseek-ai/dsh-tool-pwsh", disabled: process.platform !== "win32" });
178
65
  rows.push({ id: "tool-jobs", name: "@deepseek-ai/dsh-tool-jobs" });
179
66
  }
180
- if (role.id === "dsmm-orchestrator" || role.id === "dsmm-builder")
181
- rows.push(...roleSubagentPluginRows(enabledRoles, roleRouting));
67
+ const root = isRootRole(role);
68
+ const longDevelopment = longDevelopmentRoles.includes(role.id);
69
+ if (root) {
70
+ rows.push({ id: "planning", name: "cordis:group", group: true, isolate: { planMode: true }, config: [
71
+ { id: "plan-mode", name: "@deepseek-ai/dsh-plan-mode", config: { section: nativePlanSection } }
72
+ ] });
73
+ }
74
+ if (root || longDevelopment) {
75
+ rows.push({ id: "compaction", name: "cordis:group", group: true, isolate: { compaction: true, toolResultPruner: true }, config: [
76
+ { id: "compaction-basic", name: "@deepseek-ai/dsh-compaction-basic" },
77
+ { id: "command-compact", name: "@deepseek-ai/dsh-command-compact" },
78
+ { id: "tool-result-pruner", name: "@deepseek-ai/dsh-compaction-tool-result-pruner", config: { thresholdChars: 8192, headChars: 4096, tailChars: 1024 } }
79
+ ] });
80
+ rows.push({ id: "tool-ask-user", name: "@deepseek-ai/dsh-tool-ask-user" });
81
+ if (role.id !== "dsmm-planner")
82
+ rows.push({ id: "tool-todo", name: "@deepseek-ai/dsh-tool-todo", config: { allowParallelInProgress: true } });
83
+ }
84
+ rows.push(...roleSubagentPluginRows(enabledRoles.filter((id) => allowedRoleChildren(role.id).includes(id)), roleRouting));
182
85
  return rows;
183
86
  }
184
87
  /** DSH's spawn provider joins the parent's preset; persona/filter give each child its own role. */
185
- export function roleSubagentPluginRows(enabledRoles = DSMM_ROLE_IDS, roleRouting = {}) {
88
+ export function roleSubagentPluginRows(enabledRoles = defaultEnabledRoleIds, roleRouting = {}) {
186
89
  return DSMM_ROLES.filter((role) => role.id !== "dsmm-orchestrator" && enabledRoles.includes(role.id)).map((role) => ({
187
90
  id: `subagent-${role.id}`,
188
91
  name: "@deepseek-ai/dsh-tool-subagent",
189
- config: roleSubagentConfig(role, [], roleRouting[role.id]?.primary)
92
+ config: roleSubagentConfig(role, enabledRoles.map((id) => id.replace(/-/gu, "_")), roleRouting[role.id]?.primary)
190
93
  }));
191
94
  }
192
95
  export function roleSubagentConfig(role, availableTools = [], primary) {
@@ -198,13 +101,13 @@ export function roleSubagentConfig(role, availableTools = [], primary) {
198
101
  // would make DSH's native toolFilter reject the child at startup.
199
102
  if (role.id === "dsmm-media-reader" && availableTools.includes("read_image"))
200
103
  readOnlyTools.push("read_image");
104
+ readOnlyTools.push(...allowedRoleChildren(role.id).map((id) => id.replace(/-/gu, "_")).filter((name) => availableTools.includes(name)));
201
105
  return {
202
106
  provider: roleProviderName(role.id),
203
107
  ...(primary === undefined ? {} : { agentOptions: { ...primary } }),
204
108
  toolName: role.id.replace(/-/gu, "_"),
205
- // A standing preset with modelSelectionSettings=true re-registers tools in
206
- // each child Agent's own scope. DSH restrictions filter inherited tools,
207
- // not same-scope registrations, so that would bypass readonly filters.
109
+ // Selection remains host-owned; identity and monotonic execution fences are
110
+ // admitted separately from this standing composition.
208
111
  modelSelectionSettings: false,
209
112
  backgroundMode: "one-shot",
210
113
  enableRunInBackground: false,
@@ -220,36 +123,33 @@ description: ${quoteYamlString(role.description)}
220
123
  }
221
124
  function indentBlock(value, spaces) {
222
125
  const prefix = " ".repeat(spaces);
223
- return value.split(/\r?\n/u).map((line) => `${prefix}${line}`).join("\n");
126
+ return value.split(/\r?\n/u).map((line) => line.length === 0 ? "" : `${prefix}${line}`).join("\n");
224
127
  }
225
- function renderPluginRow(row) {
226
- let output = `- id: ${row.id}\n name: ${quoteYamlString(row.name)}\n`;
128
+ function renderPluginRow(row, spaces = 0) {
129
+ const prefix = " ".repeat(spaces);
130
+ let output = `${prefix}- id: ${row.id}\n${prefix} name: ${quoteYamlString(row.name)}\n`;
227
131
  if (row.disabled !== undefined) {
228
- output += ` disabled: !!js process.platform ${row.id === "tool-bash" ? "===" : "!=="} 'win32'\n`;
132
+ output += `${prefix} disabled: !!js process.platform ${row.id === "tool-bash" ? "===" : "!=="} 'win32'\n`;
229
133
  }
134
+ if (row.group !== undefined)
135
+ output += `${prefix} group: ${row.group}\n`;
136
+ if (row.isolate !== undefined)
137
+ output += renderYamlField("isolate", row.isolate, spaces + 2);
230
138
  if (row.config === undefined)
231
139
  return output;
232
- output += " config:\n";
233
- for (const [key, value] of Object.entries(row.config)) {
234
- if (typeof value === "string" && value.includes("\n"))
235
- output += ` ${key}: |-\n${indentBlock(value, 6)}\n`;
236
- else if (typeof value === "string")
237
- output += ` ${key}: ${quoteYamlString(value)}\n`;
238
- else if (Array.isArray(value))
239
- output += value.length === 0 ? ` ${key}: []\n` : ` ${key}:\n${value.map((item) => ` - ${quoteYamlString(String(item))}\n`).join("")}`;
240
- else if (typeof value === "object" && value !== null) {
241
- output += ` ${key}:\n`;
242
- for (const [nestedKey, nestedValue] of Object.entries(value)) {
243
- if (Array.isArray(nestedValue))
244
- output += nestedValue.length === 0 ? ` ${nestedKey}: []\n` : ` ${nestedKey}:\n${nestedValue.map((item) => ` - ${quoteYamlString(String(item))}\n`).join("")}`;
245
- else
246
- output += ` ${nestedKey}: ${typeof nestedValue === "string" ? quoteYamlString(nestedValue) : String(nestedValue)}\n`;
247
- }
248
- }
249
- else
250
- output += ` ${key}: ${String(value)}\n`;
251
- }
252
- return output;
140
+ if (Array.isArray(row.config))
141
+ return output + `${prefix} config:\n${row.config.map((child) => renderPluginRow(child, spaces + 4)).join("")}`;
142
+ return output + renderYamlField("config", row.config, spaces + 2);
143
+ }
144
+ function renderYamlField(key, value, spaces) {
145
+ const prefix = " ".repeat(spaces);
146
+ if (typeof value === "string")
147
+ return value.includes("\n") ? `${prefix}${key}: |-\n${indentBlock(value, spaces + 2)}\n` : `${prefix}${key}: ${quoteYamlString(value)}\n`;
148
+ if (Array.isArray(value))
149
+ return value.length === 0 ? `${prefix}${key}: []\n` : `${prefix}${key}:\n${value.map((item) => `${prefix} - ${quoteYamlString(String(item))}\n`).join("")}`;
150
+ if (typeof value === "object" && value !== null)
151
+ return `${prefix}${key}:\n${Object.entries(value).map(([nestedKey, nestedValue]) => renderYamlField(nestedKey, nestedValue, spaces + 2)).join("")}`;
152
+ return `${prefix}${key}: ${String(value)}\n`;
253
153
  }
254
154
  function quoteYamlString(value) {
255
155
  return `'${value.replace(/'/gu, "''")}'`;