Skip to content

Commit 369a7ed

Browse files
committed
fix: README and CONTRIBUTING
1 parent 1865599 commit 369a7ed

3 files changed

Lines changed: 88 additions & 17 deletions

File tree

CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
3+
## Development
4+
5+
```bash
6+
# Format
7+
deno fmt
8+
9+
# Lint
10+
deno lint
11+
12+
# Type check
13+
deno check src/index.ts
14+
15+
# Test
16+
deno test -A
17+
18+
# Build
19+
deno task build
20+
```
21+
22+
## Releasing
23+
24+
Releases are fully automated via CI. The version in `deno.json` stays at
25+
`0.0.0-development` — never bump it manually.
26+
27+
### How it works
28+
29+
Pushing to `main` triggers the publish workflow. The version calculator
30+
(`.github/scripts/version.ts`) analyzes conventional commits since the last git
31+
tag to determine the next semver version:
32+
33+
| Commit prefix | Bump (0.x) | Bump (1.x+) |
34+
| ----------------------------- | ---------- | ----------- |
35+
| `feat:` | patch | minor |
36+
| `fix:` / `perf:` | patch | patch |
37+
| `BREAKING CHANGE` or `type!:` | minor | major |
38+
39+
CI creates a git tag (`v*`), publishes to npm under the `latest` dist-tag, and
40+
creates a GitHub Release — all automatically. npm Trusted Publishers (OIDC) is
41+
used, so no `NPM_TOKEN` secret is needed.
42+
43+
### Canary releases
44+
45+
Opening a PR against `main` publishes a canary version under the `canary` npm
46+
dist-tag (e.g. `1.2.3-canary.abc1234.20260212091429`).
47+
48+
### Force a specific version
49+
50+
Add `Release-As: x.y.z` in a commit body:
51+
52+
```bash
53+
# Graduate to 1.0.0
54+
git commit -m "feat: stable release" -m "Release-As: 1.0.0"
55+
```

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Create a config file at `~/.config/opencode/graphiti.jsonc`:
101101
// Graphiti MCP server endpoint
102102
"endpoint": "http://localhost:8000/mcp",
103103

104-
// Prefix for project group IDs (e.g. "opencode_my-project")
104+
// Prefix for project group IDs (e.g. "opencode-my-project")
105105
"groupIdPrefix": "opencode",
106106

107107
// Number of user messages between memory re-injections (0 = disabled)
@@ -118,8 +118,12 @@ values.
118118

119119
On the first user message in a session, the plugin searches Graphiti for facts
120120
and entities relevant to the message content. Results are split into project and
121-
user scopes (70% / 30% budget split), formatted, and prepended to the
122-
conversation as a synthetic context block.
121+
user scopes (70% / 30% budget split), formatted in XML-style `<memory>` blocks
122+
with explicit de-emphasis instructions, and injected into the conversation.
123+
124+
Memory is injected via `output.message.system` (system-level instruction) when
125+
available, which prevents memory from influencing session titles. If the system
126+
field is unavailable, the plugin falls back to prepending synthetic parts.
123127

124128
The injection budget is calculated dynamically: 5% of the model's context limit
125129
(resolved from the provider list) multiplied by 4 characters per token.
@@ -167,21 +171,10 @@ Each project gets a unique `group_id` derived from its directory name (e.g.
167171
underscores (colons are not allowed). This ensures memories from different
168172
projects stay isolated.
169173

170-
## Development
171-
172-
```bash
173-
# Format
174-
deno fmt
175-
176-
# Lint
177-
deno lint
174+
## Contributing
178175

179-
# Type check
180-
deno check src/index.ts
181-
182-
# Build
183-
deno task build
184-
```
176+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and release
177+
process.
185178

186179
## License
187180

dnt.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,30 @@ await build({
1919
version,
2020
description: manifest.description,
2121
license: manifest.license,
22+
author: "Vicary A. <vicary.archangel@member.mensa.org>",
23+
repository: {
24+
type: "git",
25+
url: "https://github.com/vicary/opencode-graphiti.git",
26+
},
27+
bugs: {
28+
url: "https://github.com/vicary/opencode-graphiti/issues",
29+
},
30+
homepage: "https://github.com/vicary/opencode-graphiti#readme",
31+
keywords: [
32+
"opencode",
33+
"graphiti",
34+
"knowledge-graph",
35+
"persistent-memory",
36+
"plugin",
37+
"mcp",
38+
"ai",
39+
"context",
40+
],
41+
engines: {
42+
node: ">=22",
43+
},
2244
main: "./esm/mod.js",
45+
types: "./esm/mod.d.ts",
2346
opencode: {
2447
type: "plugin",
2548
hooks: ["chat.message", "event", "experimental.session.compacting"],

0 commit comments

Comments
 (0)