Declarative .mdcCursor/Claude/Windsurf ルールと n8n ワークフローIDE ルールゼロシークレット漏洩の監査済み

TypeScript 5.8 厳密モード、ゼロエニーおよび境界検証ルール

strictNullChecks、noUncheckedIndexedAccess、判別共用体、および TypeScript モノリポジトリ全体でのランタイム JSON 境界解析を強制する宣言型 IDE ルール。

宣言型エージェントおよびIDEルールファイル

---
description: TypeScript 5.8 strict type-safety, discriminated unions, and zero-any API boundaries
globs: **/*.{ts,tsx}
alwaysApply: true
---

# TypeScript 5.8 Strict Type-Safety Constitution

- Enable `"strict": true`, `"noUncheckedIndexedAccess": true`, and `"noImplicitOverride": true` in every `tsconfig.json`.
- NEVER use `any` or double-cast `as unknown as T`; type untrusted network/JSON inputs as `unknown` and narrow with explicit schema validators.
- Model async UI states and domain events as discriminated unions (`{ status: 'loading' } | { status: 'ok'; data: T } | { status: 'error'; message: string }`).
- Use `import type { ... }` for type-only imports so bundlers elide compile-time declarations deterministically.
- Enforce exhaustive `switch` checks using a `never` helper in `default` branches.

## Verification Check
```bash
npx tsc --noEmit --pretty false
```

コミュニティ設定メモと制作レビュー (0)

コミュニティノートはまだありません。以下で実稼働構成のヒントを共有してください。

セットアップメモまたは検証ヒントを投稿する

公開された MCP ツールとリソース スキーマ インスペクター

ツール/リソース識別子入力パラメータ実行動作
forbid_explicit_any**/*.{ts,tsx}Replaces any and unsafe as casts with unknown + narrowed type guards.