Stricter linting, ccc-dev safety guards, and dev workflow cleanup#14
Stricter linting, ccc-dev safety guards, and dev workflow cleanup#14
Conversation
Summary of ChangesHello @phroi, 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 refactors the project's AI agent integration to be tool-agnostic, enhancing flexibility and reducing vendor lock-in. It significantly improves the robustness and safety of the local development workflow for the CCC (CKB Common Components) by introducing checks for pending work and ensuring deterministic builds. Additionally, it streamlines developer operations by replacing custom PR and review scripts with more direct and standardized methods, while also disabling telemetry for a cleaner development experience. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 series of excellent improvements by decoupling the AI agent configuration from specific tools, adding crucial safety guards to the ccc-dev workflow, and cleaning up obsolete scripts. The introduction of a tool-agnostic AGENTS.md configuration file and the associated script changes are well-executed. The safety checks for uncommitted work and the move towards deterministic patches significantly enhance the development workflow's robustness. I've identified one high-severity issue in a package.json script that could lead to unexpected behavior and one medium-severity improvement for script argument handling. Overall, this is a valuable set of changes.
6c8cc03 to
c44dba2
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request significantly improves the developer workflow by decoupling the AI agent configuration from a specific tool and adding important safety guards to the ccc-dev record/replay mechanism. The introduction of a tool-agnostic AGENTS.md and the removal of tool-specific scripts are great steps towards maintainability. The new safety checks in record.sh to prevent data loss from uncommitted work are a major enhancement. My review includes a couple of suggestions to further improve the robustness of the new npm scripts, particularly concerning data loss prevention and script execution logic.
c44dba2 to
bf8dfd1
Compare
Add eslint rules: eqeqeq, no-self-compare, no-constructor-return, no-promise-executor-return, array-callback-return, no-constant-binary-expression, no-template-curly-in-string, and ban bare Error() calls. Fix all violations across apps/ and packages/. Notably, this caught real bugs: - order/cells: was comparing info with itself instead of descendant - sdk: was comparing tipEpoch with itself instead of start - core/logic: error message said "minimum" instead of "maximum" - order/entities: typo "respectfully" → "relative"
Add AGENTS.md as tool-agnostic agent config (CLAUDE.md is now a gitignored symlink to it). Add pnpm coworker/coworker:ask scripts, ccc:status, ccc:clean, ccc:reset commands. Remove scripts/pr.sh and scripts/review.sh — PR and review workflows are now handled inline. Also: bump typescript-eslint to 8.56, pnpm to 10.30.0, reorder check pipeline to run lint before build.
Add status.sh to detect pending work in ccc-dev/ccc/ (diverged HEAD, uncommitted changes, untracked files). Record.sh now aborts if pending work exists instead of silently overwriting. Patch.sh creates a deterministic git commit (fixed author/date derived from merge count) so record and replay produce the same pins/HEAD hash. Replay.sh gets improved error messaging on divergence.
Add env vars to disable telemetry (DO_NOT_TRACK, DEVCONTAINERS_NO_TELEMETRY, NEXT_TELEMETRY_DISABLED, NO_UPDATE_NOTIFIER). Install wl-clipboard for clipboard support used by AGENTS.md copy-to-clipboard workflow. Rename claude alias to coworker.
Update README with corrected dependency graph (core → dao edge), new developer scripts table, and repo clone URL. Update planning docs to reference AI Coworker instead of Claude CLI, document ccc:status/ccc:clean/ccc:reset commands, and remove obsolete scripts/ section. Update ccc-dev/README.md with status check docs and deterministic commit explanation.
bf8dfd1 to
93b3cce
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request significantly improves code quality and developer workflow. It introduces stricter ESLint rules which successfully identified and fixed several real bugs, including self-comparisons in order/cells.ts and sdk.ts, and incorrect error messages in core/logic.ts. The addition of safety guards for the ccc-dev/ environment is a great improvement to prevent accidental data loss during local development of the CCC fork. The transition to a tool-agnostic AGENTS.md configuration and the cleanup of redundant shell scripts streamline the development process. The deterministic commit logic in patch.sh ensures consistency across different environments.
|
LGTM Phroi %248 |
Why
Tighten code quality, protect against accidental data loss in
ccc-dev/, and streamline the developer workflow by moving shell-script responsibilities into the AI Coworker configuration.Changes
Lint & bug fixes
eqeqeq,no-self-compare, ban bareError(),no-promise-executor-return, and others.order/cells.tsandsdk.ts, wrong error message incore/logic.ts, typo inorder/entities.ts.ccc-dev safety guards
pnpm ccc:statusto detect pending work before destructive operations.record.shnow aborts ifccc-dev/ccc/has uncommitted work.patch.shcreates deterministic commits (fixed author/date) so record and replay always produce the samepins/HEAD.Developer workflow
AGENTS.mdas tool-agnostic agent config (CLAUDE.mdbecomes a gitignored symlink).pnpm coworker/coworker:askscripts; addccc:cleanandccc:reset.scripts/pr.shandscripts/review.sh— these workflows are now handled inline.checkpipeline to lint before build.Devcontainer
DO_NOT_TRACK,DEVCONTAINERS_NO_TELEMETRY, etc.).wl-clipboardfor clipboard support.Docs
core → daoedge).