tech-debt-prevention

tech-debt-prevention is a cursor rule for Cursor from madebyaris/poinf-of-sales. It costs 15 tokens per session (5,463 once invoked), scanned A, original, MIT.

Rules for preventing technical debt, meaning future maintenance problems caused by shortcuts or inconsistent code, through quality checks and architecture standards.

In plain words
What is it for?
Use them when setting up pre-commit checks, enforcing project-wide code quality, reviewing architecture, or guarding changes to business rules, APIs, databases, and performance.
Why use it?
They set review gates for formatting, types, tests, security, performance, APIs, database changes, bundle size, and other common sources of later problems.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them when setting up pre-commit checks, enforcing project-wide code quality, reviewing architecture, or guarding changes to business rules, APIs, databases, and performance.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/madebyaris/poinf-of-sales/tech-debt-prevention
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/madebyaris/poinf-of-sales

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tech-debt-prevention

README.md
[![agentmods](https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/tech-debt-prevention/github.svg)](https://agentmods.dev/rules/madebyaris/poinf-of-sales/tech-debt-prevention)
Your own site
<a href="https://agentmods.dev/rules/madebyaris/poinf-of-sales/tech-debt-prevention"><img src="https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/tech-debt-prevention/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tech-debt-prevention

Your own site · 80×15
<a href="https://agentmods.dev/rules/madebyaris/poinf-of-sales/tech-debt-prevention"><img src="https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/tech-debt-prevention.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,463 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.05463
Opus 5 $0.00008 $0.02731
Sonnet 5 $0.00003 $0.01093
Haiku 4.5 $0.00002 $0.00546

Measured 13d ago against content hash b2c6b7d8a33a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

tech-debt-prevention scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/tech-debt-prevention.mdc · 874 lines

How it starts

The opening of the file, as written. The whole thing — 874 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🏗️ Tech Debt Prevention & Code Quality Governance

🎯 Zero Tech Debt Philosophy

Proactive Prevention Strategy

// ✅ TECH DEBT PREVENTION: Systematic approach to code quality
namespace TechDebtPrevention {
  // Code quality metrics and thresholds
  interface QualityGates {
    code_coverage: { minimum: 85, target: 90 }
    complexity_score: { maximum: 10, target: 7 }
    duplication: { maximum: 3, target: 1 }
    performance: { api_response: '< 200ms', ui_render: '< 100ms' }
    security: { vulnerabilities: 0, code_quality: 'A' }
  }

  // Automated quality enforcement
  class QualityEnforcer {
    static enforcePreCommitQuality(): PreCommitHook {
      return {
        // Code format and style
        prettier_format: true,
        eslint_validation: true,
        typescript_strict_check: true,
        
        // Business logic validation
        business_rule_consistency: true,
        api_contract_validation: true,
        database_migration_safety: true,
        
        // Performance validation
        bundle_size_check: true,
        query_performance_validation: true,
        memory_leak_detection: true
      }
    }
  }
}

🔒 Consistency Enforcement Patterns

1. Architectural Consistency

// ✅ CONSISTENCY: Standardized architectural patterns
class ArchitecturalConsistency {
  // Enforce consistent API patterns
  static createAPIEndpoint<TRequest, TResponse>(
    config: APIEndpointConfig<TRequest, TResponse>
  ): StandardAPIEndpoint<TRequest, TResponse> {
    return {
      // Standardized request validation
      validateRequest: (request: TRequest): ValidationResult => {
        const validator = this.createValidator(config.validation_schema)
        return validator.validate(request)
      },

      // Standardized business logic execution
      executeBusinessLogic: async (request: TRequest): Promise<TResponse> => {
        // Consistent error handling
        try {
          // Standardized logging
          Logger.info(`Executing ${config.endpoint_name}`, { request })
          
          // Business logic with consistent patterns
          const result = await config.business_logic(request)
          
          // Standardized success response
          return {
            success: true,
            message: config.success_message,
            data: result,
            timestamp: new Date().toISOString(),
            request_id: generateRequestId()
          }
        } catch (error) {
          // Standardized error handling
          return this.handleStandardError(error, config.endpoint_name)
        }
      },

      // Standardized response formatting
      formatResponse: (response: TResponse): StandardAPIResponse<TResponse> => {
        return {
          ...response,
          version: config.api_version,
          performance_metrics: this.getPerformanceMetrics()
        }
      }
    }
  }

  // Enforce consistent component patterns
  static createBusinessComponent<TProps>(
    config: ComponentConfig<TProps>
  ): React.FC<TProps> {
    return React.memo((props: TProps) => {
      // Standardized error boundary
      return (
        <ErrorBoundary fallback={config.error_fallback}>
          {/* Standardized loading states */}
          <Suspense fallback={config.loading_fallback}>
            {/* Standardized accessibility */}
            <div 
              role={config.accessibility.role}
              aria-label={config.accessibility.label}
              className={cn(config.base_classes, props.className)}
            >
              {/* Component content with consistent patterns */}
              {config.render(props)}
            </div>
          </Suspense>
        </ErrorBoundary>
      )
    }, config.memo_comparison || shallowEqual)
  }

  // Database query consistency
  static createDatabaseQuery<TParams, TResult>(
    config: QueryConfig<TParams, TResult>
  ): DatabaseQuery<TParams, TResult> {
    return {
      execute: async (params: TParams): Promise<TResult> => {
        // Standardized query performance monitoring
        const startTime = performance.now()
        
        try {
          // Standardized parameter validation
          this.validateQueryParams(params, config.param_schema)
          
          // Standardized query execution
          const result = await this.executeQuery(config.query, params)
          
          // Standardized performance logging
          const duration = performance.now() - startTime
          this.logQueryPerformance(config.name, duration, params)
          
          return result
        } catch (error) {
          // Standardized error handling
          this.handleQueryError(error, config.name, params)
          throw error
        }
      }
    }
  }
}

Read the full file on GitHub · 874 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 874 lines · 15 tokens per session scan A b2c6b7d8a33a

Subscribe to this mod's changes

tech-debt-prevention is a cursor rule published in the GitHub repository madebyaris/poinf-of-sales (142 stars, last pushed 1y ago), licensed MIT. It adds 15 tokens to every session and 5,463 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.