docs: Update project and agent documentation.
- Document agent guidelines for asset tracking, including build commands, code style, data conventions, and security practices. - Document project setup, features, configuration, usage, and output details for an asset tracking tool.
This commit is contained in:
29
AGENTS.md
Normal file
29
AGENTS.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Asset Tracker - Agent Guidelines
|
||||
|
||||
## Build/Test Commands
|
||||
- Run asset extraction: `./extract_assets.sh`
|
||||
- Generate charts: `./chart_asset_data.sh`
|
||||
- Full pipeline with SSH agent: `./run_with_agent.sh`
|
||||
- Test individual users: Edit `user_ids.conf` to modify USER_IDS array
|
||||
|
||||
## Code Style Guidelines
|
||||
- Use bash for shell scripts with `#!/bin/bash` shebang
|
||||
- Source configuration files with `source ./user_ids.conf`
|
||||
- Use uppercase for global variables: `USER_IDS`, `URL_TEMPLATE`, `OUTPUT_DIR`
|
||||
- Function names in lowercase with underscores: `process_user()`
|
||||
- Use local variables in functions: `local USER_ID="$1"`
|
||||
- Error checking with conditional statements and proper exit codes
|
||||
- Clean up temporary files with `rm -f`
|
||||
- Use descriptive variable names: `png_total_assets`, `temp_diamonds_on_hand`
|
||||
|
||||
## Data Conventions
|
||||
- CSV format: `date,rank,diamonds,total_assets`
|
||||
- Date format: `"%Y-%m-%d %H:%M:%S"`
|
||||
- Remove commas from numeric values with `tr -d ','`
|
||||
- Gnuplot time format: `"%Y-%m-%d"`
|
||||
- Output PNG files: `total_assets_${USER_ID}.png`, `diamonds_on_hand_${USER_ID}.png`
|
||||
|
||||
## Security
|
||||
- Use SSH agent for key management: `ssh-add ~/.ssh/id_ed25519`
|
||||
- Handle sensitive URLs and paths in configuration files
|
||||
- Validate file existence before processing: `[ ! -f "$input_file" ]`
|
||||
Reference in New Issue
Block a user