@shardworks/astrolabe-apparatus 0.1.241 → 0.1.243
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 +32 -36
- package/dist/astrolabe.d.ts.map +1 -1
- package/dist/astrolabe.js +16 -10
- package/dist/astrolabe.js.map +1 -1
- package/dist/engines/index.d.ts +1 -1
- package/dist/engines/index.d.ts.map +1 -1
- package/dist/engines/index.js +1 -1
- package/dist/engines/index.js.map +1 -1
- package/dist/engines/observation-lift.d.ts +38 -0
- package/dist/engines/observation-lift.d.ts.map +1 -0
- package/dist/engines/observation-lift.js +79 -0
- package/dist/engines/observation-lift.js.map +1 -0
- package/dist/engines/plan-finalize.d.ts +6 -7
- package/dist/engines/plan-finalize.d.ts.map +1 -1
- package/dist/engines/plan-finalize.js +6 -7
- package/dist/engines/plan-finalize.js.map +1 -1
- package/dist/plan-and-ship.d.ts +9 -3
- package/dist/plan-and-ship.d.ts.map +1 -1
- package/dist/plan-and-ship.js +16 -4
- package/dist/plan-and-ship.js.map +1 -1
- package/dist/types.d.ts +37 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/pages/astrolabe/astrolabe.js +22 -1
- package/pages/astrolabe/astrolabe.test.js +123 -1
- package/sage-primer-attended.md +10 -1
- package/sage-primer-scoping.md +9 -2
- package/sage-primer-solo.md +10 -1
- package/sage-writer.md +3 -1
- package/dist/engines/spec-publish.d.ts +0 -23
- package/dist/engines/spec-publish.d.ts.map +0 -1
- package/dist/engines/spec-publish.js +0 -64
- package/dist/engines/spec-publish.js.map +0 -1
- package/dist/three-phase-planning.d.ts +0 -14
- package/dist/three-phase-planning.d.ts.map +0 -1
- package/dist/three-phase-planning.js +0 -90
- package/dist/three-phase-planning.js.map +0 -1
- package/dist/two-phase-planning.d.ts +0 -16
- package/dist/two-phase-planning.d.ts.map +0 -1
- package/dist/two-phase-planning.js +0 -79
- package/dist/two-phase-planning.js.map +0 -1
package/README.md
CHANGED
|
@@ -56,20 +56,31 @@ A `PlanDoc` is keyed by the brief writ ID and tracks the full planning lifecycle
|
|
|
56
56
|
|
|
57
57
|
```typescript
|
|
58
58
|
interface PlanDoc {
|
|
59
|
-
id: string;
|
|
60
|
-
codex: string;
|
|
61
|
-
status: PlanStatus;
|
|
62
|
-
inventory?: string;
|
|
63
|
-
observations?:
|
|
64
|
-
scope?: ScopeItem[];
|
|
65
|
-
decisions?: Decision[];
|
|
66
|
-
spec?: string;
|
|
67
|
-
generatedWritId?: string; // ID of the
|
|
59
|
+
id: string; // Brief writ ID
|
|
60
|
+
codex: string; // Target codex
|
|
61
|
+
status: PlanStatus; // 'reading' | 'analyzing' | 'reviewing' | 'writing' | 'completed' | 'failed'
|
|
62
|
+
inventory?: string; // Markdown: affected files, types, interfaces, patterns
|
|
63
|
+
observations?: Observation[]; // Atomic, commissionable concerns (see Observation below)
|
|
64
|
+
scope?: ScopeItem[]; // What's in and what's out
|
|
65
|
+
decisions?: Decision[]; // Architectural/design decisions with options
|
|
66
|
+
spec?: string; // The generated specification (implementation brief + task manifest)
|
|
67
|
+
generatedWritId?: string; // ID of a mandate produced by the retired spec-publish engine — may be present on historic plans; current rigs do not set this
|
|
68
68
|
createdAt: string;
|
|
69
69
|
updatedAt: string;
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
interface Observation {
|
|
73
|
+
/** Plandoc-local identifier assigned by the sage (convention: obs-1, obs-2, …). */
|
|
74
|
+
id: string;
|
|
75
|
+
/** One-line commission-title-style phrase (~10 words, no trailing punctuation). */
|
|
76
|
+
title: string;
|
|
77
|
+
/** Tactical markdown — file paths, symbols, preconditions, etc. */
|
|
78
|
+
body: string;
|
|
79
|
+
}
|
|
71
80
|
```
|
|
72
81
|
|
|
82
|
+
Each `Observation` names one concern — a refactoring opportunity, risk, convention drift, or bug — that the sage noticed but that sits outside the brief's scope. The `astrolabe.observation-lift` engine lifts each record into a draft child `brief` writ under the originating brief so a curator (human or automated) can promote it.
|
|
83
|
+
|
|
73
84
|
### `PlanFilters`
|
|
74
85
|
|
|
75
86
|
```typescript
|
|
@@ -117,11 +128,11 @@ The Astrolabe declares one book in Stacks:
|
|
|
117
128
|
|
|
118
129
|
| Role | Qualified Name | Permissions | Strict | Used In |
|
|
119
130
|
|---|---|---|---|---|
|
|
120
|
-
| `sage-primer-reader` | `astrolabe.sage-primer-reader` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` |
|
|
121
|
-
| `sage-primer-scoping` | `astrolabe.sage-primer-scoping` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` |
|
|
122
|
-
| `sage-writer` | `astrolabe.sage-writer` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | spec-writer stage
|
|
123
|
-
| `sage-primer-solo` | `astrolabe.sage-primer-solo` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | `reader-analyst` slot
|
|
124
|
-
| `sage-primer-attended` | `astrolabe.sage-primer-attended` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | `reader-analyst` slot
|
|
131
|
+
| `sage-primer-reader` | `astrolabe.sage-primer-reader` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | reserved — no current rig template summons this role |
|
|
132
|
+
| `sage-primer-scoping` | `astrolabe.sage-primer-scoping` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | reserved — no current rig template summons this role |
|
|
133
|
+
| `sage-writer` | `astrolabe.sage-writer` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | spec-writer stage |
|
|
134
|
+
| `sage-primer-solo` | `astrolabe.sage-primer-solo` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | `reader-analyst` slot, when `astrolabe.patronRole` is unset — primer carries the razor itself |
|
|
135
|
+
| `sage-primer-attended` | `astrolabe.sage-primer-attended` | `astrolabe:read`, `astrolabe:write`, `clerk:read`, `ratchet:read` | `true` | `reader-analyst` slot, when `astrolabe.patronRole` is non-empty — primer pre-fills every decision, patron-anima principle-checks them all |
|
|
125
136
|
|
|
126
137
|
### Engines (contributed to Fabricator)
|
|
127
138
|
|
|
@@ -133,35 +144,19 @@ The Astrolabe declares one book in Stacks:
|
|
|
133
144
|
| `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
145
|
| `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. |
|
|
135
146
|
| `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. |
|
|
136
|
-
| `astrolabe.
|
|
147
|
+
| `astrolabe.observation-lift` | Walks `plan.observations` after `plan-finalize` has transitioned the plan to `completed` and calls `clerk.post({ type: 'brief', title, body, codex, parentId, draft: true })` once per record. Each created writ enters `new` (draft) phase, invisible to the Spider until a curator publishes it. Silently no-ops when `observations` is empty, absent, or a legacy string; fails fast on the first `clerk.post` error. Does not mutate the plan — the parent-child relationship on the Clerk side is the sole audit trail. Wired unconditionally into the plan-and-ship rig template. |
|
|
137
148
|
|
|
138
149
|
### Rig Templates (contributed to Spider)
|
|
139
150
|
|
|
140
151
|
| Template | Mapped Writ Type | Engines |
|
|
141
152
|
|---|---|---|
|
|
142
|
-
| `astrolabe.plan-and-ship` | `brief` (default) | plan-init → draft → reader-analyst → inventory-check → patron-anima → decision-review → spec-writer → plan-finalize → implement → review → revise → seal |
|
|
143
|
-
| `astrolabe.two-phase-planning` | — (opt-in) | plan-init → draft → reader-analyst → inventory-check → decision-review → spec-writer → spec-publish → seal |
|
|
144
|
-
| `astrolabe.three-phase-planning` | — (opt-in) | plan-init → draft → reader → inventory-check → analyst → decision-review → spec-writer → spec-publish → seal |
|
|
153
|
+
| `astrolabe.plan-and-ship` | `brief` (default) | plan-init → draft → reader-analyst → inventory-check → patron-anima → decision-review → spec-writer → plan-finalize → observation-lift → implement → review → revise → seal |
|
|
145
154
|
|
|
146
|
-
The `resolutionEngine` is `seal`
|
|
155
|
+
The `resolutionEngine` is `seal` — the brief writ reaches `completed` only after the final seal engine completes.
|
|
147
156
|
|
|
148
157
|
#### Rig Template Selection
|
|
149
158
|
|
|
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.
|
|
151
|
-
|
|
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`:
|
|
153
|
-
|
|
154
|
-
```json
|
|
155
|
-
{
|
|
156
|
-
"spider": {
|
|
157
|
-
"rigTemplateMappings": {
|
|
158
|
-
"brief": "astrolabe.two-phase-planning"
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
```
|
|
163
|
-
|
|
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`).
|
|
159
|
+
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.
|
|
165
160
|
|
|
166
161
|
### Tools
|
|
167
162
|
|
|
@@ -172,7 +167,7 @@ Substitute `astrolabe.three-phase-planning` for the split reader / scoping-prime
|
|
|
172
167
|
| `inventory-write` | `astrolabe:write` | Write or replace the codebase inventory |
|
|
173
168
|
| `scope-write` | `astrolabe:write` | Write or replace the scope items array |
|
|
174
169
|
| `decisions-write` | `astrolabe:write` | Write or replace the decisions array |
|
|
175
|
-
| `observations-write` | `astrolabe:write` | Write or replace primer observations |
|
|
170
|
+
| `observations-write` | `astrolabe:write` | Write or replace primer observations (strict `Observation[]` array — `{ id, title, body }` records with non-empty strings; legacy prose-string payloads are rejected at zod validation) |
|
|
176
171
|
| `spec-write` | `astrolabe:write` | Write or replace the generated specification |
|
|
177
172
|
|
|
178
173
|
Write tools only update their artifact field plus `updatedAt`. Status transitions are the exclusive responsibility of the clockwork engines.
|
|
@@ -187,6 +182,7 @@ The Astrolabe page provides a list/detail dashboard for PlanDoc records:
|
|
|
187
182
|
|
|
188
183
|
- **List view** — filterable by status, paginated (20 per page), showing status badge, codex, brief writ title, plan ID, and creation date.
|
|
189
184
|
- **Detail view** — metadata card with plan ID, status, codex, cross-links to brief and mandate writs (linking to the Clerk writs page via `?writ=ID`), per-step AI cost breakdowns (input/output tokens and USD cost for each anima-session engine), and tabbed content sections for Inventory, Scope, Decisions, Observations, and Spec.
|
|
185
|
+
- **Observations tab** — renders the `Observation[]` array as a card-per-record list (id, title, markdown body). Card bodies flow through the same markdown renderer used by inventory and spec. An empty or absent array renders as an empty tab. A legacy prose-string payload renders as empty rather than corrupting the tab.
|
|
190
186
|
- **Deep linking** — supports `?plan=ID` query parameter to open directly to a plan's detail view.
|
|
191
187
|
|
|
192
|
-
Markdown fields (inventory,
|
|
188
|
+
Markdown fields (inventory, spec, and each observation body) are rendered client-side with a minimal renderer supporting headings, bold, italic, inline code, fenced code blocks, and lists. All content is HTML-escaped before rendering to prevent XSS.
|
package/dist/astrolabe.d.ts.map
CHANGED
|
@@ -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;
|
|
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;AAOrE,OAAO,KAAK,EAEV,eAAe,EAGhB,MAAM,YAAY,CAAC;AAgBpB,iBAAS,sBAAsB,IAAI,eAAe,CAEjD;AAED;;;;;;;;GAQG;AACH,iBAAS,iBAAiB,IAAI,MAAM,CAGnC;AAID,wBAAgB,eAAe,IAAI,MAAM,CAqSxC;AAGD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/astrolabe.js
CHANGED
|
@@ -10,9 +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,
|
|
14
|
-
import { twoPhaseRigTemplate } from "./two-phase-planning.js";
|
|
15
|
-
import { threePhaseRigTemplate } from "./three-phase-planning.js";
|
|
13
|
+
import { createPlanInitEngine, createInventoryCheckEngine, createPatronAnimaEngine, createDecisionReviewEngine, createPlanFinalizeEngine, createObservationLiftEngine, createReaderAnalystEngine, } from "./engines/index.js";
|
|
16
14
|
import { planAndShipRigTemplate } from "./plan-and-ship.js";
|
|
17
15
|
// ── Config resolver ──────────────────────────────────────────────────
|
|
18
16
|
function resolveAstrolabeConfig() {
|
|
@@ -39,8 +37,8 @@ export function createAstrolabe() {
|
|
|
39
37
|
const inventoryCheckEngine = createInventoryCheckEngine(() => plansBook);
|
|
40
38
|
const patronAnimaEngine = createPatronAnimaEngine(() => plansBook);
|
|
41
39
|
const decisionReviewEngine = createDecisionReviewEngine(() => plansBook);
|
|
42
|
-
const specPublishEngine = createSpecPublishEngine(() => plansBook);
|
|
43
40
|
const planFinalizeEngine = createPlanFinalizeEngine(() => plansBook);
|
|
41
|
+
const observationLiftEngine = createObservationLiftEngine(() => plansBook);
|
|
44
42
|
const readerAnalystEngine = createReaderAnalystEngine();
|
|
45
43
|
// ── API ────────────────────────────────────────────────────────
|
|
46
44
|
const api = {
|
|
@@ -180,11 +178,21 @@ export function createAstrolabe() {
|
|
|
180
178
|
const observationsWriteTool = tool({
|
|
181
179
|
name: 'observations-write',
|
|
182
180
|
description: 'Write primer observations for a plan',
|
|
183
|
-
instructions: 'Writes or replaces the observations field. The observations
|
|
184
|
-
'
|
|
181
|
+
instructions: 'Writes or replaces the observations field. The observations array carries one record ' +
|
|
182
|
+
'per atomic concern noticed during the planning pass. Each record has a plandoc-local ' +
|
|
183
|
+
'id (convention: obs-1, obs-2, ...), a one-line commission-title style title, and a ' +
|
|
184
|
+
'markdown body with tactical detail (file paths, symbols, preconditions). Downstream ' +
|
|
185
|
+
'the astrolabe.observation-lift engine creates one draft brief writ per record as a ' +
|
|
186
|
+
'child of the originating brief, ready for a curator to promote.',
|
|
185
187
|
params: {
|
|
186
188
|
planId: z.string().describe('Plan id'),
|
|
187
|
-
observations: z
|
|
189
|
+
observations: z
|
|
190
|
+
.array(z.object({
|
|
191
|
+
id: z.string().min(1),
|
|
192
|
+
title: z.string().min(1),
|
|
193
|
+
body: z.string().min(1),
|
|
194
|
+
}))
|
|
195
|
+
.describe('Observation records'),
|
|
188
196
|
},
|
|
189
197
|
permission: 'write',
|
|
190
198
|
handler: async ({ planId, observations }) => {
|
|
@@ -250,13 +258,11 @@ export function createAstrolabe() {
|
|
|
250
258
|
'astrolabe.inventory-check': inventoryCheckEngine,
|
|
251
259
|
'astrolabe.patron-anima': patronAnimaEngine,
|
|
252
260
|
'astrolabe.decision-review': decisionReviewEngine,
|
|
253
|
-
'astrolabe.spec-publish': specPublishEngine,
|
|
254
261
|
'astrolabe.plan-finalize': planFinalizeEngine,
|
|
262
|
+
'astrolabe.observation-lift': observationLiftEngine,
|
|
255
263
|
'astrolabe.reader-analyst': readerAnalystEngine,
|
|
256
264
|
},
|
|
257
265
|
rigTemplates: {
|
|
258
|
-
'two-phase-planning': twoPhaseRigTemplate,
|
|
259
|
-
'three-phase-planning': threePhaseRigTemplate,
|
|
260
266
|
'plan-and-ship': planAndShipRigTemplate,
|
|
261
267
|
},
|
|
262
268
|
rigTemplateMappings: {
|
package/dist/astrolabe.js.map
CHANGED
|
@@ -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;
|
|
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;AAGnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,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;;;;;;;;GAQG;AACH,SAAS,iBAAiB;IACxB,MAAM,MAAM,GAAG,sBAAsB,EAAE,CAAC;IACxC,OAAO,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/E,CAAC;AAED,wEAAwE;AAExE,MAAM,UAAU,eAAe;IAC7B,IAAI,SAAwB,CAAC;IAE7B,kEAAkE;IAElE,MAAM,cAAc,GAAG,oBAAoB,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an-init.ts';
|
|
|
2
2
|
export { createInventoryCheckEngine } from './inventory-check.ts';
|
|
3
3
|
export { createPatronAnimaEngine } from './patron-anima.ts';
|
|
4
4
|
export { createDecisionReviewEngine } from './decision-review.ts';
|
|
5
|
-
export { createSpecPublishEngine } from './spec-publish.ts';
|
|
6
5
|
export { createPlanFinalizeEngine } from './plan-finalize.ts';
|
|
6
|
+
export { createObservationLiftEngine } from './observation-lift.ts';
|
|
7
7
|
export { createReaderAnalystEngine, selectPrimerRole, PRIMER_ATTENDED_ROLE, PRIMER_SOLO_ROLE, } from './reader-analyst.ts';
|
|
8
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,
|
|
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,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
|
package/dist/engines/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { createPlanInitEngine } from "./plan-init.js";
|
|
|
2
2
|
export { createInventoryCheckEngine } from "./inventory-check.js";
|
|
3
3
|
export { createPatronAnimaEngine } from "./patron-anima.js";
|
|
4
4
|
export { createDecisionReviewEngine } from "./decision-review.js";
|
|
5
|
-
export { createSpecPublishEngine } from "./spec-publish.js";
|
|
6
5
|
export { createPlanFinalizeEngine } from "./plan-finalize.js";
|
|
6
|
+
export { createObservationLiftEngine } from "./observation-lift.js";
|
|
7
7
|
export { createReaderAnalystEngine, selectPrimerRole, PRIMER_ATTENDED_ROLE, PRIMER_SOLO_ROLE, } from "./reader-analyst.js";
|
|
8
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,
|
|
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,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* observation-lift clockwork engine.
|
|
3
|
+
*
|
|
4
|
+
* Walks the plan's `observations` array once it has reached its final
|
|
5
|
+
* state and creates one draft brief writ per record as a child of the
|
|
6
|
+
* originating brief. This turns the sage's "things we noticed but
|
|
7
|
+
* didn't action" output from an inert note into commissionable drafts
|
|
8
|
+
* visible in the same writ surfaces as any other brief — a downstream
|
|
9
|
+
* curator (human or automated) promotes each draft to `open` by hand
|
|
10
|
+
* or via writ-publish.
|
|
11
|
+
*
|
|
12
|
+
* Behavior:
|
|
13
|
+
* - Validates that the plan exists and its status is `completed`.
|
|
14
|
+
* (Placement inside the plan-and-ship rig guarantees this —
|
|
15
|
+
* observation-lift runs after plan-finalize, which transitions the
|
|
16
|
+
* plan to `completed`.)
|
|
17
|
+
* - Silently no-ops if `plan.observations` is not an array (legacy
|
|
18
|
+
* string-shaped plandocs) or is an empty array.
|
|
19
|
+
* - Otherwise, iterates the array in order and calls
|
|
20
|
+
* `clerk.post({ type: 'brief', title, body, codex, parentId, draft })`
|
|
21
|
+
* once per record. The brief writ must still be in a non-terminal
|
|
22
|
+
* phase at this point — the engine runs before seal, which is what
|
|
23
|
+
* finally transitions the brief to `completed`.
|
|
24
|
+
* - Fails fast on the first `clerk.post` error. Already-created
|
|
25
|
+
* drafts persist as `new`-status writs under the brief; they are
|
|
26
|
+
* invisible to the Spider until a curator publishes them.
|
|
27
|
+
* - Does not mutate the plandoc — the parentId relationship on the
|
|
28
|
+
* created writs is the sole audit trail.
|
|
29
|
+
*
|
|
30
|
+
* Yields:
|
|
31
|
+
* `{ writIds }` — the ids of the draft writs created, in the same
|
|
32
|
+
* order as the observation records. Empty when the engine no-ops.
|
|
33
|
+
*/
|
|
34
|
+
import type { EngineDesign } from '@shardworks/fabricator-apparatus';
|
|
35
|
+
import type { Book } from '@shardworks/stacks-apparatus';
|
|
36
|
+
import type { PlanDoc } from '../types.ts';
|
|
37
|
+
export declare function createObservationLiftEngine(getPlansBook: () => Book<PlanDoc>): EngineDesign;
|
|
38
|
+
//# sourceMappingURL=observation-lift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observation-lift.d.ts","sourceRoot":"","sources":["../../src/engines/observation-lift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAqC,MAAM,kCAAkC,CAAC;AACxG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,YAAY,CAuD3F"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* observation-lift clockwork engine.
|
|
3
|
+
*
|
|
4
|
+
* Walks the plan's `observations` array once it has reached its final
|
|
5
|
+
* state and creates one draft brief writ per record as a child of the
|
|
6
|
+
* originating brief. This turns the sage's "things we noticed but
|
|
7
|
+
* didn't action" output from an inert note into commissionable drafts
|
|
8
|
+
* visible in the same writ surfaces as any other brief — a downstream
|
|
9
|
+
* curator (human or automated) promotes each draft to `open` by hand
|
|
10
|
+
* or via writ-publish.
|
|
11
|
+
*
|
|
12
|
+
* Behavior:
|
|
13
|
+
* - Validates that the plan exists and its status is `completed`.
|
|
14
|
+
* (Placement inside the plan-and-ship rig guarantees this —
|
|
15
|
+
* observation-lift runs after plan-finalize, which transitions the
|
|
16
|
+
* plan to `completed`.)
|
|
17
|
+
* - Silently no-ops if `plan.observations` is not an array (legacy
|
|
18
|
+
* string-shaped plandocs) or is an empty array.
|
|
19
|
+
* - Otherwise, iterates the array in order and calls
|
|
20
|
+
* `clerk.post({ type: 'brief', title, body, codex, parentId, draft })`
|
|
21
|
+
* once per record. The brief writ must still be in a non-terminal
|
|
22
|
+
* phase at this point — the engine runs before seal, which is what
|
|
23
|
+
* finally transitions the brief to `completed`.
|
|
24
|
+
* - Fails fast on the first `clerk.post` error. Already-created
|
|
25
|
+
* drafts persist as `new`-status writs under the brief; they are
|
|
26
|
+
* invisible to the Spider until a curator publishes them.
|
|
27
|
+
* - Does not mutate the plandoc — the parentId relationship on the
|
|
28
|
+
* created writs is the sole audit trail.
|
|
29
|
+
*
|
|
30
|
+
* Yields:
|
|
31
|
+
* `{ writIds }` — the ids of the draft writs created, in the same
|
|
32
|
+
* order as the observation records. Empty when the engine no-ops.
|
|
33
|
+
*/
|
|
34
|
+
import { guild } from '@shardworks/nexus-core';
|
|
35
|
+
export function createObservationLiftEngine(getPlansBook) {
|
|
36
|
+
return {
|
|
37
|
+
id: 'astrolabe.observation-lift',
|
|
38
|
+
async run(givens, _context) {
|
|
39
|
+
const planId = givens.planId;
|
|
40
|
+
const book = getPlansBook();
|
|
41
|
+
const plan = await book.get(planId);
|
|
42
|
+
if (!plan) {
|
|
43
|
+
throw new Error(`Plan "${planId}" not found.`);
|
|
44
|
+
}
|
|
45
|
+
if (plan.status !== 'completed') {
|
|
46
|
+
throw new Error(`observation-lift: expected plan status "completed" but got "${plan.status}" for plan "${planId}".`);
|
|
47
|
+
}
|
|
48
|
+
const observations = plan.observations;
|
|
49
|
+
if (!Array.isArray(observations) || observations.length === 0) {
|
|
50
|
+
// Legacy string-shaped plandocs or empty arrays: no-op.
|
|
51
|
+
return {
|
|
52
|
+
status: 'completed',
|
|
53
|
+
yields: { writIds: [] },
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const clerk = guild().apparatus('clerk');
|
|
57
|
+
const writIds = [];
|
|
58
|
+
for (const observation of observations) {
|
|
59
|
+
// Fail-fast: any clerk.post error propagates immediately.
|
|
60
|
+
// Previously-created drafts persist (invisible to Spider) and
|
|
61
|
+
// a curator can reconcile manually — rollback is not attempted.
|
|
62
|
+
const writ = await clerk.post({
|
|
63
|
+
type: 'brief',
|
|
64
|
+
title: observation.title,
|
|
65
|
+
body: observation.body,
|
|
66
|
+
codex: plan.codex,
|
|
67
|
+
parentId: planId,
|
|
68
|
+
draft: true,
|
|
69
|
+
});
|
|
70
|
+
writIds.push(writ.id);
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
status: 'completed',
|
|
74
|
+
yields: { writIds },
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=observation-lift.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observation-lift.js","sourceRoot":"","sources":["../../src/engines/observation-lift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAM/C,MAAM,UAAU,2BAA2B,CAAC,YAAiC;IAC3E,OAAO;QACL,EAAE,EAAE,4BAA4B;QAEhC,KAAK,CAAC,GAAG,CACP,MAA+B,EAC/B,QAA0B;YAE1B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAgB,CAAC;YACvC,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;YAE5B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CAAC,SAAS,MAAM,cAAc,CAAC,CAAC;YACjD,CAAC;YAED,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CACb,+DAA+D,IAAI,CAAC,MAAM,eAAe,MAAM,IAAI,CACpG,CAAC;YACJ,CAAC;YAED,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACvC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC9D,wDAAwD;gBACxD,OAAO;oBACL,MAAM,EAAE,WAAW;oBACnB,MAAM,EAAE,EAAE,OAAO,EAAE,EAAc,EAAE;iBACpC,CAAC;YACJ,CAAC;YAED,MAAM,KAAK,GAAG,KAAK,EAAE,CAAC,SAAS,CAAW,OAAO,CAAC,CAAC;YACnD,MAAM,OAAO,GAAa,EAAE,CAAC;YAE7B,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;gBACvC,0DAA0D;gBAC1D,8DAA8D;gBAC9D,gEAAgE;gBAChE,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC;oBAC5B,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,WAAW,CAAC,KAAK;oBACxB,IAAI,EAAE,WAAW,CAAC,IAAI;oBACtB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,QAAQ,EAAE,MAAM;oBAChB,KAAK,EAAE,IAAI;iBACZ,CAAC,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACxB,CAAC;YAED,OAAO;gBACL,MAAM,EAAE,WAAW;gBACnB,MAAM,EAAE,EAAE,OAAO,EAAE;aACpB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* plan-finalize clockwork engine.
|
|
3
3
|
*
|
|
4
|
-
* Planning-phase terminator for the combined plan-and-ship rig.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `writing` to `completed`.
|
|
4
|
+
* Planning-phase terminator for the combined plan-and-ship rig. Does NOT
|
|
5
|
+
* post a mandate writ and does NOT create any clerk links. It merely
|
|
6
|
+
* validates that the spec-writer stage produced a spec, yields the spec
|
|
7
|
+
* verbatim for downstream engines (specifically the `implement` engine,
|
|
8
|
+
* whose `prompt` given is wired to `${yields.plan-finalize.spec}`), and
|
|
9
|
+
* transitions the plan's status from `writing` to `completed`.
|
|
11
10
|
*
|
|
12
11
|
* Preconditions:
|
|
13
12
|
* - plan.status must be 'writing'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-finalize.d.ts","sourceRoot":"","sources":["../../src/engines/plan-finalize.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plan-finalize.d.ts","sourceRoot":"","sources":["../../src/engines/plan-finalize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAqC,MAAM,kCAAkC,CAAC;AACxG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,YAAY,CA+CxF"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* plan-finalize clockwork engine.
|
|
3
3
|
*
|
|
4
|
-
* Planning-phase terminator for the combined plan-and-ship rig.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `writing` to `completed`.
|
|
4
|
+
* Planning-phase terminator for the combined plan-and-ship rig. Does NOT
|
|
5
|
+
* post a mandate writ and does NOT create any clerk links. It merely
|
|
6
|
+
* validates that the spec-writer stage produced a spec, yields the spec
|
|
7
|
+
* verbatim for downstream engines (specifically the `implement` engine,
|
|
8
|
+
* whose `prompt` given is wired to `${yields.plan-finalize.spec}`), and
|
|
9
|
+
* transitions the plan's status from `writing` to `completed`.
|
|
11
10
|
*
|
|
12
11
|
* Preconditions:
|
|
13
12
|
* - plan.status must be 'writing'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-finalize.js","sourceRoot":"","sources":["../../src/engines/plan-finalize.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plan-finalize.js","sourceRoot":"","sources":["../../src/engines/plan-finalize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,MAAM,UAAU,wBAAwB,CAAC,YAAiC;IACxE,OAAO;QACL,EAAE,EAAE,yBAAyB;QAE7B,KAAK,CAAC,GAAG,CACP,MAA+B,EAC/B,QAA0B;YAE1B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAgB,CAAC;YACvC,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;YAE5B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CAAC,SAAS,MAAM,cAAc,CAAC,CAAC;YACjD,CAAC;YAED,kBAAkB;YAClB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC9B,MAAM,IAAI,KAAK,CACb,0DAA0D,IAAI,CAAC,MAAM,eAAe,MAAM,IAAI,CAC/F,CAAC;YACJ,CAAC;YAED,uBAAuB;YACvB,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC5D,MAAM,IAAI,KAAK,CACb,SAAS,MAAM,2DAA2D,CAC3E,CAAC;YACJ,CAAC;YAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YAEvB,qEAAqE;YACrE,qEAAqE;YACrE,mEAAmE;YACnE,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YACrC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACvB,MAAM,EAAE,WAAW;gBACnB,SAAS,EAAE,GAAG;aACf,CAAC,CAAC;YAEH,OAAO;gBACL,MAAM,EAAE,WAAW;gBACnB,MAAM,EAAE,EAAE,IAAI,EAAE;aACjB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/plan-and-ship.d.ts
CHANGED
|
@@ -10,7 +10,14 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Stages: plan-init → draft → reader-analyst → inventory-check →
|
|
12
12
|
* patron-anima → decision-review → spec-writer → plan-finalize →
|
|
13
|
-
* implement → review → revise → seal.
|
|
13
|
+
* observation-lift → implement → review → revise → seal.
|
|
14
|
+
*
|
|
15
|
+
* The `observation-lift` engine runs after `plan-finalize` has transitioned
|
|
16
|
+
* the plan to `completed` but while the brief writ itself is still `open`.
|
|
17
|
+
* It lifts each record in `plan.observations` into a draft child writ under
|
|
18
|
+
* the brief, so a curator (human or overseer) can promote it later. The
|
|
19
|
+
* engine internally no-ops on empty or legacy-string observations, so it is
|
|
20
|
+
* wired unconditionally (no `when:` guard).
|
|
14
21
|
*
|
|
15
22
|
* The `reader-analyst` slot uses the astrolabe-owned
|
|
16
23
|
* `astrolabe.reader-analyst` engine, which selects the primer role at
|
|
@@ -32,8 +39,7 @@
|
|
|
32
39
|
* worktree. The `seal` engine runs without `abandon: true` — the seal is
|
|
33
40
|
* real. `implement.givens.prompt` is wired to `${yields.plan-finalize.spec}`
|
|
34
41
|
* so the implementing anima works from the planning spec instead of the
|
|
35
|
-
* brief's raw body
|
|
36
|
-
* not used here).
|
|
42
|
+
* brief's raw body. No mandate writ is posted mid-rig.
|
|
37
43
|
*/
|
|
38
44
|
import type { RigTemplate } from '@shardworks/spider-apparatus';
|
|
39
45
|
export declare const planAndShipRigTemplate: RigTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-and-ship.d.ts","sourceRoot":"","sources":["../src/plan-and-ship.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plan-and-ship.d.ts","sourceRoot":"","sources":["../src/plan-and-ship.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,eAAO,MAAM,sBAAsB,EAAE,WA4GpC,CAAC"}
|
package/dist/plan-and-ship.js
CHANGED
|
@@ -10,7 +10,14 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Stages: plan-init → draft → reader-analyst → inventory-check →
|
|
12
12
|
* patron-anima → decision-review → spec-writer → plan-finalize →
|
|
13
|
-
* implement → review → revise → seal.
|
|
13
|
+
* observation-lift → implement → review → revise → seal.
|
|
14
|
+
*
|
|
15
|
+
* The `observation-lift` engine runs after `plan-finalize` has transitioned
|
|
16
|
+
* the plan to `completed` but while the brief writ itself is still `open`.
|
|
17
|
+
* It lifts each record in `plan.observations` into a draft child writ under
|
|
18
|
+
* the brief, so a curator (human or overseer) can promote it later. The
|
|
19
|
+
* engine internally no-ops on empty or legacy-string observations, so it is
|
|
20
|
+
* wired unconditionally (no `when:` guard).
|
|
14
21
|
*
|
|
15
22
|
* The `reader-analyst` slot uses the astrolabe-owned
|
|
16
23
|
* `astrolabe.reader-analyst` engine, which selects the primer role at
|
|
@@ -32,8 +39,7 @@
|
|
|
32
39
|
* worktree. The `seal` engine runs without `abandon: true` — the seal is
|
|
33
40
|
* real. `implement.givens.prompt` is wired to `${yields.plan-finalize.spec}`
|
|
34
41
|
* so the implementing anima works from the planning spec instead of the
|
|
35
|
-
* brief's raw body
|
|
36
|
-
* not used here).
|
|
42
|
+
* brief's raw body. No mandate writ is posted mid-rig.
|
|
37
43
|
*/
|
|
38
44
|
export const planAndShipRigTemplate = {
|
|
39
45
|
engines: [
|
|
@@ -101,10 +107,16 @@ export const planAndShipRigTemplate = {
|
|
|
101
107
|
upstream: ['spec-writer'],
|
|
102
108
|
givens: { planId: '${yields.plan-init.planId}' },
|
|
103
109
|
},
|
|
110
|
+
{
|
|
111
|
+
id: 'observation-lift',
|
|
112
|
+
designId: 'astrolabe.observation-lift',
|
|
113
|
+
upstream: ['plan-finalize'],
|
|
114
|
+
givens: { planId: '${yields.plan-init.planId}' },
|
|
115
|
+
},
|
|
104
116
|
{
|
|
105
117
|
id: 'implement',
|
|
106
118
|
designId: 'implement',
|
|
107
|
-
upstream: ['
|
|
119
|
+
upstream: ['observation-lift'],
|
|
108
120
|
givens: {
|
|
109
121
|
writ: '${writ}',
|
|
110
122
|
role: '${vars.role}',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-and-ship.js","sourceRoot":"","sources":["../src/plan-and-ship.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plan-and-ship.js","sourceRoot":"","sources":["../src/plan-and-ship.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAIH,MAAM,CAAC,MAAM,sBAAsB,GAAgB;IACjD,OAAO,EAAE;QACP;YACE,EAAE,EAAE,WAAW;YACf,QAAQ,EAAE,qBAAqB;YAC/B,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC5B;QACD;YACE,EAAE,EAAE,OAAO;YACX,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE,CAAC,WAAW,CAAC;YACvB,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC5B;QACD;YACE,EAAE,EAAE,gBAAgB;YACpB,QAAQ,EAAE,0BAA0B;YACpC,QAAQ,EAAE,CAAC,OAAO,CAAC;YACnB,MAAM,EAAE;gBACN,MAAM,EAAE,qCAAqC;gBAC7C,GAAG,EAAE,sBAAsB;gBAC3B,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE;aACzC;SACF;QACD;YACE,EAAE,EAAE,iBAAiB;YACrB,QAAQ,EAAE,2BAA2B;YAC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8BAA8B;aACvC;SACF;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,QAAQ,EAAE,QAAQ;YAClB,QAAQ,EAAE,CAAC,WAAW,CAAC;YACvB,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,UAAU;gBAChB,YAAY,EAAE,sBAAsB;gBACpC,WAAW,EAAE,qBAAqB;aACnC;SACF;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,QAAQ,EAAE,QAAQ;YAClB,QAAQ,EAAE,CAAC,QAAQ,CAAC;YACpB,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE;SAClD;QACD;YACE,EAAE,EAAE,MAAM;YACV,QAAQ,EAAE,MAAM;YAChB,QAAQ,EAAE,CAAC,QAAQ,CAAC;YACpB,MAAM,EAAE,EAAE;SACX;KACF;IACD,gBAAgB,EAAE,MAAM;CACzB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -15,15 +15,27 @@ export interface PlanDoc {
|
|
|
15
15
|
status: PlanStatus;
|
|
16
16
|
/** Codebase inventory: affected files, types, interfaces, patterns. */
|
|
17
17
|
inventory?: string;
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Primer observations: refactoring opportunities, risks, conventions.
|
|
20
|
+
*
|
|
21
|
+
* Each entry is an atomic, commissionable concern — the
|
|
22
|
+
* `astrolabe.observation-lift` engine lifts each record into a
|
|
23
|
+
* draft child writ under the originating brief so a curator
|
|
24
|
+
* (human or automated) can promote it to open status.
|
|
25
|
+
*/
|
|
26
|
+
observations?: Observation[];
|
|
20
27
|
/** Scope items: what's in and what's out. */
|
|
21
28
|
scope?: ScopeItem[];
|
|
22
29
|
/** Architectural/design decisions with options. */
|
|
23
30
|
decisions?: Decision[];
|
|
24
31
|
/** The generated specification. */
|
|
25
32
|
spec?: string;
|
|
26
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Legacy: writ id of a mandate produced by the retired `spec-publish`
|
|
35
|
+
* engine. Current rig templates do not set this field — it survives
|
|
36
|
+
* solely so historic plandocs stored from before the retirement
|
|
37
|
+
* continue to deserialise and render correctly in the Astrolabe page.
|
|
38
|
+
*/
|
|
27
39
|
generatedWritId?: string;
|
|
28
40
|
createdAt: string;
|
|
29
41
|
updatedAt: string;
|
|
@@ -34,6 +46,28 @@ export interface ScopeItem {
|
|
|
34
46
|
rationale: string;
|
|
35
47
|
included: boolean;
|
|
36
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* A single observation recorded by a sage during the planning pass.
|
|
51
|
+
*
|
|
52
|
+
* Each observation names one concern — a refactoring opportunity,
|
|
53
|
+
* risk, convention drift, or bug — that the sage noticed but that
|
|
54
|
+
* is outside the brief's scope. Observations flow downstream into
|
|
55
|
+
* the `astrolabe.observation-lift` engine, which creates one draft
|
|
56
|
+
* brief writ per record as a child of the originating brief.
|
|
57
|
+
*
|
|
58
|
+
* Fields are deliberately minimal (D1 in the commission spec):
|
|
59
|
+
* - `id` — plandoc-local identifier assigned by the sage (e.g. `obs-1`).
|
|
60
|
+
* - `title` — one-line commission-title style (imperative or noun
|
|
61
|
+
* phrase, ~10 words, no trailing punctuation). Becomes the title of
|
|
62
|
+
* the lifted draft writ.
|
|
63
|
+
* - `body` — tactical detail (file paths, symbols, preconditions)
|
|
64
|
+
* rendered as markdown. Becomes the body of the lifted draft writ.
|
|
65
|
+
*/
|
|
66
|
+
export interface Observation {
|
|
67
|
+
id: string;
|
|
68
|
+
title: string;
|
|
69
|
+
body: string;
|
|
70
|
+
}
|
|
37
71
|
export interface Decision {
|
|
38
72
|
id: string;
|
|
39
73
|
scope: string[];
|