Skip to content

tasks.md を追加(実装タスク分割) - #4

Merged
goofmint merged 2 commits into
mainfrom
claude/apple-notes-cli-requirements-y7h3es
Aug 11, 2026
Merged

tasks.md を追加(実装タスク分割)#4
goofmint merged 2 commits into
mainfrom
claude/apple-notes-cli-requirements-y7h3es

Conversation

@goofmint

@goofmint goofmint commented Aug 11, 2026

Copy link
Copy Markdown
Owner

概要

requirements.md / design.md に基づく実装タスク分割 tasks.md を追加します。実装コードは含みません。

内容

  • 27タスク・4フェーズ(基盤 → エクスポート・変換 → 統合 → Publisher → 仕上げ)。1タスク = 1 PR の粒度
  • 各タスクに規模(S/M/L)、依存関係、受け入れ条件、対応する FR / NFR / design.md セクションを明記
  • design.md §13 の実機確認残課題はスパイクタスク(T-08: parser、T-20: qiita-cli 無人認証、T-24: noet)として先行配置し、結果を design.md に反映してから後続に着手するルールを明記
  • マイルストーン3段階: M1 = Zenn での E2E(最小の縦切り)、M2 = 全 Git モード + API 系サービス、M3 = note.com 対応とリリース準備
  • フェーズ依存の mermaid 図、タスク一覧表、受け入れ条件をテストケースの雛形とする運用ルール

🤖 Generated with Claude Code

https://claude.ai/code/session_01HM65HLN9Hi2YgBtUTAQJDr


Generated by Claude Code

Summary by CodeRabbit

  • ドキュメント

    • note2webの実装計画を追加しました。
    • 基盤構築からエクスポート、同期連携、各種公開機能、結合テスト、npm配布までの実装フェーズと順序を整理しました。
    • 各タスクの内容・受け入れ条件、マイルストーン、運用ルールを明記しました。
  • 仕様変更

    • 応答不明時に既存記事が複数一致した場合、新規作成や状態更新を行わず、警告を表示して手動対応を促すようにしました。

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

note2web の実装計画をフェーズ0〜3と仕上げに分けて追加しました。T-01〜T-28、受け入れ条件、マイルストーンを定義しました。既存記事が複数一致した場合は、ノートを failed として扱い、状態を更新しない仕様に変更しました。

Changes

note2web 実装計画と照合仕様

Layer / File(s) Summary
フェーズ構成とタスク定義
tasks.md
フェーズ0〜3、T-01〜T-28のタスク、依存関係、規模区分を追加しました。
基盤と変換処理
tasks.md
CLI、設定検証、状態管理、Apple Notesの取得、変換、アセット処理の仕様と受け入れ条件を追加しました。
同期と Publisher 統合
tasks.md, design.md
同期フロー、doctorチェック、各Publisher、実機スパイクを定義しました。既存記事が複数一致した場合の failed 処理と警告ログを定義しました。
結合検証とリリース
tasks.md
PublisherのE2E、冪等性検証、README、運用仕様、npm配布、実機E2E、マイルストーンを追加しました。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • goofmint/note2web#3: design.md に定義された応答不明時の記事照合ルールと、本PRの仕様変更が関連します。

Suggested reviewers: claude

Poem

兎が計画を確認する
タスクは順に並んでいる
複数一致なら停止する
状態を変えず警告する
note2webを静かに進める 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは、実装タスクを分割したtasks.mdの追加というプルリクエストの主な変更を具体的に示しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/apple-notes-cli-requirements-y7h3es
🚀 Post-Merge Actions
  • Slack通知

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: 10

🧹 Nitpick comments (1)
tasks.md (1)

10-40: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Mermaid図のタスク依存を依存表と一致させてください。

依存表にある T-10、T-12、T-13、T-22、T-23、T-24、T-26 の個別依存が図にありません。フェーズ間の矢印だけでは、同一フェーズ内で安全に並行できる範囲を判断できません。個別矢印を追加するか、図をフェーズ概要と明記して依存表を唯一の正にしてください。

🤖 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 `@tasks.md` around lines 10 - 40,
Mermaid図の依存関係を依存表と一致させ、T-10、T-12、T-13、T-22、T-23、T-24、T-26の個別依存矢印を追加してください。フェーズ間の矢印だけに依存せず、同一フェーズ内の並行可能範囲も図から判断できる状態にします。
🤖 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 `@tasks.md`:
- Around line 96-98: Extend the T-05 timeout test to launch a dummy process that
creates a child process, then verify the entire process group is terminated,
SIGKILL follows SIGTERM after the configured grace period, stdout and stderr are
captured, and the resulting failure is classified and logged correctly.
- Around line 104-106: Update the T-07 StateStore acceptance criteria to test
the read-your-writes contract: verify that updates made during one execution are
immediately visible to subsequent reads, that disk loading occurs only once at
startup, and that writes occur at the specified notes and assets points. Retain
the existing validation-mismatch exit 2 and atomic-save crash requirements.
- Around line 88-90: Extend the T-03 logger acceptance tests beyond event
formats and fields to verify that every log entry is always written to stdout,
optionally appended to the configured file, and that appending preserves
existing file contents. Cover both configured and unconfigured file-output paths
while keeping the existing event-format assertions.
- Around line 131-133: Update the T-13 AssetUploader acceptance criteria to
separately verify that body placeholders are replaced with the final uploaded
URLs and that successful uploads are persisted to StateStore, in addition to
preventing duplicate uploads across first, duplicate-reference, and rerun
scenarios.
- Around line 172-178: タイトル照合による復旧では、T-22 DevtoPublisher と T-23 HatenaPublisher
の両方で一致件数がちょうど1件の場合のみ対象を採用してください。0件または複数件の場合は復旧を失敗として扱い、状態を更新せずに終了します。重複タイトルを含むHTTPモックテストを追加し、誤った記事へ紐付かないことを確認してください。
- Around line 123-125:
T-11の受け入れ条件を全変換契約に拡張し、表・チェックリストに加えて添付と描画参照のプレースホルダ化、タイトル行の除去、未対応要素のテキスト化を検証するgolden
testを追加してください。未対応要素については警告ログが出力されることもテストし、各要素の期待Markdownとログ内容を確認できるようにしてください。
- Around line 92-94: 設定 YAML ローダと zod スキーマ検証について、サービス別必須項目、`*_env`
で指定された環境変数の存在、秘匿情報の直書き拒否、`timezone`
の既定値をそれぞれ検証するテストを受け入れ条件に追加してください。各ケースで、正常系・不正系と不正キーを明示して exit 2
になることを確認できるようにしてください。
- Line 202: M1: Zenn E2Eのタスク範囲と受け入れ条件に、実機Apple
Notesから実際のZennリポジトリへPRを作成し、同一入力の2回目実行でskipされることを検証する専用タスクまたは条件を追加してください。既存のT-08、T-16、T-26のfixture・モック検証だけに依存せず、実機E2Eの完了基準として明記してください。
- Line 59: T-13(AssetUploader)の依存関係にT-11を追加し、既存のT-07依存は維持してください。
- Around line 148-150:
T-16の受け入れ条件をdesign.mdの仕様に合わせ、PR作成成功後に状態を保存し、auto_merge時のgh pr
merge失敗でも状態更新済みかつPRを残して失敗扱いと明記してください。さらに、auto_merge:
falseでPRがクローズされた場合は次回syncで再配信せず、ノート変更時までskipする受け入れ条件を追加してください。

---

Nitpick comments:
In `@tasks.md`:
- Around line 10-40:
Mermaid図の依存関係を依存表と一致させ、T-10、T-12、T-13、T-22、T-23、T-24、T-26の個別依存矢印を追加してください。フェーズ間の矢印だけに依存せず、同一フェーズ内の並行可能範囲も図から判断できる状態にします。
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 79287080-465b-4ee7-8852-b97f1b341786

📥 Commits

Reviewing files that changed from the base of the PR and between 71e8661 and 9ee2923.

📒 Files selected for processing (1)
  • tasks.md

Comment thread tasks.md Outdated
Comment thread tasks.md Outdated
Comment thread tasks.md Outdated
Comment thread tasks.md Outdated
Comment thread tasks.md Outdated
Comment thread tasks.md Outdated
Comment thread tasks.md Outdated
Comment thread tasks.md Outdated
Comment thread tasks.md Outdated
Comment thread tasks.md Outdated
- Add T-11 as dependency of T-13 (placeholder contract)
- Expand acceptance criteria for T-03/04/05/07/11/13 to cover the full
  implementation scope (log sinks, config validation cases, process-group
  timeout with child processes, read-your-writes, full conversion
  contract, URL replacement and asset persistence)
- Align T-16 acceptance criteria with design.md state transaction
  (state saved at PR creation; merge failure keeps saved state;
  closed-PR skip behavior)
- Title reconciliation: adopt only on exactly one match, fail on
  multiple matches (design.md updated to match); 0 matches still
  creates, since the article genuinely does not exist
- Add T-28 real-device E2E task as the M1 gate
- Mark the mermaid diagram as phase overview; dependency table is the
  source of truth

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HM65HLN9Hi2YgBtUTAQJDr

@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: 4

🤖 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 `@tasks.md`:
- Around line 152-154: Extend T-16 acceptance tests to cover missing or empty
GH_TOKEN and authentication failure, verifying exit code 2 with no Git/gh write
operations and no StateStore updates. Reuse the T-15 GH_TOKEN validation and
assert it runs before branch creation, push, or PR creation.
- Around line 131-133: T-12
の受入条件に、正規化不変条件の検証を追加してください。キー順を変えた同値入力、CRLF/LF、NFC/NFD の入力が同一の正規化結果と SHA-256
ハッシュになること、設定済み timezone による日時文字列化が期待どおり固定されることを golden test で確認してください。
- Around line 176-178: T-22の受け入れ条件に、DevtoPublisherのwire
contractと非再試行検証を明記してください。HTTPモックで{"article":{...}}形式の本文、ヘッダ、タグ最大4個、条件付きcanonical_url、レスポンスのid/url保存を確認し、30秒タイムアウト時にPOSTが再送されず、失敗分類とログが正しいことも検証項目へ追加してください。
- Around line 180-182: 更新 T-23 HatenaPublisher の受け入れ条件に、HTTP モックで URL、POST/PUT
の使い分け、Basic 認証ヘッダ、レスポンスからの entry_id 抽出を個別検証するケースを追加してください。さらに、§13-5
の実機確認条件として、design.md への結果反映に加えて実機ブログへの Markdown 入稿成功を明記してください。
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c9088b43-528a-4a1b-8551-a3a30ecd5149

📥 Commits

Reviewing files that changed from the base of the PR and between 9ee2923 and 900892f.

📒 Files selected for processing (2)
  • design.md
  • tasks.md

Comment thread tasks.md
Comment on lines +131 to +133
#### T-12 正規化 serializer とコンテンツハッシュ(M)
- §5.6: キー順固定・全文字列ダブルクォートの決定的 YAML serializer、`timezone` 固定オフセットの日時文字列化、UTF-8 / LF / NFC 正規化、SHA-256
- **受け入れ条件**: golden test(YAML 境界値: `null` / 数値 / 日時に見える文字列、`:` `#` `"` `\` 改行を含む文字列)で直列化結果とハッシュ値が固定される

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 | ⚡ Quick win

T-12 の正規化不変条件を受入条件に追加してください。

実装範囲には、キー順固定、timezone固定オフセット、UTF-8・LF・NFC正規化、SHA-256が含まれます。現在の受入条件はYAML境界値と固定ハッシュを主に確認します。

キー順を変更した同値入力、CRLF/LF、NFC/NFDの同値入力が同じ正規化結果とハッシュになることを追加で検証してください。設定されたtimezoneで日時が期待どおりに固定されることも確認してください。変換後コンテンツのハッシュは冪等性判定に使われるため、この試験がないと不要な再配信や誤ったskipを検出できません。

🤖 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 `@tasks.md` around lines 131 - 133, T-12
の受入条件に、正規化不変条件の検証を追加してください。キー順を変えた同値入力、CRLF/LF、NFC/NFD の入力が同一の正規化結果と SHA-256
ハッシュになること、設定済み timezone による日時文字列化が期待どおり固定されることを golden test で確認してください。

Comment thread tasks.md
Comment on lines +152 to +154
#### T-16 GitRepoPublisher 共通基盤(L)
- §5.7: `note2web/sync-<UTC時刻>` ブランチ作成、ファイル書き込み + 保留リスト、差分ゼロならブランチ破棄、コミット・push・`gh pr create`、`auto_merge` 時の `gh pr merge`、PR 作成成功後の一括状態確定、`GH_TOKEN` 検証
- **受け入れ条件**: モック git / gh で各シナリオが design.md §5.7 どおりであること: 「差分なし」= ブランチ破棄・状態未更新、「push / PR 作成失敗」= 状態未更新で次回再試行、「PR 作成成功」= 状態保存、「auto_merge のマージ失敗」= **状態は保存済みのまま** PR を残して実行を失敗扱い。また `auto_merge: false` で PR が手動クローズされた場合、次回 sync ではハッシュ一致により skip され(再配信しない)、ノート変更時に再配信されることを検証する

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

GH_TOKEN 検証を Git 副作用の前提条件としてテストしてください。

T-16の実装範囲にはGH_TOKEN検証がありますが、受入条件に未設定・空値の場合の動作がありません。T-15のチェックを使う場合でも、検証がブランチ作成、push、PR作成より前に実行されることを確認してください。

GH_TOKENが未設定または認証に失敗した場合は、exit 2、Git/ghの書き込みなし、StateStoreの更新なしを検証してください。

🤖 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 `@tasks.md` around lines 152 - 154, Extend T-16 acceptance tests to cover
missing or empty GH_TOKEN and authentication failure, verifying exit code 2 with
no Git/gh write operations and no StateStore updates. Reuse the T-15 GH_TOKEN
validation and assert it runs before branch creation, push, or PR creation.

Comment thread tasks.md
Comment on lines +176 to +178
#### T-22 DevtoPublisher(M)
- §5.7 の wire contract(`{"article":{...}}`、ヘッダ、カンマ区切りタグ最大4個、条件付き `canonical_url`)、レスポンス `id` / `url` の保存、タイムアウト 30 秒・POST 非リトライ、`remoteId` 欠落時のタイトル照合(**1件一致のみ採用**。0件 = 新規作成、複数一致 = failed で状態未更新)
- **受け入れ条件**: HTTP モックで新規 / 更新 / 応答不明→照合復旧のテスト。照合は「1件一致 → 採用」「0件 → 新規作成」「**重複タイトルで複数一致 → failed(誤った記事へ紐付けない・状態未更新)**」の3ケースを検証する

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

Dev.to の wire contract と非再試行を受入条件に追加してください。

T-22の実装範囲には、{"article":{...}}、ヘッダ、タグ上限、条件付きcanonical_url、レスポンスのid/url保存、30秒タイムアウト、POST非リトライが含まれます。現在の受入条件は新規・更新・照合のケース名が中心です。

HTTPモックでリクエスト本文とヘッダ、保存されるid/urlを検証してください。タイムアウト時にPOSTが2回送信されず、失敗分類とログが正しいことも検証してください。

🤖 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 `@tasks.md` around lines 176 - 178, T-22の受け入れ条件に、DevtoPublisherのwire
contractと非再試行検証を明記してください。HTTPモックで{"article":{...}}形式の本文、ヘッダ、タグ最大4個、条件付きcanonical_url、レスポンスのid/url保存を確認し、30秒タイムアウト時にPOSTが再送されず、失敗分類とログが正しいことも検証項目へ追加してください。

Comment thread tasks.md
Comment on lines +180 to +182
#### T-23 HatenaPublisher(M)
- AtomPub XML 生成(`text/x-markdown`、`category`)、Basic 認証、POST / PUT、entry_id 抽出、タイトル照合による復旧(T-22 と同じ規則: 1件一致のみ採用、複数一致は failed)。実機ブログで Markdown 入稿を確認し §13-5 を解消
- **受け入れ条件**: XML 生成の golden test。HTTP モックで新規 / 更新 / 照合3ケース(1件・0件・重複タイトル)。実機確認結果が design.md に反映される

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

Hatena の HTTP 契約を個別に検証してください。

XML golden testだけでは、Basic認証、POST/PUTの使い分け、entry_id抽出を検証できません。HTTPモックでURL、HTTPメソッド、認証ヘッダ、レスポンスから保存するIDを確認してください。

また、§13-5の実機確認は、design.mdへの結果反映だけでなく、Markdown入稿が成功したことを受入条件に含めてください。

🤖 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 `@tasks.md` around lines 180 - 182, 更新 T-23 HatenaPublisher の受け入れ条件に、HTTP モックで
URL、POST/PUT の使い分け、Basic 認証ヘッダ、レスポンスからの entry_id 抽出を個別検証するケースを追加してください。さらに、§13-5
の実機確認条件として、design.md への結果反映に加えて実機ブログへの Markdown 入稿成功を明記してください。

@goofmint
goofmint merged commit b7c0838 into main Aug 11, 2026
1 check passed
goofmint added a commit that referenced this pull request Aug 11, 2026
…ts-y7h3es

tasks.md の受け入れ条件を補強(PR #4 マージ後のレビュー指摘対応)
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.

2 participants