Skip to content

docs(aidlc): replan the units for a system that is not in operation yet - #80

Merged
yufoxda merged 4 commits into
developfrom
claude/epic-wright-9zzc8u-docs
Nov 1, 2026
Merged

yufoxda merged 4 commits into
developfrom
claude/epic-wright-9zzc8u-docs

Conversation

@yufoxda

@yufoxda yufoxda commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

作業単位(unit-of-work.md)の改訂案です。AI-DLC の承認ゲートに従い、「承認待ち」として出しています。 承認するには、unit-of-work.md 末尾のチェック項目を埋めてください。

背景

前版の作業単位は「本番が稼働中」という前提で分けていました(2026-07-28 のリバースエンジニアリングによる)。2026-11-01 に依頼者に確認したところ、実際は次のとおりでした。

  • プロトタイプの Worker は停止済みで、公開していない
  • 本番 DB にあるのは開発者とテスト用のアカウントだけで、破棄してよい
  • 実際の利用者はまだいない

前版の分け方には「稼働中の本番を壊さない」ための慎重さが含まれていました。その一部は、もう必要ありません。

変更

unit-of-work.md

  • 単位の条件を変更:「各単位が単独で本番に出せる」から、「マージした時点で develop が動く(CI が通る)」にしました
  • U-4 を U-3 に統合:旧ロール列と新しいロール表を並存させていたのは、稼働中の本番を壊さないためでした。運用前の今は不要なので、判定の置き換えと列の削除を一度に行います。PR を 2 つに分けるのは構いません。U-4 の番号は、既存の記録から参照されているので欠番として残しました
  • U-2.5 の突き合わせ先を最初から member_roles に:前版では、いったん app_accounts と突き合わせ、U-4 の後で member_roles に替える予定でした。すぐ消える列に向けた突き合わせを書く必要はなくなります。U-1 で管理者全員に admin ロール(role.manage を含む)を付けているので、この時点でも管理者は書き込めます
  • 「運用開始の条件」を新設:U-2.5・U-6・U-7・U-10・U-11 の完了、audit が通ること、本番 DB の作り直し、それ以降は C-1 を適用すること
  • U-10・U-11 は運用開始の前に行う(依頼者が決定):運用開始の日付に締め切りがないため、データの移行もメンテナンス時間も要らない「前」を選びました。代わりに、運用開始はその分遅れます
  • U-10 の範囲を追記:U-2(feat(auth): resolve what a caller may do, not what they are called #76)で、community の認証ミドルウェアが member の所有するテーブル(member_roles・role_permissions)を直接読むようになりました。これも U-10 で置き換える越境に含めます
  • 進み具合を反映:U-9(refactor(member): write member rows through one guarded path #71)と U-1(feat(db): give roles to members instead of to login accounts #73)は完了、U-2(feat(auth): resolve what a caller may do, not what they are called #76 )はマージ待ち、次は U-2.5

関連ドキュメント

  • requirements.md C-1:「運用開始後の本番データを失わない。運用開始前のデータは破棄してよい」に改めました
  • components.md 6章:移行の手順を、統合後の単位と決定に合わせました
  • README.md:進み具合と、前提を改訂した理由を追記しました

intent.md と reverse-engineering.md は、2026-07-28 時点の記録なので変えていません。

承認してほしいこと

unit-of-work.md 末尾のチェック項目のうち、残りの 3 つです。

  • 前提の改訂が事実と合っている
  • U-3 と U-4 の統合、および U-2.5 の突き合わせ先の変更に同意する
  • 運用開始の条件に過不足がない

U-10・U-11 の時期は決定済みなので、チェックを入れてあります。

備考

#76 も components.md を変更していますが、変更箇所が違う(3.2・3.5 と 6章)ので、競合はしない見込みです。

🤖 Generated with Claude Code

https://claude.ai/code/session_01Vm1iXpgdwQfcWuyNzX9KF7

The units were split on the premise that production was running (the
2026-07-28 reverse engineering). The requester confirmed on 2026-11-01 that
the prototype Workers are stopped and the production data is disposable
developer and test accounts.

- unit-of-work.md: record the revised premise; the bar for a unit is now
  "develop works when it lands", not "ships to production on its own".
  Merge U-4 into U-3, since the old/new role coexistence only existed to
  avoid breaking a live system, and point U-2.5's cross-check at
  member_roles from the start instead of a column about to be dropped.
  Add launch conditions (U-2.5, U-6, U-7, audit, a fresh production DB,
  C-1 from then on) and leave the timing of U-10/U-11 as an open decision.
  Mark U-9 and U-1 done and U-2 as awaiting merge.
- requirements.md C-1: apply from launch; prototype data may be discarded.
- components.md 6: migration steps follow the merged units.
- README.md: status and a note on why the premise changed.

The revision is marked as awaiting approval, per the AI-DLC approval gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vm1iXpgdwQfcWuyNzX9KF7
The requester decided on 2026-11-01: with no launch deadline, separate the
schemas and move session checks across the boundary before any real data
exists, so neither needs a data-preserving migration or a maintenance window.

- Record the decision and make U-10/U-11 a launch condition.
- Note that U-2 made community's auth middleware read member_roles and
  role_permissions, which member owns; U-10 has to replace that crossing too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vm1iXpgdwQfcWuyNzX9KF7
Decided with the requester on 2026-11-01: check per API by permission, never
by role name; name permissions <data>.<action>; handle differences in the
record itself (owner, state) with a condition in the handler instead of a new
permission; split a permission only when a real need appears, granting the
new one to its current holders first so no one's access changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vm1iXpgdwQfcWuyNzX9KF7
…comments

- unit-of-work.md: the 2026-11-01 revision is approved by the requester;
  U-2 is done now that #76 is merged.
- README.md: status follows.
- intent.md 6.3: the code is a teaching material for people a little way
  into TypeScript who want to step up by reading a real service (revised
  from "not beginners, successors who can already do some"). Code comments
  are written in Japanese.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vm1iXpgdwQfcWuyNzX9KF7
@yufoxda
yufoxda merged commit 39f362b into develop Nov 1, 2026
3 checks passed
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