Skip to content

Comments

Stricter linting, ccc-dev safety guards, and dev workflow cleanup#14

Merged
phroi merged 5 commits intomasterfrom
feat/dev-workflow-improvements
Feb 18, 2026
Merged

Stricter linting, ccc-dev safety guards, and dev workflow cleanup#14
phroi merged 5 commits intomasterfrom
feat/dev-workflow-improvements

Conversation

@phroi
Copy link
Member

@phroi phroi commented Feb 17, 2026

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

  • Add ESLint rules: eqeqeq, no-self-compare, ban bare Error(), no-promise-executor-return, and others.
  • Fix all violations — notably caught real bugs: self-comparisons in order/cells.ts and sdk.ts, wrong error message in core/logic.ts, typo in order/entities.ts.

ccc-dev safety guards

  • Add pnpm ccc:status to detect pending work before destructive operations.
  • record.sh now aborts if ccc-dev/ccc/ has uncommitted work.
  • patch.sh creates deterministic commits (fixed author/date) so record and replay always produce the same pins/HEAD.

Developer workflow

  • Add AGENTS.md as tool-agnostic agent config (CLAUDE.md becomes a gitignored symlink).
  • Add pnpm coworker / coworker:ask scripts; add ccc:clean and ccc:reset.
  • Remove scripts/pr.sh and scripts/review.sh — these workflows are now handled inline.
  • Reorder check pipeline to lint before build.

Devcontainer

  • Add telemetry opt-out env vars (DO_NOT_TRACK, DEVCONTAINERS_NO_TELEMETRY, etc.).
  • Install wl-clipboard for clipboard support.

Docs

  • Fix dependency graph (missing core → dao edge).
  • Update README scripts table, planning docs, and ccc-dev references.

@gemini-code-assist
Copy link

Summary of Changes

Hello @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

  • Tool-Agnostic AI Agent Configuration: Introduced a new AGENTS.md file for tool-agnostic AI Coworker configuration, replacing previous Claude-specific references. A CLAUDE.md symlink is used for compatibility, and all AI tool attribution or branding is removed from commit messages, PR descriptions, and code comments.
  • Enhanced CCC Local Development Workflow: Implemented safety guards in the ccc-dev record/replay workflow to prevent data loss from uncommitted changes or unpushed commits. The patch.sh script now creates deterministic git commits to ensure consistent pins/HEAD hashes, improving the reliability of local CCC builds.
  • Streamlined Developer Scripts: Removed the scripts/pr.sh and scripts/review.sh in favor of direct GitHub URL and curl workflows, respectively. New pnpm commands (coworker, coworker:ask, ccc:status, ccc:clean, ccc:reset) were added to manage AI interactions and the ccc-dev environment.
  • Telemetry Disablement in Devcontainer: Added several environment variables to devcontainer.json to disable various forms of telemetry and update notifications within the development container environment.
  • Documentation Updates: Updated README.md and .planning documents to reflect the new AI Coworker terminology, updated ccc-dev commands, and revised PR/review workflows.
  • Dependency Updates: Updated typescript-eslint and rimraf dependencies, along with the pnpm package manager version, to their latest compatible versions.

🧠 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
  • .devcontainer/devcontainer.json
    • Added new environment variables to disable telemetry and update notifications.
    • Updated the claude alias to coworker for AI Coworker extension compatibility.
  • .gitignore
    • Added CLAUDE.md to the ignore list, as it is now a symlink to AGENTS.md.
  • .planning/codebase/CONVENTIONS.md
    • Updated the tooling section to reflect that PR and review workflows are handled by the AI Coworker, removing references to pnpm pr and pnpm review.
  • .planning/codebase/STACK.md
    • Updated descriptions to refer to 'AI Coworker CLI' instead of 'Claude CLI' for merge conflict resolution.
    • Modified ccc-dev/record.sh description to mention aborting on pending work.
    • Added new ccc:status, ccc:clean, and ccc:reset commands to the documentation.
  • .planning/codebase/STRUCTURE.md
    • Updated descriptions to refer to 'AI Coworker conflict resolution' instead of 'Claude conflict resolution'.
    • Added new ccc commands to the developer scripts section.
  • AGENTS.md
    • Added a new file defining tool-agnostic configuration for the AI Coworker, including guidelines for commit messages, attribution, PR opening, and fetching review comments.
    • Documented the ccc-dev/ local development record/replay mechanism, including details on committed pins, rebuilding, pending work checks, and source-level types.
  • README.md
    • Updated table formatting for new packages and app migration status.
    • Updated the git clone command for clarity.
    • Changed the command to redo setup from rm -rf ccc-dev/ccc to pnpm ccc:clean.
    • Replaced pnpm pr and pnpm review commands with new pnpm coworker, pnpm coworker:ask, and pnpm ccc:* commands in the Developer Scripts section.
  • ccc-dev/README.md
    • Clarified the role of patch.sh in creating deterministic git commits for source-level type resolution.
    • Updated references from 'Claude CLI' to 'AI Coworker' for conflict resolution.
    • Added a section on checking for pending work with pnpm ccc:status and updated descriptions for ccc:record, ccc:clean, and ccc:reset to mention guarding against pending work.
    • Updated requirements for recording to specify 'AI Coworker CLI' invoked via pnpm coworker:ask.
  • ccc-dev/patch.sh
    • Modified the script to accept a merge-count argument.
    • Added logic to create a deterministic git commit for patched files with a fixed author, email, and date.
  • ccc-dev/pins/HEAD
    • Updated the HEAD SHA to reflect the latest changes.
  • ccc-dev/record.sh
    • Implemented a ccc_status function to check for uncommitted changes or unpushed commits in ccc-dev/ccc/.
    • Added a guard to abort the script if ccc-dev/ccc/ has pending work.
    • Removed the CLAUDECODE unset command.
    • Replaced direct claude CLI invocation with pnpm --silent coworker:ask for conflict resolution.
    • Updated error messages to refer to 'AI Coworker' and provide clearer instructions.
  • ccc-dev/replay.sh
    • Passed the MERGE_IDX to patch.sh for deterministic patching.
    • Updated the error message for replay divergence to be more informative and suggest re-recording.
  • package.json
    • Added new ccc:status, ccc:clean, and ccc:reset scripts.
    • Removed pr and review scripts.
    • Added coworker and coworker:ask scripts for AI Coworker interaction.
    • Updated the check:full script to include pnpm ccc:clean.
    • Updated typescript-eslint dependency from ^8.55.0 to ^8.56.0.
    • Updated pnpm package manager version from 10.29.3 to 10.30.0.
  • pnpm-lock.yaml
    • Updated typescript-eslint related entries to version 8.56.0.
    • Updated rimraf dependency from 6.1.2 to 6.1.3.
    • Added eslint-visitor-keys@5.0.0.
    • Updated the pnpm package manager hash.
  • scripts/pr.sh
    • Removed the script, as PR creation is now handled via direct GitHub URL workflows.
  • scripts/review.sh
    • Removed the script, as fetching PR comments is now handled via curl workflows.
Activity
  • phroi created the pull request to introduce tool-agnostic agent configuration and improve the developer workflow.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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.

Copy link

@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 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.

@phroi phroi force-pushed the feat/dev-workflow-improvements branch from 6c8cc03 to c44dba2 Compare February 17, 2026 20:45
@phroi
Copy link
Member Author

phroi commented Feb 17, 2026

/gemini review

Copy link

@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 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.

@phroi phroi force-pushed the feat/dev-workflow-improvements branch from c44dba2 to bf8dfd1 Compare February 18, 2026 08:59
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.
@phroi phroi changed the title feat: tool-agnostic agent config and dev workflow improvements Stricter linting, ccc-dev safety guards, and dev workflow cleanup Feb 18, 2026
@phroi phroi force-pushed the feat/dev-workflow-improvements branch from bf8dfd1 to 93b3cce Compare February 18, 2026 22:42
@phroi
Copy link
Member Author

phroi commented Feb 18, 2026

/gemini review

Copy link

@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 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.

@phroi
Copy link
Member Author

phroi commented Feb 18, 2026

LGTM

Phroi %248

@phroi phroi merged commit 7499193 into master Feb 18, 2026
2 checks passed
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.

1 participant