ironweave 1.0.1 → 1.1.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/.claude-plugin/plugin.json +2 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/AGENTS.md +22 -1
- package/CLAUDE.md +1 -1
- package/README.md +18 -5
- package/README_CN.md +18 -5
- package/bin/cli.js +27 -12
- package/gemini-extension.json +6 -0
- package/hooks/hooks-cursor.json +10 -0
- package/hooks/hooks.json +16 -0
- package/hooks/run-hook.cmd +5 -0
- package/hooks/session-start +39 -0
- package/package.json +4 -1
- 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 +287 -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
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
# Ironweave
|
|
2
|
+
|
|
3
|
+
You have access to the Ironweave skills library — a complete software development workflow with built-in quality gates.
|
|
4
|
+
|
|
5
|
+
## How to use
|
|
6
|
+
|
|
7
|
+
The **orchestrator** skill (`skills/orchestrator/SKILL.md`) is the main entry point. It automatically:
|
|
8
|
+
- Senses project context and scores task difficulty
|
|
9
|
+
- Selects the right route (new project / new feature / bug fix / refactoring)
|
|
10
|
+
- Runs Plan → Execute → Validate → Deliver with quality gates per slice
|
|
11
|
+
|
|
12
|
+
For any development task, start by reading the orchestrator skill. It will guide which other skills to invoke.
|
|
13
|
+
|
|
14
|
+
## Skills available
|
|
15
|
+
|
|
16
|
+
All skills are in `skills/`. Each has a `SKILL.md` with YAML frontmatter (`name`, `description`).
|
|
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`.
|
|
19
|
+
|
|
20
|
+
## Contributing
|
|
21
|
+
|
|
22
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
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,18 +18,23 @@ 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
|
|
23
|
+
--force Overwrite existing files (default: skip existing)
|
|
22
24
|
--help Show this help message
|
|
23
25
|
`);
|
|
24
26
|
process.exit(0);
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
if (command === 'list') {
|
|
28
|
-
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);
|
|
29
34
|
const skills = fs.readdirSync(skillsDir).filter(f => {
|
|
30
35
|
return fs.statSync(path.join(skillsDir, f)).isDirectory();
|
|
31
36
|
});
|
|
32
|
-
console.log(`\nIronweave Skills (${skills.length}):\n`);
|
|
37
|
+
console.log(`\nIronweave Skills [${listLang}] (${skills.length}):\n`);
|
|
33
38
|
skills.forEach(s => console.log(` - ${s}`));
|
|
34
39
|
console.log('');
|
|
35
40
|
process.exit(0);
|
|
@@ -41,13 +46,22 @@ if (command === 'init') {
|
|
|
41
46
|
|
|
42
47
|
const agentFlag = args.indexOf('--agent');
|
|
43
48
|
const agent = agentFlag !== -1 ? args[agentFlag + 1] : 'all';
|
|
49
|
+
const langFlag = args.indexOf('--lang');
|
|
50
|
+
const lang = langFlag !== -1 ? args[langFlag + 1] : 'zh';
|
|
44
51
|
const skillsOnly = args.includes('--skills-only');
|
|
52
|
+
const force = args.includes('--force');
|
|
45
53
|
|
|
46
|
-
// Copy skills/
|
|
47
|
-
const
|
|
54
|
+
// Copy skills/ and hooks/
|
|
55
|
+
const skillsSrc = lang === 'en' ? 'skills-en' : 'skills';
|
|
56
|
+
const srcSkills = path.join(pkgDir, skillsSrc);
|
|
48
57
|
const dstSkills = path.join(targetDir, 'skills');
|
|
49
|
-
copyDirRecursive(srcSkills, dstSkills);
|
|
50
|
-
console.log(
|
|
58
|
+
copyDirRecursive(srcSkills, dstSkills, force);
|
|
59
|
+
console.log(`✓ skills/ copied (${lang === 'en' ? 'English' : 'Chinese'})`);
|
|
60
|
+
|
|
61
|
+
const srcHooks = path.join(pkgDir, 'hooks');
|
|
62
|
+
const dstHooks = path.join(targetDir, 'hooks');
|
|
63
|
+
copyDirRecursive(srcHooks, dstHooks, force);
|
|
64
|
+
console.log('✓ hooks/ copied');
|
|
51
65
|
|
|
52
66
|
if (!skillsOnly) {
|
|
53
67
|
const agentFiles = {
|
|
@@ -73,7 +87,8 @@ if (command === 'init') {
|
|
|
73
87
|
{ src: '.codex', dst: '.codex', dir: true }
|
|
74
88
|
],
|
|
75
89
|
gemini: [
|
|
76
|
-
{ src: 'GEMINI.md', dst: 'GEMINI.md' }
|
|
90
|
+
{ src: 'GEMINI.md', dst: 'GEMINI.md' },
|
|
91
|
+
{ src: 'gemini-extension.json', dst: 'gemini-extension.json' }
|
|
77
92
|
]
|
|
78
93
|
};
|
|
79
94
|
|
|
@@ -89,11 +104,11 @@ if (command === 'init') {
|
|
|
89
104
|
const srcPath = path.join(pkgDir, f.src);
|
|
90
105
|
const dstPath = path.join(targetDir, f.dst);
|
|
91
106
|
if (f.dir) {
|
|
92
|
-
copyDirRecursive(srcPath, dstPath);
|
|
107
|
+
copyDirRecursive(srcPath, dstPath, force);
|
|
93
108
|
} else {
|
|
94
109
|
const dstDir = path.dirname(dstPath);
|
|
95
110
|
if (!fs.existsSync(dstDir)) fs.mkdirSync(dstDir, { recursive: true });
|
|
96
|
-
if (!fs.existsSync(dstPath)) {
|
|
111
|
+
if (force || !fs.existsSync(dstPath)) {
|
|
97
112
|
fs.copyFileSync(srcPath, dstPath);
|
|
98
113
|
}
|
|
99
114
|
}
|
|
@@ -109,7 +124,7 @@ if (command === 'init') {
|
|
|
109
124
|
console.error(`Unknown command: ${command}. Run "npx ironweave --help" for usage.`);
|
|
110
125
|
process.exit(1);
|
|
111
126
|
|
|
112
|
-
function copyDirRecursive(src, dst) {
|
|
127
|
+
function copyDirRecursive(src, dst, force) {
|
|
113
128
|
if (!fs.existsSync(src)) return;
|
|
114
129
|
if (!fs.existsSync(dst)) fs.mkdirSync(dst, { recursive: true });
|
|
115
130
|
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
@@ -117,8 +132,8 @@ function copyDirRecursive(src, dst) {
|
|
|
117
132
|
const srcPath = path.join(src, entry.name);
|
|
118
133
|
const dstPath = path.join(dst, entry.name);
|
|
119
134
|
if (entry.isDirectory()) {
|
|
120
|
-
copyDirRecursive(srcPath, dstPath);
|
|
121
|
-
} else if (!fs.existsSync(dstPath)) {
|
|
135
|
+
copyDirRecursive(srcPath, dstPath, force);
|
|
136
|
+
} else if (force || !fs.existsSync(dstPath)) {
|
|
122
137
|
fs.copyFileSync(srcPath, dstPath);
|
|
123
138
|
}
|
|
124
139
|
}
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SessionStart hook for Ironweave plugin
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
# Determine plugin root directory
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
8
|
+
PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
9
|
+
|
|
10
|
+
# Read orchestrator skill content
|
|
11
|
+
orchestrator_content=$(cat "${PLUGIN_ROOT}/skills/orchestrator/SKILL.md" 2>&1 || echo "Error reading orchestrator skill")
|
|
12
|
+
|
|
13
|
+
# Escape string for JSON embedding
|
|
14
|
+
escape_for_json() {
|
|
15
|
+
local s="$1"
|
|
16
|
+
s="${s//\\/\\\\}"
|
|
17
|
+
s="${s//\"/\\\"}"
|
|
18
|
+
s="${s//$'\n'/\\n}"
|
|
19
|
+
s="${s//$'\r'/\\r}"
|
|
20
|
+
s="${s//$'\t'/\\t}"
|
|
21
|
+
printf '%s' "$s"
|
|
22
|
+
}
|
|
23
|
+
|
|
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.\n</IMPORTANT>"
|
|
26
|
+
|
|
27
|
+
# Output context injection as JSON.
|
|
28
|
+
# Cursor hooks expect additional_context (snake_case).
|
|
29
|
+
# Claude Code hooks expect hookSpecificOutput.additionalContext (nested).
|
|
30
|
+
# Copilot CLI and others expect additionalContext (top-level, SDK standard).
|
|
31
|
+
if [ -n "${CURSOR_PLUGIN_ROOT:-}" ]; then
|
|
32
|
+
printf '{\n "additional_context": "%s"\n}\n' "$session_context"
|
|
33
|
+
elif [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -z "${COPILOT_CLI:-}" ]; then
|
|
34
|
+
printf '{\n "hookSpecificOutput": {\n "hookEventName": "SessionStart",\n "additionalContext": "%s"\n }\n}\n' "$session_context"
|
|
35
|
+
else
|
|
36
|
+
printf '{\n "additionalContext": "%s"\n}\n' "$session_context"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
exit 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ironweave",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
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,10 +32,13 @@
|
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"skills/",
|
|
35
|
+
"skills-en/",
|
|
36
|
+
"hooks/",
|
|
35
37
|
"bin/",
|
|
36
38
|
"CLAUDE.md",
|
|
37
39
|
"AGENTS.md",
|
|
38
40
|
"GEMINI.md",
|
|
41
|
+
"gemini-extension.json",
|
|
39
42
|
".cursorrules",
|
|
40
43
|
".windsurfrules",
|
|
41
44
|
".clinerules",
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-contract-design
|
|
3
|
+
description: >-
|
|
4
|
+
A detailed design tool for API interface contracts and type systems. Starting from domain models and requirement documents, it generates RESTful/GraphQL API endpoint definitions, Request/Response DTO structures, error response standards, OpenAPI specifications, and type code scaffolds.
|
|
5
|
+
Use this skill in the following scenarios: when users need to design API interfaces, define Data Transfer Objects (DTOs), write interface documentation, establish error code standards, or when users say "design API", "define API", "write API contract", "DTO design", "API specification", "error codes", "OpenAPI", "Swagger".
|
|
6
|
+
Use this skill when the user's task involves transforming business models into technical interfaces.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# API Contract Design
|
|
10
|
+
|
|
11
|
+
Starting from domain models + requirement documents, produce complete API interface contracts. All design decisions are expressed as Mermaid flowcharts.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Design Flow
|
|
16
|
+
|
|
17
|
+
```mermaid
|
|
18
|
+
graph TB
|
|
19
|
+
INPUT["Domain Model + Requirements"] --> RESOURCE["Resource Identification<br>Noun Extraction"]
|
|
20
|
+
RESOURCE --> ENDPOINT["Endpoint Design<br>RESTful Mapping"]
|
|
21
|
+
ENDPOINT --> DTO["DTO Structure<br>Request/Response"]
|
|
22
|
+
DTO --> ERROR["Error Response<br>Standardized Design"]
|
|
23
|
+
ERROR --> VERSION["Versioning Strategy"]
|
|
24
|
+
VERSION --> OUTPUT["Output OpenAPI Spec"]
|
|
25
|
+
|
|
26
|
+
style INPUT fill:#e3f2fd,stroke:#1565c0,color:#0d47a1
|
|
27
|
+
style RESOURCE fill:#e8eaf6,stroke:#283593,color:#1a237e
|
|
28
|
+
style ENDPOINT fill:#e8eaf6,stroke:#283593,color:#1a237e
|
|
29
|
+
style DTO fill:#e8eaf6,stroke:#283593,color:#1a237e
|
|
30
|
+
style ERROR fill:#fff3e0,stroke:#e65100,color:#bf360c
|
|
31
|
+
style VERSION fill:#f5f5f5,stroke:#616161,color:#212121
|
|
32
|
+
style OUTPUT fill:#e8f5e9,stroke:#2e7d32,color:#1b5e20
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 1. Resource Identification
|
|
38
|
+
|
|
39
|
+
Extract API resources from the domain model:
|
|
40
|
+
|
|
41
|
+
| Domain Concept | API Resource | Notes |
|
|
42
|
+
|--|--|--|
|
|
43
|
+
| Aggregate Root | Top-level resource `/resources` | Directly exposed as RESTful resource |
|
|
44
|
+
| Entity (non-root) | Sub-resource `/resources/{id}/sub` | Accessed through parent resource |
|
|
45
|
+
| Value Object | Embedded in DTO | Not exposed independently |
|
|
46
|
+
| Domain Service | Action endpoint `/resources/{id}/actions/do` | Non-CRUD operations |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 2. Endpoint Design Standards
|
|
51
|
+
|
|
52
|
+
### RESTful Mapping Rules
|
|
53
|
+
|
|
54
|
+
```mermaid
|
|
55
|
+
graph LR
|
|
56
|
+
CRUD{"Operation Type?"} -->|"Create"| POST["POST /resources"]
|
|
57
|
+
CRUD -->|"Read Single"| GET_ONE["GET /resources/{id}"]
|
|
58
|
+
CRUD -->|"Read List"| GET_LIST["GET /resources?filter"]
|
|
59
|
+
CRUD -->|"Full Update"| PUT["PUT /resources/{id}"]
|
|
60
|
+
CRUD -->|"Partial Update"| PATCH["PATCH /resources/{id}"]
|
|
61
|
+
CRUD -->|"Delete"| DELETE["DELETE /resources/{id}"]
|
|
62
|
+
CRUD -->|"Non-CRUD Action"| ACTION["POST /resources/{id}/actions/{verb}"]
|
|
63
|
+
|
|
64
|
+
style POST fill:#c8e6c9,stroke:#2e7d32,color:#1b5e20
|
|
65
|
+
style GET_ONE fill:#e3f2fd,stroke:#1565c0,color:#0d47a1
|
|
66
|
+
style GET_LIST fill:#e3f2fd,stroke:#1565c0,color:#0d47a1
|
|
67
|
+
style PUT fill:#fff9c4,stroke:#f9a825,color:#e65100
|
|
68
|
+
style PATCH fill:#fff9c4,stroke:#f9a825,color:#e65100
|
|
69
|
+
style DELETE fill:#ffcdd2,stroke:#c62828,color:#b71c1c
|
|
70
|
+
style ACTION fill:#f3e5f5,stroke:#6a1b9a,color:#4a148c
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Naming Conventions
|
|
74
|
+
- Resource names: Plural form (`/users` not `/user`)
|
|
75
|
+
- Paths: kebab-case (`/migration-tasks`)
|
|
76
|
+
- Query parameters: camelCase (`?pageSize=20&sortBy=createdAt`)
|
|
77
|
+
- Nesting max 2 levels: `/resources/{id}/sub-resources/{subId}`
|
|
78
|
+
|
|
79
|
+
### Idempotency Requirements
|
|
80
|
+
|
|
81
|
+
| Method | Idempotent? | Safe? | Notes |
|
|
82
|
+
|--|--|--|--|
|
|
83
|
+
| GET | Yes | Yes | Read-only, no side effects |
|
|
84
|
+
| PUT | Yes | No | Full replacement, repeated execution yields same result |
|
|
85
|
+
| DELETE | Yes | No | Delete again returns 404/204 |
|
|
86
|
+
| POST | **No** | No | Requires additional mechanism for idempotency (Idempotency-Key) |
|
|
87
|
+
| PATCH | **No** | No | Depends on the specific operation |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 3. DTO Design Standards
|
|
92
|
+
|
|
93
|
+
### Layered Structure
|
|
94
|
+
|
|
95
|
+
```mermaid
|
|
96
|
+
graph LR
|
|
97
|
+
CLIENT["Client"] -->|"Request DTO"| CONTROLLER["Controller"]
|
|
98
|
+
CONTROLLER -->|"Command/Query"| SERVICE["Service"]
|
|
99
|
+
SERVICE -->|"Entity"| REPO["Repository"]
|
|
100
|
+
REPO -->|"Entity"| SERVICE
|
|
101
|
+
SERVICE -->|"Response DTO"| CONTROLLER
|
|
102
|
+
CONTROLLER -->|"Response DTO"| CLIENT
|
|
103
|
+
|
|
104
|
+
style CLIENT fill:#f5f5f5,stroke:#616161,color:#212121
|
|
105
|
+
style CONTROLLER fill:#e3f2fd,stroke:#1565c0,color:#0d47a1
|
|
106
|
+
style SERVICE fill:#e8eaf6,stroke:#283593,color:#1a237e
|
|
107
|
+
style REPO fill:#ffe0b2,stroke:#e65100,color:#bf360c
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### DTO Design Principles
|
|
111
|
+
- **Request DTO ≠ Entity**: Don't expose internal fields (e.g., id, createdAt are server-generated)
|
|
112
|
+
- **Response DTO ≠ Entity**: Trim fields as needed, avoid over-exposure
|
|
113
|
+
- **List DTO is slim**: List endpoints return summaries, detail endpoints return full data
|
|
114
|
+
- **Flatten nesting**: Avoid > 3 levels of nesting, use ID references instead
|
|
115
|
+
|
|
116
|
+
### Pagination Standard
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
// Request
|
|
120
|
+
interface PaginationQuery {
|
|
121
|
+
page?: number; // Default 1
|
|
122
|
+
pageSize?: number; // Default 20, max 100
|
|
123
|
+
sortBy?: string;
|
|
124
|
+
sortOrder?: 'asc' | 'desc';
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Response
|
|
128
|
+
interface PaginatedResponse<T> {
|
|
129
|
+
data: T[];
|
|
130
|
+
pagination: {
|
|
131
|
+
page: number;
|
|
132
|
+
pageSize: number;
|
|
133
|
+
total: number;
|
|
134
|
+
totalPages: number;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 4. Error Response Standardization
|
|
142
|
+
|
|
143
|
+
### Unified Error Format
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
interface ErrorResponse {
|
|
147
|
+
code: string; // Business error code: "RESOURCE_NOT_FOUND"
|
|
148
|
+
message: string; // Human-readable message
|
|
149
|
+
details?: Array<{ // Field-level errors (on validation failure)
|
|
150
|
+
field: string;
|
|
151
|
+
message: string;
|
|
152
|
+
}>;
|
|
153
|
+
traceId?: string; // Distributed trace ID
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### HTTP Status Code Mapping
|
|
158
|
+
|
|
159
|
+
```mermaid
|
|
160
|
+
graph TB
|
|
161
|
+
ERR{"Error Type?"} -->|"Validation Failure"| E400["400 Bad Request<br>+ details array"]
|
|
162
|
+
ERR -->|"Not Authenticated"| E401["401 Unauthorized"]
|
|
163
|
+
ERR -->|"No Permission"| E403["403 Forbidden"]
|
|
164
|
+
ERR -->|"Resource Not Found"| E404["404 Not Found"]
|
|
165
|
+
ERR -->|"Business Rule Conflict"| E409["409 Conflict"]
|
|
166
|
+
ERR -->|"Too Many Requests"| E429["429 Too Many Requests"]
|
|
167
|
+
ERR -->|"Internal Server Error"| E500["500 Internal Server Error"]
|
|
168
|
+
|
|
169
|
+
style E400 fill:#fff9c4,stroke:#f9a825,color:#e65100
|
|
170
|
+
style E401 fill:#ffcdd2,stroke:#c62828,color:#b71c1c
|
|
171
|
+
style E403 fill:#ffcdd2,stroke:#c62828,color:#b71c1c
|
|
172
|
+
style E404 fill:#ffe0b2,stroke:#e65100,color:#bf360c
|
|
173
|
+
style E409 fill:#ffe0b2,stroke:#e65100,color:#bf360c
|
|
174
|
+
style E429 fill:#f3e5f5,stroke:#6a1b9a,color:#4a148c
|
|
175
|
+
style E500 fill:#ffcdd2,stroke:#c62828,color:#b71c1c
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Error Code Naming Conventions
|
|
179
|
+
- All uppercase + underscore: `RESOURCE_NOT_FOUND`
|
|
180
|
+
- Prefix by module: `USER_NOT_FOUND`, `ORDER_ALREADY_PAID`
|
|
181
|
+
- Use semantic strings, not numeric codes
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 5. Versioning Strategy
|
|
186
|
+
|
|
187
|
+
```mermaid
|
|
188
|
+
graph TB
|
|
189
|
+
STRAT{"Version Strategy?"} -->|"Internal System/MVP"| NO_V["No Versioning<br>Evolve Directly"]
|
|
190
|
+
STRAT -->|"Public API"| URL_V["URL Versioning<br>/api/v1/resources"]
|
|
191
|
+
STRAT -->|"Between Microservices"| HEADER_V["Header Versioning<br>Accept: application/vnd.app.v2+json"]
|
|
192
|
+
|
|
193
|
+
NO_V --> COMPAT["Backward Compatibility:<br>Only add fields, never remove"]
|
|
194
|
+
URL_V --> COMPAT
|
|
195
|
+
HEADER_V --> COMPAT
|
|
196
|
+
|
|
197
|
+
style NO_V fill:#c8e6c9,stroke:#2e7d32,color:#1b5e20
|
|
198
|
+
style URL_V fill:#e3f2fd,stroke:#1565c0,color:#0d47a1
|
|
199
|
+
style HEADER_V fill:#f3e5f5,stroke:#6a1b9a,color:#4a148c
|
|
200
|
+
style COMPAT fill:#fff3e0,stroke:#e65100,color:#bf360c
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Deprecation Management
|
|
204
|
+
- After a new version launches, keep the old version for at least **6 months**
|
|
205
|
+
- Add `Deprecation: true` + `Sunset: <date>` response headers
|
|
206
|
+
- Mark deprecation status in documentation
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 6. Output Checklist
|
|
211
|
+
|
|
212
|
+
After design is complete, produce the following artifacts:
|
|
213
|
+
|
|
214
|
+
| Artifact | Format | Notes |
|
|
215
|
+
|--|--|--|
|
|
216
|
+
| API endpoint list | Markdown table | Path, method, description, idempotent? |
|
|
217
|
+
| Request/Response DTOs | TypeScript/Java interface definitions | DTOs for each endpoint |
|
|
218
|
+
| Error code catalog | Markdown table | code + HTTP status + usage scenario |
|
|
219
|
+
| OpenAPI specification | YAML | Importable into Swagger UI |
|
|
220
|
+
| Contract test cases | Description | Consumer-Provider verification points |
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Reference
|
|
225
|
+
|
|
226
|
+
For detailed specifications, see the `references/` directory:
|
|
227
|
+
- `api-design-rules.md` — Detailed RESTful design rules and anti-patterns
|