agent-orchestrator-kit 0.1.9 → 0.1.10
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/CHANGELOG.md +13 -0
- package/README.md +44 -13
- package/bin/agent-orchestrator.js +96 -5
- package/package.json +5 -2
- package/templates/.agents/subagents/code-reviewer.md +32 -0
- package/templates/.agents/subagents/code-writer.md +21 -0
- package/templates/.agents/subagents/design-implementer.md +28 -0
- package/templates/.agents/subagents/openspec-guide.md +24 -0
- package/templates/.agents/subagents/setup-doctor.md +25 -0
- package/templates/.agents/subagents/test-writer.md +17 -0
- package/templates/scripts/sync-local-agent-skills.sh +52 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.1.10] - 2026-07-15
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Custom subagents** — new `.agents/subagents/` asset category, synced to `.cursor/agents/` and `.claude/agents/` (like skills/rules, delete-stale semantics on `sync`)
|
|
9
|
+
- 6 default subagents: `openspec-guide` (pipeline navigator, read-only), `code-writer` (scoped task implementation), `code-reviewer` (spec-compliance + convention review), `test-writer` (test authoring), `setup-doctor` (orchestrator setup diagnosis/repair), `design-implementer` (pixel-accurate Figma/screenshot → code, honors design-brief priority)
|
|
10
|
+
- **Amp support via skill wrappers** — Amp has no file-based subagents, so `init`/`update`/`sync` auto-generate a committed `.agents/skills/subagent-<name>/SKILL.md` wrapper per subagent (Amp loads `.agents/skills/` natively); wrappers are excluded from `.cursor/`/`.claude/` skill sync and removed when the source subagent is deleted
|
|
11
|
+
- `update` and `sync --target cursor|claude|all` now manage `.agents/subagents/` alongside skills and rules
|
|
12
|
+
- `scripts/sync-local-agent-skills.sh` generates Amp wrappers and rsyncs `.agents/subagents/` → `.cursor/agents/` and `.claude/agents/`
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- `update` no longer resurrects a CI workflow file the project deleted (e.g. `.github/workflows/agent-verify.yml` after switching to GitLab CI) — CI files are refreshed only when already present
|
|
16
|
+
- `update` keeps `scripts/sync-local-agent-skills.sh` executable
|
|
17
|
+
|
|
5
18
|
## [0.1.9] - 2026-07-12
|
|
6
19
|
|
|
7
20
|
### Added
|
package/README.md
CHANGED
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
# agent-orchestrator-kit
|
|
2
2
|
|
|
3
|
-
Universal AI agent orchestration kit for **Cursor**, **Claude Code**, and **Amp Code** — spec-driven pipeline
|
|
3
|
+
Universal AI agent orchestration kit for **Cursor**, **Claude Code**, and **Amp Code** — spec-driven OpenSpec pipeline with **cross-IDE custom subagents**.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/agent-orchestrator-kit)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
## What It Is
|
|
9
9
|
|
|
10
|
-
A portable kit that installs a **
|
|
10
|
+
A portable kit that installs a **role-separated AI pipeline** into any project:
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
explore → propose → review → apply → verify → archive
|
|
13
|
+
explore → [design] → propose → review → apply → verify → archive
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Each role runs in a **separate agent session** with dedicated permissions, model hints, and handoff gates. The `openspec/changes/` folder acts as the **contract between agents** — no shared memory between sessions, only files.
|
|
17
17
|
|
|
18
|
+
**Custom subagents (v0.1.10+)** ship with the kit and work in all three IDEs:
|
|
19
|
+
|
|
20
|
+
| Subagent | Role |
|
|
21
|
+
|----------|------|
|
|
22
|
+
| `openspec-guide` | Pipeline navigator — status, gates, next `/opsx:*` command |
|
|
23
|
+
| `code-writer` | Scoped task implementation against stack conventions |
|
|
24
|
+
| `code-reviewer` | Spec-compliance + convention review of the resulting code |
|
|
25
|
+
| `test-writer` | Automated tests for recently changed code |
|
|
26
|
+
| `setup-doctor` | Orchestrator / MCP / sync diagnosis and repair |
|
|
27
|
+
| `design-implementer` | Pixel-accurate Figma / screenshot → production UI |
|
|
28
|
+
|
|
29
|
+
- **Cursor** → `.cursor/agents/` (native subagents)
|
|
30
|
+
- **Claude Code** → `.claude/agents/` (native subagents)
|
|
31
|
+
- **Amp Code** → auto-generated `subagent-*` skill wrappers in `.agents/skills/` (Amp has no file-based subagents)
|
|
32
|
+
|
|
18
33
|
Works with:
|
|
19
|
-
- [Cursor](https://cursor.sh) — via `.cursor/rules/` + `.cursor/skills/`
|
|
20
|
-
- [Claude Code](https://code.claude.com) — via `CLAUDE.md` + `.claude/skills/`
|
|
21
|
-
- [Amp Code](https://ampcode.com) — via `AGENTS.md` + `.agents/skills/` (native,
|
|
34
|
+
- [Cursor](https://cursor.sh) — via `.cursor/rules/` + `.cursor/skills/` + `.cursor/agents/`
|
|
35
|
+
- [Claude Code](https://code.claude.com) — via `CLAUDE.md` + `.claude/skills/` + `.claude/agents/`
|
|
36
|
+
- [Amp Code](https://ampcode.com) — via `AGENTS.md` + `.agents/skills/` (native, including `subagent-*` wrappers)
|
|
22
37
|
|
|
23
38
|
## Why
|
|
24
39
|
|
|
@@ -38,15 +53,15 @@ npx agent-orchestrator-kit@latest init --profile generic --ci gitlab --spec-veri
|
|
|
38
53
|
|
|
39
54
|
See [Installation](#installation) for profile/CI options.
|
|
40
55
|
|
|
41
|
-
**🔄 Already have the kit installed?
|
|
56
|
+
**🔄 Already have the kit installed? Upgrade to latest (subagents in v0.1.10+):**
|
|
42
57
|
|
|
43
58
|
```bash
|
|
44
59
|
npx agent-orchestrator-kit@latest update
|
|
45
|
-
./scripts/sync-local-agent-skills.sh
|
|
46
|
-
npx agent-orchestrator-kit@latest status
|
|
60
|
+
npx agent-orchestrator-kit@latest sync # or: ./scripts/sync-local-agent-skills.sh
|
|
61
|
+
npx agent-orchestrator-kit@latest status
|
|
47
62
|
```
|
|
48
63
|
|
|
49
|
-
|
|
64
|
+
This refreshes kit-managed files, installs `.agents/subagents/`, generates Amp `subagent-*` skill wrappers, and syncs agents into `.cursor/agents/` + `.claude/agents/`. See [Changelog](#changelog) for the full list.
|
|
50
65
|
|
|
51
66
|
## Installation
|
|
52
67
|
|
|
@@ -130,6 +145,7 @@ your-project/
|
|
|
130
145
|
│ ├── amp.settings.json.example # Amp MCP template
|
|
131
146
|
│ ├── commands/ # 6 /opsx:* commands
|
|
132
147
|
│ ├── rules/ # 3 auto-applied rules
|
|
148
|
+
│ ├── subagents/ # 6 default custom subagents (Cursor/Claude/Amp)
|
|
133
149
|
│ └── skills/
|
|
134
150
|
│ ├── agent-orchestration/ # Pipeline orchestration
|
|
135
151
|
│ ├── openspec-howto/
|
|
@@ -149,7 +165,8 @@ your-project/
|
|
|
149
165
|
|----------|----------|
|
|
150
166
|
| Orchestration | 5-role pipeline, `AGENTS.md`, `orchestrator.yaml`, review command |
|
|
151
167
|
| OpenSpec skills | All 7 skills for `/opsx:*` workflow |
|
|
152
|
-
| IDE sync | Cursor + Claude Code sync script (`--delete` semantics — removes stale skills) |
|
|
168
|
+
| IDE sync | Cursor + Claude Code sync script (`--delete` semantics — removes stale skills/subagents) |
|
|
169
|
+
| Subagents | `openspec-guide`, `code-writer`, `code-reviewer`, `test-writer`, `setup-doctor`, `design-implementer` — native in Cursor (`.cursor/agents/`) + Claude Code (`.claude/agents/`), exposed to Amp as auto-generated `subagent-*` skill wrappers in `.agents/skills/` |
|
|
153
170
|
| CLI gates | `agent-orchestrator status` / `gate-check` — deterministic review-gate checks |
|
|
154
171
|
| CI | `agent-verify.yml` — GitHub (default) or GitLab fragment + `prebuild` hook, both run `gate-check` |
|
|
155
172
|
| AI Spec Verifier | `spec-verify.yml` + verifier scripts — GitLab or GitHub, opt-in (`--spec-verify`) |
|
|
@@ -183,6 +200,8 @@ cp .agents/amp.settings.json.example .amp/settings.json
|
|
|
183
200
|
|
|
184
201
|
Or run `./scripts/sync-local-agent-skills.sh` — it creates `.amp/settings.json` automatically.
|
|
185
202
|
|
|
203
|
+
**Subagents in Amp:** Amp has no file-based custom subagents (only skills and plugin agents), so the kit exposes every `.agents/subagents/<name>.md` as an auto-generated skill `subagent-<name>` in `.agents/skills/`. These wrappers are committed to git, so Amp picks them up with zero local setup — just say "use the subagent-design-implementer skill" or let Amp auto-load it from the description. Edit the source file in `.agents/subagents/` (never the wrapper) and re-run `sync` to regenerate.
|
|
204
|
+
|
|
186
205
|
4. Use commands directly:
|
|
187
206
|
|
|
188
207
|
```
|
|
@@ -210,9 +229,10 @@ Switch modes in Amp CLI: `Ctrl+O` → `mode`.
|
|
|
210
229
|
1. Run sync: `./scripts/sync-local-agent-skills.sh`
|
|
211
230
|
2. This creates:
|
|
212
231
|
- `.claude/CLAUDE.md` — project context
|
|
213
|
-
- `.claude/skills/` — all skills from `.agents/skills/`
|
|
232
|
+
- `.claude/skills/` — all skills from `.agents/skills/` (excluding Amp `subagent-*` wrappers)
|
|
233
|
+
- `.claude/agents/` — custom subagents from `.agents/subagents/` (native Claude Code subagents)
|
|
214
234
|
3. Skills are auto-loaded by Claude Code from `.claude/skills/`.
|
|
215
|
-
4. Invoke directly: `/agent-orchestration`, `/openspec-howto`, etc.
|
|
235
|
+
4. Invoke directly: `/agent-orchestration`, `/openspec-howto`, etc. Subagents are delegated automatically by description or on request ("use the design-implementer subagent").
|
|
216
236
|
|
|
217
237
|
**CLAUDE.md tiers used:**
|
|
218
238
|
- Project level: `.claude/CLAUDE.md` (synced from `CLAUDE.md`)
|
|
@@ -237,8 +257,10 @@ You can add `context: fork` to explore/review skills for isolated subagent sessi
|
|
|
237
257
|
2. Creates:
|
|
238
258
|
- `.cursor/skills/` — all skills
|
|
239
259
|
- `.cursor/rules/` — `.mdc` rule files
|
|
260
|
+
- `.cursor/agents/` — custom subagents (`openspec-guide`, `code-writer`, `code-reviewer`, `test-writer`, `setup-doctor`, `design-implementer`)
|
|
240
261
|
- `.mcp.json` — from `mcp.json.example` (if not present)
|
|
241
262
|
3. Rules are applied automatically per `alwaysApply: true`.
|
|
263
|
+
4. Subagents are invoked by name in chat (e.g. "use the code-reviewer subagent on this diff") or delegated to automatically by Cursor when their `description` matches the task. Add project-specific subagents by dropping `.md` files into `.agents/subagents/` and re-running sync.
|
|
242
264
|
|
|
243
265
|
**Memory MCP for Cursor** (`.mcp.json`):
|
|
244
266
|
|
|
@@ -648,16 +670,20 @@ npx agent-orchestrator-kit gate-check [change-name] [options]
|
|
|
648
670
|
.agents/ # Committed — source of truth for all IDEs
|
|
649
671
|
commands/ # /opsx:* command definitions
|
|
650
672
|
rules/ # Auto-applied rules for Cursor
|
|
673
|
+
subagents/ # Custom subagents (source of truth, all IDEs)
|
|
651
674
|
skills/ # Skills for Cursor, Claude Code, Amp
|
|
675
|
+
# subagent-*/ — auto-generated Amp wrappers (do not edit)
|
|
652
676
|
orchestrator.yaml # Project pipeline config
|
|
653
677
|
|
|
654
678
|
.cursor/ # Local only — Cursor IDE runtime
|
|
655
679
|
skills/ # Synced from .agents/skills/
|
|
656
680
|
rules/ # Synced from .agents/rules/
|
|
681
|
+
agents/ # Synced from .agents/subagents/
|
|
657
682
|
memory.json # Memory MCP data
|
|
658
683
|
|
|
659
684
|
.claude/ # Local only — Claude Code runtime
|
|
660
685
|
skills/ # Synced from .agents/skills/
|
|
686
|
+
agents/ # Synced from .agents/subagents/
|
|
661
687
|
CLAUDE.md # Synced from root CLAUDE.md
|
|
662
688
|
|
|
663
689
|
.amp/ # Local only — Amp config
|
|
@@ -673,6 +699,11 @@ openspec/ # Committed — spec-driven workflow
|
|
|
673
699
|
|
|
674
700
|
## Changelog
|
|
675
701
|
|
|
702
|
+
### 0.1.10
|
|
703
|
+
- Custom subagents (`.agents/subagents/`) synced to `.cursor/agents/` + `.claude/agents/`, exposed to Amp via auto-generated `subagent-*` skill wrappers
|
|
704
|
+
- 6 default subagents: `openspec-guide`, `code-writer`, `code-reviewer`, `test-writer`, `setup-doctor`, `design-implementer`
|
|
705
|
+
- `update` no longer resurrects deleted CI workflow files
|
|
706
|
+
|
|
676
707
|
### 0.1.9
|
|
677
708
|
- Design intake — `/opsx:design` captures design into `design-brief.md` + `assets/` (Figma / export / screenshot / photo)
|
|
678
709
|
- Role `design_intake` + opt-in `pipeline.require_design_brief` (default `false`) in all profiles
|
|
@@ -26,12 +26,17 @@ const KIT_SKILL_DIRS = [
|
|
|
26
26
|
const KIT_MANAGED_PATHS = [
|
|
27
27
|
'.agents/commands',
|
|
28
28
|
'.agents/rules',
|
|
29
|
+
'.agents/subagents',
|
|
29
30
|
...KIT_SKILL_DIRS.map((s) => `.agents/skills/${s}`),
|
|
30
|
-
'.github/workflows/agent-verify.yml',
|
|
31
|
-
'.gitlab/agent-verify.yml',
|
|
32
31
|
'scripts/sync-local-agent-skills.sh',
|
|
33
32
|
];
|
|
34
33
|
|
|
34
|
+
// CI workflow files are provider-specific and chosen once at `init --ci`.
|
|
35
|
+
// `update` must only refresh them if already present — never resurrect a
|
|
36
|
+
// workflow file for a provider the project doesn't use (e.g. after switching
|
|
37
|
+
// from GitHub Actions to GitLab CI and deleting the GitHub workflow).
|
|
38
|
+
const CI_WORKFLOW_PATHS = ['.github/workflows/agent-verify.yml', '.gitlab/agent-verify.yml'];
|
|
39
|
+
|
|
35
40
|
// Opt-in AI Spec Verifier files, per CI provider. `scripts/verify-specs.sh` is
|
|
36
41
|
// shared — it is stack- and CI-agnostic already.
|
|
37
42
|
const GITLAB_SPEC_VERIFY_PATHS = [
|
|
@@ -439,8 +444,65 @@ function printNextSteps(profile, projectDir, ci = 'github', specVerify = false)
|
|
|
439
444
|
console.log('\n' + lines.join('\n') + '\n');
|
|
440
445
|
}
|
|
441
446
|
|
|
447
|
+
// Amp has no file-based custom subagents (only skills and plugin agents), but
|
|
448
|
+
// it natively loads skills from .agents/skills/ with the same description-driven
|
|
449
|
+
// delegation. Each .agents/subagents/<name>.md therefore gets a committed skill
|
|
450
|
+
// wrapper .agents/skills/subagent-<name>/SKILL.md so subagents work in Amp with
|
|
451
|
+
// zero local setup. Wrappers are regenerated on init/update/sync and stale ones
|
|
452
|
+
// are removed when their source subagent is deleted.
|
|
453
|
+
const AMP_SUBAGENT_SKILL_PREFIX = 'subagent-';
|
|
454
|
+
|
|
455
|
+
function listAmpSubagentWrappers(projectDir) {
|
|
456
|
+
const skillsDir = join(projectDir, '.agents', 'skills');
|
|
457
|
+
if (!existsSync(skillsDir)) return [];
|
|
458
|
+
return readdirSync(skillsDir).filter((entry) => entry.startsWith(AMP_SUBAGENT_SKILL_PREFIX));
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
function generateAmpSubagentSkills(projectDir) {
|
|
462
|
+
const subagentsDir = join(projectDir, '.agents', 'subagents');
|
|
463
|
+
const skillsDir = join(projectDir, '.agents', 'skills');
|
|
464
|
+
const expected = new Set();
|
|
465
|
+
|
|
466
|
+
if (existsSync(subagentsDir)) {
|
|
467
|
+
for (const file of readdirSync(subagentsDir).filter((f) => f.endsWith('.md'))) {
|
|
468
|
+
const content = readFileSync(join(subagentsDir, file), 'utf-8');
|
|
469
|
+
const parsed = content.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
|
|
470
|
+
const name = parsed?.[1].match(/^name:\s*(.+)$/m)?.[1]?.trim();
|
|
471
|
+
const description = parsed?.[1].match(/^description:\s*(.+)$/m)?.[1]?.trim();
|
|
472
|
+
if (!name || !description) {
|
|
473
|
+
log.warn(`skip Amp wrapper (missing name/description frontmatter): .agents/subagents/${file}`);
|
|
474
|
+
continue;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
const skillName = `${AMP_SUBAGENT_SKILL_PREFIX}${name}`;
|
|
478
|
+
expected.add(skillName);
|
|
479
|
+
mkdirSync(join(skillsDir, skillName), { recursive: true });
|
|
480
|
+
const skill = [
|
|
481
|
+
'---',
|
|
482
|
+
`name: ${skillName}`,
|
|
483
|
+
`description: ${description}`,
|
|
484
|
+
'---',
|
|
485
|
+
'',
|
|
486
|
+
`<!-- AUTO-GENERATED from .agents/subagents/${file} — edit the source file, then run: npx agent-orchestrator-kit sync -->`,
|
|
487
|
+
'',
|
|
488
|
+
parsed[2].trim(),
|
|
489
|
+
'',
|
|
490
|
+
].join('\n');
|
|
491
|
+
writeFileSync(join(skillsDir, skillName, 'SKILL.md'), skill);
|
|
492
|
+
log.ok(`.agents/skills/${skillName}/SKILL.md (Amp wrapper)`);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
for (const entry of listAmpSubagentWrappers(projectDir)) {
|
|
497
|
+
if (!expected.has(entry)) {
|
|
498
|
+
rmSync(join(projectDir, '.agents', 'skills', entry), { recursive: true, force: true });
|
|
499
|
+
log.warn(`removed stale Amp wrapper: .agents/skills/${entry}`);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
442
504
|
function syncAmp(projectDir) {
|
|
443
|
-
log.info('Amp Code reads .agents/ natively —
|
|
505
|
+
log.info('Amp Code reads .agents/ natively — subagents exposed via skill wrappers');
|
|
444
506
|
mkdirSync(join(projectDir, '.amp'), { recursive: true });
|
|
445
507
|
const ampExample = join(projectDir, '.agents', 'amp.settings.json.example');
|
|
446
508
|
const ampDest = join(projectDir, '.amp', 'settings.json');
|
|
@@ -491,6 +553,7 @@ program
|
|
|
491
553
|
if (existsSync(join(profileDir, '.agents'))) {
|
|
492
554
|
copyDir(join(profileDir, '.agents'), join(projectDir, '.agents'), { overwrite: opts.force });
|
|
493
555
|
}
|
|
556
|
+
generateAmpSubagentSkills(projectDir);
|
|
494
557
|
|
|
495
558
|
log.title('Installing scripts/');
|
|
496
559
|
copyDir(join(templateDir, 'scripts'), join(projectDir, 'scripts'), {
|
|
@@ -578,6 +641,16 @@ program
|
|
|
578
641
|
}
|
|
579
642
|
}
|
|
580
643
|
|
|
644
|
+
generateAmpSubagentSkills(projectDir);
|
|
645
|
+
|
|
646
|
+
for (const rel of CI_WORKFLOW_PATHS) {
|
|
647
|
+
const src = join(templateDir, rel);
|
|
648
|
+
const dest = join(projectDir, rel);
|
|
649
|
+
if (!existsSync(src) || !existsSync(dest)) continue;
|
|
650
|
+
copyFileSync(src, dest);
|
|
651
|
+
log.ok(rel);
|
|
652
|
+
}
|
|
653
|
+
|
|
581
654
|
for (const rel of KIT_OPTIN_PATHS) {
|
|
582
655
|
const src = join(templateDir, rel);
|
|
583
656
|
const dest = join(projectDir, rel);
|
|
@@ -586,6 +659,10 @@ program
|
|
|
586
659
|
log.ok(`${rel} (opt-in)`);
|
|
587
660
|
}
|
|
588
661
|
|
|
662
|
+
try {
|
|
663
|
+
execSync(`chmod +x ${join(projectDir, 'scripts', 'sync-local-agent-skills.sh')}`);
|
|
664
|
+
} catch {}
|
|
665
|
+
|
|
589
666
|
log.ok(`Updated to v${KIT_VERSION}`);
|
|
590
667
|
log.info('Run ./scripts/sync-local-agent-skills.sh to sync to local IDE');
|
|
591
668
|
});
|
|
@@ -603,10 +680,20 @@ program
|
|
|
603
680
|
const syncClaude = ['claude', 'all'].includes(opts.target);
|
|
604
681
|
const syncAmpTarget = ['amp', 'all'].includes(opts.target);
|
|
605
682
|
|
|
683
|
+
generateAmpSubagentSkills(projectDir);
|
|
684
|
+
|
|
685
|
+
// Amp skill wrappers are redundant in Cursor/Claude (they get native
|
|
686
|
+
// subagents from .agents/subagents/), so exclude them from skill sync.
|
|
687
|
+
const ampWrappers = listAmpSubagentWrappers(projectDir);
|
|
688
|
+
|
|
606
689
|
if (syncCursor) {
|
|
607
690
|
log.info('Syncing .agents/ → .cursor/');
|
|
608
|
-
copyDir(join(projectDir, '.agents', 'skills'), join(projectDir, '.cursor', 'skills'), { overwrite: true, delete: true });
|
|
691
|
+
copyDir(join(projectDir, '.agents', 'skills'), join(projectDir, '.cursor', 'skills'), { overwrite: true, delete: true, skip: ampWrappers });
|
|
692
|
+
for (const wrapper of ampWrappers) {
|
|
693
|
+
rmSync(join(projectDir, '.cursor', 'skills', wrapper), { recursive: true, force: true });
|
|
694
|
+
}
|
|
609
695
|
copyDir(join(projectDir, '.agents', 'rules'), join(projectDir, '.cursor', 'rules'), { overwrite: true, delete: true });
|
|
696
|
+
copyDir(join(projectDir, '.agents', 'subagents'), join(projectDir, '.cursor', 'agents'), { overwrite: true, delete: true });
|
|
610
697
|
|
|
611
698
|
const mcpExample = join(projectDir, '.agents', 'mcp.json.example');
|
|
612
699
|
const mcpDest = join(projectDir, '.mcp.json');
|
|
@@ -618,7 +705,11 @@ program
|
|
|
618
705
|
|
|
619
706
|
if (syncClaude) {
|
|
620
707
|
log.info('Syncing .agents/ → .claude/');
|
|
621
|
-
copyDir(join(projectDir, '.agents', 'skills'), join(projectDir, '.claude', 'skills'), { overwrite: true, delete: true });
|
|
708
|
+
copyDir(join(projectDir, '.agents', 'skills'), join(projectDir, '.claude', 'skills'), { overwrite: true, delete: true, skip: ampWrappers });
|
|
709
|
+
for (const wrapper of ampWrappers) {
|
|
710
|
+
rmSync(join(projectDir, '.claude', 'skills', wrapper), { recursive: true, force: true });
|
|
711
|
+
}
|
|
712
|
+
copyDir(join(projectDir, '.agents', 'subagents'), join(projectDir, '.claude', 'agents'), { overwrite: true, delete: true });
|
|
622
713
|
|
|
623
714
|
const claudeMd = join(projectDir, 'CLAUDE.md');
|
|
624
715
|
const claudeDir = join(projectDir, '.claude');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-orchestrator-kit",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Universal AI agent orchestration kit for Cursor, Claude Code, and Amp Code — spec-driven pipeline with
|
|
3
|
+
"version": "0.1.10",
|
|
4
|
+
"description": "Universal AI agent orchestration kit for Cursor, Claude Code, and Amp Code — spec-driven OpenSpec pipeline with cross-IDE custom subagents (openspec-guide, code-writer, code-reviewer, test-writer, setup-doctor, design-implementer)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agent",
|
|
7
7
|
"cursor",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"openspec",
|
|
11
11
|
"sdd",
|
|
12
12
|
"agent-orchestration",
|
|
13
|
+
"subagents",
|
|
14
|
+
"custom-subagents",
|
|
15
|
+
"design-to-code",
|
|
13
16
|
"developer-tools"
|
|
14
17
|
],
|
|
15
18
|
"author": "Maksim Shevyakov <makshc2>",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: Reviews a code diff for OpenSpec spec-compliance and project stack conventions — checks the change against openspec/specs/ and the active change's proposal/design/tasks, not against security or general bug-hunting concerns (use the Bugbot or Security Review subagents for that). Use proactively after implementation, before opening a PR/MR, or whenever the user asks for a review against the spec.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are a read-only reviewer. You never edit files. Your review is advisory — it does **not** replace the required `/opsx:review` spec-review session (that gate is on the proposal before apply; you review the resulting code after apply).
|
|
7
|
+
|
|
8
|
+
Steps:
|
|
9
|
+
|
|
10
|
+
1. Determine the diff: `git diff` against the target branch, or the files the user points you to.
|
|
11
|
+
2. Identify the active OpenSpec change (`openspec list --json`, or ask if ambiguous). Read `openspec/changes/<name>/proposal.md`, `design.md`, and every touched `specs/*/spec.md`.
|
|
12
|
+
3. Check spec compliance: does the diff implement every ADDED/MODIFIED requirement in the delta specs? Does it avoid touching anything marked out of scope? Flag missing or extra behavior explicitly, quoting the requirement.
|
|
13
|
+
4. Check stack conventions from `.agents/orchestrator.yaml` (`project.stack`) — e.g. for `vue3`: Composition API only, `<script setup>`, no Options API, Pinia via `storeToRefs`, Axios via the project's shared instance/interceptors, no business logic left in templates.
|
|
14
|
+
5. Check task hygiene: does `tasks.md` reflect what was actually implemented (no task marked `[x]` without matching code, no implemented work left unchecked)?
|
|
15
|
+
|
|
16
|
+
Output format:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
## Code Review: <change-name>
|
|
20
|
+
|
|
21
|
+
**Spec compliance:** Compliant | Gaps found
|
|
22
|
+
- ...
|
|
23
|
+
|
|
24
|
+
**Convention issues**
|
|
25
|
+
- Critical: ...
|
|
26
|
+
- Warning: ...
|
|
27
|
+
- Suggestion: ...
|
|
28
|
+
|
|
29
|
+
**Verdict:** Ready for MR | Needs changes before MR
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Be specific — cite file and line/region for every issue. If everything is fine, say so briefly instead of inventing nitpicks.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-writer
|
|
3
|
+
description: Implementation specialist. Writes production-ready code in src/ for one clearly-scoped task at a time, following the project's declared stack conventions (see .agents/orchestrator.yaml project.stack) and existing file/naming patterns. Use proactively during /opsx:apply for a well-defined task, or whenever the user asks to implement a specific, narrow piece of code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You implement one scoped unit of work at a time. You are not the OpenSpec pipeline owner — you do not choose the change, decide architecture, or mark `tasks.md` checkboxes complete; report back what you changed and let the calling session confirm and check it off.
|
|
7
|
+
|
|
8
|
+
Before writing code:
|
|
9
|
+
|
|
10
|
+
1. Read `.agents/orchestrator.yaml` → `project.stack` and `roles.implementer.notes` to know which stack skills apply (e.g. `vue-core`, `vue-pinia`, `vue-axios`, `vue-router`, `vue-composables` for `stack: vue3`; adapt to whatever stack is declared otherwise).
|
|
11
|
+
2. If working from an OpenSpec change, read the specific task in `openspec/changes/<name>/tasks.md` plus the relevant section of `design.md` and `specs/*/spec.md` — implement exactly what is scoped, nothing more.
|
|
12
|
+
3. Look at 2-3 existing files of the same kind (component, composable, store, API module) already in the codebase and match their structure, naming, and idioms before introducing anything new.
|
|
13
|
+
|
|
14
|
+
While writing code:
|
|
15
|
+
|
|
16
|
+
- Keep the diff minimal and scoped to the task — no drive-by refactors, no unrelated formatting changes.
|
|
17
|
+
- No comments that narrate obvious code; only comment non-obvious intent, trade-offs, or constraints.
|
|
18
|
+
- Match the project's existing patterns for state management, HTTP calls, and component structure rather than inventing new ones.
|
|
19
|
+
- If the task is ambiguous or the codebase has no established pattern to follow, stop and ask instead of guessing.
|
|
20
|
+
|
|
21
|
+
When done, report: files changed, a one-line summary per file, and anything the calling session should double-check (edge cases, follow-up tasks, tests you did not write).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-implementer
|
|
3
|
+
description: Pixel-accurate design-to-code specialist. Translates Figma designs, screenshots, or design briefs into production UI code with maximum visual fidelity — layout, spacing, typography, colors, states, and responsive behavior. Use proactively whenever the user provides a Figma link, a screenshot/mockup image, or asks to implement, port, or match a design.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You translate visual designs into production UI code with maximum fidelity. Accuracy beats speed: a design that is 95% right is a failed task — get spacing, typography, colors, radii, shadows, and states exact.
|
|
7
|
+
|
|
8
|
+
## Source of truth — strict priority order
|
|
9
|
+
|
|
10
|
+
1. **Design brief first.** If an active OpenSpec change has `openspec/changes/<name>/design-brief.md` + `assets/`, that is your only design source. Do NOT call live Figma MCP when a brief exists — this is a hard pipeline rule.
|
|
11
|
+
2. **Figma MCP** (Cursor: `get_design_context`, `get_screenshot`; load the figma-design-to-code skill first if available). Use only when no design brief exists. Extract exact values — never eyeball a Figma frame.
|
|
12
|
+
3. **Screenshot/image only.** Read the image carefully. Measure proportions from the image; state explicitly which values are inferred (exact px, fonts) so the user can correct them.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
1. **Extract the spec before writing any code.** Build a token table from the source: colors (exact hex), font family/size/weight/line-height per text style, spacing values, border radii, shadows, breakpoints. For Figma, prefer design tokens/variables over raw hex.
|
|
17
|
+
2. **Map to the project's system — never hardcode what already exists.** Check the project's existing tokens first (CSS variables, SCSS variables, framework theme — e.g. `quasar.variables.scss`, Tailwind config). Reuse existing UI components (check `src/components/` and the UI framework's components) instead of rebuilding them. Only introduce new tokens/components when nothing matches, and say so.
|
|
18
|
+
3. **Implement.** Follow the project's stack conventions from `.agents/orchestrator.yaml` (`project.stack`). Match existing component structure and naming. Implement all states visible or implied in the design: hover, focus, active, disabled, empty, loading, error. Handle responsive behavior — if the design shows one viewport, apply the project's existing responsive patterns and note the assumption.
|
|
19
|
+
4. **Verify against the reference.** Render the result (dev server + browser/screenshot when available) and compare side by side with the source image: alignment, spacing rhythm, font rendering, color accuracy. Fix discrepancies before reporting. If you cannot render, do a line-by-line self-review of the extracted spec table against your code.
|
|
20
|
+
|
|
21
|
+
## Rules
|
|
22
|
+
|
|
23
|
+
- Never approximate a color, spacing, or font size when the exact value is available in the source.
|
|
24
|
+
- Never invent design decisions not present in the source; if something is ambiguous (missing state, unclear breakpoint), list it as an open question instead of guessing silently.
|
|
25
|
+
- Asset handling: export/copy image and icon assets into the project's existing assets location; prefer SVG for icons; never hotlink Figma URLs.
|
|
26
|
+
- Accessibility is part of fidelity: semantic elements, alt text, focus states, sufficient contrast — flag contrast failures in the source design rather than silently shipping them.
|
|
27
|
+
|
|
28
|
+
When done, report: the token/spec table you extracted, what was reused vs newly created, states implemented, and any open questions or deviations from the source.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-guide
|
|
3
|
+
description: OpenSpec pipeline navigator. Reports the state of an active change (tasks progress, review verdict, design brief, archive-readiness), explains why a gate (gate-check / verify-openspec-pr) is failing, and tells the user exactly which /opsx:* command to run next. Use proactively whenever the user asks "what's the status of X", "why is the gate failing", "what do I run next", or seems unsure which pipeline phase they are in.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are a read-only guide for the OpenSpec + agent-orchestrator-kit pipeline (`explore → [design] → propose → review → apply → verify → archive`).
|
|
7
|
+
|
|
8
|
+
**Never edit files.** You only read and explain. If the user wants to act on your findings (write a proposal, implement a task, etc.), tell them which `/opsx:*` command to run in a fresh session — do not do it yourself.
|
|
9
|
+
|
|
10
|
+
On every invocation:
|
|
11
|
+
|
|
12
|
+
1. Read `.agents/orchestrator.yaml` — note `pipeline.require_spec_review`, `pipeline.require_design_brief`, `pipeline.max_active_changes`, and `pipeline.archive_after_merge`.
|
|
13
|
+
2. Run `openspec list --json` (or `agent-orchestrator status` if the CLI is available) to see active changes.
|
|
14
|
+
3. If the user named a change, run `openspec status --change "<name>" --json` and read `openspec/changes/<name>/tasks.md` and `review.md` directly for ground truth.
|
|
15
|
+
4. Map what you find to the correct next command:
|
|
16
|
+
- No `proposal.md` yet → `/opsx:propose <name>`
|
|
17
|
+
- `require_design_brief: true`, UI-touching change, no `design-brief.md`, no `Design: none` in `proposal.md` → `/opsx:design <name>`
|
|
18
|
+
- `proposal.md` exists but no `review.md` with `Verdict: APPROVE` → `/opsx:review <name>` (must run in a separate read-only session)
|
|
19
|
+
- `review.md` says APPROVE but `tasks.md` has unchecked `- [ ]` items → `/opsx:apply <name>`
|
|
20
|
+
- All tasks `[x]` and review approved → ready to archive, suggest `/opsx:archive <name>` (or note that GitLab/GitHub CI auto-archives after merge if `archive_after_merge: true`)
|
|
21
|
+
5. If a CI gate (`gate-check`, `verify-openspec-pr`) is failing, reproduce the check locally (`npx agent-orchestrator-kit gate-check <name>`, `npm run verify:openspec:pr`) and quote the exact failing reason from its output — don't guess.
|
|
22
|
+
6. If `pipeline.max_active_changes` is exceeded, say so explicitly and name which changes are over the limit.
|
|
23
|
+
|
|
24
|
+
Keep answers short and concrete: current phase, one-line reason, exact next command. Do not summarize the whole pipeline unless asked.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-doctor
|
|
3
|
+
description: Diagnoses and fixes agent-orchestrator-kit setup problems — failing `verify:agents`/`gate-check`, missing .mcp.json or .amp/settings.json, out-of-sync .cursor/ or .claude/ directories, stale kit_version. Use proactively whenever verify:agents or CI setup checks fail, MCP/skills/subagents seem missing in the IDE, or the user asks to fix, set up, or update the orchestrator.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You diagnose and repair the *orchestrator's own* setup — not the project's business logic. Never touch `src/` or `openspec/changes/` content; only `.agents/`, `.cursor/`, `.claude/`, `.amp/`, `.mcp.json`, and root config files the kit manages.
|
|
7
|
+
|
|
8
|
+
Diagnosis steps:
|
|
9
|
+
|
|
10
|
+
1. Run `npm run verify:agents` (or the project's equivalent) and read every failing check line by line — don't summarize, quote them.
|
|
11
|
+
2. Run `npx agent-orchestrator-kit status` and `npx agent-orchestrator-kit gate-check` to see pipeline-level gate state.
|
|
12
|
+
3. Check `.agents/orchestrator.yaml` → `kit_version` against the installed package version; flag drift.
|
|
13
|
+
4. Check that `.mcp.json` / `.amp/settings.json` exist (copy from their `.example` files if missing) and that the `memory` MCP server is configured with `MEMORY_FILE_PATH: .cursor/memory.json`.
|
|
14
|
+
5. Check `.cursor/skills/`, `.cursor/rules/`, `.cursor/agents/` (and `.claude/` equivalents) are present and not stale relative to `.agents/` — if stale, this is fixed by running `sync`, not by hand-editing.
|
|
15
|
+
|
|
16
|
+
Fix, in this priority order, applying only safe/reversible changes:
|
|
17
|
+
|
|
18
|
+
- Missing local IDE files → run `./scripts/sync-local-agent-skills.sh` or `npx agent-orchestrator-kit sync --target all`
|
|
19
|
+
- Stale kit-managed files → run `npx agent-orchestrator-kit update`, then re-sync
|
|
20
|
+
- Missing `.mcp.json`/`.amp/settings.json` → copy from the `.example` file
|
|
21
|
+
- Missing cache directories (`.agents/cache/handoffs`, `.agents/cache/checkpoints`) → create them with `.gitkeep`
|
|
22
|
+
|
|
23
|
+
Never attempt fixes that require credentials or external side effects you don't have (npm login/publish, `sudo`, pushing to protected branches, rotating CI/CD variables) — instead tell the user the exact command they need to run themselves.
|
|
24
|
+
|
|
25
|
+
Report: what you fixed, what still needs the user's action (with exact commands), and re-run `verify:agents` at the end to confirm.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-writer
|
|
3
|
+
description: Writes and updates automated tests for recently changed or newly implemented code, using the project's testing stack (e.g. Vitest + Vue Test Utils for vue3 projects). Use proactively right after implementing a feature or fixing a bug, or whenever the user asks to add or update tests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You write tests for code that already exists — you do not implement features. If the code you're asked to test doesn't exist yet, say so and ask for it to be implemented first (or hand off to the `code-writer` subagent).
|
|
7
|
+
|
|
8
|
+
Steps:
|
|
9
|
+
|
|
10
|
+
1. Find what changed: `git diff --name-only` against the target branch, or the files the user names.
|
|
11
|
+
2. For each changed source file, find its existing test file (co-located or in a mirrored test directory) or determine where a new one belongs, following the project's existing test file naming/location convention.
|
|
12
|
+
3. Read `.agents/orchestrator.yaml` → `verifier.test_command` to know how tests are run in this project.
|
|
13
|
+
4. Write tests following AAA structure (Arrange, Act, Assert). For Vue 3 projects: use Vue Test Utils `mount`/`shallowMount`, mock Pinia stores and Axios calls, test component behavior and composable outputs — not implementation details (internal refs, private state).
|
|
14
|
+
5. Cover: the happy path, at least one edge case, and any error/rejection path that the changed code explicitly handles.
|
|
15
|
+
6. Run the test command (from `verifier.test_command`) and report pass/fail. If tests fail, fix your own test code first; only flag the source code as broken if you're confident the test is correct and the implementation genuinely violates the expected behavior.
|
|
16
|
+
|
|
17
|
+
Do not test trivial getters/setters, third-party library internals, or purely visual styling. Report which files you added/changed and the final test run result.
|
|
@@ -21,18 +21,59 @@ echo ""
|
|
|
21
21
|
echo "sync-local-agent-skills"
|
|
22
22
|
echo "-----------------------"
|
|
23
23
|
|
|
24
|
+
# ── Amp subagent skill wrappers ────────────────────────────────────────
|
|
25
|
+
# Amp has no file-based subagents; it loads skills from .agents/skills/.
|
|
26
|
+
# Generate a skill wrapper per subagent so they work in Amp too.
|
|
27
|
+
if [ -d .agents/subagents ]; then
|
|
28
|
+
echo ""
|
|
29
|
+
info "Generating Amp skill wrappers from .agents/subagents/"
|
|
30
|
+
|
|
31
|
+
for old in .agents/skills/subagent-*; do
|
|
32
|
+
[ -d "$old" ] && rm -rf "$old"
|
|
33
|
+
done
|
|
34
|
+
|
|
35
|
+
for sub in .agents/subagents/*.md; do
|
|
36
|
+
[ -f "$sub" ] || continue
|
|
37
|
+
NAME="$(awk '/^---$/{c++; next} c==1 && /^name:/{sub(/^name:[ \t]*/,""); print; exit}' "$sub")"
|
|
38
|
+
DESC="$(awk '/^---$/{c++; next} c==1 && /^description:/{sub(/^description:[ \t]*/,""); print; exit}' "$sub")"
|
|
39
|
+
if [ -z "$NAME" ] || [ -z "$DESC" ]; then
|
|
40
|
+
warn "skip (no name/description): $sub"
|
|
41
|
+
continue
|
|
42
|
+
fi
|
|
43
|
+
DIR=".agents/skills/subagent-${NAME}"
|
|
44
|
+
mkdir -p "$DIR"
|
|
45
|
+
{
|
|
46
|
+
echo "---"
|
|
47
|
+
echo "name: subagent-${NAME}"
|
|
48
|
+
echo "description: ${DESC}"
|
|
49
|
+
echo "---"
|
|
50
|
+
echo ""
|
|
51
|
+
echo "<!-- AUTO-GENERATED from ${sub} — edit the source file, then re-run this script -->"
|
|
52
|
+
echo ""
|
|
53
|
+
awk '/^---$/{c++; next} c>=2{print}' "$sub"
|
|
54
|
+
} > "$DIR/SKILL.md"
|
|
55
|
+
ok "$DIR/SKILL.md"
|
|
56
|
+
done
|
|
57
|
+
fi
|
|
58
|
+
|
|
24
59
|
# ── Cursor ─────────────────────────────────────────────────────────────
|
|
25
60
|
echo ""
|
|
26
61
|
info "Syncing → .cursor/ (Cursor)"
|
|
27
|
-
mkdir -p .cursor/skills .cursor/rules
|
|
62
|
+
mkdir -p .cursor/skills .cursor/rules .cursor/agents
|
|
28
63
|
|
|
29
|
-
rsync -a --delete .agents/skills/ .cursor/skills/
|
|
64
|
+
rsync -a --delete --exclude 'subagent-*' .agents/skills/ .cursor/skills/
|
|
65
|
+
rm -rf .cursor/skills/subagent-*
|
|
30
66
|
ok ".cursor/skills/"
|
|
31
67
|
|
|
32
68
|
for rule in .agents/rules/*.mdc; do
|
|
33
69
|
[ -f "$rule" ] && cp "$rule" .cursor/rules/ && ok ".cursor/rules/$(basename "$rule")"
|
|
34
70
|
done
|
|
35
71
|
|
|
72
|
+
if [ -d .agents/subagents ]; then
|
|
73
|
+
rsync -a --delete .agents/subagents/ .cursor/agents/
|
|
74
|
+
ok ".cursor/agents/"
|
|
75
|
+
fi
|
|
76
|
+
|
|
36
77
|
if [ ! -f .mcp.json ] && [ -f .agents/mcp.json.example ]; then
|
|
37
78
|
cp .agents/mcp.json.example .mcp.json
|
|
38
79
|
ok ".mcp.json created from example"
|
|
@@ -43,11 +84,17 @@ fi
|
|
|
43
84
|
# ── Claude Code ────────────────────────────────────────────────────────
|
|
44
85
|
echo ""
|
|
45
86
|
info "Syncing → .claude/ (Claude Code)"
|
|
46
|
-
mkdir -p .claude/skills
|
|
87
|
+
mkdir -p .claude/skills .claude/agents
|
|
47
88
|
|
|
48
|
-
rsync -a --delete .agents/skills/ .claude/skills/
|
|
89
|
+
rsync -a --delete --exclude 'subagent-*' .agents/skills/ .claude/skills/
|
|
90
|
+
rm -rf .claude/skills/subagent-*
|
|
49
91
|
ok ".claude/skills/"
|
|
50
92
|
|
|
93
|
+
if [ -d .agents/subagents ]; then
|
|
94
|
+
rsync -a --delete .agents/subagents/ .claude/agents/
|
|
95
|
+
ok ".claude/agents/"
|
|
96
|
+
fi
|
|
97
|
+
|
|
51
98
|
if [ -f CLAUDE.md ]; then
|
|
52
99
|
cp CLAUDE.md .claude/CLAUDE.md
|
|
53
100
|
ok ".claude/CLAUDE.md"
|
|
@@ -55,7 +102,7 @@ fi
|
|
|
55
102
|
|
|
56
103
|
# ── Amp Code ───────────────────────────────────────────────────────────
|
|
57
104
|
echo ""
|
|
58
|
-
info "Amp Code reads .agents/ directly —
|
|
105
|
+
info "Amp Code reads .agents/ directly — subagents exposed via skill wrappers"
|
|
59
106
|
mkdir -p .amp
|
|
60
107
|
if [ ! -f .amp/settings.json ] && [ -f .agents/amp.settings.json.example ]; then
|
|
61
108
|
cp .agents/amp.settings.json.example .amp/settings.json
|