Repository navigation
Releases
v0.5.0-a
Summary
Migrated from flat commands/ to OpenCode's skills/ directory convention. Each skill is now a subdirectory containing SKILL.md (skills/<name>/SKILL.md), installed recursively into <project>/.opencode/skills/. The installer was rewritten as a depth-first copyDir and remains idempotent (never overwrites user-customised files).
Breaking / Migration
- Source layout:
commands/*.md→skills/*/SKILL.md(5 skills:wiki-agents-file,wiki-archive,wiki-consistency,wiki-dedup,wiki-sync). - Rename:
wiki-update→wiki-sync(commands/wiki-update.md→skills/wiki-sync/SKILL.md). Backward-compat shims kept inopencode.jsonso/wiki-updatestill resolves to/skill:wiki-sync(same for the other fourwiki-*commands). - Install target:
.opencode/commands/→.opencode/skills/(src/index.ts:8,src/index.ts:27). - Removed:
openwiki.json(contained onlymodel: opencode-go/deepseek-v4-flash) — model selection now left to the host.
Changes
src/index.ts:34—COMMANDS_DIR→SKILLS_DIR; flatreaddir+readFile/writeFileloop replaced with recursivecopyDir(src, dest)usingreaddir({ withFileTypes: true })+fs.copyFile; preservesinstalled/skippedcounts.opencode.json:3— addedcommandmap with 5 entries (wiki-agents-file,wiki-archive,wiki-consistency,wiki-dedup,wiki-update→wiki-sync) each as{ template: "/skill:...", description, agent: "build" }for compat.AGENTS.md:11— docs updated toskill/*→.opencode/skills/.skills/*/SKILL.md— all five skills moved to subdirectory layout; frontmatter refreshed (name/description/agent: build); body edits are formatting/line-wrap only, no behaviour change beyond thewiki-syncrename.wiki/INDEX.md:10— added Skills Directory Migration entry; escaped*in older entry; added topic clusters.- Tests:
test/commands.test.tsnow asserts exact subdirectory list +SKILL.mdpresence;test/index.test.tsrenamed helper tolistInstalledSkillsand checks.opencode/skills/<name>/SKILL.mdpaths (9 tests pass). wiki/pages/2026-09-17-skills-directory-migration.md— new implementation page documenting the migration (before/after code, test results).
Housekeeping
package.json:3— version0.4.1-a→0.5.0-a; description em-dash normalised.⚠️ Known issue in this tag:package.json:8filesstill lists"commands"instead of"skills"— published tarball will omit theskills/directory. Fix to"skills"beforenpm publish.
Full Changelog: v0.4.1-a...v0.5.0-a
v0.4.1-a
Summary
OpenWiki is now a pure install-only plugin. The background Wiki Agent, the session.idle event hook, the openwiki_init/openwiki_write tools, and all host-coupled code (@opencode-ai/plugin imports, src/lib/summarize.ts, src/lib/wiki.ts) are gone. On load the plugin now only does two idempotent things:
- Copies every
commands/*.mdinto<project>/.opencode/commands/(never overwriting user-customised files). - Writes the
wiki/scaffold (README.md,TEMPLATE.md,INDEX.md,QUESTIONS.md) with<PROJECT_NAME>substituted, skipping existing files.
Commands
- Removed:
/wiki-initand/wiki-write- the scaffold now installs automatically on plugin load, and wiki writing is driven by/wiki-update. - New:
/wiki-update- one page per session underwiki/pages/, keyed bysession_idin frontmatter with awiki/.openwiki-sessions.jsonmapping fallback; every invocation updates the same file, preserving frontmatter and appending dated## Update - YYYY-MM-DDsections. - New:
/wiki-archive- archives pages older than 3 months (or an explicit age like/wiki-archive 6mo), distilling durable content into current pages before retiring originals towiki/archive/; skipsopen/in-progresspages and those with open follow-ups. - New:
/wiki-agents-file- revalidatesAGENTS.mdagainst the codebase, wiki, and git log, auto-applying fixes and printing a diff summary. - Updated:
/wiki-consistencyand/wiki-deduprewritten for the new install-only model.
Housekeeping
- Zero runtime dependencies - no
@opencode-ai/plugindevDependency either; build no longer externalises it. - Migrated docs to a no-markdown-tables convention (flat bullet lists / card sections) across
AGENTS.md, templates, and wiki pages. - New wiki audit pages and tests for the install/command-copy behaviour.
- Default model updated in
openwiki.json(opencode-go/deepseek-v4-flash).
Full Changelog: v0.3.0-rc4...v0.4.1-a
v0.3.0-rc5
Fixes
OpenWikiis now also the module's default export. rc4 added the self-bootstrap on plugin load but only as a named export. OpenCode's plugin loader readsmod.default(packages/opencode/src/plugin/shared.ts:readV1Plugin) and callsapplyPluginindetectmode, which silently returns when the default export is missing. Result: the rc4 factory — and thereforeinstallCommandsIfMissing— was never invoked, the four/wiki-*slash commands were never copied into.opencode/commands/, and the rc4 release notes described a fix that did not actually take effect in production. This release addsexport default OpenWikiso the host's dynamic-import path finds the factory.
Tests
- New regression test pins the default export to the named
OpenWikifunction. Without it, the host'simport()boundary was never exercised in CI. - 29 pass / 0 fail (
bun run lint && bun run typecheck && bun test).
Upgrade
- Bump
@manti-by/openwikito0.3.0-rc5and re-install. The bootstrap is idempotent — projects that already have the four commands are no-ops. - No code changes required on the consumer side.
opencode.jsonplugin entry is unchanged.
v0.3.0-rc4
Zero-config install
The plugin now self-installs its slash commands. Adding the plugin
to opencode.json and restarting OpenCode is enough — the four
/wiki-* commands are copied into <project>/.opencode/commands/
on the plugin's first load (skipping any you've already customised),
and /wiki-init is available immediately.
Why the previous release wasn't enough: OpenCode plugins cannot
register slash commands through the SDK. The API exposes tool,
event, and various hooks, but no command registration, and
commands are discovered from disk before plugins finish loading.
So the file has to be on disk before OpenCode scans it — the only
way to make that automatic is for the plugin to write the file
itself during OpenWiki().
The wiki/ scaffold is still gated behind an explicit /wiki-init
(or a call to the openwiki_init tool) so nothing else gets
written without the user asking.
Changes
OpenWikifactory runsinstallCommandsIfMissingbefore
returning — copiescommands/*.mdinto<project>/.opencode/commands/,
skips existing files.initWikidelegates to the same helper; theopenwiki_inittool
description is updated to reflect that commands now install
automatically.- README install flow updated: add plugin → restart →
/wiki-init
is the entire setup. - Tests cover fresh install, no-overwrite of a customised command,
and the no-op re-load case.
v0.3.0-rc3
Fixes
openwiki_initnow actually installs the slash commands. The tool description
and README both promised that running it would scaffoldwiki/and install
/wiki-init,/wiki-write,/wiki-consistency, and/wiki-dedupinto
.opencode/commands/, but only the wiki/ scaffolding happened — the commands
were silently dropped.initWikinow copies everycommands/*.mdinto
<project>/.opencode/commands/, skipping files that already exist so
user-customised commands survive a re-run.
Internal
- Tests cover both the fresh-install and the idempotent re-run paths.
make checkandnpm publish --dry-runare clean.
v0.3.0-rc2
Bug Fixes
- Fixed flickering native notifications when running under Warp. With the
@warp-dot-dev/opencode-warpplugin installed, every background Wiki Agent run fired a burst of OSC-777 notifications that flickered over the real session's completion notification. Root cause: OpenWiki created its writer session with noparentID, so Warp treated it as a foreground user session and notified on each of itssession.created/chat.message/tool.execute.after/session.idleevents. The writer is now created as a child session (parentIDset), which Warp's existing subagent check (isSubagentSession) already suppresses - no cooperation from the Warp plugin required. (src/index.ts) - Stopped the Wiki Agent from documenting its own background sessions. The
session.idlehandler now skips OpenWiki's cached writer session and any child/subagent session (any session with aparentID) via a newisBackgroundSessionguard. This removes a second source of churn - the writer going idle previously triggered a prompt to document itself, producing extra host events and a bogus self-referential page. (src/index.ts)
Testing
- Added
test/index.test.ts— the first coverage of the host-coupledindex.ts, driving the exportedOpenWikifactory with a mock client. Verifies: the writer is created with the triggering session'sparentID; subagent sessions are skipped; the cached writer is skipped without asession.getcall; non-idle events are ignored.
Docs
- Added wiki page documenting the root cause and fix (
wiki/pages/2026-07-28-warp-notification-flicker-fix.md), cross-linked with the writer-session reuse page. wiki/INDEX.mdupdated accordingly.
Verification
- All 23 tests passing (19 existing + 4 new); lint clean and type compilation successful (
make check).
v0.3.0-rc1
Security
- Fixed a path-traversal / arbitrary file write in the Wiki Agent. The filename for a newly written wiki page was previously taken verbatim from the child session's LLM-generated JSON reply and joined straight into a filesystem write path, with no validation. Since session transcripts can carry untrusted external content, a crafted transcript could have steered the model into writing a file outside
wiki/pages/. The filename is now always derived safely viapageFilename(today, title)(which slugifies the title), so it can never escape the pages directory. (src/index.ts)
Tooling
- Replaced ESLint with Biome as the sole linter and formatter. Removed
eslint,@eslint/js,typescript-eslint,globals, andeslint.config.js; added@biomejs/biomeandbiome.json(2-space indent, double quotes, no semicolons unless needed, 120-char line width, import sorting on). The codebase was reformatted to match. bun run lintnow runsbiome check .(lint + format-check + import order in one pass); added a newbun run format(biome check --write .) and a matchingmake formattarget.- No GitHub Actions changes were required - both workflows call
make check/make install, which already route through the Biome-backedlintscript. - Wired the Zed editor config (
.zed/settings.json) to use Biome as the TypeScript language server/formatter and disabledvtsls/typescript-language-server/eslint. - Reorganized
Makefiletargets:format,git-add, and a newcitarget (git-add->lint->check->test);checkis now just the typecheck step.
Cleanup
- Removed the unused
@opencode-ai/sdkruntime dependency - it was never imported anywhere insrc/, contradicting the project's own "no runtime deps" constraint. - Reconciled the package name across docs:
package.json's scoped name@manti-by/openwiki(unscopedopenwikiis taken by an unrelated npm package) is now referenced consistently inopencode.json,README.md,AGENTS.md, andCLAUDE.md. - Extracted the long inline Wiki Agent prompt template out of
buildWikiAgentPromptintosrc/lib/wiki-agent.txt, loaded via Bun'stype: "text"import and inlined into the build at compile time (no runtime file I/O;summarize.tsstays pure and synchronously testable).
Docs
- Converted the repo-root
DOCS.mddesign spec into a proper wiki reference page (wiki/pages/2026-07-15-openwiki-plugin-design-spec.md);README.mdnow links there instead. - Added wiki pages documenting this release's security review and the Biome migration (
wiki/pages/2026-07-16-security-review-and-biome-migration.md), and keptwiki/INDEX.mdcurrent.
Verification
npm run check(Biome lint/format-check ->tsc --noEmit->bun test) passes: 19/19 tests.bun run build+bun run build:typessucceed; the extracted prompt template was confirmed
present in the compileddist/index.jsbundle.
v0.3.0-b
Summary
Prepares OpenWiki for its first npm publish and brings the project's documentation in line with the current TypeScript/Bun codebase. Fixes two blockers that would have made npm publish fail outright (an npm name collision and an invalid semver version), wires up the GitHub Actions publish workflow correctly, and consolidates/corrects AGENTS.md, CLAUDE.md, and DOCS.md.
What Was Done
- Fixed npm publish blockers: renamed the package from
openwiki(already claimed on the npm registry by an unrelated project) to the scoped@manti-by/openwiki, and corrected the version from the invalid0.2.1/non-semvera-suffix scheme to0.3.0-a. - Completed publishing metadata: added
repository,homepage,bugs,engines,publishConfig(access: public,provenance: true), abuild:typesscript, and acheckscript (lint && typecheck && test); bumped@opencode-ai/plugin/@opencode-ai/sdkand added@types/bun. - Added
.github/workflows/publish.yml: publishes to npm with provenance on a GitHub release or manualworkflow_dispatch, and wires the previously-unusedtaginput intonpm publish --tagso manual dispatches withnext/betaactually take effect. - Extended the
Makefile: addedbuildtypes,prepublish,publish, andpublish_dryruntargets matching the new npm scripts. - Removed command auto-install from
openwiki_init:src/index.tsno longer copiescommands/*.mdinto a consuming project's.opencode/commands/- init now only scaffoldswiki/. Also deleted this repo's own previously-committed local dev artifacts (.opencode/commands/*.md,.opencode/plugins/openwiki.js) that shouldn't have been tracked. - Docs overhaul: added
CLAUDE.md; mergedDESCRIPTION.mdintoDOCS.md(full design spec, plus a Dedup Agent section that had never been documented); revalidatedAGENTS.mdagainst the actual Bun/TypeScript setup (it still described the old JS/Node build); updatedREADME.md's link accordingly.
Follow-up note: CLAUDE.md's "Slash commands" section still says /wiki-init installs commands into .opencode/commands/ - that's now stale given the src/index.ts change above and should be corrected in a follow-up edit.
v0.3.0-a
Summary
Prepares OpenWiki for its first npm publish and brings the project's documentation in line with the current TypeScript/Bun codebase. Fixes two blockers that would have made npm publish fail outright (an npm name collision and an invalid semver version), wires up the GitHub Actions publish workflow correctly, and consolidates/corrects AGENTS.md, CLAUDE.md, and DOCS.md.
What Was Done
- Fixed npm publish blockers: renamed the package from
openwiki(already claimed on the npm registry by an unrelated project) to the scoped@manti-by/openwiki, and corrected the version from the invalid0.2.1/non-semvera-suffix scheme to0.3.0-a. - Completed publishing metadata: added
repository,homepage,bugs,engines,publishConfig(access: public,provenance: true), abuild:typesscript, and acheckscript (lint && typecheck && test); bumped@opencode-ai/plugin/@opencode-ai/sdkand added@types/bun. - Added
.github/workflows/publish.yml: publishes to npm with provenance on a GitHub release or manualworkflow_dispatch, and wires the previously-unusedtaginput intonpm publish --tagso manual dispatches withnext/betaactually take effect. - Extended the
Makefile: addedbuildtypes,prepublish,publish, andpublish_dryruntargets matching the new npm scripts. - Removed command auto-install from
openwiki_init:src/index.tsno longer copiescommands/*.mdinto a consuming project's.opencode/commands/- init now only scaffoldswiki/. Also deleted this repo's own previously-committed local dev artifacts (.opencode/commands/*.md,.opencode/plugins/openwiki.js) that shouldn't have been tracked. - Docs overhaul: added
CLAUDE.md; mergedDESCRIPTION.mdintoDOCS.md(full design spec, plus a Dedup Agent section that had never been documented); revalidatedAGENTS.mdagainst the actual Bun/TypeScript setup (it still described the old JS/Node build); updatedREADME.md's link accordingly.
Follow-up note: CLAUDE.md's "Slash commands" section still says /wiki-init installs commands into .opencode/commands/ - that's now stale given the src/index.ts change above and should be corrected in a follow-up edit.
v0.2.1
OpenWiki v0.2.1 - Session Wiki for OpenCode
OpenWiki is an OpenCode plugin that maintains a local, per-project session wiki. A Wiki Agent automatically summarizes noteworthy sessions into Markdown pages, and a Consistency Agent cross-checks pages for contradictions.
Wiki Agent (automatic session capture)
- Runs on
session.idle- evaluates the transcript and, if page-worthy (debug, investigation, code review, implementation), writes a page underwiki/pages/and updateswiki/INDEX.md - Skips trivial sessions (<80 chars) and wiki maintenance sessions (e.g.
/wiki-dedup,/wiki-consistency) - Idempotent per session - repeated idle events update the same page (matched by
session_idin frontmatter) - Configurable model via
openwiki.json("model": "providerID/modelID"); falls back to the parent session's model, thenopencode.json
Commands
/wiki-init- scaffoldswiki/from bundled templates (README, TEMPLATE, INDEX, QUESTIONS + pages/). Installs commands. Idempotent, never overwrites existing files./wiki-write- force-invokes the Wiki Agent on the current session immediately/wiki-consistency- runs the Consistency Agent: clusters pages by topic, cross-checks for contradictions, resolves against the codebase, files unresolved questions intowiki/QUESTIONS.md, rebuilds the "By topic" index section/wiki-dedup- finds ~85-90% similar pages, merges them keeping the newest date/session
Architecture
- Rewritten from JavaScript to TypeScript + Bun (build, test runner, package manager)
- Zero runtime dependencies -
@opencode-ai/pluginis injected by the OpenCode host - ESM-only (
"type": "module"), compiled todist/viabun build - CI via GitHub Actions (
bun install->make build->make check= lint + typecheck + test)
Supported page types
debug, investigation, code-review, implementation
Usage
- Add to
opencode.json:
{
"plugin": ["github:manti-by/openwiki#v0.2.1"]
}- Run /wiki-init to initialize
- Work normally - pages are created automatically
- Run /wiki-consistency periodically to keep pages honest
Project layout
src/ TypeScript source
templates/ wiki/ scaffold templates
commands/ OpenCode command definitions
dist/ Compiled output
wiki/ Generated session wiki (per project)