Skip to content

Kiln-AI/Kiln / .agents/skills/kiln-conventions

kiln-conventions

Verified

Kiln's code conventions and per-area gotchas, plus a diff gate that enforces the mechanical ones. Invoke before writing or changing any Python, TypeScript or Svelte code in the Kiln repo (libs/core, libs/server, app/desktop, app/web_ui), and when reviewing such a change. Covers comments, startup and entry points, globals and module state, config reads, module layering, library-vs-app rules and async I/O.

FileKindSize
SKILL.mdskill md6.5 KB
references/core.mdmarkdown7.6 KB
references/rules.mdmarkdown13.8 KB
references/server_desktop.mdmarkdown8.8 KB
references/web_ui.mdmarkdown5.3 KB
scripts/conventions_gate.pyscript22.2 KB
scripts/gate_allow.txtmarkdown657 B
scripts/gate_config.jsonconfig1.8 KB
scripts/test_conventions_gate.pyscript18.2 KB

scripts/gate_config.json

View on GitHub
{
  "skip_globs": [
    "**/test_*.py",
    "**/*_test.py",
    "**/conftest.py",
    "**/*.test.ts",
    "**/*.test.js",
    "**/*.spec.ts",
    "**/__tests__/**",
    "app/web_ui/tests/**",
    "**/api_schema.d.ts",
    "app/desktop/studio_server/api_client/kiln_ai_server_client/**",
    "app/desktop/build/**",
    "app/web_ui/build/**",
    "specs/**"
  ],
  "checks": {
    "history-comment": {"enabled": true, "severity": "FAIL"},
    "global-stmt": {"enabled": true, "severity": "FAIL"},
    "bool-env": {"enabled": true, "severity": "FAIL"},
    "env-access": {"enabled": true, "severity": "FAIL"},
    "core-config-shared": {
      "enabled": true,
      "severity": "FAIL",
      "paths": ["libs/core/kiln_ai/**"]
    },
    "lib-imports-routes": {
      "enabled": true,
      "severity": "FAIL",
      "paths": ["app/web_ui/src/lib/**"]
    },
    "module-level-call": {"enabled": true, "severity": "WARN"},
    "module-level-construct": {"enabled": true, "severity": "WARN"},
    "module-level-subscribe": {
      "enabled": true,
      "severity": "WARN",
      "paths": ["app/web_ui/src/lib/**"]
    }
  },
  "env_access_allowed": [
    "libs/core/kiln_ai/utils/config.py",
    "app/desktop/desktop_main.py",
    "app/desktop/dev_server.py",
    "app/desktop/dev_app.py",
    "app/desktop/dev_env.py",
    "app/desktop/log_config.py",
    ".agents/**"
  ],
  "module_level_call_ignore": ["\\.include_router\\(", "\\.add_typer\\("],
  "module_level_construct_patterns": [
    "\\bSettings\\(",
    "\\bmake_app\\(",
    "\\bcreate_app\\(",
    "\\bFastAPI\\(",
    "Config\\.shared\\(",
    "\\bAsyncClient\\(",
    "\\.Client\\(",
    "\\bSession\\(",
    "\\bcreate_engine\\(",
    "Registry\\(",
    "\\b(?:Thread|Process)PoolExecutor\\(",
    "\\b(?:Lock|Semaphore|Event)\\(",
    "\\bThread\\("
  ]
}
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall