AI Fix Prompts for 2Hjs Tracker

Copy any prompt below into Claude, ChatGPT, or your AI coding assistant to automatically fix the issue. Each prompt includes full context, code location, and step-by-step fix instructions.

3
Total Prompts
0
Critical (P0)
2
High (P1)
1
Medium (P2)
0
Low (P3)
Download All (Markdown) Download All (JSON) Feed these prompts to any AI coder: Claude Code, Cursor, Copilot, GPT, Ollama
HIGH ⚙ moderate #1

Fix quality gate failures (1 conditions)

quality-gate quality
Expected outcome: All quality gate conditions pass
Files to modify: Will be determined by the AI
Prompt (copy this into your AI assistant)
Repository 'kongaiwen__2hjs-tracker' is failing the quality gate.

Failed conditions:
- overall_score: actual 49.8 >= 50 (FAILED)

Fix each failing condition to make the repo pass the quality gate.
Repobility — the code-quality scanner for AI-generated software · https://repobility.com
HIGH ⚙ moderate #2

Review high-risk license: AGPL-3.0

license legal compliance
Expected outcome: License risk assessed and documented
Files to modify: LICENSE
Prompt (copy this into your AI assistant)
Repository 'kongaiwen__2hjs-tracker' uses AGPL-3.0 which is classified as high-risk (copyleft/proprietary). Review whether this is intentional. If distributing commercially, consider re-licensing or isolating copyleft dependencies.
MEDIUM ⚒ significant #3

Simplify 5 high-complexity files

complexity refactoring quality
Expected outcome: All listed files reduced to medium or low complexity
Files to modify: frontend/src/pages/ContactsPage.tsx, frontend/src/pages/CalendarPage.tsx, frontend/src/pages/OutreachPage.tsx, backend/src/routes/informationals.ts, backend/src/routes/claude.ts
Prompt (copy this into your AI assistant)
These files in 'kongaiwen__2hjs-tracker' have high cyclomatic complexity:

- **frontend/src/pages/ContactsPage.tsx**: complexity=161, max nesting=8, longest function=430 lines
- **frontend/src/pages/CalendarPage.tsx**: complexity=99, max nesting=7, longest function=338 lines
- **frontend/src/pages/OutreachPage.tsx**: complexity=94, max nesting=6, longest function=268 lines
- **backend/src/routes/informationals.ts**: complexity=91, max nesting=4, longest function=183 lines
- **backend/src/routes/claude.ts**: complexity=59, max nesting=3, longest function=134 lines

For each file:
1. Break large functions into smaller, focused functions
2. Reduce nesting depth (extract early returns, use guard clauses)
3. Simplify conditional logic
4. Extract complex expressions into named variables