@pmelab/gtd 23.2.0 → 24.1.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.
Files changed (236) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +44 -11
  3. package/claude/hooks/access.ts +1 -1
  4. package/dist/chunks/Schema-Dh-mkwkq.mjs +25353 -0
  5. package/dist/chunks/reserved-ejn-LVYO.mjs +1388 -0
  6. package/dist/chunks/rolldown-runtime-8H4AJuhK.mjs +14 -0
  7. package/dist/chunks/steering-D-PvRC5W.mjs +16296 -0
  8. package/dist/chunks/wire-DA7q2ikx.mjs +473 -0
  9. package/dist/flows.mjs +525 -0
  10. package/dist/gtd.bundle.mjs +43830 -56044
  11. package/dist/steering.mjs +2 -0
  12. package/dist/testkit.mjs +13006 -0
  13. package/dist/wire.mjs +2 -0
  14. package/dist/workflow-kit.mjs +352 -0
  15. package/dist/workflows/feature.mjs +315 -0
  16. package/dist/workflows/fix.mjs +40 -0
  17. package/dist/workflows/review.mjs +25 -0
  18. package/dist/workflows.mjs +1953 -1724
  19. package/package.json +70 -8
  20. package/skills/authoring/SKILL.md +5 -4
  21. package/src/cli/Cli.test.ts +1329 -0
  22. package/src/cli/Cli.ts +1348 -0
  23. package/src/cli/Program.test.ts +2262 -0
  24. package/src/cli/Program.ts +1331 -0
  25. package/src/cli/ToolCommands.ts +43 -0
  26. package/src/cli/index.ts +14 -0
  27. package/src/edge/Edge.test.ts +1016 -0
  28. package/src/edge/Edge.ts +1225 -0
  29. package/src/edge/index.ts +16 -0
  30. package/src/emit/Emit.test.ts +425 -0
  31. package/src/emit/Emit.ts +139 -0
  32. package/src/emit/GitScript.test.ts +260 -0
  33. package/src/emit/GitScript.ts +131 -0
  34. package/src/emit/ModeContradiction.test.ts +120 -0
  35. package/src/emit/ModeContradiction.ts +66 -0
  36. package/src/emit/OutcomeScript.test.ts +238 -0
  37. package/src/emit/OutcomeScript.ts +73 -0
  38. package/src/emit/SteeringMode.test.ts +274 -0
  39. package/src/emit/SteeringMode.ts +256 -0
  40. package/src/emit/index.ts +40 -0
  41. package/src/flows/factory.ts +5 -1
  42. package/src/flows/runtime.ts +3 -0
  43. package/src/install/ConfigScaffold.ts +19 -0
  44. package/src/install/Install.test.ts +426 -0
  45. package/src/install/Install.ts +634 -0
  46. package/src/install/Version.ts +27 -0
  47. package/src/install/index.ts +3 -0
  48. package/src/platform/CommandRunner.ts +74 -0
  49. package/src/platform/Commentary.test.ts +126 -0
  50. package/src/platform/Commentary.ts +92 -0
  51. package/src/platform/Git.test.ts +50 -0
  52. package/src/platform/Git.ts +552 -0
  53. package/src/platform/Host.ts +42 -0
  54. package/src/platform/RetainedHistory.test.ts +65 -0
  55. package/src/platform/RetainedHistory.ts +34 -0
  56. package/src/platform/Workspace.test.ts +669 -0
  57. package/src/platform/Workspace.ts +631 -0
  58. package/src/platform/WorktreeState.test.ts +162 -0
  59. package/src/platform/WorktreeState.ts +50 -0
  60. package/src/platform/index.ts +22 -0
  61. package/src/replay/Access.test.ts +53 -0
  62. package/src/replay/Access.ts +46 -0
  63. package/src/replay/Format.test.ts +20 -0
  64. package/src/replay/Format.ts +14 -0
  65. package/src/replay/Replay.test.ts +887 -0
  66. package/src/replay/Replay.ts +669 -0
  67. package/src/replay/Trailers.test.ts +117 -0
  68. package/src/replay/Trailers.ts +213 -0
  69. package/src/replay/Tree.test.ts +25 -0
  70. package/src/replay/Tree.ts +45 -0
  71. package/src/replay/index.ts +11 -0
  72. package/src/steering/Blocks.fixture.ts +6 -0
  73. package/src/steering/Blocks.test.ts +167 -0
  74. package/src/steering/Blocks.ts +321 -0
  75. package/src/steering/CodeThreads.test.ts +127 -0
  76. package/src/steering/CodeThreads.ts +197 -0
  77. package/src/steering/Edits.test.ts +19 -0
  78. package/src/steering/Edits.ts +20 -0
  79. package/src/steering/Eol.test.ts +16 -0
  80. package/src/steering/Eol.ts +2 -0
  81. package/src/steering/FORMATS.md +58 -0
  82. package/src/steering/Footnotes.test.ts +977 -0
  83. package/src/steering/Footnotes.ts +661 -0
  84. package/src/steering/Inline.fixture.ts +7 -0
  85. package/src/steering/Inline.test.ts +227 -0
  86. package/src/steering/Inline.ts +195 -0
  87. package/src/steering/MarkdownTree.test.ts +247 -0
  88. package/src/steering/MarkdownTree.ts +260 -0
  89. package/src/steering/Outline.ts +19 -0
  90. package/src/steering/SteeringFormat.test.ts +91 -0
  91. package/src/steering/SteeringFormat.ts +267 -0
  92. package/src/steering/SteeringFormats.test.ts +163 -0
  93. package/src/steering/Threads.ts +163 -0
  94. package/src/steering/contract.test.ts +264 -0
  95. package/src/steering/fixtures/code-threads/cache.stripped.ts.txt +6 -0
  96. package/src/steering/fixtures/code-threads/cache.ts.md +15 -0
  97. package/src/steering/fixtures/free-form/notes.md +12 -0
  98. package/src/steering/fixtures/free-form/notes.read.json +42 -0
  99. package/src/steering/fixtures/qa/answered.md +23 -0
  100. package/src/steering/fixtures/qa/answered.read.json +119 -0
  101. package/src/steering/fixtures/qa/requirements.md +160 -0
  102. package/src/steering/fixtures/qa/requirements.read.json +475 -0
  103. package/src/steering/fixtures/review/review.md +76 -0
  104. package/src/steering/fixtures/review/review.read.json +237 -0
  105. package/src/steering/fixtures/review/ticked.md +23 -0
  106. package/src/steering/fixtures/review/ticked.read.json +99 -0
  107. package/src/steering/fixtures/review-notes/baseline.md +14 -0
  108. package/src/steering/fixtures/review-notes/noted.md +19 -0
  109. package/src/steering/freeform.test.ts +311 -0
  110. package/src/steering/freeform.ts +148 -0
  111. package/src/steering/index.test.ts +62 -0
  112. package/src/steering/index.ts +140 -0
  113. package/src/steering/qa.test.ts +2160 -0
  114. package/src/steering/qa.ts +1104 -0
  115. package/src/steering/review.test.ts +1829 -0
  116. package/src/steering/review.ts +1180 -0
  117. package/src/step/LandStep.ts +31 -0
  118. package/src/step/RepoSnapshot.ts +29 -0
  119. package/src/step/accessRefusal.test.ts +58 -0
  120. package/src/step/accessRefusal.ts +26 -0
  121. package/src/step/index.ts +5 -0
  122. package/src/step/planStart.test.ts +202 -0
  123. package/src/step/planStart.ts +167 -0
  124. package/src/step/planStep.test.ts +104 -0
  125. package/src/step/planStep.ts +89 -0
  126. package/src/step/snapshot.fixture.ts +28 -0
  127. package/src/testkit/EmittedScriptRecognizer.test.ts +639 -0
  128. package/src/testkit/EmittedScriptRecognizer.ts +642 -0
  129. package/src/testkit/FakeGitOperations.ts +95 -0
  130. package/src/testkit/GitTiers.test.ts +11 -0
  131. package/src/testkit/GitTiers.ts +1052 -0
  132. package/src/testkit/InMemRepo.ts +467 -0
  133. package/src/testkit/Layers.test.ts +58 -0
  134. package/src/testkit/Layers.ts +241 -0
  135. package/src/testkit/StrictGitOperations.ts +31 -0
  136. package/src/testkit/TestRepo.test.ts +119 -0
  137. package/src/testkit/TestRepo.ts +274 -0
  138. package/src/testkit/cliIo.ts +36 -0
  139. package/src/testkit/index.ts +9 -0
  140. package/src/testkit/steps.ts +177 -0
  141. package/src/testkit/testkit.feature +65 -0
  142. package/src/wire/BeatDocument.test.ts +419 -0
  143. package/src/wire/BeatDocument.ts +114 -0
  144. package/src/wire/BeatPlain.test.ts +113 -0
  145. package/src/wire/BeatPlain.ts +127 -0
  146. package/src/wire/BeatStatus.test.ts +59 -0
  147. package/src/wire/BeatStatus.ts +81 -0
  148. package/src/wire/Demand.test.ts +142 -0
  149. package/src/wire/Demand.ts +108 -0
  150. package/src/wire/ExitCodes.test.ts +21 -0
  151. package/src/wire/ExitCodes.ts +16 -0
  152. package/src/wire/Glob.ts +29 -0
  153. package/src/wire/Judge.ts +22 -0
  154. package/src/wire/Land.test.ts +120 -0
  155. package/src/wire/Land.ts +75 -0
  156. package/src/wire/Select.test.ts +148 -0
  157. package/src/wire/Select.ts +78 -0
  158. package/src/wire/Sessions.test.ts +59 -0
  159. package/src/wire/Sessions.ts +39 -0
  160. package/src/wire/WireSchema.test.ts +162 -0
  161. package/src/wire/constants.ts +22 -0
  162. package/src/wire/golden/1/beat-capture.json +34 -0
  163. package/src/wire/golden/1/beat-message.json +34 -0
  164. package/src/wire/golden/1/beat-prompt.json +44 -0
  165. package/src/wire/golden/1/beat-script.json +34 -0
  166. package/src/wire/golden/1/beat-stalled.json +34 -0
  167. package/src/wire/golden/1/judge.json +14 -0
  168. package/src/wire/golden/1/land-noop.json +10 -0
  169. package/src/wire/golden/1/land.json +10 -0
  170. package/src/wire/index.ts +12 -0
  171. package/src/wire/types.ts +46 -0
  172. package/src/workflow/Diagnostic.test.ts +93 -0
  173. package/src/workflow/Diagnostic.ts +54 -0
  174. package/src/workflow/SteeringFormats.test.ts +27 -0
  175. package/src/workflow/SteeringFormats.ts +6 -0
  176. package/src/workflow/Workflow.ts +77 -0
  177. package/src/workflow/compile.test.ts +53 -0
  178. package/src/workflow/compile.ts +56 -0
  179. package/src/workflow/discovery.ts +122 -0
  180. package/src/workflow/fingerprint.test.ts +52 -0
  181. package/src/workflow/fingerprint.ts +53 -0
  182. package/src/workflow/index.ts +33 -0
  183. package/src/workflow/load.test.ts +1017 -0
  184. package/src/workflow/load.ts +836 -0
  185. package/src/workflow/skills.test.ts +109 -0
  186. package/src/workflow/skills.ts +90 -0
  187. package/src/workflow/vars.ts +33 -0
  188. package/src/workflow-kit/health.test.ts +30 -0
  189. package/src/workflow-kit/health.ts +86 -0
  190. package/src/workflow-kit/index.ts +7 -0
  191. package/src/workflow-kit/quality.test.ts +17 -0
  192. package/src/workflow-kit/quality.ts +45 -0
  193. package/src/workflow-kit/review.ts +324 -0
  194. package/src/{workflows → workflow-kit}/scenarios.ts +21 -28
  195. package/src/workflows/feature/feature.test.ts +32 -0
  196. package/src/workflows/{bundled.ts → feature/feature.ts} +11 -63
  197. package/src/workflows/feature/index.ts +10 -0
  198. package/src/workflows/{packages.test.ts → feature/packages.test.ts} +2 -2
  199. package/src/workflows/{packages.ts → feature/packages.ts} +3 -3
  200. package/src/workflows/{planning.ts → feature/planning.ts} +2 -3
  201. package/src/workflows/{review.test.ts → feature/review.test.ts} +9 -44
  202. package/src/workflows/feature/review.ts +106 -0
  203. package/src/workflows/feature/steps.test.ts +82 -0
  204. package/src/workflows/feature/steps.ts +92 -0
  205. package/src/workflows/fix/fix.feature +80 -0
  206. package/src/workflows/fix/fix.test.ts +74 -0
  207. package/src/workflows/fix/fix.ts +52 -0
  208. package/src/workflows/fix/index.ts +6 -0
  209. package/src/workflows/index.ts +36 -2
  210. package/src/workflows/review/index.ts +6 -0
  211. package/src/workflows/review/review.test.ts +99 -0
  212. package/src/workflows/review/review.ts +33 -0
  213. package/src/workflows/{access.test.ts → shared/access.test.ts} +1 -1
  214. package/src/workflows/{access.ts → shared/access.ts} +3 -5
  215. package/src/workflows/shared/config.fixture.ts +12 -0
  216. package/src/workflows/{health.test.ts → shared/health.test.ts} +1 -1
  217. package/src/workflows/{health.ts → shared/health.ts} +38 -55
  218. package/src/workflows/{options.test.ts → shared/options.test.ts} +2 -2
  219. package/src/workflows/{options.ts → shared/options.ts} +14 -2
  220. package/src/workflows/shared/reserved.ts +11 -0
  221. package/src/workflows/{scenarios.test.ts → shared/scenarios.test.ts} +1 -1
  222. package/src/workflows/shared/scenarios.ts +35 -0
  223. package/src/workflows/{skills.test.ts → shared/skills.test.ts} +3 -1
  224. package/src/workflows/{skills.ts → shared/skills.ts} +7 -6
  225. package/src/workflows/{steps.test.ts → shared/steps.test.ts} +1 -66
  226. package/src/workflows/{steps.ts → shared/steps.ts} +8 -98
  227. package/src/workflows/shared/tail.test.ts +205 -0
  228. package/src/workflows/shared/tail.ts +135 -0
  229. package/src/workflows/{text.fixture.ts → shared/text.fixture.ts} +2 -2
  230. package/src/workflows/{text.ts → shared/text.ts} +48 -7
  231. package/src/workflows/{threads.test.ts → shared/threads.test.ts} +1 -1
  232. package/src/workflows/shared/workflows.steps.ts +7 -0
  233. package/src/workflows/review.ts +0 -362
  234. /package/src/workflows/{prose.ts → shared/prose.ts} +0 -0
  235. /package/src/workflows/{text.test.ts → shared/text.test.ts} +0 -0
  236. /package/src/workflows/{vars.ts → shared/vars.ts} +0 -0
@@ -0,0 +1,237 @@
1
+ {
2
+ "header": "0ef1c31",
3
+ "nodes": [
4
+ {
5
+ "title": "PR check: both-or-neither for title and footer",
6
+ "detail": "**The title check now runs both ways.** A `!` title with no footer fails, as before. **A footer with no `!` title now fails too.** The `!` match is a regex anchored at the type prefix, so **a `!:` later in the title no longer counts as breaking**.",
7
+ "body": [
8
+ {
9
+ "title": "**The title check now runs both ways.** A `!` title with no footer fails, as before. **A footer with no `!` title now fails too.** The `!` match is a regex anchored at the type prefix, so **a `!:` later in the title no longer counts as breaking**.",
10
+ "anchor": {
11
+ "kind": "paragraph",
12
+ "line": 11
13
+ }
14
+ }
15
+ ],
16
+ "anchor": {
17
+ "kind": "chunk",
18
+ "index": 0
19
+ },
20
+ "children": [
21
+ {
22
+ "title": "./.github/workflows/commits.yml#36-46",
23
+ "path": "./.github/workflows/commits.yml",
24
+ "line": 36,
25
+ "endLine": 46,
26
+ "checked": false,
27
+ "detail": "one `git log --no-merges --format=%B` over the range sets `carries`. The old per-commit loop is gone. `bang` is the bash version of `commitlint.config.mjs`'s `bangHeader` (`\\w` spelled `[A-Za-z0-9_]`). The step uses GitHub's default shell, `bash -e` without pipefail, so `grep -q` closing the pipe early cannot flip `carries` off. **If anyone adds `shell: bash` (which turns on pipefail), a SIGPIPE from `git log` can silently drop a found footer.**",
28
+ "anchor": {
29
+ "kind": "hunk",
30
+ "chunkIndex": 0,
31
+ "index": 0
32
+ }
33
+ },
34
+ {
35
+ "title": "./tests/tooling/commits.test.ts#52-59",
36
+ "path": "./tests/tooling/commits.test.ts",
37
+ "line": 52,
38
+ "endLine": 59,
39
+ "checked": false,
40
+ "detail": "`check` now wraps `checkTitle` with the fixed title `\"feat: a title\"`. `checkTitle` no longer adds a `feat: fine` commit when given no messages, so callers pass their own.",
41
+ "anchor": {
42
+ "kind": "hunk",
43
+ "chunkIndex": 0,
44
+ "index": 1
45
+ }
46
+ },
47
+ {
48
+ "title": "./tests/tooling/commits.test.ts#62-66",
49
+ "path": "./tests/tooling/commits.test.ts",
50
+ "line": 62,
51
+ "endLine": 66,
52
+ "checked": false,
53
+ "detail": "the passing case includes a footer commit, so its title gains `!`. Without it the new reverse rule fails the case.",
54
+ "anchor": {
55
+ "kind": "hunk",
56
+ "chunkIndex": 0,
57
+ "index": 2
58
+ }
59
+ },
60
+ {
61
+ "title": "./tests/tooling/commits.test.ts#118-132",
62
+ "path": "./tests/tooling/commits.test.ts",
63
+ "line": 118,
64
+ "endLine": 132,
65
+ "checked": false,
66
+ "detail": "existing cases are adapted: the title case now supplies its own commit, and the footer commit moves first in the list. Neither changes what the case asserts.",
67
+ "anchor": {
68
+ "kind": "hunk",
69
+ "chunkIndex": 0,
70
+ "index": 3
71
+ }
72
+ },
73
+ {
74
+ "title": "./tests/tooling/commits.test.ts#140-150",
75
+ "path": "./tests/tooling/commits.test.ts",
76
+ "line": 140,
77
+ "endLine": 150,
78
+ "checked": false,
79
+ "detail": "two new cases: a footer under a plain title fails with \"title has no\", and `` `!:` `` in the middle of a title passes.",
80
+ "anchor": {
81
+ "kind": "hunk",
82
+ "chunkIndex": 0,
83
+ "index": 4
84
+ }
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ "title": "Convention doc",
90
+ "detail": "**`docs/commits.md` states the reverse rule and that the 72-char limit applies before GitHub's ` (#N)` suffix.**",
91
+ "body": [
92
+ {
93
+ "title": "**`docs/commits.md` states the reverse rule and that the 72-char limit applies before GitHub's ` (#N)` suffix.**",
94
+ "anchor": {
95
+ "kind": "paragraph",
96
+ "line": 39
97
+ }
98
+ }
99
+ ],
100
+ "anchor": {
101
+ "kind": "chunk",
102
+ "index": 1
103
+ },
104
+ "children": [
105
+ {
106
+ "title": "./docs/commits.md#10-20",
107
+ "path": "./docs/commits.md",
108
+ "line": 10,
109
+ "endLine": 20,
110
+ "checked": false,
111
+ "detail": "prose only. The pinned string `at most 72 characters` is unchanged, so the doc-pin test still matches.",
112
+ "anchor": {
113
+ "kind": "hunk",
114
+ "chunkIndex": 1,
115
+ "index": 0
116
+ }
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "title": "Agent prompts state the rule",
122
+ "detail": "**Both closing-message prompts now require `!` and `BREAKING CHANGE: <how to migrate>` together, and list the type set.** A new test pins this.",
123
+ "body": [
124
+ {
125
+ "title": "**Both closing-message prompts now require `!` and `BREAKING CHANGE: <how to migrate>` together, and list the type set.** A new test pins this.",
126
+ "anchor": {
127
+ "kind": "paragraph",
128
+ "line": 47
129
+ }
130
+ }
131
+ ],
132
+ "anchor": {
133
+ "kind": "chunk",
134
+ "index": 2
135
+ },
136
+ "children": [
137
+ {
138
+ "title": "./src/workflows/text.ts#867-878",
139
+ "path": "./src/workflows/text.ts",
140
+ "line": 867,
141
+ "endLine": 878,
142
+ "checked": false,
143
+ "detail": "this replaces the old \"`!` alone is not enough\" note with \"both or neither\". It adds a subject-format bullet with the 9 types and the 72-char limit.",
144
+ "anchor": {
145
+ "kind": "hunk",
146
+ "chunkIndex": 2,
147
+ "index": 0
148
+ }
149
+ },
150
+ {
151
+ "title": "./claude/hooks/ship.ts#64-67",
152
+ "path": "./claude/hooks/ship.ts",
153
+ "line": 64,
154
+ "endLine": 67,
155
+ "checked": false,
156
+ "detail": "squash prompt: a `!` subject needs the footer.",
157
+ "anchor": {
158
+ "kind": "hunk",
159
+ "chunkIndex": 2,
160
+ "index": 1
161
+ }
162
+ },
163
+ {
164
+ "title": "./claude/hooks/ship.ts#301-304",
165
+ "path": "./claude/hooks/ship.ts",
166
+ "line": 301,
167
+ "endLine": 304,
168
+ "checked": false,
169
+ "detail": "PR prompt: a `!` title needs the footer line in the description. Line 304 now goes past the prompt's line width (cosmetic only).",
170
+ "anchor": {
171
+ "kind": "hunk",
172
+ "chunkIndex": 2,
173
+ "index": 2
174
+ }
175
+ },
176
+ {
177
+ "title": "./tests/tooling/commits.test.ts#161-170",
178
+ "path": "./tests/tooling/commits.test.ts",
179
+ "line": 161,
180
+ "endLine": 170,
181
+ "checked": false,
182
+ "detail": "pins both prompt files to the config's `type-enum` and the literal footer placeholder. **The type check is weak: `toContain(\"ci\")` / `\"fix\"` / `\"test\"` matches anywhere in large files, so dropping a type from the prompt prose would not fail it.** Only the footer string check has real power.",
183
+ "anchor": {
184
+ "kind": "hunk",
185
+ "chunkIndex": 2,
186
+ "index": 3
187
+ }
188
+ }
189
+ ]
190
+ },
191
+ {
192
+ "title": "Release bump cases and cache inputs",
193
+ "detail": "**More semantic-release cases, including a real GitHub squash body. The tooling task cache now also keys on `package-lock.json`.**",
194
+ "body": [
195
+ {
196
+ "title": "**More semantic-release cases, including a real GitHub squash body. The tooling task cache now also keys on `package-lock.json`.**",
197
+ "anchor": {
198
+ "kind": "paragraph",
199
+ "line": 67
200
+ }
201
+ }
202
+ ],
203
+ "anchor": {
204
+ "kind": "chunk",
205
+ "index": 3
206
+ },
207
+ "children": [
208
+ {
209
+ "title": "./tests/tooling/commits.test.ts#238-240",
210
+ "path": "./tests/tooling/commits.test.ts",
211
+ "line": 238,
212
+ "endLine": 240,
213
+ "checked": false,
214
+ "detail": "`fix` → patch, `docs` → no release, and a `(#12)` squash with a `* feat!:` body footer → 2.0.0. This proves the footer cuts a major from inside the squash body.",
215
+ "anchor": {
216
+ "kind": "hunk",
217
+ "chunkIndex": 3,
218
+ "index": 0
219
+ }
220
+ },
221
+ {
222
+ "title": "./turbo.json#86-88",
223
+ "path": "./turbo.json",
224
+ "line": 86,
225
+ "endLine": 88,
226
+ "checked": false,
227
+ "detail": "adds `package-lock.json` to the inputs, so a commitlint or semantic-release version bump no longer reuses a stale cached pass.",
228
+ "anchor": {
229
+ "kind": "hunk",
230
+ "chunkIndex": 3,
231
+ "index": 1
232
+ }
233
+ }
234
+ ]
235
+ }
236
+ ]
237
+ }
@@ -0,0 +1,23 @@
1
+ # Review: 1a2b3c4
2
+
3
+ <!-- base: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b -->
4
+
5
+ **Two chunks: the parser change and its tests.**
6
+
7
+ ## Parser accepts CRLF[^th1]
8
+
9
+ **Line endings are normalized before the split.**
10
+
11
+ - [x] ./src/parse.ts#10-14 — normalizes `\r\n` first
12
+ - [ ] ./src/parse.ts#30-31 — Risk: a lone `\r` is still kept as content
13
+ - [ ] ./src/eol.ts
14
+
15
+ [^th1]:
16
+ - H: Does this also cover the writer?
17
+ - A: No, the writer keeps the input's line endings.
18
+
19
+ ## Tests
20
+
21
+ - [x] ./src/parse.test.ts#1-40 — one case per line ending[^fn1]
22
+
23
+ [^fn1]: Mixed endings in one file are not covered.
@@ -0,0 +1,99 @@
1
+ {
2
+ "header": "1a2b3c4",
3
+ "nodes": [
4
+ {
5
+ "title": "Parser accepts CRLF",
6
+ "detail": "**Line endings are normalized before the split.**",
7
+ "body": [
8
+ {
9
+ "title": "**Line endings are normalized before the split.**",
10
+ "anchor": {
11
+ "kind": "paragraph",
12
+ "line": 8
13
+ }
14
+ }
15
+ ],
16
+ "anchor": {
17
+ "kind": "chunk",
18
+ "index": 0
19
+ },
20
+ "thread": {
21
+ "name": "th1",
22
+ "entries": [
23
+ {
24
+ "author": "me",
25
+ "text": "Does this also cover the writer?"
26
+ },
27
+ {
28
+ "author": "agent",
29
+ "text": "No, the writer keeps the input's line endings."
30
+ }
31
+ ],
32
+ "waitingOn": "human"
33
+ },
34
+ "children": [
35
+ {
36
+ "title": "./src/parse.ts#10-14",
37
+ "path": "./src/parse.ts",
38
+ "line": 10,
39
+ "endLine": 14,
40
+ "checked": true,
41
+ "detail": "normalizes `\\r\\n` first",
42
+ "anchor": {
43
+ "kind": "hunk",
44
+ "chunkIndex": 0,
45
+ "index": 0
46
+ }
47
+ },
48
+ {
49
+ "title": "./src/parse.ts#30-31",
50
+ "path": "./src/parse.ts",
51
+ "line": 30,
52
+ "endLine": 31,
53
+ "checked": false,
54
+ "detail": "Risk: a lone `\\r` is still kept as content",
55
+ "anchor": {
56
+ "kind": "hunk",
57
+ "chunkIndex": 0,
58
+ "index": 1
59
+ }
60
+ },
61
+ {
62
+ "title": "./src/eol.ts",
63
+ "path": "./src/eol.ts",
64
+ "checked": false,
65
+ "anchor": {
66
+ "kind": "hunk",
67
+ "chunkIndex": 0,
68
+ "index": 2
69
+ }
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "title": "Tests",
75
+ "detail": "",
76
+ "body": [],
77
+ "anchor": {
78
+ "kind": "chunk",
79
+ "index": 1
80
+ },
81
+ "children": [
82
+ {
83
+ "title": "./src/parse.test.ts#1-40",
84
+ "path": "./src/parse.test.ts",
85
+ "line": 1,
86
+ "endLine": 40,
87
+ "checked": true,
88
+ "detail": "one case per line ending",
89
+ "note": "Mixed endings in one file are not covered.",
90
+ "anchor": {
91
+ "kind": "hunk",
92
+ "chunkIndex": 1,
93
+ "index": 0
94
+ }
95
+ }
96
+ ]
97
+ }
98
+ ]
99
+ }
@@ -0,0 +1,14 @@
1
+ # Review: 1a2b3c4
2
+
3
+ <!-- base: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b -->
4
+
5
+ ## Parser accepts CRLF
6
+
7
+ **Line endings are normalized before the split.**
8
+
9
+ - [ ] ./src/parse.ts#10-14 — normalizes `\r\n` first
10
+ - [ ] ./src/parse.ts#30-31 — Risk: a lone `\r` is still kept as content
11
+
12
+ ## Tests
13
+
14
+ - [ ] ./src/parse.test.ts#1-40 — one case per line ending
@@ -0,0 +1,19 @@
1
+ # Review: 1a2b3c4
2
+
3
+ <!-- base: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b -->
4
+
5
+ ## Parser accepts CRLF[^th1]
6
+
7
+ **Line endings are normalized before the split.** Also normalize in the writer.
8
+
9
+ - [x] ./src/parse.ts#10-14 — normalizes `\r\n` first
10
+ - [ ] ./src/parse.ts#30-31 — Risk: a lone `\r` is still kept as content. Treat
11
+ it as a line break too.
12
+
13
+ [^th1]: - H: Is the writer in scope?
14
+
15
+ ## Tests
16
+
17
+ - [x] ./src/parse.test.ts#1-40 — one case per line ending[^fn1]
18
+
19
+ [^fn1]: Add a mixed-endings case.