coding-standards

A set of coding and review rules for PS3D CAD Studio, covering TypeScript, JavaScript, CSS, React, Three.js, Vite, and model-tool boundaries. It also defines testing, typing, and data-handling expectations.

In plain words
What is it for?
Use it when writing or reviewing PS3D code, deciding how model data should be handled, or checking whether tests and implementation follow project rules.
Why use it?
It gives contributors and coding agents a shared standard for safe, consistent changes in the repository.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/sagar25-code-it/ps3d-cad-studio/coding-standards
Clone the repo
git clone --depth 1 https://github.com/sagar25-Code-it/ps3d-cad-studio

Made for: Cursor.

Per session 821 This file is loaded in full into every session.
When invoked 821 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00821 $0.00821
Opus 5 $0.00411 $0.00411
Sonnet 5 $0.00164 $0.00164
Haiku 4.5 $0.00082 $0.00082

Measured yesterday against content hash 215926984548, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

coding-standards 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 yesterday.

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/project-context/coding-standards.mdc · 106 lines

What it actually says

PS3D coding standards

codingStandards:
  languages:
    TypeScript:
      version: "7.0.2"
      rules:
        - strict mode with exact optional properties and unchecked-index protection
        - ES modules with explicit .js import suffixes
        - immutable readonly domain records unless mutation is private and contained
        - no any, dynamic evaluation, or silent schema coercion in model boundaries
    JavaScript:
      version: ES2023
      rules:
        - build and verification scripts use Node built-ins where practical
    CSS:
      rules:
        - original project-owned tokens and responsive accessible layouts

  frameworks:
    React:
      version: 19.2.8
      rules:
        - functional components and accessible native controls
        - keep domain logic outside presentation components
    Three.js:
      version: 0.185.1
      rules:
        - disposable viewport adapter only; never authoritative model state
    Vite:
      version: 7.3.6
      rules:
        - enforce production geometry and Node-server boundaries and include license artifacts
    MCP:
      version: "2.0.0"
      rules:
        - keep transport code in apps/mcp-server and pure tool semantics in packages/workbench-mcp
        - expose no filesystem, network, environment-secret, credential, or hidden-state behavior
        - require preview, matching receipt, and explicit confirmation before returning a mutated project

  testing:
    framework: project-owned typed test harness
    runner: TypeScript compiler followed by Node execution
    location: tests
    requirements:
      - New model, constraint, geometry, persistence, protocol, export, and automation behavior requires independently derived tests
      - Tests use neutral requirements, mathematics, approved standards, or original synthetic cases
      - Boundary, failure, retry, determinism, and rollback cases accompany happy paths
      - Browser-visible workflows receive an executing Chromium smoke test before release review
    coverage:
      tool: requirement-traceability plus executed assertions
      threshold: null

  naming:
    commits: conventional with accurate Signed-off-by only from the actual contributor
    packages: workspace packages under packages/*; UI modules under apps/studio-web/src
    stableIds: lower-case namespace colon identifier

  review:
    blockingSeverities: [BLOCKER]
    strictReview: true
    dimensions:
      - neutral requirement traceability
      - independent authorship and provenance
      - semantic and numerical correctness
      - worker and transaction safety
      - security and privacy
      - accessibility and original UI identity
      - performance and resource limits
      - determinism and reproducibility
      - maintainability and entropy
    securityChecks:
      - exact schemas and size or count limits on untrusted inputs
      - no secrets, private keys, credentials, personal data, or .env contents
      - no dynamic code evaluation, remote code, or unapproved production WASM
      - dependency, license, integrity, notice, vulnerability, and production-graph reconciliation
      - exact lockfile-to-provenance inventory reconciliation

  entropy:
    enabled: true
    policy: remove-on-touch
    onChange:
      - remove unused symbols and commented-out code
      - delete superseded paths when replacing behavior
      - remove orphaned tests and configuration keys
      - keep source modules focused and below 500 lines where practical
    blockReview:
      - new commented-out code without a tracked reason
      - parallel superseded implementation left in the diff
      - unsupported feature represented as if it were implemented
      - untraceable generated or copied material
    reference: INDEPENDENT_DEVELOPMENT.md

  documentation:
    sdlcArtifacts: docs/sdlc/{workflowId}/
    projectGuide: CONTRIBUTING.md
    stackRules: []
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. yesterday First seen · 106 lines · 821 tokens per session scan A 215926984548

Subscribe to this mod's changes

coding-standards is a cursor rule published in the GitHub repository sagar25-Code-it/ps3d-cad-studio (0 stars, last pushed 2d ago), licensed MIT. It adds 821 tokens to every session, about $0.0041 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-31.