From d751c44764295ab7cc3119472ce68ac9d817eff4 Mon Sep 17 00:00:00 2001 From: Nicholas Louque Date: Wed, 18 Nov 2026 12:57:31 -0700 Subject: [PATCH 1/3] docs: record AI assistance in commit messages Define a lightweight tool/model and skill-use convention, including unknown values, delegated work, and preservation during amend or squash. Route agents to the contributor guide and cite the OpenSSL and PostHog precedents. AI helped draft the guidance and review its scope, sources, and readability. Assisted-by: Codex:unknown Skills-used: implement, writing-for-agents, reader-first-documentation, code-review, code-change-description --- AGENTS.md | 1 + CONTRIBUTING.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 1cf0242..a794502 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,6 +5,7 @@ These instructions apply to this repository. ## Development Workflow - Before implementing or reviewing code, read [CODING_STANDARDS.md](CODING_STANDARDS.md). Use the originating task and later accepted decisions to establish scope. +- Before preparing a commit or final squash/merge message, follow [AI-assisted commits](CONTRIBUTING.md#ai-assisted-commits). - Before planning, implementing, or reviewing changes to product structure, dependencies, packaging, CI, or tests, read and apply [product boundaries](docs/product-boundaries.md). It is the normative contract for ownership, permitted composition, and consumer independence. - For substantial planning, roadmap decomposition, or expanding implementation scope, use [scope-maintainable-contribution](.agents/skills/scope-maintainable-contribution/SKILL.md). - For implementing agreed code changes, use [implement](.agents/skills/implement/SKILL.md). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e24beaf..12b5535 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -120,3 +120,25 @@ Keep changes focused and reviewable. A typical platform change should include: - A conventional commit message. Before pushing, run the relevant local checks. For CI or release behavior, prefer running the full `just ci-local` gate. + +### AI-assisted commits + +For AI-assisted changes, briefly describe AI's contribution in the commit body and add the following trailers (metadata lines at the end of the message). This keeps the record with the change in Git history. For example: + +```text +fix: preserve catalog filters when navigating back + +AI helped draft the implementation and tests. + +Assisted-by: Codex:unknown +Skills-used: code-review, durable-behavior-tests +``` + +- `Assisted-by` records the coding tool and model label. Repeat it for each known contributing tool/model pair, including delegated work. Use session metadata, observed tool output, or information confirmed by the developer. Use `unknown` when the model is unavailable; identify configuration-only selections explicitly, for example `Cursor:unknown (selected: Auto)`. +- `Skills-used` lists skills actually used for this contribution. Availability or installation alone does not establish use. Use `none` when no skills were used, or `unknown` when use cannot be established; retain known names alongside `unknown` when the record is incomplete. Tool versions and skill revisions are optional when readily known. + +The person finalizing the commit checks the attribution. When amending or squashing, carry all known contributions into the final message and check that the trailers remain. These entries are contributor-reported attribution, not proof of exact backend model identity or compliance with skill instructions. + +If your coding tool does not load `AGENTS.md`, give it this section when requesting a commit message, or add the note yourself. The same convention applies when committing work copied from a browser chat. + +The `Assisted-by` format follows [OpenSSL's contribution guidance](https://github.com/openssl/openssl/blob/5be87c4438d91d7f6f28265b1d79ad9565731da3/CONTRIBUTING.md#L145). The `Skills-used` trailer is a SkLC convention adapting [PostHog's PR disclosure of agents, models, and invoked skills](https://github.com/PostHog/posthog/blob/574679ee6bff2aa7a286e272b5b418fe49ebc5cd/.github/pull_request_template.md). From 65a0ca520d690997ad64a8cea2250d50f40ed5a4 Mon Sep 17 00:00:00 2001 From: Nicholas Louque Date: Mon, 30 Nov 2026 09:08:14 -0700 Subject: [PATCH 2/3] docs: explain how to find AI model labels Address Scot's review by documenting the Codex session lookup and comparable sources for Claude Code, Cursor, and GitHub Copilot CLI. AI verified the Codex lookup against local sessions, checked the other tools' documentation, and drafted the guidance. Assisted-by: Codex:gpt-6.2-sol Skills-used: openai-docs, code-review --- CONTRIBUTING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 12b5535..8d7271b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -142,3 +142,10 @@ The person finalizing the commit checks the attribution. When amending or squash If your coding tool does not load `AGENTS.md`, give it this section when requesting a commit message, or add the note yourself. The same convention applies when committing work copied from a browser chat. The `Assisted-by` format follows [OpenSSL's contribution guidance](https://github.com/openssl/openssl/blob/5be87c4438d91d7f6f28265b1d79ad9565731da3/CONTRIBUTING.md#L145). The `Skills-used` trailer is a SkLC convention adapting [PostHog's PR disclosure of agents, models, and invoked skills](https://github.com/PostHog/posthog/blob/574679ee6bff2aa7a286e272b5b418fe49ebc5cd/.github/pull_request_template.md). + +#### Finding the model label + +- **Codex:** In `$CODEX_HOME/sessions` (default `~/.codex/sessions`), search the dated subdirectories for the `rollout-*.jsonl` file whose name ends with `CODEX_THREAD_ID` followed by `.jsonl`. Read `payload.model` from the latest `turn_context` for the work you are attributing. If you switched models, check the turns that contributed to the commit. Ask contributing subagents to check their own sessions and report their labels. Use `unknown` if the record is unavailable. [Codex thread ID](https://github.com/openai/codex/tree/main/codex-rs/exec-server#command-metadata) +- **Claude Code:** Read `model.id` from the status line input while doing the work. This field describes the current model, so capture it before switching models. [Claude Code status line](https://code.claude.com/docs/en/statusline) +- **Cursor Agent CLI:** For a run captured with `--print --output-format stream-json`, read the `model` label from the `system` event with `subtype` set to `init`. Treat `Auto` as a selection if the run does not expose the resolved model. [Cursor CLI output format](https://cursor.com/docs/cli/reference/output-format) +- **GitHub Copilot CLI:** Use `/usage` to see the current session's per-model usage. If the session lists multiple models, use the ones you can tie to the contribution. [Copilot CLI session commands](https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/overview#context-management) From d0fe29d40f55000da6e5f10c1d3d20c4cfe6ee35 Mon Sep 17 00:00:00 2001 From: Fnorgh2 Date: Wed, 2 Dec 2026 10:21:50 -0700 Subject: [PATCH 3/3] docs: update Cursor and Grok Build model guidance AI verified the upstream CLI references and updated the model attribution guidance. Assisted-by: Codex:gpt-6.2-sol Skills-used: none --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d7271b..404aeea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -147,5 +147,6 @@ The `Assisted-by` format follows [OpenSSL's contribution guidance](https://githu - **Codex:** In `$CODEX_HOME/sessions` (default `~/.codex/sessions`), search the dated subdirectories for the `rollout-*.jsonl` file whose name ends with `CODEX_THREAD_ID` followed by `.jsonl`. Read `payload.model` from the latest `turn_context` for the work you are attributing. If you switched models, check the turns that contributed to the commit. Ask contributing subagents to check their own sessions and report their labels. Use `unknown` if the record is unavailable. [Codex thread ID](https://github.com/openai/codex/tree/main/codex-rs/exec-server#command-metadata) - **Claude Code:** Read `model.id` from the status line input while doing the work. This field describes the current model, so capture it before switching models. [Claude Code status line](https://code.claude.com/docs/en/statusline) -- **Cursor Agent CLI:** For a run captured with `--print --output-format stream-json`, read the `model` label from the `system` event with `subtype` set to `init`. Treat `Auto` as a selection if the run does not expose the resolved model. [Cursor CLI output format](https://cursor.com/docs/cli/reference/output-format) +- **Cursor Agent CLI (legacy):** For a run captured with `--print --output-format stream-json`, read the `model` label from the `system` event with `subtype` set to `init`. Treat `Auto` as a selection if the run does not expose the resolved model. +- **Grok Build CLI:** For a headless run captured with `--output-format json`, read the model labels from the keys in `modelUsage` when that field is present. [Grok Build CLI output formats](https://github.com/xai-org/grok-build/blob/main/crates/codegen/xai-grok-pager/docs/user-guide/14-headless-mode.md#output-formats) - **GitHub Copilot CLI:** Use `/usage` to see the current session's per-model usage. If the session lists multiple models, use the ones you can tie to the contribution. [Copilot CLI session commands](https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/overview#context-management)