@skitterbyte/skitterspec-linear 10.1.0 → 10.2.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/README.md +68 -23
- package/assets/core/SETUP.md +73 -13
- package/assets/core/linear.config.json.example +8 -1
- package/assets/core/linear.config.md +177 -10
- package/assets/rules/spec-planning.md +17 -11
- package/assets/skills/spec/SKILL.md +106 -66
- package/assets/skills/spec-bug/SKILL.md +99 -17
- package/assets/skills/spec-cancel/SKILL.md +34 -0
- package/assets/skills/spec-complete/SKILL.md +70 -15
- package/assets/skills/spec-hotfix/SKILL.md +157 -4
- package/assets/skills/spec-linear-setup/SKILL.md +172 -0
- package/assets/skills/spec-push/SKILL.md +108 -32
- package/assets/skills/spec-review/SKILL.md +34 -0
- package/assets/skills/spec-status/SKILL.md +9 -0
- package/bin/skitterspec-linear.js +19 -0
- package/package.json +1 -1
- package/src/cli.js +30 -19
- package/src/env/resolve.js +7 -2
- package/src/env/teardown.js +23 -9
- package/src/init.js +11 -1
- package/src/vendor/linear/api.js +246 -0
- package/src/vendor/linear/cli-sync.js +701 -3
- package/src/vendor/linear/config.js +116 -14
- package/src/vendor/sync-core/src/normalize.js +232 -85
- package/src/vendor/sync-core/src/push.js +10 -1
- package/src/vendor/sync-core/src/task-block.js +18 -7
|
@@ -16,15 +16,23 @@ const DEFAULT_WIDTH = 80
|
|
|
16
16
|
|
|
17
17
|
// Start of a task bullet. The continuation lines that follow are any indented,
|
|
18
18
|
// non-empty lines that are not themselves a bullet or heading.
|
|
19
|
-
|
|
19
|
+
//
|
|
20
|
+
// The mark is ANY single character, not just ` `/`x`. Projects use `[~]` for
|
|
21
|
+
// in-progress, `[>]` for deferred, `[-]` for dropped, and a parser that only
|
|
22
|
+
// knew ` xX` matched none of them — so the whole bullet was claimed by no block
|
|
23
|
+
// and vanished from the mirror (bug-phase-content-dropped). What the mark MEANS
|
|
24
|
+
// is nobody's business here; it is carried through verbatim and re-emitted as
|
|
25
|
+
// written. Only `x`/`X` counts as done (see `parseTaskLine`).
|
|
26
|
+
const TASK_START_RE = /^([ \t]*)-\s*\[([^\]])\]\s*(.*)$/
|
|
20
27
|
const CONTINUATION_RE = /^[ \t]+\S/
|
|
21
28
|
const BLOCK_BREAK_RE = /^[ \t]*(?:[-*+]\s|\d+\.\s|#{1,6}\s|>|\||```)/
|
|
22
29
|
// A list-marker line (unordered or ordered). Distinguished from other block
|
|
23
30
|
// breaks because a wrapped continuation can legitimately begin with one.
|
|
24
31
|
const LIST_MARKER_RE = /^[ \t]*(?:[-*+]|\d+\.)\s/
|
|
25
32
|
// A checkbox bullet — unambiguously a task, so it always starts its own block,
|
|
26
|
-
// at any indent. (A bare list marker is ambiguous; a checkbox never is.)
|
|
27
|
-
|
|
33
|
+
// at any indent. (A bare list marker is ambiguous; a checkbox never is.) Any
|
|
34
|
+
// mark, matching TASK_START_RE.
|
|
35
|
+
const CHECKBOX_RE = /^[ \t]*[-*+]\s*\[[^\]]\]/
|
|
28
36
|
// A bare list bullet — no checkbox — captured with its marker so a sub-bullet
|
|
29
37
|
// is re-rendered as the `-`/`*`/`1.` its author wrote.
|
|
30
38
|
const BULLET_RE = /^([ \t]*)([-*+]|\d+\.)\s+(.*)$/
|
|
@@ -181,7 +189,9 @@ function findTaskBlocks(lines) {
|
|
|
181
189
|
indent: t[1],
|
|
182
190
|
marker: '-',
|
|
183
191
|
checkbox: true,
|
|
184
|
-
|
|
192
|
+
// Case-folded for `x` (the one mark whose meaning we act on), otherwise
|
|
193
|
+
// verbatim — a project's `~`/`>`/`-` must round-trip as written.
|
|
194
|
+
mark: t[2].toLowerCase() === 'x' ? 'x' : t[2],
|
|
185
195
|
text: collapseHyphenAware(parts.join('\n')),
|
|
186
196
|
})
|
|
187
197
|
open.push(indent)
|
|
@@ -189,9 +199,10 @@ function findTaskBlocks(lines) {
|
|
|
189
199
|
continue
|
|
190
200
|
}
|
|
191
201
|
|
|
192
|
-
// A bare bullet is claimed ONLY inside an open task's subtree
|
|
193
|
-
//
|
|
194
|
-
//
|
|
202
|
+
// A bare bullet is claimed ONLY inside an open task's subtree — there it is
|
|
203
|
+
// part of the task and must be re-rendered with it. Outside one it is
|
|
204
|
+
// ordinary prose, which the projection now passes through verbatim, so
|
|
205
|
+
// claiming it here would only re-wrap a list nobody asked us to touch.
|
|
195
206
|
if (!open.length) continue
|
|
196
207
|
const b = BULLET_RE.exec(line)
|
|
197
208
|
if (!b) continue
|