# Agent Guidelines for hermes-chatto-plugin ## Tests `adapter.py` importiert aus `gateway.*` — das ist der Hermes Agent, nicht dieses Repo. Ohne dessen Quellcode auf dem `PYTHONPATH` bricht schon das Einsammeln der Tests mit `ModuleNotFoundError: No module named 'gateway'` ab. Also den Hermes Agent selbst herunterladen und bereitlegen, bevor du Tests ausführst: ```bash git clone https://github.com/NousResearch/hermes-agent.git /tmp/hermes PYTHONPATH=/tmp/hermes uv run --with pyyaml pytest -q ``` `pyyaml` wird von `gateway.config` gebraucht und steckt nicht in unseren Dev-Dependencies. Liegt der Checkout schon irgendwo, den Pfad einfach wiederverwenden statt neu zu klonen. ## Shell Scripts **Always run `shellcheck` after editing any shell scripts.** ```bash shellcheck path/to/script.sh ``` Or validate all shell scripts in the project: ```bash find . -name "*.sh" -exec shellcheck {} \; ``` ### Configuration Project-specific shellcheck rules are defined in `.shellcheckrc`. Default severity is `error` to catch all issues. ### Why - Prevents syntax errors and common pitfalls (e.g., missing quotes, unsafe variable expansions) - Ensures portability across different shell environments - Maintains code quality and security standards ### Integration Consider adding a pre-commit hook for automatic validation: ```yaml # .pre-commit-config.yaml repos: - repo: https://github.com/koalaman/shellcheck-precommit rev: v0.9.0 hooks: - id: shellcheck args: [--severity=error] ```