aval-adr 1.0.0 → 1.2.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.
Files changed (2) hide show
  1. package/README.md +64 -0
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -101,6 +101,28 @@ load, or a name it does not carry.
101
101
  Nothing on that surface writes. Resolving answers a question; deciding is not
102
102
  something to do on an agent's behalf.
103
103
 
104
+ **From the parent of all your projects**, where there is no corpus above and
105
+ several below, the same server is a **workspace**: every tool takes `repo` to name one.
106
+ `resolve` and `history` answer for all of them when it is omitted — a map
107
+ keyed by name, which is the cross-repository question in a single call —
108
+ while `keys`, `heads` and `show` ask for a name, because every repository's
109
+ heads at once is a lot of context to fetch by forgetting an argument.
110
+ `aval repos` says what was found, and `--all-repos` renders the same map from
111
+ the shell:
112
+
113
+ ```console
114
+ $ aval resolve stack.sql-layer --scope effect-stack --all-repos
115
+ == decisions ==
116
+ active ADR-0002 @effect/sql
117
+
118
+ == homelab ==
119
+ unknown no such key `stack.sql-layer`
120
+ …
121
+ ```
122
+
123
+ A linked worktree is detected and left out when its parent is also there, so
124
+ one corpus never answers twice; it stays addressable by name.
125
+
104
126
  Codes `1`, `2` and `3` mean the tool failed, was misused, or could not read the
105
127
  corpus. They never overlap a verdict, so "I could not look" is never mistaken
106
128
  for "I looked and found nothing".
@@ -128,11 +150,53 @@ different edges:
128
150
  | `aval heads [--write\|--check]` | the projection |
129
151
  | `aval show ADR-0015` | derived status, including partial supersession |
130
152
  | `aval history <key>` | the chain, labelled as history |
153
+ | `aval rules [--level L] [--all]` | the rules the decisions have adopted, one line each |
154
+ | `aval rule <id>` | one rule, with its translation and why |
131
155
  | `aval hook install [--check]` | put the heads in front of an agent at session start |
132
156
  | `aval pack [--write\|--check]` | publish this corpus's declarations for others to read |
133
157
  | `aval add <source>… [--dry-run]` | vendor another repository's declarations |
134
158
  | `aval add --check` | are the vendored packs still what their revisions name |
135
159
 
160
+ ## Rules: what a decision does not settle
161
+
162
+ A decision settles *what* is used. How the code that uses it is written gets
163
+ answered the way the first question used to be — a paragraph restated in six
164
+ `CLAUDE.md` files, one already wrong, and whatever a model remembers of a book.
165
+ So a **rule** is written once, in a markdown file whose headings are the
166
+ declarations, and it is **adopted by a record**:
167
+
168
+ ```markdown
169
+ ---
170
+ adopts: ADR-0011
171
+ source: Clean Code (Robert C. Martin, 2008)
172
+ ---
173
+
174
+ ## names.reveal-intent [constraint]
175
+
176
+ Names reveal intention: an identifier says what it holds, in the vocabulary
177
+ of the domain, and a reader never decodes an abbreviation.
178
+
179
+ The body is the translation — what this means here, and what it does not cover.
180
+ ```
181
+
182
+ A rule has no authority of its own: it is active exactly while the record that
183
+ adopts it still holds, so superseding that record retires its rules with it.
184
+ There are no per-rule supersession edges, because the graph already tracks the
185
+ record — a rule whose meaning changes gets a new id.
186
+
187
+ ```console
188
+ $ aval rules
189
+ constraint names.reveal-intent Names reveal intention: an identifier says what it holds …
190
+ heuristic functions.few-arguments A function takes no more inputs than it uses …
191
+ ```
192
+
193
+ A `constraint` is followed and a review blocks on it; the session hook prints
194
+ every active one. A `heuristic` is followed unless a reviewer argues why not,
195
+ in that place, and is fetched on demand. Precedence, which the hook also
196
+ prints: the decision at the scope asked, then the default-scope decision, then
197
+ these rules, then the book a rule cites — as explanation only. Remembered
198
+ advice from that book does not outrank a rule here.
199
+
136
200
  ## Sharing one decision across repositories
137
201
 
138
202
  A decision made once should be readable everywhere it applies. `aval pack`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aval-adr",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Ask what the current architecture decision is, and get a typed answer",
5
5
  "keywords": [
6
6
  "adr",
@@ -32,11 +32,11 @@
32
32
  "node": ">=18"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@aval-adr/darwin-arm64": "1.0.0",
36
- "@aval-adr/darwin-x64": "1.0.0",
37
- "@aval-adr/linux-arm64-gnu": "1.0.0",
38
- "@aval-adr/linux-x64-gnu": "1.0.0",
39
- "@aval-adr/linux-x64-musl": "1.0.0",
40
- "@aval-adr/win32-x64": "1.0.0"
35
+ "@aval-adr/darwin-arm64": "1.2.0",
36
+ "@aval-adr/darwin-x64": "1.2.0",
37
+ "@aval-adr/linux-arm64-gnu": "1.2.0",
38
+ "@aval-adr/linux-x64-gnu": "1.2.0",
39
+ "@aval-adr/linux-x64-musl": "1.2.0",
40
+ "@aval-adr/win32-x64": "1.2.0"
41
41
  }
42
42
  }