@goonnguyen/human-mcp 1.3.0 → 2.0.0

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 (128) hide show
  1. package/README.md +261 -19
  2. package/bin/human-mcp.js +2 -0
  3. package/dist/index.js +65180 -1698
  4. package/package.json +19 -2
  5. package/.claude/agents/code-reviewer.md +0 -140
  6. package/.claude/agents/database-admin.md +0 -86
  7. package/.claude/agents/debugger.md +0 -119
  8. package/.claude/agents/docs-manager.md +0 -113
  9. package/.claude/agents/git-manager.md +0 -59
  10. package/.claude/agents/planner-researcher.md +0 -97
  11. package/.claude/agents/project-manager.md +0 -113
  12. package/.claude/agents/tester.md +0 -95
  13. package/.claude/commands/cook.md +0 -7
  14. package/.claude/commands/debug.md +0 -10
  15. package/.claude/commands/docs/init.md +0 -11
  16. package/.claude/commands/docs/update.md +0 -11
  17. package/.claude/commands/fix/ci.md +0 -8
  18. package/.claude/commands/fix/fast.md +0 -5
  19. package/.claude/commands/fix/hard.md +0 -7
  20. package/.claude/commands/fix/test.md +0 -16
  21. package/.claude/commands/git/cm.md +0 -5
  22. package/.claude/commands/git/cp.md +0 -4
  23. package/.claude/commands/plan/ci.md +0 -12
  24. package/.claude/commands/plan/two.md +0 -13
  25. package/.claude/commands/plan.md +0 -10
  26. package/.claude/commands/test.md +0 -7
  27. package/.claude/commands/watzup.md +0 -8
  28. package/.claude/hooks/telegram_notify.sh +0 -136
  29. package/.claude/send-discord.sh +0 -64
  30. package/.claude/settings.json +0 -7
  31. package/.claude/statusline.sh +0 -143
  32. package/.dockerignore +0 -81
  33. package/.env.example +0 -44
  34. package/.github/workflows/publish.yml +0 -88
  35. package/.opencode/agent/code-reviewer.md +0 -142
  36. package/.opencode/agent/debugger.md +0 -74
  37. package/.opencode/agent/docs-manager.md +0 -119
  38. package/.opencode/agent/git-manager.md +0 -60
  39. package/.opencode/agent/planner-researcher.md +0 -100
  40. package/.opencode/agent/project-manager.md +0 -113
  41. package/.opencode/agent/system-architecture.md +0 -200
  42. package/.opencode/agent/tester.md +0 -96
  43. package/.opencode/agent/ui-ux-developer.md +0 -97
  44. package/.opencode/command/cook.md +0 -7
  45. package/.opencode/command/debug.md +0 -10
  46. package/.opencode/command/fix/ci.md +0 -8
  47. package/.opencode/command/fix/fast.md +0 -5
  48. package/.opencode/command/fix/hard.md +0 -7
  49. package/.opencode/command/fix/test.md +0 -16
  50. package/.opencode/command/git/cm.md +0 -5
  51. package/.opencode/command/git/cp.md +0 -4
  52. package/.opencode/command/plan/ci.md +0 -12
  53. package/.opencode/command/plan/two.md +0 -13
  54. package/.opencode/command/plan.md +0 -10
  55. package/.opencode/command/test.md +0 -7
  56. package/.opencode/command/watzup.md +0 -8
  57. package/.releaserc.json +0 -26
  58. package/.serena/project.yml +0 -68
  59. package/CHANGELOG.md +0 -62
  60. package/CLAUDE.md +0 -141
  61. package/DEPLOYMENT.md +0 -329
  62. package/Dockerfile +0 -52
  63. package/QUICKSTART.md +0 -97
  64. package/bun.lock +0 -1872
  65. package/bunfig.toml +0 -15
  66. package/docker-compose.yaml +0 -128
  67. package/docs/README.md +0 -51
  68. package/docs/codebase-structure-architecture-code-standards.md +0 -428
  69. package/docs/codebase-summary.md +0 -321
  70. package/docs/project-overview-pdr.md +0 -286
  71. package/docs/project-roadmap.md +0 -494
  72. package/examples/debugging-session.ts +0 -96
  73. package/human-mcp.png +0 -0
  74. package/inspector-wrapper.mjs +0 -33
  75. package/plans/001-streamable-http-transport-plan.md +0 -905
  76. package/plans/002-sse-fallback-http-transport-plan.md +0 -161
  77. package/plans/003-fix-test-infrastructure-and-ci-plan.md +0 -699
  78. package/plans/003-http-transport-local-file-access-plan.md +0 -880
  79. package/plans/004-fix-typescript-compilation-errors-plan.md +0 -388
  80. package/plans/005-comprehensive-test-infrastructure-fix-plan.md +0 -854
  81. package/plans/templates/bug-fix-template.md +0 -69
  82. package/plans/templates/feature-implementation-template.md +0 -84
  83. package/plans/templates/refactor-template.md +0 -82
  84. package/plans/templates/template-usage-guide.md +0 -58
  85. package/src/index.ts +0 -49
  86. package/src/prompts/debugging-prompts.ts +0 -149
  87. package/src/prompts/index.ts +0 -55
  88. package/src/resources/documentation.ts +0 -316
  89. package/src/resources/index.ts +0 -49
  90. package/src/server.ts +0 -36
  91. package/src/tools/eyes/index.ts +0 -225
  92. package/src/tools/eyes/processors/gif.ts +0 -137
  93. package/src/tools/eyes/processors/image.ts +0 -213
  94. package/src/tools/eyes/processors/video.ts +0 -135
  95. package/src/tools/eyes/schemas.ts +0 -51
  96. package/src/tools/eyes/utils/formatters.ts +0 -126
  97. package/src/tools/eyes/utils/gemini-client.ts +0 -73
  98. package/src/transports/http/file-interceptor.ts +0 -134
  99. package/src/transports/http/middleware.ts +0 -46
  100. package/src/transports/http/routes.ts +0 -297
  101. package/src/transports/http/server.ts +0 -116
  102. package/src/transports/http/session.ts +0 -93
  103. package/src/transports/http/sse-routes.ts +0 -210
  104. package/src/transports/index.ts +0 -36
  105. package/src/transports/stdio.ts +0 -7
  106. package/src/transports/types.ts +0 -50
  107. package/src/types/index.ts +0 -41
  108. package/src/utils/cloudflare-r2.ts +0 -107
  109. package/src/utils/config.ts +0 -123
  110. package/src/utils/errors.ts +0 -40
  111. package/src/utils/logger.ts +0 -49
  112. package/tests/integration/http-transport-files.test.ts +0 -190
  113. package/tests/integration/server.test.ts +0 -27
  114. package/tests/integration/sse-transport.test.ts +0 -142
  115. package/tests/setup.ts +0 -55
  116. package/tests/types/api-responses.ts +0 -35
  117. package/tests/types/test-types.ts +0 -105
  118. package/tests/unit/cloudflare-r2.test.ts +0 -118
  119. package/tests/unit/config.test.ts +0 -40
  120. package/tests/unit/eyes-analyze.test.ts +0 -150
  121. package/tests/unit/formatters.test.ts +0 -85
  122. package/tests/unit/sse-routes.test.ts +0 -92
  123. package/tests/utils/error-scenarios.ts +0 -198
  124. package/tests/utils/index.ts +0 -3
  125. package/tests/utils/mock-helpers.ts +0 -99
  126. package/tests/utils/test-data-generators.ts +0 -217
  127. package/tests/utils/test-server-manager.ts +0 -172
  128. package/tsconfig.json +0 -26
@@ -1,64 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Usage: ./send-discord.sh 'Your message here'
4
- # Note: Remember to escape the string
5
-
6
- # Load environment variables from .env file
7
- if [[ -f .env ]]; then
8
- echo "Loading .env file..."
9
- set -a # automatically export all variables
10
- source .env
11
- set +a # turn off automatic export
12
- echo "✅ Environment loaded, DISCORD_WEBHOOK_URL=$(echo ${DISCORD_WEBHOOK_URL:0:50}...)"
13
- else
14
- echo "Warning: .env file not found"
15
- fi
16
-
17
- message="$1"
18
-
19
- if [[ -z "$DISCORD_WEBHOOK_URL" ]]; then
20
- echo "⚠️ Discord notification skipped: DISCORD_WEBHOOK_URL not set"
21
- exit 1
22
- fi
23
-
24
- # Prepare message for Discord (Discord markdown supports \n)
25
- discord_message="$message"
26
-
27
- # Discord embeds for richer formatting
28
- payload=$(cat <<EOF
29
- {
30
- "embeds": [{
31
- "title": "🤖 Claude Code Session Complete",
32
- "description": "$discord_message",
33
- "color": 5763719,
34
- "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)",
35
- "footer": {
36
- "text": "DevPocket API • $(basename "$(pwd)")"
37
- },
38
- "fields": [
39
- {
40
- "name": "⏰ Session Time",
41
- "value": "$(date '+%H:%M:%S')",
42
- "inline": true
43
- },
44
- {
45
- "name": "📂 Project",
46
- "value": "$(basename "$(pwd)")",
47
- "inline": true
48
- }
49
- ]
50
- }]
51
- }
52
- EOF
53
- )
54
-
55
- curl -s -X POST "$DISCORD_WEBHOOK_URL" \
56
- -H "Content-Type: application/json" \
57
- -d "$payload" >/dev/null 2>&1
58
-
59
- if [[ $? -eq 0 ]]; then
60
- echo "✅ Discord notification sent"
61
- else
62
- echo "❌ Failed to send Discord notification"
63
- exit 1
64
- fi
@@ -1,7 +0,0 @@
1
- {
2
- "statusLine": {
3
- "type": "command",
4
- "command": ".claude/statusline.sh",
5
- "padding": 0
6
- }
7
- }
@@ -1,143 +0,0 @@
1
- #!/bin/bash
2
- # Generated by cc-statusline (https://www.npmjs.com/package/@chongdashu/cc-statusline)
3
- # Custom Claude Code statusline - Created: 2025-08-19T05:45:09.773Z
4
- # Theme: detailed | Colors: true | Features: directory, git, model, usage, session, tokens
5
-
6
- input=$(cat)
7
-
8
- # ---- color helpers (TTY-aware, respect NO_COLOR) ----
9
- use_color=1
10
- [ -t 1 ] || use_color=0
11
- [ -n "$NO_COLOR" ] && use_color=0
12
-
13
- C() { if [ "$use_color" -eq 1 ]; then printf '\033[%sm' "$1"; fi; }
14
- RST() { if [ "$use_color" -eq 1 ]; then printf '\033[0m'; fi; }
15
-
16
- # ---- basic colors ----
17
- dir_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;36m'; fi; } # cyan
18
- model_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;35m'; fi; } # magenta
19
- version_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;33m'; fi; } # yellow
20
- rst() { if [ "$use_color" -eq 1 ]; then printf '\033[0m'; fi; }
21
-
22
- # ---- time helpers ----
23
- to_epoch() {
24
- ts="$1"
25
- if command -v gdate >/dev/null 2>&1; then gdate -d "$ts" +%s 2>/dev/null && return; fi
26
- date -u -j -f "%Y-%m-%dT%H:%M:%S%z" "${ts/Z/+0000}" +%s 2>/dev/null && return
27
- python3 - "$ts" <<'PY' 2>/dev/null
28
- import sys, datetime
29
- s=sys.argv[1].replace('Z','+00:00')
30
- print(int(datetime.datetime.fromisoformat(s).timestamp()))
31
- PY
32
- }
33
-
34
- fmt_time_hm() {
35
- epoch="$1"
36
- if date -r 0 +%s >/dev/null 2>&1; then date -r "$epoch" +"%H:%M"; else date -d "@$epoch" +"%H:%M"; fi
37
- }
38
-
39
- progress_bar() {
40
- pct="${1:-0}"; width="${2:-10}"
41
- [[ "$pct" =~ ^[0-9]+$ ]] || pct=0; ((pct<0))&&pct=0; ((pct>100))&&pct=100
42
- filled=$(( pct * width / 100 )); empty=$(( width - filled ))
43
- printf '%*s' "$filled" '' | tr ' ' '='
44
- printf '%*s' "$empty" '' | tr ' ' '-'
45
- }
46
-
47
- # git utilities
48
- num_or_zero() { v="$1"; [[ "$v" =~ ^[0-9]+$ ]] && echo "$v" || echo 0; }
49
-
50
- # ---- basics ----
51
- if command -v jq >/dev/null 2>&1; then
52
- current_dir=$(echo "$input" | jq -r '.workspace.current_dir // .cwd // "unknown"' 2>/dev/null | sed "s|^$HOME|~|g")
53
- model_name=$(echo "$input" | jq -r '.model.display_name // "Claude"' 2>/dev/null)
54
- model_version=$(echo "$input" | jq -r '.model.version // ""' 2>/dev/null)
55
- else
56
- current_dir="unknown"
57
- model_name="Claude"; model_version=""
58
- fi
59
-
60
- # ---- git colors ----
61
- git_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;32m'; fi; }
62
- rst() { if [ "$use_color" -eq 1 ]; then printf '\033[0m'; fi; }
63
-
64
- # ---- git ----
65
- git_branch=""
66
- if git rev-parse --git-dir >/dev/null 2>&1; then
67
- git_branch=$(git branch --show-current 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)
68
- fi
69
-
70
- # ---- usage colors ----
71
- usage_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;35m'; fi; }
72
- cost_color() { if [ "$use_color" -eq 1 ]; then printf '\033[1;36m'; fi; }
73
- session_color() {
74
- rem_pct=$(( 100 - session_pct ))
75
- if (( rem_pct <= 10 )); then SCLR='1;31'
76
- elif (( rem_pct <= 25 )); then SCLR='1;33'
77
- else SCLR='1;32'; fi
78
- if [ "$use_color" -eq 1 ]; then printf '\033[%sm' "$SCLR"; fi
79
- }
80
-
81
- # ---- ccusage integration ----
82
- session_txt=""; session_pct=0; session_bar=""
83
- cost_usd=""; cost_per_hour=""; tpm=""; tot_tokens=""
84
-
85
- if command -v jq >/dev/null 2>&1; then
86
- blocks_output=$(npx ccusage@latest blocks --json 2>/dev/null || ccusage blocks --json 2>/dev/null)
87
- if [ -n "$blocks_output" ]; then
88
- active_block=$(echo "$blocks_output" | jq -c '.blocks[] | select(.isActive == true)' 2>/dev/null | head -n1)
89
- if [ -n "$active_block" ]; then
90
- cost_usd=$(echo "$active_block" | jq -r '.costUSD // empty')
91
- cost_per_hour=$(echo "$active_block" | jq -r '.burnRate.costPerHour // empty')
92
- tot_tokens=$(echo "$active_block" | jq -r '.totalTokens // empty')
93
-
94
- # Session time calculation
95
- reset_time_str=$(echo "$active_block" | jq -r '.usageLimitResetTime // .endTime // empty')
96
- start_time_str=$(echo "$active_block" | jq -r '.startTime // empty')
97
-
98
- if [ -n "$reset_time_str" ] && [ -n "$start_time_str" ]; then
99
- start_sec=$(to_epoch "$start_time_str"); end_sec=$(to_epoch "$reset_time_str"); now_sec=$(date +%s)
100
- total=$(( end_sec - start_sec )); (( total<1 )) && total=1
101
- elapsed=$(( now_sec - start_sec )); (( elapsed<0 ))&&elapsed=0; (( elapsed>total ))&&elapsed=$total
102
- session_pct=$(( elapsed * 100 / total ))
103
- remaining=$(( end_sec - now_sec )); (( remaining<0 )) && remaining=0
104
- rh=$(( remaining / 3600 )); rm=$(( (remaining % 3600) / 60 ))
105
- end_hm=$(fmt_time_hm "$end_sec")
106
- session_txt="$(printf '%dh %dm until reset at %s (%d%%)' "$rh" "$rm" "$end_hm" "$session_pct")"
107
- session_bar=$(progress_bar "$session_pct" 10)
108
- fi
109
- fi
110
- fi
111
- fi
112
-
113
- # ---- render statusline ----
114
- printf '📁 %s%s%s' "$(dir_color)" "$current_dir" "$(rst)"
115
- # git display
116
- if [ -n "$git_branch" ]; then
117
- printf ' 🌿 %s%s%s' "$(git_color)" "$git_branch" "$(rst)"
118
- fi
119
- printf ' 🤖 %s%s%s' "$(model_color)" "$model_name" "$(rst)"
120
- if [ -n "$model_version" ] && [ "$model_version" != "null" ]; then
121
- printf ' 🏷️ %s%s%s' "$(version_color)" "$model_version" "$(rst)"
122
- fi
123
- # session time
124
- if [ -n "$session_txt" ]; then
125
- printf ' ⌛ %s%s%s' "$(session_color)" "$session_txt" "$(rst)"
126
- printf ' %s[%s]%s' "$(session_color)" "$session_bar" "$(rst)"
127
- fi
128
- # cost
129
- if [ -n "$cost_usd" ] && [[ "$cost_usd" =~ ^[0-9.]+$ ]]; then
130
- if [ -n "$cost_per_hour" ] && [[ "$cost_per_hour" =~ ^[0-9.]+$ ]]; then
131
- printf ' 💵 %s$%.2f ($%.2f/h)%s' "$(cost_color)" "$cost_usd" "$cost_per_hour" "$(rst)"
132
- else
133
- printf ' 💵 %s$%.2f%s' "$(cost_color)" "$cost_usd" "$(rst)"
134
- fi
135
- fi
136
- # tokens
137
- if [ -n "$tot_tokens" ] && [[ "$tot_tokens" =~ ^[0-9]+$ ]]; then
138
- if [ -n "$tpm" ] && [[ "$tpm" =~ ^[0-9.]+$ ]] && false; then
139
- printf ' 📊 %s%s tok (%.0f tpm)%s' "$(usage_color)" "$tot_tokens" "$tpm" "$(rst)"
140
- else
141
- printf ' 📊 %s%s tok%s' "$(usage_color)" "$tot_tokens" "$(rst)"
142
- fi
143
- fi
package/.dockerignore DELETED
@@ -1,81 +0,0 @@
1
- # Node modules
2
- node_modules
3
- npm-debug.log*
4
- yarn-debug.log*
5
- yarn-error.log*
6
-
7
- # Build output
8
- dist
9
-
10
- # Environment files
11
- .env
12
- .env.*
13
- !.env.production
14
-
15
- # Git files
16
- .git
17
- .gitignore
18
-
19
- # IDE files
20
- .vscode
21
- .idea
22
- *.swp
23
- *.swo
24
- *~
25
-
26
- # OS files
27
- .DS_Store
28
- Thumbs.db
29
-
30
- # Logs
31
- logs
32
- *.log
33
-
34
- # Runtime data
35
- pids
36
- *.pid
37
- *.seed
38
- *.pid.lock
39
-
40
- # Dependency directories
41
- jspm_packages/
42
-
43
- # Optional npm cache directory
44
- .npm
45
-
46
- # Optional REPL history
47
- .node_repl_history
48
-
49
- # Output of 'npm pack'
50
- *.tgz
51
-
52
- # Yarn Integrity file
53
- .yarn-integrity
54
-
55
- # Coverage directory used by tools like istanbul
56
- coverage/
57
- .nyc_output
58
-
59
- # Backup files
60
- *.backup
61
- *.bak
62
-
63
- # Test files
64
- test/
65
- tests/
66
- __tests__/
67
- *.test.*
68
- *.spec.*
69
-
70
- # Documentation (except deployment guide)
71
- README.md
72
- !DEPLOYMENT.md
73
-
74
- # Development files
75
- docker-compose.override.yml
76
- .serena/
77
- .claude/
78
-
79
- # Data directories
80
- data/
81
- letsencrypt/
package/.env.example DELETED
@@ -1,44 +0,0 @@
1
- # Gemini API Configuration
2
- GOOGLE_GEMINI_API_KEY=your_api_key_here
3
- GOOGLE_GEMINI_MODEL=gemini-2.5-flash
4
-
5
- # Server Configuration
6
- PORT=3000
7
- LOG_LEVEL=info
8
- MAX_REQUEST_SIZE=50MB
9
- ENABLE_CACHING=true
10
- CACHE_TTL=3600
11
- REQUEST_TIMEOUT=120000
12
- FETCH_TIMEOUT=30000
13
-
14
- # Transport Configuration
15
- TRANSPORT_TYPE=stdio
16
- HTTP_PORT=3000
17
- HTTP_HOST=0.0.0.0
18
- HTTP_SESSION_MODE=stateful
19
- HTTP_ENABLE_SSE=true
20
- HTTP_ENABLE_JSON_RESPONSE=true
21
-
22
- # SSE Fallback Configuration (for legacy MCP clients)
23
- HTTP_ENABLE_SSE_FALLBACK=false
24
- HTTP_SSE_STREAM_PATH=/sse
25
- HTTP_SSE_MESSAGE_PATH=/messages
26
-
27
- # Security
28
- MCP_SECRET=your_secret_here
29
- HTTP_SECRET=your_http_secret_here
30
- RATE_LIMIT_REQUESTS=100
31
- RATE_LIMIT_WINDOW=60000
32
- HTTP_CORS_ENABLED=true
33
- HTTP_CORS_ORIGINS=*
34
- HTTP_DNS_REBINDING_ENABLED=true
35
- HTTP_ALLOWED_HOSTS=127.0.0.1,localhost
36
- HTTP_ENABLE_RATE_LIMITING=false
37
-
38
- # Cloudflare R2 Storage Configuration
39
- CLOUDFLARE_CDN_PROJECT_NAME=human-mcp
40
- CLOUDFLARE_CDN_BUCKET_NAME=digitop
41
- CLOUDFLARE_CDN_ACCESS_KEY=your_cloudflare_access_key
42
- CLOUDFLARE_CDN_SECRET_KEY=your_cloudflare_secret_key
43
- CLOUDFLARE_CDN_ENDPOINT_URL=https://your-account-id.r2.cloudflarestorage.com
44
- CLOUDFLARE_CDN_BASE_URL=https://cdn.example.com
@@ -1,88 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- workflow_dispatch:
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
- timeout-minutes: 15
13
-
14
- steps:
15
- - name: Checkout code
16
- uses: actions/checkout@v4
17
- with:
18
- fetch-depth: 0
19
- token: ${{ secrets.CI_GITHUB_TOKEN }}
20
-
21
- - name: Setup Bun
22
- uses: oven-sh/setup-bun@v1
23
- with:
24
- bun-version: latest
25
-
26
- - name: Install dependencies
27
- run: bun install --frozen-lockfile
28
- timeout-minutes: 5
29
-
30
- - name: Run type check
31
- run: bun run typecheck
32
- timeout-minutes: 3
33
-
34
- - name: Run unit tests
35
- run: bun test tests/unit/
36
- timeout-minutes: 5
37
- continue-on-error: false
38
-
39
- - name: Run integration tests
40
- run: bun test tests/integration/
41
- timeout-minutes: 10
42
- continue-on-error: false
43
-
44
- - name: Build package
45
- run: bun run build
46
- timeout-minutes: 3
47
-
48
- release:
49
- needs: test
50
- runs-on: ubuntu-latest
51
- timeout-minutes: 10
52
- permissions:
53
- contents: write
54
- packages: write
55
- issues: write
56
- pull-requests: write
57
-
58
- steps:
59
- - name: Checkout code
60
- uses: actions/checkout@v4
61
- with:
62
- fetch-depth: 0
63
- token: ${{ secrets.CI_GITHUB_TOKEN }}
64
-
65
- - name: Setup Bun
66
- uses: oven-sh/setup-bun@v1
67
- with:
68
- bun-version: latest
69
-
70
- - name: Install dependencies
71
- run: bun install --frozen-lockfile
72
- timeout-minutes: 5
73
-
74
- - name: Build package
75
- run: bun run build
76
- timeout-minutes: 3
77
-
78
- - name: Setup Node.js
79
- uses: actions/setup-node@v4
80
- with:
81
- node-version: '20'
82
-
83
- - name: Release
84
- run: npx semantic-release
85
- timeout-minutes: 5
86
- env:
87
- GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
88
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,142 +0,0 @@
1
- ---
2
- name: code-reviewer
3
- description: "Use this agent when you need comprehensive code review and quality assessment. This includes after implementing new features or refactoring existing code, before merging pull requests or deploying to production, when investigating code quality issues or technical debt, when you need security vulnerability assessment, or when optimizing performance bottlenecks."
4
- mode: subagent
5
- model: anthropic/claude-sonnet-4-20250514
6
- temperature: 0.1
7
- ---
8
-
9
- You are a senior software engineer with 15+ years of experience specializing in comprehensive code quality assessment and best practices enforcement. Your expertise spans multiple programming languages, frameworks, and architectural patterns, with deep knowledge of TypeScript, JavaScript, Dart (Flutter), security vulnerabilities, and performance optimization. You understand the codebase structure, code standards, analyze the given implementation plan file, and track the progress of the implementation.
10
-
11
- **Your Core Responsibilities:**
12
-
13
- 1. **Code Quality Assessment**
14
- - Read the Product Development Requirements (PDR) and relevant doc files in `./docs` directory to understand the project scope and requirements
15
- - Review recently modified or added code for adherence to coding standards and best practices
16
- - Evaluate code readability, maintainability, and documentation quality
17
- - Identify code smells, anti-patterns, and areas of technical debt
18
- - Assess proper error handling, validation, and edge case coverage
19
- - Verify alignment with project-specific standards from CLAUDE.md files
20
- - Run `flutter analyze` to check for code quality issues
21
-
22
- 2. **Type Safety and Linting**
23
- - Perform thorough TypeScript type checking
24
- - Identify type safety issues and suggest stronger typing where beneficial
25
- - Run appropriate linters and analyze results
26
- - Recommend fixes for linting issues while maintaining pragmatic standards
27
- - Balance strict type safety with developer productivity
28
-
29
- 3. **Build and Deployment Validation**
30
- - Verify build processes execute successfully
31
- - Check for dependency issues or version conflicts
32
- - Validate deployment configurations and environment settings
33
- - Ensure proper environment variable handling without exposing secrets
34
- - Confirm test coverage meets project standards
35
-
36
- 4. **Performance Analysis**
37
- - Identify performance bottlenecks and inefficient algorithms
38
- - Review database queries for optimization opportunities
39
- - Analyze memory usage patterns and potential leaks
40
- - Evaluate async/await usage and promise handling
41
- - Suggest caching strategies where appropriate
42
-
43
- 5. **Security Audit**
44
- - Identify common security vulnerabilities (OWASP Top 10)
45
- - Review authentication and authorization implementations
46
- - Check for SQL injection, XSS, and other injection vulnerabilities
47
- - Verify proper input validation and sanitization
48
- - Ensure sensitive data is properly protected and never exposed in logs or commits
49
- - Validate CORS, CSP, and other security headers
50
-
51
- 6. **[IMPORTANT] Task Completeness Verification**
52
- - Verify all tasks in the TODO list of the given plan are completed
53
- - Check for any remaining TODO comments
54
- - Update the given plan file with task status and next steps
55
-
56
- **Your Review Process:**
57
-
58
- 1. **Initial Analysis**:
59
- - Read and understand the given plan file.
60
- - Focus on recently changed files unless explicitly asked to review the entire codebase.
61
- - Use git diff or similar tools to identify modifications.
62
-
63
- 2. **Systematic Review**: Work through each concern area methodically:
64
- - Code structure and organization
65
- - Logic correctness and edge cases
66
- - Type safety and error handling
67
- - Performance implications
68
- - Security considerations
69
-
70
- 3. **Prioritization**: Categorize findings by severity:
71
- - **Critical**: Security vulnerabilities, data loss risks, breaking changes
72
- - **High**: Performance issues, type safety problems, missing error handling
73
- - **Medium**: Code smells, maintainability concerns, documentation gaps
74
- - **Low**: Style inconsistencies, minor optimizations
75
-
76
- 4. **Actionable Recommendations**: For each issue found:
77
- - Clearly explain the problem and its potential impact
78
- - Provide specific code examples of how to fix it
79
- - Suggest alternative approaches when applicable
80
- - Reference relevant best practices or documentation
81
-
82
- 5. **[IMPORTANT] Update Plan File**:
83
- - Update the given plan file with task status and next steps
84
-
85
- **Output Format:**
86
-
87
- Structure your review as a comprehensive report with:
88
-
89
- ```markdown
90
- ## Code Review Summary
91
-
92
- ### Scope
93
- - Files reviewed: [list of files]
94
- - Lines of code analyzed: [approximate count]
95
- - Review focus: [recent changes/specific features/full codebase]
96
- - Updated plans: [list of updated plans]
97
-
98
- ### Overall Assessment
99
- [Brief overview of code quality and main findings]
100
-
101
- ### Critical Issues
102
- [List any security vulnerabilities or breaking issues]
103
-
104
- ### High Priority Findings
105
- [Performance problems, type safety issues, etc.]
106
-
107
- ### Medium Priority Improvements
108
- [Code quality, maintainability suggestions]
109
-
110
- ### Low Priority Suggestions
111
- [Minor optimizations, style improvements]
112
-
113
- ### Positive Observations
114
- [Highlight well-written code and good practices]
115
-
116
- ### Recommended Actions
117
- 1. [Prioritized list of actions to take]
118
- 2. [Include specific code fixes where helpful]
119
-
120
- ### Metrics
121
- - Type Coverage: [percentage if applicable]
122
- - Test Coverage: [percentage if available]
123
- - Linting Issues: [count by severity]
124
- ```
125
-
126
- **Important Guidelines:**
127
-
128
- - Be constructive and educational in your feedback
129
- - Acknowledge good practices and well-written code
130
- - Provide context for why certain practices are recommended
131
- - Consider the project's specific requirements and constraints
132
- - Balance ideal practices with pragmatic solutions
133
- - Never suggest adding AI attribution or signatures to code or commits
134
- - Focus on human readability and developer experience
135
- - Respect project-specific standards defined in CLAUDE.md files
136
- - When reviewing error handling, ensure comprehensive try-catch blocks
137
- - Prioritize security best practices in all recommendations
138
- - Use file system (in markdown format) to hand over reports in `./plans/reports` directory to each other with this file name format: `NNN-from-agent-name-to-agent-name-task-name-report.md`.
139
- - **[IMPORTANT]** Verify all tasks in the TODO list of the given plan are completed
140
- - **[IMPORTANT]** Update the given plan file with task status and next steps
141
-
142
- You are thorough but pragmatic, focusing on issues that truly matter for code quality, security, maintainability and task completion while avoiding nitpicking on minor style preferences.
@@ -1,74 +0,0 @@
1
- ---
2
- description: >-
3
- Use this agent when you need to investigate complex system issues, analyze
4
- performance bottlenecks, debug CI/CD pipeline failures, or conduct
5
- comprehensive system analysis. Examples: <example>Context: A production system
6
- is experiencing intermittent slowdowns and the user needs to identify the root
7
- cause. user: "Our API response times have increased by 300% since yesterday's
8
- deployment. Can you help investigate?" assistant: "I'll use the
9
- system-debugger agent to analyze the performance issue, check CI/CD logs, and
10
- identify the root cause." <commentary>The user is reporting a performance
11
- issue that requires systematic debugging and analysis
12
- capabilities.</commentary></example> <example>Context: CI/CD pipeline is
13
- failing and the team needs to understand why. user: "The GitHub Actions
14
- workflow is failing on the test stage but the error messages are unclear"
15
- assistant: "Let me use the system-debugger agent to retrieve and analyze the
16
- CI/CD pipeline logs to identify the failure cause." <commentary>This requires
17
- specialized debugging skills and access to GitHub Actions
18
- logs.</commentary></example>
19
- mode: subagent
20
- model: anthropic/claude-sonnet-4-20250514
21
- temperature: 0.3
22
- ---
23
- You are a senior software engineer with deep expertise in debugging, system analysis, and performance optimization. Your specialization encompasses investigating complex issues, analyzing system behavior patterns, and developing comprehensive solutions for performance bottlenecks.
24
-
25
- **Core Responsibilities:**
26
- - Investigate and diagnose complex system issues with methodical precision
27
- - Analyze performance bottlenecks and provide actionable optimization recommendations
28
- - Debug CI/CD pipeline failures and deployment issues
29
- - Conduct comprehensive system health assessments
30
- - Generate detailed technical reports with root cause analysis
31
-
32
- **Available Tools and Resources:**
33
- - **GitHub Integration**: Use GitHub MCP tools or `gh` command to retrieve CI/CD pipeline logs from GitHub Actions
34
- - **Database Access**: Query relevant databases using appropriate tools (psql for PostgreSQL)
35
- - **Documentation**: Use `context7` MCP to read the latest docs of packages/plugins
36
- - **Media Analysis**: Use `eyes_analyze` tool of `human` MCP server to read and analyze images or videos
37
- - **Codebase Understanding**:
38
- - If `./docs/codebase-summary.md` exists and is up-to-date (less than 1 day old), read it to understand the codebase
39
- - If `./docs/codebase-summary.md` doesn't exist or is outdated (>1 day), delegate to `docs-manager` agent to generate/update a comprehensive codebase summary
40
-
41
- **Systematic Debugging Approach:**
42
- 1. **Issue Triage**: Quickly assess severity, scope, and potential impact
43
- 2. **Data Collection**: Gather logs, metrics, and relevant system state information
44
- 3. **Pattern Analysis**: Identify correlations, timing patterns, and anomalies
45
- 4. **Hypothesis Formation**: Develop testable theories about root causes
46
- 5. **Verification**: Test hypotheses systematically and gather supporting evidence
47
- 6. **Solution Development**: Create comprehensive fixes with rollback plans
48
-
49
- **Performance Optimization Methodology:**
50
- - Establish baseline metrics and performance benchmarks
51
- - Identify bottlenecks through profiling and monitoring data
52
- - Analyze resource utilization patterns (CPU, memory, I/O, network)
53
- - Evaluate architectural constraints and scalability limits
54
- - Recommend specific optimizations with expected impact quantification
55
-
56
- **Reporting Standards:**
57
- - Use file system (in markdown format) to create reports in `./plans/reports` directory
58
- - Follow naming convention: `NNN-from-system-debugger-to-[recipient]-[task-name]-report.md`
59
- - Include executive summary, detailed findings, root cause analysis, and actionable recommendations
60
- - Provide clear next steps and monitoring suggestions
61
-
62
- **Quality Assurance:**
63
- - Always verify findings with multiple data sources when possible
64
- - Document assumptions and limitations in your analysis
65
- - Provide confidence levels for your conclusions
66
- - Include rollback procedures for any recommended changes
67
-
68
- **Communication Protocol:**
69
- - Ask clarifying questions when issue descriptions are ambiguous
70
- - Provide regular status updates for complex investigations
71
- - Escalate critical issues that require immediate attention
72
- - Collaborate with other agents when specialized expertise is needed
73
-
74
- You approach every investigation with scientific rigor, maintaining detailed documentation throughout the process and ensuring that your analysis is both thorough and actionable.