Skip to content

docs(claude): expand CLAUDE.md with commands, conventions, architecture, review scope - #197

Merged
Oddly merged 1 commit into
mainfrom
docs/claude-md-expand
Aug 12, 2026
Merged

docs(claude): expand CLAUDE.md with commands, conventions, architecture, review scope#197
Oddly merged 1 commit into
mainfrom
docs/claude-md-expand

Conversation

@Oddly

@Oddly Oddly commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Adds four practical sections to CLAUDE.md based on patterns seen in similar repos (ansible/metrics-service, leogallego/claude-ansible-skills, Red Hat CoP good practices):

  • Development commands — check_argspecs / gen_argspecs / molecule per-scenario / ansible-lint, all in one place so the first thing at the start of a session is read, not guess.
  • Repository conventions — task naming (role_prefix | Verb), commit message style, FQCN, Co-authored-by: casing. All previously implicit.
  • Architecture — six-role hierarchy, elasticstack meta-role, cert host, key task-file entry points.
  • Multi-OS + memory notes — PR-time distro matrix, why full_stack uses max-parallel: 3, which scenarios are memory-heavy. Codifies what came up during the chore(ci): fail CI when defaults/main.yml drifts from argument_specs.yml #186 capacity-flake diagnosis.
  • Reviewing PRs (diff-aware) — what to skip vs. what to always re-verify per touched path, plus the cross-role gate-pattern guidance from the elasticstack_cert_pass fix pair.

Summary by CodeRabbit

  • Documentation
    • Expanded repository guidance covering development commands, conventions, role-based access requirements, bug-fix workflows, collection architecture, supported operating systems, and pull request review practices.
    • Standardized the naming of the fix workflow section.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

CLAUDE.md now documents repository commands, development conventions, role-default gating, bug-fix workflow, collection architecture, supported operating systems, scenario constraints, and diff-aware PR review rules.

Changes

Repository guidance

Layer / File(s) Summary
Development commands and conventions
CLAUDE.md
The guide adds commands for validation, generation, linting, Molecule execution, and CI coverage checks. It also defines task, commit, co-author, and fully qualified collection naming conventions.
Role and workflow guidance
CLAUDE.md
The guide requires explicit non-empty default checks, retains the bug-fix workflow, and documents role hierarchy, cross-role imports, certificate placement, and Elasticsearch task entry points.
Platform and review guidance
CLAUDE.md
The guide adds operating-system matrices, variable-loading rules, scenario constraints, and diff-aware review rules.

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

Possibly related PRs

🚥 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 expansion of CLAUDE.md with commands, conventions, architecture, and review guidance.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/claude-md-expand

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.

@Oddly
Oddly force-pushed the docs/claude-md-expand branch 3 times, most recently from c40433d to 6a29a18 Compare August 12, 2026 08:24

@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: 2

🤖 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.md`:
- Line 89: Update the directory-tree fences in CLAUDE.md, including the sections
around lines 89 and 141-143, to use the text language tag. Add the
markdownlint-cli2 command to the validation guidance, or narrow the stated lint
and drift-check coverage so it does not claim to validate CLAUDE.md.
- Around line 50-60: Update the role-gate guidance to use a falsey-aware default
or explicit null handling before checking length, covering undefined, null,
empty strings, lists, and dictionaries. Correct the scripts/check_argspecs.py
description to state that it compares top-level variables in defaults/main.yml
with argument_specs.yml, and remove the claim that it scans task gates.
🪄 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: ebaaecfe-b037-4090-83f1-01627caea2fe

📥 Commits

Reviewing files that changed from the base of the PR and between 6d11bf8 and 8fbe3de.

📒 Files selected for processing (1)
  • CLAUDE.md

Comment thread CLAUDE.md
Comment thread CLAUDE.md

Six roles, hierarchical:

```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Make the documentation pass Markdown lint.

markdownlint-cli2 reports MD040 because the directory-tree fence on Line [89] has no language. Add text to the opening fence. Also name the Markdown lint command in the validation guidance, or narrow the claim that the listed lint and drift checks cover CLAUDE.md.

Proposed fix
-```
+```text

Also applies to: 141-143

🧰 Tools
🪛 markdownlint-cli2 (0.23.2)

[warning] 89-89: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for 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.

In `@CLAUDE.md` at line 89, Update the directory-tree fences in CLAUDE.md,
including the sections around lines 89 and 141-143, to use the text language
tag. Add the markdownlint-cli2 command to the validation guidance, or narrow the
stated lint and drift-check coverage so it does not claim to validate CLAUDE.md.

Source: Linters/SAST tools

@Oddly
Oddly force-pushed the docs/claude-md-expand branch 3 times, most recently from 6f43590 to 6939610 Compare August 12, 2026 08:46
…ecture, review scope

CLAUDE.md previously carried only the Fix Workflow and role-default
gating sections. Expand to four practical chunks based on patterns
seen in similar repos (ansible/metrics-service, leogallego's
claude-ansible-skills, Red Hat CoP good practices):

- Development commands: what to run for check_argspecs, gen_argspecs,
  ansible-lint, molecule per-scenario, CI coverage. Stops the guessing
  step at the start of every session.
- Repository conventions: task naming (role_prefix | Verb), commit
  message style, FQCN, Co-authored-by casing, optional-string
  pointer convention. All already implicit; now written down.
- Architecture: six-role hierarchy, elasticstack meta-role, cert
  host, key task-file entry points. Explains why the same include
  patterns repeat across service roles.
- Multi-OS + memory notes: PR-time distro matrix, why full_stack
  uses max-parallel 3, which scenarios carry the largest memory
  footprint. Answers the questions that came up during #186's
  capacity-flake diagnosis.
- Reviewing PRs (diff-aware): what to skip vs. what to always
  re-verify per touched path. Includes the cross-role gate-pattern
  guidance that codifies today's elasticsearch+kibana fix pair.
@Oddly
Oddly force-pushed the docs/claude-md-expand branch from 6939610 to 6c54c3a Compare August 12, 2026 10:45
@Oddly Oddly added the ci:run Trigger gated pull request CI label Aug 12, 2026
@github-actions github-actions Bot removed the ci:run Trigger gated pull request CI label Aug 12, 2026

@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: 1

🤖 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.md`:
- Around line 98-109: Correct the role hierarchy description in CLAUDE.md to
state that four service roles import the elasticstack meta-role, while repos is
included directly by callers. Update the corresponding later wording as well,
preserving the existing distinction between service-role imports and direct
repos inclusion.
🪄 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: e40ff4a0-f4e5-4c0f-be54-dc96a39c2202

📥 Commits

Reviewing files that changed from the base of the PR and between 8fbe3de and 6c54c3a.

📒 Files selected for processing (1)
  • CLAUDE.md

Comment thread CLAUDE.md
Comment on lines +98 to +109
Six roles — one meta-role plus five siblings that import it:

```
roles/
elasticstack/ Meta-role. Runs once per host (idempotency fact
_elasticstack_role_imported). Owns cert generation via
elasticsearch-certutil, CA lifecycle, initial password
handling (elasticstack-passwords.yml), and the shared
variables service roles read (elasticstack_release,
elasticstack_security, elasticstack_cert_pass,
elasticstack_ca_host).
repos/ Elastic APT/YUM repo setup. Version-aware. Included

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Correct the role hierarchy statement.

The heading says that all five sibling roles import oddly.elasticstack.elasticstack. The later text identifies repos as a directly included role and limits the import to service roles. State that four service roles import the meta-role, while repos is included directly by callers.

Proposed wording
-Six roles — one meta-role plus five siblings that import it:
+Six roles — one meta-role plus five sibling roles:
+
+The four service roles import the meta-role. The `repos` role is included
+directly by playbooks and Molecule scenarios.

Also applies to: 124-129

🧰 Tools
🪛 markdownlint-cli2 (0.23.2)

[warning] 100-100: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for 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.

In `@CLAUDE.md` around lines 98 - 109, Correct the role hierarchy description in
CLAUDE.md to state that four service roles import the elasticstack meta-role,
while repos is included directly by callers. Update the corresponding later
wording as well, preserving the existing distinction between service-role
imports and direct repos inclusion.

@Oddly
Oddly merged commit cbe4f1a into main Aug 12, 2026
12 checks passed
@Oddly
Oddly deleted the docs/claude-md-expand branch August 12, 2026 10:49
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.

1 participant