@cleocode/cleo 2026.3.4 → 2026.3.7

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.
Files changed (72) hide show
  1. package/dist/cli/index.js +2277 -609
  2. package/dist/cli/index.js.map +4 -4
  3. package/dist/mcp/index.js +1838 -443
  4. package/dist/mcp/index.js.map +4 -4
  5. package/package.json +1 -1
  6. package/packages/ct-skills/index.js +1 -1
  7. package/packages/ct-skills/package.json +0 -2
  8. package/packages/ct-skills/profiles/core.json +1 -1
  9. package/packages/ct-skills/profiles/full.json +4 -5
  10. package/packages/ct-skills/profiles/minimal.json +3 -3
  11. package/packages/ct-skills/profiles/recommended.json +2 -2
  12. package/packages/ct-skills/provider-skills-map.json +97 -0
  13. package/packages/ct-skills/skills/_shared/skill-chaining-patterns.md +23 -26
  14. package/packages/ct-skills/skills/_shared/testing-framework-config.md +9 -9
  15. package/packages/ct-skills/skills/ct-cleo/SKILL.md +21 -1
  16. package/packages/ct-skills/skills/ct-dev-workflow/SKILL.md +1 -1
  17. package/packages/ct-skills/skills/ct-documentor/SKILL.md +1 -1
  18. package/packages/ct-skills/skills/ct-epic-architect/SKILL.md +1 -1
  19. package/packages/ct-skills/skills/ct-orchestrator/SKILL.md +119 -43
  20. package/packages/ct-skills/skills/ct-orchestrator/orchestrator-prompt.txt +17 -0
  21. package/packages/ct-skills/skills/ct-orchestrator/references/orchestrator-patterns.md +1 -1
  22. package/packages/ct-skills/skills/ct-research-agent/SKILL.md +1 -1
  23. package/packages/ct-skills/skills/ct-spec-writer/SKILL.md +1 -1
  24. package/packages/ct-skills/skills/ct-task-executor/SKILL.md +1 -1
  25. package/packages/ct-skills/skills/ct-validator/SKILL.md +1 -1
  26. package/packages/ct-skills/skills/manifest.json +217 -947
  27. package/packages/ct-skills/skills.json +244 -3
  28. package/server.json +4 -4
  29. package/templates/CLEO-INJECTION.md +24 -0
  30. package/packages/ct-skills/protocols/agent-protocol.md +0 -260
  31. package/packages/ct-skills/protocols/artifact-publish.md +0 -587
  32. package/packages/ct-skills/protocols/consensus.md +0 -309
  33. package/packages/ct-skills/protocols/contribution.md +0 -375
  34. package/packages/ct-skills/protocols/decomposition.md +0 -352
  35. package/packages/ct-skills/protocols/implementation.md +0 -344
  36. package/packages/ct-skills/protocols/provenance.md +0 -600
  37. package/packages/ct-skills/protocols/release.md +0 -635
  38. package/packages/ct-skills/protocols/research.md +0 -248
  39. package/packages/ct-skills/protocols/specification.md +0 -287
  40. package/packages/ct-skills/protocols/testing.md +0 -346
  41. package/packages/ct-skills/protocols/validation.md +0 -229
  42. package/packages/ct-skills/skills/ct-gitbook/SKILL.md +0 -516
  43. package/packages/ct-skills/skills/ct-gitbook/assets/SUMMARY.md +0 -28
  44. package/packages/ct-skills/skills/ct-gitbook/assets/gitbook.yaml +0 -14
  45. package/packages/ct-skills/skills/ct-gitbook/references/api-sdk.md +0 -318
  46. package/packages/ct-skills/skills/ct-gitbook/references/auth-sso.md +0 -208
  47. package/packages/ct-skills/skills/ct-gitbook/references/change-requests.md +0 -169
  48. package/packages/ct-skills/skills/ct-gitbook/references/content-blocks.md +0 -230
  49. package/packages/ct-skills/skills/ct-gitbook/references/docs-sites.md +0 -202
  50. package/packages/ct-skills/skills/ct-gitbook/references/git-sync.md +0 -175
  51. package/packages/ct-skills/skills/ct-gitbook/references/llm-ready.md +0 -178
  52. package/packages/ct-skills/skills/ct-gitbook/references/migration.md +0 -263
  53. package/packages/ct-skills/skills/ct-library-implementer-bash/SKILL.md +0 -316
  54. package/packages/ct-skills/skills/ct-skill-lookup/SKILL.md +0 -179
  55. package/packages/ct-skills/skills/ct-test-writer-bats/SKILL.md +0 -347
  56. package/packages/ct-skills/skills/railway-platform/SKILL.md +0 -506
  57. package/packages/ct-skills/skills/railway-platform/_shared/scripts/railway-api.sh +0 -180
  58. package/packages/ct-skills/skills/railway-platform/_shared/scripts/railway-common.sh +0 -262
  59. package/packages/ct-skills/skills/railway-platform/references/01-getting-started.md +0 -149
  60. package/packages/ct-skills/skills/railway-platform/references/02-projects.md +0 -116
  61. package/packages/ct-skills/skills/railway-platform/references/03-services.md +0 -147
  62. package/packages/ct-skills/skills/railway-platform/references/04-deployments.md +0 -210
  63. package/packages/ct-skills/skills/railway-platform/references/05-databases.md +0 -142
  64. package/packages/ct-skills/skills/railway-platform/references/06-environments.md +0 -261
  65. package/packages/ct-skills/skills/railway-platform/references/07-domains.md +0 -139
  66. package/packages/ct-skills/skills/railway-platform/references/08-volumes.md +0 -533
  67. package/packages/ct-skills/skills/railway-platform/references/09-networking.md +0 -592
  68. package/packages/ct-skills/skills/railway-platform/references/10-cron.md +0 -488
  69. package/packages/ct-skills/skills/railway-platform/references/11-functions.md +0 -170
  70. package/packages/ct-skills/skills/railway-platform/references/12-monorepo.md +0 -294
  71. package/packages/ct-skills/skills/railway-platform/references/13-troubleshooting.md +0 -335
  72. package/packages/ct-skills/skills/railway-platform/references/14-railway-metal.md +0 -197
@@ -1,587 +0,0 @@
1
- # Artifact Publish Protocol
2
-
3
- **Version**: 1.0.0
4
- **Type**: Conditional Protocol
5
- **Max Active**: 3 protocols (including base)
6
-
7
- ---
8
-
9
- ## Trigger Conditions
10
-
11
- This protocol activates when the task involves:
12
-
13
- | Trigger | Keywords | Context |
14
- |---------|----------|---------|
15
- | Package Publish | "publish", "package", "distribute" | Registry distribution |
16
- | Artifact Build | "artifact", "build artifact", "bundle" | Build output |
17
- | Container Push | "docker push", "container registry", "image publish" | Container distribution |
18
- | Language Package | "crate", "gem", "wheel", "sdist" | Language-specific publishing |
19
- | Multi-Artifact | "publish all", "release artifacts", "multi-package" | Coordinated publish |
20
-
21
- **Explicit Override**: `--protocol artifact-publish` flag on task creation.
22
-
23
- **Relationship to Release Protocol**: This protocol orchestrates artifact building and publishing. The release protocol orchestrates version bumping, tagging, and changelog. They compose: release triggers artifact-publish for the distribution phase.
24
-
25
- ---
26
-
27
- ## Requirements (RFC 2119)
28
-
29
- ### MUST
30
-
31
- | Requirement | Description |
32
- |-------------|-------------|
33
- | ARTP-001 | MUST validate artifact configuration before build |
34
- | ARTP-002 | MUST execute dry-run before any real publish |
35
- | ARTP-003 | MUST follow handler interface contract: `validate -> build -> publish` |
36
- | ARTP-004 | MUST generate SHA-256 checksums for all built artifacts |
37
- | ARTP-005 | MUST record provenance metadata via `record_release()` |
38
- | ARTP-006 | MUST use sequential execution for multi-artifact publish |
39
- | ARTP-007 | MUST set `agent_type: "artifact-publish"` in manifest |
40
- | ARTP-008 | MUST NOT store credentials in config, output, or manifest |
41
- | ARTP-009 | MUST halt pipeline and attempt rollback on first publish failure |
42
-
43
- ### SHOULD
44
-
45
- | Requirement | Description |
46
- |-------------|-------------|
47
- | ARTP-010 | SHOULD verify registry reachability before publish |
48
- | ARTP-011 | SHOULD validate version consistency between config and artifact metadata |
49
- | ARTP-012 | SHOULD log all publish operations to audit trail |
50
- | ARTP-013 | SHOULD verify build output exists and is non-empty before publish |
51
-
52
- ### MAY
53
-
54
- | Requirement | Description |
55
- |-------------|-------------|
56
- | ARTP-020 | MAY batch validation across all artifacts before starting builds |
57
- | ARTP-021 | MAY generate SBOM alongside artifacts (delegate to provenance protocol) |
58
- | ARTP-022 | MAY sign artifacts using configured signing method (delegate to provenance protocol) |
59
-
60
- ---
61
-
62
- ## Artifact Lifecycle
63
-
64
- ### State Machine
65
-
66
- ```
67
- configured -> validated -> built -> published
68
- | | |
69
- failed failed failed -> rollback
70
- ```
71
-
72
- ### State Transitions
73
-
74
- | From | To | Trigger | Condition |
75
- |------|----|---------|-----------|
76
- | configured | validated | `validate_artifact()` returns 0 | Config present, handler exists |
77
- | configured | failed | `validate_artifact()` returns non-0 | Missing config, bad handler |
78
- | validated | built | `build_artifact()` returns 0 | Validate passed |
79
- | validated | failed | `build_artifact()` returns non-0 | Build error |
80
- | built | published | `publish_artifact()` returns 0 | Build output exists |
81
- | built | failed | `publish_artifact()` returns non-0 | Registry error, auth error |
82
- | failed | rollback | Automatic on publish failure | Prior artifacts already published |
83
-
84
- ### Per-Artifact State Tracking
85
-
86
- ```json
87
- {
88
- "type": "npm-package",
89
- "state": "published",
90
- "checksum": "sha256:abc123...",
91
- "buildOutput": "dist/",
92
- "publishedAt": "2026-01-26T14:00:00Z",
93
- "dryRun": false
94
- }
95
- ```
96
-
97
- ---
98
-
99
- ## Handler Interface
100
-
101
- ### Contract
102
-
103
- Every artifact type implements three functions following `lib/release-artifacts.sh`:
104
-
105
- ```bash
106
- {prefix}_validate(artifact_config_json) -> exit 0|1
107
- {prefix}_build(artifact_config_json, dry_run) -> exit 0|1
108
- {prefix}_publish(artifact_config_json, dry_run) -> exit 0|1
109
- ```
110
-
111
- ### Registered Handlers (9 types)
112
-
113
- | Artifact Type | Handler Prefix | Default Build | Default Publish |
114
- |---------------|----------------|---------------|-----------------|
115
- | `npm-package` | `npm_package` | (none) | `npm publish` |
116
- | `python-wheel` | `python_wheel` | `python -m build` | `twine upload dist/*` |
117
- | `python-sdist` | `python_sdist` | `python -m build --sdist` | `twine upload dist/*` |
118
- | `go-module` | `go_module` | `go mod tidy` | Git tag push |
119
- | `cargo-crate` | `cargo_crate` | `cargo build --release` | `cargo publish` |
120
- | `ruby-gem` | `ruby_gem` | `gem build *.gemspec` | `gem push *.gem` |
121
- | `docker-image` | `docker_image` | `docker build -t <registry>:latest .` | `docker push <registry>:latest` |
122
- | `github-release` | `github_release` | (none) | `gh release create` |
123
- | `generic-tarball` | `generic_tarball` | `tar czf` | (custom) |
124
-
125
- ### Execution Decision Tree
126
-
127
- ```
128
- Is artifact type in config?
129
- +-- NO -> Exit 85 (E_ARTIFACT_TYPE_UNKNOWN)
130
- +-- YES
131
- +-- has_artifact_handler(type)?
132
- | +-- NO -> Exit 85 (E_ARTIFACT_TYPE_UNKNOWN)
133
- | +-- YES -> Proceed
134
- +-- Is artifact enabled? (.enabled != false)
135
- +-- NO -> Skip (log: "Artifact disabled")
136
- +-- YES -> Execute pipeline: validate -> build -> publish
137
- ```
138
-
139
- ### Custom Handlers
140
-
141
- ```bash
142
- source lib/release-artifacts.sh
143
-
144
- my_custom_validate() { ... }
145
- my_custom_build() { ... }
146
- my_custom_publish() { ... }
147
-
148
- register_artifact_handler "my-custom-type" "my_custom"
149
- ```
150
-
151
- ---
152
-
153
- ## Configuration Schema Reference
154
-
155
- Artifacts configured in `.cleo/config.json` under `release.artifacts[]`:
156
-
157
- ```json
158
- {
159
- "release": {
160
- "artifacts": [
161
- {
162
- "type": "npm-package",
163
- "enabled": true,
164
- "package": "package.json",
165
- "buildCommand": "npm run build",
166
- "publishCommand": "npm publish",
167
- "registry": "https://registry.npmjs.org",
168
- "options": {
169
- "access": "public",
170
- "provenance": true,
171
- "tag": "latest"
172
- },
173
- "credentials": {
174
- "envVar": "NPM_TOKEN",
175
- "ciSecret": "NPM_TOKEN",
176
- "required": true
177
- }
178
- }
179
- ]
180
- }
181
- }
182
- ```
183
-
184
- ### Config Fields
185
-
186
- | Field | Type | Required | Description |
187
- |-------|------|----------|-------------|
188
- | `type` | string | MUST | One of 9 registered handler types |
189
- | `enabled` | boolean | MAY | Default: `true`. Set `false` to skip |
190
- | `package` | string | MAY | Path to package manifest |
191
- | `buildCommand` | string | MAY | Override default build command |
192
- | `publishCommand` | string | MAY | Override default publish command |
193
- | `registry` | string | MAY | Registry URL |
194
- | `options` | object | MAY | Handler-specific publish options |
195
- | `credentials` | object | SHOULD | Credential reference (not the credential itself) |
196
-
197
- ---
198
-
199
- ## Multi-Artifact Orchestration
200
-
201
- ### Pipeline Phases
202
-
203
- | Phase | Scope | On Failure |
204
- |-------|-------|------------|
205
- | 1. Pre-validate | All artifacts | Halt before any build |
206
- | 2. Build | Sequential per artifact | Halt pipeline |
207
- | 3. Publish | Sequential per artifact | Rollback published artifacts |
208
-
209
- Artifacts MUST be processed sequentially in config array order.
210
-
211
- ### Phase 1: Pre-Validate All
212
-
213
- ```bash
214
- for artifact in $(echo "$config" | jq -c '.release.artifacts[]'); do
215
- type=$(echo "$artifact" | jq -r '.type')
216
- validate_artifact "$type" "$artifact" || exit 86
217
- done
218
- ```
219
-
220
- ### Phase 2: Build Sequential
221
-
222
- ```bash
223
- built_artifacts=()
224
- for artifact in $(echo "$config" | jq -c '.release.artifacts[]'); do
225
- type=$(echo "$artifact" | jq -r '.type')
226
- build_artifact "$type" "$artifact" "$dry_run" || exit 87
227
- built_artifacts+=("$type")
228
- done
229
- ```
230
-
231
- ### Phase 3: Publish with Rollback
232
-
233
- ```bash
234
- published_artifacts=()
235
- for artifact in $(echo "$config" | jq -c '.release.artifacts[]'); do
236
- type=$(echo "$artifact" | jq -r '.type')
237
- if ! publish_artifact "$type" "$artifact" "$dry_run"; then
238
- rollback_published "${published_artifacts[@]}"
239
- exit 88
240
- fi
241
- published_artifacts+=("$type")
242
- done
243
- ```
244
-
245
- ---
246
-
247
- ## Rollback Semantics
248
-
249
- ### Per-Registry Feasibility
250
-
251
- | Artifact Type | Rollback Method | Feasibility |
252
- |---------------|----------------|-------------|
253
- | `npm-package` | `npm unpublish <pkg>@<version>` (within 72h) | Partial |
254
- | `python-wheel` | No API unpublish; yank via PyPI admin | Manual |
255
- | `docker-image` | Registry API delete | Full |
256
- | `github-release` | `gh release delete <tag>` | Full |
257
- | `cargo-crate` | `cargo yank --version <ver>` | Partial (yank only) |
258
- | `ruby-gem` | `gem yank <gem> -v <version>` | Full |
259
- | `go-module` | Retract directive in go.mod | Partial |
260
- | `generic-tarball` | Delete uploaded file | Depends on target |
261
-
262
- ### Rollback Decision Tree
263
-
264
- ```
265
- Publish failed at artifact[i]?
266
- +-- i == 0 -> No rollback needed (nothing published)
267
- +-- i > 0
268
- +-- --no-rollback flag set?
269
- | +-- YES -> Log warning, exit 88
270
- | +-- NO -> Attempt rollback of artifacts[0..i-1]
271
- +-- Rollback succeeded?
272
- +-- YES -> Exit 88 (clean failure)
273
- +-- NO -> Exit 89 (dirty failure, manual intervention)
274
- ```
275
-
276
- ---
277
-
278
- ## Registry Abstraction
279
-
280
- ### Universal Interface
281
-
282
- | Operation | Description | Implementation |
283
- |-----------|-------------|----------------|
284
- | `validate` | Check handler exists, config valid | `validate_artifact(type, config)` |
285
- | `build` | Produce artifact from source | `build_artifact(type, config, dry_run)` |
286
- | `publish` | Push artifact to registry | `publish_artifact(type, config, dry_run)` |
287
- | `check_reachability` | Verify registry accessible | Handler-specific (SHOULD) |
288
-
289
- ### Per-Registry Auth and Behavior
290
-
291
- | Registry | Auth Mechanism | Version Source | Publish Idempotency |
292
- |----------|----------------|----------------|---------------------|
293
- | npm | `NPM_TOKEN` env var | `package.json:version` | Error on duplicate |
294
- | PyPI | `TWINE_PASSWORD` env var | `pyproject.toml:version` | Error on duplicate |
295
- | crates.io | `CARGO_REGISTRY_TOKEN` env var | `Cargo.toml:version` | Error on duplicate |
296
- | RubyGems | `GEM_HOST_API_KEY` env var | `*.gemspec:version` | Error on duplicate |
297
- | Docker | `docker login` session | Tag string | Overwrites silently |
298
- | GitHub | `GITHUB_TOKEN` env var | Git tag | Error on duplicate |
299
- | Go Proxy | No auth (tag-based) | `go.mod:module` + Git tag | Immutable |
300
-
301
- ---
302
-
303
- ## Credential Handling
304
-
305
- ### Declarative Model
306
-
307
- Agents MUST NOT store, log, or embed credentials. Agents declare credential requirements; the environment provides them.
308
-
309
- ### Credential Resolution Order
310
-
311
- | Priority | Source | Context |
312
- |----------|--------|---------|
313
- | 1 | Environment variable (`credentials.envVar`) | Local and CI |
314
- | 2 | CI secret injection (`credentials.ciSecret`) | CI only |
315
- | 3 | Credential manager (keychain/vault) | Future |
316
-
317
- ### Validation Decision Tree
318
-
319
- ```
320
- Is credentials.required == true?
321
- +-- NO -> Proceed without credential check
322
- +-- YES
323
- +-- Is $envVar set in environment?
324
- | +-- YES -> Credential available, proceed
325
- | +-- NO
326
- | +-- Is --dry-run set?
327
- | | +-- YES -> Warn, proceed (skip publish)
328
- | | +-- NO -> Exit 90 (credential missing)
329
- +-- Is credential value non-empty?
330
- +-- YES -> Proceed
331
- +-- NO -> Exit 90 (credential missing)
332
- ```
333
-
334
- ### Agent Prohibitions
335
-
336
- | MUST NOT | Rationale |
337
- |----------|-----------|
338
- | Echo/log credential values | Exposure in audit trail |
339
- | Store credentials in config.json | Committed to version control |
340
- | Include credentials in manifest entry | Visible to orchestrator |
341
- | Pass credentials as CLI arguments | Visible in `ps` output |
342
- | Store credentials in output files | Readable by other agents |
343
-
344
- ---
345
-
346
- ## Error Codes (85-89)
347
-
348
- | Code | Constant | Meaning | Recovery |
349
- |------|----------|---------|----------|
350
- | 85 | `E_ARTIFACT_TYPE_UNKNOWN` | Artifact type not registered | Check config type field, verify handler exists |
351
- | 86 | `E_ARTIFACT_VALIDATION_FAILED` | Pre-build validation failed | Fix package manifest, check tool availability |
352
- | 87 | `E_ARTIFACT_BUILD_FAILED` | Build command returned non-zero | Check build output, verify dependencies |
353
- | 88 | `E_ARTIFACT_PUBLISH_FAILED` | Publish failed (rollback attempted) | Check registry auth, network, version conflicts |
354
- | 89 | `E_ARTIFACT_ROLLBACK_FAILED` | Rollback failed | Manual intervention required |
355
-
356
- ### Recoverability
357
-
358
- | Code | Recoverable | Agent Action |
359
- |------|:-----------:|--------------|
360
- | 85 | No | Fix config, re-run |
361
- | 86 | Yes | Fix manifest, retry |
362
- | 87 | Yes | Fix build, retry |
363
- | 88 | Yes | Fix auth/network, retry |
364
- | 89 | No | Manual intervention |
365
-
366
- ---
367
-
368
- ## Validation Gates
369
-
370
- ### Pre-Publish Checklist
371
-
372
- | Gate | Check | Required | Command |
373
- |------|-------|----------|---------|
374
- | Config Valid | `validate_release_config()` returns 0 | MUST | `source lib/release-config.sh` |
375
- | Handler Exists | `has_artifact_handler(type)` returns 0 | MUST | `source lib/release-artifacts.sh` |
376
- | Artifact Valid | `validate_artifact(type, config)` returns 0 | MUST | Per handler |
377
- | Version Consistent | Package manifest version matches release | SHOULD | Handler-specific |
378
- | Credential Available | `$envVar` is set and non-empty | MUST (if required) | `[[ -n "${!envVar}" ]]` |
379
- | Dry-Run Success | Full pipeline succeeds with `dry_run=true` | MUST | Per ARTP-002 |
380
- | Build Output Exists | Build produced expected files | SHOULD | Handler-specific |
381
- | Checksum Generated | SHA-256 computed for all artifacts | MUST | `sha256sum <artifact>` |
382
- | Registry Reachable | Network check to registry | SHOULD | Handler-specific |
383
- | Provenance Recorded | `record_release()` called | MUST | Post-publish |
384
-
385
- ### Gate Execution Order
386
-
387
- ```
388
- 1. Config Valid (blocks all)
389
- 2. Handler Exists (blocks validate)
390
- 3. Credential Available (blocks publish)
391
- 4. Artifact Valid (blocks build)
392
- 5. Dry-Run Success (blocks real publish)
393
- 6. Build + Checksum (blocks publish)
394
- 7. Registry Reachable (blocks publish)
395
- 8. Publish
396
- 9. Provenance Recorded (post-publish)
397
- ```
398
-
399
- ---
400
-
401
- ## Output Format
402
-
403
- ### File Output
404
-
405
- ```markdown
406
- # Artifact Publish: {Description}
407
-
408
- **Task**: T####
409
- **Date**: YYYY-MM-DD
410
- **Status**: complete|partial|blocked
411
- **Agent Type**: artifact-publish
412
-
413
- ---
414
-
415
- ## Summary
416
-
417
- {2-3 sentence summary of artifacts published}
418
-
419
- ## Pipeline Results
420
-
421
- | # | Artifact Type | State | Checksum | Registry |
422
- |---|---------------|-------|----------|----------|
423
- | 1 | npm-package | published | sha256:abc1... | npmjs.org |
424
- | 2 | docker-image | published | sha256:def2... | ghcr.io |
425
-
426
- ## Validation Results
427
-
428
- | Gate | Status | Notes |
429
- |------|--------|-------|
430
- | Config Valid | PASS | 2 artifacts configured |
431
- | Handlers Exist | PASS | npm-package, docker-image |
432
- | Credentials | PASS | NPM_TOKEN, GITHUB_TOKEN set |
433
- | Dry-Run | PASS | All pipelines succeeded |
434
- | Checksums | PASS | SHA-256 generated |
435
- | Provenance | PASS | Recorded to releases.json |
436
- ```
437
-
438
- ### Manifest Entry
439
-
440
- ```bash
441
- cleo research add \
442
- --title "Artifact Publish: vX.Y.Z" \
443
- --file "YYYY-MM-DD_artifact-publish-vXYZ.md" \
444
- --topics "artifact-publish,npm-package,docker-image,release" \
445
- --findings "2 artifacts published,All checksums verified,Provenance recorded" \
446
- --status complete \
447
- --task T#### \
448
- --not-actionable \
449
- --agent-type artifact-publish
450
- ```
451
-
452
- ---
453
-
454
- ## Integration Points
455
-
456
- ### Base Protocol
457
-
458
- - Inherits task lifecycle (start, execute, complete)
459
- - Inherits manifest append requirement
460
- - Inherits error handling patterns
461
-
462
- ### Protocol Interactions
463
-
464
- | Combined With | Behavior |
465
- |---------------|----------|
466
- | release | Release protocol triggers artifact-publish for distribution phase |
467
- | provenance | Artifact-publish calls provenance for signing and attestation |
468
- | implementation | Implementation builds are inputs to artifact builds |
469
- | contribution | Contribution records feed artifact provenance chain |
470
-
471
- ### Composition with Release Protocol
472
-
473
- ```
474
- Release Protocol Artifact Publish Protocol
475
- --- ---
476
- 1. Version bump
477
- 2. Changelog generation
478
- 3. Validation gates
479
- 4. Git commit + tag
480
- 5. ---- HANDOFF ----------------------> 6. Load artifact config
481
- 7. Pre-validate all artifacts
482
- 8. Build all artifacts
483
- 9. Publish all artifacts
484
- 10. Record provenance
485
- 11. <--- RETURN ---------------------- 11. Return pipeline results
486
- 12. Push to remote
487
- 13. Update release status
488
- ```
489
-
490
- ### CI/CD Integration
491
-
492
- | Event | Workflow | Artifact Action |
493
- |-------|----------|-----------------|
494
- | Tag push `v*.*.*` | `release.yml` | Build tarball, checksums, GitHub Release |
495
- | Manual dispatch | `artifact-publish.yml` | Full pipeline from config |
496
- | PR merge to main | `build-check.yml` | Dry-run only (validation) |
497
-
498
- ---
499
-
500
- ## Workflow Sequence
501
-
502
- ```
503
- 1. Read task requirements (cleo show T####)
504
- 2. Start task (cleo start T####)
505
- 3. Load release config (source lib/release-config.sh)
506
- 4. Enumerate enabled artifacts (get_artifact_type)
507
- 5. Pre-validate all artifacts (validate_artifact loop)
508
- 6. Check credentials for all artifacts
509
- 7. Execute dry-run for all artifacts
510
- 8. Build all artifacts sequentially
511
- 9. Generate checksums for all built artifacts
512
- 10. Publish all artifacts sequentially (rollback on failure)
513
- 11. Record provenance (record_release)
514
- 12. Write output file
515
- 13. Append manifest entry
516
- 14. Complete task (cleo complete T####)
517
- 15. Return: "Artifact publish complete. See MANIFEST.jsonl for summary."
518
- ```
519
-
520
- ---
521
-
522
- ## Example
523
-
524
- **Task**: Publish CLEO v0.85.0 artifacts
525
-
526
- **Config** (`.cleo/config.json` excerpt):
527
- ```json
528
- {
529
- "release": {
530
- "artifacts": [
531
- {
532
- "type": "npm-package",
533
- "enabled": true,
534
- "package": "mcp-server/package.json",
535
- "buildCommand": "cd mcp-server && npm run build",
536
- "options": { "access": "public" },
537
- "credentials": { "envVar": "NPM_TOKEN", "required": true }
538
- },
539
- {
540
- "type": "generic-tarball",
541
- "enabled": true,
542
- "buildCommand": "tar czf cleo-0.85.0.tar.gz --exclude=.git ."
543
- }
544
- ]
545
- }
546
- }
547
- ```
548
-
549
- **Manifest Entry Command**:
550
- ```bash
551
- cleo research add \
552
- --title "Artifact Publish: v0.85.0" \
553
- --file "2026-02-09_artifact-publish-v0850.md" \
554
- --topics "artifact-publish,npm-package,generic-tarball,v0.85.0" \
555
- --findings "npm-package published to npmjs,tarball built,Checksums verified,Provenance recorded" \
556
- --status complete \
557
- --task T3200 \
558
- --epic T3147 \
559
- --not-actionable \
560
- --agent-type artifact-publish
561
- ```
562
-
563
- **Return Message**:
564
- ```
565
- Artifact publish complete. See MANIFEST.jsonl for summary.
566
- ```
567
-
568
- ---
569
-
570
- ## Anti-Patterns
571
-
572
- | Pattern | Why Avoid |
573
- |---------|-----------|
574
- | Publishing without dry-run first | Irreversible registry state |
575
- | Storing credentials in config.json | Committed to VCS, visible to agents |
576
- | Parallel multi-artifact publish | Race conditions, partial state on failure |
577
- | Skipping checksum generation | Cannot verify artifact integrity |
578
- | Publishing without version check | Duplicate version errors |
579
- | Ignoring publish failures | Inconsistent state across registries |
580
- | Logging credential values | Exposure in audit trail and context |
581
- | Building without validation | Wastes time on invalid config |
582
- | Manual rollback without recording | Lost provenance chain |
583
- | Hardcoding registry URLs | Breaks across environments |
584
-
585
- ---
586
-
587
- *Protocol Version 1.0.0 - Artifact Publish Protocol*