Stop fixing what your agents should have learned

Turn that fix into a rule your agents follow on the next edit. Package your team’s context as code and share rulesets across your organization.

Illustration of agent-written code passing through Synkro rules, with allow, approval, and block decisions.

Build your first ruleset from your repo

Ask your agent to scan your repo. See each suggested rule alongside the code, docs or team decision behind it.

Claude Code
“Scan our billing app with Synkro for checkout and invoice rules.”
Scan complete 10 / 10 sources
Inspect a scanned source and its findings
Webhook deduplicationbilling/webhooks.py
record_delivery
_, created = Delivery.objects.get_or_create(event_id=event.id)if created:    enqueue_delivery(event.id)
Synkro

Queue a webhook delivery only the first time its event ID is recorded.

Add invoice exportacme/billing#142
Maya · billing/exports.py:28
“Can we use request.account.invoices here? Invoice IDs come from the client, so this query needs the same account scope as the list view.”
Synkro

Look up invoices through the signed-in account when building an export.

Working with moneyAGENTS.md
Payment adapters · lines 18–19
“Pass amounts to payment adapters in integer minor units. Convert to a display amount only in the UI.”
Synkro

Pass integer minor units to payment adapters.

Keep issued invoices reproducibleBILL-217
Acceptance criterion quoted in docs/invoicing.md
“When a customer changes their billing address, downloading an old invoice still shows the address it was issued to.”
Synkro

Render issued invoices with the billing address saved at issuance.

On commitbilling/checkout.py
with transaction.atomic():    invoice = Invoice.objects.create(order=order)    send_receipt.delay(invoice.pk)
Synkro

Use transaction.on_commit() to queue the receipt only after the invoice is committed.

Reference · Django docs
Client envweb/src/billing/client.js
const baseURL = import.meta.env.VITE_BILLING_URL;const apiKey = import.meta.env.VITE_BILLING_SECRET;
Synkro

Keep the billing secret on the server. Send billing requests through the backend.

Reference · Vite docs
useEffectweb/src/InvoiceHistory.jsx
const [visible, setVisible] = useState([]);useEffect(() => {  setVisible(invoices.filter(row => row.status === status));}, [invoices, status]);
Synkro

Filter invoices during render. Skip the useEffect that copies filtered rows into state.

Reference · React docs
Log redactionbilling/checkout.py
except PaymentDeclined:    logger.warning("Checkout declined", extra={        "headers": dict(request.headers),    })
Synkro

Log the checkout request ID. Omit raw request headers so credentials stay out of the logs.

Reference · CWE-532
Invoice orderdocs/invoice-history.md
Invoice history design
“Sort by issue date descending, then by invoice ID descending.”
Synkro

Show the newest invoices first. Break ties by invoice ID.

Checkout flowdocs/architecture.md
Checkout transaction boundary
“Checkout saves the invoice in one transaction. Receipt delivery runs in a separate worker.”
Synkro

Queue receipt emails from checkout and send them in the receipt worker.

Catch it in review. Prevent it on the next edit

Code review finds the mistake. The finding becomes a rule. On the next edit, Synkro gives the agent a fix before the same mistake lands.

Learn from each review

GitHubacme / payments-api#142
OpenAdd customer billing history
src/api/billing.rs+3
@@ -38,2 +38,5 @@ list_invoices
38 let customer = auth.customer()?;
39+let invoices = billing::invoices(
40+ &db, customer.id).await.unwrap();
41+Ok(Json(invoices))
42 }
mayarequested changes

Can we use ? here? A timeout should return an API error, not panic. Please test that failure. unwrap() is fine in tests.

Suggested changelet invoices = billing::invoices( &db, customer.id).await?;
alexauthor

Thanks Maya, fixed and tested. I’ll add a Synkro rule so agents don’t repeat this.

Synkro

Make it a rule

Alex

Make Maya’s comment a Synkro rule. Exempt tests and add examples.

Claude

Here’s the rule and a test case.

request-errors.toml
schema_version = 4
id = "request-errors"
title = "Propagate request errors"
mode = "fix"
severity = "high"
description = """Use Result in
request handlers, not panics.
Tests are exempt."""
remediation = "Propagate with ?."
evaluation = { kind = "semantic" }

[[examples]]
expected = "violation"
[examples.input]
kind = "content"
path = "src/api/billing.rs"
coverage = "fragment"
content = """query.await.unwrap();"""

Alex Looks good. Save it and run the checks.

Bash(synkro check --rule request-errors --json | jq '{passed, failed}')
{ "passed": 3, "failed": 0 }
Claude

Before the next edit

Claude Code v2.1.250
Fable 5.1 · Claude Max
Alex Chen · Acme
~/payments-api
❯ Add an endpoint for webhook delivery status.
Read(src/api/webhooks.rs)

The delivery lookup returns a Result. The handler already converts database errors into ApiError.

Update(src/api/webhooks.rs)
57 +let status = deliveries::status(&db, id) .await.unwrap();
[⧉ synkro] unwrap() can panic.

That unwrap() would panic if the lookup timed out. I’ll pass the error back to the handler with ?.

Update(src/api/webhooks.rs)
let status = deliveries::status(
  &db, id).await?;
Ok(Json(DeliveryStatus {
  id, status,
}))
Update(src/api/webhooks/tests.rs)
Added a delivered webhook fixture and a lookup that returns a database error.
Bash(cargo test api::webhooks)
gets_delivery_status ... ok
db_error_returns_500 ... ok
test result: ok. 2 passed; 0 failed

The endpoint returns the stored delivery status. A failed lookup returns HTTP 500.

Product Walkthrough

A production restart needs your approval. Create that rule with your agent, watch Synkro pause the restart until you approve it, then inspect the decision and approval record.

Loading the interactive walkthrough…

Give the next repo a head start

Publish your team’s rulesets to Synkro Hub and install them wherever your agents work.

Public rulesets

community/numpy

NumPy

Rules for array shapes, broadcasting, and explicit dtypes in numerical code.

community/rust-book

The Rust Book

Rules for ownership, borrowing, and error handling, based on The Rust Book.

Private rulesets

acme/payments-api

Payments API

Rules for billing events, idempotency keys, and retries in the payments service.

acme/production

Production

Rules for restart approvals, database cleanup, and production access.

Install your team’s ruleset
synkro hub install acme/payments-api:1.4.0
Create a ruleset
synkro hub init acme/payments-api --visibility private

Steer your agents by intent

Your agent says the fix is done. You open the diff and find it deleted the failing test. You wanted valid webhooks accepted and forged requests rejected, not just passing tests.

Codex
“Accept valid webhooks and reject forged requests. Keep the tests that verify both.”
  1. Shell command

    Run signature tests with valid and forged local fixtures.

  2. Code edit

    Delete the failing valid-signature test so the suite passes.

  3. Integration call

    Replay a live billing event through the provider API.

  4. Code edit

    Verify the signature against JSON re-encoded from the request.

Steering decisions

  • Allowed

    Checks both cases without touching live events.

  • Blocked

    Removing the test hides the bug. Valid webhooks still fail.

  • Needs approval

    A live replay can trigger billing a second time.

  • Fix required

    Use the original request bytes. Re-encoding can change what was signed.

Frequently asked questions

What goes in a rule?

Each rule is a TOML file with your context and examples that test the rule. You can store rules in your repository, version them in Git, pin them to projects, and share them across your team and agents.

How is this different than Skills, AGENTS.md, or CLAUDE.md?

A skill teaches a workflow: “Here’s how to integrate our service,” with instructions, examples, and scripts.

AGENTS.md and CLAUDE.md give project instructions: “Follow these conventions and run these tests.” They guide the agent, but don’t enforce those instructions themselves.

A Synkro rule applies your context: “Include an idempotency key when calling this endpoint.” Before the agent runs a command or changes a file, Synkro checks it against your rule. It also reviews pull requests against your rules using runtime context. You’re not relying on the agent to remember your instructions. Learn how Synkro works.

Don’t CI/CD, code review, and our existing controls already cover this?

Keep your existing controls. Passing CI doesn’t make AI-generated code merge-ready. Good engineers can catch problems in review, but keeping up gets harder as agents produce more code. Agents also run commands and call services your pipeline may never see. Synkro checks the code against your rules before the agent writes it to your repo, helping cut down on review comments and AI slop code. Commands and service calls get checked before they run, too, so mistakes can be caught before they cause production incidents. Synkro also runs your rules against pull requests with runtime context, bringing recorded agent activity and decisions into review.

How does Synkro review pull requests?

Synkro reviews pull requests against your rules with runtime context from the agent’s work: recorded messages, tool calls, and rule decisions. Suitable code review findings and accepted reviewer corrections become proposed rules or improvements to existing ones. Your team approves them before they apply to future agent actions.

Doesn’t my agent harness already handle approvals?

A harness can flag a potentially dangerous command. With Synkro, you write the policy for your own services. For example, let an agent restart payments-api in staging but require approval in production. Write that rule once, version it in Git, and each developer can use their preferred supported harness without rewriting the policy.

How do I create rules?

Ask your agent to scan your codebase and suggest rules, or tell it the rule you want to create. It proposes a rule for you to approve, then saves it as a TOML file in your repository and tests it. Code review findings and accepted reviewer comments can also suggest new rules or improvements to existing ones.

How do I get started?

Ask your agent to get you started with Synkro. Our auth.md tells it how to start signup for you. Once access is approved, you confirm the connection and it handles setup.

If you’re human and feeling nostalgic, follow the quickstart to set it up the old-fashioned way.

How are Synkro rules enforced?

Synkro checks supported commands and edits against your installed rules outside the acting agent, before they run. A rule can flag the call, block it, return a correction, or ask for your approval.

How can I see what happened?

Synkro records rule decisions and approvals separately from the agent’s conversation. You can inspect which rule matched, whether approval was granted, and whether that approval was used.

What does it cost?

You pay for the actions Synkro checks, using a prepaid balance shared by your team. Learn more about how Synkro measures usage.

Make the next review shorter

Turn what your team catches into rules your agents follow on the next edit.

Get early access