agent-orchestrator-kit 0.1.4 → 0.1.5

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 CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.5] - 2026-06-27
6
+
7
+ ### Added
8
+ - **`init --ci gitlab|github|none`** — CI provider flag (default: `github`)
9
+ - **GitLab verify** — `.gitlab/agent-verify.yml` fragment with multi-PM detect (npm/yarn/pnpm)
10
+ - **PM-aware prebuild hook** — `verify:openspec` + `prebuild` injection on `--ci gitlab` (zero DevOps config via `npm run build`)
11
+ - **Starter example** — `templates/.gitlab-ci.starter.yml.example` for early push before DevOps owns root CI
12
+ - **OpenSpec specs** — `gitlab-consumer-verify`, `kit-ci-verify` synced to `openspec/specs/`
13
+
14
+ ### Changed
15
+ - **`update`** refreshes `.gitlab/agent-verify.yml` via `KIT_MANAGED_PATHS`
16
+ - **README + AGENTS.md** — GitLab verifier path documented (prebuild hook, not GitHub Actions)
17
+ - **`printNextSteps`** — GitLab hints for `--ci gitlab` users
18
+
5
19
  ## [0.1.4] - 2026-06-27
6
20
 
7
21
  ### Added
@@ -49,6 +63,7 @@ All notable changes to this project will be documented in this file.
49
63
  ### Added
50
64
  - Initial release: 5-role orchestration pipeline, `/opsx:*` commands, IDE sync
51
65
 
66
+ [0.1.5]: https://github.com/makshc2/agent-orchestrator-kit/compare/v0.1.4...v0.1.5
52
67
  [0.1.4]: https://github.com/makshc2/agent-orchestrator-kit/compare/v0.1.3...v0.1.4
53
68
  [0.1.3]: https://github.com/makshc2/agent-orchestrator-kit/compare/v0.1.2...v0.1.3
54
69
  [0.1.2]: https://github.com/makshc2/agent-orchestrator-kit/compare/v0.1.1...v0.1.2
package/README.md CHANGED
@@ -64,6 +64,24 @@ npx agent-orchestrator-kit init \
64
64
  --lang uk
65
65
  ```
66
66
 
67
+ For GitLab-hosted projects (verify via `prebuild` hook — no GitHub Actions):
68
+
69
+ ```bash
70
+ npx agent-orchestrator-kit init --ci gitlab
71
+ ```
72
+
73
+ This installs `.gitlab/agent-verify.yml`, injects `verify:openspec` and PM-aware `prebuild` into `package.json`. When DevOps runs `npm run build` (or yarn/pnpm build), npm lifecycle runs `prebuild` first → `npx openspec validate --all --strict` executes automatically.
74
+
75
+ Optional dev-controlled CI before DevOps setup: copy `templates/.gitlab-ci.starter.yml.example` from the kit to `.gitlab-ci.yml` and adjust stages as needed.
76
+
77
+ Skip CI files entirely:
78
+
79
+ ```bash
80
+ npx agent-orchestrator-kit init --ci none
81
+ ```
82
+
83
+ Default remains GitHub Actions (`--ci github`).
84
+
67
85
  ### Sync to local IDEs
68
86
 
69
87
  After init (and after every update):
@@ -80,7 +98,8 @@ This copies `.agents/` to your local IDE directories (not committed to git).
80
98
  your-project/
81
99
  ├── AGENTS.md
82
100
  ├── CLAUDE.md
83
- ├── .github/workflows/agent-verify.yml # CI: openspec validate + lint + build
101
+ ├── .github/workflows/agent-verify.yml # CI (default --ci github)
102
+ ├── .gitlab/agent-verify.yml # CI fragment (--ci gitlab)
84
103
  ├── .agents/
85
104
  │ ├── orchestrator.yaml
86
105
  │ ├── mcp.json.example # Cursor MCP template
@@ -106,7 +125,7 @@ your-project/
106
125
  | Orchestration | 5-role pipeline, `AGENTS.md`, `orchestrator.yaml`, review command |
107
126
  | OpenSpec skills | All 7 skills for `/opsx:*` workflow |
108
127
  | IDE sync | Cursor + Claude Code sync script |
109
- | CI | `agent-verify.yml` (openspec validate, lint, build, test) |
128
+ | CI | `agent-verify.yml` — GitHub (default) or GitLab fragment + `prebuild` hook |
110
129
  | MCP templates | Memory MCP for Cursor and Amp |
111
130
 
112
131
  ### Not included (install separately)
@@ -285,7 +304,7 @@ npm run lint # must pass
285
304
 
286
305
  ### Role 5: Verifier — CI (automatic)
287
306
 
288
- Installed at `.github/workflows/agent-verify.yml`:
307
+ **GitHub (default `--ci github`):** installed at `.github/workflows/agent-verify.yml`:
289
308
 
290
309
  ```yaml
291
310
  - run: npx openspec validate --all --strict
@@ -294,6 +313,17 @@ Installed at `.github/workflows/agent-verify.yml`:
294
313
  - run: npm test --if-present
295
314
  ```
296
315
 
316
+ **GitLab (`--ci gitlab`):** verify runs through the package manager build lifecycle — no GitHub Actions:
317
+
318
+ ```json
319
+ "verify:openspec": "npx openspec validate --all --strict",
320
+ "prebuild": "npm run verify:openspec"
321
+ ```
322
+
323
+ When CI or a developer runs `npm run build`, npm executes `prebuild` first. DevOps pipelines that already call `npm run build` get OpenSpec validate with zero config changes.
324
+
325
+ Optional: include `.gitlab/agent-verify.yml` in `.gitlab-ci.yml` for full lint/build/test verify before DevOps owns the root CI file. See kit `templates/.gitlab-ci.starter.yml.example`.
326
+
297
327
  Blocks merge if any gate fails.
298
328
 
299
329
  ---
@@ -429,6 +459,7 @@ npx agent-orchestrator-kit init [options]
429
459
  --profile <name> Stack profile: generic | vue3 | node | mvp
430
460
  --lang <code> Agent language: en | uk | ...
431
461
  --name <name> Project name (default: directory name)
462
+ --ci <provider> CI provider: gitlab | github | none (default: github)
432
463
  --force Overwrite existing files
433
464
 
434
465
  npx agent-orchestrator-kit update
@@ -470,6 +501,16 @@ openspec/ # Committed — spec-driven workflow
470
501
 
471
502
  ## Changelog
472
503
 
504
+ ### 0.1.5
505
+ - `init --ci gitlab|github|none` — GitLab verify via prebuild hook + CI fragment
506
+ - PM-aware `verify:openspec` / `prebuild` injection for GitLab projects
507
+ - `.gitlab/agent-verify.yml` template + starter example
508
+ - `update` refreshes GitLab fragment; docs for GitLab verifier path
509
+
510
+ ### 0.1.4
511
+ - Kit repo CI — `.github/workflows/agent-verify.yml`
512
+ - OpenSpec devDependency for local and CI validation
513
+
473
514
  ### 0.1.3
474
515
  - Fix gitignore dedup (exact line match, not substring)
475
516
  - Add `.claude` to gitignore on init
@@ -28,9 +28,13 @@ const KIT_MANAGED_PATHS = [
28
28
  '.agents/rules',
29
29
  ...KIT_SKILL_DIRS.map((s) => `.agents/skills/${s}`),
30
30
  '.github/workflows/agent-verify.yml',
31
+ '.gitlab/agent-verify.yml',
31
32
  'scripts/sync-local-agent-skills.sh',
32
33
  ];
33
34
 
35
+ const VALID_CI_PROVIDERS = ['gitlab', 'github', 'none'];
36
+ const VERIFY_OPENSPEC_SCRIPT = 'npx openspec validate --all --strict';
37
+
34
38
  const GITIGNORE_LINES = ['.cursor', '.cursor/memory.json', '.amp/settings.json', '.claude'];
35
39
 
36
40
  const log = {
@@ -146,6 +150,79 @@ function installOpenspecConfigExample(projectDir, profile, vars, force) {
146
150
  }
147
151
  }
148
152
 
153
+ function resolveCiProvider(ci) {
154
+ if (VALID_CI_PROVIDERS.includes(ci)) return ci;
155
+ log.warn(`Unknown --ci value "${ci}". Valid: ${VALID_CI_PROVIDERS.join(', ')}. Using github.`);
156
+ return 'github';
157
+ }
158
+
159
+ function injectVerifyScripts(projectDir, { pm }) {
160
+ const pkgPath = join(projectDir, 'package.json');
161
+ if (!existsSync(pkgPath)) {
162
+ log.warn('skip script injection: no package.json');
163
+ return;
164
+ }
165
+
166
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
167
+ if (!pkg.scripts) pkg.scripts = {};
168
+
169
+ if (pkg.scripts['verify:openspec']) {
170
+ log.warn('skip (exists): verify:openspec script');
171
+ } else {
172
+ pkg.scripts['verify:openspec'] = VERIFY_OPENSPEC_SCRIPT;
173
+ log.ok('verify:openspec script added');
174
+ }
175
+
176
+ const runCmd = `${pm} run verify:openspec`;
177
+ const existingPrebuild = pkg.scripts.prebuild;
178
+
179
+ if (existingPrebuild && existingPrebuild.includes('verify:openspec')) {
180
+ log.warn('skip (exists): prebuild already chains verify:openspec');
181
+ } else if (existingPrebuild) {
182
+ pkg.scripts.prebuild = `${runCmd} && ${existingPrebuild}`;
183
+ log.ok('prebuild script chained');
184
+ } else {
185
+ pkg.scripts.prebuild = runCmd;
186
+ log.ok('prebuild script added');
187
+ }
188
+
189
+ writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
190
+ }
191
+
192
+ function installCi(projectDir, templateDir, ci, force) {
193
+ if (ci === 'none') {
194
+ log.info('CI install skipped (--ci none)');
195
+ return;
196
+ }
197
+
198
+ if (ci === 'github') {
199
+ const githubWorkflow = join(templateDir, '.github', 'workflows', 'agent-verify.yml');
200
+ const githubDest = join(projectDir, '.github', 'workflows', 'agent-verify.yml');
201
+ if (!existsSync(githubWorkflow)) return;
202
+ if (!force && existsSync(githubDest)) {
203
+ log.warn('skip (exists): .github/workflows/agent-verify.yml');
204
+ return;
205
+ }
206
+ mkdirSync(dirname(githubDest), { recursive: true });
207
+ copyFileSync(githubWorkflow, githubDest);
208
+ log.ok('.github/workflows/agent-verify.yml');
209
+ return;
210
+ }
211
+
212
+ if (ci === 'gitlab') {
213
+ const gitlabFragment = join(templateDir, '.gitlab', 'agent-verify.yml');
214
+ const gitlabDest = join(projectDir, '.gitlab', 'agent-verify.yml');
215
+ if (!existsSync(gitlabFragment)) return;
216
+ if (!force && existsSync(gitlabDest)) {
217
+ log.warn('skip (exists): .gitlab/agent-verify.yml');
218
+ return;
219
+ }
220
+ mkdirSync(dirname(gitlabDest), { recursive: true });
221
+ copyFileSync(gitlabFragment, gitlabDest);
222
+ log.ok('.gitlab/agent-verify.yml');
223
+ }
224
+ }
225
+
149
226
  function patchOrchestratorVerifier(projectDir, pm) {
150
227
  const orchPath = join(projectDir, '.agents', 'orchestrator.yaml');
151
228
  if (!existsSync(orchPath)) return;
@@ -168,7 +245,7 @@ function patchOrchestratorVerifier(projectDir, pm) {
168
245
  writeFileSync(orchPath, content);
169
246
  }
170
247
 
171
- function printNextSteps(profile, projectDir) {
248
+ function printNextSteps(profile, projectDir, ci = 'github') {
172
249
  const pm = detectPackageManager(projectDir);
173
250
  const openspecReady = hasOpenSpec(projectDir);
174
251
  const lines = [`${pc.bold('Next steps:')}`];
@@ -206,6 +283,11 @@ function printNextSteps(profile, projectDir) {
206
283
  lines.push(` ${pc.dim(`Detected package manager: ${pm} (verifier commands updated in orchestrator.yaml)`)}`);
207
284
  }
208
285
 
286
+ if (ci === 'gitlab') {
287
+ lines.push(` ${pc.dim(`GitLab verify: ${pm} run build triggers prebuild → verify:openspec automatically`)}`);
288
+ lines.push(` ${pc.dim('Optional dev CI: include local .gitlab/agent-verify.yml (see kit templates/.gitlab-ci.starter.yml.example)')}`);
289
+ }
290
+
209
291
  console.log('\n' + lines.join('\n') + '\n');
210
292
  }
211
293
 
@@ -236,17 +318,20 @@ program
236
318
  .option('--lang <lang>', 'Agent response language (en | uk | ...)', 'en')
237
319
  .option('--name <name>', 'Project name (defaults to directory name)')
238
320
  .option('--force', 'Overwrite existing files', false)
321
+ .option('--ci <provider>', 'CI provider: gitlab | github | none', 'github')
239
322
  .action((opts) => {
240
323
  const projectDir = process.cwd();
241
324
  const projectName = opts.name || basename(projectDir);
242
325
  const profile = resolveProfile(opts.profile);
243
326
  const pm = detectPackageManager(projectDir);
327
+ const ci = resolveCiProvider(opts.ci);
244
328
 
245
329
  log.title(`agent-orchestrator init v${KIT_VERSION}`);
246
330
  log.info(`Project: ${projectName}`);
247
331
  log.info(`Profile: ${profile}`);
248
332
  log.info(`Language: ${opts.lang}`);
249
333
  log.info(`Package manager: ${pm}`);
334
+ log.info(`CI provider: ${ci}`);
250
335
 
251
336
  const templateDir = join(KIT_ROOT, 'templates');
252
337
  const profileDir = join(KIT_ROOT, 'profiles', profile);
@@ -265,16 +350,9 @@ program
265
350
  } catch {}
266
351
 
267
352
  log.title('Installing CI workflow');
268
- const githubWorkflow = join(templateDir, '.github', 'workflows', 'agent-verify.yml');
269
- const githubDest = join(projectDir, '.github', 'workflows', 'agent-verify.yml');
270
- if (existsSync(githubWorkflow)) {
271
- if (!opts.force && existsSync(githubDest)) {
272
- log.warn('skip (exists): .github/workflows/agent-verify.yml');
273
- } else {
274
- mkdirSync(dirname(githubDest), { recursive: true });
275
- copyFileSync(githubWorkflow, githubDest);
276
- log.ok('.github/workflows/agent-verify.yml');
277
- }
353
+ installCi(projectDir, templateDir, ci, opts.force);
354
+ if (ci === 'gitlab') {
355
+ injectVerifyScripts(projectDir, { pm });
278
356
  }
279
357
 
280
358
  log.title('Installing root files');
@@ -311,7 +389,7 @@ program
311
389
 
312
390
  log.title('Done');
313
391
  log.ok(`agent-orchestrator-kit v${KIT_VERSION} installed`);
314
- printNextSteps(profile, projectDir);
392
+ printNextSteps(profile, projectDir, ci);
315
393
  });
316
394
 
317
395
  program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-orchestrator-kit",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Universal AI agent orchestration kit for Cursor, Claude Code, and Amp Code — spec-driven pipeline with OpenSpec integration",
5
5
  "keywords": [
6
6
  "ai-agent",
@@ -0,0 +1,36 @@
1
+ .agent-verify-base:
2
+ image: node:20
3
+ before_script:
4
+ - |
5
+ if [ -f pnpm-lock.yaml ]; then
6
+ export PM=pnpm
7
+ corepack enable
8
+ pnpm install --frozen-lockfile
9
+ elif [ -f yarn.lock ]; then
10
+ export PM=yarn
11
+ yarn install --frozen-lockfile
12
+ else
13
+ export PM=npm
14
+ npm ci
15
+ fi
16
+ script:
17
+ - npx openspec validate --all --strict
18
+ - |
19
+ run_pm_script() {
20
+ local name=$1
21
+ if [ "$PM" = "npm" ]; then
22
+ npm run "$name" --if-present
23
+ elif node -e "process.exit(require('./package.json').scripts?.['${name}'] ? 0 : 1)"; then
24
+ $PM run "$name"
25
+ fi
26
+ }
27
+ run_pm_script lint
28
+ run_pm_script build
29
+ run_pm_script test
30
+
31
+ agent-verify:
32
+ extends: .agent-verify-base
33
+ rules:
34
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
35
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
36
+ - if: $CI_COMMIT_BRANCH == "develop"
@@ -0,0 +1,5 @@
1
+ include:
2
+ - local: '.gitlab/agent-verify.yml'
3
+
4
+ agent-verify:
5
+ extends: .agent-verify-base
@@ -24,6 +24,8 @@ Never mix phases in one chat — this is the single most important rule.
24
24
  | Implementer | `/opsx:apply <name>` | writes `src/` | strong |
25
25
  | Verifier | CI (automatic) | scripts only | — |
26
26
 
27
+ Verifier runs on **GitHub Actions** (default) or **GitLab** via `prebuild` → `verify:openspec` when using `init --ci gitlab`. GitLab projects do not use `.github/workflows/`.
28
+
27
29
  ## Hard Rules
28
30
 
29
31
  - **One active change per developer** at a time.