Skip to content

Commit a98d214

Browse files
docs: improve end-user README and add releasing guide
1 parent 818e272 commit a98d214

3 files changed

Lines changed: 141 additions & 25 deletions

File tree

README.md

Lines changed: 77 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,82 @@
11
# opencode-palantir
22

3-
OpenCode plugin that provides Palantir Foundry documentation to AI agents via local Parquet storage.
3+
OpenCode plugin that provides **Palantir Foundry documentation** to AI agents via a local Parquet
4+
database.
45

56
## Features
67

78
- Fetches all ~3,600 pages from Palantir's public documentation
8-
- Stores in local Parquet file for fast offline access (~17MB)
9+
- Stores in a local Parquet file for fast offline access (~17MB)
910
- Exposes `get_doc_page` and `list_all_docs` tools for AI agents
1011

11-
## Setup
12+
## Quick start (OpenCode users)
13+
14+
### 1) Install the plugin
15+
16+
In your project repo, add the plugin as a dependency inside `.opencode/` (keeps plugin deps separate
17+
from your app deps):
18+
19+
```bash
20+
mkdir -p .opencode
21+
22+
cat > .opencode/package.json <<'EOF'
23+
{
24+
"dependencies": {
25+
"@openontology/opencode-palantir": "^0.1.1"
26+
}
27+
}
28+
EOF
29+
30+
(cd .opencode && bun install)
31+
```
32+
33+
### 2) Load it as an OpenCode plugin
34+
35+
Create a tiny wrapper file in `.opencode/plugins/`:
36+
37+
```bash
38+
mkdir -p .opencode/plugins
39+
40+
cat > .opencode/plugins/opencode-palantir.js <<'EOF'
41+
import plugin from '@openontology/opencode-palantir';
42+
43+
export default plugin;
44+
EOF
45+
```
46+
47+
OpenCode automatically loads `.js`/`.ts` files from `.opencode/plugins/` at startup.
48+
49+
> If your OpenCode setup uses an `opencode.json` / `opencode.jsonc` that restricts plugin loading,
50+
> make sure `.opencode/plugins/` (or the specific plugin file) is included.
51+
52+
### 3) Get `docs.parquet`
53+
54+
This package does **not** ship with docs bundled. You have two options:
55+
56+
#### Option A (recommended): fetch inside OpenCode
57+
58+
In OpenCode, run:
59+
60+
- `/refresh-docs`
61+
62+
This downloads the docs and writes them to `data/docs.parquet` in your project root.
63+
64+
#### Option B: download a prebuilt Parquet file
65+
66+
Download `data/docs.parquet` from this GitHub repo and place it at:
67+
68+
- `<your-project>/data/docs.parquet`
69+
70+
## Using the tools
71+
72+
When installed, this plugin exposes:
73+
74+
- **`get_doc_page`** - Retrieve a specific doc page by URL
75+
- **`list_all_docs`** - List all available documentation pages
76+
77+
If `data/docs.parquet` is missing, both tools will instruct you to run `/refresh-docs`.
78+
79+
## Setup (this repo)
1280

1381
```bash
1482
bun install
@@ -73,24 +141,20 @@ When installed as an OpenCode plugin, exposes:
73141
- **`list_all_docs`** - List all available documentation pages
74142
- **`/refresh-docs`** - Command hook to re-fetch all documentation
75143

76-
### Installing in OpenCode (this project only)
144+
### Installing in OpenCode (this repo only)
77145

78-
Create a tiny wrapper plugin file that re-exports the built artifact into the project-level auto-discovered plugins directory:
146+
For local development against `dist/`, you can point the wrapper at the built artifact:
79147

80148
```bash
81149
mkdir -p .opencode/plugins
82-
```
83150

84-
```bash
85151
cat > .opencode/plugins/opencode-palantir.js <<'EOF'
86152
import plugin from '../../dist/index.js';
87153
88154
export default plugin;
89155
EOF
90156
```
91157

92-
OpenCode automatically loads any `.js`/`.ts` files in `.opencode/plugins/` at startup.
93-
94158
## Development
95159

96160
Build the plugin:
@@ -123,6 +187,10 @@ Format with Prettier:
123187
mise run format
124188
```
125189

190+
## Release notes
191+
192+
For maintainers, see `RELEASING.md`.
193+
126194
## Author
127195

128196
Anand Pant <anand@shpit.dev>

RELEASE.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ We follow [Conventional Commits](https://www.conventionalcommits.org/) specifica
1919

2020
While version is `0.x.x`, breaking changes bump **minor** version.
2121

22+
This repo also intentionally keeps non-breaking `feat:` commits on the same stable line while major
23+
is `0` (e.g. `0.1.x`).
24+
2225
### Release Process
2326

2427
1. Push commits to `main` branch
@@ -155,23 +158,12 @@ When you merge a release PR, the GitHub Actions workflow will automatically:
155158

156159
### Manual Releases
157160

158-
You can also manually trigger a release by pushing a tag in the format `v{semver}`:
159-
160-
```bash
161-
git tag v1.2.3
162-
git push origin v1.2.3
163-
```
164-
165-
This will:
166-
167-
1. Trigger the release workflow
168-
2. Build and publish to NPM using trusted publishing
169-
3. Create a GitHub release
161+
You can manually trigger a publish via GitHub Actions:
170162

171-
Use manual releases for:
163+
- Run the `Publish Package` workflow with `tag=next` (prerelease)
164+
- Run the `Publish Package` workflow with `tag=latest` (stable)
172165

173-
- Hot-fixes outside the normal release cycle
174-
- Bypassing Release Please when needed
175-
- Direct version control over releases
166+
Avoid publishing `latest` manually unless you also intend to cut a matching git tag and GitHub
167+
Release.
176168

177169
**Learn more:** See the [NPM Trusted Publishing documentation](https://docs.npmjs.com/trusted-publishers) for complete setup and best practices.

RELEASING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Releasing
2+
3+
This repo publishes the OpenCode plugin package to npm:
4+
5+
- Package: `@openontology/opencode-palantir`
6+
- Registry: npmjs.com
7+
8+
Releases are automated via **Release Please** + **GitHub Actions** + **npm Trusted Publishing (OIDC)**.
9+
10+
## Release channels
11+
12+
### Stable (`latest`)
13+
14+
Stable releases are created by merging the Release Please PR (example: `chore(main): release 0.1.1`).
15+
16+
What happens after merge:
17+
18+
1. The `Release` workflow runs on `main`
19+
2. Release Please creates a git tag (e.g. `v0.1.1`) and a GitHub Release
20+
3. The workflow dispatches `Publish Package` with `tag=latest`
21+
4. `Publish Package` publishes to npm using OIDC (no npm token)
22+
23+
### Prerelease (`next`)
24+
25+
While a Release Please PR is open, the `Release` workflow dispatches `Publish Package` with `tag=next`.
26+
27+
The prerelease version is computed in `.mise/tasks/publish`:
28+
29+
- Base version = the version currently in `package.json` (e.g. `0.1.0`)
30+
- Published version = `<base>-next.<N>`
31+
- `<N>` is the number of commits since the most recent git tag
32+
33+
This is why `next` versions jump frequently and why they reset after a new tag is created.
34+
35+
## How versions are chosen (0.1.x line)
36+
37+
Release Please uses Conventional Commits.
38+
39+
We intentionally stay on a `0.1.x` stable line until we decide to go `1.0.0`.
40+
The current policy (see `release-please-config.json`) is:
41+
42+
- `fix:` -> patch bump (`0.1.0` -> `0.1.1`)
43+
- `feat:` -> patch bump while major is `0` (keeps the stable line in `0.1.x`)
44+
- `feat!:` / `fix!:` / `BREAKING CHANGE:` -> minor bump (`0.1.x` -> `0.2.0`)
45+
46+
If you need a specific version, add a `Release-As: X.Y.Z` footer to a commit on `main`.
47+
48+
## Manual publishing (rare)
49+
50+
The easiest safe manual publish is to run the GitHub workflow:
51+
52+
- Prerelease: `Publish Package` -> input `tag=next`
53+
- Stable: `Publish Package` -> input `tag=latest`
54+
55+
Avoid publishing `latest` manually unless you also intend to cut a matching git tag and GitHub Release.
56+

0 commit comments

Comments
 (0)