ironweave 1.1.0 → 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.
- package/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +18 -5
- package/README_CN.md +18 -5
- package/bin/cli.js +11 -4
- package/hooks/session-start +1 -1
- package/package.json +2 -1
- package/skills/requirement-qa/SKILL.md +144 -190
- package/skills-en/api-contract-design/SKILL.md +227 -0
- package/skills-en/api-contract-design/references/api-design-rules.md +106 -0
- package/skills-en/brainstorm/SKILL.md +272 -0
- package/skills-en/brainstorm/agents/architect.md +34 -0
- package/skills-en/brainstorm/agents/challenger.md +34 -0
- package/skills-en/brainstorm/agents/domain-expert.md +34 -0
- package/skills-en/brainstorm/agents/pragmatist.md +34 -0
- package/skills-en/brainstorm/agents/product-manager.md +34 -0
- package/skills-en/brainstorm/agents/ux-designer.md +34 -0
- package/skills-en/brainstorm/references/synthesis-rules.md +51 -0
- package/skills-en/code-scaffold/SKILL.md +313 -0
- package/skills-en/code-scaffold/references/scaffold-rules.md +131 -0
- package/skills-en/docs-output/SKILL.md +149 -0
- package/skills-en/docs-output/references/naming-rules.md +52 -0
- package/skills-en/docs-output/scripts/docs_manager.py +353 -0
- package/skills-en/engineering-principles/SKILL.md +133 -0
- package/skills-en/engineering-principles/references/anti-patterns.md +144 -0
- package/skills-en/engineering-principles/references/ddd-patterns.md +66 -0
- package/skills-en/engineering-principles/references/design-patterns.md +34 -0
- package/skills-en/engineering-principles/references/patterns-architecture.md +301 -0
- package/skills-en/engineering-principles/references/patterns-backend.md +77 -0
- package/skills-en/engineering-principles/references/patterns-classic.md +200 -0
- package/skills-en/engineering-principles/references/patterns-crosscut.md +67 -0
- package/skills-en/engineering-principles/references/patterns-frontend.md +27 -0
- package/skills-en/engineering-principles/references/patterns-module.md +95 -0
- package/skills-en/engineering-principles/references/patterns-small-scale.md +79 -0
- package/skills-en/engineering-principles/references/quality-checklist.md +76 -0
- package/skills-en/engineering-principles/references/solid-principles.md +46 -0
- package/skills-en/engineering-principles/references/tdd-workflow.md +60 -0
- package/skills-en/engineering-principles/scripts/principles_matcher.py +433 -0
- package/skills-en/error-handling-strategy/SKILL.md +300 -0
- package/skills-en/error-handling-strategy/references/error-handling-rules.md +91 -0
- package/skills-en/implementation-complexity-analysis/SKILL.md +193 -0
- package/skills-en/implementation-complexity-analysis/references/complexity-rules.md +126 -0
- package/skills-en/integration-test-design/SKILL.md +296 -0
- package/skills-en/integration-test-design/references/test-strategy-rules.md +90 -0
- package/skills-en/observability-design/SKILL.md +327 -0
- package/skills-en/observability-design/references/observability-rules.md +129 -0
- package/skills-en/orchestrator/SKILL.md +260 -0
- package/skills-en/orchestrator/references/deliver.md +112 -0
- package/skills-en/orchestrator/references/execute.md +313 -0
- package/skills-en/orchestrator/references/gates.md +252 -0
- package/skills-en/orchestrator/references/parallel.md +70 -0
- package/skills-en/orchestrator/references/route-a.md +135 -0
- package/skills-en/orchestrator/references/route-b.md +91 -0
- package/skills-en/orchestrator/references/route-c.md +65 -0
- package/skills-en/orchestrator/references/route-d.md +75 -0
- package/skills-en/orchestrator/references/scope-sizer.md +219 -0
- package/skills-en/performance-arch-design/SKILL.md +208 -0
- package/skills-en/performance-arch-design/references/performance-rules.md +95 -0
- package/skills-en/project-context/SKILL.md +104 -0
- package/skills-en/project-context/references/schema.md +97 -0
- package/skills-en/project-context/scripts/context_db.py +358 -0
- package/skills-en/requirement-qa/SKILL.md +241 -0
- package/skills-en/requirement-qa/references/completion-signals.md +42 -0
- package/skills-en/requirement-qa/references/option-rules.md +57 -0
- package/skills-en/requirement-qa/scripts/qa_session.py +223 -0
- package/skills-en/spec-writing/SKILL.md +96 -0
- package/skills-en/spec-writing/references/mermaid-guide.md +66 -0
- package/skills-en/spec-writing/references/test-matrix.md +73 -0
- package/skills-en/task-difficulty/SKILL.md +162 -0
- package/skills-en/task-difficulty/references/scoring-guide.md +123 -0
- package/skills-en/task-difficulty/scripts/difficulty_scorer.py +328 -0
- package/skills-en/tech-stack/SKILL.md +67 -0
- package/skills-en/tech-stack/references/tech-reference-tables.md +130 -0
- package/skills/skill-creator/LICENSE.txt +0 -202
- package/skills/skill-creator/SKILL.md +0 -485
- package/skills/skill-creator/agents/analyzer.md +0 -274
- package/skills/skill-creator/agents/comparator.md +0 -202
- package/skills/skill-creator/agents/grader.md +0 -223
- package/skills/skill-creator/assets/eval_review.html +0 -146
- package/skills/skill-creator/eval-viewer/generate_review.py +0 -471
- package/skills/skill-creator/eval-viewer/viewer.html +0 -1325
- package/skills/skill-creator/references/schemas.md +0 -430
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
- package/skills/skill-creator/scripts/generate_report.py +0 -326
- package/skills/skill-creator/scripts/improve_description.py +0 -247
- package/skills/skill-creator/scripts/package_skill.py +0 -136
- package/skills/skill-creator/scripts/quick_validate.py +0 -103
- package/skills/skill-creator/scripts/run_eval.py +0 -310
- package/skills/skill-creator/scripts/run_loop.py +0 -328
- package/skills/skill-creator/scripts/utils.py +0 -47
package/AGENTS.md
CHANGED
|
@@ -15,7 +15,7 @@ For any development task, start by reading the orchestrator skill. It will guide
|
|
|
15
15
|
|
|
16
16
|
All skills are in `skills/`. Each has a `SKILL.md` with YAML frontmatter (`name`, `description`).
|
|
17
17
|
|
|
18
|
-
Key skills: `orchestrator`, `requirement-qa`, `brainstorm`, `spec-writing`, `tech-stack`, `engineering-principles`, `api-contract-design`, `code-scaffold`, `error-handling-strategy`, `performance-arch-design`, `observability-design`, `integration-test-design`, `implementation-complexity-analysis`, `task-difficulty`, `project-context`, `docs-output
|
|
18
|
+
Key skills: `orchestrator`, `requirement-qa`, `brainstorm`, `spec-writing`, `tech-stack`, `engineering-principles`, `api-contract-design`, `code-scaffold`, `error-handling-strategy`, `performance-arch-design`, `observability-design`, `integration-test-design`, `implementation-complexity-analysis`, `task-difficulty`, `project-context`, `docs-output`.
|
|
19
19
|
|
|
20
20
|
## Contributing
|
|
21
21
|
|
package/CLAUDE.md
CHANGED
|
@@ -15,7 +15,7 @@ For any development task, start by reading the orchestrator skill. It will guide
|
|
|
15
15
|
|
|
16
16
|
All skills are in `skills/`. Each has a `SKILL.md` with YAML frontmatter (`name`, `description`).
|
|
17
17
|
|
|
18
|
-
Key skills: `orchestrator`, `requirement-qa`, `brainstorm`, `spec-writing`, `tech-stack`, `engineering-principles`, `api-contract-design`, `code-scaffold`, `error-handling-strategy`, `performance-arch-design`, `observability-design`, `integration-test-design`, `implementation-complexity-analysis`, `task-difficulty`, `project-context`, `docs-output
|
|
18
|
+
Key skills: `orchestrator`, `requirement-qa`, `brainstorm`, `spec-writing`, `tech-stack`, `engineering-principles`, `api-contract-design`, `code-scaffold`, `error-handling-strategy`, `performance-arch-design`, `observability-design`, `integration-test-design`, `implementation-complexity-analysis`, `task-difficulty`, `project-context`, `docs-output`.
|
|
19
19
|
|
|
20
20
|
## Contributing
|
|
21
21
|
|
package/README.md
CHANGED
|
@@ -95,16 +95,18 @@ User Request
|
|
|
95
95
|
- `task-difficulty` — Multi-dimensional difficulty scoring (1-10)
|
|
96
96
|
- `project-context` — Project structure awareness & cross-session persistence
|
|
97
97
|
- `docs-output` — Document output management (modular docs/ organization)
|
|
98
|
-
- `skill-creator` — Create, modify, and evaluate agent skills
|
|
99
98
|
|
|
100
99
|
## Installation
|
|
101
100
|
|
|
102
101
|
### Via skills.sh (Recommended)
|
|
103
102
|
|
|
104
103
|
```bash
|
|
105
|
-
# Install all skills
|
|
104
|
+
# Install all skills (Chinese, default)
|
|
106
105
|
npx skills add YuluoY/ironware
|
|
107
106
|
|
|
107
|
+
# Install English skills
|
|
108
|
+
npx skills add YuluoY/ironware --lang en
|
|
109
|
+
|
|
108
110
|
# Install specific skills
|
|
109
111
|
npx skills add YuluoY/ironware --skill orchestrator --skill brainstorm
|
|
110
112
|
|
|
@@ -112,6 +114,16 @@ npx skills add YuluoY/ironware --skill orchestrator --skill brainstorm
|
|
|
112
114
|
npx skills add YuluoY/ironware --list
|
|
113
115
|
```
|
|
114
116
|
|
|
117
|
+
Or via npm:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Install with Chinese skills (default)
|
|
121
|
+
npx ironweave init
|
|
122
|
+
|
|
123
|
+
# Install with English skills
|
|
124
|
+
npx ironweave init --lang en
|
|
125
|
+
```
|
|
126
|
+
|
|
115
127
|
Supports **40+ agents**: Claude Code, GitHub Copilot, Cursor, Codex, Windsurf, Cline, OpenCode, Gemini CLI, Trae, CodeBuddy, and more.
|
|
116
128
|
|
|
117
129
|
### Per-Agent Manual Installation
|
|
@@ -206,7 +218,7 @@ Copy the `skills/` directory into your project. Then add the following to your a
|
|
|
206
218
|
|
|
207
219
|
```
|
|
208
220
|
ironweave/
|
|
209
|
-
├── skills/
|
|
221
|
+
├── skills/ # Skills (Chinese)
|
|
210
222
|
│ ├── orchestrator/ # Flow orchestrator
|
|
211
223
|
│ │ ├── SKILL.md # Orchestrator logic
|
|
212
224
|
│ │ └── references/ # Methodology docs
|
|
@@ -214,7 +226,8 @@ ironweave/
|
|
|
214
226
|
│ ├── spec-writing/
|
|
215
227
|
│ ├── code-scaffold/
|
|
216
228
|
│ ├── ... # 16 more skills
|
|
217
|
-
│ └──
|
|
229
|
+
│ └── docs-output/
|
|
230
|
+
├── skills-en/ # Skills (English)
|
|
218
231
|
├── CLAUDE.md # Claude Code instructions
|
|
219
232
|
├── AGENTS.md # Codex instructions
|
|
220
233
|
├── GEMINI.md # Gemini CLI instructions
|
|
@@ -243,7 +256,7 @@ ironweave/
|
|
|
243
256
|
|
|
244
257
|
## Contributing
|
|
245
258
|
|
|
246
|
-
See [CONTRIBUTING.md](./CONTRIBUTING.md). Skills live directly in this repository.
|
|
259
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md). Skills live directly in this repository.
|
|
247
260
|
|
|
248
261
|
## License
|
|
249
262
|
|
package/README_CN.md
CHANGED
|
@@ -93,16 +93,18 @@ Ironweave 是一套完整的软件开发工作流,由一组可自由组合的
|
|
|
93
93
|
- `task-difficulty` — 多维度难度评分(1-10)
|
|
94
94
|
- `project-context` — 项目结构感知与跨会话持久化
|
|
95
95
|
- `docs-output` — 文档产出管理(模块化 docs/ 组织)
|
|
96
|
-
- `skill-creator` — 创建、修改、评测 Agent Skills
|
|
97
96
|
|
|
98
97
|
## 安装
|
|
99
98
|
|
|
100
99
|
### 通过 skills.sh(推荐)
|
|
101
100
|
|
|
102
101
|
```bash
|
|
103
|
-
#
|
|
102
|
+
# 安装全部技能(中文,默认)
|
|
104
103
|
npx skills add YuluoY/ironware
|
|
105
104
|
|
|
105
|
+
# 安装英文版技能
|
|
106
|
+
npx skills add YuluoY/ironware --lang en
|
|
107
|
+
|
|
106
108
|
# 安装指定技能
|
|
107
109
|
npx skills add YuluoY/ironware --skill orchestrator --skill brainstorm
|
|
108
110
|
|
|
@@ -110,6 +112,16 @@ npx skills add YuluoY/ironware --skill orchestrator --skill brainstorm
|
|
|
110
112
|
npx skills add YuluoY/ironware --list
|
|
111
113
|
```
|
|
112
114
|
|
|
115
|
+
或通过 npm 安装:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# 安装中文技能(默认)
|
|
119
|
+
npx ironweave init
|
|
120
|
+
|
|
121
|
+
# 安装英文版技能
|
|
122
|
+
npx ironweave init --lang en
|
|
123
|
+
```
|
|
124
|
+
|
|
113
125
|
支持 **40+ 个 Agent**:Claude Code、GitHub Copilot、Cursor、Codex、Windsurf、Cline、OpenCode、Gemini CLI、Trae、CodeBuddy 等。
|
|
114
126
|
|
|
115
127
|
### 各 Agent 手动安装
|
|
@@ -204,7 +216,7 @@ git clone https://github.com/YuluoY/ironware.git
|
|
|
204
216
|
|
|
205
217
|
```
|
|
206
218
|
ironweave/
|
|
207
|
-
├── skills/
|
|
219
|
+
├── skills/ # 技能(中文)
|
|
208
220
|
│ ├── orchestrator/ # 流程编排器
|
|
209
221
|
│ │ ├── SKILL.md # 编排器逻辑
|
|
210
222
|
│ │ └── references/ # 方法论文档
|
|
@@ -212,7 +224,8 @@ ironweave/
|
|
|
212
224
|
│ ├── spec-writing/
|
|
213
225
|
│ ├── code-scaffold/
|
|
214
226
|
│ ├── ... # 另外 16 个技能
|
|
215
|
-
│ └──
|
|
227
|
+
│ └── docs-output/
|
|
228
|
+
├── skills-en/ # 技能(英文)
|
|
216
229
|
├── CLAUDE.md # Claude Code 指令
|
|
217
230
|
├── AGENTS.md # Codex 指令
|
|
218
231
|
├── GEMINI.md # Gemini CLI 指令
|
|
@@ -241,7 +254,7 @@ ironweave/
|
|
|
241
254
|
|
|
242
255
|
## 贡献
|
|
243
256
|
|
|
244
|
-
请参阅 [CONTRIBUTING.md](./CONTRIBUTING.md)
|
|
257
|
+
请参阅 [CONTRIBUTING.md](./CONTRIBUTING.md)。技能直接存放在本仓库中。
|
|
245
258
|
|
|
246
259
|
## 许可证
|
|
247
260
|
|
package/bin/cli.js
CHANGED
|
@@ -18,6 +18,7 @@ Options:
|
|
|
18
18
|
--agent <name> Only install config for specific agent
|
|
19
19
|
(claude, copilot, cursor, windsurf, cline, codex, gemini, all)
|
|
20
20
|
Default: all
|
|
21
|
+
--lang <lang> Language for skills: zh (Chinese, default) or en (English)
|
|
21
22
|
--skills-only Only copy skills/, skip agent config files
|
|
22
23
|
--force Overwrite existing files (default: skip existing)
|
|
23
24
|
--help Show this help message
|
|
@@ -26,11 +27,14 @@ Options:
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
if (command === 'list') {
|
|
29
|
-
const
|
|
30
|
+
const langIdx = args.indexOf('--lang');
|
|
31
|
+
const listLang = langIdx !== -1 ? args[langIdx + 1] : 'zh';
|
|
32
|
+
const skillsSrc = listLang === 'en' ? 'skills-en' : 'skills';
|
|
33
|
+
const skillsDir = path.join(__dirname, '..', skillsSrc);
|
|
30
34
|
const skills = fs.readdirSync(skillsDir).filter(f => {
|
|
31
35
|
return fs.statSync(path.join(skillsDir, f)).isDirectory();
|
|
32
36
|
});
|
|
33
|
-
console.log(`\nIronweave Skills (${skills.length}):\n`);
|
|
37
|
+
console.log(`\nIronweave Skills [${listLang}] (${skills.length}):\n`);
|
|
34
38
|
skills.forEach(s => console.log(` - ${s}`));
|
|
35
39
|
console.log('');
|
|
36
40
|
process.exit(0);
|
|
@@ -42,14 +46,17 @@ if (command === 'init') {
|
|
|
42
46
|
|
|
43
47
|
const agentFlag = args.indexOf('--agent');
|
|
44
48
|
const agent = agentFlag !== -1 ? args[agentFlag + 1] : 'all';
|
|
49
|
+
const langFlag = args.indexOf('--lang');
|
|
50
|
+
const lang = langFlag !== -1 ? args[langFlag + 1] : 'zh';
|
|
45
51
|
const skillsOnly = args.includes('--skills-only');
|
|
46
52
|
const force = args.includes('--force');
|
|
47
53
|
|
|
48
54
|
// Copy skills/ and hooks/
|
|
49
|
-
const
|
|
55
|
+
const skillsSrc = lang === 'en' ? 'skills-en' : 'skills';
|
|
56
|
+
const srcSkills = path.join(pkgDir, skillsSrc);
|
|
50
57
|
const dstSkills = path.join(targetDir, 'skills');
|
|
51
58
|
copyDirRecursive(srcSkills, dstSkills, force);
|
|
52
|
-
console.log(
|
|
59
|
+
console.log(`✓ skills/ copied (${lang === 'en' ? 'English' : 'Chinese'})`);
|
|
53
60
|
|
|
54
61
|
const srcHooks = path.join(pkgDir, 'hooks');
|
|
55
62
|
const dstHooks = path.join(targetDir, 'hooks');
|
package/hooks/session-start
CHANGED
|
@@ -22,7 +22,7 @@ escape_for_json() {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
orchestrator_escaped=$(escape_for_json "$orchestrator_content")
|
|
25
|
-
session_context="<IMPORTANT>\nYou have Ironweave skills.\n\nIronweave is a complete software development workflow with built-in quality gates. The orchestrator skill is your main entry point — it auto-senses context, scores difficulty, selects the right route, and runs Plan > Execute > Validate > Deliver.\n\nAll skills are in the skills/ directory, each with a SKILL.md. For any development task, start by reading skills/orchestrator/SKILL.md.\n\nKey skills: orchestrator, requirement-qa, brainstorm, spec-writing, tech-stack, engineering-principles, api-contract-design, code-scaffold, error-handling-strategy, performance-arch-design, observability-design, integration-test-design, implementation-complexity-analysis, task-difficulty, project-context, docs-output
|
|
25
|
+
session_context="<IMPORTANT>\nYou have Ironweave skills.\n\nIronweave is a complete software development workflow with built-in quality gates. The orchestrator skill is your main entry point — it auto-senses context, scores difficulty, selects the right route, and runs Plan > Execute > Validate > Deliver.\n\nAll skills are in the skills/ directory, each with a SKILL.md. For any development task, start by reading skills/orchestrator/SKILL.md.\n\nKey skills: orchestrator, requirement-qa, brainstorm, spec-writing, tech-stack, engineering-principles, api-contract-design, code-scaffold, error-handling-strategy, performance-arch-design, observability-design, integration-test-design, implementation-complexity-analysis, task-difficulty, project-context, docs-output.\n</IMPORTANT>"
|
|
26
26
|
|
|
27
27
|
# Output context injection as JSON.
|
|
28
28
|
# Cursor hooks expect additional_context (snake_case).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ironweave",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Agentic skills framework for AI coding agents — orchestrated workflows with adaptive routing, quality gates, and 17 composable skills.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"skills/",
|
|
35
|
+
"skills-en/",
|
|
35
36
|
"hooks/",
|
|
36
37
|
"bin/",
|
|
37
38
|
"CLAUDE.md",
|
|
@@ -1,27 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: requirement-qa
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
4
|
+
通过"方向定调 → 增量产出 → 用户 Review → 确认修正"的循环,帮助用户从模糊想法走向完整需求。不同于纯问答模式,本 skill 每轮都产出可 Review 的文档片段到 docs/01-requirement/,用户只需判断"对不对"而非从零表达需求。
|
|
5
5
|
务必在以下场景使用本 skill:用户的需求描述模糊或不完整(如"我想做一个 XX 系统")、用户不确定技术方案该怎么选、用户要求进行需求分析、需求调研、需求访谈、需求梳理、需求沟通、技术方案讨论、架构讨论,或者用户说"帮我想想还缺什么"、"帮我理一下需求"、"我们聊聊这个项目"。当输入信息不足以直接输出完整文档时,应先进入本 skill 的 QA 流程,而不是凭猜测交付半成品。
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 需求引导对话(Requirement QA)
|
|
9
9
|
|
|
10
|
-
本 Skill
|
|
10
|
+
本 Skill 通过**增量产出 + 用户 Review** 的循环,帮助用户从模糊想法走向明确、完整、可落地的需求描述。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**核心理念**:用户不需要"说清楚需求",只需要判断"Agent 产出的内容对不对"。把信息质量的压力从用户转移到 Agent,用户的角色从"回答者"变成"审核者"。
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## 产出目标
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
- "还有哪些用户角色会用到这个功能?"
|
|
18
|
-
- "如果不做这个限制,会发生什么?"
|
|
19
|
-
- "有没有类似的产品可以参考?"
|
|
16
|
+
每轮 QA 循环直接产出或更新 `docs/01-requirement/` 下的模块化文件:
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
```
|
|
19
|
+
docs/01-requirement/
|
|
20
|
+
├── project-profile.md ← 项目画像(定位、用户、目标)
|
|
21
|
+
├── feature-scope.md ← 功能范围(功能列表 + MoSCoW 优先级)
|
|
22
|
+
├── business-rules.md ← 业务规则(核心规则 + 边界条件)
|
|
23
|
+
├── non-functional.md ← 非功能要求(性能、安全、合规)
|
|
24
|
+
└── tech-constraints.md ← 技术约束(技术栈、部署、集成)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
这些文件是 `spec-writing` 等后续 skill 的输入。requirement-qa 解决 **What**(做什么),spec-writing 解决 **How**(怎么做到)。
|
|
28
|
+
|
|
29
|
+
## 核心循环:产出 → Review → 修正
|
|
30
|
+
|
|
31
|
+
每个模块的处理都遵循同一个三步循环:
|
|
32
|
+
|
|
33
|
+
### Step 1:用户定方向
|
|
34
|
+
|
|
35
|
+
用户给出高层级方向或已有信息,可以很简短:
|
|
36
|
+
- "我想做一个在线教育平台"
|
|
37
|
+
- "给内部团队用的项目管理工具"
|
|
38
|
+
- 甚至只是"帮我想想这个系统还缺什么"
|
|
39
|
+
|
|
40
|
+
Agent 基于已有信息(用户输入 + 仓库工程事实),推断尽可能多的细节。
|
|
41
|
+
|
|
42
|
+
### Step 2:Agent 产出 + 推荐选项
|
|
43
|
+
|
|
44
|
+
Agent 做两件事:
|
|
45
|
+
|
|
46
|
+
1. **直接产出文档片段**:把能推断的内容写成结构化文档,创建或更新到 `docs/01-requirement/` 对应文件
|
|
47
|
+
2. **对不确定的点给出推荐选项**:遵循选项规则(2-5 个选项,标记一个推荐项,最后一个为自由输入)
|
|
48
|
+
|
|
49
|
+
关键:**先产出再提问**。不要空手来问"你想做什么"——先基于已知信息写一版草稿,再针对草稿中不确定的点提问。
|
|
50
|
+
|
|
51
|
+
### Step 3:用户 Review + 确认
|
|
52
|
+
|
|
53
|
+
用户看到的是一个**可 Review 的文档**,不是一堆问题。用户可以:
|
|
54
|
+
- 确认:"对,就是这样"→ Agent 进入下一个模块
|
|
55
|
+
- 标注修正:"角色描述不对,应该是 XX"→ Agent 更新文件
|
|
56
|
+
- 补充信息:"还有一个场景你漏了"→ Agent 补充到文件
|
|
57
|
+
|
|
58
|
+
Agent 确认用户 Review 结果后,**原地更新**文件(不删除重建),然后进入下一个模块或更深层的追问。
|
|
25
59
|
|
|
26
60
|
## 交互方式:优先使用结构化选项
|
|
27
61
|
|
|
@@ -33,10 +67,15 @@ description: >-
|
|
|
33
67
|
|
|
34
68
|
详细的选项设计规则、推荐项标记规则、宿主适配方式见 [references/option-rules.md](references/option-rules.md)。
|
|
35
69
|
|
|
36
|
-
每轮对话结束时做一次**小结确认**,确保双方理解一致后再进入下一个话题。
|
|
37
|
-
|
|
38
70
|
## 提问节奏控制
|
|
39
71
|
|
|
72
|
+
### 先产出再提问
|
|
73
|
+
|
|
74
|
+
每轮的核心产出是**文档片段**,问题只是文档中不确定点的澄清。比起"问 5 个问题等回答",更好的做法是:
|
|
75
|
+
- 写一版草稿(80% 推断 + 20% 待确认)
|
|
76
|
+
- 在草稿中用 `<!-- 待确认 -->` 或 **加粗标注** 标记不确定点
|
|
77
|
+
- 针对最关键的 1-3 个不确定点提问
|
|
78
|
+
|
|
40
79
|
### 按需产生问题
|
|
41
80
|
|
|
42
81
|
每轮问多少个问题取决于当前实际需要澄清的未知项:
|
|
@@ -58,230 +97,145 @@ description: >-
|
|
|
58
97
|
|
|
59
98
|
### 从工程事实出发
|
|
60
99
|
|
|
61
|
-
如果当前仓库已经是 Vue 3 项目,不要问"你想用 React 还是 Vue?"
|
|
62
|
-
|
|
63
|
-
## 状态跟踪
|
|
100
|
+
如果当前仓库已经是 Vue 3 项目,不要问"你想用 React 还是 Vue?"——先读事实,直接写入 tech-constraints.md,再问真正未知的东西。
|
|
64
101
|
|
|
65
|
-
|
|
102
|
+
## 模块推进流程
|
|
66
103
|
|
|
67
|
-
|
|
68
|
-
- **草稿产出**(draft output):如果此刻就要产出,能交付什么雏形
|
|
104
|
+
### 模块 1:项目画像(project-profile.md)
|
|
69
105
|
|
|
70
|
-
|
|
106
|
+
**产出内容**:项目定位、目标用户角色及核心诉求、核心痛点、成功标准、时间约束。
|
|
71
107
|
|
|
72
|
-
|
|
108
|
+
**Agent 的做法**:
|
|
109
|
+
1. 读取用户输入 + 扫描仓库(README、package.json、已有文档等)
|
|
110
|
+
2. 基于已知信息,**直接写出** `project-profile.md` 草稿
|
|
111
|
+
3. 对不确定的点提问(如目标用户角色、成功标准)
|
|
112
|
+
4. 用户 Review → 更新文件 → 确认后进入下一模块
|
|
73
113
|
|
|
74
|
-
|
|
114
|
+
**产出模板**:
|
|
75
115
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
**需求方向的核心问题:**
|
|
79
|
-
- 这个产品/功能是给谁用的?(目标用户角色)
|
|
80
|
-
- 它要解决什么问题?(核心痛点)
|
|
81
|
-
- 用户目前是怎么解决这个问题的?(现状与替代方案)
|
|
82
|
-
- 成功的标准是什么?(可量化的业务目标)
|
|
83
|
-
- 项目的时间约束?(MVP 期限、里程碑)
|
|
84
|
-
|
|
85
|
-
**技术方向的核心问题:**
|
|
86
|
-
- 团队技术栈现状?(已有项目用了什么、团队熟悉什么)
|
|
87
|
-
- 有没有已定的技术约束?(如必须用内网部署、必须兼容 IE)
|
|
88
|
-
- 预期用户规模?(影响架构选择和性能设计)
|
|
89
|
-
- 部署环境?(云 / 私有化 / 混合)
|
|
90
|
-
- 预算和人力限制?
|
|
116
|
+
```markdown
|
|
117
|
+
# 项目画像:{项目名称}
|
|
91
118
|
|
|
92
|
-
|
|
119
|
+
## 项目定位
|
|
120
|
+
{一两句话描述这个产品解决什么问题}
|
|
93
121
|
|
|
94
|
-
|
|
122
|
+
## 目标用户
|
|
123
|
+
| 角色 | 核心诉求 | 使用频率 |
|
|
124
|
+
|------|----------|----------|
|
|
125
|
+
| ... | ... | ... |
|
|
95
126
|
|
|
96
|
-
|
|
127
|
+
## 核心痛点
|
|
128
|
+
- 用户目前怎么解决这个问题
|
|
129
|
+
- 现有方案的主要不满
|
|
97
130
|
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
- **场景维度**:正常流程之外,异常情况怎么处理?批量操作?并发场景?
|
|
101
|
-
- **数据维度**:需要哪些数据输入输出?数据量级?数据生命周期?
|
|
102
|
-
- **集成维度**:需要与哪些外部系统对接?认证方式?数据格式?
|
|
103
|
-
- **非功能维度**:性能要求?安全合规要求?可用性要求?
|
|
131
|
+
## 成功标准
|
|
132
|
+
- {可量化的业务目标}
|
|
104
133
|
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
|
|
134
|
+
## 时间约束
|
|
135
|
+
- MVP 期限:
|
|
136
|
+
- 关键里程碑:
|
|
137
|
+
```
|
|
109
138
|
|
|
110
|
-
###
|
|
139
|
+
### 模块 2:功能范围(feature-scope.md)
|
|
111
140
|
|
|
112
|
-
|
|
141
|
+
**产出内容**:功能列表(按 MoSCoW 分类),每个功能附简要验收标准。
|
|
113
142
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
143
|
+
**Agent 的做法**:
|
|
144
|
+
1. 基于项目画像,**主动推断**可能的功能列表
|
|
145
|
+
2. 写出 `feature-scope.md` 草稿,按 MoSCoW 分类
|
|
146
|
+
3. 提问:"以下功能列表是否完整?优先级是否正确?"
|
|
147
|
+
4. 用户 Review → 增删改 → 更新文件
|
|
119
148
|
|
|
120
|
-
|
|
149
|
+
**产出模板**:
|
|
121
150
|
|
|
122
|
-
|
|
151
|
+
```markdown
|
|
152
|
+
# 功能范围:{项目名称}
|
|
123
153
|
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
- 让用户做选择,记录选择理由
|
|
128
|
-
- 标注"待验证"的技术风险点
|
|
154
|
+
## Must(MVP 必做)
|
|
155
|
+
- [ ] {功能点} — 验收标准:{简述}
|
|
156
|
+
- [ ] ...
|
|
129
157
|
|
|
130
|
-
|
|
158
|
+
## Should(重要但可延后)
|
|
159
|
+
- [ ] ...
|
|
131
160
|
|
|
132
|
-
|
|
161
|
+
## Could(锦上添花)
|
|
162
|
+
- [ ] ...
|
|
133
163
|
|
|
134
|
-
|
|
135
|
-
- [ ]
|
|
136
|
-
- [ ] 核心业务流程已明确
|
|
137
|
-
- [ ] 异常和边界场景已讨论
|
|
138
|
-
- [ ] 优先级已排定(MoSCoW)
|
|
139
|
-
- [ ] 验收标准已定义(至少 Must 项)
|
|
140
|
-
- [ ] 技术约束已记录(如有)
|
|
141
|
-
- [ ] 明确"本期不做"的边界
|
|
142
|
-
- [ ] 与外部系统的集成点已识别
|
|
164
|
+
## Won't(明确不做)
|
|
165
|
+
- [ ] ...
|
|
143
166
|
|
|
144
|
-
##
|
|
167
|
+
## 功能依赖关系
|
|
168
|
+
- {功能 A} 依赖 {功能 B}
|
|
169
|
+
```
|
|
145
170
|
|
|
146
|
-
###
|
|
171
|
+
### 模块 3:业务规则(business-rules.md)
|
|
147
172
|
|
|
148
|
-
|
|
149
|
-
- **话少的用户**:提供具体选项而非开放式问题,"你需要的是 A 还是 B?";用是/否问题确认
|
|
150
|
-
- **犹豫不决的用户**:给出推荐方案 + 理由,"根据你描述的场景,我建议先做 X,原因是……"
|
|
151
|
-
- **过于发散的用户**:温和拉回,"这个想法很好,我先记下来。我们先把核心流程确认完?"
|
|
173
|
+
**产出内容**:核心业务规则、边界条件、异常处理策略。
|
|
152
174
|
|
|
153
|
-
|
|
175
|
+
**Agent 的做法**:
|
|
176
|
+
1. 从功能范围中提取隐含的业务规则
|
|
177
|
+
2. **主动推断**常见的边界条件和异常场景
|
|
178
|
+
3. 写出 `business-rules.md`,标注哪些是推断的
|
|
179
|
+
4. 用户 Review → 修正/补充 → 更新文件
|
|
154
180
|
|
|
155
|
-
|
|
181
|
+
### 模块 4:非功能要求(non-functional.md)
|
|
156
182
|
|
|
157
|
-
|
|
158
|
-
【小结确认】
|
|
159
|
-
话题:用户登录
|
|
160
|
-
已确认:
|
|
161
|
-
- 支持手机号+验证码、邮箱+密码两种方式
|
|
162
|
-
- 暂不做第三方登录(微信、GitHub)
|
|
163
|
-
- 登录失败 5 次锁定 30 分钟
|
|
164
|
-
待确认:
|
|
165
|
-
- 验证码有效期(建议 5 分钟,待确认)
|
|
166
|
-
- 是否需要"记住我"功能
|
|
167
|
-
```
|
|
183
|
+
**产出内容**:性能、安全、可用性、合规等要求。
|
|
168
184
|
|
|
169
|
-
|
|
185
|
+
**Agent 的做法**:
|
|
186
|
+
1. 根据项目类型和用户规模,**主动推断**合理的非功能指标
|
|
187
|
+
2. 写出 `non-functional.md`,给出推荐值
|
|
188
|
+
3. 提问:重点确认性能指标和安全合规要求
|
|
189
|
+
4. 用户 Review → 更新文件
|
|
170
190
|
|
|
171
|
-
|
|
191
|
+
### 模块 5:技术约束(tech-constraints.md)(如涉及技术选型)
|
|
172
192
|
|
|
173
|
-
|
|
193
|
+
**产出内容**:技术栈、部署环境、集成点、团队约束。
|
|
174
194
|
|
|
175
|
-
|
|
176
|
-
|
|
195
|
+
**Agent 的做法**:
|
|
196
|
+
1. 扫描仓库获取已有技术栈信息
|
|
197
|
+
2. **直接写入**已确定的事实(不问已经能从代码里看到的东西)
|
|
198
|
+
3. 对需要决策的点给出对比表 + 推荐
|
|
199
|
+
4. 用户 Review → 更新文件
|
|
177
200
|
|
|
178
|
-
##
|
|
179
|
-
[一两句话描述]
|
|
201
|
+
## 对话技巧
|
|
180
202
|
|
|
181
|
-
|
|
182
|
-
| 角色 | 核心诉求 |
|
|
183
|
-
|------|----------|
|
|
184
|
-
| ... | ... |
|
|
185
|
-
|
|
186
|
-
## 功能范围(MoSCoW)
|
|
187
|
-
### Must(MVP 必做)
|
|
188
|
-
- [ ] 功能点 + 验收标准简述
|
|
189
|
-
### Should(重要但可延后)
|
|
190
|
-
- [ ] ...
|
|
191
|
-
### Could(锦上添花)
|
|
192
|
-
- [ ] ...
|
|
193
|
-
### Won't(明确不做)
|
|
194
|
-
- [ ] ...
|
|
203
|
+
### 应对不同类型的用户
|
|
195
204
|
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
205
|
+
- **话多的用户**:适时做文档更新,让用户看到信息被结构化了;避免信息在聊天中散落
|
|
206
|
+
- **话少的用户**:多产出、少提问;写出更完整的草稿,让用户只需确认"对/不对"
|
|
207
|
+
- **犹豫不决的用户**:给出推荐方案 + 理由,"根据你描述的场景,我建议先做 X,原因是……"
|
|
208
|
+
- **过于发散的用户**:先记录到文档的 Could/Won't 区域,温和拉回核心流程
|
|
199
209
|
|
|
200
|
-
|
|
201
|
-
- 性能:...
|
|
202
|
-
- 安全:...
|
|
210
|
+
### Review 确认模板
|
|
203
211
|
|
|
204
|
-
|
|
205
|
-
- [ ] ...
|
|
212
|
+
每完成一个模块的文档更新后:
|
|
206
213
|
|
|
207
|
-
## 技术约束(如有)
|
|
208
|
-
- ...
|
|
209
214
|
```
|
|
215
|
+
已更新 docs/01-requirement/project-profile.md
|
|
210
216
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
# 技术决策摘要:[项目名称]
|
|
215
|
-
|
|
216
|
-
## 项目约束
|
|
217
|
-
- 团队规模:...
|
|
218
|
-
- 时间线:...
|
|
219
|
-
- 部署环境:...
|
|
220
|
-
|
|
221
|
-
## 已定决策
|
|
222
|
-
| 决策点 | 选择 | 理由 |
|
|
223
|
-
|--------|------|------|
|
|
224
|
-
| ... | ... | ... |
|
|
225
|
-
|
|
226
|
-
## 待验证风险
|
|
227
|
-
- [ ] ...
|
|
217
|
+
待确认点:
|
|
218
|
+
1. 目标用户是否只有"学生"和"教师"两个角色?
|
|
219
|
+
2. 成功标准中"日活 1000"是否合理?
|
|
228
220
|
|
|
229
|
-
|
|
230
|
-
- Node.js: ...
|
|
231
|
-
- pnpm: ...
|
|
221
|
+
请 Review 文件内容,告诉我哪里需要修正。确认后我进入下一模块(功能范围)。
|
|
232
222
|
```
|
|
233
223
|
|
|
234
224
|
## 执行方式
|
|
235
225
|
|
|
236
226
|
1. **判断进入条件**:用户的输入信息不足以直接输出完整文档时,进入 QA 流程
|
|
237
|
-
2.
|
|
238
|
-
3.
|
|
239
|
-
4.
|
|
240
|
-
5.
|
|
227
|
+
2. **从项目画像开始**:无论信息多少,先产出 project-profile.md 草稿
|
|
228
|
+
3. **按模块推进**:每个模块走"产出 → Review → 修正"循环;信息够了就跳过某些模块
|
|
229
|
+
4. **原地更新**:每次修正都更新同一个文件,不创建新文件
|
|
230
|
+
5. **适时退出**:当所有 Must 模块完成 Review,用户表示满意时,输出完成总结
|
|
231
|
+
6. **衔接后续**:提示用户可以用 `docs/01-requirement/` 的产出进入 spec-writing 生成详细需求文档
|
|
241
232
|
|
|
242
233
|
## 完成信号
|
|
243
234
|
|
|
244
|
-
默认只有以下情况可以结束 QA
|
|
235
|
+
默认只有以下情况可以结束 QA:
|
|
245
236
|
- 用户明确说"开始产出""可以写文档了""按这个做"等
|
|
246
|
-
-
|
|
237
|
+
- project-profile.md 和 feature-scope.md 至少已完成 Review
|
|
247
238
|
|
|
248
|
-
如果用户说"继续问""先别开始"
|
|
239
|
+
如果用户说"继续问""先别开始",优先视为继续澄清。即使用户要求立即结束但信息不完整,在文档中**显式列出假设**,标注为"未经用户确认,基于推断"。
|
|
249
240
|
|
|
250
241
|
完整的信号列表和最低结束标准见 [references/completion-signals.md](references/completion-signals.md)。
|
|
251
|
-
|
|
252
|
-
## 文档持久化
|
|
253
|
-
|
|
254
|
-
每轮问答应落盘到 Markdown 文件,不依赖模型记忆。使用 `scripts/qa_session.py` 管理会话文档:
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
# 开始新会话
|
|
258
|
-
python3 skills/requirement-qa/scripts/qa_session.py start \
|
|
259
|
-
--topic "用户登录功能" \
|
|
260
|
-
--initial-request "我要做一个登录功能"
|
|
261
|
-
|
|
262
|
-
# 记录每轮问答
|
|
263
|
-
python3 skills/requirement-qa/scripts/qa_session.py append-turn \
|
|
264
|
-
--doc-path "<doc_path>" \
|
|
265
|
-
--question "支持哪些登录方式?" \
|
|
266
|
-
--answer "手机号+验证码、邮箱+密码" \
|
|
267
|
-
--confirmed "支持手机号+验证码" \
|
|
268
|
-
--confirmed "支持邮箱+密码" \
|
|
269
|
-
--open-item "是否需要第三方登录" \
|
|
270
|
-
--current-understanding "核心登录方式已确认"
|
|
271
|
-
|
|
272
|
-
# 结束会话
|
|
273
|
-
python3 skills/requirement-qa/scripts/qa_session.py finalize \
|
|
274
|
-
--doc-path "<doc_path>" \
|
|
275
|
-
--final-summary "登录功能需求已收敛" \
|
|
276
|
-
--deliverable "需求摘要文档"
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
文档存放在 `docs/qa/` 目录下,每个会话一个文件。
|
|
280
|
-
|
|
281
|
-
## 资源
|
|
282
|
-
|
|
283
|
-
| 路径 | 说明 |
|
|
284
|
-
|------|------|
|
|
285
|
-
| `references/option-rules.md` | 选项设计规则、推荐项标记规则、宿主适配方式 |
|
|
286
|
-
| `references/completion-signals.md` | 完成信号列表、继续意图保护、最低结束标准 |
|
|
287
|
-
| `scripts/qa_session.py` | QA 会话文档的创建、追加、结束 |
|