nyash-codex
c181aeac4d
docs(runtime): Phase 99 ログ/出力ポリシー確定 - 3層設計の文書化完成
## Phase 99 完了項目(ドキュメント設計フェーズ)
- ✅ logging_policy.md 新規作成(312行)
- ✅ ring0-inventory.md 更新(455行)
- ✅ core_boxes_design.md Section 15.6-A 追記(+58行)
- ✅ CURRENT_TASK.md Phase 85 セクション更新
## 確定した3層ログ/出力設計
【Ring0.log】(OS API層)
- 用途: ランタイム/OS内部ログ
- 対象: 開発者向けデバッグ・計測・内部状態
- API: ring0.log.debug/info/warn/error(...)
【ConsoleService】(Box層・ユーザー向け)
- 用途: CLIの直接的な出力(ユーザー向けメッセージ)
- 対象: エンドユーザー
- アクセス: console_println! マクロ
【素のprintln!/eprintln!】(制限用途)
- 用途: テスト・一時デバッグのみ限定
- テスト内: 約299箇所そのまま許可
- 本番経路: 撤退すべき
## println!/eprintln! 残件分類(1477箇所)
- user-facing: ~366箇所(HIGH)→ console_println!
- dev-debug: TBD(MEDIUM)→ Ring0.log or dev_* macros
- test: ~299箇所(LOW)→ そのまま許可
- internal: ~812箇所(TBD)
## 設計の価値
- **コード変更なし**: リスク最小(ドキュメントのみ)
- **後工程の基盤**: Phase 100-101で残り~366箇所を片付け可能
- **Fail-Fast原則**: マクロ方針でエラーメッセージは確実に出力
- **段階的移行**: Graceful Degradation パターンで初期化前後を対応
## 新規ドキュメント構成
logging_policy.md:
- Section 1: 3層の役割分担
- Section 2: Macroポリシー
- Section 3: テスト内println!の扱い
- Section 4: 完全統合の完了条件
- Section 5: 設計原則
- Section 6: 関連ドキュメント
ring0-inventory.md:
- Section 1: Ring0.log利用状況
- Section 2: println! 残件分類(4カテゴリ)
- Section 3: Ring0.log活用計画
- Section 4-8: 配布状況・ロードマップ・コマンド・履歴・成功基準
## AI協働開発の成功例
- 設計と実装の分離(Phase 99=設計、Phase 100+=実装)
- 段階的アプローチ(80/20ルール:完璧より進捗)
- ドキュメント優先(コードより先に設計を固める)
## Phase 85-99 総括
- Phase 95.5: StringService/ConsoleService実装
- Phase 96-96.5: ArrayService/MapService & コード整理
- Phase 97: IntegerService/BoolService(#[allow(dead_code)] 根絶)
- Phase 98-98.5: ConsoleService代表パス拡張(7箇所)
- Phase 99: ログ/出力ポリシー確定(設計フェーズ) ✅
次: Phase 100-101(user-facing移行、~366箇所段階的実装)
🎊 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 11:31:35 +09:00
..
2025-09-17 10:58:12 +09:00
2025-12-03 11:31:35 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-08-26 01:42:18 +09:00
2025-09-05 13:29:17 +09:00
2025-08-21 00:41:26 +09:00
2025-09-24 01:05:44 +09:00
2025-08-28 09:26:58 +09:00
2025-11-06 15:41:52 +09:00
2025-08-21 00:41:26 +09:00
2025-09-24 14:13:15 +09:00
2025-08-26 19:13:57 +09:00
2025-08-26 00:48:09 +09:00