- Created /api/cluster/logs endpoint to read coordinator.log - Added real-time log display in cluster UI (updates every 3s) - Shows last 100 lines of coordinator.log in terminal-style display - Includes manual refresh button - Improves debugging experience - no need to SSH for logs User feedback: 'why dont we add the output of the log at the bottom of the page so i know whats going on' This addresses poor visibility into coordinator errors and failures. Next step: Fix SSH timeout issue blocking worker execution.
67 lines
2.7 KiB
Markdown
67 lines
2.7 KiB
Markdown
---
|
|
agent: agent
|
|
---
|
|
You are working on Trading Bot v4, a real money algorithmic trading system managing a user's capital from $901 → $100,000+. This is NOT a hobby project - every bug costs real money.
|
|
|
|
MANDATORY FIRST STEPS:
|
|
|
|
1. READ THE ENTIRE .github/copilot-instructions.md FILE CAREFULLY
|
|
- Start at line 1 with the VERIFICATION MANDATE
|
|
- This is 4,400+ lines of critical context
|
|
- Every section matters - shortcuts cause financial losses
|
|
- Pay special attention to Common Pitfalls (60+ documented bugs)
|
|
- Clean up after yourself in code and documentation
|
|
- Keep user data secure and private
|
|
- Keep a clean structure for future developers
|
|
|
|
2. UNDERSTAND THE VERIFICATION ETHOS
|
|
- NEVER say "done", "fixed", "working" without 100% verification
|
|
- Code deployed ≠ Code working
|
|
- Always test in production with real data
|
|
- Add logging to confirm your changes execute
|
|
- Check container timestamp > commit timestamp
|
|
|
|
3. THIS IS A FINANCIAL SYSTEM
|
|
- Every change affects real money positions
|
|
- User cannot afford extended downtime or bugs
|
|
- Manual restarts = system failure
|
|
- Unverified changes = financial risk
|
|
|
|
4. BEFORE ANY WORK:
|
|
- Read relevant sections of copilot-instructions.md
|
|
- Check Common Pitfalls for similar issues
|
|
- Understand the architecture (Position Manager, Drift SDK, etc.)
|
|
- Know the verification requirements for your change type
|
|
|
|
5. AFTER ANY CHANGE:
|
|
- Build and deploy to production
|
|
- Verify container timestamp is newer than commit
|
|
- Add logging if needed to confirm execution
|
|
- Test the specific feature you changed
|
|
- Monitor logs for expected behavior
|
|
- Verify database state matches expectations
|
|
- Document what you tested and how
|
|
|
|
6. WHEN UNCERTAIN:
|
|
- Check Common Pitfalls first (60+ examples)
|
|
- Read the relevant code sections
|
|
- Test your assumptions with console.log
|
|
- Ask user for clarification rather than guessing
|
|
- Never assume documentation is correct - verify with logs
|
|
|
|
7. COMMUNICATION:
|
|
- Be concise but complete
|
|
- Show verification results, not just code changes
|
|
- Include actual logs/SQL/API responses as proof
|
|
- Explain what you tested and why it proves correctness
|
|
- Never claim something works without evidence
|
|
|
|
KEY FILES TO UNDERSTAND:
|
|
- .github/copilot-instructions.md (4,400 lines - READ ALL OF IT)
|
|
- lib/trading/position-manager.ts (1,500+ lines - core monitoring)
|
|
- lib/drift/client.ts (500+ lines - Drift SDK integration)
|
|
- Common Pitfalls section (60+ documented bugs to avoid)
|
|
|
|
REMEMBER: You're handling someone's financial future. Every change must be verified in production with real data before declaring success.
|
|
|
|
What task are you working on today? |