跳到正文
cccskills
免费在 GitHub 公开

pr

Write the pull request for the current branch: the merge mode (squash or rebase), a title that is the changelog line when squashed, and a description per the Pull requests rules, all checked with tools/commit-lint. Also writes GitHub issues from two templates: a feature as a story with a definition of done, a bug with steps to reproduce and expected and actual behaviour. Use when asked to write, draft or open a PR or an issue, to produce a PR title or squash message, or to choose how to merge a PR.

中文简介正在准备中。当前显示原文说明。

famstack-dev/famstack星标 101(GitHub 101 + cccskills 0)
集成工具GitHub

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md7.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Pull request

A PR is squash merged or rebase merged, never with a merge commit. Squashed, the title becomes the commit subject on main and the release-notes line. Rebased, every commit lands as it is and each subject is a release-notes line. docs/agent/dev.md ("Commits: the subject is the changelog", "Pull requests") holds the rules; this file is the procedure. dev.md wins.

1. Read the branch

git fetch origin
git log --reverse --format='%h %s%n%b' origin/main..HEAD
git diff --stat origin/main...HEAD

Read the diff wherever a subject does not state the user-visible change. Report a non-empty HEAD..origin/main as "branch is behind". Do not rebase unasked.

2. Squash or rebase

Count the entries a release-notes reader sees: commits of a shown type (feat, fix, security, perf, docs) plus any commit carrying !, Upgrade: or BREAKING CHANGE:. Tests, refactors and chores serving one of those add no entry.

  • One visible entry: squash. The title is that entry.
  • Several, and every commit stands alone and passes commit-lint: rebase. Say so in the handover, and write the title as the lead change; it is not a changelog line.
  • Several, but mixed with fixups or work in progress: report it. The branch needs cleaning into coherent commits, or splitting. Do not rebase unasked.

Never write a title containing "and".

3. Title

  • Format: type(scope)!: subject. Types and scopes come from the dev.md tables.
  • The scope names what a reader recognises, a stacklet or a bot, never a file.
  • Imperative, lowercase after the colon, no full stop, no identifiers.
  • Name the concrete change, not its effect: add an install hint to restart core on the first start, not say how to finish the agent's first start.
  • Limit 72 characters as commit-lint counts them; dev.md asks for under 70. The (#N) appended at merge does not count.
  • Use ! only when the user must act. The description then carries Upgrade: or BREAKING CHANGE:.
  • Single-commit branch whose subject passes: reuse that subject.

4. Description

## Summary
- <user-visible change, and why>

Upgrade: <required action, as markdown>
Refs: #127
  • One to three bullets. Footers only when they apply.
  • Start with the situation the PR answers, then what it changes: "The agent is beta. After its first ./stack up agent, it can sign in only after a core restart." then "The hints shown after ./stack up agent tell the admin to run ./stack restart core, then ./stack restart agent."
  • Plain technical English: state what the change does. No paraphrase such as "now say so" or "provide the required information".
  • No "Test plan" section. Test output and measurements go in a PR comment.
  • No em dashes. Use a comma, colon, period or parentheses.
  • No Co-Authored-By, no "Generated with" line, no tool link: this repository is public and commit-lint rejects all three.

4b. Read the diff as a reviewer

Check the new and touched code against docs/agent/dev.md, "Clean code: what a reviewer checks". Fix what breaks a rule before opening the PR, or say in the handover which rule it breaks and why.

5. Check

python3 tools/commit-lint --title "<title>"
python3 tools/commit-lint --body "<description>"
python3 tools/commit-lint --range origin/main..HEAD

CI runs the third over every commit in the PR. Fix and re-run until all three pass. Rewording a pushed commit needs a force push: request approval first.

Output: the title, the description in a code block, the three results.

6. Open

Pushing and opening a PR need explicit approval, for every push. With approval:

git push -u origin HEAD
gh pr create --base main --title "<title>" --body-file <file>

Add --draft when asked. Never merge.

Merge

State the merge mode when handing the PR over.

Squash: the repository builds the squash body from the branch's commit messages, not from the PR description. A footer written in the description reaches main only when the merge uses the description as the body: the merge dialog, or gh pr merge --squash --body-file.

Rebase: gh pr merge --rebase. The commits land unchanged, so their footers are the ones that count; one written only in the description is lost.

Issues

Work that is not done in this branch goes into a GitHub issue: something found mid-task, a follow-up, a bug to fix later. One issue per piece of work. Every issue ends with a definition of done, the checks that prove it is finished. Pick the template by kind.

Title. A feature says what becomes possible, in the imperative: "Give CLI plugins a secret lookup instead of a snapshot of every secret". A bug says the symptom as a reader meets it: "Paperless login returns 500 on a first-time signup". No class or function names unless a reader types them.

Feature: a story with a definition of done

## Story
As <an admin | a family member | a stacklet author>, I want <capability>,
so that <outcome>.

## Context
What exists today and why it is not enough. Point at the code
(`lib/stack/stack.py`, `stacklets/<id>/...`), ADRs and PRs.

## Proposal
The change, at the level a reviewer can argue with.
Out of scope: <what this issue does not cover>.

## Definition of done
- [ ] <an observable check: a command and its result, or a behaviour>
- [ ] <a caller-side test that states the behaviour>
- [ ] <docs updated: `docs/stack-reference.md` for framework behaviour>

Example: an admin wants the provider's "My apps" page to show an icon per service. Done when stack up id sets a logo on every registered client that has none, stack up id a second time uploads nothing, and a test drives both runs against a stand-in for the provider's API.

Bug: steps to reproduce, expected and actual behaviour

## Summary
What breaks, for whom, in one sentence.

## Steps to reproduce
1. <from a known state: which stacklets are up, which mode>
2. <the action>
3. <what to look at>

## Expected behaviour
What should happen, and where that is promised (a doc, a test, a spec).

## Actual behaviour
What happens. Error text verbatim and trimmed.

## Environment
`./stack version`, macOS version, OrbStack or Docker Desktop, port or
domain mode, the stacklets involved.

## Cause
If known: the file and why. Otherwise leave the heading out.

## Definition of done
- [ ] <a test that fails before the fix and passes after it>
- [ ] <the steps above now give the expected behaviour>

Example: steps "bring up id and docs in domain mode, open the docs login, choose the provider button as a user whose account is not linked yet". Expected: Paperless creates the account and logs in. Actual: 500, with MultipleObjectsReturned in the Paperless log. Done when a test pins one provider entry per client id.

Rules

  • Examples and reproduction steps use the demo family and example domains (home.example.family), never a real instance, name, address or log excerpt with personal data. This repository is public.
  • No em dashes. No secrets, tokens or passwords, also not in logs.
  • Opening an issue publishes it: ask first. With approval: gh issue create --title "<title>" --body-file <file>.
  • A commit or PR that resolves the issue carries Closes: #N; one that only relates to it carries Refs: #N.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

How I look things up about the family and edit their lists.

中文简介正在准备中。当前显示原文说明。

famstack-dev/famstack1012026年10月26日 更新

Turn the generated release notes into the ones a release publishes. Generates the entries with script/release-notes, then merges entries that describe one change, drops work that never shipped and internal changes, rewrites entries into one consistent voice, and writes the Highlights and Upgrading sections, with an audit that accounts for every generated entry. Use before tagging a release, or when asked to draft, clean up or review release notes.

中文简介正在准备中。当前显示原文说明。

famstack-dev/famstack1012026年10月26日 更新

speaking

免费

How I say something aloud in the house.

中文简介正在准备中。当前显示原文说明。

famstack-dev/famstack1012026年10月26日 更新

KV-cache block alignment padding. No instructions.

中文简介正在准备中。当前显示原文说明。

famstack-dev/famstack1012026年10月26日 更新

查看 famstack-dev 的全部技能

报告此技能的问题