Skip to content

State That a Python Profile Belongs to a Declared Directory, and When a Repo May Declare Several #3492

Closed

Description

@ptr727

Summary

python-codestyle's references/profiles.md opens its "Two profiles" section with "A repo's Python is one of two shapes". That reads as one profile per repository. The text after it is per directory: the validator runs the gates "in each directory the caller declares in its python-directories input", and registry/repos.json pythonDirectories is a list. No rule says when a repository may declare more than one Python directory, or what may separate them. CODESTYLE.md "Script and Utility File Names" says only "Directories are out of scope".

Use case

ptr727/Blog declares two Python directories:

  • checks/ holds the build-time gates and a browser trial. It is standard library only, so it is the lint-only profile, run with uvx and unittest.
  • scripts/ holds the media and text utilities. They import Pillow at runtime from a requirements.txt, so it is the build profile in its pip form, run with pytest.

Blog's maintainer asked whether this split conforms or should converge on one directory, and said "it is different today" does not count as a reason (ptr727/Blog#538). The hub session's answer was that a split by profile trait is legitimate and a split by purpose alone is not. Two stdlib-only directories are an example of the second. Within one directory, purpose is carried by the file name instead, with the _gate or _lint suffix. Merging Blog's two directories would put every stdlib gate behind the Pillow install. Nothing in the carried text says any of this, so each repository has to re-derive it.

Expected

profiles.md, and CODESTYLE.md where it routes there, state the rule:

  • A profile belongs to a declared directory, not to the repository.
  • A repository declares one directory per profile its Python needs.
  • Directories are split by profile trait, meaning third-party runtime dependencies or being the deliverable, not by purpose. Purpose is carried by the file name.

The opening sentence then says a directory's Python is one of two shapes.

🤖 Generated with Claude Code

Activity

  1. ptr727 commented on Oct 28, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown round 2 claim. Branch: feature/3492-python-profile-per-directory. Predicted file set: .agents/skills/python-codestyle/references/profiles.md, CODESTYLE.md (only where it routes Python profiles or says directories are out of scope), and .agents/skills/python-codestyle/SKILL.md or .agents/skills/shell-codestyle/SKILL.md include regions only if a CODESTYLE.md section they include changes, plus their regenerated copies under .github/skills/ and .claude-plugin/fleet-skills/ (skill files and .source-digests/ entries) for python-codestyle and shell-codestyle.

  2. ptr727 commented on Oct 28, 2026

    @ptr727
    OwnerAuthor

    Stopped for a maintainer decision (round 2, branch feature/3492-python-profile-per-directory, two unpushed commits, worktree clean).

    The issue's rule "a repository declares one directory per profile its Python needs" caps a repository at two declared Python directories. registry/repos.json already declares eight for HomeAutomation-Config. Three are build-profile uv projects, each with its own pyproject.toml and uv.lock. Five are lint-only, each beside the component it serves. As worded, the rule makes both groups non-conformant, and one pyproject.toml builds one distribution, so the build projects cannot simply merge.

    Options put to the maintainer:

    • (a) Ship the rule as worded, and file a conformance follow-up against HomeAutomation-Config.
    • (b) One build-profile directory per deliverable, each with its own lock, and at most one lint-only directory.
    • (c) One build-profile directory per deliverable. Lint-only Python may sit beside the component it serves. Only a split by purpose alone, within one place, is forbidden.
  3. ptr727 commented on Oct 28, 2026

    @ptr727
    OwnerAuthor

    Maintainer decision, 2026-10-28: option (c). One build-profile directory per deliverable, each with its own lock. Lint-only Python may sit beside the component it serves. Only a split by purpose alone, within one place, is forbidden. HomeAutomation-Config conforms as is. Two stdlib-only directories split by purpose alone still merge.

  4. ptr727 commented on Oct 28, 2026

    @ptr727
    OwnerAuthor

    Promotion fix claim (round 2, during the #3553 freeze). Branch: feature/3492-root-gating-condition. Files: .agents/skills/python-codestyle/references/profiles.md (the "A repository declaring none" sentence only) and its regenerated copies and .source-digests/ entry. It fixes Copilot thread PRRT_kwDOQ5caqM6w9liQ on #3553: the root of a repository declaring no directory is gated only where it tracks a root pyproject.toml, and WORKFLOW.md D1.2 does not state that.

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 documentationskillsAgent skill

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions