Host Capability Routing logo

Host Capability Routing

Organization
devcodex-labs
host-capability-routing

宿主能力路由 Owner — 当已识别工作流意图后,需要在五个逻辑宿主、八个受支持 variant 上选择 direct / plan_first / auto_authorized,核验原始指令 authority,或判断 native lever 是否具备新鲜且安全的直接证据时使用。

Overview

Publisherdevcodex-labs
Repositorydevcodex
Skill namehost-capability-routing
Stars
433
Forks
44
Bundled files
5
LicenseAGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by devcodex-labs on GitHub. Read the source before you install it.

Installation

Install the Host Capability Routing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/devcodex-labs/devcodex/tree/main/content/skills/host-capability-routing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/devcodex-labs/devcodex.git /tmp/devcodex
mkdir -p .claude/skills
cp -r /tmp/devcodex/content/skills/host-capability-routing .claude/skills/host-capability-routing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Host Capability Routing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Host Capability Routing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Host Capability Routing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Host Capability Routing Skill

定位

本 Skill 是“工作流意图 → 宿主能力决策”的语义编排 Owner。它消费 intent / routing 已完成的工作流意图,输出 CapabilityIntentDecisionV1;它不重新分类工作流、不拥有 CP 状态机、不执行宿主命令,也不创建 Auto 授权。

能力面由中央决策 CSD-host-capability-routing 冻结为 rule-skill。本目录只保存领域契约、variant-aware catalog 和执行规则,不复制中央 CSD 的选择字段。

Phase 1 的唯一可执行路径是 portable-first:

  • direct:不额外进入宿主 native Plan;仍完整执行适用的安全不变量、CP、验证、报告和记忆。
  • plan_first:先形成 DevCodex 计划/CP 产物;不等于已经进入宿主 native Plan。
  • auto_authorized:只消费现有、可回读、仍有效的 Auto 授权证据;宿主 YOLO、permission mode 或“快一点”均不构成授权。

Native lever、MCP Tool/Resource、CLI 和 Hook 接线属于 Phase 2。Phase 1 可以读取 catalog 并解释上限,但不得声称已调用 native lever。

触发边界

在以下条件同时成立时使用:

  1. intent / routing 已给出最终 workflowIntent;
  2. 任务需要判断 direct / plan_first / auto_authorized,或需要解释当前宿主 variant 的能力上限;
  3. 当前消息、CP artifact 或 managed task source 可以形成 OriginalInstructionRefV1。

以下情况不触发或立即退化:

  • 普通闲聊且不进入 DevCodex 工作流;
  • 工作流意图尚未确定:先回 intent;
  • 原始指令 authority 缺失或跨轮仅剩 compat/none:停止当前 mutation,优先回绑任务事实并返回结构化意图重算;仍无法唯一化时才请求重述;
  • catalog 缺失、重复、过期、variant 未知或 matrix identity 不一致:使用 portable fallback,不猜 native;
  • Cursor、chatgpt-plain:标记 unsupported,使用手工全文/普通提示词路径。

Owner 与非职责

能力Owner本 Skill 行为
工作流意图intent / routing只消费,不覆盖
安全不变量instructions.md写入 appliedInvariantIds,不得降级
CP1→CP2→条件 CP3cp-gate保留并引用,不新增状态机
Auto authority当前 Auto 规则与确认回执只验证证据,不创建授权
宿主事实HostLeverCatalogV1 + HostAdapterCompatibilityMatrixV1精确查询、校验 freshness 和 fallback
原始指令 identity现有 host event / Governance Intake / CP / task source只形成 compact ref,不保存完整原文
完成态workflow completion / ECR不以本决策替代完成门禁
native invocationPhase 2 runtime ownerPhase 1 禁止执行

输入

最小输入:

  • instructionRef: OriginalInstructionRefV1
  • workflowIntent: dev | fix | analyze | audit | self-fix | other
  • 当前逻辑宿主和精确 hostSurfaceOrVariant
  • scope、风险、歧义和是否已有有效 Auto authority 的语义判断
  • HostLeverCatalogV1 及其对应 matrix identity

宿主 variant 必须来自当前 HostAdapterCompatibilityMatrixV1。不得新建平行 HOST_IDS 或把 Grok root、plain child、launcher 合并成一个能力声明。

输出

输出一份 CapabilityIntentDecisionV1:

  • 只引用 instructionRefId,不内嵌用户原文;
  • portable decision 固定为 direct / plan_first / auto_authorized;
  • appliedInvariantIds 列出本轮实际适用的不变量;
  • nativeEligibility 只记录精确 catalog key 和证据状态;
  • native 不可用时 fallback.applied=true、target=portable、retryable=false;
  • receipt 只保存 catalog identity,不复制完整 catalog row。

decisionId 是除展示字段 reason 和自身 decisionId 外的 decision core 的稳定 SHA-256。

决策顺序

  1. InstructionAuthorityGate:校验 OriginalInstructionRefV1。confirm、compact、resume 或宿主/session 变化后,优先回绑 digest-bound CP/task artifact。
  2. WorkflowIntentOwnerGate:确认工作流意图来自 intent / routing;本 Skill 不重算。
  3. PortableDecisionGate:
    • scope 清晰、低复杂度且无需额外计划时可选 direct;
    • scope 有歧义、复杂、跨模块、高风险或需要 CP3 时选 plan_first;
    • 只有 autoAuthorityRef 可回读且仍有效时才选 auto_authorized。
  4. InvariantProjectionGate:至少保留 S05;dev/fix/self-fix 还必须保留 CP1、CP2,需要 CP3 时追加 CP3。任何 portable 决策都不能绕过 S01~S07。
  5. ExactVariantCatalogGate:按 hostId + hostSurfaceOrVariant + capabilityFamilyId + leverVersion 唯一查询;0 行或多行均 fail closed。
  6. NativeEligibilityGate:证据、lease、permission、enter/approve/cancel/exit、显式 authority 和 Phase 2 runtime enablement 必须全部通过;否则 portable fallback。
  7. ReceiptGate:写入 bounded receipt;不得把 catalog row、原消息正文或宿主 UI 状态复制成第二事实源。

PortableDecisionGate

条件结果必要证据
scope 明确、风险低、无需额外计划directconfidence=high;适用 CP/安全锚点仍在
scope 歧义、复杂、多模块、高风险、控制面或 CP3plan_firstreasonCode 可复算;禁止 native 猜测
用户提供有效 Auto alias/自然语言授权auto_authorized非空 autoAuthorityRef;证据仍在当前 authority scope
confidence 低或信息不足plan_first 或请求澄清INTENT_CONFIDENCE_LOW

direct 不是“跳过 CP”,plan_first 不是“宿主 Plan 已进入”,auto_authorized 也不是“无需安全确认”。

OriginalInstructionRefGate

Authority 强度从高到低:

  1. digest-bound-cp-artifact 或 managed-task-source;
  2. 可回读 host-event 的 sha256/strong;
  3. governance-intake-anchor 的 fnv1a32-compat/compat;
  4. 当前轮 conversation-visible;
  5. unavailable。

规则:

  • 不持久化完整用户原文;controlledSummary 只是 ≤512 Unicode 字符的 projection。
  • projectionDigest 只证明受控摘要,不证明原始消息。
  • compat/none 不能单独授权跨轮 mutation。
  • source missing/mismatch/unverified 且没有强 CP/task authority 时,stopMutation=true,优先恢复强事实并重算结构化意图;仍无法唯一化时才请求重述。
  • 附件只保存宿主 locator 或内容 digest。

Catalog 与 native truth ceiling

host-lever-catalog.v1.json 的主分母固定为当前 matrix 的 8 个 in-scope variant;Cursor 和 chatgpt-plain 在 unsupportedSurfaces 单列。

Evidence lease:

kindleasenative eligibility
repo-localsource-boundsource/matrix identity 变化即 stale
official-docsP30D只能证明文档声明,不能替代 direct replay
direct-host-replayP14D还需 permission/lifecycle/authority 全通过
unverifiedP0D永不满足

Phase 1 即使 evidence 为 fresh,也必须因 runtime 未接线而返回 NATIVE_NOT_PHASE1。宿主 UI、生成的 wrapper、plan 文件存在或 permission mode 均不等于 native 已应用。

FailureMatrix

reasonCode行为
INTENT_CONFIDENCE_LOWplan_first 或澄清;不调用 native
HOST_VARIANT_UNKNOWNportable fallback
CATALOG_DUPLICATE_KEY / CATALOG_UNAVAILABLE相关 family fail closed;维持当前工作流
CATALOG_SOURCE_STALE禁用 catalog native 判断并重新生成证据
NATIVE_EVIDENCE_STALE / NATIVE_EVIDENCE_UNVERIFIEDnative disabled
NATIVE_LIFECYCLE_INCOMPLETEnative disabled
NATIVE_PERMISSION_UNSAFEnative disabled
NATIVE_AUTHORITY_MISSING请求显式 authority;不自动调用
NATIVE_NOT_PHASE1正常 portable 路径
AUTO_AUTHORITY_MISSING不允许 auto_authorized
INSTRUCTION_SOURCE_MISSING停止自动 mutation,请求重述
INSTRUCTION_DIGEST_MISMATCH停止当前 mutation,恢复来源并重算结构化意图
INSTRUCTION_AUTHORITY_TOO_WEAK回绑强 CP/task authority
HOST_UNSUPPORTEDmanual/plain fallback
MCP_NOT_REQUIREDPhase 1 继续;不把 MCP 缺失当故障

MCP 边界

Phase 1 不读取或修改 MCP server inventory;MCP 不可用时 portable decision 必须无损。

只有以下条件全部成立,才可在新 CSD 和新 CP 中评估 Tool/Resource:

  1. 至少两个独立 runtime consumer 需要同一有界查询;
  2. 输入已由 Skill 归一化,不接收原始自然语言;
  3. 查询确定、只读、幂等且有 bounded receipt;
  4. 本地 catalog 仍是无损 fallback;
  5. runtime owner、协议、host matrix、迁移和回滚已冻结。

有界内容读取优先评估 Resource/Resource Template;只有参数化计算才评估 Tool。

验证

权威入口:

bash
npm run test:host-capability-routing
npm run test:capability-surface-decision
node scripts/validate.js

最小负向覆盖:

  • schema unknown field;
  • duplicate catalog key;
  • matrix/source identity stale;
  • 8/8 variant 和 2 unsupported coverage;
  • evidence expiry / P0D;
  • lifecycle incomplete;
  • permission unsafe;
  • explicit authority missing;
  • instruction strong/compat/none 与跨轮 mutation;
  • MCP absent;
  • unsupported surface;
  • native false claim=0。

消费者同步

当前消费者只保存 compact ref:

  • intent / routing:触发本 Skill,仍拥有 workflow intent;
  • cp-gate:核验 instruction authority,CP 状态机不变;
  • memory / summary / report / execution-contract:只引用 instructionRefId 与 projection,不复制原文;
  • prompts:使用相同 compact ref 字段;
  • package/portfolio/host projections:分发本 Skill、schemas、catalog;
  • README/website/Profile:说明 portable-first、native ceiling 和 MCP Phase 2 门槛。

Skill 缺失、未注册或 catalog 无效时,所有消费者必须回到既有 DevCodex 工作流,不得猜测 native。

演进与退役

  • 新增 variant、改变 portable decision enum、改变 Auto semantics、保存完整原文、接线 MCP/CLI/Hook/native lever,必须退回 CP2,并由 spec-governance 生成新鲜 CSD。
  • catalog writer 固定为 host-capability-routing/catalog-maintainer;运行消费者只读。
  • 若未来宿主提供统一、可验证且可回滚的 native contract,本 Skill 仍保留 portable fallback。
  • 若能力长期无真实消费者或被更强统一 owner 替代,应先撤消费者与 package entry,再按 S01 单独确认删除。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Host Capability Routing AI skill do?

宿主能力路由 Owner — 当已识别工作流意图后,需要在五个逻辑宿主、八个受支持 variant 上选择 direct / plan_first / auto_authorized,核验原始指令 authority,或判断 native lever 是否具备新鲜且安全的直接证据时使用。

Why use Host Capability Routing on TypingMind?

Because you install it once and use it with any model. Host Capability Routing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Host Capability Routing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/devcodex-labs/devcodex/tree/main/content/skills/host-capability-routing. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Host Capability Routing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Host Capability Routing?

As many as you like. As long as a model supports skills, you can use Host Capability Routing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Host Capability Routing AI skill free?

Yes. It is published on GitHub by devcodex-labs under the AGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇