chore: включить .cursor в репозиторий для частного remote

Made-with: Cursor
This commit is contained in:
Ivan Fontosh
2026-04-19 14:23:57 +08:00
parent a6cbcc273e
commit d14a674e22
11 changed files with 416 additions and 1 deletions
+55
View File
@@ -0,0 +1,55 @@
const fs = require("fs");
const path = require("path");
const { execSync } = require("child_process");
const statePath = path.join(process.cwd(), ".cursor", "pipeline-state.json");
function readState() {
if (!fs.existsSync(statePath)) {
return {
implementation: "pending",
review: "pending",
tests: "pending"
};
}
return JSON.parse(fs.readFileSync(statePath, "utf8"));
}
function fail(msg) {
process.stdout.write(JSON.stringify({ followup_message: msg }));
process.exit(0);
}
const state = readState();
if (state.implementation !== "done") {
fail("Run frontend-senior stage");
}
if (state.review !== "done") {
fail("Run reviewer stage");
}
if (state.tests !== "done") {
fail("Run unit-tests stage");
}
try {
execSync("npm run lint", { stdio: "pipe" });
} catch {
fail("Lint failed");
}
try {
execSync("npm run typecheck", { stdio: "pipe" });
} catch {
fail("Typecheck failed");
}
try {
execSync("npm run test", { stdio: "pipe" });
} catch {
fail("Tests failed");
}
process.exit(0);
+10
View File
@@ -0,0 +1,10 @@
{
"version": 1,
"hooks": {
"stop": [
{
"command": "node .cursor/hooks/final-verify.cjs"
}
]
}
}