Systematic exploration of unknown environments before starting work
When dropped into an unfamiliar environment, ALWAYS explore before acting.
ls -la /app/ # or the working directory
find . -type f | head -50
Before writing any code that reads data, understand the format:
file <filename> — detect file type (binary, text, encoding)head -20 <file> — first lines of text filesxxd <file> | head -20 — hex dump for binary fileswc -l <file> — line count for text filesstat <file> — exact file size in bytespython3 -c "import struct; ..." — parse binary headerswhich python3 gcc g++ make cmake node npm cargo rustc java go
pip list 2>/dev/null | head -20
If there are existing source files:
cat