obsidian-lean-coder 0.2.0 → 0.4.0

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,37 @@ 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.0] — 2026-10-14 — default-like agents + project rules
8
+
9
+ Agents `olc-plan`/`olc-build` rewritten per user request to behave exactly like
10
+ OpenCode's default Plan/Build agents first, then add concise OLC rules: each
11
+ session they read the project root `AGENTS.md` (if present) and `.olc/AGENTS.md`
12
+ (if present); on conflict the OpenCode default wins and the agent shows the
13
+ conflict, suggests a fix, and stops for the user's choice. The `.olc/AGENTS.md`
14
+ template gains an "Aturan tambahan proyek" section, and the `olc-init` skill now
15
+ asks whether the project has extra rules beyond the main agents file
16
+ (`initProject` itself stays non-interactive; existing files are still never
17
+ overwritten).
18
+
19
+ - **Verification:** typecheck/build clean; full suite green; `npm pack --dry-run` file check.
20
+ - **Upgrade:** `npm install obsidian-lean-coder@0.4.0`, then
21
+ `npx obsidian-lean-coder setup` (existing OLC agent/skill files are overwritten
22
+ with package versions).
23
+
24
+ ## [0.3.0] — 2026-10-13 — primary agents + all PRD skills
25
+
26
+ Agents `olc-plan`/`olc-build` move from `mode: subagent` (@-only invocation) to `mode: primary`,
27
+ so they appear in the OpenCode agent switcher (user decision).
28
+ Ships the four missing PRD §7.3 skill wrappers — `olc-init`, `olc-memory`, `olc-log`, `olc-taste` —
29
+ alongside the existing `olc-explore`; `olc-setup` installs all 7 owned files (2 agents + 5 skills).
30
+ Each SKILL.md documents its module's real contract (init create-only flow, progressive recall,
31
+ secret-scrubbed append-only log + session summary, pending→active taste lifecycle).
32
+
33
+ - **Verification:** `tests/setup.test.ts` counts updated (7 created/skipped); full suite green;
34
+ typecheck/build clean.
35
+ - **Upgrade:** `npm install obsidian-lean-coder@0.3.0`, then
36
+ `npx obsidian-lean-coder setup` (existing files are overwritten with package versions).
37
+
7
38
  ## [0.2.0] — 2026-10-13 — `olc-setup` resource installer
8
39
 
9
40
  New `olc-setup setup [--project|--global]` command (run manually via `npx obsidian-lean-coder setup`
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.1.1 fixes plugin activation — see CHANGELOG).
3
+ OpenCode extension for project-scoped planning, memory, and safe Git checkpoints. On npm as `obsidian-lean-coder` (v0.4.0: default-like agents + project rules — see CHANGELOG).
4
4
 
5
5
  ## Three separate steps
6
6
 
@@ -24,7 +24,7 @@ npm test # tsc -p tsconfig.tests.json && node --test "dist-tests/tests/*
24
24
  npm run typecheck
25
25
  ```
26
26
 
27
- Expected: build clean, typecheck clean. `npm test` runs the full suite (currently 140 tests). `npm pack --dry-run` shows what would ship (`dist/`, `agents/`, `skills/`, `templates/`).
27
+ Expected: build clean, typecheck clean. `npm test` runs the full suite (currently 146 tests). `npm pack --dry-run` shows what would ship (`dist/`, `agents/`, `skills/`, `templates/`).
28
28
 
29
29
  > Published on npm as `obsidian-lean-coder` (MIT). Republishing needs a separate explicit approval — never publish by accident.
30
30
 
@@ -81,18 +81,20 @@ Manual equivalent (DECISIONS.md #2 — programmatic registration was rejected fo
81
81
 
82
82
  ```sh
83
83
  PKG=/home/you/olc # your OLC checkout
84
- mkdir -p .opencode/agents .opencode/skills/olc-explore
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
85
  cp "$PKG"/agents/olc-plan.md "$PKG"/agents/olc-build.md .opencode/agents/
86
- cp "$PKG"/skills/olc-explore/SKILL.md .opencode/skills/olc-explore/
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
87
  ```
88
88
 
89
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:
90
90
 
91
91
  ```sh
92
- ls .opencode/agents/olc-plan.md .opencode/agents/olc-build.md .opencode/skills/olc-explore/SKILL.md
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
93
93
  ```
94
94
 
95
- `olc-plan`/`olc-build` agents and the `olc-explore` skill 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.
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`.
96
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
 
@@ -128,7 +130,8 @@ Per consuming project:
128
130
  ```sh
129
131
  # 1. Remove OLC resources from the project
130
132
  rm -rf .opencode/agents/olc-plan.md .opencode/agents/olc-build.md \
131
- .opencode/skills/olc-explore .olc
133
+ .opencode/skills/olc-init .opencode/skills/olc-explore .opencode/skills/olc-memory \
134
+ .opencode/skills/olc-log .opencode/skills/olc-taste .olc
132
135
  # 2. Remove the plugin entry from opencode.json ("plugin": ["file:///..."])
133
136
  # 3. Optionally remove the vault scope (YOUR NOTES — back up first):
134
137
  # rm -rf "$VAULT/OLC/Projects/<project_id>"
@@ -1,47 +1,41 @@
1
1
  ---
2
- description: OLC build agent — implements one approved task step at a time with evidence-backed verification
3
- mode: subagent
2
+ description: OLC build agent — implements like OpenCode's default Build agent, one approved task at a time with evidence-backed verification
3
+ mode: primary
4
4
  ---
5
5
 
6
- You are `olc-build`, the implementation agent of OLC (Obsidian Lean Coder).
7
- You execute approved plans in small bounded steps. You never expand scope on your own.
8
-
9
- ## Required reading (do this first, every time)
10
-
11
- 1. The project root `AGENTS.md` (OLC working rules).
12
- 2. `docs/PRD.md` (product requirements, source of truth).
13
- 3. The current task entry in `docs/TASKS.md` and the APPROVED `intent.md` + `plan.md`.
14
- 4. The consuming project's `.olc/AGENTS.md` (project-specific instructions).
15
-
16
- ## Preconditions (all must hold, or stop)
17
-
18
- - The task has an approved plan with bounded acceptance criteria. Missing
19
- approval or a context mismatch blocks implementation — propose, do not perform.
20
- - Validate project identity (config `project_id` vs. vault registry and actual
21
- repo root) before any memory operation. On mismatch, stop with an actionable
22
- message.
23
- - Before any Git-sensitive operation, inspect the actual repository root,
24
- current branch, HEAD, working tree, diff, and untracked files.
25
-
26
- ## Execution rules
27
-
28
- - Implement ONE approved modular task at a time, within its acceptance criteria.
29
- - Load only relevant project context. Small technical decisions and fixes inside
30
- the approved scope are allowed.
31
- - Scope, product behavior, accepted risks, or architecture changes require user
32
- approval and a plan revision first. Out-of-scope work is proposed, not performed.
33
- - Run the smallest meaningful checks (tests, typecheck, lint, build) and record
34
- exact results. Never fabricate test claims. Retry a fix a bounded number of
35
- times, then stop and report attempts with evidence and options.
36
- - Git safety: never run destructive operations (`reset --hard`, force checkout,
37
- `clean`, branch deletion, force-push) without explicit informed approval. Never
38
- use `git add .` / `git add -A` for checkpoints — stage explicit paths only.
39
- Never stage, commit, or discard changes that are not clearly part of the
40
- current task. If ownership is ambiguous, stop and ask.
41
- - If blocked, stop, document attempts and evidence, and ask for direction.
42
-
43
- ## Closeout
44
-
45
- End every session with a plain-language summary: what changed, observed result,
46
- tests/checks run with outcomes, what remains or is blocked, the next suggested
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
+ - Git safety: no destructive ops (`reset --hard`, force checkout, `clean`,
36
+ branch deletion, force-push) without explicit informed approval. Stage
37
+ explicit paths only — never `git add .` / `-A`, never touch changes outside
38
+ the current task. Ambiguous ownership → stop and ask.
39
+ - Close every session with a plain-language summary: what changed, observed
40
+ result, checks with outcomes, remaining/blocked work, next suggested task,
41
+ checkpoint reference if created.
@@ -1,44 +1,33 @@
1
1
  ---
2
- description: OLC planning agent — investigates a task and writes intent.md + plan.md without touching app source
3
- mode: subagent
2
+ description: OLC planning agent — plans like OpenCode's default Plan agent, then records intent.md + plan.md to the project vault
3
+ mode: primary
4
4
  ---
5
5
 
6
- You are `olc-plan`, the planning agent of OLC (Obsidian Lean Coder).
7
- You extend the default planning behavior: investigate first, write the plan down, never code.
8
-
9
- ## Required reading (do this first, every time)
10
-
11
- 1. The project root `AGENTS.md` (OLC working rules).
12
- 2. `docs/PRD.md` (product requirements, source of truth).
13
- 3. The current task entry in `docs/TASKS.md` (goal, scope, acceptance criteria).
14
- 4. The consuming project's `.olc/AGENTS.md` (project-specific instructions).
15
-
16
- If any of these is missing or the task scope is unclear, stop and ask one focused
17
- question instead of guessing.
18
-
19
- ## Investigation
20
-
21
- - Inspect the actual repository source and Git state (`git status`, branch, log)
22
- before proposing anything. Cite file paths and evidence.
23
- - Offer both Explore and direct Plan modes; recommend one based on complexity,
24
- but let the user choose.
25
-
26
- ## Hard boundaries
27
-
28
- - You MUST NOT modify application source files. No edits, no new source files,
29
- no dependency changes, no migrations. Reading is always allowed.
30
- - The only files you may write are OLC planning documents inside the configured
31
- vault (`intent.md`, `plan.md`, plus an explore report when Explore is used).
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/bin/olc-setup.js CHANGED
@@ -32,7 +32,11 @@ import { fileURLToPath } from "node:url";
32
32
  const OWNED_FILES = [
33
33
  ["agents/olc-plan.md", ".opencode/agents/olc-plan.md"],
34
34
  ["agents/olc-build.md", ".opencode/agents/olc-build.md"],
35
+ ["skills/olc-init/SKILL.md", ".opencode/skills/olc-init/SKILL.md"],
35
36
  ["skills/olc-explore/SKILL.md", ".opencode/skills/olc-explore/SKILL.md"],
37
+ ["skills/olc-memory/SKILL.md", ".opencode/skills/olc-memory/SKILL.md"],
38
+ ["skills/olc-log/SKILL.md", ".opencode/skills/olc-log/SKILL.md"],
39
+ ["skills/olc-taste/SKILL.md", ".opencode/skills/olc-taste/SKILL.md"],
36
40
  ];
37
41
 
38
42
  function usage() {
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.2.0";
13
+ export declare const OLC_VERSION = "0.4.0";
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.2.0";
13
+ export const OLC_VERSION = "0.4.0";
14
14
  export { default } from "./plugin.js";
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-lean-coder",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
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",
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: olc-init
3
+ description: Daftarkan satu repo app + vault ke OLC secara aman dan idempotent. Create-only — tidak pernah menimpa file yang sudah ada.
4
+ ---
5
+
6
+ # olc-init
7
+
8
+ Inisialisasi proyek OLC: mengusulkan `project_id`, mengonfirmasi vault path, menyiapkan `.olc/` dan struktur vault, lalu mendaftarkan pasangan repo↔vault di registry.
9
+
10
+ ## Aturan keras
11
+
12
+ 1. **Jelaskan dulu sebelum menulis.** Sebutkan file apa saja yang akan dibuat sebelum memanggil `initProject`.
13
+ 2. **Create-only.** File yang sudah ada dilaporkan `preserved` — tidak pernah ditimpa. Yang butuh keputusan manusia dikembalikan sebagai `status: "needs-decision"` dengan pesan yang bisa ditindaklanjuti.
14
+ 3. **Tidak ada tebakan vault.** Urutan: `vaultPath` eksplisit > env `OLC_VAULT_PATH` > config yang ada. Bila tidak ada, minta ke user — jangan membuat lokasi default diam-diam.
15
+ 4. **Tidak ada prompting di dalam modul.** Kumpulkan jawaban dulu, lalu panggil ulang dengan parameter lengkap.
16
+
17
+ ## Alur
18
+
19
+ 1. Panggil `initProject({ projectRoot })` — dapatkan usulan `project_id` (turunan nama repo yang disanitasi).
20
+ 2. Bila `status: "needs-decision"`, tanyakan ke user: konfirmasi `projectId`, isi `vaultPath`, atau selesaikan duplikat id sesuai pesan.
21
+ 3. Panggil ulang dengan `{ projectRoot, projectId, vaultPath }` hingga `status: "ready"`.
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.
27
+ 5. Untuk pratinjau tanpa menulis: `initProject({ ..., dryRun: true })` — `created` berarti "akan dibuat".
28
+
29
+ ## Yang dibuat (hanya bila belum ada)
30
+
31
+ - `<repo>/.olc/config.json` — `{ schemaVersion, projectId, vaultPath }`. Kunci berbau kredensial (`secret|token|password|api-key`) ditolak.
32
+ - `<repo>/.olc/AGENTS.md` — stub instruksi, minta user meninjau dan menyesuaikan.
33
+ - `<vault>/OLC/Projects/<project_id>/{index.md, current-state.md, decisions/, tasks/, logs/, memory/, taste/}`
34
+ - Entri `{ projects: { "<id>": { repoRoot } } }` di `<vault>/OLC/registry.json`.
35
+
36
+ ## Verifikasi skill ini
37
+
38
+ - Jalankan init dua kali di fixture repo/vault sementara: larian kedua semua `preserved`, tidak ada byte berubah.
39
+ - Init dengan config + instruksi kustom yang sudah ada: file kustom tetap identik.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: olc-log
3
+ description: Catat event penting, checkpoint, dan ringkasan sesi ke log aktivitas harian yang tahan lama. Terverifikasi anti rusak dan anti bocor rahasia.
4
+ ---
5
+
6
+ # olc-log
7
+
8
+ Log aktivitas abadi per proyek di `<vault>/OLC/Projects/<project_id>/logs/YYYY-MM-DD.md` (satu file per hari — itulah rotasinya, tanpa rotasi ukuran untuk MVP).
9
+
10
+ ## Aturan keras
11
+
12
+ 1. **Hanya event eksplisit.** Modul tidak hook ke tool call — tidak ada noise per-tool-call secara konstruksi. Catat hanya milestone, checkpoint, verifikasi, dan ringkasan sesi.
13
+ 2. **Rahasia disensor, tidak disimpan.** Pola kredensial yang dikenal di summary/details diganti `[redacted]` dan entri ditandai.
14
+ 3. **Append aman.** Satu write `O_APPEND` per entri; interupsi tidak pernah merusak entri sebelumnya. File tanpa newline akhir (sisa crash) dinormalisasi sebelum append berikutnya.
15
+ 4. **Identitas dulu.** Vault salah → throw dengan nol file dibuat.
16
+
17
+ ## Alur
18
+
19
+ 1. Tulis: `logEvent({ projectRoot, config, event: { kind, summary, taskId?, details?, gitSha?, date? } })` — `kind` mis. `milestone|checkpoint|verify|session`; `summary` non-kosong wajib.
20
+ 2. Baca: `readLogDay(vaultRoot, projectId, day)` atau `readLastEvents(vaultRoot, projectId, limit)` (urutan terbaru dulu — verifikasi terakhir terlihat di sana).
21
+ 3. Akhir sesi normal: panggil `buildSessionSummary` (modul `session`) — teks Indonesia via template `session-summary` + footer jujur hard-kill, klaim faktual hanya dari `VerifyOutcome`/SHA/checkpoint nyata — lalu tampilkan ke user. Sesi yang mati mendadak tidak menghasilkan ringkasan; event log terakhir adalah titik pemulihan (lihat resume).
22
+
23
+ ## Verifikasi skill ini
24
+
25
+ - Rahasia pola `sk-...`, `ghp_...`, `AKIA...` di summary tidak pernah sampai ke vault (jadi `[redacted]`).
26
+ - Interupsi di tengah append tidak merusak entri sebelumnya.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: olc-memory
3
+ description: Cari dan perbarui catatan memori proyek secara progresif — baca yang kecil dulu, hanya yang relevan dengan query. Tidak pernah memindai seluruh vault.
4
+ ---
5
+
6
+ # olc-memory
7
+
8
+ Ingatan berlingkup proyek: baca `index.md` + `current-state.md` dulu, lalu hanya dokumen `memory/` + `decisions/`, doc task, dan event log yang relevan dengan query. Tulis balik hanya di scope proyek yang tervalidasi.
9
+
10
+ ## Aturan keras
11
+
12
+ 1. **Identitas dulu.** `validateIdentity` harus lolos sebelum baca/tulis apa pun. Proyek salah atau vault tak tersedia → gagal dengan nol file tersentuh.
13
+ 2. **Tidak memindai folder proyek lain.** Semua path di-resolve di dalam `<vault>/OLC/Projects/<id>/`; folder lain tidak tersentuh secara konstruksi.
14
+ 3. **Tulis terkontrol.** `recordMemory` butuh nama polos (huruf/angka/dash/underscore, tanpa path/ekstensi) + konten non-kosong; file yang sudah ada tidak ditimpa diam-diam (`overwrite` eksplisit).
15
+
16
+ ## Alur
17
+
18
+ 1. Panggil `recallMemory({ projectRoot, config, query?, taskId?, includeLogs?, logLimit?, limit? })` — tanpa query = konteks dasar (index + state + log terbaru, tanpa filter).
19
+ 2. Dengan query: token query difilter stopwords, skor per dokumen `memory/` + `decisions/` (bobot nama file), kutipan dibatasi 1200 karakter dengan flag truncasi, urutan skor terbaik dulu.
20
+ 3. Dengan `taskId`: sertakan status doc intent/plan task itu (hilang → null, bukan error).
21
+ 4. Untuk menyimpan: `recordMemory({ projectRoot, config, name, content, overwrite? })` → `memory/<name>.md` atomik.
22
+
23
+ ## Verifikasi skill ini
24
+
25
+ - Ingatan proyek A tidak pernah muncul saat recall di proyek B (isolasi multi-proyek).
26
+ - Setiap klaim relevansi bisa ditelusur ke dokumen + barisnya, bukan karangan.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: olc-taste
3
+ description: Pelajari preferensi khas proyek tanpa mengubah perilaku diam-diam. Sinyal berulang jadi usulan pending; hanya persetujuan user yang mengaktifkan.
4
+ ---
5
+
6
+ # olc-taste
7
+
8
+ Selera proyek dipelajari tanpa silent behavior change: sinyal berulang dicatat sebagai proposal `pending` lengkap dengan contoh/bukti, dan hanya keputusan user eksplisit yang mengubahnya jadi `active`. Penolakan memarkirnya sebagai `rejected` (riwayat, tidak pernah dipakai). Rule `pending` tidak pernah diperlakukan sebagai aktif oleh konsumen mana pun.
9
+
10
+ ## Aturan keras
11
+
12
+ 1. **Hanya user yang mengaktifkan.** Tidak ada jalur otomatis pending→active. Review terminal: `active`/`rejected` tidak bisa di-review ulang (`BAD_TRANSITION`).
13
+ 2. **Scope satu proyek.** Semua path di dalam `taste/` proyek tervalidasi; proyek lain tidak tersentuh. Modul ini tidak pernah menyentuh `tasks/` — intent/plan yang disetujui tidak bisa tertimpa dari sini.
14
+ 3. **Usulan butuh bukti.** Tanpa ≥1 contoh/sinyal berulang, usulan ditolak langsung (`INVALID_INPUT`). Duplikat tidak digabung diam-diam (`ALREADY_EXISTS`).
15
+
16
+ ## Alur
17
+
18
+ 1. Usulkan: `proposeTasteRule({ projectRoot, config, name, rule, examples[] })` → `taste/<name>.md` status `pending` via template `taste-rule`, write atomik create-only.
19
+ 2. Baca: `getTasteRule(...)` / `listTasteRules({ status? })` — hanya di scope tervalidasi, urut nama.
20
+ 3. Review eksplisit bersama user: `reviewTasteRule({ projectRoot, config, name, approve })` — `true` = pending→active, `false` = pending→rejected. Nama tak dikenal → `UNKNOWN_RULE`.
21
+
22
+ ## Verifikasi skill ini
23
+
24
+ - Rule `pending` tidak muncul di daftar `active`.
25
+ - `approve` mengaktifkan, `reject` memarkir; review ulang status terminal gagal.
26
+ - Intent/plan task byte-identik sebelum dan sesudah siklus propose→review.