Skip to content

feat(trust): Trust Ledger 完全運用化 — blocked_events自動更新 / START_PROMPT統合 / Labels - #283

Merged
Kensan196948G merged 1 commit into
mainfrom
feat/trust-ledger-completion
May 16, 2026
Merged

Kensan196948G merged 1 commit into
mainfrom
feat/trust-ledger-completion

Conversation

@Kensan196948G

@Kensan196948G Kensan196948G commented May 16, 2026 •

Copy link
Copy Markdown
Owner

📌 概要

Trust Ledger の完全運用化。blocked_events 自動更新・START_PROMPT 統合・GitHub Labels 作成の3点を実装。

🔧 変更内容

1. START_PROMPT.md — Trust Level 確認ステップ追加

  • セッション開始時に trust-score.json を Read して trust.level を確認(必須・スキップ禁止)
  • Level 1/2/3 の許可操作範囲を明示
  • Agent メッセージ確認(gh issue list --label agent-msg,status:open)を起動時必須に追加

2. blocked_events 自動更新 GitHub Actions

  • .github/workflows/blocked-events-update.yml 新規作成
  • Issue に blocked ラベルが付与されると自動トリガー
  • Python で blocked_events インクリメント + Trust Score 再計算 + commit
  • CLAUDE.md §23 に「Blocked 発生時は blocked ラベルを付与すること」を追記

3. GitHub Labels 11種類作成済み

  • agent-msg / agent:cto / agent:developer / agent:qa / agent:security / agent:devops
  • priority:urgent / status:open / status:in-progress / status:done / blocked

📊 Trust Score 完全動作フロー

CI 成功/失敗 → trust-score-update.yml → score/level 更新
Blocked 発生 → Issue に blocked ラベル → blocked-events-update.yml → penalty 反映
セッション開始 → START_PROMPT が trust-score.json を Read → Level 確認 → 許可範囲で行動

🔭 影響範囲

  • 全登録プロジェクト(Start-ClaudeCode.ps1 実行時に自動配布)
  • 後方互換: trust-score.json 未存在プロジェクトはワークフロー初回実行時に自動生成

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • ブロック発生時の GitHub Issues 運用ルール(ラベル付与)を追加
    • システム起動時の信頼レベル確認プロセスと、優先度メッセージの処理手順を明示

Review Change Stack

… + Labels

- START_PROMPT.md: trust-score.json 読み込み + Trust Level 確認を必須ステップ化
- START_PROMPT.md: Agent メッセージ確認(gh issue list)を起動時必須に追加
- .github/workflows/blocked-events-update.yml: blocked ラベル付与で自動インクリメント
- Claude/templates/claudeos/workflows/: 配布用テンプレートに追加
- CLAUDE.md §23: Blocked 発生時の blocked ラベル付与ルールを追記
- GitHub Labels: 11種類作成済み(agent-msg / priority:urgent / blocked 等)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 16, 2026 •

Copy link
Copy Markdown

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'ignore_dot_files'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

Trust Ledger フレームワークの運用ルール拡張として、Blocked イベント時の GitHub Issue ラベル付与ルールを定義し、エージェント起動時に Trust Level を確認して操作範囲を制限し、未処理メッセージの中から緊急度が高いものを最優先処理するセキュリティゲーティングプロセスを追加した。

Changes

Trust Ledger セキュリティ拡張

Layer / File(s) Summary
Blocked 発生時の GitHub Issue ラベル付与ルール
CLAUDE.md
Trust Ledger §23 の「CTO 行動ルール」に Blocked 発生時に GitHub Issue へ blocked ラベルを付与する運用ルールを追記した。
起動時の Trust Level 確認と優先度処理
Claude/templates/claude/START_PROMPT.md
エージェント起動直後に trust-score.json を読み取り、trust.level に応じた許可操作範囲(Level 1〜3)を確認し、未処理メッセージから priority:urgent を検出して現在の作業を中断・最優先処理する必須手順を追加した。

関連する可能性のあるプルリクエスト

  • Kensan196948G/ClaudeCode-StartUpTools-New#252: 本 PR の START_PROMPT.md への信頼レベル検証・緊急メッセージ処理追加と、取得 PR のプロンプト文書リフレッシュが同じテンプレート修正領域で直接関連している。

  • Kensan196948G/ClaudeCode-StartUpTools-New#282: 本 PR による CLAUDE.md §23 の Blocked→blocked ラベル付与ルール追加と START_PROMPT.md の信頼レベルゲーティング/緊急割り込み処理は、取得 PR で導入された Trust Ledger とエージェント通信運用フレームワークと直接関連している。

  • Kensan196948G/ClaudeCode-StartUpTools-New#273: 本 PR の CLAUDE.md における「Blocked」ハンドリングワークフロー(blocked GitHub ラベル適用)が、取得 PR の CLAUDE.md v9.0 における「Blocked」定義と停止条件ロジックの大規模見直しと直接重なっている。

見積もりレビュー工数

🎯 1 (Trivial) | ⏱️ ~5 分

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PRタイトルは Trust Ledger の完全運用化、blocked_events 自動更新、START_PROMPT 統合、Labels 作成という4つの主要な変更を正確に反映しており、変更セットの主要な内容を簡潔かつ明確に要約している。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/trust-ledger-completion

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Claude/templates/claude/START_PROMPT.md`:
- Around line 91-98: Update the section header "### ステップ 3: エージェントメッセージを確認する" to
include the robot icon as required by the coding guidelines by changing it to
"### 🤖 ステップ 3: エージェントメッセージを確認する" so the agent-messages section uses the 🤖
icon.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b8b8e0fe-b215-4e98-b245-487452c291fa

📥 Commits

Reviewing files that changed from the base of the PR and between bea0ecc and 09f1c0b.

⛔ Files ignored due to path filters (2)
  • .github/workflows/blocked-events-update.yml is excluded by none and included by none
  • Claude/templates/claudeos/workflows/blocked-events-update.yml is excluded by none and included by none
📒 Files selected for processing (2)
  • CLAUDE.md
  • Claude/templates/claude/START_PROMPT.md

Comment on lines +91 to +98
### ステップ 3: エージェントメッセージを確認する

```bash
gh issue list --label "agent-msg,status:open" --limit 10
```

`priority:urgent` のメッセージは現在の作業を中断して最優先で処理すること。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify agent communication labels and gh CLI filter syntax

echo "=== Checking required labels ==="
for label in "agent-msg" "status:open" "priority:urgent"; do
  echo "Checking label: $label"
  gh label list --search "$label" --limit 1 || echo "⚠️ Label '$label' not found or gh CLI needs auth"
done

echo ""
echo "=== Testing gh issue list filter syntax ==="
gh issue list --label "agent-msg,status:open" --limit 3 --state all 2>&1 || echo "⚠️ Filter test failed or no matching issues"

Repository: Kensan196948G/ClaudeCode-StartUpTools-New

Length of output: 346


📌 エージェントメッセージセクションのヘッダーにアイコンを追加してください。

GitHub CLI のラベルフィルタ構文は正しく、agent-msg、status:open、priority:urgent ラベルはすべて存在することが確認されています。ただし、コーディングガイドラインに従い、エージェント通信に関するセクションには 🤖 アイコンを使用する必要があります。

セクションヘッダーを以下のように変更してください:

### 🤖 ステップ 3: エージェントメッセージを確認する
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Claude/templates/claude/START_PROMPT.md` around lines 91 - 98, Update the
section header "### ステップ 3: エージェントメッセージを確認する" to include the robot icon as
required by the coding guidelines by changing it to "### 🤖 ステップ 3:
エージェントメッセージを確認する" so the agent-messages section uses the 🤖 icon.

@Kensan196948G
Kensan196948G merged commit 583642d into main May 16, 2026
4 checks passed
@Kensan196948G
Kensan196948G deleted the feat/trust-ledger-completion branch May 16, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant