Skip to content

feature request: control into the message formatting of the 1-click commit tool #989

Description

@SeanCassiere

The 1-click to commit is nice, but limited.

It generates simple commit messages, but this becomes a bit of a blocker when you are committing into a codebase that has rules as to how your commit messages should be structured.

Currently, I've got the commit messages rules described in my AGENTS.md, and this is the workflow I use directly in the chat interface of the other tools (Codex, OpenCode, etc.). Pretty much typing in a message like "OK, commit these changes" and it picks up the rules.

Of course, this approach of loading up the entire AGENTS.md wouldn't work for T3Code, but perhaps we could have a global (or project) level setting, where commit formatting rules can be described, and in-turn this'd be sent over (in-addition to whatever T3Code instructions are there) to the model doing the actual commit message generation.

Activity

  1. shivamhwp commented on Mar 25, 2026

    @shivamhwp
    Collaborator

    like isn't sending the same prompt following the agents.md in t3code @SeanCassiere ?

  2. SeanCassiere commented on Mar 25, 2026

    @SeanCassiere
    Author

    like isn't sending the same prompt following the agents.md in t3code @SeanCassiere ?

    @shivamhwp that would be the idea, but the there's two problems right now.

    1. Right now, it does not follow what's in the AGENTS.md file. Rather, its got its own isolated prompt for generating the commit message.
    2. I'm not sure if injecting the entire AGENTS.md is a good idea here where it'll inject a whole set of other instructions into context window which isn't needed, since the output is just meant to be a commit message. Whilst, its good practice to have short AGENTS.md files, you can guarantee that existing projects have HUGE ones and would just muddy things up.

    Also, not to mention, having in an AGENTS.md is just one way of doing it. Other projects, might have committing be a Skill instead or outright have them instead live in their CONTRIBUTING.md policy.

    Edit: Right now, this is the prompt explicitly controlling the commit messages.

    export function buildCommitMessagePrompt(input: CommitMessagePromptInput) {
    const wantsBranch = input.includeBranch;
    const prompt = [
    "You write concise git commit messages.",
    wantsBranch
    ? "Return a JSON object with keys: subject, body, branch."
    : "Return a JSON object with keys: subject, body.",
    "Rules:",
    "- subject must be imperative, <= 72 chars, and no trailing period",
    "- body can be empty string or short bullet points",
    ...(wantsBranch
    ? ["- branch must be a short semantic git branch fragment for this change"]
    : []),
    "- capture the primary user-visible or developer-visible change",
    "",
    `Branch: ${input.branch ?? "(detached)"}`,
    "",
    "Staged files:",
    limitSection(input.stagedSummary, 6_000),
    "",
    "Staged patch:",
    limitSection(input.stagedPatch, 40_000),
    ].join("\n");


    Thinking on this further, now with a few weeks of usage, I'm wondering does it make more sense to have the commit button be hidden on a per-project level 🤔.

    In its current form, this 1-click commit tool, really has no use for me, while the tooling to Push the branch and View the PR certainly have good value to them.

    We'll see what happens 👀

  3. shivamhwp commented on Mar 25, 2026

    @shivamhwp
    Collaborator

    no not injecting, i think it should automatically respect agents.md. i'll look into it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions