@clipboard-health/ai-rules 0.2.4 → 0.2.6
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/backend/AGENTS.md +6 -0
- package/backend/CLAUDE.md +6 -0
- package/common/AGENTS.md +6 -0
- package/common/CLAUDE.md +6 -0
- package/frontend/AGENTS.md +6 -0
- package/frontend/CLAUDE.md +6 -0
- package/fullstack/AGENTS.md +6 -0
- package/fullstack/CLAUDE.md +6 -0
- package/package.json +1 -2
- package/scripts/sync.js +25 -0
- package/scripts/toErrorMessage.js +6 -0
package/backend/AGENTS.md
CHANGED
|
@@ -78,3 +78,9 @@
|
|
|
78
78
|
- Leverage `readonly` properties for function parameter immutability.
|
|
79
79
|
- Prefer narrow types whenever possible with `as const` assertions, `typeof`, `instanceof`, `satisfies`, and custom type guards.
|
|
80
80
|
- Implement exhaustiveness checking using `never`.
|
|
81
|
+
|
|
82
|
+
<!-- Source: .ruler/common/zOverlay.md -->
|
|
83
|
+
|
|
84
|
+
# Overlay
|
|
85
|
+
|
|
86
|
+
- If an ./OVERLAY.md file exists, read it for additional rules.
|
package/backend/CLAUDE.md
CHANGED
|
@@ -76,3 +76,9 @@
|
|
|
76
76
|
- Leverage `readonly` properties for function parameter immutability.
|
|
77
77
|
- Prefer narrow types whenever possible with `as const` assertions, `typeof`, `instanceof`, `satisfies`, and custom type guards.
|
|
78
78
|
- Implement exhaustiveness checking using `never`.
|
|
79
|
+
|
|
80
|
+
<!-- Source: .ruler/common/zOverlay.md -->
|
|
81
|
+
|
|
82
|
+
# Overlay
|
|
83
|
+
|
|
84
|
+
- If an ./OVERLAY.md file exists, read it for additional rules.
|
package/common/AGENTS.md
CHANGED
|
@@ -65,3 +65,9 @@
|
|
|
65
65
|
- Leverage `readonly` properties for function parameter immutability.
|
|
66
66
|
- Prefer narrow types whenever possible with `as const` assertions, `typeof`, `instanceof`, `satisfies`, and custom type guards.
|
|
67
67
|
- Implement exhaustiveness checking using `never`.
|
|
68
|
+
|
|
69
|
+
<!-- Source: .ruler/common/zOverlay.md -->
|
|
70
|
+
|
|
71
|
+
# Overlay
|
|
72
|
+
|
|
73
|
+
- If an ./OVERLAY.md file exists, read it for additional rules.
|
package/common/CLAUDE.md
CHANGED
|
@@ -63,3 +63,9 @@
|
|
|
63
63
|
- Leverage `readonly` properties for function parameter immutability.
|
|
64
64
|
- Prefer narrow types whenever possible with `as const` assertions, `typeof`, `instanceof`, `satisfies`, and custom type guards.
|
|
65
65
|
- Implement exhaustiveness checking using `never`.
|
|
66
|
+
|
|
67
|
+
<!-- Source: .ruler/common/zOverlay.md -->
|
|
68
|
+
|
|
69
|
+
# Overlay
|
|
70
|
+
|
|
71
|
+
- If an ./OVERLAY.md file exists, read it for additional rules.
|
package/frontend/AGENTS.md
CHANGED
|
@@ -66,6 +66,12 @@
|
|
|
66
66
|
- Prefer narrow types whenever possible with `as const` assertions, `typeof`, `instanceof`, `satisfies`, and custom type guards.
|
|
67
67
|
- Implement exhaustiveness checking using `never`.
|
|
68
68
|
|
|
69
|
+
<!-- Source: .ruler/common/zOverlay.md -->
|
|
70
|
+
|
|
71
|
+
# Overlay
|
|
72
|
+
|
|
73
|
+
- If an ./OVERLAY.md file exists, read it for additional rules.
|
|
74
|
+
|
|
69
75
|
<!-- Source: .ruler/frontend/custom-hooks.md -->
|
|
70
76
|
|
|
71
77
|
# Custom Hook Standards
|
package/frontend/CLAUDE.md
CHANGED
|
@@ -64,6 +64,12 @@
|
|
|
64
64
|
- Prefer narrow types whenever possible with `as const` assertions, `typeof`, `instanceof`, `satisfies`, and custom type guards.
|
|
65
65
|
- Implement exhaustiveness checking using `never`.
|
|
66
66
|
|
|
67
|
+
<!-- Source: .ruler/common/zOverlay.md -->
|
|
68
|
+
|
|
69
|
+
# Overlay
|
|
70
|
+
|
|
71
|
+
- If an ./OVERLAY.md file exists, read it for additional rules.
|
|
72
|
+
|
|
67
73
|
<!-- Source: .ruler/frontend/custom-hooks.md -->
|
|
68
74
|
|
|
69
75
|
# Custom Hook Standards
|
package/fullstack/AGENTS.md
CHANGED
|
@@ -79,6 +79,12 @@
|
|
|
79
79
|
- Prefer narrow types whenever possible with `as const` assertions, `typeof`, `instanceof`, `satisfies`, and custom type guards.
|
|
80
80
|
- Implement exhaustiveness checking using `never`.
|
|
81
81
|
|
|
82
|
+
<!-- Source: .ruler/common/zOverlay.md -->
|
|
83
|
+
|
|
84
|
+
# Overlay
|
|
85
|
+
|
|
86
|
+
- If an ./OVERLAY.md file exists, read it for additional rules.
|
|
87
|
+
|
|
82
88
|
<!-- Source: .ruler/frontend/custom-hooks.md -->
|
|
83
89
|
|
|
84
90
|
# Custom Hook Standards
|
package/fullstack/CLAUDE.md
CHANGED
|
@@ -77,6 +77,12 @@
|
|
|
77
77
|
- Prefer narrow types whenever possible with `as const` assertions, `typeof`, `instanceof`, `satisfies`, and custom type guards.
|
|
78
78
|
- Implement exhaustiveness checking using `never`.
|
|
79
79
|
|
|
80
|
+
<!-- Source: .ruler/common/zOverlay.md -->
|
|
81
|
+
|
|
82
|
+
# Overlay
|
|
83
|
+
|
|
84
|
+
- If an ./OVERLAY.md file exists, read it for additional rules.
|
|
85
|
+
|
|
80
86
|
<!-- Source: .ruler/frontend/custom-hooks.md -->
|
|
81
87
|
|
|
82
88
|
# Custom Hook Standards
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/ai-rules",
|
|
3
3
|
"description": "Pre-built AI agent rules for consistent coding standards.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.6",
|
|
5
5
|
"bugs": "https://github.com/ClipboardHealth/core-utils/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@clipboard-health/util-ts": "3.17.3",
|
|
8
7
|
"@intellectronica/ruler": "0.3.10"
|
|
9
8
|
},
|
|
10
9
|
"keywords": [
|
package/scripts/sync.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable unicorn/no-process-exit */
|
|
4
|
+
/* eslint-disable n/no-process-exit */
|
|
5
|
+
const promises_1 = require("node:fs/promises");
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
7
|
+
const toErrorMessage_1 = require("./toErrorMessage");
|
|
8
|
+
const projectRoot = (0, node_path_1.join)(__dirname, "../../..");
|
|
9
|
+
const AI_RULES_SOURCE = (0, node_path_1.join)(__dirname, "..");
|
|
10
|
+
async function sync() {
|
|
11
|
+
try {
|
|
12
|
+
// Force copy files; rely on `git` if it overwrites files.
|
|
13
|
+
await (0, promises_1.cp)(AI_RULES_SOURCE, projectRoot, { recursive: true, force: true });
|
|
14
|
+
console.log("✅ @clipboard-health/ai-rules sync complete");
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
// Log error but exit gracefully to avoid breaking installs
|
|
18
|
+
console.error(`⚠️ @clipboard-health/ai-rules sync failed: ${(0, toErrorMessage_1.toErrorMessage)(error)}`);
|
|
19
|
+
process.exit(0);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// eslint-disable-next-line unicorn/prefer-top-level-await
|
|
23
|
+
void sync();
|
|
24
|
+
/* eslint-enable n/no-process-exit */
|
|
25
|
+
/* eslint-enable unicorn/no-process-exit */
|