chore(agents): make Claude Code write Assisted-by instead of Co-Authored-By #313

Merged
Defame1297 merged 4 commits from chore/claude-attribution-settings into main 2026-11-23 13:06:02 +00:00
Owner

What and why

Closes #152

Adds the attribution block to the tracked .claude/settings.json, next to the disableSkillShellExecution key that #196 added. It applies decision 9 of #94: commit and pr are set to Assisted-by: Claude Code, and sessionUrl is false, so Claude Code adds no Co-Authored-By:, no Claude-Session: trailer and no session link. The setting accepts only a fixed string, so the model is not named; [:<model>] is optional under the rule in docs/contributing/ai-assistance.md.

PR #297 recorded #196's retest as the pass case: apm audit --ci on apm-cli 0.36.1 passed with this exact block in the file. So the block goes in the tracked file rather than in per-user settings.

Also in this pull request (maintainer's request): .claude/* is added to the IGNORED list of scripts/select_molecule_scenarios.py, beside apm.yml, with a test. No scenario, role, workflow or script reads .claude/, so a change there no longer runs every Molecule scenario. The workflow runs the selector from main's copy, so this applies from the next pull request on; this one still runs everything.

Not changed:

  • REUSE.toml: its path = "**" default already covers the file.
  • No changelog fragment: .claude is in galaxy.yml build_ignore, and the selector is CI tooling, so consumers see nothing.
  • Nothing else under .claude/ is tracked. skills/, agents/ and settings.local.json stay ignored.

Verified

  • python3 -m json.tool .claude/settings.json: the file is valid JSON.
  • python3 -m unittest discover -s tests/scripts: 243 tests OK. The new test_agent_tool_settings_select_nothing failed before the IGNORED entry was added and passes after it.
  • pre-commit run --all-files: exit 0.
  • ansible-test sanity (pre-push hook): passed on both pushes.
  • The setting takes effect. In the session that wrote this change, Claude Code's attribution instruction switched to Assisted-by: Claude Code, with no Co-Authored-By: or Claude-Session: line, once the block was in the file. It switched back to the defaults while the edit was stashed. Both commits end with Assisted-by: Claude Code only.
  • code-review skill on the settings commit, standards and spec axes: no findings.

Not verified

  • apm audit --ci on this branch. With the pinned 0.36.1, the audit fails the same way on main and on this branch: skill-subset-consistency fails, and drift is skipped. Both come from stale skills deployed locally by apm 0.28.0, which apm install refuses to overwrite. This change does not cause it. The drift result for this block comes from #297's retest, not from a rerun here.
  • The acceptance check in a fresh session. No commit was made from a Claude Code session started after this file was in place; the live switch above is the evidence instead.
  • The narrowed Molecule selection in CI: it is first seen on a pull request after this one merges.
  • CI Lint, Build and Molecule: they run on this pull request.

  • I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.

Assisted-by: Claude Code

## What and why Closes #152 Adds the `attribution` block to the tracked `.claude/settings.json`, next to the `disableSkillShellExecution` key that #196 added. It applies decision 9 of #94: `commit` and `pr` are set to `Assisted-by: Claude Code`, and `sessionUrl` is `false`, so Claude Code adds no `Co-Authored-By:`, no `Claude-Session:` trailer and no session link. The setting accepts only a fixed string, so the model is not named; `[:<model>]` is optional under the rule in `docs/contributing/ai-assistance.md`. PR #297 recorded #196's retest as the pass case: `apm audit --ci` on apm-cli 0.36.1 passed with this exact block in the file. So the block goes in the tracked file rather than in per-user settings. **Also in this pull request (maintainer's request):** `.claude/*` is added to the IGNORED list of `scripts/select_molecule_scenarios.py`, beside `apm.yml`, with a test. No scenario, role, workflow or script reads `.claude/`, so a change there no longer runs every Molecule scenario. The workflow runs the selector from `main`'s copy, so this applies from the next pull request on; this one still runs everything. **Not changed:** - `REUSE.toml`: its `path = "**"` default already covers the file. - No changelog fragment: `.claude` is in `galaxy.yml` `build_ignore`, and the selector is CI tooling, so consumers see nothing. - Nothing else under `.claude/` is tracked. `skills/`, `agents/` and `settings.local.json` stay ignored. ## Verified - `python3 -m json.tool .claude/settings.json`: the file is valid JSON. - `python3 -m unittest discover -s tests/scripts`: 243 tests OK. The new `test_agent_tool_settings_select_nothing` failed before the IGNORED entry was added and passes after it. - `pre-commit run --all-files`: exit 0. - `ansible-test sanity` (pre-push hook): passed on both pushes. - **The setting takes effect.** In the session that wrote this change, Claude Code's attribution instruction switched to `Assisted-by: Claude Code`, with no `Co-Authored-By:` or `Claude-Session:` line, once the block was in the file. It switched back to the defaults while the edit was stashed. Both commits end with `Assisted-by: Claude Code` only. - `code-review` skill on the settings commit, standards and spec axes: no findings. ## Not verified - **`apm audit --ci` on this branch.** With the pinned 0.36.1, the audit fails the same way on `main` and on this branch: `skill-subset-consistency` fails, and drift is skipped. Both come from stale skills deployed locally by apm 0.28.0, which `apm install` refuses to overwrite. This change does not cause it. The drift result for this block comes from #297's retest, not from a rerun here. - **The acceptance check in a fresh session.** No commit was made from a Claude Code session started after this file was in place; the live switch above is the evidence instead. - **The narrowed Molecule selection in CI**: it is first seen on a pull request after this one merges. - **CI Lint, Build and Molecule**: they run on this pull request. --- - [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. Assisted-by: Claude Code
Claude added this to the Open to contributors milestone 2026-11-23 10:36:10 +00:00
Claude added 1 commit 2026-11-23 10:36:11 +00:00
chore(agents): make Claude Code write Assisted-by instead of Co-Authored-By
Build / build (pull_request) Canceled after 0s
Lint / lint (pull_request) Canceled after 0s
Molecule / molecule (pull_request) Canceled after 0s
bfdbc9b42b
Set attribution in the tracked .claude/settings.json: commit and pull
request attribution become "Assisted-by: Claude Code", and sessionUrl is
false so no Claude-Session trailer or session link is added. The setting
takes only a fixed string, so the model is not named.

Closes #152

Assisted-by: Claude Code
CODEOWNERS rules requested review from Defame1297 2026-11-23 10:36:11 +00:00
Defame1297 approved these changes 2026-11-23 10:40:38 +00:00
Dismissed
Defame1297 scheduled this pull request to auto merge when all checks succeed 2026-11-23 10:40:44 +00:00
Defame1297 added 1 commit 2026-11-23 10:42:09 +00:00
ci(molecule): skip scenarios for a change under .claude/ only
Build / build (pull_request) Successful in 14s
Molecule / molecule (pull_request) Canceled after 0s
Lint / lint (pull_request) Canceled after 23s
fa661be5c2
No scenario reads .claude/: Claude Code reads it on a contributor's
machine. Add it to the IGNORED list beside apm.yml, so a change to the
agent settings or apm-deployed hooks no longer runs every scenario.

Assisted-by: Claude Code
Defame1297 dismissed Defame1297's review 2026-11-23 10:42:09 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

CODEOWNERS rules requested review from Defame1297 2026-11-23 10:42:09 +00:00
Defame1297 approved these changes 2026-11-23 10:43:01 +00:00
Defame1297 added 1 commit 2026-11-23 10:45:51 +00:00
Merge branch 'main' into chore/claude-attribution-settings
Build / build (pull_request) Successful in 18s
Lint / lint (pull_request) Successful in 1m30s
Molecule / molecule (pull_request) Successful in 11m34s
5d9a26c1a6
Defame1297 added 1 commit 2026-11-23 12:50:43 +00:00
Merge branch 'main' into chore/claude-attribution-settings
Build / build (pull_request) Successful in 17s
Lint / lint (pull_request) Successful in 1m13s
Molecule / molecule (pull_request) Successful in 11m57s
55e0f6ad93
Defame1297 merged commit e10c973dc5 into main 2026-11-23 13:06:02 +00:00
Defame1297 deleted branch chore/claude-attribution-settings 2026-11-23 13:06:02 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#313