Skip to content

chore(skill): prefer reusing existing code for repo homogeneity - #2952

Merged
alexbelgium merged 2 commits into
masterfrom
chore/skill-reuse-guidance
Aug 10, 2026
Merged

alexbelgium merged 2 commits into
masterfrom
chore/skill-reuse-guidance

Conversation

@alexbelgium

@alexbelgium alexbelgium commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

What changed

SKILL.md already demanded the simplest solution that works, but said nothing about where that
solution should come from. A bespoke-but-simple mechanism in one add-on is still a second way to
solve a problem that 120+ add-ons share. Three edits, placed at the points where the choice is
actually made rather than only in the preamble:

  • Standing rule — build out of what already exists (a .templates/ module, an existing
    cont-init script, the pattern a sibling add-on uses), with the reason stated: one maintainer,
    120+ add-ons, so a homogeneous repo beats a locally nicer bespoke design. Covers naming when
    something new is genuinely needed (option names, script numbering, file layout).
  • Step 3 (Plan) — search for prior art before ranking mechanism levels. If an add-on already
    handles it, the plan is "do what that one does"; not reusing an existing mechanism now requires
    saying why.
  • Step 5 (Simplify) — a reuse check alongside the existing ones: does any hunk reimplement
    something that already exists, and will the next add-on with this problem find one way to solve
    it or two? Fold the near-duplicate in, or justify the divergence in the PR body.

Verification

  • Checked — diff is confined to the three intended regions of one file; wrapping matches the
    file's existing ~100-column convention. Markdown only; no add-on, script, or CI path touched.
  • Not verified — nothing behavioural to exercise. This is guidance text; its effect shows up
    in future PRs, not in this one.
  • No CHANGELOG.md / version bump: no add-on directory is touched, so the add-on CI hard gates
    don't apply.

Rollback

Single-file, single-commit — git revert restores the previous wording exactly.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated workflow guidance to prioritize established repository patterns and conventions.
    • Added requirements to research existing approaches before introducing new mechanisms.
    • Expanded simplification reviews to identify duplicate implementations or document intentional differences.

The standing rule already demanded the simplest solution; it said nothing
about where that solution should come from. A bespoke-but-simple mechanism
in one add-on is still a second way to solve a problem 120+ add-ons share.

- Standing rule: build out of what exists (.templates/ module, existing
  cont-init script, a sibling add-on's pattern), and match repo naming
  conventions when something new is genuinely needed.
- Step 3 (Plan): search for prior art before ranking mechanism levels; not
  reusing an existing mechanism now requires stating why.
- Step 5 (Simplify): reuse check alongside the existing ones — fold
  near-duplicates in, or justify the divergence in the PR body.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 10, 2026 12:54
@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d363456f-417f-4480-a819-f5187af99267

📥 Commits

Reviewing files that changed from the base of the PR and between 19ce9cb and e87c64c.

📒 Files selected for processing (1)
  • .claude/skills/hassio-addon-workflow/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .claude/skills/hassio-addon-workflow/SKILL.md

Walkthrough

The add-on workflow guidance now requires prior-art searches, reuse of repository conventions, measurement of user-visible costs before adding complexity, and justification for retaining near-duplicate mechanisms.

Changes

Workflow guidance

Layer / File(s) Summary
Reuse and simplification requirements
.claude/skills/hassio-addon-workflow/SKILL.md
The workflow requires reuse of existing patterns, prior-art searches, consistent naming and layout, user-visible cost measurement, and justification for divergent implementations.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested labels: enhancement

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: reusing existing code to improve repository homogeneity.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s hassio-addon-workflow skill guidance to explicitly prefer reusing existing repo mechanisms (e.g., .templates/ modules or established add-on patterns) to keep solutions consistent across the large add-on set.

Changes:

  • Strengthens the standing rule to prioritize reuse/extension of existing patterns before introducing parallel mechanisms.
  • Adds an explicit “prior art” search step before selecting a mechanism level in the planning phase.
  • Adds a reuse-focused check to the “Simplify” step to reduce near-duplicate implementations across add-ons.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19ce9cb499

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .claude/skills/hassio-addon-workflow/SKILL.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/hassio-addon-workflow/SKILL.md:
- Around line 28-35: Update the “Standing rule” in the workflow guidance so the
measurement prerequisite applies only to performance or resource optimizations
and their trade-offs. Preserve the existing preference for simple, reusable,
homogeneous solutions, while allowing complexity required for correctness,
security, compatibility, accessibility, or host-specific behavior without
requiring a real-host performance measurement.
- Around line 124-128: Update the reuse guidance in the relevant checklist
section to explicitly preserve documented isolation rules: do not fold
add-on-specific behavior into symlink-shared scripts or other protected
extension points such as 80-configuration.sh; instead, use a new numbered script
when references/traps.md requires it. Retain the existing reuse expectation for
ordinary near-duplicates and require justification only when intentionally
diverging from the documented boundary.
- Around line 81-87: Broaden the prior-art search guidance in the workflow
planning section to include all relevant YAML/YML files, Dockerfiles, and
Markdown references in addition to shell scripts and config.yaml. Update the
grep command and its surrounding wording so shared mechanisms such as workflow
templates and documented scripts are discoverable before ranking and selecting
an implementation.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ff2d095-d007-4a3c-b5ef-531f65c081ec

📥 Commits

Reviewing files that changed from the base of the PR and between a04d818 and 19ce9cb.

📒 Files selected for processing (1)
  • .claude/skills/hassio-addon-workflow/SKILL.md

Comment thread .claude/skills/hassio-addon-workflow/SKILL.md
Comment thread .claude/skills/hassio-addon-workflow/SKILL.md
Comment thread .claude/skills/hassio-addon-workflow/SKILL.md
- Prior-art search: the --include='*.sh' --include='config.yaml' allowlist
  missed the repo's main mechanisms. `ARG MODULES=` lives in Dockerfiles and
  s6 v3 services are extensionless `run` files; searching for MODULES= found
  6 files under the allowlist vs 129 (125 Dockerfiles) without it. Widened to
  --exclude-dir=.git and named the two file types explicitly.
- Reuse vs isolation: "fold a near-duplicate into the existing mechanism"
  contradicted traps.md:125, which requires a new numbered script rather than
  editing scripts shared by symlink with the webtop add-ons. Added the carve-out.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@alexbelgium
alexbelgium merged commit 39da9cf into master Aug 10, 2026
25 of 26 checks passed
@alexbelgium
alexbelgium deleted the chore/skill-reuse-guidance branch August 10, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants