From 4f71d910e600486e9e9239823c7153d7f3a1c825 Mon Sep 17 00:00:00 2001 From: Bunyamin inan Date: Wed, 15 Jul 2026 22:24:20 +0200 Subject: [PATCH 1/2] feat: add Luna Git publisher agent --- .../skills/development/SKILL.md | 2 ++ .../skills/git-publishing/SKILL.md | 29 ++++++++++++++++++ .../git-publishing/assets/git-publisher.toml | 13 ++++++++ .../references/git-publisher-agent.md | 30 +++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 plugins/engineering-playbook/skills/git-publishing/SKILL.md create mode 100644 plugins/engineering-playbook/skills/git-publishing/assets/git-publisher.toml create mode 100644 plugins/engineering-playbook/skills/git-publishing/references/git-publisher-agent.md diff --git a/plugins/engineering-playbook/skills/development/SKILL.md b/plugins/engineering-playbook/skills/development/SKILL.md index 836e293..839b805 100644 --- a/plugins/engineering-playbook/skills/development/SKILL.md +++ b/plugins/engineering-playbook/skills/development/SKILL.md @@ -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 committing and pushing when the user explicitly + requests both operations. - Read `pull-request` before creating or preparing a pull request. - Read `laravel-standards` before touching code that affects a Laravel application. diff --git a/plugins/engineering-playbook/skills/git-publishing/SKILL.md b/plugins/engineering-playbook/skills/git-publishing/SKILL.md new file mode 100644 index 0000000..284c3e4 --- /dev/null +++ b/plugins/engineering-playbook/skills/git-publishing/SKILL.md @@ -0,0 +1,29 @@ +--- +name: git-publishing +description: Commits and pushes completed changes safely. Use only when the user explicitly requests both operations. +--- + +# 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. +2. Give it the repository path, change scope, and exact paths to commit. +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: `/.codex/agents/git-publisher.toml` +- Personal: `~/.codex/agents/git-publisher.toml` + +Do not overwrite without approval. Start a new Codex session after copying. diff --git a/plugins/engineering-playbook/skills/git-publishing/assets/git-publisher.toml b/plugins/engineering-playbook/skills/git-publishing/assets/git-publisher.toml new file mode 100644 index 0000000..080ac3f --- /dev/null +++ b/plugins/engineering-playbook/skills/git-publishing/assets/git-publisher.toml @@ -0,0 +1,13 @@ +name = "git-publisher" +description = "Commits and pushes completed changes safely." +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. +""" diff --git a/plugins/engineering-playbook/skills/git-publishing/references/git-publisher-agent.md b/plugins/engineering-playbook/skills/git-publishing/references/git-publisher-agent.md new file mode 100644 index 0000000..9b77db6 --- /dev/null +++ b/plugins/engineering-playbook/skills/git-publishing/references/git-publisher-agent.md @@ -0,0 +1,30 @@ +# Git Publisher Agent + +Proceed only when the user explicitly requested both commit and push 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 -- ...`. 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. +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 HEAD:` only with + one unambiguous remote. Never force push. +6. Report the commit SHA, subject, branch, remote, pushed ref, and final status. From 09939ad30d7b71e0b2e897c5a0a4b48eae57effd Mon Sep 17 00:00:00 2001 From: Bunyamin inan Date: Wed, 15 Jul 2026 22:26:58 +0200 Subject: [PATCH 2/2] feat: add pull request publishing --- .../skills/development/SKILL.md | 4 ++-- .../skills/git-publishing/SKILL.md | 8 +++++--- .../git-publishing/assets/git-publisher.toml | 2 +- .../references/git-publisher-agent.md | 15 ++++++++++----- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/plugins/engineering-playbook/skills/development/SKILL.md b/plugins/engineering-playbook/skills/development/SKILL.md index 839b805..1557c98 100644 --- a/plugins/engineering-playbook/skills/development/SKILL.md +++ b/plugins/engineering-playbook/skills/development/SKILL.md @@ -21,8 +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 committing and pushing when the user explicitly - requests both operations. +- 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. diff --git a/plugins/engineering-playbook/skills/git-publishing/SKILL.md b/plugins/engineering-playbook/skills/git-publishing/SKILL.md index 284c3e4..3862f83 100644 --- a/plugins/engineering-playbook/skills/git-publishing/SKILL.md +++ b/plugins/engineering-playbook/skills/git-publishing/SKILL.md @@ -1,6 +1,6 @@ --- name: git-publishing -description: Commits and pushes completed changes safely. Use only when the user explicitly requests both operations. +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 @@ -12,8 +12,10 @@ When running as `git-publisher`, read ## Workflow -1. Invoke `git-publisher` only after implementation, review, and verification. -2. Give it the repository path, change scope, and exact paths to commit. +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 diff --git a/plugins/engineering-playbook/skills/git-publishing/assets/git-publisher.toml b/plugins/engineering-playbook/skills/git-publishing/assets/git-publisher.toml index 080ac3f..6fc6dc8 100644 --- a/plugins/engineering-playbook/skills/git-publishing/assets/git-publisher.toml +++ b/plugins/engineering-playbook/skills/git-publishing/assets/git-publisher.toml @@ -1,5 +1,5 @@ name = "git-publisher" -description = "Commits and pushes completed changes safely." +description = "Commits, pushes, and opens pull requests for completed changes." model = "gpt-5.6-luna" model_reasoning_effort = "low" sandbox_mode = "workspace-write" diff --git a/plugins/engineering-playbook/skills/git-publishing/references/git-publisher-agent.md b/plugins/engineering-playbook/skills/git-publishing/references/git-publisher-agent.md index 9b77db6..614c4c3 100644 --- a/plugins/engineering-playbook/skills/git-publishing/references/git-publisher-agent.md +++ b/plugins/engineering-playbook/skills/git-publishing/references/git-publisher-agent.md @@ -1,8 +1,8 @@ # Git Publisher Agent -Proceed only when the user explicitly requested both commit and push and the -parent supplied the exact scope and paths. Stop on ambiguity, detached HEAD, or -an unsafe branch or remote. +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 @@ -17,7 +17,8 @@ an unsafe branch or remote. 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. + 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 @@ -27,4 +28,8 @@ an unsafe branch or remote. 5. Use `git push` when the verified upstream and Git configuration push only the current branch. Otherwise use `git push HEAD:` only with one unambiguous remote. Never force push. -6. Report the commit SHA, subject, branch, remote, pushed ref, and final status. +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.