dic-workflow-kit 1.1.1 → 1.1.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dic-workflow-kit",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Design-implementation consistency workflow with OpenSpec obligations, BDD knowledge, Skills, and Subagents.",
5
5
  "author": {
6
6
  "name": "TonyClaw"
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to DIC Workflow Kit are documented in this file.
4
4
 
5
5
  The project follows [Semantic Versioning](https://semver.org/). Both npm packages, `dic-workflow-kit` and `@tonyclaw/dic-workflow-kit`, always use the same version and runtime payload.
6
6
 
7
+ ## [1.1.2] - 2026-07-28
8
+
9
+ ### Added
10
+
11
+ - Added native BitFun installation for user and project scopes.
12
+ - Added BitFun-specific Subagent frontmatter conversion using its `schema_version: 1` custom-agent contract.
13
+ - Added isolated BitFun installation, directory mapping, and least-privilege runtime-tool permission tests.
14
+
15
+ ### Changed
16
+
17
+ - Extended version synchronization to keep BitFun adapter installation examples aligned with each release.
18
+
7
19
  ## [1.1.1] - 2026-07-27
8
20
 
9
21
  ### Added
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Design-Implementation Consistency Workflow Kit
2
2
 
3
- Version: `1.1.1`
3
+ Version: `1.1.2`
4
4
 
5
5
  [Changelog](CHANGELOG.md)
6
6
 
@@ -14,28 +14,30 @@ The kit is not tied to one contest, one repository, one language stack, or one a
14
14
 
15
15
  ## Install with npm
16
16
 
17
- The npm package contains all seven Skills and all nine Subagents and installs them with host-native directory layouts for Codex, Claude Code, OpenCode, and MiMo Code.
17
+ The npm package contains all seven Skills and all nine Subagents and installs them with host-native directory layouts for Codex, Claude Code, OpenCode, MiMo Code, and BitFun.
18
18
 
19
19
  Codex remains the default, so the original command is backward compatible:
20
20
 
21
21
  ```text
22
- npx dic-workflow-kit@1.1.1 install
22
+ npx dic-workflow-kit@1.1.2 install
23
23
  ```
24
24
 
25
25
  Select another host explicitly:
26
26
 
27
27
  ```text
28
- npx dic-workflow-kit@1.1.1 install --host claude-code
29
- npx dic-workflow-kit@1.1.1 install --host opencode
30
- npx dic-workflow-kit@1.1.1 install --host mimo-code
28
+ npx dic-workflow-kit@1.1.2 install --host claude-code
29
+ npx dic-workflow-kit@1.1.2 install --host opencode
30
+ npx dic-workflow-kit@1.1.2 install --host mimo-code
31
+ npx dic-workflow-kit@1.1.2 install --host bitfun
31
32
  ```
32
33
 
33
34
  User scope is the default. To install into the current repository instead, use `--scope project`:
34
35
 
35
36
  ```text
36
- npx dic-workflow-kit@1.1.1 install --host claude-code --scope project
37
- npx dic-workflow-kit@1.1.1 install --host opencode --scope project
38
- npx dic-workflow-kit@1.1.1 install --host mimo-code --scope project
37
+ npx dic-workflow-kit@1.1.2 install --host claude-code --scope project
38
+ npx dic-workflow-kit@1.1.2 install --host opencode --scope project
39
+ npx dic-workflow-kit@1.1.2 install --host mimo-code --scope project
40
+ npx dic-workflow-kit@1.1.2 install --host bitfun --scope project
39
41
  ```
40
42
 
41
43
  The host mappings are:
@@ -46,13 +48,16 @@ The host mappings are:
46
48
  | Claude Code | `~/.claude/{skills,agents}` | `.claude/{skills,agents}` |
47
49
  | OpenCode | `~/.config/opencode/{skills,agents}` | `.opencode/{skills,agents}` |
48
50
  | MiMo Code | platform config root under `mimocode/{skills,agents}` | `.mimocode/{skills,agents}` |
51
+ | BitFun | platform-native BitFun data/config roots | `.bitfun/{skills,agents}` |
49
52
 
50
- On Windows, MiMo Code's user root resolves to `%LOCALAPPDATA%\mimocode`; `MIMOCODE_HOME` and `XDG_CONFIG_HOME` are honored where applicable. The installer adapts Subagent frontmatter per host while keeping `agents/` in the package as the single source of truth.
53
+ On Windows, MiMo Code's user root resolves to `%LOCALAPPDATA%\mimocode`; `MIMOCODE_HOME` and `XDG_CONFIG_HOME` are honored where applicable. BitFun user Skills resolve to the platform data directory (`BitFun/skills`) and its Subagents resolve to the BitFun config root (`bitfun/agents`); project installation uses BitFun's native `.bitfun` directory. The installer adapts Subagent frontmatter per host while keeping `agents/` in the package as the single source of truth.
54
+
55
+ For BitFun, the installer emits its native custom-agent schema. Inspection and planning roles stay read-only; only `code-repairer` and `validation-runner` receive the write and command tools required by their runtime responsibilities.
51
56
 
52
57
  You can also install the CLI globally:
53
58
 
54
59
  ```text
55
- npm install --global @tonyclaw/dic-workflow-kit@1.1.1
60
+ npm install --global @tonyclaw/dic-workflow-kit@1.1.2
56
61
  dic-workflow-kit install --host opencode
57
62
  ```
58
63
 
@@ -69,7 +74,7 @@ Use `--dry-run` to preview the resolved destination, `--install-root <path>` for
69
74
 
70
75
  ### 1. Start the Coding Agent in your project root
71
76
 
72
- After installation, enter the repository you want to inspect and restart Codex, Claude Code, OpenCode, or MiMo Code. An existing session may not discover a newly created Skills/agents directory immediately.
77
+ After installation, enter the repository you want to inspect and restart Codex, Claude Code, OpenCode, MiMo Code, or BitFun. An existing session may not discover a newly created Skills/agents directory immediately.
73
78
 
74
79
  ```text
75
80
  cd /path/to/your-project
@@ -77,7 +82,7 @@ cd /path/to/your-project
77
82
 
78
83
  ### 2. Start the workflow with a prompt
79
84
 
80
- This prompt works across all four hosts:
85
+ This prompt works across all five hosts:
81
86
 
82
87
  ```text
83
88
  Use DIC Workflow Kit to check design-implementation consistency in this project.
@@ -154,7 +159,7 @@ Terminal status is always `PASS`, `PARTIAL`, `BLOCKED`, or `FAIL`. `PASS` means
154
159
  ### Troubleshooting
155
160
 
156
161
  - **A Skill or Subagent is missing:** restart the Coding Agent and use `--dry-run` to confirm the resolved install root.
157
- - **Only this repository should use the kit:** add `--scope project` for Claude Code, OpenCode, or MiMo Code.
162
+ - **Only this repository should use the kit:** add `--scope project` for Claude Code, OpenCode, MiMo Code, or BitFun.
158
163
  - **The project does not use OpenSpec:** use design documents, APIs, schemas, READMEs, or product requirements as authoritative design sources.
159
164
  - **A validation tool is unavailable:** record the missing command and environment evidence, and finish as `BLOCKED` or `PARTIAL`; do not claim success.
160
165
  - **Do green tests prove consistency:** no. Requirements, branches, state transitions, side effects, and integration flows must also match the design.
@@ -169,7 +174,7 @@ Every release publishes the same version and payload under both npm names:
169
174
  `package.json` is the canonical version source. Set a new version once; the helper propagates it to the Codex plugin manifest, workflow runtime, all Skills, all Subagents, and both READMEs:
170
175
 
171
176
  ```text
172
- npm run release:set-version -- 1.1.1
177
+ npm run release:set-version -- 1.1.2
173
178
  npm run release:plan
174
179
  npm run release:dual:dry-run
175
180
  npm run release:dual
package/README.zh-CN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 设计—实现一致性 Workflow Kit
2
2
 
3
- 版本:`1.1.1`
3
+ 版本:`1.1.2`
4
4
 
5
5
  [更新日志](CHANGELOG.md)
6
6
 
@@ -12,28 +12,30 @@ Design-Implementation Consistency Workflow Kit,简称 DIC Workflow Kit,是
12
12
 
13
13
  ## 通过 npm 安装
14
14
 
15
- npm 包完整包含 7 个 Skills 和 9 个 Subagents,并支持 Codex、Claude Code、OpenCode 和 MiMo Code 的原生目录结构。
15
+ npm 包完整包含 7 个 Skills 和 9 个 Subagents,并支持 Codex、Claude Code、OpenCode、MiMo Code BitFun 的原生目录结构。
16
16
 
17
17
  Codex 仍是默认宿主,原命令保持兼容:
18
18
 
19
19
  ```text
20
- npx dic-workflow-kit@1.1.1 install
20
+ npx dic-workflow-kit@1.1.2 install
21
21
  ```
22
22
 
23
23
  安装到其他宿主时显式指定 `--host`:
24
24
 
25
25
  ```text
26
- npx dic-workflow-kit@1.1.1 install --host claude-code
27
- npx dic-workflow-kit@1.1.1 install --host opencode
28
- npx dic-workflow-kit@1.1.1 install --host mimo-code
26
+ npx dic-workflow-kit@1.1.2 install --host claude-code
27
+ npx dic-workflow-kit@1.1.2 install --host opencode
28
+ npx dic-workflow-kit@1.1.2 install --host mimo-code
29
+ npx dic-workflow-kit@1.1.2 install --host bitfun
29
30
  ```
30
31
 
31
32
  默认是用户级安装;若只希望当前仓库使用,则增加 `--scope project`:
32
33
 
33
34
  ```text
34
- npx dic-workflow-kit@1.1.1 install --host claude-code --scope project
35
- npx dic-workflow-kit@1.1.1 install --host opencode --scope project
36
- npx dic-workflow-kit@1.1.1 install --host mimo-code --scope project
35
+ npx dic-workflow-kit@1.1.2 install --host claude-code --scope project
36
+ npx dic-workflow-kit@1.1.2 install --host opencode --scope project
37
+ npx dic-workflow-kit@1.1.2 install --host mimo-code --scope project
38
+ npx dic-workflow-kit@1.1.2 install --host bitfun --scope project
37
39
  ```
38
40
 
39
41
  | 宿主 | 用户级目录 | 项目级目录 |
@@ -42,13 +44,16 @@ npx dic-workflow-kit@1.1.1 install --host mimo-code --scope project
42
44
  | Claude Code | `~/.claude/{skills,agents}` | `.claude/{skills,agents}` |
43
45
  | OpenCode | `~/.config/opencode/{skills,agents}` | `.opencode/{skills,agents}` |
44
46
  | MiMo Code | 平台配置根目录下的 `mimocode/{skills,agents}` | `.mimocode/{skills,agents}` |
47
+ | BitFun | 平台原生的 BitFun 数据/配置目录 | `.bitfun/{skills,agents}` |
45
48
 
46
- Windows 上 MiMo Code 的用户级根目录为 `%LOCALAPPDATA%\mimocode`;适用时也会读取 `MIMOCODE_HOME` 和 `XDG_CONFIG_HOME`。安装器以仓库中的 `agents/` 为唯一来源,并按宿主转换 Subagent frontmatter,避免维护四套重复内容。
49
+ Windows 上 MiMo Code 的用户级根目录为 `%LOCALAPPDATA%\mimocode`;适用时也会读取 `MIMOCODE_HOME` 和 `XDG_CONFIG_HOME`。BitFun 的用户级 Skills 安装到平台数据目录下的 `BitFun/skills`,Subagents 安装到 BitFun 配置根目录下的 `bitfun/agents`;项目级安装统一使用 `.bitfun`。安装器以仓库中的 `agents/` 为唯一来源,并按宿主转换 Subagent frontmatter,避免维护多套重复内容。
50
+
51
+ 对于 BitFun,安装器会生成其原生 custom-agent schema。检查和规划角色保持只读,只有 `code-repairer` 与 `validation-runner` 获得职责所需的写入和命令工具。
47
52
 
48
53
  也可以先全局安装 CLI:
49
54
 
50
55
  ```text
51
- npm install --global @tonyclaw/dic-workflow-kit@1.1.1
56
+ npm install --global @tonyclaw/dic-workflow-kit@1.1.2
52
57
  dic-workflow-kit install --host opencode
53
58
  ```
54
59
 
@@ -65,7 +70,7 @@ dic-workflow-kit install
65
70
 
66
71
  ### 1. 在项目根目录启动 Coding Agent
67
72
 
68
- 安装完成后,进入需要检查的代码仓库,重新启动 Codex、Claude Code、OpenCode 或 MiMo Code。第一次安装新 Skills/agents 目录时,已有会话可能无法立即发现它们。
73
+ 安装完成后,进入需要检查的代码仓库,重新启动 Codex、Claude Code、OpenCode、MiMo Code BitFun。第一次安装新 Skills/agents 目录时,已有会话可能无法立即发现它们。
69
74
 
70
75
  ```text
71
76
  cd /path/to/your-project
@@ -73,7 +78,7 @@ cd /path/to/your-project
73
78
 
74
79
  ### 2. 用自然语言启动工作流
75
80
 
76
- 下面这条提示词适用于四种宿主:
81
+ 下面这条提示词适用于五种宿主:
77
82
 
78
83
  ```text
79
84
  使用 DIC Workflow Kit 检查当前项目的设计—实现一致性。
@@ -146,7 +151,7 @@ knowledge-openspec 检查当前 OpenSpec 变更。
146
151
  ### 常见问题
147
152
 
148
153
  - **找不到 Skill/Subagent**:重启 Coding Agent,并使用 `--dry-run` 检查安装目标。
149
- - **只想当前仓库使用**:Claude Code、OpenCode、MiMo Code 安装时增加 `--scope project`。
154
+ - **只想当前仓库使用**:Claude Code、OpenCode、MiMo Code、BitFun 安装时增加 `--scope project`。
150
155
  - **项目没有 OpenSpec**:仍可使用设计文档、API、Schema、README 或产品需求作为权威设计源。
151
156
  - **缺少验证工具**:记录缺失的命令和环境原因,最终状态应为 `BLOCKED` 或 `PARTIAL`,不要伪造成功。
152
157
  - **测试通过是否等于一致**:不等于。还必须确认需求、分支、状态迁移、副作用及集成流程符合设计。
@@ -161,7 +166,7 @@ knowledge-openspec 检查当前 OpenSpec 变更。
161
166
  `package.json` 是唯一版本源。版本脚本会同步 Codex 插件清单、工作流脚本、全部 Skills、全部 Subagents 和中英文 README:
162
167
 
163
168
  ```text
164
- npm run release:set-version -- 1.1.1
169
+ npm run release:set-version -- 1.1.2
165
170
  npm run release:plan
166
171
  npm run release:dual:dry-run
167
172
  npm run release:dual
@@ -0,0 +1,30 @@
1
+ # BitFun Adapter
2
+
3
+ Install into BitFun with:
4
+
5
+ ```text
6
+ npx dic-workflow-kit@1.1.2 install --host bitfun
7
+ ```
8
+
9
+ For repository-local discovery:
10
+
11
+ ```text
12
+ npx dic-workflow-kit@1.1.2 install --host bitfun --scope project
13
+ ```
14
+
15
+ The project-level layout is:
16
+
17
+ ```text
18
+ .bitfun/
19
+ skills/
20
+ agents/
21
+ ```
22
+
23
+ The installer keeps every `SKILL.md` portable and converts each canonical
24
+ Subagent definition to BitFun custom-agent schema version 1. Inspection and
25
+ planning roles are read-only. `code-repairer` and `validation-runner` receive
26
+ the write and command tools required to repair code and capture validation
27
+ evidence.
28
+
29
+ Restart or reload BitFun after first installation so it can rediscover the
30
+ new Skills and Subagents.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: code-repairer
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Implement approved repair slices while preserving contracts, minimizing blast radius, and avoiding unrelated refactors.
5
5
  mode: subagent
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: contract-oracle
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Convert source requirements, OpenSpec scenarios, and feedback hypotheses into source-confirmed implementation obligations.
5
5
  mode: subagent
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: final-reviewer
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Perform the final consistency gate across source coverage, protected paths, validation evidence, residual risks, changed files, and output artifacts.
5
5
  mode: subagent
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: flow-auditor
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Audit business and use-case flow completeness, including lifecycle, branches, state transitions, side effects, integration paths, and failure handling.
5
5
  mode: subagent
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: impl-inspector
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Inspect implementation against source-confirmed obligations without editing files.
5
5
  mode: subagent
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: profile-builder
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Build a normalized project profile from repository evidence so downstream agents stop guessing paths, tools, and source hierarchy.
5
5
  mode: subagent
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: repair-planner
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Create small, source-backed repair slices with target files, validation commands, stop conditions, and fallback plans.
5
5
  mode: subagent
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: spec-reader
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Read authoritative design, OpenSpec, API, schema, README, and configuration sources and produce a source-backed requirement brief.
5
5
  mode: subagent
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: validation-runner
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Discover, run, and summarize project validation commands using evaluator-readable evidence.
5
5
  mode: subagent
6
6
  ---
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import{cp as A,mkdir as w,readFile as y,readdir as g,writeFile as E}from"node:fs/promises";import{homedir as f}from"node:os";import{dirname as x,join as n,resolve as m}from"node:path";import{fileURLToPath as N}from"node:url";var h="dic-workflow-kit",p=m(x(N(import.meta.url)),".."),j=new Map([["codex","codex"],["claude","claude-code"],["claude-code","claude-code"],["opencode","opencode"],["mimo","mimo-code"],["mimocode","mimo-code"],["mimo-code","mimo-code"]]),L=[".codex-plugin","adapters","agents","schemas","skills","INSTRUCTION.md"];function u(e,o,t){let r=e[o+1];if(!r)throw new Error(`${t} requires a value`);return r}function C(e){let o=e[0]??"help",t="codex",r="user",c,a,s=process.cwd(),d=!1;for(let i=1;i<e.length;i+=1){let l=e[i];if(l==="--host"){let k=u(e,i,l).toLowerCase();if(t=j.get(k),!t)throw new Error(`unsupported host: ${k}; expected codex, claude-code, opencode, or mimo-code`);i+=1}else if(l==="--scope"){if(r=u(e,i,l).toLowerCase(),!["user","project"].includes(r))throw new Error("--scope must be user or project");i+=1}else if(l==="--install-root")c=m(u(e,i,l)),i+=1;else if(l==="--project-root")s=m(u(e,i,l)),i+=1;else if(l==="--marketplace-root")a=m(u(e,i,l)),i+=1;else if(l==="--dry-run")d=!0;else throw new Error(`unknown argument: ${l}`)}if(t!=="codex"&&a)throw new Error("--marketplace-root is only valid for --host codex");if(t==="codex"&&r==="project")throw new Error("Codex plugin installation supports user scope only");return{command:o,host:t,scope:r,installRoot:c,marketplaceRoot:a,projectRoot:s,dryRun:d}}function O({host:e,scope:o,projectRoot:t}){if(o==="project"){let r={"claude-code":".claude",opencode:".opencode","mimo-code":".mimocode"}[e];return n(t,r)}return e==="claude-code"?n(f(),".claude"):e==="opencode"?n(process.env.XDG_CONFIG_HOME||n(f(),".config"),"opencode"):e==="mimo-code"?process.env.MIMOCODE_HOME?m(process.env.MIMOCODE_HOME):process.platform==="win32"&&process.env.LOCALAPPDATA?n(process.env.LOCALAPPDATA,"mimocode"):n(process.env.XDG_CONFIG_HOME||n(f(),".config"),"mimocode"):n(f(),".agents","plugins")}async function v(e){try{let o=JSON.parse(await y(e,"utf8"));if(!o||typeof o!="object"||Array.isArray(o))throw new Error("marketplace.json must contain an object");if(!Array.isArray(o.plugins))throw new Error("marketplace.json must contain a plugins array");return o}catch(o){if(o?.code!=="ENOENT")throw o;return{name:"personal",interface:{displayName:"Personal"},plugins:[]}}}function S(){return{name:h,source:{source:"local",path:`./plugins/${h}`},policy:{installation:"AVAILABLE",authentication:"ON_INSTALL"},category:"Developer Tools"}}async function T(e){let o=e.marketplaceRoot||e.installRoot||O(e),t=n(o,"marketplace.json"),r=n(o,"plugins",h),c=await v(t),a=S(),s=c.plugins.findIndex(d=>d?.name===h);if(s>=0?c.plugins[s]=a:c.plugins.push(a),!e.dryRun){await w(r,{recursive:!0});for(let d of L)await A(n(p,d),n(r,d),{recursive:!0,force:!0});await w(o,{recursive:!0}),await E(t,`${JSON.stringify(c,null,2)}
3
- `,"utf8")}R({...e,root:r,skillsRoot:n(r,"skills"),agentsRoot:n(r,"agents"),extra:`MARKETPLACE: ${t}`})}function I(e,o){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);if(!t)return e;let r=o==="claude-code"?new Set(["name","description","tools","disallowedTools","model","permissionMode","skills","memory","background","isolation"]):new Set(["name","description","mode","model","temperature","top_p","tools","permission","steps","hidden","color"]);return`---
4
- ${t[1].split(/\r?\n/).filter(a=>{let s=a.match(/^([A-Za-z][A-Za-z0-9_-]*):/)?.[1];return!s||r.has(s)}).join(`
2
+ import{cp as g,mkdir as k,readFile as E,readdir as h,writeFile as O}from"node:fs/promises";import{homedir as d}from"node:os";import{dirname as A,join as o,resolve as p}from"node:path";import{fileURLToPath as T}from"node:url";var R="dic-workflow-kit",f=p(A(T(import.meta.url)),".."),v=new Map([["codex","codex"],["claude","claude-code"],["claude-code","claude-code"],["opencode","opencode"],["mimo","mimo-code"],["mimocode","mimo-code"],["mimo-code","mimo-code"],["bitfun","bitfun"]]),S=[".codex-plugin","adapters","agents","schemas","skills","INSTRUCTION.md"];function m(e,t,r){let n=e[t+1];if(!n)throw new Error(`${r} requires a value`);return n}function b(e){let t=e[0]??"help",r="codex",n="user",u,a,s=process.cwd(),l=!1;for(let i=1;i<e.length;i+=1){let c=e[i];if(c==="--host"){let w=m(e,i,c).toLowerCase();if(r=v.get(w),!r)throw new Error(`unsupported host: ${w}; expected codex, claude-code, opencode, mimo-code, or bitfun`);i+=1}else if(c==="--scope"){if(n=m(e,i,c).toLowerCase(),!["user","project"].includes(n))throw new Error("--scope must be user or project");i+=1}else if(c==="--install-root")u=p(m(e,i,c)),i+=1;else if(c==="--project-root")s=p(m(e,i,c)),i+=1;else if(c==="--marketplace-root")a=p(m(e,i,c)),i+=1;else if(c==="--dry-run")l=!0;else throw new Error(`unknown argument: ${c}`)}if(r!=="codex"&&a)throw new Error("--marketplace-root is only valid for --host codex");if(r==="codex"&&n==="project")throw new Error("Codex plugin installation supports user scope only");return{command:t,host:r,scope:n,installRoot:u,marketplaceRoot:a,projectRoot:s,dryRun:l}}function y({host:e,scope:t,projectRoot:r}){if(t==="project"){let n={"claude-code":".claude",opencode:".opencode","mimo-code":".mimocode",bitfun:".bitfun"}[e];return o(r,n)}if(e==="claude-code")return o(d(),".claude");if(e==="opencode")return o(process.env.XDG_CONFIG_HOME||o(d(),".config"),"opencode");if(e==="mimo-code")return process.env.MIMOCODE_HOME?p(process.env.MIMOCODE_HOME):process.platform==="win32"&&process.env.LOCALAPPDATA?o(process.env.LOCALAPPDATA,"mimocode"):o(process.env.XDG_CONFIG_HOME||o(d(),".config"),"mimocode");if(e==="bitfun")throw new Error("BitFun user scope uses separate platform-native Skills and agents roots");return o(d(),".agents","plugins")}function N(){let e,t;if(process.platform==="win32"){let r=process.env.APPDATA||o(d(),"AppData","Roaming");e=o(r,"BitFun","skills"),t=o(process.env.BITFUN_USER_ROOT?p(process.env.BITFUN_USER_ROOT):o(r,"bitfun"),"agents")}else if(process.platform==="darwin"){let r=o(d(),"Library","Application Support");e=o(r,"BitFun","skills"),t=o(process.env.BITFUN_USER_ROOT?p(process.env.BITFUN_USER_ROOT):o(r,"bitfun"),"agents")}else e=o(process.env.XDG_DATA_HOME||o(d(),".local","share"),"BitFun","skills"),t=o(process.env.BITFUN_USER_ROOT?p(process.env.BITFUN_USER_ROOT):o(process.env.XDG_CONFIG_HOME||o(d(),".config"),"bitfun"),"agents");return{skillsRoot:e,agentsRoot:t}}function x(e){if(e.installRoot)return{root:e.installRoot,skillsRoot:o(e.installRoot,"skills"),agentsRoot:o(e.installRoot,"agents")};if(e.host==="bitfun"&&e.scope==="user"){let r=N();return{root:A(r.skillsRoot),...r}}let t=y(e);return{root:t,skillsRoot:o(t,"skills"),agentsRoot:o(t,"agents")}}async function I(e){try{let t=JSON.parse(await E(e,"utf8"));if(!t||typeof t!="object"||Array.isArray(t))throw new Error("marketplace.json must contain an object");if(!Array.isArray(t.plugins))throw new Error("marketplace.json must contain a plugins array");return t}catch(t){if(t?.code!=="ENOENT")throw t;return{name:"personal",interface:{displayName:"Personal"},plugins:[]}}}function $(){return{name:R,source:{source:"local",path:`./plugins/${R}`},policy:{installation:"AVAILABLE",authentication:"ON_INSTALL"},category:"Developer Tools"}}async function j(e){let t=e.marketplaceRoot||e.installRoot||y(e),r=o(t,"marketplace.json"),n=o(t,"plugins",R),u=await I(r),a=$(),s=u.plugins.findIndex(l=>l?.name===R);if(s>=0?u.plugins[s]=a:u.plugins.push(a),!e.dryRun){await k(n,{recursive:!0});for(let l of S)await g(o(f,l),o(n,l),{recursive:!0,force:!0});await k(t,{recursive:!0}),await O(r,`${JSON.stringify(u,null,2)}
3
+ `,"utf8")}_({...e,root:n,skillsRoot:o(n,"skills"),agentsRoot:o(n,"agents"),extra:`MARKETPLACE: ${r}`})}function L(e,t){let r=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);if(!r)return e;if(t==="bitfun"){let a=r[1],s=a.match(/^name:\s*(.+)$/m)?.[1]?.trim(),l=a.match(/^description:\s*(.+)$/m)?.[1]?.trim();if(!s||!l)throw new Error("BitFun Subagent requires name and description");let i=["code-repairer","validation-runner"].includes(s),c=["LS","Read","Glob","Grep","Skill"];return i&&c.push("Write","Edit","ExecCommand"),["---","schema_version: 1","kind: subagent",`id: ${s}`,`name: ${s}`,`description: ${l}`,`readonly: ${i?"false":"true"}`,"tools:",...c.map(w=>` - ${w}`),"---",e.slice(r[0].length)].join(`
4
+ `)}let n=t==="claude-code"?new Set(["name","description","tools","disallowedTools","model","permissionMode","skills","memory","background","isolation"]):new Set(["name","description","mode","model","temperature","top_p","tools","permission","steps","hidden","color"]);return`---
5
+ ${r[1].split(/\r?\n/).filter(a=>{let s=a.match(/^([A-Za-z][A-Za-z0-9_-]*):/)?.[1];return!s||n.has(s)}).join(`
5
6
  `)}
6
7
  ---
7
- ${e.slice(t[0].length)}`}async function $(e){let o=e.installRoot||O(e),t=n(o,"skills"),r=n(o,"agents"),c=await g(n(p,"skills")),a=(await g(n(p,"agents"))).filter(s=>s.endsWith(".md"));if(!e.dryRun){await w(t,{recursive:!0});for(let s of c)await A(n(p,"skills",s),n(t,s),{recursive:!0,force:!0});await w(r,{recursive:!0});for(let s of a){let d=await y(n(p,"agents",s),"utf8");await E(n(r,s),I(d,e.host),"utf8")}}R({...e,root:o,skillsRoot:t,agentsRoot:r})}function R({host:e,scope:o,root:t,skillsRoot:r,agentsRoot:c,dryRun:a,extra:s}){process.stdout.write([a?"DRY_RUN: true":"INSTALLED: true",`HOST: ${e}`,`SCOPE: ${o}`,`ROOT: ${t}`,`SKILLS: ${r}`,`SUBAGENTS: ${c}`,s,""].filter(d=>d!==void 0).join(`
8
- `))}async function P(e){e.host==="codex"?await T(e):await $(e)}function _(){process.stdout.write(["DIC Workflow Kit multi-host installer","","Usage:"," dic-workflow-kit install [--host <host>] [--scope user|project]"," [--project-root <path>] [--install-root <path>]"," [--marketplace-root <path>] [--dry-run]","","Hosts:"," codex (default), claude-code, opencode, mimo-code","","Examples:"," dic-workflow-kit install"," dic-workflow-kit install --host claude-code"," dic-workflow-kit install --host opencode --scope project"," dic-workflow-kit install --host mimo-code --scope project","","--marketplace-root is a backward-compatible Codex-only option.","--install-root overrides the resolved host configuration directory.",""].join(`
9
- `))}try{let e=C(process.argv.slice(2));if(e.command==="install")await P(e);else if(e.command==="help"||e.command==="--help")_();else throw new Error(`unknown command: ${e.command}`)}catch(e){process.stderr.write(`ERROR: ${e.message}
8
+ ${e.slice(r[0].length)}`}async function C(e){let{root:t,skillsRoot:r,agentsRoot:n}=x(e),u=await h(o(f,"skills")),a=(await h(o(f,"agents"))).filter(s=>s.endsWith(".md"));if(!e.dryRun){await k(r,{recursive:!0});for(let s of u)await g(o(f,"skills",s),o(r,s),{recursive:!0,force:!0});await k(n,{recursive:!0});for(let s of a){let l=await E(o(f,"agents",s),"utf8");await O(o(n,s),L(l,e.host),"utf8")}}_({...e,root:t,skillsRoot:r,agentsRoot:n})}function _({host:e,scope:t,root:r,skillsRoot:n,agentsRoot:u,dryRun:a,extra:s}){process.stdout.write([a?"DRY_RUN: true":"INSTALLED: true",`HOST: ${e}`,`SCOPE: ${t}`,`ROOT: ${r}`,`SKILLS: ${n}`,`SUBAGENTS: ${u}`,s,""].filter(l=>l!==void 0).join(`
9
+ `))}async function U(e){e.host==="codex"?await j(e):await C(e)}function D(){process.stdout.write(["DIC Workflow Kit multi-host installer","","Usage:"," dic-workflow-kit install [--host <host>] [--scope user|project]"," [--project-root <path>] [--install-root <path>]"," [--marketplace-root <path>] [--dry-run]","","Hosts:"," codex (default), claude-code, opencode, mimo-code, bitfun","","Examples:"," dic-workflow-kit install"," dic-workflow-kit install --host claude-code"," dic-workflow-kit install --host opencode --scope project"," dic-workflow-kit install --host mimo-code --scope project"," dic-workflow-kit install --host bitfun --scope project","","--marketplace-root is a backward-compatible Codex-only option.","--install-root overrides the resolved host configuration directory.",""].join(`
10
+ `))}try{let e=b(process.argv.slice(2));if(e.command==="install")await U(e);else if(e.command==="help"||e.command==="--help")D();else throw new Error(`unknown command: ${e.command}`)}catch(e){process.stderr.write(`ERROR: ${e.message}
10
11
  `),process.exitCode=1}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dic-workflow-kit",
3
- "version": "1.1.1",
4
- "description": "Install DIC Workflow Kit Skills and Subagents for Codex, Claude Code, OpenCode, and MiMo Code.",
3
+ "version": "1.1.2",
4
+ "description": "Install DIC Workflow Kit Skills and Subagents for Codex, Claude Code, OpenCode, MiMo Code, and BitFun.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "dic-workflow-kit": "dist/dic-workflow-kit.mjs"
@@ -22,6 +22,7 @@
22
22
  "claude-code",
23
23
  "opencode",
24
24
  "mimo-code",
25
+ "bitfun",
25
26
  "plugin",
26
27
  "skills",
27
28
  "subagents",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: knowledge-bdd
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Derive Given-When-Then acceptance scenarios from confirmed design rules and flow contracts.
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: knowledge-openspec
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: OpenSpec knowledge pack for proposals, specs, scenarios, tasks, changes, archived capabilities, validation, and design-to-implementation mapping.
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: knowledge-repair-distill
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Generic repair convergence guidance, gap taxonomy, model steering hints, and validation gates for design-implementation consistency work.
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: workflow-core
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Core Design-Implementation Consistency workflow contract, evidence model, handoff rules, and final output expectations.
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: workflow-intake
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Discover authoritative design sources, implementation roots, test roots, protected paths, validation commands, and adapter hints.
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: workflow-profile
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Build a normalized project profile for design-implementation consistency work without hardcoding a repository or technology stack.
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: workflow-repair
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: Guide source-backed implementation inspection, repair planning, code repair, validation loops, and final consistency evidence.
5
5
  ---
6
6