obsidian-lean-coder 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,20 @@ All notable changes to OLC (Obsidian Lean Coder) are recorded here.
4
4
  OLC is pre-release: versions are `0.x` until a controlled-testing release says otherwise.
5
5
  `package.json` shipped `"private": true` through 0.1.0; the flag was removed at publish time with explicit user approval, and 0.1.0 is live as [`obsidian-lean-coder`](https://www.npmjs.com/package/obsidian-lean-coder). Publishing a new version is still a separate explicitly approved action, never automatic.
6
6
 
7
+ ## [0.5.1] — 2026-10-14 — English skill docs, concise install instructions
8
+
9
+ All 5 bundled skills (`olc-log`, `olc-explore`, `olc-init`, `olc-memory`,
10
+ `olc-taste`) are now written in English; code identifiers, paths, and
11
+ examples are unchanged. The README's install section is now a 3-command
12
+ quick start right under the brief, instead of a long three-step walkthrough;
13
+ the previous detailed content (dev install path, plugin activation, API
14
+ caveats) is preserved under a new `## Reference` section.
15
+
16
+ - **Verification:** typecheck/build clean; full suite green (152 tests,
17
+ no test changes needed — docs-only); `npm pack --dry-run` file check.
18
+ - **Upgrade:** `npm install obsidian-lean-coder@0.5.1`. No vault or config
19
+ changes required.
20
+
7
21
  ## [0.5.0] — 2026-10-14 — vault cross-linking for the second-brain graph
8
22
 
9
23
  Vault documents were isolated islands: no `[[wikilinks]]` connected intent to
package/README.md CHANGED
@@ -1,119 +1,88 @@
1
1
  # OLC — Obsidian Lean Coder
2
2
 
3
- OpenCode extension for project-scoped planning, memory, and safe Git checkpoints. On npm as `obsidian-lean-coder` (v0.5.0: vault cross-linking for the second-brain graph — see CHANGELOG).
3
+ OpenCode extension for project-scoped planning, memory, and safe Git checkpoints. On npm as `obsidian-lean-coder` (v0.5.1: English skill docs, concise install — see CHANGELOG).
4
4
 
5
- ## Three separate steps
6
-
7
- Do not confuse these. They are different operations with different commands:
8
-
9
- | # | Step | What it does | Command |
10
- |---|------|--------------|---------|
11
- | 1 | **Dev install** | Install npm deps to hack on OLC itself | `npm ci && npm run build` |
12
- | 2 | **Plugin activation** | Load OLC as an OpenCode plugin | `npm i obsidian-lean-coder` + `opencode.json` snippet below |
13
- | 3 | **Project init** | Register one app repo + vault with OLC (`initProject`, idempotent, create-only) | via the `olc-init` skill in OpenCode (the tested path) |
14
-
15
- ## 1. Dev install
16
-
17
- Requirements: Node >= 18.18, npm, git.
18
-
19
- ```sh
20
- git clone <this-repo> olc && cd olc
21
- npm ci
22
- npm run build # tsc -p tsconfig.json → dist/
23
- npm test # tsc -p tsconfig.tests.json && node --test "dist-tests/tests/**/*.test.js"
24
- npm run typecheck
25
- ```
26
-
27
- Expected: build clean, typecheck clean. `npm test` runs the full suite (currently 152 tests). `npm pack --dry-run` shows what would ship (`dist/`, `agents/`, `skills/`, `templates/`).
28
-
29
- > Published on npm as `obsidian-lean-coder` (MIT). Republishing needs a separate explicit approval — never publish by accident.
30
-
31
- ## 2. Plugin activation
5
+ ## Install
32
6
 
33
7
  ```sh
34
8
  npm install obsidian-lean-coder
35
9
  ```
36
10
 
37
- Then list it in your project's `opencode.json` (npm loaders resolve the package root `dist/index.js`, which since v0.1.1 carries the plugin default export alongside `OLC_VERSION`):
11
+ Add it to your project's `opencode.json`:
38
12
 
39
13
  ```json
40
- {
41
- "plugins": ["obsidian-lean-coder"]
42
- }
14
+ { "plugins": ["obsidian-lean-coder"] }
43
15
  ```
44
16
 
45
- Verify it loads (from the consuming project directory; the model call itself will fail without account funds, but plugin loading happens first):
17
+ Copy the agents/skills into `.opencode/` (idempotent — safe to re-run after upgrading):
46
18
 
47
19
  ```sh
48
- OPENCODE_LOG_LEVEL=DEBUG opencode run --standalone "hi" --print-logs 2>&1 | grep -E "loading plugin.*obsidian-lean-coder|failed to load plugin"
20
+ npx obsidian-lean-coder setup
49
21
  ```
50
22
 
51
- Expected: a `loading plugin ... obsidian-lean-coder` line and **zero** `failed to load plugin` lines. (Verified 2026-10-13 via the equivalent local-file shape against the real loader; npm-registry install itself verified in OLC-071.)
23
+ Then open OpenCode in the project and run the **olc-init** skill to register the repo with a vault — that's it. Everything below is reference detail (requirements, what each step actually does, uninstall, troubleshooting).
52
24
 
53
- > `npm install` alone shows nothing in OpenCode — that is normal. The package must be listed under `plugins`, and agents/skills never auto-appear: they are project-local files you copy yourself (next step). No restart or rebuild needed after editing `opencode.json`.
25
+ Requirements: OpenCode 2.x (V2 plugin API), Node >= 18.18.
54
26
 
55
- ### Local dev path (this checkout, no npm)
27
+ ## Reference
56
28
 
57
- An `index.js` under `.opencode/plugins/<name>/` auto-loads with no install step (proven in OLC-011, re-verified in OLC-071). The plugin entrypoint is `dist/plugin.js` (`src/plugin.ts` → `Plugin.define({ id: "olc" })`, one read-only `olc_status` tool, zero writes on load).
29
+ ### What `npx obsidian-lean-coder setup` does
58
30
 
59
- In your consuming project (replace `/home/you/olc` with your OLC checkout):
31
+ Installs `agents/olc-plan.md`, `agents/olc-build.md`, and the five skills
32
+ (`olc-init`, `olc-explore`, `olc-memory`, `olc-log`, `olc-taste`) under
33
+ `.opencode/` (project scope by default). `--global` installs under
34
+ `~/.config/opencode` instead; `--dry-run` previews with no writes. Missing
35
+ directories are created; existing OLC agent/skill files are overwritten with
36
+ the package versions (a deliberate exception to the create-only rule, scoped
37
+ to these files only — your own vault notes are never touched by this).
60
38
 
61
- ```sh
62
- PKG=/home/you/olc # your OLC checkout — build it first (step 1)
63
- mkdir -p .opencode/plugins/olc
64
- printf '%s\n' 'export { default } from "file://'"$PKG"'/dist/plugin.js";' > .opencode/plugins/olc/index.js
65
- printf '%s\n' '{ "type": "module", "dependencies": { "@opencode/plugin": "2.0.27" } }' > .opencode/plugins/olc/package.json
66
- ```
39
+ Both agents behave exactly like OpenCode's default Plan/Build agents first,
40
+ then add OLC rules: each session they read the project root `AGENTS.md` (if
41
+ present) and `.olc/AGENTS.md` (if present). If the two disagree, the OpenCode
42
+ default wins — the agent shows the conflict, suggests a fix, and stops for
43
+ your choice.
67
44
 
68
- Verify with the same `grep` as above, expecting `.opencode/plugins/olc/index.js` in the loading line.
45
+ ### What `olc-init` does
69
46
 
70
- Then install the agent/skill resources — recommended via the setup helper:
47
+ `initProject` (`src/init/index.ts`) registers one app repo + vault. It is
48
+ idempotent and **create-only**: existing files are reported `preserved`,
49
+ never overwritten. Anything needing a human choice comes back as
50
+ `status: "needs-decision"` — no prompting inside the module. During init you
51
+ are asked whether the project has extra rules beyond the main agents file;
52
+ confirmed additions go under "Additional project rules" in `.olc/AGENTS.md`.
71
53
 
72
- ```sh
73
- npx obsidian-lean-coder setup # project scope: ./.opencode
74
- npx obsidian-lean-coder setup --global # global scope: ~/.config/opencode
75
- npx obsidian-lean-coder setup --dry-run # preview, writes nothing
76
- ```
54
+ What it creates (only when missing):
77
55
 
78
- Missing directories are created; existing OLC agent/skill files are overwritten with the package
79
- versions (a deliberate exception to the create-only rule, scoped to these files only).
80
- Manual equivalent (DECISIONS.md #2 — programmatic registration was rejected for MVP):
56
+ - `<repo>/.olc/config.json` — `{ schemaVersion, projectId, vaultPath }`. No secrets (keys matching `secret|token|password|api-key` are rejected).
57
+ - `<repo>/.olc/AGENTS.md` — stub instructions for agents. Review and customize.
58
+ - `<vault>/OLC/Projects/<project_id>/{index.md, current-state.md, decisions/, tasks/, logs/, memory/, taste/}`
59
+ - `<vault>/OLC/registry.json` — `{ projects: { "<id>": { repoRoot } } }` entry for this repo.
81
60
 
82
- ```sh
83
- PKG=/home/you/olc # your OLC checkout
84
- mkdir -p .opencode/agents .opencode/skills/olc-init .opencode/skills/olc-explore .opencode/skills/olc-memory .opencode/skills/olc-log .opencode/skills/olc-taste
85
- cp "$PKG"/agents/olc-plan.md "$PKG"/agents/olc-build.md .opencode/agents/
86
- for s in olc-init olc-explore olc-memory olc-log olc-taste; do cp "$PKG"/skills/$s/SKILL.md .opencode/skills/$s/; done
87
- ```
61
+ Vault path precedence: explicit `vaultPath` > `OLC_VAULT_PATH` env > existing
62
+ config. OLC never invents a vault location — missing path returns
63
+ `needs-decision`, never a silent default. Re-running init is always safe:
64
+ `created` becomes `preserved`.
88
65
 
89
- Discovery note: `/api/agent` and `/api/skill` returned `[]` for project-local files in this build — even for a minimal probe agent — so API listing is not a valid verification (OLC-012 evidence did not reproduce; TUI-side discovery untested). Verify by file presence instead:
66
+ ### Contributing to OLC itself
90
67
 
91
68
  ```sh
92
- ls .opencode/agents/olc-plan.md .opencode/agents/olc-build.md .opencode/skills/olc-init/SKILL.md .opencode/skills/olc-explore/SKILL.md .opencode/skills/olc-memory/SKILL.md .opencode/skills/olc-log/SKILL.md .opencode/skills/olc-taste/SKILL.md
69
+ git clone <this-repo> olc && cd olc
70
+ npm ci
71
+ npm run build # tsc -p tsconfig.json → dist/
72
+ npm test # tsc -p tsconfig.tests.json && node --test "dist-tests/tests/**/*.test.js"
73
+ npm run typecheck
93
74
  ```
94
75
 
95
- `olc-plan`/`olc-build` agents and the five skills (`olc-init`, `olc-explore`, `olc-memory`, `olc-log`, `olc-taste`) are picked up by OpenCode from these paths. Re-running the `cp` commands is safe as long as you have not customized the destination files — `cp` overwrites; the no-clobber guarantee belongs to `olc-init`, which reports existing files as `preserved` instead of overwriting them.
96
-
97
- Both agents behave exactly like OpenCode's default Plan/Build agents first, then add OLC rules: each session they read the project root `AGENTS.md` (if present) and `.olc/AGENTS.md` (if present). If the two disagree, the OpenCode default wins — the agent shows the conflict, suggests a fix, and stops for your choice. During `olc-init` you are asked whether the project has extra rules beyond the main agents file; confirmed additions go under "Aturan tambahan proyek" in `.olc/AGENTS.md`.
98
-
99
- Supported versions: OpenCode 2.x with the V2 plugin API. OLC pins `@opencode/plugin` 2.0.27 to match the CLI it was smoke-tested against (see OLC-011). Other 2.x versions will likely work; 1.x will not. The exact minimum version is still open (DECISIONS.md #3).
76
+ Expected: build clean, typecheck clean, full suite green (currently 152
77
+ tests). `npm pack --dry-run` shows what would ship (`dist/`, `agents/`,
78
+ `skills/`, `templates/`).
100
79
 
101
- ## 3. Project init
80
+ A local checkout can be loaded without publishing: `.opencode/plugins/<name>/index.js`
81
+ re-exporting `file://<checkout>/dist/plugin.js` auto-loads with no install
82
+ step. See `docs/DECISIONS.md` and `docs/TASKS.md` for the full history if you
83
+ need it.
102
84
 
103
- `initProject` (`src/init/index.ts`) registers one app repo + vault. It is idempotent and **create-only**: existing files are reported `preserved`, never overwritten. Anything needing a human choice comes back as `status: "needs-decision"` — no prompting inside the module.
104
-
105
- Run it via the `olc-init` skill inside OpenCode (recommended — the only tested path for MVP). A programmatic import is not yet wired: the package entrypoint (`dist/index.js`) exports `OLC_VERSION` plus the plugin default, and `initProject` lives in `src/init/index.ts` for internal/agent use.
106
-
107
- What it creates (only when missing):
108
-
109
- - `<repo>/.olc/config.json` — `{ schemaVersion, projectId, vaultPath }`. No secrets (keys matching `secret|token|password|api-key` are rejected).
110
- - `<repo>/.olc/AGENTS.md` — stub instructions for agents. Review and customize.
111
- - `<vault>/OLC/Projects/<project_id>/{index.md, current-state.md, decisions/, tasks/, logs/, memory/, taste/}`
112
- - `<vault>/OLC/registry.json` — `{ projects: { "<id>": { repoRoot } } }` entry for this repo.
113
-
114
- Vault path precedence: explicit `vaultPath` > `OLC_VAULT_PATH` env > existing config. OLC never invents a vault location — missing path returns `needs-decision`, never a silent default.
115
-
116
- Re-running init is always safe: run it again after pulling updates; `created` becomes `preserved`. To preview without writing: `initProject({ ..., dryRun: true })`.
85
+ > Published on npm as `obsidian-lean-coder` (MIT). Republishing needs a separate explicit approval — never publish by accident.
117
86
 
118
87
  ### Vault linking rules (second brain)
119
88
 
package/dist/index.d.ts CHANGED
@@ -10,5 +10,5 @@
10
10
  * `plugin.ts` tool `execute` (deferred to call time), so this re-export
11
11
  * cycle is safe under ESM live bindings.
12
12
  */
13
- export declare const OLC_VERSION = "0.5.0";
13
+ export declare const OLC_VERSION = "0.5.1";
14
14
  export { default } from "./plugin.js";
package/dist/index.js CHANGED
@@ -10,5 +10,5 @@
10
10
  * `plugin.ts` tool `execute` (deferred to call time), so this re-export
11
11
  * cycle is safe under ESM live bindings.
12
12
  */
13
- export const OLC_VERSION = "0.5.0";
13
+ export const OLC_VERSION = "0.5.1";
14
14
  export { default } from "./plugin.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-lean-coder",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Obsidian Lean Coder — OpenCode extension for project-scoped planning, memory, and safe Git checkpoints.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",