Skip to content

feat(skills): add screen-contract-spec skill - #684

Merged
wei18 merged 1 commit into
mainfrom
feat/screen-contract-spec-skill
Jul 4, 2026
Merged

wei18 merged 1 commit into
mainfrom
feat/screen-contract-spec-skill

Conversation

@wei18

@wei18 wei18 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Adds the screen-contract-spec project skill (9th project-bound skill): a spec-first methodology for planning app navigation as SCREEN CONTRACTS — per-screen element inventory + per-interaction presentation semantics (push/sheet/cover/popover/alert/dialog/overlay/inspector/tab/root-swap/external/side-effect) + back-close landing + covering/z-order (parallel-region model) + loading/empty/failed/degraded state variants + forward AND negative flow chains, every row code-anchored.

Synthesizes two web-research passes (NN/g wireflows, statecharts/XState, HIG modality, state-transition testing, LLM E2E-from-flow-graph, spec-drift mitigation) with this repo's own shipped-bug constraint table (#2B fullScreenCover-no-macOS, #197 split-view, #523 present race, #611 double-present, #518 chrome bleed, #674/#681 ready-state trap). Includes the login root-swap-vs-modal worked example and a 'use as an audit' section.

Worked example already on main: docs/screen-contracts.md + docs/navigation-flows.md (#683). Doc/skill-only; README (en+zh-Hant) updated to 9 skills.

🤖 Generated with Claude Code

Spec-first navigation methodology: screen contracts (element inventory +
per-interaction presentation semantics + back/close landing + covering/
z-order + state variants) + forward/negative flow chains, code-anchored.
Synthesizes web research (wireflows, statecharts, HIG modality, model-based
test derivation) + this repo battle-scars (#2B/#197/#523/#611/#518/#674).
Worked example: docs/screen-contracts.md + docs/navigation-flows.md (#683).

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 merged commit 8a43bc8 into main Jul 4, 2026
4 checks passed
@wei18
wei18 deleted the feat/screen-contract-spec-skill branch July 4, 2026 16:46
@github-actions github-actions Bot mentioned this pull request Jul 4, 2026
wei18 added a commit that referenced this pull request Jul 5, 2026
…ain (#695)

Session log: 4-screenshot bug wave (#673-#677), three-lane dual-app
UIUX/spec audit, navigation-flows + screen-contracts spec (#683), the
screen-contract-spec skill (#684), the contract-driven static pass, the
4-PR fix train (#690-#693), two evidence-based environmental downgrades,
and the gated open items (#685/#468/B1-B4/#694).

Co-authored-by: Claude Fable 5 <[email protected]>
wei18 added a commit that referenced this pull request Jul 6, 2026
- skill count 8 -> 9 in .claude/skills/README.md + CLAUDE.md (screen-
  contract-spec landed in #684 after the last count fix-up #666)
- mise-task-operations index: add the new_game:scaffold row (task
  shipped in #678, row was never added)
- SDD-006 RFC heading: "three existing games" -> two (Tiles2048
  removed 2026-06-29)
- resume-seam-design spec: minesweeper.ckdb is committed, not "absent
  from the repo"

Remaining #668 actionable (elapsed(_:) duplication) is tracked as #710.

refs #668

Co-authored-by: Claude Fable 5 <[email protected]>
wei18 added a commit that referenced this pull request Jul 21, 2026
…lt (#930)

* docs(screen-contracts): sync STATS/MS-loader/week-strip/Close-button drift to as-built

Nav audit (flow-audit-hubs/board/periphery.md) found docs/screen-contracts.md
frozen at #684 (2026-07-05) while a dozen merged PRs changed navigation
underneath it. This pass fixes gaps 1-4:

- add ## STATS contract (Statistics Home entry, #773/#844) + wire it into
  HOME's element inventory/interactions (was completely undocumented)
- rewrite MS-BOARD-LOAD-FAILED into 4 tiers covering the new
  MinesweeperDailyOpenGuardView (#842) / MinesweeperDailyReplayLoaderView
  (#841) / MinesweeperFreshBoardLoaderView (#910) loaders the docs claimed
  didn't exist ("direct mount, no loader" was wrong); update MS-DAILY-HUB's
  per-interaction table to route through them
- add the week-strip (DailyStripView, #826) to SUD/MS-DAILY-HUB element
  inventory + interactions, and fix SUD/MS-COMPLETION-REVIEW's stale
  "completed-card tap only" entry points
- add the Close button (#719) to SUD/MS-BOARD-LOAD-FAILED's element
  inventory, previously Retry-only
- add SUD-BOARD's .leaveReady branch (#849/#868) to its interaction table,
  mirroring MS-BOARD's existing #681 note; extend PAUSE-OVERLAY's Resume row
  to name both apps' view-local flags

No .swift changes — docs only. Every new/edited row re-verified against
current source via rg before writing.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs(nav): finish as-built sync — CTA copy, GC entry points, MS reminder, route enums

Continues the previous commit (gaps 1-4) with gaps 5-8 from the same nav
audit:

- drop stale Practice hub CTA divergence: both apps read "New Game" since
  #885 (was "Draw new puzzle" Sudoku / "Start" MS); also note the MS Start
  tap now routes through MinesweeperFreshBoardLoaderView (#910)
- add MS-COMPLETION-OVERLAY's reminder affordance (#814, mirrors Sudoku's
  #287) — was documented as Sudoku-only; update REMINDER-PRIMER's entry
  points to match
- add the SETTINGS Game Center row as a real second entry point into
  GC-DASHBOARD / GC-SIGNED-OUT-ALERT (#685/#714), and give SETTINGS' own
  interaction table the row it was missing
- fix GC-SIGNED-OUT-ALERT's code anchor: the alert moved from
  MakeGameApp+Modifiers.swift to GameRoot.swift:113-123 under #685
- navigation-flows.md: add the `.stats` case to both route enum
  reproductions, widen MS `.completion` with its `day` param (#826), add a
  dated note for Sudoku's `.leaveReady` state (#849/#868, mirrors MS's
  #681 note), and fix N14's stale GC-alert anchor to match

No .swift changes — docs only. Every new/edited row re-verified against
current source via rg before writing.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs(contracts): correct three drifted anchors found in review

CR round 1 — all three were coordinates pointing at the wrong code, not
wrong claims about behavior:

- HOME footnote 2: sidebarItems(from:) is at HomeScreen.swift:115-127,
  not :103-116 (that range covered the previous init + the extension header).
- MS-BOARD-LOAD-FAILED tier 2: the whole anchor set had drifted. content
  switch is :145-205 (not :141-192), exitToHub :207-214 (not :198-205),
  resolve :244-265 (not :207-231 — that range is actually exitToHub +
  check() + resolve levels doc comment). Added check() explicitly. File is
  266 lines, not 267.
- MS-COMPLETION-OVERLAY #814 note: the daily-only gate for THIS live
  overlay is MinesweeperBoardView.swift:1110-1121, which gates on mode AND
  an actual win. LiveRouteFactory.swift:308 carries a near-identical
  mode == .daily line but belongs to the pushed .completion re-view route;
  the note now spells out the distinction so the next reader does not
  re-anchor to the wrong one.

Co-Authored-By: Claude Fable 5 <[email protected]>

---------

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant