@cat-factory/agents 0.46.0 → 0.47.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.
@@ -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 — a FULL boolean array parallel to the pipeline's own `agentKinds` (the slice-2 gate-override
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).
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;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
+ {"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, seedPipelines, } from '@cat-factory/kernel';
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 { moduleSlug } from '../../repo-ops/render.js';
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 — a FULL boolean array parallel to the pipeline's own `agentKinds` (the slice-2 gate-override
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).
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
- if (!humanReview)
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,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;A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AAQ;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,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACf,OAAO,IAAI,CAAA;IACb,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;IACjC,MAAM,IAAI,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IACnD,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC7C,IAAI,CAAC,GAAG,CAAC,CAAA;IACT,IAAI,SAAS,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;IACpC,OAAO,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC;QAAE,SAAS,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,GAAG,GAAG,EAAE,CAAA;IAC/D,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACpB,OAAO,SAAS,CAAA;AAClB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAkB;IAClD,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,EAAE,UAAU,CAAA;IAC1E,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAA;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC3C,IAAI,OAAO,KAAK,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACpC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,OAAO,CAAC,CAAA;AAC3C,CAAC"}
@@ -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,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEjD,8EAA8E;AAC9E,mGAAmG;AACnG,EAAE;AACF,oGAAoG;AACpG,iGAAi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,iGAAiG;IACjG,MAAM,cAAc,GAAwB,kBAAkB;QAC5D,CAAC,CAAC,EAAE,GAAG,kBAAkB,EAAE,EAAE,EAAE,YAAY,EAAE;QAC7C,CAAC,CAAC;YACE,EAAE,EAAE,YAAY;YAChB,OAAO,EAAE,mBAAmB,CAAC,QAAQ;YACrC,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,+OAA+O;YACjP,SAAS,EAAE,EAAE;SACd,CAAA;IACL,8FAA8F;IAC9F,4FAA4F;IAC5F,MAAM,cAAc,GAAG;QACrB,GAAG,IAAI,GAAG,CAAC;YACT,GAAG,CAAC,cAAc,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACrE,GAAG,eAAe;SACnB,CAAC;KACH,CAAA;IACD,KAAK,CAAC,IAAI,CACR,UAAU,CACR,EAAE,GAAG,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,EAChD,WAAW,EACX,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAE,SAAS,CAAC,EACpE,QAAQ,EACR,WAAW,CACZ,CACF,CAAA;IAED,OAAO,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAA;AAC5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/agents",
3
- "version": "0.46.0",
3
+ "version": "0.47.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.12.0"
36
+ "@cat-factory/prompt-fragments": "0.13.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "typescript": "7.0.1-rc",