@cratis/pi 7.105.1 → 7.107.0
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.
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +1 -0
- package/package/corpus/harnesses/copilot/instructions/pull-requests.instructions.md +6 -5
- package/package/corpus/harnesses/copilot/instructions/review-reports.instructions.md +6 -0
- package/package/corpus/product-sync.json +3 -3
- package/package/corpus/prompts/ship-changes.prompt.md +16 -3
- package/package/corpus/rules/issue-assignment.md +1 -0
- package/package/corpus/rules/profiles.md +1 -0
- package/package/corpus/rules/pull-requests.md +6 -5
- package/package/corpus/rules/review-reports.md +6 -0
- package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +1 -1
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +4 -2
- package/package/corpus/skills/cratis-code-review/SKILL.md +3 -0
- package/package/corpus/skills/cratis-code-review/verification.json +2 -1
- package/package/corpus/skills/cratis-engineering-ci-gates/LICENSE +2 -0
- package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +172 -0
- package/package/corpus/skills/cratis-engineering-issue-hygiene/LICENSE +2 -0
- package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +184 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +3 -1
- package/package/corpus/skills/cratis-engineering-release-trains/LICENSE +2 -0
- package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +191 -0
- package/package/corpus/skills/cratis-engineering-release-trains/verification.json +20 -0
- package/package/corpus/skills/cratis-engineering-review-rounds/LICENSE +2 -0
- package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +120 -0
- package/package/corpus/skills/cratis-engineering-review-rounds/verification.json +16 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +8 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +4 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +79 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +8 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +12 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +15 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +1 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +4652 -869
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +6 -0
- package/package/corpus/skills/run-tests/NOTICE +1 -0
- package/package/corpus/skills/run-tests/SKILL.md +5 -3
- package/package/profile-catalog.json +4 -0
- package/package.json +1 -1
|
@@ -87,6 +87,7 @@ profile includes neither Screenplay nor Stage.
|
|
|
87
87
|
| Profile ID | Description | Automatically Includes |
|
|
88
88
|
|---|---|---|
|
|
89
89
|
| `cratis/engineering` | Engineering conventions and workflows | `cratis/engineering/core`, `cratis/engineering/csharp`, `cratis/engineering/elixir`, `cratis/engineering/go`, `cratis/engineering/kotlin`, `cratis/engineering/react`, `cratis/engineering/typescript` |
|
|
90
|
+
| `cratis/engineering/core` | Shared engineering method skills: `cratis-ci-pipeline-performance`, `cratis-documentation-writing`, `cratis-engineering-ci-gates`, `cratis-engineering-consolidation-guard`, `cratis-engineering-decision-record`, `cratis-engineering-docs-authoring`, `cratis-engineering-effect-boundaries`, `cratis-engineering-issue-hygiene`, `cratis-engineering-local-cross-repo-verification`, `cratis-engineering-regression-cluster`, `cratis-engineering-release-trains`, `cratis-engineering-review-rounds`, `cratis-release-notes`, `cratis-technical-examples` | (no child profiles) |
|
|
90
91
|
| `cratis/engineering/csharp` | C# engineering conventions, .NET engineering skills, and framework Orleans jobs (`cratis-orleans-jobs`, alongside `orleans.md`) | `cratis/engineering/core`, `cratis/engineering/dotnet` |
|
|
91
92
|
| `cratis/engineering/dotnet` | Upstream .NET engineering workflows | `cratis/engineering/dotnet/performance`, `cratis/engineering/dotnet/diagnostics`, `cratis/engineering/dotnet/msbuild`, `cratis/engineering/dotnet/orleans`, `cratis/engineering/dotnet/testing`, `cratis/engineering/dotnet/refactoring` |
|
|
92
93
|
| `cratis/engineering/dotnet/performance` | Microbenchmarking, performance patterns, SIMD, and profiling | (no child profiles) |
|
|
@@ -126,9 +126,10 @@ intents do not.
|
|
|
126
126
|
name the exact breaking change(s), who is affected and how, and the
|
|
127
127
|
resulting version number. A generic "ready to ship?" is not this checkpoint —
|
|
128
128
|
say plainly that this release breaks compatibility and needs a yes.
|
|
129
|
-
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
- A human merges a `major` PR, after answering that question with an explicit
|
|
130
|
+
yes. An agent never merges it, even after the confirmation. A prior general
|
|
131
|
+
instruction to "ship" or "land this" does not answer it, even when it named
|
|
132
|
+
`major` as the intended label.
|
|
132
133
|
- This checkpoint is per release, not per conversation — a human confirming
|
|
133
134
|
one major release does not pre-authorize the next one.
|
|
134
135
|
|
|
@@ -156,7 +157,7 @@ A non-release pull request must satisfy the relevant required checks like any ot
|
|
|
156
157
|
|
|
157
158
|
### Group small related changes into one pull request
|
|
158
159
|
|
|
159
|
-
Do not open a pull request per task when the tasks belong to the same body of work. Several small merged PRs become several releases, and a stream of near-empty patch releases makes the release history useless for the people it is written for. Collect related work — a set of CI gates, a group of fixes in one area, the steps of one refactor — onto **one branch, as separate commits**, and open **one** pull request. Commits stay one-logical-unit-each; the pull request is the release boundary, and the release boundary should be a coherent, describable change.
|
|
160
|
+
Do not open a pull request per task when the tasks belong to the same body of work. Several small merged PRs become several releases, and a stream of near-empty patch releases makes the release history useless for the people it is written for. Collect related work — a set of CI gates, a group of fixes in one area, the steps of one refactor — onto **one branch, as separate commits**, and open **one** pull request. Commits stay one-logical-unit-each; the pull request is the release boundary, and the release boundary should be a coherent, describable change. Joining an open candidate, folding superseded PRs and the cut are in `cratis-engineering-release-trains`.
|
|
160
161
|
|
|
161
162
|
**Before consolidating open PRs, review each PR’s release intent and workflow effects.** Integration may trigger completion/publication behavior on an absorbed PR. Use supported non-release intent where appropriate. A direct request to consolidate the named pull requests authorizes the necessary relabeling and merge; it does not authorize unrelated notifications.
|
|
162
163
|
|
|
@@ -177,4 +178,4 @@ Before marking code/automation work ready, select the affected-project gates tha
|
|
|
177
178
|
- `yarn lint` — zero errors
|
|
178
179
|
- `npx tsc -b` — zero TypeScript errors
|
|
179
180
|
- Code follows all project coding standards and conventions
|
|
180
|
-
- **Required CI checks pass.** After an authorized push, inspect checks and failure logs. Diagnose within a bounded attempt, fix in-scope causes, and re-run relevant gates after each fix. Report unrelated/environmental failures and missing authority as blockers rather than retrying indefinitely or silently waiving required checks. If a release job fails after a concurrent merge (the release for the tag exists for another commit), re-run it: it releases under the next version (release-action v1.4.2 fails the job rather than reporting success).
|
|
181
|
+
- **Required CI checks pass.** After an authorized push, inspect checks and failure logs. Diagnose within a bounded attempt, fix in-scope causes, and re-run relevant gates after each fix. Report unrelated/environmental failures and missing authority as blockers rather than retrying indefinitely or silently waiving required checks. Waiting, cancelling and tiered local gates are in `cratis-engineering-ci-gates`. If a release job fails after a concurrent merge (the release for the tag exists for another commit), re-run it: it releases under the next version (release-action v1.4.2 fails the job rather than reporting success).
|
|
@@ -67,6 +67,12 @@ When a workflow requires a typed review envelope, preserve its schema and expres
|
|
|
67
67
|
these sections, verdict meanings, and scope limits through its existing fields.
|
|
68
68
|
Do not append a competing Markdown report or invent envelope fields.
|
|
69
69
|
|
|
70
|
+
## Rounds
|
|
71
|
+
|
|
72
|
+
A follow-up round reviews only the delta since the last reviewed commit and carries prior
|
|
73
|
+
findings forward. Cap the rounds and prefer one structural fix over looping. See
|
|
74
|
+
`cratis-engineering-review-rounds`.
|
|
75
|
+
|
|
70
76
|
## Reviewer independence
|
|
71
77
|
|
|
72
78
|
- **[contract]** Run a reviewer on a different provider family than the author's model
|
|
@@ -15,7 +15,7 @@ branch → commits → PR → merge → issue disposition → cleanup workflow.
|
|
|
15
15
|
|
|
16
16
|
- **What changed** — brief description of the work (used for branch name and PR title)
|
|
17
17
|
- **Label** — exactly one of `no-release`, `patch`, `minor`, or `major`, selected from the repository's release contract and applied in `gh pr create --label <intent>`
|
|
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.
|
|
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. Keep the issue current and close it with a reason per `cratis-engineering-issue-hygiene`.
|
|
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
|
|
@@ -24,8 +24,8 @@ and verify required checks before merging.
|
|
|
24
24
|
|
|
25
25
|
**Exception: a `major` label does not carry merge authority.** Prepare the branch, commits, push,
|
|
26
26
|
and PR labeled `major` as usual, then stop before merging. Ask a human to confirm the breaking
|
|
27
|
-
change(s), who is affected, and the resulting version number
|
|
28
|
-
|
|
27
|
+
change(s), who is affected, and the resulting version number; the human merges it after an
|
|
28
|
+
explicit yes to that specific question, and an agent never does — see
|
|
29
29
|
[`pull-requests.md`](../rules/pull-requests.md#a-major-release-needs-a-humans-explicit-go-ahead).
|
|
30
30
|
Every other label proceeds through merge under this prompt's ordinary authority.
|
|
31
31
|
|
|
@@ -33,6 +33,19 @@ This prompt is for an explicit request to ship or land. If the user asked only t
|
|
|
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
35
|
|
|
36
|
+
## Before you branch
|
|
37
|
+
|
|
38
|
+
Check for an open release candidate or PR in the repository before opening a new branch.
|
|
39
|
+
Group related work onto one branch and one PR, and join an open candidate instead of starting
|
|
40
|
+
another. The method is in the `cratis-engineering-release-trains` skill.
|
|
41
|
+
|
|
42
|
+
## Waiting on checks and merging
|
|
43
|
+
|
|
44
|
+
Push only when the ship bar is met: root cause understood, specs added, local gate green,
|
|
45
|
+
review passed, issue and PR re-read, and no overlap with main. Then watch the exact run once
|
|
46
|
+
instead of polling it. Merge only after required checks pass. The method is in the
|
|
47
|
+
`cratis-engineering-ci-gates` skill. For review rounds, see `cratis-engineering-review-rounds`.
|
|
48
|
+
|
|
36
49
|
## Pull request description
|
|
37
50
|
|
|
38
51
|
The description is published verbatim as the release notes, so it follows the contract in
|
|
@@ -29,3 +29,4 @@ up, or it looks abandoned while it is being done.
|
|
|
29
29
|
The user's request to work on the issue is the authority for this assignment; do not ask
|
|
30
30
|
before doing it. It authorizes assigning the issue and nothing else: commenting, labeling
|
|
31
31
|
or closing still follow [pull-requests.md](./pull-requests.md) and the user's request.
|
|
32
|
+
- **After claiming,** keep the issue current per `cratis-engineering-issue-hygiene`.
|
|
@@ -86,6 +86,7 @@ profile includes neither Screenplay nor Stage.
|
|
|
86
86
|
| Profile ID | Description | Automatically Includes |
|
|
87
87
|
|---|---|---|
|
|
88
88
|
| `cratis/engineering` | Engineering conventions and workflows | `cratis/engineering/core`, `cratis/engineering/csharp`, `cratis/engineering/elixir`, `cratis/engineering/go`, `cratis/engineering/kotlin`, `cratis/engineering/react`, `cratis/engineering/typescript` |
|
|
89
|
+
| `cratis/engineering/core` | Shared engineering method skills: `cratis-ci-pipeline-performance`, `cratis-documentation-writing`, `cratis-engineering-ci-gates`, `cratis-engineering-consolidation-guard`, `cratis-engineering-decision-record`, `cratis-engineering-docs-authoring`, `cratis-engineering-effect-boundaries`, `cratis-engineering-issue-hygiene`, `cratis-engineering-local-cross-repo-verification`, `cratis-engineering-regression-cluster`, `cratis-engineering-release-trains`, `cratis-engineering-review-rounds`, `cratis-release-notes`, `cratis-technical-examples` | (no child profiles) |
|
|
89
90
|
| `cratis/engineering/csharp` | C# engineering conventions, .NET engineering skills, and framework Orleans jobs (`cratis-orleans-jobs`, alongside `orleans.md`) | `cratis/engineering/core`, `cratis/engineering/dotnet` |
|
|
90
91
|
| `cratis/engineering/dotnet` | Upstream .NET engineering workflows | `cratis/engineering/dotnet/performance`, `cratis/engineering/dotnet/diagnostics`, `cratis/engineering/dotnet/msbuild`, `cratis/engineering/dotnet/orleans`, `cratis/engineering/dotnet/testing`, `cratis/engineering/dotnet/refactoring` |
|
|
91
92
|
| `cratis/engineering/dotnet/performance` | Microbenchmarking, performance patterns, SIMD, and profiling | (no child profiles) |
|
|
@@ -125,9 +125,10 @@ intents do not.
|
|
|
125
125
|
name the exact breaking change(s), who is affected and how, and the
|
|
126
126
|
resulting version number. A generic "ready to ship?" is not this checkpoint —
|
|
127
127
|
say plainly that this release breaks compatibility and needs a yes.
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
- A human merges a `major` PR, after answering that question with an explicit
|
|
129
|
+
yes. An agent never merges it, even after the confirmation. A prior general
|
|
130
|
+
instruction to "ship" or "land this" does not answer it, even when it named
|
|
131
|
+
`major` as the intended label.
|
|
131
132
|
- This checkpoint is per release, not per conversation — a human confirming
|
|
132
133
|
one major release does not pre-authorize the next one.
|
|
133
134
|
|
|
@@ -155,7 +156,7 @@ A non-release pull request must satisfy the relevant required checks like any ot
|
|
|
155
156
|
|
|
156
157
|
### Group small related changes into one pull request
|
|
157
158
|
|
|
158
|
-
Do not open a pull request per task when the tasks belong to the same body of work. Several small merged PRs become several releases, and a stream of near-empty patch releases makes the release history useless for the people it is written for. Collect related work — a set of CI gates, a group of fixes in one area, the steps of one refactor — onto **one branch, as separate commits**, and open **one** pull request. Commits stay one-logical-unit-each; the pull request is the release boundary, and the release boundary should be a coherent, describable change.
|
|
159
|
+
Do not open a pull request per task when the tasks belong to the same body of work. Several small merged PRs become several releases, and a stream of near-empty patch releases makes the release history useless for the people it is written for. Collect related work — a set of CI gates, a group of fixes in one area, the steps of one refactor — onto **one branch, as separate commits**, and open **one** pull request. Commits stay one-logical-unit-each; the pull request is the release boundary, and the release boundary should be a coherent, describable change. Joining an open candidate, folding superseded PRs and the cut are in `cratis-engineering-release-trains`.
|
|
159
160
|
|
|
160
161
|
**Before consolidating open PRs, review each PR’s release intent and workflow effects.** Integration may trigger completion/publication behavior on an absorbed PR. Use supported non-release intent where appropriate. A direct request to consolidate the named pull requests authorizes the necessary relabeling and merge; it does not authorize unrelated notifications.
|
|
161
162
|
|
|
@@ -176,4 +177,4 @@ Before marking code/automation work ready, select the affected-project gates tha
|
|
|
176
177
|
- `yarn lint` — zero errors
|
|
177
178
|
- `npx tsc -b` — zero TypeScript errors
|
|
178
179
|
- Code follows all project coding standards and conventions
|
|
179
|
-
- **Required CI checks pass.** After an authorized push, inspect checks and failure logs. Diagnose within a bounded attempt, fix in-scope causes, and re-run relevant gates after each fix. Report unrelated/environmental failures and missing authority as blockers rather than retrying indefinitely or silently waiving required checks. If a release job fails after a concurrent merge (the release for the tag exists for another commit), re-run it: it releases under the next version (release-action v1.4.2 fails the job rather than reporting success).
|
|
180
|
+
- **Required CI checks pass.** After an authorized push, inspect checks and failure logs. Diagnose within a bounded attempt, fix in-scope causes, and re-run relevant gates after each fix. Report unrelated/environmental failures and missing authority as blockers rather than retrying indefinitely or silently waiving required checks. Waiting, cancelling and tiered local gates are in `cratis-engineering-ci-gates`. If a release job fails after a concurrent merge (the release for the tag exists for another commit), re-run it: it releases under the next version (release-action v1.4.2 fails the job rather than reporting success).
|
|
@@ -66,6 +66,12 @@ When a workflow requires a typed review envelope, preserve its schema and expres
|
|
|
66
66
|
these sections, verdict meanings, and scope limits through its existing fields.
|
|
67
67
|
Do not append a competing Markdown report or invent envelope fields.
|
|
68
68
|
|
|
69
|
+
## Rounds
|
|
70
|
+
|
|
71
|
+
A follow-up round reviews only the delta since the last reviewed commit and carries prior
|
|
72
|
+
findings forward. Cap the rounds and prefer one structural fix over looping. See
|
|
73
|
+
`cratis-engineering-review-rounds`.
|
|
74
|
+
|
|
69
75
|
## Reviewer independence
|
|
70
76
|
|
|
71
77
|
- **[contract]** Run a reviewer on a different provider family than the author's model
|
|
@@ -134,7 +134,7 @@ OS or framework matrix. Default: full matrix on `schedule` and
|
|
|
134
134
|
rule states this). Pitfall: the full matrix needs an owner who reads its failures.
|
|
135
135
|
|
|
136
136
|
**Flaky and hung jobs.** Fits failure-bound workflows. Default: a
|
|
137
|
-
`timeout-minutes` on every job, `--blame-hang
|
|
137
|
+
`timeout-minutes` on every job, `--blame-hang` with a mini dump, retry only a diagnosed flake, and
|
|
138
138
|
quarantine a test with an issue. Pitfall: a blanket rerun hides the defect and
|
|
139
139
|
doubles minutes. Read `references/flaky-and-hung-jobs.md`.
|
|
140
140
|
|
package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md
CHANGED
|
@@ -25,12 +25,14 @@ cost runner-minutes and developer trust; diagnose before retrying.
|
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
dotnet test Repo.slnx --configuration Release --no-build \
|
|
28
|
-
--blame-hang --blame-hang-timeout 5m --blame-
|
|
28
|
+
--blame-hang --blame-hang-timeout 5m --blame-hang-dump-type mini \
|
|
29
|
+
--blame-crash --blame-crash-dump-type mini \
|
|
29
30
|
--results-directory TestResults
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
- This is the VSTest form. Microsoft.Testing.Platform projects use their own
|
|
33
|
-
crash and hang dump extensions and options; do not mix the two sets of switches.
|
|
34
|
+
crash and hang dump extensions and options (`--hangdump-type Mini`, `--crashdump-type Mini`); do not mix the two sets of switches.
|
|
35
|
+
- Read the stack (for example `dotnet-dump analyze <file>` then `clrstack -all`), keep the text output, and delete the `.dmp` file. Use a full dump only for a named investigation that needs heap contents.
|
|
34
36
|
- Upload `TestResults` as an artifact with `if: ${{ !cancelled() }}`, so the dump
|
|
35
37
|
survives the failure.
|
|
36
38
|
|
|
@@ -177,6 +177,9 @@ correction before merge. Style preferences and maintainability improvements
|
|
|
177
177
|
without such a consequence belong in Suggestions. Apply the shared verdict
|
|
178
178
|
vocabulary to those findings.
|
|
179
179
|
|
|
180
|
+
For a follow-up round after blockers were fixed, review only the delta and carry prior
|
|
181
|
+
findings forward; see `cratis-engineering-review-rounds`.
|
|
182
|
+
|
|
180
183
|
## What breaks
|
|
181
184
|
|
|
182
185
|
- **The review restates the compiler.** The gates were not run first, so
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"assertions": [
|
|
6
6
|
{ "kind": "skill-contains", "value": ".cratis/ai/rules/review-reports.md" },
|
|
7
7
|
{ "kind": "skill-contains", "value": "Correctness regressions, broken contracts" },
|
|
8
|
-
{ "kind": "skill-contains", "value": "Style preferences and maintainability improvements" }
|
|
8
|
+
{ "kind": "skill-contains", "value": "Style preferences and maintainability improvements" },
|
|
9
|
+
{ "kind": "skill-contains", "value": "cratis-engineering-review-rounds" }
|
|
9
10
|
]
|
|
10
11
|
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cratis-engineering-ci-gates
|
|
3
|
+
description: Run CI-matched local gates and watch exact workflow runs without polling or wasting checks. Use when choosing a local gate or tier, deciding how to wait for CI, starting a blocking watch, or deciding which superseded runs to cancel. Not for grouping deliveries (use cratis-engineering-release-trains), review iterations (use cratis-engineering-review-rounds), or editing workflows for speed (use cratis-ci-pipeline-performance).
|
|
4
|
+
license: LICENSE
|
|
5
|
+
compatibility: Requires git and the GitHub CLI (gh).
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
9
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
10
|
+
|
|
11
|
+
# Run the gate once, then watch the exact run
|
|
12
|
+
|
|
13
|
+
Operate checks; do not redesign workflows here. Read
|
|
14
|
+
[verification-discipline.md](../../rules/verification-discipline.md) for phase
|
|
15
|
+
budgets and exit-status handling, and
|
|
16
|
+
[pull-requests.md](../../rules/pull-requests.md#quality-gates) for required checks.
|
|
17
|
+
Read [capability-is-not-authority.md](../../rules/capability-is-not-authority.md)
|
|
18
|
+
before an external effect. A request to verify does not authorize a push.
|
|
19
|
+
|
|
20
|
+
## Derive the local gate
|
|
21
|
+
|
|
22
|
+
1. Read `.github/workflows/` and the repository's tier policy. Follow reusable
|
|
23
|
+
workflows and invoked scripts. Extract commands, solution and test selection,
|
|
24
|
+
configuration, warning settings, analyzers, lint and formatting checks.
|
|
25
|
+
2. Prefer the repository's existing gate script. If none exists, keep a small
|
|
26
|
+
local runner under `.ai-work/`, with each phase's real exit status preserved.
|
|
27
|
+
Do not substitute only the touched projects for the final gate.
|
|
28
|
+
3. **Tier 1** is the whole-solution build with CI's configuration and warning
|
|
29
|
+
settings, lint/format, and every non-integration test project. For example,
|
|
30
|
+
use Release with warnings as errors when that is what CI uses.
|
|
31
|
+
4. **Tier 2** adds integration tests. The repository's tier policy decides
|
|
32
|
+
whether they run locally. The default is CI-backed integration only if CI
|
|
33
|
+
runs that coverage, it passes before merge, and reviewer notes say it was
|
|
34
|
+
deferred to CI. If CI lacks that coverage, do not claim it is verified.
|
|
35
|
+
5. Name anything CI runs that cannot run locally: services, platforms, secrets
|
|
36
|
+
or hosted checks. Say what ran instead and what remains unverified before
|
|
37
|
+
pushing. Missing coverage is not a local pass.
|
|
38
|
+
|
|
39
|
+
Use affected-project checks while coding and writing specifications. Build once
|
|
40
|
+
at the end: run the full local gate when the work is believed complete, not after
|
|
41
|
+
every edit. Do not repeat a passing gate on unchanged inputs for reassurance.
|
|
42
|
+
When several deliveries form one candidate, the assembler runs the final gate
|
|
43
|
+
on the assembled state; deliveries bring targeted results. A changed state after
|
|
44
|
+
a failure needs the required gate again.
|
|
45
|
+
|
|
46
|
+
Keep build, lint and test phases separate, each with a deadline. Stop on failure;
|
|
47
|
+
do not run dependent phases or hide a producer's exit status behind a filter.
|
|
48
|
+
Report the exact command and result. Put verification and deferred coverage in
|
|
49
|
+
reviewer comments, not the release-note description.
|
|
50
|
+
|
|
51
|
+
## Wait without polling
|
|
52
|
+
|
|
53
|
+
After an authorized push, capture the full head SHA and discover the run for the
|
|
54
|
+
intended workflow. For example:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
head_sha=$(git rev-parse HEAD)
|
|
58
|
+
gh run list --repo OWNER/REPO --workflow ci.yml --commit "$head_sha" \
|
|
59
|
+
--json databaseId,headSha,event,status
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Select the exact run ID, not the newest run by time or branch alone. Disambiguate
|
|
63
|
+
multiple events or dispatches for the same SHA. Capture one ID per required
|
|
64
|
+
workflow. If no matching run is visible, report that no run was captured; do not
|
|
65
|
+
start a status-query loop or guess an ID.
|
|
66
|
+
|
|
67
|
+
Start one blocking watch for that run, with a deadline sized to the repository:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
gh run watch <id> --repo OWNER/REPO --exit-status
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
A background job, if the harness has one, can hold the same blocking watch.
|
|
74
|
+
Never re-query status by hand. Use the watch's completion and exit status, not
|
|
75
|
+
repeated `gh run list`, `gh run view` or PR-check requests while waiting.
|
|
76
|
+
|
|
77
|
+
Say: "Waiting on CI run <id> for the current PR head." Do independent work while
|
|
78
|
+
it runs. If none remains, end the turn. If the watch cannot finish in the session,
|
|
79
|
+
leave a handoff under `.ai-work/` with the SHA, run ID and outstanding checks;
|
|
80
|
+
report the wait as incomplete, not successful. A watch timeout does not cancel
|
|
81
|
+
the remote run and is not a failed-test diagnosis.
|
|
82
|
+
|
|
83
|
+
## Diagnose once, fix together
|
|
84
|
+
|
|
85
|
+
After the run completes with a failure:
|
|
86
|
+
|
|
87
|
+
1. Read the failed logs once, for example
|
|
88
|
+
`gh run view <id> --repo OWNER/REPO --log-failed`.
|
|
89
|
+
2. Check other jobs in that completed run, for example
|
|
90
|
+
`gh run view <id> --repo OWNER/REPO --json jobs`. Account for every failure,
|
|
91
|
+
including independent failures beyond the first red job.
|
|
92
|
+
3. Fix all in-scope causes together. Report unrelated or unavailable causes as
|
|
93
|
+
blockers rather than silently waiving them. Re-run the required local gate
|
|
94
|
+
on the fixed state, then push once when the request authorizes it.
|
|
95
|
+
4. Rerun a job only for a diagnosed flake, including a demonstrated transient
|
|
96
|
+
infrastructure failure, and only after the run completes. For example,
|
|
97
|
+
`gh run rerun <id> --repo OWNER/REPO --failed` retries failed jobs. Watch the
|
|
98
|
+
resulting attempt once. A deterministic failure needs a fix, not a retry.
|
|
99
|
+
|
|
100
|
+
Never put a CI skip token in a title or commit. Do not spend a push on each
|
|
101
|
+
individual fix or use CI to discover whether speculative fixes compile.
|
|
102
|
+
|
|
103
|
+
## Cancel only owned, superseded work
|
|
104
|
+
|
|
105
|
+
Cancellation needs a reason and an exact target. Within an authorized shipping
|
|
106
|
+
or folding request, cancel only runs started by the session's own superseded or
|
|
107
|
+
folded pushes. Anyone else's run needs the owner's agreement. Merely sharing a
|
|
108
|
+
branch or finding a duplicate run does not establish ownership.
|
|
109
|
+
|
|
110
|
+
Before acting, inspect each candidate, for example:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
gh run view <id> --repo OWNER/REPO \
|
|
114
|
+
--json workflowName,event,headBranch,headSha,status,createdAt
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Confirm the initiating push, workflow and SHA against the superseding head or
|
|
118
|
+
folded PR. Inspect the workflow's jobs if its effects are unclear. Never cancel
|
|
119
|
+
a release, publish or deploy run, regardless of ownership or workflow name.
|
|
120
|
+
Do not cancel a check whose result a queued or running publication needs, or a
|
|
121
|
+
required check about to gate a merge. Another owner's watched merge run needs
|
|
122
|
+
that owner's agreement. Even with agreement, release, publish and deploy runs
|
|
123
|
+
and checks needed by publication remain protected.
|
|
124
|
+
|
|
125
|
+
Re-read immediately before cancelling so drift cannot widen the target. Do not
|
|
126
|
+
cancel by branch, name or age alone, or use a bulk cancellation command. Once
|
|
127
|
+
confirmed, for example:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
gh run cancel <id> --repo OWNER/REPO
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Report one line naming the run ID and superseding or folding reason. If ownership
|
|
134
|
+
or downstream use is uncertain, leave it running and report the uncertainty.
|
|
135
|
+
|
|
136
|
+
## Integration and containers
|
|
137
|
+
|
|
138
|
+
Run local integration only when the tier policy calls for it or a bounded
|
|
139
|
+
cross-repository proof needs it. Give every container phase and Docker call a
|
|
140
|
+
deadline, including startup, image builds, tests and teardown. A background job
|
|
141
|
+
is not a timeout or a cleanup policy.
|
|
142
|
+
|
|
143
|
+
Keep track of the containers and networks created by the phase. On success,
|
|
144
|
+
failure, timeout or abandonment, stop and remove only those owned resources.
|
|
145
|
+
Use exact IDs or a task-specific Compose project; confirm ownership before
|
|
146
|
+
removal. Do not restart a shared daemon or stop another task's services.
|
|
147
|
+
Never run `docker system prune -a` or `docker image prune -a`.
|
|
148
|
+
|
|
149
|
+
When a test run hangs, ask for a mini hang dump (`--blame-hang-dump-type mini` on VSTest, `--hangdump-type Mini` on Microsoft.Testing.Platform). Read the stack (for example `dotnet-dump analyze <file>` then `clrstack -all`), keep the text output, and delete the `.dmp` file. Use a full dump only for a named investigation that needs heap contents.
|
|
150
|
+
|
|
151
|
+
For a repository's Compose test setup, one scoped teardown example is
|
|
152
|
+
`docker compose -p <task-project> down`, under its own deadline. Do not add
|
|
153
|
+
volume deletion unless those volumes are disposable and owned by this task.
|
|
154
|
+
Keep secrets out of logs and artifacts per
|
|
155
|
+
[secrets.md](../../rules/secrets.md).
|
|
156
|
+
|
|
157
|
+
## What breaks
|
|
158
|
+
|
|
159
|
+
- An affected-project build presented as Tier 1 leaves other projects unchecked.
|
|
160
|
+
- A green Tier 1 presented as integration proof hides coverage deferred to CI.
|
|
161
|
+
- Watching a branch's newest run can report success for the wrong SHA.
|
|
162
|
+
- Manual polling duplicates the watch and wastes time without improving proof.
|
|
163
|
+
- Blind retries and one push per failure spend checks without fixing the run.
|
|
164
|
+
- Broad container cleanup destroys resources the phase does not own.
|
|
165
|
+
|
|
166
|
+
## How it is proven
|
|
167
|
+
|
|
168
|
+
The derived local commands exit successfully on the final state. The blocking
|
|
169
|
+
watch for each required run exits successfully for the exact head SHA, including
|
|
170
|
+
integration coverage deferred to CI. A timeout, cancellation, missing check or
|
|
171
|
+
unobserved result stays unverified. Report local results, CI results and omissions
|
|
172
|
+
separately; no inventory or receipt substitutes for running the checks.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cratis-engineering-issue-hygiene
|
|
3
|
+
description: Keep GitHub issues current and reduce unfinished work with a single-writer status block and reasoned disposition. Use when maintaining an issue status block, deciding who may claim an issue, whether to close completed work, or whether to file a necessary follow-up. Not for grouping deliveries (use cratis-engineering-release-trains), review iterations (use cratis-engineering-review-rounds), workflow optimization (use cratis-ci-pipeline-performance), or CI operations (use cratis-engineering-ci-gates).
|
|
4
|
+
license: LICENSE
|
|
5
|
+
compatibility: Requires git and the GitHub CLI (gh).
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
9
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
10
|
+
|
|
11
|
+
# Leave fewer issues, with a truthful description
|
|
12
|
+
|
|
13
|
+
An issue must make sense to a reader outside the session. Keep its present state
|
|
14
|
+
in the description and meaningful events in the timeline. Before any mutation,
|
|
15
|
+
read [capability-is-not-authority.md](../../rules/capability-is-not-authority.md).
|
|
16
|
+
The request authorizes its named effects, not arbitrary filing or closing.
|
|
17
|
+
|
|
18
|
+
## One writer and a clear claim
|
|
19
|
+
|
|
20
|
+
One person or session owns all body edits, comments and disposition for a named
|
|
21
|
+
issue. Delegated workers report findings to that owner. An explicit handoff can
|
|
22
|
+
transfer the named issue, but the previous writer must stop editing it. GitHub
|
|
23
|
+
body edits are not conditional writes; a last-minute reread alone cannot prevent
|
|
24
|
+
two writers from overwriting each other.
|
|
25
|
+
|
|
26
|
+
Before starting, read the issue, comments, assignees and any status block. Follow
|
|
27
|
+
[issue-assignment.md](../../rules/issue-assignment.md) to claim it. Do not replace
|
|
28
|
+
an existing assignment. If another writer is already active, coordinate rather
|
|
29
|
+
than starting a parallel edit. A failed assignment is not a blocker to the work.
|
|
30
|
+
|
|
31
|
+
When the request covers maintaining the issue, set the status block to
|
|
32
|
+
**In progress** before coding. Keep it true as work moves: **In review** for the
|
|
33
|
+
open PR, **Blocked** with the dependency, **Paused** when no active work remains,
|
|
34
|
+
and **Done** only when delivery is confirmed. Never leave In progress behind
|
|
35
|
+
when the writer stops.
|
|
36
|
+
|
|
37
|
+
## Put the status block in the description
|
|
38
|
+
|
|
39
|
+
Preserve the original problem statement and all text outside the managed block.
|
|
40
|
+
Append the block if absent. Stop for coordination if markers are malformed,
|
|
41
|
+
duplicated or already managed by another active writer. A minimal template is:
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
<!-- agent-status:start -->
|
|
45
|
+
## Status
|
|
46
|
+
**State:** In progress
|
|
47
|
+
**Scope:** Deliver the agreed behavior and its regression specification.
|
|
48
|
+
**Approach:** Fix the shared decision and exercise it through the public API.
|
|
49
|
+
**PR:** Not opened.
|
|
50
|
+
**Delivered:** Nothing yet.
|
|
51
|
+
**Remaining:** Implement, verify, review and deliver.
|
|
52
|
+
**Follow-ups:** None.
|
|
53
|
+
<!-- agent-status:end -->
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Replace the example with the real scope and remaining work. Use public PR or
|
|
57
|
+
issue URLs when they exist. Summarize a local plan; never link its file path.
|
|
58
|
+
Do not put local paths, harness commands, credentials or private context in
|
|
59
|
+
public issue or PR text. Read [secrets.md](../../rules/secrets.md) before handling
|
|
60
|
+
output, and [local-work-artifacts.md](../../rules/local-work-artifacts.md) before
|
|
61
|
+
creating the private working copy.
|
|
62
|
+
|
|
63
|
+
For example, read the body into an ignored local working file:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
gh issue view <n> --repo OWNER/REPO --json body --jq .body > .ai-work/issue-body.md
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Edit only the managed block in that file. Immediately before writing, re-read
|
|
70
|
+
both the issue and any linked PR. Read the remote body again:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
gh issue view <n> --repo OWNER/REPO --json body
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Compare it with the body used to prepare the edit. If anything changed, preserve
|
|
77
|
+
those changes and recompose from the fresh body. If concurrent edits continue,
|
|
78
|
+
stop and coordinate with the other writer. Do not write a stale whole body.
|
|
79
|
+
After a clean comparison, write the complete preserved body back, for example:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
gh issue edit <n> --repo OWNER/REPO --body-file .ai-work/issue-body.md
|
|
83
|
+
gh issue view <n> --repo OWNER/REPO --json body
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Verify the block changed as intended and the surrounding content stayed intact.
|
|
87
|
+
Do not paste the private working-file path into the issue.
|
|
88
|
+
|
|
89
|
+
## Description versus comment
|
|
90
|
+
|
|
91
|
+
Edit the status block for current scope, decisions, approach, checklist, linked
|
|
92
|
+
PRs, dependencies and what remains. The description alone should explain the
|
|
93
|
+
present state. Do not rewrite other people's text or replace the original report.
|
|
94
|
+
|
|
95
|
+
Comment only for an event worth notifying readers about: a decision or scope
|
|
96
|
+
change with its reason, a human blocker, a delivery milestone or a closing
|
|
97
|
+
summary. Each comment stands alone: what happened, why it matters, what comes
|
|
98
|
+
next. Use absolute public URLs. Do not repeat the block as a comment or post
|
|
99
|
+
"working on it", tool output, test counts, receipts or model/session chatter.
|
|
100
|
+
|
|
101
|
+
Re-read the issue and PR before every key step: starting, changing scope,
|
|
102
|
+
updating public state, filing follow-ups, merging or disposing of the issue.
|
|
103
|
+
For example, use `gh issue view <n> --repo OWNER/REPO --comments` and
|
|
104
|
+
`gh pr view <pr> --repo OWNER/REPO`. Do not act on an old summary after drift.
|
|
105
|
+
|
|
106
|
+
## Make the open-issue count go down
|
|
107
|
+
|
|
108
|
+
1. **Fix before filing.** Fix a small, in-scope finding in the same files and
|
|
109
|
+
risk area as the active change. Do not widen scope to improve the count.
|
|
110
|
+
Review advisories are fixed cheaply inline or dropped, not filed as issues.
|
|
111
|
+
2. **File only when needed and authorized.** A real defect that cannot be fixed
|
|
112
|
+
now, or a follow-up delivery truly requires, may need an issue. Search open
|
|
113
|
+
and closed issues first, for example
|
|
114
|
+
`gh issue list --repo OWNER/REPO --state all --search "<area> in:title,body"`.
|
|
115
|
+
Reuse an existing issue instead of duplicating it; comment only when that
|
|
116
|
+
effect is authorized and adds necessary context.
|
|
117
|
+
3. Group related findings into one checklist issue per area. Include concrete,
|
|
118
|
+
testable `## Acceptance criteria`. No speculative hardening, ideas or
|
|
119
|
+
"investigate later" issues. If filing is outside the request, list necessary
|
|
120
|
+
follow-ups in the report instead of creating them.
|
|
121
|
+
4. **Close what is done**, through the correct delivery mechanism below. Partial
|
|
122
|
+
delivery stays open with exactly what remains. Do not manufacture completion
|
|
123
|
+
or create extra issues merely to move unfinished scope elsewhere.
|
|
124
|
+
5. Prefer bounded issues that can be finished completely over starting large
|
|
125
|
+
epics. Report completed dispositions, not how many new issues were produced.
|
|
126
|
+
|
|
127
|
+
## Close with a reason, through the owning mechanism
|
|
128
|
+
|
|
129
|
+
Read [pull-requests.md](../../rules/pull-requests.md#issue-references) before
|
|
130
|
+
changing issue references or disposition. Confirm the actual PR state, release
|
|
131
|
+
intent and repository workflow; a merged PR is not proof of a published release.
|
|
132
|
+
|
|
133
|
+
- **Release-action delivery:** for a fully delivered issue, the delivering
|
|
134
|
+
release-note bullet ends with `(#n)`. Release-action closes it at release;
|
|
135
|
+
do not close it by hand. If release is pending, keep that dependency visible.
|
|
136
|
+
- **Manual completion:** only for a `no-release` PR or a repository without
|
|
137
|
+
release-action, and only when the request includes closing. Confirm all scope
|
|
138
|
+
is delivered and no required PR is open, unmerged, reverted or failing. Set
|
|
139
|
+
Done and close with reason `completed` and a public delivery link.
|
|
140
|
+
- **Duplicate or obsolete:** only with clear evidence and authority. Use reason
|
|
141
|
+
`not planned`, explain why, and link the canonical issue or superseding work.
|
|
142
|
+
If uncertain, leave it open and report the question.
|
|
143
|
+
- **Partial or unauthorized disposition:** leave it open with truthful remaining
|
|
144
|
+
scope or report the proposed disposition. Do not invent follow-up authority.
|
|
145
|
+
|
|
146
|
+
For an authorized manual completion, for example:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
gh issue close <n> --repo OWNER/REPO --reason completed \
|
|
150
|
+
--comment "Delivered in <public PR URL>. The agreed behavior is available."
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
A duplicate uses `--reason "not planned"` and a specific canonical public URL.
|
|
154
|
+
No closing keywords are needed in the PR description; follow the owning rule.
|
|
155
|
+
|
|
156
|
+
## End-of-work audit
|
|
157
|
+
|
|
158
|
+
List issues touched by this work and reconcile each against its PR and release.
|
|
159
|
+
For example, `gh issue list --repo OWNER/REPO --assignee @me --state open` helps
|
|
160
|
+
find assigned work, but does not replace the list of issues actually touched.
|
|
161
|
+
Check merged PRs for completed work still open; distinguish pending release-action
|
|
162
|
+
closure from an authorized manual disposition. Verify closure through the issue's
|
|
163
|
+
actual state, not an assumption about merging.
|
|
164
|
+
|
|
165
|
+
Leave no issue In progress without an active writer. For unfinished work, set
|
|
166
|
+
Paused or Blocked with what remains and what it waits for. Reconcile follow-ups
|
|
167
|
+
with existing issues. Perform only authorized mutations; otherwise report the
|
|
168
|
+
proposed changes and the blocker. Summarize completed issues, pending release
|
|
169
|
+
closures and unfinished scope without publishing local paths or harness details.
|
|
170
|
+
|
|
171
|
+
## How it is proven
|
|
172
|
+
|
|
173
|
+
Read the final body and state, for example with
|
|
174
|
+
`gh issue view <n> --repo OWNER/REPO --json body,state`. The original report is
|
|
175
|
+
intact, the status block matches the actual PR and release, and any authorized
|
|
176
|
+
closure is observable. Until release-action runs, pending closure is not Done.
|
|
177
|
+
|
|
178
|
+
## What breaks
|
|
179
|
+
|
|
180
|
+
- Two body writers lose each other's updates even if both reread first.
|
|
181
|
+
- A status comment buries current state and needlessly notifies subscribers.
|
|
182
|
+
- Manual closure before release bypasses release-action's delivery contract.
|
|
183
|
+
- Filing every advisory grows the backlog without a necessary delivery.
|
|
184
|
+
- Stale In progress blocks the next person without anyone doing the work.
|
|
@@ -27,7 +27,9 @@ Also use this loop for:
|
|
|
27
27
|
Prefer a release/preview for trivial changes, external consumers unable to use
|
|
28
28
|
the local feed, or CI-only behavior this loop cannot reproduce.
|
|
29
29
|
|
|
30
|
-
**Local verification replaces waiting, not shipping.**
|
|
30
|
+
**Local verification replaces waiting, not shipping.** Other waits a candidate
|
|
31
|
+
can avoid are in [cratis-engineering-release-trains](../cratis-engineering-release-trains/SKILL.md).
|
|
32
|
+
After local proof, release
|
|
31
33
|
the producer through the normal authorized workflow and bump the consumer to the
|
|
32
34
|
released version. Local feeds, pins and images never go into production or a PR.
|
|
33
35
|
Single-repository work needs its own regression specs, not this overlay. Released
|