Skip to content

CODESTYLE.md Routes .NET, Python and Shell, and Not the PowerShell the Fleet's Own CI Gates #1748

Done

Description

@ptr727

What this records

CODESTYLE.md carries a section per language, .NET, Python, and Shell. It carries no section for PowerShell or for Batch, and the fleet's own reusable validation workflow already gates PowerShell.

ptr727/HomeAutomation-Config is the carrier that surfaced this. It ships:

  • PowerShell: host-install/windows/install.ps1, host-install/windows/upgrade-host.ps1, with a PSScriptAnalyzerSettings.psd1 at the repository root.
  • Batch: host-install/windows/host-upgrade.cmd, host-install/linux/windows-backup/Backup-Lightroom.cmd, host-install/linux/windows-backup/Backup-Profile.cmd.

That repository's CODESTYLE.md "This Repository's Scripts" already names both languages, so a reader is not told the repository is bash-only. Naming a language is not routing it: nothing says how a .ps1 in a fleet repository is written, formatted, or verified.

Why it matters

The hub's reusable validation workflow runs PSScriptAnalyzer for a repository carrying .ps1 files, and PSScriptAnalyzerSettings.psd1 configures it. So an agent writing PowerShell in a fleet repository has a gate it can fail and no rule text saying what that gate wants. That is the same routing defect the carrier recorded for Python one language over, which was fixed by adding the section rather than by narrowing the claim.

A repository-local PowerShell section is not the fix, because CODESTYLE.md is carried content and a local addition reads as drift on the next fidelity check. The rule has to exist here or nowhere.

What would resolve it

Decide whether the fleet guide covers PowerShell and Batch at all.

  • If it does, a CODESTYLE.md section for each, at the granularity the Shell section uses, stating the formatter, the analyzer, and what the gate requires.
  • If it does not, say so explicitly in CODESTYLE.md, so a carrier shipping those languages knows the omission is a decision rather than a gap, and so the PSScriptAnalyzer gate's expectations are documented somewhere a carrier can reach.

Either answer lets a carrier's own OPERATIONS.md "Local Verification" name the invocation, which is the half that can be fixed downstream.

Provenance

Filed from ptr727/HomeAutomation-Config issue #300, with the maintainer's explicit permission to open an issue here and no code change. That issue was found while fixing its own #289, which corrected the language claims in CODESTYLE.md and GOVERNANCE.md and deliberately added no rule text for a language the fleet guide does not cover.

Activity

  1. ptr727 commented on Nov 1, 2026

    @ptr727
    OwnerAuthor

    Decision needed (decision triage, 2026-11-01)

    Question: Should the fleet CODESTYLE.md gain PowerShell and Batch language sections, given the carried validation workflow already gates .ps1 with PSScriptAnalyzer, or state explicitly that it does not cover them?

    Options, recommended first:

    1. Add a PowerShell section, state Batch as naming-only (recommended): PowerShell is gated (PSScriptAnalyzer with PSScriptAnalyzerSettings.psd1), the hub tracks 10 .ps1 files, and General already carries PowerShell rules, so a short section at the Shell section's granularity routes what is partly there. Batch has no analyzer and appears only as shim naming, so one sentence saying that is a decision covers it. Edits carried CODESTYLE.md, so a resync is owed. No work in flight.
    2. Full sections for both PowerShell and Batch: Most complete, but a Batch section has no gate behind it and the hub tracks 0 .cmd/.bat files to model it on. No work in flight.
    3. State that CODESTYLE.md covers neither: Cheapest, but contradicts the PowerShell and Batch rules General already states (CODESTYLE.md:47, 54-56, 66, 72) and leaves a CI gate with no routed rule text. No work in flight.

    Evidence: CODESTYLE.md language sections are .NET (78), Python (86), Shell (101) only. Gate at validate-task.yml:247-265. spec/divergences.json:25 covers the settings file. f308185 (#3652) added a PowerShell rule to General without a section.

    Blocks: none

  2. added
    decision
    on Nov 1, 2026
  3. ptr727 commented on Nov 1, 2026

    @ptr727
    OwnerAuthor

    Maintainer answer (decision triage, 2026-11-01): Option 1: add a short PowerShell section to CODESTYLE.md at the Shell section's granularity, covering when PowerShell is allowed, PSScriptAnalyzer defaults plus the settings file's documented exclusions, and the local invocation. Add one sentence saying Windows batch (.cmd/.bat) appears only as PATH shims, by decision. A resync is owed. This is now work for the next burndown round.

  4. removed
    decision
    on Nov 1, 2026
  5. ptr727 commented on Nov 24, 2026

    @ptr727
    OwnerAuthor

    Released (2026-11-24): PR #4404 merged to develop at c7f3a4c; branch and worktree cleaned up, so this claim holds no files.

    Backlog burndown claim (away-mode run, round 2, scope develop)

    Group: #1748, with #1153 items 1 and 2 only. Branch: burndown/codestyle-powershell-section.

    Predicted files:

    • CODESTYLE.md
    • AGENTS.md
    • .agents/skills/shell-codestyle/SKILL.md, plus the generated copies scripts/build_dist.py writes from it

    Scope: the PowerShell section and batch sentence #1748's 2026-11-01 answer decided. The narrowed Shell sentence #1153's 2026-09-07 and 2026-09-11 answers decided, kept byte-parallel in shell-codestyle "When shell, not Python". The Shell scope note, #1153 item 2. The AGENTS.md sentence naming the language sections and their Skills. The remaining #1153 items stay open and unclaimed. Whether the new section gets a powershell-codestyle Skill is split out to #4403, and this group adds no Skill.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions