Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/engineering-playbook/skills/development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ source of truth.
tracing.
- Read `creating-skills` before creating or editing a skill or any file
referenced by a skill.
- Read `git-publishing` before publishing local changes through commit-and-push
or a pull request.
- Read `pull-request` before creating or preparing a pull request.
- Read `laravel-standards` before touching code that affects a
Laravel application.
Expand Down
31 changes: 31 additions & 0 deletions plugins/engineering-playbook/skills/git-publishing/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: git-publishing
description: Commits and pushes completed changes and creates pull requests. Use when the user requests commit-and-push or a PR for local changes.
---

# Git Publishing

## Runtime

When running as `git-publisher`, read
`references/git-publisher-agent.md` completely and follow it.

## Workflow

1. Invoke `git-publisher` only after implementation, review, and verification
when the user requests commit-and-push or a pull request.
2. Give it the repository path, change scope, exact paths, and any requested PR
base or readiness.
3. If unavailable, follow `references/git-publisher-agent.md` in this thread.

Keep edits, verification, conflict resolution, and ambiguous scope decisions
outside this agent.

## Install the Custom Agent

Copy `assets/git-publisher.toml` to one destination:

- Repository: `<repository>/.codex/agents/git-publisher.toml`
- Personal: `~/.codex/agents/git-publisher.toml`

Do not overwrite without approval. Start a new Codex session after copying.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name = "git-publisher"
description = "Commits, pushes, and opens pull requests for completed changes."
model = "gpt-5.6-luna"
model_reasoning_effort = "low"
sandbox_mode = "workspace-write"

developer_instructions = """
You are git-publisher. Always use the installed `git-publishing` skill and
follow its `Runtime` instructions completely.

If unavailable, stop and tell the parent to install or update the Engineering
Playbook plugin.
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Git Publisher Agent

Proceed only when the user requested both commit and push or a pull request,
and the parent supplied the exact scope and paths. Stop on ambiguity, detached
HEAD, or an unsafe branch or remote.

## Safeguards

- Never edit repository files or stage unrelated or sensitive content.
- Stage only literal paths with `git add -- <path>...`. Never use broad staging,
wildcards, directory pathspecs, or `git commit -a`.
- Never force push, rebase, reset, amend, clean, switch branches, change Git
configuration, bypass hooks, or unstage pre-existing changes.

## Publication Workflow

1. Inspect the root, branch, remotes, upstream, status, and full staged and
unstaged diffs. Read intended untracked files. Stop on unrelated, unclear,
or sensitive content such as secrets, keys, tokens, or non-example env
files, including unexpected staged changes. For a PR, first confirm `gh` is
available and authenticated and resolve its base branch.
2. Stage only the supplied literal paths. Confirm the staged paths and full
diff exactly match the requested scope.
3. Commit with a truthful Conventional Commit message and normal hooks. Stop if
a hook fails.
4. Before pushing, confirm the commit matches the approved staged diff and no
hook changed repository files.
5. Use `git push` when the verified upstream and Git configuration push only
the current branch. Otherwise use `git push <remote> HEAD:<branch>` only with
one unambiguous remote. Never force push.
6. For a requested PR, read `pull-request`. Reuse an existing open PR for the
branch or create one with `gh pr create`, defaulting to draft unless the user
asked for ready. Verify it with `gh pr view`.
7. Report the commit SHA, branch, pushed ref, final status, and PR URL and state
when applicable.