Skip to content

gretchenfitze/anti-slop / skills/anti-slop-rollout

anti-slop-rollout

Verified

Carry out the next step of an anti-AI-slop rollout plan (anti-slop/todo.md, with the reasoning in anti-slop/plan.md) as one pull request: add a single check in whatever stack the plan records (a strict TypeScript flag, sonarjs, unnecessary-effect, or test lint rules, layer boundaries, a custom lint rule from a past bug, an agent hook, Stryker mutation testing, knip and dead-file scripts, jscpd, react-doctor, a CI gate, a scheduled report, and the final trim of the agent rules file), fix or baseline what it finds, document its commands in the agent rules file, verify it, and open the PR. Use when the user says "next anti-slop step", "do step N of the plan", asks which rules in AGENTS.md or CLAUDE.md the linters now cover, or asks to set up knip, jscpd, react-doctor, Stryker, sonarjs, or boundaries the gradual way (warnings first, CI gate last) in a repo that has an anti-slop plan. Needs the plan from anti-slop-audit; without one, run the audit first.

assets/lint-rules/index.cjs

View on GitHub
// Project lint rules, loaded by oxlint (`jsPlugins`) or ESLint (flat config `plugins`).
// Each rule encodes an incident. Its message says what failed, why (the incident), and what to do instead.

const SERVICE_FILE = /(?:^|\/)services\//;
const ROUNDING = new Set(["round", "floor", "ceil", "trunc"]);

const noRoundingInServices = {
  meta: {
    type: "problem",
    docs: {
      description: "Services return exact values; formatters round",
      url: "https://evilmartians.com/chronicles/ten-anti-ai-slop-moves-for-frontend-projects-going-faster-than-humans-can-review#5-turn-recurring-mistakes-into-linter-rules",
    },
    messages: {
      rounding:
        "Services compute, formatters round. Rounding twice moves the value off its true one: Math.round(h * 10) / 10 turned a 26h15m total into 26h18m. Return the exact value and round in the formatter.",
    },
    schema: [],
  },
  create(context) {
    if (!SERVICE_FILE.test(context.filename ?? context.getFilename())) return {};

    return {
      CallExpression(node) {
        const { callee } = node;

        if (callee.type !== "MemberExpression" || callee.property.type !== "Identifier") return;

        const name = callee.property.name;
        const mathRounding =
          callee.object.type === "Identifier" && callee.object.name === "Math" && ROUNDING.has(name);

        if (mathRounding || name === "toFixed") context.report({ node, messageId: "rounding" });
      },
    };
  },
};

module.exports = {
  meta: { name: "local" },
  rules: {
    "no-rounding-in-services": noRoundingInServices,
  },
};
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 196kUpdated Claude CodeCodexVerifiedInstall