Skip to content

feat(opencode): skill parity — generate the tree from canonical ctx skills - #160

Open
omergk28 wants to merge 3 commits into
ActiveMemory:mainfrom
omergk28:feat/158-opencode-skill-parity
Open

feat(opencode): skill parity — generate the tree from canonical ctx skills#160
omergk28 wants to merge 3 commits into
ActiveMemory:mainfrom
omergk28:feat/158-opencode-skill-parity

Conversation

@omergk28

Copy link
Copy Markdown
Contributor

feat(opencode): skill parity — generate the tree from canonical ctx skills

Branch: feat/158-opencode-skill-paritymain · Closes #158
Commits: f0176142, f3f73875, 13fe9304 · Spec: specs/opencode-skill-parity.md

What

Aligns OpenCode with the Copilot CLI model: the skill tree is
generated from internal/assets/claude/skills/ at build time.

  • hack/sync-opencode-skills.sh — sibling of the Copilot script,
    same contract: opt-in by directory presence, allowed-tools:
    frontmatter strip, OpenCode-only skills untouched. shellcheck-clean.
  • Makefile: sync-opencode-skills runs in make build;
    check-opencode-skills gates make audit (fails on staleness and
    restores state, mirroring the Copilot gate).
  • 17 skills enrolled: the existing 10 (terse hand-written variants
    replaced by canonical bodies) + the Design Before Coding planning
    arc (ctx-brainstorm, ctx-plan, ctx-spec, ctx-task-out,
    ctx-implement) + capture pair (ctx-task-add,
    ctx-decision-add). Canonical names, 1:1 with the Claude tree.
  • New test TestSyncedSkillParity
    (internal/assets/read/skill/parity_test.go): asserts every
    synced skill in BOTH generated trees (OpenCode + Copilot CLI) is
    byte-identical to its Claude source minus allowed-tools: lines.
    This moves the sync contract into go test, so CI now enforces
    it
    — previously only make audit on developer machines did.
    Verifies 52 synced skills, 14 Copilot tool-only exempt.
  • Zero Go source changes: embed glob, agent.OpenCodeSkills(), and
    deploySkills() already walk whatever directories exist.
  • Docs: docs/home/opencode.md slash-command section lists the full
    synced set (relative recipe link per docs conventions); site/
    regenerated for that page + search.json only (see below).

Verification

  • make audit fully green (run on main + this + the sibling
    hack-portability fix, i.e. post-merge state), including the new
    check-opencode-skills gate.
  • Byte-parity of all 17 skills verified against the sed transform.
  • Staleness path verified: deliberately staled a skill →
    check-opencode-skills fails and restores state.
  • End-to-end smoke: built binary, ctx setup opencode --write in a
    fresh temp repo → all 17 skills deployed, deployed content
    byte-identical to embedded source.
  • TestSkillFrontmatter covers the 7 new dirs automatically.

Decisions / notes for review

  • No terse transform (issue's open question): the hand-written
    terseness was truncated reference material, so canonical bodies
    replace it. This also drops a couple of genuinely OpenCode-specific
    lines (e.g. ctx-status's "slash command takes no arguments" note) —
    judged not worth a divergent transform; revisit in the sync script
    if OpenCode-specific adaptation is ever needed.
  • site/ regen scoped to the opencode page + search.json: a full
    make site with the exactly-pinned zensical 0.0.51 churns 100+
    unrelated pages with HTML-entity encoding differences (underlying
    library drift; captured as a LEARNING). Excluded to keep the PR
    isolated.
  • Sibling PR fix/hack-script-portability should merge first so
    make audit runs for macOS reviewers; this PR does not depend on
    it for CI.

…kills

Align OpenCode with the Copilot CLI model (issue ActiveMemory#158):
hack/sync-opencode-skills.sh derives each enrolled skill from
internal/assets/claude/skills/<name>/SKILL.md with the Claude-specific
allowed-tools frontmatter key stripped. Opt-in by directory presence;
wired into make build; check-opencode-skills gates make audit.

Enrolls 17 skills: the existing 10 hand-written ones (terse variants
replaced by canonical bodies) plus the Design Before Coding planning
arc (ctx-brainstorm, ctx-plan, ctx-spec, ctx-task-out, ctx-implement)
and the capture pair (ctx-task-add, ctx-decision-add). No Go changes:
the embed glob, agent.OpenCodeSkills(), and deploySkills() walk
whatever directories exist. docs/home/opencode.md slash-command
section updated (site/ regen tracked in TASKS).

Closes ActiveMemory#158

Spec: specs/opencode-skill-parity.md
Signed-off-by: Omer Kocaoglu <omergk28@gmail.com>
Only the opencode page and search index are committed: the local
zensical 0.0.51 rebuild also churns 100+ unrelated pages with
HTML-entity encoding differences (&ActiveMemory#39; vs ') from underlying
library drift; that churn is excluded to keep this PR isolated.

Spec: specs/opencode-skill-parity.md
Signed-off-by: Omer Kocaoglu <omergk28@gmail.com>
Spec: specs/opencode-skill-parity.md
Signed-off-by: Omer Kocaoglu <omergk28@gmail.com>
@omergk28
omergk28 force-pushed the feat/158-opencode-skill-parity branch from a41f087 to b6bf560 Compare August 20, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: OpenCode skill parity — generate the tree from canonical Claude skills

1 participant