Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

technical-constitution

БесплатноБез исполняемых скриптовНе проверен

Generates technical implementation plans and architectural strategies that enforce the Project Constitution. Use when designing new features, starting…

irahardiantoот irahardianto★ 18 звёзд на GitHub

Об этом скилле

The Constitution: Technical Preference Universal Principles

⚖️ CRITICAL GOVERNANCE NOTICE

CRITICAL: BEFORE doing ANYTHING else, Read and Comprehend this document COMPLETELY.

MANDATORY COMPLIANCE CHECK:

Before executing your task, you must perform a "Constitution Lookup":

  1. IDENTIFY the domain of your task (e.g., API, DB, Auth, logging, etc.).
  2. SEARCH the relevant sections (e.g., grep "API Design").
  3. REVIEW Critical Constraints table for domain
  4. VERIFY your plan against the discipline and constraints before proceeding.

1. The Supremacy Clause & Conflict Resolution

When directives conflict or seem impossible to satisfy simultaneously, follow this precedence:

  1. Security Principles [Non-Negotiable]

    • OWASP Top 10 compliance
    • Input validation and sanitization
    • Authentication and authorization
    • Secrets management
    • No information leakage
    • Action: Security ALWAYS wins. Refactor other requirements to satisfy security.
  2. Testability & Modularity [Structural Law]

    • I/O isolation (dependencies mockable in tests)
    • Pure business logic (no side effects in core logic)
    • Clear module boundaries with contracts
    • Action: If code cannot be unit tested without external dependencies, refactor to add abstraction layer.
  3. Error Handling Standards [Reliability Law]

    • No silent failures
    • Correlation IDs required
    • JSON envelope format
    • Resource cleanup in all paths
    • Action: All error paths must be explicit. No exceptions.
  4. Language Idioms [Implementation Preference]

    • Use native patterns (defer, RAII, context managers)
    • Follow community conventions
    • Leverage standard library
    • Action: Implement above laws idiomatically, don't blindly copy other languages.
  5. Performance Optimizations [Measure First]

    • Appropriate data structures
    • Profile before optimizing
    • Caching strategies
    • Action: Only optimize with measured bottlenecks. Correctness > speed

Escalation Protocol

If following a directive is impossible:

  1. STOP coding immediately
  2. Document the conflict:
    • Which directives conflict?
    • Why is compliance impossible?
    • What are the tradeoffs?
  3. Propose alternatives:
    • Option A: [approach + which rules satisfied/violated]
    • Option B: [approach + which rules satisfied/violated]
    • ...
  4. ASK human for decision
    • Present the precedence hierarchy
    • Recommend least-harmful deviation option with justification based on hierarchy
    • Wait for explicit approval

CRITICAL: NEVER silently violate, If following directive is impossible, STOP and ask human

Example:

Scenario 1: Framework Requires Inheritance (Architecture vs Language Idiom)

  • Conflict: Django ORM requires model inheritance, but domain must be pure
  • Hierarchy: Architecture (Level 2) > Framework idiom (Level 4)
  • Resolution: Create Database Model (inherits ORM) + Pure Domain Entity + Mapper pattern
  • PROCEED: Architecture wins

Scenario 2: Performance vs Security

  • Conflict: Caching would speed up response but contains PII
  • Hierarchy: Security (Level 1) > Performance (Level 5)
  • Resolution: Sanitize PII before caching OR skip caching for PII endpoints
  • PROCEED: Security wins

Scenario 3: Testing Pure Functions with Time Dependencies

  • Conflict: Domain needs current timestamp but should be pure
  • Hierarchy: Architecture purity (Level 2) maintained via Time Port (Level 4 idiom)
  • Resolution: Inject Clock/Time interface as driven port, mock in tests
  • PROCEED: Both satisfied through proper port design

2. Critical Constraints Manifest (Context Triggers)

Agent Note: If the user query touches on these specific topics, prioritize the following internal rules over general knowledge. These are the High-Priority Constraints. Violating these is an automatic failure.

Topic Critical Constraint (Summary)
Architecture Testability-First Design. Domain is pure, All code must be independently testable. Feature-based packaging.
Essential Software Design SOLID Principles, Essential Design Practices(DRY, YAGNI, KISS), Code Organization Principles.
Error Handling JSON format only (code, message, correlationId). No silent failures. No try/catch swallowing.
Testing 70/20/10 Pyramid. Mock Ports, not Internals. Integration tests use real infrastructure (Testcontainers).
Concurrency Avoid shared memory. Use message passing/channels. Timeout ALL I/O operations.
Config Hybrid approach: YAML for structure, .env for secrets. Fail fast on missing config.
API Design Resource-based URLs. Standard HTTP status codes. Envelope response format (data, meta).
Security (Auth) Deny by default. Server-side checks EVERY request. RBAC/ABAC. MFA for sensitive ops. Rate limit (5/15min). Bcrypt/Argon2 only.
Security (Data) TLS 1.2+. Encrypt at
Полный SKILL.md на GitHub

Установить technical-constitution в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл technical-constitution?

Generates technical implementation plans and architectural strategies that enforce the Project Constitution. Use when designing new features, starting implementation tasks, refactoring code, or ensuring compliance with critical standards like Testability-First Architecture, security mandates, testing strategies, and error handling.

Как установить скилл technical-constitution?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл technical-constitution запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить technical-constitution с