@ripla/godd-mcp 1.0.6 → 1.0.7-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/godd.cjs +194 -185
  2. package/dist/godd.js +191 -49
  3. package/dist/index.js +1 -1
  4. package/notes/api/.env.example +1 -4
  5. package/notes/api/README.md +4 -2
  6. package/notes/api/app/config.py +8 -5
  7. package/notes/api/app/routers/tree.py +3 -3
  8. package/notes/api/app/services/github.py +14 -13
  9. package/notes/api/app/services/github_app_token.py +10 -15
  10. package/notes/api/app/services/github_pr.py +14 -8
  11. package/notes/api/tests/test_files.py +2 -2
  12. package/notes/api/tests/test_github_app_token.py +6 -5
  13. package/notes/api/tests/test_github_service.py +30 -4
  14. package/notes/api/tests/test_pr_chain.py +25 -2
  15. package/notes/api/tests/test_tree.py +1 -1
  16. package/notes/app/e2e/pages/login-page.ts +6 -0
  17. package/notes/app/e2e/password-toggle.spec.ts +198 -0
  18. package/notes/app/src/components/PasswordInput.test.tsx +122 -0
  19. package/notes/app/src/components/PasswordInput.tsx +67 -0
  20. package/notes/app/src/pages/LoginPage.test.tsx +31 -1
  21. package/notes/app/src/pages/LoginPage.tsx +14 -8
  22. package/notes/app/src/pages/UserManagementPage.test.tsx +51 -0
  23. package/notes/app/src/pages/UserManagementPage.tsx +2 -2
  24. package/package.json +1 -1
  25. package/templates/github-actions/aws/deploy-notes.yml.hbs +31 -0
  26. package/templates/notes-compose.yml +0 -1
  27. package/templates/notes-docs/007_guides/setup_godd.md +46 -10
  28. package/templates/notes-docs/007_guides/setup_godd_notes.md +218 -16
  29. package/templates/notes-docs/007_guides/setup_godd_notes.md.styles.json +409 -0
  30. package/templates/notes-docs/007_guides/setup_infra.template.md +75 -22
  31. package/templates/terraform/aws/ecs.tf.hbs +9 -1
  32. package/templates/terraform/aws/provider.tf.hbs +1 -1
  33. package/templates/terraform/aws/secrets.tf.hbs +11 -3
@@ -1,36 +1,238 @@
1
- # GoDD Notesのはじめ方
1
+ # GoDD Notes 構築ガイド
2
2
 
3
- 1. GoDD をインストール
3
+ GoDD Notes のローカル構築、インフラ作成、AWS デプロイまでの流れを記載します。
4
+
5
+ > **PAT(`GITHUB_TOKEN` / `github-token`)は禁止です。** GitHub 連携には GitHub App 3変数(`GITHUB_APP_ID` / `GITHUB_APP_PRIVATE_KEY` / `GITHUB_APP_INSTALLATION_ID`)が必須です。
6
+
7
+ ---
8
+
9
+ ## 1. GoDD をインストール
10
+
11
+ ```shell
4
12
  npm install -g @ripla/godd-mcp
13
+ ```
14
+
15
+ 配布 ZIP から `godd install` する場合は [setup_godd.md](./setup_godd.md) を参照。
5
16
 
6
- 2. プロジェクトで godd init
17
+ ## 2. プロジェクトで `godd init`
18
+
19
+ ```shell
7
20
  cd /path/to/your-project
8
21
  godd init
22
+ ```
23
+
9
24
  プロジェクトごとに実行が必要です(2人目以降のメンバーも各自実行)。
10
25
 
11
- 3. docs/ フォルダ構造をテンプレートから生成
12
- Cursor
26
+ ## 3. `docs/` フォルダ構造をテンプレートから生成
27
+
28
+ **Cursor:**
29
+
30
+ ```shell
13
31
  /godd_docs_init
32
+ ```
33
+
34
+ **Claude Code:** MCP ツール `godd_docs_init` を呼び出す。
35
+
36
+ ---
37
+
38
+ ## 4. ローカル開発(任意)
39
+
40
+ AWS デプロイ前にローカルで動作確認する場合:
41
+
42
+ ```shell
43
+ godd notes compose
44
+ ```
45
+
46
+ GitHub App 3変数は `godd notes compose`(対話 / `--auto` / `--config`)で必須です。未設定だと CLI がエラー終了します。Notes API を App なしで直接起動した場合のみモックモード(GitHub API 不使用)になります。生成される `.env` では PEM の改行を `\n` に正規化します(Compose が1行値として読めるようにするため。API 側で復元します)。
47
+
48
+ ---
49
+
50
+ ## 5. AWS 本番環境向けの事前セットアップ
51
+
52
+ > **本番 AWS デプロイ時のみ必要です。** ローカル開発(`godd notes compose`)のみの場合は不要です。
53
+
54
+ ### 5-1. AWS アカウント構成・セキュリティ・コスト監視
55
+
56
+ 以下のガイドの順に整備する:
14
57
 
15
- 4. AWS 本番環境向けの事前セットアップ(本番 AWS デプロイ時のみ)
16
- 以下のガイドの順に、アカウント構成・セキュリティ・コスト監視を整備する:
17
58
  - [setup_aws_accounts.md](./setup_aws_accounts.md) — Organizations とアカウント構成
18
59
  - [setup_aws_guard_duty.md](./setup_aws_guard_duty.md) — GuardDuty 設定
19
60
  - [setup_aws_cost_alert.md](./setup_aws_cost_alert.md) — コスト監視(Budgets / Cost Anomaly Detection)
20
61
 
21
- 5. クラウドインフラ構築(初回のみ)
62
+ ### 5-2. AWS CLI 認証
63
+
64
+ Terraform 適用・Secrets 投入・`godd notes deploy` の前に AWS CLI で認証しておきます。
65
+
66
+ ```bash
67
+ # SSO 利用例(プロファイル名は環境に合わせて変更)
68
+ aws sso login --profile <PROFILE>
69
+ export AWS_PROFILE=<PROFILE> # macOS / Linux
70
+ # PowerShell: $env:AWS_PROFILE = "<PROFILE>"
71
+
72
+ # 認証確認
73
+ aws sts get-caller-identity --profile <PROFILE> --region ap-northeast-1
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 6. GitHub App 設定(必須)
79
+
80
+ GoDD Notes Bot(または自前の GitHub App)を対象リポジトリにインストールします。**PAT は使用できません。**
81
+
82
+ ### 6-1. リポジトリアクセス権の追加(初回のみ)
83
+
84
+ GitHub → Organization の Settings → Third-party Access / GitHub Apps → GoDD Notes Bot / Configure → Repository access / **Only select repositories** で対象リポジトリを追加する。
85
+
86
+ App 3変数が設定済みでも、リポジトリを未追加のままだと GitHub API が 401/403 になり Notes はエラーになる(モックモードにはならない)。
87
+
88
+ ### 6-2. App ID / Installation ID の取得
89
+
90
+ | 値 | 取得方法 |
91
+ |---|---|
92
+ | **App ID** | GitHub App 設定ページの **App ID**(数値) |
93
+ | **Private Key** | App 設定 → **Generate a private key** で `.pem` をダウンロード |
94
+ | **Installation ID** | Install App 後の URL 末尾の数字(例: `https://github.com/organizations/<org>/settings/installations/<ID>`) |
95
+
96
+ 詳細手順: [bot-token-setup.md](./bot-token-setup.md)
97
+
98
+ ---
99
+
100
+ ## 7. クラウドインフラ構築(初回のみ)
101
+
102
+ ```shell
22
103
  godd notes infra
104
+ ```
105
+
23
106
  対話形式で AWS リージョンや環境名を入力すると、以下が生成されます:
24
107
 
25
- godd-notes/ ディレクトリ(notes-api/, notes-app/)
26
- Terraform ファイル(VPC, ECS, RDS, S3, CloudFront 等)
27
- CI/CD ワークフロー
28
- チームで1人が実行すれば OK です。
29
- 詳細は ./setup_infra.template.md を参照。
108
+ - `notes-api/` / `notes-app/` ディレクトリ
109
+ - Terraform ファイル(VPC, ECS, RDS, S3, CloudFront 等)
110
+ - CI/CD ワークフロー
111
+
112
+ チームで1人が実行すれば OK です。詳細は [setup_infra.template.md](./setup_infra.template.md) を参照。
113
+
114
+ ### Terraform 適用手順(概要)
115
+
116
+ ```bash
117
+ bash scripts/terraform-backend-setup.sh
118
+
119
+ cd terraform/godd-notes/{env}-iam
120
+ terraform init && terraform apply
121
+
122
+ cd ../{env}
123
+ terraform init && terraform apply
124
+ ```
125
+
126
+ ---
127
+
128
+ ## 8. Secrets Manager に値を設定
129
+
130
+ Terraform 適用後、`{env}` を環境名(例: `dev`)に置き換えて実行します。
131
+ **AI エージェント経由の `put-secret-value` がブロックされる場合は、自分のターミナルで直接実行してください。**
132
+
133
+ ### 8-1. jwt-secret
134
+
135
+ ```bash
136
+ aws secretsmanager put-secret-value \
137
+ --secret-id godd-notes/dev/jwt-secret \
138
+ --secret-string "$(openssl rand -base64 48)" \
139
+ --profile <PROFILE> \
140
+ --region ap-northeast-1
141
+ ```
142
+
143
+ ### 8-2. admin-credentials
144
+
145
+ ```bash
146
+ aws secretsmanager put-secret-value \
147
+ --secret-id godd-notes/dev/admin-credentials \
148
+ --secret-string '{"username":"admin","password":"'$(openssl rand -base64 24)'"}' \
149
+ --profile <PROFILE> \
150
+ --region ap-northeast-1
151
+ ```
152
+
153
+ 管理者パスワードの確認(初回ログイン用):
154
+
155
+ ```bash
156
+ aws secretsmanager get-secret-value \
157
+ --secret-id godd-notes/dev/admin-credentials \
158
+ --profile <PROFILE> \
159
+ --region ap-northeast-1 \
160
+ --query SecretString \
161
+ --output text
162
+ ```
163
+
164
+ ### 8-3. GitHub App 3変数(必須 — PAT 禁止)
165
+
166
+ ```bash
167
+ aws secretsmanager put-secret-value \
168
+ --secret-id godd-notes/dev/github-app-id \
169
+ --secret-string "<APP_ID>" \
170
+ --profile <PROFILE> \
171
+ --region ap-northeast-1
172
+
173
+ aws secretsmanager put-secret-value \
174
+ --secret-id godd-notes/dev/github-app-private-key \
175
+ --secret-string file://path/to/private-key.pem \
176
+ --profile <PROFILE> \
177
+ --region ap-northeast-1
30
178
 
31
- 6. デプロイ
179
+ aws secretsmanager put-secret-value \
180
+ --secret-id godd-notes/dev/github-app-installation-id \
181
+ --secret-string "<INSTALLATION_ID>" \
182
+ --profile <PROFILE> \
183
+ --region ap-northeast-1
184
+ ```
185
+
186
+ > ECS タスク定義は `GITHUB_TOKEN` を注入しません。既存環境の移行順序は [setup_infra.template.md](./setup_infra.template.md) の「PAT 廃止時の ECS 移行」を参照(先に deploy で TD から strip → stable → terraform apply → 手動で `github-token` 削除)。
187
+
188
+ ### 8-4. GitHub Secrets(CI/CD 用)
189
+
190
+ ```bash
191
+ cd terraform/godd-notes/{env}
192
+ gh secret set CLOUDFRONT_DISTRIBUTION_ID \
193
+ --body "$(terraform output -raw cloudfront_distribution_id)"
194
+ ```
195
+
196
+ ---
197
+
198
+ ## 9. デプロイ
199
+
200
+ ```shell
32
201
  godd notes deploy # 対話形式
33
202
  godd notes deploy -y # 確認スキップ(CI 向け)
34
- ローカルの godd-notes/notes-api と notes-app を AWS にデプロイします。 notes-api が GitHub の main ブランチから docs/ を読んで Notes に展開します。
203
+ ```
204
+
205
+ **前提:**
206
+
207
+ - `.godd-notes-infra.json` が存在し `provider` が `aws`
208
+ - Secrets Manager に必須シークレット(jwt-secret / admin-credentials / github-app-*)が投入済み
209
+ - **ローカルの Docker daemon(Docker Desktop 等)が起動している**(未起動だと即失敗)
210
+ - AWS CLI 認証済み(`AWS_PROFILE` 等)
211
+
212
+ `godd notes deploy` はローカルの `notes-api` / `notes-app` をビルドし、ECR / ECS / S3 / CloudFront へ反映します。notes-api が GitHub の main ブランチから `docs/` を読んで Notes に展開します。
213
+
214
+ 新しい `@ripla/godd-mcp` バージョンが利用可能な場合、警告が表示されることがあります。
215
+
216
+ ### デプロイ後の確認
217
+
218
+ ```bash
219
+ godd notes status
220
+ ```
221
+
222
+ `github_write_author: bot` かつ installation token refresh が OK であることを確認してください。
223
+
224
+ Secrets を修正した場合は ECS を再デプロイ:
225
+
226
+ ```bash
227
+ aws ecs update-service --cluster godd-notes --service notes-api --force-new-deployment \
228
+ --profile <PROFILE> --region ap-northeast-1
229
+ ```
230
+
231
+ ---
232
+
233
+ ## 関連ドキュメント
35
234
 
36
- godd notes deploy 実行時に @ripla/godd-mcp の新しいバージョンが利用可能な場合、警告が表示されます。
235
+ - GoDD MCP セットアップ: [setup_godd.md](./setup_godd.md)
236
+ - インフラ詳細: [setup_infra.template.md](./setup_infra.template.md)
237
+ - Bot / GitHub App 手順: [bot-token-setup.md](./bot-token-setup.md)
238
+ - コマンドリファレンス: [godd-commands.md](./godd-commands.md)
@@ -0,0 +1,409 @@
1
+ {
2
+ "version": 1,
3
+ "format": "tiptap",
4
+ "doc": {
5
+ "type": "doc",
6
+ "content": [
7
+ {
8
+ "type": "heading",
9
+ "attrs": {
10
+ "textAlign": null,
11
+ "level": 1
12
+ },
13
+ "content": [
14
+ {
15
+ "type": "text",
16
+ "text": "GoDD Notesのはじめ方"
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "type": "heading",
22
+ "attrs": {
23
+ "textAlign": null,
24
+ "level": 2
25
+ },
26
+ "content": [
27
+ {
28
+ "type": "text",
29
+ "text": "1. GoDD をインストール"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "type": "codeBlock",
35
+ "attrs": {
36
+ "language": "shell"
37
+ },
38
+ "content": [
39
+ {
40
+ "type": "text",
41
+ "text": "npm install -g @ripla/godd-mcp"
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "type": "heading",
47
+ "attrs": {
48
+ "textAlign": null,
49
+ "level": 2
50
+ },
51
+ "content": [
52
+ {
53
+ "type": "text",
54
+ "text": "2. プロジェクトで godd init"
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "type": "codeBlock",
60
+ "attrs": {
61
+ "language": "shell"
62
+ },
63
+ "content": [
64
+ {
65
+ "type": "text",
66
+ "text": "cd /path/to/your-project \ngodd init "
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "type": "paragraph",
72
+ "attrs": {
73
+ "textAlign": null
74
+ },
75
+ "content": [
76
+ {
77
+ "type": "text",
78
+ "text": "プロジェクトごとに実行が必要です(2人目以降のメンバーも各自実行)。"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "type": "heading",
84
+ "attrs": {
85
+ "textAlign": null,
86
+ "level": 2
87
+ },
88
+ "content": [
89
+ {
90
+ "type": "text",
91
+ "text": "3. docs/ フォルダ構造をテンプレートから生成"
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ "type": "paragraph",
97
+ "attrs": {
98
+ "textAlign": null
99
+ },
100
+ "content": [
101
+ {
102
+ "type": "text",
103
+ "text": "Cursor"
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "type": "codeBlock",
109
+ "attrs": {
110
+ "language": "shell"
111
+ },
112
+ "content": [
113
+ {
114
+ "type": "text",
115
+ "text": "/godd_docs_init"
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ "type": "heading",
121
+ "attrs": {
122
+ "textAlign": null,
123
+ "level": 2
124
+ },
125
+ "content": [
126
+ {
127
+ "type": "text",
128
+ "text": "4. AWS 本番環境向けの事前セットアップ(本番 AWS デプロイ時のみ)"
129
+ }
130
+ ]
131
+ },
132
+ {
133
+ "type": "paragraph",
134
+ "attrs": {
135
+ "textAlign": null
136
+ },
137
+ "content": [
138
+ {
139
+ "type": "text",
140
+ "text": "以下のガイドの順に、アカウント構成・セキュリティ・コスト監視を整備する:"
141
+ }
142
+ ]
143
+ },
144
+ {
145
+ "type": "bulletList",
146
+ "content": [
147
+ {
148
+ "type": "listItem",
149
+ "content": [
150
+ {
151
+ "type": "paragraph",
152
+ "attrs": {
153
+ "textAlign": null
154
+ },
155
+ "content": [
156
+ {
157
+ "type": "text",
158
+ "marks": [
159
+ {
160
+ "type": "link",
161
+ "attrs": {
162
+ "href": "./setup_aws_accounts.md",
163
+ "target": "_blank",
164
+ "rel": "noopener noreferrer nofollow",
165
+ "class": null,
166
+ "title": null
167
+ }
168
+ }
169
+ ],
170
+ "text": "setup_aws_accounts.md"
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": " — Organizations とアカウント構成"
175
+ }
176
+ ]
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "type": "listItem",
182
+ "content": [
183
+ {
184
+ "type": "paragraph",
185
+ "attrs": {
186
+ "textAlign": null
187
+ },
188
+ "content": [
189
+ {
190
+ "type": "text",
191
+ "marks": [
192
+ {
193
+ "type": "link",
194
+ "attrs": {
195
+ "href": "./setup_aws_guard_duty.md",
196
+ "target": "_blank",
197
+ "rel": "noopener noreferrer nofollow",
198
+ "class": null,
199
+ "title": null
200
+ }
201
+ }
202
+ ],
203
+ "text": "setup_aws_guard_duty.md"
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": " — GuardDuty 設定"
208
+ }
209
+ ]
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ "type": "listItem",
215
+ "content": [
216
+ {
217
+ "type": "paragraph",
218
+ "attrs": {
219
+ "textAlign": null
220
+ },
221
+ "content": [
222
+ {
223
+ "type": "text",
224
+ "marks": [
225
+ {
226
+ "type": "link",
227
+ "attrs": {
228
+ "href": "./setup_aws_cost_alert.md",
229
+ "target": "_blank",
230
+ "rel": "noopener noreferrer nofollow",
231
+ "class": null,
232
+ "title": null
233
+ }
234
+ }
235
+ ],
236
+ "text": "setup_aws_cost_alert.md"
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": " — コスト監視(Budgets / Cost Anomaly Detection)"
241
+ }
242
+ ]
243
+ }
244
+ ]
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ "type": "heading",
250
+ "attrs": {
251
+ "textAlign": null,
252
+ "level": 2
253
+ },
254
+ "content": [
255
+ {
256
+ "type": "text",
257
+ "text": "5. GitHub App「GoDD Notes Bot」にリポジトリのアクセス権限を追加(初回のみ)"
258
+ }
259
+ ]
260
+ },
261
+ {
262
+ "type": "paragraph",
263
+ "attrs": {
264
+ "textAlign": null
265
+ },
266
+ "content": [
267
+ {
268
+ "type": "text",
269
+ "text": " GitHub → Organization の Settings → Third-party Access / GitHub Apps → GoDD Notes Bot / Configure → Repository access / Only select repositories で対象リポジトリを追加する。"
270
+ },
271
+ {
272
+ "type": "hardBreak"
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": " 未追加のままだと、次の infra / deploy で GitHub App の認証が使えず、無効なトークンにフォールバックしてログイン後に API Error になる。"
277
+ }
278
+ ]
279
+ },
280
+ {
281
+ "type": "heading",
282
+ "attrs": {
283
+ "textAlign": null,
284
+ "level": 2
285
+ },
286
+ "content": [
287
+ {
288
+ "type": "text",
289
+ "text": "6. クラウドインフラ構築(初回のみ)"
290
+ }
291
+ ]
292
+ },
293
+ {
294
+ "type": "codeBlock",
295
+ "attrs": {
296
+ "language": "shell"
297
+ },
298
+ "content": [
299
+ {
300
+ "type": "text",
301
+ "text": "godd notes infra "
302
+ }
303
+ ]
304
+ },
305
+ {
306
+ "type": "paragraph",
307
+ "attrs": {
308
+ "textAlign": null
309
+ },
310
+ "content": [
311
+ {
312
+ "type": "text",
313
+ "text": "対話形式で AWS リージョンや環境名を入力すると、以下が生成されます:"
314
+ }
315
+ ]
316
+ },
317
+ {
318
+ "type": "paragraph",
319
+ "attrs": {
320
+ "textAlign": null
321
+ },
322
+ "content": [
323
+ {
324
+ "type": "text",
325
+ "text": "godd-notes/ ディレクトリ(notes-api/, notes-app/)"
326
+ },
327
+ {
328
+ "type": "hardBreak"
329
+ },
330
+ {
331
+ "type": "text",
332
+ "text": "Terraform ファイル(VPC, ECS, RDS, S3, CloudFront 等)"
333
+ },
334
+ {
335
+ "type": "hardBreak"
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "CI/CD ワークフロー"
340
+ },
341
+ {
342
+ "type": "hardBreak"
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "チームで1人が実行すれば OK です。"
347
+ },
348
+ {
349
+ "type": "hardBreak"
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "詳細は ./setup_infra.template.md を参照。"
354
+ }
355
+ ]
356
+ },
357
+ {
358
+ "type": "heading",
359
+ "attrs": {
360
+ "textAlign": null,
361
+ "level": 2
362
+ },
363
+ "content": [
364
+ {
365
+ "type": "text",
366
+ "text": "7. デプロイ"
367
+ }
368
+ ]
369
+ },
370
+ {
371
+ "type": "codeBlock",
372
+ "attrs": {
373
+ "language": "shell"
374
+ },
375
+ "content": [
376
+ {
377
+ "type": "text",
378
+ "text": "godd notes deploy # 対話形式 \ngodd notes deploy -y # 確認スキップ(CI 向け) "
379
+ }
380
+ ]
381
+ },
382
+ {
383
+ "type": "paragraph",
384
+ "attrs": {
385
+ "textAlign": null
386
+ },
387
+ "content": [
388
+ {
389
+ "type": "text",
390
+ "text": "ローカルの godd-notes/notes-api と notes-app を AWS にデプロイします。 notes-api が GitHub の main ブランチから docs/ を読んで Notes に展開します。"
391
+ }
392
+ ]
393
+ },
394
+ {
395
+ "type": "paragraph",
396
+ "attrs": {
397
+ "textAlign": null
398
+ },
399
+ "content": [
400
+ {
401
+ "type": "text",
402
+ "text": "godd notes deploy 実行時に @ripla/godd-mcp の新しいバージョンが利用可能な場合、警告が表示されます。"
403
+ }
404
+ ]
405
+ }
406
+ ]
407
+ },
408
+ "markdownSnapshot": "# GoDD Notesのはじめ方\n\n## 1. GoDD をインストール\n\n```shell\nnpm install -g @ripla/godd-mcp\n```\n\n## 2. プロジェクトで godd init\n\n```shell\ncd /path/to/your-project \ngodd init \n```\n\nプロジェクトごとに実行が必要です(2人目以降のメンバーも各自実行)。\n\n## 3. docs/ フォルダ構造をテンプレートから生成\n\nCursor\n\n```shell\n/godd_docs_init\n```\n\n## 4. AWS 本番環境向けの事前セットアップ(本番 AWS デプロイ時のみ)\n\n以下のガイドの順に、アカウント構成・セキュリティ・コスト監視を整備する:\n\n- [setup_aws_accounts.md](./setup_aws_accounts.md) — Organizations とアカウント構成\n- [setup_aws_guard_duty.md](./setup_aws_guard_duty.md) — GuardDuty 設定\n- [setup_aws_cost_alert.md](./setup_aws_cost_alert.md) — コスト監視(Budgets / Cost Anomaly Detection)\n\n## 5. GitHub App「GoDD Notes Bot」にリポジトリのアクセス権限を追加(初回のみ)\n\n GitHub → Organization の Settings → Third-party Access / GitHub Apps → GoDD Notes Bot / Configure → Repository access / Only select repositories で対象リポジトリを追加する。 \n 未追加のままだと、次の infra / deploy で GitHub App の認証が使えず、無効なトークンにフォールバックしてログイン後に API Error になる。\n\n## 6. クラウドインフラ構築(初回のみ)\n\n```shell\ngodd notes infra \n```\n\n対話形式で AWS リージョンや環境名を入力すると、以下が生成されます:\n\ngodd-notes/ ディレクトリ(notes-api/, notes-app/) \nTerraform ファイル(VPC, ECS, RDS, S3, CloudFront 等) \nCI/CD ワークフロー \nチームで1人が実行すれば OK です。 \n詳細は ./setup_infra.template.md を参照。\n\n## 7. デプロイ\n\n```shell\ngodd notes deploy # 対話形式 \ngodd notes deploy -y # 確認スキップ(CI 向け) \n```\n\nローカルの godd-notes/notes-api と notes-app を AWS にデプロイします。 notes-api が GitHub の main ブランチから docs/ を読んで Notes に展開します。\n\ngodd notes deploy 実行時に @ripla/godd-mcp の新しいバージョンが利用可能な場合、警告が表示されます。"
409
+ }