Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: true
contact_links:
- name: Report a vulnerability
url: https://github.com/Neverdecel/OpenSkillGen/security/advisories/new
url: https://github.com/Neverdecel/opencode-guided-learning/security/advisories/new
about: Private security reports only — do not file public issues for exploits or secrets
- name: OpenCode plugin docs
url: https://opencode.ai/docs/plugins/
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish

on:
push:
tags: ["v*"]
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci --ignore-scripts
- run: npm run check
- run: npm test
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ or cleanup infrastructure.
Requires Node.js 24+ and npm. OpenCode 1.18.30 is required for live CLI tests.

```sh
git clone https://github.com/Neverdecel/OpenSkillGen.git
cd OpenSkillGen
git clone https://github.com/Neverdecel/opencode-guided-learning.git
cd opencode-guided-learning
npm ci
npm run check
npm test
Expand Down Expand Up @@ -62,6 +62,13 @@ checks are smoke only. Acceptance criteria:
pass does not erase them. Never run evaluation writes against a real skill
library.

## Releases

Package, repo, and plugin id are `opencode-guided-learning`. Publish with a
`v*` tag or `workflow_dispatch` on `.github/workflows/publish.yml`; it needs
the `NPM_TOKEN` secret. Do not `npm publish` from a laptop. Bump
`package.json` version before tagging.

## Issues

Include OpenCode and model versions and a minimal, sanitized reproduction.
Expand Down
29 changes: 9 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenSkillGen
# opencode-guided-learning

[![Checks](https://github.com/Neverdecel/OpenSkillGen/actions/workflows/checks.yml/badge.svg)](https://github.com/Neverdecel/OpenSkillGen/actions/workflows/checks.yml)
[![Checks](https://github.com/Neverdecel/opencode-guided-learning/actions/workflows/checks.yml/badge.svg)](https://github.com/Neverdecel/opencode-guided-learning/actions/workflows/checks.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

**Agent notices. Human decides. OpenCode remembers.**
Expand All @@ -16,31 +16,19 @@ Reply **yes**, **no**, **make it global**, **rename it**, **add X**, or **merge
## Requirements

- [OpenCode](https://opencode.ai) **1.18.30** (tested). The plugin uses experimental hooks; later versions need a compatibility check.
- A git clone of this repository at a stable path.

**Not published to npm.** Do not add `opencode-guided-learning` as a package name in `plugin`. Load the source file URL instead.

## Install

```sh
git clone https://github.com/Neverdecel/OpenSkillGen.git
```

Add the **absolute** source-file URL to `plugin` in `~/.config/opencode/opencode.json` (all projects) or the project’s `opencode.json`:

```json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["file:///absolute/path/to/OpenSkillGen/src/index.ts"],
"skills": { "paths": ["/absolute/path/to/OpenSkillGen/skills"] }
}
git clone https://github.com/Neverdecel/opencode-guided-learning.git
sh opencode-guided-learning/scripts/install.sh
```

`skills.paths` is optional; it enables the bundled `skill-mining` and `skill-curation` skills. Keep existing config entries. **Quit and restart OpenCode** (including its backend when using OpenChamber).
That runs `opencode plugin -g` with the checkout’s absolute path (patches global config). `scripts/install.sh --local` is this project only. After npm publish: `opencode plugin -g opencode-guided-learning@0.1.0` (pin the version).

Windows example: `file:///C:/projects/OpenSkillGen/src/index.ts`.
Optional: add the checkout `skills/` directory to `skills.paths` for `skill-mining` and `skill-curation`. **Quit and restart OpenCode** (including its backend when using OpenChamber).

Confirm with `opencode debug config` (the resolved plugin list should include the file URL). Do not paste that output into issues; it can contain secrets. Full steps and troubleshooting: [docs/installation.md](docs/installation.md).
Confirm with `opencode debug config`. Do not paste that output into issues; it can contain secrets. Full steps: [docs/installation.md](docs/installation.md).

## Usage

Expand Down Expand Up @@ -68,7 +56,7 @@ Both options are optional. Defaults: enabled, conservative, no ignored topics.
```json
{
"$schema": "https://opencode.ai/config.json",
"plugin": [["file:///absolute/path/to/OpenSkillGen/src/index.ts", {
"plugin": [["opencode-guided-learning@0.1.0", {
"enabled": true,
"ignoredTopics": ["personal editor preferences", "release-notes"]
}]]
Expand All @@ -91,6 +79,7 @@ The runtime is one file: it appends guidance and a compaction note. No extra mod
| [`skills/`](skills/) | Opt-in mining and curation skills |
| [`examples/`](examples/) | Sample generated skill (not auto-discovered) |
| [`test/`](test/) | Hook tests and isolated live eval |
| [`scripts/install.sh`](scripts/install.sh) | Clone install via `opencode plugin` |
| [`docs/`](docs/installation.md) | Install, troubleshooting, hook research, [skill entity](docs/skill-definition.md) |

## Contributing
Expand Down
6 changes: 3 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Security

Report vulnerabilities privately: **Security → Report a vulnerability** on
[Neverdecel/OpenSkillGen](https://github.com/Neverdecel/OpenSkillGen/security/advisories/new).
[Neverdecel/opencode-guided-learning](https://github.com/Neverdecel/opencode-guided-learning/security/advisories/new).

Do not open a public issue or pull request with exploit details, secrets, or
credentials.
Expand All @@ -19,5 +19,5 @@ Out of scope: a model ignoring consent, writing a low-quality skill, or
following a user request to store secrets — those are instruction-following
failures. Disable the plugin and use OpenCode permissions if you need a guard.

Supported: the current `main` branch of this checkout, tested with OpenCode
1.18.30.
Supported: the current `main` branch and published `opencode-guided-learning`
versions that match it, tested with OpenCode 1.18.30.
88 changes: 61 additions & 27 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Installation and troubleshooting

OpenSkillGen is a **source checkout**, not an npm package. The plugin id is
`opencode-guided-learning`. Do not put that bare name in OpenCode’s `plugin`
array; use a `file:///` URL to `src/index.ts`.
The package, GitHub repo, and plugin id are `opencode-guided-learning`.
Install with OpenCode’s `plugin` command, which installs the package and
patches `opencode.json`.

Official references: [plugins](https://opencode.ai/docs/plugins/),
[configuration](https://opencode.ai/docs/config/),
Expand All @@ -13,22 +13,45 @@ Official references: [plugins](https://opencode.ai/docs/plugins/),

1. Check `opencode --version`. **1.18.30** was tested against its plugin types
and session runtime. Experimental hooks may change.
2. Clone `https://github.com/Neverdecel/OpenSkillGen.git` to a path you will
keep. Moving the checkout later requires updating the config URL.
3. Add `file:///absolute/path/to/OpenSkillGen/src/index.ts` to the existing
`plugin` array in global or project config. An absolute file URL avoids
resolving against the wrong config directory. Windows:
`file:///C:/projects/OpenSkillGen/src/index.ts`.
4. Optional: add the checkout’s `skills` directory to `skills.paths` (absolute
path) so `skill-mining` and `skill-curation` are invocable. Do not copy them
into another project’s `.opencode/skills/` unless you want a fork.
5. Quit and restart OpenCode. Restart the backend as well when a frontend such
2. Install into global config (all projects) or omit `--global` / `-g` for the
current project:

From a clone (works without npm):

```sh
git clone https://github.com/Neverdecel/opencode-guided-learning.git
sh opencode-guided-learning/scripts/install.sh
```

`scripts/install.sh --local` patches this project only. `--force` replaces
an existing `opencode-guided-learning` entry. Windows:

```bat
opencode plugin -g C:\projects\opencode-guided-learning
```

After the package is published:

```sh
opencode plugin -g opencode-guided-learning@0.1.0
```

Pin the version. OpenCode caches `name@latest` and does not refresh it.
3. Optional: add the checkout’s `skills` directory to `skills.paths` (absolute
path) so `skill-mining` and `skill-curation` are invocable. The installer
prints that path. Do not copy them into another project’s
`.opencode/skills/` unless you want a fork. npm installs keep skills inside
the cached package; prefer the clone path if you want those skills.
4. Quit and restart OpenCode. Restart the backend as well when a frontend such
as OpenChamber manages it.

OpenCode’s TypeScript loader runs `src/index.ts` directly. No build or
`npm install` is required to use the plugin. `npm ci` is for contributors
(pinned SDK types and tests). `package.json` is `private: true` so the package
is not published by accident; that does not affect GitHub or local loading.
`npm install` is required to use a clone. `npm ci` is for contributors
(pinned SDK types and tests).

If you previously listed `file:///…/src/index.ts`, remove that entry after
switching to `opencode plugin`. `--force` does not replace `file://` specs, and
both would load.

Global config: `~/.config/opencode/opencode.json` or `opencode.jsonc` (honor a
custom config directory). Project config: repository root or `.opencode/`.
Expand All @@ -42,24 +65,34 @@ From the project where you use the plugin:
opencode debug config
```

The resolved plugin list should include the source-file URL. With bundled
skills enabled, `opencode debug skill` should list `skill-mining` and
`skill-curation`. That output can include private configuration — do not paste
it into an issue.
The resolved plugin list should include the checkout directory or
`opencode-guided-learning@…`. With bundled skills enabled, `opencode debug skill`
should list `skill-mining` and `skill-curation`. That output can include private
configuration — do not paste it into an issue.

A lack of learning suggestions during ordinary work is expected. Contributors
can run the isolated transport test in [CONTRIBUTING.md](../CONTRIBUTING.md).

## Update

Clone:

```sh
git status
git pull --ff-only
```

Keep local edits; pin a reviewed commit for a stable install. Restart OpenCode
after pulling. Contributors should rerun `npm ci` when the lockfile changes,
then `npm run check` and `npm test`.
after pulling.

npm pin (new version uses a new cache directory):

```sh
opencode plugin -g -f opencode-guided-learning@0.1.1
```

Contributors should rerun `npm ci` when the lockfile changes, then
`npm run check` and `npm test`.

## Disable or uninstall

Expand All @@ -71,15 +104,16 @@ then `npm run check` and `npm test`.

## Troubleshooting

- **Not in resolved config:** check config scope, the `file:///` URL, and
- **Not in resolved config:** check config scope, the plugin spec, and
`XDG` / custom config-directory settings.
- **Checkout moved:** update the URL and restart.
- **Checkout moved:** rerun `scripts/install.sh --force` (or pass the new
absolute path to `opencode plugin`) and restart.
- **Schema error:** validate against [https://opencode.ai/config.json](https://opencode.ai/config.json).
Options belong in the plugin tuple, not at the top level of the config.
- **Stale behavior:** restart the OpenCode backend, not only the UI.
- **Duplicate guidance:** do not also drop `src/index.ts` into
`.opencode/plugins/` or `~/.config/opencode/plugins/` while it is listed in
`plugin`.
- **Duplicate guidance:** remove old `file:///` entries; do not also drop
`src/index.ts` into `.opencode/plugins/` or `~/.config/opencode/plugins/`
while it is listed in `plugin`.
- **Ignores consent or writes a poor skill:** model behavior, not a write
guard. Disable the plugin if needed. File a credential-free issue with
OpenCode/model versions and sanitized tool calls. Never test against a real
Expand Down
Loading