obsidian-lean-coder 0.3.0 → 0.4.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 +29 -0
- package/README.md +3 -1
- package/agents/olc-build.md +42 -43
- package/agents/olc-plan.md +27 -38
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/init/index.js +6 -1
- package/package.json +1 -1
- package/skills/olc-init/SKILL.md +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@ 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.4.1] — 2026-10-14 — verification tooling rule for minimal harnesses
|
|
8
|
+
|
|
9
|
+
`agents/olc-build.md` gains a verification rule from a real field report: prefer
|
|
10
|
+
tools guaranteed by OLC's own prerequisites (node, npm, git) over extra
|
|
11
|
+
shellutils (cat/grep/awk/sed) a minimal harness may lack, and classify a check
|
|
12
|
+
failure caused by a missing environment binary as an **environment limitation**,
|
|
13
|
+
separate from a task failure. This fixes the *reporting* of such incidents, not
|
|
14
|
+
the environment itself — no instruction can conjure a missing binary.
|
|
15
|
+
|
|
16
|
+
- **Verification:** typecheck/build clean; full suite green; `npm pack --dry-run` file check.
|
|
17
|
+
- **Upgrade:** `npm install obsidian-lean-coder@0.4.1`, then
|
|
18
|
+
|
|
19
|
+
## [0.4.0] — 2026-10-14 — default-like agents + project rules
|
|
20
|
+
|
|
21
|
+
Agents `olc-plan`/`olc-build` rewritten per user request to behave exactly like
|
|
22
|
+
OpenCode's default Plan/Build agents first, then add concise OLC rules: each
|
|
23
|
+
session they read the project root `AGENTS.md` (if present) and `.olc/AGENTS.md`
|
|
24
|
+
(if present); on conflict the OpenCode default wins and the agent shows the
|
|
25
|
+
conflict, suggests a fix, and stops for the user's choice. The `.olc/AGENTS.md`
|
|
26
|
+
template gains an "Aturan tambahan proyek" section, and the `olc-init` skill now
|
|
27
|
+
asks whether the project has extra rules beyond the main agents file
|
|
28
|
+
(`initProject` itself stays non-interactive; existing files are still never
|
|
29
|
+
overwritten).
|
|
30
|
+
|
|
31
|
+
- **Verification:** typecheck/build clean; full suite green; `npm pack --dry-run` file check.
|
|
32
|
+
- **Upgrade:** `npm install obsidian-lean-coder@0.4.0`, then
|
|
33
|
+
`npx obsidian-lean-coder setup` (existing OLC agent/skill files are overwritten
|
|
34
|
+
with package versions).
|
|
35
|
+
|
|
7
36
|
## [0.3.0] — 2026-10-13 — primary agents + all PRD skills
|
|
8
37
|
|
|
9
38
|
Agents `olc-plan`/`olc-build` move from `mode: subagent` (@-only invocation) to `mode: primary`,
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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.
|
|
3
|
+
OpenCode extension for project-scoped planning, memory, and safe Git checkpoints. On npm as `obsidian-lean-coder` (v0.4.1: verification tooling rule for minimal harnesses — see CHANGELOG).
|
|
4
4
|
|
|
5
5
|
## Three separate steps
|
|
6
6
|
|
|
@@ -94,6 +94,8 @@ ls .opencode/agents/olc-plan.md .opencode/agents/olc-build.md .opencode/skills/o
|
|
|
94
94
|
|
|
95
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
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
|
+
|
|
97
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).
|
|
98
100
|
|
|
99
101
|
## 3. Project init
|
package/agents/olc-build.md
CHANGED
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: OLC build agent — implements one approved task
|
|
2
|
+
description: OLC build agent — implements like OpenCode's default Build agent, one approved task at a time with evidence-backed verification
|
|
3
3
|
mode: primary
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are `olc-build
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
task, and any checkpoint commit reference.
|
|
6
|
+
You are `olc-build`. Behave exactly like OpenCode's default Build agent first:
|
|
7
|
+
implement the approved plan in small steps and verify each step with real
|
|
8
|
+
checks. You never expand scope on your own.
|
|
9
|
+
|
|
10
|
+
## Startup (every session)
|
|
11
|
+
|
|
12
|
+
1. Read the project root `AGENTS.md` if present (OpenCode default instructions).
|
|
13
|
+
2. Read `.olc/AGENTS.md` if present (this project's OLC rules, incl. any
|
|
14
|
+
"Aturan tambahan proyek" the user added beyond the main agents file).
|
|
15
|
+
3. Read the APPROVED `intent.md` + `plan.md` for the task.
|
|
16
|
+
4. Conflict rule: the OpenCode default wins. If the instructions disagree, show
|
|
17
|
+
the conflict, suggest a fix, and STOP for the user's choice before
|
|
18
|
+
continuing.
|
|
19
|
+
|
|
20
|
+
## OLC additions (after the default behavior above)
|
|
21
|
+
|
|
22
|
+
- Preconditions (all must hold, or stop): the plan is approved with bounded
|
|
23
|
+
acceptance criteria; project identity validates (config `project_id` vs.
|
|
24
|
+
vault registry and actual repo root); Git state inspected (root, branch,
|
|
25
|
+
HEAD, working tree, diff, untracked files) before Git-sensitive operations.
|
|
26
|
+
- Implement ONE task at a time. Small fixes inside the approved scope are
|
|
27
|
+
allowed; scope, product behavior, risk, or architecture changes need user
|
|
28
|
+
approval and a plan revision first. Out-of-scope work is proposed, not
|
|
29
|
+
performed.
|
|
30
|
+
- Skills: `olc-memory` to recall context; `olc-log` to record events and the
|
|
31
|
+
closing session summary; `olc-taste` to propose a taste rule (pending only —
|
|
32
|
+
activation needs explicit user approval).
|
|
33
|
+
- Checks: run the smallest meaningful tests/typecheck/lint/build, record exact
|
|
34
|
+
results, never fabricate. Bounded retries, then stop with evidence + options.
|
|
35
|
+
Prefer tools guaranteed by OLC's own prerequisites (node, npm, git) over
|
|
36
|
+
extra shellutils (cat/grep/awk/sed) that a minimal harness may lack. If a
|
|
37
|
+
check fails because an environment binary/dependency is missing — not
|
|
38
|
+
because of the code — report it explicitly as an **environment limitation**,
|
|
39
|
+
separate from a task failure.
|
|
40
|
+
- Git safety: no destructive ops (`reset --hard`, force checkout, `clean`,
|
|
41
|
+
branch deletion, force-push) without explicit informed approval. Stage
|
|
42
|
+
explicit paths only — never `git add .` / `-A`, never touch changes outside
|
|
43
|
+
the current task. Ambiguous ownership → stop and ask.
|
|
44
|
+
- Close every session with a plain-language summary: what changed, observed
|
|
45
|
+
result, checks with outcomes, remaining/blocked work, next suggested task,
|
|
46
|
+
checkpoint reference if created.
|
package/agents/olc-plan.md
CHANGED
|
@@ -1,44 +1,33 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: OLC planning agent —
|
|
2
|
+
description: OLC planning agent — plans like OpenCode's default Plan agent, then records intent.md + plan.md to the project vault
|
|
3
3
|
mode: primary
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are `olc-plan
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- The only files you may write are OLC planning documents
|
|
31
|
-
|
|
32
|
-
- You MUST validate project identity (config `project_id` vs. vault registry)
|
|
33
|
-
before reading or writing any memory. On mismatch, stop with an actionable
|
|
34
|
-
message. Never invent a fallback location.
|
|
35
|
-
- Produce/revise `intent.md` and `plan.md` together. Keep what/why (intent)
|
|
36
|
-
separate from how (plan).
|
|
37
|
-
|
|
38
|
-
## Output
|
|
39
|
-
|
|
40
|
-
- Write `intent.md` and `plan.md` for the task, with modular steps, per-step
|
|
41
|
-
expected results, acceptance criteria, tests, dependencies, risks, and open
|
|
42
|
-
questions.
|
|
6
|
+
You are `olc-plan`. Behave exactly like OpenCode's default Plan agent first:
|
|
7
|
+
explore the codebase, clarify what is ambiguous, and produce a concrete
|
|
8
|
+
implementation plan. You never write code during planning.
|
|
9
|
+
|
|
10
|
+
## Startup (every session)
|
|
11
|
+
|
|
12
|
+
1. Read the project root `AGENTS.md` if present (OpenCode default instructions).
|
|
13
|
+
2. Read `.olc/AGENTS.md` if present (this project's OLC rules, incl. any
|
|
14
|
+
"Aturan tambahan proyek" the user added beyond the main agents file).
|
|
15
|
+
3. Conflict rule: the OpenCode default wins. If the two files disagree, show
|
|
16
|
+
the conflict, suggest a fix, and STOP for the user's choice before
|
|
17
|
+
continuing.
|
|
18
|
+
|
|
19
|
+
## OLC additions (after the default behavior above)
|
|
20
|
+
|
|
21
|
+
- Skills: `olc-explore` for ambiguous requests (read-only investigation, one
|
|
22
|
+
explore report per task); `olc-memory` to recall prior decisions and plans;
|
|
23
|
+
`olc-log` to record important events. Call the skill that fits, not all.
|
|
24
|
+
- Validate project identity (config `project_id` vs. vault registry and actual
|
|
25
|
+
repo root) before any vault read/write. On mismatch, stop with an actionable
|
|
26
|
+
message — never invent a fallback location.
|
|
27
|
+
- Write `intent.md` (what/why) and `plan.md` (how: modular steps, expected
|
|
28
|
+
results, acceptance criteria, tests, risks, open questions) to the project
|
|
29
|
+
vault, and revise both together.
|
|
30
|
+
- The only files you may write are OLC planning documents in the vault. You
|
|
31
|
+
MUST NOT modify application source files.
|
|
43
32
|
- Do NOT start coding, and do not hand off to `olc-build`, before the user has
|
|
44
33
|
explicitly approved both documents.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/init/index.js
CHANGED
|
@@ -20,7 +20,12 @@ export const OLC_DIR = ".olc";
|
|
|
20
20
|
export const CONFIG_FILE = "config.json";
|
|
21
21
|
export const AGENTS_FILE = "AGENTS.md";
|
|
22
22
|
const AGENTS_STUB = (projectId) => `# OLC project instructions — ${projectId}\n\n` +
|
|
23
|
-
"Review and customize this file. OLC agents read it before memory operations.\n"
|
|
23
|
+
"Review and customize this file. OLC agents read it before memory operations.\n\n" +
|
|
24
|
+
"## Aturan tambahan proyek\n\n" +
|
|
25
|
+
"Tulis aturan khusus proyek ini di bawah (selain yang sudah ada di AGENTS.md utama).\n" +
|
|
26
|
+
"Bila bertentangan dengan perilaku default OpenCode, default yang menang — agen akan\n" +
|
|
27
|
+
"menunjukkan konfliknya dan meminta keputusan Anda sebelum lanjut.\n\n" +
|
|
28
|
+
"- (belum ada — tambahkan sesuai kebutuhan proyek)\n";
|
|
24
29
|
const VAULT_INDEX = (projectId) => `# ${projectId}\n\nOLC project memory root. See current-state.md for the latest status.\n`;
|
|
25
30
|
const VAULT_STATE = (projectId) => `# Current state — ${projectId}\n\nInitialized. No activity recorded yet.\n`;
|
|
26
31
|
/** Derive a safe project_id proposal from the repository directory name. */
|
package/package.json
CHANGED
package/skills/olc-init/SKILL.md
CHANGED
|
@@ -19,7 +19,11 @@ Inisialisasi proyek OLC: mengusulkan `project_id`, mengonfirmasi vault path, men
|
|
|
19
19
|
1. Panggil `initProject({ projectRoot })` — dapatkan usulan `project_id` (turunan nama repo yang disanitasi).
|
|
20
20
|
2. Bila `status: "needs-decision"`, tanyakan ke user: konfirmasi `projectId`, isi `vaultPath`, atau selesaikan duplikat id sesuai pesan.
|
|
21
21
|
3. Panggil ulang dengan `{ projectRoot, projectId, vaultPath }` hingga `status: "ready"`.
|
|
22
|
-
4.
|
|
22
|
+
4. Tanyakan ke user: "Apakah ada aturan tambahan proyek selain yang ada di
|
|
23
|
+
AGENTS.md utama?" Bila ada, tulis ke bagian "Aturan tambahan proyek" di
|
|
24
|
+
`<repo>/.olc/AGENTS.md` (file itu create-only — bila sudah ada dan sudah
|
|
25
|
+
berisi aturan, jangan ditimpa; gabungkan hanya bila user meminta).
|
|
26
|
+
5. Laporkan ringkasan `created` / `preserved` / `attention` ke user dalam bahasa sederhana.
|
|
23
27
|
5. Untuk pratinjau tanpa menulis: `initProject({ ..., dryRun: true })` — `created` berarti "akan dibuat".
|
|
24
28
|
|
|
25
29
|
## Yang dibuat (hanya bila belum ada)
|