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.
npx agentmods add rules/sagar25-code-it/ps3d-cad-studio/architecturegit clone --depth 1 https://github.com/sagar25-Code-it/ps3d-cad-studioWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00014 | $0.01232 |
| Opus 5 | $0.00007 | $0.00616 |
| Sonnet 5 | $0.00003 | $0.00246 |
| Haiku 4.5 | $0.00001 | $0.00123 |
Grade A, and why
architecture 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PS3D architecture context
architecture:
summary: >-
PS3D CAD Studio is an original local-first browser CAD research application.
A strict semantic document and revision journal are authoritative; a serial
Web Worker evaluates bounded geometry and evidence; IndexedDB stores atomic
committed revisions; and a Three.js adapter renders disposable mesh buffers.
The Phase 0 worker-qualified slice models one centered-bore bracket. The
current public-preview release candidate implements a bounded multi-workbench preview for
sketching, parts, assemblies, surfaces, drawings, and consent-gated
model-neutral automation. Vercel Web Functions expose account, personal
access-token, OAuth metadata/consent, health, and remote HTTPS MCP routes;
Supabase Auth and Postgres provide the optional tenant boundary. Preview
geometry remains truth-labeled and does not inherit the qualified solid claim.
style: modular-monolith
layers:
- name: http
paths:
- apps/studio-web/index.html
- apps/studio-web/src/main.tsx
- apps/studio-web/src/App.tsx
- apps/studio-web/src/styles.css
- api
- name: business
paths:
- packages/model-schema/src
- packages/commands/src
- packages/sketch-kernel/src
- packages/solid-kernel-api/src
- packages/solid-bracket-kernel/src
- packages/evidence/src
- packages/import-export/src
- packages/workbench-core/src
- packages/workbench-sketch/src
- packages/workbench-geometry/src
- packages/workbench-drawing/src
- packages/workbench-mcp/src
- name: infrastructure
paths:
- apps/studio-web/src/worker-client.ts
- packages/model-worker/src
- packages/worker-protocol/src
- packages/persistence/src
- packages/viewport-three/src
- packages/solid-manifold-adapter/src
- apps/mcp-server/src
- supabase/migrations
- scripts
boundaries:
- The semantic document and journal are authoritative; kernel and renderer state are derived
- Geometry evaluation runs serially in a dedicated worker and commits only after validation and persistence
- Dependency-specific objects, WASM pointers, mutable meshes, and renderer objects never cross package or worker boundaries
- Main-thread code independently verifies correlated worker results before accepting a revision
- The viewport receives render artifacts only and must not mutate the model
- Native input and automation input use exact bounded schemas and fail closed on unknown fields
- Production geometry must remain project-owned until a separately qualified permissive adapter passes all gates
- MCP or other automation is read-only by default; mutations require preview, explicit consent, commit, and undo evidence
- The official MCP SDK and Zod are Node-only transport dependencies; browser automation uses the pure project-owned handler layer
- Cloud sessions are validated server-side; raw personal tokens are shown once, stored only as HMAC-SHA-256 digests, scoped, expiring, revocable, tenant-isolated, and rate-limited
- Remote APIs fail closed when required cloud configuration is absent and never expose Supabase administrative credentials to browser code
integrations:
- Browser Web Worker for model evaluation and failure containment
- Browser IndexedDB for atomic committed revision persistence
- Three.js for disposable 3D visualization and picking
- File API and object URLs for bounded native JSON and binary STL exchange
- Web Crypto SHA-256 for semantic, journal, evidence, and mesh identities
- Vercel static hosting plus Web-standard Node.js functions for authenticated APIs and remote MCP
- Supabase Auth and Postgres with forced row-level security and service-only token digest/quota operations
- Local Node stdio MCP server plus a pure-handler remote HTTPS MCP transport
- OAuth protected-resource metadata and consent bridge for capable AI hosts; scoped personal access tokens remain the explicit fallback
auth:
userFacingPattern: Supabase verified-email password sessions with recovery and browser-session storage
partnerPattern: OAuth 2.1-style delegated access where supported, otherwise unique scoped expiring PS3D personal access tokens
configPaths:
- api/_lib/cloud.ts
- api/auth.ts
- api/access-tokens.ts
- api/oauth-consent.ts
- supabase/migrations/202608220001_remote_mcp.sql
errorHandling:
businessException: typed Diagnostic result returned across exact schemas
codes:
- INVALID_NUMBER
- UNIT_MISMATCH
- OUTSIDE_SUPPORTED_ENVELOPE
- RESOURCE_LIMIT
- INVALID_GRAPH
- UNDERCONSTRAINED
- CONSTRAINT_CONFLICT
- DEGENERATE_GEOMETRY
- OPEN_PROFILE
- SELF_INTERSECTING_PROFILE
- AMBIGUOUS_PROFILE
- UNSUPPORTED_GEOMETRIC_CASE
- INVALID_SOLID_INPUT
- INVALID_SOLID_OUTPUT
- IDEMPOTENCY_CONFLICT
- REVISION_CONFLICT
- WORKER_FAILURE
- PERSISTENCE_FAILURE
- UNSUPPORTED_OR_CORRUPT_FILE
- UNSUPPORTED_CAPABILITY
- CONFIRMATION_REQUIRED
- PREVIEW_RECEIPT_MISMATCH
diagrams:
existing:
- docs/architecture/SYSTEM_ARCHITECTURE.md
- docs/architecture/NUMERICAL_AND_GEOMETRY_CONTRACT.md
preferredFormat: mermaid
repositoryRelationships:
- primary: https://github.com/sagar25-Code-it/ps3d-cad-studio
consumes: []
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.
- 2d ago First seen · 130 lines · 14 tokens per session scan A fce00b01de4e
architecture is a cursor rule published in the GitHub repository sagar25-Code-it/ps3d-cad-studio (0 stars, last pushed 3d ago), licensed MIT. It adds 14 tokens to every session and 1,232 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-31.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.