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
39 changes: 39 additions & 0 deletions .greptile/config.json
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"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
]
}
38 changes: 38 additions & 0 deletions .greptile/files.json
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/**"]
}
Comment thread
greptile-apps[bot] marked this conversation as resolved.
]
}
23 changes: 23 additions & 0 deletions .greptile/rules.md
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.
Loading