@digi4care/omo-slim-decision-layer 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Chris Engelhard
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,89 @@
1
- # Temporary Holding Version
1
+ # omo-slim-decision-layer
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ An [OpenCode](https://opencode.ai) plugin that adds a **decision layer** to
4
+ AI-assisted development: a typed, git-native decision register that records the
5
+ *why* of a project — requirements, constraints, assumptions and decisions —
6
+ with the same ergonomics that [beads](https://github.com/steveyegge/beads)
7
+ gives work items.
8
+
9
+ Built as a companion plugin for
10
+ [oh-my-opencode-slim](https://github.com/alvinunreal/oh-my-opencode-slim).
11
+
12
+ ## What it does
13
+
14
+ - **Typed decision records** — `REQ` (requirement), `CONSTRAINT`
15
+ (non-negotiable), `ASSUMPTION` (unverified, with `needed_to_close`) and `DEC`
16
+ (decision with rejected alternatives and consequences).
17
+ - **Single source of truth** — one YAML register at `.decisions/register.yaml`.
18
+ All writes go through the plugin's tools; the generated markdown view is
19
+ disposable and never authoritative.
20
+ - **Closed vocabularies** — status is `proposed | accepted | rejected |
21
+ superseded`. Supersede instead of edit: history stays append-only.
22
+ - **Owner ratification** — agents draft records; only the owner ratifies.
23
+ This is a convention enforced by discipline, not by a technical gate.
24
+ - **Interview integration** — when oh-my-opencode-slim's `/interview` command
25
+ runs, the plugin injects a discipline prompt so a closed interview ends as
26
+ records in the register instead of loose markdown.
27
+ - **Traceability** — typed links (`refines`, `depends_on`, `constrains`,
28
+ `relates_to`) between records, with queries for orphans and reverse lookup.
29
+
30
+ ## Agent tools
31
+
32
+ | Tool | Purpose |
33
+ |---|---|
34
+ | `decision-init` | Create the register (idempotent, never overwrites) |
35
+ | `decision-add` | Create a record (status `proposed`) |
36
+ | `decision-ratify` | `proposed` → `accepted` — owner act, never self-invoked |
37
+ | `decision-reject` | `proposed` → `rejected` |
38
+ | `decision-supersede` | Replace a record, preserving history |
39
+ | `decision-list` | List records, filter by status/type |
40
+ | `decision-query` | Orphans, or "what links to this record" |
41
+ | `decision-validate` | Validate the register against the schema |
42
+ | `decision-view` | Regenerate the markdown view |
43
+
44
+ ## Install
45
+
46
+ Add the plugin to your OpenCode config:
47
+
48
+ ```jsonc
49
+ {
50
+ "plugin": ["@digi4care/omo-slim-decision-layer@latest"]
51
+ }
52
+ ```
53
+
54
+ OpenCode installs the plugin automatically from npm on the next start. To pin
55
+ a version, replace `@latest` with a specific version (e.g. `@0.2.1`).
56
+
57
+ **Local development / offline use.** Every release is also packed as a plain
58
+ `.tgz` in the `release/` folder (semver). A named entry only works for packages
59
+ that exist on npm; for a local or private build, reference the built file
60
+ directly instead:
61
+
62
+ ```jsonc
63
+ {
64
+ "plugin": ["file:///absolute/path/to/node_modules/@digi4care/omo-slim-decision-layer/dist/index.js"]
65
+ }
66
+ ```
67
+
68
+ `dist/index.js` is a single bundle; only `@opencode-ai/plugin` and `zod` are
69
+ external, so the host supplies those.
70
+
71
+ ## Development
72
+
73
+ ```bash
74
+ bun install
75
+ bun test # bun test
76
+ bun run typecheck # tsc --noEmit
77
+ bun run check # biome
78
+ bun run release # build + pack tgz into release/
79
+ ```
80
+
81
+ ## Author
82
+
83
+ **Chris Engelhard** — [chrisengelhard.nl](https://chrisengelhard.nl) —
84
+ [chris@chrisengelhard.nl](mailto:chris@chrisengelhard.nl) —
85
+ [@digi4care](https://github.com/digi4care)
86
+
87
+ ## License
88
+
89
+ MIT
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const ConfigSchema: z.ZodObject<{
3
+ registerPath: z.ZodDefault<z.ZodString>;
4
+ }, z.core.$strip>;
5
+ export type DecisionLayerConfig = z.infer<typeof ConfigSchema>;
6
+ export declare function loadConfig(worktree: string): DecisionLayerConfig;
@@ -0,0 +1,2 @@
1
+ import type { Hooks } from '@opencode-ai/plugin';
2
+ export declare function createInterviewInjectHook(): NonNullable<Hooks['command.execute.before']>;
@@ -0,0 +1,6 @@
1
+ import type { Plugin } from '@opencode-ai/plugin';
2
+ declare const _default: {
3
+ id: string;
4
+ server: Plugin;
5
+ };
6
+ export default _default;