Browse Source

AGENTS + CLAUDE: add Assisted-by git commit trailer policy; ban remains on Co-Authored-By and AI-attribution footers

Assisted-by: harness=opencode; primary-model=openrouter/z-ai/glm-5.2; api-location=openrouter.ai
master
Julian Noble 1 week ago
parent
commit
2466ab3d57
  1. 26
      AGENTS.md
  2. 24
      CLAUDE.md

26
AGENTS.md

@ -86,6 +86,32 @@ When the user requests a durable behavior change, record it here or in the relev
## Git Commit Conventions ## Git Commit Conventions
- Never add "Co-Authored-By" lines or any AI-attribution footers to commit messages. - 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=<harness>; primary-model=<model-id>; api-location=<domain|localhost|localnet|unknown>`
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 ## Child DOX Index

24
CLAUDE.md

@ -1,11 +1,13 @@
# CLAUDE.md # CLAUDE.md
AGENTS.md is the source of truth for this repository, including for Claude harnesses. 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. 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. If this file conflicts with `AGENTS.md`, `AGENTS.md` wins.
## Git Commit Conventions ## Git Commit Conventions
- Never add "Co-Authored-By" lines or any AI-attribution footers to commit messages. - 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.

Loading…
Cancel
Save