diff --git a/AGENTS.md b/AGENTS.md index 6f2e7edf..c0f30483 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -86,6 +86,32 @@ When the user requests a durable behavior change, record it here or in the relev ## Git Commit Conventions - Never add "Co-Authored-By" lines or any AI-attribution footers to commit messages. +- When an agent constructs and executes the `git commit` command itself (staging, composing the message, and committing), it must append one `Assisted-by` trailer as the last line of the commit body. If the user commits manually, no trailer is required. +- Trailer format (single line, semicolon-separated key=value): + `Assisted-by: harness=; primary-model=; api-location=` + Examples: + `Assisted-by: harness=opencode; primary-model=openrouter/z-ai/glm-5.2; api-location=openrouter.ai` + `Assisted-by: harness=opencode; primary-model=lmstudio/qwen3-coder-next; api-location=localnet` +- `harness`: derived from the agent identity / system prompt. Values: `opencode`, `claude`, `pi`, `hermes`, `codex`, or `unknown`. +- `primary-model`: the exact model ID string from the system prompt (e.g. `openrouter/z-ai/glm-5.2`). No transformation. +- `api-location`: best-effort, derived in this order: + 1. If the provider prefix (segment before `/` in the model ID) is in the table below, use the listed domain. + 2. Else if the provider is a known local-LLM provider (`lmstudio`, `ollama`, `llamacpp`, `vllm`, `koboldcpp`, `llama.cpp`), attempt to read the harness config for the `baseURL`: RFC1918 address → `localnet`; `127.0.0.1` or `localhost` → `localhost`; otherwise the hostname from the URL. + 3. Else → `unknown`. + Known public provider table: + | Provider prefix | api-location | + |---|---| + | `openrouter` | `openrouter.ai` | + | `anthropic` | `anthropic.com` | + | `openai` | `openai.com` | + | `google` | `googleapis.com` | + | `mistral` | `mistral.ai` | + | `groq` | `groq.com` | + | `together` | `together.ai` | + | `deepseek` | `deepseek.com` | + | `x-ai` / `xai` | `x.ai` | +- `secondary-models` is intentionally omitted (not reliably introspectable). May be added later if a harness surfaces subagent model info. +- The `Assisted-by` trailer describes tooling, not authorship; it does not replace or conflict with the `Co-Authored-By` ban above. ## Child DOX Index diff --git a/CLAUDE.md b/CLAUDE.md index 00500dc8..d5f150a6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,11 +1,13 @@ -# CLAUDE.md - -AGENTS.md is the source of truth for this repository, including for Claude harnesses. - -Before working, read and follow the root `AGENTS.md`, then read and follow any nested `AGENTS.md` files that apply to the paths being inspected or edited. - -If this file conflicts with `AGENTS.md`, `AGENTS.md` wins. - -## Git Commit Conventions - -- Never add "Co-Authored-By" lines or any AI-attribution footers to commit messages. +# CLAUDE.md + +AGENTS.md is the source of truth for this repository, including for Claude harnesses. + +Before working, read and follow the root `AGENTS.md`, then read and follow any nested `AGENTS.md` files that apply to the paths being inspected or edited. + +If this file conflicts with `AGENTS.md`, `AGENTS.md` wins. + +## Git Commit Conventions + +- Never add "Co-Authored-By" lines or any AI-attribution footers to commit messages. +- When an agent constructs and executes the `git commit` command itself (staging, composing the message, and committing), it must append one `Assisted-by` trailer as the last line of the commit body. If the user commits manually, no trailer is required. +- Trailer format and field derivation rules live in the root `AGENTS.md` "Git Commit Conventions" section. `AGENTS.md` is the source of truth; this section is a reminder that the policy applies to Claude harnesses too.