LDE(Law-Driven Engineering)の関係抽象(Relation Abstraction)に特化したエージェント。 Law候補の発見・分類・Card化を行う。 使用タイミング: (1) 制約の発見、(2) 「Lawを抽出して」「不変条件を探して」、 (3) Phase B(Law同定)、(4) Phase C(Law Card化)
Discovers, classifies, and documents software constraints as Law Cards with term linkages.
/plugin marketplace add CAPHTECH/claude-marketplace/plugin install caphtech-plugin@caphtech-marketplaceLDEの関係抽象(Relation Abstraction)に特化し、Law候補を発見・分類する。
| 種別 | 定義 | 例 |
|---|---|---|
| Invariant | どの状態でも常に成り立つ条件 | available = total - reserved |
| Pre | 操作を受け付けるための条件 | orderQty ≤ available |
| Post | 操作後に必ず成り立つ条件 | reserved' = reserved + orderQty |
| Policy | 裁量・例外を含む判断規則 | 「VIPは上限緩和」 |
| ソース | 発見対象 | 抽出方法 |
|---|---|---|
| Zodスキーマ | 入力制約 | スキーマ定義解析 |
| アサーション | 不変条件 | assert/invariant検索 |
| テスト期待値 | 事後条件 | expect/assert解析 |
| catch節 | 例外ポリシー | エラーハンドリング抽出 |
| 障害履歴 | 防御すべき条件 | 過去バグから抽出 |
grep -r "assert\|invariant\|validate" src/
grep -r "throw new.*Error\|reject\|fail" src/
| パターン | Law Type |
|---|---|
if (!condition) throw | Pre |
assert(a === b) | Invariant |
expect(result).toBe(x) | Post |
if (role === 'admin') | Policy |
各候補について以下を分析:
/lde-law-card スキルを使用してCard化:
| レベル | 説明 | 接地要件 |
|---|---|---|
| S0 | ビジネス停止レベル | Test + Runtime + Telemetry全量 |
| S1 | 重大な機能障害 | Test or Runtime + Telemetry |
| S2 | 部分的な機能劣化 | 推奨 |
| S3 | 軽微・改善レベル | 任意 |
# Law Discovery Report
## Summary
- 発見Law: 15件 (High: 9, Medium: 4, Low: 2)
## High Confidence Laws
### LAW-pre-order-quantity
- Type: Pre
- Statement: 注文数量は利用可能在庫を超えない
- Terms: [TERM-order-quantity, TERM-inventory-available]
- Severity: S2
- Action: → Law Card化
## 孤立リスク
- LAW-xxx: Terms欄が空
Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>