Files
mev-beta/orig/.opencode/commands/debug-code.md
Administrator c54c569f30 refactor: move all remaining files to orig/ directory
Completed clean root directory structure:
- Root now contains only: .git, .env, docs/, orig/
- Moved all remaining files and directories to orig/:
  - Config files (.claude, .dockerignore, .drone.yml, etc.)
  - All .env variants (except active .env)
  - Git config (.gitconfig, .github, .gitignore, etc.)
  - Tool configs (.golangci.yml, .revive.toml, etc.)
  - Documentation (*.md files, @prompts)
  - Build files (Dockerfiles, Makefile, go.mod, go.sum)
  - Docker compose files
  - All source directories (scripts, tests, tools, etc.)
  - Runtime directories (logs, monitoring, reports)
  - Dependency files (node_modules, lib, cache)
  - Special files (--delete)

- Removed empty runtime directories (bin/, data/)

V2 structure is now clean:
- docs/planning/ - V2 planning documents
- orig/ - Complete V1 codebase preserved
- .env - Active environment config (not in git)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 10:53:05 +01:00

1.2 KiB

Debug Code Issues

Debug the following code issues: $ARGUMENTS

Debugging Protocol:

  1. Issue Understanding: Analyze the problem description and expected vs actual behavior
  2. Log Analysis: Examine relevant log files and error messages
  3. Code Investigation: Review related source code and recent changes
  4. Reproduction: Attempt to reproduce the issue in a controlled environment
  5. Root Cause: Identify the underlying cause and contributing factors

Debugging Commands:

# For Go backend
go run -race ./cmd/mev-bot
LOG_LEVEL=debug ./mev-bot start

# For Solidity contracts
npx hardhat test
forge test -vvv

# For Frontend
npm run dev
npm run test:unit

Investigation Areas:

  • Go Backend: Concurrency issues, memory leaks, parsing errors
  • Solidity Contracts: Gas issues, reentrancy, overflow/underflow
  • Frontend: Vue component issues, state management, web3 integration
  • Integration: API communication, contract interactions, data flow

Output Requirements:

  • Clear problem identification with code references
  • Step-by-step reproduction instructions
  • Root cause analysis with technical details
  • Proposed solution with implementation steps
  • Test plan to verify the fix