🥋 Dojo Jutsu Docs docs.dojojutsu.com
← dojojutsu.com Launch Portal →

# Dojo-as-Code: AI Dojo Blueprint Specification (v1.0)

Specification Standard: dojo-blueprint.v1
Supported Formats: YAML & JSON
Target Audience: Dojo Owners, Senseis, Systems Integrators, and LLM Copilots.

# 1. Overview & Vision

The Dojo-as-Code blueprint format enables school owners and Senseis to declare their entire martial arts school configuration in a single human-readable YAML or JSON document.

Whether provisioning a new dojo from scratch or calibrating belt ranks, class times, terminology, and branding themes for an existing school, Senseis can simply describe their school to an AI assistant (ChatGPT, Claude, Gemini) and paste the resulting blueprint directly into Dojo Jutsu.


# 2. Blueprint Schema Structure (dojo-blueprint.v1)

YAML
schema_version: "1.0"

dojo:
  name: "Osaka Aikikai"
  slug: "osaka-aikikai"
  invite_code: "OSAKA26"
  payment_provider: "elavon_terminal"  # elavon_terminal, manual_terminal, stripe, square, cash

settings:
  theme: "indigo"                      # forest_green, crimson, indigo, obsidian, bamboo_ochre
  grace_period_days: 5
  low_credit_threshold: 1

terminology:
  head_instructor: "Shihan"
  assistant_instructor: "Fukushihan"
  student: "Deshi"
  curriculum_group: "Aiki Waza"
  transfer_letter_title: "Shōkaijō (紹介状) — Letter of Introduction" # Bujutsu/Karate default, or "Official Rank Verification & Transfer Letter"
  resume_title: "Jutsu Dossier"        # Bujutsu default, or "Martial Arts Resume"

directory:                             # Optional public directory & finder listing
  city: "Pensacola"
  state_region: "FL"
  postal_code: "32501"
  latitude: 30.4213
  longitude: -87.2169
  style_tags: ["Bujutsu", "Motobu Udundi", "Kobudo", "Traditional"]
  schedule_tags: ["0530 Early Morning", "Evening", "Weekend"]
  is_directory_listed: true
  trial_offer_summary: "Free introductory Keiko session for disciplined seekers"

ranks:
  - display_order: 1
    name: "6th Kyu - Rokkyu"
    belt_color_hex: "#FFFFFF"
    stripe_count: 0
    min_classes_required: 20
  - display_order: 2
    name: "5th Kyu - Gokyu"
    belt_color_hex: "#F57F17"
    stripe_count: 0
    min_classes_required: 30
  - display_order: 3
    name: "1st Dan - Shodan"
    belt_color_hex: "#121212"
    stripe_count: 0
    min_classes_required: 120

schedules:
  - title: "Tuesday General Keiko"
    day_of_week: 2                     # 1=Monday ... 7=Sunday
    start_time: "18:30"                # 24-hour HH:mm
    duration_minutes: 75
    location_name: "Main Tatami"
  - title: "Saturday Dawn Keiko"
    day_of_week: 6
    start_time: "05:30"
    duration_minutes: 90
    location_name: "Main Tatami"

roster:                                # Optional student import list
  - full_name: "Kenji Sato"
    rank_name: "6th Kyu - Rokkyu"
    plan_type: "recurring_monthly"     # recurring_monthly, class_pack, drop_in, comped
    paid_days_or_credits: 30

# 3. Validation Rules & Field Constraints

Node / FieldTypeRequiredAllowed Values / Constraints
schema_versionStringYesMust be "1.0".
dojo.nameStringYes (for new)1–80 characters.
dojo.slugStringNoLowercase alphanumeric with hyphens (^[a-z0-9-]+$). Auto-generated if omitted.
dojo.invite_codeStringNoUppercase alphanumeric (^[A-Z0-9_-]+$). Auto-generated if omitted.
dojo.payment_providerStringNoelavon_terminal, manual_terminal, stripe, square, clover, cash, zelle.
settings.themeStringNoforest_green, crimson, indigo, obsidian, bamboo_ochre.
settings.grace_period_daysIntegerNo0 to 30 days (default 5).
settings.low_credit_thresholdIntegerNo0 to 5 classes (default 1).
terminology.head_instructorStringNoe.g., Sensei, Shihan, Sabumnim, Professor, Sifu.
terminology.assistant_instructorStringNoe.g., Senpai, Coach, Instructor.
terminology.studentStringNoe.g., Student, Deshi, Practitioner.
terminology.curriculum_groupStringNoe.g., Kata & Kihon, Techniques, Forms, Syllabus.
terminology.transfer_letter_titleStringNoe.g., "Shōkaijō (紹介状) — Official Letter of Introduction & Rank Transcript" (Bujutsu/Karate default) or "Official Rank Verification & Academy Transfer Letter".
terminology.resume_titleStringNoe.g., "Jutsu Dossier" (Bujutsu default) or "Martial Arts Resume". Never hardcode "Budo".
directory.cityStringNoCity of physical dojo location (e.g., "Pensacola", "Tokyo").
directory.state_regionStringNoState or province (e.g., "FL", "Okinawa").
directory.postal_codeStringNoPostal code / ZIP code (e.g., "32501").
directory.latitudeFloatNoGeographic latitude (e.g. 30.4213).
directory.longitudeFloatNoGeographic longitude (e.g. -87.2169).
directory.style_tagsList[String]NoArray of martial disciplines (e.g. ["Bujutsu", "Motobu Udundi", "Kobudo", "Karate", "BJJ"]).
directory.schedule_tagsList[String]NoArray of session tags (e.g. ["0530 Early Morning", "Evening", "Weekend"]).
directory.is_directory_listedBooleanNoWhether the dojo appears in public radar directory (true / false).
directory.trial_offer_summaryStringNoShort trial description for prospective seekers.
ranks[].display_orderIntegerYesUnique positive integer (1 = introductory/lowest rank).
ranks[].nameStringYesName of rank/belt level (e.g. 10th Kyu - White Belt).
ranks[].belt_color_hexStringYes6-character hex color format: ^#[0-9A-Fa-f]{6}$.
ranks[].stripe_countIntegerNo0 through 4 stripes (default 0).
ranks[].min_classes_requiredIntegerNoPositive integer (default 20).
schedules[].titleStringYesClass name (e.g. Saturday Morning Keiko).
schedules[].day_of_weekIntegerYes1 (Monday) through 7 (Sunday).
schedules[].start_timeStringYes24-hour time format: ^\d{2}:\d{2}$ (e.g. 05:30, 18:45).
schedules[].duration_minutesIntegerNoPositive integer (default 90).
roster[].full_nameStringYesStudent full name.
roster[].rank_nameStringNoMatched case-insensitively against dojo ranks.
roster[].plan_typeStringNorecurring_monthly, class_pack, drop_in, comped.

# 4. Foreign-Key-Safe Natural-Key Upsert Semantics

When importing into an existing dojo, existing records in SQLite must never be deleted blindly because other tables (such as dojo_members.current_rank_id, attendance_logs.schedule_id, and student_curriculum_progress) hold foreign keys to them.

  • Ranks Natural-Key Matching:
  • Matches existing rank rows by display_order first, or case-insensitive name.
  • If a match is found: updates name, belt_color_hex, stripe_count, and min_classes_required in-place while preserving the existing UUID id.
  • If no match is found: inserts a new rank with a generated UUID.
  • Class Schedules Natural-Key Matching:
  • Matches existing schedules by day_of_week and start_time.
  • If matched: updates title, duration_minutes, and location_name in-place while preserving the existing UUID id.
  • If not matched: inserts a new schedule with a generated UUID.
  • Settings & Terminology:
  • Deep-merged into dojos.settings_json so custom unmentioned preferences are not lost.
  • Outbox Synchronization:
  • Every modified or created rank, schedule, and dojo record automatically enqueues an UPDATE or INSERT to sync_queue for cloud replication.

# 5. Sensei AI Prompt Template

Copy and paste the prompt below into ChatGPT, Claude, or Gemini to produce a valid dojo-blueprint.v1 file:

MARKDOWN
You are an expert martial arts school curriculum and operations architect.
Generate a valid YAML configuration according to the "dojo-blueprint.v1" schema for my martial arts school.

Here are the details of my school:
- Art / Style: [e.g. Brazilian Jiu-Jitsu / Shotokan Karate / Aikido / Judo / Taekwondo]
- School Name: [e.g. Shindokan Dojo]
- Sensei / Head Title: [e.g. Professor / Sensei / Sabumnim]
- Color Theme: [forest_green, crimson, indigo, obsidian, or bamboo_ochre]
- Belts / Ranks: [List belt progression from beginner to black belt]
- Weekly Class Schedule: [List class times, days of week, and titles]

Output ONLY valid YAML matching this specification:

schema_version: "1.0"

dojo:

name: "..."

slug: "..."

invite_code: "..."

payment_provider: "elavon_terminal"

settings:

theme: "..."

grace_period_days: 5

low_credit_threshold: 1

terminology:

head_instructor: "..."

assistant_instructor: "..."

student: "..."

curriculum_group: "..."

transfer_letter_title: "..." # e.g. "Shōkaijō (紹介状) — Letter of Introduction" or "Official Rank Verification & Transfer Letter"

resume_title: "..." # e.g. "Jutsu Dossier" or "Martial Arts Resume" (never "Budo")

directory: # Optional radar directory listing

city: "..."

state_region: "..."

postal_code: "..."

style_tags: ["..."]

schedule_tags: ["..."]

is_directory_listed: true

ranks:

  • display_order: 1

name: "..."

belt_color_hex: "#..."

stripe_count: 0

min_classes_required: 20

schedules:

  • title: "..."

day_of_week: 1

start_time: "18:00"

duration_minutes: 60

TEXT
Do not include commentary, markdown explanations, or additional text outside the YAML block.