Skip to content

docs(readme): cleaner zh-en flow - #3

Merged
wei18 merged 1 commit into
mainfrom
docs/readme-cleanup
May 19, 2026
Merged

wei18 merged 1 commit into
mainfrom
docs/readme-cleanup

Conversation

@wei18

@wei18 wei18 commented May 19, 2026

Copy link
Copy Markdown
Owner

Summary

Copy edit for readability — zh-TW prose now flows continuously, English appears only where it must (proper nouns, file paths, unavoidable tech terms).

Changes

  • (a)/(b) Roman list markers in opening paragraph split into bulleted 規格層 / 實作層 list
  • §現況 → §狀態 (cleaner Chinese register)
  • 'Phase 10 (manual ASC + TestFlight + signing)' expanded to 3 bullets
  • 'Living document' → '持續更新'
  • 'from day 1' → '自第一個 commit 起'
  • Dropped stale '實作碼將於 Phase 1 起加入' line (v1 is feature-complete; was a pre-existing artifact from doc sweep)
  • Tightened duplicate first-commit sentences in §安全姿態

Preserved

  • Every link target (zero href touched)
  • All section headings' intent
  • The twin-deliverable framing (playable app + AI agent application record)
  • The public-repo security posture

Line count 27 → 32.

Test plan

  • Renders cleanly on GitHub
  • Every internal link still resolves
  • No regression in content accuracy

🤖 Generated with Claude Code

Copy edit for skimability — zh-TW prose now flows continuously, English
appears only for proper nouns (Sudoku/Claude/iOS/macOS), file paths,
and unavoidable tech terms (TDD/CI/PR/gitleaks).

Changes:
- (a)/(b) Roman list markers split into bulleted 規格層/實作層 list
- '現況' → '狀態' for cleaner Chinese register
- 'Phase 10 (manual ASC + TestFlight + signing)' expanded to 3 bullets
- 'Living document' → '持續更新'
- 'from day 1' → '自第一個 commit 起'
- Dropped stale '實作碼將於 Phase 1 起加入' line (v1 feature-complete)
- Tightened the duplicate first-commit sentences in §安全姿態
@wei18
wei18 merged commit c7dfd40 into main May 19, 2026
@wei18
wei18 deleted the docs/readme-cleanup branch May 19, 2026 16:51
wei18 added a commit that referenced this pull request May 22, 2026
…) (#89)

Fixes #88. Build #3 (after #87 added tuist generate) failed:
  Manifest not found at path /Volumes/workspace/repository/ci_scripts

Xcode Cloud invokes the script as `cd ci_scripts && ./ci_post_clone.sh`
so tuist's cwd was ci_scripts/. Project.swift lives at repo root.

Use $CI_PRIMARY_REPOSITORY_PATH (Xcode Cloud env var) with
$(dirname "$0")/.. fallback for local dry-runs.

bash -n: OK.

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request May 22, 2026
…v var (#91) (#93)

Fixes #91. Build #4 failed:
  Configuration file not found at /Volumes/workspace/repository/Tuist/Signing.xcconfig

Tuist/Signing.xcconfig is gitignored (contains DEVELOPMENT_TEAM secret).
Xcode Cloud has no copy → tuist generate fatal lints.

Generate it from $SUDOKU_DEVELOPMENT_TEAM env var in ci_post_clone.sh,
BEFORE tuist install/generate. Consolidate cd to repo root (block #3
common prefix for both Signing + tuist).

Also update:
- Tuist/Signing.xcconfig.example: reference ci_post_clone.sh + the env var
- docs/v2/v2.5-readiness.md: pre-flight bullet for ASC env var setup

USER ACTION REQUIRED before next Xcode Cloud build:
  ASC → Apps → Sudoku → Xcode Cloud → Workflow → Environment Variables
  Add: SUDOKU_DEVELOPMENT_TEAM = <10-char team id>

Closes #91. bash -n OK.

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request May 26, 2026
* feat(monetization): add GADApplicationIdentifier test ID for v2.5.2

Google Mobile Ads 13.x crashes early in MobileAds.shared.start() if
GADApplicationIdentifier is absent from Info.plist. v2.5.2 uses Google's
universal TEST App ID; v2.5.3 (user-owned) swaps to production.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* feat(admob): wire real BannerView load in LiveAdMobBridge (v2.5.2)

Replace the v2.3.4 stub with an actual AdMob 13.x banner fetch:
- Construct BannerView(adSize: AdSizeBanner) on the main actor
- Resolve key window's rootViewController from connected scenes
  (required only for click-through presentation; load succeeds without)
- Bridge BannerViewDelegate's terminal callbacks into a single
  CheckedThrowingContinuation, single-resume-guarded against double-fire
- Retain live BannerView in a UUID-keyed dict so future UIViewRepresentable
  plumbing (out of v2.5.2 scope) can fetch it via a UIKit-typed accessor
  that stays internal to AdsAdMob (foundations §9.1)
- Ad unit ID: #if DEBUG pivot — test ID 2934735716 in Debug, production
  3172412685 in Release. Single grep target for the v2.5.3 swap, matching
  the same pattern used for GADApplicationIdentifier in Info.plist.

Isolation contract intact: exactly 1 `import GoogleMobileAds` directive
(LiveAdMobBridge.swift). Existing 8 BannerLoadTests against the
FakeAdMobBridge protocol seam unchanged and all pass.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* docs(meetings): impl-notes for v2.5.2 AdMob banner wiring

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* chore(admob): apply CR nits N1+N3+N4 on PR #143

N1 — Replace #else production ad unit ID constant with a fatalError-guarded
computed property (REPLACE_IN_v2.5.3). Scrub production App ID literal from
App/Info.plist comment; replaced with doc-reference-only pointer to
docs/v2/v2.5-readiness.md §v2.5.3. Plist value unchanged (still Google test).

N3 — Wrap loadBanner() continuation in withTaskCancellationHandler. Reuses
the existing OSAllocatedUnfairLock<Bool> single-resume guard on
BannerLoadDelegate via a new cancel() method that routes through resumeOnce
with CancellationError. A local OSAllocatedUnfairLock<BannerLoadDelegate?>
holder bridges the cancel closure to the delegate constructed inside the
continuation. Cancel-vs-callback races resolve via the existing hasResumed
flag — no new lock introduced.

N4 — Add TODO(v2.5.x) marker above the liveBanners insert site documenting
the planned dispose(handle:) accessor and the intentional retain-for-handle-
lifetime behavior (per impl-notes D3).

Verified: swift build clean; swift test --filter BannerLoad (8/8 pass);
swift test --filter AdMob (26/26 pass). Isolation audit: 1 import directive
in LiveAdMobBridge.swift; 0 occurrences of production app ID across
Packages/ and App/. N2 / N5 / N6 deferred.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request May 26, 2026
… 3 jobs (#159)

* ci(github-actions): consolidate 3 workflows into single lint.yml with 3 jobs

Per user request 2026-05-26:
- Merge pr-metadata.yml + docs-link-check.yml + lint.yml → single
  lint.yml with 3 sibling jobs (pr-metadata / docs-link-check /
  swift-lint). Simpler required-status-check setup when branch
  protection lands (one workflow name, three job names).

Key changes vs prior 3-file setup:
- pr-metadata job: ubuntu-latest (was already; no change)
- docs-link-check job: ubuntu-latest; gh api fetches changed
  markdown files (per user: drop fetch-depth: 0)
- swift-lint job: macos-latest (toolchain requirement);
  gh api replaces `git diff --diff-filter` (per user: drop
  fetch-depth: 0); strict swiftlint + hard-fail swiftformat
  preserved

All 3 jobs now use `gh api repos/.../pulls/<num>/files` to enumerate
changed files instead of `git diff` against the base ref. Benefits:
- Faster checkout (no full history)
- Smaller runner workspace
- Single canonical source of changed-file list (the PR API)
- No risk of merge-base resolution edge cases

Workflow-level path filter removed so the consolidated workflow always
runs; per-job logic decides what to do based on changed-files list
(empty → skip with explanatory log line).

Closes user 2026-05-26 requests:
- #2 pr-metadata: linux + drop fetch-depth + use gh api ✓
- #3 consolidate to single lint.yml with 3 jobs ✓
- #1 docs-link-check failure (apple.com 403?): NOT addressed in this PR
  — will need .lycheeignore follow-up after first run shows actual
  failing URLs

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* ci+chore: remove swiftformat entirely + swift-lint job → ubuntu (user 2026-05-26)

Per user decision 2026-05-26:
- swiftlint coverage sufficient; swiftformat is redundant + double-tool
  maintenance cost not justified
- swift-lint job runner: macos-latest → ubuntu-latest (swiftlint has linux
  x86_64 binary via mise; no Swift toolchain needed for lint-only)

### Removed
- `.swiftformat` (config file, deleted)
- `.mise.toml` swiftformat pin
- `lefthook.yml` swiftformat hook
- `.github/workflows/lint.yml` SwiftFormat lint step
- `docs/foundations.md §7.5.1` option-b doc (strikethrough + obsolete note;
  historical impl-notes preserved at meetings/2026-05-26_swiftformat-option-b.impl-notes.md)
- `docs/foundations.md §Backlog` "swiftformat 加入 lefthook" entry
  (strikethrough + CANCELLED tag)

### Updated foundations §4 Phase 1 GH Actions description
- Reflects consolidated lint.yml (3 jobs in one workflow)
- Reflects swift-lint on ubuntu + swiftformat removal
- Cross-refs issues #156 #157 #158 for Phase 2/3 follow-ups

Co-Authored-By: Claude Opus 4.7 <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request Jun 2, 2026
Phase 1: extract Settings monetization UI from SudokuUI into new
  AppMonetizationKit/MonetizationUI target. Replaces @Environment(\.theme)
  with tintColor: Color init params. ~50 LOC added, ~430 modified/moved.

Phase 2: extend ASCRegister with MS IAP product entry + xcstrings
  mirror. ~30 LOC.

Phase 3: wire MinesweeperAppComposition.Live with IAPStoreKit2 +
  AdGate + NoopAdProvider (real LiveAdMobBridge deferred to U15).
  MS SettingsView consumes extracted MonetizationUI. ~120 LOC.

Snapshot risk: LOW (1-pixel anti-aliasing class for 3 SudokuKit tests).

10 Open Questions for Leader; 9 pre-decided per mirror principle +
karpathy guidelines, awaiting user ack on the substantive ones (#3
mirror Sudoku $2.99, #4 mirror "Purchases" header).

Note: original proposal doc lost to worktree force-remove race;
content reconstructed from Developer subagent's return summary.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request Jun 3, 2026
…ings (ms phase 3) (#259)

Closes Phase 3 of MS monetization wire (per
meetings/2026-06-02_minesweeper-monetization-wire-proposal.md). MS
app now has full monetization composition modulo banner UI (deferred
to U15 follow-up). Mirrors Sudoku's wire shape per
feedback/minesweeper-mirrors-sudoku.

Code:
- MinesweeperAppComposition bag extended with persistence / iapClient /
  adProvider / adGate / monetizationStateStore / monetizationController /
  toastController
- Live.swift `.live()` wires:
    * LivePersistence(ckConfig: .minesweeper)
    * LiveStoreKit2IAPClient(knownProductIds: [minesweeperRemoveAdsProductId])
    * NoopAdProvider  (LiveAdMobBridge deferred to U15)
    * AdGate + MonetizationStateController(productId: ..., ...)
    * ToastController
- `.preview()` mirrors with MonetizationTesting fakes (matches Sudoku
  precedent of linking MonetizationTesting into production target)
- LiveRouteFactory threads monetizationController to the Settings route
- SettingsView mounts Section("Purchases") with shared MonetizationUI
  rows (RemoveAdsRow / RestorePurchasesRow / AdsRemovedRow)
- minesweeperRemoveAdsProductId published at module level for parity
  with removeAdsProductId in MonetizationUI

MonetizationStateController parameterization (CR-recommended option a):
- Added `productId: String = removeAdsProductId` default param
- 4 internal direct-ref to constant swapped to self.productId
- All 4 Sudoku test sites + Sudoku Live.swift + Preview.swift compile
  byte-identically (no arg = picks up defaulted Sudoku constant)
- Docstring updated to reflect MS Phase 3 landing

Tests:
- MinesweeperKit: 30/30 pass (+ extended AppCompositionTests + new
  MinesweeperSettingsViewTests)
- SudokuKit: 209/209 pass — Sudoku byte-identicality verified by CR

CR ACCEPT (round 1). Cosmetic C3 (docstring tense) applied inline.
Open follow-ups deferred to backlog:
- Toast overlay on MinesweeperRoot (CR Important #1 — defer per CR
  recommendation; MS has no live monetization surface until U15)
- FakePersistence target for MS Preview (CR Important #2)
- Hardened MS productId test (CR Important #3)

Refs:
- meetings/2026-06-02_minesweeper-monetization-wire-proposal.md §Phase 3
- meetings/2026-06-03_ms-monetization-phase3.impl-notes.md
- prereqs: #257 (.minesweeper config), #258 (multi-app iap config)
- closes mirror-monetization-loop (modulo banner U15)

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request Jun 3, 2026
…0) (#282)

* fix(minesweeper): scale board + add reveal/flag mode toggle (refs #278)

Tier-0 UX blockers from the Designer critique (#278), all in
MinesweeperBoardView. Three coupled fixes, one dispatch:

#1 Board scaling. The cell button was hardcoded frame(30,30) inside a
naked VStack/HStack with no GeometryReader, so Expert (16x30 ~ 960pt)
overflowed every iPhone and most Mac windows. The grid is now wrapped in
a GeometryReader that derives a single square cell side fitting the
NON-square board by its longer axis:
  cellSide = floor(min(availW/cols, availH/rows))
where availW/availH subtract the inter-cell spacing first. The cell
frame and the number/flag/mine glyph (font ~ cellSide * 0.55, replacing
the literal 16) both scale from it.

#2 Tap-target floor. minCellSide = 32pt. When the fitted side would drop
below the floor (e.g. Expert on iPhone fits ~10pt), cellSide is clamped
to 32 and the board scrolls (ScrollView([.horizontal,.vertical]))
instead of shrinking into an un-tappable grid. When it fits, the
ScrollView is inert.

#3 Discoverable reveal/flag toggle. Added an on-screen segmented Picker
(Reveal / Flag) above the board, modeled on Sudoku's pencil-mode toggle.
In Flag mode a tap flags; in Reveal mode a tap reveals. Long-press (iOS)
and right-click contextMenu (Mac) stay as flag accelerators in either
mode — Mac users no longer depend on an invisible right-click. Mode is
view-local @State (no engine semantics). Added .contentShape(Rectangle)
so the whole cell square is hit-testable.

Deferred: Tier-1 theme tokens, Tier-2 Mac side-rail (#6), win/lose
overlay (#7), VoiceOver (#10), .task loop cleanup (#9) — separate
dispatches.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* fix(minesweeper): address #278 Tier-0 CR — flag double-toggle + fit centering

CR REQUEST-CHANGES:
- iOS .flag-mode long-press double-toggle: in .flag mode the button tap +
  long-press both fired onToggleFlag, netting a no-op. Long-press now only
  flags in .reveal mode (redundant in .flag mode where tap already flags).
- Fitted board was pinned top-leading; now center the floored grid in the
  offered rect (mirrors Sudoku BoardView), only scrolling when clamped to floor.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
wei18 added a commit that referenced this pull request Jun 8, 2026
* docs(252): provisioning templatization proposal (Option C-refined)

Assessment + spec for #252. Recommends Option C-refined: parameterized
HTML templates at repo-root templates/provisioning/ + a
mise-tasks/new_app/provisioning renderer mirroring the ck/schema
--app dispatch precedent. Defers the umbrella skill (Option B/D) until
app #3. Includes current-state finding, param interface, sed-based
substitution mechanism, Leader-vs-subagent split, and open questions.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(252): templatize provisioning walkthroughs (ASC/AdMob/CloudKit)

Replace the three hand-edited one-off provisioning HTMLs (kept loose in
~/GitHub/Wei18/tmp/) with a parameterized template set + a mise renderer,
per the approved Option C-refined design (issue #252).

Layout (docs/app-store/provisioning/):
  templates/_shell.html.tmpl        shared CSS shell (union of all 3 source
                                    stylesheets) + TITLE/HEADING/SUBTITLE/
                                    OUT_PATH/BODY slots — kills the 3x ~150-line
                                    CSS duplication the issue flagged.
  templates/asc.body.html.tmpl      Apple Developer App ID + iCloud container +
                                    ASC app record + Remove-Ads IAP (4 steps)
  templates/admob.body.html.tmpl    AdMob app + Banner Ad Unit (5 steps)
  templates/cloudkit.body.html.tmpl Dev->Prod CloudKit schema deploy (5 steps)

Renderer (mise-tasks/new_app/provisioning):
  mise run new_app:provisioning <asc|admob|cloudkit|all> --app <name> \
    [--bundle-id ..] [--container-id ..] [--iap-product-id ..] \
    [--live-composition ..] [--out <dir>] [--open]
  Mirrors mise-tasks/ck/schema conventions: REPO_ROOT anchoring, an --app
  case-map of known apps' PUBLIC defaults, plain sed substitution for the
  scalar ids + awk for the multiline body inject — no new dependency.

Known-apps case-map (all PUBLIC, sourced from the repo):
  sudoku       com.wei18.sudoku       iCloud.com.wei18.sudoku
               com.wei18.sudoku.iap.remove_ads        AppComposition.Live
  minesweeper  com.wei18.minesweeper  iCloud.com.wei18.minesweeper
               com.wei18.minesweeper.iap.remove_ads   MinesweeperAppComposition.Live

Generalization: template content that was hardcoded to one app (the
"split from Sudoku" asides, the v2.5/#217 release specifics, the
cross-app side-notes) is parameterized or dropped so every topic renders
correctly for any --app. The CloudKit topic is treated as app-agnostic
(both apps use CloudKit), not Sudoku-specific.

Verification: rendered minesweeper asc/admob + sudoku cloudkit are
byte-diff semantically equivalent to the originals (only the merged CSS
superset, the deliberate generalizations, and the OUT_PATH differ; no
steps/IDs/structure lost). Cross-renders (sudoku asc/admob, minesweeper
cloudkit) substitute the other app's ids cleanly — guaranteed because the
templates carry zero hardcoded app literals (grep-confirmed), only
placeholders.

Secret-scan clean: no secret VALUES enter the templates or the task — only
public identifiers + "fetch/paste from console" instructions. The AdMob
App/Unit IDs appear only as the ca-app-pub-XXXX~YYYY / XXXX/ZZZZ format
placeholders, identical to the source HTMLs. Consistent with
build-time-secret-injection + apple-public-repo-security.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* fix(provisioning): inject body via awk getline from temp file (renderer produced empty files)

The awk -v body="$body" inject mis-parsed the multiline HTML body
(newline-in-string error → 0-byte output). Write the substituted body to
a temp file and read it back with awk getline, which handles arbitrary
multiline content verbatim. Smoke-tested: all 6 outputs (asc/admob/cloudkit
x sudoku/minesweeper) render ~10-11KB, no leftover placeholders, correct
per-app ids.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
@github-actions github-actions Bot mentioned this pull request Jul 5, 2026
@wei18 wei18 mentioned this pull request Jul 9, 2026
@wei18 wei18 mentioned this pull request Jul 28, 2026
wei18 added a commit that referenced this pull request Sep 11, 2026
…dict (#1063)

Record the #1030 B-3 outcome in docs/designs/v3/design.md:

- §10.1 U-7: resolved — system Achievements / Leaderboards terms for all
  6 locales taken from the iOS 26.4 + 26.5 simulator runtime
  GameCenterUI.framework string tables (screenshots not obtainable: no
  Game Center sign-in on any of the 38 local simulators).
- §10.2 B-3: executed; evidence substitution and chain cited.
- §11 stage-2 L10n gate row: no longer waiting on B-3 / U-7; ja / ko / th
  alignment decisions handed to #1025.
- §12 correction #3: annotate that the settled ja リーダーボード ruling is
  contradicted by the iOS 26 runtime (system uses bare "Leaderboard");
  deferred to #1025, not re-ruled here.

No xcstrings changes (owned by #1025).

part of #1014 · verdict: #1030 (comment)

Co-authored-by: Claude Fable 5.1 <[email protected]>
wei18 added a commit that referenced this pull request Sep 14, 2026
…he dead #983 keys (#1085)

* feat(l10n): align Game Center terms with the iOS 26 system and drop the dead #983 keys

Live keys (GameCenterEntryRow, both apps): ja Leaderboards ランキング → リーダーボード;
ko Achievements 업적 → 목표 달성, Leaderboards 리더보드 → 순위표; th Achievements
ความสำเร็จ → ผลสำเร็จ, Leaderboards กระดานผู้นำ → ลีดเดอร์บอร์ด. Same three terms in the
InfoPlist friend-list purpose string. Source: #1030 B-3 verdict (GameCenterUI.framework
string tables); ja ruling per the PM decision on #1025.

Deleted every key with zero references in shipping code (rg over *.swift, *.strings,
*.plist, *.py; only docs/designs/code prototype hits remain): the #983 Daily Rank screen
cluster, the stale Leaderboard / Couldn't load leaderboard. / View full leaderboard /
Enable Friends… / error.gameCenter.not_authenticated.body keys, and the English
"No Rankings Yet" / "Couldn't Load Rankings" keys that used the banned term. The Sudoku
catalog also carried "Friends" twice; both copies were orphans.

Fixture regenerated via mise run gen:l10n_fixture. mise run scan:l10n passes.

part of #1025

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

* docs(design): record the #1025 GC-term ruling in §12 #3 and close the §11 orphan-cleanup line

ja unifies on リーダーボード for the surviving Leaderboards key; ko/th align to the
iOS 26 GameCenterUI system terms; every zero-reference GC key was deleted rather
than translated, with the per-app key list recorded under stage 3.

part of #1025

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

---------

Co-authored-by: Claude Fable 5.1 <[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