@lordmos/dev-crew 0.1.0 → 0.2.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.en.md +5 -5
- package/README.md +5 -5
- package/agents/README.md +1 -1
- package/dist/commands/agents.js +1 -1
- package/dist/commands/init.js +15 -15
- package/package.json +1 -1
- package/templates/INSTRUCTIONS.md +10 -10
package/README.en.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
*帮你做好 harness!*
|
|
11
11
|
|
|
12
|
-
[](https://www.npmjs.com/package/@lordmos/dev-crew)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
[](https://nodejs.org)
|
|
15
15
|
[](https://github.com/lordmos/dev-crew/pulls)
|
|
@@ -37,7 +37,7 @@ When using AI (Copilot, Claude, Cursor…) for development:
|
|
|
37
37
|
## Get Started in 30 Seconds
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
npm install -g @lordmos/
|
|
40
|
+
npm install -g @lordmos/dev-crew
|
|
41
41
|
cd your-project
|
|
42
42
|
crew init
|
|
43
43
|
```
|
|
@@ -77,8 +77,8 @@ AI: ✅ Change add-api-auth complete.
|
|
|
77
77
|
```
|
|
78
78
|
your-project/
|
|
79
79
|
├── INSTRUCTIONS.md ← AI behavior instructions (core file)
|
|
80
|
-
├──
|
|
81
|
-
└──
|
|
80
|
+
├── dev-crew.yaml ← Project config (modes, specialists)
|
|
81
|
+
└── dev-crew/
|
|
82
82
|
└── specs/ ← Shared specifications
|
|
83
83
|
```
|
|
84
84
|
|
|
@@ -129,7 +129,7 @@ Beyond the core team, **29 domain specialists** across 10 fields, activated on d
|
|
|
129
129
|
> 🎮 Game Dev (8) · 🎨 UI/UX (3) · 🔒 Security (1) · ⚙️ DevOps (3) · 🧪 Testing (3) · 💻 Engineering (5) · 📊 Data (2) · 🤖 AI/ML (1) · 🌐 Web3 (1) · 🥽 Spatial Computing (2)
|
|
130
130
|
|
|
131
131
|
```yaml
|
|
132
|
-
#
|
|
132
|
+
# dev-crew.yaml
|
|
133
133
|
specialists:
|
|
134
134
|
- game-designer
|
|
135
135
|
- security-engineer
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
*帮你做好 harness!*
|
|
11
11
|
|
|
12
|
-
[](https://www.npmjs.com/package/@lordmos/dev-crew)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
[](https://nodejs.org)
|
|
15
15
|
[](https://github.com/lordmos/dev-crew/pulls)
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
## 30 秒上手
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
npm install -g @lordmos/
|
|
40
|
+
npm install -g @lordmos/dev-crew
|
|
41
41
|
cd your-project
|
|
42
42
|
crew init
|
|
43
43
|
```
|
|
@@ -77,8 +77,8 @@ AI: ✅ 变更 add-api-auth 完成。
|
|
|
77
77
|
```
|
|
78
78
|
your-project/
|
|
79
79
|
├── INSTRUCTIONS.md ← AI 行为指令(核心文件)
|
|
80
|
-
├──
|
|
81
|
-
└──
|
|
80
|
+
├── dev-crew.yaml ← 项目配置(模式、专家选择)
|
|
81
|
+
└── dev-crew/
|
|
82
82
|
└── specs/ ← 共享规约
|
|
83
83
|
```
|
|
84
84
|
|
|
@@ -129,7 +129,7 @@ flowchart LR
|
|
|
129
129
|
> 🎮 游戏开发(8)· 🎨 UI/UX(3)· 🔒 安全(1)· ⚙️ DevOps(3)· 🧪 测试(3)· 💻 工程(5)· 📊 数据(2)· 🤖 AI/ML(1)· 🌐 Web3(1)· 🥽 空间计算(2)
|
|
130
130
|
|
|
131
131
|
```yaml
|
|
132
|
-
#
|
|
132
|
+
# dev-crew.yaml
|
|
133
133
|
specialists:
|
|
134
134
|
- game-designer
|
|
135
135
|
- security-engineer
|
package/agents/README.md
CHANGED
package/dist/commands/agents.js
CHANGED
|
@@ -35,7 +35,7 @@ export async function agentsCommand() {
|
|
|
35
35
|
}
|
|
36
36
|
console.log();
|
|
37
37
|
}
|
|
38
|
-
console.log(`激活方式:在
|
|
38
|
+
console.log(`激活方式:在 dev-crew.yaml 中添加 specialists 列表`);
|
|
39
39
|
console.log(` specialists:`);
|
|
40
40
|
console.log(` - ${files[0]?.replace(".md", "") ?? "agent-name"}`);
|
|
41
41
|
console.log();
|
package/dist/commands/init.js
CHANGED
|
@@ -12,14 +12,14 @@ export async function initCommand(options) {
|
|
|
12
12
|
const cwd = process.cwd();
|
|
13
13
|
const projectName = options.name ?? inferProjectName(cwd);
|
|
14
14
|
console.log(`\n🚀 DevCrew 初始化: ${projectName}\n`);
|
|
15
|
-
// 1. Create
|
|
16
|
-
const crewDir = join(cwd, "
|
|
15
|
+
// 1. Create dev-crew/ directory
|
|
16
|
+
const crewDir = join(cwd, "dev-crew");
|
|
17
17
|
if (existsSync(crewDir)) {
|
|
18
|
-
console.log("⚠️
|
|
18
|
+
console.log("⚠️ dev-crew/ 已存在,跳过目录创建");
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
21
21
|
mkdirSync(crewDir, { recursive: true });
|
|
22
|
-
console.log("📁 创建
|
|
22
|
+
console.log("📁 创建 dev-crew/");
|
|
23
23
|
}
|
|
24
24
|
// 2. Copy INSTRUCTIONS.md to project root
|
|
25
25
|
const instrDest = join(cwd, "INSTRUCTIONS.md");
|
|
@@ -32,21 +32,21 @@ export async function initCommand(options) {
|
|
|
32
32
|
writeFileSync(instrDest, content);
|
|
33
33
|
console.log("📄 创建 INSTRUCTIONS.md(AI 行为指令)");
|
|
34
34
|
}
|
|
35
|
-
// 3. Generate
|
|
36
|
-
const yamlDest = join(cwd, "
|
|
35
|
+
// 3. Generate dev-crew.yaml at project root
|
|
36
|
+
const yamlDest = join(cwd, "dev-crew.yaml");
|
|
37
37
|
if (existsSync(yamlDest)) {
|
|
38
|
-
console.log("⚠️
|
|
38
|
+
console.log("⚠️ dev-crew.yaml 已存在,跳过");
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
41
|
const yamlContent = generateYaml(projectName);
|
|
42
42
|
writeFileSync(yamlDest, yamlContent);
|
|
43
|
-
console.log("⚙️ 创建
|
|
43
|
+
console.log("⚙️ 创建 dev-crew.yaml(项目配置)");
|
|
44
44
|
}
|
|
45
45
|
// 4. Create specs/ directory
|
|
46
46
|
const specsDir = join(crewDir, "specs");
|
|
47
47
|
if (!existsSync(specsDir)) {
|
|
48
48
|
mkdirSync(specsDir, { recursive: true });
|
|
49
|
-
console.log("📁 创建
|
|
49
|
+
console.log("📁 创建 dev-crew/specs/");
|
|
50
50
|
}
|
|
51
51
|
// 5. Add .gitignore rules
|
|
52
52
|
if (options.gitignore) {
|
|
@@ -58,8 +58,8 @@ export async function initCommand(options) {
|
|
|
58
58
|
|
|
59
59
|
📂 项目结构:
|
|
60
60
|
INSTRUCTIONS.md ← AI 行为指令(核心文件)
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
dev-crew.yaml ← 项目配置(入库)
|
|
62
|
+
dev-crew/
|
|
63
63
|
└── specs/ ← 共享规约(入库)
|
|
64
64
|
|
|
65
65
|
🎬 下一步:
|
|
@@ -83,7 +83,7 @@ function inferProjectName(dir) {
|
|
|
83
83
|
}
|
|
84
84
|
function generateYaml(projectName) {
|
|
85
85
|
return `# DevCrew 项目配置
|
|
86
|
-
# 文档: https://github.com/
|
|
86
|
+
# 文档: https://github.com/lordmos/dev-crew
|
|
87
87
|
|
|
88
88
|
project:
|
|
89
89
|
name: "${projectName}"
|
|
@@ -97,7 +97,7 @@ verify:
|
|
|
97
97
|
test_command: "" # 为空时 AI 基于验收标准审查
|
|
98
98
|
|
|
99
99
|
git:
|
|
100
|
-
|
|
100
|
+
ignore_dev_crew: true # dev-crew/ 不入库(推荐)
|
|
101
101
|
|
|
102
102
|
specialists: [] # 按需激活领域专家,运行 crew agents 查看可用列表
|
|
103
103
|
# 示例: [game-designer, security-engineer]
|
|
@@ -108,8 +108,8 @@ function appendGitignore(dir) {
|
|
|
108
108
|
const marker = "# DevCrew";
|
|
109
109
|
const rules = `
|
|
110
110
|
${marker}
|
|
111
|
-
|
|
112
|
-
!
|
|
111
|
+
dev-crew/
|
|
112
|
+
!dev-crew/specs/
|
|
113
113
|
`;
|
|
114
114
|
if (existsSync(gitignorePath)) {
|
|
115
115
|
const existing = readFileSync(gitignorePath, "utf-8");
|
package/package.json
CHANGED
|
@@ -17,20 +17,20 @@
|
|
|
17
17
|
|
|
18
18
|
## 领域专家(可选)
|
|
19
19
|
|
|
20
|
-
若 `
|
|
20
|
+
若 `dev-crew.yaml` 配置了 `specialists`,PjM 在初始化时加载对应的专家 prompt 文件(`agents/*.md`)。专家在 PDEVI 对应阶段自动参与——补充领域知识到 proposal.md / design.md / 验证标准中。**不替代核心团队,不创建独立文件。** 未配置时核心团队独立工作,零影响。
|
|
21
21
|
|
|
22
22
|
## 指令
|
|
23
23
|
|
|
24
24
|
### `/crew:init [--prd <file>] [--scan]`
|
|
25
25
|
|
|
26
|
-
创建 `
|
|
26
|
+
创建 `dev-crew/` 目录 + `dev-crew.yaml` + `resume.md` + `blockers.md`,追加 `.gitignore` 排除 `dev-crew/`。
|
|
27
27
|
- `--prd <file>`: 导入已有需求文档,提炼为 proposal
|
|
28
28
|
- `--scan`: 扫描代码库建立基线
|
|
29
29
|
- **幂等**: 已存在则补全缺失文件,不覆盖,报告当前状态
|
|
30
30
|
|
|
31
31
|
### `/crew:plan <name> [--express|--prototype]`
|
|
32
32
|
|
|
33
|
-
创建变更 `
|
|
33
|
+
创建变更 `dev-crew/changes/{name}/proposal.md`,进入 Plan 阶段。若未初始化自动执行 init。名称冲突时提示恢复或重命名。未指定 name 时从描述自动生成 kebab-case 名称。
|
|
34
34
|
|
|
35
35
|
**模式推断**(AI 自动推断,告知用户,用户可覆盖):
|
|
36
36
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
### `/crew:release`
|
|
54
54
|
|
|
55
|
-
将已完成变更目录移至 `
|
|
55
|
+
将已完成变更目录移至 `dev-crew/archive/`,更新 resume.md。有未完成变更或 OPEN blocker 时**警告但不阻断**。无已完成变更时提示不执行。
|
|
56
56
|
|
|
57
57
|
> 用户也可用自然语言触发同等行为(如"帮我看看进度" ≈ `/crew:status`)。
|
|
58
58
|
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
|
|
81
81
|
### 验证策略(Verify 阶段)
|
|
82
82
|
|
|
83
|
-
1. 若 `
|
|
83
|
+
1. 若 `dev-crew.yaml` 配置了 `verify.test_command` → 执行命令并解析退出码
|
|
84
84
|
2. 若无 → AI 基于验收标准逐项检查,在 resume.md 记录判断依据
|
|
85
85
|
3. 完成后展示结果摘要,**等待用户确认**(硬性阶段门)
|
|
86
86
|
|
|
@@ -106,8 +106,8 @@ AI 根据问题性质判断回退目标,在 resume.md 记录理由:
|
|
|
106
106
|
|
|
107
107
|
```
|
|
108
108
|
project-root/
|
|
109
|
-
├──
|
|
110
|
-
└──
|
|
109
|
+
├── dev-crew.yaml ← 项目配置(入库)
|
|
110
|
+
└── dev-crew/ ← 工作区(.gitignore 排除)
|
|
111
111
|
├── resume.md ← 状态快照(AI 维护)
|
|
112
112
|
├── blockers.md ← 问题与决策
|
|
113
113
|
├── changes/{name}/
|
|
@@ -137,9 +137,9 @@ YAML frontmatter(**source of truth**): `active_changes` 数组,每项含 `
|
|
|
137
137
|
格式: `## [STATUS] #N {标题}` + `**关联**: {变更名}` + `**问题**: {描述}`。
|
|
138
138
|
状态: `[OPEN]` / `[RESOLVED]` / `[CANCELLED]`。编号自增。已解决决策回写到关联文档。
|
|
139
139
|
|
|
140
|
-
###
|
|
140
|
+
### dev-crew.yaml(项目配置)
|
|
141
141
|
|
|
142
|
-
字段: `project.name`(必填)、`project.description`、`workflow.default_mode`(默认 standard)、`workflow.concurrent_changes`(默认 true)、`verify.test_command`(空=AI 审查)、`git.
|
|
142
|
+
字段: `project.name`(必填)、`project.description`、`workflow.default_mode`(默认 standard)、`workflow.concurrent_changes`(默认 true)、`verify.test_command`(空=AI 审查)、`git.ignore_dev_crew`(默认 true)、`specialists`(可选,字符串数组,激活领域专家)。
|
|
143
143
|
|
|
144
144
|
## 通信规则
|
|
145
145
|
|
|
@@ -159,7 +159,7 @@ YAML frontmatter(**source of truth**): `active_changes` 数组,每项含 `
|
|
|
159
159
|
|
|
160
160
|
## 会话恢复
|
|
161
161
|
|
|
162
|
-
**新会话启动时**: ① 检测 `
|
|
162
|
+
**新会话启动时**: ① 检测 `dev-crew/` 是否存在 → ② 读 resume.md YAML frontmatter 恢复状态 → ③ 读 blockers.md 检查用户决策 → ④ 继续中断的工作。
|
|
163
163
|
|
|
164
164
|
**兜底恢复**(resume.md 缺失): proposal.md 存在→至少完成 Plan;design.md 存在→至少完成 Design;有 git diff→已进入 Execute;模式从 proposal.md frontmatter 恢复。⚠️ 安全阀计数器重置为 0。
|
|
165
165
|
|