@unlaxer/dge-toolkit 1.4.1 → 1.5.1
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.
- package/CUSTOMIZING.md +123 -0
- package/INTERNALS.md +127 -0
- package/flows/design-review.yaml +81 -0
- package/install.sh +6 -0
- package/package.json +4 -1
- package/patterns.md +5 -1
- package/version.txt +1 -1
package/CUSTOMIZING.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# DGE toolkit カスタマイズガイド
|
|
2
|
+
|
|
3
|
+
## カスタマイズ戦略
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
A. そのまま使う(大多数)
|
|
7
|
+
→ npm install + YAML / ファイル追加で十分
|
|
8
|
+
|
|
9
|
+
B. 全面カスタマイズ(本気勢)
|
|
10
|
+
→ git fork + このガイドに従い変更
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
「A で足りなければ fork」。共存の仕組みは提供しない。fork したら `npx dge-update` は使わず `git fetch upstream` で差分管理。
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Level 1: 設定変更(fork 不要)
|
|
18
|
+
|
|
19
|
+
### フロー追加
|
|
20
|
+
`dge/flows/` に YAML ファイルを追加。構造は `flows/design-review.yaml` を参考に。
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
name: my-flow
|
|
24
|
+
display_name: "📖 My Flow"
|
|
25
|
+
extract:
|
|
26
|
+
type: custom
|
|
27
|
+
marker: "→ 発見:"
|
|
28
|
+
# ...
|
|
29
|
+
generate:
|
|
30
|
+
types:
|
|
31
|
+
- id: SCENE
|
|
32
|
+
display_name: "📖 シーン"
|
|
33
|
+
output_dir: dge/output/
|
|
34
|
+
post_actions:
|
|
35
|
+
- id: again
|
|
36
|
+
display_name: "もう一回"
|
|
37
|
+
- id: generate
|
|
38
|
+
display_name: "生成する"
|
|
39
|
+
- id: later
|
|
40
|
+
display_name: "後で"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### キャラ追加
|
|
44
|
+
「キャラを追加して」で対話式作成。または `dge/custom/characters/` に手動でファイル作成。
|
|
45
|
+
|
|
46
|
+
### テンプレート追加
|
|
47
|
+
`dge/templates/` にマークダウンファイルを追加。既存テンプレートを参考に。
|
|
48
|
+
|
|
49
|
+
### パターン
|
|
50
|
+
`dge/patterns.md` にカスタムプリセットを追加。
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Level 2: skill 書き換え(fork 推奨)
|
|
55
|
+
|
|
56
|
+
git fork してから `.claude/skills/` のファイルを編集。
|
|
57
|
+
|
|
58
|
+
### dge-session.md
|
|
59
|
+
|
|
60
|
+
| セクション | 行 | 変更内容 |
|
|
61
|
+
|-----------|-----|---------|
|
|
62
|
+
| MUST ルール | 19行〜 | 強制する行動を変更 |
|
|
63
|
+
| SHOULD ルール | 31行〜 | 推奨事項を変更 |
|
|
64
|
+
| 判断ルール | 44行〜 | auto-decide の条件を変更 |
|
|
65
|
+
| Step 3.5 | パターン選択 | プリセット一覧を変更 |
|
|
66
|
+
| Step 4 | キャラ推奨 | 推奨ロジックを変更 |
|
|
67
|
+
| Step 5 | 会話劇生成 | 先輩ナレーションを廃止・変更 |
|
|
68
|
+
| Step 6 | 抽出 | マーカーテキストを変更(flows/ YAML でも可) |
|
|
69
|
+
| Step 8 | 選択肢 | 選択肢の構成を変更(flows/ YAML でも可) |
|
|
70
|
+
| Step 10 | Spec 生成 | 成果物テンプレートを変更(flows/ YAML でも可) |
|
|
71
|
+
|
|
72
|
+
### dge-character-create.md
|
|
73
|
+
|
|
74
|
+
| セクション | 変更内容 |
|
|
75
|
+
|-----------|---------|
|
|
76
|
+
| wizard 質問 | 質問の内容・順序を変更 |
|
|
77
|
+
| axes 定義 | 新しい軸を追加(例: creativity, empathy) |
|
|
78
|
+
| 保存フォーマット | Backstory のセクション構成を変更 |
|
|
79
|
+
|
|
80
|
+
詳細は [INTERNALS.md](./INTERNALS.md) の Hook ポイント一覧を参照。
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Level 3: サーバー変更(fork 推奨)
|
|
85
|
+
|
|
86
|
+
| ファイル | 変更内容 |
|
|
87
|
+
|---------|---------|
|
|
88
|
+
| server/src/recommend.ts | 推奨アルゴリズム(keyword マップ、coverage ベクトル) |
|
|
89
|
+
| server/src/index.ts | API エンドポイントの追加・変更 |
|
|
90
|
+
| server/migrations/ | DB スキーマの変更 |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## fork のベストプラクティス
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# 1. fork
|
|
98
|
+
git clone https://github.com/YOUR/DGE-toolkit.git
|
|
99
|
+
cd DGE-toolkit
|
|
100
|
+
|
|
101
|
+
# 2. upstream を追加
|
|
102
|
+
git remote add upstream https://github.com/xxx/DGE-toolkit.git
|
|
103
|
+
|
|
104
|
+
# 3. 定期的に upstream を確認
|
|
105
|
+
git fetch upstream
|
|
106
|
+
git log upstream/main --oneline -10
|
|
107
|
+
|
|
108
|
+
# 4. 必要な変更だけ cherry-pick
|
|
109
|
+
git cherry-pick <commit-hash>
|
|
110
|
+
|
|
111
|
+
# 5. 自分のパッケージとして publish(任意)
|
|
112
|
+
cd kit
|
|
113
|
+
# package.json の name を変更: "@your-org/dge-toolkit-custom"
|
|
114
|
+
npm publish --access public
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 関連ドキュメント
|
|
120
|
+
|
|
121
|
+
- [INTERNALS.md](./INTERNALS.md) — フロー図・データフロー図・ステート図・Hook 一覧
|
|
122
|
+
- [flows/design-review.yaml](./flows/design-review.yaml) — デフォルトフロー定義
|
|
123
|
+
- [integration-guide.md](./integration-guide.md) — 既存 workflow との統合
|
package/INTERNALS.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# DGE Internals — 内部構造
|
|
2
|
+
|
|
3
|
+
DGE toolkit の内部構造。カスタマイズする際の参考に。
|
|
4
|
+
|
|
5
|
+
## フロー図
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
flowchart TD
|
|
9
|
+
Start([DGE して]) --> S1["[1/10] Kit 読み込み"]
|
|
10
|
+
S1 --> S2["[2/10] テーマ確認"]
|
|
11
|
+
S2 --> S3["[3/10] テンプレート選択"]
|
|
12
|
+
S3 --> S35["[3.5/10] パターン選択"]
|
|
13
|
+
S35 --> S4["[4/10] キャラ選択 ⏸"]
|
|
14
|
+
S4 --> S5["[5/10] 会話劇生成"]
|
|
15
|
+
S5 --> S6["[6/10] 抽出(flow.extract)"]
|
|
16
|
+
S6 --> S7["[7/10] ファイル保存 + プロジェクト更新"]
|
|
17
|
+
S7 --> S8["[8/10] サマリー + 選択肢 ⏸"]
|
|
18
|
+
|
|
19
|
+
S8 -->|"1. DGE を回す"| S9B["[9B] 前回コンテキスト + TreeView"]
|
|
20
|
+
S8 -->|"2. 自動反復"| S9A["[9A] 自動反復モード"]
|
|
21
|
+
S8 -->|"3. 実装する"| S10["[10/10] Spec 化(flow.generate)"]
|
|
22
|
+
S8 -->|"4. 後で"| End([終了])
|
|
23
|
+
|
|
24
|
+
S9B -->|テーマ選択| S2
|
|
25
|
+
S9A -->|未収束| S5
|
|
26
|
+
S9A -->|収束| S10
|
|
27
|
+
|
|
28
|
+
S10 --> Review{"Spec レビュー ⏸"}
|
|
29
|
+
Review -->|"1. OK"| Impl([実装開始])
|
|
30
|
+
Review -->|"2. 修正"| S10
|
|
31
|
+
Review -->|"3. 後で"| End
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
⏸ = ユーザーの応答を待つポイント
|
|
35
|
+
|
|
36
|
+
## データフロー図
|
|
37
|
+
|
|
38
|
+
```mermaid
|
|
39
|
+
flowchart LR
|
|
40
|
+
subgraph Input["読み込み(Step 1)"]
|
|
41
|
+
M[method.md]
|
|
42
|
+
C[characters/catalog.md]
|
|
43
|
+
CC[custom/characters/*.md]
|
|
44
|
+
P[patterns.md]
|
|
45
|
+
F[flows/*.yaml]
|
|
46
|
+
PJ[projects/*.md]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
subgraph Engine["DGE エンジン"]
|
|
50
|
+
S5["Step 5: 会話劇生成"]
|
|
51
|
+
S6["Step 6: 抽出\n(flow.extract.marker)"]
|
|
52
|
+
S10["Step 10: Spec 生成\n(flow.generate.types)"]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
subgraph Output["出力"]
|
|
56
|
+
SE[sessions/*.md]
|
|
57
|
+
SP[specs/*.md]
|
|
58
|
+
PR[projects/*.md 更新]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
M & C & CC & P & F --> S5
|
|
62
|
+
PJ --> S5
|
|
63
|
+
S5 --> S6
|
|
64
|
+
S6 --> SE
|
|
65
|
+
S6 --> S10
|
|
66
|
+
S10 --> SP
|
|
67
|
+
SE & SP --> PR
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## ステート図
|
|
71
|
+
|
|
72
|
+
```mermaid
|
|
73
|
+
stateDiagram-v2
|
|
74
|
+
state "プロジェクト" as Project {
|
|
75
|
+
[*] --> not_started
|
|
76
|
+
not_started --> explored: DGE session 実行
|
|
77
|
+
explored --> spec_ready: Spec 生成
|
|
78
|
+
spec_ready --> implemented: 実装完了
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
state "Spec" as Spec {
|
|
82
|
+
[*] --> draft: 自動生成
|
|
83
|
+
draft --> reviewed: レビュー OK
|
|
84
|
+
reviewed --> migrated: 正本に転記
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
state "自動反復" as AutoIter {
|
|
88
|
+
[*] --> iterating: 開始
|
|
89
|
+
iterating --> iterating: 新規 C/H Gap あり
|
|
90
|
+
iterating --> converged: 新規 C/H Gap = 0
|
|
91
|
+
iterating --> stopped: 上限到達(5 回)
|
|
92
|
+
stopped --> iterating: "+3 回追加"
|
|
93
|
+
converged --> [*]: Spec 化へ
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Hook ポイント一覧
|
|
98
|
+
|
|
99
|
+
各 Step でカスタマイズ可能なポイント。Level 1 は YAML / ファイル追加で変更可能。Level 2 は skill 編集(fork 推奨)。
|
|
100
|
+
|
|
101
|
+
| Step | 名前 | Hook | Level |
|
|
102
|
+
|------|------|------|-------|
|
|
103
|
+
| 1 | Kit 読み込み | 読み込むファイル一覧 | 2 |
|
|
104
|
+
| 2 | テーマ確認 | テーマの掘り下げロジック | 2 |
|
|
105
|
+
| 3 | テンプレート選択 | テンプレートの追加 | 1(templates/ にファイル追加) |
|
|
106
|
+
| 3.5 | パターン選択 | プリセットの追加・推奨マッピング | 1(patterns.md 編集) |
|
|
107
|
+
| 4 | キャラ選択 | キャラの追加・推奨ロジック | 1(custom/characters/)/ 2(推奨ロジック) |
|
|
108
|
+
| 5 | 会話劇生成 | ナレーション構造・Scene 構成 | 2 |
|
|
109
|
+
| 6 | 抽出 | マーカー・フォーマット・カテゴリ | 1(flows/ YAML の extract) |
|
|
110
|
+
| 7 | 保存 | 保存先・ファイル名規則 | 1(flows/ YAML の output_dir)/ 2 |
|
|
111
|
+
| 8 | 選択肢 | 選択肢の構成 | 1(flows/ YAML の post_actions) |
|
|
112
|
+
| 9A | 自動反復 | 収束判定・上限・ローテーション | 2 |
|
|
113
|
+
| 9B | コンテキスト維持 | TreeView・テーマ選択 | 2 |
|
|
114
|
+
| 10 | Spec 生成 | 成果物タイプ・テンプレート | 1(flows/ YAML の generate) |
|
|
115
|
+
|
|
116
|
+
## ファイルマップ
|
|
117
|
+
|
|
118
|
+
| ファイル | 役割 | 誰が読む | 誰が書く |
|
|
119
|
+
|---------|------|---------|---------|
|
|
120
|
+
| method.md | メソッド本体 | Step 1 | 手動(toolkit 提供) |
|
|
121
|
+
| characters/catalog.md | built-in キャラ | Step 1, 4 | 手動(toolkit 提供) |
|
|
122
|
+
| custom/characters/*.md | カスタムキャラ | Step 1, 4 | dge-character-create skill |
|
|
123
|
+
| patterns.md | 20 パターン + 5 プリセット | Step 1, 3.5 | 手動(toolkit 提供) |
|
|
124
|
+
| flows/*.yaml | フロー定義 | Step 1, 6, 8, 10 | 手動 or フロー wizard(v2) |
|
|
125
|
+
| sessions/*.md | DGE session 出力 | Step 9B, 10 | Step 7(自動) |
|
|
126
|
+
| specs/*.md | Spec ファイル | 実装時 | Step 10(自動) |
|
|
127
|
+
| projects/*.md | プロジェクト管理 | Step 9B | Step 7(自動更新) |
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: design-review
|
|
2
|
+
display_name: "🔍 設計レビュー — 仕様の穴を見つけて Spec に変換"
|
|
3
|
+
|
|
4
|
+
extract:
|
|
5
|
+
type: gap
|
|
6
|
+
marker: "→ Gap 発見:"
|
|
7
|
+
format: "Observe / Suggest / Act"
|
|
8
|
+
severity:
|
|
9
|
+
- id: Critical
|
|
10
|
+
display_name: "🔴 Critical — 実装不能 / データ損失リスク"
|
|
11
|
+
- id: High
|
|
12
|
+
display_name: "🟠 High — 主要ユースケース / セキュリティに影響"
|
|
13
|
+
- id: Medium
|
|
14
|
+
display_name: "🟡 Medium — 品質・UX に影響、回避策あり"
|
|
15
|
+
- id: Low
|
|
16
|
+
display_name: "🟢 Low — 改善レベル / nice-to-have"
|
|
17
|
+
categories:
|
|
18
|
+
- id: missing_logic
|
|
19
|
+
display_name: "実装が足りない"
|
|
20
|
+
- id: spec_impl_mismatch
|
|
21
|
+
display_name: "仕様と実装のズレ"
|
|
22
|
+
- id: type_coercion_gap
|
|
23
|
+
display_name: "型変換の考慮漏れ"
|
|
24
|
+
- id: error_quality
|
|
25
|
+
display_name: "エラーメッセージが不親切"
|
|
26
|
+
- id: integration_gap
|
|
27
|
+
display_name: "連携部分の不整合"
|
|
28
|
+
- id: test_coverage
|
|
29
|
+
display_name: "テストの欠落"
|
|
30
|
+
- id: business_gap
|
|
31
|
+
display_name: "ビジネスモデルの穴"
|
|
32
|
+
- id: safety_gap
|
|
33
|
+
display_name: "安全性の欠陥"
|
|
34
|
+
- id: ops_gap
|
|
35
|
+
display_name: "運用の欠如"
|
|
36
|
+
- id: message_gap
|
|
37
|
+
display_name: "伝え方の問題"
|
|
38
|
+
- id: legal_gap
|
|
39
|
+
display_name: "法的リスク"
|
|
40
|
+
|
|
41
|
+
generate:
|
|
42
|
+
types:
|
|
43
|
+
- id: UC
|
|
44
|
+
display_name: "📋 Use Case — ユーザーシナリオの手順書"
|
|
45
|
+
template: "Trigger / Actors / Flow / Exceptions / Acceptance Criteria"
|
|
46
|
+
- id: TECH
|
|
47
|
+
display_name: "🔧 Tech Spec — API・データベースの変更仕様"
|
|
48
|
+
template: "変更内容 / API / Data Model / 影響範囲"
|
|
49
|
+
- id: ADR
|
|
50
|
+
display_name: "📝 判断記録 — なぜこの方法を選んだか"
|
|
51
|
+
template: "Context / Options / Decision / Consequences"
|
|
52
|
+
- id: DQ
|
|
53
|
+
display_name: "❓ 未決事項 — まだ答えが出ていない問い"
|
|
54
|
+
template: "Context / Options / 決定期限"
|
|
55
|
+
- id: ACT
|
|
56
|
+
display_name: "✅ やること — 具体的な作業指示"
|
|
57
|
+
template: "内容 / 担当"
|
|
58
|
+
output_dir: dge/specs/
|
|
59
|
+
|
|
60
|
+
post_actions:
|
|
61
|
+
- id: dge_again
|
|
62
|
+
display_name: "DGE を回す"
|
|
63
|
+
- id: auto_iterate
|
|
64
|
+
display_name: "実装できるまで回す"
|
|
65
|
+
- id: implement
|
|
66
|
+
display_name: "実装する → Spec 化"
|
|
67
|
+
- id: later
|
|
68
|
+
display_name: "後で"
|
|
69
|
+
|
|
70
|
+
category_to_artifact:
|
|
71
|
+
missing_logic: [UC, TECH]
|
|
72
|
+
spec_impl_mismatch: [DQ, ADR]
|
|
73
|
+
type_coercion_gap: [TECH]
|
|
74
|
+
error_quality: [TECH]
|
|
75
|
+
integration_gap: [TECH]
|
|
76
|
+
test_coverage: [ACT]
|
|
77
|
+
business_gap: [ADR, DQ]
|
|
78
|
+
safety_gap: [TECH, ACT]
|
|
79
|
+
ops_gap: [ACT]
|
|
80
|
+
message_gap: [UC]
|
|
81
|
+
legal_gap: [ADR, ACT]
|
package/install.sh
CHANGED
|
@@ -35,6 +35,12 @@ else
|
|
|
35
35
|
cp "${SRC}/templates/"*.md "${DGE_DIR}/templates/"
|
|
36
36
|
[ -f "${SRC}/integration-guide.md" ] && cp "${SRC}/integration-guide.md" "${DGE_DIR}/"
|
|
37
37
|
[ -f "${SRC}/patterns.md" ] && cp "${SRC}/patterns.md" "${DGE_DIR}/"
|
|
38
|
+
[ -f "${SRC}/INTERNALS.md" ] && cp "${SRC}/INTERNALS.md" "${DGE_DIR}/"
|
|
39
|
+
[ -f "${SRC}/CUSTOMIZING.md" ] && cp "${SRC}/CUSTOMIZING.md" "${DGE_DIR}/"
|
|
40
|
+
if [ -d "${SRC}/flows" ]; then
|
|
41
|
+
mkdir -p "${DGE_DIR}/flows"
|
|
42
|
+
cp "${SRC}/flows/"*.yaml "${DGE_DIR}/flows/" 2>/dev/null || true
|
|
43
|
+
fi
|
|
38
44
|
# Version tracking for updates
|
|
39
45
|
SRC_VERSION="$(cat "${SRC}/version.txt" 2>/dev/null || echo "1.0.0")"
|
|
40
46
|
echo "${SRC_VERSION}" > "${DGE_DIR}/version.txt"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unlaxer/dge-toolkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "DGE (Dialogue-driven Gap Extraction) — 会話劇で設計の穴を発見するメソッドkit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
"skills/",
|
|
31
31
|
"integration-guide.md",
|
|
32
32
|
"patterns.md",
|
|
33
|
+
"flows/",
|
|
34
|
+
"INTERNALS.md",
|
|
35
|
+
"CUSTOMIZING.md",
|
|
33
36
|
"install.sh",
|
|
34
37
|
"update.sh"
|
|
35
38
|
],
|
package/patterns.md
CHANGED
|
@@ -53,6 +53,10 @@
|
|
|
53
53
|
| 🚀 `pre-release` | scale-break, security-adversary, concurrent-operation, disaster-recovery | リリース前チェック |
|
|
54
54
|
| 📢 `advocacy` | before-after, app-type-variation, role-contrast | 社内提案・導入説得 |
|
|
55
55
|
| 🔍 `comprehensive` | zero-state, role-contrast, escalation-chain, cross-persona-conflict, scale-break, security-adversary, migration-path | 網羅的 DGE |
|
|
56
|
+
| 🔥 `hotfix` | escalation-chain, disaster-recovery, drift-detection | 障害対応・振り返り |
|
|
57
|
+
| 🤝 `onboarding` | zero-state, expertise-contrast, return-after-absence | 新メンバー受け入れ |
|
|
58
|
+
| 💰 `monetization` | role-contrast, scale-break, cross-persona-conflict | 課金・ビジネスモデル検証 |
|
|
59
|
+
| 🧹 `tech-debt` | drift-detection, before-after, convergence-test | リファクタリング前の洗い出し |
|
|
56
60
|
|
|
57
61
|
## テンプレート → プリセット 自動推奨
|
|
58
62
|
|
|
@@ -61,7 +65,7 @@
|
|
|
61
65
|
| api-design | feature-extension |
|
|
62
66
|
| feature-planning | new-project |
|
|
63
67
|
| go-nogo | advocacy |
|
|
64
|
-
| incident-review |
|
|
68
|
+
| incident-review | hotfix |
|
|
65
69
|
| security-review | pre-release |
|
|
66
70
|
|
|
67
71
|
パターンを指定しなければ、テンプレートに応じたプリセットが自動的に使われます。
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.5.1
|