aval-adr 1.1.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 +42 -0
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -150,11 +150,53 @@ different edges:
150
150
  | `aval heads [--write\|--check]` | the projection |
151
151
  | `aval show ADR-0015` | derived status, including partial supersession |
152
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 |
153
155
  | `aval hook install [--check]` | put the heads in front of an agent at session start |
154
156
  | `aval pack [--write\|--check]` | publish this corpus's declarations for others to read |
155
157
  | `aval add <source>… [--dry-run]` | vendor another repository's declarations |
156
158
  | `aval add --check` | are the vendored packs still what their revisions name |
157
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
+
158
200
  ## Sharing one decision across repositories
159
201
 
160
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.1.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.1.0",
36
- "@aval-adr/darwin-x64": "1.1.0",
37
- "@aval-adr/linux-arm64-gnu": "1.1.0",
38
- "@aval-adr/linux-x64-gnu": "1.1.0",
39
- "@aval-adr/linux-x64-musl": "1.1.0",
40
- "@aval-adr/win32-x64": "1.1.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
  }