@cat-factory/agents 0.46.0 → 0.48.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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/presets/docs-refresh/preset.d.ts +4 -10
- package/dist/presets/docs-refresh/preset.d.ts.map +1 -1
- package/dist/presets/docs-refresh/preset.js +7 -57
- package/dist/presets/docs-refresh/preset.js.map +1 -1
- package/dist/presets/plan-helpers.d.ts +29 -0
- package/dist/presets/plan-helpers.d.ts.map +1 -0
- package/dist/presets/plan-helpers.js +65 -0
- package/dist/presets/plan-helpers.js.map +1 -0
- package/dist/presets/tech-migration/preset.d.ts +16 -0
- package/dist/presets/tech-migration/preset.d.ts.map +1 -0
- package/dist/presets/tech-migration/preset.js +266 -0
- package/dist/presets/tech-migration/preset.js.map +1 -0
- package/dist/presets/tech-migration/seed-plan.d.ts +19 -0
- package/dist/presets/tech-migration/seed-plan.d.ts.map +1 -0
- package/dist/presets/tech-migration/seed-plan.js +207 -0
- package/dist/presets/tech-migration/seed-plan.js.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { companionSystemPrompt } from './agents/prompts/companion.js';
|
|
|
23
23
|
export { DOC_RESEARCHER_KIND, DOC_OUTLINER_KIND, DOC_WRITER_KIND, DOC_FINALIZER_KIND, DOC_REVIEWER_KIND, DOC_FIXER_KIND, DOCUMENT_AGENT_KINDS, registerDocumentAgents, resolveDocumentTarget, type DocumentTarget, } from './agents/kinds/document.js';
|
|
24
24
|
export { CODE_COMMENTER_KIND, CODE_COMMENTER_AGENT_KINDS, registerCodeCommenterAgent, } from './agents/kinds/code-commenter.js';
|
|
25
25
|
export { DOCS_REFRESH_PRESET_ID, DOCS_REFRESH_PRESET, registerDocsRefreshPreset, docsReviewGates, } from './presets/docs-refresh/preset.js';
|
|
26
|
+
export { TECH_MIGRATION_PRESET_ID, TECH_MIGRATION_PRESET, registerTechMigrationPreset, } from './presets/tech-migration/preset.js';
|
|
26
27
|
export { type DocTemplate, type DocTemplateSection, DOC_TEMPLATES, registerDocTemplate, registerDocTemplates, clearRegisteredDocTemplates, docTemplateFor, resolveDocTemplate, requiredSectionTitles, renderTemplateSkeleton, } from './agents/kinds/doc-templates.js';
|
|
27
28
|
export { INITIATIVE_BREAKDOWN_KIND, INITIATIVE_AGENT_KINDS, registerInitiativeAgents, } from './agents/kinds/initiative.js';
|
|
28
29
|
export { READ_ONLY_AGENT_KINDS, READ_ONLY_GUARDRAIL, isReadOnlyAgentKind, } from './agents/kinds/read-only.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,2BAA2B,EAAE,MAAM,8BAA8B,CAAA;AAChG,OAAO,EACL,KAAK,sBAAsB,EAC3B,+BAA+B,EAC/B,kCAAkC,EAClC,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,GACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAMrE,OAAO,EACL,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,yBAAyB,EACzB,kCAAkC,EAClC,kCAAkC,GACnC,MAAM,gCAAgC,CAAA;AAGvC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qBAAqB,EACrB,qBAAqB,EACrB,+BAA+B,EAC/B,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,0BAA0B,CAAA;AAKjC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,0BAA0B,EAC/B,wBAAwB,EACxB,kBAAkB,EAClB,+BAA+B,EAC/B,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,cAAc,EACd,iBAAiB,EACjB,mCAAmC,EACnC,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,8BAA8B,EAC9B,KAAK,WAAW,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,sBAAsB,EACtB,KAAK,kCAAkC,GACxC,MAAM,6CAA6C,CAAA;AACpD,OAAO,EACL,qBAAqB,EACrB,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,GACnC,MAAM,4CAA4C,CAAA;AACnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAA;AAClG,OAAO,EACL,mBAAmB,EACnB,KAAK,+BAA+B,GACrC,MAAM,0CAA0C,CAAA;AACjD,OAAO,EACL,KAAK,oBAAoB,EACzB,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,mBAAmB,GACpB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,mBAAmB,MAAM,4CAA4C,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -54,6 +54,13 @@ export { CODE_COMMENTER_KIND, CODE_COMMENTER_AGENT_KINDS, registerCodeCommenterA
|
|
|
54
54
|
// `detect` reuses slice 6's `detectDocsLayout`, `seedPlan` stamps per-item spawn decoration ONLY,
|
|
55
55
|
// and `phaseTemplate` enforces the plan shape via the generic ingest normalizer (never `seedPlan`).
|
|
56
56
|
export { DOCS_REFRESH_PRESET_ID, DOCS_REFRESH_PRESET, registerDocsRefreshPreset, docsReviewGates, } from './presets/docs-refresh/preset.js';
|
|
57
|
+
// The Technological-migration initiative preset (tech-migration slice T8), registered as a SIDE
|
|
58
|
+
// EFFECT of importing this module (the same pattern as docs-refresh) so it is available in every
|
|
59
|
+
// deployment with no per-facade wiring — the two runtimes cannot drift on it. It composes the
|
|
60
|
+
// already-landed migration pieces: the `phaseTemplate` (five-phase methodology enforced by the
|
|
61
|
+
// generic ingest normalizer), `seedMigrationPlan` as `seedPlan` (T7 spawn decoration +
|
|
62
|
+
// confidence-case wiring), the T5 `promptAdditions`, and the T4 `MIGRATION_FRAGMENT_IDS`. No probe.
|
|
63
|
+
export { TECH_MIGRATION_PRESET_ID, TECH_MIGRATION_PRESET, registerTechMigrationPreset, } from './presets/tech-migration/preset.js';
|
|
57
64
|
// Per-`DocKind` document templates: the single source of truth for a kind's expected shape,
|
|
58
65
|
// woven into the outliner/writer prompts and (later) read by the doc-quality gate. The
|
|
59
66
|
// built-in `DOC_TEMPLATES` are the fallback; a deployment overrides via `registerDocTemplate`.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAoC,MAAM,8BAA8B,CAAA;AAChG,OAAO,EAEL,+BAA+B,EAC/B,kCAAkC,EAClC,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,GACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAKL,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2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B,EACnB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,8BAA8B,EAE9B,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,sBAAsB,GAEvB,MAAM,6CAA6C,CAAA;AACpD,OAAO,EACL,qBAAqB,GAGtB,MAAM,4CAA4C,CAAA;AACnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAA;AAClG,OAAO,EACL,mBAAmB,GAEpB,MAAM,0CAA0C,CAAA;AACjD,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,mBAAmB,GACpB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,mBAAmB,MAAM,4CAA4C,CAAA"}
|
|
@@ -3,16 +3,10 @@ import type { InitiativePresetRegistration } from '@cat-factory/kernel';
|
|
|
3
3
|
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
|
-
* in —
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* than gating a mid-pipeline `doc-reviewer` that still auto-merges afterwards).
|
|
11
|
-
*
|
|
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.
|
|
6
|
+
* in — the human reviews the CI-green PR right BEFORE it merges, matching the form's "review each
|
|
7
|
+
* documentation change before it merges" promise. The placement is the shared {@link mergeGateOverride}
|
|
8
|
+
* (single derivation across presets); `undefined` when human review is OFF (the default) so the
|
|
9
|
+
* run stays unattended.
|
|
16
10
|
*/
|
|
17
11
|
export declare function docsReviewGates(pipelineId: string, humanReview: boolean): boolean[] | undefined;
|
|
18
12
|
/** 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;AAkCvE,uFAAuF;AACvF,eAAO,MAAM,sBAAsB,wBAAwB,CAAA;AAsL3D;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,SAAS,CAE/F;AAwKD,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,EAAE,4BAQjC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BUSINESS_DOCS_PIPELINE_ID, CODE_COMMENTS_PIPELINE_ID, DOCUMENT_QUICK_PIPELINE_ID, INITIATIVE_DOCS_PIPELINE_ID, joinRepoPath, registerInitiativePreset,
|
|
1
|
+
import { BUSINESS_DOCS_PIPELINE_ID, CODE_COMMENTS_PIPELINE_ID, DOCUMENT_QUICK_PIPELINE_ID, INITIATIVE_DOCS_PIPELINE_ID, joinRepoPath, registerInitiativePreset, } from '@cat-factory/kernel';
|
|
2
2
|
import { DEFAULT_DOCUMENT_STYLE_FRAGMENT_IDS, styleFragments } from '@cat-factory/prompt-fragments';
|
|
3
|
-
import {
|
|
3
|
+
import { fileSlug, mergeGateOverride, strInput, uniqueDocPath } from '../plan-helpers.js';
|
|
4
4
|
import { detectDocsLayout } from './docs-detect.logic.js';
|
|
5
5
|
// ---------------------------------------------------------------------------
|
|
6
6
|
// The Documentation-refresh initiative preset (initiative-presets slice 8) — the pilot that
|
|
@@ -193,65 +193,15 @@ const detect = async (repo) => {
|
|
|
193
193
|
// ---------------------------------------------------------------------------
|
|
194
194
|
// `seedPlan` — per-item spawn DECORATION only (never plan shape — that is the template's job).
|
|
195
195
|
// ---------------------------------------------------------------------------
|
|
196
|
-
/** Read a string input, falling back to `fallback` when absent/blank/non-string. */
|
|
197
|
-
function strInput(inputs, key, fallback) {
|
|
198
|
-
const value = inputs[key];
|
|
199
|
-
return typeof value === 'string' && value.trim() ? value.trim() : fallback;
|
|
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
|
-
*/
|
|
207
|
-
function fileSlug(title) {
|
|
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;
|
|
231
|
-
}
|
|
232
196
|
/**
|
|
233
197
|
* The per-run gate-override array for a spawned documentation pipeline when human review is opted
|
|
234
|
-
* in —
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
* than gating a mid-pipeline `doc-reviewer` that still auto-merges afterwards).
|
|
239
|
-
*
|
|
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.
|
|
198
|
+
* in — the human reviews the CI-green PR right BEFORE it merges, matching the form's "review each
|
|
199
|
+
* documentation change before it merges" promise. The placement is the shared {@link mergeGateOverride}
|
|
200
|
+
* (single derivation across presets); `undefined` when human review is OFF (the default) so the
|
|
201
|
+
* run stays unattended.
|
|
244
202
|
*/
|
|
245
203
|
export function docsReviewGates(pipelineId, humanReview) {
|
|
246
|
-
|
|
247
|
-
return undefined;
|
|
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);
|
|
204
|
+
return humanReview ? mergeGateOverride(pipelineId) : undefined;
|
|
255
205
|
}
|
|
256
206
|
const PHASE_DECORATIONS = {
|
|
257
207
|
// Foundations: a lean doc under the docs root (writing it creates/normalizes the placement dir).
|
|
@@ -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,GACzB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,mCAAmC,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnG,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACzF,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,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AAC5D,8EAA8E;AAE9E,MAAM,gBAAgB,GAAG;IACvB,+FAA+F;IAC/F,+FAA+F;IAC/F,+FAA+F;IAC/F,gGAAgG;IAChG,6CAA6C;IAC7C,EAAE;IACF,4FAA4F;IAC5F,wFAAwF;IACxF,2FAA2F;IAC3F,6DAA6D;IAC7D,kGAAkG;IAClG,6FAA6F;CAC9F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAEZ,MAAM,gBAAgB,GAAG;IACvB,mGAAmG;IACnG,8FAA8F;IAC9F,EAAE;IACF,mGAAmG;IACnG,mGAAmG;IACnG,oGAAoG;IACpG,EAAE;IACF,qCAAqC;IACrC,iGAAiG;IACjG,+FAA+F;IAC/F,gGAAgG;IAChG,0CAA0C;IAC1C,iGAAiG;IACjG,8CAA8C;IAC9C,4FAA4F;IAC5F,iCAAiC;IACjC,EAAE;IACF,oGAAoG;IACpG,+FAA+F;CAChG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAEZ,8EAA8E;AAC9E,+FAA+F;AAC/F,8EAA8E;AAE9E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAiC;IAC/D,UAAU,EAAE,UAAU;IACtB,MAAM;IACN,QAAQ;IACR,eAAe,EAAE;QACf,oBAAoB,EAAE,gBAAgB;QACtC,oBAAoB,EAAE,gBAAgB;KACvC;CACF,CAAA;AAED;;;;GAIG;AACH,MAAM,UAAU,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,29 @@
|
|
|
1
|
+
import type { InitiativePresetInputs } from '@cat-factory/contracts';
|
|
2
|
+
/** Read a string input, falling back to `fallback` when absent/blank/non-string. */
|
|
3
|
+
export declare function strInput(inputs: InitiativePresetInputs, key: string, fallback: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* A filesystem-safe, lower-kebab file slug for a derived `.md` target path — the package's shared
|
|
6
|
+
* {@link moduleSlug} (single slug implementation) capped to a filename-sane length. A degenerate
|
|
7
|
+
* (empty / all-punctuation) title falls back to `moduleSlug`'s `module`; the caller deduplicates the
|
|
8
|
+
* composed path via {@link uniqueDocPath} anyway, so two such items never collide on one file.
|
|
9
|
+
*/
|
|
10
|
+
export declare function fileSlug(title: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Ensure a derived `.md` path is unique within one plan: on collision, insert `-2`, `-3`, … before
|
|
13
|
+
* the extension (the `uniqueSlugId` pattern) and record it. Two items whose titles slug to the same
|
|
14
|
+
* name under the same directory would otherwise stamp the SAME `targetPath`, spawning two doc tasks
|
|
15
|
+
* that open competing PRs writing one file. Only derived paths are deduped (planner-authored
|
|
16
|
+
* placement rides the item description, not `targetPath`).
|
|
17
|
+
*/
|
|
18
|
+
export declare function uniqueDocPath(path: string, taken: Set<string>): string;
|
|
19
|
+
/**
|
|
20
|
+
* The per-run gate-override array that human-gates a spawned pipeline at its MERGE step — a FULL
|
|
21
|
+
* boolean array parallel to the pipeline's own `agentKinds` (the [S2] gate-override contract:
|
|
22
|
+
* `ExecutionService.start` rejects a length mismatch), the single `true` on the last `merger` step
|
|
23
|
+
* so the human reviews the CI-green PR right BEFORE it merges. DERIVED from the pipeline's shape
|
|
24
|
+
* (never a hand-maintained parallel array), so it stays correct by construction if a pipeline's
|
|
25
|
+
* shape changes. `undefined` when the pipeline is unknown or has no merge step (leaving its own
|
|
26
|
+
* gates untouched).
|
|
27
|
+
*/
|
|
28
|
+
export declare function mergeGateOverride(pipelineId: string): boolean[] | undefined;
|
|
29
|
+
//# sourceMappingURL=plan-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-helpers.d.ts","sourceRoot":"","sources":["../../src/presets/plan-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAapE,oFAAoF;AACpF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,sBAAsB,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9F;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAatE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,SAAS,CAM3E"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { seedPipelines } from '@cat-factory/kernel';
|
|
2
|
+
import { moduleSlug } from '../repo-ops/render.js';
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Shared helpers for initiative-preset `seedPlan` post-processors (docs-refresh, tech-migration, …).
|
|
5
|
+
// A preset's `seedPlan` stamps per-item spawn DECORATION at ingest; these are the primitives every
|
|
6
|
+
// such hook needs — reading a frozen form value, deriving a repo-safe `.md` filename, de-duplicating
|
|
7
|
+
// derived paths so no two documents target one file, and deriving the merge-step gate override.
|
|
8
|
+
// Kept here (one implementation) rather than copied per preset so a fix to the single-writer dedup or
|
|
9
|
+
// the [S2] gate-override contract lands once and can't drift between presets.
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
/** Read a string input, falling back to `fallback` when absent/blank/non-string. */
|
|
12
|
+
export function strInput(inputs, key, fallback) {
|
|
13
|
+
const value = inputs[key];
|
|
14
|
+
return typeof value === 'string' && value.trim() ? value.trim() : fallback;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A filesystem-safe, lower-kebab file slug for a derived `.md` target path — the package's shared
|
|
18
|
+
* {@link moduleSlug} (single slug implementation) capped to a filename-sane length. A degenerate
|
|
19
|
+
* (empty / all-punctuation) title falls back to `moduleSlug`'s `module`; the caller deduplicates the
|
|
20
|
+
* composed path via {@link uniqueDocPath} anyway, so two such items never collide on one file.
|
|
21
|
+
*/
|
|
22
|
+
export function fileSlug(title) {
|
|
23
|
+
return moduleSlug(title).slice(0, 60);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Ensure a derived `.md` path is unique within one plan: on collision, insert `-2`, `-3`, … before
|
|
27
|
+
* the extension (the `uniqueSlugId` pattern) and record it. Two items whose titles slug to the same
|
|
28
|
+
* name under the same directory would otherwise stamp the SAME `targetPath`, spawning two doc tasks
|
|
29
|
+
* that open competing PRs writing one file. Only derived paths are deduped (planner-authored
|
|
30
|
+
* placement rides the item description, not `targetPath`).
|
|
31
|
+
*/
|
|
32
|
+
export function uniqueDocPath(path, taken) {
|
|
33
|
+
if (!taken.has(path)) {
|
|
34
|
+
taken.add(path);
|
|
35
|
+
return path;
|
|
36
|
+
}
|
|
37
|
+
const dot = path.lastIndexOf('.');
|
|
38
|
+
const base = dot === -1 ? path : path.slice(0, dot);
|
|
39
|
+
const ext = dot === -1 ? '' : path.slice(dot);
|
|
40
|
+
let n = 2;
|
|
41
|
+
let candidate = `${base}-${n}${ext}`;
|
|
42
|
+
while (taken.has(candidate))
|
|
43
|
+
candidate = `${base}-${++n}${ext}`;
|
|
44
|
+
taken.add(candidate);
|
|
45
|
+
return candidate;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The per-run gate-override array that human-gates a spawned pipeline at its MERGE step — a FULL
|
|
49
|
+
* boolean array parallel to the pipeline's own `agentKinds` (the [S2] gate-override contract:
|
|
50
|
+
* `ExecutionService.start` rejects a length mismatch), the single `true` on the last `merger` step
|
|
51
|
+
* so the human reviews the CI-green PR right BEFORE it merges. DERIVED from the pipeline's shape
|
|
52
|
+
* (never a hand-maintained parallel array), so it stays correct by construction if a pipeline's
|
|
53
|
+
* shape changes. `undefined` when the pipeline is unknown or has no merge step (leaving its own
|
|
54
|
+
* gates untouched).
|
|
55
|
+
*/
|
|
56
|
+
export function mergeGateOverride(pipelineId) {
|
|
57
|
+
const kinds = seedPipelines().find((p) => p.id === pipelineId)?.agentKinds;
|
|
58
|
+
if (!kinds)
|
|
59
|
+
return undefined;
|
|
60
|
+
const gateIdx = kinds.lastIndexOf('merger');
|
|
61
|
+
if (gateIdx === -1)
|
|
62
|
+
return undefined;
|
|
63
|
+
return kinds.map((_, i) => i === gateIdx);
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=plan-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-helpers.js","sourceRoot":"","sources":["../../src/presets/plan-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAElD,8EAA8E;AAC9E,qGAAqG;AACrG,mGAAmG;AACnG,qGAAqG;AACrG,gGAAgG;AAChG,sGAAsG;AACtG,8EAA8E;AAC9E,8EAA8E;AAE9E,oFAAoF;AACpF,MAAM,UAAU,QAAQ,CAAC,MAA8B,EAAE,GAAW,EAAE,QAAgB;IACpF,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAA;AAC5E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAa;IACpC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AACvC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,KAAkB;IAC5D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,KA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
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { InitiativePresetRegistration } from '@cat-factory/kernel';
|
|
2
|
+
/** The tech-migration preset id (the SPA picker option + the create-flow lookup key). */
|
|
3
|
+
export declare const TECH_MIGRATION_PRESET_ID = "preset_tech_migration";
|
|
4
|
+
/**
|
|
5
|
+
* The tech-migration preset registration bundle: the descriptor above, the T7 `seedMigrationPlan`
|
|
6
|
+
* post-processor as `seedPlan` (per-item spawn decoration + the confidence-case wiring), and the T5
|
|
7
|
+
* methodology prompt pack as `promptAdditions`. No `detect` hook (see the file header).
|
|
8
|
+
*/
|
|
9
|
+
export declare const TECH_MIGRATION_PRESET: InitiativePresetRegistration;
|
|
10
|
+
/**
|
|
11
|
+
* Register the tech-migration preset. Idempotent (the registry replaces by id), so importing this
|
|
12
|
+
* module (which self-registers below, the `@cat-factory/gates` pattern) and calling this explicitly
|
|
13
|
+
* are safe to combine. Tests that `clearRegisteredInitiativePresets()` call this to restore it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerTechMigrationPreset(): void;
|
|
16
|
+
//# sourceMappingURL=preset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../../src/presets/tech-migration/preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AAiDvE,yFAAyF;AACzF,eAAO,MAAM,wBAAwB,0BAA0B,CAAA;AAgN/D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,4BAInC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { INITIATIVE_PIPELINE_ID, registerInitiativePreset } from '@cat-factory/kernel';
|
|
2
|
+
import { MIGRATION_FRAGMENT_IDS } from '@cat-factory/prompt-fragments';
|
|
3
|
+
import { MIGRATION_PHASE_IDS } from './phases.js';
|
|
4
|
+
import { MIGRATION_PROMPT_ADDITIONS } from './prompt-additions.js';
|
|
5
|
+
import { DEFAULT_MIGRATION_DOCS_DIR, FIELD_HUMAN_REVIEW, FIELD_MIGRATION_DOCS_DIR, seedMigrationPlan, } from './seed-plan.js';
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// The `preset_tech_migration` initiative preset (tech-migration slice T8) — the second real
|
|
8
|
+
// consumer of the initiative-preset primitives, and the one that proves "preset as a MANDATED
|
|
9
|
+
// MULTI-PHASE METHODOLOGY" (where docs-refresh proved "preset as form + typed spawned tasks").
|
|
10
|
+
//
|
|
11
|
+
// A technological migration — swapping a database engine, a framework major, a runtime, or a
|
|
12
|
+
// load-bearing library — is the highest-risk initiative shape the product runs: the change is
|
|
13
|
+
// wide, mostly mechanical, and catastrophic when observable behaviour drifts. What makes it safe
|
|
14
|
+
// is the discipline around it (know the blast zone, pin behaviour BEFORE the swap, decide the
|
|
15
|
+
// compat degree deliberately, deliver, then remove the old path), and that discipline is invariant
|
|
16
|
+
// across migrations. This preset encodes HOW: the user tells the form WHICH migration, and the
|
|
17
|
+
// preset mandates the five-phase plan shape + the confidence-case control point.
|
|
18
|
+
//
|
|
19
|
+
// The division of labour is inverted from a naive "human signs off on coverage" gate: estimating a
|
|
20
|
+
// migration's blast zone by eye is near-impossible for a human but exactly what an agent is good
|
|
21
|
+
// at, so the LLM performs the whole-codebase impact/coverage sweep and submits an evidence-backed
|
|
22
|
+
// confidence case, and the human's job is to REVISE that proof (challenge grounding, reject
|
|
23
|
+
// hand-waving, then approve). Hence `interview: 'full'` + `humanReviewDefault: true` + the
|
|
24
|
+
// always-gated confidence-case / transition-design documents (wired by `seedMigrationPlan`).
|
|
25
|
+
//
|
|
26
|
+
// This slice is pure WIRING — it composes the already-landed pieces and adds nothing new:
|
|
27
|
+
// - the plan SHAPE is the wire `phaseTemplate` (the generic T1/T2 machinery enforces it — this
|
|
28
|
+
// preset NEVER hand-rolls phase shaping), keyed off the canonical `MIGRATION_PHASE_IDS` (T5);
|
|
29
|
+
// - the per-item spawn DECORATION is `seedMigrationPlan` (T7), keyed off `item.phaseId`;
|
|
30
|
+
// - the deep per-kind methodology is `MIGRATION_PROMPT_ADDITIONS` (T5), off the wire descriptor;
|
|
31
|
+
// - the behaviour-preservation fragments are `MIGRATION_FRAGMENT_IDS` (T4).
|
|
32
|
+
// It registers as an import side effect (the `@cat-factory/gates` / docs-refresh pattern), so both
|
|
33
|
+
// runtimes pick it up with no per-facade wiring and cannot drift.
|
|
34
|
+
//
|
|
35
|
+
// NO `detect` hook (so the descriptor's derived `probe` is false): a create-time probe could read
|
|
36
|
+
// only the FROM-side stack, never the destination or the migration intent, and the analyst
|
|
37
|
+
// rediscovers the whole blast zone far more thoroughly at planning time — see the tracker's
|
|
38
|
+
// "Out of scope" for why the former T6 detector was cut.
|
|
39
|
+
//
|
|
40
|
+
// See `docs/initiatives/tech-migration-preset-and-mssql-postgres-pilot.md` (slice T8).
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
/** The tech-migration preset id (the SPA picker option + the create-flow lookup key). */
|
|
43
|
+
export const TECH_MIGRATION_PRESET_ID = 'preset_tech_migration';
|
|
44
|
+
// Form field keys. The two consumed by `seedMigrationPlan` (T7) — `migrationDocsDir` + `humanReview`
|
|
45
|
+
// — are defined ONCE there and imported here so the field key / default never drifts between the
|
|
46
|
+
// form descriptor and the plan post-processor. The rest are steering-only: they freeze on
|
|
47
|
+
// `presetInputs` and reach the interviewer/analyst/planner through the seeded qa digest.
|
|
48
|
+
const FIELD_MIGRATION_KIND = 'migrationKind';
|
|
49
|
+
const FIELD_FROM_TECH = 'fromTech';
|
|
50
|
+
const FIELD_TO_TECH = 'toTech';
|
|
51
|
+
const FIELD_MIGRATION_DETAIL = 'migrationDetail';
|
|
52
|
+
const FIELD_STORED_PROC_POLICY = 'storedProcPolicy';
|
|
53
|
+
const FIELD_COMPAT_POSTURE = 'compatPosture';
|
|
54
|
+
const FIELD_BEHAVIOUR_CONTRACT = 'behaviourContract';
|
|
55
|
+
const FIELD_COVERAGE_BAR = 'coverageBar';
|
|
56
|
+
const FIELD_SCOPE_HINT = 'scopeHint';
|
|
57
|
+
// Select option values (referenced by both the options list and the `showWhen` condition).
|
|
58
|
+
const MIGRATION_KIND_DATABASE = 'database';
|
|
59
|
+
const STORED_PROC_POLICY_REPLACE = 'replace-with-app-code';
|
|
60
|
+
const COVERAGE_BAR_STRICT = 'strict';
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
62
|
+
// Descriptor (the SPA-facing form + planning binding + defaults + plan-shape template).
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
const DESCRIPTOR = {
|
|
65
|
+
id: TECH_MIGRATION_PRESET_ID,
|
|
66
|
+
presentation: {
|
|
67
|
+
label: 'Technological migration',
|
|
68
|
+
icon: 'i-lucide-database-zap',
|
|
69
|
+
color: '#f59e0b',
|
|
70
|
+
description: 'Swap a load-bearing technology (database, framework major, runtime) behind a behaviour-preservation safety net: blast zone → coverage → transition design → delivery → decommission.',
|
|
71
|
+
},
|
|
72
|
+
fields: [
|
|
73
|
+
{
|
|
74
|
+
key: FIELD_MIGRATION_KIND,
|
|
75
|
+
label: 'Which migration',
|
|
76
|
+
help: 'The kind of load-bearing technology being swapped.',
|
|
77
|
+
type: 'select',
|
|
78
|
+
required: true,
|
|
79
|
+
options: [
|
|
80
|
+
{ value: MIGRATION_KIND_DATABASE, label: 'Database engine' },
|
|
81
|
+
{ value: 'framework-major', label: 'Framework major version' },
|
|
82
|
+
{ value: 'runtime', label: 'Language runtime' },
|
|
83
|
+
{ value: 'library-swap', label: 'Load-bearing library' },
|
|
84
|
+
{ value: 'other', label: 'Other' },
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
key: FIELD_FROM_TECH,
|
|
89
|
+
label: 'From',
|
|
90
|
+
help: 'The technology being migrated away from.',
|
|
91
|
+
type: 'text',
|
|
92
|
+
required: true,
|
|
93
|
+
placeholder: 'e.g. MSSQL 2019 + stored procedures',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
key: FIELD_TO_TECH,
|
|
97
|
+
label: 'To',
|
|
98
|
+
help: 'The technology being migrated to.',
|
|
99
|
+
type: 'text',
|
|
100
|
+
required: true,
|
|
101
|
+
placeholder: 'e.g. PostgreSQL 16',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
key: FIELD_MIGRATION_DETAIL,
|
|
105
|
+
label: 'Scope & concerns (optional)',
|
|
106
|
+
help: 'Anything the analyst should dig into — specific subsystems, known risks, deadlines.',
|
|
107
|
+
type: 'textarea',
|
|
108
|
+
placeholder: 'e.g. the reporting queries and the nightly settlement job are the risky parts',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: FIELD_STORED_PROC_POLICY,
|
|
112
|
+
label: 'Stored-procedure policy',
|
|
113
|
+
help: 'How to handle stored procedures during the swap.',
|
|
114
|
+
type: 'select',
|
|
115
|
+
default: STORED_PROC_POLICY_REPLACE,
|
|
116
|
+
options: [
|
|
117
|
+
{ value: STORED_PROC_POLICY_REPLACE, label: 'Replace with application code + SQL' },
|
|
118
|
+
{ value: 'port-to-target', label: 'Port to the target engine' },
|
|
119
|
+
{ value: 'decide-per-object', label: 'Decide per object' },
|
|
120
|
+
],
|
|
121
|
+
showWhen: { key: FIELD_MIGRATION_KIND, equals: MIGRATION_KIND_DATABASE },
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
key: FIELD_COMPAT_POSTURE,
|
|
125
|
+
label: 'Compatibility posture (optional)',
|
|
126
|
+
help: 'How long the old and new technologies run side by side. Leave unset for phase 3 to recommend.',
|
|
127
|
+
type: 'select',
|
|
128
|
+
options: [
|
|
129
|
+
{ value: 'big-bang', label: 'Big-bang cutover' },
|
|
130
|
+
{ value: 'dual-run', label: 'Dual-run (old + new in parallel)' },
|
|
131
|
+
{ value: 'adapter-layer', label: 'Adapter layer' },
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
key: FIELD_BEHAVIOUR_CONTRACT,
|
|
136
|
+
label: 'Behaviour that must not change (optional)',
|
|
137
|
+
help: 'The observable behaviour the migration must preserve — the phase-2 characterization target.',
|
|
138
|
+
type: 'textarea',
|
|
139
|
+
placeholder: 'e.g. result ordering, error codes the client branches on, pagination stability',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
key: FIELD_MIGRATION_DOCS_DIR,
|
|
143
|
+
label: 'Migration docs directory',
|
|
144
|
+
help: 'Where the blast-zone / confidence-case / transition-design artifacts are committed.',
|
|
145
|
+
type: 'path',
|
|
146
|
+
required: true,
|
|
147
|
+
default: DEFAULT_MIGRATION_DOCS_DIR,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: FIELD_COVERAGE_BAR,
|
|
151
|
+
label: 'Coverage bar',
|
|
152
|
+
help: 'How strict the behaviour-coverage requirement is before delivery may begin.',
|
|
153
|
+
type: 'select',
|
|
154
|
+
required: true,
|
|
155
|
+
default: COVERAGE_BAR_STRICT,
|
|
156
|
+
options: [
|
|
157
|
+
{ value: COVERAGE_BAR_STRICT, label: 'Strict — every touchpoint has named covering tests' },
|
|
158
|
+
{ value: 'pragmatic', label: 'Pragmatic — waivers allowed, each justified' },
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
key: FIELD_HUMAN_REVIEW,
|
|
163
|
+
label: 'Review each change before it merges',
|
|
164
|
+
help: 'On by default for a migration — the confidence case and transition design are always human-gated; this additionally gates the informational blast-zone report and the delivery PRs.',
|
|
165
|
+
type: 'checkbox',
|
|
166
|
+
default: 'true',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
key: FIELD_SCOPE_HINT,
|
|
170
|
+
label: 'Scope hint (optional)',
|
|
171
|
+
help: 'Which services or areas to focus on. Steers the analyst’s blast-zone sweep.',
|
|
172
|
+
type: 'textarea',
|
|
173
|
+
placeholder: 'e.g. the orders and billing services only',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
// A migration needs exactly interviewer → analyst → planner(gate) → committer, so it binds the
|
|
177
|
+
// EXISTING `pl_initiative` planning pipeline — no new planning pipeline is registered; all
|
|
178
|
+
// deviation is data (this descriptor + the phase template) and hooks (`seedMigrationPlan` +
|
|
179
|
+
// `promptAdditions`).
|
|
180
|
+
planningPipelineId: INITIATIVE_PIPELINE_ID,
|
|
181
|
+
// Full interview: the form captures the enumerable facts, the interviewer digs into the fuzzy
|
|
182
|
+
// ones (downtime tolerance, data-migration constraints, compat posture) — see the T5 interviewer
|
|
183
|
+
// prompt addition. The create flow seeds the qa digest so the interviewer builds on the form
|
|
184
|
+
// answers rather than re-asking them (the generic T3 seeding).
|
|
185
|
+
interview: 'full',
|
|
186
|
+
// Migrations stay human-in-the-loop by design; the human audits the confidence case + design.
|
|
187
|
+
humanReviewDefault: true,
|
|
188
|
+
// The full behaviour-preservation / migration-discipline / confidence-case fragment set (T4).
|
|
189
|
+
// `seedMigrationPlan` stamps the per-item SUBSET that applies to each producer at ingest, so this
|
|
190
|
+
// is the superset available to the planning steps.
|
|
191
|
+
defaultFragmentIds: [...MIGRATION_FRAGMENT_IDS],
|
|
192
|
+
// Conservative execution policy: low concurrency (migration PRs collide), risky/complex items
|
|
193
|
+
// escalate to the full pipeline, and an unestimated item fails SAFE to thoroughness.
|
|
194
|
+
policyDefaults: {
|
|
195
|
+
maxConcurrent: 2,
|
|
196
|
+
defaultPipelineId: 'pl_quick',
|
|
197
|
+
rules: [{ pipelineId: 'pl_full', minRisk: 0.6, minComplexity: 0.6 }],
|
|
198
|
+
onMissingEstimate: 'strongest',
|
|
199
|
+
},
|
|
200
|
+
// Plan SHAPE (T1/T2): the five migration phases, ALL required, in methodology order, no extras.
|
|
201
|
+
// The ids are the canonical `MIGRATION_PHASE_IDS` (T5) — matched VERBATIM by the generic ingest
|
|
202
|
+
// normalizer against the planner's phases, and keyed off by `seedMigrationPlan`'s decoration.
|
|
203
|
+
// The generic normalizer reorders to this order and rejects a missing phase / an unknown extra;
|
|
204
|
+
// the deep per-phase methodology stays off the descriptor in `MIGRATION_PROMPT_ADDITIONS`.
|
|
205
|
+
phaseTemplate: {
|
|
206
|
+
phases: [
|
|
207
|
+
{
|
|
208
|
+
id: MIGRATION_PHASE_IDS.blastZone,
|
|
209
|
+
title: 'Blast zone',
|
|
210
|
+
goal: 'Enumerate every directly and transitively affected touchpoint of the technology being swapped and commit the inventory.',
|
|
211
|
+
required: true,
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: MIGRATION_PHASE_IDS.coverage,
|
|
215
|
+
title: 'Coverage hardening',
|
|
216
|
+
goal: 'Pin the observable behaviour over the blast zone with tests at a seam above the swapped layer, closing with the confidence case.',
|
|
217
|
+
required: true,
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
id: MIGRATION_PHASE_IDS.transitionDesign,
|
|
221
|
+
title: 'Compatibility & transition design',
|
|
222
|
+
goal: 'Decide the backwards-compatibility degree and design the migration / cutover path.',
|
|
223
|
+
required: true,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: MIGRATION_PHASE_IDS.delivery,
|
|
227
|
+
title: 'Delivery',
|
|
228
|
+
goal: 'Execute the swap per the approved design, with the behaviour suite green throughout.',
|
|
229
|
+
required: true,
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: MIGRATION_PHASE_IDS.verifyDecommission,
|
|
233
|
+
title: 'Verify & decommission',
|
|
234
|
+
goal: 'Prove behaviour parity on the new target, flip defaults / CI, and remove the old path per the compatibility posture.',
|
|
235
|
+
required: true,
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
allowAdditionalPhases: false,
|
|
239
|
+
},
|
|
240
|
+
};
|
|
241
|
+
// ---------------------------------------------------------------------------
|
|
242
|
+
// Registration (the module-global preset seam — mirrors the `@cat-factory/gates` side-effect).
|
|
243
|
+
// ---------------------------------------------------------------------------
|
|
244
|
+
/**
|
|
245
|
+
* The tech-migration preset registration bundle: the descriptor above, the T7 `seedMigrationPlan`
|
|
246
|
+
* post-processor as `seedPlan` (per-item spawn decoration + the confidence-case wiring), and the T5
|
|
247
|
+
* methodology prompt pack as `promptAdditions`. No `detect` hook (see the file header).
|
|
248
|
+
*/
|
|
249
|
+
export const TECH_MIGRATION_PRESET = {
|
|
250
|
+
descriptor: DESCRIPTOR,
|
|
251
|
+
seedPlan: seedMigrationPlan,
|
|
252
|
+
promptAdditions: MIGRATION_PROMPT_ADDITIONS,
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Register the tech-migration preset. Idempotent (the registry replaces by id), so importing this
|
|
256
|
+
* module (which self-registers below, the `@cat-factory/gates` pattern) and calling this explicitly
|
|
257
|
+
* are safe to combine. Tests that `clearRegisteredInitiativePresets()` call this to restore it.
|
|
258
|
+
*/
|
|
259
|
+
export function registerTechMigrationPreset() {
|
|
260
|
+
registerInitiativePreset(TECH_MIGRATION_PRESET);
|
|
261
|
+
}
|
|
262
|
+
// Side-effect registration: importing `@cat-factory/agents` (which re-exports from this module) is
|
|
263
|
+
// enough to make the migration preset available in every deployment — no per-facade wiring, so the
|
|
264
|
+
// two runtimes cannot drift on it.
|
|
265
|
+
registerTechMigrationPreset();
|
|
266
|
+
//# sourceMappingURL=preset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.js","sourceRoot":"","sources":["../../../src/presets/tech-migration/preset.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB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I,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,EAAE,EAAE,mBAAmB,CAAC,gBAAgB;gBACxC,KAAK,EAAE,mCAAmC;gBAC1C,IAAI,EAAE,oFAAoF;gBAC1F,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,EAAE,EAAE,mBAAmB,CAAC,QAAQ;gBAChC,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,sFAAsF;gBAC5F,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,EAAE,EAAE,mBAAmB,CAAC,kBAAkB;gBAC1C,KAAK,EAAE,uBAAuB;gBAC9B,IAAI,EAAE,sHAAsH;gBAC5H,QAAQ,EAAE,IAAI;aACf;SACF;QACD,qBAAqB,EAAE,KAAK;KAC7B;CACF,CAAA;AAED,8EAA8E;AAC9E,+FAA+F;AAC/F,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAiC;IACjE,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,iBAAiB;IAC3B,eAAe,EAAE,0BAA0B;CAC5C,CAAA;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B;IACzC,wBAAwB,CAAC,qBAAqB,CAAC,CAAA;AACjD,CAAC;AAED,mGAAmG;AACnG,mGAAmG;AACnG,mCAAmC;AACnC,2BAA2B,EAAE,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InitiativePlanDraft, InitiativePresetInputs } from '@cat-factory/contracts';
|
|
2
|
+
/** Field key on the frozen `presetInputs`: where the migration's `.md` artifacts are committed. */
|
|
3
|
+
export declare const FIELD_MIGRATION_DOCS_DIR = "migrationDocsDir";
|
|
4
|
+
/** Field key on the frozen `presetInputs`: the human-review opt-in (defaults ON for a migration). */
|
|
5
|
+
export declare const FIELD_HUMAN_REVIEW = "humanReview";
|
|
6
|
+
/** The default in-repo directory the migration artifacts live under (the pilot value). */
|
|
7
|
+
export declare const DEFAULT_MIGRATION_DOCS_DIR = "docs/migration";
|
|
8
|
+
/**
|
|
9
|
+
* The per-run gate-override that human-gates the doc-quick pipeline at its merge step, kept as a
|
|
10
|
+
* named export so T8's descriptor review mapping reuses the SAME derivation. Delegates to the shared
|
|
11
|
+
* {@link mergeGateOverride} (single implementation across presets).
|
|
12
|
+
*/
|
|
13
|
+
export declare function migrationReviewGates(pipelineId: string): boolean[] | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The plan post-processor for `preset_tech_migration`. See the file header for the per-phase
|
|
16
|
+
* archetypes and the four responsibilities. Pure + total; never mutates its input.
|
|
17
|
+
*/
|
|
18
|
+
export declare function seedMigrationPlan(draft: InitiativePlanDraft, inputs: InitiativePresetInputs): InitiativePlanDraft;
|
|
19
|
+
//# sourceMappingURL=seed-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seed-plan.d.ts","sourceRoot":"","sources":["../../../src/presets/tech-migration/seed-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,wBAAwB,CAAA;AA6C/B,mGAAmG;AACnG,eAAO,MAAM,wBAAwB,qBAAqB,CAAA;AAC1D,qGAAqG;AACrG,eAAO,MAAM,kBAAkB,gBAAgB,CAAA;AAC/C,0FAA0F;AAC1F,eAAO,MAAM,0BAA0B,mBAAmB,CAAA;AA6D1D;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,SAAS,CAE9E;AAkDD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,sBAAsB,GAC7B,mBAAmB,CAqGrB"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { DOCUMENT_QUICK_PIPELINE_ID, joinRepoPath } from '@cat-factory/kernel';
|
|
2
|
+
import { migrationFragmentIdsFor } from '@cat-factory/prompt-fragments';
|
|
3
|
+
import { fileSlug, mergeGateOverride, strInput, uniqueDocPath } from '../plan-helpers.js';
|
|
4
|
+
import { MIGRATION_PHASE_IDS } from './phases.js';
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// `seedMigrationPlan` (tech-migration slice T7) — the `preset_tech_migration` plan POST-PROCESSOR.
|
|
7
|
+
//
|
|
8
|
+
// It runs at ingest AFTER the generic phase-template normalizer (T2 owns plan SHAPE — which phases,
|
|
9
|
+
// in what order) and stamps per-item spawn DECORATION only, exactly the T2-does-shape / T7-does-
|
|
10
|
+
// decoration split the parent's docs-refresh pilot established (see `../docs-refresh/preset.ts`).
|
|
11
|
+
// It NEVER touches phases: shape enforcement is the template's job, re-run after this hook.
|
|
12
|
+
//
|
|
13
|
+
// The migration methodology gives each phase a fixed archetype (see `phases.ts`):
|
|
14
|
+
// 1. `migration-blast-zone` — a single blast-zone REPORT document.
|
|
15
|
+
// 2. `migration-coverage` — coverage CODING items (characterization tests) closed by the
|
|
16
|
+
// single human-gated CONFIDENCE-CASE document.
|
|
17
|
+
// 3. `migration-transition-design`— the human-gated transition-design DOCUMENT(s).
|
|
18
|
+
// 4. `migration-delivery` — delivery CODING items (the swap itself).
|
|
19
|
+
// 5. `migration-verify-decommission` — parity / CI-flip / decommission CODING items.
|
|
20
|
+
//
|
|
21
|
+
// So `seedMigrationPlan`'s responsibilities are:
|
|
22
|
+
// (a) stamp each item's spawn decoration keyed off its phase — the report/design/confidence
|
|
23
|
+
// DOCUMENTS (declared once in `DOC_PHASE_DECORATIONS`) get `taskType: 'document'` + a `.md`
|
|
24
|
+
// `targetPath` under the frozen `migrationDocsDir` and the `pl_document_quick` pipeline; the
|
|
25
|
+
// CODING items are left for the policy's estimate rules to route (no forced pipeline). Each
|
|
26
|
+
// item gets the `migration.*` fragments that APPLY to its primary producer (`doc-writer` for
|
|
27
|
+
// documents, `coder` for coding) — honouring each fragment's `appliesTo` (see `withFragments`).
|
|
28
|
+
// (b) wire the confidence case — ensure phase 2 closes with a single confidence-case document
|
|
29
|
+
// that `dependsOn` every surviving phase-2 coverage item and is human-gated (injecting it if
|
|
30
|
+
// the planner omitted it).
|
|
31
|
+
// (c) apply the phase-2 coverage granularity cap (≤ 8 items), scrubbing dropped ids from every
|
|
32
|
+
// surviving item's `dependsOn` so no dangling reference reaches `validatePlanDraft`.
|
|
33
|
+
// (d) honour the `humanReview` input on the informational (blast-zone) document, while the
|
|
34
|
+
// confidence-case + transition-design documents stay human-gated ALWAYS (they are the
|
|
35
|
+
// methodology's coverage→delivery control points, per the tracker gotcha — never optional).
|
|
36
|
+
//
|
|
37
|
+
// Pure + total: a deterministic function of the (shaped) draft + frozen inputs, so it is
|
|
38
|
+
// replay-safe and its output is re-parsed + re-normalized at the ingest trust boundary (an unsafe
|
|
39
|
+
// `targetPath` a bug composed is rejected there by `isSafeDocPath`, exactly as in docs-refresh).
|
|
40
|
+
// Lands UNWIRED (no preset registration) — T8 registers `preset_tech_migration` and hooks this in.
|
|
41
|
+
// See `docs/initiatives/tech-migration-preset-and-mssql-postgres-pilot.md`.
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
/** Field key on the frozen `presetInputs`: where the migration's `.md` artifacts are committed. */
|
|
44
|
+
export const FIELD_MIGRATION_DOCS_DIR = 'migrationDocsDir';
|
|
45
|
+
/** Field key on the frozen `presetInputs`: the human-review opt-in (defaults ON for a migration). */
|
|
46
|
+
export const FIELD_HUMAN_REVIEW = 'humanReview';
|
|
47
|
+
/** The default in-repo directory the migration artifacts live under (the pilot value). */
|
|
48
|
+
export const DEFAULT_MIGRATION_DOCS_DIR = 'docs/migration';
|
|
49
|
+
/** The single canonical artifact filenames — one writer per file (the tracker's single-writer rule). */
|
|
50
|
+
const BLAST_ZONE_DOC = 'blast-zone.md';
|
|
51
|
+
const CONFIDENCE_CASE_DOC = 'confidence-case.md';
|
|
52
|
+
const TRANSITION_DESIGN_DOC = 'transition-design.md';
|
|
53
|
+
/** The maximum number of coverage items phase 2 keeps (the granularity cap; extras are dropped). */
|
|
54
|
+
const MAX_COVERAGE_ITEMS = 8;
|
|
55
|
+
/** The base id the injected confidence-case item is derived from (made unique on collision). */
|
|
56
|
+
const CONFIDENCE_CASE_ITEM_BASE = 'confidence-case';
|
|
57
|
+
const DOC_PHASE_DECORATIONS = {
|
|
58
|
+
// The blast-zone REPORT — informational, so its gate follows the `humanReview` opt-in.
|
|
59
|
+
[MIGRATION_PHASE_IDS.blastZone]: {
|
|
60
|
+
docKind: 'technical',
|
|
61
|
+
canonicalDoc: BLAST_ZONE_DOC,
|
|
62
|
+
gate: 'humanReview',
|
|
63
|
+
},
|
|
64
|
+
// The transition-design DOCUMENT(s) — always human-gated (the compat-posture control point).
|
|
65
|
+
[MIGRATION_PHASE_IDS.transitionDesign]: {
|
|
66
|
+
docKind: 'design',
|
|
67
|
+
canonicalDoc: TRANSITION_DESIGN_DOC,
|
|
68
|
+
gate: 'always',
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Whether a phase-2 item is (already) the confidence case the planner was steered to author — the
|
|
73
|
+
* closing coverage item. Matched on the title (the only signal that survives `coerceInitiativePlan`,
|
|
74
|
+
* which drops planner-authored `spawn`), ANCHORED at the title start (after optional leading verbs /
|
|
75
|
+
* articles) so a coverage CODING item that merely MENTIONS the confidence case (e.g. "Characterize
|
|
76
|
+
* the orders API against the confidence case") is NOT misclassified and silently hijacked into the
|
|
77
|
+
* single confidence document. The planner is steered to title it plainly ("Confidence case" /
|
|
78
|
+
* "Author the confidence case"), which this still matches; a match is canonicalized rather than
|
|
79
|
+
* duplicated, and when none matches `seedMigrationPlan` injects one.
|
|
80
|
+
*/
|
|
81
|
+
function isConfidenceCaseItem(item) {
|
|
82
|
+
return /^(?:(?:author|write|compile|assemble|prepare|build|create|draft|the|a)\s+)*confidence[-\s]?case\b/i.test(item.title.trim());
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The per-run gate-override that human-gates the doc-quick pipeline at its merge step, kept as a
|
|
86
|
+
* named export so T8's descriptor review mapping reuses the SAME derivation. Delegates to the shared
|
|
87
|
+
* {@link mergeGateOverride} (single implementation across presets).
|
|
88
|
+
*/
|
|
89
|
+
export function migrationReviewGates(pipelineId) {
|
|
90
|
+
return mergeGateOverride(pipelineId);
|
|
91
|
+
}
|
|
92
|
+
/** Assign a unique id derived from `base`, suffixing `-2`, `-3`, … on collision (the coerce pattern). */
|
|
93
|
+
function uniqueId(base, taken) {
|
|
94
|
+
let candidate = base;
|
|
95
|
+
let n = 2;
|
|
96
|
+
while (taken.has(candidate))
|
|
97
|
+
candidate = `${base}-${n++}`;
|
|
98
|
+
taken.add(candidate);
|
|
99
|
+
return candidate;
|
|
100
|
+
}
|
|
101
|
+
/** Stamp the migration fragments that apply to `agentKind` onto an item's spawn, preserving the rest. */
|
|
102
|
+
function withFragments(item, agentKind) {
|
|
103
|
+
return { ...item, spawn: { ...item.spawn, fragmentIds: migrationFragmentIdsFor(agentKind) } };
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Decorate an item as a committed migration DOCUMENT: `taskType: 'document'` + the doc-quick
|
|
107
|
+
* pipeline + the given `.md` `targetPath` and `docKind`, the doc-writer migration fragments, and
|
|
108
|
+
* the merge gate per the `gate` policy. An `'always'`-gated document whose pipeline has NO merge
|
|
109
|
+
* step to place the review on is a misconfiguration that would silently ship the control point
|
|
110
|
+
* unattended, so it THROWS rather than degrading to ungated (the invariant is enforced, not hoped).
|
|
111
|
+
*/
|
|
112
|
+
function asDocument(item, docKind, targetPath, gate, humanReview) {
|
|
113
|
+
const gates = gate === 'always' || humanReview ? mergeGateOverride(DOCUMENT_QUICK_PIPELINE_ID) : undefined;
|
|
114
|
+
if (gate === 'always' && !gates) {
|
|
115
|
+
throw new Error(`Migration document pipeline '${DOCUMENT_QUICK_PIPELINE_ID}' has no merge step to gate — the always-gated confidence-case / transition-design control point cannot be enforced.`);
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
...item,
|
|
119
|
+
pipelineId: DOCUMENT_QUICK_PIPELINE_ID,
|
|
120
|
+
spawn: {
|
|
121
|
+
...item.spawn,
|
|
122
|
+
taskType: 'document',
|
|
123
|
+
taskTypeFields: { docKind, targetPath },
|
|
124
|
+
fragmentIds: migrationFragmentIdsFor('doc-writer'),
|
|
125
|
+
...(gates ? { gates } : {}),
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The plan post-processor for `preset_tech_migration`. See the file header for the per-phase
|
|
131
|
+
* archetypes and the four responsibilities. Pure + total; never mutates its input.
|
|
132
|
+
*/
|
|
133
|
+
export function seedMigrationPlan(draft, inputs) {
|
|
134
|
+
const docsDir = strInput(inputs, FIELD_MIGRATION_DOCS_DIR, DEFAULT_MIGRATION_DOCS_DIR);
|
|
135
|
+
// Human review defaults ON for a migration (a `false` value opts out); the confidence-case +
|
|
136
|
+
// design gates below ignore this — they are intrinsic control points, gated regardless.
|
|
137
|
+
const humanReview = inputs[FIELD_HUMAN_REVIEW] !== false;
|
|
138
|
+
// --- (c) Phase-2 coverage cap + confidence-case identification --------------------------------
|
|
139
|
+
const coverageAll = draft.items.filter((i) => i.phaseId === MIGRATION_PHASE_IDS.coverage && !isConfidenceCaseItem(i));
|
|
140
|
+
const coverageKept = coverageAll.slice(0, MAX_COVERAGE_ITEMS);
|
|
141
|
+
const droppedIds = new Set(coverageAll
|
|
142
|
+
.slice(MAX_COVERAGE_ITEMS)
|
|
143
|
+
.map((i) => i.id)
|
|
144
|
+
.filter((id) => !!id));
|
|
145
|
+
const keptCoverageIds = coverageKept.map((i) => i.id).filter((id) => !!id);
|
|
146
|
+
// The existing planner-authored confidence case (if any); the FIRST match is canonicalized, any
|
|
147
|
+
// further matches fall through to coverage decoration (harmless extra coding items).
|
|
148
|
+
const existingConfidence = draft.items.find((i) => i.phaseId === MIGRATION_PHASE_IDS.coverage && isConfidenceCaseItem(i));
|
|
149
|
+
const takenIds = new Set(draft.items.map((i) => i.id).filter((id) => !!id));
|
|
150
|
+
const confidenceId = existingConfidence?.id ?? uniqueId(CONFIDENCE_CASE_ITEM_BASE, takenIds);
|
|
151
|
+
// The items we will decorate (everything except the capped-away coverage and the confidence case,
|
|
152
|
+
// which is held out to be appended LAST). Order is preserved from the draft.
|
|
153
|
+
const keptItems = draft.items.filter((item) => !(item.id && droppedIds.has(item.id)) && item !== existingConfidence);
|
|
154
|
+
// Pre-assign each document item's derived `.md` path: the first item of a document phase gets the
|
|
155
|
+
// phase's canonical filename, extras a title-derived slug, all de-duplicated across the whole plan
|
|
156
|
+
// so no two documents ever target one file (the single-writer rule). Derived up front (indexed by
|
|
157
|
+
// position within the phase) rather than tracked with mutable "first seen" flags in the decorate
|
|
158
|
+
// pass. The confidence-case path is allocated after, from the same `usedPaths` set.
|
|
159
|
+
const usedPaths = new Set();
|
|
160
|
+
const docPaths = new Map();
|
|
161
|
+
for (const [phaseId, deco] of Object.entries(DOC_PHASE_DECORATIONS)) {
|
|
162
|
+
keptItems
|
|
163
|
+
.filter((item) => item.phaseId === phaseId)
|
|
164
|
+
.forEach((item, idx) => {
|
|
165
|
+
const derived = idx === 0
|
|
166
|
+
? joinRepoPath(docsDir, deco.canonicalDoc)
|
|
167
|
+
: `${joinRepoPath(docsDir, fileSlug(item.title))}.md`;
|
|
168
|
+
docPaths.set(item, uniqueDocPath(derived, usedPaths));
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/** Scrub `dependsOn` of any capped-away coverage ids so no dangling reference reaches ingest. */
|
|
172
|
+
const scrubDeps = (item) => item.dependsOn?.some((d) => droppedIds.has(d))
|
|
173
|
+
? { ...item, dependsOn: item.dependsOn.filter((d) => !droppedIds.has(d)) }
|
|
174
|
+
: item;
|
|
175
|
+
const decorate = (raw) => {
|
|
176
|
+
const item = scrubDeps(raw);
|
|
177
|
+
const deco = DOC_PHASE_DECORATIONS[item.phaseId];
|
|
178
|
+
if (deco)
|
|
179
|
+
return asDocument(item, deco.docKind, docPaths.get(item), deco.gate, humanReview);
|
|
180
|
+
// Coverage / delivery / verify-decommission are ordinary CODING items: no forced pipeline (the
|
|
181
|
+
// policy's estimate rules route them), just the coder migration fragments. The coverage→delivery
|
|
182
|
+
// human control is the confidence-case gate, not a per-PR gate.
|
|
183
|
+
return withFragments(item, 'coder');
|
|
184
|
+
};
|
|
185
|
+
const items = keptItems.map(decorate);
|
|
186
|
+
// --- (b) The confidence case: the single, human-gated coverage→delivery proof -----------------
|
|
187
|
+
const confidenceBase = existingConfidence
|
|
188
|
+
? { ...existingConfidence, id: confidenceId }
|
|
189
|
+
: {
|
|
190
|
+
id: confidenceId,
|
|
191
|
+
phaseId: MIGRATION_PHASE_IDS.coverage,
|
|
192
|
+
title: 'Confidence case',
|
|
193
|
+
description: 'Sweep the coverage over the blast zone and commit the evidence-backed confidence case (per-touchpoint named tests, gaps and waivers justified against the coverage bar, risk mitigations, safety nets) a human audits before delivery begins.',
|
|
194
|
+
dependsOn: [],
|
|
195
|
+
};
|
|
196
|
+
// Depend on every surviving coverage item (deduped), preserving any planner-authored deps but
|
|
197
|
+
// scrubbing references to capped-away items (an existing confidence case skips `decorate`).
|
|
198
|
+
const confidenceDeps = [
|
|
199
|
+
...new Set([
|
|
200
|
+
...(confidenceBase.dependsOn ?? []).filter((d) => !droppedIds.has(d)),
|
|
201
|
+
...keptCoverageIds,
|
|
202
|
+
]),
|
|
203
|
+
];
|
|
204
|
+
items.push(asDocument({ ...confidenceBase, dependsOn: confidenceDeps }, 'technical', uniqueDocPath(joinRepoPath(docsDir, CONFIDENCE_CASE_DOC), usedPaths), 'always', humanReview));
|
|
205
|
+
return { ...draft, items };
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=seed-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seed-plan.js","sourceRoot":"","sources":["../../../src/presets/tech-migration/seed-plan.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,YAAY,EAA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
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"description": "Agent catalog, routing, prompts and fragment library for the Agent Architecture Board.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"valibot": "^1.4.2",
|
|
34
34
|
"@cat-factory/contracts": "0.118.0",
|
|
35
35
|
"@cat-factory/kernel": "0.108.0",
|
|
36
|
-
"@cat-factory/prompt-fragments": "0.
|
|
36
|
+
"@cat-factory/prompt-fragments": "0.13.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"typescript": "7.0.1-rc",
|