Skip to content

docs: add CLAUDE.md for AI agent guidance#489

Merged
lexfrei merged 2 commits intomainfrom
docs/add-claude-md
Apr 15, 2026
Merged

docs: add CLAUDE.md for AI agent guidance#489
lexfrei merged 2 commits intomainfrom
docs/add-claude-md

Conversation

@myasnikovdaniil
Copy link
Copy Markdown
Contributor

@myasnikovdaniil myasnikovdaniil commented Apr 15, 2026

Summary

  • Adds a CLAUDE.md guidance file for AI coding agents so they can contribute without re-deriving repo conventions each session.

Contents

  • Build & dev commands (make serve, production build, update-* / template-* targets, version bootstrap)
  • Architecture overview (Hugo modules, versioned docs, OpenAPI handling, OSS health pipeline)
  • Versioning model: directory layout (v0, vX.Y), hugo.yaml registration (latest_version_id + versions[]), where to add changes, autogenerated-file conventions, RELEASE_TAG derivation rules, new-version bootstrap flow, per-version OpenAPI handling
  • New-version docs flow: PRs are opened by the upstream cozystack/cozystack tags.yaml update-website-docs job ([docs] Added openapi and go types codegeneration for apps cozystack#2214); the old website-side daily cron is flagged obsolete
  • Key config files, custom shortcodes, content conventions, code owners

Test plan

  • Documentation-only — no build impact

Summary by CodeRabbit

  • Documentation
    • Added comprehensive developer guidance for maintaining the documentation site, including build commands, setup requirements, architecture overview, versioning guidelines, and contribution guidelines.

Captures build commands, architecture, versioning model (directory
layout, hugo.yaml registration, RELEASE_TAG derivation, new-version
bootstrap), autogenerated-file conventions, and the upstream-triggered
docs update flow (cozystack/cozystack#2214).

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
@myasnikovdaniil myasnikovdaniil requested review from lexfrei and removed request for kvaps and lllamnyp April 15, 2026 14:18
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 15, 2026

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit 081a4bd
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/69dff1af4b7b4a00082e9ecb
😎 Deploy Preview https://deploy-preview-489--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

📝 Walkthrough

Walkthrough

A new CLAUDE.md file was added containing repository-specific guidance for Claude Code, documenting the Hugo-based multi-version documentation site architecture, build procedures, versioning rules, directory structure, configuration details, and development workflows for the Cozystack project.

Changes

Cohort / File(s) Summary
Documentation Guidance
CLAUDE.md
New documentation file providing Claude Code with repository-specific context including Hugo setup, build/development commands, toolchain requirements, site architecture, versioning system, directory layout, configuration files, content conventions, and workflow documentation for the Cozystack documentation site.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A guide for Claude to comprehend,
In Hugo's realm where docs ascend,
From versioning rules to build commands clear,
Documentation blooms without a fear,
The repository speaks, wisdom is here! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a CLAUDE.md file for AI agent guidance. It is concise, clear, and directly reflects the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/add-claude-md

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 and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a CLAUDE.md file to provide comprehensive guidance for AI agents working within the repository, covering project architecture, build commands, and versioning workflows. The review feedback suggests improving consistency by using Makefile targets for OpenAPI downloads and correcting the documentation regarding the init-version command, as the Makefile wrapper does not support the --from flag mentioned in the initial draft.

Comment thread CLAUDE.md
make serve

# Production build
./hack/download_openapi.sh && hugo --gc --minify
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.

medium

For consistency with the other commands listed in this section and to leverage the existing build workflow, it is recommended to use the Makefile target download-openapi-all instead of calling the script directly.

Suggested change
./hack/download_openapi.sh && hugo --gc --minify
make download-openapi-all && hugo --gc --minify

Comment thread CLAUDE.md
- No `RELEASE_TAG` → defaults to `DOC_VERSION=v1.2`, `BRANCH=main` (uses current upstream `main`, non-reproducible)

**Creating a new version (e.g., `v1.3`)**
1. `make init-version DOC_VERSION=v1.3` — `hack/init_version.sh` copies from the auto-detected latest existing version (or `--from vX.Y`), strips `api.json` (downloaded at build time), and rewrites internal `/docs/<old>/` and `"docs/<old>/` refs to the new version
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.

medium

The make init-version target in the Makefile (line 66) only passes the --version flag to the underlying script. It does not support the --from flag. To use a specific source version, the script hack/init_version.sh must be called directly. Clarifying this will prevent the AI agent from attempting to pass unsupported arguments to make.

Suggested change
1. `make init-version DOC_VERSION=v1.3``hack/init_version.sh` copies from the auto-detected latest existing version (or `--from vX.Y`), strips `api.json` (downloaded at build time), and rewrites internal `/docs/<old>/` and `"docs/<old>/` refs to the new version
1. make init-version DOC_VERSION=v1.3 — copies from the auto-detected latest existing version (or use hack/init_version.sh --version v1.3 --from vX.Y for a specific source), strips api.json (downloaded at build time), and rewrites internal /docs/<old>/ and "docs/<old>/ refs to the new version

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
CLAUDE.md (1)

108-108: Minor wording nit: capitalize “Markdown”.

Consider changing “markdown” → “Markdown” for proper noun consistency in docs text.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 108, Update the wording in CLAUDE.md by capitalizing the
word "Markdown" where it appears in the sentence "Goldmark rendering has
`unsafe: true` enabled (raw HTML allowed in markdown)"; change "markdown" to
"Markdown" to maintain proper noun consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@CLAUDE.md`:
- Line 108: Update the wording in CLAUDE.md by capitalizing the word "Markdown"
where it appears in the sentence "Goldmark rendering has `unsafe: true` enabled
(raw HTML allowed in markdown)"; change "markdown" to "Markdown" to maintain
proper noun consistency.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7441607a-f9f6-4dc7-9b20-28c8b6bfd77d

📥 Commits

Reviewing files that changed from the base of the PR and between c1a447b and 8b1b61f.

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

@lexfrei lexfrei enabled auto-merge April 15, 2026 20:14
@lexfrei lexfrei merged commit 01853da into main Apr 15, 2026
1 of 2 checks passed
@lexfrei lexfrei deleted the docs/add-claude-md branch April 15, 2026 20:14
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