@cratis/pi 7.2.0 → 7.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,7 +128,7 @@ For implementation, the applicable changed-lane gates must pass. Mark unrelated
128
128
  - [ ] `Documentation/verify-markdown.sh` passes when documentation is added or changed
129
129
  - [ ] `code-reviewer` finds no blocking issues
130
130
  - [ ] `security-reviewer` finds no vulnerabilities
131
- - [ ] PR description follows the pull request template
131
+ - [ ] PR description follows the pull request template and the release-note contract in `pull-requests.md`; test and review notes are in a PR comment
132
132
 
133
133
  ---
134
134
 
@@ -152,7 +152,7 @@ For implementation, the applicable changed-lane gates must pass. Mark unrelated
152
152
  - [ ] `code-reviewer` finds no blocking issues
153
153
  - [ ] `security-reviewer` finds no vulnerabilities
154
154
  - [ ] All documentation is complete and accurate (if required)
155
- - [ ] PR description follows the pull request template
155
+ - [ ] PR description follows the pull request template and the release-note contract in `pull-requests.md`; test and review notes are in a PR comment
156
156
 
157
157
  ---
158
158
 
@@ -115,7 +115,7 @@ For an implemented application slice, require the applicable changed-lane gates
115
115
  - [ ] `Documentation/verify-markdown.sh` passes when documentation is added or changed
116
116
  - [ ] Code review by `code-reviewer` finds no blocking issues
117
117
  - [ ] Security review by `security-reviewer` finds no vulnerabilities
118
- - [ ] PR description follows the pull request template
118
+ - [ ] PR description follows the pull request template and the release-note contract in `pull-requests.md`; test and review notes are in a PR comment
119
119
 
120
120
  ---
121
121
 
@@ -2,20 +2,20 @@
2
2
  agent: agent
3
3
  description: >
4
4
  Ship local changes: create a branch, make logical commits, push, open and
5
- label a PR with a proper description, merge it, prepare no-effect related
6
- issue dispositions, and delete the branch.
5
+ label a PR with a proper description, merge it, prepare related issue
6
+ dispositions the request does not authorize, and delete the branch.
7
7
  ---
8
8
 
9
9
  # Ship Changes
10
10
 
11
11
  Ship the current local modifications to `main` through the standard
12
- branch → commits → PR → merge → no-effect issue disposition → cleanup workflow.
12
+ branch → commits → PR → merge → issue disposition → cleanup workflow.
13
13
 
14
14
  ## Inputs
15
15
 
16
16
  - **What changed** — brief description of the work (used for branch name and PR title)
17
17
  - **Label** — `no-release`, `patch`, `minor`, or `major`, or omit entirely if no label should be applied
18
- - **Related issue** — optional exact repository and issue number; if unknown, search read-only first. Comment on or close it only when the user's request includes that effect.
18
+ - **Related issue** — optional exact repository and issue number; if unknown, search read-only first. Comment on or close it only when the user's request includes that effect; otherwise prepare the disposition as a proposal. In repositories released by `cratis/release-action`, a delivered issue is closed by release-action through `(#n)` in the description, but release-action does not run for a `no-release` PR, so `(#n)` closes nothing there; elsewhere follow the repository's own release and issue-closing process.
19
19
 
20
20
  Invoking this prompt is direct authority for the standard branch, commit, push, pull-request,
21
21
  requested-label, merge, and branch-cleanup effects. Do not pause to ask for separate approval at
@@ -32,3 +32,18 @@ Every other label proceeds through merge under this prompt's ordinary authority.
32
32
  This prompt is for an explicit request to ship or land. If the user asked only to commit, only to
33
33
  push, or only to open a PR, stop after that step: the narrower request does not become authority
34
34
  for the rest of the chain because this prompt happens to be loaded.
35
+
36
+ ## Pull request description
37
+
38
+ The description is published verbatim as the release notes, so it follows the contract in
39
+ [`pull-requests.md`](../rules/pull-requests.md#the-description-is-the-release-note).
40
+
41
+ - Before `gh pr create` or `gh pr edit`, write the body from `.github/pull_request_template.md` and
42
+ check it against the contract. The rules agents most often break:
43
+ - No development write-up: no Overview/Verification/Test plan headings (only a first `## Summary`
44
+ is allowed), no review, testing or provenance notes. Those go in a PR comment.
45
+ - `(#n)` ends the bullet that delivers an issue and `(part of #n)` marks anything that stays open;
46
+ never `Closes`/`Fixes`/`Refs` before a number, and never an issue reference inside an HTML comment,
47
+ which still closes the issue.
48
+ - Links are absolute `https://` URLs, never relative paths.
49
+ - After pushing, if `verify-release-notes` fails, fix it by editing the description; it re-runs on edit.
@@ -4,19 +4,81 @@ applyTo: "**/*"
4
4
 
5
5
  # How to Do Pull Requests
6
6
 
7
- PR descriptions serve two purposes: they help reviewers understand the change *now*, and they become the release notes that users read *later*. Write them with both audiences in mind.
7
+ ## The description is the release note
8
8
 
9
- **The description is the release note — it is published verbatim.** Write it as the note you want the person upgrading to read, in the repository template's sections. A generic development write-up (`## Summary`, `## Verification`, `## Testing`, a list of the files you touched, a description of how you arrived at the change) is not a release note, and shipping one makes the release history unreadable. The same applies wherever a release is produced by hand: release-notes text typed into a manual workflow run, or written straight into a published release, carries exactly the same shape and the same audience as a PR description. There is no path to a release whose notes are allowed to describe the work instead of the change.
9
+ **The PR description is published verbatim as the GitHub release. In repositories released by `cratis/release-action`, it also closes every issue written as `(#n)`; elsewhere, follow the repository's own release and issue-closing process.** Write the note the person upgrading should read, not a development write-up. The same contract applies to release notes typed into a manual workflow run or written straight into a release. Where it is installed, the `verify-release-notes` check enforces it on every PR into the default branch that carries exactly one of `major`/`minor`/`patch` (it re-runs when the label is added); it skips `no-release` and unlabelled PRs, which should still be written this way because any of them may become releasable. `release-action` does not run for a `no-release` PR, so `(#n)` closes nothing there. Editing the description re-runs the check. HTML comments are not shown on the release page and the check ignores them for headings, keywords and placeholders, but a `(#n)` inside a comment still closes the issue (`release-action` skips only fenced and inline code) and the check fails it, so never put an issue reference in a comment. The template's own comment can stay: its `(#123)` examples are inline code.
10
10
 
11
- ## Description
11
+ ### Allowed shape
12
12
 
13
- - Follow the repository's pull request template (`.github/pull_request_template.md`).
14
- - Focus on the **Added**, **Changed**, **Fixed**, **Removed**, **Security**, and **Deprecated** sections. Remove sections that are empty — don't leave blank headings.
15
- - Each bullet should be short, self-contained, and release-note ready.
16
- - **Write for users of the framework, not for internal developers.** Only include changes that have an impact on anyone using what we build — new APIs, changed behavior, fixed bugs, removed features. Do not list internal implementation details like storage changes, converter updates, gRPC contract internals, or spec additions. If a change is purely internal plumbing, it does not belong in the PR description. For a user-visible fix, a brief root cause and what now prevents a regression, stated as observable behavior rather than a list of specs, are user-facing and may be included: they tell the upgrader whether to trust the fix. Credit an external contributor by name or handle, unless they asked not to be named.
17
- - Add the associated issue reference at the end of a bullet when there is a real GitHub issue for the change (e.g. `(#351)`). Keep it a bare reference — **no closing keywords** (`Closes #351`, `Fixes #351`) anywhere in the body, because the published release notes are the PR description verbatim. If there is no associated issue, omit the reference entirely. Never use a placeholder like `(#issue)` or leave the example number `(#123)` literally, and never invent a random issue number. **Always verify the issue number read-only using the repository source — never guess or invent a number.** Comment on or close an issue when the user's request includes that effect; otherwise prepare a bounded post-merge disposition without performing it.
18
- - Include a summary only if there is a cohesive theme across the changes. If you find yourself restating individual bullets in slightly different words, the summary adds no value — remove it.
19
- - Never include Copilot prompt content in the PR description. Remove any "Original prompt" / coding agent transcript blocks before publishing.
13
+ - Follow the repository's pull request template (`.github/pull_request_template.md`) within this contract.
14
+ - An optional summary, first, only when one cohesive theme spans the bullets: **either** a `## Summary` section (short, user-facing prose) **or** one unheaded lead paragraph (1–3 sentences), never both. `Summary` is a level-2 heading; `# Summary` is the wrong level. No bullets before the first section.
15
+ - Then only these `##` sections, each at most once, in this order after any `## Summary`: `## Added`, `## Changed`, `## Fixed`, `## Removed`, `## Security`, `## Deprecated`. Keep only the sections that have bullets: a section holding only prose, a code example or `None.` fails the check, so delete it. `###` sub-headings inside a section are fine unless they use a forbidden name; inside a section even `### Added` is only a sub-heading, and a section itself is always level 2.
16
+ - A `major`/`minor`/`patch` PR needs at least one bullet under an allowed section.
17
+ - Bullets are short, self-contained and user-facing: what a consumer compiles against, runs or observes. A user-visible fix may add one sentence of root cause or regression guard, stated as observable behavior. Credit an external contributor by name or handle, unless they asked not to be named.
18
+ - Breaking changes and upgrade actions are bullets in `## Changed` or `## Removed` that state the action. A longer migration story goes in the docs, linked by absolute URL.
19
+ - Do not list internal plumbing (storage, converters, gRPC internals, specs, file lists, refactor narration).
20
+
21
+ ### Issue references
22
+
23
+ | Write | Meaning |
24
+ | --- | --- |
25
+ | `(#351)` at the **end of the bullet that delivers it** | Delivered: in a repository released by `cratis/release-action`, it closes it at release |
26
+ | `(part of #351)` or prose `see #351` | Related, partial or follow-up: never closes |
27
+ | `Cratis/Repo#351` | Other repository: never closed |
28
+ | one `(#351)` per issue, never `(#351, #352)` | `(#351, #352)` closes nothing: write `(#351) (#352)` |
29
+
30
+ - Nothing but more issue references (also `(part of #n)`, `(see #n)` and `(Cratis/Repo#n)`), closing emphasis, `<br>` and sentence punctuation (a `:` may introduce nested bullets) may follow the delivering `(#n)`. Write one `(#n)` per issue: release-action only matches `(#n)`, so `(#56, #57)` closes nothing; write `(#56) (#57)`.
31
+ - Never use a linking or closing keyword before a number, anywhere: `Close`, `Closes`, `Closed`, `Fix`, `Fixes`, `Fixed`, `Resolve`, `Resolves`, `Resolved`, `Refs`, `Ref`, `References`, also as `Keyword: #n`, with `owner/repo#n`, followed by an issue URL, and wrapped in bold, italics or a link (`**Closes** #n`, `Closes [#n](url)`, `[Closes #n](url)`, and `[Closes](url)` where the link starts a clause). A `Refs #93` line closes nothing and is not a delivery marker: write `(#93)` at the end of the delivering bullet, or `(part of #93)` if it must stay open.
32
+ - Comment on or close an issue when the user's request includes that effect; otherwise prepare a bounded post-merge disposition without performing it. In repositories released by `cratis/release-action`, a delivered `(#n)` is closed by release-action at release, so do not close it by hand; for a `no-release` PR release-action does not run, so any disposition follows this same rule. Elsewhere, follow the repository's own release and issue-closing process.
33
+ - Use a bare `(#n)` only for an issue this PR fully delivers. No issue means no reference. Never use a placeholder such as `(#issue)` or the template's `(#123)`, and verify every number exists in the right repository; never guess.
34
+
35
+ ### Forbidden anywhere outside code
36
+
37
+ - **Headings** (any level, also written as HTML `<h2>`, `<b>`, `<i>` or a possibly multi-line `<summary>`, or as an `*italic*` line; a heading line is checked like any other, so a keyword, relative link or `(#n)` in one fails too) other than a first `## Summary`, such as Overview, Description, What, Why, How, Context, Changes, What changed, Test plan, Testing, Tests, Verification, Verified, Validation, Quality, Review, Notes, Notes for reviewers, Limitations, Known follow-up, Acceptance, Details, and any `#`/`##` heading not in the allowed list.
38
+ - **Review, verification, testing and provenance notes**: `Review:`, `Reviewed:`, a stand-alone `Reviewed by` line, `Verification:`, `Tested:`, `Testing:`, `Validation:` lines that stand alone or report a result (`Tests: 400 passed`, `Review: approved`); same-provider, cross-provider, Opus-only or Anthropic-only review remarks; the review workflow having passed, returned or run; CI or gate results (`CI green`, `all tests passed`); and a line stating which agent or model wrote the description (`Generated with Claude Code`, `Co-Authored-By:`). A bullet that describes a product change and only mentions review, validation, tests or an AI model (`- Validation: rules now apply to commands (#3)`, `- Reviewed by status is now shown on the dashboard (#4)`) is fine: inside a bullet, a summary or the lead paragraph the check reads a note only when it ends the clause (`- Cross-provider review pending`).
39
+ - **Internal state** that is not a consumer change (for example "npm publication remains disabled").
40
+ - **Relative links** (`](Documentation/x.md)`, `](./x)`, `](Source/...)`): they 404 on the release page. Use `https://github.com/Cratis/<Repo>/blob/main/<path>`, a `#anchor` or `mailto:`.
41
+ - **Placeholders and transcripts**: template text, empty sections, Copilot "Original prompt" blocks, agent transcripts.
42
+
43
+ Reviewer-facing information (test plan, verification, review provenance, notes for reviewers) goes in a **PR comment**, never the description.
44
+
45
+ ### Bad to good
46
+
47
+ Bad (Cratis/Arc.TypeScript v0.48.0 as first published, bullets abridged):
48
+
49
+ ```markdown
50
+ Arc can now construct Chronicle reactors and reducers through its own dependency injection, one scope per delivered batch, as an opt-in preview. npm publication remains disabled.
51
+
52
+ ## Added
53
+
54
+ - Preview option `withChronicle({ ..., activateArtifactsInScopes: true })` ... (#93)
55
+
56
+ See [Activate reactors and reducers in Arc scopes](Documentation/chronicle/reactors/scoped-activation.md).
57
+
58
+ Review: Opus-only (same-provider) review.
59
+
60
+ Refs #93
61
+ ```
62
+
63
+ Good (as corrected):
64
+
65
+ ```markdown
66
+ Arc can now construct Chronicle reactors and reducers through its own dependency injection, one scope per delivered batch, as an opt-in preview.
67
+
68
+ ## Added
69
+
70
+ - Preview option `withChronicle({ ..., activateArtifactsInScopes: true })` ... See [Activate reactors and reducers in Arc scopes](https://github.com/Cratis/Arc.TypeScript/blob/main/Documentation/chronicle/reactors/scoped-activation.md). (part of #93)
71
+ ```
72
+
73
+ "npm publication remains disabled" is internal status, the link was relative (it 404s on the release page), the review line is provenance for reviewers, and `Refs #93` is a keyword line. #93 was only partly delivered by this release, so its bullets say `(part of #93)`; `(#93)` would have closed it.
74
+
75
+ ### Before you create or edit a PR
76
+
77
+ 1. Read the body against the forbidden list and the issue table above; delete every hit and verify every issue number.
78
+ 2. Sections in order, none empty, at most one summary form; every bullet user-facing.
79
+ 3. Test plan, verification and review notes are in a PR comment.
80
+
81
+ If `verify-release-notes` fails, fix it by editing the description, not by pushing code.
20
82
 
21
83
  ## Commits
22
84
 
@@ -136,9 +136,9 @@ An AI-drafted narrative is a first draft, not a finished page. Give the model
136
136
  the reader, the scenario, the terminology and the source evidence up front;
137
137
  then revise the result against that evidence and the
138
138
  **cratis-writing-voice-and-cadence** constructions before it ships. Tell the
139
- reviewer the narrative was AI-drafted (in the review request or commit
140
- message, not in a PR description's release-note sections) so they read it as
141
- prose, not only as a diff.
139
+ reviewer the narrative was AI-drafted (in the review request, a PR comment or
140
+ the commit message, never in the PR description, which is published as the
141
+ release note) so they read it as prose, not only as a diff.
142
142
 
143
143
  For machine-readable delivery and retrieval checks, use
144
144
  **cratis-llm-friendly-documentation**; publishing `llms-full.txt` alone does
@@ -20,10 +20,10 @@ required to draft notes.
20
20
  Before writing, identify product, tag or candidate version, previous version,
21
21
  artifact/package names, supported platforms, and the audience. Inventory
22
22
  observable changes from the diff, specs, linked issues/PRs, and authoritative
23
- product source at that revision. A PR description may be published verbatim as
24
- release notes in a Cratis repository; follow its current template and confirm
25
- that behavior before drafting. Do not turn an unreleased draft into a claim
26
- about shipped behavior.
23
+ product source at that revision. A PR description is published verbatim as
24
+ release notes in a Cratis repository; follow its current template and the
25
+ pull-request contract, and confirm that behavior before drafting. Do not turn
26
+ an unreleased draft into a claim about shipped behavior.
27
27
 
28
28
  For each change, ask: who uses this path, what happened before, what happens
29
29
  now, is action required, and how would they notice? Check changed defaults,
@@ -42,15 +42,29 @@ one to add weight.
42
42
 
43
43
  ## Write for the right channel
44
44
 
45
- - **Exact-version release note (GitHub/PR):** start with changes requiring
46
- action and affected workflows, then new capabilities and fixes. State impact
47
- and the user's next action in plain language. Include an issue reference only
48
- when verified, and follow the owning repository's closing-keyword policy.
49
- Do not list internal refactors or specs that change nothing users observe.
50
- For a user-visible fix, a sentence of root cause and of what now guards
51
- against a regression, stated as observable behavior rather than a list of
52
- specs, is user-facing: it tells the reader whether to trust the fix. Credit an external contributor by name or handle and say what
53
- they did, unless they asked not to be named.
45
+ - **Exact-version release note (GitHub/PR):** in a Cratis repository this is
46
+ the merged PR description, published verbatim, so it follows the contract in
47
+ [pull-requests.md](../../rules/pull-requests.md), which holds the full
48
+ rules. The ones most often broken: no development write-up (no Overview,
49
+ Verification or Test plan headings, no review or provenance notes; those go
50
+ in a PR comment); `(#n)` at the end of the bullet that delivers an issue and
51
+ `(part of #n)` for anything that stays open (in repositories released by
52
+ `cratis/release-action`, `(#n)` is what closes the issue), never `Closes`, `Fixes` or
53
+ `Refs` before a number (also in bold or a link), and no issue reference
54
+ inside an HTML comment, which still closes the issue; and absolute
55
+ `https://` links only. Sections are in
56
+ a fixed order (Added, Changed, Fixed, Removed, Security, Deprecated); within
57
+ a section, put changes requiring action first, then new capabilities and
58
+ fixes. State impact and the user's next action in plain language: state an
59
+ upgrade action in its `## Changed` or `## Removed` bullet (a first
60
+ `## Summary` section or an unheaded lead paragraph, not both, may mention it
61
+ too). Do not list internal
62
+ refactors or specs that change nothing users observe. For a
63
+ user-visible fix, a sentence of root cause and of what now guards against a
64
+ regression, stated as observable behavior rather than a list of specs, is
65
+ user-facing: it tells the reader whether to trust the fix. Credit an
66
+ external contributor by name or handle and say what they did, unless they
67
+ asked not to be named.
54
68
  - **Migration guide (durable product docs):** a compact *old behavior → new
55
69
  behavior → required action* table for each affected upgrade path, followed
56
70
  by source-verified before/after code or commands. Distinguish required
@@ -75,6 +89,23 @@ boundary that makes a change safe to adopt. One item can follow this shape:
75
89
  That is a checklist for facts, not a template to repeat word-for-word across
76
90
  items. Use descriptive headings, meaningful links, and natural sentence rhythm.
77
91
 
92
+ ## Repair an already-published release
93
+
94
+ Only when asked to fix a release that violates the contract:
95
+
96
+ 1. Read the published body (`gh release view TAG --json body`) and the merged
97
+ PR. Keep the facts; remove headings, review and verification lines,
98
+ internal status and closing keywords, and turn relative links into
99
+ `https://` URLs. Do not invent changes, versions or issue numbers.
100
+ 2. Publish the corrected text with `gh release edit TAG --notes-file FILE`,
101
+ only when the request authorizes editing that release.
102
+ 3. In a repository released by `cratis/release-action`, editing a release
103
+ does not re-run release-action, so an issue that a `(#n)` would have
104
+ closed stays open. For each one, confirm the release
105
+ actually delivered it. Close it by hand with a comment naming the release
106
+ only when the request covers closing issues; otherwise list the issues as a
107
+ proposal. Leave an issue open when the release only partly delivered it.
108
+
78
109
  ## Verify before handing over
79
110
 
80
111
  1. Reconcile every version, affected range, capability and API against the
@@ -6,6 +6,9 @@
6
6
  { "kind": "skill-contains", "value": "Exact-version release note" },
7
7
  { "kind": "skill-contains", "value": "old behavior → new" },
8
8
  { "kind": "skill-contains", "value": "migration from optional cleanup" },
9
- { "kind": "skill-contains", "value": "drafting never authorizes publishing" }
9
+ { "kind": "skill-contains", "value": "drafting never authorizes publishing" },
10
+ { "kind": "skill-contains", "value": "`(part of #n)`" },
11
+ { "kind": "skill-contains", "value": "gh release edit TAG --notes-file" },
12
+ { "kind": "skill-contains", "value": "does not re-run release-action" }
10
13
  ]
11
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [