@llipe.com/dev-tasks 0.16.4 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/.claude/agents/developer.md +8 -3
  2. package/.claude/agents/github-ops.md +186 -58
  3. package/.claude/agents/technical-writer.md +1 -1
  4. package/.claude/agents/verifier.md +10 -5
  5. package/.claude/commands/planner.md +109 -14
  6. package/.claude/commands/product-engineer.md +27 -3
  7. package/.claude/hooks/git-guard.sh +200 -27
  8. package/.claude/skills/activity-init/SKILL.md +4 -0
  9. package/.claude/skills/activity-publish-github/SKILL.md +84 -15
  10. package/.claude/skills/implement/SKILL.md +29 -13
  11. package/.claude/skills/memo-cli-usage/REFERENCE.md +1 -0
  12. package/.claude/skills/memo-cli-usage/SKILL.md +3 -1
  13. package/.claude/skills/plan/SKILL.md +6 -0
  14. package/.github/agents/developer.agent.md +8 -3
  15. package/.github/agents/github-ops.agent.md +181 -63
  16. package/.github/agents/planner.agent.md +122 -27
  17. package/.github/agents/product-engineer.agent.md +27 -3
  18. package/.github/agents/technical-writer.agent.md +1 -1
  19. package/.github/agents/verifier.agent.md +10 -5
  20. package/.github/instructions/implement.instructions.md +29 -13
  21. package/.github/instructions/plan.instructions.md +6 -0
  22. package/.github/skills/activity-init/SKILL.md +4 -0
  23. package/.github/skills/activity-publish-github/SKILL.md +84 -15
  24. package/.github/skills/memo-cli-usage/REFERENCE.md +1 -0
  25. package/.github/skills/memo-cli-usage/SKILL.md +3 -1
  26. package/.kiro/agents/developer.md +8 -3
  27. package/.kiro/agents/github-ops.md +181 -63
  28. package/.kiro/agents/planner.md +122 -27
  29. package/.kiro/agents/product-engineer.md +27 -3
  30. package/.kiro/agents/technical-writer.md +1 -1
  31. package/.kiro/agents/verifier.md +10 -5
  32. package/.kiro/skills/activity-init/SKILL.md +4 -0
  33. package/.kiro/skills/activity-publish-github/SKILL.md +84 -15
  34. package/.kiro/skills/memo-cli-usage/REFERENCE.md +1 -0
  35. package/.kiro/skills/memo-cli-usage/SKILL.md +3 -1
  36. package/.kiro/steering/implement.md +29 -13
  37. package/.kiro/steering/plan.md +6 -0
  38. package/AGENTS.md +2 -0
  39. package/AGENTS.md.template +2 -0
  40. package/CHANGELOG.md +31 -0
  41. package/README.md +79 -7
  42. package/TESTING.md +62 -1
  43. package/dist/bin/dev-tasks.d.ts +1 -1
  44. package/dist/bin/dev-tasks.js +126 -4
  45. package/dist/bin/dev-tasks.js.map +1 -1
  46. package/dist/bin/parse-args.d.ts +49 -1
  47. package/dist/bin/parse-args.d.ts.map +1 -1
  48. package/dist/bin/parse-args.js +132 -11
  49. package/dist/bin/parse-args.js.map +1 -1
  50. package/dist/core/checks/index.d.ts +2 -0
  51. package/dist/core/checks/index.d.ts.map +1 -1
  52. package/dist/core/checks/index.js +1 -0
  53. package/dist/core/checks/index.js.map +1 -1
  54. package/dist/core/checks/roadmap.d.ts +40 -0
  55. package/dist/core/checks/roadmap.d.ts.map +1 -0
  56. package/dist/core/checks/roadmap.js +78 -0
  57. package/dist/core/checks/roadmap.js.map +1 -0
  58. package/dist/core/migrate-projects/answers.d.ts +63 -0
  59. package/dist/core/migrate-projects/answers.d.ts.map +1 -0
  60. package/dist/core/migrate-projects/answers.js +79 -0
  61. package/dist/core/migrate-projects/answers.js.map +1 -0
  62. package/dist/core/migrate-projects/apply.d.ts +51 -0
  63. package/dist/core/migrate-projects/apply.d.ts.map +1 -0
  64. package/dist/core/migrate-projects/apply.js +828 -0
  65. package/dist/core/migrate-projects/apply.js.map +1 -0
  66. package/dist/core/migrate-projects/classify.d.ts +93 -0
  67. package/dist/core/migrate-projects/classify.d.ts.map +1 -0
  68. package/dist/core/migrate-projects/classify.js +170 -0
  69. package/dist/core/migrate-projects/classify.js.map +1 -0
  70. package/dist/core/migrate-projects/conventions.d.ts +118 -0
  71. package/dist/core/migrate-projects/conventions.d.ts.map +1 -0
  72. package/dist/core/migrate-projects/conventions.js +213 -0
  73. package/dist/core/migrate-projects/conventions.js.map +1 -0
  74. package/dist/core/migrate-projects/gh.d.ts +40 -0
  75. package/dist/core/migrate-projects/gh.d.ts.map +1 -0
  76. package/dist/core/migrate-projects/gh.js +115 -0
  77. package/dist/core/migrate-projects/gh.js.map +1 -0
  78. package/dist/core/migrate-projects/index.d.ts +61 -0
  79. package/dist/core/migrate-projects/index.d.ts.map +1 -0
  80. package/dist/core/migrate-projects/index.js +183 -0
  81. package/dist/core/migrate-projects/index.js.map +1 -0
  82. package/dist/core/migrate-projects/local-reader.d.ts +8 -0
  83. package/dist/core/migrate-projects/local-reader.d.ts.map +1 -0
  84. package/dist/core/migrate-projects/local-reader.js +30 -0
  85. package/dist/core/migrate-projects/local-reader.js.map +1 -0
  86. package/dist/core/migrate-projects/map.d.ts +36 -0
  87. package/dist/core/migrate-projects/map.d.ts.map +1 -0
  88. package/dist/core/migrate-projects/map.js +75 -0
  89. package/dist/core/migrate-projects/map.js.map +1 -0
  90. package/dist/core/migrate-projects/plan.d.ts +71 -0
  91. package/dist/core/migrate-projects/plan.d.ts.map +1 -0
  92. package/dist/core/migrate-projects/plan.js +638 -0
  93. package/dist/core/migrate-projects/plan.js.map +1 -0
  94. package/dist/core/migrate-projects/planfile.d.ts +149 -0
  95. package/dist/core/migrate-projects/planfile.d.ts.map +1 -0
  96. package/dist/core/migrate-projects/planfile.js +608 -0
  97. package/dist/core/migrate-projects/planfile.js.map +1 -0
  98. package/dist/core/migrate-projects/roadmap.d.ts +43 -0
  99. package/dist/core/migrate-projects/roadmap.d.ts.map +1 -0
  100. package/dist/core/migrate-projects/roadmap.js +54 -0
  101. package/dist/core/migrate-projects/roadmap.js.map +1 -0
  102. package/dist/core/migrate-projects/snapshot.d.ts +91 -0
  103. package/dist/core/migrate-projects/snapshot.d.ts.map +1 -0
  104. package/dist/core/migrate-projects/snapshot.js +285 -0
  105. package/dist/core/migrate-projects/snapshot.js.map +1 -0
  106. package/dist/core/migrate-projects/summary.d.ts +27 -0
  107. package/dist/core/migrate-projects/summary.d.ts.map +1 -0
  108. package/dist/core/migrate-projects/summary.js +35 -0
  109. package/dist/core/migrate-projects/summary.js.map +1 -0
  110. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-reader.d.ts","sourceRoot":"","sources":["../../../core/migrate-projects/local-reader.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,WAAW;IAC1B,8FAA8F;IAC9F,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3C,kGAAkG;IAClG,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAClC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAgB3D"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Reads from the working tree for `migrate projects` (spec §16a A-52).
3
+ *
4
+ * `docs/roadmap.md`, the PRD files and `workstream/planner-state-*.md` are
5
+ * local files, not GitHub data: `workstream/` may be gitignored, so a
6
+ * remote read would miss the state files. They go through this injectable
7
+ * reader, never through the `GhRunner`, and the command never writes them.
8
+ */
9
+ import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
10
+ import { resolve } from "node:path";
11
+ export function createLocalReader(root) {
12
+ return {
13
+ readText(path) {
14
+ const full = resolve(root, path);
15
+ if (!existsSync(full) || !statSync(full).isFile())
16
+ return undefined;
17
+ return readFileSync(full, "utf-8");
18
+ },
19
+ listFiles(dir) {
20
+ const full = resolve(root, dir);
21
+ if (!existsSync(full) || !statSync(full).isDirectory())
22
+ return [];
23
+ return readdirSync(full, { withFileTypes: true })
24
+ .filter((d) => d.isFile())
25
+ .map((d) => d.name)
26
+ .sort();
27
+ },
28
+ };
29
+ }
30
+ //# sourceMappingURL=local-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-reader.js","sourceRoot":"","sources":["../../../core/migrate-projects/local-reader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO;QACL,QAAQ,CAAC,IAAI;YACX,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE;gBAAE,OAAO,SAAS,CAAC;YACpE,OAAO,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrC,CAAC;QACD,SAAS,CAAC,GAAG;YACX,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE;gBAAE,OAAO,EAAE,CAAC;YAClE,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;iBAC9C,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;iBACzB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;iBAClB,IAAI,EAAE,CAAC;QACZ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * FR-18's mapping precedence, as amended by §16a (A-54 to A-57, D-98):
3
+ *
4
+ * 1. The `**Story:** workstream/user-stories-<slug>-phase-<N>.md` body line,
5
+ * to the row whose PRD key is `<slug>` and `Phase/Wave` is `<N>` (`All`
6
+ * for a file without `-phase-N`).
7
+ * 2. A `phase: X` label, to the row whose `Phase/Wave` equals `X` exactly,
8
+ * among the rows of the PRD named by the title's `[PRD-<name>]` prefix.
9
+ * 3. Otherwise unmapped, with the reason. The milestone is not a rule.
10
+ *
11
+ * A rule maps only when it yields exactly one row; zero or several rows
12
+ * fall through to the next rule. Pure and never fuzzy (D-18, D-86).
13
+ */
14
+ import type { StoryRef } from "./classify.js";
15
+ import { type RoadmapRow } from "./roadmap.js";
16
+ export interface StoryToMap {
17
+ number: number;
18
+ title: string;
19
+ labels: readonly string[];
20
+ milestone: string | null;
21
+ storyRef: StoryRef | null;
22
+ }
23
+ export type MapResult = {
24
+ mapped: true;
25
+ row: RoadmapRow;
26
+ rule: "story-line" | "phase-label";
27
+ /** What else pointed elsewhere, cited for the owner (MU-40, MU-43). */
28
+ notes: string[];
29
+ } | {
30
+ mapped: false;
31
+ reason: string;
32
+ };
33
+ /** The `<name>` of a leading `[PRD-<name>]` title prefix, or `null`. */
34
+ export declare function titlePrd(title: string): string | null;
35
+ export declare function mapStory(story: StoryToMap, rows: readonly RoadmapRow[]): MapResult;
36
+ //# sourceMappingURL=map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../core/migrate-projects/map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,MAAM,SAAS,GACjB;IACE,MAAM,EAAE,IAAI,CAAC;IACb,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,YAAY,GAAG,aAAa,CAAC;IACnC,uEAAuE;IACvE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,GACD;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAKtC,wEAAwE;AACxE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAErD;AAMD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAiElF"}
@@ -0,0 +1,75 @@
1
+ import { hasLabelPrefix } from "./conventions.js";
2
+ import { roadmapRows, waveId } from "./roadmap.js";
3
+ const PHASE_LABEL = "phase: ";
4
+ const TITLE_PRD = /^\[PRD-([^\]\s]+)\]/;
5
+ /** The `<name>` of a leading `[PRD-<name>]` title prefix, or `null`. */
6
+ export function titlePrd(title) {
7
+ return title.match(TITLE_PRD)?.[1] ?? null;
8
+ }
9
+ function rowsText(rows) {
10
+ return rows.map(waveId).join(", ");
11
+ }
12
+ export function mapStory(story, rows) {
13
+ const tried = [];
14
+ const notes = [];
15
+ // Rule 1.
16
+ let line = null;
17
+ if (story.storyRef === null) {
18
+ tried.push("no `**Story:**` line");
19
+ }
20
+ else {
21
+ const named = waveId({ prd: story.storyRef.slug, phase: story.storyRef.phase ?? "All" });
22
+ const hits = roadmapRows(rows, story.storyRef.slug, story.storyRef.phase);
23
+ if (hits.length === 1)
24
+ line = hits[0];
25
+ else if (hits.length === 0)
26
+ tried.push(`the \`**Story:**\` line names ${named}, which no roadmap row has`);
27
+ else
28
+ tried.push(`the \`**Story:**\` line names ${named}, which ${hits.length} roadmap rows have (ambiguous)`);
29
+ }
30
+ // Rule 2, evaluated even when rule 1 hits, so a disagreement is cited.
31
+ const phases = story.labels.filter((l) => hasLabelPrefix(l, PHASE_LABEL));
32
+ const values = phases.map((l) => l.slice(PHASE_LABEL.length));
33
+ const scope = titlePrd(story.title);
34
+ let label = null;
35
+ let labelWhy;
36
+ const labelsText = phases.map((l) => `\`${l}\``).join(", ");
37
+ if (phases.length === 0) {
38
+ labelWhy = "no `phase:` label";
39
+ }
40
+ else if (scope === null) {
41
+ const wide = rows.filter((r) => values.includes(r.phase)).length;
42
+ labelWhy = `${labelsText} is matched only within the PRD of the \`[PRD-<name>]\` title prefix, and the title has none (D-98); it matches ${wide} ${wide === 1 ? "row" : "rows"} repository-wide`;
43
+ }
44
+ else {
45
+ const hits = rows.filter((r) => r.prd === scope && values.includes(r.phase));
46
+ if (hits.length === 1) {
47
+ label = hits[0];
48
+ labelWhy = "";
49
+ }
50
+ else if (hits.length === 0) {
51
+ labelWhy = `${labelsText} matches no \`Phase/Wave\` cell of PRD ${scope}`;
52
+ }
53
+ else {
54
+ labelWhy = `${labelsText} matches ${hits.length} rows of PRD ${scope} (${rowsText(hits)}): ambiguous`;
55
+ }
56
+ }
57
+ if (line !== null) {
58
+ if (label !== null && label !== line) {
59
+ notes.push(`mapped to ${waveId(line)} by the \`**Story:**\` line; its ${labelsText} label names ${waveId(label)}; the body line wins (FR-18)`);
60
+ }
61
+ return { mapped: true, row: line, rule: "story-line", notes };
62
+ }
63
+ if (label !== null) {
64
+ notes.push(...tried
65
+ .filter((t) => t !== "no `**Story:**` line")
66
+ .map((t) => `${t}; mapped by its \`phase:\` label instead`));
67
+ return { mapped: true, row: label, rule: "phase-label", notes };
68
+ }
69
+ tried.push(labelWhy);
70
+ if (story.milestone !== null) {
71
+ tried.push(`milestone \`${story.milestone}\` is not a mapping rule (D-98)`);
72
+ }
73
+ return { mapped: false, reason: tried.join("; ") };
74
+ }
75
+ //# sourceMappingURL=map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.js","sourceRoot":"","sources":["../../../core/migrate-projects/map.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAoBpE,MAAM,WAAW,GAAG,SAAS,CAAC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,KAAK,CAAC,SAAS,iCAAiC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACrD,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Batches 1 to 7 of the migration plan (spec §8.3, FR-19, FR-20; §16a
3
+ * A-66, A-67, A-71, A-73, A-81 to A-84; D-19, D-27, D-73, D-81, D-82,
4
+ * D-87, D-91, D-92, D-97, D-103).
5
+ *
6
+ * Pure: it turns a snapshot, its classification, the roadmap rows and the
7
+ * owner's previous answers into review lists and write rows. It proposes
8
+ * only what the scope rules permit, and only what is not already so (A-66):
9
+ * a label that exists, a link that is present, a status row that is there
10
+ * produce no row, so re-planning after a full apply proposes no write.
11
+ *
12
+ * Never: a title edit (D-19), a hierarchy or `level:` write on a standalone
13
+ * issue (D-82), a Status write or any Project write (D-27, D-81), a relink
14
+ * of an issue that already has a parent, or a deleted label (D-91).
15
+ *
16
+ * Row grammar, which `--apply` (S-015) builds argv from. Target is
17
+ * `label:<name>`, `#<number>`, `W-<id>` for an issue this plan creates, or
18
+ * `new issue` on a create row. Detail by Action:
19
+ *
20
+ * | Action | Target | Detail |
21
+ * | ---------------- | ---------------- | ------------------------------------------------------- |
22
+ * | `create-label` | `label:<name>` | `color: <HEX>; description: <text>` |
23
+ * | `edit-label` | `label:<name>` | `description: <text>` |
24
+ * | `create-issue` | `new issue` | `template: prd\|wave; label: <level label>; title: <t>` |
25
+ * | `add-label` | `#N` or `W-<id>` | `<label name>` |
26
+ * | `remove-label` | `#N` | `<label name>` |
27
+ * | `link-sub-issue` | parent | `sub-issue <#N or W-id>` |
28
+ * | `add-blocked-by` | the blocked `#N` | `blocked by #<blocker>` |
29
+ * | `status-comment` | PRD `#N` or `W-` | `create: <rows>` or `add: <rows>`, rows `<wave> = <state>, <#N, W-id or —>` joined by `; ` |
30
+ *
31
+ * Batch 7 is the user's: printed steps, never run (D-81, D-97).
32
+ */
33
+ import { type PreviousAnswers } from "./answers.js";
34
+ import { type PrdState } from "./conventions.js";
35
+ import { type MigrationPlanClassification } from "./classify.js";
36
+ import { type MigrationPlanBatch, type MigrationPlanReview } from "./planfile.js";
37
+ import { type RoadmapRow } from "./roadmap.js";
38
+ import type { MigrationSnapshot } from "./snapshot.js";
39
+ export interface MigrationPlanInput {
40
+ snapshot: MigrationSnapshot;
41
+ classification: MigrationPlanClassification;
42
+ rows: readonly RoadmapRow[];
43
+ answers: PreviousAnswers;
44
+ }
45
+ export interface MigrationPlanBuild {
46
+ review: MigrationPlanReview;
47
+ batches: MigrationPlanBatch[];
48
+ }
49
+ /** GitHub-ops' title limit (§ Title Format). */
50
+ export declare const TITLE_MAX = 80;
51
+ /**
52
+ * The retired form of a label description (D-91, A-82): `Retired (D-91): `
53
+ * in front, the whole cut from its end to GitHub's 100 characters. `null`
54
+ * when it is already marked (any `Retired (` lead), so it is never doubled.
55
+ */
56
+ export declare function retiredDescription(description: string): string | null;
57
+ /** A wave tracking issue title from its roadmap row, cut at a word to 80 characters (A-84). */
58
+ export declare function waveTitle(prd: string, phase: string, scope: string): string;
59
+ /** A PRD tracking issue title: the shortest accepted form of the PRD file's H1 (A-53). */
60
+ export declare function prdTitle(name: string, h1: string): string;
61
+ /** The github-ops PRD-table State for a roadmap row (A-67). */
62
+ export declare function prdState(row: RoadmapRow, hasWaveIssue: boolean): PrdState;
63
+ /**
64
+ * Batch 7: the Project cleanup the user runs with their own session (D-81,
65
+ * D-96, D-97). The CLI never reads the Project, so the number stays `<n>`.
66
+ * This builder is the only place in the module that names these commands;
67
+ * PT-80 pins that, and nothing in the module runs them.
68
+ */
69
+ export declare function projectCleanupSteps(owner: string): string[];
70
+ export declare function planMigration(input: MigrationPlanInput): MigrationPlanBuild;
71
+ //# sourceMappingURL=plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../core/migrate-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