Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ build --incompatible_merge_fixed_and_default_shell_env

# Allow network for pnpm/npm fetching (until cached)
# But standard build should be sandboxed
# build --sandbox_default_allow_network=false
build --sandbox_default_allow_network=false

# Linting configuration
build:lint --aspects=//tools/lint:linters.bzl%ktlint
build:lint --aspects=@//tools/lint:linters.bzl%ktlint
build:lint --output_groups=rules_lint_report
build:lint --@aspect_rules_lint//lint:fail_on_violation
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ trim_trailing_whitespace = true
insert_final_newline = true

[*.kt]
indent_size = 4
indent_size = 2
4 changes: 1 addition & 3 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0 # Important: fetch all history for diffing

- name: Run Cassandra AI Review
uses: menny/cassandra@main
uses: menny/cassandra@c31e5c67624ca33ee7094b567e4d14a96639fe8b
with:
provider: 'google'
model_id: 'gemini-3-flash-preview'
Expand All @@ -25,5 +25,3 @@ jobs:
base: ${{ github.event.pull_request.base.sha }}
# The head branch/commit (defaults to HEAD)
head: ${{ github.event.pull_request.head.sha }}
# The GitHub token to use for review comments
reviewer_github_token: ${{ secrets.REVIEWER_GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
bazel-*
dist

CLAUDE.md
GEMINI.md
9 changes: 6 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ _Read the specific DESIGN docs for deep implementation details._
1. **Analyze & Plan:** Briefly outline your intended changes and identify the affected Bazel targets.
2. **Idempotency:** Ensure any Kotlin worker you write can safely crash and be retried by Cloud Tasks without data corruption.
3. **Build Files:** Always update `BUILD.bazel` when modifying dependencies or adding new files.
4. **Testing:** Write or update tests (`Jest` for frontend, `JUnit5` for backend).
5. **Formatting & Linting (CRITICAL):** Do NOT waste output tokens trying to manually adhere to perfect code formatting or linting rules. This repository uses automated tools (`Prettier`, `ESLint`, `Ktlint`). Write logically sound code and explicitly instruct the user to run the respective Bazel format/lint targets to clean up the syntax.
6. **Pre-Commit Check:** `bazel run //:format` MUST be invoked before any commit to ensure repository consistency.
4. **Testing:** Write or update tests (**Node.js native runner** for frontend, `JUnit5` for backend). Every test MUST have a corresponding Bazel target (`js_test` or `kt_jvm_test`).
5. **Dependency Pinning:** After adding dependencies, you MUST update lockfiles:
- **Maven:** `REPIN=1 bazel run @maven//:pin`
- **npm:** `pnpm install --lockfile-only`
6. **Formatting & Linting (CRITICAL):** Do NOT waste output tokens trying to manually adhere to perfect code formatting or linting rules. This repository uses automated tools (`Prettier`, `ESLint`, `Ktlint`). Write logically sound code and explicitly instruct the user to run the respective Bazel format/lint targets to clean up the syntax.
7. **Pre-Commit Check:** `bazel run //:format` and `bazel test //...` MUST be invoked before any commit to ensure repository consistency.
51 changes: 13 additions & 38 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,54 +1,29 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@npm_rulesjs//:defs.bzl", "npm_link_all_packages")
load("@npm_rulesjs//:eslint/package_json.bzl", eslint_bin = "bin")
load("@npm_rulesjs//:prettier/package_json.bzl", prettier_bin = "bin")

package(default_visibility = ["//visibility:public"])

npm_link_all_packages(name = "node_modules")

exports_files([
".editorconfig",
".prettierrc",
".prettierignore",
"eslint.config.mjs",
"package.json",
])

js_library(
name = "eslint_config",
srcs = ["eslint.config.mjs"],
)

js_library(
name = "prettier_config",
srcs = [
".prettierignore",
".prettierrc",
],
# copy_to_bin targets to expose configuration files to the output tree
copy_to_bin(
name = "editorconfig_bin",
srcs = [".editorconfig"],
)

prettier_bin.prettier_binary(
name = "prettier",
data = [":prettier_config"],
env = {"BAZEL_BINDIR": "."},
copy_to_bin(
name = "eslint_config_bin",
srcs = ["eslint.config.mjs"],
)

eslint_bin.eslint_binary(
name = "eslint",
data = [
":eslint_config",
"//:node_modules/@eslint/js",
"//:node_modules/typescript-eslint",
],
env = {"BAZEL_BINDIR": "."},
fixed_args = ["--no-error-on-unmatched-pattern"],
copy_to_bin(
name = "prettier_config_bin",
srcs = [".prettierrc"],
)

alias(
name = "ktlint_jar_alias",
actual = "@ktlint_jar//jar",
copy_to_bin(
name = "prettier_ignore_bin",
srcs = [".prettierignore"],
)

alias(
Expand Down
1 change: 0 additions & 1 deletion CLAUDE.md

This file was deleted.

1 change: 1 addition & 0 deletions CLAUDE.md
1 change: 0 additions & 1 deletion GEMINI.md

This file was deleted.

1 change: 1 addition & 0 deletions GEMINI.md
22 changes: 20 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,33 @@ module(
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "bazel_lib", version = "3.2.2")
bazel_dep(name = "rules_java", version = "9.3.0")
bazel_dep(name = "rules_shell", version = "0.7.1")

# Kotlin
bazel_dep(name = "rules_kotlin", version = "2.3.20")
bazel_dep(name = "rules_jvm_external", version = "6.10")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"org.junit.jupiter:junit-jupiter-api:5.10.2",
"org.junit.jupiter:junit-jupiter-engine:5.10.2",
"org.junit.platform:junit-platform-launcher:1.10.2",
"org.junit.platform:junit-platform-console:1.10.2",
],
lock_file = "@@//:maven_install.json",
)
use_repo(maven, "maven")

# JavaScript / TypeScript
bazel_dep(name = "aspect_rules_js", version = "3.0.3")
bazel_dep(name = "aspect_rules_ts", version = "3.8.7")
bazel_dep(name = "rules_nodejs", version = "6.7.3")

# Linting
bazel_dep(name = "aspect_rules_lint", version = "2.3.0")
bazel_dep(name = "aspect_rules_lint", version = "2.5.0")

bazel_dep(name = "buildifier_prebuilt", version = "8.2.1.1", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1", dev_dependency = True)

# Node.js toolchain setup
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
Expand Down Expand Up @@ -53,3 +67,7 @@ http_jar(
lint = use_extension("@aspect_rules_lint//lint:extensions.bzl", "tools")
lint.ktlint(name = "com_github_pinterest_ktlint")
use_repo(lint, "com_github_pinterest_ktlint")

format_tools = use_extension("@aspect_rules_lint//format:extensions.bzl", "tools")
format_tools.ktfmt()
use_repo(format_tools, "ktfmt")
Loading
Loading