@yandy-r/ycc-opencode 6.4.0 → 6.6.0

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 (85) hide show
  1. package/README.md +11 -4
  2. package/agents/code-finder.md +1 -1
  3. package/agents/planner.md +1 -2
  4. package/agents/pr-evidence-collector.md +99 -0
  5. package/agents/root-cause-analyzer.md +1 -1
  6. package/index.js +9 -0
  7. package/package.json +1 -1
  8. package/registration.json +67 -0
  9. package/shared/references/branching-model.md +2 -1
  10. package/shared/references/standalone-dispatch.md +4 -1
  11. package/shared/references/target-capability-matrix.md +170 -30
  12. package/shared/references/worktree-strategy.md +9 -31
  13. package/shared/scripts/lib/ci-classify.sh +2 -2
  14. package/shared/scripts/release-feature-sets.sh +18 -0
  15. package/shared/scripts/release_feature_sets.py +232 -0
  16. package/shared/scripts/setup-worktree.sh +2 -69
  17. package/skills/bundle-author/references/surface-map.md +1 -1
  18. package/skills/bundle-author/references/when-not-to-scaffold.md +1 -1
  19. package/skills/bundle-author/scripts/scaffold-skill.sh +9 -0
  20. package/skills/bundle-release/SKILL.md +22 -5
  21. package/skills/bundle-release/references/release-checklist.md +9 -1
  22. package/skills/bundle-release/references/version-policy.md +11 -4
  23. package/skills/bundle-release/scripts/release_versions.py +19 -1
  24. package/skills/code-report/SKILL.md +0 -2
  25. package/skills/code-report/templates/report-structure.md +0 -2
  26. package/skills/compatibility-audit/SKILL.md +8 -4
  27. package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +75 -5
  28. package/skills/compatibility-audit/scripts/audit-target-features.sh +15 -9
  29. package/skills/feature-research/SKILL.md +1 -1
  30. package/skills/feature-research/scripts/validate-spec.sh +0 -4
  31. package/skills/formatters/SKILL.md +2 -1
  32. package/skills/formatters/references/flag-reference.md +8 -4
  33. package/skills/formatters/references/templates/lint-autofix.yml.tmpl +189 -23
  34. package/skills/formatters/references/templates/lint.yml.tmpl +11 -11
  35. package/skills/formatters/references/templates/readme-section.md.tmpl +1 -1
  36. package/skills/formatters/scripts/bundle/go-tools.sh +73 -41
  37. package/skills/formatters/scripts/bundle/init-formatters.sh +1 -1
  38. package/skills/formatters/scripts/bundle/lib/modified-files.sh +0 -5
  39. package/skills/formatters/scripts/bundle/style.sh +2 -2
  40. package/skills/git-cleanup/SKILL.md +4 -5
  41. package/skills/git-workflow/SKILL.md +1 -0
  42. package/skills/git-workflow/templates/agent-prompts.md +5 -6
  43. package/skills/git-workflow/templates/documentation-decision.md +1 -3
  44. package/skills/git-workflow/templates/pr-template.md +1 -3
  45. package/skills/go-patterns/references/design-and-tooling.md +16 -13
  46. package/skills/go-testing/references/advanced-testing.md +2 -2
  47. package/skills/implement-plan/references/agent-task-prompt.md +18 -20
  48. package/skills/implement-plan/scripts/parse-dependencies.sh +3 -9
  49. package/skills/init/references/conventional-commits.md +8 -1
  50. package/skills/init/references/template-library.md +1 -1
  51. package/skills/init/templates/git/gitignore.tmpl +2 -0
  52. package/skills/init/templates/git/gitmessage.tmpl +2 -1
  53. package/skills/init/templates/github/workflows/pr-title.yml.tmpl +1 -1
  54. package/skills/orchestrate/SKILL.md +1 -1
  55. package/skills/orchestrate/references/dispatch-playbook.md +1 -1
  56. package/skills/parallel-plan/SKILL.md +6 -10
  57. package/skills/plan-workflow/SKILL.md +3 -3
  58. package/skills/plan-workflow/references/plan-structure.md +1 -3
  59. package/skills/plan-workflow/scripts/validate-workflow-plan.sh +2 -8
  60. package/skills/pr-evidence/SKILL.md +138 -0
  61. package/skills/pr-evidence/references/perf-evidence.md +119 -0
  62. package/skills/pr-evidence/references/pr-body-and-hosting.md +112 -0
  63. package/skills/pr-evidence/references/ui-evidence.md +152 -0
  64. package/skills/pr-evidence/scripts/bench_report.py +331 -0
  65. package/skills/pr-evidence/scripts/capture-ui.mjs +311 -0
  66. package/skills/pr-evidence/scripts/classify-change.sh +135 -0
  67. package/skills/prp-plan/SKILL.md +4 -5
  68. package/skills/prp-plan/scripts/validate-prp-plan.sh +1 -11
  69. package/skills/prp-pr/SKILL.md +4 -0
  70. package/skills/release-model/templates/RELEASING.md.tmpl +2 -1
  71. package/skills/releaser/SKILL.md +5 -1
  72. package/skills/releaser/references/ci-optimization-checklist.md +1 -1
  73. package/skills/releaser/references/ci-templates/docker-release.yml +8 -8
  74. package/skills/releaser/references/ci-templates/generic-release.yml +5 -5
  75. package/skills/releaser/references/ci-templates/go-release.yml +4 -4
  76. package/skills/releaser/references/ci-templates/node-release.yml +8 -8
  77. package/skills/releaser/references/ci-templates/python-release.yml +8 -8
  78. package/skills/releaser/references/ci-templates/rust-release.yml +10 -10
  79. package/skills/releaser/references/release-preparation.md +34 -15
  80. package/skills/rust-testing/references/advanced-testing.md +1 -1
  81. package/skills/shared-context/SKILL.md +6 -10
  82. package/skills/ts-testing/references/advanced-testing.md +4 -4
  83. package/skills/visual-recap/SKILL.md +3 -4
  84. package/shared/scripts/merge-children.sh +0 -82
  85. package/skills/write-docs/templates/docs-readme.md +0 -34
@@ -24,13 +24,6 @@ plan annotation format, per-target dispatch matrix, and cleanup. There is
24
24
  per parallel task, and not per-severity fan-out. Individual skills own flag
25
25
  plumbing and per-phase behavior; the shared **invariant** lives here.
26
26
 
27
- **Migration note (GitHub #79 / #80):** Older skills and plan artifacts may still
28
- describe a parent/child model, `**Children**` lists, per-task `**Worktree**:`,
29
- or `merge-children.sh` fan-in. That model is **deprecated** for the shared
30
- contract. `setup-worktree.sh child` and `merge-children.sh` are **compatibility
31
- shims** (see shared scripts) until all executors are updated. New planners and
32
- executors should follow **only** the single-worktree contract below.
33
-
34
27
  and how a single worktree pairs with parallel sub-agent dispatch.
35
28
 
36
29
  ---
@@ -114,6 +107,8 @@ root named for that runtime. Each worktree keeps the name
114
107
  | Codex | `<repo-root>/.codex/worktrees/` | generator rewrite (`.codex`) |
115
108
  | Cursor | `<repo-root>/.cursor/worktrees/` | generator rewrite (`.cursor`) |
116
109
  | OMP | `<repo-root>/.omp/worktrees/` | generator rewrite (`.omp`) |
110
+ | Antigravity | `<repo-root>/.antigravity/worktrees/` | generator rewrite (`.antigravity`) |
111
+ | Muse | `<repo-root>/.muse/worktrees/` | generator rewrite (`.muse`) |
117
112
  | `agents` | runtime-selected, `.agents/` fallback | `worktree-paths.sh` detection (see below) |
118
113
 
119
114
  `YCC_WORKTREE_ROOT` remains the explicit override for every runtime; relative
@@ -204,8 +199,7 @@ When `--base-ref` is supplied:
204
199
  ## 2. Plan annotation format
205
200
 
206
201
  Planners that support worktree output emit a top-level `## Worktree Setup`
207
- section. Implementors use it to resolve the single path and feature slug. No
208
- per-task or per-parallel child paths are **required** by the new contract.
202
+ section. Implementors use it to resolve the single path and feature slug.
209
203
 
210
204
  ### Top-level `## Worktree Setup` section
211
205
 
@@ -220,33 +214,19 @@ Placed at the top of the plan, after frontmatter and before the first batch or s
220
214
  ```
221
215
 
222
216
  `<worktree-root>` is the creating runtime's root from the per-runtime table
223
- above. The `**Parent**:` line names the one feature worktree path. Do **not**
224
- add a `**Children**:` list in new plans; parallel work happens **inside** this
225
- path.
226
-
227
- ### Legacy fields (back-compat, not part of the new contract)
228
-
229
- Older plans may still include:
230
-
231
- - A `**Children**:` bullet list (per parallel task)
232
- - A per-task line: `- **Worktree**: <path> ...` inside a task block
233
-
234
- Parsers that support legacy plans may read these for migration or display, but
235
- the shared **default** is: **one** worktree, no fan-in merge, no
236
- `setup-worktree.sh child` in the new workflow path.
217
+ above. The `**Parent**:` line is the only annotation: it names the one feature
218
+ worktree path, and parallel work happens **inside** this path.
237
219
 
238
220
  ### Review / PR review artifacts
239
221
 
240
222
  For `code-review` + `review-fix`, the `## Worktree Setup` block should list
241
223
  only the feature worktree (same `**Parent**:` form). The PR head branch is
242
224
  expressed via `--base-ref` when creating that worktree — not by spawning extra
243
- per-severity worktrees. Legacy artifacts that listed severity-keyed “children”
244
- are deprecated; prefer a single `**Parent**:` only.
225
+ per-severity worktrees.
245
226
 
246
227
  ### Sequential vs parallel tasks
247
228
 
248
- With the single worktree model, all tasks run against the same path. Planners
249
- need not emit per-task `**Worktree**:` lines for new work.
229
+ With the single worktree model, all tasks run against the same path.
250
230
 
251
231
  ---
252
232
 
@@ -255,10 +235,8 @@ need not emit per-task `**Worktree**:` lines for new work.
255
235
  1. **Once:** `setup-worktree.sh parent <repo> <feature-slug>` (optional `--base-ref` for existing branches).
256
236
  2. **Per batch / task:** run work in the feature worktree; dispatch parallel agents
257
237
  with `Working directory: <feature-worktree-path>` (or equivalent target-specific isolation) — **all share the same path**.
258
- 3. **No** `setup-worktree.sh child` and **no** `merge-children.sh` in the new contract.
259
- (Legacy calls may still exist in older skill text; shims are non-destructive — see script headers.)
260
- 4. **Validate** between batches as the skill requires.
261
- 5. On **merge conflicts** or validation failure, handle in the feature worktree
238
+ 3. **Validate** between batches as the skill requires.
239
+ 4. On **merge conflicts** or validation failure, handle in the feature worktree
262
240
  per skill policy (pause, user resolve, etc.).
263
241
 
264
242
  ---
@@ -2,8 +2,8 @@
2
2
  # ci-classify.sh — Shared failure classification and signature helpers.
3
3
  #
4
4
  # Sourced by:
5
- # - ${SCRIPT_DIR}/../../../shared/scripts/ci-monitor.sh (PR-mode monitor)
6
- # - ${SCRIPT_DIR}/../../../shared/scripts/release-ci-monitor.sh (release-mode monitor)
5
+ # - .opencode-plugin/shared/scripts/ci-monitor.sh (PR-mode monitor)
6
+ # - .opencode-plugin/shared/scripts/release-ci-monitor.sh (release-mode monitor)
7
7
  #
8
8
  # Contract:
9
9
  # See _shared/references/ci-monitoring.md ("Failure classification" section)
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ # release-feature-sets.sh — group feat commits since the last tag into feature
3
+ # sets and compute the minimum semver bump. A feat commit alone does not force a
4
+ # minor: only feature sets the maintainer names complete (--complete) do.
5
+ #
6
+ # Usage:
7
+ # release-feature-sets.sh [--repo DIR] [--from REF] [--to REF]
8
+ # [--complete SET[,SET...]|all] [--format json|text]
9
+ #
10
+ # Feature set = `Feature-Set:` trailer, else the commit scope, else `unscoped`.
11
+ # Required bump: major (breaking) > minor (a set is complete) > patch > none.
12
+ # Requires python3 3.11+. Exit codes: 0 ok, 1 usage error, git error or unknown set.
13
+ set -euo pipefail
14
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
15
+ # shellcheck source=require-python.sh
16
+ . "${SCRIPT_DIR}/require-python.sh"
17
+ export PYTHONDONTWRITEBYTECODE=1
18
+ exec python3 "${SCRIPT_DIR}/release_feature_sets.py" "$@"
@@ -0,0 +1,232 @@
1
+ #!/usr/bin/env python3
2
+ """Group release commits into feature sets and compute the required semver bump.
3
+
4
+ A single ``feat:`` commit does not force a minor release. ``feat`` commits are
5
+ grouped into feature sets: the ``Feature-Set:`` trailer when present, otherwise
6
+ the Conventional Commits scope (``feat(worktree): ...`` -> ``worktree``),
7
+ otherwise ``unscoped``. A commit of any other type joins a set only through a
8
+ ``Feature-Set:`` trailer. The maintainer names the sets that are complete and
9
+ user-visible with ``--complete``; only those require a minor.
10
+
11
+ A set whose ``feat`` commits shipped in an earlier (patch) release can still be
12
+ completed: name it with ``--complete`` and the helper finds it in the history
13
+ before the range (or add a ``Feature-Set:`` trailer to the finishing commit).
14
+
15
+ Required bump, first match wins:
16
+
17
+ - ``major``: any breaking change (``type!:``, ``type(scope)!:``, or a
18
+ ``BREAKING CHANGE:`` / ``BREAKING-CHANGE:`` footer, merge commits included).
19
+ - ``minor``: at least one feature set is named complete.
20
+ - ``patch``: any other non-merge commit in the range.
21
+ - ``none``: the range has no non-merge commits.
22
+
23
+ The bump is a floor computed from commit markers only. Release policies may
24
+ require more (for example a renamed or removed public surface); apply those too.
25
+ Standard library only; the file is copied verbatim into every runtime bundle.
26
+ """
27
+
28
+ from __future__ import annotations
29
+
30
+ import argparse
31
+ import json
32
+ import re
33
+ import subprocess
34
+ import sys
35
+ from dataclasses import dataclass, field
36
+ from typing import Any
37
+
38
+ HEADER_RE = re.compile(r"^(?P<type>[A-Za-z]+)(?:\((?P<scope>[^)]*)\))?(?P<bang>!)?:\s*(?P<desc>.+)$")
39
+ BREAKING_RE = re.compile(r"^BREAKING[ -]CHANGE:", re.MULTILINE)
40
+ TRAILER_RE = re.compile(r"^Feature-Set:\s*(?P<name>\S.*?)\s*$", re.MULTILINE | re.IGNORECASE)
41
+ UNSCOPED = "unscoped"
42
+ FIELD_SEP = "\x1f"
43
+ RECORD_SEP = "\x1e"
44
+
45
+
46
+ @dataclass
47
+ class Commit:
48
+ sha: str
49
+ subject: str
50
+ kind: str
51
+ breaking: bool
52
+ feature_set: str | None
53
+
54
+
55
+ @dataclass
56
+ class Report:
57
+ from_ref: str | None
58
+ to_ref: str
59
+ commits: list[Commit] = field(default_factory=list)
60
+ complete: list[str] = field(default_factory=list)
61
+ earlier: list[str] = field(default_factory=list)
62
+
63
+ def feature_sets(self) -> dict[str, list[Commit]]:
64
+ sets: dict[str, list[Commit]] = {}
65
+ for commit in self.commits:
66
+ if commit.feature_set is not None:
67
+ sets.setdefault(commit.feature_set, []).append(commit)
68
+ return sets
69
+
70
+ def required_bump(self) -> str:
71
+ if any(c.breaking for c in self.commits):
72
+ return "major"
73
+ if not any(c.kind != "merge" for c in self.commits):
74
+ return "none"
75
+ if self.complete:
76
+ return "minor"
77
+ return "patch"
78
+
79
+
80
+ def classify(sha: str, subject: str, body: str, *, merge: bool = False) -> Commit:
81
+ """Classify one commit; a merge commit only contributes its breaking markers."""
82
+ match = HEADER_RE.match(subject)
83
+ breaking = bool(match and match.group("bang")) or bool(BREAKING_RE.search(body))
84
+ if merge:
85
+ return Commit(sha=sha, subject=subject, kind="merge", breaking=breaking, feature_set=None)
86
+ kind = match.group("type").lower() if match else "other"
87
+ trailer = TRAILER_RE.search(body)
88
+ feature_set: str | None = trailer.group("name") if trailer else None
89
+ if kind == "feat" and feature_set is None:
90
+ feature_set = ((match.group("scope") or "").strip() if match else "") or UNSCOPED
91
+ return Commit(sha=sha, subject=subject, kind=kind, breaking=breaking, feature_set=feature_set)
92
+
93
+
94
+ def git(repo: str, *args: str) -> subprocess.CompletedProcess[str]:
95
+ return subprocess.run(["git", "-C", repo, *args], capture_output=True, text=True, check=False)
96
+
97
+
98
+ def latest_tag(repo: str, to_ref: str) -> str | None:
99
+ result = git(repo, "describe", "--tags", "--abbrev=0", to_ref)
100
+ if result.returncode != 0:
101
+ return None
102
+ return result.stdout.strip() or None
103
+
104
+
105
+ def read_commits(repo: str, rev_range: str) -> list[Commit]:
106
+ fmt = f"%H{FIELD_SEP}%P{FIELD_SEP}%s{FIELD_SEP}%b{RECORD_SEP}"
107
+ result = git(repo, "log", f"--format={fmt}", rev_range)
108
+ if result.returncode != 0:
109
+ raise ValueError(f"git log {rev_range} failed: {result.stderr.strip()}")
110
+ commits: list[Commit] = []
111
+ for record in result.stdout.split(RECORD_SEP):
112
+ record = record.strip("\n")
113
+ if not record:
114
+ continue
115
+ sha, parents, subject, body = (record.split(FIELD_SEP) + ["", "", ""])[:4]
116
+ commits.append(classify(sha, subject, body, merge=len(parents.split()) > 1))
117
+ return commits
118
+
119
+
120
+ def resolve_complete(
121
+ requested: list[str], sets: dict[str, list[Commit]], earlier: set[str]
122
+ ) -> tuple[list[str], list[str]]:
123
+ """Validate ``--complete`` names. Return (complete, completed-from-earlier-releases).
124
+
125
+ ``all`` selects every set in the range. A name not in the range is accepted
126
+ when a set of that name shipped before the range start.
127
+ """
128
+ if requested == ["all"]:
129
+ return sorted(sets), []
130
+ unknown = [name for name in requested if name not in sets and name not in earlier]
131
+ if unknown:
132
+ known = ", ".join(sorted(sets)) or "(none)"
133
+ raise ValueError(
134
+ f"unknown feature set(s): {', '.join(unknown)}; sets in range: {known}; "
135
+ "no set of that name before the range either"
136
+ )
137
+ names = sorted(set(requested))
138
+ return names, [name for name in names if name not in sets]
139
+
140
+
141
+ def earlier_sets(repo: str, from_ref: str | None) -> set[str]:
142
+ """Feature-set names from commits reachable from the range start."""
143
+ if from_ref is None:
144
+ return set()
145
+ return {c.feature_set for c in read_commits(repo, from_ref) if c.feature_set is not None}
146
+
147
+
148
+ def to_json(report: Report) -> dict[str, Any]:
149
+ def brief(c: Commit) -> dict[str, str]:
150
+ return {"sha": c.sha[:12], "kind": c.kind, "subject": c.subject}
151
+
152
+ counts: dict[str, int] = {"feat": 0, "fix": 0, "other": 0}
153
+ for c in report.commits:
154
+ if c.kind != "merge":
155
+ counts[c.kind if c.kind in counts else "other"] += 1
156
+ sets = [
157
+ {"name": name, "complete": name in report.complete, "earlier": False, "commits": [brief(c) for c in commits]}
158
+ for name, commits in sorted(report.feature_sets().items())
159
+ ]
160
+ sets += [{"name": name, "complete": True, "earlier": True, "commits": []} for name in report.earlier]
161
+ return {
162
+ "from": report.from_ref,
163
+ "to": report.to_ref,
164
+ "counts": counts,
165
+ "breaking": [brief(c) for c in report.commits if c.breaking],
166
+ "feature_sets": sets,
167
+ "complete": report.complete,
168
+ "required_bump": report.required_bump(),
169
+ }
170
+
171
+
172
+ def to_text(report: Report) -> str:
173
+ data = to_json(report)
174
+ lines = [f"Range: {data['from'] or '(root)'}..{data['to']}"]
175
+ counts = data["counts"]
176
+ lines.append(f"Commits: {counts['feat']} feat, {counts['fix']} fix, {counts['other']} other")
177
+ for item in data["breaking"]:
178
+ lines.append(f"BREAKING {item['sha']} {item['subject']}")
179
+ if data["feature_sets"]:
180
+ lines.append("Feature sets:")
181
+ for fs in data["feature_sets"]:
182
+ if fs["earlier"]:
183
+ lines.append(f" {fs['name']} (shipped in earlier releases, complete)")
184
+ continue
185
+ feats = sum(1 for c in fs["commits"] if c["kind"] == "feat")
186
+ mark = "complete" if fs["complete"] else "in progress"
187
+ extra = len(fs["commits"]) - feats
188
+ other = f" + {extra} other" if extra else ""
189
+ lines.append(f" {fs['name']} ({feats} feat{other}, {mark})")
190
+ lines.extend(f" {c['sha']} {c['subject']}" for c in fs["commits"])
191
+ else:
192
+ lines.append("Feature sets: none")
193
+ lines.append(f"Required bump: {data['required_bump']}")
194
+ return "\n".join(lines)
195
+
196
+
197
+ def parse_args(argv: list[str]) -> argparse.Namespace:
198
+ parser = argparse.ArgumentParser(prog="release-feature-sets.sh", description=__doc__.splitlines()[0])
199
+ parser.add_argument("--repo", default=".", help="repository path (default: .)")
200
+ parser.add_argument("--from", dest="from_ref", help="range start (default: latest tag reachable from --to)")
201
+ parser.add_argument("--to", dest="to_ref", default="HEAD", help="range end (default: HEAD)")
202
+ parser.add_argument(
203
+ "--complete",
204
+ default="",
205
+ help="comma-separated feature sets that are complete and user-visible, or 'all'",
206
+ )
207
+ parser.add_argument("--format", choices=("json", "text"), default="json")
208
+ return parser.parse_args(argv)
209
+
210
+
211
+ def main(argv: list[str] | None = None) -> int:
212
+ args = parse_args(sys.argv[1:] if argv is None else argv)
213
+ if git(args.repo, "rev-parse", "--git-dir").returncode != 0:
214
+ print(f"release-feature-sets: not a git repository: {args.repo}", file=sys.stderr)
215
+ return 1
216
+ from_ref = args.from_ref or latest_tag(args.repo, args.to_ref)
217
+ rev_range = f"{from_ref}..{args.to_ref}" if from_ref else args.to_ref
218
+ try:
219
+ report = Report(from_ref=from_ref, to_ref=args.to_ref, commits=read_commits(args.repo, rev_range))
220
+ requested = [n.strip() for n in args.complete.split(",") if n.strip()]
221
+ sets = report.feature_sets()
222
+ earlier = earlier_sets(args.repo, from_ref) if any(n not in sets for n in requested) else set()
223
+ report.complete, report.earlier = resolve_complete(requested, sets, earlier)
224
+ except ValueError as exc:
225
+ print(f"release-feature-sets: {exc}", file=sys.stderr)
226
+ return 1
227
+ print(json.dumps(to_json(report), indent=2) if args.format == "json" else to_text(report))
228
+ return 0
229
+
230
+
231
+ if __name__ == "__main__":
232
+ raise SystemExit(main())
@@ -4,7 +4,6 @@
4
4
  #
5
5
  # Usage:
6
6
  # setup-worktree.sh parent <repo-name> <feature-slug> [--base-ref <branch>]
7
- # setup-worktree.sh child <repo-name> <feature-slug> <task-id> [DEPRECATED]
8
7
  #
9
8
  # Modes:
10
9
  # parent Creates <repo-root>/.opencode/worktrees/<repo>-<feature>/. This is the
@@ -15,15 +14,10 @@
15
14
  # With --base-ref: checks out the existing branch (e.g. PR head). If the
16
15
  # branch is missing locally, runs git fetch from origin once.
17
16
  #
18
- # child DEPRECATED. Does not create a separate per-task worktree. Prints a
19
- # warning to stderr and echoes the *feature* worktree path (same as
20
- # parent) if it already exists; otherwise instructs the caller to run
21
- # `parent` first. Non-destructive — no new git worktrees for “children”.
22
- #
23
17
  # Idempotency (parent): if the path exists and is on the expected branch, echo path.
24
18
  #
25
19
  # Exit codes:
26
- # 0 success (path echoed to stdout; child deprecation may print to stderr)
20
+ # 0 success (path echoed to stdout)
27
21
  # 1 error (message on stderr)
28
22
 
29
23
  set -euo pipefail
@@ -36,12 +30,10 @@ usage() {
36
30
  cat >&2 <<'EOF'
37
31
  Usage:
38
32
  setup-worktree.sh parent <repo-name> <feature-slug> [--base-ref <branch>]
39
- setup-worktree.sh child <repo-name> <feature-slug> <task-id> (deprecated)
40
33
 
41
34
  Arguments:
42
35
  repo-name Short name of the repository (e.g. "ystack")
43
36
  feature-slug Kebab-case feature identifier (e.g. "add-widget")
44
- task-id (child only, ignored for path) legacy parallel-task id
45
37
  --base-ref <b> (parent only) Check out the existing branch <b> into the
46
38
  worktree instead of creating a new feat/<feature> branch.
47
39
 
@@ -51,9 +43,6 @@ Worktree (single contract):
51
43
 
52
44
  Set YCC_WORKTREE_ROOT to override the root. Relative overrides are resolved
53
45
  against the current repository root. Legacy roots are not migrated or touched.
54
-
55
- 'child' mode is deprecated: it echoes the feature worktree path if present; it does
56
- not create separate child worktrees. See worktree-strategy.md.
57
46
  EOF
58
47
  }
59
48
 
@@ -69,12 +58,6 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
69
58
  # shellcheck source=worktree-paths.sh
70
59
  source "${SCRIPT_DIR}/worktree-paths.sh"
71
60
 
72
- # Replace every '.' with '-' in a task-id string.
73
- normalize_task_id() {
74
- local raw="$1"
75
- echo "${raw//./-}"
76
- }
77
-
78
61
  # Return the branch currently checked out in a worktree path.
79
62
  # Uses `git worktree list --porcelain` output.
80
63
  _worktree_branch() {
@@ -150,43 +133,6 @@ setup_parent() {
150
133
  echo "$parent_path"
151
134
  }
152
135
 
153
- # ---------------------------------------------------------------------------
154
- # Mode: child (deprecated — no separate worktree; echo feature path if exists)
155
- # ---------------------------------------------------------------------------
156
-
157
- setup_child() {
158
- local repo_name="$1"
159
- local feature_slug="$2"
160
- local raw_task_id="$3"
161
-
162
- if [[ -z "$repo_name" || -z "$feature_slug" || -z "$raw_task_id" ]]; then
163
- _error "repo-name, feature-slug, and task-id must not be empty"
164
- usage
165
- exit 1
166
- fi
167
-
168
- local _task_id
169
- _task_id="$(normalize_task_id "$raw_task_id")"
170
-
171
- local repo_root
172
- repo_root="$(ycc_repo_root)"
173
-
174
- local feature_path
175
- feature_path="$(ycc_feature_worktree_path "$repo_root" "$repo_name" "$feature_slug")"
176
-
177
- echo "setup-worktree.sh: DEPRECATED: 'child' does not create a per-task worktree (task-id=${_task_id}). Use a single feature worktree; all agents share: ${feature_path}" >&2
178
-
179
- if [[ -d "$feature_path" ]]; then
180
- if git -C "$feature_path" rev-parse --git-dir >/dev/null 2>&1; then
181
- echo "$feature_path"
182
- return 0
183
- fi
184
- fi
185
-
186
- _error "feature worktree not found at '${feature_path}'. Run: setup-worktree.sh parent ${repo_name} ${feature_slug}"
187
- exit 1
188
- }
189
-
190
136
  parse_parent_args() {
191
137
  local -n out_repo="$1"
192
138
  local -n out_slug="$2"
@@ -249,15 +195,6 @@ run_parent_mode() {
249
195
  setup_parent "$p_repo" "$p_slug" "$p_base_ref"
250
196
  }
251
197
 
252
- run_child_mode() {
253
- if [[ $# -ne 3 ]]; then
254
- _error "'child' mode requires exactly 3 arguments: <repo-name> <feature-slug> <task-id>"
255
- usage
256
- exit 1
257
- fi
258
- setup_child "$1" "$2" "$3"
259
- }
260
-
261
198
  # ---------------------------------------------------------------------------
262
199
  # Entry point
263
200
  # ---------------------------------------------------------------------------
@@ -269,16 +206,12 @@ main() {
269
206
  shift
270
207
  run_parent_mode "$@"
271
208
  ;;
272
- child)
273
- shift
274
- run_child_mode "$@"
275
- ;;
276
209
  --help|-h)
277
210
  usage
278
211
  exit 0
279
212
  ;;
280
213
  *)
281
- _error "first argument must be 'parent' or 'child'"
214
+ _error "first argument must be 'parent'"
282
215
  usage
283
216
  exit 1
284
217
  ;;
@@ -62,7 +62,7 @@ adding it.
62
62
 
63
63
  | Field | Value |
64
64
  | ----------- | -------------------------------------------------------- |
65
- | Path | `.opencode-plugin/skills/_shared/scripts/<kebab-name>.sh` |
65
+ | Path | `.opencode-plugin/shared/scripts/<kebab-name>.sh` |
66
66
  | Sourced via | `{{package-root}}/shared/scripts/<name>.sh` |
67
67
  | Threshold | Only create when two or more distinct skills need it |
68
68
 
@@ -33,7 +33,7 @@ same workflow will be reused repeatedly.
33
33
  creates drift and makes fixes harder to apply consistently.
34
34
 
35
35
  **Do this instead:** If two or more existing skills need the same helper, add it to
36
- `.opencode-plugin/skills/_shared/scripts/` and source it from each skill via
36
+ `.opencode-plugin/shared/scripts/` and source it from each skill via
37
37
  `{{package-root}}/shared/scripts/<name>.sh`. Do not create a new skill
38
38
  just to house shared logic.
39
39
 
@@ -14,6 +14,15 @@ set -euo pipefail
14
14
 
15
15
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
16
  REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../.." && pwd)"
17
+ # A generated bundle copy (packages/<target>/.opencode-plugin/skills/...) sits deeper than the
18
+ # canonical ycc/skills tree; scaffold into the canonical source, never the bundle.
19
+ if [[ ! -f "${REPO_ROOT}/ycc/.opencode-plugin/plugin.json" ]]; then
20
+ REPO_ROOT="$(git -C "${PWD}" rev-parse --show-toplevel 2>/dev/null || true)"
21
+ [[ -n "${REPO_ROOT}" && -f "${REPO_ROOT}/ycc/.opencode-plugin/plugin.json" ]] || {
22
+ echo "scaffold-skill.sh: run from a ystack checkout (no ycc/.opencode-plugin/plugin.json found)" >&2
23
+ exit 1
24
+ }
25
+ fi
17
26
 
18
27
  SKILL_NAME=""
19
28
  SKILL_ONLY=0
@@ -59,15 +59,32 @@ Read `ycc/skills/bundle-release/references/version-policy.md`.
59
59
  Compare the current version (reported by preflight output) against the requested
60
60
  `<new-version>`.
61
61
 
62
- Determine the bump kind (major / minor / patch) by inspecting recent commit history:
62
+ Group the commits since the last tag into feature sets:
63
63
 
64
64
  ```
65
- git log $(git describe --tags --abbrev=0 2>/dev/null || echo HEAD~20)..HEAD --oneline
65
+ .opencode-plugin/shared/scripts/release-feature-sets.sh --format text
66
66
  ```
67
67
 
68
- If the requested bump looks mismatched with the recent history — for example, new
69
- skills were added but a patch bump was requested — surface the concern and ask the user
70
- to confirm before continuing.
68
+ A single `feat` commit does not require a minor; a complete feature set does. When
69
+ feature sets are listed, ask which are complete and user-visible (one multi-select
70
+ question; "none" is valid), then rerun with `--complete <set,...>` to read
71
+ `Required bump`. Several `feat` commits for one feature are one set, and a set still in
72
+ progress or hidden behind an off-by-default switch is not complete. A set whose `feat`
73
+ commits shipped in an earlier patch is not listed; if it is now complete, name it in
74
+ `--complete` anyway (the helper finds it before the range).
75
+
76
+ `Required bump` reads commit markers only, so also apply the Major rules in
77
+ `references/version-policy.md`: a renamed or removed skill, command or agent is a major
78
+ even without a `!` marker. Check with
79
+ `git diff --name-status <last-tag>..HEAD -- ycc/skills ycc/agents` (any `D` or `R` entry
80
+ for a `SKILL.md` or agent file).
81
+
82
+ The floor is the higher of `Required bump` and the Major rules. A requested version below
83
+ it (a patch over a complete set, such as a finished new skill, or a non-major over a
84
+ breaking change or a renamed/removed surface) is refused, not confirmed: stop, name what
85
+ sets the floor, and ask for a version at or above it. A patch over in-progress sets is
86
+ expected; name those sets once and continue. Headless, treat every set as in progress,
87
+ and on a refusal print the concern plus the rerun command.
71
88
 
72
89
  ## Phase 2: Dry-run check
73
90
 
@@ -41,7 +41,15 @@ If pre-flight fails: resolve all failing conditions before proceeding. Do not sk
41
41
  git log $(git describe --tags --abbrev=0)..HEAD --oneline
42
42
  ```
43
43
 
44
- - [ ] Select the semver bump level (major / minor / patch) per `references/version-policy.md`.
44
+ - [ ] Group `feat` commits into feature sets and mark the complete ones:
45
+
46
+ ```
47
+ .opencode-plugin/shared/scripts/release-feature-sets.sh --format text
48
+ .opencode-plugin/shared/scripts/release-feature-sets.sh --complete <set,...> --format text
49
+ ```
50
+
51
+ - [ ] Select the semver bump level (major / minor / patch) at or above `Required bump`,
52
+ per `references/version-policy.md`.
45
53
  - [ ] Record the chosen new version: `<new-version>`
46
54
 
47
55
  ---
@@ -115,7 +115,7 @@ Use standard semver (`MAJOR.MINOR.PATCH`). Apply the first rule that matches:
115
115
  - Change to the `name` field in `plugin.json`
116
116
  - Restructure of how the bundle is loaded or distributed
117
117
 
118
- **Minor** — any of the following:
118
+ **Minor** — a complete feature set that includes any of the following:
119
119
 
120
120
  - New skill, command, or agent added
121
121
  - Additive frontmatter fields on existing surfaces (no removals or renames)
@@ -127,9 +127,16 @@ Use standard semver (`MAJOR.MINOR.PATCH`). Apply the first rule that matches:
127
127
  - Documentation-only change (SKILL.md prose, reference docs, templates)
128
128
  - Template refinement or whitespace/linter-only fix
129
129
 
130
- Tie-breaker: when a change could reasonably justify two bump levels, prefer the more
131
- conservative (higher) bump. When in doubt, bump minor rather than patch, and major
132
- rather than minor.
130
+ These rules apply to **feature sets**, not single commits. Several `feat` commits often
131
+ build one feature; `.opencode-plugin/shared/scripts/release-feature-sets.sh` groups them by
132
+ their `Feature-Set:` footer, else their scope. A set requires a minor only when it is
133
+ complete and user-visible. A set still in progress, or hidden behind an off-by-default
134
+ switch (see "Unfinished work" in `RELEASING.md`), ships in a patch, and its commits are
135
+ listed under the release notes' features as usual.
136
+
137
+ Tie-breaker: Major rules are never downgraded; when a change could be breaking, bump
138
+ major. Between minor and patch, the feature-set answer decides: when the maintainer is
139
+ unsure whether a set is complete, it is in progress and the release is a patch.
133
140
 
134
141
  ## Never-Edit List
135
142
 
@@ -23,6 +23,11 @@ and its direct child directories), plus ``packages/<package>`` and
23
23
  ``packages/<runtime>/<package>`` plugin/package manifests (same bounded manifest
24
24
  filenames). An included native OMP package must have ``.omp-plugin/plugin.json``,
25
25
  ``.claude-plugin/plugin.json`` and ``package.json`` under ``packages/omp/<package>``.
26
+ An included native Antigravity package must have ``packages/antigravity/<package>/plugin.json``
27
+ (the manifest sits at the plugin root). An included native Muse package must have
28
+ ``packages/muse/ycc/.claude-plugin/plugin.json`` for ``ycc`` (the claude-compatible family,
29
+ the only one that imports agents) and ``packages/muse/<package>/.muse-plugin/plugin.json``
30
+ for every other package.
26
31
 
27
32
  Included native manifests must exist and have a version. Unmodeled optional files
28
33
  and versionless marketplace entries never gain a field.
@@ -49,7 +54,7 @@ MANIFEST_SUBDIRS = (".claude-plugin", ".codex-plugin", ".cursor-plugin")
49
54
  OMP_MANIFEST_SUBDIRS = (".omp-plugin", ".claude-plugin")
50
55
  EXCLUDED_NAME = "ycc-mods"
51
56
  EXCLUDED_SOURCE_PREFIX = "ycc/mods"
52
- PACKAGE_RUNTIMES = ("claude", "codex", "cursor", "opencode", "agents", "omp", "pi")
57
+ PACKAGE_RUNTIMES = ("claude", "codex", "cursor", "opencode", "agents", "omp", "pi", "antigravity", "muse")
53
58
  MODEL_REL = "ycc/settings/packages.json"
54
59
  Key = str | int
55
60
 
@@ -195,6 +200,19 @@ def _model_manifests(root: Path) -> list[tuple[str, str, bool, bool]]:
195
200
  for rel in (*(f"{base}/{sub}/plugin.json" for sub in OMP_MANIFEST_SUBDIRS), f"{base}/package.json"):
196
201
  manifests.append((label, rel, status == "included", required))
197
202
  continue
203
+ if runtime == "antigravity" and mechanism == "native" and "/" not in key:
204
+ # scripts/generate_antigravity_packages.py: Antigravity reads plugin.json at the
205
+ # plugin root, regenerated by ./scripts/sync.sh (checked, never hand-bumped).
206
+ manifests.append((label, f"packages/{runtime}/{key}/plugin.json", status == "included", required))
207
+ continue
208
+ if runtime == "muse" and mechanism == "native" and "/" not in key:
209
+ # scripts/generate_muse_packages.py: ycc ships the claude-compatible manifest,
210
+ # every other package the native one; regenerated by ./scripts/sync.sh.
211
+ subdir = ".opencode-plugin" if key == "ycc" else ".muse-plugin"
212
+ manifests.append(
213
+ (label, f"packages/{runtime}/{key}/{subdir}/plugin.json", status == "included", required)
214
+ )
215
+ continue
198
216
  if runtime == "pi" and mechanism == "native" and "/" not in key:
199
217
  # A Pi package's only manifest is packages/pi/<key>/package.json (ADR 0003), but its
200
218
  # layout is not final until the packages/pi generator (YAN-1188) lands: an included
@@ -243,8 +243,6 @@ Include:
243
243
  - Migration steps if needed
244
244
  - Performance considerations
245
245
 
246
- Be thorough but concise. Only include information that's important for someone maintaining this code.
247
-
248
246
  #### E2E Tests Section
249
247
 
250
248
  Provide specific testing guidance: