@oisincoveney/pipeline 1.18.1 → 1.19.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/dist/config.js CHANGED
@@ -57,6 +57,290 @@ const RETRY_REASONS = [
57
57
  const SCHEDULE_BASELINES = ["epic", "pipe"];
58
58
  const SCHEDULING_ROLES = ["coverage", "implementation"];
59
59
  const PIPELINE_GATEWAY_SERVER_ID = "pipeline-gateway";
60
+ const PACKAGE_DEFAULT_RUNNERS_YAML = `version: 1
61
+ runners:
62
+ codex:
63
+ type: codex
64
+ model: gpt-5.5
65
+ capabilities:
66
+ native_subagents: true
67
+ rules: true
68
+ skills: true
69
+ mcp_servers: true
70
+ tools: [read, list, grep, glob, bash, edit, write]
71
+ filesystem: [read-only, workspace-write]
72
+ network: [inherit, disabled]
73
+ output_formats: [text, json, jsonl, json_schema]
74
+ opencode:
75
+ type: opencode
76
+ model: default
77
+ capabilities:
78
+ native_subagents: true
79
+ rules: true
80
+ skills: true
81
+ mcp_servers: true
82
+ tools: [read, list, grep, glob, bash, edit, write]
83
+ filesystem: [read-only, workspace-write]
84
+ network: [inherit, disabled]
85
+ output_formats: [text, json, jsonl, json_schema]
86
+ command:
87
+ type: command
88
+ capabilities:
89
+ native_subagents: false
90
+ rules: false
91
+ skills: false
92
+ mcp_servers: false
93
+ tools: [bash]
94
+ filesystem: [read-only, workspace-write]
95
+ network: [inherit, disabled]
96
+ output_formats: [text, json]
97
+ `;
98
+ const PACKAGE_DEFAULT_PROFILES_YAML = `version: 1
99
+ mcp_gateway:
100
+ provider: toolhive
101
+ mode: local
102
+ url_env: PIPELINE_MCP_GATEWAY_URL
103
+ authorization_env: PIPELINE_MCP_GATEWAY_AUTHORIZATION
104
+ default_profile: default
105
+ profiles:
106
+ orchestrator:
107
+ runner: codex
108
+ instructions: { inline: "Orchestrate package-owned pipeline config." }
109
+ mcp_servers: [pipeline-gateway]
110
+ tools: [read, list, grep, glob, bash]
111
+ filesystem: { mode: read-only, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
112
+ network: { mode: inherit }
113
+ pipeline-researcher:
114
+ runner: codex
115
+ description: Research the requested task and produce structured findings.
116
+ instructions: { inline: "Inspect first-party source, tests, docs, and task context before proposing changes." }
117
+ mcp_servers: [pipeline-gateway]
118
+ tools: [read, list, grep, glob, bash]
119
+ filesystem: { mode: read-only, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
120
+ network: { mode: inherit }
121
+ pipeline-inspector:
122
+ runner: codex
123
+ description: Inspect the repository without modifying files.
124
+ instructions: { inline: "Inspect the repository without modifying files." }
125
+ mcp_servers: [pipeline-gateway]
126
+ tools: [read, list, grep, glob, bash]
127
+ filesystem: { mode: read-only, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
128
+ network: { mode: inherit }
129
+ pipeline-schedule-planner:
130
+ runner: codex
131
+ description: Refine a baseline schedule into a specialized approved-plan artifact.
132
+ instructions: { inline: "Generate exactly one workflow named root as an explicit schedule graph. Return YAML only." }
133
+ mcp_servers: [pipeline-gateway]
134
+ tools: [read, list, grep, glob, bash]
135
+ filesystem: { mode: read-only, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
136
+ network: { mode: inherit }
137
+ pipeline-test-writer:
138
+ runner: codex
139
+ description: Add focused failing tests for the requested behavior.
140
+ instructions: { inline: "Add focused failing tests for the requested behavior only. Do not change production code." }
141
+ mcp_servers: [pipeline-gateway]
142
+ tools: [read, list, grep, glob, bash, edit, write]
143
+ filesystem: { mode: workspace-write, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
144
+ network: { mode: inherit }
145
+ pipeline-epic-router:
146
+ runner: codex
147
+ description: Route epic sub-tickets into fixed implementation tracks.
148
+ instructions: { inline: "Route epic sub-tickets into implementation tracks." }
149
+ mcp_servers: [pipeline-gateway]
150
+ tools: [read, list, grep, glob, bash]
151
+ filesystem: { mode: read-only, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
152
+ network: { mode: inherit }
153
+ pipeline-code-writer:
154
+ runner: codex
155
+ scheduling_roles: [implementation]
156
+ description: Implement production code until the failing tests pass.
157
+ instructions: { inline: "Implement the smallest production change that satisfies the failing tests." }
158
+ mcp_servers: [pipeline-gateway]
159
+ tools: [read, list, grep, glob, bash, edit, write]
160
+ filesystem: { mode: workspace-write, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
161
+ network: { mode: inherit }
162
+ pipeline-acceptance-reviewer:
163
+ runner: codex
164
+ scheduling_roles: [coverage]
165
+ description: Audit the finished change against every acceptance criterion.
166
+ instructions: { inline: "Audit the completed change against each canonical acceptance criterion independently." }
167
+ mcp_servers: [pipeline-gateway]
168
+ tools: [read, list, grep, glob, bash]
169
+ filesystem: { mode: read-only, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
170
+ network: { mode: inherit }
171
+ pipeline-thermo-nuclear-reviewer:
172
+ runner: codex
173
+ scheduling_roles: [coverage]
174
+ description: Perform the final thermo-nuclear code quality review of the integration branch.
175
+ instructions: { inline: "Perform the final code quality review of the integration branch." }
176
+ mcp_servers: [pipeline-gateway]
177
+ tools: [read, list, grep, glob, bash]
178
+ filesystem: { mode: read-only, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
179
+ network: { mode: inherit }
180
+ pipeline-verifier:
181
+ runner: codex
182
+ scheduling_roles: [coverage]
183
+ description: Verify checks, implementation fit, and final evidence.
184
+ instructions: { inline: "Verify checks, implementation fit, and final evidence." }
185
+ mcp_servers: [pipeline-gateway]
186
+ tools: [read, list, grep, glob, bash]
187
+ filesystem: { mode: read-only, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
188
+ network: { mode: inherit }
189
+ pipeline-learner:
190
+ runner: codex
191
+ description: Store durable lessons from the completed run.
192
+ instructions: { inline: "Store durable lessons from the completed run when useful." }
193
+ mcp_servers: [pipeline-gateway]
194
+ tools: [read, list, grep, glob, bash]
195
+ filesystem: { mode: read-only, allow: ["**/*"], deny: ["node_modules/**", "dist/**", ".git/**"] }
196
+ network: { mode: inherit }
197
+ `;
198
+ const PACKAGE_DEFAULT_PIPELINE_YAML = `version: 1
199
+ default_workflow: default
200
+ entrypoints:
201
+ pipe:
202
+ schedule: pipe-schedule
203
+ description: Full pipeline
204
+ inspect:
205
+ workflow: inspect
206
+ description: Read-only repository inspection
207
+ epic:
208
+ schedule: epic-schedule
209
+ description: Route an epic's tickets into specialist tracks, run them in parallel, then thermo-nuclear review.
210
+ orchestrator:
211
+ profile: orchestrator
212
+ hooks:
213
+ functions:
214
+ generated-defaults-audit:
215
+ kind: command
216
+ command: [node, -e, "process.exit(0)"]
217
+ trusted: true
218
+ timeout_ms: 5000
219
+ output_limit_bytes: 4096
220
+ on:
221
+ workflow.start:
222
+ - id: generated-defaults-audit
223
+ function: generated-defaults-audit
224
+ failure: fail
225
+ schedules:
226
+ pipe-schedule:
227
+ baseline: pipe
228
+ planner_profile: pipeline-schedule-planner
229
+ epic-schedule:
230
+ baseline: epic
231
+ planner_profile: pipeline-schedule-planner
232
+ workflows:
233
+ inspect:
234
+ description: Read-only repository inspection workflow.
235
+ nodes:
236
+ - id: inspect
237
+ kind: agent
238
+ profile: pipeline-inspector
239
+ default:
240
+ description: Default research, red, green, acceptance, verify, learn workflow.
241
+ nodes:
242
+ - id: research
243
+ kind: agent
244
+ profile: pipeline-researcher
245
+ - id: red
246
+ kind: agent
247
+ profile: pipeline-test-writer
248
+ needs: [research]
249
+ gates:
250
+ - id: red-test-file-policy
251
+ kind: changed_files
252
+ changed_files:
253
+ allow: ["**/*.test.*", "**/*.spec.*", "**/*_test.*", "**/__tests__/**", "test/**", "tests/**", "**/*.snap"]
254
+ require_any: ["**/*.test.*", "**/*.spec.*", "**/*_test.*", "**/__tests__/**", "test/**", "tests/**"]
255
+ - id: green
256
+ kind: agent
257
+ profile: pipeline-code-writer
258
+ needs: [red]
259
+ - id: acceptance
260
+ kind: agent
261
+ profile: pipeline-acceptance-reviewer
262
+ needs: [green]
263
+ gates:
264
+ - id: acceptance-coverage
265
+ kind: acceptance
266
+ target: stdout
267
+ required: false
268
+ - id: acceptance-verdict
269
+ kind: verdict
270
+ target: stdout
271
+ - id: verify
272
+ kind: agent
273
+ profile: pipeline-verifier
274
+ needs: [acceptance]
275
+ gates:
276
+ - id: verify-typecheck
277
+ kind: builtin
278
+ builtin: typecheck
279
+ - id: verify-tests
280
+ kind: builtin
281
+ builtin: test
282
+ - id: verify-semgrep
283
+ kind: builtin
284
+ builtin: semgrep
285
+ - id: verify-duplication
286
+ kind: builtin
287
+ builtin: duplication
288
+ - id: verify-verdict
289
+ kind: verdict
290
+ target: stdout
291
+ - id: learn
292
+ kind: agent
293
+ profile: pipeline-learner
294
+ needs: [verify]
295
+ infra:
296
+ description: Default-shaped stub workflow for infrastructure specialization.
297
+ nodes:
298
+ - id: research
299
+ kind: agent
300
+ profile: pipeline-researcher
301
+ - id: red
302
+ kind: agent
303
+ profile: pipeline-test-writer
304
+ needs: [research]
305
+ - id: green
306
+ kind: agent
307
+ profile: pipeline-code-writer
308
+ needs: [red]
309
+ - id: acceptance
310
+ kind: agent
311
+ profile: pipeline-acceptance-reviewer
312
+ needs: [green]
313
+ - id: verify
314
+ kind: agent
315
+ profile: pipeline-verifier
316
+ needs: [acceptance]
317
+ - id: learn
318
+ kind: agent
319
+ profile: pipeline-learner
320
+ needs: [verify]
321
+ epic-drain:
322
+ description: Route epic work, execute implementation, drain merge, and review.
323
+ nodes:
324
+ - id: research
325
+ kind: agent
326
+ profile: pipeline-researcher
327
+ - id: plan
328
+ kind: agent
329
+ profile: pipeline-epic-router
330
+ needs: [research]
331
+ - id: implement
332
+ kind: workflow
333
+ workflow: infra
334
+ needs: [plan]
335
+ - id: merge
336
+ kind: builtin
337
+ builtin: drain-merge
338
+ needs: [implement]
339
+ - id: review
340
+ kind: agent
341
+ profile: pipeline-thermo-nuclear-reviewer
342
+ needs: [merge]
343
+ `;
60
344
  var PipelineConfigError = class extends Error {
61
345
  code;
62
346
  issues;
@@ -485,16 +769,26 @@ function addConfigSchemaIssue(ctx, path, message) {
485
769
  });
486
770
  }
487
771
  function loadPipelineConfig(projectRoot, options = {}) {
488
- const missing = [
772
+ const paths = [
489
773
  PIPELINE_CONFIG_PATH,
490
774
  PROFILES_CONFIG_PATH,
491
775
  RUNNERS_CONFIG_PATH
492
- ].filter((path) => !existsSync(join(projectRoot, path)));
776
+ ];
777
+ const missing = paths.filter((path) => !existsSync(join(projectRoot, path)));
493
778
  if (missing.length > 0) {
494
779
  if (existsSync(join(projectRoot, LEGACY_CONFIG_PATH))) throw new PipelineConfigError("PIPELINE_CONFIG_LEGACY_UNSUPPORTED", `${LEGACY_CONFIG_PATH} is not supported by the v1 pipeline config. Create ${PIPELINE_CONFIG_PATH}.`, [{
495
780
  path: LEGACY_CONFIG_PATH,
496
781
  message: "legacy TOML config found"
497
782
  }]);
783
+ if (missing.length === paths.length) return parsePipelineConfigParts({
784
+ pipeline: PACKAGE_DEFAULT_PIPELINE_YAML,
785
+ profiles: PACKAGE_DEFAULT_PROFILES_YAML,
786
+ runners: PACKAGE_DEFAULT_RUNNERS_YAML
787
+ }, projectRoot, {
788
+ pipeline: "@oisincoveney/pipeline/defaults/pipeline.yaml",
789
+ profiles: "@oisincoveney/pipeline/defaults/profiles.yaml",
790
+ runners: "@oisincoveney/pipeline/defaults/runners.yaml"
791
+ }, options);
498
792
  throw new PipelineConfigError("PIPELINE_CONFIG_MISSING", `Missing required pipeline config files: ${missing.join(", ")}`, missing.map((path) => ({
499
793
  path,
500
794
  message: "file does not exist"
@@ -507,10 +801,6 @@ function loadPipelineConfig(projectRoot, options = {}) {
507
801
  }, projectRoot, void 0, options);
508
802
  }
509
803
  function tryLoadPipelineConfig(projectRoot, options = {}) {
510
- if (!existsSync(join(projectRoot, ".pipeline/pipeline.yaml"))) {
511
- if (existsSync(join(projectRoot, LEGACY_CONFIG_PATH))) return loadPipelineConfig(projectRoot, options);
512
- return null;
513
- }
514
804
  return loadPipelineConfig(projectRoot, options);
515
805
  }
516
806
  function parsePipelineConfigYaml(source, sourcePath = PIPELINE_CONFIG_PATH, projectRoot) {
package/dist/hooks.d.ts CHANGED
@@ -13,8 +13,8 @@ declare const hookResultSchema: z.ZodObject<{
13
13
  taskContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
14
14
  }, z.core.$strict>>;
15
15
  status: z.ZodEnum<{
16
- fail: "fail";
17
16
  pass: "pass";
17
+ fail: "fail";
18
18
  skip: "skip";
19
19
  }>;
20
20
  summary: z.ZodOptional<z.ZodString>;
package/dist/index.js CHANGED
@@ -256,7 +256,7 @@ function createCliProgram() {
256
256
  const cwd = process.env.PIPELINE_TARGET_PATH ?? process.cwd();
257
257
  console.log(await localGatewayStatus(cwd));
258
258
  });
259
- program.command("init").description("Scaffold the default .pipeline/pipeline.yaml workflow").option("--overwrite", "replace existing pipeline scaffold files", false).action(async (flags) => {
259
+ program.command("init").description("Initialize package-owned pipeline support without repo-local config").option("--overwrite", "replace existing pipeline scaffold files", false).action(async (flags) => {
260
260
  const result = await initPipelineProject({
261
261
  cwd: process.env.PIPELINE_TARGET_PATH ?? process.cwd(),
262
262
  overwrite: flags.overwrite ?? false
@@ -379,12 +379,12 @@ function projectAgentsMdDefinition(cwd, host) {
379
379
  "",
380
380
  "## Pipeline Guidance",
381
381
  "",
382
- "This repository is configured with `@oisincoveney/pipeline`.",
382
+ "This repository uses package-owned `@oisincoveney/pipeline` config.",
383
383
  "",
384
384
  "- Use `$pipe`, `$inspect`, or `$epic` for Codex skill entrypoints when the user asks for pipeline workflows.",
385
385
  "- Use `/pipe`, `/inspect`, or `/epic` for Codex or OpenCode slash-command entrypoints when available.",
386
386
  "- Load and follow the relevant skill from `.agents/skills` before doing specialized work.",
387
- "- Prefer the generated pipeline profiles and command surfaces over ad hoc subagent prompts.",
387
+ "- Prefer the package-defined pipeline profiles and generated command surfaces over ad hoc subagent prompts.",
388
388
  "",
389
389
  "## Pipeline Memory",
390
390
  "",