From b507a6b667c7841aae175d0ad7b00ffa185051e1 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 4 Aug 2026 13:04:19 +0000 Subject: [PATCH] :recycle: Convert commiter agent to create-commit skill Replace the commiter subagent with a create-commit skill, consistent with the create-pr and create-issue skill patterns. - Remove .opencode/agents/commiter.md - Add .opencode/skills/create-commit/SKILL.md - Update implement-plan.md to use the skill instead of subagent delegation - Document commit body line wrapping at 72 chars in creating-commits memory and skill AI-assisted-by: mimo-v2.5 --- .opencode/agents/commiter.md | 55 ------------------- .opencode/commands/implement-plan.md | 13 ++--- .opencode/skills/create-commit/SKILL.md | 47 ++++++++++++++++ .serena/memories/workflow/creating-commits.md | 2 + 4 files changed, 55 insertions(+), 62 deletions(-) delete mode 100644 .opencode/agents/commiter.md create mode 100644 .opencode/skills/create-commit/SKILL.md diff --git a/.opencode/agents/commiter.md b/.opencode/agents/commiter.md deleted file mode 100644 index a5e128e4d1..0000000000 --- a/.opencode/agents/commiter.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: commiter -description: Git commit assistant -mode: subagent -permission: - read: allow - glob: allow - grep: allow - edit: deny - webfetch: deny - websearch: deny - task: deny - skill: deny - lsp: deny - todowrite: deny - question: deny - external_directory: deny - bash: allow ---- - -## Role - -You are the Penpot commit assistant. You produce git commits that follow the -repository's commit conventions. You do not implement features, review code, or -push branches — you commit. - -## Required Reading - -Before drafting any commit, **read `.serena/memories/workflow/creating-commits.md` -end-to-end**. It is the authoritative source for the commit message format, the -emoji menu, subject/body limits, and the `AI-assisted-by` trailer. Follow it -exactly — do not improvise the format and do not restate its contents here. - -## Pre-commit Workflow - -1. **Stage the files** specified by the calling agent. Do not ask for - confirmation — the calling agent knows exactly which files to commit. -2. Run `git diff --staged` to review the content. If you see secrets (API - keys, tokens, passwords, private keys, `.env` values), debug prints, or - anything that does not match the stated intent, STOP and tell the user - before committing. -3. Following the format in the doc, draft the message and run - `git commit -m "" -m ""` (or `git commit -F -` if the body has - unusual characters). The `AI-assisted-by` trailer value is provided by the - calling agent — use it verbatim. - -## Constraints - -- Do not push. Pushing is a separate workflow handled by the user. -- Do not run `git reset`, `git checkout`, `git restore`, `git clean`, or `rm` — these are destructive operations. -- Do not pass `--author`. Author identity comes from the local git config. -- Do not amend a commit you did not create in this session, unless the user explicitly asks. -- Do not bypass pre-commit hooks (`--no-verify`) unless the user explicitly asks. -- Do not add untracked files that were not created in this session. -- Do not ask questions. The calling agent provides all necessary information. If something is unclear, proceed with what you know and note any assumptions in your response. diff --git a/.opencode/commands/implement-plan.md b/.opencode/commands/implement-plan.md index f6cb42f6b8..20eedb3fe5 100644 --- a/.opencode/commands/implement-plan.md +++ b/.opencode/commands/implement-plan.md @@ -1,5 +1,5 @@ --- -description: Execute a ready plan end-to-end — create a GitHub issue, branch issue-NNNN, implement the plan, then commit via the commiter subagent +description: Execute a ready plan end-to-end — create a GitHub issue, branch issue-NNNN, implement the plan, then commit via the create-commit skill agent: build --- @@ -32,12 +32,11 @@ Implement the prepared plan from the session context. Work methodically, keeping changes focused on what the issue requires. Do not commit — the commit happens in step 4. -## 4. Commit with the commiter subagent +## 4. Commit with the create-commit skill -After the implementation is complete, delegate the commit to the **`commiter`** -subagent. Give it a brief summary of what was implemented and why, the issue -reference (`issue-NNNN`), and the model name you are running as so it sets the -`AI-assisted-by` trailer correctly. The subagent owns the commit format and -conventions. +After the implementation is complete, load the **`create-commit`** skill and +follow its workflow to commit the changes. Provide a brief summary of what was +implemented and why, the issue reference (`issue-NNNN`), and the model name you +are running as so the `AI-assisted-by` trailer is set correctly. Do not push. Pushing is handled separately by the user. diff --git a/.opencode/skills/create-commit/SKILL.md b/.opencode/skills/create-commit/SKILL.md new file mode 100644 index 0000000000..790ba1b585 --- /dev/null +++ b/.opencode/skills/create-commit/SKILL.md @@ -0,0 +1,47 @@ +--- +name: create-commit +description: Stage, review, and commit files following Penpot commit conventions. +--- + +# Skill: create-commit + +Produce a git commit that follows Penpot's commit message conventions. This +skill owns the commit format, staging review, and safety checks — it does not +implement features or push. + +## When to Use + +- After code changes are complete and files need to be committed +- When delegated by a workflow step (e.g. implement-plan) to handle the commit + +## Required Reading + +Before drafting any commit, read `mem:workflow/creating-commits` end-to-end. It +is the authoritative source for the commit message format, the emoji menu, +subject/body limits, and the `AI-assisted-by` trailer. Follow it exactly. + +## Workflow + +1. **Stage the files** specified by the calling context. Do not ask for + confirmation. +2. Run `git diff --staged` to review the content. If you see secrets (API keys, + tokens, passwords, private keys, `.env` values), debug prints, or anything + that does not match the stated intent, **STOP** and tell the user before + committing. +3. Draft the message following the format in the memory doc, wrapping the body + at 72 characters per line, and run: + ```bash + git commit -m "" -m "" + ``` + (or `git commit -F -` if the body has unusual characters). +4. The `AI-assisted-by` trailer value is provided by the calling context — use + it verbatim. + +## Constraints + +- Do not push. Pushing is a separate workflow handled by the user. +- Do not run `git reset`, `git checkout`, `git restore`, `git clean`, or `rm`. +- Do not pass `--author`. Author identity comes from the local git config. +- Do not amend a commit you did not create in this session, unless explicitly asked. +- Do not bypass pre-commit hooks (`--no-verify`) unless explicitly asked. +- Do not add untracked files that were not created in this session. diff --git a/.serena/memories/workflow/creating-commits.md b/.serena/memories/workflow/creating-commits.md index d37d4672a5..50f460ed28 100644 --- a/.serena/memories/workflow/creating-commits.md +++ b/.serena/memories/workflow/creating-commits.md @@ -14,6 +14,8 @@ automatically pull the identity from the local git config `user.name` and `user. :emoji: Subject line (imperative, capitalized, no period, <=70 chars) Body explaining what changed and why. +Wrap lines at 72 characters — git log and tooling +render long lines poorly. Keep each line concise. AI-assisted-by: model-name ```