takt/builtins/ja/STYLE_GUIDE.md
nrslib 2c7bd4834f Faceted Prompting リネーム: stances→policies, report_formats→output_contracts
5つの関心を Persona, Policy, Instruction, Knowledge, Output Contract に統一。
ディレクトリ、YAMLキー、ソースコード、テンプレート、テスト、ドキュメントを全面更新。
2026-02-07 20:04:09 +09:00

68 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# スタイルガイド
プロンプトアーキテクチャの各レイヤーごとにスタイルガイドを用意している。
| レイヤー | ガイド | 配置先 |
|---------|--------|--------|
| ペルソナ | [PERSONA_STYLE_GUIDE.md](PERSONA_STYLE_GUIDE.md) | system prompt`{{agentDefinition}}` |
| ポリシー | [POLICY_STYLE_GUIDE.md](POLICY_STYLE_GUIDE.md) | user messageinstruction 内) |
| インストラクション | [INSTRUCTION_STYLE_GUIDE.md](INSTRUCTION_STYLE_GUIDE.md) | Phase 1 メッセージ(`{{instructions}}` |
| 出力契約 | [OUTPUT_CONTRACT_STYLE_GUIDE.md](OUTPUT_CONTRACT_STYLE_GUIDE.md) | `report.format` |
## テンプレート
`templates/` にテンプレートファイルを用意している。新規作成時はコピーまたは参照して使う。
```
templates/
├── personas/ # ペルソナテンプレート
│ ├── simple.md # ドメイン知識なし
│ ├── expert.md # ドメイン知識あり
│ └── character.md # キャラクター型
├── policies/ # ポリシーテンプレート
│ └── policy.md
├── instructions/ # インストラクションテンプレート
│ ├── plan.md
│ ├── architect.md
│ ├── implement.md
│ ├── review.md
│ ├── ai-review-standalone.md
│ ├── ai-fix.md
│ ├── fix.md
│ ├── arbitrate.md
│ └── supervise.md
└── reports/ # 出力契約テンプレート
├── plan.md
├── architecture-design.md
├── review.md
├── security-review.md
├── validation.md
└── summary.md
```
## 3層プロンプトアーキテクチャ
```
System Prompt:
[TAKT コンテキスト]
[ペルソナ] ← エージェントの identity・専門知識
User Message (Phase 1):
[実行コンテキスト]
[Piece Context]
[User Request]
[Previous Response]
[Instructions] ← ムーブメント固有の手順
└── [ポリシー] ← 共有行動規範instruction 内に含まれる)
```
## 分離の判断フロー
```
この内容は…
├── 特定のエージェントだけが必要 → ペルソナ
├── 複数のエージェントが共有 → ポリシー
├── ムーブメント固有の手順 → インストラクション
└── エージェント出力の構造定義 → 出力契約
```