docs: add portable llm-project-workflow skill + templates (#46)
Extract the project's operating rules into a reusable, project-agnostic skill so any repo can adopt the same safe LLM workflow. - skills/llm-project-workflow/SKILL.md: issue-first; isolated branch worktrees (main checkout = orchestration only); distinct author/reviewer identities and profile safety (secrets by reference only; stop if authenticated user == PR author); branch naming; start/review/merge/cleanup workflows; fail-closed cases; recovery patterns; and an "Adapting to a project" table for the forge-specific names. - templates/: copy/paste prompts for start-issue, review-pr, merge-pr, recover-bad-state, worktree-cleanup. - Link the skill from README.md and docs/llm-workflow-runbooks.md (the runbook is framed as the Gitea-specific application of the portable skill). Docs-only; no code, no secrets, safe placeholder examples only. No change to MCP runtime, Gitea API, credential storage, or worktree helpers. Checks: full suite 287 passed / 0 failures; git diff --check clean; secret scan of skills/ clean. Closes #46. Refs #38, #39. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,43 +1,28 @@
|
||||
# Merge PR Prompt
|
||||
# Template: merge a PR (eligible reviewer only)
|
||||
|
||||
You are the merge operator for PR `<pr-number>` in `<repo-name>`.
|
||||
Copy, fill the `<...>` fields, and paste as the task prompt.
|
||||
|
||||
Hard gate:
|
||||
```text
|
||||
Task: merge PR #<pr> for issue #<n> if it is eligible and checks pass.
|
||||
|
||||
- Verify authenticated identity before reviewing or merging.
|
||||
- Verify PR author.
|
||||
- If authenticated user matches the PR author, stop immediately.
|
||||
- Merge only if assigned merge duty and reviewer-eligible.
|
||||
Rules (llm-project-workflow):
|
||||
- Only an eligible, NON-author reviewer merges. If authenticated user == PR
|
||||
author → STOP.
|
||||
- Do not merge unless the PR is open, mergeable, and its checks/review pass.
|
||||
- No force-merge, no bypassing branch protections.
|
||||
|
||||
Workflow:
|
||||
Steps:
|
||||
1. Verify authenticated identity + active profile.
|
||||
2. Confirm PR #<pr>: author (not you), state open, mergeable, review approved.
|
||||
3. If any gate fails → STOP and report.
|
||||
4. Merge with explicit confirmation (e.g. confirmation="MERGE PR <pr>"),
|
||||
optionally pinning the reviewed head SHA / changed-file set.
|
||||
5. Confirm remote master now contains the merge commit.
|
||||
|
||||
1. Confirm PR `<pr-number>` is open and targets `<default-branch>`.
|
||||
2. Confirm the PR head is still `<reviewed-commit>` or includes it.
|
||||
3. Confirm changed files still match the reviewed file list.
|
||||
4. Confirm previous validation still applies or rerun required checks.
|
||||
5. Merge through the gated project merge workflow.
|
||||
6. Confirm remote `<default-branch>` contains the merge.
|
||||
7. Close or release linked issue `<issue-number>` according to project policy.
|
||||
8. Remove `status:in-progress` if applicable.
|
||||
9. Delete the merged remote branch if policy allows.
|
||||
10. Remove local PR branch and branch worktree only after merge is confirmed.
|
||||
11. Fetch/prune.
|
||||
12. Confirm main checkout is clean/current.
|
||||
Then run the cleanup template (worktree-cleanup.md):
|
||||
- close/release issue #<n>, remove status:in-progress
|
||||
- delete remote branch, remove local branch + worktree folder
|
||||
- fetch/prune; confirm main checkout is clean and current (0 0).
|
||||
|
||||
Stop if:
|
||||
|
||||
- authenticated user is the PR author
|
||||
- PR head changed after review
|
||||
- PR is closed but not merged
|
||||
- tests/checks fail
|
||||
- cleanup would delete unmerged work
|
||||
|
||||
Report:
|
||||
|
||||
- authenticated user
|
||||
- PR author
|
||||
- eligibility result
|
||||
- merge commit/hash
|
||||
- issue final state
|
||||
- branch/worktree cleanup result
|
||||
- final PR URL
|
||||
Handoff: reviewer identity, merge result + commit, cleanup done, issue closed.
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user