feat(opencode): skill parity — generate the tree from canonical ctx skills - #160
feat(opencode): skill parity — generate the tree from canonical ctx skills#160omergk28 wants to merge 3 commits into
Conversation
a41f087 to
b6bf560
Compare
…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>
b6bf560 to
9cbc141
Compare
|
@omergk28 looking mostly good; here are my comments: 1. Canonical bodies introduce seven dangling slash-command references in the pre-existing ten
The closure claim here is scoped to the planning arc, and it holds — verified Cheapest meaningful fix: enroll 2. Parity test mirrors the transform's over-reach, so it can't catch it
Today the tree is safe — every Nit3. Gate restore can leave an untracked generated SKILL.md behind
If a skill directory is committed without a |
feat(opencode): skill parity — generate the tree from canonical ctx skills
Branch:
feat/158-opencode-skill-parity→main· Closes #158Commits:
0be1d23c,930325e2,9cbc1419· Spec:specs/opencode-skill-parity.mdWhat
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.
sync-opencode-skillsruns inmake build;check-opencode-skillsgatesmake audit(fails on staleness andrestores state, mirroring the Copilot gate).
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.TestSyncedSkillParity(
internal/assets/read/skill/parity_test.go): asserts everysynced 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 enforcesit — previously only
make auditon developer machines did.Verifies 52 synced skills, 14 Copilot tool-only exempt.
agent.OpenCodeSkills(), anddeploySkills()already walk whatever directories exist.docs/home/opencode.mdslash-command section lists the fullsynced set (relative recipe link per docs conventions);
site/regenerated for that page +
search.jsononly (see below).Verification
make auditfully green (run on main + this + the siblinghack-portability fix, i.e. post-merge state), including the new
check-opencode-skillsgate.check-opencode-skillsfails and restores state.ctx setup opencode --writein afresh temp repo → all 17 skills deployed, deployed content
byte-identical to embedded source.
TestSkillFrontmattercovers the 7 new dirs automatically.Decisions / notes for review
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.
make sitewith 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.
fix/hack-script-portabilityshould merge first somake auditruns for macOS reviewers; this PR does not depend onit for CI.