From eld-plugin
実行時Law違反監視スキル。 本番環境でのLaw違反を検知し、分析結果を記録して継続的改善を促す。 使用タイミング: (1) 本番ログからLaw違反を分析する時、(2) 「Law違反を確認して」、 (3) 運用中のLaw健全性をチェックする時、(4) 違反パターンから新Lawを発見する時
How this skill is triggered — by the user, by Claude, or both
Slash command
/eld-plugin:eld-ground-law-monitorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
本番環境でのLaw違反を監視し、分析結果を記録する。
本番環境でのLaw違反を監視し、分析結果を記録する。
Telemetry/Log → 違反検知 → パターン分析 → 記録 → 改善提案
↓ ↓ ↓ ↓ ↓
law.*.violated 分類・集計 根本原因分析 lessons.md Law強化
law.<domain>.<law_name>.violated_total # 違反総数
law.<domain>.<law_name>.violation_rate # 違反率
law.<domain>.<law_name>.p95_latency_ms # 95パーセンタイル遅延
{
"event": "law.violation",
"law_id": "LAW-inv-balance",
"severity": "S1",
"context": {
"expected": 100,
"actual": -5,
"diff": 105
},
"timestamp": "2024-12-21T10:30:00Z"
}
# ログから違反イベントを抽出
grep "law.violation" /var/log/app/*.log | jq -s 'group_by(.law_id)'
| パターン | 説明 | 対応 |
|---|---|---|
| 単発 | 1回限りの違反 | 個別調査 |
| 周期的 | 定期的に発生 | 根本原因分析 |
| バースト | 短時間に集中 | 緊急対応 |
| 漸増 | 徐々に増加 | Law見直し |
violation_analysis:
law_id: LAW-inv-balance
pattern: 漸増
period: 2024-12-01 ~ 2024-12-21
count: 47
root_cause_candidates:
- hypothesis: "並行処理での競合条件"
confidence: high
evidence: "複数リクエスト同時処理時に集中"
- hypothesis: "バリデーション漏れ"
confidence: medium
evidence: "特定APIエンドポイントからのみ発生"
affected_contexts:
- endpoint: /api/orders
- user_segment: enterprise
- time_window: 10:00-12:00 JST
recommendations:
immediate:
- action: "STMによる在庫更新のトランザクション化"
priority: high
effort: medium
law_enhancement:
- action: "LAW-inv-balance に並行制御要件を追加"
new_statement: "在庫更新は原子的に行い、並行リクエスト間で整合性を保つ"
new_law_candidate:
- id: LAW-inv-concurrent-update
type: Invariant
statement: "同一商品への並行更新は順序付けて実行する"
# Law Health Report
## Period: 2024-12-15 ~ 2024-12-21
## Summary
| Severity | Total Laws | Violations | Health |
|----------|------------|------------|--------|
| S0 | 3 | 0 | 🟢 Healthy |
| S1 | 5 | 2 | 🟡 Degraded |
| S2 | 10 | 5 | 🟢 Healthy |
## S1 Violations (Attention Required)
### LAW-inv-balance
- **Violations**: 47
- **Trend**: 📈 Increasing
- **Pattern**: Burst (10:00-12:00 JST)
- **Root Cause**: Concurrency issue (high confidence)
**Recommended Actions**:
1. [Immediate] 在庫更新にトランザクション追加
2. [Law Enhancement] 並行制御要件を明文化
3. [New Law] LAW-inv-concurrent-update の追加検討
### LAW-pre-order-limit
- **Violations**: 12
- **Trend**: 📉 Decreasing
- **Pattern**: Single events
- **Root Cause**: Edge case in validation
**Recommended Actions**:
1. [Bug Fix] バリデーションのエッジケース修正
User: 今週のLaw違反を確認して
Claude:
## Law Health Check実行中...
### Telemetry/Log収集
- law.*.violated_total を集計中...
- 対象期間: 2024-12-15 ~ 2024-12-21
## Law Health Report
### Status: 🟡 Attention Required
| Law ID | Severity | Violations | Trend |
|--------|----------|------------|-------|
| LAW-inv-balance | S1 | 47 | 📈 +35% |
| LAW-pre-order | S1 | 12 | 📉 -20% |
### 詳細分析: LAW-inv-balance
**パターン**: バースト型(10:00-12:00に集中)
**根本原因候補**: 並行処理での競合条件(confidence: high)
**推奨アクション**:
1. 在庫更新処理にSTMを導入
2. Lawに並行制御要件を追加
→ 分析結果をtasks/lessons.mdに記録しました
→ 新Law候補を生成しますか?
unknownと言う勇気を持つ以下が発生したら即座に停止し、追加計測またはスコープ縮小:
npx claudepluginhub caphtech/claude-marketplace --plugin eld-pluginAudits AI agent and LLM codebases for regulatory compliance (EU AI Act, GDPR, NIST AI RMF, HIPAA, ISO 42001). Scans for gaps, cross-references Arize instrumentation, and produces a remediation checklist.
Performs a full launch review against your team's legal framework and risk calibration. Reads PRDs, checks each category, and outputs a review memo with blocking issues and next steps.
Classifies AI use cases against a registry as approved, conditional, or not approved, with conditions and next steps. Flags handoffs to privacy or product counsel.