Skip to content
This repository was archived by the owner on Sep 2, 2026. It is now read-only.
This repository was archived by the owner on Sep 2, 2026. It is now read-only.

Classify spec / ticket / idea ghosts from the issue body so Idea stops mixing spec sub-tickets in #94

Closed

Description

@64ix

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:

  1. isOrphanSpecIssue (feature-board-ghost-candidates.ts:39) only matches
    /^\s*\[Spec\]/i. The Spec — … / Ticket — … convention used on ProtoRTS
    matches nothing, so Spec — Les alliances and its six Ticket — … children
    all render as idea ghosts.
  2. 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 #N refs. 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-spec recognises.
  • 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.ts exports deriveSpecTicketShape({ title, body }):
    spec when the title starts with [Spec], Spec:, Spec —, Spec -, [PRD] or
    PRD: (case-insensitive) or the body has a ## Success Criteria heading;
    ticket when the body has a ## Parent heading naming an issue; else undefined.
  • Same module exports parseParentIssueNumber(body): the first #N under ## Parent,
    ignoring URLs and heading anchors (reuse the parseReferencedIssueNumbers rules).
  • GitHubWorkItem gains two optional fields, specShape?: 'spec' | 'ticket' and
    parentIssueNumber?: number; mapIssueWorkItem stamps 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.
  • buildFeatureBoardGhostCandidates routes specShape === 'spec' to the spec column
    (legacy [Spec]-title match still routes there when the field is absent).
  • An issue with a parentIssueNumber never 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.
  • GhostCandidate gains childTicketCount, counted over the repo's open issues whose
    parentIssueNumber equals the spec's number — computed before candidate filtering, so
    excluded tickets still count.
  • FeatureBoardGhostCard renders a 6 tickets badge when childTicketCount > 0, with an
    i18n key and an en.json entry, following STYLEGUIDE.md badge usage. The card is not
    expandable.
  • Unit tests: shape derivation across every title convention and both body headings,
    including a Ticket — title whose body has no ## Parent (stays idea); ghost
    derivation for spec routing, parent exclusion, and child counting; a card render test
    for the counter's presence and absence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions