dinachi-assistant

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Dinachi Assistant

Dinachi Assistant

Use one skill with two explicit modes and one automatic router.
使用具备两种明确模式和一个自动路由功能的单一Skill。

Mode: build-now

模式:build-now(立即构建)

Use when user asks for concrete implementation quickly:
  • explicit component asks (
    add dialog + form
    )
  • install/integration asks
  • direct code edits using known Dinachi components
Primary references:
  • references/components.md
  • references/intent-map.md
  • references/workflows.md
    (command generation and verification)
  • references/troubleshooting.md
    (setup/import/theme diagnosis)
  • references/maintainer-checklist.md
    (monorepo component/docs/template/test updates)
Primary scripts:
  1. scripts/suggest-components.mjs --json "<prompt>"
    (when component names are ambiguous)
  2. scripts/audit-skill.mjs
    (maintainer consistency checks)
  3. scripts/validate-skill.mjs
    (skill folder sanity checks)
Maintainer scope:
  • When changing Dinachi itself in this monorepo, use
    references/maintainer-checklist.md
    .
  • Treat
    packages/components/src/<slug>
    as source of truth and keep CLI templates/docs in sync.
当用户要求快速实现具体功能时使用:
  • 明确的组件需求(如
    添加对话框+表单
  • 安装/集成需求
  • 使用已知Dinachi组件进行直接代码编辑
主要参考文档:
  • references/components.md
  • references/intent-map.md
  • references/workflows.md
    (命令生成与验证)
  • references/troubleshooting.md
    (设置/导入/主题诊断)
  • references/maintainer-checklist.md
    (单体仓库组件/文档/模板/测试更新)
主要脚本:
  1. scripts/suggest-components.mjs --json "<prompt>"
    (当组件名称不明确时使用)
  2. scripts/audit-skill.mjs
    (维护者一致性检查)
  3. scripts/validate-skill.mjs
    (Skill文件夹合理性检查)
维护者范围:
  • 当在此单体仓库中修改Dinachi本身时,请使用
    references/maintainer-checklist.md
  • packages/components/src/<slug>
    为事实来源,并保持CLI模板/文档同步。

Mode: plan-first

模式:plan-first(先规划)

Use when user intent is broad/ambiguous or generative:
  • "make a good settings flow"
  • "design a configurable admin experience"
  • "generate a workflow UI from intent"
Primary references:
  • references/components.registry.json
  • references/policies.json
  • references/intent.schema.json
  • references/recipe.schema.json
  • references/question-policy.json
Primary scripts:
  1. scripts/resolve-intent.mjs --json "<prompt>"
  2. If
    status=clarify
    , run
    scripts/clarify-question.mjs --json '<GuidanceDecision JSON>'
  3. If
    status=resolved
    , run
    scripts/plan-recipe.mjs --json '<GuidanceDecision JSON>'
  4. Validate with
    scripts/validate-recipe.mjs --json '<UIRecipe JSON>'
Only proceed to implementation when
ValidationReport.valid
is true.
当用户意图宽泛/模糊或需要生成式内容时使用:
  • "打造优质设置流程"
  • "设计可配置的管理界面"
  • "根据意图生成工作流UI"
主要参考文档:
  • references/components.registry.json
  • references/policies.json
  • references/intent.schema.json
  • references/recipe.schema.json
  • references/question-policy.json
主要脚本:
  1. scripts/resolve-intent.mjs --json "<prompt>"
  2. 如果
    status=clarify
    ,运行
    scripts/clarify-question.mjs --json '<GuidanceDecision JSON>'
  3. 如果
    status=resolved
    ,运行
    scripts/plan-recipe.mjs --json '<GuidanceDecision JSON>'
  4. 使用
    scripts/validate-recipe.mjs --json '<UIRecipe JSON>'
    进行验证
仅当
ValidationReport.valid
为true时,才可进入实现阶段。

Mode: auto-router

模式:auto-router(自动路由)

Route automatically with:
scripts/route-mode.mjs --json "<prompt>"
Routing policy:
  1. build-now
    when prompt contains explicit Dinachi slugs or direct install/add verbs.
  2. plan-first
    when prompt is broad, qualitative, or design-oriented without concrete component selection.
  3. If uncertain, choose
    plan-first
    .
通过以下脚本自动路由:
scripts/route-mode.mjs --json "<prompt>"
路由规则:
  1. 当请求中包含明确的Dinachi标识(slug)或直接的安装/添加动词时,使用
    build-now
    模式。
  2. 当请求宽泛、定性或偏向设计且未指定具体组件时,使用
    plan-first
    模式。
  3. 若不确定,默认选择
    plan-first
    模式。

Shared Contracts

通用约定

The plan-first pipeline uses:
  • IntentEnvelope
    :
    { request_id, intents, ambiguities, confidence }
  • GuidanceDecision
    :
    { status, reason, question?, options?, candidates? }
  • UIRecipe
    :
    { recipe_id, goal, layout, components, actions, bindings, states }
  • ValidationReport
    :
    { valid, errors, warnings, fixes }
先规划流程使用以下结构:
  • IntentEnvelope
    :
    { request_id, intents, ambiguities, confidence }
  • GuidanceDecision
    :
    { status, reason, question?, options?, candidates? }
  • UIRecipe
    :
    { recipe_id, goal, layout, components, actions, bindings, states }
  • ValidationReport
    :
    { valid, errors, warnings, fixes }

Operating Rules

操作规则

  1. Use
    references/components.registry.json
    as the source of truth for allowed Dinachi slugs and capabilities.
  2. Keep hard guards minimal and safety-focused.
  3. Keep warnings advisory; do not block on warnings alone.
  4. Prefer fast path (
    build-now
    ) for concrete requests.
  5. Prefer reliable path (
    plan-first
    ) for ambiguous or system-level requests.
  1. references/components.registry.json
    作为允许使用的Dinachi标识(slug)和功能的事实来源。
  2. 尽量减少硬性限制,仅保留安全相关的防护。
  3. 警告仅作为建议;不得仅因警告而阻止操作。
  4. 对于具体请求,优先使用快速路径(
    build-now
    )。
  5. 对于模糊或系统级请求,优先使用可靠路径(
    plan-first
    )。