@geeseeker/easyai-dev 3.0.0-alpha.1

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 GeeSeeker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,131 @@
1
+ <div align="center">
2
+
3
+ # easyAI-dev
4
+
5
+ **AI Agent 协作框架 — 让 AI 团队帮你完成整个开发流程**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@geeseeker/easyai-dev.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/@geeseeker/easyai-dev)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](https://opensource.org/licenses/MIT)
9
+ [![Antigravity](https://img.shields.io/badge/IDE-Antigravity-purple.svg?style=flat-square)](https://antigravity.dev)
10
+
11
+ ⭐ 觉得有用?Star 一下支持我们!
12
+
13
+ </div>
14
+
15
+ ---
16
+
17
+ ## 这是什么?
18
+
19
+ easyAI 是一个为 [Antigravity IDE](https://antigravity.dev) 打造的 **AI Agent 协作框架**。它在你的 IDE 里组建了一支 AI 团队,覆盖从需求分析到代码交付的完整开发流程。
20
+
21
+ **即使你完全不懂代码,也能通过 AI 协作完成高质量的软件开发。**
22
+
23
+ ### 核心亮点
24
+
25
+ - 🛡️ **9 条硬阻断 + 12 条 Red Flags** — 流程纪律,防止 AI 跳步
26
+ - 🔒 **风险分级代码审查** — 低风险自动通过,高风险交叉验证
27
+ - 🧪 **TDD 红绿重构铁律** — 先写失败测试再写代码
28
+ - 🧠 **知识沉淀闭环** — 每次任务的经验自动归档,越用越聪明
29
+ - 🤖 **多 AI 协作** — 通过 MCP 调度 Claude Code / Codex / Gemini CLI
30
+
31
+ ---
32
+
33
+ ## 快速安装
34
+
35
+ > **前置要求**:[Antigravity IDE](https://antigravity.dev) + [Node.js](https://nodejs.org/) (v18+)
36
+
37
+ 复制下面这段话,粘贴到 Antigravity 的对话框中:
38
+
39
+ ```
40
+ 请帮我安装 easyAI-dev 框架。
41
+ 仓库地址:https://github.com/GeeSeeker/easyAI-3.0
42
+ 请克隆仓库后阅读 README_AI.md,按步骤自动完成配置。
43
+ ```
44
+
45
+ AI 会自动帮你完成以下所有步骤:
46
+
47
+ 1. ✅ 安装 `@geeseeker/easyai-dev` CLI 工具
48
+ 2. ✅ 配置 MCP Server(Claude Code / Gemini / Codex)
49
+ 3. ✅ 验证环境可用性
50
+
51
+ 安装完成后,AI 会告诉你如何初始化项目。
52
+
53
+ ---
54
+
55
+ ## 日常使用
56
+
57
+ ### 新项目初始化
58
+
59
+ ```bash
60
+ cd my-project
61
+ easyai-dev init
62
+ ```
63
+
64
+ 这会在项目中生成:
65
+
66
+ - `.agents/` — 规则、工作流、技能链(AI 的大脑)
67
+ - `.trellis/` — 规范库、会话记忆、任务看板(项目记忆)
68
+
69
+ ### 框架升级
70
+
71
+ ```bash
72
+ npm update -g @geeseeker/easyai-dev # 升级 CLI 工具
73
+ easyai-dev update # 更新项目中的框架文件
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 角色体系
79
+
80
+ easyAI 采用**角色与 AI 解耦**的设计:角色定义职责,AI 是执行角色的载体。
81
+
82
+ | 角色 | 定位 | 职责 |
83
+ | --------------- | ------------ | ---------------------------------------- |
84
+ | 🎯 **项目经理** | 资源调度中枢 | 与用户沟通、拆分任务、验收审查、知识沉淀 |
85
+ | 🔧 **技术主管** | 外包工头 | 调度外部 CLI、处理 Diff、技术执行 |
86
+ | 💻 **开发者** | 核心骨干 | TDD 编码、精细重构、兜底开发 |
87
+ | 🔍 **审核员** | 架构评审 | 核心 Milestone 把关、一票否决 |
88
+ | 🛠️ **助理** | 机动支持 | 环境配置、资料检索(免硬阻断) |
89
+
90
+ ---
91
+
92
+ ## 工作流体系
93
+
94
+ | 工作流 | 说明 |
95
+ | ---------- | --------------------------------------------- |
96
+ | 开工检查 | 上下文恢复 + 硬阻断检查 + Red Flags 自检 |
97
+ | 需求脑暴 | 苏格拉底式提问,将想法转化为设计 |
98
+ | 微任务撰写 | BDD 验收标准 + 测试契约卡片 |
99
+ | TDD 开发 | RED → GREEN → REFACTOR |
100
+ | 代码审查 | 自动化验证 → PM 审查 → 交叉验证(按风险分级) |
101
+ | 系统化调试 | 根因调查 → 模式分析 → 假设验证 → 修复 |
102
+ | 收工流程 | Git 卫生 + 知识沉淀 + 会话记录 |
103
+
104
+ ---
105
+
106
+ ## 致谢
107
+
108
+ easyAI 的诞生离不开以下优秀项目的启发 🙏
109
+
110
+ ### 参考项目
111
+
112
+ | 项目 | 融合点 |
113
+ | ------------------------------------------------------------ | ------------------------------------- |
114
+ | [Trellis](https://github.com/mindfold-ai/Trellis) | 会话持久化、Spec 规范库、任务看板 |
115
+ | [superpowers](https://github.com/obra/superpowers) | TDD 铁律、系统化调试、强制 Skill 触发 |
116
+ | [ccg-workflow](https://github.com/fengshao1227/ccg-workflow) | 多模型编排、安全沙箱 |
117
+ | [GuDa-spec](https://github.com/GuDaStudio/commands) | 零歧义目标检查、约束集 |
118
+
119
+ ### MCP Server
120
+
121
+ | 项目 | 用途 |
122
+ | -------------------------------------------------------------- | -------------------- |
123
+ | [claude-code-mcp](https://github.com/steipete/claude-code-mcp) | Claude Code CLI 调用 |
124
+ | [codexmcp](https://github.com/GuDaStudio/codexmcp) | Codex CLI 调用 |
125
+ | [geminimcp](https://github.com/GuDaStudio/geminimcp) | Gemini CLI 调用 |
126
+
127
+ ---
128
+
129
+ ## 许可证
130
+
131
+ [MIT License](LICENSE) © 2025 GeeSeeker
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import("../src/cli/index.js");
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@geeseeker/easyai-dev",
3
+ "version": "3.0.0-alpha.1",
4
+ "description": "AI Agent 协作框架 — 为 Antigravity IDE 打造的 AI 团队工作流",
5
+ "type": "module",
6
+ "bin": {
7
+ "easyai-dev": "bin/easyai-dev.js"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"TODO: add tests\" && exit 0"
11
+ },
12
+ "keywords": [
13
+ "ai",
14
+ "agent",
15
+ "workflow",
16
+ "antigravity",
17
+ "developer-tools",
18
+ "tdd",
19
+ "code-review"
20
+ ],
21
+ "author": "GeeSeeker",
22
+ "license": "MIT",
23
+ "files": [
24
+ "bin",
25
+ "src",
26
+ "templates",
27
+ "README.md",
28
+ "LICENSE"
29
+ ],
30
+ "engines": {
31
+ "node": ">=18.0.0"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/GeeSeeker/easyAI-3.0.git"
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
39
+ }
40
+ }
@@ -0,0 +1,40 @@
1
+ import { Command } from "commander";
2
+ import { init } from "../commands/init.js";
3
+ import { update } from "../commands/update.js";
4
+
5
+ const program = new Command();
6
+
7
+ program
8
+ .name("easyai-dev")
9
+ .description("AI Agent 协作框架 — 为 Antigravity IDE 打造的 AI 团队工作流")
10
+ .version("3.0.0-alpha.1", "-v, --version", "输出版本号");
11
+
12
+ program
13
+ .command("init")
14
+ .description("在当前项目中初始化 easyAI 框架")
15
+ .option("-f, --force", "覆盖已存在的文件")
16
+ .option("-s, --skip-existing", "跳过已存在的文件")
17
+ .action(async (options) => {
18
+ try {
19
+ await init(options);
20
+ } catch (error) {
21
+ console.error("Error:", error instanceof Error ? error.message : error);
22
+ process.exit(1);
23
+ }
24
+ });
25
+
26
+ program
27
+ .command("update")
28
+ .description("更新当前项目中的 easyAI 框架文件到最新版本")
29
+ .option("--dry-run", "预览变更,不实际执行")
30
+ .option("-f, --force", "强制覆盖所有变更文件")
31
+ .action(async (options) => {
32
+ try {
33
+ await update(options);
34
+ } catch (error) {
35
+ console.error("Error:", error instanceof Error ? error.message : error);
36
+ process.exit(1);
37
+ }
38
+ });
39
+
40
+ program.parse();
@@ -0,0 +1,37 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+
4
+ /**
5
+ * easyai-dev init — 在当前项目中初始化 easyAI 框架
6
+ *
7
+ * 将 templates/ 中的文件复制到用户项目:
8
+ * - templates/agents/ → .agents/
9
+ * - templates/trellis/ → .trellis/
10
+ */
11
+ export async function init(options = {}) {
12
+ const cwd = process.cwd();
13
+
14
+ console.log("\n🚀 easyAI-dev 初始化\n");
15
+
16
+ // 检查是否已初始化
17
+ const agentsDir = path.join(cwd, ".agents");
18
+ const trellisDir = path.join(cwd, ".trellis");
19
+
20
+ if (fs.existsSync(agentsDir) && !options.force) {
21
+ console.log("⚠️ .agents/ 目录已存在。使用 --force 强制覆盖。");
22
+ return;
23
+ }
24
+
25
+ // TODO: 实现模板复制逻辑
26
+ // 1. 定位 templates/ 目录(npm 包内)
27
+ // 2. 递归复制 templates/agents/ → .agents/
28
+ // 3. 递归复制 templates/trellis/ → .trellis/
29
+ // 4. 追加 .gitignore 条目
30
+
31
+ console.log("📁 创建 .agents/ ...");
32
+ console.log("📁 创建 .trellis/ ...");
33
+ console.log("\n✅ easyAI-dev 初始化完成!");
34
+ console.log("\n后续步骤:");
35
+ console.log(" 1. 在 Antigravity 中打开项目");
36
+ console.log(" 2. 输入 /项目经理 开始工作\n");
37
+ }
@@ -0,0 +1,33 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+
4
+ /**
5
+ * easyai-dev update — 更新当前项目的 easyAI 框架文件到最新版本
6
+ *
7
+ * 对比 templates/ 与用户项目中 .agents/ 和 .trellis/ 的差异,
8
+ * 仅更新框架文件(不覆盖用户自定义内容)。
9
+ */
10
+ export async function update(options = {}) {
11
+ const cwd = process.cwd();
12
+
13
+ console.log("\n🔄 easyAI-dev 更新检查\n");
14
+
15
+ // 检查是否已初始化
16
+ const agentsDir = path.join(cwd, ".agents");
17
+ if (!fs.existsSync(agentsDir)) {
18
+ console.log("❌ 未检测到 .agents/ 目录。请先运行 easyai-dev init");
19
+ return;
20
+ }
21
+
22
+ // TODO: 实现更新逻辑
23
+ // 1. 读取用户项目中的 .agents/.version
24
+ // 2. 对比 templates/ 中的版本
25
+ // 3. 差异对比,列出变更文件
26
+ // 4. 按策略更新(force / skip / ask)
27
+
28
+ if (options.dryRun) {
29
+ console.log("📋 预览模式 — 不会实际修改文件\n");
30
+ }
31
+
32
+ console.log("✅ 已是最新版本,无需更新。\n");
33
+ }
@@ -0,0 +1,22 @@
1
+ # easyAI 模板目录
2
+
3
+ 此目录包含 `easyai-dev init` 命令初始化时复制到用户项目的模板文件。
4
+
5
+ ## 结构
6
+
7
+ ```
8
+ templates/
9
+ ├── agents/ → 复制为用户项目的 .agents/
10
+ │ ├── rules/ # Always-On Rule
11
+ │ ├── workflows/ # 角色切换 workflow
12
+ │ ├── skills/ # 全部 skill 链
13
+ │ ├── templates/ # 任务模板
14
+ │ └── scripts/ # 辅助脚本
15
+ └── trellis/ → 复制为用户项目的 .trellis/
16
+ ├── workflow.md # 任务生命周期
17
+ ├── spec/ # 规范知识库(初始结构)
18
+ ├── workspace/ # 会话记忆
19
+ └── tasks/ # 任务看板
20
+ ```
21
+
22
+ > **注意**:模板内容将在后续开发任务中逐步填充。
@@ -0,0 +1,4 @@
1
+ # easyAI Agents 模板
2
+
3
+ > 此目录在 `easyai-dev init` 时会被复制为用户项目的 `.agents/` 目录。
4
+ > 模板内容将在后续开发任务中从 `easyAI-dev/.agents/` 提炼填充。
@@ -0,0 +1,4 @@
1
+ # easyAI Trellis 模板
2
+
3
+ > 此目录在 `easyai-dev init` 时会被复制为用户项目的 `.trellis/` 目录。
4
+ > 模板内容将在后续开发任务中从 `easyAI-dev/.trellis/` 提炼填充。