Skip to content

release(life-call): promote reviewed PANEL-0 to production#334

Merged
Daisuke134 merged 30 commits into
mainfrom
dev
Jul 22, 2026
Merged

release(life-call): promote reviewed PANEL-0 to production#334
Daisuke134 merged 30 commits into
mainfrom
dev

Conversation

@Daisuke134

@Daisuke134 Daisuke134 commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Promotes the already reviewed PANEL-0 release from dev to main.\n\nRelease gates verified before PR creation:\n- accepted origin/dev and origin/main SHAs unchanged after fetch\n- main..dev = 54 PANEL paths + 1 runtime-inert writer document\n- open PR #330/#331/#322 heads are not contained\n- exact Composio /connected_accounts/link contract retained\n- focused PANEL 54/54, full npm test exit 0, eval 33/33\n\nMerge method required: normal merge commit; no squash/rebase/admin bypass; keep dev.

Summary by CodeRabbit

  • 新機能

    • Life Managerパネルに、設定変更・接続状態確認・カレンダー接続/切断・ログアウトを行えるコントロールセンターを追加。
    • Telegramからパネルを開くクリック可能なリンクと、英語・日本語のコマンド操作に対応。
    • カレンダー操作の成功確認、冪等処理、失敗時の状態復元を実装。
  • 改善

    • セッションを回転・アイドル失効に対応させ、ユーザー間のデータ分離と安全な認証を強化。
    • 通知・自動化設定を実行処理へ反映。
  • テスト

    • パネル、認証、UI、ログアウト、権限分離、接続操作の検証を拡充。

Daisuke134 and others added 30 commits July 21, 2026 15:51
fix(life-call): release honest PANEL-0 controls
fix(life-call): use Composio /link for managed Calendar OAuth
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Life Manager Panel Control Center に、永続セッション認証、型付きコマンド、Calendar 接続制御、個人設定、ランタイム設定反映、操作 UI、マイグレーション、回帰テスト、検証証跡が追加されました。Writer Loop 文書も現行仕様へ更新されています。

Changes

Life Manager Panel Control Center

Layer / File(s) Summary
仕様・検証契約
.vcsdd/features/life-manager-panel-control-center/*
認証、スコープ、冪等性、Calendar disconnect、UI、ロールバック、検証基準を仕様・契約・レビュー記録として追加しました。
永続化・セッション管理
apps/life-call/migrations/*, apps/life-call/lib/panel-auth.js
設定・receipt・OAuth state のテーブル、RLS、service-role RPC、家族単位のセッション回転・アイドル失効・リボークを追加しました。
コマンド/API/Telegram/UI
apps/life-call/lib/user-command.js, apps/life-call/lib/panel-api.js, apps/life-call/lib/panel-ui.js, apps/life-call/server.js, apps/life-call/lib/telegram.js
英日入力を型付きコマンドへ変換し、CSRF・Origin・冪等性を検証する POST API、OAuth/Calendar 操作、Telegram dispatch、control-center UI を実装しました。
ランタイム設定制御
apps/life-call/lib/runtime-preferences.js, apps/life-call/scheduler.js, apps/life-call/lib/feature-discovery.js
ユーザー単位の設定を読み取り、取得失敗時は自動化・通知を無効化して scheduler と discovery の実行対象へ反映しました。
テスト・スモーク
apps/life-call/lib/*test.js, apps/life-call/scripts/*fixture.js, apps/life-call/package.json
パネル、セッション、ログアウト、Calendar、delegation、スコープ分離、UI、過大リクエスト、マイグレーション、回帰スイートを追加・更新しました。

Writer Loop documentation

Layer / File(s) Summary
Writer Engine 仕様更新
docs/loop-engineering/47-writer-loop-quality-and-self-improvement.md
実行順序、公開先、タスク所有者、3レーン構成、証跡、fallback sprint、Writer Engine v2 の契約を更新しました。

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Telegram_or_Panel
  participant CommandService
  participant PanelAPI
  participant Database
  participant CalendarProvider

  User->>Telegram_or_Panel: パネル起動または設定コマンド
  Telegram_or_Panel->>CommandService: typed command
  CommandService->>PanelAPI: scope・receipt・mutation 処理
  PanelAPI->>Database: scope検証・冪等性記録・設定更新
  PanelAPI->>CalendarProvider: Calendar接続またはdisable
  CalendarProvider-->>PanelAPI: provider状態
  PanelAPI-->>Telegram_or_Panel: 結果またはOAuthリンク
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.61% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PANEL-0 のレビュー済みリリースを main へ昇格する内容を的確に表しており、変更の主旨と一致しています。
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

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.

@Daisuke134
Daisuke134 merged commit b25437f into main Jul 22, 2026
3 of 5 checks passed

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

🧹 Nitpick comments (5)
apps/life-call/lib/feature-discovery.js (1)

82-85: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Promise.all の完了をここで await してください。

listDiscoveryUsers() は非同期関数なので、Promiseを直接返さずawaitしてください。As per coding guidelines, “Always use async/await for promises in JavaScript/TypeScript code”.

修正案
-  return Promise.all(rows.map(async (user) => {
+  return await Promise.all(rows.map(async (user) => {
🤖 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 `@apps/life-call/lib/feature-discovery.js` around lines 82 - 85, In
listDiscoveryUsers(), await the Promise.all result before returning it instead
of returning the promise directly. Keep the existing user mapping and fallback
preference behavior unchanged.

Source: Coding guidelines

.vcsdd/features/life-manager-panel-control-center/specs/behavioral-spec.md (1)

9-9: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Composio の契約参照を不変な版へ固定してください。

両仕様が GitHub の mutable な next ブランチを参照しているため、将来の変更で disable/enable 契約の根拠が変わり、リリース時の検証を再現できません。

  • .vcsdd/features/life-manager-panel-control-center/specs/behavioral-spec.md#L9-L9: SDK/API のリリース、タグ、または commit SHA を固定してください。
  • .vcsdd/features/life-manager-panel-control-center/specs/implementation-spec.md#L31-L31: 同じ不変参照と API バージョンを使い、エンドポイント契約を同期してください。
🤖 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 @.vcsdd/features/life-manager-panel-control-center/specs/behavioral-spec.md
at line 9, Pin the Composio SDK/API references in behavioral-spec.md at the
PANEL-0 contract to an immutable release, tag, or commit SHA instead of the
mutable next branch, while preserving the reversible disable semantics. Apply
the same immutable reference and API version to implementation-spec.md at the
endpoint contract so both specifications remain synchronized.
.vcsdd/features/life-manager-panel-control-center/evidence/iteration-2-disconnect-verification.md (1)

17-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

GREEN結果を監査可能な形式で記録してください。

fail 0だけでは、テストが正常終了したのか、0件だったのか、部分実行だったのか判別できません。raw outputを非公開にするなら、少なくともexit code、pass/fail件数、対象commitまたはCI artifact IDを記録してください。

🤖 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
@.vcsdd/features/life-manager-panel-control-center/evidence/iteration-2-disconnect-verification.md
around lines 17 - 22, Update the GREEN verification record to include auditable
results beyond “fail 0”: explicitly record the process exit code, passing and
failing test counts, and the target commit or CI artifact ID for both focused
and full runs. Preserve the note that raw runner output remains private, but
make clear whether each command completed successfully and executed tests.
.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-009.json (1)

2-3: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

category を実際の欠陥内容に合わせてください。

説明はストリーム停止不足という実装・安定性欠陥ですが、test_coverage だけでは分類が不正確です。implementation_correctness または stability_and_availability として記録し、テスト不足は別軸で表現してください。

🤖 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
@.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-009.json
around lines 2 - 3, Update finding FIND-009’s category to
implementation_correctness or stability_and_availability so it reflects the
stream-stopping and body-size enforcement defect; represent missing test
coverage separately rather than using test_coverage as the primary category.
apps/life-call/lib/panel-api.js (1)

268-279: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

raw += chunk はチャンク境界で分割されたマルチバイト文字を破損させます。

raw は文字列、chunkBuffer のため raw += chunk はチャンクごとに独立して UTF-8 デコードされます。マルチバイト文字がチャンク境界をまたぐと文字化けします。現状 /api/panel/commands のボディは ASCII の列挙値に限定されるため実害は小さいものの、Buffer を蓄積して最後に一括デコードする方が安全です。

♻️ 提案
-  return new Promise((resolve, reject) => {
-    let raw = "", settled = false;
+  return new Promise((resolve, reject) => {
+    const chunks = []; let size = 0, settled = false;
     const noop = () => {};
     const cleanup = () => { req.removeListener("data", onData); req.removeListener("end", onEnd); req.removeListener("error", onError); req.on("error", noop); };
-    const fail = error => { if (settled) return; settled = true; raw = ""; cleanup(); reject(error); };
-    const onData = chunk => { if (settled) return; raw += chunk; if (Buffer.byteLength(raw) > 32 * 1024) fail(Object.assign(new Error("body_too_large"), { status: 413 })); };
-    const onEnd = () => { if (settled) return; settled = true; cleanup(); try { resolve(JSON.parse(raw || "{}")); } catch { reject(Object.assign(new Error("invalid_json"), { status: 400 })); } };
+    const fail = error => { if (settled) return; settled = true; chunks.length = 0; cleanup(); reject(error); };
+    const onData = chunk => { if (settled) return; size += chunk.length; if (size > 32 * 1024) { fail(Object.assign(new Error("body_too_large"), { status: 413 })); return; } chunks.push(chunk); };
+    const onEnd = () => { if (settled) return; settled = true; cleanup(); try { resolve(JSON.parse(Buffer.concat(chunks).toString("utf8") || "{}")); } catch { reject(Object.assign(new Error("invalid_json"), { status: 400 })); } };
🤖 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 `@apps/life-call/lib/panel-api.js` around lines 268 - 279, Update readJson so
onData accumulates incoming Buffer chunks without decoding them individually,
and decode the combined bytes once in onEnd before JSON.parse. Preserve the
existing 32 KiB limit, cleanup behavior, and invalid_json handling.
🤖 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 @.vcsdd/features/life-manager-panel-control-center/contracts/sprint-1.md:
- Line 19: CRIT-010 の証跡が scheduler.js の変更を含むにもかかわらず scheduler aggregate coverage
を除外しているため、.vcsdd/features/life-manager-panel-control-center/contracts/sprint-1.md
の CRIT-010 要件を scheduler の line/function coverage
を含む内容に更新するか、除外を認める正式な例外と根拠を契約へ追加してください。.vcsdd/features/life-manager-panel-control-center/evidence/panel-six-blocker-rescue.md
の該当証跡も同じ判定と整合するよう更新してください。

In
@.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/input/provenance.json:
- Around line 5-6:
provenance.jsonのsourceLogに開発者固有のローカル絶対パスを保存しないよう更新してください。チェックイン済みログはリポジトリ相対パスで記録し、そうでなければ他のレビュアーが取得・検証できるCI
artifact IDまたは参照先をsourceLogに設定してください。sourceLogSha256は対応するログ内容のハッシュとして維持してください。

In
@.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/verdict.json:
- Around line 11-12: リリース証跡とPR目的が不一致です。修正済みの検証証拠を反映して各 finding
の状態を更新し、.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-003.json#L2-L4、FIND-004.json#L2-L4、FIND-005.json#L2-L4、FIND-006.json#L2-L4、FIND-007.json#L2-L4、FIND-008.json#L2-L4、FIND-009.json#L2-L4、FIND-010.json#L2-L4
に対応する証拠を記録する。.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/verdict.json#L11-L12
は実際の検証結果に基づき再生成し、未解決 finding が残る場合は FAIL を維持してリリースを停止する。

In @.vcsdd/features/life-manager-panel-control-center/specs/behavioral-spec.md:
- Line 48: In the calendar disconnect entry, update the phrase “disconnect my
google calendar” to “disconnect my Google Calendar,” preserving the surrounding
mappings and formatting.

In
@.vcsdd/features/life-manager-panel-control-center/specs/implementation-spec.md:
- Line 10: Update the lm_panel_command_receipts specification to use (uid,
chat_id, idempotency_key) as the primary key and tenant boundary, matching the
migration and panel API handling. Revise both receipt schema references,
including the occurrence around line 44, so chat_id remains part of idempotency
and cross-chat receipts cannot collide.

In @.vcsdd/features/life-manager-panel-control-center/state.json:
- Around line 78-175: Resolve BEAD-001 through BEAD-010 in state.json by
updating each finding’s status from open and recording the resulting completion
state. Update the phase 3 adversary gate at state.json lines 179-185 from FAIL
to the post-resolution PASS result, then synchronize the final decision and
phase in history.jsonl lines 32-44. If the findings cannot be resolved, instead
mark the PR objective incomplete consistently across these state and history
records.

In @.vcsdd/index.json:
- Around line 11-17:
ライフサイクル状態のSSOTを統一してください。.vcsdd/features/life-manager-panel-control-center/state.json
の状態を唯一の参照元として、.vcsdd/index.json の activeFeature、currentPhase、updatedAt
をそこから原子的に生成・更新するか、重複フィールドを削除してください。両ファイルで異なる可変状態を保持せず、VCS-DD tooling が常に
authoritative state を参照する状態にしてください。

In `@apps/life-call/lib/runtime-preferences.js`:
- Around line 11-13:
設定行がないユーザーをオプトイン扱いにせず、フェイルクローズに変更してください。apps/life-call/lib/runtime-preferences.js
の設定取得処理は rows[0] が存在しない場合に null を返すよう更新し、apps/life-call/scheduler.js の byUid
未登録ユーザーは3つの実行フラグをすべて false にしてください。apps/life-call/lib/user-selector.test.js
には空配列および一部UID欠落の取得fixtureを追加し、バッチ経路と単体経路の双方で無効化されることを検証してください。

In `@apps/life-call/migrations/2026-07-22-lm-panel-durable-sessions.sql`:
- Around line 1-9: lm_panel_sessions への family_id 追加で、VOLATILE な
gen_random_uuid() のデフォルトによるテーブル rewrite を避けてください。family_id はデフォルトなしの NULL
許容カラムとして追加し、新規セッションの挿入経路(resolve_lm_panel_session など)では引き続き明示的に設定してください。既存行への
UUID バックフィルやデフォルト設定は必要性を確認したうえで、テーブル追加と分離して実施してください。

In `@apps/life-call/package.json`:
- Line 11: Update the package.json test script to add node --test entries for
lib/panel-corrective-red.test.js, lib/panel-corrective3-four-blockers.test.js,
lib/panel-corrective4-logout.test.js, and lib/panel-permanent-session.test.js,
ensuring all four regression suites run through npm test.

In `@docs/loop-engineering/47-writer-loop-quality-and-self-improvement.md`:
- Line 227: 実装担当の責務表現を統一し、表の「main Sol が queue カードを作成」、251-256 行の Sol 表記、307
行の責務定義が同じ運用モデルを示すよう修正してください。main Sol が依頼・検証のみを担い、別 Sol が build/edit
を行う方針なら、queue カード作成を含む編集作業の担当を別 Sol と明記し、曖昧な Sol 表記も具体化してください。
- Around line 329-340:
§16内の旧exact6/7に基づく配信集合、DONE状態、D7完了証拠を「履歴」または旧仕様の実績として明示し、現行運用の完了状態として読めないように区別してください。現行のrelease
gate・状態・配信仕様への参照は§18.1/§18.8のexact8へ統一し、E2-E8未完了を反映して旧evidenceが現行gateを満たす表現を除去または修正してください。
- Line 465:
AC10のMarkdown表内で、BOOK_BUILD_STATEのstage値を区切るパイプ文字をMarkdown列区切りとして解釈されないようエスケープしてください。対象の「BOOK_BUILD_STATE(stage=plan|chapters|consistency|pandoc|epub,status=...)」表記を各「|」が「\|」になる形へ更新し、表の列構造を維持してください。

---

Nitpick comments:
In
@.vcsdd/features/life-manager-panel-control-center/evidence/iteration-2-disconnect-verification.md:
- Around line 17-22: Update the GREEN verification record to include auditable
results beyond “fail 0”: explicitly record the process exit code, passing and
failing test counts, and the target commit or CI artifact ID for both focused
and full runs. Preserve the note that raw runner output remains private, but
make clear whether each command completed successfully and executed tests.

In
@.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-009.json:
- Around line 2-3: Update finding FIND-009’s category to
implementation_correctness or stability_and_availability so it reflects the
stream-stopping and body-size enforcement defect; represent missing test
coverage separately rather than using test_coverage as the primary category.

In @.vcsdd/features/life-manager-panel-control-center/specs/behavioral-spec.md:
- Line 9: Pin the Composio SDK/API references in behavioral-spec.md at the
PANEL-0 contract to an immutable release, tag, or commit SHA instead of the
mutable next branch, while preserving the reversible disable semantics. Apply
the same immutable reference and API version to implementation-spec.md at the
endpoint contract so both specifications remain synchronized.

In `@apps/life-call/lib/feature-discovery.js`:
- Around line 82-85: In listDiscoveryUsers(), await the Promise.all result
before returning it instead of returning the promise directly. Keep the existing
user mapping and fallback preference behavior unchanged.

In `@apps/life-call/lib/panel-api.js`:
- Around line 268-279: Update readJson so onData accumulates incoming Buffer
chunks without decoding them individually, and decode the combined bytes once in
onEnd before JSON.parse. Preserve the existing 32 KiB limit, cleanup behavior,
and invalid_json handling.
🪄 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: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 426774b5-a9ed-45d5-aeee-d84293558399

📥 Commits

Reviewing files that changed from the base of the PR and between d4efde6 and 984a088.

📒 Files selected for processing (55)
  • .vcsdd/features/life-manager-panel-control-center/contracts/sprint-1.md
  • .vcsdd/features/life-manager-panel-control-center/evidence/iteration-2-disconnect-verification.md
  • .vcsdd/features/life-manager-panel-control-center/evidence/panel-0-method-3-metadata-repair.md
  • .vcsdd/features/life-manager-panel-control-center/evidence/panel-0-standalone-release-integration.md
  • .vcsdd/features/life-manager-panel-control-center/evidence/panel-corrective3-four-blockers.md
  • .vcsdd/features/life-manager-panel-control-center/evidence/panel-corrective4-logout.md
  • .vcsdd/features/life-manager-panel-control-center/evidence/panel-six-blocker-rescue.md
  • .vcsdd/features/life-manager-panel-control-center/evidence/phase-1-production-findings.md
  • .vcsdd/features/life-manager-panel-control-center/evidence/sprint-2-corrective-red-green.md
  • .vcsdd/features/life-manager-panel-control-center/reviews/spec/iteration-1/input/manifest.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/spec/iteration-1/output/verdict.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/input/provenance.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-001.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-002.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-003.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-004.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-005.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-006.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-007.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-008.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-009.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-010.json
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/verdict.json
  • .vcsdd/features/life-manager-panel-control-center/specs/behavioral-spec.md
  • .vcsdd/features/life-manager-panel-control-center/specs/implementation-spec.md
  • .vcsdd/features/life-manager-panel-control-center/specs/verification-architecture.md
  • .vcsdd/features/life-manager-panel-control-center/state.json
  • .vcsdd/history.jsonl
  • .vcsdd/index.json
  • apps/life-call/lib/feature-discovery.js
  • apps/life-call/lib/panel-api.js
  • apps/life-call/lib/panel-api.test.js
  • apps/life-call/lib/panel-auth.js
  • apps/life-call/lib/panel-auth.test.js
  • apps/life-call/lib/panel-control-center.test.js
  • apps/life-call/lib/panel-corrective-red.test.js
  • apps/life-call/lib/panel-corrective3-four-blockers.test.js
  • apps/life-call/lib/panel-corrective4-logout.test.js
  • apps/life-call/lib/panel-delegation-honesty.test.js
  • apps/life-call/lib/panel-permanent-session.test.js
  • apps/life-call/lib/panel-ui.js
  • apps/life-call/lib/panel-ui.test.js
  • apps/life-call/lib/runtime-preferences.js
  • apps/life-call/lib/telegram.js
  • apps/life-call/lib/user-command.js
  • apps/life-call/lib/user-selector.test.js
  • apps/life-call/migrations/2026-07-21-lm-panel-control-center.rollback.sql
  • apps/life-call/migrations/2026-07-21-lm-panel-control-center.sql
  • apps/life-call/migrations/2026-07-22-lm-panel-durable-sessions.sql
  • apps/life-call/package.json
  • apps/life-call/scheduler.js
  • apps/life-call/scripts/smoke-panel-api-fixture.js
  • apps/life-call/scripts/smoke-panel-ui-fixture.js
  • apps/life-call/server.js
  • docs/loop-engineering/47-writer-loop-quality-and-self-improvement.md

- CRIT-007: provider/persistence failure reports failure and leaves/restores prior state.
- CRIT-008: mobile/desktop DOM contains no non-interactive visible action; every visible action has a native handler and accessible keyboard semantics.
- CRIT-009: migration and rollback are additive/user-keyed; GET is side-effect free; scans find no opaque token, secret, raw PII, or hardcoded Dais/default connected state.
- CRIT-010: focused/full tests and eval pass; changed-module line/function coverage are each >=90%; browser fixture smoke passes.

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

CRIT-010 の coverage 対象を満たしていることを証明してください。

CRIT-010 は全変更モジュールの line/function coverage 90%以上を要求しますが、証跡は scheduler.js の変更を含むスタックで scheduler aggregate を除外しています。scheduler を coverage に含めるか、除外を許可する正式な例外と根拠を契約・ゲート記録に追加してください。

📍 Affects 2 files
  • .vcsdd/features/life-manager-panel-control-center/contracts/sprint-1.md#L19-L19 (this comment)
  • .vcsdd/features/life-manager-panel-control-center/evidence/panel-six-blocker-rescue.md#L42-L42
🤖 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 @.vcsdd/features/life-manager-panel-control-center/contracts/sprint-1.md at
line 19, CRIT-010 の証跡が scheduler.js の変更を含むにもかかわらず scheduler aggregate coverage
を除外しているため、.vcsdd/features/life-manager-panel-control-center/contracts/sprint-1.md
の CRIT-010 要件を scheduler の line/function coverage
を含む内容に更新するか、除外を認める正式な例外と根拠を契約へ追加してください。.vcsdd/features/life-manager-panel-control-center/evidence/panel-six-blocker-rescue.md
の該当証跡も同じ判定と整合するよう更新してください。

Comment on lines +5 to +6
"sourceLog": "/Users/anicca/anicca-project/.claude/sol-orders/logs/panel-control-center-fresh-review.log",
"sourceLogSha256": "a0fc7e4f01e50c0019866ca09e9cfae4c46e91264a443d4db12e0c08c3d8920a",

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

ローカル絶対パスを証跡に保存しないでください。

sourceLog は開発者のユーザー名とローカルプロジェクトパスを露出し、sourceLogSha256 だけでは他のレビュアーが元ログを検証できません。リポジトリ相対のチェックイン済みログ、またはCI artifact ID/参照先を記録してください。

🤖 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
@.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/input/provenance.json
around lines 5 - 6,
provenance.jsonのsourceLogに開発者固有のローカル絶対パスを保存しないよう更新してください。チェックイン済みログはリポジトリ相対パスで記録し、そうでなければ他のレビュアーが取得・検証できるCI
artifact IDまたは参照先をsourceLogに設定してください。sourceLogSha256は対応するログ内容のハッシュとして維持してください。

Comment on lines +11 to +12
"overallVerdict": "FAIL",
"timestamp": "2026-07-21T08:46:00.077111Z",

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

リリース証跡の状態が PR 目的と矛盾しています。 verdict.jsonFAIL、FIND-003〜FIND-010 は open のままです。修正済みの証拠で各 finding と verdict を更新するか、FAIL のままリリースを停止してください。

  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/verdict.json#L11-L12: 最終 verdict を実際の検証結果に合わせて再生成する。
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-003.json#L2-L4: 認証・再照合の修正証拠を記録し、解決状態を更新する。
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-004.json#L2-L4: idempotency 隔離の修正証拠を記録し、解決状態を更新する。
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-005.json#L2-L4: Calendar 状態検証の修正証拠を記録し、解決状態を更新する。
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-006.json#L2-L4: disable rollback/readback の修正証拠を記録し、解決状態を更新する。
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-007.json#L2-L4: OAuth callback 検証の修正証拠を記録し、解決状態を更新する。
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-008.json#L2-L4: Connect UI の修正証拠を記録し、解決状態を更新する。
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-009.json#L2-L4: stream enforcement の修正証拠を記録し、解決状態を更新する。
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-010.json#L2-L4: Phase gate 証跡の修正証拠を記録し、解決状態を更新する。
📍 Affects 9 files
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/verdict.json#L11-L12 (this comment)
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-003.json#L2-L4
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-004.json#L2-L4
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-005.json#L2-L4
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-006.json#L2-L4
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-007.json#L2-L4
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-008.json#L2-L4
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-009.json#L2-L4
  • .vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-010.json#L2-L4
🤖 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
@.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/verdict.json
around lines 11 - 12, リリース証跡とPR目的が不一致です。修正済みの検証証拠を反映して各 finding
の状態を更新し、.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/findings/FIND-003.json#L2-L4、FIND-004.json#L2-L4、FIND-005.json#L2-L4、FIND-006.json#L2-L4、FIND-007.json#L2-L4、FIND-008.json#L2-L4、FIND-009.json#L2-L4、FIND-010.json#L2-L4
に対応する証拠を記録する。.vcsdd/features/life-manager-panel-control-center/reviews/sprint-1/output/verdict.json#L11-L12
は実際の検証結果に基づき再生成し、未解決 finding が残る場合は FAIL を維持してリリースを停止する。

|---|---|---|---|
| panel | `/panel`, `open dashboard`, `get dashboard link` | `ダッシュボードを開いて`, `パネルを開いて` | `panel.open` |
| calendar connect | `connect calendar`, `reconnect calendar` | `カレンダーを接続`, `カレンダーをつないで` | `connection.start(calendar)` |
| calendar disconnect | `disconnect calendar`, `disconnect my google calendar` | `カレンダーを切断`, `カレンダーを解除して` | `connection.disconnect(calendar)` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

固有名詞の表記を修正してください。

Line 48 の disconnect my google calendardisconnect my Google Calendar に修正してください。

🧰 Tools
🪛 LanguageTool

[uncategorized] ~48-~48: “Google” is a proper noun and needs to be capitalized.
Context: ...dar disconnect | disconnect calendar, disconnect my google calendar | カレンダーを切断, カレンダーを解除して | ...

(A_GOOGLE)

🤖 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 @.vcsdd/features/life-manager-panel-control-center/specs/behavioral-spec.md
at line 48, In the calendar disconnect entry, update the phrase “disconnect my
google calendar” to “disconnect my Google Calendar,” preserving the surrounding
mappings and formatting.

Source: Linters/SAST tools

Migration `2026-07-21-lm-panel-control-center.sql` adds:

- `lm_panel_preferences(uid PK/FK lm_users, call_enabled boolean, notifications_enabled boolean, daily_automation_enabled boolean, delegation_enabled boolean, call_time_zone text, created_at, updated_at)`.
- `lm_panel_command_receipts(uid FK, chat_id, idempotency_key, request_hash, command_type, status, result jsonb, created_at, updated_at, PK(uid,idempotency_key))`.

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

receipt のテナントキーを実装と一致させてください。

この仕様は (uid,idempotency_key) をキーとして記載していますが、migration の Line 10-26 は (uid,chat_id,idempotency_key)apps/life-call/lib/panel-api.js の Line 304-306 も uid + chat_id + idempotency_key で処理しています。仕様どおりに実装すると chat_id が idempotency とテナント境界から落ちるため、別チャット間の衝突や再利用を許す契約になります。

修正例
- PK(uid,idempotency_key)
+ PK(uid,chat_id,idempotency_key)

- claims `(uid,idempotency_key)` before mutation
+ claims `(uid,chat_id,idempotency_key)` before mutation

Also applies to: 44-44

🤖 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
@.vcsdd/features/life-manager-panel-control-center/specs/implementation-spec.md
at line 10, Update the lm_panel_command_receipts specification to use (uid,
chat_id, idempotency_key) as the primary key and tenant boundary, matching the
migration and panel API handling. Revise both receipt schema references,
including the occurrence around line 44, so chat_id remains part of idempotency
and cross-chat receipts cannot collide.

Comment on lines +1 to +9
ALTER TABLE public.lm_panel_sessions
ADD COLUMN IF NOT EXISTS family_id uuid DEFAULT gen_random_uuid(),
ADD COLUMN IF NOT EXISTS idle_expires_at timestamptz,
ADD COLUMN IF NOT EXISTS absolute_expires_at timestamptz,
ADD COLUMN IF NOT EXISTS rotated_at timestamptz,
ADD COLUMN IF NOT EXISTS revoked_at timestamptz,
ADD COLUMN IF NOT EXISTS pending_child_hash text,
ADD COLUMN IF NOT EXISTS pending_child_seed text,
ADD COLUMN IF NOT EXISTS rotation_grace_until timestamptz;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

family_id の VOLATILE デフォルトはテーブル全体の書き換えを誘発します。

gen_random_uuid() は VOLATILE のため、このデフォルト付きカラム追加は ACCESS EXCLUSIVE ロックを保持したままテーブル全体の rewrite を行い、その間 lm_panel_sessions の読み書きがブロックされます。稼働中テーブルではダウンタイム要因になります。カラムは NULL 許容で追加 → バックフィル → 必要ならデフォルト設定、の順を推奨します(直後の Line 11 で既存行は失効させているため、既存行への UUID 付与自体は必須ではありません)。

🛠️ 提案(rewrite を避ける)
 ALTER TABLE public.lm_panel_sessions
-  ADD COLUMN IF NOT EXISTS family_id uuid DEFAULT gen_random_uuid(),
+  ADD COLUMN IF NOT EXISTS family_id uuid,
   ADD COLUMN IF NOT EXISTS idle_expires_at timestamptz,

(新規セッションは resolve_lm_panel_session / 挿入経路で family_id を明示設定しているため、既存行はバックフィルのみで足ります。)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ALTER TABLE public.lm_panel_sessions
ADD COLUMN IF NOT EXISTS family_id uuid DEFAULT gen_random_uuid(),
ADD COLUMN IF NOT EXISTS idle_expires_at timestamptz,
ADD COLUMN IF NOT EXISTS absolute_expires_at timestamptz,
ADD COLUMN IF NOT EXISTS rotated_at timestamptz,
ADD COLUMN IF NOT EXISTS revoked_at timestamptz,
ADD COLUMN IF NOT EXISTS pending_child_hash text,
ADD COLUMN IF NOT EXISTS pending_child_seed text,
ADD COLUMN IF NOT EXISTS rotation_grace_until timestamptz;
ALTER TABLE public.lm_panel_sessions
ADD COLUMN IF NOT EXISTS family_id uuid,
ADD COLUMN IF NOT EXISTS idle_expires_at timestamptz,
ADD COLUMN IF NOT EXISTS absolute_expires_at timestamptz,
ADD COLUMN IF NOT EXISTS rotated_at timestamptz,
ADD COLUMN IF NOT EXISTS revoked_at timestamptz,
ADD COLUMN IF NOT EXISTS pending_child_hash text,
ADD COLUMN IF NOT EXISTS pending_child_seed text,
ADD COLUMN IF NOT EXISTS rotation_grace_until timestamptz;
🧰 Tools
🪛 Squawk (2.59.0)

[warning] 2-2: Adding a generated column requires a table rewrite with an ACCESS EXCLUSIVE lock. In Postgres versions 11+, non-VOLATILE DEFAULTs can be added without a rewrite. Add the column as nullable, backfill existing rows, and add a trigger to update the column on write instead.

(adding-field-with-default)

🤖 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 `@apps/life-call/migrations/2026-07-22-lm-panel-durable-sessions.sql` around
lines 1 - 9, lm_panel_sessions への family_id 追加で、VOLATILE な gen_random_uuid()
のデフォルトによるテーブル rewrite を避けてください。family_id はデフォルトなしの NULL
許容カラムとして追加し、新規セッションの挿入経路(resolve_lm_panel_session など)では引き続き明示的に設定してください。既存行への
UUID バックフィルやデフォルト設定は必要性を確認したうえで、テーブル追加と分離して実施してください。

Source: Linters/SAST tools

"eval": "node eval/run-calendar-eval.js && node eval/run-late-eval.js",
"pretest": "node --test lib/composio-budget.test.js && node --test lib/calendar-interpreter.test.js",
"test": "node test/scheduler.test.js && node --test skill-life-manager/scripts/scaffold.test.js && node --test skill-life-manager/openclaw/crons.test.js && node --test lib/answered.test.js && node --test lib/maybe-start-loops.test.js && node --test lib/feature-discovery.test.js && node --test lib/panel-ui.test.js && node --test lib/panel-auth.test.js && node --test lib/panel-api.test.js && node --test lib/ch1-atomic-dedup.test.js && node --test lib/lm-p0.test.js && node --test lib/telegram-onboard.test.js && node --test lib/context-graph.test.js && node --test lib/gmail-onboard.test.js && node --test lib/late-notice.test.js && node --test lib/ledger.test.js && node --test lib/calendar-cache.test.js && node --test lib/transport/calendar-unipile.test.js && node --test test/inngest.test.js && node --test lib/billing.test.js && node --test test/tenant-isolation.test.js && node --test lib/places-memory.test.js && node --test test/wake-levels.test.js && node --test test/phase-c-wiring.test.js && node --test test/testcall-ratelimit.test.js && node --test lib/reply-token.test.js && node --test lib/transit.test.js && node --test lib/route-cache.test.js && node --test lib/call-bridge.test.js && node --test lib/call-language.test.js && node --test lib/user-selector.test.js && node --test lib/money-path.test.js && node --test lib/travel-transit-wire.test.js && node --test lib/events-gmail-account-propagation.test.js",
"test": "node test/scheduler.test.js && node --test skill-life-manager/scripts/scaffold.test.js && node --test skill-life-manager/openclaw/crons.test.js && node --test lib/answered.test.js && node --test lib/maybe-start-loops.test.js && node --test lib/feature-discovery.test.js && node --test lib/panel-ui.test.js && node --test lib/panel-auth.test.js && node --test lib/panel-api.test.js lib/panel-control-center.test.js lib/panel-delegation-honesty.test.js && node --test lib/ch1-atomic-dedup.test.js && node --test lib/lm-p0.test.js && node --test lib/telegram-onboard.test.js && node --test lib/context-graph.test.js && node --test lib/gmail-onboard.test.js && node --test lib/late-notice.test.js && node --test lib/ledger.test.js && node --test lib/calendar-cache.test.js && node --test lib/transport/calendar-unipile.test.js && node --test test/inngest.test.js && node --test lib/billing.test.js && node --test test/tenant-isolation.test.js && node --test lib/places-memory.test.js && node --test test/wake-levels.test.js && node --test test/phase-c-wiring.test.js && node --test test/testcall-ratelimit.test.js && node --test lib/reply-token.test.js && node --test lib/transit.test.js && node --test lib/route-cache.test.js && node --test lib/call-bridge.test.js && node --test lib/call-language.test.js && node --test lib/user-selector.test.js && node --test lib/money-path.test.js && node --test lib/travel-transit-wire.test.js && node --test lib/events-gmail-account-propagation.test.js",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

新規リグレッションスイートが npm test に登録されていません。

test スクリプトに追加されたのは lib/panel-control-center.test.jslib/panel-delegation-honesty.test.js のみです。今回追加された lib/panel-corrective-red.test.js / lib/panel-corrective3-four-blockers.test.js / lib/panel-corrective4-logout.test.js / lib/panel-permanent-session.test.js はスクリプトに含まれておらず、npm test で実行されません。これらのスイートが守っているリグレッションは CI で検知されなくなります(証跡でも node --test lib/panel-corrective-red.test.js は手動実行として記録されています)。

node --test の引数に4ファイルを追加してください。

#!/bin/bash
# test スクリプトに含まれない新規テストファイルを検出
rg -n '"test":' apps/life-call/package.json
for f in panel-corrective-red panel-corrective3-four-blockers panel-corrective4-logout panel-permanent-session; do
  rg -q "lib/${f}.test.js" apps/life-call/package.json \
    && echo "wired: ${f}" || echo "MISSING from npm test: ${f}"
done
🤖 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 `@apps/life-call/package.json` at line 11, Update the package.json test script
to add node --test entries for lib/panel-corrective-red.test.js,
lib/panel-corrective3-four-blockers.test.js,
lib/panel-corrective4-logout.test.js, and lib/panel-permanent-session.test.js,
ensuring all four regression suites run through npm test.

| lane | 供給 | 状態 |
|---|---|---|
| 1. Dais 指名 | Dais「これ記事に」→ Fable がその turn 内に `topics/queue/` へカード作成(既存 frontmatter に倣う。HARD) | 運用ルールとして確立 |
| 1. Dais 指名 | Dais「これ記事に」→ main Sol がその turn 内に `topics/queue/` へカード作成(既存 frontmatter に倣う。HARD) | 運用ルールとして確立 |

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

実装担当の責務表現を統一してください。

Line 227 は「main Sol が queue カードを作成」としていますが、Line 307 は「main Sol は plan/spec/独立検証のみ、build/edit は別 Sol」と定義しています。Line 251-256 の Sol 表記も曖昧です。main Sol が依頼・検証し、別 Sol が編集するのか、main Sol が直接編集するのかを一つに統一してください。

Also applies to: 251-256, 307-307

🤖 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 `@docs/loop-engineering/47-writer-loop-quality-and-self-improvement.md` at line
227, 実装担当の責務表現を統一し、表の「main Sol が queue カードを作成」、251-256 行の Sol 表記、307
行の責務定義が同じ運用モデルを示すよう修正してください。main Sol が依頼・検証のみを担い、別 Sol が build/edit
を行う方針なら、queue カード作成を含む編集作業の担当を別 Sol と明記し、曖昧な Sol 表記も具体化してください。

Comment on lines +329 to 340
## 16. WRITER ENGINE — 3 lane baseline(現在の運用正本は §18

**是正**: これは「article loop」ではない。**1つの self-improving engine が短文・中文・長文の3 lane に毎日/毎週/毎月書く**。記事は lane の1つにすぎない。X 短文 lane と書籍 lane は「後で」ではなく engine の初期形態に含まれる。

### 16.1 3 lane 構成(全 lane が同じ CORE を共有)
| lane | 頻度 | 出力 | taste 調達元(vendor 済み) | 金 |
|---|---|---|---|---|
| SHORT (X 単体投稿) | 毎日 2-3本 ja+en | 記事リンクでない standalone 投稿(フック/教訓/観察) | Gingiris 閉ループ(voice→evidence→publishability→feedback)+ blacktwist hooks + viral-hooks | 直接 ¥0。発見面 = 全 lane の母数を作る |
| MID (記事=newsletter) | 毎日1本×2言語 | note/zenn/substack/X(記事)/devto | STORM式+hooks+storytelling+anti-ai/humanizer/shimo4228(bakeoff 実証) | sub ¥500/mo + 単発 ≤¥500 |
| LONG (書籍) | 月1冊 | 記事在庫30本の束ね直し → zenn本/gumroad/自社+Stripe | ai-book-generator 骨格 + show-me-the-story 全書整合 pass | ¥1,500-3,000/冊 |
| SHORT (X 単体投稿) | **毎日ちょうど1本、jaのみ** | @diceai0 の standalone 投稿。外部リンクなし。MID の同日 finding を280 weighted chars以内に圧縮 | `x-algorithm` + Gingiris 閉ループ + `recursive-improver` の social-post rubric(最大5版) | 直接 ¥0。プロフィール導線から MID の母数を作る |
| MID (記事=newsletter) | 毎日1題×2言語 | note/ja、Zenn/ja、Substack/ja、Substack/en、Dev.to/en、X Articles/ja、X Articles/enをすべてlive公開 | `ai-entity-article-writer` + STORM式+hooks+storytelling+humanizer/shimo4228(bakeoff 実証) | subscription 月額は設定値 + note 単発 ≤¥500 |
| LONG (書籍) | 月1冊、30本の新規MID在庫が条件 | 日本語1冊を Zenn Book + Gumroad + 自社Stripe の3出口へ同一版で公開 | `book-writer`。Nigh/show-me-the-story の中断再開・章整合 pass をMIT範囲で copy+tweak、PandocでEPUB/PDF | ¥1,500-3,000/冊。MRRとは分離集計 |

CORE(共有): queue+exemplar 学習(T6) → 執筆 → verify(rubric+conscience gate W1+bounded revise W2+token 予算)→ 公開(CDP 直、credential ゼロ)→ 学習(実売還流 T12 / owner-veto / 週次監査)。

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

旧exact6/7の履歴と現行exact8仕様を明確に分離してください。

§16 は「§18が現在の運用正本」としながら、旧配信集合をlive実績として記載し、Line 358-364 では現在状態を DONE、Line 375-391 では旧exact6のD7を完了証拠として扱っています。一方、§18.1/§18.8 の現行仕様はexact8で、E2-E8は未完了です。§16/D7を履歴として明示するか、現行状態の参照を§18.8へ統一しないと、旧evidenceが新しいrelease gateを満たすと誤認されます。

Also applies to: 358-364, 375-391

🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 334-334: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 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 `@docs/loop-engineering/47-writer-loop-quality-and-self-improvement.md` around
lines 329 - 340,
§16内の旧exact6/7に基づく配信集合、DONE状態、D7完了証拠を「履歴」または旧仕様の実績として明示し、現行運用の完了状態として読めないように区別してください。現行のrelease
gate・状態・配信仕様への参照は§18.1/§18.8のexact8へ統一し、E2-E8未完了を反映して旧evidenceが現行gateを満たす表現を除去または修正してください。

| AC7 self improvement | 日次はmetricsをappendするだけ。週次にTerraまたはClaude側modelが1変更だけ提案し、held-out ja/en/form test、7日canary、keep/revertを実測。taste/rubricだけ自動昇格し、実行code変更はtest付きpatch artifactに留めproductionへ自己適用しない |
| AC8 clean OSS install | tracked codeは下記TO-BE treeだけ。fresh cloneで`./install.sh --runtime codex`または`--runtime claude`が動き、他providerのloginを要求しない。runtime state、browser profile、credential、generated bookはrepo外。旧skill copy・旧finalizer・hardcoded home pathは0件。X Article、X Post、Dev.to publisherは新SSOTに各1実装だけ存在する |
| AC9 measurement | dailyにX impressions/engagement、各記事view/free subscriber/paid subscriber、platform receiptを記録。monthlyにstrict MRRとone-off売上を別集計し、30-colony式の各変数を実数で更新 |
| AC10 notification | state transitionと同じtransactionでTelegram outboxへlogical eventをexact1 appendする。必須eventはRUN_ENQUEUED、RUNTIME_SELECTED/UNAVAILABLE、QUALITY_SELECTED、SAFETY_QUARANTINED、X_POST_SLOT_ASSIGNED/EMPTY、各pairのPLATFORM_LIVE/PENDING/FAIL、RETRY_SCHEDULED/RESULT、DAILY_COMPLETE、BOOK_INVENTORY_SHORT、`BOOK_BUILD_STATE(stage=plan|chapters|consistency|pandoc|epub,status=started|pending|pass|fail)`、BOOK_PLATFORM_LIVE/PENDING/FAIL、BOOK_COMPLETE、METRICS_COMPLETE/FAIL、WEEKLY_EXPERIMENT_KEEP/REVERT/FAIL。配送はat-least-onceとし、send receiptがないeventを5分workerが再送する。各messageにevent UUIDを表示し、送信成功後の応答喪失によるTelegram上の重複を識別可能にする |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

AC10のMarkdown表内の|をエスケープしてください。

BOOK_BUILD_STATE(stage=plan|chapters|consistency|pandoc|epub,...)|が表の列区切りとして解釈され、行の列数が壊れています。\|にするか、イベント仕様を表外のコードブロックへ移してください。

修正例
-`BOOK_BUILD_STATE(stage=plan|chapters|consistency|pandoc|epub,status=started|pending|pass|fail)`
+`BOOK_BUILD_STATE(stage=plan\|chapters\|consistency\|pandoc\|epub,status=started\|pending\|pass\|fail)`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| AC10 notification | state transitionと同じtransactionでTelegram outboxへlogical eventをexact1 appendする。必須eventはRUN_ENQUEUED、RUNTIME_SELECTED/UNAVAILABLE、QUALITY_SELECTED、SAFETY_QUARANTINED、X_POST_SLOT_ASSIGNED/EMPTY、各pairのPLATFORM_LIVE/PENDING/FAIL、RETRY_SCHEDULED/RESULT、DAILY_COMPLETE、BOOK_INVENTORY_SHORT、`BOOK_BUILD_STATE(stage=plan|chapters|consistency|pandoc|epub,status=started|pending|pass|fail)`、BOOK_PLATFORM_LIVE/PENDING/FAIL、BOOK_COMPLETE、METRICS_COMPLETE/FAIL、WEEKLY_EXPERIMENT_KEEP/REVERT/FAIL。配送はat-least-onceとし、send receiptがないeventを5分workerが再送する。各messageにevent UUIDを表示し、送信成功後の応答喪失によるTelegram上の重複を識別可能にする |
| AC10 notification | state transitionと同じtransactionでTelegram outboxへlogical eventをexact1 appendする。必須eventはRUN_ENQUEUED、RUNTIME_SELECTED/UNAVAILABLE、QUALITY_SELECTED、SAFETY_QUARANTINED、X_POST_SLOT_ASSIGNED/EMPTY、各pairのPLATFORM_LIVE/PENDING/FAIL、RETRY_SCHEDULED/RESULT、DAILY_COMPLETE、BOOK_INVENTORY_SHORT、`BOOK_BUILD_STATE(stage=plan\|chapters\|consistency\|pandoc\|epub,status=started\|pending\|pass\|fail)`、BOOK_PLATFORM_LIVE/PENDING/FAIL、BOOK_COMPLETE、METRICS_COMPLETE/FAIL、WEEKLY_EXPERIMENT_KEEP/REVERT/FAIL。配送はat-least-onceとし、send receiptがないeventを5分workerが再送する。各messageにevent UUIDを表示し、送信成功後の応答喪失によるTelegram上の重複を識別可能にする |
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 465-465: Table column count
Expected: 2; Actual: 9; Too many cells, extra data will be missing

(MD056, table-column-count)

🤖 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 `@docs/loop-engineering/47-writer-loop-quality-and-self-improvement.md` at line
465,
AC10のMarkdown表内で、BOOK_BUILD_STATEのstage値を区切るパイプ文字をMarkdown列区切りとして解釈されないようエスケープしてください。対象の「BOOK_BUILD_STATE(stage=plan|chapters|consistency|pandoc|epub,status=...)」表記を各「|」が「\|」になる形へ更新し、表の列構造を維持してください。

Source: Linters/SAST tools

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