@rasensio/aidlc 1.21.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/roadmap.d.ts.map +1 -1
- package/dist/commands/roadmap.js +19 -1
- package/dist/commands/roadmap.js.map +1 -1
- package/dist/roadmap/paths.d.ts +21 -0
- package/dist/roadmap/paths.d.ts.map +1 -1
- package/dist/roadmap/paths.js +17 -1
- package/dist/roadmap/paths.js.map +1 -1
- package/dist/roadmap/sync/body.d.ts +109 -23
- package/dist/roadmap/sync/body.d.ts.map +1 -1
- package/dist/roadmap/sync/body.js +260 -23
- package/dist/roadmap/sync/body.js.map +1 -1
- package/dist/roadmap/sync/collect.d.ts +9 -0
- package/dist/roadmap/sync/collect.d.ts.map +1 -1
- package/dist/roadmap/sync/collect.js +48 -3
- package/dist/roadmap/sync/collect.js.map +1 -1
- package/dist/roadmap/sync/execute.d.ts.map +1 -1
- package/dist/roadmap/sync/execute.js +12 -2
- package/dist/roadmap/sync/execute.js.map +1 -1
- package/dist/roadmap/sync/gh.d.ts +10 -0
- package/dist/roadmap/sync/gh.d.ts.map +1 -1
- package/dist/roadmap/sync/gh.js +24 -0
- package/dist/roadmap/sync/gh.js.map +1 -1
- package/dist/roadmap/sync/markdown.d.ts +79 -0
- package/dist/roadmap/sync/markdown.d.ts.map +1 -0
- package/dist/roadmap/sync/markdown.js +165 -0
- package/dist/roadmap/sync/markdown.js.map +1 -0
- package/dist/roadmap/sync/marker.d.ts +10 -1
- package/dist/roadmap/sync/marker.d.ts.map +1 -1
- package/dist/roadmap/sync/marker.js +16 -1
- package/dist/roadmap/sync/marker.js.map +1 -1
- package/dist/roadmap/sync/plan.d.ts +7 -0
- package/dist/roadmap/sync/plan.d.ts.map +1 -1
- package/dist/roadmap/sync/plan.js +22 -4
- package/dist/roadmap/sync/plan.js.map +1 -1
- package/dist/roadmap/sync/render.d.ts.map +1 -1
- package/dist/roadmap/sync/render.js +2 -0
- package/dist/roadmap/sync/render.js.map +1 -1
- package/dist/roadmap/sync/sanitize.d.ts +56 -0
- package/dist/roadmap/sync/sanitize.d.ts.map +1 -0
- package/dist/roadmap/sync/sanitize.js +140 -0
- package/dist/roadmap/sync/sanitize.js.map +1 -0
- package/dist/roadmap/sync/types.d.ts +30 -2
- package/dist/roadmap/sync/types.d.ts.map +1 -1
- package/dist/roadmap/sync/types.js +9 -2
- package/dist/roadmap/sync/types.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where markdown is code and where it is prose.
|
|
3
|
+
*
|
|
4
|
+
* One primitive, three consumers — the sanitizer, the item-reference linker, and the
|
|
5
|
+
* marker scanner. They have to agree: if the sanitizer defuses something the marker
|
|
6
|
+
* scanner still sees as a comment, the projection refuses runs for a hazard that is no
|
|
7
|
+
* longer there; if they disagree the other way, a quoted marker injects itself into an
|
|
8
|
+
* issue. Agreement is cheap to state as a shared function and expensive to maintain as a
|
|
9
|
+
* convention across three regexes.
|
|
10
|
+
*
|
|
11
|
+
* Measured on this project's roadmap (76 items, 451,503 characters of body text) on
|
|
12
|
+
* 2026-09-07: 40 of the 41 hazard spans a naive sanitizer would rewrite are **inside
|
|
13
|
+
* code** — `@clack/prompts`, `actions/checkout@v4`, CSS colour hexes such as `#0891b2`
|
|
14
|
+
* that a `#123` pattern also matches, and one HTML comment. Exactly one is in prose. So
|
|
15
|
+
* code-awareness is not a refinement of the sanitizer; it is the difference between
|
|
16
|
+
* corrupting 40 spans and defusing 1.
|
|
17
|
+
*
|
|
18
|
+
* The inline-code pattern here is deliberately stronger than the prior art in
|
|
19
|
+
* `packages/website/scripts/blog/mdx-escape.mjs`, whose `` /(`[^`\n]*`)/ `` recognises
|
|
20
|
+
* single-backtick spans only. Two of the figures above were wrong under that weaker
|
|
21
|
+
* pattern: it read a prose `#17` as code, and it could not see that all 32 item-id
|
|
22
|
+
* references are code spans. Tightening the pattern is the reason this module exists
|
|
23
|
+
* rather than a detail of it — which is also why `mdx-escape.mjs` is left alone: it
|
|
24
|
+
* escapes for a different dialect, in a different package, and widening it would be a
|
|
25
|
+
* change to the blog pipeline nobody asked for.
|
|
26
|
+
*
|
|
27
|
+
* Requirements: richer-issue-bodies/AC-8
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
/** One inline code span, with its bounds in the source and its content between the ticks. */
|
|
32
|
+
export interface CodeSpan {
|
|
33
|
+
/** Index of the first backtick. */
|
|
34
|
+
start: number;
|
|
35
|
+
/** Index one past the last backtick. */
|
|
36
|
+
end: number;
|
|
37
|
+
/** Text between the backtick runs, unmodified. */
|
|
38
|
+
content: string;
|
|
39
|
+
/** How many backticks delimit it, so a rewrite can re-wrap with the same number. */
|
|
40
|
+
ticks: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A byte per character: 1 inside a fenced block or an inline code span, 0 in prose.
|
|
44
|
+
*
|
|
45
|
+
* Fence opener and closer lines are themselves marked as code. That is deliberate: an
|
|
46
|
+
* info string such as ```` ```ts ```` is not prose, and a rule that rewrote it would
|
|
47
|
+
* change what language a block claims to be.
|
|
48
|
+
*
|
|
49
|
+
* Linear in the length of the text: one pass over lines, and one regex walk per prose
|
|
50
|
+
* line.
|
|
51
|
+
*/
|
|
52
|
+
export declare function codeMask(text: string): Uint8Array;
|
|
53
|
+
/**
|
|
54
|
+
* Every inline code span outside a fenced block, in order of appearance.
|
|
55
|
+
*
|
|
56
|
+
* Spans *inside* a fence are not returned: their backticks are literal text there, and a
|
|
57
|
+
* caller rewriting one would be editing the contents of a code block.
|
|
58
|
+
*/
|
|
59
|
+
export declare function inlineCodeSpans(text: string): CodeSpan[];
|
|
60
|
+
/**
|
|
61
|
+
* Rewrite the prose runs of a document, copying every code run byte-identical.
|
|
62
|
+
*
|
|
63
|
+
* `fn` is called once per maximal prose run. It may return text of any length — offsets
|
|
64
|
+
* are not preserved across the call, which is why the mask is computed once up front
|
|
65
|
+
* rather than consulted per match.
|
|
66
|
+
*/
|
|
67
|
+
export declare function mapProse(text: string, fn: (prose: string) => string): string;
|
|
68
|
+
/**
|
|
69
|
+
* The last index at or before `limit` where a line break sits in **prose**.
|
|
70
|
+
*
|
|
71
|
+
* Used to choose a truncation point. A blank line inside a fenced block is masked as
|
|
72
|
+
* code, so restricting the cut to an unmasked newline is what stops truncation leaving a
|
|
73
|
+
* fence open — a body ending mid-fence renders the rest of the issue as one code block.
|
|
74
|
+
*
|
|
75
|
+
* Returns -1 when no such position exists, which the caller must treat as "cannot
|
|
76
|
+
* truncate safely" rather than as position 0.
|
|
77
|
+
*/
|
|
78
|
+
export declare function lastProseBreakBefore(text: string, limit: number): number;
|
|
79
|
+
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/roadmap/sync/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAkBH,6FAA6F;AAC7F,MAAM,WAAW,QAAQ;IACvB,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAkCjD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,EAAE,CA2BxD;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAc5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxE"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where markdown is code and where it is prose.
|
|
3
|
+
*
|
|
4
|
+
* One primitive, three consumers — the sanitizer, the item-reference linker, and the
|
|
5
|
+
* marker scanner. They have to agree: if the sanitizer defuses something the marker
|
|
6
|
+
* scanner still sees as a comment, the projection refuses runs for a hazard that is no
|
|
7
|
+
* longer there; if they disagree the other way, a quoted marker injects itself into an
|
|
8
|
+
* issue. Agreement is cheap to state as a shared function and expensive to maintain as a
|
|
9
|
+
* convention across three regexes.
|
|
10
|
+
*
|
|
11
|
+
* Measured on this project's roadmap (76 items, 451,503 characters of body text) on
|
|
12
|
+
* 2026-09-07: 40 of the 41 hazard spans a naive sanitizer would rewrite are **inside
|
|
13
|
+
* code** — `@clack/prompts`, `actions/checkout@v4`, CSS colour hexes such as `#0891b2`
|
|
14
|
+
* that a `#123` pattern also matches, and one HTML comment. Exactly one is in prose. So
|
|
15
|
+
* code-awareness is not a refinement of the sanitizer; it is the difference between
|
|
16
|
+
* corrupting 40 spans and defusing 1.
|
|
17
|
+
*
|
|
18
|
+
* The inline-code pattern here is deliberately stronger than the prior art in
|
|
19
|
+
* `packages/website/scripts/blog/mdx-escape.mjs`, whose `` /(`[^`\n]*`)/ `` recognises
|
|
20
|
+
* single-backtick spans only. Two of the figures above were wrong under that weaker
|
|
21
|
+
* pattern: it read a prose `#17` as code, and it could not see that all 32 item-id
|
|
22
|
+
* references are code spans. Tightening the pattern is the reason this module exists
|
|
23
|
+
* rather than a detail of it — which is also why `mdx-escape.mjs` is left alone: it
|
|
24
|
+
* escapes for a different dialect, in a different package, and widening it would be a
|
|
25
|
+
* change to the blog pipeline nobody asked for.
|
|
26
|
+
*
|
|
27
|
+
* Requirements: richer-issue-bodies/AC-8
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* A fence opener or closer: up to three leading spaces, then three or more backticks or
|
|
33
|
+
* tildes. CommonMark's rule, and the same one `mdx-escape.mjs` applies.
|
|
34
|
+
*/
|
|
35
|
+
const FENCE_RE = /^\s{0,3}(`{3,}|~{3,})/;
|
|
36
|
+
/**
|
|
37
|
+
* One inline code span.
|
|
38
|
+
*
|
|
39
|
+
* A run of N backticks closed by a run of **exactly** N — not by a prefix of a longer
|
|
40
|
+
* run, which is what the lookarounds buy. Without them `` ``a`` `` reads as a one-backtick
|
|
41
|
+
* span containing `` `a `` and the classification of everything after it on the line
|
|
42
|
+
* shifts by one span.
|
|
43
|
+
*/
|
|
44
|
+
const INLINE_CODE_RE = /(?<!`)(`+)(?!`)([^\n]*?)(?<!`)\1(?!`)/g;
|
|
45
|
+
/**
|
|
46
|
+
* A byte per character: 1 inside a fenced block or an inline code span, 0 in prose.
|
|
47
|
+
*
|
|
48
|
+
* Fence opener and closer lines are themselves marked as code. That is deliberate: an
|
|
49
|
+
* info string such as ```` ```ts ```` is not prose, and a rule that rewrote it would
|
|
50
|
+
* change what language a block claims to be.
|
|
51
|
+
*
|
|
52
|
+
* Linear in the length of the text: one pass over lines, and one regex walk per prose
|
|
53
|
+
* line.
|
|
54
|
+
*/
|
|
55
|
+
export function codeMask(text) {
|
|
56
|
+
const mask = new Uint8Array(text.length);
|
|
57
|
+
let pos = 0;
|
|
58
|
+
let fence = null;
|
|
59
|
+
for (const line of text.split('\n')) {
|
|
60
|
+
const opener = FENCE_RE.exec(line);
|
|
61
|
+
if (opener !== null) {
|
|
62
|
+
const marker = opener[1];
|
|
63
|
+
if (fence === null) {
|
|
64
|
+
fence = marker;
|
|
65
|
+
}
|
|
66
|
+
else if (marker[0] === fence[0] && marker.length >= fence.length) {
|
|
67
|
+
fence = null;
|
|
68
|
+
}
|
|
69
|
+
// `+ 1` covers the trailing newline. Without it the line breaks *between* fenced
|
|
70
|
+
// lines read as prose, and `lastProseBreakBefore` would happily choose one — which is
|
|
71
|
+
// exactly the mid-fence truncation it exists to prevent. Found by that test, not by
|
|
72
|
+
// reading this loop.
|
|
73
|
+
mask.fill(1, pos, pos + line.length + 1);
|
|
74
|
+
}
|
|
75
|
+
else if (fence !== null) {
|
|
76
|
+
mask.fill(1, pos, pos + line.length + 1);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
INLINE_CODE_RE.lastIndex = 0;
|
|
80
|
+
let match;
|
|
81
|
+
while ((match = INLINE_CODE_RE.exec(line)) !== null) {
|
|
82
|
+
mask.fill(1, pos + match.index, pos + match.index + match[0].length);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// +1 for the newline `split` consumed. The final line has no newline, but writing
|
|
86
|
+
// past the end of a `fill` range is a no-op, so no special case is needed.
|
|
87
|
+
pos += line.length + 1;
|
|
88
|
+
}
|
|
89
|
+
return mask;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Every inline code span outside a fenced block, in order of appearance.
|
|
93
|
+
*
|
|
94
|
+
* Spans *inside* a fence are not returned: their backticks are literal text there, and a
|
|
95
|
+
* caller rewriting one would be editing the contents of a code block.
|
|
96
|
+
*/
|
|
97
|
+
export function inlineCodeSpans(text) {
|
|
98
|
+
const spans = [];
|
|
99
|
+
let pos = 0;
|
|
100
|
+
let fence = null;
|
|
101
|
+
for (const line of text.split('\n')) {
|
|
102
|
+
const opener = FENCE_RE.exec(line);
|
|
103
|
+
if (opener !== null) {
|
|
104
|
+
const marker = opener[1];
|
|
105
|
+
if (fence === null)
|
|
106
|
+
fence = marker;
|
|
107
|
+
else if (marker[0] === fence[0] && marker.length >= fence.length)
|
|
108
|
+
fence = null;
|
|
109
|
+
}
|
|
110
|
+
else if (fence === null) {
|
|
111
|
+
INLINE_CODE_RE.lastIndex = 0;
|
|
112
|
+
let match;
|
|
113
|
+
while ((match = INLINE_CODE_RE.exec(line)) !== null) {
|
|
114
|
+
spans.push({
|
|
115
|
+
start: pos + match.index,
|
|
116
|
+
end: pos + match.index + match[0].length,
|
|
117
|
+
content: match[2],
|
|
118
|
+
ticks: match[1].length,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
pos += line.length + 1;
|
|
123
|
+
}
|
|
124
|
+
return spans;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Rewrite the prose runs of a document, copying every code run byte-identical.
|
|
128
|
+
*
|
|
129
|
+
* `fn` is called once per maximal prose run. It may return text of any length — offsets
|
|
130
|
+
* are not preserved across the call, which is why the mask is computed once up front
|
|
131
|
+
* rather than consulted per match.
|
|
132
|
+
*/
|
|
133
|
+
export function mapProse(text, fn) {
|
|
134
|
+
const mask = codeMask(text);
|
|
135
|
+
const out = [];
|
|
136
|
+
let runStart = 0;
|
|
137
|
+
for (let i = 1; i <= text.length; i++) {
|
|
138
|
+
const boundary = i === text.length || mask[i] !== mask[runStart];
|
|
139
|
+
if (!boundary)
|
|
140
|
+
continue;
|
|
141
|
+
const run = text.slice(runStart, i);
|
|
142
|
+
out.push(mask[runStart] === 1 ? run : fn(run));
|
|
143
|
+
runStart = i;
|
|
144
|
+
}
|
|
145
|
+
return out.join('');
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The last index at or before `limit` where a line break sits in **prose**.
|
|
149
|
+
*
|
|
150
|
+
* Used to choose a truncation point. A blank line inside a fenced block is masked as
|
|
151
|
+
* code, so restricting the cut to an unmasked newline is what stops truncation leaving a
|
|
152
|
+
* fence open — a body ending mid-fence renders the rest of the issue as one code block.
|
|
153
|
+
*
|
|
154
|
+
* Returns -1 when no such position exists, which the caller must treat as "cannot
|
|
155
|
+
* truncate safely" rather than as position 0.
|
|
156
|
+
*/
|
|
157
|
+
export function lastProseBreakBefore(text, limit) {
|
|
158
|
+
const mask = codeMask(text);
|
|
159
|
+
for (let i = Math.min(limit, text.length - 1); i >= 0; i--) {
|
|
160
|
+
if (text[i] === '\n' && mask[i] === 0)
|
|
161
|
+
return i;
|
|
162
|
+
}
|
|
163
|
+
return -1;
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../../src/roadmap/sync/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;GAGG;AACH,MAAM,QAAQ,GAAG,uBAAuB,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,cAAc,GAAG,wCAAwC,CAAC;AAchE;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,KAAK,GAAkB,IAAI,CAAC;IAEhC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YACpB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,KAAK,GAAG,MAAM,CAAC;YACjB,CAAC;iBAAM,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;gBACnE,KAAK,GAAG,IAAI,CAAC;YACf,CAAC;YACD,iFAAiF;YACjF,sFAAsF;YACtF,oFAAoF;YACpF,qBAAqB;YACrB,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC;aAAM,IAAI,KAAK,KAAK,IAAI,EA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AK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/C,QAAQ,GAAG,CAAC,CAAC;IACf,CAAC;IAED,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,KAAa;IAC9D,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3D,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;YAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
|
@@ -19,8 +19,17 @@
|
|
|
19
19
|
* skill's own collision rule, which suffixes a duplicate slug with `-2`. So the id is
|
|
20
20
|
* *extracted* and compared with `===`, never searched for as a substring.
|
|
21
21
|
*
|
|
22
|
+
* A third property was added by `richer-issue-bodies`:
|
|
23
|
+
*
|
|
24
|
+
* - **Matching is code-aware.** Once item prose is projected into the body, a marker
|
|
25
|
+
* quoted inside a fence or an inline code span is *visible code*, not a comment —
|
|
26
|
+
* GitHub renders it as text. A scanner that counted it would refuse runs as ambiguous
|
|
27
|
+
* over something no reader sees as a marker. The corpus holds exactly one such
|
|
28
|
+
* occurrence today, in a code span, so this is a measured case rather than a
|
|
29
|
+
* hypothetical one. The invariant to keep is that the scanner and the renderer agree.
|
|
30
|
+
*
|
|
22
31
|
* Requirements: roadmap-issue-projection/AC-47, roadmap-issue-projection/AC-48,
|
|
23
|
-
* roadmap-issue-projection/AC-49
|
|
32
|
+
* roadmap-issue-projection/AC-49, richer-issue-bodies/AC-15
|
|
24
33
|
*
|
|
25
34
|
* @module
|
|
26
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../../src/roadmap/sync/marker.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../../src/roadmap/sync/marker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAaH,wCAAwC;AACxC,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAapD"}
|
|
@@ -19,11 +19,21 @@
|
|
|
19
19
|
* skill's own collision rule, which suffixes a duplicate slug with `-2`. So the id is
|
|
20
20
|
* *extracted* and compared with `===`, never searched for as a substring.
|
|
21
21
|
*
|
|
22
|
+
* A third property was added by `richer-issue-bodies`:
|
|
23
|
+
*
|
|
24
|
+
* - **Matching is code-aware.** Once item prose is projected into the body, a marker
|
|
25
|
+
* quoted inside a fence or an inline code span is *visible code*, not a comment —
|
|
26
|
+
* GitHub renders it as text. A scanner that counted it would refuse runs as ambiguous
|
|
27
|
+
* over something no reader sees as a marker. The corpus holds exactly one such
|
|
28
|
+
* occurrence today, in a code span, so this is a measured case rather than a
|
|
29
|
+
* hypothetical one. The invariant to keep is that the scanner and the renderer agree.
|
|
30
|
+
*
|
|
22
31
|
* Requirements: roadmap-issue-projection/AC-47, roadmap-issue-projection/AC-48,
|
|
23
|
-
* roadmap-issue-projection/AC-49
|
|
32
|
+
* roadmap-issue-projection/AC-49, richer-issue-bodies/AC-15
|
|
24
33
|
*
|
|
25
34
|
* @module
|
|
26
35
|
*/
|
|
36
|
+
import { codeMask } from './markdown.js';
|
|
27
37
|
/**
|
|
28
38
|
* Marker scanner.
|
|
29
39
|
*
|
|
@@ -46,9 +56,14 @@ export function renderMarker(id) {
|
|
|
46
56
|
*/
|
|
47
57
|
export function findMarkerIds(body) {
|
|
48
58
|
const ids = [];
|
|
59
|
+
const mask = codeMask(body);
|
|
49
60
|
// `matchAll` on a fresh iterator each call — the regex is module-level and `g`-flagged,
|
|
50
61
|
// so relying on `lastIndex` across calls would make results depend on call order.
|
|
51
62
|
for (const match of body.matchAll(MARKER_RE)) {
|
|
63
|
+
// A marker inside a fence or an inline code span is code the reader can see, not a
|
|
64
|
+
// comment. Skipping it is what keeps this scanner in step with GitHub's renderer.
|
|
65
|
+
if (mask[match.index] === 1)
|
|
66
|
+
continue;
|
|
52
67
|
const id = match[1];
|
|
53
68
|
if (!ids.includes(id))
|
|
54
69
|
ids.push(id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker.js","sourceRoot":"","sources":["../../../src/roadmap/sync/marker.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"marker.js","sourceRoot":"","sources":["../../../src/roadmap/sync/marker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,0DAA0D,CAAC;AAE7E,wCAAwC;AACxC,MAAM,UAAU,YAAY,CAAC,EAAU;IACrC,OAAO,oBAAoB,EAAE,MAAM,CAAC;AACtC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,wFAAwF;IACxF,kFAAkF;IAClF,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,mFAAmF;QACnF,kFAAkF;QAClF,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;YAAE,SAAS;QACtC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @module
|
|
17
17
|
*/
|
|
18
|
+
import { type BodyContext } from './body.js';
|
|
18
19
|
import type { SyncConfig } from './config.js';
|
|
19
20
|
import { type Plan, type ProjectableItem, type RemoteIssue, type UnprojectableRef } from './types.js';
|
|
20
21
|
/** GitHub's own issue-title limit. */
|
|
@@ -27,6 +28,12 @@ export interface PlanInput {
|
|
|
27
28
|
retireIneligible: boolean;
|
|
28
29
|
/** Printed in the plan header and the prompt. */
|
|
29
30
|
repoLabel: string;
|
|
31
|
+
/**
|
|
32
|
+
* Everything body rendering needs. Required rather than defaulted: a silent default
|
|
33
|
+
* would render every body with no permalinks and no reference links, and nothing
|
|
34
|
+
* anywhere would say so.
|
|
35
|
+
*/
|
|
36
|
+
bodyContext: BodyContext;
|
|
30
37
|
}
|
|
31
38
|
export type PlanResult = {
|
|
32
39
|
kind: 'ok';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/roadmap/sync/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAIL,KAAK,IAAI,EAET,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AAEpB,sCAAsC;AACtC,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,MAAM,WAAW,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AgE3D"}
|
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
* @module
|
|
17
17
|
*/
|
|
18
18
|
import { ROADMAP_STATUSES } from '../paths.js';
|
|
19
|
+
import { extractRegion, mergeBody, renderGeneratedRegion } from './body.js';
|
|
19
20
|
import { isStatusLabel, statusLabel } from './labels.js';
|
|
20
21
|
import { findMarkerIds } from './marker.js';
|
|
21
22
|
import { WRITE_ORDER, isWrite, } from './types.js';
|
|
22
23
|
/** GitHub's own issue-title limit. */
|
|
23
24
|
export const MAX_ISSUE_TITLE_LENGTH = 256;
|
|
24
25
|
export function planProjection(input) {
|
|
25
|
-
const { config, items, unprojectable, issues, retireIneligible, repoLabel } = input;
|
|
26
|
+
const { config, items, unprojectable, issues, retireIneligible, repoLabel, bodyContext } = input;
|
|
26
27
|
const eligible = new Set(config.statuses);
|
|
27
28
|
// -------------------------------------------------------------------------
|
|
28
29
|
// Refusals, in a fixed order (design: one deterministic message per tree)
|
|
@@ -60,7 +61,7 @@ export function planProjection(input) {
|
|
|
60
61
|
const issue = byId.get(item.id) ?? null;
|
|
61
62
|
if (issue !== null)
|
|
62
63
|
claimedIssues.add(issue.number);
|
|
63
|
-
lines.push(...linesForItem(item, issue, eligible, retireIneligible));
|
|
64
|
+
lines.push(...linesForItem(item, issue, eligible, retireIneligible, bodyContext));
|
|
64
65
|
}
|
|
65
66
|
// Issue-only lines: an issue nothing on disk claims.
|
|
66
67
|
for (const issue of issues) {
|
|
@@ -92,7 +93,7 @@ export function planProjection(input) {
|
|
|
92
93
|
* Non-terminal branches *are* collected, so a `done` item that was also retitled in the
|
|
93
94
|
* same run emits both `update-title` and `close` and converges in one pass.
|
|
94
95
|
*/
|
|
95
|
-
function linesForItem(item, issue, eligible, retireIneligible) {
|
|
96
|
+
function linesForItem(item, issue, eligible, retireIneligible, bodyContext) {
|
|
96
97
|
const isEligible = eligible.has(item.status);
|
|
97
98
|
if (issue === null) {
|
|
98
99
|
if (!isEligible)
|
|
@@ -108,6 +109,7 @@ function linesForItem(item, issue, eligible, retireIneligible) {
|
|
|
108
109
|
detail: null,
|
|
109
110
|
addLabels: [statusLabel(item.status)],
|
|
110
111
|
removeLabels: [],
|
|
112
|
+
newBody: renderGeneratedRegion(item, bodyContext),
|
|
111
113
|
},
|
|
112
114
|
];
|
|
113
115
|
}
|
|
@@ -139,6 +141,22 @@ function linesForItem(item, issue, eligible, retireIneligible) {
|
|
|
139
141
|
detail: null,
|
|
140
142
|
addLabels: hasWanted ? [] : [wanted],
|
|
141
143
|
removeLabels: stale,
|
|
144
|
+
newBody: null,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
// Region-to-region comparison, not body-to-body: the whole point of the delimiters is
|
|
148
|
+
// that text outside them is not the projection's to have an opinion about, so an issue
|
|
149
|
+
// somebody added a note to must still read as `unchanged`.
|
|
150
|
+
const region = renderGeneratedRegion(item, bodyContext);
|
|
151
|
+
if (extractRegion(issue.body) !== region) {
|
|
152
|
+
collected.push({
|
|
153
|
+
outcome: 'update-body',
|
|
154
|
+
item,
|
|
155
|
+
issueNumber: issue.number,
|
|
156
|
+
detail: null,
|
|
157
|
+
addLabels: [],
|
|
158
|
+
removeLabels: [],
|
|
159
|
+
newBody: mergeBody(issue.body, region, item.id),
|
|
142
160
|
});
|
|
143
161
|
}
|
|
144
162
|
if (item.status === 'done' && issue.state === 'OPEN') {
|
|
@@ -150,7 +168,7 @@ function linesForItem(item, issue, eligible, retireIneligible) {
|
|
|
150
168
|
return collected;
|
|
151
169
|
}
|
|
152
170
|
function line(outcome, item, issueNumber, detail) {
|
|
153
|
-
return { outcome, item, issueNumber, detail, addLabels: [], removeLabels: [] };
|
|
171
|
+
return { outcome, item, issueNumber, detail, addLabels: [], removeLabels: [], newBody: null };
|
|
154
172
|
}
|
|
155
173
|
// ---------------------------------------------------------------------------
|
|
156
174
|
// Indexing and refusal messages
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/roadmap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WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,uEAAuE;AACvE,SAAS,WAAW,CAAC,OAAgB;IACnC,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;AACnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/roadmap/sync/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAyB,KAAK,IAAI,EAAiB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/roadmap/sync/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAyB,KAAK,IAAI,EAAiB,MAAM,YAAY,CAAC;AAgC7E,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAoB7C;AAwBD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAiB1C;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEjD"}
|
|
@@ -20,6 +20,7 @@ const COUNT_ORDER = [
|
|
|
20
20
|
'create',
|
|
21
21
|
'update-title',
|
|
22
22
|
'update-labels',
|
|
23
|
+
'update-body',
|
|
23
24
|
'close',
|
|
24
25
|
'unchanged',
|
|
25
26
|
'skip',
|
|
@@ -33,6 +34,7 @@ const GLOSS = {
|
|
|
33
34
|
create: 'create an issue',
|
|
34
35
|
'update-title': 'update the issue title',
|
|
35
36
|
'update-labels': 'update the aidlc: status label',
|
|
37
|
+
'update-body': 'refresh the projected description',
|
|
36
38
|
close: 'close the issue',
|
|
37
39
|
unchanged: 'already matches',
|
|
38
40
|
skip: 'not projected',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/roadmap/sync/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAA0C,MAAM,YAAY,CAAC;AAE7E,wEAAwE;AACxE,MAAM,WAAW,GAAuB;IACtC,QAAQ;IACR,cAAc;IACd,eAAe;IACf,OAAO;IACP,WAAW;IACX,MAAM;IACN,iBAAiB;IACjB,uBAAuB;IACvB,gBAAgB;IAChB,sBAAsB;CACvB,CAAC;AAEF,4EAA4E;AAC5E,MAAM,KAAK,GAAsC;IAC/C,MAAM,EAAE,iBAAiB;IACzB,cAAc,EAAE,wBAAwB;IACxC,eAAe,EAAE,gCAAgC;IACjD,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,iBAAiB;IAC5B,IAAI,EAAE,eAAe;IACrB,iBAAiB,EAAE,+CAA+C;IAClE,uBAAuB,EAAE,8CAA8C;IACvE,gBAAgB,EAAE,iBAAiB;IACnC,sBAAsB,EAAE,qCAAqC;CAC9D,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,IAAU;IACnC,MAAM,GAAG,GAAa,EAAE,CAAC;IAEzB,GAAG,CAAC,IAAI,CAAC,6BAA6B,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACxD,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEb,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,GAAG,CAAC,IAAI,CAAC,+EAA+E,CAAC,CAAC;QAC1F,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACb,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,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AC;AACnG,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make one item's prose safe to publish, and make its references clickable.
|
|
3
|
+
*
|
|
4
|
+
* The body used to carry no item prose at all, and the reason was three real hazards. Two
|
|
5
|
+
* of them are properties of GitHub's renderer and one is a property of this feature's own
|
|
6
|
+
* marker scanner:
|
|
7
|
+
*
|
|
8
|
+
* - **Marker injection.** The item↔issue link is an HTML comment. An item that quotes one
|
|
9
|
+
* would stamp a second marker onto a different issue, and `indexByMarker` then refuses
|
|
10
|
+
* the whole run as ambiguous — or, before that guard existed, retitled the wrong issue.
|
|
11
|
+
* - **Notification side effects.** `@name` and `#123` notify people and cross-link issues
|
|
12
|
+
* the instant they are published. A sync is not a reason for somebody's inbox to move.
|
|
13
|
+
* - **Field limits.** GitHub caps a body at 65,536 characters, so the prose needs a budget
|
|
14
|
+
* (that half lives in `body.ts`).
|
|
15
|
+
*
|
|
16
|
+
* The rejected alternative was to publish nothing and make the reader follow a link, which
|
|
17
|
+
* is what shipped in v1.21.0 and what this instance exists to undo: a body carrying no
|
|
18
|
+
* item-specific words is a redirect, and thirty of them on a board are thirty copies of one
|
|
19
|
+
* paragraph.
|
|
20
|
+
*
|
|
21
|
+
* **Everything here is code-aware, and that is the whole design.** Measured over this
|
|
22
|
+
* project's 76 items on 2026-09-07, 40 of the 41 hazard spans are inside a fence or an
|
|
23
|
+
* inline code span — `@clack/prompts`, `actions/checkout@v4`, colour hexes like `#0891b2`
|
|
24
|
+
* — and exactly one is in prose. A rule that ignored code would corrupt forty spans in
|
|
25
|
+
* order to defuse one. See `markdown.ts`.
|
|
26
|
+
*
|
|
27
|
+
* Requirements: richer-issue-bodies/AC-9, richer-issue-bodies/AC-10,
|
|
28
|
+
* richer-issue-bodies/AC-11, richer-issue-bodies/AC-12, richer-issue-bodies/AC-29
|
|
29
|
+
*
|
|
30
|
+
* @module
|
|
31
|
+
*/
|
|
32
|
+
export interface SanitizeContext {
|
|
33
|
+
/** Item id → repo-relative path. An empty map disables reference linking entirely. */
|
|
34
|
+
itemPaths: ReadonlyMap<string, string>;
|
|
35
|
+
/** Repo-relative path → absolute URL, or null when coordinates are unknown. */
|
|
36
|
+
fileUrl: ((relPath: string) => string) | null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Sanitize and enrich an item body for publication.
|
|
40
|
+
*
|
|
41
|
+
* Four rules, and the **order is load-bearing**, because two of them insert text a later
|
|
42
|
+
* rule must not re-examine:
|
|
43
|
+
*
|
|
44
|
+
* 1. Item references become links. This runs first because it is the only rule that
|
|
45
|
+
* deliberately rewrites a code span, and because the link it emits contains no `@`, `#`
|
|
46
|
+
* or `<!--` for rules 2–4 to find.
|
|
47
|
+
* 2. Prose HTML comments are removed — the marker-injection defence, and lossless, since a
|
|
48
|
+
* comment renders as nothing.
|
|
49
|
+
* 3. Prose mentions are wrapped in backticks.
|
|
50
|
+
* 4. Prose issue references are wrapped in backticks.
|
|
51
|
+
*
|
|
52
|
+
* Rules 2–4 run through `mapProse`, so code is untouched by construction rather than by a
|
|
53
|
+
* filter that could be got wrong.
|
|
54
|
+
*/
|
|
55
|
+
export declare function sanitizeItemBody(body: string, ctx: SanitizeContext): string;
|
|
56
|
+
//# sourceMappingURL=sanitize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/roadmap/sync/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAsBH,MAAM,WAAW,eAAe;IAC9B,sFAAsF;IACtF,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,+EAA+E;IAC/E,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,GAAG,MAAM,CAG3E"}
|