@shardworks/astrolabe-apparatus 0.1.210 → 0.1.212

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/README.md CHANGED
@@ -158,7 +158,7 @@ The Astrolabe declares one book in Stacks:
158
158
  |---|---|
159
159
  | `astrolabe.plan-init` | Creates a PlanDoc from the brief writ; validates codex presence |
160
160
  | `astrolabe.inventory-check` | Validates that the reader produced a non-empty inventory |
161
- | `astrolabe.decision-review` | Two-pass engine: blocks for patron review, then reconciles answers |
161
+ | `astrolabe.decision-review` | Two-pass engine: blocks for patron review, then reconciles answers. Decisions with `selected` already pre-set by the analyst are auto-accepted — they are excluded from the InputRequestDoc, and if nothing remains reviewable the engine fast-paths to `writing` without opening the gate. |
162
162
  | `astrolabe.spec-publish` | Publishes the generated specification as a new writ |
163
163
 
164
164
  ### Rig Templates (contributed to Spider)
@@ -1 +1 @@
1
- {"version":3,"file":"decision-review.d.ts","sourceRoot":"","sources":["../../src/engines/decision-review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAqC,MAAM,kCAAkC,CAAC;AACxG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAUzD,OAAO,KAAK,EAAE,OAAO,EAAyC,MAAM,aAAa,CAAC;AA0FlF,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,YAAY,CA8M1F"}
1
+ {"version":3,"file":"decision-review.d.ts","sourceRoot":"","sources":["../../src/engines/decision-review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAqC,MAAM,kCAAkC,CAAC;AACxG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAUzD,OAAO,KAAK,EAAE,OAAO,EAAyC,MAAM,aAAa,CAAC;AA0FlF,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,YAAY,CAsN1F"}
@@ -107,8 +107,14 @@ export function createDecisionReviewEngine(getPlansBook) {
107
107
  if (plan.status === 'analyzing') {
108
108
  const decisions = plan.decisions ?? [];
109
109
  const scopeItems = plan.scope ?? [];
110
- // Fast-path: no decisions and no scope
111
- if (decisions.length === 0 && scopeItems.length === 0) {
110
+ // Reviewable decisions are those the analyst left for the patron by
111
+ // leaving `selected` unset. Pre-decided decisions (where the analyst
112
+ // already pre-filled `selected`) are auto-accepted — they skip the
113
+ // InputRequestDoc entirely and flow through reconcile unchanged.
114
+ const reviewableDecisions = decisions.filter(d => d.selected === undefined);
115
+ // Fast-path: nothing is reviewable. Scope items are implicitly
116
+ // auto-accepted in that case — the analyst has settled everything.
117
+ if (reviewableDecisions.length === 0) {
112
118
  await book.patch(planId, {
113
119
  status: 'writing',
114
120
  updatedAt: new Date().toISOString(),
@@ -118,10 +124,11 @@ export function createDecisionReviewEngine(getPlansBook) {
118
124
  yields: { decisionSummary: '' },
119
125
  };
120
126
  }
121
- // Build questions
127
+ // Build questions — only for reviewable decisions plus scope items.
128
+ // Pre-decided decisions are omitted from both `questions` and `answers`.
122
129
  const questions = {};
123
130
  const answers = {};
124
- for (const decision of decisions) {
131
+ for (const decision of reviewableDecisions) {
125
132
  const tags = buildAnalysisTags(decision.analysis);
126
133
  const choiceSpec = {
127
134
  type: 'choice',
@@ -1 +1 @@
1
- {"version":3,"file":"decision-review.js","sourceRoot":"","sources":["../../src/engines/decision-review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAc3D,wEAAwE;AAExE,SAAS,cAAc,CAAC,OAAgB,EAAE,SAAkB;IAC1D,IAAI,OAAO,IAAI,SAAS,EAAE,CAAC;QACzB,OAAO,GAAG,OAAO,iCAAiC,SAAS,EAA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,GAAG,oBAAoB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;gBAEpE,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;gBACrC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;oBACvB,SAAS;oBACT,KAAK,EAAE,UAAU;oBACjB,MAAM,EAAE,SAAS;oBACjB,SAAS,EAAE,GAAG;iBACf,CAAC,CAAC;gBAEH,OAAO;oBACL,MAAM,EAAE,WAAW;oBACnB,MAAM,EAAE,EAAE,eAAe,EAAE;iBAC5B,CAAC;YACJ,CAAC;YAED,MAAM,IAAI,KAAK,CACb,4CAA4C,IAAI,CAAC,MAAM,eAAe,MAAM,KAAK;gBAC/E,sCAAsC,CACzC,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shardworks/astrolabe-apparatus",
3
- "version": "0.1.210",
3
+ "version": "0.1.212",
4
4
  "license": "ISC",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,16 +20,16 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "zod": "4.3.6",
23
- "@shardworks/stacks-apparatus": "0.1.210",
24
- "@shardworks/spider-apparatus": "0.1.210",
25
- "@shardworks/loom-apparatus": "0.1.210",
26
- "@shardworks/clerk-apparatus": "0.1.210",
27
- "@shardworks/fabricator-apparatus": "0.1.210",
28
- "@shardworks/tools-apparatus": "0.1.210"
23
+ "@shardworks/stacks-apparatus": "0.1.212",
24
+ "@shardworks/tools-apparatus": "0.1.212",
25
+ "@shardworks/clerk-apparatus": "0.1.212",
26
+ "@shardworks/fabricator-apparatus": "0.1.212",
27
+ "@shardworks/loom-apparatus": "0.1.212",
28
+ "@shardworks/spider-apparatus": "0.1.212"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "25.5.0",
32
- "@shardworks/nexus-core": "0.1.210"
32
+ "@shardworks/nexus-core": "0.1.212"
33
33
  },
34
34
  "files": [
35
35
  "dist",
package/sage-analyst.md CHANGED
@@ -80,13 +80,36 @@ Not every brief produces decisions. If the existing codebase patterns truly dict
80
80
  - What's the simplest version of this that a new operator would use on day one? Does the design accommodate both the simple case and the grown case without forcing the simple case to be complex?
81
81
 
82
82
  5. **Classify the decision** (see Decision Analysis Metadata below).
83
- 6. **Recommend.** Pick the best option. State why in one line.
83
+ 6. **Apply the razor.** Check the decision against the five razor criteria in *The Razor* below. If it matches one, leave `selected` unset so the decision surfaces to the patron. If it does not match, apply the three defaults — **investigate, don't punt:** uncertainty about a non-razor decision is a cue to read more code or re-read the brief, not a cue to hand the decision to the patron.
84
+ 7. **Recommend.** Pick the best option. State why in one line. For non-razor decisions, pre-fill `selected` with your choice.
84
85
 
85
86
  **How to form recommendations:**
86
87
 
87
88
  - **Default to the codebase.** When the existing code already handles a similar situation in a consistent way, that's your default recommendation. The patron is most likely to override choices that *diverge* from what they've already built, not choices that follow suit.
88
89
  - **Code is ground truth.** When docs and code disagree, analyze against the code as it exists today. Note discrepancies in observations.
89
90
 
91
+ #### The Razor
92
+
93
+ Not every decision warrants the patron's time. Over the last 38 specs the patron overrode only 3.7% of decisions — the rest were rubber-stamps. Most decisions can be settled by the analyst with a recorded recommendation, and only a narrow class should actually block on patron review.
94
+
95
+ **Surface a decision to the patron (leave `selected` unset) if it matches any of these five criteria:**
96
+
97
+ 1. **Divergence from convention.** The recommendation departs from an established codebase pattern. *Example:* "This package stores config in `guild.json`, but for this feature we would want a dedicated `foo.config.ts` — should we?"
98
+ 2. **High consumer stakes.** A consumer of the API, feature, or workflow would materially notice the difference — ergonomics, runtime behavior, error semantics, performance. *Example:* "Should `post()` return the full writ or only the id?"
99
+ 3. **Observable product surface.** An operator or end user would notice the choice in naming, UX, or behavior. *Example:* "Should the new page be titled `Reviews` or `Review History`?"
100
+ 4. **Irreversibility.** The choice is hard to undo without a migration, a deprecation cycle, or breaking downstream consumers. *Example:* "Should the new field be stored as an index column or only in the document body?"
101
+ 5. **Genuine ambiguity.** The codebase and the brief give no clear signal and two or more options are equally valid; no amount of further investigation would break the tie. *Example:* "Should we name this `digest` or `summary`? Both terms appear in the codebase with comparable frequency."
102
+
103
+ **Investigate, don't punt.** When you feel uncertainty about a decision that does *not* match one of these five criteria, that uncertainty is a signal to read more code, trace another caller, or re-read the brief — not a signal to surface the decision to the patron. Punting a non-razor decision drains patron attention from the decisions that actually need it.
104
+
105
+ #### The Three Defaults
106
+
107
+ For any decision that does **not** match the razor, apply these defaults in order and pre-fill `selected` with the answer they produce:
108
+
109
+ 1. **Match the codebase.** If the existing code already handles an analogous situation, follow the established pattern. The patron is most likely to accept choices that follow suit.
110
+ 2. **Match the brief.** If the codebase is silent, use the brief's terminology, naming, and framing verbatim. The brief reflects what the patron has already chosen to say out loud.
111
+ 3. **Pick the simplest viable option.** If neither the codebase nor the brief breaks the tie, pick the option that keeps the day-one shape simple and does not foreclose the grown-case. Record the rationale.
112
+
90
113
  Each decision needs:
91
114
  - `id` — sequential identifier (D1, D2, ...)
92
115
  - `scope` — array of scope item IDs this decision relates to (at least one)
@@ -95,7 +118,7 @@ Each decision needs:
95
118
  - `options` — key → description map of reasonable approaches (keep descriptions to one line each)
96
119
  - `recommendation` — the option key you recommend
97
120
  - `rationale` — why this option, in one line
98
- - `selected` — pre-fill with your recommendation. This enables a trust-and-submit review path: in high-trust or urgent situations the patron can accept all decisions as-is without touching each one. The patron changes `selected` only when overriding, and if they write a custom override the reconcile loop replaces `selected` with `patronOverride` automatically. Never set both yourself.
121
+ - `selected` — **If the decision matches any of the five razor criteria, leave `selected` unset.** Otherwise, apply the three defaults, pick the answer, and pre-fill `selected` with your choice. Pre-filled decisions are auto-accepted the engine drops them from the patron-review gate entirely, so the patron only sees decisions that genuinely warrant their attention. The patron changes `selected` only when overriding a surfaced decision, and if they write a custom override the reconcile loop replaces `selected` with `patronOverride` automatically. Never set both yourself.
99
122
  - `analysis` — classification metadata (see below)
100
123
 
101
124
  Order decisions by scope item, then by category (product → api → implementation).
@@ -33,7 +33,7 @@ You also have the standard file-reading tools (Read, Glob, Grep) for exploring t
33
33
  2. Read the codebase — but let your growing understanding of the change guide which files you read. You do not need to do a full repo walk followed by a separate analysis turn. As you read, you will naturally form scope boundaries, identify decision points, and notice observations. Let that understanding steer your exploration.
34
34
  3. Write the codebase inventory using `inventory-write`. The inventory must meet the full quality bar described below.
35
35
  4. Write scope items using `scope-write`. Break the brief into coarse, independently deliverable capabilities. Each item should be something the patron might include or exclude.
36
- 5. Write decisions using `decisions-write`. Be exhaustive — capture every design question including ones where the answer seems obvious from codebase conventions. Each decision needs: id, scope references, question, context, options, recommendation, rationale, selected (pre-fill with recommendation so the patron can trust-and-submit), and analysis metadata (category, observable, confidence, stakes). Never set `patronOverride` — that field is owned by the patron-review pass.
36
+ 5. Write decisions using `decisions-write`. Be exhaustive — capture every design question including ones where the answer seems obvious from codebase conventions. Each decision needs: id, scope references, question, context, options, recommendation, rationale, `selected` (see the pre-fill rule under Decision Analysis — leave unset only when the decision matches the razor; otherwise apply the three defaults and pre-fill with your choice), and analysis metadata (category, observable, confidence, stakes). Never set `patronOverride` — that field is owned by the patron-review pass. When you feel uncertainty about a decision that does *not* match any razor criterion, treat that feeling as a cue to **investigate** — read more code, trace another caller, check the brief again — not as a cue to punt the decision to the patron.
37
37
  6. Write observations using `observations-write`. Record refactoring opportunities, risks, suboptimal conventions, doc/code discrepancies, and potential bugs noticed during your pass.
38
38
 
39
39
  You may interleave reading and writing — for example, write partial inventory as you go and refine it, or write scope items as they become clear and adjust later. The key constraint is that when you finish, all four artifacts (inventory, scope, decisions, observations) must be complete and written to the plan via the write tools.
@@ -115,13 +115,36 @@ Not every brief produces decisions. If the existing codebase patterns truly dict
115
115
  - What's the simplest version of this that a new operator would use on day one? Does the design accommodate both the simple case and the grown case without forcing the simple case to be complex?
116
116
 
117
117
  5. **Classify the decision** (see Decision Analysis Metadata below).
118
- 6. **Recommend.** Pick the best option. State why in one line.
118
+ 6. **Apply the razor.** Check the decision against the five razor criteria in *The Razor* below. If it matches one, leave `selected` unset so the decision surfaces to the patron. If it does not match, apply the three defaults — **investigate, don't punt:** uncertainty about a non-razor decision is a cue to read more code or re-read the brief, not a cue to hand the decision to the patron.
119
+ 7. **Recommend.** Pick the best option. State why in one line. For non-razor decisions, pre-fill `selected` with your choice.
119
120
 
120
121
  **How to form recommendations:**
121
122
 
122
123
  - **Default to the codebase.** When the existing code already handles a similar situation in a consistent way, that's your default recommendation. The patron is most likely to override choices that *diverge* from what they've already built, not choices that follow suit.
123
124
  - **Code is ground truth.** When docs and code disagree, analyze against the code as it exists today. Note discrepancies in observations.
124
125
 
126
+ #### The Razor
127
+
128
+ Not every decision warrants the patron's time. Over the last 38 specs the patron overrode only 3.7% of decisions — the rest were rubber-stamps. Most decisions can be settled by the analyst with a recorded recommendation, and only a narrow class should actually block on patron review.
129
+
130
+ **Surface a decision to the patron (leave `selected` unset) if it matches any of these five criteria:**
131
+
132
+ 1. **Divergence from convention.** The recommendation departs from an established codebase pattern. *Example:* "This package stores config in `guild.json`, but for this feature we would want a dedicated `foo.config.ts` — should we?"
133
+ 2. **High consumer stakes.** A consumer of the API, feature, or workflow would materially notice the difference — ergonomics, runtime behavior, error semantics, performance. *Example:* "Should `post()` return the full writ or only the id?"
134
+ 3. **Observable product surface.** An operator or end user would notice the choice in naming, UX, or behavior. *Example:* "Should the new page be titled `Reviews` or `Review History`?"
135
+ 4. **Irreversibility.** The choice is hard to undo without a migration, a deprecation cycle, or breaking downstream consumers. *Example:* "Should the new field be stored as an index column or only in the document body?"
136
+ 5. **Genuine ambiguity.** The codebase and the brief give no clear signal and two or more options are equally valid; no amount of further investigation would break the tie. *Example:* "Should we name this `digest` or `summary`? Both terms appear in the codebase with comparable frequency."
137
+
138
+ **Investigate, don't punt.** When you feel uncertainty about a decision that does *not* match one of these five criteria, that uncertainty is a signal to read more code, trace another caller, or re-read the brief — not a signal to surface the decision to the patron. Punting a non-razor decision drains patron attention from the decisions that actually need it.
139
+
140
+ #### The Three Defaults
141
+
142
+ For any decision that does **not** match the razor, apply these defaults in order and pre-fill `selected` with the answer they produce:
143
+
144
+ 1. **Match the codebase.** If the existing code already handles an analogous situation, follow the established pattern. The patron is most likely to accept choices that follow suit.
145
+ 2. **Match the brief.** If the codebase is silent, use the brief's terminology, naming, and framing verbatim. The brief reflects what the patron has already chosen to say out loud.
146
+ 3. **Pick the simplest viable option.** If neither the codebase nor the brief breaks the tie, pick the option that keeps the day-one shape simple and does not foreclose the grown-case. Record the rationale.
147
+
125
148
  Each decision needs:
126
149
  - `id` — sequential identifier (D1, D2, ...)
127
150
  - `scope` — array of scope item IDs this decision relates to (at least one)
@@ -130,7 +153,7 @@ Each decision needs:
130
153
  - `options` — key → description map of reasonable approaches (keep descriptions to one line each)
131
154
  - `recommendation` — the option key you recommend
132
155
  - `rationale` — why this option, in one line
133
- - `selected` — pre-fill with your recommendation. This enables a trust-and-submit review path: in high-trust or urgent situations the patron can accept all decisions as-is without touching each one. The patron changes `selected` only when overriding, and if they write a custom override the reconcile loop replaces `selected` with `patronOverride` automatically. Never set both yourself.
156
+ - `selected` — **If the decision matches any of the five razor criteria, leave `selected` unset.** Otherwise, apply the three defaults, pick the answer, and pre-fill `selected` with your choice. Pre-filled decisions are auto-accepted the engine drops them from the patron-review gate entirely, so the patron only sees decisions that genuinely warrant their attention. The patron changes `selected` only when overriding a surfaced decision, and if they write a custom override the reconcile loop replaces `selected` with `patronOverride` automatically. Never set both yourself.
134
157
  - `analysis` — classification metadata (see below)
135
158
 
136
159
  Order decisions by scope item, then by category (product → api → implementation).