Use cases PR Review
Use case

Shorter PR reviews start
with better code generation.

AI code review catches mistakes after the PR is opened.
Tenure prevents them before the PR exists.

The difference

Two different theories of where time gets lost.

Most AI code review tools assume the problem happens at review time. Tenure assumes part of the problem happens earlier: at generation time, when the model is missing the conventions, decisions, and unresolved questions your team already discussed.

AI code review

Review the PR after it's opened

The PR opens with naming inconsistencies, wrong folder placement, an abstraction your team already has, and error handling that doesn't match your patterns. A bot flags some of it. The reviewer flags the rest. The author fixes, pushes again. Cycle repeats.

Catches problems. Doesn't prevent them.

AI memory (Tenure)

Align the code before the PR exists

Your team's naming conventions, folder structure, existing abstractions, error handling style, testing expectations, and explicit architecture decisions are in context when the code is generated. If something is unresolved, Tenure can preserve it as an open question instead of letting the model silently guess. The PR opens closer to how your team would have written it. Less avoidable rework. Fewer round-trips.

Prevents problems. Doesn't just catch them.
Tenure does not replace judgment review. It removes the avoidable review comments caused by missing team context.
Where review time goes

Reviewers spend time on things AI could have known before it wrote the code.

Some review comments require human judgment. Tenure is not trying to eliminate those. It targets the avoidable comments: convention violations, missed architecture decisions, rejected approaches, and places where the AI guessed instead of carrying forward an unresolved question.

01 Naming

Your team uses getUser not fetchUser. handleError not onError. Service files are *.service.ts, not *Service.ts. Tenure stores this. Every AI request that touches these files gets it injected automatically.

02 Folder placement

Auth logic belongs in /services/auth/, not /utils/. Shared hooks go in /hooks/shared/. Tenure tracks where things live so AI stops generating files in the wrong place.

03 Existing abstractions

You already have a withRetry wrapper. You already have a parseApiError utility. Reviewers spend time pointing this out. Tenure stores it once. AI uses it every time.

04 Architectural patterns

Factory functions over classes. Repository pattern for data access. No direct DB calls from route handlers. These are not just patterns inferred from code; they can be explicit decisions someone stated once in an AI session. Tenure stores the decision with scope, confidence, and provenance, then injects it when future generation touches the relevant project.

05 Error handling

Your team throws structured errors with { code, message, context }. Always. Not bare strings, not generic Error objects. Tenure knows. The AI you're using knows, because Tenure tells it.

06 Testing expectations

Vitest, not Jest. Unit tests in __tests__/ adjacent to the module. Integration tests in /tests/integration/. Mocks using vi.mock(), never manual stubs. All stored. All injected.

07 Explicit decisions

An engineer says, Use the raw MongoDB driver here; do not add Mongoose. That does not need to appear three times in the codebase before it matters. Tenure can capture the statement as a high-confidence decision and apply it to future AI requests in the same project.

08 Open questions

If the team has not decided between Redis and Postgres for a queue, Tenure can preserve that as an open_question. The next AI session can surface the uncertainty instead of generating code that assumes the answer.

The mechanism

Tenure prevents the mistake by preserving the reason the code should not be written that way.

There are two different kinds of context that affect code review. Tenure handles both, and it treats unresolved context as first-class instead of forcing the model to invent an answer.

📐

Convention enforcement

Naming, folder placement, imports, error handling, test layout, and repeated coding patterns. These can be extracted from demonstrated code patterns or config artifacts and injected before generation.

🏛️

Decision enforcement

Business rules and architecture commitments the user explicitly states, like do not persist PII in logs or raw driver only. A single explicit statement can become a high-confidence project belief.

🔎

Provenance and confidence

Tenure distinguishes direct statements, config artifacts, and inferred patterns. That matters because an explicit decision should carry more weight than a weak pattern inferred from one generated file.

Open questions

When something is unresolved, Tenure can store the uncertainty. The value is not only remembering what the team decided; it is also remembering what the team has not decided yet.

How it works

Decisions, conventions, and open questions enter the system as you work.

You do not have to wait for a rule to appear in the codebase. Tenure can capture a direct statement from the user, a config artifact in the workspace, or a repeated pattern in generated code. Each belief carries scope, confidence, epistemic status, aliases, and provenance, so future requests know what to apply and why.

01
Capture

Explicit statements become high-confidence beliefs

When you tell your AI we use factory functions, not classes or do not use Mongoose, raw driver only, Tenure can extract that as a project-scoped decision. It does not need to infer the rule from historical code first.

// Direct statement → active decision → injected before future generation.
02
Scope

Beliefs keep their scope, source, and confidence

The MongoDB convention for your API project does not bleed into your data pipeline project. Tenure also distinguishes an explicit decision from an inferred pattern or config artifact, so the model is not treating every hint as equally authoritative.

03
Inject

Every AI request arrives with the relevant constraints

Before the request reaches the model, Tenure injects the relevant beliefs and unresolved questions automatically. The AI generating your code sees the team's conventions, the decisions it must respect, and the questions it should not guess around.

Before & after

What changes in code review.

Same AI tool. Same task. Different outcome when the AI has both conventions and explicit decisions in context.

Without Tenure AI generated, no convention context
+ import UserService from '../../UserService'
+ export class UserController {
+ async fetchUser(id: string) {
+ try {
+ return await UserService.getById(id)
+ } catch (e) {
+ throw new Error(e.message)
+ }
+ }
+ }
reviewer We use factory functions, not classes. Also fetchUsergetUser per our conventions.
reviewer Errors need { code, message, context } shape. See AppError in /lib/errors.
reviewer This should import from the repository layer, not directly from the service. We made that layer-boundary decision already.
3 review cycles. Fixed on third push.
With Tenure AI generated, decisions in context
+ import { makeUserRepository } from '../repositories/user'
+
+ export function makeUserController(db: Db) {
+ const users = makeUserRepository(db)
+ return {
+ async getUser(id: string) {
+ return users.findById(id)
+ }
+ }
+ }
reviewer LGTM. Factory pattern, correct naming, and the existing layer-boundary decision was followed. Approved.
1 review cycle. Merged same day.
What Tenure actually is

Not a code reviewer. The memory layer that carries team intent into code generation.

AI code review tools say:
"We'll catch the mistakes in your PR."

They sit at the end of the pipeline, after the code exists, after the PR is open, after the review clock has started. They're useful. But they're reactive.

Tenure says:
"PRs move faster when AI already knows your conventions, decisions, and open questions."

Tenure sits at generation time, before the code is written. The reduction in PR review time is a consequence of better-aligned output: fewer convention misses, fewer ignored decisions, and fewer guesses where the team had not decided yet.

PR review still requires judgment. Tenure reduces the avoidable part: re-explaining context the AI should have carried forward.

For teams

Shared memory means every engineer's AI starts from the same baseline.

When one engineer captures we use Zod for input validation, not Joi, every other engineer's AI knows it too. When another engineer captures queue backend is still undecided, future sessions know not to assume one. Shared memory propagates decisions and uncertainty without a style guide meeting, without a Confluence page nobody reads, without a linting rule that fires after the fact.

🏗️

Architecture decisions

Monorepo structure, layer boundaries, forbidden patterns, approved libraries. Stored once. Injected for every engineer on the project.

📐

Naming conventions

Function prefixes, file naming, event naming, prop naming. The kind of thing that lives in a Notion doc nobody opens. Now it's in context automatically.

🧩

Existing abstractions

The utilities, hooks, and services that already exist. AI stops reinventing them and starts using them because Tenure tells it they're there.

🚫

Rejected approaches

"We evaluated Prisma and ruled it out." That decision lives in Tenure too. Not just what you chose, but what you rejected and why.

Get started

Teach AI how your team writes code.

Self-hosted shared memory for AI coding tools. Start with Tenure Community, or choose a team plan for shared workspaces, segmented memory, and support.

Helm chart · OIDC / SCIM · No call-home telemetry