@12ui/design 0.2.56 → 0.2.57

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 (175) hide show
  1. package/SKILL.md +1 -1
  2. package/dist/branch-client.d.ts +2 -0
  3. package/dist/branch-client.d.ts.map +1 -1
  4. package/dist/branch-client.js +1 -0
  5. package/dist/branch-client.js.map +1 -1
  6. package/dist/cli-arguments.d.ts.map +1 -1
  7. package/dist/cli-arguments.js +1 -0
  8. package/dist/cli-arguments.js.map +1 -1
  9. package/dist/cli-convert-command.d.ts.map +1 -1
  10. package/dist/cli-convert-command.js +110 -15
  11. package/dist/cli-convert-command.js.map +1 -1
  12. package/dist/cli-corpus-command.d.ts.map +1 -1
  13. package/dist/cli-corpus-command.js +5 -2
  14. package/dist/cli-corpus-command.js.map +1 -1
  15. package/dist/cli-corpus-evidence.d.ts.map +1 -1
  16. package/dist/cli-corpus-evidence.js +2 -1
  17. package/dist/cli-corpus-evidence.js.map +1 -1
  18. package/dist/cli-corpus-reference-downloads.d.ts +1 -0
  19. package/dist/cli-corpus-reference-downloads.d.ts.map +1 -1
  20. package/dist/cli-corpus-reference-downloads.js +13 -3
  21. package/dist/cli-corpus-reference-downloads.js.map +1 -1
  22. package/dist/cli-corpus-types.d.ts +2 -0
  23. package/dist/cli-corpus-types.d.ts.map +1 -1
  24. package/dist/cli-help/design.d.ts +1 -1
  25. package/dist/cli-help/design.d.ts.map +1 -1
  26. package/dist/cli-help/design.js +6 -2
  27. package/dist/cli-help/design.js.map +1 -1
  28. package/dist/cli-help/index.d.ts +1 -1
  29. package/dist/cli-improve-command.d.ts.map +1 -1
  30. package/dist/cli-improve-command.js +68 -5
  31. package/dist/cli-improve-command.js.map +1 -1
  32. package/dist/cli-usage.js +2 -2
  33. package/dist/concept-input.d.ts +21 -0
  34. package/dist/concept-input.d.ts.map +1 -1
  35. package/dist/concept-input.js +32 -10
  36. package/dist/concept-input.js.map +1 -1
  37. package/dist/conversion-client.d.ts +39 -1
  38. package/dist/conversion-client.d.ts.map +1 -1
  39. package/dist/conversion-client.js +205 -3
  40. package/dist/conversion-client.js.map +1 -1
  41. package/dist/corpus-client.d.ts +7 -1
  42. package/dist/corpus-client.d.ts.map +1 -1
  43. package/dist/corpus-client.js +6 -2
  44. package/dist/corpus-client.js.map +1 -1
  45. package/dist/corpus-reference-download-retry.d.ts +68 -0
  46. package/dist/corpus-reference-download-retry.d.ts.map +1 -0
  47. package/dist/corpus-reference-download-retry.js +123 -0
  48. package/dist/corpus-reference-download-retry.js.map +1 -0
  49. package/dist/corpus-request-error.d.ts +17 -0
  50. package/dist/corpus-request-error.d.ts.map +1 -0
  51. package/dist/corpus-request-error.js +21 -0
  52. package/dist/corpus-request-error.js.map +1 -0
  53. package/dist/draft-run.d.ts +9 -0
  54. package/dist/draft-run.d.ts.map +1 -1
  55. package/dist/draft-run.js +22 -5
  56. package/dist/draft-run.js.map +1 -1
  57. package/dist/draft-workspace.d.ts +2 -1
  58. package/dist/draft-workspace.d.ts.map +1 -1
  59. package/dist/draft-workspace.js.map +1 -1
  60. package/dist/hosted-draft-identity.d.ts +1 -0
  61. package/dist/hosted-draft-identity.d.ts.map +1 -1
  62. package/dist/hosted-draft-identity.js +1 -0
  63. package/dist/hosted-draft-identity.js.map +1 -1
  64. package/dist/improve-added-specs.d.ts +9 -0
  65. package/dist/improve-added-specs.d.ts.map +1 -1
  66. package/dist/improve-added-specs.js +28 -7
  67. package/dist/improve-added-specs.js.map +1 -1
  68. package/dist/improve-bootstrap-secret.d.ts +35 -0
  69. package/dist/improve-bootstrap-secret.d.ts.map +1 -0
  70. package/dist/improve-bootstrap-secret.js +61 -0
  71. package/dist/improve-bootstrap-secret.js.map +1 -0
  72. package/dist/improve-capture-redirect.d.ts +46 -0
  73. package/dist/improve-capture-redirect.d.ts.map +1 -0
  74. package/dist/improve-capture-redirect.js +68 -0
  75. package/dist/improve-capture-redirect.js.map +1 -0
  76. package/dist/improve-concept.d.ts +14 -1
  77. package/dist/improve-concept.d.ts.map +1 -1
  78. package/dist/improve-concept.js +29 -8
  79. package/dist/improve-concept.js.map +1 -1
  80. package/dist/improve-conversion-attempts.d.ts +9 -5
  81. package/dist/improve-conversion-attempts.d.ts.map +1 -1
  82. package/dist/improve-conversion-attempts.js +6 -1
  83. package/dist/improve-conversion-attempts.js.map +1 -1
  84. package/dist/improve-conversion-stage.d.ts +7 -0
  85. package/dist/improve-conversion-stage.d.ts.map +1 -1
  86. package/dist/improve-conversion-stage.js +188 -171
  87. package/dist/improve-conversion-stage.js.map +1 -1
  88. package/dist/improve-convert-progress.d.ts +36 -0
  89. package/dist/improve-convert-progress.d.ts.map +1 -0
  90. package/dist/improve-convert-progress.js +43 -0
  91. package/dist/improve-convert-progress.js.map +1 -0
  92. package/dist/improve-convert-resilience.d.ts +44 -53
  93. package/dist/improve-convert-resilience.d.ts.map +1 -1
  94. package/dist/improve-convert-resilience.js +51 -58
  95. package/dist/improve-convert-resilience.js.map +1 -1
  96. package/dist/improve-delivery-stages.d.ts.map +1 -1
  97. package/dist/improve-delivery-stages.js +4 -0
  98. package/dist/improve-delivery-stages.js.map +1 -1
  99. package/dist/improve-generation-stages.d.ts.map +1 -1
  100. package/dist/improve-generation-stages.js +32 -3
  101. package/dist/improve-generation-stages.js.map +1 -1
  102. package/dist/improve-icon-svg.d.ts +47 -0
  103. package/dist/improve-icon-svg.d.ts.map +1 -0
  104. package/dist/improve-icon-svg.js +83 -0
  105. package/dist/improve-icon-svg.js.map +1 -0
  106. package/dist/improve-kit-ignore.d.ts +32 -0
  107. package/dist/improve-kit-ignore.d.ts.map +1 -0
  108. package/dist/improve-kit-ignore.js +111 -0
  109. package/dist/improve-kit-ignore.js.map +1 -0
  110. package/dist/improve-kit-readme.d.ts.map +1 -1
  111. package/dist/improve-kit-readme.js +101 -11
  112. package/dist/improve-kit-readme.js.map +1 -1
  113. package/dist/improve-kit-stall.d.ts +48 -2
  114. package/dist/improve-kit-stall.d.ts.map +1 -1
  115. package/dist/improve-kit-stall.js +167 -15
  116. package/dist/improve-kit-stall.js.map +1 -1
  117. package/dist/improve-kit-status.d.ts +36 -0
  118. package/dist/improve-kit-status.d.ts.map +1 -1
  119. package/dist/improve-kit-status.js +74 -4
  120. package/dist/improve-kit-status.js.map +1 -1
  121. package/dist/improve-options.d.ts +6 -0
  122. package/dist/improve-options.d.ts.map +1 -1
  123. package/dist/improve-options.js +3 -0
  124. package/dist/improve-options.js.map +1 -1
  125. package/dist/improve-plan-annotated-render.d.ts +13 -1
  126. package/dist/improve-plan-annotated-render.d.ts.map +1 -1
  127. package/dist/improve-plan-annotated-render.js +21 -0
  128. package/dist/improve-plan-annotated-render.js.map +1 -1
  129. package/dist/improve-plan-annotator.d.ts +5 -0
  130. package/dist/improve-plan-annotator.d.ts.map +1 -1
  131. package/dist/improve-plan-annotator.js +1 -0
  132. package/dist/improve-plan-annotator.js.map +1 -1
  133. package/dist/improve-run-summary.d.ts.map +1 -1
  134. package/dist/improve-run-summary.js +51 -5
  135. package/dist/improve-run-summary.js.map +1 -1
  136. package/dist/improve-stage-shared.d.ts +39 -1
  137. package/dist/improve-stage-shared.d.ts.map +1 -1
  138. package/dist/improve-stage-shared.js +80 -3
  139. package/dist/improve-stage-shared.js.map +1 -1
  140. package/dist/improve-terminal-event.d.ts.map +1 -1
  141. package/dist/improve-terminal-event.js +7 -1
  142. package/dist/improve-terminal-event.js.map +1 -1
  143. package/dist/improve-token-patch.d.ts +2 -0
  144. package/dist/improve-token-patch.d.ts.map +1 -1
  145. package/dist/improve-token-patch.js +23 -5
  146. package/dist/improve-token-patch.js.map +1 -1
  147. package/dist/improve-workspace.d.ts +84 -7
  148. package/dist/improve-workspace.d.ts.map +1 -1
  149. package/dist/improve-workspace.js +16 -1
  150. package/dist/improve-workspace.js.map +1 -1
  151. package/dist/index.d.ts +2 -1
  152. package/dist/index.d.ts.map +1 -1
  153. package/dist/index.js +1 -0
  154. package/dist/index.js.map +1 -1
  155. package/dist/legacy-skill-catalog.d.ts.map +1 -1
  156. package/dist/legacy-skill-catalog.js +123 -0
  157. package/dist/legacy-skill-catalog.js.map +1 -1
  158. package/dist/mcp-tool-definitions.js +1 -1
  159. package/dist/mcp-tool-definitions.js.map +1 -1
  160. package/dist/mcp-tool-handler.d.ts.map +1 -1
  161. package/dist/mcp-tool-handler.js +3 -0
  162. package/dist/mcp-tool-handler.js.map +1 -1
  163. package/dist/redesign-capture.d.ts +1 -0
  164. package/dist/redesign-capture.d.ts.map +1 -1
  165. package/dist/redesign-capture.js +6 -0
  166. package/dist/redesign-capture.js.map +1 -1
  167. package/dist/responsive-alternative-materializer.d.ts +19 -0
  168. package/dist/responsive-alternative-materializer.d.ts.map +1 -0
  169. package/dist/responsive-alternative-materializer.js +76 -0
  170. package/dist/responsive-alternative-materializer.js.map +1 -0
  171. package/open-design.json +2 -2
  172. package/package.json +1 -1
  173. package/skills/12ui-design/SKILL.md +7 -1
  174. package/skills/12ui-design/improve.md +20 -5
  175. package/skills/12ui-design/inspire.md +1 -1
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Icon SVGs a lane can actually ship (F30).
3
+ *
4
+ * The corpus glyph a LayerDoc carries in `iconSvg` paints with
5
+ * `currentColor`, which resolves against the *referencing* document. Written
6
+ * to `plan/assets/` and used the way the kit README tells a lane to use an
7
+ * asset — an external `<img>`, a `background-image`, a `url()` — there is no
8
+ * inherited colour, so every planned accent collapsed to black: two wave-2
9
+ * lanes shipped black icons on a dark rail before catching it at the
10
+ * screenshot step, and both invented CSS masks independently.
11
+ *
12
+ * The colour is not a guess: the icon layer declares it (`color`), so the
13
+ * plan writes that colour into an `<img>`-safe file and keeps the
14
+ * `currentColor` original beside it as `-inline.svg` for the inline and mask
15
+ * uses where inheriting is the point. When the design declares no colour
16
+ * there is nothing to plumb, so only the inline variant is written and the
17
+ * spec says so rather than shipping a file that renders black.
18
+ */
19
+ /** The declared colour of an icon layer, or nothing when none is usable. */
20
+ export declare const improveDeclaredIconColor: (value: unknown) => string | undefined;
21
+ export type ImproveIconSvgFile = {
22
+ /** File name inside `plan/assets/`. */
23
+ name: string;
24
+ svg: string;
25
+ /** `img` is safe as an external file; `inline` needs a colour at the call site. */
26
+ usage: 'img' | 'inline';
27
+ };
28
+ export type ImproveIconSvgVariants = {
29
+ files: ImproveIconSvgFile[];
30
+ /** The file the Added spec names as the asset. */
31
+ primary: ImproveIconSvgFile;
32
+ /** The `currentColor` sibling, when one was written. */
33
+ inline?: ImproveIconSvgFile;
34
+ color?: string;
35
+ /** One sentence for the spec and the plan: which file goes where. */
36
+ note: string;
37
+ };
38
+ /**
39
+ * The files to write for one icon layer. `stem` is the asset name without its
40
+ * extension, e.g. `added-014-user`.
41
+ */
42
+ export declare const improveIconSvgVariants: (args: {
43
+ svg: string;
44
+ color: unknown;
45
+ stem: string;
46
+ }) => ImproveIconSvgVariants;
47
+ //# sourceMappingURL=improve-icon-svg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"improve-icon-svg.d.ts","sourceRoot":"","sources":["../src/improve-icon-svg.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAaH,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,SAKlE,CAAC;AAMF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,KAAK,EAAE,KAAK,GAAG,QAAQ,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,kDAAkD;IAClD,OAAO,EAAE,kBAAkB,CAAC;IAC5B,wDAAwD;IACxD,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,KAAG,sBAsCH,CAAC"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Icon SVGs a lane can actually ship (F30).
3
+ *
4
+ * The corpus glyph a LayerDoc carries in `iconSvg` paints with
5
+ * `currentColor`, which resolves against the *referencing* document. Written
6
+ * to `plan/assets/` and used the way the kit README tells a lane to use an
7
+ * asset — an external `<img>`, a `background-image`, a `url()` — there is no
8
+ * inherited colour, so every planned accent collapsed to black: two wave-2
9
+ * lanes shipped black icons on a dark rail before catching it at the
10
+ * screenshot step, and both invented CSS masks independently.
11
+ *
12
+ * The colour is not a guess: the icon layer declares it (`color`), so the
13
+ * plan writes that colour into an `<img>`-safe file and keeps the
14
+ * `currentColor` original beside it as `-inline.svg` for the inline and mask
15
+ * uses where inheriting is the point. When the design declares no colour
16
+ * there is nothing to plumb, so only the inline variant is written and the
17
+ * spec says so rather than shipping a file that renders black.
18
+ */
19
+ /**
20
+ * Hex, functional, or a bare CSS ident. The pattern excludes quotes, angle
21
+ * brackets and ampersands, so a value that passes is safe in an attribute.
22
+ */
23
+ const COLOR_FORM = /^(?:#[0-9a-f]{3,8}|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color)\([-0-9a-z%.,/ ]*\)|[a-z]{3,20})$/iu;
24
+ /** Names that inherit or paint nothing: they cannot colour a standalone file. */
25
+ const UNUSABLE = new Set([
26
+ 'currentcolor', 'inherit', 'initial', 'unset', 'revert', 'revert-layer', 'transparent', 'none',
27
+ ]);
28
+ /** The declared colour of an icon layer, or nothing when none is usable. */
29
+ export const improveDeclaredIconColor = (value) => {
30
+ if (typeof value !== 'string')
31
+ return undefined;
32
+ const trimmed = value.trim();
33
+ if (!trimmed || !COLOR_FORM.test(trimmed))
34
+ return undefined;
35
+ return UNUSABLE.has(trimmed.toLowerCase()) ? undefined : trimmed;
36
+ };
37
+ /** Separate literals: a `/g/` regex carries `lastIndex` between `test` calls. */
38
+ const HAS_CURRENT_COLOR = /currentcolor/iu;
39
+ const EVERY_CURRENT_COLOR = /currentcolor/giu;
40
+ /**
41
+ * The files to write for one icon layer. `stem` is the asset name without its
42
+ * extension, e.g. `added-014-user`.
43
+ */
44
+ export const improveIconSvgVariants = (args) => {
45
+ const svg = args.svg.trim();
46
+ const color = improveDeclaredIconColor(args.color);
47
+ const imgName = `${args.stem}.svg`;
48
+ const inlineName = `${args.stem}-inline.svg`;
49
+ if (!HAS_CURRENT_COLOR.test(svg)) {
50
+ const primary = { name: imgName, svg, usage: 'img' };
51
+ return {
52
+ files: [primary],
53
+ primary,
54
+ ...(color ? { color } : {}),
55
+ note: `\`${imgName}\` carries its own colours: it is safe as an \`<img>\`, a`
56
+ + ' `background-image`, or inlined.',
57
+ };
58
+ }
59
+ if (!color) {
60
+ const primary = { name: inlineName, svg, usage: 'inline' };
61
+ return {
62
+ files: [primary],
63
+ primary,
64
+ inline: primary,
65
+ note: `The design declares no colour for this icon, so only \`${inlineName}\` is written and`
66
+ + ' it paints with `currentColor`. Inline it, or use it as a `mask-image` with a token'
67
+ + ' colour — as an external `<img>` it renders black.',
68
+ };
69
+ }
70
+ const img = { name: imgName, svg: svg.replace(EVERY_CURRENT_COLOR, color), usage: 'img' };
71
+ const inline = { name: inlineName, svg, usage: 'inline' };
72
+ return {
73
+ files: [img, inline],
74
+ primary: img,
75
+ inline,
76
+ color,
77
+ note: `Use \`${imgName}\` for an external \`<img>\`, \`background-image\`, or \`url()\`:`
78
+ + ` its fill and stroke are the design's declared \`${color}\`. Use \`${inlineName}\``
79
+ + ' (`currentColor`) only inlined in the markup or as a `mask-image` where the call site'
80
+ + ' sets the colour.',
81
+ };
82
+ };
83
+ //# sourceMappingURL=improve-icon-svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"improve-icon-svg.js","sourceRoot":"","sources":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 12ui improve kits: candidates, captures and targets are not source";
3
+ export type ImproveKitIgnoreState =
4
+ /** This run appended the rule to the repository root `.gitignore`. */
5
+ 'ignored'
6
+ /** Some pattern already ignored the out-dir; nothing was written. */
7
+ | 'already-ignored'
8
+ /** Inside a repository, not ignored, and not a kit directory this may claim. */
9
+ | 'not-ignored';
10
+ export type ImproveKitIgnore = {
11
+ state: ImproveKitIgnoreState;
12
+ /** The out-dir relative to the repository root, in POSIX form. */
13
+ relativeOutDir: string;
14
+ };
15
+ /**
16
+ * Decide, and where it is safe, act. Returns `undefined` when the out-dir is not
17
+ * inside a git working tree — the common case, and the one where the CLI has
18
+ * nothing to say.
19
+ *
20
+ * Only the repository ROOT `.gitignore` is ever written, only by appending, and
21
+ * only when the out-dir is named `.improve` or lives under one. Anything else
22
+ * gets the advisory line instead: guessing a pattern for an arbitrary directory
23
+ * could ignore a lane's source.
24
+ */
25
+ export declare const ensureImproveKitIgnored: (args: {
26
+ outDir: string;
27
+ }) => Promise<ImproveKitIgnore | undefined>;
28
+ /** The one line a run prints when the kit is committable and nobody said so. */
29
+ export declare const improveKitIgnoreNote: (kit: ImproveKitIgnore | undefined) => string | undefined;
30
+ /** The same fact, in the kit's own status block. */
31
+ export declare const improveKitIgnoreStatusLine: (kit: ImproveKitIgnore | undefined) => string | undefined;
32
+ //# sourceMappingURL=improve-kit-ignore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"improve-kit-ignore.d.ts","sourceRoot":"","sources":["../src/improve-kit-ignore.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,yBAAyB,yEACkC,CAAC;AAEzE,MAAM,MAAM,qBAAqB;AAC/B,sEAAsE;AACpE,SAAS;AACX,qEAAqE;GACnE,iBAAiB;AACnB,gFAAgF;GAC9E,aAAa,CAAC;AAElB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,qBAAqB,CAAC;IAC7B,kEAAkE;IAClE,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAmDF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAAU,MAAM;IAClD,MAAM,EAAE,MAAM,CAAC;CAChB,KAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAmBvC,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,GAAI,KAAK,gBAAgB,GAAG,SAAS,KAAG,MAAM,GAAG,SAKjF,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,0BAA0B,GAAI,KAAK,gBAAgB,GAAG,SAAS,KAAG,MAAM,GAAG,SAMvF,CAAC"}
@@ -0,0 +1,111 @@
1
+ import { execFile } from 'node:child_process';
2
+ import { readFile, stat, writeFile } from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { promisify } from 'node:util';
5
+ /**
6
+ * Keep the kit out of the repository's history (F17).
7
+ *
8
+ * `--out-dir .improve/<surface>` puts winner PNGs, every candidate, the capture
9
+ * sources and the whole target asset tree inside the repo being improved — about
10
+ * 100 MB of paid artifacts. Nothing said not to commit them, so one wave-2 lane's
11
+ * `git add -A` swept 102 kit files (100.8 MiB) into a seed commit, and the other
12
+ * three lanes each invented the same `.gitignore` rule for themselves. A rule
13
+ * four readers have to invent is a rule the tool owes them.
14
+ *
15
+ * The kit stays advisory: it appends one line when the out-dir is unambiguously a
16
+ * kit directory, says so plainly when it is not, and never fails the run.
17
+ */
18
+ const execFileAsync = promisify(execFile);
19
+ /** The directory name that makes an out-dir unambiguously a kit, not source. */
20
+ const IMPROVE_KIT_DIRECTORY = '.improve';
21
+ export const IMPROVE_GITIGNORE_PATTERN = '.improve/';
22
+ export const IMPROVE_GITIGNORE_COMMENT = '# 12ui improve kits: candidates, captures and targets are not source';
23
+ const exists = async (file) => (stat(file).then(() => true).catch(() => false));
24
+ /**
25
+ * The repository the out-dir actually sits in, which is not necessarily
26
+ * `--repo`: a lane can point `--repo` at a package and write the kit above it.
27
+ * A `.git` file (worktree, submodule) counts exactly like a `.git` directory.
28
+ */
29
+ const repositoryRoot = async (from) => {
30
+ let directory = path.resolve(from);
31
+ for (;;) {
32
+ if (await exists(path.join(directory, '.git')))
33
+ return directory;
34
+ const parent = path.dirname(directory);
35
+ if (parent === directory)
36
+ return undefined;
37
+ directory = parent;
38
+ }
39
+ };
40
+ const LITERAL_PATTERNS = new Set(['.improve', '.improve/', '/.improve', '/.improve/']);
41
+ /** The fallback when git cannot be run at all: does the root file say it already? */
42
+ const literallyIgnored = async (gitignore) => {
43
+ const text = await readFile(gitignore, 'utf8').catch(() => '');
44
+ return text.split('\n').some((line) => LITERAL_PATTERNS.has(line.trim()));
45
+ };
46
+ /** `true`/`false` from git itself; `undefined` when git could not answer. */
47
+ const gitIgnores = async (root, relative) => {
48
+ try {
49
+ await execFileAsync('git', ['check-ignore', '-q', '--', relative], { cwd: root });
50
+ return true;
51
+ }
52
+ catch (error) {
53
+ return error.code === 1 ? false : undefined;
54
+ }
55
+ };
56
+ const appendRule = async (gitignore) => {
57
+ const existing = await readFile(gitignore, 'utf8').catch(() => undefined);
58
+ const separator = existing === undefined || existing.length === 0
59
+ ? ''
60
+ : existing.endsWith('\n') ? '\n' : '\n\n';
61
+ await writeFile(gitignore, `${existing ?? ''}${separator}${IMPROVE_GITIGNORE_COMMENT}\n${IMPROVE_GITIGNORE_PATTERN}\n`, 'utf8');
62
+ };
63
+ /**
64
+ * Decide, and where it is safe, act. Returns `undefined` when the out-dir is not
65
+ * inside a git working tree — the common case, and the one where the CLI has
66
+ * nothing to say.
67
+ *
68
+ * Only the repository ROOT `.gitignore` is ever written, only by appending, and
69
+ * only when the out-dir is named `.improve` or lives under one. Anything else
70
+ * gets the advisory line instead: guessing a pattern for an arbitrary directory
71
+ * could ignore a lane's source.
72
+ */
73
+ export const ensureImproveKitIgnored = async (args) => {
74
+ try {
75
+ const outDir = path.resolve(args.outDir);
76
+ const root = await repositoryRoot(outDir);
77
+ if (!root || root === outDir)
78
+ return undefined;
79
+ const relative = path.relative(root, outDir).split(path.sep).join('/');
80
+ if (!relative || relative.startsWith('../'))
81
+ return undefined;
82
+ const gitignore = path.join(root, '.gitignore');
83
+ const ignored = await gitIgnores(root, relative) ?? await literallyIgnored(gitignore);
84
+ if (ignored)
85
+ return { state: 'already-ignored', relativeOutDir: relative };
86
+ if (!relative.split('/').includes(IMPROVE_KIT_DIRECTORY)) {
87
+ return { state: 'not-ignored', relativeOutDir: relative };
88
+ }
89
+ await appendRule(gitignore);
90
+ return { state: 'ignored', relativeOutDir: relative };
91
+ }
92
+ catch {
93
+ // Advisory work never sinks a run that has already spent money.
94
+ return undefined;
95
+ }
96
+ };
97
+ /** The one line a run prints when the kit is committable and nobody said so. */
98
+ export const improveKitIgnoreNote = (kit) => (kit?.state === 'not-ignored'
99
+ ? 'The kit is inside the repository and is not git-ignored;'
100
+ + ` add ${kit.relativeOutDir}/ to .gitignore before committing.`
101
+ : undefined);
102
+ /** The same fact, in the kit's own status block. */
103
+ export const improveKitIgnoreStatusLine = (kit) => {
104
+ if (!kit)
105
+ return undefined;
106
+ return kit.state === 'not-ignored'
107
+ ? `Kit: not git-ignored — see the note; add \`${kit.relativeOutDir}/\` to .gitignore`
108
+ + ' before committing.'
109
+ : 'Kit: git-ignored via .gitignore.';
110
+ };
111
+ //# sourceMappingURL=improve-kit-ignore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"improve-kit-ignore.js","sourceRoot":"","sources":["../src/improve-kit-ignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;;;;;;;;;;;GAYG;AAEH,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,g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AAc,oCAAoC;IAClE,CAAC,CAAC,SAAS,CACd,CAAC;AAEF,oDAAoD;AACpD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,GAAiC,EAAsB,EAAE;IAClG,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAC3B,OAAO,GAAG,CAAC,KAAK,KAAK,aAAa;QAChC,CAAC,CAAC,8CAA8C,GAAG,CAAC,cAAc,mBAAmB;cACjF,qBAAqB;QACzB,CAAC,CAAC,kCAAkC,CAAC;AACzC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"improve-kit-readme.d.ts","sourceRoot":"","sources":["../src/improve-kit-readme.ts"],"names":[],"mappings":"AAGA,OAAO,EAOL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AA+N7F,eAAO,MAAM,mBAAmB,GAAI,MAAM;IACxC,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,oBAAoB,CAAC;CAC7B,KAAG,MAkBQ,CAAC;AAEb,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,aAAa,EACrB,UAAS;IAAE,WAAW,CAAC,EAAE,YAAY,CAAA;CAAO,KAC3C,OAAO,CAAC,MAAM,CAQhB,CAAC"}
1
+ {"version":3,"file":"improve-kit-readme.d.ts","sourceRoot":"","sources":["../src/improve-kit-readme.ts"],"names":[],"mappings":"AAGA,OAAO,EAOL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAOL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAwT7F,eAAO,MAAM,mBAAmB,GAAI,MAAM;IACxC,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,oBAAoB,CAAC;CAC7B,KAAG,MAmBQ,CAAC;AAEb,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,aAAa,EACrB,UAAS;IAAE,WAAW,CAAC,EAAE,YAAY,CAAA;CAAO,KAC3C,OAAO,CAAC,MAAM,CAQhB,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { writeFile } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { IMPROVE_ASSET_ROLE_COPY, IMPROVE_SCRIM_MAX_OPACITY_PCT, improveFrameMappingLine, readImproveKitAssets, } from './improve-kit-assets.js';
4
- import { IMPROVE_NO_APPROXIMATION_RULE, improveRecoveryLine, improveStageStatusLine, readImproveKitStatus, } from './improve-kit-status.js';
4
+ import { IMPROVE_AWAITING_PICK_RULE, IMPROVE_NO_APPROXIMATION_RULE, improveAwaitingPick, improveRecoveryLine, improveStageStatusLine, readImproveKitStatus, } from './improve-kit-status.js';
5
+ import { improveCapturedUrlLine } from './improve-capture-redirect.js';
6
+ import { improveKitIgnoreStatusLine } from './improve-kit-ignore.js';
5
7
  import { improveAbandonedLines } from './improve-reset.js';
6
8
  import { improvePaths } from './improve-workspace.js';
7
9
  /**
@@ -20,10 +22,33 @@ const ROLE_GLOSSARY = [
20
22
  { role: 'upscaled-region', pattern: 'upscaled-region-N' },
21
23
  { role: 'source-crop', pattern: 'crop-N' },
22
24
  ];
25
+ /**
26
+ * One sentence, wherever a resolved `plan/STALL.md` sits under this README.
27
+ *
28
+ * Freshdesk shipped a settled plan whose README said "settled" and whose
29
+ * STALL.md said "INCOMPLETE — no plan"; nothing in the kit said which was
30
+ * current (F21). The file is replaced when the stage settles, and the README
31
+ * says what it now is instead of pointing at it as a live stall.
32
+ */
33
+ const improveResolvedStallLines = (status) => (status.present.stallResolved
34
+ ? ['', '`plan/STALL.md` records an earlier stall in this kit that has since resolved.'
35
+ + ' The plan and target here are current.']
36
+ : []);
23
37
  const statusSection = (args) => {
24
38
  const lines = ['## Status', ''];
25
39
  lines.push(...args.status.stages.map((stage) => `- ${improveStageStatusLine(stage)}`));
26
40
  lines.push(`- Target: ${args.status.targetMode}`);
41
+ // The page this kit is actually about, whenever it is not the page that was
42
+ // asked for (F27). It goes in the status block, above everything a reader
43
+ // would otherwise act on, because every artifact below describes it.
44
+ const captured = improveCapturedUrlLine(args.record);
45
+ if (captured)
46
+ lines.push(`- ${captured}`);
47
+ // Where the kit sits relative to the repository being improved, because a
48
+ // committed kit is 100 MB of paid artifacts in someone's history (F17).
49
+ const ignore = improveKitIgnoreStatusLine(args.record.kitIgnore);
50
+ if (ignore)
51
+ lines.push(`- ${ignore}`);
27
52
  lines.push(...improveAbandonedLines(args.record));
28
53
  if (args.status.complete) {
29
54
  lines.push('', ...(args.status.gateBlocked
@@ -31,12 +56,32 @@ const statusSection = (args) => {
31
56
  + ' and `token-patch.css`. Read `plan/GATE.md` before touching code; the target, its assets'
32
57
  + ' and the raster layers it names are all still here.']
33
58
  : args.record.convert?.layout === 'fixed'
34
- ? ['Convert fell back: the target HTML is fixed-layout, not responsive.'
35
- + ' The LayerDoc and its assets are the full-quality source of truth.']
36
- : ['Every requested stage settled. The kit is complete.']), '');
59
+ // The event, not just the outcome (F8): a lane that watched a silent
60
+ // wait needs the kit to confirm the responsive export stalled, and
61
+ // `plan/STALL.md` is where the timings and the collect-it-later
62
+ // command live.
63
+ ? ['Responsive export stalled; the plan was built from the fixed-layout fallback.'
64
+ + ' The target HTML is fixed-layout, not responsive, and the LayerDoc and its assets'
65
+ + ' are the full-quality source of truth.',
66
+ ...(args.status.present.stall
67
+ ? ['', 'See `plan/STALL.md` for what stalled, how long it waited, and how to collect'
68
+ + ' the responsive export later if it completes.']
69
+ : [])]
70
+ // A complete kit that still has a STALL.md stalled once and then
71
+ // settled. Saying only "the kit is complete" left the reader to
72
+ // adjudicate this README against a file that said INCOMPLETE (F21).
73
+ : ['Every requested stage settled. The kit is complete.',
74
+ ...improveResolvedStallLines(args.status)]), '');
37
75
  return lines;
38
76
  }
39
- lines.push('', `This kit is INCOMPLETE: ${args.status.missing.join(', ')}.`, ...(args.status.present.stall ? ['', 'See `plan/STALL.md` for what the run was waiting on.'] : []), '', 'Recovery, in order — the first resumes and replays every settled stage:', '', ...args.status.recovery.map(improveRecoveryLine), '', IMPROVE_NO_APPROXIMATION_RULE, '');
77
+ lines.push('', `This kit is INCOMPLETE: ${args.status.missing.join(', ')}.`, ...(args.status.present.stall && !args.status.present.stallResolved
78
+ ? ['', 'See `plan/STALL.md` for what the run was waiting on.']
79
+ : improveResolvedStallLines(args.status)), '',
80
+ // A never-picked kit has one recovery, and it is not a resume: heading it
81
+ // "the first resumes" over a single `--from pick` line reads as a stall.
82
+ ...(improveAwaitingPick(args.record)
83
+ ? [IMPROVE_AWAITING_PICK_RULE, '', 'Recovery — pick a candidate; convert and plan run from there:']
84
+ : ['Recovery, in order — the first resumes and replays every settled stage:']), '', ...args.status.recovery.map(improveRecoveryLine), '', IMPROVE_NO_APPROXIMATION_RULE, '');
40
85
  return lines;
41
86
  };
42
87
  const startHere = (args) => {
@@ -62,9 +107,11 @@ const startHere = (args) => {
62
107
  ? []
63
108
  : [args.status.gateBlocked
64
109
  ? 'Run the recovery above first: the steps below assume a target this kit has not finished.'
65
- : hasAssets
66
- ? 'Run the recovery above first: steps 3 and 4 need a plan this kit does not have yet.'
67
- : 'Run the recovery above first: steps 2 to 4 need a target this kit does not have yet.', '']),
110
+ : improveAwaitingPick(args.record)
111
+ ? 'Pick a candidate first (command above); steps 2 to 4 need the target that the pick produces.'
112
+ : hasAssets
113
+ ? 'Run the recovery above first: steps 3 and 4 need a plan this kit does not have yet.'
114
+ : 'Run the recovery above first: steps 2 to 4 need a target this kit does not have yet.', '']),
68
115
  // The frame a bound belongs to, before the first step that places anything:
69
116
  // a lane read these percentages as `winner.png` pixels and placed short.
70
117
  improveFrameMappingLine({
@@ -72,9 +119,14 @@ const startHere = (args) => {
72
119
  ...(args.index.canvas ? { design: args.index.canvas } : {}),
73
120
  }),
74
121
  '',
75
- args.status.designKind === 'layerdoc'
76
- ? `1. Open \`${design}\`. The supplied target document is the design.`
77
- : `1. Open \`${design}\`. It is the design.`,
122
+ // A never-picked kit has no winner, so `design` is the capture. Calling
123
+ // that "the design" is the same wrong turn the recovery block used to make.
124
+ improveAwaitingPick(args.record)
125
+ ? '1. Open the candidate PNGs in `candidates/` and pick one (command above).'
126
+ + ' `capture/source.png` is the page as it is today, not the design.'
127
+ : args.status.designKind === 'layerdoc'
128
+ ? `1. Open \`${design}\`. The supplied target document is the design.`
129
+ : `1. Open \`${design}\`. It is the design.`,
78
130
  '2. Copy the files the assets table below marks ship into the repository;'
79
131
  + ' the rest are references and alternates.',
80
132
  ...planSteps,
@@ -103,6 +155,12 @@ const assetsSection = (args) => {
103
155
  ...ROLE_GLOSSARY.map(({ role, pattern }) => `- ${IMPROVE_ASSET_ROLE_COPY[role].label}`
104
156
  + ` (\`${pattern}\`): ${IMPROVE_ASSET_ROLE_COPY[role].instruction}`),
105
157
  `- \`${design}\`: ${IMPROVE_ASSET_ROLE_COPY.design.instruction}`,
158
+ // F30: the single `currentColor` file the plan used to write rendered black
159
+ // in every external form this README recommends.
160
+ '- Icons (`plan/assets/added-*.svg`): reference `<name>.svg` — it carries the design\'s'
161
+ + ' declared colour and is safe as an `<img>`, `background-image`, or `url()`; its'
162
+ + ' `<name>-inline.svg` sibling paints with `currentColor` and is for inlining in the markup'
163
+ + ' or masking with a token colour.',
106
164
  '',
107
165
  ];
108
166
  if (args.index.assets.length === 0) {
@@ -156,8 +214,39 @@ const anatomy = (record) => [
156
214
  '',
157
215
  '- Apply the plan in the owning repository, then verify behavior and screenshots there. This kit never applies code.',
158
216
  '- Re-run from `pick` with another `--pick` slot to reuse capture and candidates; settled paid stages replay.',
217
+ // A magic-link triple is a live credential and this file sits in the working
218
+ // tree (F31), so the kit says what it holds and what a re-capture needs.
219
+ ...(record.bootstrap.length > 0
220
+ ? ['- This kit captured with `--bootstrap`. `improve.json` keeps only the redacted triple'
221
+ + ` (${record.bootstrap.map((value) => `\`${value}\``).join(', ')}) and its sha256 — the live`
222
+ + ' value, session token included, is stored nowhere. A re-capture needs `--bootstrap` passed'
223
+ + ' again.']
224
+ : []),
159
225
  '',
160
226
  ];
227
+ /**
228
+ * The design's font, and whose job it is to load it (F23).
229
+ *
230
+ * `plan/token-patch.css` used to open with a hosted Google Fonts `@import`,
231
+ * and this README makes applying that patch step 3 of "Start here" — so the
232
+ * one step a lane is told to apply wholesale was also the step that added a
233
+ * third-party network dependency to a repository that declared none. The patch
234
+ * names the family; loading it is the repository's own decision.
235
+ */
236
+ const fontsSection = (record) => {
237
+ const fonts = record.plan?.fonts ?? [];
238
+ if (fonts.length === 0)
239
+ return [];
240
+ return [
241
+ '## Fonts',
242
+ '',
243
+ ...fonts.map(({ family, weights }) => (`- ${family} (weights ${weights.join(', ')}). \`plan/token-patch.css\` declares it as a`
244
+ + ' token and imports nothing. Load the family the way this repository already loads fonts'
245
+ + ' — self-host it, or add it to the existing loader — or keep the current family and skip'
246
+ + ' the token.')),
247
+ '',
248
+ ];
249
+ };
161
250
  const fixedLayoutSection = (record) => (record.convert?.layout === 'fixed'
162
251
  ? [
163
252
  '## Fixed-layout target',
@@ -183,6 +272,7 @@ export const renderImproveReadme = (args) => [
183
272
  ...startHere(args),
184
273
  ...assetsSection(args),
185
274
  ...guardrails(),
275
+ ...fontsSection(args.record),
186
276
  ...fixedLayoutSection(args.record),
187
277
  ...anatomy(args.record),
188
278
  ].join('\n');
@@ -1 +1 @@
1
- {"version":3,"file":"improve-kit-readme.js","sourceRoot":"","sources":["../src/improve-kit-readme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,uBAAuB,EACvB,6B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,UAA0C,EAAE,EAC3B,EAAE;IACnB,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACxC,oBAAoB,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACtG,oBAAoB,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,cAAc,EAAE,CAAC;KACpF,CAAC,CAAC;IACH,MAAM,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACtF,OAAO,KAAK,CAAC,MAAM,CAAC;AACtB,CAAC,CAAC"}
@@ -3,14 +3,26 @@ import { type ImproveKitStatus } from './improve-kit-status.js';
3
3
  import { type ImproveResumeConversion } from './improve-convert-resilience.js';
4
4
  import { type RunJournalEntry } from './run-journal.js';
5
5
  import { type ImproveRecord, type ImproveStage } from './improve-workspace.js';
6
- /** A run that ran out of patience and a run somebody killed read differently. */
7
- export type ImproveStallKind = 'stalled' | 'stopped';
6
+ /**
7
+ * A run that ran out of patience, a run somebody killed, and a run that
8
+ * recovered read differently.
9
+ *
10
+ * `fallback` is the third: the responsive export stalled and improve derived
11
+ * fixed-layout HTML free from the settled LayerDoc, so the kit is complete and
12
+ * the plan was built — but something DID stall, and F8 (wave-2, 2026-09-03)
13
+ * found that nothing said so anywhere a lane looks. No STALL.md exists in any
14
+ * of the six wave-2 kits, including the two that fell back. A recovered run is
15
+ * not a clean run, and this file is where the difference gets written down.
16
+ */
17
+ export type ImproveStallKind = 'stalled' | 'stopped' | 'fallback';
8
18
  export type ImproveStallFacts = {
9
19
  stage: ImproveStage;
10
20
  kind: ImproveStallKind;
11
21
  hostedRunId?: string;
12
22
  waitedSeconds?: number;
13
23
  typicalSeconds?: number;
24
+ /** The published bound the wait ran against, when the caller knows it. */
25
+ boundSeconds?: number;
14
26
  serviceStage?: string;
15
27
  /** The conversion the first recovery command will attach to, if the kit knows one. */
16
28
  resume?: ImproveResumeConversion;
@@ -51,6 +63,40 @@ export declare const renderImproveStall: (args: {
51
63
  status: ImproveKitStatus;
52
64
  index: ImproveKitAssetIndex;
53
65
  }) => string;
66
+ /**
67
+ * The same file, for the run that recovered.
68
+ *
69
+ * The facts come off the durable record rather than out of an error, because
70
+ * there is no error: the responsive export stalled, the free derivation took
71
+ * over, and the run went on to build a plan. A kit written before
72
+ * `responsiveStall` existed records the fallback but not its timings, so this
73
+ * writes what it has and never invents a number.
74
+ */
75
+ export declare const writeImproveFallbackStall: (args: {
76
+ record: ImproveRecord;
77
+ requestedTo?: ImproveStage;
78
+ }) => Promise<string | undefined>;
79
+ /**
80
+ * The stall this kit recorded is over, so the file that recorded it stops
81
+ * saying the kit is INCOMPLETE (F21).
82
+ *
83
+ * Freshdesk's `--from convert` resume settled at 18:56:41Z and wrote a whole
84
+ * plan; the `plan/STALL.md` from 18:48:17Z survived beside it, still saying
85
+ * "this run was stopped", "no plan", and "resume or convert first" — directly
86
+ * contradicting the README above it, which said the plan was settled. A reader
87
+ * opening that kit cold got two mutually exclusive statuses and no way to tell
88
+ * which was current.
89
+ *
90
+ * The file is REPLACED rather than deleted: it is the durable record that this
91
+ * kit stalled once, which is worth keeping, and a README that links to it must
92
+ * not link to nothing. Its mtime is when the stall was written, which is the
93
+ * one timestamp neither the record nor the journal keeps.
94
+ */
95
+ export declare const resolveImproveStall: (args: {
96
+ record: ImproveRecord;
97
+ status: ImproveKitStatus;
98
+ now?: Date;
99
+ }) => Promise<string | undefined>;
54
100
  /**
55
101
  * Write `plan/STALL.md`, creating `plan/` when the plan stage never ran.
56
102
  * Returns the file so the caller can journal it as an artifact.
@@ -1 +1 @@
1
- {"version":3,"file":"improve-kit-stall.d.ts","sourceRoot":"","sources":["../src/improve-kit-stall.ts"],"names":[],"mappings":"AAIA,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAe7F,iFAAiF;AACjF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GAAU,MAAM;IACnD,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACrC;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,KAAG,OAAO,CAAC,iBAAiB,CAgC5B,CAAC;AAgDF,eAAO,MAAM,kBAAkB,GAA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