Skip to content

[Phase 0] Foundation — monorepo skeleton / CI / hooks / license #4

Description

@n-guitar

親 issue: #3
関連 ADR: #2 (ADR-0005), ADR-0004

目的

実装を開始するための土台を整える。コードはまだ書かない。

完了条件 (DoD)

  • git clone && make dev が初めての contributor で通る
  • CI が PR ごとに cargo fmt / clippy / test と pnpm lint / test を実行する
  • AWS リソース ID / シークレットが pre-commit で検知される
  • LICENSE / NOTICE / TRADEMARKS.md が配置されている (ADR-0004)

作業項目

モノレポ骨格 (ADR-0005)

  • ルート Cargo.toml ([workspace])、crates/ ディレクトリ
  • ルート pnpm-workspace.yaml、apps/ packages/ ディレクトリ
  • rust-toolchain.toml で Rust バージョン pin
  • package.json (root) に lifecycle script (build, test, fmt, lint, codegen)
  • .editorconfig / .gitattributes

CI

  • GitHub Actions: rust.yml (fmt + clippy --deny warnings + test on ubuntu/macos/windows)
  • GitHub Actions: web.yml (pnpm install + biome + vitest)
  • GitHub Actions: codegen.yml (cargo run -p pm-codegen → git diff --exit-code、ADR-0008)
  • sccache or cargo-nextest 検討 (時間かかるなら後回し)

Pre-commit hook (OnboardX 参考)

  • .githooks/pre-commit に AWS リソース ID 正規表現スキャン
    • User Pool / Client ID / API Gateway endpoint / CloudFront domain / 12桁アカウント ID
  • README に git config core.hooksPath .githooks 案内
  • gitleaks も検討(OSS リポなので強く推奨)

License & Trademarks (ADR-0004)

  • LICENSE (Apache 2.0 全文)
  • NOTICE (Copyright + 商標表記)
  • TRADEMARKS.md (使用ポリシー)
  • 主要ソースに SPDX ヘッダ (// SPDX-License-Identifier: Apache-2.0) を雛形として準備

ドキュメント

  • docs/dev-guide.md — 3 ティア (ADR-0007) のいつどれを使うかフローチャート
  • CLAUDE.md 更新 — mock-only ガイドから実装 phase ガイドへ書き換え
  • README.md 更新 — quickstart を Tier 1 ベースに

非対象

  • pm-core 実装 → Phase 1
  • frontend 移植 → Phase 2
  • CDK / Tauri → Phase 3, 4

参照

  • OnboardX の .githooks/pre-commit (AWS ID 検知の参考)
  • OnboardX の CLAUDE.md の機密情報セクション

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions