diff --git a/.gemini/style_guide.md b/.gemini/style_guide.md index cecbca88..cf99170b 100644 --- a/.gemini/style_guide.md +++ b/.gemini/style_guide.md @@ -4,6 +4,8 @@ `gws` is a Rust CLI that dynamically generates commands from Google Discovery Documents at runtime. It does NOT use generated Rust crates (`google-drive3`, etc.) for API interaction. Do not suggest adding API-specific crates to `Cargo.toml`. +For additional context, read `AGENTS.md`. + ## Security: Trusted vs Untrusted Inputs This CLI is frequently invoked by AI/LLM agents. CLI arguments may be adversarial. @@ -17,7 +19,7 @@ The `codecov/patch` check requires new/modified lines to be covered by tests. Pr ## Changesets -Every PR must include a `.changeset/.md` file. Use `patch` for fixes/chores, `minor` for features, `major` for breaking changes. +Every PR must include a `.changeset/.md` file. The package name **must** be `"@googleworkspace/cli"` (not `"googleworkspace-cli"`). Use `patch` for fixes/chores, `minor` for features, `major` for breaking changes. ## PR Scope @@ -28,8 +30,6 @@ Examples of scope creep to avoid: - Adding constants for strings used elsewhere is a separate cleanup task. - Making a pre-existing function atomic is an enhancement, not a fix for the current PR. -## Code Style +## Severity Calibration -- Rust: `cargo clippy -- -D warnings` must pass. `cargo fmt` enforced via pre-commit hook. -- Node.js: Use `pnpm` not `npm`. -- OAuth scope strings in test code will trigger "restricted/sensitive scope" warnings — these are expected and should be ignored. +Mark issues as **critical** only when they cause data loss, security vulnerabilities, or incorrect behavior under normal conditions. Theoretical failures in infallible system APIs (e.g., `tokio::signal::ctrl_c()` registration) are **low** severity — do not label them critical. Contradicting a prior review suggestion (e.g., suggesting `expect()` then flagging `expect()` as wrong) erodes trust; verify consistency with earlier comments before posting. diff --git a/.github/workflows/policy.yml b/.github/workflows/policy.yml index 6b0d6568..04fc0a0f 100644 --- a/.github/workflows/policy.yml +++ b/.github/workflows/policy.yml @@ -53,3 +53,13 @@ jobs: exit 1 fi echo "Changeset file found!" + - name: Validate Changeset Package Name + if: github.event_name == 'pull_request' + run: | + for f in $(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep "^.changeset/.*\.md$"); do + if grep -q '"googleworkspace-cli"' "$f"; then + echo "::error file=$f::Wrong package name. Use '\"@googleworkspace/cli\"' not '\"googleworkspace-cli\"'." + exit 1 + fi + done + echo "Changeset package names valid!"