speckit-security

Development Rules

The opinionated engineering discipline speckit-security enforces for contributors and ships as a template for users.

speckit-security ships with two versions of the development rules:

Both versions cover the same nine sections; the user template is stack-agnostic and designed to be customized per project.

The nine sections

  1. Commit message rules, describe the change, not the process. No AI attribution, no conversation context, no scrub history.
  2. File structure rules, hooks stay in hooks, scripts in scripts/, templates in templates/, tests in tests/, docs in docs/.
  3. Code organization and reuse, DRY. Extract helpers when a function exceeds 30 lines or does more than one thing.
  4. File length and complexity, target sizes per file type, hard ceilings before splitting.
  5. Naming conventions, files, functions, variables, env vars.
  6. Inline documentation, comment why, not what.
  7. Unit test rules, every bug fix lands with a regression test, incremental coverage, one-command runnable.
  8. Readability and maintainability, one idea per line, early returns, no magic numbers, readable at 3 AM.
  9. Review checklist, eleven items before opening a PR.

Runtime enforcement

Installing the rules with /speckit.tekimax-security.install-rules writes to three targets so they actually bind the AI agent:

  1. docs/DEVELOPMENT-RULES.md, full human-readable reference
  2. .specify/memory/constitution.md, Spec Kit constitution, read by every spec-kit-aware AI agent at session start
  3. Agent-specific context file (auto-detected from .specify/init-options.json):
AgentFile
claudeCLAUDE.md
copilot.github/copilot-instructions.md
geminiGEMINI.md
cursor / cursor-agent.cursorrules
windsurf.windsurfrules
opencode, codex, kiro-cli, everything elseAGENTS.md

The script is idempotent, running it twice does not duplicate the ## Development Rules section. Pass --force to replace an existing section.

Why this matters

Writing rules to a docs/ file only works if a human or agent explicitly reads that file. By also writing to the spec-kit constitution and the agent context file, the rules become part of every AI agent's system context at session start. The agent inherits the discipline automatically for every conversation, without the human having to remind it.

Running the installer

From the AI agent:

/speckit.tekimax-security.install-rules

From the terminal directly:

bash .specify/extensions/tekimax-security/scripts/bash/install-rules.sh

Optional flags:

  • --docs <path>, override the default docs/DEVELOPMENT-RULES.md target
  • --project-name <name>, override project name detection
  • --force, replace an existing ## Development Rules section

See /speckit.tekimax-security.install-rules for the full command reference.

On this page