@skitterbyte/skitterspec 23.24.4 → 23.24.5

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/env/resume.js +12 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skitterbyte/skitterspec",
3
- "version": "23.24.4",
3
+ "version": "23.24.5",
4
4
  "description": "Spec-driven development for Claude Code \u2014 a tracker-free filesystem workflow: lifecycle skills and per-spec isolation. For Linear sync, install @skitterbyte/skitterspec-linear instead.",
5
5
  "keywords": [
6
6
  "claude",
package/src/env/resume.js CHANGED
@@ -98,10 +98,19 @@ function frontmatterField(text, field) {
98
98
  return m ? m[1].trim().replace(/^["']|["']$/g, '') || null : null
99
99
  }
100
100
 
101
- // `#241`, `241` and `"#241"` are one ticket; `ABC-88` only ever matches itself.
101
+ // `#241`, `241` and `"#241"` are one ticket, and so are `AB#241` and either of
102
+ // them: a typed ref without the tracker's prefix is matched on its number. Two
103
+ // different prefixes (`AB#241`, `XY#241`) never match, and `ABC-88` only ever
104
+ // matches itself.
102
105
  function sameRef(a, b) {
103
- const norm = (s) => String(s).trim().replace(/^#/, '').toLowerCase()
104
- return Boolean(a) && Boolean(b) && norm(a) === norm(b)
106
+ if (!a || !b) return false
107
+ const parse = (s) => {
108
+ const m = /^([a-z]*)#(\d+)$/.exec(String(s).trim().toLowerCase())
109
+ return m ? { prefix: m[1], id: m[2] } : { prefix: '', id: String(s).trim().toLowerCase() }
110
+ }
111
+ const x = parse(a)
112
+ const y = parse(b)
113
+ return x.id === y.id && (!x.prefix || !y.prefix || x.prefix === y.prefix)
105
114
  }
106
115
 
107
116
  // Which copy speaks for a spec: its own worktree, then a branch (local before