Skip to content

smart-commit.sh can't set a message or trailers, so core.adf's commit rule is unfollowable #459

Done

Description

@stackbilt-admin

Problem

.ai/core.adf (load-bearing CONSTRAINTS, lines 26–27) tells every agent:

Commits via scripts/smart-commit.sh only (never raw git add/commit)

But scripts/smart-commit.sh can't produce a commit an agent or maintainer would actually want:

  • It takes only --dry-run and --merge; any other argument exits 2. There is no way to pass a message, body or trailer.
  • commit_message_for_group() hardcodes the subject per group, e.g. every package change becomes feat(<scope>): apply logical updates, even for a fix, docs or refactor. Wrong Conventional Commit types also feed the changelog and semver reasoning that core.adf treats as governed contracts.
  • No body, no Refs #N / Closes #N, no Co-Authored-By trailer, which agent tooling (Claude Code, Codex and others) adds by convention.

So the rule is unfollowable for normal work. In the #437 work (PRs #452–#458) every agent hit it and fell back to plain git commit with Conventional Commits, which means the repo's own load-bearing rule is silently broken on every commit. That's the opposite of what we want agents to learn from Charter: a rule that binds should be one you can follow.

Options

  1. Make the script usable: accept -m/--message, -F/--file (full message incl. body and trailers) and --type/--scope overrides; keep the grouped default when none are given. Keep hooks running (no --no-verify).
  2. Relax the rule: change core.adf to "Use Conventional Commits; scripts/smart-commit.sh is available to group mixed changes" and keep the hooks as the real gate.

Recommendation: 1 and 2 together. The pre-commit hook (tsc + adf evidence) is what actually enforces quality; the script is a convenience, so the rule shouldn't make it mandatory.

Acceptance

  • An agent can make a commit with a custom subject, body and trailer while following core.adf as written.
  • scripts/smart-commit.sh --dry-run still previews grouped commits.
  • Pre-commit hooks still run on every path.

Part of #437 (an agent-facing rule that agents can't follow costs trust in all the others).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugepic:preflight

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions