-
Notifications
You must be signed in to change notification settings - Fork 6
chore: add Greptile code review configuration #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "strictness": 2, | ||
| "commentTypes": ["logic", "syntax", "style"], | ||
| "triggerOnUpdates": true, | ||
| "includeBranches": ["main"], | ||
| "ignoreKeywords": "WIP\nDO NOT REVIEW", | ||
| "ignorePatterns": "node_modules/**\ndist/**\nbuild/**\n**/*.min.js\npnpm-lock.yaml\nflake.lock\n**/*.snap\nreports/**\n**/*.webp\n**/*.png\n**/*.gif", | ||
| "instructions": "TypeScript pnpm monorepo for pythinker-code, a provider-agnostic AI coding agent. The published user-facing package is the CLI (@pythoughts/pythinker-code); packages/node-sdk is the public TypeScript SDK; packages/agent-core, kosong, kaos, oauth, and telemetry are internal engine packages. apps/* are the CLI/TUI, web UI, and dashboard. The root AGENTS.md is the authoritative contributor guide; nearest sub-directory AGENTS.md files add local rules.", | ||
| "rules": [ | ||
| { | ||
| "id": "no-type-weakening", | ||
| "rule": "Do not weaken types to silence errors: no `any`, unconstrained `unknown`, `@ts-ignore`, or type assertions added only to make a type error go away.", | ||
| "scope": ["packages/**", "apps/**"], | ||
| "severity": "high" | ||
| }, | ||
| { | ||
| "id": "flake-workspace-sync", | ||
| "rule": "When a workspace package is added or removed in pnpm-workspace.yaml, flake.nix workspacePaths and workspaceNames must be updated in the same PR. A missing path silently drops files from the Nix build.", | ||
| "severity": "high" | ||
| }, | ||
| { | ||
| "id": "tests-can-fail", | ||
| "rule": "Tests must be able to fail. Flag vacuous assertions: empty-set matches, missing awaits on async expectations, and mocked units asserting on the mock itself.", | ||
| "scope": ["**/*.test.ts", "**/*.test.tsx"], | ||
| "severity": "medium" | ||
| }, | ||
| { | ||
| "id": "tui-reactivity", | ||
| "rule": "Solid signals must not be destructured, rendering must stay allocation-light, and no blocking I/O on the render path.", | ||
| "scope": ["apps/pythinker-code/src/tui/**"], | ||
| "severity": "high" | ||
| }, | ||
| { | ||
| "id": "changeset-required", | ||
| "rule": "Every PR that affects release artifacts (code, behavior, or public API) must include a changeset; only docs-only, test-only, or CI-only PRs may skip one. Default to minor or patch; a major bump requires explicit maintainer confirmation.", | ||
| "severity": "medium" | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "files": [ | ||
| { | ||
| "path": "AGENTS.md", | ||
| "description": "Repository-wide contributor guide: product identity, project map, coding rules, and PR workflow" | ||
| }, | ||
| { | ||
| "path": "apps/pythinker-code/AGENTS.md", | ||
| "description": "CLI / terminal UI app rules", | ||
| "scope": ["apps/pythinker-code/**"] | ||
| }, | ||
| { | ||
| "path": "apps/pythinker-web/AGENTS.md", | ||
| "description": "Browser UI (Vue 3) rules", | ||
| "scope": ["apps/pythinker-web/**"] | ||
| }, | ||
| { | ||
| "path": "packages/agent-core/src/services/AGENTS.md", | ||
| "description": "Service layer rules: naming, layout, and registration conventions", | ||
| "scope": ["packages/agent-core/src/services/**"] | ||
| }, | ||
| { | ||
| "path": "packages/server/AGENTS.md", | ||
| "description": "Server package rules (REST + WS /api/v1)", | ||
| "scope": ["packages/server/**"] | ||
| }, | ||
| { | ||
| "path": "packages/server-e2e/AGENTS.md", | ||
| "description": "E2E test suite rules", | ||
| "scope": ["packages/server-e2e/**"] | ||
| }, | ||
| { | ||
| "path": "docs/AGENTS.md", | ||
| "description": "Documentation rules", | ||
| "scope": ["docs/**"] | ||
| } | ||
|
greptile-apps[bot] marked this conversation as resolved.
|
||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Review Rules | ||
|
|
||
| ## TypeScript conventions | ||
|
|
||
| - `user?: User`, never `user?: User | undefined`. | ||
| - Pass `undefined` directly for optional props — no conditional spread. | ||
| - Single-param internal methods stay single-param — no options-object wrapping. | ||
| - Non-root `index.ts` files: prefer `export * from './module'`. | ||
| - Prefer `import ... from '#/...'` over deep relative paths (equivalent to `@/...`). | ||
|
|
||
| ## Architecture boundaries | ||
|
|
||
| - `apps/pythinker-code` and `apps/pythinker-web` must not depend on `packages/agent-core`. They consume the SDK (`@pythoughts/pythinker-code-sdk`) or the server REST/WS API. | ||
| - The `Agent` class in `packages/agent-core` stays standalone: no mandatory `Session` or `agentId`; optional `sessionId` is a provider hint only. | ||
| - `packages/acp-adapter` pins `@agentclientprotocol/sdk` to `^0.23.0` — flag any bump to 0.24+ (it broke the session-model API). | ||
| - Experimental features are gated behind flags in `packages/agent-core/src/flags/registry.ts`, not shipped unguarded. | ||
|
|
||
| ## Hygiene | ||
|
|
||
| - English-only code, comments, and identifiers. Unicode tests use ASCII/Latin fixtures (e.g. `café`). | ||
| - No backward-compatibility shims; implement the current requirement directly. | ||
| - Prefer adding tests to existing test files over creating new ones. | ||
| - Internal identifiers must not appear in public text or test data — use neutral placeholders. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.