Repository navigation
Classify spec / ticket / idea ghosts from the issue body so Idea stops mixing spec sub-tickets in #94
Description
Problem
The feature board's Idea column is a dumping ground. Every open base-remote issue
that isn't title-prefixed [Spec] lands there, so a spec's sub-tickets sit next to
genuine ideas with nothing telling them apart.
Two causes:
isOrphanSpecIssue(feature-board-ghost-candidates.ts:39) only matches
/^\s*\[Spec\]/i. TheSpec — …/Ticket — …convention used on ProtoRTS
matches nothing, soSpec — Les alliancesand its sixTicket — …children
all render asideaghosts.- The existing sub-ticket exclusion (
referencedIssueNumbers) only fires for specs
already attached to a worktree —use-feature-board-ghost-candidates.ts:140-206
fetches the linked[Spec]body and excludes its#Nrefs. A spec that is still
a ghost excludes nothing, so its whole ticket set floods Idea.
Expected
- Idea holds only genuine ideas: no specs, no spec sub-tickets.
- Spec holds specs, under every convention
/implement-specrecognises. - A spec ghost card shows how many open child tickets it covers, so the lot is still
visible without expanding anything.
Notes
Why no new labels. Every sub-ticket in both repos already carries ## Parent +
#N in its body (verified: #35 → #25, ProtoRTS#326 → stablyai#324) — the same convention
/implement-spec uses to find a spec's children. Issues are fetched through
gh api search/issues (work-item-list-request.ts:72-83), whose REST payload already
includes body; mapIssueWorkItem (client/map/work-item.ts:24) simply drops it.
Deriving the shape in the main process costs zero extra API calls, works
retroactively on existing issues, and needs no change to to-spec / to-tickets.
Wire size. The body is parsed in main and discarded — only the two derived fields
cross the wire, never the body text.
Out of scope. The Tasks list view (parent badge / grouping by spec) — separate ticket.
Acceptance Criteria
- New pure module
src/shared/spec-ticket-shape.tsexportsderiveSpecTicketShape({ title, body }):
spec when the title starts with[Spec],Spec:,Spec —,Spec -,[PRD]or
PRD:(case-insensitive) or the body has a## Success Criteriaheading;
ticket when the body has a## Parentheading naming an issue; else undefined. - Same module exports
parseParentIssueNumber(body): the first#Nunder## Parent,
ignoring URLs and heading anchors (reuse theparseReferencedIssueNumbersrules). -
GitHubWorkItemgains two optional fields,specShape?: 'spec' | 'ticket'and
parentIssueNumber?: number;mapIssueWorkItemstamps them from the search payload's
body, which is not itself carried onto the item. - Remote wire: both fields are optional and absent from an older host's payload; the
renderer then falls back to today's title-only[Spec]classification and excludes
nothing new. Covered by a test. -
buildFeatureBoardGhostCandidatesroutesspecShape === 'spec'to thespeccolumn
(legacy[Spec]-title match still routes there when the field is absent). - An issue with a
parentIssueNumbernever becomes a ghost candidate — unconditionally,
whether or not its parent spec is open, visible, or in the selected repos. - The existing
referencedIssueNumbers, dismissal, wayfinder-artifact, linked-issue and
cross-repo exclusions keep working unchanged. -
GhostCandidategainschildTicketCount, counted over the repo's open issues whose
parentIssueNumberequals the spec's number — computed before candidate filtering, so
excluded tickets still count. -
FeatureBoardGhostCardrenders a6 ticketsbadge whenchildTicketCount > 0, with an
i18n key and anen.jsonentry, following STYLEGUIDE.md badge usage. The card is not
expandable. - Unit tests: shape derivation across every title convention and both body headings,
including aTicket —title whose body has no## Parent(staysidea); ghost
derivation for spec routing, parent exclusion, and child counting; a card render test
for the counter's presence and absence.
Activity
test(feature-board): red tests for spec/ticket/idea ghost classification
feat(feature-board): classify spec/ticket/idea ghosts from the issue …
test(feature-board): red tests for spec titles with a Parent body hea…
fix(feature-board): never stamp parentIssueNumber on a spec-titled issue
fix(feature-board): widen spec/ticket detection and fix the linked-sp…
Merge pull request #102 from 64ix/64ix/issue-94-classify-spec-ticket-…