@yandy-r/ycc-opencode 6.1.1 → 6.2.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.
Files changed (126) hide show
  1. package/README.md +7 -3
  2. package/agents/code-researcher.md +3 -3
  3. package/agents/feature-researcher.md +1 -1
  4. package/agents/implementor.md +4 -4
  5. package/agents/pr-comment-fixer.md +1 -1
  6. package/agents/release-fix-applier.md +1 -1
  7. package/agents/review-fixer.md +1 -1
  8. package/index.js +146 -95
  9. package/package.json +1 -1
  10. package/registration.json +0 -4
  11. package/shared/references/artifact-store.md +613 -0
  12. package/shared/references/branch-prep.md +2 -0
  13. package/shared/references/forge-detection.md +3 -2
  14. package/shared/references/review-artifact-format.md +13 -6
  15. package/shared/references/review-checklist.md +3 -2
  16. package/shared/references/review-dispatch.md +15 -10
  17. package/shared/references/target-capability-matrix.md +140 -32
  18. package/shared/references/visual-mode.md +19 -13
  19. package/shared/references/worktree-strategy.md +12 -8
  20. package/shared/scripts/artifact-body.sh +71 -0
  21. package/shared/scripts/artifact-store-pointer.sh +245 -0
  22. package/shared/scripts/ci-monitor.sh +9 -4
  23. package/shared/scripts/collect-linear-keys.sh +77 -0
  24. package/shared/scripts/lib/ci-classify.sh +13 -10
  25. package/shared/scripts/lib/forge.sh +13 -4
  26. package/shared/scripts/prepare-feature-branch.sh +118 -10
  27. package/shared/scripts/release-ci-monitor.sh +2 -2
  28. package/shared/scripts/report-bundle-drift.sh +1 -1
  29. package/shared/scripts/resolve-artifact-store.sh +636 -0
  30. package/shared/scripts/validate-file-paths.sh +11 -4
  31. package/skills/blueprint/SKILL.md +48 -13
  32. package/skills/bundle-release/scripts/draft-notes.sh +1 -1
  33. package/skills/bundle-release/scripts/release_versions.py +9 -1
  34. package/skills/clean/SKILL.md +1 -1
  35. package/skills/clean/scripts/detect-project-type.sh +2 -2
  36. package/skills/clean/scripts/generate-report.sh +34 -5
  37. package/skills/clean/scripts/validate-safety.sh +9 -6
  38. package/skills/code-report/SKILL.md +26 -14
  39. package/skills/code-report/scripts/check-prerequisites.sh +72 -12
  40. package/skills/code-report/templates/report-structure.md +1 -1
  41. package/skills/code-review/SKILL.md +68 -17
  42. package/skills/code-review/references/pr-procedure.md +28 -15
  43. package/skills/compatibility-audit/SKILL.md +10 -5
  44. package/skills/compatibility-audit/references/reading-the-report.md +4 -1
  45. package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +64 -7
  46. package/skills/compatibility-audit/scripts/audit-target-features.sh +13 -10
  47. package/skills/deep-research/SKILL.md +28 -5
  48. package/skills/deep-research/references/completion-summary-template.md +3 -2
  49. package/skills/deep-research/scripts/validate-research.sh +8 -2
  50. package/skills/feature-research/SKILL.md +48 -25
  51. package/skills/feature-research/scripts/validate-research.sh +51 -12
  52. package/skills/feature-research/scripts/validate-spec.sh +53 -22
  53. package/skills/feature-research/templates/research-agents.md +15 -14
  54. package/skills/feature-research/templates/spec-structure.md +5 -0
  55. package/skills/formatters/scripts/apply-aliases.sh +3 -1
  56. package/skills/formatters/scripts/apply-ci.sh +3 -1
  57. package/skills/git-workflow/SKILL.md +2 -1
  58. package/skills/git-workflow/references/pr-creation.md +10 -0
  59. package/skills/git-workflow/scripts/analyze-changes.sh +21 -11
  60. package/skills/git-workflow/scripts/create-pr.sh +51 -6
  61. package/skills/git-workflow/scripts/validate-commit.sh +26 -14
  62. package/skills/hooks-workflow/scripts/verify-hooks.sh +1 -1
  63. package/skills/implement-plan/SKILL.md +35 -16
  64. package/skills/implement-plan/references/agent-task-prompt.md +8 -5
  65. package/skills/implement-plan/references/linear-sync.md +20 -0
  66. package/skills/implement-plan/references/output-formats.md +17 -2
  67. package/skills/implement-plan/references/plan-inputs.md +23 -4
  68. package/skills/implement-plan/scripts/check-prerequisites.sh +95 -49
  69. package/skills/implement-plan/scripts/parse-dependencies.sh +10 -10
  70. package/skills/init/SKILL.md +77 -42
  71. package/skills/init/references/flag-reference.md +41 -17
  72. package/skills/init/references/project-profile-heuristics.md +3 -0
  73. package/skills/init/references/template-library.md +15 -5
  74. package/skills/init/scripts/profile-project.sh +26 -0
  75. package/skills/init/scripts/render-template.py +2 -2
  76. package/skills/init/templates/AGENTS.md.tmpl +6 -0
  77. package/skills/init/templates/git/gitignore.tmpl +5 -0
  78. package/skills/orchestrate/SKILL.md +17 -2
  79. package/skills/parallel-plan/SKILL.md +14 -8
  80. package/skills/plan/SKILL.md +18 -2
  81. package/skills/plan/references/planning-tracks.md +1 -1
  82. package/skills/plan-workflow/SKILL.md +67 -32
  83. package/skills/plan-workflow/references/checkpoint-messages.md +23 -14
  84. package/skills/plan-workflow/references/plan-structure.md +1 -1
  85. package/skills/plan-workflow/references/planning-agents.md +11 -9
  86. package/skills/plan-workflow/references/research-agents-optimized.md +12 -10
  87. package/skills/plan-workflow/references/research-agents.md +11 -10
  88. package/skills/plan-workflow/scripts/check-prerequisites.sh +50 -11
  89. package/skills/plan-workflow/scripts/check-state.sh +53 -9
  90. package/skills/plan-workflow/scripts/persist-or-fail.sh +21 -7
  91. package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +28 -14
  92. package/skills/plan-workflow/scripts/validate-research-artifacts.sh +35 -10
  93. package/skills/plan-workflow/scripts/validate-shared.sh +56 -15
  94. package/skills/plan-workflow/scripts/validate-workflow-plan.sh +48 -17
  95. package/skills/pr-autofix/SKILL.md +19 -4
  96. package/skills/pr-autofix/references/output-templates.md +3 -2
  97. package/skills/pr-autofix/scripts/fetch-pr-comments.sh +1 -2
  98. package/skills/pr-autofix/scripts/post-summary.sh +1 -2
  99. package/skills/pr-autofix/scripts/resolve-thread.sh +3 -4
  100. package/skills/prp-implement/SKILL.md +31 -16
  101. package/skills/prp-implement/references/agent-task-prompt.md +5 -2
  102. package/skills/prp-implement/references/detection.md +4 -1
  103. package/skills/prp-implement/references/linear-sync.md +25 -0
  104. package/skills/prp-implement/references/report-output.md +15 -2
  105. package/skills/prp-plan/SKILL.md +62 -30
  106. package/skills/prp-plan/references/enhanced-researchers.md +8 -9
  107. package/skills/prp-plan/scripts/validate-prp-plan.sh +42 -18
  108. package/skills/prp-pr/SKILL.md +14 -1
  109. package/skills/prp-prd/SKILL.md +21 -9
  110. package/skills/prp-spec/SKILL.md +30 -20
  111. package/skills/quick-fix/SKILL.md +6 -4
  112. package/skills/quick-review/SKILL.md +62 -25
  113. package/skills/release-model/scripts/collect-signals.sh +9 -3
  114. package/skills/releaser/scripts/publish-release.sh +6 -3
  115. package/skills/research-to-issues/SKILL.md +33 -14
  116. package/skills/research-to-issues/scripts/validate-prerequisites.sh +45 -23
  117. package/skills/research-to-issues/templates/task-issue.md +4 -0
  118. package/skills/research-to-issues/templates/tracking-issue.md +3 -0
  119. package/skills/review-fix/SKILL.md +96 -14
  120. package/skills/review-fix/references/fix-report.md +10 -10
  121. package/skills/review-fix/references/plan.md +5 -2
  122. package/skills/shared-context/SKILL.md +14 -11
  123. package/skills/visual-plan/SKILL.md +26 -8
  124. package/skills/visual-recap/SKILL.md +1 -1
  125. package/skills/write-docs/scripts/audit-documentation.sh +44 -10
  126. package/skills/write-docs/scripts/generate-doc-index.sh +10 -3
@@ -10,6 +10,8 @@ The helper echoes the prepared branch name on success.
10
10
 
11
11
  "Trunk" means `main`/`master`/`trunk`/`develop`, plus the `trunk` named in `RELEASING.md` when the repo has one (`branching-model.md` in this directory). Rows marked _(RELEASING.md)_ apply only when `release-state.sh get` reports `present=1`; without the file the helper behaves exactly as it did before the release model.
12
12
 
13
+ "Plan-only dirty" means every changed, staged or untracked path is a plan artifact for the slug (`docs/plans/<slug>/*`, `docs/orchestration/<slug>*`, `docs/prps/{plans,specs,prds}/<slug>*`), matched from the repository root or from the directory the helper runs in (package-local `scope: local` plans), or a `.gitignore` whose only change, in the working tree, the index or both, appends one `.ycc/artifacts/` rule line.
14
+
13
15
  | Current State | Helper Behavior |
14
16
  | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
15
17
  | On `feat/<slug>` | Idempotent no-op; echoes branch and exits 0 |
@@ -76,8 +76,9 @@ Never call the host API to check auth — use the local status commands:
76
76
  # github
77
77
  command -v gh >/dev/null && gh auth status >/dev/null 2>&1 # → authed
78
78
 
79
- # forgejo / gitea (tea has no `auth status`; a configured login is the signal)
80
- command -v tea >/dev/null && tea login list 2>/dev/null | grep -q '://'
79
+ # forgejo / gitea (tea has no `auth status`; a configured login is the signal).
80
+ # Capture, then match: `tea login list | grep -q` SIGPIPEs tea under pipefail.
81
+ command -v tea >/dev/null && ( logins="$(tea login list 2>/dev/null || true)"; grep -q '://' <<<"$logins" )
81
82
 
82
83
  # gitlab
83
84
  command -v glab >/dev/null && glab auth status >/dev/null 2>&1
@@ -9,18 +9,25 @@
9
9
  - Status field rules
10
10
  - Required fields per finding
11
11
 
12
- Canonical schema for review artifacts written to `docs/prps/reviews/`.
12
+ Canonical schema for review artifacts, written to `docs/prps/reviews/` (local
13
+ store) or `.ycc/artifacts/<slug>/reviews/` (linear store, the default).
13
14
  `/ycc:code-review` writes it (both modes). `/ycc:review-fix`, `/ycc:quick-fix`,
14
15
  and `/ycc:quick-review` parse it. Do not deviate — downstream skills parse
15
16
  these fields mechanically.
16
17
 
17
18
  ## File locations
18
19
 
19
- | Mode | Path |
20
- | ----- | ----------------------------------------------------- |
21
- | Local | `docs/prps/reviews/local-{YYYYMMDD-HHMMSS}-review.md` |
22
- | PR | `docs/prps/reviews/pr-{NUMBER}-review.md` |
23
- | Quick | `docs/prps/reviews/quick-{YYYYMMDD-HHMMSS}-review.md` |
20
+ | Artifact | Local store | Linear store (cache; one Linear Document each) |
21
+ | ------------ | ----------------------------------------------------- | ----------------------------------------------------------------- |
22
+ | Local review | `docs/prps/reviews/local-{YYYYMMDD-HHMMSS}-review.md` | `.ycc/artifacts/<slug>/reviews/local-{YYYYMMDD-HHMMSS}-review.md` |
23
+ | PR review | `docs/prps/reviews/pr-{NUMBER}-review.md` | `.ycc/artifacts/<slug>/reviews/pr-{NUMBER}-review.md` |
24
+ | Quick review | `docs/prps/reviews/quick-{YYYYMMDD-HHMMSS}-review.md` | `.ycc/artifacts/<slug>/reviews/quick-{YYYYMMDD-HHMMSS}-review.md` |
25
+ | Fix report | `docs/prps/reviews/fixes/{review-id}-fixes.md` | `.ycc/artifacts/<slug>/reviews/{review-id}-fixes.md` |
26
+
27
+ Resolve every path with `resolve-artifact-store.sh --kind=review-<id>` or
28
+ `--kind=review-fixes-<id>`; never build it by hand. Mode, slug, Linear
29
+ Document parent, scratch directories, and fix-input lookup: see
30
+ `artifact-store.md` > Review and report skills.
24
31
 
25
32
  ## Template
26
33
 
@@ -142,7 +142,8 @@ After all 3 foreground reviewer calls return candidate reports and their scratch
142
142
  1. For any reviewer whose `subagent` return was empty, missing, or malformed,
143
143
  treat that reviewer as a failure for that role (do not fabricate findings
144
144
  for it). In Path B only, the scratch file at
145
- `docs/prps/reviews/.review-scratch/<run-id>/<reviewer-name>.md` is the
145
+ `<review-dir>/.review-scratch/<run-id>/<reviewer-name>.md` (`<review-dir>`
146
+ is the resolved review file's directory; see review-dispatch.md) is the
146
147
  calling skill's own copy of the inline returns it already received, not a
147
148
  second source to recover from.
148
149
  2. Combine by severity (CRITICAL first, then HIGH, MEDIUM, LOW).
@@ -156,6 +157,6 @@ Pass the merged findings to the REPORT phase as if they came from a single-pass
156
157
  review.
157
158
 
158
159
  **Cleanup**: after a successful merge, the calling skill should remove the
159
- `docs/prps/reviews/.review-scratch/<run-id>/` directory.
160
+ `<review-dir>/.review-scratch/<run-id>/` directory.
160
161
 
161
162
  ---
@@ -18,13 +18,18 @@ from `{{package-root}}/shared/references/review-checklist.md`.
18
18
  That reference defines the roster, severity rubric, findings-format directive
19
19
  and merge procedure. Prompt contract follows below.
20
20
 
21
- Run-id and scratch paths per mode:
21
+ Run-id and scratch paths per mode. `<review-dir>` is the directory of the
22
+ resolved review file, `$(dirname "$OUT")` (local mode: `docs/prps/reviews`,
23
+ unchanged; linear mode: `.ycc/artifacts/<slug>/reviews`). Quick mode in linear
24
+ mode fans out before the Linear call gate, so its scratch dir is a `mktemp -d`
25
+ directory outside the repository instead. Scratch is never pushed to Linear or
26
+ committed.
22
27
 
23
- | Mode | run-id | scratch dir |
24
- | ----- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
25
- | Local | `local-<TIMESTAMP>` (one canonical timestamp per invocation; reused for the Phase 3 review filename) | `docs/prps/reviews/.review-scratch/local-<TIMESTAMP>/` |
26
- | PR | `pr-<NUMBER>` (PR numbers are unique; no timestamp) | `docs/prps/reviews/.review-scratch/pr-<NUMBER>/` |
27
- | Quick | `quick-<TIMESTAMP>` (reused for the artifact filename if the user later selects an artifact-writing path) | `docs/prps/reviews/.review-scratch/quick-<TIMESTAMP>/` |
28
+ | Mode | run-id | scratch dir |
29
+ | ----- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
30
+ | Local | `local-<TIMESTAMP>` (one canonical timestamp per invocation; reused for the Phase 3 review filename) | `<review-dir>/.review-scratch/local-<TIMESTAMP>/` |
31
+ | PR | `pr-<NUMBER>` (PR numbers are unique; no timestamp) | `<review-dir>/.review-scratch/pr-<NUMBER>/` |
32
+ | Quick | `quick-<TIMESTAMP>` (reused for the artifact filename if the user later selects an artifact-writing path) | `<review-dir>/.review-scratch/quick-<TIMESTAMP>/` |
28
33
 
29
34
  Each reviewer prompt includes the instruction "flag only gaps that affect correctness or the stated requirements", plus:
30
35
 
@@ -48,7 +53,7 @@ Wait for all 3 reviewer results before merging: if results are pending and the r
48
53
  offers a wait tool, call it until every reviewer job has settled; never finish the run
49
54
  while a reviewer is still running. After all 3 native `subagent` calls return, the calling skill
50
55
  (not the reviewer) persists each valid inline return to its scratch copy at
51
- `docs/prps/reviews/.review-scratch/<run-id>/<reviewer-name>.md`, where
56
+ `<review-dir>/.review-scratch/<run-id>/<reviewer-name>.md`, where
52
57
  `<run-id>` is `local-<YYYYMMDD-HHMMSS>` for local mode, `pr-<NUMBER>` for PR
53
58
  mode, `quick-<YYYYMMDD-HHMMSS>` for quick mode. An empty, missing, or malformed
54
59
  return marks that reviewer failed (merge procedure in review-checklist.md); the
@@ -62,12 +67,12 @@ parallelization applies only to the review pass.
62
67
 
63
68
  ## Scratch backstop and cleanup
64
69
 
65
- - code-review local mode: remove `docs/prps/reviews/.review-scratch/local-<TIMESTAMP>/`
70
+ - code-review local mode: remove `<review-dir>/.review-scratch/local-<TIMESTAMP>/`
66
71
  once the review artifact has been written successfully (Phase 3).
67
- - code-review PR mode: remove `docs/prps/reviews/.review-scratch/pr-<NUMBER>/`
72
+ - code-review PR mode: remove `<review-dir>/.review-scratch/pr-<NUMBER>/`
68
73
  once the artifact has been written and (when `WORKTREE_ACTIVE=true`)
69
74
  committed successfully (Phase 6).
70
- - quick-review: remove `docs/prps/reviews/.review-scratch/quick-<TIMESTAMP>/`
75
+ - quick-review: remove `<review-dir>/.review-scratch/quick-<TIMESTAMP>/`
71
76
  at the end of Phase 5 (HAND-OFF) unconditionally — including on "Discard"
72
77
  and "Apply fixes", which never write a permanent artifact. The scratch file
73
78
  is the one ephemeral exception to quick-review's artifact-free guarantee.
@@ -6,9 +6,10 @@
6
6
  - Capability Matrix
7
7
  - Native vs install.sh Fallback
8
8
  - Notes
9
+ - Artifact store
9
10
  - How to Update This Document
10
11
 
11
- As of 2026-10-19
12
+ As of 2026-11-04
12
13
 
13
14
  This file is the authoritative source for which ycc bundle capabilities are supported on each
14
15
  deployment target. Downstream scripts parse the table below; read the Parser Grammar section
@@ -21,7 +22,7 @@ before editing the table.
21
22
  The first table below (Capability Matrix) is parsed by `ycc/skills/compatibility-audit/scripts/audit-target-features.sh`.
22
23
  Follow these rules exactly or the parser will misread cells:
23
24
 
24
- - **Column order**: `capability, claude, cursor, codex, opencode, omp` — do not reorder.
25
+ - **Column order**: `capability, claude, cursor, codex, opencode, omp, pi` — do not reorder.
25
26
  - **Cell vocabulary**: exactly one of `supported`, `partial`, or `unsupported` — no other tokens,
26
27
  no trailing punctuation, no parenthetical notes inside the cell.
27
28
  - **Notes** belong in the Notes section below the table, keyed as `capability:target`.
@@ -43,19 +44,19 @@ Follow these rules exactly or the parser will misread cells:
43
44
 
44
45
  ## Capability Matrix
45
46
 
46
- | capability | claude | cursor | codex | opencode | omp |
47
- | ----------------- | --------- | ----------- | ----------- | ----------- | ----------- |
48
- | SKILLS | supported | supported | supported | supported | partial |
49
- | COMMANDS | supported | partial | unsupported | supported | partial |
50
- | AGENTS | supported | partial | supported | supported | partial |
51
- | HOOKS.PreToolUse | supported | partial | unsupported | partial | unsupported |
52
- | HOOKS.PostToolUse | supported | partial | unsupported | partial | unsupported |
53
- | HOOKS.Stop | supported | partial | unsupported | partial | unsupported |
54
- | MCP | supported | supported | partial | supported | partial |
55
- | INSTALL_PATH | supported | supported | supported | supported | partial |
56
- | DANGEROUS_MODE | supported | unsupported | unsupported | unsupported | unsupported |
57
- | WORKTREE | supported | partial | partial | partial | partial |
58
- | MODS | supported | unsupported | unsupported | unsupported | unsupported |
47
+ | capability | claude | cursor | codex | opencode | omp | pi |
48
+ | ----------------- | --------- | ----------- | ----------- | ----------- | ----------- | ----------- |
49
+ | SKILLS | supported | supported | supported | supported | partial | unsupported |
50
+ | COMMANDS | supported | partial | unsupported | supported | partial | unsupported |
51
+ | AGENTS | supported | partial | supported | supported | partial | unsupported |
52
+ | HOOKS.PreToolUse | supported | partial | unsupported | partial | unsupported | unsupported |
53
+ | HOOKS.PostToolUse | supported | partial | unsupported | partial | unsupported | unsupported |
54
+ | HOOKS.Stop | supported | partial | unsupported | partial | unsupported | unsupported |
55
+ | MCP | supported | supported | partial | supported | partial | unsupported |
56
+ | INSTALL_PATH | supported | supported | supported | supported | partial | unsupported |
57
+ | DANGEROUS_MODE | supported | unsupported | unsupported | unsupported | unsupported | unsupported |
58
+ | WORKTREE | supported | partial | partial | partial | partial | unsupported |
59
+ | MODS | supported | unsupported | unsupported | unsupported | unsupported | unsupported |
59
60
 
60
61
  ---
61
62
 
@@ -66,14 +67,15 @@ from installer-managed artifacts and gated work in `ycc/settings/packages.json`.
66
67
  `listed: false` packages are not published catalog entries; generated trees and successful spikes
67
68
  alone do not make them shipping user install paths. This does not revise the capability verdicts above.
68
69
 
69
- | target | native, listed today | install.sh fallback today | unlisted or gated native packages |
70
- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- |
71
- | Claude | `ycc@ycc`, `ycc-mcp@ycc`, `ycc-hooks@ycc` (2.1.300+), `ycc-all@ycc`; `status-bar@ycc-mods` | Rules, settings, statusline, hooks link, MCP, standalone skills/agents | `ycc-agents@ycc` in v7.0.0 |
72
- | Cursor | `ycc`, `ycc-rules`, `ycc-mcp`, `ycc-hooks` via the root `.cursor-plugin/marketplace.json` (interactive `/plugins`); hooks `sessionStart` only | Skills, agents, commands, rules, settings under `~/.cursor/`; optional hooks | None |
73
- | Codex | `ycc@ycc`, `ycc-mcp@ycc` via the root `.agents/plugins/marketplace.json` | Agent TOMLs, `AGENTS.md`, `config.toml` | `ycc-hooks` excluded (YAN-1149) |
74
- | opencode | None | Skills, agents, commands, shared, `opencode.json`, `AGENTS.md` | `@yandy-r/ycc-opencode` npm plugin: experimental, opt-in, unpublished |
75
- | `agents` | None | Skills and `ycc-shared` copied into `~/.agents/` | None planned |
76
- | `omp` | `ycc@ycc`, `ycc-mcp@ycc`, `ycc-rules@ycc` via the root `.omp-plugin/marketplace.json` (omp `>=18.12.2`) | `install.sh --target omp`: local export (`--mode local`) or the repository catalog (`--mode repo`) installed through `omp plugin` (user or project scope); opt-in `--rules` (`AGENTS.md`) and `--settings` (`config.yml`), user scope only | `ycc-hooks` and `ycc-all` excluded (herdr: `herdr integration install omp`) |
70
+ | target | native, listed today | install.sh fallback today | unlisted or gated native packages |
71
+ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
72
+ | Claude | `ycc@ycc`, `ycc-mcp@ycc`, `ycc-hooks@ycc` (2.1.300+), `ycc-all@ycc`; `status-bar@ycc-mods` | Rules, settings, statusline, MCP, standalone skills/agents; hooks via the native `ycc-hooks` plugin at project scope (global hooks link with `--global`) | `ycc-agents@ycc` in v7.0.0 |
73
+ | Cursor | `ycc`, `ycc-rules`, `ycc-mcp`, `ycc-hooks` via the root `.cursor-plugin/marketplace.json` (interactive `/plugins`); hooks `sessionStart` only | Skills, agents, commands, rules, settings under `~/.cursor/`; optional hooks | None |
74
+ | Codex | `ycc@ycc`, `ycc-mcp@ycc` via the root `.agents/plugins/marketplace.json` | Agent TOMLs, `AGENTS.md`, `config.toml` | `ycc-hooks` excluded (YAN-1149) |
75
+ | opencode | None | Skills, agents, commands, shared, `opencode.json`, `AGENTS.md` | `@yandy-r/ycc-opencode` npm plugin: experimental, opt-in, unpublished |
76
+ | `agents` | None | Skills and `ycc-shared` copied into `~/.agents/` | None planned |
77
+ | `omp` | `ycc@ycc`, `ycc-mcp@ycc`, `ycc-rules@ycc` via the root `.omp-plugin/marketplace.json` (omp `>=18.12.2`) | `install.sh --target omp`: local export (`--mode local`) or the repository catalog (`--mode repo`) installed through `omp plugin` (user or project scope); opt-in `--rules` (`AGENTS.md`) and `--settings` (`config.yml`), user scope only | `ycc-hooks` and `ycc-all` excluded (herdr: `herdr integration install omp`) |
78
+ | `pi` | None | None | `ycc`, `ycc-mcp`, `ycc-rules` deferred to v6.3.0 (ADR 0003, pi `>=1.2.0`); `ycc-hooks` and `ycc-all` excluded |
77
79
 
78
80
  Native dependency resolution is a Claude platform feature, not a cross-runtime guarantee.
79
81
  The Claude `ycc-all` meta plugin's automatic dependency install was verified on Claude Code 2.1.301 and in the v6.0.0 maintainer clean-host verification; Cursor and Codex have no
@@ -105,6 +107,12 @@ The recommendation in `docs/research/ystack/recommendation.md` is qualified by
105
107
  (YAN-1172, YAN-1173, YAN-1175). Since YAN-1180 the three rows are listed and the repository
106
108
  publishes the root `.omp-plugin/marketplace.json`.
107
109
  YAN-1174: ycc ships no OMP hooks; herdr reporting is herdr's own OMP integration.
110
+ - `pi-runtime-contract.md`: tested on Pi (`@earendil-works/pi-coding-agent`) 1.5.0 and 1.2.0;
111
+ supported floor `>=1.2.0`, recommended 1.5.0. Pi gets a generated `packages/pi/` tree
112
+ (YAN-1188) installed by absolute path with `pi install`; there is no catalog. Pi has no
113
+ built-in subagents, no shell hooks or `hooks.json`, no `WorktreeCreate` event, and no approval
114
+ modes, and a Pi package cannot depend on another, so `ycc-all` is omitted. See ADR 0003. No Pi
115
+ generator or installer ships yet, so every `pi` cell above is `unsupported`.
108
116
 
109
117
  ---
110
118
 
@@ -140,7 +148,24 @@ via the plugin bundle; there is no Codex analog for slash commands.
140
148
  **AGENTS:cursor**
141
149
  Agents from `ycc/agents/` are adapted into `packages/cursor/ycc/agents/` and copied by
142
150
  the installer to `~/.cursor/agents/`. The same generated definitions are packaged in the
143
- native `ycc` package.
151
+ native `ycc` package. Shell scope is not enforced (YAN-1276): Cursor subagent frontmatter
152
+ documents only `name`, `description`, `model`, `readonly` and `is_background`, so the copied
153
+ `Bash(<prefix>:*)` entries in `tools:` are not a documented grant, and `readonly` cannot
154
+ express "these validation commands only". Cursor's `beforeShellExecution` / `preToolUse` hook
155
+ input carries no subagent name, so a hook cannot apply one agent's prefixes either. The
156
+ restricted fixers (`pr-comment-fixer`, `review-fixer`, `release-fix-applier`) keep their
157
+ allowlist as prompt instructions only. Sources: cursor.com/docs/subagents, cursor.com/docs/hooks.
158
+
159
+ **AGENTS:codex**
160
+ Agents are emitted as custom-agent TOMLs (`name`, `description`, `developer_instructions`)
161
+ and installed under `~/.codex/agents/`. Shell scope is not enforced (YAN-1276): a custom agent
162
+ can only switch off whole capabilities (`features.shell_tool`, `apps`, `plugins`, `memories`,
163
+ `request_permissions_tool`); `sandbox_mode`, `approval_policy` and command rules come from the
164
+ parent session (codex-rs `core/src/agent/role.rs`, rust-v0.164.0). Prefix rules
165
+ (`rules/*.rules`) apply per config layer, never per agent. The restricted fixers need their
166
+ validation commands, so the shell stays on and the allowlist is a prompt instruction only. A
167
+ `PreToolUse` hook input does carry `agent_type`, but ycc ships no Codex hooks (YAN-1149).
168
+ Sources: learn.chatgpt.com/docs/agent-configuration/subagents, `.../rules`, `.../hooks`.
144
169
 
145
170
  **HOOKS.PreToolUse:cursor**
146
171
  Cursor does not expose a native PreToolUse hook execution surface equivalent to Claude Code's
@@ -189,10 +214,18 @@ file so the committed `ycc/settings/settings.json` is not modified, and the `set
189
214
  later merges repo-managed keys while preserving the CLI-written marketplace entry. It also
190
215
  removes legacy `local-ycc-plugins` marketplace and `ycc@local-ycc-plugins` entries from
191
216
  `~/.claude.json` and `~/.claude/settings.local.json`, deleting `settings.local.json` if that
192
- leaves it empty. Other steps: `rules` links `~/.claude/CLAUDE.md`, `hooks` links
193
- `~/.claude/hooks`, `mods` registers the `ycc-mods` directory marketplace, and `skills`/`agents`
194
- install standalone copies into `~/.claude/` (warning about duplicate names if `ycc@ycc` is also
195
- installed). `remove --target claude` uninstalls `ycc@ycc` and the `ycc` marketplace.
217
+ leaves it empty. Other steps: `rules` links `~/.claude/CLAUDE.md`; `hooks` (the
218
+ default) enables the native `ycc-hooks@ycc` plugin at project scope, declaring
219
+ the `ycc` marketplace at project scope (repo mode, committed) or local scope
220
+ (local mode) only when no visible declaration supplies it — never repointing an
221
+ existing declaration — while `--global` links `~/.claude/hooks`; `mods`
222
+ registers the `ycc-mods` directory marketplace; and `skills`/`agents`
223
+ install standalone copies into `~/.claude/` (warning about duplicate names if
224
+ `ycc@ycc` is also installed). The `base` step of `remove --target claude`
225
+ uninstalls `ycc@ycc` and the `ycc` marketplace. The `hooks` intent removes
226
+ `ycc-hooks@ycc` at project scope, then removes only installer-written
227
+ marketplace declarations when no other `@ycc` install remains; with
228
+ `--global`, it removes the installer-managed global hooks link.
196
229
 
197
230
  **INSTALL_PATH:cursor**
198
231
  Sources under `ycc/` generate `packages/cursor/ycc/{skills,agents,commands}/`,
@@ -425,10 +458,10 @@ Partial: `scripts/generate_omp_packages.py` builds `packages/omp/ycc-mcp/` whose
425
458
  placeholders). `install.sh install --target omp` installs it as
426
459
  `ycc-mcp@ycc` with `ycc@ycc` (see INSTALL_PATH:omp). OMP's plugin MCP loader reads it natively,
427
460
  names servers `ycc-mcp:<server>`, and expands `${VAR}` in `env`, `url` and `headers` at load
428
- (unset variables arrive literally). The generated `.mcp.json` differs from the source in one
429
- way (YAN-1291): a later http/sse server whose connection equals an earlier one gets
430
- `?ycc-server=<name>` on its URL, so `ycc-mcp:linear-personal` loads beside `ycc-mcp:linear`
431
- with its own OAuth login; the other targets keep the source URL. Listed in the root OMP catalog
461
+ (unset variables arrive literally). The generator would add `?ycc-server=<name>` to the URL of a
462
+ later http/sse server whose connection equals an earlier one (YAN-1291), so both could load with
463
+ their own OAuth logins; the current source has no such duplicates, so the generated `.mcp.json`
464
+ equals the source byte-for-byte. Listed in the root OMP catalog
432
465
  since YAN-1180, after the YAN-1178 live acceptance on the real tree. Gaps:
433
466
  `ycc-mcp:playwright` is dropped while `browser.enabled` is on; plugin timeouts below 1000 ms are
434
467
  ignored; per-server disable is the user `disabledServers` list, and `plugin-overrides.json` does
@@ -491,6 +524,81 @@ No native-parity claim. Source: ADR 0002; `worktree-strategy.md` §1.
491
524
  Unsupported. The Claude Code mod API differs from OMP's `ExtensionAPI`; the status-bar mod is
492
525
  not ported. Source: ADR 0002.
493
526
 
527
+ **SKILLS:pi**
528
+ Unsupported today: ycc ships no Pi skill tree. Planned `partial` (YAN-1184): Pi discovers package
529
+ `skills/<name>/SKILL.md` natively as `/skill:<name>`, and `disable-model-invocation` maps natively,
530
+ but Pi leaves `${CLAUDE_PLUGIN_ROOT}`, `/ycc:<name>` and body `$ARGUMENTS` literal, so the generator
531
+ must rewrite them and ship `_shared` inside the package. Floor pi `>=1.2.0`. Coexistence: Pi
532
+ discovers `~/.agents/skills` by default, so copies from the `agents` target load unadapted and
533
+ outrank a package skill of the same name (no namespacing, spike §1.5); YAN-1193 adds owned
534
+ `-~/.agents/skills/<n>/SKILL.md` dedupe overrides. Source: ADR 0003; spike §1.5, §3.
535
+
536
+ **COMMANDS:pi**
537
+ Unsupported today: ycc ships no Pi commands. Planned `partial` (YAN-1185): public entrypoints are
538
+ `ycc:<name>` extension commands that call `sendUserMessage("/skill:<name> …", {expandPromptTemplates: true})`,
539
+ because a prompt template that emits `/skill:x` is not expanded again. Source: ADR 0003 decision 2.
540
+
541
+ **AGENTS:pi**
542
+ Unsupported today: Pi has no built-in subagents and ycc ships no Pi agents. Planned `partial`
543
+ (YAN-1186): a ycc `subagent` extension tool loads the generated agent definitions from the package,
544
+ maps Claude tool names and models, and spawns child `pi --mode json -p --no-session` runs with depth
545
+ and concurrency limits. A verbatim ycc agent fails on Pi. Source: ADR 0003 decision 3; spike §2.7.
546
+
547
+ **HOOKS.PreToolUse:pi**
548
+ Unsupported. Pi never runs shell hooks or `hooks/hooks.json`; the closest surface is a TypeScript
549
+ extension `tool_call` handler, and `ycc-hooks` is excluded on Pi, so ycc ships no hook port (YAN-1191).
550
+ The ADR 0003 planned verdict is `partial` only for TypeScript handlers, never for shell hooks.
551
+ Source: ADR 0003 decision 5; spike §3.
552
+
553
+ **HOOKS.PostToolUse:pi**
554
+ Same constraint as HOOKS.PreToolUse:pi. The closest Pi event is `tool_result`.
555
+
556
+ **HOOKS.Stop:pi**
557
+ Same constraint as HOOKS.PreToolUse:pi. The closest Pi events are `agent_settled` and
558
+ `agent_before_settle`.
559
+
560
+ **MCP:pi**
561
+ Unsupported today: ycc ships no Pi MCP package. Planned `partial` (YAN-1190): Pi never reads
562
+ `mcp.json` from a package, so `ycc-mcp` becomes a registrar extension calling `pi.registerMcpServer`
563
+ (a same-name user `mcp.json` entry wins), with an opt-in `install.sh --mcp` merge into
564
+ `<agentDir>/mcp.json` as the fallback. Tools are named `mcp__<server>__<tool>` and SSE is rejected.
565
+ Source: ADR 0003 decision 4; spike §2.5.
566
+
567
+ **INSTALL_PATH:pi**
568
+ Unsupported today: no installable Pi package (`packages/pi/*/package.json`, written by the
569
+ YAN-1188 generator) and no `install.sh --target pi` exist. Skills generated earlier under
570
+ `packages/pi/ycc/skills` (YAN-1184) do not count. `scripts/validate_capability_matrix.py` and the
571
+ `PI1` audit fail if an installable package exists while this cell is `unsupported`, and fail if any
572
+ `pi` cell claims support or any `pi` package row is `included` without one. Planned `partial`
573
+ (YAN-1188, YAN-1189): `pi install <abs path>` at user scope or `pi install -l --approve <dir>` at
574
+ project scope, with no catalog. Floor pi `>=1.2.0`, recommended 1.5.0. Installed extensions are
575
+ full-trust code with no sandbox. Source: ADR 0003 decisions 1, 7, 8.
576
+
577
+ **DANGEROUS_MODE:pi**
578
+ Unsupported by design. Pi has no approval modes ("does not ask for approval before every tool
579
+ call"), so there is no `--dangerously-skip-permissions` analogue to emit; an extension `tool_call`
580
+ gate is the only way to add approvals. Source: ADR 0003 decision 6; spike §2.6.
581
+
582
+ **WORKTREE:pi**
583
+ Unsupported today: no ycc skill tree ships on Pi, and Pi has no `WorktreeCreate` event or
584
+ worktree API. Planned `partial` (YAN-1187): skills run `git worktree add` under `.pi/worktrees/`
585
+ through `bash`, and subagent `cwd` points there. Source: ADR 0003; spike §2.4.
586
+
587
+ **MODS:pi**
588
+ Unsupported by design. The Claude Code mod API differs from Pi's `ExtensionAPI`
589
+ (`ctx.ui.setStatus`/`setWidget`/`setFooter`); a status-bar port is new code outside the lockstep.
590
+ Source: ADR 0003 package matrix.
591
+
592
+ ---
593
+
594
+ ## Artifact store
595
+
596
+ Descriptive only; this is not a parsed capability row. The artifact store (`ycc/skills/_shared/references/artifact-store.md`) is skill-level and identical on claude, cursor, codex, opencode and omp: store resolution, the `.ycc/artifacts/` cache and the `.plans-config` pointer are plain files and Bash helpers, so no target needs extra support for `store: local`.
597
+
598
+ - **Linear mode needs a Linear MCP in the running runtime.** ycc ships the `linear` server from `ycc-mcp` where the MCP row is supported (claude, cursor, opencode). On codex and omp the MCP row is `partial`: the server installs, but a user's runtime may lack, shadow or not yet have authorized it (see the MCP:codex and MCP:omp notes), so linear mode can be unavailable there until a Linear MCP is configured by hand.
599
+ - Without a reachable, authorized Linear MCP, skills stop at the Linear call gate before any local write and suggest `store: local`. Local mode never calls Linear.
600
+ - Every generator emits `.ycc/artifacts/` and `.plans-config` paths verbatim; no target rewrites them. `scripts/validate-artifact-store.sh` checks the occurrence counts of each generated skills tree against `ycc/skills` and that a committed `store: linear` pointer is tracked and not ignored.
601
+
494
602
  ---
495
603
 
496
604
  ## How to Update This Document
@@ -32,7 +32,7 @@ skill behaves exactly as it does today and writes no visual output.
32
32
 
33
33
  | Skill | Writes a plan artifact by default? | `--visual` target |
34
34
  | ------------------- | ------------------------------------ | ----------------------------------------- |
35
- | `prp-plan` | yes — `docs/prps/plans/*.plan.md` | the written plan file |
35
+ | `prp-plan` | yes — resolved `prp-plan` artifact | the written plan file |
36
36
  | `parallel-plan` | yes — feature-dir `parallel-plan.md` | the written plan file |
37
37
  | `plan-workflow` | yes — feature-dir `parallel-plan.md` | the written plan file |
38
38
  | `plan` | **no** — plan kept in-chat | a plan file `--visual` is forced to write |
@@ -94,20 +94,24 @@ links are produced in a dry run.
94
94
  When `--visual` runs for real (not `--dry-run`), the planning skill invokes:
95
95
 
96
96
  ```
97
- visual-plan <absolute-plan-path>
97
+ visual-plan ${STORE_FLAG} <absolute-plan-path>
98
98
  ```
99
99
 
100
- passing the **absolute path** of the plan file it wrote and validated.
100
+ passing the **absolute path** of the plan file it wrote and validated, plus the exact `--store=local|linear` override as `STORE_FLAG` when the user supplied one (otherwise empty). Parse and strip the override before deriving descriptions or slugs; never let visual-plan re-resolve a conflicting config because the caller dropped the flag.
101
101
 
102
102
  Contract for `visual-plan`:
103
103
 
104
104
  - **Accept ANY plan path.** It must not assume `docs/prps/plans` or any other
105
105
  fixed location. The plan path is supplied by the caller and may live anywhere
106
- (e.g. `docs/prps/plans/<name>.plan.md`, a feature-dir `parallel-plan.md`, or a
107
- forced-write file from `plan`).
108
- - **Derive `visual/` relative to the given plan path.** The output directory is
109
- a `visual/` sibling of the plan file — i.e. `<dirname of plan>/visual/` —
110
- computed from the path it was handed, never hardcoded.
106
+ (e.g. a local-mode `docs/prps/plans/<name>.plan.md`, a feature-dir
107
+ `parallel-plan.md`, or a forced-write file from `plan`).
108
+ - **Resolve `visual/` by store.** Local mode keeps the sibling
109
+ `<dirname of plan>/visual/`. Linear mode (default) resolves kind `feature-dir`
110
+ for the source feature slug and writes its `visual/` child, even if the input plan
111
+ lives elsewhere. Follow artifact-store.md **Size and diagrams**: visual
112
+ surfaces are local-only, never uploaded, and never linked by editing the
113
+ source plan.
114
+ - **Forward the store override to every resolver call.** Print `--shell` and read `ARTIFACT_STORE` first; in linear mode apply the Linear call gate before `--ensure` or any cache write.
111
115
  - **Print the resulting link to stdout.** Exactly one of:
112
116
  - a hosted shareable URL, or
113
117
  - a localhost preview `http://127.0.0.1:PORT/...`, or
@@ -127,11 +131,13 @@ re-derive the path itself.
127
131
  therefore nothing on disk to visualize. When `--visual` is passed to
128
132
  `plan`:
129
133
 
130
- 1. `plan` **MUST force a plan-file write first**, producing an absolute plan
131
- path on disk (this write happens even though it would normally be skipped).
134
+ 1. `plan` **MUST force a plan-file write first** using kind `prp-plan`
135
+ through the artifact-store helper, producing an absolute path on disk.
136
+ Local mode keeps `docs/prps/plans/<slug>.plan.md`; linear mode follows
137
+ artifact-store.md **Planning skills** to Save the plan and task sub-issues.
132
138
  2. That forced write is then validated like any other plan.
133
139
  3. Only after a valid file exists does `plan` hand the absolute path to
134
- `visual-plan <absolute-plan-path>`.
140
+ `visual-plan ${STORE_FLAG} <absolute-plan-path>`.
135
141
 
136
142
  Without the forced write there is no input for `visual-plan`, so the
137
143
  force-write rule is mandatory — not optional — for `plan --visual`. Under
@@ -151,5 +157,5 @@ In-body references to skill assets use the plugin-root variable, e.g.:
151
157
  - `{{package-root}}/skills/plan-workflow/SKILL.md`
152
158
 
153
159
  The hand-off is always expressed as the skill invocation
154
- `visual-plan <absolute-plan-path>`, with `<absolute-plan-path>` resolved by
155
- the calling skill to a real, absolute path on disk.
160
+ `visual-plan ${STORE_FLAG} <absolute-plan-path>`, with `<absolute-plan-path>` resolved by
161
+ the calling skill to a real, absolute path on disk and `STORE_FLAG` retaining any user override.
@@ -61,16 +61,20 @@ honor its annotations when present. When the plan has no annotations, the
61
61
  fallback is now **on** (was off). `--no-worktree` overrides both the plan
62
62
  annotations and the default.
63
63
 
64
- **Artifact location for `code-review`** — In PR mode the review artifact is
65
- written _into the active worktree_ at
66
- `<worktree>/docs/prps/reviews/pr-<N>-review.md`, then committed and pushed to
67
- the PR's head branch. See the `code-review` skill (`SKILL.md`) for
68
- the full lifecycle (draft→ready promotion, artifact commit+push, post-review
69
- worktree removal, opt-outs `--keep-draft` and `--keep-worktree`).
64
+ **Artifact location for `code-review`** — In PR mode, local store mode writes
65
+ the review artifact _into the active worktree_ at
66
+ `<worktree>/docs/prps/reviews/pr-<N>-review.md`, then commits and pushes it to
67
+ the PR's head branch. Linear store mode writes the gitignored cache
68
+ `<worktree>/.ycc/artifacts/<slug>/reviews/pr-<N>-review.md`, saves it as a
69
+ Linear Document, and never commits it. See the `code-review` skill
70
+ (`SKILL.md`) for the full lifecycle (draft→ready promotion, artifact
71
+ commit+push, post-review worktree removal, opt-outs `--keep-draft` and
72
+ `--keep-worktree`).
70
73
 
71
74
  `review-fix` follows: it discovers the artifact in the active worktree's
72
- `docs/prps/reviews/` first, then falls back to the main repo for in-flight
73
- artifacts written under the previous contract.
75
+ review location (`docs/prps/reviews/` or `.ycc/artifacts/*/reviews/`) first,
76
+ then falls back to the main repo for in-flight artifacts written under the
77
+ previous contract.
74
78
 
75
79
  ---
76
80
 
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env bash
2
+ # Print an artifact without its complete leading frontmatter block.
3
+ # Frontmatter starts and ends with exact --- lines (ignoring CR). Its first
4
+ # non-blank line must be a top-level YAML key (^[A-Za-z_][A-Za-z0-9_.-]*: then
5
+ # whitespace or end of line); blank-only blocks qualify. Leading # comment lines
6
+ # may precede that key only when the block also has a top-level identity key
7
+ # (linear, syncedAt, contentHash, pending, tasks). Otherwise preserve the whole
8
+ # file, including a leading Markdown thematic break.
9
+ # Source for artifact_body, or execute with one file argument.
10
+ # shellcheck disable=SC2094 # fallbacks re-read the whole file by name
11
+ _artifact_body() {
12
+ local file="$1"
13
+ # Read through a redirect on a brace group instead of exec so the caller's
14
+ # file descriptors stay untouched. After read, a regular file's offset sits
15
+ # just past the consumed line, so cat prints the rest of the body.
16
+ {
17
+ local line first stripped
18
+ # first_content: 0 none yet, 1 key first, 2 key after leading comments.
19
+ local first_content=0 comments=0 identity=0
20
+ local key_pattern='^[A-Za-z_][A-Za-z0-9_.-]*:([[:space:]]|$)' blank_pattern='^[[:space:]]*$'
21
+ local identity_pattern='^(linear|syncedAt|contentHash|pending|tasks):([[:space:]]|$)'
22
+ IFS= read -r first || { command cat -- "$file"; return; }
23
+ first=${first%$'\r'}
24
+ if [[ "$first" != '---' ]]; then
25
+ command cat -- "$file"
26
+ return
27
+ fi
28
+ while IFS= read -r line || [[ -n "$line" ]]; do
29
+ stripped=${line%$'\r'}
30
+ if [[ "$stripped" == '---' ]]; then
31
+ if [[ "$first_content" == 2 && "$identity" == 0 ]] ||
32
+ [[ "$first_content" == 0 && "$comments" == 1 ]]; then
33
+ command cat -- "$file"
34
+ return
35
+ fi
36
+ command cat
37
+ return 0
38
+ fi
39
+ [[ "$stripped" =~ $blank_pattern ]] && continue
40
+ if [[ "$first_content" == 0 ]]; then
41
+ if [[ "$stripped" == '#'* ]]; then
42
+ comments=1
43
+ continue
44
+ fi
45
+ if [[ ! "$stripped" =~ $key_pattern ]]; then
46
+ command cat -- "$file"
47
+ return
48
+ fi
49
+ first_content=$((comments + 1))
50
+ fi
51
+ if [[ "$first_content" == 2 && "$stripped" =~ $identity_pattern ]]; then identity=1; fi
52
+ done
53
+ command cat -- "$file"
54
+ } <"$file"
55
+ }
56
+
57
+ artifact_body() {
58
+ if [[ $# -ne 1 || -z "$1" || ! -f "$1" ]]; then
59
+ printf 'ERROR: artifact_body expects one readable file\n' >&2
60
+ return 1
61
+ fi
62
+ if [[ ! -r "$1" ]]; then
63
+ printf 'ERROR: Artifact body is not readable: %s\n' "$1" >&2
64
+ return 1
65
+ fi
66
+ _artifact_body "$1"
67
+ }
68
+
69
+ if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
70
+ artifact_body "$@"
71
+ fi