Skip to content

docs(auth0-nuxt): add CLAUDE.md/AGENTS.md agent-onboarding suite - #58

Draft
gyaneshgouraw-okta wants to merge 2 commits into
mainfrom
claude-md
Draft

docs(auth0-nuxt): add CLAUDE.md/AGENTS.md agent-onboarding suite#58
gyaneshgouraw-okta wants to merge 2 commits into
mainfrom
claude-md

Conversation

@gyaneshgouraw-okta

@gyaneshgouraw-okta gyaneshgouraw-okta commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Adds an AI-agent onboarding suite for the auth0-nuxt monorepo so Claude Code and other agents get accurate, actionable context (commands, guardrails, conventions) instead of re-deriving it each session. CLAUDE.md is the single source of truth, AGENTS.md points to it, and reference-section bodies are lazily loaded from references/*.md. Docs-only - no source, build, or CI behavior changes.

Changes

  • Adds root agent guidelines: persona, working principles, project overview/structure, three-tier boundaries, and security notes.
  • Adds a thin pointer file so non-Claude agents read the same guidelines with no duplication.
  • Offloads command, testing, code-style, git-workflow, pitfalls, and docs-update detail into linked reference files.
  • Separates the safe unit-test command (default) from the credentialed Playwright e2e tier, which is marked Ask First and lists its required NUXT_AUTH0_* secrets.
  • Omits telemetry guidance (delegated to @auth0/auth0-server-js) and documents that as a pitfall rather than inventing a boundary.
  • Captures a version-sync guardrail between the root and package manifests, plus the conventional-commit auth0-nuxt scope and release/* branch flow.

Testing

  • Skimmed CLAUDE.md for accuracy of persona, boundaries, and security notes.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guidance for AI-assisted development.
    • Documented coding standards, repository commands, testing practices, Git workflows, documentation update requirements, and common implementation pitfalls.
    • Added authentication security guidance covering safe redirects, cookie handling, server-only secrets, token protection, configuration validation, and route behavior.
    • Added contributor guidance for maintaining consistent code quality and safely updating public documentation.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c035b486-3085-482f-a5ae-b34d35398ef2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds AGENTS.md, CLAUDE.md, and reference documents for repository guidance, coding style, commands, testing, pitfalls, documentation updates, and Git workflow rules.

Changes

AI Agent Guidance

Layer / File(s) Summary
Core repository and agent guidance
AGENTS.md, CLAUDE.md
Defines AI assistant responsibilities, repository structure, working principles, security guardrails, approval boundaries, testing expectations, and documentation requirements.
Development and testing references
references/code-style.md, references/commands.md, references/pitfalls.md, references/testing.md
Documents coding patterns, commands, testing frameworks and conventions, and common Auth0/Nuxt integration pitfalls.
Documentation and Git governance
references/docs-update.md, references/git-workflow.md
Defines documentation synchronization rules and commit, pull request, branching, release, and versioning conventions.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the documentation-only addition of CLAUDE.md and AGENTS.md agent onboarding guidance.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 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.

@gyaneshgouraw-okta gyaneshgouraw-okta changed the title docs: add comprehensive guidelines for AI agents and project structure docs(auth0-nuxt): add CLAUDE.md/AGENTS.md agent-onboarding suite Jul 22, 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: 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.md`:
- Around line 128-135: Update the command documentation so every e2e-inclusive
test command clearly uses the e2e “Ask First” workflow: in CLAUDE.md lines
128-135, references/commands.md lines 7-14, and references/commands.md lines
23-27, add the warning to npm test or npm run test, or change the core command
guidance to use the unit-only test command.
- Around line 86-87: The documentation requirements are inconsistent between
CLAUDE.md and references/docs-update.md. Update CLAUDE.md’s public
API/configuration guidance and the corresponding table in
references/docs-update.md to use one authoritative mapped policy, explicitly
noting that both documents are consistent; cover CLAUDE.md lines 86-87 and
references/docs-update.md lines 21-25 without retaining conflicting blanket
requirements.
- Around line 36-63: Update the fenced repository tree in the CLAUDE.md
documentation to specify a language after the opening fence, using text or
another appropriate plain-text language identifier; leave the tree contents
unchanged.
🪄 Autofix (Beta)

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d2716114-33d8-4818-872d-c45f62329665

📥 Commits

Reviewing files that changed from the base of the PR and between 45c1f27 and eb459b9.

📒 Files selected for processing (8)
  • AGENTS.md
  • CLAUDE.md
  • references/code-style.md
  • references/commands.md
  • references/docs-update.md
  • references/git-workflow.md
  • references/pitfalls.md
  • references/testing.md

Comment thread CLAUDE.md
Comment on lines +36 to +63
```
.
├── packages/
│ ├── auth0-nuxt/ # the published SDK (@auth0/auth0-nuxt)
│ │ ├── src/
│ │ │ ├── module.ts # Nuxt module entry — registers routes, plugin, middleware
│ │ │ ├── types.ts # public types (Auth0ClientOptions, RouteConfig, SessionStore)
│ │ │ ├── types/ # ambient .d.ts (runtime-config, session-store)
│ │ │ └── runtime/
│ │ │ ├── composables/ # client composables (use-user)
│ │ │ ├── middleware/ # global route middleware (auth.server)
│ │ │ ├── helpers/ # import-meta client/server guard
│ │ │ └── server/
│ │ │ ├── api/auth/ # H3 handlers: login/callback/logout/backchannel-logout
│ │ │ ├── composables/ # useAuth0() server composable
│ │ │ ├── plugins/ # Nitro plugin — builds client, validates config
│ │ │ └── utils/ # cookie-handler, url (safe-redirect), session-store loader
│ │ ├── test/ # e2e (@nuxt/test-utils + Playwright) + fixtures
│ │ ├── EXAMPLES.md # advanced usage & configuration samples
│ │ └── README.md
│ └── lint-pr-title/ # internal GitHub composite action (not published)
├── examples/ # runnable demo apps
│ ├── example-nuxt-web/ # Nuxt 3 web app demo
│ └── example-nuxt-4-web/ # Nuxt 4 web app demo
├── docs/ # generated TypeDoc output — do not hand-edit
├── turbo.json # Turborepo task graph
└── vitest.workspace.js
```

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

Add a language to the fenced code block.

markdownlint reports MD040 for this repository tree fence. Use text (or another appropriate language) after the opening fence.

Proposed fix
-```
+```text
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
.
├── packages/
│ ├── auth0-nuxt/ # the published SDK (@auth0/auth0-nuxt)
│ │ ├── src/
│ │ │ ├── module.ts # Nuxt module entry — registers routes, plugin, middleware
│ │ │ ├── types.ts # public types (Auth0ClientOptions, RouteConfig, SessionStore)
│ │ │ ├── types/ # ambient .d.ts (runtime-config, session-store)
│ │ │ └── runtime/
│ │ │ ├── composables/ # client composables (use-user)
│ │ │ ├── middleware/ # global route middleware (auth.server)
│ │ │ ├── helpers/ # import-meta client/server guard
│ │ │ └── server/
│ │ │ ├── api/auth/ # H3 handlers: login/callback/logout/backchannel-logout
│ │ │ ├── composables/ # useAuth0() server composable
│ │ │ ├── plugins/ # Nitro plugin — builds client, validates config
│ │ │ └── utils/ # cookie-handler, url (safe-redirect), session-store loader
│ │ ├── test/ # e2e (@nuxt/test-utils + Playwright) + fixtures
│ │ ├── EXAMPLES.md # advanced usage & configuration samples
│ │ └── README.md
│ └── lint-pr-title/ # internal GitHub composite action (not published)
├── examples/ # runnable demo apps
│ ├── example-nuxt-web/ # Nuxt 3 web app demo
│ └── example-nuxt-4-web/ # Nuxt 4 web app demo
├── docs/ # generated TypeDoc output — do not hand-edit
├── turbo.json # Turborepo task graph
└── vitest.workspace.js
```
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 36-36: 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 36 - 63, Update the fenced repository tree in the
CLAUDE.md documentation to specify a language after the opening fence, using
text or another appropriate plain-text language identifier; leave the tree
contents unchanged.

Source: Linters/SAST tools

Comment thread CLAUDE.md Outdated
Comment on lines +86 to +87
- Update `README.md` (both root and `packages/auth0-nuxt/README.md`) and `packages/auth0-nuxt/EXAMPLES.md` in the same PR when changing the public API (`ModuleOptions`, `Auth0ClientOptions`, `RouteConfig`), configuration options, or supported integration patterns.
- Update the affected apps under `examples/` in the same PR when changing the public API they demonstrate.

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 | 🟠 Major | ⚡ Quick win

Use one authoritative documentation-update matrix. The core guidance and reference table currently require different files for public API and configuration changes.

  • CLAUDE.md#L86-L87: replace the blanket “both root and package README” rule with the mapped requirements, or update the table to include both.
  • references/docs-update.md#L21-L25: mirror the selected policy and make it explicit that it is consistent with CLAUDE.md.
📍 Affects 2 files
  • CLAUDE.md#L86-L87 (this comment)
  • references/docs-update.md#L21-L25
🤖 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 86 - 87, The documentation requirements are
inconsistent between CLAUDE.md and references/docs-update.md. Update CLAUDE.md’s
public API/configuration guidance and the corresponding table in
references/docs-update.md to use one authoritative mapped policy, explicitly
noting that both documents are consistent; cover CLAUDE.md lines 86-87 and
references/docs-update.md lines 21-25 without retaining conflicting blanket
requirements.

Comment thread CLAUDE.md Outdated
Comment on lines +128 to +135
```bash
npm install # install all workspaces
npm run build # turbo run build → nuxt-module-build
npm test # turbo run test (unit + e2e per package)
npm run lint # turbo run lint → eslint
```

See [references/commands.md](references/commands.md) for the full command list (per-package unit/e2e/coverage, clean, docs, examples). Read when you need to build, test, or run something specific.

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

Add consistent warnings to e2e-inclusive test commands. The core and reference command lists present npm test and package npm run test as routine commands even though they include credentialed e2e tests.

  • CLAUDE.md#L128-L135: mark npm test as requiring the e2e “Ask First” workflow, or make the core command unit-only.
  • references/commands.md#L7-L14: add the same warning to root npm test.
  • references/commands.md#L23-L27: add the warning to package npm run test or direct users to test:unit.
📍 Affects 2 files
  • CLAUDE.md#L128-L135 (this comment)
  • references/commands.md#L7-L14
  • references/commands.md#L23-L27
🤖 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 128 - 135, Update the command documentation so every
e2e-inclusive test command clearly uses the e2e “Ask First” workflow: in
CLAUDE.md lines 128-135, references/commands.md lines 7-14, and
references/commands.md lines 23-27, add the warning to npm test or npm run test,
or change the core command guidance to use the unit-only test command.

@sanchitmehtagit
sanchitmehtagit force-pushed the claude-md branch 2 times, most recently from d5d6082 to a9b69a6 Compare August 3, 2026 10:00
gyaneshgouraw-okta and others added 2 commits August 15, 2026 16:30
Rebuild the agent-onboarding suite from the generating-claude-md skill
template rather than editing the prior files:

- Drop the Project Overview section (intentionally absent — language,
  stack, package manager, and platform all live in the authoritative
  manifest + CI, so restating them only drifts).
- Drop the standalone Key Files table — the annotated Project Structure
  tree already flags every entry point inline, per the template.
- Trim boundaries/security to the mistake-preventing essentials.
- AGENTS.md reduced to the minimal template form importing @./CLAUDE.md.

Reference offloads (references/*.md) validated against source and CI.
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