-
Notifications
You must be signed in to change notification settings - Fork 122
FE-1533: Add a petrinaut-shipping skill to the repo skills #9392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kube
merged 6 commits into
claude/fe-1532-petrinaut-launch-json
from
claude/fe-1533-petrinaut-shipping-skill
Sep 3, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9eb6566
FE-1533: Add a petrinaut-shipping skill to the repo skills
kube aa5c1b0
FE-1533: Narrow the skill's activation triggers
kube 3c38e14
FE-1533: Make the CI wait loop survive a PR with no checks yet
kube c31749f
FE-1533: Read check state from JSON so a failed run ends the wait
kube 3f25653
FE-1533: Require checks to exist before the wait loop ends
kube 4195c11
FE-1533: Cover the activation boundary and correct the gate commands
kube File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| --- | ||
| name: petrinaut-shipping | ||
| description: "End-to-end procedure for shipping a change to the Petrinaut packages (libs/@hashintel/petrinaut, petrinaut-core, petrinaut-cli, apps/petrinaut-opt, apps/petrinaut-website): the verification gates per package, the changeset step, docs sync, pre-PR hygiene checks, and CI expectations from draft to ready. Use when implementing any change in these packages, when creating a PR for Petrinaut work, when running tests or lints for them, or when checking CI on a Petrinaut PR." | ||
| license: Apache-2.0 | ||
| metadata: | ||
| triggers: | ||
| type: domain | ||
| enforcement: suggest | ||
| priority: high | ||
| keywords: | ||
| - petrinaut | ||
| intent-patterns: | ||
| - "\\b(implement|create|fix|add|ship|change)\\b.*?\\bpetrinaut\\b" | ||
| - "\\bpetrinaut\\b.*?\\b(PR|tests?|lint|CI|checks?)\\b" | ||
| --- | ||
|
|
||
| # Shipping a Petrinaut change | ||
|
|
||
| Standing conventions (changeset policy, docs and diagram placement, CI quirks, the petrinaut-opt boundary) live in `libs/@hashintel/petrinaut/AGENTS.md` and `apps/petrinaut-opt/AGENTS.md`. This skill is the procedure that applies them. | ||
|
|
||
| ## Gates | ||
|
|
||
| Run for every touched package, after every increment: | ||
|
|
||
| ```sh | ||
| yarn fix:format >/dev/null 2>&1 | ||
| npx turbo run build test:unit lint:tsc lint:eslint --filter @hashintel/petrinaut --filter @hashintel/petrinaut-core --filter @hashintel/petrinaut-cli --force --output-logs errors-only | ||
| yarn lint:format | ||
| ``` | ||
|
|
||
| - Trim the `--filter`s to the touched packages; add `--filter @apps/petrinaut-website` when it consumes the change. | ||
| - `build` belongs in that list. `test:unit` depends on `^build`, which builds dependencies and not the selected package, so the React Compiler check, the browser-entry check, and the website's Vite build are otherwise never run. | ||
| - Structure changed (new folder, moved module): also `yarn workspace @local/petrinaut-arch-docs lint:arch-docs`, and add the layer declaration the AGENTS.md architecture section calls for. | ||
| - Arch-docs authored content or `content/diagrams/*.d2` changed: `lint:arch-docs` does not compile MDX or render D2. Run the site build once before pushing: `mise x -- yarn exec turbo run build --filter @apps/petrinaut-docs`. D2 labels containing `:` or `[` must be quoted. | ||
| - Python packages go through Turborepo: `npx turbo run test:unit lint:ruff lint:types --filter @apps/petrinaut-opt --filter @local/petrinaut-python --force`. A plain `uv run pytest` skips the end-to-end tests when the CLI bundle is missing, and skips the comparison of regenerated `openapi.json` that `@apps/petrinaut-opt` runs as part of its own `test:unit`. | ||
| - Formatting is oxfmt via the yarn scripts; never run prettier directly. `yarn lint:format` prints its verdict before its final line, so check the exit code rather than the last line of output. | ||
|
|
||
| ## Changesets | ||
|
|
||
| One `patch` changeset per PR covering the published packages the PR touches (`@hashintel/petrinaut`, `@hashintel/petrinaut-core`); none for pure refactors. Keep the text to one or two plain sentences. See the AGENTS.md conventions for the full policy. | ||
|
|
||
| ## Docs sync | ||
|
|
||
| User-visible behaviour changes update the user guide in the same PR; new pages need registration and a raw import, both test-enforced. The steps are in the "User-facing docs" section of `libs/@hashintel/petrinaut/AGENTS.md`. Doc screenshots cannot be uploaded by an agent: produce candidate captures, list the exact pages and sections to re-capture, and flag "screenshots pending" in the PR body and the summary. | ||
|
|
||
| ## Pre-PR hygiene | ||
|
|
||
| - Read `git diff --stat` against the base: no accidental directories, no unstaged leftovers, no generated output, no `mise.lock` churn. | ||
| - A `Bin` line in the stat for a text file means escape sequences became literal control bytes; fix it before pushing or the diff is unreviewable. | ||
| - A diff too large for one review gets split into stacked PRs, one concern per layer. | ||
|
|
||
| ## Draft, CI, ready | ||
|
|
||
| - Open the PR as a draft, body per the repo PR template. | ||
| - Watch checks until the run settles, and decide that in `jq`. Neither the exit status nor a pending count answers it alone: `gh pr checks` exits non-zero when checks are pending, when they failed, and when none are scheduled yet, and with `--json` it prints `[]` before any exist, so a pending count of zero also reads as "finished" on a PR that has not started. | ||
|
|
||
| ```sh | ||
| settled='[length, ([.[] | select(.bucket == "pending")] | length)] | .[0] > 0 and .[1] == 0' | ||
| for _ in $(seq 60); do | ||
| [ "$(gh pr checks NNNN --json bucket --jq "$settled" 2>/dev/null)" = "true" ] && break | ||
| sleep 60 | ||
| done | ||
| gh pr checks NNNN | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| The wait ends once checks exist and none are pending, failures included, so the table below reports them. Anything else, an empty list or a failed call, keeps waiting. The loop is bounded and the last call keeps its output, so an expired token or an unreachable API surfaces as an error rather than sleeping for ever. | ||
|
|
||
| - Judge failures against the CI bullet in the AGENTS.md conventions (Bench-CI non-blocking, the known flaky check, Vercel-side docs failures) before treating them as caused by the diff. | ||
| - Flip to ready only when checks are green. AI reviewers run at that point; triage their threads rather than leaving them unresolved. | ||
| - End any turn that changed the branch by stating what was committed and pushed, or that nothing was. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../.agents/skills/petrinaut-shipping |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.