本文へ移動
cccskills
無料GitHub で公開

criticality-guardrail

Load when working on Tier 0 Sovereign (payments, money, orders), Tier 1 Security (auth, tenancy, migrations), or Tier 2 Privacy (PII, erasure) tasks to enforce advanced model tier, Invariant-Breaker adversarial tests, and zero-PII telemetry validation.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md5.9 KB
  • resources/adversarial-archetypes.md6.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

<!-- ABOUTME: Master dynamic instruction router enforcing proportional rigor and safety gates based on task criticality tier. --> <!-- ABOUTME: Enforces proactive /grill-me intake, deep graph exploration, Invariant-Breaker failing tests, and Epistemic MAD review. -->

Criticality Guardrail & Dynamic Tier Execution

Rules

  1. Model Capability Escalation: Any task touching Tier 0 (sovereign), Tier 1 (security), or Tier 2 (privacy) MUST execute using an advanced capability model tier.
  2. Proactive Intake Clarification Gate: When a task resolves to Tier 0, 1, or 2, the agent is strictly forbidden from writing code immediately. If requirements, edge cases, or threat boundaries are underspecified, the agent MUST run a proactive /grill-me alignment interview first.
  3. Invariant-Breakers First: Author failing adversarial/exploit tests FIRST (concurrency races, double-spending, hold expiration races, cross-tenant header spoofing, PII log leakage).
  4. Exhaustive Knowledge Graph Exploration: High-criticality tasks must trace full caller/callee trees, outbox linkages, database lock contention, and ADR/I-VSD invariants.
  5. Zero Log-PII Invariant: Never pass entities implementing IContainsPii or sensitive properties to ILogger without [PiiData] redaction attributes.
  6. Expand/Contract Persistence Invariant: All migrations touching tenancy or money/user tables MUST use Expand/Contract to guarantee zero-downtime rolling updates.
  7. Transactional Outbox Mandate: Any domain event, webhook, or external notification resulting from a state transition MUST be written to the local Outbox table in the same transaction.

Dynamic Tier Execution Matrix (DTEM)

Lifecycle StageTier 0: Sovereign (Payments)Tier 1: Security (Auth/Tenancy)Tier 2: Privacy (PII/Erasure)Tier 3: Domain State (CQRS)Tier 4: Standard (UI/Docs)
1. Intake & Grill-MeMandatory /grill-me on money flows, hold expirationMandatory /grill-me on threat models, fail-closed authMandatory /grill-me on erasure authority, receipt tokensStandard Q&A (only if ambiguous)Autonomous defaults
2. Exploration DepthExhaustive graph (callers, callees, outbox, DB locks)Exhaustive graph + policy (Cerbos, BFF, global filters)Exhaustive data flow (*Pii fields, log sinks)Bounded caller/callee tracingLocal surface reading only
3. Invariant AlignmentStrict ADR-022/024, integer checked arithmeticStrict SECURITY-MODEL.md, AUTHORIZATION.mdStrict PRIVACY_ERASURE.md, zero-PII loggingClean Architecture (Domain $\rightarrow$ App $\rightarrow$ Infra)UI system: HAL links, BEM CSS
4. Invariant-Breaker TestsConcurrency races, double capture, currency overflowCross-tenant data leaks, forged headers, expired JWTUnmasked PII log injection, user resurrection racesBehavioral CQRS unit & integration testsAffordance & render tests (_links)
5. Testing RigorReal PostgreSQL tests, row locking & race testsReal multi-provider DB tests, Cerbos parityFull erasure lifecycle test, test log PII scan passTargeted project unit & integration testsFast verification + Release build
6. Multi-Agent ReviewEpistemic MAD (anonymized debate & weighted vote)Epistemic MAD (anonymized debate & weighted vote)Epistemic MAD (anonymized debate & weighted vote)Peer Review (backend-engineer-agent)Lightweight Self-Check
7. Teaching SummaryArchitecture, state transitions, recovery runbookThreat model resolution, tenant isolation proofData retention impact, erasure auditability proofSummary of CQRS handlers & mappingsConcise UI walkthrough

High-Leverage Testing Done Right

High-criticality tasks explicitly reject shallow unit tests and mock assertions. Consult resources/adversarial-archetypes.md for concrete recipes:

  1. Concurrency Race Tests: Simulate simultaneous requests (e.g. hold expiration racing against payment capture).
  2. Real Database Integration Tests: Run against real PostgreSQL / multi-provider test containers to verify transaction boundaries, row-level locking, and idempotency.
  3. Exploit Invariant Tests: Verify that tampering with tenant headers, negative amounts, or expired tokens fails closed with RFC 7807 ProblemDetails.
  4. Log Sink PII Scans: Assert that execution traces and logs contain zero plaintext emails, cards, or tokens.

Workflow

  1. Classify & Check Criticality: Read intent from .agents/contract/intents.yaml and resolve DTEM tier.
  2. Direction Alignment: If Tier 0, 1, or 2, trigger proactive /grill-me interview with the user.
  3. Deep Graph Exploration: Use code-review-graph MCP tools to map callers, callees, dependent flows, and DB lock contention.
  4. Draft Failing Invariant-Breakers: Write adversarial concurrency and exploit tests first.
  5. Implement Fail-Closed Solution: Author clean, transactional, PII-safe code.
  6. Verify Proportional Rigor: Run real DB integration tests, concurrency race checks, and log sink PII scans. (Stryker mutation gating is disabled during greenfield dev).
  7. Epistemic MAD Review: Execute anonymized multi-agent debate and post-hoc voting.
  8. Comprehensive Technical Teaching: Provide a deep architectural teaching summary before completing the task.

Verification

  • dotnet build --configuration Release --verbosity quiet
  • dotnet test --project tests/Event.Architecture.Tests/Event.Architecture.Tests.csproj --configuration Release --verbosity quiet

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Load for Blazor/MudBlazor UI changes involving forms, dialogs, focus, keyboard navigation, landmarks, ARIA, color contrast, RTL-safe styling, or WCAG 2.2 AA tests; not for backend-only changes.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月12日 更新

Load when a task asks to research, verify, compare, or look up framework/package behavior, release notes, standards, RFCs, CVEs, or unfamiliar APIs; use repository evidence first, then official docs, and not for codebase navigation alone.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月12日 更新

aspire

無料

Load for Aspire AppHost work: start/stop/wait resources, inspect dashboard/logs/traces, add integrations/resources, rebuild a service, run isolated worktrees, or diagnose Aspire orchestration; not for plain dotnet apps, container-only deployments, or cloud deployment.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月12日 更新

Load for authentication or authorization changes involving BFF cookies/tokens, JWT validation, claims/user ID extraction, policies, handler access checks, impersonation, or 401/403 bugs; not for UI affordance gating alone.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月12日 更新

Load for Blazor BFF server work involving YARP proxy routes, cookie sessions, access-token forwarding/refresh, downstream API calls, BFF handlers, or browser-to-API auth failures; not for client component rendering or API JWT validation alone.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月12日 更新

Load when editing Blazor `.razor.css`, scoped selectors, `::deep`, BEM class names, RTL/logical CSS properties, or styling nested MudBlazor components; not for global design tokens or non-Blazor CSS.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月12日 更新

islamu-ngo のスキルをすべて見る

このスキルの問題を報告する