GUOZIJAN/dsh-tech-stack-survey0

dsh-tech-stack-survey

DSH tech-stack survey plugin: the model asks 2-5 adaptive tech-stack questions (3 options each, hover for details) before designing a project, via the design_stack_survey tool and a browser composer card

包名
dsh-tech-stack-survey
版本
1.0.0
许可证
MIT
最近更新
2026年8月16日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

Installation & Usage

Option 1: Dynamic plugin (recommended for a quick trial)

In a DSH cordis (creation) mode session, ask the model to:

  1. cordis_define — create the plugin:
    • code.host = the full content of host.js;
    • code.client = the full content of client.js;
    • suggested semantic prefix dsts.
  2. cordis_run to activate; approve the Client half in the browser UI.
  3. Then just say "design a XX project" (without a tech stack) — the model calls design_stack_survey, the survey card appears, and after you answer, the design continues with the chosen stack.

The dynamic plugin lives only in the session process that defined it (lost on restart). For a permanent install see Option 2.

Option 2: Permanent install (deployment-level)

The repo ships as a ready-to-install dual-face package (package.json + lib/), verified on a local DSH web profile:

  1. Package layout: the Host half is lib/index.js (static ESM, injects tools/userQuestions, registers the tool via ctx.tools.register(defineTool(...))); the Client half is lib/client.js (a lazy-CJS window.__ModuleLoader__.load({ id, factory }) bundle exporting { inject: ['slots','locale'], apply }). package.json declares dsh.client: { platform: 'web', inject: [...] } and exports['./client'].
  2. Install the package: copy package.json + lib/ into the profile's hoisted node_modules root (e.g. C:\Users\guozi\.dsh\profiles\node_modules\dsh-tech-stack-survey), so it is resolvable from the profile directory.
  3. Compose: append one row to the profile's cordis.patch.yml (e.g. C:\Users\guozi\.dsh\profiles\web\cordis.patch.yml):
    - insert:
        - id: tech-stack-survey
          name: 'dsh-tech-stack-survey'
    
  4. Restart: restart dsh web. No web-artifact rebuild is needed — the client-modules node half scans Loader entries at runtime and serves /plugins//client.js, which the browser pulls via window.__DSH_BOOT__.
  5. Verify: GET /plugins/dsh-tech-stack-survey/client.js answers 200; the /api/pluginInventory/list RPC shows include:tech-stack-survey with fiberPhase: active.

Notes: the Host half registers its tool from the host plane, landing in the tools registry's global layer, which every agent preset inherits (presets apply no allow/deny restrictions) — so new sessions see design_stack_survey; sessions created before the install keep their fixed tool catalog. If you later run pnpm install in the profile directory, also add this package to the profile's package.json dependencies so pnpm does not prune it.