Skip to content

Commit 6e5d321

Browse files
aster-voidclaude
andauthored
Merge docs: README + CLAUDE.md, add AGENTS.md symlink (#9)
* Merge README and CLAUDE.md into single README, symlink CLAUDE.md and AGENTS.md Both CLAUDE.md and AGENTS.md now point to README.md so that humans, Claude Code, and Codex all read the same document. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Scope agent-specific rules with conditional phrasing 管理ルールセクションをエージェント向け条件付き表現に変更。 README を人間・エージェント両方が自然に読めるようにする。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Move agent rules to dedicated section at end of README Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c17fcc0 commit 6e5d321

3 files changed

Lines changed: 56 additions & 54 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md

CLAUDE.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md

README.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
# Discord Bots
1+
# Discord-bots
2+
3+
Discord (など) で定期実行などされるBotのmonorepo。
4+
5+
## Bot 一覧
6+
7+
- bots/auto-moderator: 運営タスクリマインド (毎日)
8+
- bots/gsc-report: Google の検索パフォーマンス通知 (毎週)
9+
- bots/asakatsu-bot: 朝活確認 (毎日)
10+
- bots/joji-bot: Youtube から RSS で最新動画取得 (毎日)
11+
12+
詳細は ./rollcron.yaml で。
213

314
## Bot を追加する
415

@@ -45,3 +56,45 @@ schedule の書き方:
4556
```
4657

4758
SOPS を使う場合は [docs/sops.md](docs/sops.md) を参照。
59+
60+
## 機密情報
61+
62+
### 配置・権限
63+
64+
sops を使う場合:
65+
66+
- SOPS ファイル: `bots/BOT/sops.env`
67+
- 暗号化ルール: `./.sops.yaml`
68+
69+
ローカル,デプロイ読み取りチェーン: `run.sh` -> `sops exec-env` -> `bots/BOT/sops.env` + (`.age-key` | `~/.config/sops/age/keys.txt`)
70+
71+
sops を使わない場合:
72+
73+
- ローカル読み取りチェーン: `run.sh` -> `bots/BOT/.env`
74+
- デプロイ読み取りチェーン: `rollcron.yaml` -> `~/run/discord-bots/BOT/env` (サーバーに `bots/BOT/.env` は存在しないので二重読みはない)
75+
76+
詳細は [docs/sops.md](docs/sops.md) を参照。
77+
78+
## ファイル・インフラ配置 (.git 外)
79+
80+
### ローカルファイル配置
81+
82+
- `.age-key` - ローカル復号用
83+
84+
### coolify.utcode.net
85+
86+
- `/home/deploy/.config/sops/age/keys.txt` - デプロイ時復号用
87+
88+
## コマンド
89+
90+
```bash
91+
eval "$(direnv export bash)" && COMMAND
92+
sops exec-env path/to/sops.env 'echo success!' # sops 鍵検証
93+
ssh USER@coolify.utcode.net "sudo -u deploy bash -c 'COMMAND'" # デプロイ先で操作
94+
```
95+
96+
## AIエージェント向けルール
97+
98+
このセクションはAIコーディングエージェント (Claude Code, Codex 等) 向け。
99+
100+
- `.env``.age-key``sops -d` の出力、サーバ上の機密ファイルをコンテキストに入れないこと。確認が必要な場合は `cat .env | cut -d= -f1`、ハッシュ、`wc`、コマンド直接実行など値が露出しない方法を使う。

0 commit comments

Comments
 (0)