@cat-factory/agents 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/presets/docs-refresh/preset.d.ts +8 -7
- package/dist/presets/docs-refresh/preset.d.ts.map +1 -1
- package/dist/presets/docs-refresh/preset.js +75 -45
- package/dist/presets/docs-refresh/preset.js.map +1 -1
- package/dist/presets/tech-migration/phases.d.ts +26 -0
- package/dist/presets/tech-migration/phases.d.ts.map +1 -0
- package/dist/presets/tech-migration/phases.js +46 -0
- package/dist/presets/tech-migration/phases.js.map +1 -0
- package/dist/presets/tech-migration/prompt-additions.d.ts +31 -0
- package/dist/presets/tech-migration/prompt-additions.d.ts.map +1 -0
- package/dist/presets/tech-migration/prompt-additions.js +131 -0
- package/dist/presets/tech-migration/prompt-additions.js.map +1 -0
- package/package.json +1 -1
|
@@ -4,14 +4,15 @@ export declare const DOCS_REFRESH_PRESET_ID = "preset_docs_refresh";
|
|
|
4
4
|
/**
|
|
5
5
|
* The per-run gate-override array for a spawned documentation pipeline when human review is opted
|
|
6
6
|
* in — a FULL boolean array parallel to the pipeline's own `agentKinds` (the slice-2 gate-override
|
|
7
|
-
* contract: `ExecutionService.start` rejects a length mismatch).
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* gates — which are none for all three — so a decoration-less run stays unattended.
|
|
7
|
+
* contract: `ExecutionService.start` rejects a length mismatch). The gate is placed on the `merger`
|
|
8
|
+
* step so the human reviews the CI-green PR right BEFORE it merges — the same point for every doc
|
|
9
|
+
* pipeline, matching the form's "review each documentation change before it merges" promise (rather
|
|
10
|
+
* than gating a mid-pipeline `doc-reviewer` that still auto-merges afterwards).
|
|
12
11
|
*
|
|
13
|
-
* The
|
|
14
|
-
*
|
|
12
|
+
* The placement is DERIVED from the pipeline's `agentKinds` (the merge step's index), so it stays
|
|
13
|
+
* correct by construction if a pipeline's shape changes — never a hand-maintained array parallel to
|
|
14
|
+
* a pipeline this preset doesn't own. `undefined` (human review OFF, the default, or a pipeline with
|
|
15
|
+
* no merge step) leaves the pipeline's own gates — none for all three — so a run stays unattended.
|
|
15
16
|
*/
|
|
16
17
|
export declare function docsReviewGates(pipelineId: string, humanReview: boolean): boolean[] | undefined;
|
|
17
18
|
/** The docs-refresh preset registration bundle (descriptor + code hooks). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../../src/presets/docs-refresh/preset.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../../src/presets/docs-refresh/preset.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AAmCvE,uFAAuF;AACvF,eAAO,MAAM,sBAAsB,wBAAwB,CAAA;AA4N3D;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,SAAS,CAO/F;AAwKD,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,EAAE,4BAQjC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BUSINESS_DOCS_PIPELINE_ID, CODE_COMMENTS_PIPELINE_ID, DOCUMENT_QUICK_PIPELINE_ID, INITIATIVE_DOCS_PIPELINE_ID, joinRepoPath, registerInitiativePreset, } from '@cat-factory/kernel';
|
|
1
|
+
import { BUSINESS_DOCS_PIPELINE_ID, CODE_COMMENTS_PIPELINE_ID, DOCUMENT_QUICK_PIPELINE_ID, INITIATIVE_DOCS_PIPELINE_ID, joinRepoPath, registerInitiativePreset, seedPipelines, } from '@cat-factory/kernel';
|
|
2
2
|
import { DEFAULT_DOCUMENT_STYLE_FRAGMENT_IDS, styleFragments } from '@cat-factory/prompt-fragments';
|
|
3
|
+
import { moduleSlug } from '../../repo-ops/render.js';
|
|
3
4
|
import { detectDocsLayout } from './docs-detect.logic.js';
|
|
4
5
|
// ---------------------------------------------------------------------------
|
|
5
6
|
// The Documentation-refresh initiative preset (initiative-presets slice 8) — the pilot that
|
|
@@ -197,41 +198,60 @@ function strInput(inputs, key, fallback) {
|
|
|
197
198
|
const value = inputs[key];
|
|
198
199
|
return typeof value === 'string' && value.trim() ? value.trim() : fallback;
|
|
199
200
|
}
|
|
200
|
-
/**
|
|
201
|
+
/**
|
|
202
|
+
* A filesystem-safe, lower-kebab file slug for a derived `.md` target path — the package's shared
|
|
203
|
+
* {@link moduleSlug} (single slug implementation) capped to a filename-sane length. A degenerate
|
|
204
|
+
* (empty / all-punctuation) title falls back to `moduleSlug`'s `module`; `seedPlan` deduplicates
|
|
205
|
+
* the composed path anyway, so two such items never collide on one file.
|
|
206
|
+
*/
|
|
201
207
|
function fileSlug(title) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
+
return moduleSlug(title).slice(0, 60);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Ensure a derived `.md` path is unique within one plan: on collision, insert `-2`, `-3`, … before
|
|
212
|
+
* the extension (the {@link uniqueSlugId} pattern) and record it. Two items whose titles slug to the
|
|
213
|
+
* same name under the same directory would otherwise stamp the SAME `targetPath`, spawning two doc
|
|
214
|
+
* tasks that open competing PRs writing one file. Only derived paths are deduped (planner-authored
|
|
215
|
+
* placement rides the item description, not `targetPath`).
|
|
216
|
+
*/
|
|
217
|
+
function uniqueDocPath(path, taken) {
|
|
218
|
+
if (!taken.has(path)) {
|
|
219
|
+
taken.add(path);
|
|
220
|
+
return path;
|
|
221
|
+
}
|
|
222
|
+
const dot = path.lastIndexOf('.');
|
|
223
|
+
const base = dot === -1 ? path : path.slice(0, dot);
|
|
224
|
+
const ext = dot === -1 ? '' : path.slice(dot);
|
|
225
|
+
let n = 2;
|
|
226
|
+
let candidate = `${base}-${n}${ext}`;
|
|
227
|
+
while (taken.has(candidate))
|
|
228
|
+
candidate = `${base}-${++n}${ext}`;
|
|
229
|
+
taken.add(candidate);
|
|
230
|
+
return candidate;
|
|
208
231
|
}
|
|
209
232
|
/**
|
|
210
233
|
* The per-run gate-override array for a spawned documentation pipeline when human review is opted
|
|
211
234
|
* in — a FULL boolean array parallel to the pipeline's own `agentKinds` (the slice-2 gate-override
|
|
212
|
-
* contract: `ExecutionService.start` rejects a length mismatch).
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* gates — which are none for all three — so a decoration-less run stays unattended.
|
|
235
|
+
* contract: `ExecutionService.start` rejects a length mismatch). The gate is placed on the `merger`
|
|
236
|
+
* step so the human reviews the CI-green PR right BEFORE it merges — the same point for every doc
|
|
237
|
+
* pipeline, matching the form's "review each documentation change before it merges" promise (rather
|
|
238
|
+
* than gating a mid-pipeline `doc-reviewer` that still auto-merges afterwards).
|
|
217
239
|
*
|
|
218
|
-
* The
|
|
219
|
-
*
|
|
240
|
+
* The placement is DERIVED from the pipeline's `agentKinds` (the merge step's index), so it stays
|
|
241
|
+
* correct by construction if a pipeline's shape changes — never a hand-maintained array parallel to
|
|
242
|
+
* a pipeline this preset doesn't own. `undefined` (human review OFF, the default, or a pipeline with
|
|
243
|
+
* no merge step) leaves the pipeline's own gates — none for all three — so a run stays unattended.
|
|
220
244
|
*/
|
|
221
245
|
export function docsReviewGates(pipelineId, humanReview) {
|
|
222
246
|
if (!humanReview)
|
|
223
247
|
return undefined;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
return [false, false, false, true];
|
|
232
|
-
default:
|
|
233
|
-
return undefined;
|
|
234
|
-
}
|
|
248
|
+
const kinds = seedPipelines().find((p) => p.id === pipelineId)?.agentKinds;
|
|
249
|
+
if (!kinds)
|
|
250
|
+
return undefined;
|
|
251
|
+
const gateIdx = kinds.lastIndexOf('merger');
|
|
252
|
+
if (gateIdx === -1)
|
|
253
|
+
return undefined;
|
|
254
|
+
return kinds.map((_, i) => i === gateIdx);
|
|
235
255
|
}
|
|
236
256
|
const PHASE_DECORATIONS = {
|
|
237
257
|
// Foundations: a lean doc under the docs root (writing it creates/normalizes the placement dir).
|
|
@@ -241,12 +261,17 @@ const PHASE_DECORATIONS = {
|
|
|
241
261
|
docKind: 'reference',
|
|
242
262
|
placement: 'docs-root',
|
|
243
263
|
},
|
|
244
|
-
// README: a doc that lives BESIDE the code
|
|
264
|
+
// README: a doc that lives BESIDE the code, so its path is per-service and cannot be DERIVED
|
|
265
|
+
// here (seedPlan doesn't know each service's directory). The planner names the README's path in
|
|
266
|
+
// the item description (steered by the promptAdditions) and the doc-writer places it — the same
|
|
267
|
+
// description-placed shape as `comments`/`business-rules`. It CANNOT ride `taskTypeFields.targetPath`:
|
|
268
|
+
// the planner's structured output has no `spawn` field (see `INITIATIVE_PLANNER_SYSTEM_PROMPT`),
|
|
269
|
+
// so `coerceInitiativePlan` never carries one through to `seedPlan`.
|
|
245
270
|
[DOC_TYPE_README]: {
|
|
246
271
|
pipelineId: DOCUMENT_QUICK_PIPELINE_ID,
|
|
247
272
|
taskType: 'document',
|
|
248
273
|
docKind: 'reference',
|
|
249
|
-
placement: '
|
|
274
|
+
placement: 'none',
|
|
250
275
|
},
|
|
251
276
|
// Diagrams: a Mermaid `.md` a doc-writer produces, placed under the diagrams dir. `docKind: other`
|
|
252
277
|
// (there is no `diagrams` DocKind) — its template's required sections (Overview + Details) suit a
|
|
@@ -270,17 +295,17 @@ const PHASE_DECORATIONS = {
|
|
|
270
295
|
placement: 'none',
|
|
271
296
|
},
|
|
272
297
|
};
|
|
273
|
-
/**
|
|
298
|
+
/**
|
|
299
|
+
* The derived `.md` target path for an item (undefined when the placement is writer-placed). The
|
|
300
|
+
* composed path is deduplicated by {@link uniqueDocPath} in `seedPlan`, so a title collision never
|
|
301
|
+
* yields two items writing the same file.
|
|
302
|
+
*/
|
|
274
303
|
function targetPathFor(deco, item, inputs) {
|
|
275
304
|
switch (deco.placement) {
|
|
276
305
|
case 'docs-root':
|
|
277
306
|
return `${joinRepoPath(strInput(inputs, FIELD_DOCS_ROOT, DEFAULT_DOCS_ROOT), fileSlug(item.title))}.md`;
|
|
278
307
|
case 'diagrams-dir':
|
|
279
308
|
return `${joinRepoPath(strInput(inputs, FIELD_DIAGRAMS_DIR, DEFAULT_DIAGRAMS_DIR), fileSlug(item.title))}.md`;
|
|
280
|
-
case 'authored-readme':
|
|
281
|
-
// The planner decides a README's path (beside its service); preserve it if authored + safe
|
|
282
|
-
// (the ingest re-parse re-validates it), else leave unset for the writer to place.
|
|
283
|
-
return item.spawn?.taskTypeFields?.targetPath?.trim() || undefined;
|
|
284
309
|
case 'none':
|
|
285
310
|
return undefined;
|
|
286
311
|
}
|
|
@@ -298,21 +323,25 @@ function seedPlan(draft, inputs) {
|
|
|
298
323
|
const styleFragmentIds = Array.isArray(inputs[FIELD_STYLE_FRAGMENTS])
|
|
299
324
|
? inputs[FIELD_STYLE_FRAGMENTS]
|
|
300
325
|
: [];
|
|
326
|
+
// Track derived `.md` paths across the whole plan so two same-slug items never collide on one file.
|
|
327
|
+
const usedPaths = new Set();
|
|
301
328
|
const items = draft.items.map((item) => {
|
|
302
329
|
const deco = PHASE_DECORATIONS[item.phaseId];
|
|
303
330
|
if (!deco)
|
|
304
331
|
return item;
|
|
305
|
-
const
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
: undefined;
|
|
332
|
+
const derived = targetPathFor(deco, item, inputs);
|
|
333
|
+
const targetPath = derived ? uniqueDocPath(derived, usedPaths) : undefined;
|
|
334
|
+
const taskTypeFields = {
|
|
335
|
+
...(deco.docKind ? { docKind: deco.docKind } : {}),
|
|
336
|
+
...(targetPath ? { targetPath } : {}),
|
|
337
|
+
};
|
|
312
338
|
const gates = docsReviewGates(deco.pipelineId, humanReview);
|
|
339
|
+
// Merge OVER any planner-authored spawn (so a planner `agentConfig` etc. survives) — the
|
|
340
|
+
// decorated fields we own win.
|
|
313
341
|
const spawn = {
|
|
342
|
+
...(item.spawn ?? {}),
|
|
314
343
|
...(deco.taskType ? { taskType: deco.taskType } : {}),
|
|
315
|
-
...(taskTypeFields ? { taskTypeFields } : {}),
|
|
344
|
+
...(Object.keys(taskTypeFields).length ? { taskTypeFields } : {}),
|
|
316
345
|
...(styleFragmentIds.length ? { fragmentIds: styleFragmentIds } : {}),
|
|
317
346
|
...(gates ? { gates } : {}),
|
|
318
347
|
};
|
|
@@ -347,12 +376,13 @@ const PLANNER_STEERING = [
|
|
|
347
376
|
'Build the plan around the required plan shape above, following the documentation audit. Include a',
|
|
348
377
|
'phase ONLY for a documentation type the user requested; omit the others (they are optional).',
|
|
349
378
|
'',
|
|
350
|
-
'Phase `foundations`:
|
|
351
|
-
'
|
|
379
|
+
'Phase `foundations`: ALWAYS present it (the required plan shape mandates it), but give it an item',
|
|
380
|
+
'ONLY to create or normalize a MISSING placement directory a later phase writes into — usually 0–1',
|
|
381
|
+
'items, and leave it with NO items when the directories already exist. Never drop the phase itself.',
|
|
352
382
|
'',
|
|
353
383
|
'Bounded item granularity per phase:',
|
|
354
|
-
'- `readme` — one item per in-scope service
|
|
355
|
-
'
|
|
384
|
+
'- `readme` — one item per in-scope service. Its README lives BESIDE the code, so name the exact',
|
|
385
|
+
' repo-relative path (e.g. `services/auth/README.md`) in the item description for the writer.',
|
|
356
386
|
'- `diagrams` — one item per in-scope service (architecture + the key flows), written under the',
|
|
357
387
|
' diagrams directory from the interview.',
|
|
358
388
|
'- `comments` — one item per worst under-documented module from the audit, capped at 5; name the',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.js","sourceRoot":"","sources":["../../../src/presets/docs-refresh/preset.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,YAAY,EACZ,wBAAwB,
|
|
1
|
+
{"version":3,"file":"preset.js","sourceRoot":"","sources":["../../../src/presets/docs-refresh/preset.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,YAAY,EACZ,wBAAwB,EACxB,aAAa,GACd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,mCAAmC,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,8EAA8E;AAC9E,4FAA4F;AAC5F,8FAA8F;AAC9F,+FAA+F;AAC/F,uFAAuF;AACvF,oFAAoF;AACpF,iEAAiE;AACjE,EAAE;AACF,8FAA8F;AAC9F,6FAA6F;AAC7F,8FAA8F;AAC9F,2FAA2F;AAC3F,8EAA8E;AAC9E,EAAE;AACF,kFAAkF;AAClF,4FAA4F;AAC5F,kGAAkG;AAClG,EAAE;AACF,2EAA2E;AAC3E,8EAA8E;AAE9E,uFAAuF;AACvF,MAAM,CAAC,MAAM,sBAAsB,GAAG,qBAAqB,CAAA;AAE3D,4FAA4F;AAC5F,kGAAkG;AAClG,sEAAsE;AACtE,MAAM,eAAe,GAAG,QAAQ,CAAA;AAChC,MAAM,iBAAiB,GAAG,UAAU,CAAA;AACpC,MAAM,iBAAiB,GAAG,UAAU,CAAA;AACpC,MAAM,uBAAuB,GAAG,gBAAgB,CAAA;AAEhD,iGAAiG;AACjG,MAAM,iBAAiB,GAAG,aAAa,CAAA;AAEvC,+FAA+F;AAC/F,MAAM,eAAe,GAAG,UAAU,CAAA;AAClC,MAAM,eAAe,GAAG,UAAU,CAAA;AAClC,M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,yBAAyB;IACvC,wBAAwB,CAAC,mBAAmB,CAAC,CAAA;AAC/C,CAAC;AAED,mGAAmG;AACnG,mGAAmG;AACnG,+BAA+B;AAC/B,yBAAyB,EAAE,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The five migration phase ids, keyed by a semantic name so prose/prompts reference a phase by
|
|
3
|
+
* meaning rather than by a bare string. The string values are the ids matched VERBATIM against the
|
|
4
|
+
* planned phases at ingest.
|
|
5
|
+
*/
|
|
6
|
+
export declare const MIGRATION_PHASE_IDS: {
|
|
7
|
+
/** Enumerate every directly + transitively affected touchpoint; commit the inventory. */
|
|
8
|
+
readonly blastZone: 'migration-blast-zone';
|
|
9
|
+
/** Pin observable behaviour over the blast zone; close with the confidence case. */
|
|
10
|
+
readonly coverage: 'migration-coverage';
|
|
11
|
+
/** Decide the backwards-compatibility degree and design the migration / cutover path. */
|
|
12
|
+
readonly transitionDesign: 'migration-transition-design';
|
|
13
|
+
/** Execute the swap per the approved design, behaviour suite green throughout. */
|
|
14
|
+
readonly delivery: 'migration-delivery';
|
|
15
|
+
/** Prove parity on the new target, flip defaults, remove the old path. */
|
|
16
|
+
readonly verifyDecommission: 'migration-verify-decommission';
|
|
17
|
+
};
|
|
18
|
+
/** One of the five canonical migration phase ids. */
|
|
19
|
+
export type MigrationPhaseId = (typeof MIGRATION_PHASE_IDS)[keyof typeof MIGRATION_PHASE_IDS];
|
|
20
|
+
/**
|
|
21
|
+
* The phase ids in methodology order — the order the plan (and the preset's `phaseTemplate`) must
|
|
22
|
+
* present them. Consumers that iterate phases (the template builder, the E2E) read this so the
|
|
23
|
+
* order lives in one place too.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MIGRATION_PHASE_ID_ORDER: readonly MigrationPhaseId[];
|
|
26
|
+
//# sourceMappingURL=phases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phases.d.ts","sourceRoot":"","sources":["../../../src/presets/tech-migration/phases.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAC9B,yFAAyF;aACzF,SAAS,EAAE,sBAAsB;IACjC,oFAAoF;aACpF,QAAQ,EAAE,oBAAoB;IAC9B,yFAAyF;aACzF,gBAAgB,EAAE,6BAA6B;IAC/C,kFAAkF;aAClF,QAAQ,EAAE,oBAAoB;IAC9B,0EAA0E;aAC1E,kBAAkB,EAAE,+BAA+B;CAC3C,CAAA;AAEV,qDAAqD;AACrD,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAA;AAE7F;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,gBAAgB,EAM/D,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// The canonical PHASE IDS of the `preset_tech_migration` initiative preset.
|
|
3
|
+
//
|
|
4
|
+
// A technological migration always runs the same five-phase methodology (blast zone →
|
|
5
|
+
// coverage → transition → delivery → decommission), regardless of the specific from/to
|
|
6
|
+
// technologies. Those phase ids are a CONTRACT shared by four consumers:
|
|
7
|
+
// - the preset's declarative `phaseTemplate` on the wire descriptor (T8),
|
|
8
|
+
// - the methodology prompt pack's planner steering (`prompt-additions.ts`, T5),
|
|
9
|
+
// - the plan post-processor `seedMigrationPlan` (T7), and
|
|
10
|
+
// - the migration E2E (T10).
|
|
11
|
+
// Defined ONCE here so no consumer retypes a phase id. This matters because the generic
|
|
12
|
+
// ingest normalizer matches a planned phase to a template phase by its `id` VERBATIM, so a
|
|
13
|
+
// single typo would silently break the shape enforcement (a "missing required phase" reject
|
|
14
|
+
// or a disallowed extra) rather than fail loudly. See
|
|
15
|
+
// `docs/initiatives/tech-migration-preset-and-mssql-postgres-pilot.md`.
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
/**
|
|
18
|
+
* The five migration phase ids, keyed by a semantic name so prose/prompts reference a phase by
|
|
19
|
+
* meaning rather than by a bare string. The string values are the ids matched VERBATIM against the
|
|
20
|
+
* planned phases at ingest.
|
|
21
|
+
*/
|
|
22
|
+
export const MIGRATION_PHASE_IDS = {
|
|
23
|
+
/** Enumerate every directly + transitively affected touchpoint; commit the inventory. */
|
|
24
|
+
blastZone: 'migration-blast-zone',
|
|
25
|
+
/** Pin observable behaviour over the blast zone; close with the confidence case. */
|
|
26
|
+
coverage: 'migration-coverage',
|
|
27
|
+
/** Decide the backwards-compatibility degree and design the migration / cutover path. */
|
|
28
|
+
transitionDesign: 'migration-transition-design',
|
|
29
|
+
/** Execute the swap per the approved design, behaviour suite green throughout. */
|
|
30
|
+
delivery: 'migration-delivery',
|
|
31
|
+
/** Prove parity on the new target, flip defaults, remove the old path. */
|
|
32
|
+
verifyDecommission: 'migration-verify-decommission',
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The phase ids in methodology order — the order the plan (and the preset's `phaseTemplate`) must
|
|
36
|
+
* present them. Consumers that iterate phases (the template builder, the E2E) read this so the
|
|
37
|
+
* order lives in one place too.
|
|
38
|
+
*/
|
|
39
|
+
export const MIGRATION_PHASE_ID_ORDER = [
|
|
40
|
+
MIGRATION_PHASE_IDS.blastZone,
|
|
41
|
+
MIGRATION_PHASE_IDS.coverage,
|
|
42
|
+
MIGRATION_PHASE_IDS.transitionDesign,
|
|
43
|
+
MIGRATION_PHASE_IDS.delivery,
|
|
44
|
+
MIGRATION_PHASE_IDS.verifyDecommission,
|
|
45
|
+
];
|
|
46
|
+
//# sourceMappingURL=phases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phases.js","sourceRoot":"","sources":["../../../src/presets/tech-migration/phases.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4EAA4E;AAC5E,EAAE;AACF,sFAAsF;AACtF,uFAAuF;AACvF,yEAAyE;AACzE,4EAA4E;AAC5E,kFAAkF;AAClF,4DAA4D;AAC5D,+BAA+B;AAC/B,wFAAwF;AACxF,2FAA2F;AAC3F,4FAA4F;AAC5F,sDAAsD;AACtD,wEAAwE;AACxE,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,yFAAyF;IACzF,SAAS,EAAE,sBAAsB;IACjC,oFAAoF;IACpF,QAAQ,EAAE,oBAAoB;IAC9B,yFAAyF;IACzF,gBAAgB,EAAE,6BAA6B;IAC/C,kFAAkF;IAClF,QAAQ,EAAE,oBAAoB;IAC9B,0EAA0E;IAC1E,kBAAkB,EAAE,+BAA+B;CAC3C,CAAA;AAKV;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAgC;IACnE,mBAAmB,CAAC,SAAS;IAC7B,mBAAmB,CAAC,QAAQ;IAC5B,mBAAmB,CAAC,gBAAgB;IACpC,mBAAmB,CAAC,QAAQ;IAC5B,mBAAmB,CAAC,kBAAkB;CACvC,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AgentKind } from '@cat-factory/kernel';
|
|
2
|
+
/**
|
|
3
|
+
* Interviewer steering: the migration form already froze the enumerable facts (which migration,
|
|
4
|
+
* from/to tech, stored-proc policy, compat posture, coverage bar, docs dir), so the interview digs
|
|
5
|
+
* into the fuzzy, judgment-dependent facts a form cannot capture — the ones that actually change how
|
|
6
|
+
* the migration must be planned. Complements the generic T3 "build on the seeded form" line with the
|
|
7
|
+
* migration-specific probing agenda.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MIGRATION_INTERVIEWER_PROMPT_ADDITION: string;
|
|
10
|
+
/**
|
|
11
|
+
* Analyst steering: the analysis must produce the migration's BLAST ZONE (the touchpoint inventory
|
|
12
|
+
* the planner turns into the phase-1 report item and the provisional phase-2 coverage items), not a
|
|
13
|
+
* generic architecture overview — and it must chase the TRANSITIVE reach where migrations silently
|
|
14
|
+
* break, recording the existing test coverage per touchpoint (the phase-2 hardening target and the
|
|
15
|
+
* confidence case's grounding).
|
|
16
|
+
*/
|
|
17
|
+
export declare const MIGRATION_ANALYST_PROMPT_ADDITION: string;
|
|
18
|
+
/**
|
|
19
|
+
* Planner steering: author each phase's items to the migration briefs, using the canonical phase
|
|
20
|
+
* ids VERBATIM, enforcing coverage-before-delivery and the single-writer artifact discipline. Pairs
|
|
21
|
+
* with the wire `phaseTemplate` (which dictates the phase SHAPE) — this is the per-phase ITEM
|
|
22
|
+
* methodology `seedMigrationPlan` (T7) then decorates and hardens.
|
|
23
|
+
*/
|
|
24
|
+
export declare const MIGRATION_PLANNER_PROMPT_ADDITION: string;
|
|
25
|
+
/**
|
|
26
|
+
* The migration preset's `promptAdditions` map — the per-planning-kind steering the registration
|
|
27
|
+
* (T8) spreads onto its {@link InitiativePresetRegistration}. Keyed by the kernel agent-kind
|
|
28
|
+
* constants so a kind rename can't silently orphan an entry.
|
|
29
|
+
*/
|
|
30
|
+
export declare const MIGRATION_PROMPT_ADDITIONS: Partial<Record<AgentKind, string>>;
|
|
31
|
+
//# sourceMappingURL=prompt-additions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-additions.d.ts","sourceRoot":"","sources":["../../../src/presets/tech-migration/prompt-additions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AA+BpD;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,QAqBtC,CAAA;AAEZ;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,QAwBlC,CAAA;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,QA4BlC,CAAA;AAEZ;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAIzE,CAAA"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { INITIATIVE_ANALYST_AGENT_KIND, INITIATIVE_INTERVIEWER_AGENT_KIND, INITIATIVE_PLANNER_AGENT_KIND, } from '@cat-factory/kernel';
|
|
2
|
+
import { MIGRATION_PHASE_IDS } from './phases.js';
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// The methodology PROMPT PACK for the `preset_tech_migration` initiative preset — the per-planning-
|
|
5
|
+
// kind steering text the preset registers as its `promptAdditions` (T8). This is the DEEP,
|
|
6
|
+
// code-side methodology the parent's off-the-wire rule keeps OUT of the descriptor: the wire
|
|
7
|
+
// `phaseTemplate` carries only short phase ids/titles/goals (rendered as the "required plan
|
|
8
|
+
// shape"), while these constants carry HOW each planning kind reasons about a migration.
|
|
9
|
+
//
|
|
10
|
+
// How each constant reaches its agent:
|
|
11
|
+
// - `initiative-analyst` / `initiative-planner` run through the engine, so `AgentContextBuilder`
|
|
12
|
+
// resolves `promptAdditions[kind]` onto `context.initiative.preset.promptAddition` and the
|
|
13
|
+
// server's `initiativeContextLines` renders it under `## Initiative preset: <label>` (the
|
|
14
|
+
// planner also gets the `phaseTemplate` fold). This seam already existed (T1 / parent S3).
|
|
15
|
+
// - `initiative-interviewer` is the INLINE `InitiativeInterviewService`, which folds
|
|
16
|
+
// `promptAdditions[INITIATIVE_INTERVIEWER_AGENT_KIND]` into its own prompt — a generic seam this
|
|
17
|
+
// slice completes, since the migration preset is the first FULL-interview preset to need it
|
|
18
|
+
// (docs-refresh is `interview: 'skip'`).
|
|
19
|
+
//
|
|
20
|
+
// Everything is DATA: the preset registration (T8) spreads `MIGRATION_PROMPT_ADDITIONS`, and the
|
|
21
|
+
// loop never branches on a preset id. The planner brief references the canonical phase ids from
|
|
22
|
+
// `phases.ts` so they are never retyped. See
|
|
23
|
+
// `docs/initiatives/tech-migration-preset-and-mssql-postgres-pilot.md`.
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
/**
|
|
26
|
+
* Interviewer steering: the migration form already froze the enumerable facts (which migration,
|
|
27
|
+
* from/to tech, stored-proc policy, compat posture, coverage bar, docs dir), so the interview digs
|
|
28
|
+
* into the fuzzy, judgment-dependent facts a form cannot capture — the ones that actually change how
|
|
29
|
+
* the migration must be planned. Complements the generic T3 "build on the seeded form" line with the
|
|
30
|
+
* migration-specific probing agenda.
|
|
31
|
+
*/
|
|
32
|
+
export const MIGRATION_INTERVIEWER_PROMPT_ADDITION = [
|
|
33
|
+
'This initiative is a TECHNOLOGICAL MIGRATION — swapping a load-bearing technology (a database ' +
|
|
34
|
+
'engine, a framework major, a runtime, a core library) behind a behaviour-preservation safety ' +
|
|
35
|
+
'net. The intake form has already captured the enumerable facts (which migration, the from/to ' +
|
|
36
|
+
'technology, the stored-procedure policy, the compatibility posture, the coverage bar, the docs ' +
|
|
37
|
+
'location). Treat every one of those seeded answers as SETTLED — never re-ask what the form covers.',
|
|
38
|
+
'',
|
|
39
|
+
'Spend your questions on the fuzzy, judgment-dependent facts a form cannot capture, because they ' +
|
|
40
|
+
'shape the plan:',
|
|
41
|
+
'- Downtime / cutover tolerance: is a maintenance window acceptable, or must the switch be online?',
|
|
42
|
+
'- Data-migration constraints: data volume, backfill and rehearsal needs, point-in-time ' +
|
|
43
|
+
'correctness, and any records that cannot be recreated.',
|
|
44
|
+
'- Compatibility posture, when the form left it unset: how long must the old and new technologies ' +
|
|
45
|
+
'run side by side (big-bang vs dual-run vs adapter layer), and what forces that choice?',
|
|
46
|
+
'- The observable behaviour that must NOT change, and where silent drift is most likely.',
|
|
47
|
+
'- Rollback expectations, and who owns the decision to abort a cutover mid-flight.',
|
|
48
|
+
'- Operational reach: scheduled jobs, ops tooling, monitoring and CI that touch the technology ' +
|
|
49
|
+
'being swapped.',
|
|
50
|
+
'',
|
|
51
|
+
'Keep each batch small and high-leverage. Converge as soon as the migration methodology (blast ' +
|
|
52
|
+
'zone → coverage → transition → delivery → decommission) can be planned unambiguously.',
|
|
53
|
+
].join('\n');
|
|
54
|
+
/**
|
|
55
|
+
* Analyst steering: the analysis must produce the migration's BLAST ZONE (the touchpoint inventory
|
|
56
|
+
* the planner turns into the phase-1 report item and the provisional phase-2 coverage items), not a
|
|
57
|
+
* generic architecture overview — and it must chase the TRANSITIVE reach where migrations silently
|
|
58
|
+
* break, recording the existing test coverage per touchpoint (the phase-2 hardening target and the
|
|
59
|
+
* confidence case's grounding).
|
|
60
|
+
*/
|
|
61
|
+
export const MIGRATION_ANALYST_PROMPT_ADDITION = [
|
|
62
|
+
'This initiative is a TECHNOLOGICAL MIGRATION. Your analysis must produce the migration BLAST ' +
|
|
63
|
+
'ZONE — the touchpoint inventory the planner turns into the phase-1 report item and the ' +
|
|
64
|
+
'provisional phase-2 coverage items — not a generic architecture overview.',
|
|
65
|
+
'',
|
|
66
|
+
'Enumerate every touchpoint of the technology being swapped:',
|
|
67
|
+
'- DIRECT touchpoints: every site that uses the technology directly — queries, driver/ORM calls, ' +
|
|
68
|
+
'schema objects, vendor-specific idioms, connection/pool/timeout config.',
|
|
69
|
+
'- TRANSITIVE touchpoints: chase the reach BEYOND the direct sites — callers of those callers, ' +
|
|
70
|
+
'code that consumes the RESULT SHAPES or error contracts of the swapped calls, scheduled jobs, ' +
|
|
71
|
+
'ops and migration tooling, monitoring, and CI provisioning. Transitive reach is where ' +
|
|
72
|
+
'migrations silently break; do not stop at the obvious layer.',
|
|
73
|
+
'',
|
|
74
|
+
'For EACH touchpoint record: what it is, whether it is direct or transitive, a risk assessment, ' +
|
|
75
|
+
'and — critically — WHICH TESTS COVER IT TODAY (or "none"). That "covered by which tests today" ' +
|
|
76
|
+
'column is exactly what phase 2 hardens and the confidence case audits, so ground it in real ' +
|
|
77
|
+
'test files, not guesses.',
|
|
78
|
+
'',
|
|
79
|
+
'Call out the behaviour-preservation traps specific to THIS swap — the edge cases that differ ' +
|
|
80
|
+
'silently between the two technologies (NULL vs empty string, precision/rounding, collation and ' +
|
|
81
|
+
'comparison semantics, pagination, identity/sequence exposure) — and any set-based operation ' +
|
|
82
|
+
'that must NOT become an app-side per-row loop. Ground every touchpoint in real file/directory ' +
|
|
83
|
+
'references, and produce this provisional inventory IN your analysis so the planner can author ' +
|
|
84
|
+
'phase 1 and the provisional phase-2 items directly from it.',
|
|
85
|
+
].join('\n');
|
|
86
|
+
/**
|
|
87
|
+
* Planner steering: author each phase's items to the migration briefs, using the canonical phase
|
|
88
|
+
* ids VERBATIM, enforcing coverage-before-delivery and the single-writer artifact discipline. Pairs
|
|
89
|
+
* with the wire `phaseTemplate` (which dictates the phase SHAPE) — this is the per-phase ITEM
|
|
90
|
+
* methodology `seedMigrationPlan` (T7) then decorates and hardens.
|
|
91
|
+
*/
|
|
92
|
+
export const MIGRATION_PLANNER_PROMPT_ADDITION = [
|
|
93
|
+
'This initiative is a TECHNOLOGICAL MIGRATION, planned around the five fixed phases in the ' +
|
|
94
|
+
"required plan shape above. Author each phase's items to the briefs below, using each phase " +
|
|
95
|
+
'`id` VERBATIM. Coverage comes BEFORE delivery: never schedule a delivery item before the ' +
|
|
96
|
+
'behaviour it changes is characterised and green on the current technology.',
|
|
97
|
+
'',
|
|
98
|
+
`- \`${MIGRATION_PHASE_IDS.blastZone}\`: ONE report item (a SINGLE writer) that verifies and ` +
|
|
99
|
+
"deepens the analyst's provisional inventory against the real code and commits it as a " +
|
|
100
|
+
'Markdown document. Do not split the inventory across parallel writers.',
|
|
101
|
+
`- \`${MIGRATION_PHASE_IDS.coverage}\`: one coverage item per area of the provisional inventory ` +
|
|
102
|
+
'(keep it to roughly eight; group finer-grained rows by area), each writing characterization ' +
|
|
103
|
+
'tests at a seam ABOVE the layer being swapped so they survive the swap. CLOSE the phase with a ' +
|
|
104
|
+
'single confidence-case item that depends on every other phase-2 item and is human-gated: it ' +
|
|
105
|
+
'sweeps coverage and commits the evidence-backed proof (per-touchpoint named tests, gaps and ' +
|
|
106
|
+
'waivers justified against the coverage bar, risk mitigations, safety nets) a human audits ' +
|
|
107
|
+
'before delivery.',
|
|
108
|
+
`- \`${MIGRATION_PHASE_IDS.transitionDesign}\`: one or two human-gated design items that decide ` +
|
|
109
|
+
'the backwards-compatibility posture and design the migration / cutover path — schema ' +
|
|
110
|
+
'translation, transaction-boundary ownership, the error-contract mapping, the per-object ' +
|
|
111
|
+
'replacement strategy, and the data-migration path plus rehearsal — committing the design ' +
|
|
112
|
+
'document. Each set-based operation replaced with application code needs an explicit note that ' +
|
|
113
|
+
'it stays set-based (never an app-side per-row loop).',
|
|
114
|
+
`- \`${MIGRATION_PHASE_IDS.delivery}\`: delivery items batched by design area, each depending on ` +
|
|
115
|
+
'the enabling schema / infrastructure item, executed per the approved design with the behaviour ' +
|
|
116
|
+
'suite green throughout.',
|
|
117
|
+
`- \`${MIGRATION_PHASE_IDS.verifyDecommission}\`: a parity-verification item (the behaviour suite ` +
|
|
118
|
+
'green on the new target, made primary), the CI / default flip, and removal of the old path and ' +
|
|
119
|
+
'its dependencies per the chosen compatibility posture.',
|
|
120
|
+
].join('\n');
|
|
121
|
+
/**
|
|
122
|
+
* The migration preset's `promptAdditions` map — the per-planning-kind steering the registration
|
|
123
|
+
* (T8) spreads onto its {@link InitiativePresetRegistration}. Keyed by the kernel agent-kind
|
|
124
|
+
* constants so a kind rename can't silently orphan an entry.
|
|
125
|
+
*/
|
|
126
|
+
export const MIGRATION_PROMPT_ADDITIONS = {
|
|
127
|
+
[INITIATIVE_INTERVIEWER_AGENT_KIND]: MIGRATION_INTERVIEWER_PROMPT_ADDITION,
|
|
128
|
+
[INITIATIVE_ANALYST_AGENT_KIND]: MIGRATION_ANALYST_PROMPT_ADDITION,
|
|
129
|
+
[INITIATIVE_PLANNER_AGENT_KIND]: MIGRATION_PLANNER_PROMPT_ADDITION,
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=prompt-additions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-additions.js","sourceRoot":"","sources":["../../../src/presets/tech-migration/prompt-additions.ts"],"names":[],"mappings":"AACA,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,6BAA6B,GAC9B,MAAM,qBAAqB,CAAA;AAC5B,OAA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