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:
2026-07-02 03:26:25 -04:00
parent 92b449f080
commit 00ec883014
8 changed files with 280 additions and 273 deletions
@@ -1,34 +1,29 @@
# Start Issue Prompt
# Template: start a new issue
You are implementing issue `<issue-number>` in `<repo-name>`.
Copy, fill the `<...>` fields, and paste as the task prompt.
Rules:
```text
Task: implement <issue title / one-line goal>.
- No repository changes unless the issue exists and is claimed.
- Use an isolated branch worktree under `branches/`.
- Branch from latest `<remote>/<default-branch>`.
- Keep the change limited to issue `<issue-number>`.
Rules (llm-project-workflow):
- No repo changes without a tracking issue. If none exists, create one first;
if it can't be created, stop.
- Work only in an isolated branch worktree under branches/. The main checkout
is orchestration/status only.
- Do not self-review or self-merge.
Workflow:
Steps:
1. Verify the orchestration checkout is the right repo and clean.
2. git fetch <remote> --prune; confirm local master == <remote>/master (0 0).
3. Create the issue "<title>" (problem, scope, acceptance) and claim it
(status:in-progress + a "starting work" comment naming the branch).
4. scripts/worktree-start <type>/issue-<n>-<slug> # type = fix|feat|docs
cd branches/<type>-issue-<n>-<slug>
5. Implement the narrow scope only; add/update focused tests if behavior changes.
6. Checks: run the test suite, compile/lint changed files, git diff --check,
and scan the diff for secrets.
7. Commit (issue-linked message), push the branch, open a PR to master.
8. Stop before review/merge — you are the author.
1. Verify the issue exists and is open.
2. Claim it with the project in-progress label.
3. Fetch/prune and confirm local `<default-branch>` matches
`<remote>/<default-branch>`.
4. Create branch `<branch-name>` in `branches/<safe-folder-name>`.
5. Implement only the scoped change.
6. Run `<required-checks>`.
7. Inspect for secrets and unrelated files.
8. Commit, push, and open a PR.
9. Stop before review or merge.
Final handoff:
- issue number/title
- branch name
- isolated worktree path
- files changed
- checks run and results
- PR URL
- reviewer/merge instructions
Handoff: issue #, branch, worktree path, files changed, checks + results, PR URL.
```