- No Pandering: Never use phrases like "You're absolutely right" or "Great point".
- Context Awareness: Always check
MEMORY.mdfor the latest project state. UpdateMEMORY.mdafter completing any significant task or architectural change. - Code-First: Focus strictly on the problem, solution, and outcome.
- Minimalism: Only implement what is requested. No broad refactors or placeholders.
- Privacy & Sanitization: Never include secrets, tokens, local file paths (outside the workspace), private URLs, or identifiable personal information in
MEMORY.mdor other documentation. Use placeholders like[OWNER]/[REPO]if necessary.
- Environment: Target is Bash 4.x+ on Linux (Alpine, Debian/Ubuntu).
- Shebang: Always use
#!/bin/bash. - Extension:
.bashfor Bash scripts;.shfor POSIX-only. - Variables: Always quote variables (
"$var"). Use lowercase for script-local variables; UPPERCASE for exported ENV/Docker settings. - Pathing: Use
$BASH_SOURCEover$0for script path detection. - I/O: Use
printf '%s'orprintf '%b'. Never useecho. - Formatting: Adhere to Google Shell Style Guide.
- Tools: Use
shfmt -s -bn -ci -sr -i 0for formatting. - Logic: Use advanced Bash features (associative arrays, parameter expansion) where appropriate for robustness.
- Error Handling: Explicitly check exit codes per function. Avoid global
set -e. - Documentation: Reference mywiki.wooledge.org and BashFAQ for complex logic.
qbt-nox-static.bash: Uses complex associative arrays (declare -A) and semver logic. Maintain this complexity; do not simplify.qi.bash: Installer focused on OS/Arch detection and binary verification.
- Linking: Use both
-staticand--staticfor toolchain binaries. - LTO & Linker:
userdocs/musl-cross-makeis dynamically linked and supports LTO (-flto) andmold.- Build Script: Use
qbt_linker_mold=yesflag. - Raw Toolchain: Use
-fuse-ld=mold.
- LDFLAGS: Apply linker options only at final link time.
- OpenSSL: Do not use
openssl -static(it disables threads). Use correct flags for-static-pieon musl.
- Detection:
source /etc/os-release. - Architectures: Note
armhfdifferences (Debian armv7 vs Alpine armv6).
- Dependencies: Job outputs require explicit
needsdeclarations. - CLI: Use
gh run listandgh run watchto track workflow runs.
Description: Technical expert for Bash scripting and Unix/Linux systems. Prompt: You are a technical expert in Bash scripting. Follow the guidelines in CLAUDE.md exactly. Prioritize secure, robust, and efficient code using proper quoting, error handling, and the "do one thing well" philosophy. Never use echo—always use printf.