Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .claude/skills/new-issue/reference/issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ status: draft
type: cleanup | fix | feat
対象: {変更・新規作成するファイルをすべて列挙。新規は (新規) を付記}
内容: {目的と概要のみ}
対象外: {今回やらないこと。無ければ `なし`}
仮定: {相談者が user に確かめずに置いた前提。無ければ `なし`}
確認: {ClaudeCodeが提出前に行う静的確認。存在しないなら省略より `目視確認` と明示する}

---

### 保証
- 新たに宣言する保証: {この変更後に成り立つべき振る舞いを自然言語の箇条書きで}
- 維持する保証: {この変更で壊してはいけない既存の振る舞いを自然言語の箇条書きで}
- 廃止する保証: {この変更で約束から外す既存の振る舞い。無ければ行ごと省く}

{仕様の詳細}

Expand All @@ -22,10 +25,12 @@ type: cleanup | fix | feat
- `id` : 2桁の連番。派生Issueは `08a`, `08b` 形式(元Issueをcloseして新規作成)
- `対象` : 変更・新規作成するファイルをすべて列挙する。新規は (新規) を付記
- `内容` : 目的と概要のみ。実装仕様は下のセクションに書く
- `対象外` : 目的に近いが今回はやらないことを挙げる。実行者は気づいた改善があってもここへ手を広げない。無ければ `なし` と明示する(省略すると、考えて無いのか書き忘れたのか区別できない)
- `仮定` : 要件の曖昧さのうち、user に質問せず相談者が判断で埋めたものを挙げる。質問しなかった判断はここ以外に残らない。無ければ `なし` と明示する
- `確認` : ClaudeCodeが提出前に行う静的確認。このリポの CLAUDE.md の検証手段を参照して埋める。例: lib変更時は影響callerをすべて列挙・修正済みであること。存在しないなら省略より `目視確認` と明示する
### ライフサイクル
- `status: draft` → 設計中
- `status: open` → issue() で選択可能。**open は user が保証節を裁可済みであることを含む**
- `status: open` → issue() で選択可能。**open は user が保証節・`対象外`・`仮定` を裁可済みであることを含む**
- `status: close` → 完了済み(issue-finish で更新)
検証で問題が出た場合はそのIssueをcloseし、`{id}a` として新しいIssueを作成する。
元のIssueを再openしたりClaudeCodeのセッションに直接プロンプトを送ったりしない。
Expand All @@ -34,6 +39,7 @@ type: cleanup | fix | feat
- user は draft→open の裁可で保証節を必ず読み、削る・足す・直す(保証節は user 承認済みであることが open の意味に含まれる)
- テストを伴わない変更(ドキュメントのみ・cleanup 等)は `保証: なし(理由)` と明示する。無記載は不可
- リポに保証台帳 `docs/guarantees.md` がある場合、「維持する保証」は台帳から引く。台帳の記載に変更が出る場合(新保証・変更・廃止)は台帳を対象ファイルに含める
- 「廃止する保証」に挙げたものは、台帳があれば台帳からも外し、対応するテストの扱い(削除・書き換え)を詳細セクションに書く
### 粒度
- ClaudeCodeが1セッションで完走できる量にする
- 対象ファイルの目安は7本以下
Expand Down
8 changes: 4 additions & 4 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ The parts that carry over to team repositories are packaged separately in [sdlc-

---

## Verification over Generation
## Why

Now that AI writes the code, the time goes not into writing but into confirming that what was written can be trusted. Agents are confidently and quietly wrong, and left alone they carry destructive operations and secret leaks straight into production. A promise that people will be careful eventually becomes an empty formality.

So removing environment differences, blocking destructive commands, and isolating secrets are fixed in code and configuration, with a human merge as the final gate. Only "what must not break" is decided by a human and approved in writing; implementation and tests are left to the agents. When a promise is broken, a machine detects it and stops, so nobody has to sit and watch.

---

## Rules Live in the Environment
## Design

Rules are sorted by where they live. Rules that apply every time go in CLAUDE.md, procedures and criteria whose trigger can be stated as "when doing X" go in skills, and anything that must not be crossed goes in the `settings.json` deny list and hooks. All of it is then distributed through Nix, so the same rules apply in any repository on any machine.

Expand Down Expand Up @@ -95,15 +95,15 @@ If the mapping existed on only one machine, writing on any other machine would m

---

## What Ships to sdlc-kit
## sdlc-kit

Of the practices running here, the ones that carry over to team repositories are packaged in [sdlc-kit](https://github.com/yktsnet/sdlc-kit). Only practices that meet at least one of three conditions go in: they keep a human decision from being skipped, they have to survive across sessions, or they have to come out the same when the person changes. That covers the task flows, PLAN.md / JUDGE.md for the launch phase, the guarantee ledger after release, and the guards that protect main. The idea of running development on two driving documents is in sdlc-kit's [docs/lifecycle.md](https://github.com/yktsnet/sdlc-kit/blob/main/docs/lifecycle.md).

Unifying tools through Nix, distributing `~/.claude`, decrypting the mapping, and persistent memory are tied to the machine, so a team repository cannot enforce them. They stay in this repository.

---

## What Is Not Here
## Scope

Only the layers involved in developing with agents (Claude Code, memory, secrets, review, and tmux session management) are extracted from the working dotfiles. Editor and desktop settings and server configurations are not included. This is an extract, not a mirror, so some things in the working environment are absent here. The criteria for what gets published are in [.claude/skills/README.md](.claude/skills/README.md).

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

---

## Verification over Generation
## Why

AI がコードを書くようになって、時間がかかるのは書くことではなく、書かれたものを信じられるか確かめることに変わった。エージェントは自信を持ったまま静かに間違え、放っておけば破壊的な操作や機密の漏洩をそのまま本番へ通す。人が気をつけるという約束は、いずれ形骸化する。

そのため、環境差の排除・破壊的なコマンドの遮断・機密の隔離はコードと設定で固定し、人間のマージを最後の関門に置いた。「何が壊れてはいけないか」だけは人間が決めて文書で承認し、実装とテストはエージェントに任せる。約束が破られれば機械が検知して止まるので、張り付いて見張らずに済む。

---

## Rules Live in the Environment
## Design

規則は置き場で分けている。毎回守らせる規則は CLAUDE.md、「〜するとき」と条件を言える手順と基準は skill、外れてはいけないものは `settings.json` の deny とフックに置く。そのうえで、どのリポジトリ、どの端末で開いても同じものが効くよう、全部を Nix で配る。

Expand Down Expand Up @@ -95,15 +95,15 @@ Issue・PR・コミットの地の文には、IP・ポート・実ホスト名

---

## What Ships to sdlc-kit
## sdlc-kit

ここで回している型のうち、チームのリポジトリへ持ち込めるものを [sdlc-kit](https://github.com/yktsnet/sdlc-kit) に切り出している。持ち込むのは、人の判断を省かせない、セッションを超えて残す、担当者が替わっても揃う、のどれかに当たるものだけで、作業フロー、立ち上げ期の PLAN.md / JUDGE.md、リリース後の保証台帳、main を守るガードがこれにあたる。開発を2つの駆動文書で回す考え方は sdlc-kit の [docs/lifecycle.md](https://github.com/yktsnet/sdlc-kit/blob/main/docs/lifecycle.md) にある。

Nix による道具の統一、`~/.claude` の配布、対応表の復号、永続メモリは端末に紐づくので、チームのリポジトリからは効かせられない。これらはこのリポジトリに残る。

---

## What Is Not Here
## Scope

稼働中の dotfiles から、エージェントとの開発に関わる層(Claude Code・メモリ・機密・レビュー・tmux のセッション管理)だけを抜き出している。エディタやデスクトップの設定、サーバー類の構成は含めていない。抜き出しであって写しではないので、稼働側にあってここに無いものがある。何を公開するかの基準は [.claude/skills/README.md](.claude/skills/README.md) に置いた。

Expand All @@ -118,6 +118,6 @@ clone して各自の端末へ適用することは想定しておらず、動
| `flake.nix`・`devices/` | 開発機の NixOS / nix-darwin 構成。共通部分は `devices/common/` | 全端末で道具を揃える |
| `home-manager/modules/` | Claude Code の配布・メモリ・機密・tmux・crit。`zsh/` に Issue 駆動の関数 | 規則を1か所から全セッションへ配る・決める役と作る役を分ける |
| `.claude/settings.json`・`.claude/hooks/` | deny とフック | 禁止は頼まず仕組みに置く |
| `.claude/skills/` | 手順と基準。一覧は [.claude/skills/README.md](.claude/skills/README.md) | Rules Live in the Environment 全体 |
| `.claude/skills/` | 手順と基準。一覧は [.claude/skills/README.md](.claude/skills/README.md) | Design 全体 |
| `secrets-agents/` | 対応表の復号先(`example.md` はサンプル) | 機密を地の文に出さない |
| `issues/` | このリポジトリ自身の Issue と PR の控え | 決める役と作る役を分ける |
2 changes: 1 addition & 1 deletion context/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dotfiles-public/
- **ユーザ環境層**: `home-manager/`。エージェント関連(Claude Code・メモリ・機密・tmux のセッション管理等)を宣言的に管理。
- **ワークフロー層**: `home-manager/modules/zsh/functions/`。`issue` / `issue-abort` / `issue-finish` 等のマクロ。
- **ハーネス層**: `.claude/`。`settings.json` の deny(前方一致で足りるもの)と `hooks/` の PreToolUse(コマンド構造・編集先の判定が要るもの)で遮断を二段に分ける。`skills/` が正本で、`home-manager/modules/claude.nix` が `~/.claude/` へ配置する。
- **基準と道具**: 判断の基準と、それを実行するスクリプトは、使う skill が持つ(`sops-secrets/scripts/inject.py`、`guarantee-audit/reference/guarantees-index/` 等)。規則の置き場の分け方は README の Rules Live in the Environment 節。公開の基準は `.claude/skills/README.md`。
- **基準と道具**: 判断の基準と、それを実行するスクリプトは、使う skill が持つ(`sops-secrets/scripts/inject.py`、`guarantee-audit/reference/guarantees-index/` 等)。規則の置き場の分け方は README の Design 節。公開の基準は `.claude/skills/README.md`。
- **機密層**: `secrets/` が暗号文、`secrets-agents/` が各機で復号したマスク辞書。どちらも Agent からは読み書きしない。

## issues/
Expand Down
Loading