Skip to content

docs: ワイヤーフレームを作成し、ドキュメント群を整理する - #56

Merged
hduehgw0 merged 15 commits into
mainfrom
docs/#55/wireframe-and-docs
Jul 30, 2026
Merged

docs: ワイヤーフレームを作成し、ドキュメント群を整理する#56
hduehgw0 merged 15 commits into
mainfrom
docs/#55/wireframe-and-docs

Conversation

@hduehgw0

@hduehgw0 hduehgw0 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

関連 issue

resolve #55

やったこと

概要

MVP のワイヤーフレームを追加し、それを正本にドキュメント群を整理した。あわせて「どのドキュメントが何の正本か」を定め、同じ情報を複数箇所で持たない状態にした。

変更点

  • docs/ui-mockups/ に MVP の UI モック 9 枚と素材 SVG を追加(素材にはメタ情報をコメントで付与)
  • docs/requirements.md を 7 章構成に再編(目的・ターゲット・用語定義・前提と制約・スコープ・非機能要件・完了基準)
  • データモデルの正本を schema.prisma/// に寄せ、docs/data-model.md は判断のコンテクストに絞る
  • docs/roadmap.md フェーズ 3 を依存関係の順に並べ替え(重複検知を UI 作業より前に)
  • ADR-0004 を「正規化を先取りしない」に改め、ADR-0012(ユーザーストーリーの廃止)を追加。冒頭に分量の指針を追記
  • 用語を「国」から「産地」に統一(Scotland は国ではないため)
  • docs/user-stories.md を削除し、仕様は機能軸へ、状態は GitHub Issues へ寄せた
  • CLAUDE.md / CONTRIBUTING.md / README.md / PR テンプレートを現状のコマンド・CI・用語に合わせた

受け入れ条件(セルフチェック)

  • MVP の全画面のワイヤーフレームが docs/ 配下にあり、MVP の完了条件として参照できる
  • ワイヤーフレーム作成中に見つかった要件の抜け・矛盾がドキュメントに反映されている
  • ドキュメントごとに「何の正本か」が定まり、同じ情報を複数箇所で持たない
  • ドキュメントの記述が実装・設定の現状と一致している
  • pnpm lint / format:check / typecheck / test が通る

動作確認

  • pnpm lint が通る
  • pnpm format:check が通る
  • pnpm typecheck が通る
  • pnpm test が通る
  • モバイル幅で表示が崩れない(ドキュメントのみの変更のため対象外)

Issue 要件外の対応(あれば)

docs/user-stories.md を削除した。 Issue 本文では「user-stories.md の構成見直し → 別 Issue」としてスコープ外に置いていたが、整理を進める過程で、構成見直しではなく廃止が妥当だと判断したため本 PR に含めた。

理由は 3 つ。

  1. 新機能の起票先が requirements.md「5. スコープ」へ移っており、ドキュメントの更新が止まっていた
  2. 「対象は MVP」という宣言と中身が 4 箇所で食い違い、永久に埋まらないチェックリストになっていた
  3. [x] による進捗管理が CONTRIBUTING.md「状態の源は GitHub。ローカルに状態ファイルは作らない」に反していた

削除前に全参照を実測し、書き換えが必要な現在形のドキュメントは 2 ファイル 5 箇所だけであること、閉じた Issue・PR の US-N はいずれも文脈で自己説明されていることを確認している。判断は ADR-0012 に記録した。

なお README.md の技術選定表の整理はスコープ外のままで、事実誤りの修正(Recharts の行削除・壊れた表ヘッダの修復)に留めている。

備考

  • レビューで重点的に見てほしいのは 「何の正本か」の切り分け:要件 = requirements.md、時期 = roadmap.md、構造 = schema.prisma///、理由 = adr.md、毎セッションの要点 = CLAUDE.md、手順 = CONTRIBUTING.md
  • 05-ボトル登録.png の写真枠は MVP では未実装(写真アップロードは「採用」)。モック 9 枚への完全一致は写真機能の実装後に満たされる

Summary by CodeRabbit

  • 変更点

    • ボトル登録時に選択できる産地を、スコットランド・アイルランド・アメリカ・カナダ・日本に整理しました。
  • ドキュメント

    • 要件、データモデル、開発方針、ロードマップ、認証や更新方法に関する説明を更新しました。
    • READMEのアプリ概要と機能説明を見直しました。
    • ユーザーストーリー文書を廃止しました。
  • 開発品質

    • プルリクエスト確認項目にフォーマットチェックを追加し、開発手順とCI確認内容を整理しました。

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mycellar Ready Ready Preview Jul 30, 2026 5:30pm

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@hduehgw0, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3ef8bfd3-aef4-4337-b5a5-ec25022a434f

📥 Commits

Reviewing files that changed from the base of the PR and between 9a44aad and 7c8a98f.

📒 Files selected for processing (4)
  • docs/data-model.md
  • docs/requirements.md
  • docs/roadmap.md
  • src/lib/schemas/bottle.ts
📝 Walkthrough

Walkthrough

Documentation, architecture records, requirements, roadmap, contribution guidance, schema comments, and bottle region validation were updated to reflect revised project policies and scope.

Changes

Documentation and validation alignment

Layer / File(s) Summary
Requirements and architecture records
docs/requirements.md, docs/adr.md, docs/data-model.md, prisma/schema.prisma
Requirements, architecture decisions, data-model context, and Prisma comments were revised for the updated scope, authentication, persistence, API, and documentation policies.
Repository guidance and delivery plan
README.md, CLAUDE.md, CONTRIBUTING.md, .github/pull_request_template.md, docs/roadmap.md
Project descriptions, technology references, commands, contribution checks, PR checks, and phase milestones were updated.
Region validation contract
src/lib/schemas/bottle.ts, src/lib/schemas/bottle.test.ts
The accepted region list was reduced to Scotland, Ireland, the United States, Canada, and Japan, and the related test description now refers to regions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • hduehgw0/mycellar#21: Updates contribution guidance and roadmap testing expectations in the same documentation area.
  • hduehgw0/mycellar#33: Overlaps with the bottle REGIONS allow-list and related validation tests.
  • hduehgw0/mycellar#42: Implements the bottle edit flow that uses the affected schema and PATCH route.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning README の技術選定表整理と docs/user-stories.md 削除は、Issue #55 で別 Issue とされた範囲を含んでいます。 この2点を別PR/Issueに分離し、今回はワイヤーフレームとドキュメント整備のみに絞ってください。
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed タイトルはワイヤーフレーム追加とドキュメント整理という主要変更を簡潔に表しています。
Description check ✅ Passed 必須セクションが揃っており、概要・変更点・自己チェック・動作確認・要件外対応・備考まで記載されています。
Linked Issues check ✅ Passed ワイヤーフレーム追加、要件/ADR/roadmap整理、正本の明確化、検証通過が確認でき、Issue #55 の主要要件を満たしています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/#55/wireframe-and-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (1)
src/lib/schemas/bottle.test.ts (1)

30-33: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Cover the removed-region regression cases.

The test still checks only "月", so it would pass even if 台湾、インド、 or オーストラリア were accidentally re-added to REGIONS. Parameterize this case with the removed values to lock in the narrowed contract.

Based on the PR objective that the region allow-list is intentionally restricted to five values.

Proposed test update
-  it("固定リストにない産地は通らない", () => {
-    const result = bottleSchema.safeParse({ name: "山崎", region: "月" });
+  it.each(["月", "台湾", "インド", "オーストラリア"])(
+    "固定リストにない産地 %j は通らない",
+    (region) => {
+      const result = bottleSchema.safeParse({ name: "山崎", region });
+      expect(result.success).toBe(false);
+    },
+  );
-    expect(result.success).toBe(false);
-  });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/schemas/bottle.test.ts` around lines 30 - 33, Update the
“固定リストにない産地は通らない” test to parameterize the removed region values 台湾、インド、オーストラリア,
asserting bottleSchema.safeParse returns success: false for each. Keep the
existing invalid-value coverage as appropriate while ensuring the test locks the
five-value REGIONS allow-list.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/requirements.md`:
- Around line 9-13: docs/requirements.md
の購入額に関する記述を、MVPスコープの正本として一貫する方針に統一してください。冒頭の「どう解くか」、MVP項目(54–55行付近)、保留表の購入額記述を確認し、購入額をMVPに含めるか延期するか一方に揃えて、実装範囲と完了条件が分岐しない状態にしてください。

In `@docs/roadmap.md`:
- Line 18: Sprint
0の成果物記載から廃止済みの「ユーザーストーリー」を削除し、ADR-0012で正本とされる現在の要件・スコープ整理(docs/requirements.md)を示す表現へ置き換えてください。
- Around line 10-12: docs/roadmap.md
のフェーズ期間概要と期間表の不一致を解消してください。各フェーズ約1週間という記述を「目安」と明記するか、表の6日・7日・11日およびフェーズ3の未定終了日に合わせて概要を更新し、ロードマップ全体で同じ前提を示してください。

In `@prisma/schema.prisma`:
- Around line 35-56:
重複判定契約を3箇所で統一してください。prisma/schema.prismaのBottleモデルに衝突しない正規化済みidentityKeyと@@unique([userId,
identityKey])を追加し、対応するマイグレーションを作成してください。docs/requirements.mdの該当箇所にはユーザー単位の複合一意制約と正規化形式を明記し、docs/data-model.mdの該当箇所にも同じエンコード方式とユーザー単位の一意性を記載してください。対象サイトはprisma/schema.prisma
35-56、docs/requirements.md 56-56、docs/data-model.md 39-43です。

In `@README.md`:
- Around line 45-60:
READMEの技術選定表から作業用の「選んだ理由(選んだ理由が弱い)」という文言を削除または公開向けの説明に置き換え、Playwright/Vitest +
GitHub
Actions行の「?」も具体的な理由へ更新するか不要なら行を削除してください。公開文書として未完了プレースホルダーが残らない状態に整えてください。

In `@src/lib/schemas/bottle.ts`:
- Around line 3-10: Update the comment above REGIONS to describe the current
five-value allow-list only, removing the claim that major New World regions are
included or that additional entries are currently supported. Keep the REGIONS
values unchanged.

---

Nitpick comments:
In `@src/lib/schemas/bottle.test.ts`:
- Around line 30-33: Update the “固定リストにない産地は通らない” test to parameterize the
removed region values 台湾、インド、オーストラリア, asserting bottleSchema.safeParse returns
success: false for each. Keep the existing invalid-value coverage as appropriate
while ensuring the test locks the five-value REGIONS allow-list.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f61b0267-5eba-40c5-a422-8db3a70b486f

📥 Commits

Reviewing files that changed from the base of the PR and between d03feea and 9a44aad.

⛔ Files ignored due to path filters (12)
  • docs/ui-mockups/01-ログイン.png is excluded by !**/*.png
  • docs/ui-mockups/02-コレクション一覧.png is excluded by !**/*.png
  • docs/ui-mockups/03-コレクション(空状態).png is excluded by !**/*.png
  • docs/ui-mockups/04-ボトル詳細.png is excluded by !**/*.png
  • docs/ui-mockups/05-ボトル登録.png is excluded by !**/*.png
  • docs/ui-mockups/06-ボトル編集.png is excluded by !**/*.png
  • docs/ui-mockups/07-ボトル削除.png is excluded by !**/*.png
  • docs/ui-mockups/08-傾向.png is excluded by !**/*.png
  • docs/ui-mockups/09-アカウント.png is excluded by !**/*.png
  • docs/ui-mockups/assets/bottle-amber.svg is excluded by !**/*.svg
  • docs/ui-mockups/assets/ph-card.svg is excluded by !**/*.svg
  • docs/ui-mockups/assets/ph-empty.svg is excluded by !**/*.svg
📒 Files selected for processing (12)
  • .github/pull_request_template.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • README.md
  • docs/adr.md
  • docs/data-model.md
  • docs/requirements.md
  • docs/roadmap.md
  • docs/user-stories.md
  • prisma/schema.prisma
  • src/lib/schemas/bottle.test.ts
  • src/lib/schemas/bottle.ts
💤 Files with no reviewable changes (1)
  • docs/user-stories.md

Comment thread docs/requirements.md
Comment thread docs/roadmap.md Outdated
Comment thread docs/roadmap.md
Comment thread prisma/schema.prisma
Comment on lines +35 to +56
/// 所有しているウイスキー 1 種類。行の粒度の定義は docs/data-model.md を参照。
model Bottle {
id String @id @default(cuid())
/// 所有者。書き込み時はセッションから設定し、リクエストボディの値は使わない。
userId String
/// User を削除すると、そのユーザーのボトルも削除される。
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
name String // 銘柄名(必須)
region String? // 国(固定リスト選択式。選択肢は zod 側で管理)
subRegion String? // 地域(アイラ等・任意)
age Int? // 年数(null = NAS または未入力)
caskType String? // 樽
/// 銘柄名。唯一の必須項目。
name String
/// 産地。固定リスト選択式(表記ゆれ防止)。選択肢は zod の REGIONS で管理し、追加にマイグレーションは不要。
region String?
/// 地域(アイラ/スペイサイド等)。region が選ばれている前提の任意項目で、地域だけの入力はしない。
subRegion String?
/// 年数。空欄は NAS(年数表記なし)として扱う。未入力と NAS は区別しない。
age Int?
/// 樽(シェリー、バーボン樽 等)。
caskType String?
/// 限定版フラグ。
isLimited Boolean @default(false)
/// 同一物の所持本数(1 以上)。同じ物が増えたら行は増やさず、ここを足す。
quantity Int @default(1)
/// メモ。この種類についての記録であって、1 本ごとの記録ではない。同一性の判定には含めない。

@coderabbitai coderabbitai Bot Jul 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

重複判定のDB契約を3箇所で統一してください。

要件は正規化キーによる重複拒否を求めていますが、実スキーマに実体がなく、単純連結やキー単体の一意制約では衝突またはユーザー間の登録拒否が起こり得ます。

  • prisma/schema.prisma#L35-L56: 衝突しないidentityKey@@unique([userId, identityKey])、マイグレーションを追加する。
  • docs/requirements.md#L56-L56: ユーザー単位の複合制約と正規化形式を要件として明記する。
  • docs/data-model.md#L39-L43: 同じエンコード方式とユーザー単位の一意性を文書化する。

As per coding guidelines, schema.prisma が要件と噛み合わない場合は、要件を弱めず構造側の問題として提示してください。

📍 Affects 3 files
  • prisma/schema.prisma#L35-L56 (this comment)
  • docs/requirements.md#L56-L56
  • docs/data-model.md#L39-L43
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prisma/schema.prisma` around lines 35 - 56,
重複判定契約を3箇所で統一してください。prisma/schema.prismaのBottleモデルに衝突しない正規化済みidentityKeyと@@unique([userId,
identityKey])を追加し、対応するマイグレーションを作成してください。docs/requirements.mdの該当箇所にはユーザー単位の複合一意制約と正規化形式を明記し、docs/data-model.mdの該当箇所にも同じエンコード方式とユーザー単位の一意性を記載してください。対象サイトはprisma/schema.prisma
35-56、docs/requirements.md 56-56、docs/data-model.md 39-43です。

Source: Coding guidelines

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

設計の穴として妥当な指摘です。ドキュメントを修正しました(c894dc8)。

2 点とも実装前に踏む地雷でした。

  1. ユーザー単位でない一意制約 … 字義どおり実装すると、誰かが登録済みのボトルを他の人が登録できなくなり、requirements.md 6 章「読み書きのすべてで自分の userId のデータだけ」と矛盾します
  2. 区切り文字の欠落 … 銘柄名「山崎12」+年数なし と 銘柄名「山崎」+12 年 が同じ文字列になります

requirements.mddata-model.md の両方に、userId との複合一意制約と区切り文字を明記しました。

**ただし prisma/schema.prisma への identityKey 列とマイグレーションは、この PR では行いません。**重複ボトルの検知は roadmap.md フェーズ 3 の実装タスクで、本 PR はドキュメント整理(Issue #55)です。実装時に、修正後の仕様どおり @@unique([userId, identityKey]) で入れます。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hduehgw0、整理ありがとうございます。ドキュメント PR で DB スキーマとマイグレーションを先行実装しない方針は、Issue #55 のスコープと整合しています。

userId を含む複合一意制約と、曖昧さのない区切り形式を仕様へ明記したことで、フェーズ 3 実装時の契約は明確になりました。DB 制約の実装部分は未対応のままですが、意図的な後続タスクとして扱います。

必要であれば、identityKey@@unique([userId, identityKey])、対応マイグレーションを受け入れ条件に含む GitHub Issue を後続タスクとして起票できます。
🐇📝

You are interacting with an AI system.

Comment thread README.md
Comment thread src/lib/schemas/bottle.ts
@hduehgw0

Copy link
Copy Markdown
Owner Author

CodeRabbit レビューへの対応

指摘 対応 コミット
重複判定の DB 契約 修正userId との複合一意制約・区切り文字を明記。スキーマ実装はフェーズ 3) c894dc8
産地リストのコメント不一致 修正 0dcfe2d
ロードマップの期間 修正(+「約 4 週間」の超過も併せて解消) 5a2eff0
購入額の扱い 修正(1 章と 7 章の役割を冒頭で宣言) 7c8a98f
Sprint 0 のユーザーストーリー 対応せず(Sprint 0 の実績記録。ADR-0012 が経緯を保持)
README のプレースホルダー 対応せず(Issue #55 でスコープ外と宣言済み。フェーズ 4 で対応)
nitpick:産地の parameterize 対応せず(削除済みの値を個別に検証するのは契約ではなく履歴のテスト)

最も価値があったのは重複判定の指摘で、userId を含まない一意制約と区切り文字なしの連結という、実装前に踏むはずだった不具合を 2 件防げました。

pnpm lint / format:check / typecheck / test(26 passed)すべて通過しています。

@hduehgw0
hduehgw0 merged commit 43fcc2c into main Jul 30, 2026
4 checks passed
@hduehgw0
hduehgw0 deleted the docs/#55/wireframe-and-docs branch July 30, 2026 17:37
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.

docs: ワイヤーフレームを作成し、ドキュメント群を整理する

1 participant