commit 795c331706038eef6f00f2096848d5ad296bb15b Author: zhiye.sun Date: Tue Aug 25 10:21:34 2026 +0800 feat: 初始化 CraftKit 插件市场骨架 diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json new file mode 100644 index 0000000..d5fd634 --- /dev/null +++ b/.agents/plugins/marketplace.json @@ -0,0 +1,68 @@ +{ + "name": "craftkit", + "interface": { + "displayName": "CraftKit" + }, + "plugins": [ + { + "name": "dev", + "source": { + "source": "local", + "path": "./plugins/dev" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Productivity" + }, + { + "name": "doc", + "source": { + "source": "local", + "path": "./plugins/doc" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Productivity" + }, + { + "name": "git", + "source": { + "source": "local", + "path": "./plugins/git" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Productivity" + }, + { + "name": "knowledge", + "source": { + "source": "local", + "path": "./plugins/knowledge" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Productivity" + }, + { + "name": "skill", + "source": { + "source": "local", + "path": "./plugins/skill" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Productivity" + } + ] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba817e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +### IntelliJ IDEA ### +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ +.kotlin + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store + +# CraftKit 本地迁移来源配置,仅用于开发机,不进入公开仓库 +migration/local-sources.json diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..07115cd --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..211aed5 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/CraftKit.iml b/CraftKit.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/CraftKit.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..bb09205 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# CraftKit + +CraftKit 是一组面向 Codex 插件市场的中性 Skill 工具。项目从通用问题出发独立实现能力,不携带任何公司的品牌、内部框架、业务规则、源码、模板或环境信息。 + +## 插件组成 + +| 插件 | 用途 | 当前状态 | +| --- | --- | --- | +| `dev` | 软件设计、编码、审查与测试 | 已初始化,暂无 Skill | +| `doc` | 文档转换、整理与写作 | 已初始化,暂无 Skill | +| `git` | 分支、提交、变更提取与集成 | 已初始化,暂无 Skill | +| `knowledge` | 交接、复盘、经验与工作总结 | 已初始化,暂无 Skill | +| `skill` | Skill 创建、迁移、检查与同步 | 已初始化,暂无 Skill | + +## 目录结构 + +```text +CraftKit/ +├─ .agents/plugins/marketplace.json # 仓库级 Codex 市场清单 +├─ migration/ # 来源指纹与迁移追踪 +├─ plugins/ # 可独立安装的插件 +│ ├─ dev/ +│ ├─ doc/ +│ ├─ git/ +│ ├─ knowledge/ +│ └─ skill/ +└─ README.md +``` + +## 开发约束 + +- Skill 必须独立重写,不复制公司插件的正文、脚本、模板、示例或规则库。 +- 发布内容不得出现公司名称、产品名称、内部域名、内部包名、项目名或人员信息。 +- 每个 Skill 文件夹名必须与 `SKILL.md` frontmatter 的 `name` 一致。 +- 新增或修改插件后必须执行 Skill 校验、插件校验和去公司化扫描。 +- 上游变化只用于触发人工复核,不得自动覆盖已迁移内容。 + +## 本地使用 + +这是仓库级 marketplace。安装前先将本仓库注册为本地 marketplace,再按需安装其中的插件。正式发布前还需要补充许可证、公开仓库地址、作者信息、隐私政策及市场素材。 diff --git a/migration/README.md b/migration/README.md new file mode 100644 index 0000000..0d699e9 --- /dev/null +++ b/migration/README.md @@ -0,0 +1,13 @@ +# 迁移追踪说明 + +本目录只记录来源指纹、迁移状态和人工复核结果,不存放或打包公司插件内容。 + +同步流程: + +1. 读取来源仓库当前提交与 Skill 文件哈希。 +2. 与 `source-lock.json` 比较,生成新增、修改、删除清单。 +3. 人工判断变化是否属于可公开迁移的通用能力。 +4. 在 CraftKit 中独立重写并完成验证。 +5. 更新来源指纹、目标路径、状态和复核日期。 + +允许的状态:`pending`、`rewriting`、`migrated`、`excluded`、`review`。 diff --git a/migration/local-sources.example.json b/migration/local-sources.example.json new file mode 100644 index 0000000..4e1cc09 --- /dev/null +++ b/migration/local-sources.example.json @@ -0,0 +1,4 @@ +{ + "source-a": "D:/path/to/local/source-a", + "source-b": "D:/path/to/local/source-b" +} diff --git a/migration/source-lock.json b/migration/source-lock.json new file mode 100644 index 0000000..0a5fff5 --- /dev/null +++ b/migration/source-lock.json @@ -0,0 +1,15 @@ +{ + "schemaVersion": 1, + "updatedAt": "2026-08-25", + "sources": { + "source-a": { + "commit": "31883f7e81c2bdb19505e591ba9db8a3d9fd4352", + "skillCount": 12 + }, + "source-b": { + "commit": "2947a163538cd119a4e241c9d36f061d6dcae841", + "skillCount": 52 + } + }, + "skills": {} +} diff --git a/plugins/dev/.codex-plugin/plugin.json b/plugins/dev/.codex-plugin/plugin.json new file mode 100644 index 0000000..d08ffce --- /dev/null +++ b/plugins/dev/.codex-plugin/plugin.json @@ -0,0 +1,18 @@ +{ + "name": "dev", + "version": "0.1.0", + "description": "通用软件设计、编码、审查与测试工作流。", + "author": { + "name": "CraftKit" + }, + "skills": "./skills/", + "interface": { + "displayName": "Dev", + "shortDescription": "软件设计、编码、审查与测试工具", + "longDescription": "提供不绑定公司框架的软件设计、编码、审查和测试工作流。", + "developerName": "CraftKit", + "category": "Productivity", + "capabilities": ["Read", "Write"], + "defaultPrompt": ["帮我分析并实现这个代码改动。"] + } +} diff --git a/plugins/dev/skills/.gitkeep b/plugins/dev/skills/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/plugins/dev/skills/.gitkeep @@ -0,0 +1 @@ + diff --git a/plugins/doc/.codex-plugin/plugin.json b/plugins/doc/.codex-plugin/plugin.json new file mode 100644 index 0000000..1a4a416 --- /dev/null +++ b/plugins/doc/.codex-plugin/plugin.json @@ -0,0 +1,18 @@ +{ + "name": "doc", + "version": "0.1.0", + "description": "通用文档转换、整理与写作工具。", + "author": { + "name": "CraftKit" + }, + "skills": "./skills/", + "interface": { + "displayName": "Doc", + "shortDescription": "文档转换、整理与写作工具", + "longDescription": "提供 Markdown、Word、表格及结构化写作相关的通用工作流。", + "developerName": "CraftKit", + "category": "Productivity", + "capabilities": ["Read", "Write"], + "defaultPrompt": ["帮我整理或转换这份文档。"] + } +} diff --git a/plugins/doc/skills/.gitkeep b/plugins/doc/skills/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/plugins/doc/skills/.gitkeep @@ -0,0 +1 @@ + diff --git a/plugins/git/.codex-plugin/plugin.json b/plugins/git/.codex-plugin/plugin.json new file mode 100644 index 0000000..86c5d22 --- /dev/null +++ b/plugins/git/.codex-plugin/plugin.json @@ -0,0 +1,18 @@ +{ + "name": "git", + "version": "0.1.0", + "description": "安全、可复核的通用 Git 工作流。", + "author": { + "name": "CraftKit" + }, + "skills": "./skills/", + "interface": { + "displayName": "Git", + "shortDescription": "安全、可复核的 Git 工具", + "longDescription": "提供分支、提交、变更提取与集成相关的安全 Git 工作流。", + "developerName": "CraftKit", + "category": "Productivity", + "capabilities": ["Read", "Write"], + "defaultPrompt": ["帮我安全地处理当前 Git 变更。"] + } +} diff --git a/plugins/git/skills/.gitkeep b/plugins/git/skills/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/plugins/git/skills/.gitkeep @@ -0,0 +1 @@ + diff --git a/plugins/knowledge/.codex-plugin/plugin.json b/plugins/knowledge/.codex-plugin/plugin.json new file mode 100644 index 0000000..3ef757b --- /dev/null +++ b/plugins/knowledge/.codex-plugin/plugin.json @@ -0,0 +1,18 @@ +{ + "name": "knowledge", + "version": "0.1.0", + "description": "任务交接、复盘与知识沉淀工作流。", + "author": { + "name": "CraftKit" + }, + "skills": "./skills/", + "interface": { + "displayName": "Knowledge", + "shortDescription": "交接、复盘与知识沉淀工具", + "longDescription": "提供任务交接、过程复盘、经验维护和工作总结相关的通用工作流。", + "developerName": "CraftKit", + "category": "Productivity", + "capabilities": ["Read", "Write"], + "defaultPrompt": ["帮我总结当前任务并沉淀可复用经验。"] + } +} diff --git a/plugins/knowledge/skills/.gitkeep b/plugins/knowledge/skills/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/plugins/knowledge/skills/.gitkeep @@ -0,0 +1 @@ + diff --git a/plugins/skill/.codex-plugin/plugin.json b/plugins/skill/.codex-plugin/plugin.json new file mode 100644 index 0000000..ba7d40f --- /dev/null +++ b/plugins/skill/.codex-plugin/plugin.json @@ -0,0 +1,18 @@ +{ + "name": "skill", + "version": "0.1.0", + "description": "Codex Skill 创建、迁移、检查与维护工具。", + "author": { + "name": "CraftKit" + }, + "skills": "./skills/", + "interface": { + "displayName": "Skill", + "shortDescription": "Codex Skill 创建与维护工具", + "longDescription": "提供 Codex Skill 的创建、迁移、规范检查和来源同步工作流。", + "developerName": "CraftKit", + "category": "Productivity", + "capabilities": ["Read", "Write"], + "defaultPrompt": ["帮我创建或维护一个 Codex Skill。"] + } +} diff --git a/plugins/skill/skills/.gitkeep b/plugins/skill/skills/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/plugins/skill/skills/.gitkeep @@ -0,0 +1 @@ +