Skip to content

Commit f2c5d32

Browse files
authored
docs(agents): add internal meta-issue-creation and meta-pr-creation skills (#919)
* docs(agents): add internal meta-issue-creation and meta-pr-creation skills Agent-authored issues and PRs on this repo have had no documented structure. These two skills capture the conventions that worked in practice: Background / Problem / Proposal issue sections written for a reader new to CipherStash, signed-commit verification and the rebase recipe for an unsigned commit, the changeset/skills/meta-file checklist by pointer to AGENTS.md, and the reference traps (bare #N autolinks; Linear CIP- numbers never appear on GitHub). They live in .claude/skills/ deliberately: skills/ ships to customers inside the stash tarball via packages/cli/tsup.config.ts, and these are internal-only. * docs(agents): PRs open as drafts; ready-for-review needs user say-so
1 parent 67b137a commit f2c5d32

2 files changed

Lines changed: 165 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
name: meta-issue-creation
3+
description: How an agent files a GitHub issue on cipherstash repos — required structure (Background / Problem / Proposal), dumbed-down wording rules, and pre-filing checks. Use whenever drafting or filing an issue on this repo or a sibling CipherStash repo (encrypt-query-language, protectjs-ffi, …).
4+
---
5+
6+
# Filing issues as an agent
7+
8+
These are **internal** skills for agents working on CipherStash repos. They are
9+
deliberately outside `skills/` — everything in that directory ships to
10+
customers inside the `stash` tarball; nothing in `.claude/skills/` does.
11+
12+
## Before filing anything
13+
14+
1. **Search for existing coverage** — open *and* closed, this repo *and* the
15+
sibling repo the problem might belong to:
16+
17+
```bash
18+
gh search issues --repo cipherstash/stack "<term>" --limit 30 --json number,title,state
19+
```
20+
21+
A closed issue that covers your problem is a finding, not a dead end — check
22+
*why* it closed (linked PR? shipped artifact? silent close?) before filing a
23+
duplicate. Reopening with a comment often beats a new issue.
24+
2. **Verify every mechanical claim** against code or the installed package
25+
before asserting it. Cite `file:line`. Separate what you **verified** from
26+
what is **plausible** — say which is which in the issue.
27+
3. **Pick the right repo.** A problem caused upstream (EQL SQL, prisma-next,
28+
protect-ffi) gets its issue upstream, with a consumer-impact issue here only
29+
if this repo needs its own mitigation. Cross-reference with the full
30+
`owner/repo#N` form so links work from both sides.
31+
32+
## Structure
33+
34+
Required sections, in this order:
35+
36+
- **Background** — orient a reader who is *new to CipherStash, stack, and EQL*.
37+
One short paragraph: what the relevant piece does and why it exists. Define
38+
every product term and acronym at first use ("EQL — the SQL library we
39+
install into the customer's database as the `eql_v3` schema").
40+
- **Problem** — the mechanism (what actually happens, step by step), then the
41+
impact (who hits it, when, how often), then why nothing catches it today.
42+
A concrete failure narrative beats an abstraction: "queries slow from
43+
instant to scan-every-row, silently" — not "performance degradation may
44+
occur".
45+
- **Proposal** — numbered, concrete steps. If the full fix is large, include a
46+
cheap interim step that could ship first. State the failure behaviour you
47+
want ("fail loudly listing the statements — a loud failure beats a silent
48+
deletion").
49+
50+
Optional sections, when they earn their place:
51+
52+
- **Affected versions** — when the problem is version-bounded.
53+
- **Evidence / Verification** — commands run, output observed, `file:line`.
54+
- **Relationship to other work** — links to sibling issues, and what each one
55+
does/doesn't cover. After filing, leave a short cross-link comment **on the
56+
related issues pointing back** — links must work in both directions or one
57+
side is never found.
58+
59+
## Wording
60+
61+
Dumbed down, always. Assume the reader joined yesterday:
62+
63+
- Short sentences. Plain verbs. No internal shorthand or codenames.
64+
- Every acronym expanded at first use, even "obvious" ones (EQL, ZeroKMS, PSL).
65+
- Say what breaks in the user's world, not just in the code's world.
66+
- Titles are symptom-first and name the command or package:
67+
`` `stash eql upgrade` silently deletes search indexes — save and restore them ``
68+
beats "Improve EQL upgrade robustness".
69+
- Write `#N` **only** for a real GitHub issue or PR reference — GitHub
70+
autolinks every `#N`, so "step #2 of the plan" mints a bogus link to issue 2.
71+
Write "step 2", "item 3" instead.
72+
- **Never** reference internal Linear issues (`CIP-…` numbers) anywhere on
73+
GitHub — issues, PRs, comments, commit messages. GitHub is public; Linear is
74+
not. GitHub refs are fine.
75+
76+
## Mechanics
77+
78+
- `gh issue create --repo cipherstash/<repo> --title '…' --label <label> --body "…"`.
79+
- Reuse existing labels (`enhancement`, `bug`, `SDK`, …) — check with
80+
`gh label list` rather than inventing new ones.
81+
- Sibling skill: [meta-pr-creation](../meta-pr-creation/SKILL.md) for the PR
82+
that eventually closes the issue.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
name: meta-pr-creation
3+
description: How an agent authors branches, commits, and pull requests on cipherstash/stack — naming, signed commits, the changeset/skills/meta-file checklist, and PR body structure with dumbed-down wording. Use when committing work or opening/updating a PR.
4+
---
5+
6+
# Authoring PRs as an agent
7+
8+
Internal skill — lives in `.claude/skills/` on purpose. `skills/` ships to
9+
customers inside the `stash` tarball; this must not.
10+
11+
## Branch and commits
12+
13+
- Branch names are type-prefixed slugs: `docs/skill-psl-functional-indexes`,
14+
`fix/…`, `feat/…`, `chore/…`. Never commit to `main`.
15+
- Commit subjects are conventional: `type(scope): imperative summary` —
16+
`docs(skills): …`, `fix(stack-prisma): …`. The body explains **why** and the
17+
mechanism, not a list of what changed (the diff shows that). Reference the
18+
GitHub issue the commit serves.
19+
- **Commits must be signed.** `commit.gpgsign` is on, but verify before
20+
pushing:
21+
22+
```bash
23+
git log --format='%h %G? %s' main..HEAD # G = signed, N = unsigned
24+
```
25+
26+
An unsigned commit (`N`) in the stack: `git rebase --force-rebase main`
27+
re-commits everything signed, then `git push --force-with-lease`. Always
28+
`--force-with-lease`, never bare `--force`.
29+
30+
## Before opening the PR
31+
32+
The authoritative checklist is `AGENTS.md` § "Adding Features Safely" — read
33+
it, don't work from memory. The three most-missed items:
34+
35+
1. **Changeset** — required when the change touches a published package's
36+
surface, *including* a `skills/`-only change (those ship in the `stash`
37+
tarball, so they need a `stash` patch changeset). A `.claude/`-only change
38+
is internal: no changeset.
39+
2. **Skills check** — a change to a public API, CLI surface, or user-facing
40+
workflow must fix the affected `skills/*/SKILL.md` in the same PR
41+
(package→skill map in `AGENTS.md`).
42+
3. **Meta files** — adding/removing/renaming a package, example, skill, or
43+
subpath export must update `AGENTS.md` Repository Layout and `SECURITY.md`.
44+
45+
Then run: `pnpm run code:fix`, `pnpm --filter <pkg> build`,
46+
`pnpm --filter <pkg> test`.
47+
48+
## PR body
49+
50+
Same wording rule as [meta-issue-creation](../meta-issue-creation/SKILL.md):
51+
**dumbed down** — assume the reviewer is new to CipherStash, stack, and EQL.
52+
Define product terms at first use; say what breaks or improves in the user's
53+
world, not just the code's.
54+
55+
Sections, in order:
56+
57+
- **Summary** — what and why, two or three plain sentences. Lead with the
58+
user-visible effect.
59+
- **Changes** — grouped by area, one line each.
60+
- **Verification** — exactly what was run and what it showed. Honest: a
61+
failing or skipped check is stated, not omitted. "Verified against the 0.17
62+
dist" beats "should work".
63+
- **Related** — `Closes #N` / `Refs #N` for the GitHub issues this serves;
64+
cross-repo refs in full `owner/repo#N` form.
65+
- **Review notes** *(optional)* — where to look first, and anything
66+
deliberately deferred with the reason.
67+
68+
Reference wording traps (same as issues):
69+
70+
- `#N` **only** as a real GitHub issue/PR reference — GitHub autolinks every
71+
`#N`, so "option #2" mints a bogus link. Write "option 2".
72+
- **Never** reference internal Linear issues (`CIP-…`) in PRs, commits, or
73+
comments — GitHub is public.
74+
75+
## Mechanics
76+
77+
- **Always open as a draft**: `gh pr create --draft --title '…' --body '…'`
78+
(title follows the commit-subject convention). Mark it ready for review only
79+
when the user says so — either ask, or rely on an explicit "open it ready" /
80+
"mark it ready" from them. `gh pr ready <number>` flips it.
81+
- Force-pushing a branch with an open PR is fine (rebases, re-signs) — but
82+
say so in a PR comment when the rewrite changes more than commit hashes.
83+
- Don't merge, close, or mark ready-for-review without being asked.

0 commit comments

Comments
 (0)