@geeseeker/easyai-dev 3.0.0-alpha.1 → 3.0.0
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/README.md +90 -88
- package/README_AI.md +143 -0
- package/bin/easyai-dev.js +127 -1
- package/lib/init.js +425 -0
- package/lib/server/index.d.ts +14 -0
- package/lib/server/index.d.ts.map +1 -0
- package/lib/server/index.js +122 -0
- package/lib/server/index.js.map +1 -0
- package/lib/server/resources/journal-resource.d.ts +8 -0
- package/lib/server/resources/journal-resource.d.ts.map +1 -0
- package/lib/server/resources/journal-resource.js +46 -0
- package/lib/server/resources/journal-resource.js.map +1 -0
- package/lib/server/resources/spec-resource.d.ts +11 -0
- package/lib/server/resources/spec-resource.d.ts.map +1 -0
- package/lib/server/resources/spec-resource.js +126 -0
- package/lib/server/resources/spec-resource.js.map +1 -0
- package/lib/server/resources/status-resource.d.ts +8 -0
- package/lib/server/resources/status-resource.d.ts.map +1 -0
- package/lib/server/resources/status-resource.js +36 -0
- package/lib/server/resources/status-resource.js.map +1 -0
- package/lib/server/resources/subtask-context-resource.d.ts +8 -0
- package/lib/server/resources/subtask-context-resource.d.ts.map +1 -0
- package/lib/server/resources/subtask-context-resource.js +93 -0
- package/lib/server/resources/subtask-context-resource.js.map +1 -0
- package/lib/server/resources/task-context-resource.d.ts +8 -0
- package/lib/server/resources/task-context-resource.d.ts.map +1 -0
- package/lib/server/resources/task-context-resource.js +76 -0
- package/lib/server/resources/task-context-resource.js.map +1 -0
- package/lib/server/tools/conflict-check.d.ts +7 -0
- package/lib/server/tools/conflict-check.d.ts.map +1 -0
- package/lib/server/tools/conflict-check.js +242 -0
- package/lib/server/tools/conflict-check.js.map +1 -0
- package/lib/server/tools/context-budget.d.ts +7 -0
- package/lib/server/tools/context-budget.d.ts.map +1 -0
- package/lib/server/tools/context-budget.js +178 -0
- package/lib/server/tools/context-budget.js.map +1 -0
- package/lib/server/tools/context-generate.d.ts +7 -0
- package/lib/server/tools/context-generate.d.ts.map +1 -0
- package/lib/server/tools/context-generate.js +208 -0
- package/lib/server/tools/context-generate.js.map +1 -0
- package/lib/server/tools/journal-append.d.ts +7 -0
- package/lib/server/tools/journal-append.d.ts.map +1 -0
- package/lib/server/tools/journal-append.js +55 -0
- package/lib/server/tools/journal-append.js.map +1 -0
- package/lib/server/tools/journal-search.d.ts +7 -0
- package/lib/server/tools/journal-search.d.ts.map +1 -0
- package/lib/server/tools/journal-search.js +63 -0
- package/lib/server/tools/journal-search.js.map +1 -0
- package/lib/server/tools/plan-validate.d.ts +7 -0
- package/lib/server/tools/plan-validate.d.ts.map +1 -0
- package/lib/server/tools/plan-validate.js +146 -0
- package/lib/server/tools/plan-validate.js.map +1 -0
- package/lib/server/tools/spec-validate.d.ts +7 -0
- package/lib/server/tools/spec-validate.d.ts.map +1 -0
- package/lib/server/tools/spec-validate.js +170 -0
- package/lib/server/tools/spec-validate.js.map +1 -0
- package/lib/server/tools/subtask-tools.d.ts +12 -0
- package/lib/server/tools/subtask-tools.d.ts.map +1 -0
- package/lib/server/tools/subtask-tools.js +383 -0
- package/lib/server/tools/subtask-tools.js.map +1 -0
- package/lib/server/tools/task-append-log.d.ts +7 -0
- package/lib/server/tools/task-append-log.d.ts.map +1 -0
- package/lib/server/tools/task-append-log.js +108 -0
- package/lib/server/tools/task-append-log.js.map +1 -0
- package/lib/server/tools/task-cancel.d.ts +7 -0
- package/lib/server/tools/task-cancel.d.ts.map +1 -0
- package/lib/server/tools/task-cancel.js +104 -0
- package/lib/server/tools/task-cancel.js.map +1 -0
- package/lib/server/tools/task-create.d.ts +7 -0
- package/lib/server/tools/task-create.d.ts.map +1 -0
- package/lib/server/tools/task-create.js +98 -0
- package/lib/server/tools/task-create.js.map +1 -0
- package/lib/server/tools/task-get.d.ts +7 -0
- package/lib/server/tools/task-get.d.ts.map +1 -0
- package/lib/server/tools/task-get.js +152 -0
- package/lib/server/tools/task-get.js.map +1 -0
- package/lib/server/tools/task-list.d.ts +7 -0
- package/lib/server/tools/task-list.d.ts.map +1 -0
- package/lib/server/tools/task-list.js +66 -0
- package/lib/server/tools/task-list.js.map +1 -0
- package/lib/server/tools/task-transition.d.ts +7 -0
- package/lib/server/tools/task-transition.d.ts.map +1 -0
- package/lib/server/tools/task-transition.js +259 -0
- package/lib/server/tools/task-transition.js.map +1 -0
- package/lib/server/tools/worktree-tools.d.ts +17 -0
- package/lib/server/tools/worktree-tools.d.ts.map +1 -0
- package/lib/server/tools/worktree-tools.js +336 -0
- package/lib/server/tools/worktree-tools.js.map +1 -0
- package/lib/server/utils/capability-gate.d.ts +50 -0
- package/lib/server/utils/capability-gate.d.ts.map +1 -0
- package/lib/server/utils/capability-gate.js +146 -0
- package/lib/server/utils/capability-gate.js.map +1 -0
- package/lib/server/utils/git-utils.d.ts +33 -0
- package/lib/server/utils/git-utils.d.ts.map +1 -0
- package/lib/server/utils/git-utils.js +84 -0
- package/lib/server/utils/git-utils.js.map +1 -0
- package/lib/server/utils/hash-utils.d.ts +78 -0
- package/lib/server/utils/hash-utils.d.ts.map +1 -0
- package/lib/server/utils/hash-utils.js +153 -0
- package/lib/server/utils/hash-utils.js.map +1 -0
- package/lib/server/utils/journal-utils.d.ts +69 -0
- package/lib/server/utils/journal-utils.d.ts.map +1 -0
- package/lib/server/utils/journal-utils.js +387 -0
- package/lib/server/utils/journal-utils.js.map +1 -0
- package/lib/server/utils/status-utils.d.ts +58 -0
- package/lib/server/utils/status-utils.d.ts.map +1 -0
- package/lib/server/utils/status-utils.js +70 -0
- package/lib/server/utils/status-utils.js.map +1 -0
- package/lib/server/utils/task-utils.d.ts +104 -0
- package/lib/server/utils/task-utils.d.ts.map +1 -0
- package/lib/server/utils/task-utils.js +396 -0
- package/lib/server/utils/task-utils.js.map +1 -0
- package/lib/server/utils/uri-utils.d.ts +9 -0
- package/lib/server/utils/uri-utils.d.ts.map +1 -0
- package/lib/server/utils/uri-utils.js +21 -0
- package/lib/server/utils/uri-utils.js.map +1 -0
- package/package.json +30 -21
- package/skeleton/.agents/rules/anti-hallucination.md +42 -0
- package/skeleton/.agents/rules/coding-standards.md +41 -0
- package/skeleton/.agents/rules/project-identity.md +71 -0
- package/skeleton/.agents/skills/common-framework-evolve/.gitkeep +0 -0
- package/skeleton/.agents/skills/common-framework-evolve/SKILL.md +105 -0
- package/skeleton/.agents/skills/common-session-close/.gitkeep +0 -0
- package/skeleton/.agents/skills/common-session-close/SKILL.md +83 -0
- package/skeleton/.agents/skills/common-spec-update/.gitkeep +0 -0
- package/skeleton/.agents/skills/common-spec-update/SKILL.md +87 -0
- package/skeleton/.agents/skills/pm-brainstorm/.gitkeep +0 -0
- package/skeleton/.agents/skills/pm-brainstorm/SKILL.md +114 -0
- package/skeleton/.agents/skills/pm-session-start/.gitkeep +0 -0
- package/skeleton/.agents/skills/pm-session-start/SKILL.md +73 -0
- package/skeleton/.agents/skills/pm-task-planning/SKILL.md +200 -0
- package/skeleton/.agents/skills/pm-task-review/.gitkeep +0 -0
- package/skeleton/.agents/skills/pm-task-review/SKILL.md +144 -0
- package/skeleton/.agents/skills/worker-check/.gitkeep +0 -0
- package/skeleton/.agents/skills/worker-check/SKILL.md +194 -0
- package/skeleton/.agents/skills/worker-debug/.gitkeep +0 -0
- package/skeleton/.agents/skills/worker-debug/SKILL.md +241 -0
- package/skeleton/.agents/skills/worker-implement/.gitkeep +0 -0
- package/skeleton/.agents/skills/worker-implement/SKILL.md +192 -0
- package/skeleton/.agents/workflows/pm.md +81 -0
- package/skeleton/.agents/workflows/worker.md +100 -0
- package/skeleton/.docs/README.md +25 -0
- package/skeleton/.docs/archive/.gitkeep +0 -0
- package/skeleton/.docs/design/.gitkeep +0 -0
- package/skeleton/.docs/guides/.gitkeep +0 -0
- package/skeleton/.docs/notes/.gitkeep +0 -0
- package/skeleton/.docs/requirements/.gitkeep +0 -0
- package/skeleton/.trellis/config/config.yaml +48 -0
- package/skeleton/.trellis/spec/backend/.gitkeep +0 -0
- package/skeleton/.trellis/spec/frontend/.gitkeep +0 -0
- package/skeleton/.trellis/spec/guides/.gitkeep +0 -0
- package/skeleton/.trellis/spec/guides/external-cli-guide.md +253 -0
- package/skeleton/.trellis/spec/guides/task-workflow.md +34 -0
- package/skeleton/.trellis/spec/guides/testing.md +32 -0
- package/skeleton/.trellis/spec/spec-schema.json +64 -0
- package/skeleton/.trellis/tasks/.gitkeep +0 -0
- package/skeleton/.trellis/workspace/.gitkeep +0 -0
- package/skeleton/README.md +25 -0
- package/LICENSE +0 -21
- package/src/cli/index.js +0 -40
- package/src/commands/init.js +0 -37
- package/src/commands/update.js +0 -33
- package/templates/README.md +0 -22
- package/templates/agents/README.md +0 -4
- package/templates/trellis/README.md +0 -4
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 外部 CLI 集成指南
|
|
3
|
+
version: "1.0"
|
|
4
|
+
category: guides
|
|
5
|
+
status: active
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# 外部 CLI 集成指南
|
|
9
|
+
|
|
10
|
+
> **版本**:v1.0(M05 创建)
|
|
11
|
+
> **适用角色**:PM(调度)、Worker(执行时参考)
|
|
12
|
+
> **架构依据**:`easyAI-底层架构设计.md` §5.4
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. 安全约束
|
|
17
|
+
|
|
18
|
+
### 1.1 核心原则:代码主权
|
|
19
|
+
|
|
20
|
+
外部 CLI(Codex / Claude Code / Gemini CLI)= **外包资源池**,不是项目成员。
|
|
21
|
+
|
|
22
|
+
- 外部 CLI **不能直接写主工作区**,只能输出到 `.trellis/tasks/Txxx/cli/{cli-name}/`
|
|
23
|
+
- 外部 CLI 产出视为 **Prototype**,主控 AI 需重构后才能合入代码库
|
|
24
|
+
- 主控 AI 重构时须确保:对齐项目编码规范、去除冗余、验证类型安全
|
|
25
|
+
|
|
26
|
+
### 1.2 输出目录规范
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
.trellis/tasks/T001-xxx/
|
|
30
|
+
└── cli/
|
|
31
|
+
├── codex/ ← Codex CLI 产出
|
|
32
|
+
│ ├── review.md ← 审查报告
|
|
33
|
+
│ └── patch.diff ← 代码建议(diff 格式)
|
|
34
|
+
├── claude-code/ ← Claude Code 产出
|
|
35
|
+
│ ├── review.md
|
|
36
|
+
│ └── patch.diff
|
|
37
|
+
└── gemini/ ← Gemini CLI 产出
|
|
38
|
+
├── review.md
|
|
39
|
+
└── patch.diff
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 1.3 调用前检查清单
|
|
43
|
+
|
|
44
|
+
每次调用外部 CLI 前,PM/Worker 必须确认:
|
|
45
|
+
|
|
46
|
+
- [ ] 明确调用目的(审查 / 执行 / 分析)
|
|
47
|
+
- [ ] 限定输出范围(哪些文件、哪些维度)
|
|
48
|
+
- [ ] 指定输出格式(Markdown 报告 / unified diff / JSON)
|
|
49
|
+
- [ ] 设置合理超时
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 2. 统一调用模板
|
|
54
|
+
|
|
55
|
+
### 2.1 Codex CLI(后端/逻辑方向)
|
|
56
|
+
|
|
57
|
+
**适用场景**:逻辑审查、算法分析、后端代码生成、安全检查
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
调用工具:mcp_codexmcp_codex
|
|
61
|
+
参数:
|
|
62
|
+
PROMPT: |
|
|
63
|
+
任务:{调用目的}
|
|
64
|
+
任务 ID:{task_id}
|
|
65
|
+
|
|
66
|
+
## 上下文
|
|
67
|
+
{相关代码或文件路径}
|
|
68
|
+
|
|
69
|
+
## 约束
|
|
70
|
+
{来自 task.md 的约束集}
|
|
71
|
+
|
|
72
|
+
## 输出要求
|
|
73
|
+
- 格式:{Markdown 报告 / unified diff patch}
|
|
74
|
+
- 输出路径(如有文件写入):.trellis/tasks/{task_id}/cli/codex/
|
|
75
|
+
- 语言:中文
|
|
76
|
+
cd: /home/GeeSeeker/projects/easyAI-dev
|
|
77
|
+
sandbox: read-only # 审查模式;需写入 cli/ 时用 workspace-write
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
> **超时说明**:Codex CLI 无显式超时参数,复杂任务通常在 5–10 分钟内完成。
|
|
81
|
+
|
|
82
|
+
### 2.2 Claude Code
|
|
83
|
+
|
|
84
|
+
**适用场景**:代码审查、重构建议、文档生成、多文件分析
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
调用工具:mcp_claude-code-mcp_claude_code
|
|
88
|
+
参数:
|
|
89
|
+
prompt: |
|
|
90
|
+
任务:{调用目的}
|
|
91
|
+
任务 ID:{task_id}
|
|
92
|
+
|
|
93
|
+
## 上下文
|
|
94
|
+
{相关代码或文件路径}
|
|
95
|
+
|
|
96
|
+
## 约束
|
|
97
|
+
{来自 task.md 的约束集}
|
|
98
|
+
|
|
99
|
+
## 输出要求
|
|
100
|
+
- 格式:{Markdown 报告 / unified diff patch}
|
|
101
|
+
- 如需写入文件,仅允许写入 .trellis/tasks/{task_id}/cli/claude-code/
|
|
102
|
+
- 语言:中文
|
|
103
|
+
|
|
104
|
+
注意:不要修改项目源代码,只提供分析报告或建议。
|
|
105
|
+
workFolder: /home/GeeSeeker/projects/easyAI-dev
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
> **说明**:Claude Code MCP 工具无显式 sandbox 参数,通过 prompt 中的指令约束写入行为。复杂任务通常 5–10 分钟完成。
|
|
109
|
+
|
|
110
|
+
### 2.3 Gemini CLI(前端/集成方向)
|
|
111
|
+
|
|
112
|
+
**适用场景**:前端审查、可维护性分析、模式一致性检查
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
调用工具:mcp_geminimcp_gemini
|
|
116
|
+
参数:
|
|
117
|
+
PROMPT: |
|
|
118
|
+
任务:{调用目的}
|
|
119
|
+
任务 ID:{task_id}
|
|
120
|
+
|
|
121
|
+
## 上下文
|
|
122
|
+
{相关代码或文件路径}
|
|
123
|
+
|
|
124
|
+
## 约束
|
|
125
|
+
{来自 task.md 的约束集}
|
|
126
|
+
|
|
127
|
+
## 输出要求
|
|
128
|
+
- 格式:{Markdown 报告 / unified diff patch}
|
|
129
|
+
- 如需写入文件,仅允许写入 .trellis/tasks/{task_id}/cli/gemini/
|
|
130
|
+
- 语言:中文
|
|
131
|
+
cd: /home/GeeSeeker/projects/easyAI-dev
|
|
132
|
+
sandbox: true # 沙箱模式,防止意外修改
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
> **超时说明**:Gemini CLI 无显式超时参数,复杂任务通常在 5–10 分钟内完成。
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 3. 多模型交叉审查流程
|
|
140
|
+
|
|
141
|
+
### 3.1 流程概述
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
Stage 1:并行审查(产出互不可见)
|
|
145
|
+
├─ CLI-A 审查产出 → 生成 review-A.md
|
|
146
|
+
└─ CLI-B 审查产出 → 生成 review-B.md
|
|
147
|
+
|
|
148
|
+
Stage 2:主控 AI 综合(分级处理)
|
|
149
|
+
└─ 合并两份报告 → 去重 → 分级
|
|
150
|
+
|
|
151
|
+
Stage 3:决策与修复
|
|
152
|
+
├─ Critical → 必须修复
|
|
153
|
+
├─ Warning → 建议修复
|
|
154
|
+
└─ Info → 酌情处理
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### 3.2 执行步骤
|
|
158
|
+
|
|
159
|
+
#### Stage 1:并行审查
|
|
160
|
+
|
|
161
|
+
同时调用两个不同 CLI 审查同一产出。**关键**:两个 CLI 的输入互不可见(不给 CLI-B 看 CLI-A 的报告),确保独立判断。
|
|
162
|
+
|
|
163
|
+
推荐组合:
|
|
164
|
+
- **Codex + Gemini**(互补:后端逻辑 vs 前端模式)
|
|
165
|
+
- **Codex + Claude Code**(互补:执行优化 vs 架构视角)
|
|
166
|
+
|
|
167
|
+
审查维度模板:
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
## 审查维度
|
|
171
|
+
|
|
172
|
+
### Spec 合规
|
|
173
|
+
- 约束集中每条约束是否被满足?
|
|
174
|
+
- 验收标准是否全部覆盖?
|
|
175
|
+
|
|
176
|
+
### 代码质量
|
|
177
|
+
- 命名规范、类型安全、错误处理
|
|
178
|
+
- 单一职责、DRY 原则
|
|
179
|
+
|
|
180
|
+
### 模式一致性
|
|
181
|
+
- 是否与项目现有代码风格一致?
|
|
182
|
+
- 是否遵循项目架构约定?
|
|
183
|
+
|
|
184
|
+
### 安全
|
|
185
|
+
- 输入验证、注入防护、认证/授权
|
|
186
|
+
- 敏感信息暴露风险
|
|
187
|
+
|
|
188
|
+
## 输出格式(JSON)
|
|
189
|
+
{
|
|
190
|
+
"findings": [
|
|
191
|
+
{
|
|
192
|
+
"severity": "Critical | Warning | Info",
|
|
193
|
+
"dimension": "spec | quality | patterns | security",
|
|
194
|
+
"file": "path/to/file.ts",
|
|
195
|
+
"line": 42,
|
|
196
|
+
"description": "问题描述",
|
|
197
|
+
"fix_suggestion": "修复建议"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"passed_checks": ["通过的检查项"],
|
|
201
|
+
"summary": "总体评估"
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### Stage 2:综合报告
|
|
206
|
+
|
|
207
|
+
主控 AI 收到两份审查报告后:
|
|
208
|
+
|
|
209
|
+
1. 合并所有 findings
|
|
210
|
+
2. 去重(同一位置同一问题只保留一条)
|
|
211
|
+
3. 交叉验证(两个 CLI 都发现的问题 → 提升严重程度)
|
|
212
|
+
4. 生成综合报告:
|
|
213
|
+
|
|
214
|
+
```markdown
|
|
215
|
+
## 交叉审查报告:T{xxx}
|
|
216
|
+
|
|
217
|
+
### Critical(X 项)— 必须修复
|
|
218
|
+
- [ ] [SPEC] file.ts:42 — 约束 C1 未满足:{描述}
|
|
219
|
+
- [ ] [SEC] api.ts:15 — 输入未校验:{描述}
|
|
220
|
+
|
|
221
|
+
### Warning(Y 项)— 建议修复
|
|
222
|
+
- [ ] [QUA] utils.ts:88 — 命名不一致:{描述}
|
|
223
|
+
|
|
224
|
+
### Info(Z 项)— 酌情处理
|
|
225
|
+
- [ ] [PAT] helper.ts:20 — 建议抽取函数:{描述}
|
|
226
|
+
|
|
227
|
+
### 已通过检查
|
|
228
|
+
- ✅ 约束集 C1-C5 全部满足
|
|
229
|
+
- ✅ 无安全漏洞
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
#### Stage 3:决策
|
|
233
|
+
|
|
234
|
+
- **Critical > 0**:必须修复后才能进入验收
|
|
235
|
+
- **Critical = 0, Warning > 0**:建议修复,但可由 PM 判断是否接受
|
|
236
|
+
- **全部 Info**:可直接进入验收
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 4. 使用场景指南
|
|
241
|
+
|
|
242
|
+
| 场景 | 使用方式 | CLI 选择 | sandbox 设置 |
|
|
243
|
+
|------|----------|----------|-------------|
|
|
244
|
+
| 独立审核 | CLI 读取代码,产出审核报告 | 按领域选择 | read-only |
|
|
245
|
+
| 边界清晰的执行 | CLI 按 spec 生成代码 | 按领域选择 | workspace-write |
|
|
246
|
+
| 多模型交叉审查 | 两个 CLI 分别审查 | Codex + Gemini | read-only |
|
|
247
|
+
| 快速分析 | 单 CLI 分析特定问题 | 按问题类型 | read-only |
|
|
248
|
+
|
|
249
|
+
### 注意事项
|
|
250
|
+
|
|
251
|
+
1. **workspace-write 模式**:仅当确实需要 CLI 写入 `cli/` 目录时使用,且需确保 CLI 只写入指定目录
|
|
252
|
+
2. **超时控制**:复杂任务建议设置较长超时,避免中途中断
|
|
253
|
+
3. **产出重构**:所有外部 CLI 产出在合入前必须经主控 AI 重构对齐项目规范(代码主权原则)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 任务工作流规范
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
category: guides
|
|
5
|
+
status: active
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# 任务工作流规范
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
定义 easyAI 任务从创建到归档的完整工作流程。
|
|
13
|
+
|
|
14
|
+
## 任务生命周期
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
pending → in_progress → under_review → completed → archived
|
|
18
|
+
↘ rejected → in_progress
|
|
19
|
+
任意非归档状态 → cancelled
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## PM 职责
|
|
23
|
+
|
|
24
|
+
1. 使用 `pm-brainstorm` Skill 澄清需求
|
|
25
|
+
2. 使用 `pm-task-planning` Skill 生成约束集
|
|
26
|
+
3. 调用 `task_create()` 创建任务
|
|
27
|
+
4. 使用 `pm-task-review` Skill 验收任务
|
|
28
|
+
|
|
29
|
+
## Worker 职责
|
|
30
|
+
|
|
31
|
+
1. 调用 `task_get()` 读取任务详情
|
|
32
|
+
2. 按约束集逐步执行(TDD 流程)
|
|
33
|
+
3. 使用 `worker-check` Skill 生成验证标记
|
|
34
|
+
4. 调用 `task_transition(under_review)` 提交验收
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 测试规范
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
category: guides
|
|
5
|
+
status: active
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# 测试规范
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
定义 easyAI 项目的测试标准和流程。
|
|
13
|
+
|
|
14
|
+
## 测试分层
|
|
15
|
+
|
|
16
|
+
1. **单元测试**:覆盖核心逻辑和工具函数
|
|
17
|
+
2. **集成测试**:验证 MCP Tool 端到端行为
|
|
18
|
+
3. **验收测试**:通过 verification.md 三标记验证
|
|
19
|
+
|
|
20
|
+
## TDD 流程
|
|
21
|
+
|
|
22
|
+
遵循 worker-implement Skill 的 TDD 铁律:
|
|
23
|
+
- 🔴 RED:先写失败测试
|
|
24
|
+
- 🟢 GREEN:最小通过代码
|
|
25
|
+
- 🔵 REFACTOR:重构优化
|
|
26
|
+
|
|
27
|
+
## 验证标记
|
|
28
|
+
|
|
29
|
+
每次提交必须包含:
|
|
30
|
+
- LINT_PASS / LINT_NA
|
|
31
|
+
- TEST_PASS / TEST_NA
|
|
32
|
+
- MANUAL_PASS / MANUAL_NA
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://easyai.dev/schemas/spec-schema.json",
|
|
4
|
+
"title": "easyAI Spec File Schema",
|
|
5
|
+
"description": "定义 .trellis/spec/ 下规范文件 YAML frontmatter 的格式约束。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["title", "version", "category"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"title": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "规范标题"
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
16
|
+
"description": "规范版本号(SemVer 格式)"
|
|
17
|
+
},
|
|
18
|
+
"category": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": ["frontend", "backend", "guides", "general"],
|
|
21
|
+
"description": "规范分类"
|
|
22
|
+
},
|
|
23
|
+
"status": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": ["draft", "active", "deprecated"],
|
|
26
|
+
"default": "draft",
|
|
27
|
+
"description": "规范状态"
|
|
28
|
+
},
|
|
29
|
+
"lastUpdated": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"format": "date",
|
|
32
|
+
"description": "最近更新日期"
|
|
33
|
+
},
|
|
34
|
+
"owner": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "规范维护者"
|
|
37
|
+
},
|
|
38
|
+
"content": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "规范正文(Markdown 格式)"
|
|
41
|
+
},
|
|
42
|
+
"tags": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": { "type": "string" },
|
|
45
|
+
"description": "标签列表,用于 context_generate 关键词匹配"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": { "type": "string" },
|
|
50
|
+
"description": "规范间依赖关系(引用其他 spec 的路径)"
|
|
51
|
+
},
|
|
52
|
+
"minTokenEstimate": {
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"minimum": 0,
|
|
55
|
+
"description": "最小 Token 估算值(辅助上下文预算管理)"
|
|
56
|
+
},
|
|
57
|
+
"maxTokenEstimate": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 0,
|
|
60
|
+
"description": "最大 Token 估算值(辅助上下文预算管理)"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": false
|
|
64
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# 我的项目
|
|
2
|
+
|
|
3
|
+
> 由 [easyAI](https://github.com/GeeSeeker/easyAI-dev) 框架驱动。
|
|
4
|
+
|
|
5
|
+
## 快速开始
|
|
6
|
+
|
|
7
|
+
1. 在 Antigravity IDE 中打开此项目
|
|
8
|
+
2. 输入 `/pm` 启动项目经理
|
|
9
|
+
3. 向 PM 描述你的需求,开始开发!
|
|
10
|
+
|
|
11
|
+
## 项目结构
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
.
|
|
15
|
+
├── .agents/ ← AI 角色层(规则、工作流、Skills)
|
|
16
|
+
├── .trellis/ ← 数据持久层(配置、规范、任务、日志)
|
|
17
|
+
├── .docs/ ← 用户文档空间
|
|
18
|
+
└── ... ← 你的项目代码
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 框架升级
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx @geeseeker/easyai-dev update .
|
|
25
|
+
```
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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/src/cli/index.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
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();
|
package/src/commands/init.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
}
|
package/src/commands/update.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
}
|
package/templates/README.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
> **注意**:模板内容将在后续开发任务中逐步填充。
|