claude-nagger 1.3.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. claude_nagger-1.3.9/.claude/settings.json +68 -0
  2. claude_nagger-1.3.9/.claude/statusline.js +125 -0
  3. claude_nagger-1.3.9/.claude-nagger/command_conventions.yaml +13 -0
  4. claude_nagger-1.3.9/.claude-nagger/config.yaml +36 -0
  5. claude_nagger-1.3.9/.claude-nagger/file_conventions.yaml +22 -0
  6. claude_nagger-1.3.9/.claude-nagger/vault/.gitignore +4 -0
  7. claude_nagger-1.3.9/.github/ISSUE_TEMPLATE/bug_report.yml +114 -0
  8. claude_nagger-1.3.9/.github/ISSUE_TEMPLATE/config.yml +5 -0
  9. claude_nagger-1.3.9/.github/ISSUE_TEMPLATE/feature_request.yml +44 -0
  10. claude_nagger-1.3.9/.gitignore +18 -0
  11. claude_nagger-1.3.9/.serena/.gitignore +1 -0
  12. claude_nagger-1.3.9/.serena/project.yml +84 -0
  13. claude_nagger-1.3.9/CLAUDE.md +47 -0
  14. claude_nagger-1.3.9/LICENSE +21 -0
  15. claude_nagger-1.3.9/PKG-INFO +390 -0
  16. claude_nagger-1.3.9/README.md +356 -0
  17. claude_nagger-1.3.9/_claude-nagger.code-workspace +21 -0
  18. claude_nagger-1.3.9/pyproject.toml +65 -0
  19. claude_nagger-1.3.9/rules/command_conventions.yaml +22 -0
  20. claude_nagger-1.3.9/rules/file_conventions.yaml +69 -0
  21. claude_nagger-1.3.9/rules/session_startup_settings.yaml +42 -0
  22. claude_nagger-1.3.9/scripts/capture_fixture.py +319 -0
  23. claude_nagger-1.3.9/scripts/install-dev.sh +17 -0
  24. claude_nagger-1.3.9/scripts/release.sh +72 -0
  25. claude_nagger-1.3.9/scripts/sanitizer.py +224 -0
  26. claude_nagger-1.3.9/scripts/setup_test_env.sh +260 -0
  27. claude_nagger-1.3.9/src/__init__.py +3 -0
  28. claude_nagger-1.3.9/src/application/__init__.py +6 -0
  29. claude_nagger-1.3.9/src/application/cli.py +177 -0
  30. claude_nagger-1.3.9/src/application/diagnose.py +411 -0
  31. claude_nagger-1.3.9/src/application/install_hooks.py +482 -0
  32. claude_nagger-1.3.9/src/application/match_test.py +85 -0
  33. claude_nagger-1.3.9/src/application/test_hook.py +149 -0
  34. claude_nagger-1.3.9/src/domain/__init__.py +1 -0
  35. claude_nagger-1.3.9/src/domain/entities/__init__.py +3 -0
  36. claude_nagger-1.3.9/src/domain/hooks/__init__.py +19 -0
  37. claude_nagger-1.3.9/src/domain/hooks/base_hook.py +872 -0
  38. claude_nagger-1.3.9/src/domain/hooks/hook_response.py +191 -0
  39. claude_nagger-1.3.9/src/domain/hooks/implementation_design_hook.py +499 -0
  40. claude_nagger-1.3.9/src/domain/hooks/session_startup_hook.py +297 -0
  41. claude_nagger-1.3.9/src/domain/services/__init__.py +13 -0
  42. claude_nagger-1.3.9/src/domain/services/base_convention_matcher.py +22 -0
  43. claude_nagger-1.3.9/src/domain/services/command_convention_matcher.py +218 -0
  44. claude_nagger-1.3.9/src/domain/services/file_convention_matcher.py +225 -0
  45. claude_nagger-1.3.9/src/domain/services/hook_manager.py +319 -0
  46. claude_nagger-1.3.9/src/infrastructure/__init__.py +1 -0
  47. claude_nagger-1.3.9/src/infrastructure/config/__init__.py +5 -0
  48. claude_nagger-1.3.9/src/infrastructure/config/config_manager.py +394 -0
  49. claude_nagger-1.3.9/src/infrastructure/hooks/__init__.py +5 -0
  50. claude_nagger-1.3.9/src/infrastructure/hooks/hook_executor.py +256 -0
  51. claude_nagger-1.3.9/src/infrastructure/notifiers/__init__.py +5 -0
  52. claude_nagger-1.3.9/src/infrastructure/notifiers/discord_notifier.py +214 -0
  53. claude_nagger-1.3.9/src/shared/__init__.py +9 -0
  54. claude_nagger-1.3.9/src/shared/base/__init__.py +5 -0
  55. claude_nagger-1.3.9/src/shared/base/base_cli.py +64 -0
  56. claude_nagger-1.3.9/src/shared/permission_mode.py +67 -0
  57. claude_nagger-1.3.9/src/shared/structured_logging.py +260 -0
  58. claude_nagger-1.3.9/src/shared/utils/__init__.py +5 -0
  59. claude_nagger-1.3.9/src/shared/utils/session_manager.py +217 -0
  60. claude_nagger-1.3.9/src/shared/version.py +3 -0
  61. claude_nagger-1.3.9/tests/conftest.py +18 -0
  62. claude_nagger-1.3.9/tests/fixtures/claude_code/README.md +30 -0
  63. claude_nagger-1.3.9/tests/fixtures/claude_code/permission_mode/pre_tool_use_accept_edits.json +12 -0
  64. claude_nagger-1.3.9/tests/fixtures/claude_code/permission_mode/pre_tool_use_bypass.json +11 -0
  65. claude_nagger-1.3.9/tests/fixtures/claude_code/permission_mode/pre_tool_use_default.json +13 -0
  66. claude_nagger-1.3.9/tests/fixtures/claude_code/permission_mode/pre_tool_use_dont_ask.json +11 -0
  67. claude_nagger-1.3.9/tests/fixtures/claude_code/permission_mode/pre_tool_use_plan.json +11 -0
  68. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104.json +13 -0
  69. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_1.json +13 -0
  70. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_10.json +13 -0
  71. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_11.json +13 -0
  72. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_12.json +13 -0
  73. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_13.json +13 -0
  74. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_2.json +13 -0
  75. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_3.json +13 -0
  76. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_4.json +13 -0
  77. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_5.json +13 -0
  78. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_6.json +13 -0
  79. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_7.json +13 -0
  80. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_8.json +13 -0
  81. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/bash/pre_tool_use_bash_20260104_9.json +13 -0
  82. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/edit/pre_tool_use_edit_20260104.json +9 -0
  83. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/edit/pre_tool_use_edit_20260104_1.json +9 -0
  84. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/edit/pre_tool_use_edit_20260104_2.json +6 -0
  85. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/edit/pre_tool_use_edit_20260104_3.json +6 -0
  86. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/edit/pre_tool_use_edit_20260104_4.json +9 -0
  87. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/edit/pre_tool_use_edit_20260104_5.json +6 -0
  88. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/edit/pre_tool_use_edit_20260104_6.json +6 -0
  89. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/mcp__redmine_epic_grid__add_issue_comment_tool/pre_tool_use_mcp__redmine_epic_grid__add_issue_comment_tool_20260104.json +13 -0
  90. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/mcp__redmine_epic_grid__create_user_story_tool/pre_tool_use_mcp__redmine_epic_grid__create_user_story_tool_20260104.json +14 -0
  91. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/mcp__redmine_epic_grid__get_issue_detail_tool/pre_tool_use_mcp__redmine_epic_grid__get_issue_detail_tool_20260104.json +12 -0
  92. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/mcp__redmine_epic_grid__get_issue_detail_tool/pre_tool_use_mcp__redmine_epic_grid__get_issue_detail_tool_20260104_1.json +12 -0
  93. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/mcp__redmine_epic_grid__get_project_structure_tool/pre_tool_use_mcp__redmine_epic_grid__get_project_structure_tool_20260104.json +13 -0
  94. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/mcp__redmine_epic_grid__update_issue_status_tool/pre_tool_use_mcp__redmine_epic_grid__update_issue_status_tool_20260104.json +13 -0
  95. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/read/pre_tool_use_read_20260104.json +13 -0
  96. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/read/pre_tool_use_read_20260104_1.json +12 -0
  97. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/write/pre_tool_use_write_20260104.json +13 -0
  98. claude_nagger-1.3.9/tests/fixtures/claude_code/pre_tool_use/write/pre_tool_use_write_20260104_1.json +13 -0
  99. claude_nagger-1.3.9/tests/test_base_cli.py +170 -0
  100. claude_nagger-1.3.9/tests/test_base_hook.py +1024 -0
  101. claude_nagger-1.3.9/tests/test_cli.py +224 -0
  102. claude_nagger-1.3.9/tests/test_command_convention_matcher.py +444 -0
  103. claude_nagger-1.3.9/tests/test_config_manager.py +1079 -0
  104. claude_nagger-1.3.9/tests/test_diagnose.py +209 -0
  105. claude_nagger-1.3.9/tests/test_discord_notifier.py +316 -0
  106. claude_nagger-1.3.9/tests/test_file_convention_matcher.py +301 -0
  107. claude_nagger-1.3.9/tests/test_hook_executor.py +465 -0
  108. claude_nagger-1.3.9/tests/test_hook_manager.py +428 -0
  109. claude_nagger-1.3.9/tests/test_hook_schema_validation.py +854 -0
  110. claude_nagger-1.3.9/tests/test_implementation_design_hook.py +667 -0
  111. claude_nagger-1.3.9/tests/test_install_hooks.py +906 -0
  112. claude_nagger-1.3.9/tests/test_match_test.py +136 -0
  113. claude_nagger-1.3.9/tests/test_permission_mode.py +194 -0
  114. claude_nagger-1.3.9/tests/test_sanitizer.py +146 -0
  115. claude_nagger-1.3.9/tests/test_session_manager.py +331 -0
  116. claude_nagger-1.3.9/tests/test_session_startup_hook.py +425 -0
  117. claude_nagger-1.3.9/tests/test_structured_logging.py +303 -0
  118. claude_nagger-1.3.9/tests/test_test_hook.py +174 -0
  119. claude_nagger-1.3.9/uv.lock +1158 -0
@@ -0,0 +1,68 @@
1
+ {
2
+ "statusLine": {
3
+ "type": "command",
4
+ "command": "node \"$CLAUDE_PROJECT_DIR\"/.claude/statusline.js"
5
+ },
6
+ "hooks": {
7
+ "PreToolUse": [
8
+ {
9
+ "matcher": "",
10
+ "hooks": [
11
+ {
12
+ "type": "command",
13
+ "command": "python3 -m domain.hooks.session_startup_hook"
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "matcher": "mcp__.*__write.*",
19
+ "hooks": [
20
+ {
21
+ "type": "command",
22
+ "command": "python3 -m domain.hooks.implementation_design_hook"
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "matcher": "mcp__.*replace.*",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "python3 -m domain.hooks.implementation_design_hook"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "matcher": "mcp__.*insert.*",
37
+ "hooks": [
38
+ {
39
+ "type": "command",
40
+ "command": "python3 -m domain.hooks.implementation_design_hook"
41
+ }
42
+ ]
43
+ }
44
+ ],
45
+ "Notification": [
46
+ {
47
+ "matcher": "",
48
+ "hooks": [
49
+ {
50
+ "type": "command",
51
+ "command": "python3 -m infrastructure.notifiers.discord_notifier \"📢 Claude Code から通知があります\""
52
+ }
53
+ ]
54
+ }
55
+ ],
56
+ "Stop": [
57
+ {
58
+ "matcher": "",
59
+ "hooks": [
60
+ {
61
+ "type": "command",
62
+ "command": "python3 -m infrastructure.notifiers.discord_notifier \"🛑 Claude Code セッションが停止されました\""
63
+ }
64
+ ]
65
+ }
66
+ ]
67
+ }
68
+ }
@@ -0,0 +1,125 @@
1
+ #!/usr/bin/env node
2
+
3
+ // I pull here "https://zenn.dev/pnd/articles/claude-code-statusline"
4
+ // this code written by ogino
5
+
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+ const readline = require('readline');
9
+
10
+ // Constants
11
+ const COMPACTION_THRESHOLD = 200000 * 0.8;
12
+
13
+ // Read JSON from stdin
14
+ let input = '';
15
+ process.stdin.on('data', (chunk) => (input += chunk));
16
+ process.stdin.on('end', async () => {
17
+ try {
18
+ const data = JSON.parse(input);
19
+
20
+ // Extract values
21
+ const model = data.model?.display_name || 'Unknown';
22
+ const currentDir = path.basename(data.workspace?.current_dir || data.cwd || '.');
23
+ const sessionId = data.session_id;
24
+
25
+ // Calculate token usage for current session
26
+ let totalTokens = 0;
27
+
28
+ if (sessionId) {
29
+ // Find all transcript files
30
+ const projectsDir = path.join(process.env.HOME, '.claude', 'projects');
31
+
32
+ if (fs.existsSync(projectsDir)) {
33
+ // Get all project directories
34
+ const projectDirs = fs
35
+ .readdirSync(projectsDir)
36
+ .map((dir) => path.join(projectsDir, dir))
37
+ .filter((dir) => fs.statSync(dir).isDirectory());
38
+
39
+ // Search for the current session's transcript file
40
+ for (const projectDir of projectDirs) {
41
+ const transcriptFile = path.join(projectDir, `${sessionId}.jsonl`);
42
+
43
+ if (fs.existsSync(transcriptFile)) {
44
+ totalTokens = await calculateTokensFromTranscript(transcriptFile);
45
+ break;
46
+ }
47
+ }
48
+ }
49
+ }
50
+
51
+ // Calculate percentage
52
+ const percentage = Math.min(100, Math.round((totalTokens / COMPACTION_THRESHOLD) * 100));
53
+
54
+ // Format token display
55
+ const tokenDisplay = formatTokenCount(totalTokens);
56
+
57
+ // Color coding for percentage
58
+ let percentageColor = '\x1b[32m'; // Green
59
+ if (percentage >= 70) percentageColor = '\x1b[33m'; // Yellow
60
+ if (percentage >= 90) percentageColor = '\x1b[31m'; // Red
61
+
62
+ // Format session ID display
63
+ const sessionDisplay = sessionId ? sessionId : 'unknown';
64
+
65
+ // Build status line
66
+ const statusLine = `[${model}] 📁 ${currentDir} | 🪙 ${tokenDisplay} | ${percentageColor}${percentage}%\x1b[0m | 🆔 ${sessionDisplay}`;
67
+
68
+ console.log(statusLine);
69
+ } catch (error) {
70
+ // Fallback status line on error
71
+ console.log('[Error] 📁 . | 🪙 0 | 0%');
72
+ }
73
+ });
74
+
75
+ async function calculateTokensFromTranscript(filePath) {
76
+ return new Promise((resolve, reject) => {
77
+ let lastUsage = null;
78
+
79
+ const fileStream = fs.createReadStream(filePath);
80
+ const rl = readline.createInterface({
81
+ input: fileStream,
82
+ crlfDelay: Infinity,
83
+ });
84
+
85
+ rl.on('line', (line) => {
86
+ try {
87
+ const entry = JSON.parse(line);
88
+
89
+ // Check if this is an assistant message with usage data
90
+ if (entry.type === 'assistant' && entry.message?.usage) {
91
+ lastUsage = entry.message.usage;
92
+ }
93
+ } catch (e) {
94
+ // Skip invalid JSON lines
95
+ }
96
+ });
97
+
98
+ rl.on('close', () => {
99
+ if (lastUsage) {
100
+ // The last usage entry contains cumulative tokens
101
+ const totalTokens =
102
+ (lastUsage.input_tokens || 0) +
103
+ (lastUsage.output_tokens || 0) +
104
+ (lastUsage.cache_creation_input_tokens || 0) +
105
+ (lastUsage.cache_read_input_tokens || 0);
106
+ resolve(totalTokens);
107
+ } else {
108
+ resolve(0);
109
+ }
110
+ });
111
+
112
+ rl.on('error', (err) => {
113
+ reject(err);
114
+ });
115
+ });
116
+ }
117
+
118
+ function formatTokenCount(tokens) {
119
+ if (tokens >= 1000000) {
120
+ return `${(tokens / 1000000).toFixed(1)}M`;
121
+ } else if (tokens >= 1000) {
122
+ return `${(tokens / 1000).toFixed(1)}K`;
123
+ }
124
+ return tokens.toString();
125
+ }
@@ -0,0 +1,13 @@
1
+ # コマンド実行規約定義
2
+ # 危険なコマンドや確認が必要なコマンドに対して適用される規約を定義します
3
+
4
+ rules:
5
+ # 例: Git操作規約
6
+ # - name: "Git操作規約"
7
+ # patterns:
8
+ # - "git*"
9
+ # severity: "block"
10
+ # token_threshold: 25000
11
+ # message: |
12
+ # Git操作を実行する場合は規約を確認してください
13
+ []
@@ -0,0 +1,36 @@
1
+ # claude-nagger 設定ファイル
2
+
3
+ # セッション開始時設定
4
+ session_startup:
5
+ enabled: true
6
+ messages:
7
+ first_time:
8
+ title: "プロジェクトセットアップ"
9
+ main_text: |
10
+ [ ] このプロジェクトはチケット駆動開発です
11
+ - MCPツールのルールに従いチケットに報告を行うこと
12
+ [ ] AIエージェントは選択肢がある場合は必ずオーナに選択肢を提示し、オーナーの指示を仰ぐこと。その際は各選択肢のpro/conを提示すること
13
+
14
+ severity: "block"
15
+
16
+ # 2回目以降(継続セッション)
17
+ repeated:
18
+ title: "セッション継続時の協働規約再確認"
19
+ main_text: |
20
+ 下記を1つ1つ丁寧に実行し、実行が完了したら続行してください:
21
+ tasks:
22
+ [ ] このプロジェクトはチケット駆動開発です
23
+ - MCPツールのルールに従いチケットに報告を行うこと
24
+ [ ] AIエージェントは選択肢がある場合は必ずオーナに選択肢を提示し、オーナーの指示を仰ぐこと。その際は各選択肢のpro/conを提示すること
25
+ severity: "block"
26
+
27
+ # コンテキスト管理設定
28
+ context_management:
29
+ reminder_thresholds:
30
+ light_warning: 30000
31
+ medium_warning: 60000
32
+ critical_warning: 100000
33
+
34
+ # デバッグ設定
35
+ debug:
36
+ enable_logging: false
@@ -0,0 +1,22 @@
1
+ # ファイル編集規約定義
2
+ # 特定のファイルパターンに対して適用される規約を定義します
3
+ #
4
+ # パターン記法:
5
+ # **/*.scss - 全階層の.scssファイル
6
+ # apps/**/*.tsx - ルート直下apps以下の全階層の.tsxファイル
7
+ # **/apps/**/*.scss - どこにあるapps/でも全階層の.scssファイル(モノレポ向け)
8
+ # src/*.ts - src直下の.tsファイルのみ(サブディレクトリ除外)
9
+ # **/test_*.py - 全階層のtest_で始まるpyファイル
10
+ # **/*_test.go - 全階層の_testで終わるgoファイル
11
+ # **/test/** - どこにあるtest/でもその中の全ファイル(直下・サブ両方)
12
+
13
+ rules:
14
+ # 例: View層編集規約
15
+ # - name: "View層編集規約"
16
+ # patterns:
17
+ # - "**/app/views/**/*.erb"
18
+ # severity: "block" # block: 完全ブロック, warn: 警告のみ
19
+ # token_threshold: 35000
20
+ # message: |
21
+ # このファイルを変更する場合は規約を確認してください
22
+ []
@@ -0,0 +1,4 @@
1
+ # vault/ディレクトリ内の全ファイルを除外
2
+ # 機密情報の漏洩防止
3
+ *
4
+ !.gitignore
@@ -0,0 +1,114 @@
1
+ name: Bug Report / 不具合報告
2
+ description: Report a bug or unexpected behavior / バグや予期しない動作を報告
3
+ title: "[Bug]: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ ## 報告前チェック
10
+ - [ ] 最新版を使用していますか? (`pip install --upgrade claude-nagger`)
11
+ - [ ] 既存のissueを検索しましたか?
12
+
13
+ - type: textarea
14
+ id: description
15
+ attributes:
16
+ label: 問題の説明 / Description
17
+ description: 何が起きているか簡潔に説明してください
18
+ placeholder: |
19
+ 例: フックが実行されず、規約メッセージが表示されない
20
+ validations:
21
+ required: true
22
+
23
+ - type: textarea
24
+ id: steps
25
+ attributes:
26
+ label: 再現手順 / Steps to Reproduce
27
+ description: 問題を再現する手順を記載してください
28
+ placeholder: |
29
+ 1. `claude-nagger install-hooks` を実行
30
+ 2. Claude Codeで `Edit` ツールを使用
31
+ 3. 規約メッセージが表示されない
32
+ validations:
33
+ required: true
34
+
35
+ - type: textarea
36
+ id: expected
37
+ attributes:
38
+ label: 期待する動作 / Expected Behavior
39
+ description: 本来どう動作すべきか
40
+ placeholder: |
41
+ 例: file_conventions.yaml で定義した規約メッセージが表示される
42
+ validations:
43
+ required: true
44
+
45
+ - type: textarea
46
+ id: actual
47
+ attributes:
48
+ label: 実際の動作 / Actual Behavior
49
+ description: 実際にどう動作したか
50
+ placeholder: |
51
+ 例: 何も表示されずツールが実行された
52
+ validations:
53
+ required: true
54
+
55
+ - type: textarea
56
+ id: environment
57
+ attributes:
58
+ label: 環境情報 / Environment
59
+ description: |
60
+ `claude-nagger diagnose` の出力を貼り付けてください。
61
+ コマンドがない場合は手動で記入してください。
62
+ placeholder: |
63
+ OS: macOS 14.2 / Ubuntu 22.04 / Windows 11
64
+ Python: 3.11.5
65
+ claude-nagger: 1.0.0
66
+ Claude Code: x.x.x
67
+ render: text
68
+ validations:
69
+ required: true
70
+
71
+ - type: textarea
72
+ id: config
73
+ attributes:
74
+ label: 設定ファイル / Configuration
75
+ description: |
76
+ 問題に関連する設定ファイルの内容(機密情報は除去してください)
77
+ placeholder: |
78
+ # .claude-nagger/config.yaml
79
+ session_startup:
80
+ enabled: true
81
+ ...
82
+ render: yaml
83
+
84
+ - type: textarea
85
+ id: logs
86
+ attributes:
87
+ label: ログ / Logs
88
+ description: |
89
+ `/tmp/claude/` 内のフック実行ログがあれば添付してください
90
+ render: text
91
+
92
+ - type: textarea
93
+ id: settings
94
+ attributes:
95
+ label: settings.json
96
+ description: |
97
+ `.claude/settings.json` の hooks 部分を貼り付けてください
98
+ placeholder: |
99
+ {
100
+ "hooks": {
101
+ "PreToolUse": [...]
102
+ }
103
+ }
104
+ render: json
105
+
106
+ - type: checkboxes
107
+ id: terms
108
+ attributes:
109
+ label: 確認事項
110
+ options:
111
+ - label: この問題は最新版でも発生します
112
+ required: false
113
+ - label: 診断スクリプトを実行しました(ある場合)
114
+ required: false
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Discussions
4
+ url: https://github.com/vibes/claude_nagger/discussions
5
+ about: 質問や議論はDiscussionsへ
@@ -0,0 +1,44 @@
1
+ name: Feature Request / 機能リクエスト
2
+ description: Suggest a new feature or enhancement / 新機能や改善を提案
3
+ title: "[Feature]: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ ## 機能リクエストについて
10
+ 新しい機能や改善提案をお待ちしています。
11
+
12
+ - type: textarea
13
+ id: problem
14
+ attributes:
15
+ label: 解決したい課題 / Problem Statement
16
+ description: どのような課題を解決したいですか?
17
+ placeholder: |
18
+ 例: 複数プロジェクトで同じ規約を共有したいが、毎回コピーする必要がある
19
+ validations:
20
+ required: true
21
+
22
+ - type: textarea
23
+ id: solution
24
+ attributes:
25
+ label: 提案する解決策 / Proposed Solution
26
+ description: どのような機能があれば解決できますか?
27
+ placeholder: |
28
+ 例: グローバル設定ファイル (~/.claude-nagger/global_rules.yaml) を読み込む機能
29
+ validations:
30
+ required: true
31
+
32
+ - type: textarea
33
+ id: alternatives
34
+ attributes:
35
+ label: 代替案 / Alternatives Considered
36
+ description: 他に検討した方法があれば記載してください
37
+ placeholder: |
38
+ 例: シンボリックリンクで共有することも考えたが、管理が煩雑
39
+
40
+ - type: textarea
41
+ id: context
42
+ attributes:
43
+ label: 追加情報 / Additional Context
44
+ description: 参考になる情報(スクリーンショット、関連issue等)
@@ -0,0 +1,18 @@
1
+ **.pyc
2
+ __pycache__/
3
+
4
+ # 機密情報を含む設定ファイル
5
+ secrets.json5
6
+ .env
7
+
8
+ # ログ
9
+ *.log
10
+ logs/
11
+ log/
12
+
13
+ # ビルド成果物
14
+ build/
15
+ dist/
16
+ *.egg-info/
17
+ .coverage
18
+ .claude/settings.local.json
@@ -0,0 +1 @@
1
+ /cache
@@ -0,0 +1,84 @@
1
+ # list of languages for which language servers are started; choose from:
2
+ # al bash clojure cpp csharp csharp_omnisharp
3
+ # dart elixir elm erlang fortran go
4
+ # haskell java julia kotlin lua markdown
5
+ # nix perl php python python_jedi r
6
+ # rego ruby ruby_solargraph rust scala swift
7
+ # terraform typescript typescript_vts yaml zig
8
+ # Note:
9
+ # - For C, use cpp
10
+ # - For JavaScript, use typescript
11
+ # Special requirements:
12
+ # - csharp: Requires the presence of a .sln file in the project folder.
13
+ # When using multiple languages, the first language server that supports a given file will be used for that file.
14
+ # The first language is the default language and the respective language server will be used as a fallback.
15
+ # Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
16
+ languages:
17
+ - python
18
+
19
+ # the encoding used by text files in the project
20
+ # For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
21
+ encoding: "utf-8"
22
+
23
+ # whether to use the project's gitignore file to ignore files
24
+ # Added on 2025-04-07
25
+ ignore_all_files_in_gitignore: true
26
+
27
+ # list of additional paths to ignore
28
+ # same syntax as gitignore, so you can use * and **
29
+ # Was previously called `ignored_dirs`, please update your config if you are using that.
30
+ # Added (renamed) on 2025-04-07
31
+ ignored_paths: []
32
+
33
+ # whether the project is in read-only mode
34
+ # If set to true, all editing tools will be disabled and attempts to use them will result in an error
35
+ # Added on 2025-04-18
36
+ read_only: false
37
+
38
+ # list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
39
+ # Below is the complete list of tools for convenience.
40
+ # To make sure you have the latest list of tools, and to view their descriptions,
41
+ # execute `uv run scripts/print_tool_overview.py`.
42
+ #
43
+ # * `activate_project`: Activates a project by name.
44
+ # * `check_onboarding_performed`: Checks whether project onboarding was already performed.
45
+ # * `create_text_file`: Creates/overwrites a file in the project directory.
46
+ # * `delete_lines`: Deletes a range of lines within a file.
47
+ # * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
48
+ # * `execute_shell_command`: Executes a shell command.
49
+ # * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
50
+ # * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
51
+ # * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
52
+ # * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
53
+ # * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
54
+ # * `initial_instructions`: Gets the initial instructions for the current project.
55
+ # Should only be used in settings where the system prompt cannot be set,
56
+ # e.g. in clients you have no control over, like Claude Desktop.
57
+ # * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
58
+ # * `insert_at_line`: Inserts content at a given line in a file.
59
+ # * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
60
+ # * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
61
+ # * `list_memories`: Lists memories in Serena's project-specific memory store.
62
+ # * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
63
+ # * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
64
+ # * `read_file`: Reads a file within the project directory.
65
+ # * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
66
+ # * `remove_project`: Removes a project from the Serena configuration.
67
+ # * `replace_lines`: Replaces a range of lines within a file with new content.
68
+ # * `replace_symbol_body`: Replaces the full definition of a symbol.
69
+ # * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
70
+ # * `search_for_pattern`: Performs a search for a pattern in the project.
71
+ # * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
72
+ # * `switch_modes`: Activates modes by providing a list of their names
73
+ # * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
74
+ # * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
75
+ # * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
76
+ # * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
77
+ excluded_tools: []
78
+
79
+ # initial prompt for the project. It will always be given to the LLM upon activating the project
80
+ # (contrary to the memories, which are loaded on demand).
81
+ initial_prompt: ""
82
+
83
+ project_name: "claude_nagger"
84
+ included_optional_tools: []
@@ -0,0 +1,47 @@
1
+ # CLAUDE.md
2
+
3
+ 詳細は README.md 参照
4
+
5
+ ## コマンド
6
+
7
+ ```bash
8
+ # テスト実行
9
+ python3 -m pytest tests/ -v
10
+
11
+ # 特定テスト
12
+ python3 -m pytest tests/test_xxx.py -v # ファイル指定
13
+ python3 -m pytest tests/ -k "keyword" -v # キーワード指定
14
+
15
+ # カバレッジ
16
+ python3 -m pytest --cov=src --cov-report=term-missing
17
+
18
+ # ローカルテスト環境
19
+ ./scripts/setup_test_env.sh --help
20
+
21
+ # フィクスチャキャプチャ
22
+ python3 scripts/capture_fixture.py --sanitize -n 10
23
+
24
+ # リリース(PyPI自動公開)
25
+ ./scripts/release.sh <version> # フル: バージョン更新→push→GitHubリリース
26
+ ./scripts/release.sh <version> --release-only # GitHubリリースのみ
27
+ # 要: .env に GH_TOKEN 設定
28
+ ```
29
+
30
+ ## ディレクトリ構成
31
+
32
+ ```
33
+ src/
34
+ application/ # CLI・エントリーポイント
35
+ domain/ # フック・マッチャー
36
+ infrastructure/ # 外部連携
37
+ shared/ # 共通ユーティリティ
38
+ tests/ # pytest
39
+ scripts/ # 開発用スクリプト
40
+ .claude-nagger/ # 設定ファイル雛形
41
+ ```
42
+
43
+ ## 規約
44
+
45
+ - テスト必須: 新機能は必ずテスト実装
46
+ - Redmine追跡: 作業前にチケット起票
47
+ - コミット: issue_{id} を含める
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 HollySizzle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.