From fa130d376e329db5d952c9fe89811518daedc66e Mon Sep 17 00:00:00 2001 From: Kaiyi Date: Wed, 19 Aug 2026 11:41:38 +0800 Subject: [PATCH] feat(flow): drop the generic /flow builtin entry The bare /flow skill was a dead end in both directions: with no flow definitions it could only report an empty directory (it carried no authoring guide), and with definitions present it bypassed every guarantee of the projected /flow: path (activation-carried definition, automatic start, provenance checks) in favor of a manual read-and-FlowStart route. Discovery is already served by the slash menu listing each projected flow with its description. The supervisor contract stays as the shared body of the projected skills; the flag-flip reload of builtin visibility stays as a general mechanism. --- .../src/features/flow/skill/flow.md | 11 ------ .../src/features/flow/skill/skill.ts | 34 ++----------------- 2 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 packages/agent-core-v2/src/features/flow/skill/flow.md diff --git a/packages/agent-core-v2/src/features/flow/skill/flow.md b/packages/agent-core-v2/src/features/flow/skill/flow.md deleted file mode 100644 index f1d224f9b..000000000 --- a/packages/agent-core-v2/src/features/flow/skill/flow.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: flow -description: Run a multi-stage flow definition with gated stage transitions — you supervise the run, dispatch workers per stage, and pass each gate on evidence. Use when the user runs /flow. -disable-model-invocation: true ---- - -$CONTRACT - -The user's input for this activation is: `$ARGUMENTS` - -If the input names no flow id, list the files under `.kimi-code/flows/` and ask which to run. If it names no task, ask for one — a run without a stated task cannot be accepted against. diff --git a/packages/agent-core-v2/src/features/flow/skill/skill.ts b/packages/agent-core-v2/src/features/flow/skill/skill.ts index a7f6ec265..9ac94ff99 100644 --- a/packages/agent-core-v2/src/features/flow/skill/skill.ts +++ b/packages/agent-core-v2/src/features/flow/skill/skill.ts @@ -1,35 +1,5 @@ -import { registerBuiltinSkill } from '#/app/skillCatalog/builtin/registry'; -import { parseSkillText } from '#/app/skillCatalog/parser'; -import type { SkillDefinition } from '#/app/skillCatalog/types'; - -import { FLOW_FLAG_ID } from '../flow'; - import FLOW_CONTRACT from './contract.md?raw'; -import FLOW_ENTRY from './flow.md?raw'; -const PSEUDO_PATH = 'builtin://flow'; - -/** The shared supervisor contract — the body both the generic /flow entry and - * every per-flow skill (see flowsSkillSource) are assembled from. */ +/** The shared supervisor contract — the body every projected per-flow skill + * (see flowsSkillSource) is assembled from. */ export const FLOW_SUPERVISOR_CONTRACT: string = FLOW_CONTRACT.trim(); - -const parsed = parseSkillText({ - skillMdPath: '/builtin/skills/flow.md', - skillDirName: 'flow', - source: 'builtin', - text: FLOW_ENTRY.replace('$CONTRACT', FLOW_SUPERVISOR_CONTRACT), -}); - -export const FLOW_SKILL: SkillDefinition = { - ...parsed, - path: PSEUDO_PATH, - dir: PSEUDO_PATH, - experimentalFlag: FLOW_FLAG_ID, - metadata: { - ...parsed.metadata, - type: parsed.metadata.type ?? 'inline', - disableModelInvocation: true, - }, -}; - -registerBuiltinSkill(FLOW_SKILL);