Skip to content

State the Fleet Standard for Script and Utility File Names #3140

Closed

Description

@ptr727

Problem

No fleet rule says how a script or utility file is named. CODESTYLE.md has no file-naming section, and GOVERNANCE.md "Repo-Scoped Secrets" shows snake_case example names without ever stating a casing. As a result, repositories mix conventions: hyphenated Python modules, PascalCase shell scripts, and secret files with hyphenated and snake_case stems side by side. The audit has nothing to check them against.

Agreed standard

Type Rule Basis
Python .py lowercase snake_case PEP 8 module naming. A hyphenated module also cannot be imported
Shell .sh and PowerShell .ps1 lowercase-hyphenated The Linux CLI convention. A cross-platform pair keeps one name, sync-tools.sh beside sync-tools.ps1
Windows batch .cmd and .bat lowercase-hyphenated The same convention as shell and PowerShell. A shim that puts a command on PATH takes the name of the command it provides, sync-tools.cmd launching sync-tools.ps1
PowerShell functions inside a .ps1 Verb-Noun with an approved verb (Get-Verb) PSScriptAnalyzer PSUseApprovedVerbs. This is a command rule, not a file rule
Env and secret files lowercase snake_case stem mail_relay.env, db_root_password
Env variable names and CI secret names UPPER_SNAKE_CASE POSIX and GitHub convention

Clauses:

  • Installed commands. An extensionless executable placed on PATH or into a system slot (systemd, cron, run-parts, motd) is named as a command: lowercase-hyphenated with no extension, whatever language it is written in.
  • Wrapper exemption. A thin launcher whose only job is to run a Python tool keeps that tool's stem, so fetch_report.py, fetch_report.sh, and fetch_report.ps1 stay grouped together.
  • Externally fixed names are exempt. Git hook names, __init__.py, conftest.py, Pester's .Tests.ps1 suffix (its stem mirrors the script under test), a PowerShell data file (.psd1) whose name a tool fixes, such as a module manifest named for its module or PSScriptAnalyzerSettings.psd1, which PSScriptAnalyzer finds by that name, and any name a platform defines.
  • Directories are out of scope.

Departures, stated on purpose so a reader does not "fix" them back:

  • The Google Shell Style Guide asks for underscores in shell file names. The fleet uses hyphens instead, matching installed Linux commands and the existing scripts.
  • Microsoft's approved verbs govern command names. A .ps1 run by path is a file rather than an exported command, so the file takes the shell convention and its functions take Verb-Noun.

Python follows PEP 8.

Work

  • Add a General subsection "Script and Utility File Names" to CODESTYLE.md stating the table, the clauses, and the departures.
  • Add one bullet to GOVERNANCE.md "Repo-Scoped Secrets" stating that a secret file's stem is lowercase snake_case.
  • Sweep every surface that already states part of this, such as the python-codestyle Skill's module-naming line, so the rule has one home and the others point to it.

Both files are carried, so the rule reaches every fleet repository on its next resync. Follow-up audit checks and renames are filed separately and depend on this issue.

Activity

  1. ptr727 commented on Oct 16, 2026

    @ptr727
    OwnerAuthor

    Waiting on this issue: ptr727/HomeAutomation-Config#1117 (script renames) and ptr727/HomeAutomation-Config#1118 (secret file stems with a host migration). Hub follow-ups: #3141, #3142, #3143.

  2. added 2 commits that reference this issue on Oct 18, 2026
    cd5b9f9
    66b2382
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions