@clipboard-health/ai-rules 2.18.3 → 2.18.5

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.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/ai-rules",
3
- "version": "2.18.3",
3
+ "version": "2.18.5",
4
4
  "description": "Pre-built AI agent rules for consistent coding standards.",
5
5
  "keywords": [
6
6
  "ai",
@@ -24,7 +24,7 @@ When a bug traces into a `@clipboard-health/*` library, read the source code in
24
24
  - **eslint-plugin**: Clipboard's ESLint Plugin
25
25
  - **example-nestjs**: A NestJS application using our libraries, primarily for end-to-end testing.
26
26
  - **execution-context**: A lightweight Node.js utility for managing execution contexts and metadata aggregation using AsyncLocalStorage.
27
- - **groundcrew**: Linear-driven orchestrator that launches AI coding agents in isolated git worktrees, with workspace lifecycle, sandbox auth, and usage tracking.
27
+ - **groundcrew**: Linear-driven orchestrator that launches AI coding agents in git worktrees, with workspace lifecycle, Sprite remote runners, and usage tracking.
28
28
  - **json-api**: TypeScript-friendly utilities for adhering to the JSON:API specification.
29
29
  - **json-api-nestjs**: TypeScript-friendly utilities for adhering to the JSON:API specification with NestJS.
30
30
  - **mongo-jobs**: MongoDB-powered background jobs.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toErrorMessage = toErrorMessage;
4
- // Prefer stack over message for Error instances to preserve debugging context.
4
+ // Prefer stack over message for Error instances to keep debugging context.
5
5
  function toErrorMessage(error) {
6
6
  return error instanceof Error ? (error.stack ?? error.message) : String(error);
7
7
  }
@@ -18,12 +18,31 @@ If `Commits ahead of default branch` is `(unknown)`, `origin/HEAD` couldn't be r
18
18
 
19
19
  Before doing any step, output the full 7-step checklist below in your first response so it stays in recent context across sub-skill calls. Do not skip this — it's what keeps you from stopping after `simplify`.
20
20
 
21
+ Use this PR body shape when creating or refreshing descriptions:
22
+
23
+ ```md
24
+ ## Summary
25
+
26
+ Briefly explain the user intent from session history and the meaningful behavior/system change. If intent cannot be determined from the session or diff, ask the user before creating or refreshing the PR. Do not write a file-by-file changelog.
27
+
28
+ ## Validation
29
+
30
+ - List proof of validation: commands, screenshots, telemetry, Loom, or `Not run: <reason>`.
31
+
32
+ ## Notes
33
+
34
+ Optional: ticket links, rollout plan, residual risk, or areas for reviewers to focus on.
35
+ ```
36
+
37
+ - Omit `## Notes` when there are no useful notes.
38
+ - Do not invent ticket links, validation evidence, rollout plans, or risks. Use `Not run: <reason>` when validation was not run.
39
+
21
40
  1. Create a new branch if on main (e.g., `feat/add-user-validation`, `fix/null-check-in-parser`).
22
41
  2. Run the `simplify` skill on the full PR diff — `git diff $(git merge-base HEAD origin/HEAD)..HEAD` plus any uncommitted changes. When it returns, your very next action is to restate the remaining steps (3–7) and continue with step 3 in the same turn. Do not stop, do not end the turn with a simplify summary.
23
42
  3. If `git status --short` shows changes, create a single conventional commit with `git commit --no-gpg-sign`.
24
43
  4. Push the branch to origin.
25
- 5. Look up the current agent session ID with `bash scripts/find-session-id.sh '<phrase>'`. Pass a distinctive verbatim chunk (≥10 words) from the most recent user message; see the script header for quoting constraints. On success the script prints `<agent> <id>`; otherwise nothing if empty, omit the session ID line below.
44
+ 5. Look up the current agent session ID with `bash scripts/find-session-id.sh '<phrase>'`. Pass a distinctive verbatim chunk (≥10 words) from the most recent user message; see the script header for quoting constraints. If the script prints `codex <id>`, use `Agent session: codex resume <id>`. If it prints `claude-code <id>`, use `Agent session: claude --resume <id>`. If empty, there is no session footer line.
26
45
  6. Check for an existing PR with `gh pr view`.
27
- - No PR: create with `gh pr create`. Title = commit subject. Description = brief explanation of **why**, not what. Append `Agent session ID: <output of step 5>` (omit if step 5 produced no output) and `<!-- commit-push-pr:created v1 core@3.4.0 -->` on their own lines at the end.
28
- - PR exists: refresh the body via `gh pr edit --body` so (a) the new commit's changes are reflected in the prose, (b) `Agent session ID: <output of step 5>` appears in the body append if missing, never remove or rewrite existing session ID lines so each contributing session is preserved and (c) any existing `<!-- commit-push-pr:created v1 ... -->` line is preserved verbatim (append `<!-- commit-push-pr:created v1 core@3.4.0 -->` if absent). Then report the URL.
46
+ - No PR: create with `gh pr create`. Title = commit subject. Description = the PR body shape above, followed by the session footer line if known and `<!-- commit-push-pr:created v1 core@3.4.0 -->`.
47
+ - PR exists: refresh the body via `gh pr edit --body` so (a) the new commit's changes are reflected in the prose while existing `## Summary`, `## Validation`, and `## Notes` sections are preserved unless clearly stale, (b) any known session footer line is appended if missing, never removing or rewriting existing `Agent session: ...` or `Agent session ID: ...` lines, and (c) any existing `<!-- commit-push-pr:created v1 ... -->` line is preserved verbatim, appending `<!-- commit-push-pr:created v1 core@3.4.0 -->` if absent. Then report the URL.
29
48
  7. End with one short text response: branch name and the full PR URL (e.g., `https://github.com/clipboardhealth/core-utils/pull/123`). Never use shorthand like `repo#123` — always output the complete URL.