Conversation
Add comprehensive CLAUDE.md at repo root for Claude Code and other AI agents. Update all per-package AGENTS.md files with detailed context including tech stacks, key areas, scripts, dependencies, and conventions. Fix outdated/corrupted content in .cursor/rules and .junie/guidelines.md. https://claude.ai/code/session_019sKaEkZzkjWxfWWc1ZCaWY
|
Task linked: DA-393 Add better documentation for agents |
Summary of ChangesHello, 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 significantly enhances the project's documentation by introducing dedicated guides for AI agents and comprehensively updating existing development guidelines. The changes aim to provide clearer context, setup instructions, and best practices for both human developers and AI assistants, fostering better understanding and consistency across the monorepo. The updates cover project structure, technology stacks, tooling, and specific conventions for different parts of the application, streamlining the onboarding and development process. Highlights
Changelog
Activity
Using Gemini Code AssistThe 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 by creating a comment using either
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant and valuable set of documentation updates, including a new comprehensive guide for AI agents (CLAUDE.md) and detailed expansions of existing development guidelines and per-package AGENTS.md files. The new documentation is well-structured, detailed, and will be a great asset for both human developers and AI assistants. I've found a few minor inconsistencies across the new documentation files regarding testing tools and package dependencies, and have left suggestions to correct them. Overall, this is an excellent contribution to the project's maintainability.
| - **Linter/formatter**: Biome (not ESLint/Prettier). Config at root `biome.json`. | ||
| - **Package manager**: pnpm 10 with workspaces. Do NOT use npm or yarn. | ||
| - **Git hooks**: Lefthook — pre-commit runs Biome check on staged files | ||
| - **Testing**: Vitest (packages/backend), Jasmine+Karma (Angular web app) |
There was a problem hiding this comment.
The documentation about testing tools appears to be incomplete. It states that Vitest is used for packages/backend, but other packages like danmaku-anywhere, danmaku-converter, and danmaku-engine also use Vitest for testing according to their respective AGENTS.md files. To improve accuracy, this line should be updated to reflect that Vitest is used across most packages and the backend.
| - **Testing**: Vitest (packages/backend), Jasmine+Karma (Angular web app) | |
| - **Testing**: Vitest (packages, backend), Jasmine+Karma (Angular web app) |
There was a problem hiding this comment.
Pull request overview
This PR adds AI agent guidance files (CLAUDE.md, and per-package AGENTS.md files) and updates the main developer guidelines (.junie/guidelines.md) and Cursor IDE rules (.cursor/rules/). The goal is to give AI assistants accurate, structured context when working on each part of the monorepo.
Changes:
- New
CLAUDE.mdat the repo root providing a comprehensive agent guide covering structure, commands, tech stack, patterns, build order, and pitfalls. - Expanded all per-package
AGENTS.mdfiles from 3–5 bullet lines to structured sections (Purpose, Key areas, Scripts, Consumers, Workspace dependencies, When changing). - Updated
.junie/guidelines.mdand.cursor/rules/project-overview.mdcwith corrected package lists, added tools (Hono, Drizzle, Better Auth, etc.), and added key commands.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
CLAUDE.md |
New top-level agent guide; contains an inaccurate build-order dependency graph |
.junie/guidelines.md |
Expanded with setup, tooling, project structure, and error handling guidance |
.cursor/rules/project-overview.mdc |
Corrected package names/structure, added Angular 21+, backend stack, and key commands; removed BOM |
.cursor/rules/angular-standards.mdc |
Minor formatting fix (BOM removal, consolidated broken line) |
app/web/AGENTS.md |
Expanded with tech stack, key areas, scripts table, dependencies, and Angular conventions |
packages/danmaku-anywhere/AGENTS.md |
Expanded with tech stack, key areas, scripts, and dependencies (scripts use bullet list instead of table) |
packages/danmaku-provider/AGENTS.md |
Expanded with provider structure, subpath exports, and scripts |
packages/danmaku-engine/AGENTS.md |
Expanded with key areas, scripts table, and consumers |
packages/danmaku-converter/AGENTS.md |
Expanded with key areas, scripts, and consumer list |
packages/web-scraper/AGENTS.md |
Expanded with key areas, scripts, and dependencies |
packages/bangumi-api/AGENTS.md |
Expanded with subpath exports, scripts, and consumers |
packages/result/AGENTS.md |
Expanded with purpose, key areas, and scripts |
packages/integration-policy/AGENTS.md |
Expanded with key areas, scripts, and consumers |
backend/proxy/AGENTS.md |
Expanded with tech stack, key areas, scripts including deploy/migration commands |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| → danmaku-converter (depends on result) | ||
| → danmaku-engine | ||
| → danmaku-provider (depends on converter, result) | ||
| → web-scraper (depends on converter, provider) | ||
| → danmaku-anywhere (extension, depends on all above) | ||
| → app/web (depends on converter, provider, web-scraper, bangumi-api) |
There was a problem hiding this comment.
The build order dependency graph contains two inaccuracies:
-
danmaku-converteris listed as "(depends on result)", butpackages/danmaku-converter/package.jsonhas no dependency on@danmaku-anywhere/result. It is a leaf package with onlyxml-jsandzodas dependencies. -
The arrow notation implies
danmaku-providerdepends ondanmaku-engine(sincedanmaku-engineappears as a step betweendanmaku-converteranddanmaku-provider). In reality,danmaku-providerdoes NOT depend ondanmaku-engine— they are parallel branches that both depend ondanmaku-converter.
A more accurate representation would be:
result,integration-policy,bangumi-api→danmaku-converter(leaf, no internal deps)danmaku-converter→danmaku-engine(depends on converter)danmaku-converter,result→danmaku-provider(depends on converter + result, NOT on engine)danmaku-converter,danmaku-provider→web-scraper
| → danmaku-converter (depends on result) | |
| → danmaku-engine | |
| → danmaku-provider (depends on converter, result) | |
| → web-scraper (depends on converter, provider) | |
| → danmaku-anywhere (extension, depends on all above) | |
| → app/web (depends on converter, provider, web-scraper, bangumi-api) | |
| danmaku-converter (no internal deps; used by downstream packages) | |
| → danmaku-engine (depends on converter) | |
| danmaku-converter, result | |
| → danmaku-provider (depends on converter, result; not on engine) | |
| danmaku-converter, danmaku-provider | |
| → web-scraper (depends on converter, provider) | |
| result, integration-policy, bangumi-api, danmaku-converter, danmaku-engine, danmaku-provider, web-scraper | |
| → danmaku-anywhere (extension, depends on all above) | |
| danmaku-converter, danmaku-provider, web-scraper, bangumi-api | |
| → app/web (depends on converter, provider, web-scraper, bangumi-api) | |
| integration-policy |
| - `pnpm dev` — Dev mode (Chrome) | ||
| - `pnpm dev:firefox` — Dev mode (Firefox) | ||
| - `pnpm build` — Production build (Chrome) | ||
| - `pnpm build:firefox` — Production build (Firefox) | ||
| - `pnpm test` — Run Vitest tests | ||
| - `pnpm lint` — Type-check + Biome lint | ||
| - `pnpm type-check` — TypeScript only | ||
| - `pnpm i18n:check` — Verify i18n keys |
There was a problem hiding this comment.
The Scripts section in packages/danmaku-anywhere/AGENTS.md uses a bullet list format, while all other AGENTS.md files in the repository (e.g., packages/danmaku-engine/AGENTS.md, packages/danmaku-converter/AGENTS.md, packages/danmaku-provider/AGENTS.md, etc.) use a markdown table format for their Scripts sections. For consistency with the established convention across all other AGENTS.md files, this section should use a markdown table.
| - `pnpm dev` — Dev mode (Chrome) | |
| - `pnpm dev:firefox` — Dev mode (Firefox) | |
| - `pnpm build` — Production build (Chrome) | |
| - `pnpm build:firefox` — Production build (Firefox) | |
| - `pnpm test` — Run Vitest tests | |
| - `pnpm lint` — Type-check + Biome lint | |
| - `pnpm type-check` — TypeScript only | |
| - `pnpm i18n:check` — Verify i18n keys | |
| | Script | Description | | |
| | -------------------- | ------------------------- | | |
| | `pnpm dev` | Dev mode (Chrome) | | |
| | `pnpm dev:firefox` | Dev mode (Firefox) | | |
| | `pnpm build` | Production build (Chrome) | | |
| | `pnpm build:firefox` | Production build (Firefox)| | |
| | `pnpm test` | Run Vitest tests | | |
| | `pnpm lint` | Type-check + Biome lint | | |
| | `pnpm type-check` | TypeScript only | | |
| | `pnpm i18n:check` | Verify i18n keys | |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
danmaku-anywhere-ui-preview | 462944d | Commit Preview URL Branch Preview URL |
Mar 07 2026, 04:34 AM |
Summary
This PR adds comprehensive AI agent guides (
CLAUDE.mdand per-packageAGENTS.mdfiles) and updates the main development guidelines to provide clear context for developers and AI assistants working on the Danmaku Anywhere codebase.Key Changes
New Files
CLAUDE.md— Top-level agent guide covering:Updated Files
.junie/guidelines.md— Expanded and reorganized:packages/danmaku-anywhere/AGENTS.md— Expanded with:app/web/AGENTS.md— Expanded with:packages/danmaku-provider/AGENTS.md— Expanded with:backend/proxy/AGENTS.md— Expanded with:packages/bangumi-api/AGENTS.md— Expanded with:packages/danmaku-engine/AGENTS.md— Expanded with:packages/web-scraper/AGENTS.md— Expanded with:packages/danmaku-converter/AGENTS.md— Expanded with:packages/integration-policy/AGENTS.md— Expanded with:packages/result/AGENTS.md— Expanded with:.cursor/rules/project-overview.mdc— Updated with:.cursor/rules/angular-standards.mdc— Minor formatting fix (BOM removal)Notable Implementation Details
AGENTS.mdfiles follow a consistent structure: Purpose, Tech stack/Key areas, Scripts, Consumers,https://claude.ai/code/session_019sKaEkZzkjWxfWWc1ZCaWY