diff --git a/agents/AGENTS-claude.md b/agents/AGENTS-claude.md index 74e6b8d..b2a48b3 100644 --- a/agents/AGENTS-claude.md +++ b/agents/AGENTS-claude.md @@ -46,9 +46,15 @@ Prefix every `Agent` prompt with one of: Resolution order: explicit `model` param → agent type frontmatter → parent inheritance. (`fork` always runs on the parent model; an override is ignored.) +0. **Self-hosted backend (a SessionStart hook says so when `ANTHROPIC_BASE_URL` + points at the vLLM gateway): never pass `model`.** Aliases like `sonnet` + do not exist there; every subagent inherits the one available model. 1. **Don't override specialized agent types** (`Explore`, `Plan`, etc.) — their frontmatter is tuned. Leave `model` off. 2. **For `general-purpose` under an expensive parent (Opus/Fable): set `model: sonnet`** — don't pay top rates for routine subagent work. -3. **A bigger model (`opus`)** on a subagent only when isolated context *and* reasoning beyond what the parent can easily do inline are both needed. +3. **`opus`** for research, recommendation, trade-off and judgement work + (also blinded eval judges) and when isolated context *and* reasoning beyond + the parent's inline capacity are both needed. For "how should X look" + questions discuss options first, do not build. 4. **`model: haiku`** only for mechanical tasks: bulk classification, format conversion, summarizing pre-filtered text. Code-semantic work → Sonnet. ### Context hygiene diff --git a/agents/AGENTS.md b/agents/AGENTS.md index ad52d1d..fa9b8e9 100644 --- a/agents/AGENTS.md +++ b/agents/AGENTS.md @@ -33,7 +33,11 @@ pushes and memory writes do not need this. a human. No social emojis, no emotional filler ("Danke dir! 🙂", "Huhu"). - Structure: factual salutation ("Hallo ,"), precise content, concrete call to action, closing without emotional markers. -- Append "(ai generated)" to every external text; never in chat replies to me. +- Append "(ai generated)" to every external text I phrase; never in chat + replies to me, and not in automated webhook or alert texts. +- PR thread replies carry only the decisive argument: no side findings, + links or follow-up ideas. +- Times in chat in Europe/Berlin local time; convert server UTC first. ## Error handling @@ -48,6 +52,26 @@ loop or brute-force through API calls. - On a Jira issue, prefix the subject with its key (`IT-12345`) in every repo. The ISAC repo has its own single-line convention (`IT-12345 bw/: `, no Conventional Commits); the `isac` skill has the details. +- **Push and open PRs (also drafts) without asking**, then report the link. + Not covered: force-push, pushes to shared or foreign branches, merges, PR + comments. Exception: in the private l4d2 project Martin pushes himself. +- **Never `--amend` and never `git stash pop` when other sessions may work in + the same repo.** An amend rewrote another session's pushed commit once + (2026-09-25); a pop after "No local changes to save" pops a foreign stash, + in the ISAC repo one with staged secrets. Fix-ups are new commits; to look + at an old version use `git show :`. +- **Commit messages via `-F` use one absolute path for writing and reading** + (the Bash tool's cwd changes silently; a relative `.tmp/commitmsg.txt` once + landed in a task folder and the commit took the old message). Check + `head -1` before committing; several commits per turn get numbered files. +- **Own PR branches: readable over historical.** Re-cut commits into one per + logical step (pure `git mv` first, content second) and push with + `--force-with-lease`; rebuild from the final tree instead of amending. + Bitbucket detects renames only by content similarity, so keep a renamed + file small. +- `git push` over SSH fails inside the sandbox (no raw TCP; `excludedCommands` + does not help): push with `dangerouslyDisableSandbox: true`, ISAC via + `isac git -C `. ## Jira diff --git a/agents/backend-hint.sh b/agents/backend-hint.sh new file mode 100755 index 0000000..8e368f7 --- /dev/null +++ b/agents/backend-hint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# SessionStart hook: tell the agent when the session runs against the self-hosted +# vLLM gateway, where model aliases (sonnet, opus, haiku) do not exist. +# Prints nothing on Anthropic/Vertex so the default rules apply. +case "${ANTHROPIC_BASE_URL:-}" in + *vllm*|*seibert.tools*) + model="${ANTHROPIC_MODEL:-${CLAUDE_CODE_SUBAGENT_MODEL:-the configured model}}" + printf '{"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":"Self-hosted backend (%s): only %s is available. Never pass a model override to Agent calls; all subagents inherit this model."}}\n' "$ANTHROPIC_BASE_URL" "$model" + ;; +esac +exit 0