From 8ea3e6ea93989550b220ac12a41ba9c4791ba271 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sun, 29 Mar 2026 10:05:35 -0700 Subject: [PATCH] =?UTF-8?q?chore(godot-config):=20=F0=9F=94=A7=20Update=20?= =?UTF-8?q?Godot=20engine=20configs,=20docs,=20and=20scripts=20with=20new?= =?UTF-8?q?=20process=20IDs,=20runner,=20and=20linting=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .godot.pid | 2 +- .tray.pid | 2 +- CLAUDE.md | 10 +++++++++ gdformatrc | 5 +++++ gdlintrc | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ run | 27 +++++++++++++++++++++++- 6 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 gdformatrc create mode 100644 gdlintrc diff --git a/.godot.pid b/.godot.pid index 50c4ff1..71fd31e 100644 --- a/.godot.pid +++ b/.godot.pid @@ -1 +1 @@ -3263305 +2147529 diff --git a/.tray.pid b/.tray.pid index eb75b65..c080949 100644 --- a/.tray.pid +++ b/.tray.pid @@ -1 +1 @@ -3263306 +2147530 diff --git a/CLAUDE.md b/CLAUDE.md index de23020..7c2f49b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -148,6 +148,16 @@ func _ready() -> void: ### Node Architecture Controllers are instantiated in code (`SomeScript.new()` + `add_child()`) — **not** embedded in `.tscn`. The main scene (`companion.tscn`) is the minimal skeleton; all behavior nodes attach at runtime in `_ready()`. +## Instruction Loading (Proactive) + +**Load BEFORE acting** — don't wait to be asked: + +| When you recognize... | Immediately load... | +|----------------------|---------------------| +| GDScript authoring, scene architecture, controller design | `~/.claude/instructions/godot-code-standards.md` | + +--- + ## Dev Commands ```bash diff --git a/gdformatrc b/gdformatrc new file mode 100644 index 0000000..885db18 --- /dev/null +++ b/gdformatrc @@ -0,0 +1,5 @@ +# lilith-gdtoolkit-config: GDScript Formatting Configuration +# Sync to project: lilith-gdtoolkit-sync +# Check for drift: lilith-gdtoolkit-sync --check + +line_length: 100 diff --git a/gdlintrc b/gdlintrc new file mode 100644 index 0000000..c41f26b --- /dev/null +++ b/gdlintrc @@ -0,0 +1,61 @@ +# lilith-gdtoolkit-config: GDScript Linting Configuration +# Sync to project: lilith-gdtoolkit-sync +# Check for drift: lilith-gdtoolkit-sync --check + +class-definitions-order: +- tools +- classnames +- extends +- docstrings +- signals +- enums +- consts +- staticvars +- exports +- pubvars +- prvvars +- onreadypubvars +- onreadyprvvars +- others + +# Naming conventions (GDScript standard) +class-name: ([A-Z][a-z0-9]*)+ +class-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)* +class-load-variable-name: (([A-Z][a-z0-9]*)+|_?[a-z][a-z0-9]*(_[a-z0-9]+)*) +constant-name: _?[A-Z][A-Z0-9]*(_[A-Z0-9]+)* +enum-name: ([A-Z][a-z0-9]*)+ +enum-element-name: '[A-Z][A-Z0-9]*(_[A-Z0-9]+)*' +function-name: (_on_([A-Z][a-z0-9]*)+(_[a-z0-9]+)*|_?[a-z][a-z0-9]*(_[a-z0-9]+)*) +function-argument-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)* +function-preload-variable-name: ([A-Z][a-z0-9]*)+ +function-variable-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*' +load-constant-name: (([A-Z][a-z0-9]*)+|_?[A-Z][A-Z0-9]*(_[A-Z0-9]+)*) +loop-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)* +signal-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*' +sub-class-name: _?([A-Z][a-z0-9]*)+ + +# Limits (aligned with Lilith ecosystem standards) +max-line-length: 100 +max-file-lines: 500 +max-public-methods: 20 +max-returns: 6 +function-arguments-number: 10 + +# Indentation: tabs (GDScript convention) +tab-characters: 1 + +# Enabled checks +# trailing-whitespace, unnecessary-pass, mixed-tabs-and-spaces are active (not null) + +# Disabled checks +comparison-with-itself: null +duplicated-load: null +expression-not-assigned: null +no-elif-return: null +no-else-return: null +unused-argument: null + +# Exclusions +disable: [] +excluded_directories: !!set + .git: null diff --git a/run b/run index 4d01ef2..317775b 100755 --- a/run +++ b/run @@ -10,13 +10,19 @@ PIDFILE="$ROOT/.godot.pid" TRAY_PIDFILE="$ROOT/.tray.pid" BRIDGE_PIDFILE="$ROOT/.bridge.pid" -# Load .env if present +# Load .env then .env.development (development overrides base) if [ -f "$ROOT/.env" ]; then set -o allexport # shellcheck disable=SC1091 source "$ROOT/.env" set +o allexport fi +if [ -f "$ROOT/.env.development" ]; then + set -o allexport + # shellcheck disable=SC1091 + source "$ROOT/.env.development" + set +o allexport +fi REQUIRED_SERVICES=( "model-boss-coordinator:model-boss" @@ -40,6 +46,25 @@ check_services() { ensure_services() { echo "Checking required services..." + + if [ "${RESTART_DEPENDENCY_SERVICES:-}" = "TRUE" ]; then + echo "Restarting dependency services (RESTART_DEPENDENCY_SERVICES=TRUE)..." + for entry in "${REQUIRED_SERVICES[@]}"; do + local unit="${entry%%:*}" + local label="${entry##*:}" + if systemctl --user restart "$unit" 2>/dev/null; then + echo " ✓ Restarted $label ($unit)" + else + echo " ⚠ Failed to restart $label ($unit) — continuing anyway" + fi + done + sleep 2 + echo "" + echo "Service status after restart:" + check_services || true + return 0 + fi + if check_services; then return 0 fi