Repository navigation
Open
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1047"
goal_ref: "Skill/SubAgent の description・本文・references のサイズと重複を監査し、context 肥大化と同一ルール重複を削減する"
change_kind: workflowParent Issue
Parent Goal Ref
- Goal: Skill/SubAgent context budget audit を追加し、過剰な description と重複手順を削減する
- Desired Destination: 全 Skill description 文字数・本文行数・references 行数が一覧化され、skillOverrides / disable-model-invocation 候補が machine-readable に出力される状態
Current Validated Scope
.claude/skills/agent-context-audit/SKILL.mdを新規追加する.claude/skills/agent-context-audit/scripts/audit_skill_context_budget.pyを新規追加する.claude/skills/agent-context-audit/scripts/audit_duplicate_agent_instructions.pyを新規追加する.claude/skills/agent-context-audit/references/context-budget-policy.mdを新規追加する.claude/skills/agent-context-audit/tests/test_audit_skill_context_budget.pyを新規追加する
Remaining Parent Gaps
- Issue 9 が残る
Outcome
audit_skill_context_budget.py が AGENT_CONTEXT_AUDIT_RESULT_V1 を出力し、80 行以内サマリを生成し、uv run pytest .claude/skills/agent-context-audit/tests/ が PASS している。
In Scope
.claude/skills/agent-context-audit/SKILL.md.claude/skills/agent-context-audit/scripts/audit_skill_context_budget.py(AGENT_CONTEXT_AUDIT_RESULT_V1 出力・80 行以内サマリ).claude/skills/agent-context-audit/scripts/audit_duplicate_agent_instructions.py(3 ファイル以上重複 phrase 検出).claude/skills/agent-context-audit/references/context-budget-policy.md.claude/skills/agent-context-audit/tests/test_audit_skill_context_budget.py
Out of Scope
- Skill description の実際の削減・書き換え(audit 結果を受けた follow-up)
.claude/settings.jsonの skillOverrides 実際の変更- agents/*.md の大規模改修
Acceptance Criteria
- AC1:
audit_skill_context_budget.pyがAGENT_CONTEXT_AUDIT_RESULT_V1を stdout に出力する - AC2: 全 Skill の description 文字数・本文行数・references 行数を一覧化する
- AC3: 同じ phrase が 3 ファイル以上に重複する場合に warn を出す
- AC4: skillOverrides 候補を machine-readable に出す
- AC5: disable-model-invocation 候補を検出する
- AC6: audit 結果を 80 行以内サマリとして出力できる
- AC7:
uv run pytest .claude/skills/agent-context-audit/tests/test_audit_skill_context_budget.py -qが PASS する
Verification Commands
# AC1
$ rg -q "AGENT_CONTEXT_AUDIT_RESULT_V1" .claude/skills/agent-context-audit/scripts/audit_skill_context_budget.py
# AC2
$ rg -q "description_chars" .claude/skills/agent-context-audit/scripts/audit_skill_context_budget.py
# AC3
$ rg -q "duplicate_instruction_clusters" .claude/skills/agent-context-audit/scripts/audit_duplicate_agent_instructions.py
# AC4
$ rg -q "skillOverrides" .claude/skills/agent-context-audit/scripts/audit_skill_context_budget.py
# AC5
$ rg -q "disable-model-invocation" .claude/skills/agent-context-audit/scripts/audit_skill_context_budget.py
# AC6
$ rg -q "summary" .claude/skills/agent-context-audit/scripts/audit_skill_context_budget.py
# AC7
$ uv run pytest .claude/skills/agent-context-audit/tests/test_audit_skill_context_budget.py -qAllowed Paths
.claude/skills/agent-context-audit/SKILL.md.claude/skills/agent-context-audit/scripts/audit_skill_context_budget.py.claude/skills/agent-context-audit/scripts/audit_duplicate_agent_instructions.py.claude/skills/agent-context-audit/references/context-budget-policy.md.claude/skills/agent-context-audit/tests/test_audit_skill_context_budget.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
- Python 3(pathlib / json / argparse)
Scope Delta(任意)
N/A
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity