Skip to content

Conversation

@ryoppippi
Copy link
Owner

@ryoppippi ryoppippi commented Sep 12, 2025

Summary by CodeRabbit

  • Chores
    • Updated ignore settings to exclude a local documentation file from version control.
    • Enhanced the setup process to automatically create a documentation alias after schema generation, improving local environment consistency.
    • Setup now runs steps sequentially to ensure later actions only occur after successful schema generation.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 12, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide 1597c37 Commit Preview URL

Branch Preview URL
Sep 12 2025, 10:16 AM

@coderabbitai
Copy link

coderabbitai bot commented Sep 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds AGENTS.md to .gitignore and updates the package.json prepare script to run git hooks setup, generate schema, then create a symlink from CLAUDE.md to AGENTS.md.

Changes

Cohort / File(s) Summary of Changes
Git ignore update
./.gitignore
Added AGENTS.md to be ignored by Git.
Prepare script enhancement
./package.json
Modified prepare to: git config --local core.hooksPath .githooks && bun run generate:schema && ln -s ./CLAUDE.md ./AGENTS.md. The symlink step runs only if prior steps succeed; errors in ln -s will fail the prepare script.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev
  participant NPM as Package Manager
  participant Script as prepare script
  participant Git as Git (local config)
  participant Gen as Schema Generator
  participant FS as Filesystem

  Dev->>NPM: install / run prepare
  NPM->>Script: execute
  Script->>Git: git config --local core.hooksPath .githooks
  Git-->>Script: OK
  Script->>Gen: bun run generate:schema
  Gen-->>Script: OK
  Script->>FS: ln -s ./CLAUDE.md ./AGENTS.md
  alt Symlink succeeds
    FS-->>Script: OK
    Script-->>NPM: success
  else Symlink fails (e.g., exists/perm)
    FS-->>Script: error
    Script-->>NPM: non-zero exit (prepare fails)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A nibble of docs, a hop through hooks,
I symlink my notes to tidy the books.
Git won’t chase what bunnies ignore,
AGENTS now shadows CLAUDE at the door.
Thump-thump—scripts run true,
Schema sprouts fresh, carrots anew.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5494d1 and 1597c37.

📒 Files selected for processing (2)
  • .gitignore (1 hunks)
  • package.json (1 hunks)
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch agents

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.

@ryoppippi ryoppippi changed the title docs: support agents.md for development docs: support AGENTS.md for development Sep 12, 2025
Copy link
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.

Summary of Changes

Hello @ryoppippi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces changes to support local development workflows by aliasing a documentation file. It sets up a symbolic link for CLAUDE.md as AGENTS.md and ensures this development-specific alias is not tracked by Git, streamlining access to relevant documentation during development without affecting the main repository.

Highlights

  • Symbolic Link Creation: A symbolic link named AGENTS.md is now created during the prepare script, pointing to CLAUDE.md. This facilitates local development by providing an alternative access point for the CLAUDE.md documentation.
  • Gitignore Update: The .gitignore file has been updated to include AGENTS.md, ensuring that this development-specific symbolic link is not committed to the repository.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 12, 2025

Open in StackBlitz

npm i https://pkg.pr.new/ryoppippi/ccusage@624

commit: 1597c37

@ryoppippi ryoppippi merged commit 26e947d into main Sep 12, 2025
15 of 17 checks passed
@ryoppippi ryoppippi deleted the agents branch September 12, 2025 10:16
Copy link
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 aims to create a standardized AGENTS.md file for development by symlinking it to CLAUDE.md. The changes include adding AGENTS.md to .gitignore and updating the prepare script in package.json to create the symlink. My review focuses on the robustness and cross-platform compatibility of the script change, as the current implementation may cause issues in certain development environments.

"mcp": "bunx @modelcontextprotocol/inspector bun run start mcp",
"prepack": "bun run build && bun clean-pkg-json -r scripts.preinstall",
"prepare": "git config --local core.hooksPath .githooks && bun run generate:schema",
"prepare": "git config --local core.hooksPath .githooks && bun run generate:schema && ln -s ./CLAUDE.md ./AGENTS.md",
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The use of ln -s here has a couple of issues:

  • Idempotency: The command will fail if AGENTS.md already exists, for instance, if the prepare script is run multiple times. Using the -f (force) flag (ln -sf) makes the operation idempotent by overwriting the destination if it exists.
  • Cross-platform compatibility: The ln command is not available on native Windows environments, which will cause the prepare script to fail for developers on that platform.

For a more robust and cross-platform solution, consider creating a small script that uses Node.js's fs.symlinkSync. This would ensure a consistent setup experience for all developers. The suggested change below at least addresses the idempotency issue.

Suggested change
"prepare": "git config --local core.hooksPath .githooks && bun run generate:schema && ln -s ./CLAUDE.md ./AGENTS.md",
"prepare": "git config --local core.hooksPath .githooks && bun run generate:schema && ln -sf ./CLAUDE.md ./AGENTS.md",

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