@shardworks/astrolabe-apparatus 0.1.211 → 0.1.213
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,
|
|
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
|
-
//
|
|
111
|
-
|
|
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
|
|
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":[],"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AAI,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.
|
|
3
|
+
"version": "0.1.213",
|
|
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/
|
|
24
|
-
"@shardworks/
|
|
25
|
-
"@shardworks/
|
|
26
|
-
"@shardworks/
|
|
27
|
-
"@shardworks/
|
|
28
|
-
"@shardworks/
|
|
23
|
+
"@shardworks/stacks-apparatus": "0.1.213",
|
|
24
|
+
"@shardworks/tools-apparatus": "0.1.213",
|
|
25
|
+
"@shardworks/clerk-apparatus": "0.1.213",
|
|
26
|
+
"@shardworks/spider-apparatus": "0.1.213",
|
|
27
|
+
"@shardworks/loom-apparatus": "0.1.213",
|
|
28
|
+
"@shardworks/fabricator-apparatus": "0.1.213"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "25.5.0",
|
|
32
|
-
"@shardworks/nexus-core": "0.1.
|
|
32
|
+
"@shardworks/nexus-core": "0.1.213"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|
package/sage-analyst.md
CHANGED
|
@@ -80,13 +80,39 @@ 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. **
|
|
83
|
+
6. **Pre-emption check — brief first.** Before applying the razor, check whether the brief (or an architecture spec it references) explicitly answers the question. If so, record the answer as both `recommendation` and `selected`, and cite the source in `rationale`. The patron has already decided; skip the razor.
|
|
84
|
+
7. **Apply the razor.** For any decision the brief did not pre-empt, check it against the five razor criteria in *The Razor* below. If it matches, 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.
|
|
85
|
+
8. **Recommend.** Pick the best option. State why in one line. For auto-decided decisions, pre-fill `selected` with your choice.
|
|
84
86
|
|
|
85
87
|
**How to form recommendations:**
|
|
86
88
|
|
|
87
89
|
- **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
90
|
- **Code is ground truth.** When docs and code disagree, analyze against the code as it exists today. Note discrepancies in observations.
|
|
89
91
|
|
|
92
|
+
#### The Razor
|
|
93
|
+
|
|
94
|
+
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.
|
|
95
|
+
|
|
96
|
+
**Pre-emption: the brief has the last word.** Before applying the razor, check whether the brief (or an architecture spec it references) explicitly answers the question — by prescribing a value, a behavior, or a pattern to follow. If so, pre-fill `selected` with that answer and cite the source in `rationale`, regardless of whether the question would otherwise match a razor criterion. The patron has already decided by writing the brief; re-surfacing a settled question drains attention from the decisions that are genuinely open.
|
|
97
|
+
|
|
98
|
+
**Otherwise, surface the decision to the patron (leave `selected` unset) if — and only if — it falls into one of these five categories:**
|
|
99
|
+
|
|
100
|
+
1. **Vocabulary/pattern establishment.** New guild terms, categorical distinctions, or patterns other code will follow. *Example:* "Should we call the new state 'parked' or 'deferred'?"
|
|
101
|
+
2. **Human-facing surface.** CLI text, error messages, agent personalities, doc phrasing, or UX details a patron or operator will read. *Example:* "Should the error read 'Writ not found' or 'No writ with id X'?"
|
|
102
|
+
3. **Scope boundary.** Cutlines between the current commission and follow-up work — the 'should we also do X?' questions. *Example:* "Should this change also update the two-phase-planning rig, or is that a separate commission?"
|
|
103
|
+
4. **Shape of persisted or inter-component data.** Typed vs opaque, required vs optional, configured vs convention — when other components will consume the shape. *Example:* "Should `Decision.scope` be `string[]` or a typed `ScopeRef[]`?"
|
|
104
|
+
5. **Component responsibility boundaries.** Who owns a behavior across engines, tools, and apparatuses — when the decision sets a pattern for ownership. *Example:* "Should the sage write decisions through a tool, or through direct book access?"
|
|
105
|
+
|
|
106
|
+
**Investigate, don't punt.** When you feel uncertainty about a decision that does *not* match one of these five categories, 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.
|
|
107
|
+
|
|
108
|
+
#### The Three Defaults
|
|
109
|
+
|
|
110
|
+
For any decision that was not pre-empted by the brief and does **not** match the razor, apply these defaults and pre-fill `selected` with the answer they produce:
|
|
111
|
+
|
|
112
|
+
1. **Prefer removal to deprecation.** When refactoring, rip out the old path. No deprecation windows unless the patron explicitly asks for one.
|
|
113
|
+
2. **Prefer fail-loud to silent fallback.** Throw on missing input; no defaults-when-absent unless the absent case is itself a legitimate state.
|
|
114
|
+
3. **Extend the API at the right layer; don't route around it.** If the recommendation involves a workaround or "the anima handles it via prompt," default to adding the method/tool instead.
|
|
115
|
+
|
|
90
116
|
Each decision needs:
|
|
91
117
|
- `id` — sequential identifier (D1, D2, ...)
|
|
92
118
|
- `scope` — array of scope item IDs this decision relates to (at least one)
|
|
@@ -95,7 +121,7 @@ Each decision needs:
|
|
|
95
121
|
- `options` — key → description map of reasonable approaches (keep descriptions to one line each)
|
|
96
122
|
- `recommendation` — the option key you recommend
|
|
97
123
|
- `rationale` — why this option, in one line
|
|
98
|
-
- `selected` — pre-fill with your
|
|
124
|
+
- `selected` — **If the brief pre-empts the decision, set `selected` to the brief's answer.** Otherwise, if the decision matches any of the five razor criteria, leave `selected` unset. Otherwise, apply the three defaults 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
125
|
- `analysis` — classification metadata (see below)
|
|
100
126
|
|
|
101
127
|
Order decisions by scope item, then by category (product → api → implementation).
|
package/sage-reading-analyst.md
CHANGED
|
@@ -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
|
|
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,39 @@ 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. **
|
|
118
|
+
6. **Pre-emption check — brief first.** Before applying the razor, check whether the brief (or an architecture spec it references) explicitly answers the question. If so, record the answer as both `recommendation` and `selected`, and cite the source in `rationale`. The patron has already decided; skip the razor.
|
|
119
|
+
7. **Apply the razor.** For any decision the brief did not pre-empt, check it against the five razor criteria in *The Razor* below. If it matches, 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.
|
|
120
|
+
8. **Recommend.** Pick the best option. State why in one line. For auto-decided decisions, pre-fill `selected` with your choice.
|
|
119
121
|
|
|
120
122
|
**How to form recommendations:**
|
|
121
123
|
|
|
122
124
|
- **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
125
|
- **Code is ground truth.** When docs and code disagree, analyze against the code as it exists today. Note discrepancies in observations.
|
|
124
126
|
|
|
127
|
+
#### The Razor
|
|
128
|
+
|
|
129
|
+
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.
|
|
130
|
+
|
|
131
|
+
**Pre-emption: the brief has the last word.** Before applying the razor, check whether the brief (or an architecture spec it references) explicitly answers the question — by prescribing a value, a behavior, or a pattern to follow. If so, pre-fill `selected` with that answer and cite the source in `rationale`, regardless of whether the question would otherwise match a razor criterion. The patron has already decided by writing the brief; re-surfacing a settled question drains attention from the decisions that are genuinely open.
|
|
132
|
+
|
|
133
|
+
**Otherwise, surface the decision to the patron (leave `selected` unset) if — and only if — it falls into one of these five categories:**
|
|
134
|
+
|
|
135
|
+
1. **Vocabulary/pattern establishment.** New guild terms, categorical distinctions, or patterns other code will follow. *Example:* "Should we call the new state 'parked' or 'deferred'?"
|
|
136
|
+
2. **Human-facing surface.** CLI text, error messages, agent personalities, doc phrasing, or UX details a patron or operator will read. *Example:* "Should the error read 'Writ not found' or 'No writ with id X'?"
|
|
137
|
+
3. **Scope boundary.** Cutlines between the current commission and follow-up work — the 'should we also do X?' questions. *Example:* "Should this change also update the two-phase-planning rig, or is that a separate commission?"
|
|
138
|
+
4. **Shape of persisted or inter-component data.** Typed vs opaque, required vs optional, configured vs convention — when other components will consume the shape. *Example:* "Should `Decision.scope` be `string[]` or a typed `ScopeRef[]`?"
|
|
139
|
+
5. **Component responsibility boundaries.** Who owns a behavior across engines, tools, and apparatuses — when the decision sets a pattern for ownership. *Example:* "Should the sage write decisions through a tool, or through direct book access?"
|
|
140
|
+
|
|
141
|
+
**Investigate, don't punt.** When you feel uncertainty about a decision that does *not* match one of these five categories, 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.
|
|
142
|
+
|
|
143
|
+
#### The Three Defaults
|
|
144
|
+
|
|
145
|
+
For any decision that was not pre-empted by the brief and does **not** match the razor, apply these defaults and pre-fill `selected` with the answer they produce:
|
|
146
|
+
|
|
147
|
+
1. **Prefer removal to deprecation.** When refactoring, rip out the old path. No deprecation windows unless the patron explicitly asks for one.
|
|
148
|
+
2. **Prefer fail-loud to silent fallback.** Throw on missing input; no defaults-when-absent unless the absent case is itself a legitimate state.
|
|
149
|
+
3. **Extend the API at the right layer; don't route around it.** If the recommendation involves a workaround or "the anima handles it via prompt," default to adding the method/tool instead.
|
|
150
|
+
|
|
125
151
|
Each decision needs:
|
|
126
152
|
- `id` — sequential identifier (D1, D2, ...)
|
|
127
153
|
- `scope` — array of scope item IDs this decision relates to (at least one)
|
|
@@ -130,7 +156,7 @@ Each decision needs:
|
|
|
130
156
|
- `options` — key → description map of reasonable approaches (keep descriptions to one line each)
|
|
131
157
|
- `recommendation` — the option key you recommend
|
|
132
158
|
- `rationale` — why this option, in one line
|
|
133
|
-
- `selected` — pre-fill with your
|
|
159
|
+
- `selected` — **If the brief pre-empts the decision, set `selected` to the brief's answer.** Otherwise, if the decision matches any of the five razor criteria, leave `selected` unset. Otherwise, apply the three defaults 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
160
|
- `analysis` — classification metadata (see below)
|
|
135
161
|
|
|
136
162
|
Order decisions by scope item, then by category (product → api → implementation).
|