Spec ↔ issue linker
Why
A spec and its issue can originate from either side: an issue created first (by a
human or an orchestrator) that later gains a spec, or a spec authored first that
needs an issue. specsync must resolve "which issue is this change" robustly
across both, without inventing a parallel identity scheme.
Issue-first scaffolding is handled by the dedicated github-issue-pull change.
This change focuses on deterministic link resolution once local and tracker
artifacts exist.
What
Add a Linker abstraction that resolves a change to its issue ref by consulting,
in priority order:
- the current git branch name (issue-linked branches encode the issue number),
- the
<!-- specsync:change=<slug> --> marker in issue bodies,
- the local
.specsync/ ref cache,
- an external relation source (e.g. an MCP that knows issue↔branch↔repo links).
The first hit wins; the result is cached. This makes issue-first and spec-first
flows converge on the same link.
Scope
Linker interface + chained resolver.
- Branch-name resolver (configurable pattern).
- Wire the resolver into the sync engine ahead of provider
Find.
Tasks
Tasks: Spec ↔ issue linker
Spec ↔ issue linker
Why
A spec and its issue can originate from either side: an issue created first (by a
human or an orchestrator) that later gains a spec, or a spec authored first that
needs an issue. specsync must resolve "which issue is this change" robustly
across both, without inventing a parallel identity scheme.
Issue-first scaffolding is handled by the dedicated
github-issue-pullchange.This change focuses on deterministic link resolution once local and tracker
artifacts exist.
What
Add a
Linkerabstraction that resolves a change to its issue ref by consulting,in priority order:
<!-- specsync:change=<slug> -->marker in issue bodies,.specsync/ref cache,The first hit wins; the result is cached. This makes issue-first and spec-first
flows converge on the same link.
Scope
Linkerinterface + chained resolver.Find.Tasks
Tasks: Spec ↔ issue linker
Linkerinterface and a chained resolver