@shardworks/astrolabe-apparatus 0.1.239 → 0.1.241

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 (44) hide show
  1. package/README.md +12 -10
  2. package/dist/astrolabe.d.ts +11 -1
  3. package/dist/astrolabe.d.ts.map +1 -1
  4. package/dist/astrolabe.js +30 -10
  5. package/dist/astrolabe.js.map +1 -1
  6. package/dist/engines/decision-review.js +3 -3
  7. package/dist/engines/decision-review.js.map +1 -1
  8. package/dist/engines/index.d.ts +1 -0
  9. package/dist/engines/index.d.ts.map +1 -1
  10. package/dist/engines/index.js +1 -0
  11. package/dist/engines/index.js.map +1 -1
  12. package/dist/engines/inventory-check.d.ts +1 -1
  13. package/dist/engines/inventory-check.js +1 -1
  14. package/dist/engines/patron-anima.d.ts +28 -25
  15. package/dist/engines/patron-anima.d.ts.map +1 -1
  16. package/dist/engines/patron-anima.js +40 -37
  17. package/dist/engines/patron-anima.js.map +1 -1
  18. package/dist/engines/reader-analyst.d.ts +46 -0
  19. package/dist/engines/reader-analyst.d.ts.map +1 -0
  20. package/dist/engines/reader-analyst.js +76 -0
  21. package/dist/engines/reader-analyst.js.map +1 -0
  22. package/dist/plan-and-ship.d.ts +11 -3
  23. package/dist/plan-and-ship.d.ts.map +1 -1
  24. package/dist/plan-and-ship.js +12 -5
  25. package/dist/plan-and-ship.js.map +1 -1
  26. package/dist/three-phase-planning.d.ts +5 -2
  27. package/dist/three-phase-planning.d.ts.map +1 -1
  28. package/dist/three-phase-planning.js +7 -4
  29. package/dist/three-phase-planning.js.map +1 -1
  30. package/dist/two-phase-planning.d.ts +9 -4
  31. package/dist/two-phase-planning.d.ts.map +1 -1
  32. package/dist/two-phase-planning.js +10 -6
  33. package/dist/two-phase-planning.js.map +1 -1
  34. package/dist/types.d.ts +10 -5
  35. package/dist/types.d.ts.map +1 -1
  36. package/package.json +13 -12
  37. package/pages/astrolabe/astrolabe.js +6 -6
  38. package/pages/astrolabe/astrolabe.test.js +75 -0
  39. package/patron-anima-prompt.md +90 -54
  40. package/sage-primer-attended.md +214 -0
  41. package/{sage-reader.md → sage-primer-reader.md} +5 -5
  42. package/{sage-analyst.md → sage-primer-scoping.md} +5 -5
  43. package/{sage-reading-analyst.md → sage-primer-solo.md} +10 -8
  44. package/sage-writer.md +3 -3
package/README.md CHANGED
@@ -95,7 +95,7 @@ Add an `astrolabe` section to `guild.json` to configure behaviour:
95
95
 
96
96
  | Field | Type | Default | Description |
97
97
  |---|---|---|---|
98
- | `patronRole` | `string` | `""` (unset) | Qualified role name of the Patron Anima consulted before decision-review. When set, the `patron-anima` engine launches an anima in this role under a tailored operational prompt (see `patron-anima-prompt.md`) that encodes the engine's mode discipline — one option per decision, principle-structural confidence calibration, abstain-by-omission, and an out-of-lane prohibition on codebase audit work. The anima pre-fills decisions it can confidently resolve; the rest fall through to decision-review as usual. When unset or empty, the engine no-ops and decision-review behaves exactly as it did before the engine existed. |
98
+ | `patronRole` | `string` | `""` (unset) | Qualified role name of the Patron Anima consulted before decision-review. When set (non-empty string), the `astrolabe.reader-analyst` engine selects the `sage-primer-attended` role (every decision is pre-filled so the patron-anima principle-checks them all) and the `patron-anima` engine launches an anima in the configured role under a tailored operational prompt (see `patron-anima-prompt.md`) that encodes the engine's mode discipline — one option per decision, principle-structural confidence calibration (`high`/`med`/`low`-confirm), narrow abstention reserved for irresolvable principle conflict or broken decision frame, and an out-of-lane prohibition on codebase audit work. When unset, empty, or whitespace-only, `astrolabe.reader-analyst` selects the `sage-primer-solo` role (the primer carries the razor itself) and the `patron-anima` engine no-ops; `decision-review` behaves exactly as it did before the engine existed. |
99
99
 
100
100
  ## Support Kit
101
101
 
@@ -117,10 +117,11 @@ The Astrolabe declares one book in Stacks:
117
117
 
118
118
  | Role | Qualified Name | Permissions | Strict | Used In |
119
119
  |---|---|---|---|---|
120
- | `sage-reader` | `astrolabe.sage-reader` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | three-phase reader stage |
121
- | `sage-analyst` | `astrolabe.sage-analyst` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | three-phase analyst stage |
122
- | `sage-writer` | `astrolabe.sage-writer` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | spec-writer stage (both templates) |
123
- | `sage-reading-analyst` | `astrolabe.sage-reading-analyst` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | two-phase reader-analyst stage |
120
+ | `sage-primer-reader` | `astrolabe.sage-primer-reader` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | three-phase reader stage |
121
+ | `sage-primer-scoping` | `astrolabe.sage-primer-scoping` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | three-phase scoping-primer stage (`analyst` slot id) |
122
+ | `sage-writer` | `astrolabe.sage-writer` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | spec-writer stage (all templates) |
123
+ | `sage-primer-solo` | `astrolabe.sage-primer-solo` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | `reader-analyst` slot in two-phase / plan-and-ship, when `astrolabe.patronRole` is unset — primer carries the razor itself |
124
+ | `sage-primer-attended` | `astrolabe.sage-primer-attended` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | `reader-analyst` slot in two-phase / plan-and-ship, when `astrolabe.patronRole` is non-empty — primer pre-fills every decision, patron-anima principle-checks them all |
124
125
 
125
126
  ### Engines (contributed to Fabricator)
126
127
 
@@ -128,8 +129,9 @@ The Astrolabe declares one book in Stacks:
128
129
  |---|---|
129
130
  | `astrolabe.plan-init` | Creates a PlanDoc from the brief writ; validates codex presence |
130
131
  | `astrolabe.inventory-check` | Validates that the reader produced a non-empty inventory |
131
- | `astrolabe.patron-anima` | Consults a configured Patron Anima to pre-fill decisions on behalf of the patron, under a tailored operational prompt that encodes the engine's mode discipline one option per decision, principle-structural confidence calibration, abstain-by-omission (decisions the anima cannot confidently resolve are absent from its emission, not emitted as low-confidence placeholders), and an explicit out-of-lane prohibition on codebase audit work. Reads the plan's reviewable decisions (those without `selected` already set), launches the configured `patronRole` via a single-pass anima session, parses a single structured emission, and applies each valid verdict to `Decision.selected` (plus records the full verdict — confirm / override / fill-in with selection, confidence, rationale — on `Decision.patron`). No-ops when `astrolabe.patronRole` is unset or empty, or when no reviewable decisions remain. Unparseable output, invalid verdicts, and abstained decisions are left unfilled — decision-review surfaces the remainder to the patron in the normal flow. |
132
- | `astrolabe.decision-review` | Two-pass engine: blocks for patron review, then reconciles answers. Decisions with `selected` already pre-set by the analyst or the patron anima are auto-accepted they are excluded from the InputRequestDoc, and if nothing remains reviewable the engine fast-paths to `writing` without opening the gate. |
132
+ | `astrolabe.reader-analyst` | Selects the primer role at engine-run time from live guild config: `sage-primer-attended` when `astrolabe.patronRole` is non-empty (every decision gets pre-filled so the downstream patron-anima principle-checks them all), `sage-primer-solo` otherwise (the primer carries the razor itself and only leaves razor-matched decisions unset for the patron). Mirrors the `anima-session` surface same givens (`prompt`, `cwd`, `writ`, `metadata`) minus the `role` given, which the engine chooses. Run-time selection (per writ, not per guild startup) means the patron can reconfigure `astrolabe.patronRole` mid-experiment and the next brief behaves according to the live config. |
133
+ | `astrolabe.patron-anima` | Consults a configured Patron Anima to principle-check every decision the primer produced, under a tailored operational prompt that encodes the engine's mode discipline — one option per decision, principle-structural confidence calibration (`high` = one principle fires cleanly; `med` = multiple principles conflict and the anima resolves; `low` = no principle speaks, confirm the primer), narrow abstention by omission reserved for *irresolvable principle conflict* and *broken decision frame* only, and an explicit out-of-lane prohibition on codebase audit work. Reads the plan's reviewable decisions (those without `selected` already set empty when the attended primer ran, non-empty when the solo primer surfaced razor matches), launches the configured `patronRole` via a single-pass anima session, parses a single structured emission, and applies each valid verdict to `Decision.selected` (plus records the full verdict — confirm / override / fill-in with selection, confidence, rationale — on `Decision.patron`). No-ops when `astrolabe.patronRole` is unset or empty, or when no reviewable decisions remain. Unparseable output, invalid verdicts, and abstained decisions are left unfilled — decision-review surfaces the remainder to the patron in the normal flow. |
134
+ | `astrolabe.decision-review` | Two-pass engine: blocks for patron review, then reconciles answers. Decisions with `selected` already pre-set by the primer or the patron anima are auto-accepted — they are excluded from the InputRequestDoc, and if nothing remains reviewable the engine fast-paths to `writing` without opening the gate. |
133
135
  | `astrolabe.plan-finalize` | Transitions the plan to `completed` and yields the written `spec` downstream. Does not post any writ. Used inside `plan-and-ship` to hand the spec off to the implement engine on the same brief rig. |
134
136
  | `astrolabe.spec-publish` | Publishes the generated specification as a new mandate writ. Used only by the legacy two-phase / three-phase rigs that split planning from implementation across two writs. |
135
137
 
@@ -145,7 +147,7 @@ The `resolutionEngine` is `seal` for `plan-and-ship` (brief completes when imple
145
147
 
146
148
  #### Rig Template Selection
147
149
 
148
- The `brief` writ type maps to `astrolabe.plan-and-ship` by default. This single combined rig carries the brief through planning and implementation on one writ — the `plan-finalize` engine hands the written spec directly to the downstream `implement` engine via `${yields.plan-finalize.spec}`, and no separate mandate writ is posted. The optional `patron-anima` stage between `inventory-check` and `decision-review` consults the configured `patronRole` under a tailored operational prompt (see `patron-anima-prompt.md` packaged with the plugin) whenever `astrolabe.patronRole` is set, pre-filling the decisions the anima can confidently resolve and letting decision-review fast-path past those items. Decisions the anima abstains on (or cannot cleanly resolve) are left unfilled and flow through to decision-review in the normal path. The brief reaches `completed` only when the final seal engine completes.
150
+ The `brief` writ type maps to `astrolabe.plan-and-ship` by default. This single combined rig carries the brief through planning and implementation on one writ — the `plan-finalize` engine hands the written spec directly to the downstream `implement` engine via `${yields.plan-finalize.spec}`, and no separate mandate writ is posted. The `reader-analyst` slot is driven by the astrolabe-owned `astrolabe.reader-analyst` engine, which selects between the `sage-primer-attended` and `sage-primer-solo` roles at engine-run time from live guild config. The optional `patron-anima` stage between `inventory-check` and `decision-review` consults the configured `patronRole` under a tailored operational prompt (see `patron-anima-prompt.md` packaged with the plugin) whenever `astrolabe.patronRole` is set. The anima principle-checks every decision the primer produced and confirms (including first-class `low`-confidence confirms when no principle speaks), overrides, fills in, or abstains. Abstention is narrow — reserved for *irresolvable principle conflict* and *broken decision frame* only. Abstained decisions are left unfilled and flow through to decision-review in the normal path. The brief reaches `completed` only when the final seal engine completes.
149
151
 
150
152
  To use a legacy planning-only template (which posts a separate mandate writ and ends the brief's lifecycle at spec-writer), add a rig template mapping override in `guild.json`:
151
153
 
@@ -159,7 +161,7 @@ To use a legacy planning-only template (which posts a separate mandate writ and
159
161
  }
160
162
  ```
161
163
 
162
- Substitute `astrolabe.three-phase-planning` for the split reader / analyst variant.
164
+ Substitute `astrolabe.three-phase-planning` for the split reader / scoping-primer variant (the `analyst` slot id is preserved for backward compatibility; the role it summons is `sage-primer-scoping`).
163
165
 
164
166
  ### Tools
165
167
 
@@ -170,7 +172,7 @@ Substitute `astrolabe.three-phase-planning` for the split reader / analyst varia
170
172
  | `inventory-write` | `astrolabe:write` | Write or replace the codebase inventory |
171
173
  | `scope-write` | `astrolabe:write` | Write or replace the scope items array |
172
174
  | `decisions-write` | `astrolabe:write` | Write or replace the decisions array |
173
- | `observations-write` | `astrolabe:write` | Write or replace analyst observations |
175
+ | `observations-write` | `astrolabe:write` | Write or replace primer observations |
174
176
  | `spec-write` | `astrolabe:write` | Write or replace the generated specification |
175
177
 
176
178
  Write tools only update their artifact field plus `updatedAt`. Status transitions are the exclusive responsibility of the clockwork engines.
@@ -10,6 +10,16 @@
10
10
  import type { Plugin } from '@shardworks/nexus-core';
11
11
  import type { AstrolabeConfig } from './types.ts';
12
12
  declare function resolveAstrolabeConfig(): AstrolabeConfig;
13
+ /**
14
+ * Resolves the configured Patron Anima role name to a trimmed string, or
15
+ * returns the empty string when unset / whitespace-only. Callers branch on
16
+ * `=== ''` to distinguish the "no patron configured" case from the normal
17
+ * one. Shared by `astrolabe.patron-anima` (skip-when-unset no-op) and
18
+ * `astrolabe.reader-analyst` (selects between the solo and attended primer
19
+ * variants at engine-run time). Keeping the trim-and-check logic in one
20
+ * place avoids silent drift between the two call sites.
21
+ */
22
+ declare function resolvePatronRole(): string;
13
23
  export declare function createAstrolabe(): Plugin;
14
- export { resolveAstrolabeConfig };
24
+ export { resolveAstrolabeConfig, resolvePatronRole };
15
25
  //# sourceMappingURL=astrolabe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"astrolabe.d.ts","sourceRoot":"","sources":["../src/astrolabe.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,wBAAwB,CAAC;AAQrE,OAAO,KAAK,EAEV,eAAe,EAGhB,MAAM,YAAY,CAAC;AAiBpB,iBAAS,sBAAsB,IAAI,eAAe,CAEjD;AAID,wBAAgB,eAAe,IAAI,MAAM,CAoRxC;AAGD,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"astrolabe.d.ts","sourceRoot":"","sources":["../src/astrolabe.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,wBAAwB,CAAC;AAQrE,OAAO,KAAK,EAEV,eAAe,EAGhB,MAAM,YAAY,CAAC;AAkBpB,iBAAS,sBAAsB,IAAI,eAAe,CAEjD;AAED;;;;;;;;GAQG;AACH,iBAAS,iBAAiB,IAAI,MAAM,CAGnC;AAID,wBAAgB,eAAe,IAAI,MAAM,CA2RxC;AAGD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC"}
package/dist/astrolabe.js CHANGED
@@ -10,7 +10,7 @@
10
10
  import { guild } from '@shardworks/nexus-core';
11
11
  import { tool } from '@shardworks/tools-apparatus';
12
12
  import { z } from 'zod';
13
- import { createPlanInitEngine, createInventoryCheckEngine, createPatronAnimaEngine, createDecisionReviewEngine, createSpecPublishEngine, createPlanFinalizeEngine, } from "./engines/index.js";
13
+ import { createPlanInitEngine, createInventoryCheckEngine, createPatronAnimaEngine, createDecisionReviewEngine, createSpecPublishEngine, createPlanFinalizeEngine, createReaderAnalystEngine, } from "./engines/index.js";
14
14
  import { twoPhaseRigTemplate } from "./two-phase-planning.js";
15
15
  import { threePhaseRigTemplate } from "./three-phase-planning.js";
16
16
  import { planAndShipRigTemplate } from "./plan-and-ship.js";
@@ -18,6 +18,19 @@ import { planAndShipRigTemplate } from "./plan-and-ship.js";
18
18
  function resolveAstrolabeConfig() {
19
19
  return guild().guildConfig().astrolabe ?? {};
20
20
  }
21
+ /**
22
+ * Resolves the configured Patron Anima role name to a trimmed string, or
23
+ * returns the empty string when unset / whitespace-only. Callers branch on
24
+ * `=== ''` to distinguish the "no patron configured" case from the normal
25
+ * one. Shared by `astrolabe.patron-anima` (skip-when-unset no-op) and
26
+ * `astrolabe.reader-analyst` (selects between the solo and attended primer
27
+ * variants at engine-run time). Keeping the trim-and-check logic in one
28
+ * place avoids silent drift between the two call sites.
29
+ */
30
+ function resolvePatronRole() {
31
+ const config = resolveAstrolabeConfig();
32
+ return typeof config.patronRole === 'string' ? config.patronRole.trim() : '';
33
+ }
21
34
  // ── Factory ──────────────────────────────────────────────────────────
22
35
  export function createAstrolabe() {
23
36
  let plansBook;
@@ -28,6 +41,7 @@ export function createAstrolabe() {
28
41
  const decisionReviewEngine = createDecisionReviewEngine(() => plansBook);
29
42
  const specPublishEngine = createSpecPublishEngine(() => plansBook);
30
43
  const planFinalizeEngine = createPlanFinalizeEngine(() => plansBook);
44
+ const readerAnalystEngine = createReaderAnalystEngine();
31
45
  // ── API ────────────────────────────────────────────────────────
32
46
  const api = {
33
47
  async show(planId) {
@@ -165,7 +179,7 @@ export function createAstrolabe() {
165
179
  });
166
180
  const observationsWriteTool = tool({
167
181
  name: 'observations-write',
168
- description: 'Write analyst observations for a plan',
182
+ description: 'Write primer observations for a plan',
169
183
  instructions: 'Writes or replaces the observations field. The observations should be a markdown ' +
170
184
  'document noting refactoring opportunities, risks, and conventions.',
171
185
  params: {
@@ -205,25 +219,30 @@ export function createAstrolabe() {
205
219
  { name: 'piece', description: 'An atomic task piece within a mandate, executed sequentially' },
206
220
  ],
207
221
  roles: {
208
- 'sage-reader': {
222
+ 'sage-primer-reader': {
209
223
  permissions: ['astrolabe:read', 'astrolabe:write', 'clerk:read', 'ratchet:read'],
210
224
  strict: true,
211
- instructionsFile: 'sage-reader.md',
225
+ instructionsFile: 'sage-primer-reader.md',
212
226
  },
213
- 'sage-analyst': {
227
+ 'sage-primer-scoping': {
214
228
  permissions: ['astrolabe:read', 'astrolabe:write', 'clerk:read', 'ratchet:read'],
215
229
  strict: true,
216
- instructionsFile: 'sage-analyst.md',
230
+ instructionsFile: 'sage-primer-scoping.md',
217
231
  },
218
232
  'sage-writer': {
219
233
  permissions: ['astrolabe:read', 'astrolabe:write', 'clerk:read', 'ratchet:read'],
220
234
  strict: true,
221
235
  instructionsFile: 'sage-writer.md',
222
236
  },
223
- 'sage-reading-analyst': {
237
+ 'sage-primer-solo': {
238
+ permissions: ['astrolabe:read', 'astrolabe:write', 'clerk:read', 'ratchet:read'],
239
+ strict: true,
240
+ instructionsFile: 'sage-primer-solo.md',
241
+ },
242
+ 'sage-primer-attended': {
224
243
  permissions: ['astrolabe:read', 'astrolabe:write', 'clerk:read', 'ratchet:read'],
225
244
  strict: true,
226
- instructionsFile: 'sage-reading-analyst.md',
245
+ instructionsFile: 'sage-primer-attended.md',
227
246
  },
228
247
  },
229
248
  engines: {
@@ -233,6 +252,7 @@ export function createAstrolabe() {
233
252
  'astrolabe.decision-review': decisionReviewEngine,
234
253
  'astrolabe.spec-publish': specPublishEngine,
235
254
  'astrolabe.plan-finalize': planFinalizeEngine,
255
+ 'astrolabe.reader-analyst': readerAnalystEngine,
236
256
  },
237
257
  rigTemplates: {
238
258
  'two-phase-planning': twoPhaseRigTemplate,
@@ -263,6 +283,6 @@ export function createAstrolabe() {
263
283
  },
264
284
  };
265
285
  }
266
- // Export resolveAstrolabeConfig for external use (lazy config access)
267
- export { resolveAstrolabeConfig };
286
+ // Export resolveAstrolabeConfig / resolvePatronRole for external use (lazy config access)
287
+ export { resolveAstrolabeConfig, resolvePatronRole };
268
288
  //# sourceMappingURL=astrolabe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"astrolabe.js","sourceRoot":"","sources":["../src/astrolabe.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAInD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,wEAAwE;AAExE,SAAS,sBAAsB;IAC7B,OAAO,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC,SAAS,IAAI,EAAE,CAAC;AAC/C,CAAC;AAED,wEAAwE;AAExE,MAAM,UAAU,eAAe;IAC7B,IAAI,SAAwB,CAAC;IAE7B,kEAAkE;IAElE,MAAM,cAAc,GAAG,oBAAoB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAC7D,MAAM,oBAAoB,GAAG,0BAA0B,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACzE,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACnE,MAAM,oBAAoB,GAAG,0BAA0B,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACzE,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,GAAG,EAAE,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;wBACZ,gBAAgB,EAAE,yBAAyB;qBAC5C;iBAC0C;gBAE7C,OAAO,EAAE;oBACP,qBAAqB,EAAE,cAAc;oBACrC,2BAA2B,EAAE,oBAAoB;oBACjD,wBAAwB,EAAE,iBAAiB;oBAC3C,2BAA2B,EAAE,oBAAoB;oBACjD,wBAAwB,EAAE,iBAAiB;oBAC3C,yBAAyB,EAAE,kBAAkB;oBAC7C,0BAA0B,EAAE,mBAAmB;iBAChD;gBAED,YAAY,EAAE;oBACZ,oBAAoB,EAAE,mBAAmB;oBACzC,sBAAsB,EAAE,qBAAqB;oBAC7C,eAAe,EAAE,sBAAsB;iBACxC;gBAED,mBAAmB,EAAE;oBACnB,KAAK,EAAE,yBAAyB;iBACjC;gBAED,KAAK,EAAE;oBACL,YAAY;oBACZ,YAAY;oBACZ,kBAAkB;oBAClB,cAAc;oBACd,kBAAkB;oBAClB,qBAAqB;oBACrB,aAAa;iBACd;gBAED,KAAK,EAAE;oBACL,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,iBAAiB,EAAE;iBAChE;aACF;YAED,QAAQ,EAAE,GAAG;YAEb,KAAK,CAAC,IAAoB;gBACxB,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC,SAAS,CAAY,QAAQ,CAAC,CAAC;gBACtD,SAAS,GAAG,MAAM,CAAC,IAAI,CAAU,WAAW,EAAE,OAAO,CAAC,CAAC;YACzD,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,0FAA0F;AAC1F,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC"}
@@ -69,13 +69,13 @@ export function createDecisionReviewEngine(getPlansBook) {
69
69
  if (plan.status === 'analyzing') {
70
70
  const decisions = plan.decisions ?? [];
71
71
  const scopeItems = plan.scope ?? [];
72
- // Reviewable decisions are those the analyst left for the patron by
73
- // leaving `selected` unset. Pre-decided decisions (where the analyst
72
+ // Reviewable decisions are those the primer left for the patron by
73
+ // leaving `selected` unset. Pre-decided decisions (where the primer
74
74
  // already pre-filled `selected`) are auto-accepted — they skip the
75
75
  // InputRequestDoc entirely and flow through reconcile unchanged.
76
76
  const reviewableDecisions = decisions.filter(d => d.selected === undefined);
77
77
  // Fast-path: nothing is reviewable. Scope items are implicitly
78
- // auto-accepted in that case — the analyst has settled everything.
78
+ // auto-accepted in that case — the primer has settled everything.
79
79
  if (reviewableDecisions.length === 0) {
80
80
  await book.patch(planId, {
81
81
  status: 'writing',
@@ -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,EAAE,CAAC;IAChE,CAAC;IACD,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAC5B,IAAI,SAAS;QAAE,OAAO,6BAA6B,SAAS,EAAE,CAAC;IAC/D,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,oBAAoB,CAAC,SAAqB,EAAE,KAAkB;IACrE,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,EAAE,KAAK,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;YACvD,IAAI,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAC5B,KAAK,CAAC,IAA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AAG,EAAE,CACrC,CAAC;gBACJ,CAAC;gBAED,MAAM,eAAe,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"}
@@ -4,4 +4,5 @@ export { createPatronAnimaEngine } from './patron-anima.ts';
4
4
  export { createDecisionReviewEngine } from './decision-review.ts';
5
5
  export { createSpecPublishEngine } from './spec-publish.ts';
6
6
  export { createPlanFinalizeEngine } from './plan-finalize.ts';
7
+ export { createReaderAnalystEngine, selectPrimerRole, PRIMER_ATTENDED_ROLE, PRIMER_SOLO_ROLE, } from './reader-analyst.ts';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engines/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engines/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
@@ -4,4 +4,5 @@ export { createPatronAnimaEngine } from "./patron-anima.js";
4
4
  export { createDecisionReviewEngine } from "./decision-review.js";
5
5
  export { createSpecPublishEngine } from "./spec-publish.js";
6
6
  export { createPlanFinalizeEngine } from "./plan-finalize.js";
7
+ export { createReaderAnalystEngine, selectPrimerRole, PRIMER_ATTENDED_ROLE, PRIMER_SOLO_ROLE, } from "./reader-analyst.js";
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/engines/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/engines/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Validates that the reader stage produced a non-empty inventory on the PlanDoc.
5
5
  * Throws if the plan is missing or has no inventory content.
6
6
  * On success, transitions the plan status from 'reading' to 'analyzing' so the
7
- * analyst stage and subsequent decision-review engine can proceed.
7
+ * scoping-primer stage and subsequent decision-review engine can proceed.
8
8
  */
9
9
  import type { EngineDesign } from '@shardworks/fabricator-apparatus';
10
10
  import type { Book } from '@shardworks/stacks-apparatus';
@@ -4,7 +4,7 @@
4
4
  * Validates that the reader stage produced a non-empty inventory on the PlanDoc.
5
5
  * Throws if the plan is missing or has no inventory content.
6
6
  * On success, transitions the plan status from 'reading' to 'analyzing' so the
7
- * analyst stage and subsequent decision-review engine can proceed.
7
+ * scoping-primer stage and subsequent decision-review engine can proceed.
8
8
  */
9
9
  export function createInventoryCheckEngine(getPlansBook) {
10
10
  return {
@@ -2,16 +2,18 @@
2
2
  * patron-anima clockwork engine.
3
3
  *
4
4
  * Between `inventory-check` and `decision-review`, consults a configured
5
- * Patron Anima to pre-fill decisions on behalf of the patron. Any decision
6
- * the anima can confidently resolve is set on the PlanDoc with its
7
- * `selected` value `decision-review` then auto-skips it via the existing
8
- * "analyst pre-decides patron-input omitted" semantics.
5
+ * Patron Anima to principle-check every decision the primer produced. Any
6
+ * decision the anima confirms (including `low`-confidence confirms),
7
+ * overrides, or fills in is set on the PlanDoc with its `selection` value
8
+ * `decision-review` then auto-skips it via the existing
9
+ * "primer pre-decides → patron-input omitted" semantics. The narrow
10
+ * abstention cases flow through unfilled for the patron to answer.
9
11
  *
10
12
  * Operational discipline (the tailored work prompt):
11
13
  * The anima runs under a checked-in operational prompt — the static
12
14
  * portions live in `patron-anima-prompt.md` (packaged alongside the
13
15
  * plugin) and are loaded at startup; per-decision content (ids,
14
- * questions, options, analyst recommendations) is interpolated in this
16
+ * questions, options, primer recommendations) is interpolated in this
15
17
  * module at build time. The prompt encodes the engine's mode discipline,
16
18
  * which is structurally distinct from the anima's taste (which lives in
17
19
  * the role's system prompt):
@@ -20,18 +22,25 @@
20
22
  * option keys — no custom answers, no free-text, no multi-select.
21
23
  * - Principle-structural confidence. `high` = a single principle from
22
24
  * the role fires cleanly; `med` = multiple principles conflict and
23
- * the anima resolves the conflict; `low` = no principle speaks,
24
- * which is the abstain case.
25
- * - Abstain by omission. A decision that would resolve to `low` —
26
- * or that the anima cannot confidently resolve at all — is
27
- * **absent** from the emission array entirely. There is no
28
- * sentinel, no placeholder, no low-confidence confirm fallback.
29
- * The engine treats a missing verdict as "unfilled" and flows it
25
+ * the anima resolves the conflict; `low` = no principle speaks and
26
+ * the anima confirms the primer's recommendation. `low` is a
27
+ * first-class emission path, not a placeholder and not reserved for
28
+ * abstention principle-absence has the concrete meaning "no
29
+ * principled basis to differ; confirm the primer."
30
+ * - Narrow abstention by omission. The anima leaves a decision out of
31
+ * its emission array only in two cases: *irresolvable principle
32
+ * conflict* (multiple principles conflict and the anima cannot
33
+ * resolve without inventing a principle hierarchy the patron has
34
+ * not articulated) and *broken decision frame* (the question or
35
+ * options are incoherent as posed, so no valid emission would be
36
+ * faithful to the patron's intent). Every other case — including
37
+ * principle-absence — resolves to a first-class emission. The
38
+ * engine treats a missing verdict as "unfilled" and flows it
30
39
  * through to `decision-review` in the normal path.
31
40
  * - Out-of-lane prohibition. The draft worktree `cwd` passed to the
32
41
  * anima permits filesystem access, but the prompt explicitly
33
42
  * forbids file reads, grep, codebase audit, and second-guessing
34
- * the analyst's framing. The anima's entire input is the role's
43
+ * the primer's framing. The anima's entire input is the role's
35
44
  * principles plus the decisions listed in the prompt.
36
45
  *
37
46
  * Config:
@@ -55,10 +64,12 @@
55
64
  * - `id` — the decision id
56
65
  * - `verdict` — 'confirm' | 'override' | 'fill-in'
57
66
  * - `selection` — one of the decision's offered option keys
58
- * - `confidence` — 'high' | 'med' (`low` means abstain → omit)
67
+ * - `confidence` — 'high' | 'med' | 'low' (`low` = confirm the
68
+ * primer on principle-absence; first-class emission)
59
69
  * - `rationale` — short free-text note (optional)
60
- * Decisions the anima abstains on are absent from the arraythe
61
- * engine and the parser treat absence as "unfilled, surface to patron."
70
+ * Decisions the anima abstains on the two narrow cases above are
71
+ * absent from the array; the engine and parser treat absence as
72
+ * "unfilled, surface to patron."
62
73
  *
63
74
  * Exhaustiveness:
64
75
  * Single pass. Any decision not carrying a well-formed verdict —
@@ -66,14 +77,6 @@
66
77
  * picked an unknown option, or the session failed entirely — is left
67
78
  * unfilled on the PlanDoc and flows to `decision-review` in the
68
79
  * normal flow. The engine does not retry.
69
- *
70
- * Defensive parser leniency:
71
- * The parser still accepts `confidence: 'low'` as a valid value for
72
- * schema-stability reasons — if a stray low-confidence verdict reaches
73
- * the engine, it is applied rather than dropped. The operational
74
- * prompt instructs the anima to abstain rather than emit `low`, but
75
- * the schema and parser do not depend on that instruction being
76
- * followed. This is defensive leniency, not a supported emission path.
77
80
  */
78
81
  import type { EngineDesign } from '@shardworks/fabricator-apparatus';
79
82
  import type { Book } from '@shardworks/stacks-apparatus';
@@ -85,7 +88,7 @@ import type { Decision, PatronEmission, PlanDoc } from '../types.ts';
85
88
  * output contract, worked example) lives in `patron-anima-prompt.md` and is
86
89
  * loaded into `PROMPT_TEMPLATE` at module load. This function renders each
87
90
  * reviewable decision — question, optional context, options, optional
88
- * analyst recommendation / rationale — and substitutes the listing into
91
+ * primer recommendation / rationale — and substitutes the listing into
89
92
  * the template's `{{DECISIONS}}` placeholder.
90
93
  */
91
94
  export declare function buildPatronPrompt(decisions: Decision[]): string;
@@ -1 +1 @@
1
- {"version":3,"file":"patron-anima.d.ts","sourceRoot":"","sources":["../../src/engines/patron-anima.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAqC,MAAM,kCAAkC,CAAC;AACxG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAKzD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AA6BrE;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,CAmC/D;AAED,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAa9D;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EAAE,GACpB,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CA8E7B;AAID,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,YAAY,CA2GvF"}
1
+ {"version":3,"file":"patron-anima.d.ts","sourceRoot":"","sources":["../../src/engines/patron-anima.ts"],"names":[],"mapp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