@rigour-labs/cli 2.10.0 → 2.12.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/dist/cli.js +20 -23
- package/dist/commands/check.js +77 -50
- package/dist/commands/constants.js +4 -7
- package/dist/commands/explain.js +30 -36
- package/dist/commands/guide.js +15 -21
- package/dist/commands/index.js +46 -18
- package/dist/commands/init.js +142 -105
- package/dist/commands/run.js +42 -48
- package/dist/commands/setup.js +21 -27
- package/dist/commands/studio.d.ts +2 -0
- package/dist/commands/studio.js +292 -0
- package/dist/init-rules.test.js +26 -31
- package/dist/smoke.test.js +28 -33
- package/package.json +10 -3
- package/studio-dist/assets/index-CSj2lLc7.css +1 -0
- package/studio-dist/assets/index-CmJzYc99.js +259 -0
- package/studio-dist/index.html +17 -0
- package/src/cli.ts +0 -110
- package/src/commands/check.ts +0 -179
- package/src/commands/constants.ts +0 -209
- package/src/commands/explain.ts +0 -75
- package/src/commands/guide.ts +0 -21
- package/src/commands/index.ts +0 -70
- package/src/commands/init.ts +0 -366
- package/src/commands/run.ts +0 -135
- package/src/commands/setup.ts +0 -28
- package/src/init-rules.test.ts +0 -59
- package/src/smoke.test.ts +0 -76
- package/src/templates/handshake.mdc +0 -39
- package/tsconfig.json +0 -10
- package/vitest.config.ts +0 -10
- package/vitest.setup.ts +0 -30
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Engineering Rigour Protocol - Enforces high software standards (SOLID, DRY, Patterns) via automated quality gates.
|
|
3
|
-
globs: **/*
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 🛡️ Rigour: Engineering Excellence Protocol
|
|
7
|
-
|
|
8
|
-
You are an Elite Software Engineer. You do not just write code that "works"; you write code that is **modular, maintainable, and rigorously verified.**
|
|
9
|
-
|
|
10
|
-
## 🚦 The Rigour Loop (Mandatory)
|
|
11
|
-
Before claiming "Done" for any task, you MUST follow this loop:
|
|
12
|
-
|
|
13
|
-
1. **Check**: Run `rigour_check_status` (via MCP) or `rigour check` (via CLI).
|
|
14
|
-
2. **Analyze**: If it fails, run `rigour_get_fix_packet` to understand the engineering violations.
|
|
15
|
-
3. **Refactor**: Apply **SOLID** and **DRY** principles to resolve the violations.
|
|
16
|
-
4. **Repeat**: Continue until `rigour_check_status` returns **PASS**.
|
|
17
|
-
|
|
18
|
-
## 🧩 Engineering Standards
|
|
19
|
-
Your code will be judged against these gates:
|
|
20
|
-
|
|
21
|
-
### 1. SOLID Principles
|
|
22
|
-
- **Single Responsibility**: Keep files small and focused.
|
|
23
|
-
- **Open/Closed**: Design for extension, not modification.
|
|
24
|
-
- **Interface Segregation**: Don't force dependencies on unused methods.
|
|
25
|
-
|
|
26
|
-
### 2. DRY (Don't Repeat Yourself)
|
|
27
|
-
- Extract common logic into utilities or shared services.
|
|
28
|
-
- If Rigour detects duplication, you must refactor immediately.
|
|
29
|
-
|
|
30
|
-
### 3. "Done is Done"
|
|
31
|
-
- No `TODO` or `FIXME` comments are allowed in the final state.
|
|
32
|
-
- Every placeholder is a failure of rigour.
|
|
33
|
-
|
|
34
|
-
## 🛠️ Tools at your disposal
|
|
35
|
-
- `rigour_check_status`: Get the current PASS/FAIL state.
|
|
36
|
-
- `rigour_get_fix_packet`: Get actionable instructions for failures.
|
|
37
|
-
- `rigour run "<command>"`: Use this CLI command to run yourself in a loop until you pass (Experimental).
|
|
38
|
-
|
|
39
|
-
**Remember:** Rigour is not just a tool; it is your engineering conscience. Hold yourself to the highest standard.
|
package/tsconfig.json
DELETED
package/vitest.config.ts
DELETED
package/vitest.setup.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { vi } from 'vitest';
|
|
2
|
-
|
|
3
|
-
// Mock Transformers.js to avoid native binary dependency issues and speed up tests
|
|
4
|
-
vi.mock('@xenova/transformers', () => ({
|
|
5
|
-
pipeline: async () => {
|
|
6
|
-
// Return a mock extractor that produces deterministic "embeddings"
|
|
7
|
-
return async (text: string) => {
|
|
8
|
-
// Create a fake vector based on the text length or hash
|
|
9
|
-
const vector = new Array(384).fill(0);
|
|
10
|
-
for (let i = 0; i < Math.min(text.length, 384); i++) {
|
|
11
|
-
vector[i] = text.charCodeAt(i) / 255;
|
|
12
|
-
}
|
|
13
|
-
return { data: new Float32Array(vector) };
|
|
14
|
-
};
|
|
15
|
-
},
|
|
16
|
-
env: {
|
|
17
|
-
allowImageProcessors: false,
|
|
18
|
-
},
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
// Also mock sharp just in case something else pulls it in
|
|
22
|
-
vi.mock('sharp', () => ({
|
|
23
|
-
default: () => ({
|
|
24
|
-
resize: () => ({
|
|
25
|
-
toFormat: () => ({
|
|
26
|
-
toBuffer: async () => Buffer.from([]),
|
|
27
|
-
}),
|
|
28
|
-
}),
|
|
29
|
-
}),
|
|
30
|
-
}));
|