|
| 1 | +# yaml-language-server: $schema=https://cubic.dev/schema/cubic-repository-config.schema.json |
| 2 | +# |
| 3 | +# cubic AI review settings (settings as code). |
| 4 | +# Docs: https://docs.cubic.dev/configure/cubic-yaml |
| 5 | + |
| 6 | +version: 1 |
| 7 | + |
| 8 | +reviews: |
| 9 | + custom_instructions: | |
| 10 | + This project follows an issue-first workflow: every PR should reference an approved, |
| 11 | + assigned issue and stay scoped to it. Unrelated refactors belong in separate PRs. |
| 12 | + Test evidence must be real (actual output), especially for bug fixes, which should |
| 13 | + include a regression test. Many PRs are agent-generated; hold them to the same bar. |
| 14 | + Normative rules live in AGENTS.md (root, open_notebook/, frontend/); product direction |
| 15 | + lives in VISION.md; past decisions in docs/7-DEVELOPMENT/decisions/. |
| 16 | +
|
| 17 | + custom_rules: |
| 18 | + - name: Vision & principles alignment |
| 19 | + description: | |
| 20 | + Check the PR against the product identity and current posture defined in the |
| 21 | + linked VISION.md. Flag: |
| 22 | + - Features that gratuitously preclude multi-user (hard-coded single-tenancy in |
| 23 | + schema, auth, or data scoping) — see PDR-001. |
| 24 | + - Capabilities that only work on one AI provider without a PDR justifying the |
| 25 | + exclusivity — the core is provider-agnostic by default (PDR-002). |
| 26 | + - Features that conflict with the "What Open Notebook IS NOT" list. |
| 27 | + - Structural/architectural decisions introduced without a decision record in |
| 28 | + docs/7-DEVELOPMENT/decisions/ (half a page, same PR). |
| 29 | + file_paths: |
| 30 | + - VISION.md |
| 31 | + |
| 32 | + - name: Known caveats |
| 33 | + description: | |
| 34 | + Enforce this project's recurring mechanical pitfalls (full rules in |
| 35 | + open_notebook/AGENTS.md and frontend/AGENTS.md): |
| 36 | + - i18n: every user-visible frontend string goes through t('section.key') and the |
| 37 | + key must exist in ALL 7 locales (en-US, pt-BR, zh-CN, zh-TW, ja-JP, ru-RU, bn-IN). |
| 38 | + - Providers: any change to supported providers must touch all 4 sync points: |
| 39 | + api/models.py SupportedProvider, frontend ALL_PROVIDERS, |
| 40 | + connection_tester.py TEST_MODELS, credentials_service.py PROVIDER_ENV_CONFIG. |
| 41 | + - Migrations: a new open_notebook/database/migrations/N.surrealql file must also be |
| 42 | + registered in AsyncMigrationManager (async_migrate.py) — no auto-discovery. |
| 43 | + - Graphs: LLM calls in LangGraph nodes must use provision_langchain_model() and wrap |
| 44 | + errors with classify_error(); model output goes through clean_thinking_content(). |
| 45 | + - Domain: Source.save() does not auto-embed — vectorize() must be called explicitly; |
| 46 | + RecordModel singletons need clear_instance() in tests. |
| 47 | + - Async jobs (podcasts, embeddings, source processing) run on the surreal-commands |
| 48 | + worker; features depending on them must not assume inline execution. Permanent |
| 49 | + failures raise ValueError (no retry); podcasts use max_attempts=1 by design. |
| 50 | + - Frontend: FormData nested fields must be JSON.stringify-ed; don't re-add |
| 51 | + Content-Type; check hasHydrated before rendering persisted Zustand state. |
| 52 | +
|
| 53 | + - name: Security & testability |
| 54 | + description: | |
| 55 | + Security: |
| 56 | + - API endpoints must never return API key or secret values — metadata only. |
| 57 | + - Every user-supplied URL must pass validate_url() (SSRF protection; private IPs are |
| 58 | + intentionally allowed for self-hosted services). |
| 59 | + - No secrets committed, logged, or echoed in error messages; credential fields use |
| 60 | + SecretStr and Fernet encryption (OPEN_NOTEBOOK_ENCRYPTION_KEY). |
| 61 | + - Raise typed exceptions from open_notebook.exceptions instead of bare HTTPException |
| 62 | + or generic 500s. |
| 63 | + Testability: |
| 64 | + - Business logic belongs in services/domain, not in routers or React components, |
| 65 | + so it can be tested directly. |
| 66 | + - Critical paths (auth, credentials, encryption, migrations, data deletion) need |
| 67 | + test coverage in the same PR. |
| 68 | + - Bug fixes should include a test that reproduces the bug. |
| 69 | +
|
| 70 | + auto_ultrareview: custom |
| 71 | + auto_ultrareview_custom_prompt: | |
| 72 | + Run an ultrareview when the PR touches authentication, credential storage, encryption, |
| 73 | + database migrations, or data deletion/cascade logic. |
| 74 | + auto_ultrareview_file_patterns: |
| 75 | + - 'open_notebook/database/migrations/**' |
| 76 | + - '**/credential*' |
| 77 | + - '**/auth*' |
| 78 | + - '**/encryption*' |
0 commit comments