スキル一覧に戻る
charlesmsiegel

tg-standards

by charlesmsiegel

minimal version of telluriumgames to run game

1🍴 2📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: tg-standards description: > Django development standards for the Tellurium Games World of Darkness application. Use when: creating/editing models (characters, items, locations), implementing CRUD views, building forms, creating templates, configuring URLs, working with permissions, caching, migrations, testing, validation, deployment, or management commands. Triggers on: model inheritance patterns, polymorphic models, view mixins, gameline-specific code (vampire/werewolf/mage/wraith/changeling/demon/mummy/hunter), tg-card components, XP/freebie transactions, ST permissions, character templates, frontend styling.

TG Standards

Django patterns and conventions for the World of Darkness application.

Decision Tree

What are you working on?

TaskReference
Creating/editing a modelreferences/models.md
Creating/editing viewsreferences/views.md
Creating/editing formsreferences/forms.md
Creating/editing templatesreferences/templates.md
Setting up URLsreferences/urls.md
Permission checksreferences/permissions.md
Data validation, transactionsreferences/validation.md
Database migrationsreferences/migrations.md
Cachingreferences/caching.md
Writing testsreferences/testing.md
Deploymentreferences/deployment.md
Management commandsreferences/commands.md
Character templatesreferences/character-templates.md
WoD terminology lookupreferences/domain.md
Model inventory/statusreferences/model-inventory.md

Core Conventions (Always Apply)

Model Type Registration

type = "model_name"      # Snake_case, matches URL pattern
gameline = "gameline"    # vtm, wta, mta, wto, ctd, dtf, mtr, htr

URL Namespace Pattern

app:gameline:action:model_type

Required Model Methods

def get_absolute_url(self):
    return reverse("app:gameline:detail:model_type", kwargs={"pk": self.pk})

def get_update_url(self):
    return reverse("app:gameline:update:model_type", kwargs={"pk": self.pk})
# get_heading() inherited from core.models.Model - returns f"{gameline}_heading"

Mixin Stacking Order

class MyUpdateView(EditPermissionMixin, MessageMixin, UpdateView): pass
class MyListView(VisibilityFilterMixin, ListView): pass
class MyCreateView(LoginRequiredMixin, MessageMixin, CreateView): pass

Template Classes

Use tg-card, tg-table, tg-badge, tg-btn (not Bootstrap defaults).

Gameline Headings

GamelineClassData Attr
Vampirevtm_headingdata-gameline="vtm"
Werewolfwta_headingdata-gameline="wta"
Magemta_headingdata-gameline="mta"
Wraithwto_headingdata-gameline="wto"
Changelingctd_headingdata-gameline="ctd"
Demondtf_headingdata-gameline="dtf"
Mummymtr_headingdata-gameline="mtr"
Hunterhtr_headingdata-gameline="htr"

Use {{ object.get_heading }} for dynamic class.

File Location Pattern

ComponentPath
Modelapp/models/gameline/model_name.py
Viewsapp/views/gameline/{list,detail,create,update}.py
Formsapp/forms/gameline/model_name.py
URLsapp/urls/gameline/{list,detail,create,update}.py
Templatesapp/templates/app/gameline/model_name/{detail,list,form}.html

Quick Checklist

New Model

  • Proper base class (Character/Human, ItemModel, LocationModel, or Model)
  • type and gameline set
  • __str__, get_absolute_url, get_update_url
  • Meta with verbose_name, verbose_name_plural, ordering
  • Migration created

New View

  • Correct mixin order
  • select_related/prefetch_related for optimization
  • Form class selection based on permissions in UpdateView

New Template

  • Extends appropriate base
  • Uses tg-* classes
  • Gameline heading on cards
  • Loads {% load dots sanitize_text %} if using those filters

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です