Skip to content

Add agent approver and --approval auto: a judge model decides every gated call - #47

Merged
lydakis merged 10 commits into
mainfrom
claude/project-thread-3o0ntp
Sep 27, 2026
Merged

lydakis merged 10 commits into
mainfrom
claude/project-thread-3o0ntp

Conversation

@lydakis

@lydakis lydakis commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Before: the daemon could serve a gate tag to one approver under a lease, but no approver existed. --approval auto was refused with approval_mode_unsupported, so the only way to gate a bot was manual, where a person or a script answers every call.

After: agent approver serves a gate tag (default auto) and has a judge model decide every call waiting on it, one request per round. run --new --approval auto gates the new bot's tools under auto and starts the approver detached when nobody serves that tag. So does continuing or forking any bot an auto gate answers. The judge is Jev (typesafe/jev-*) when it is picked, or when TYPESAFE_API_KEY is set and nothing else is picked. Otherwise it is whatever model is configured, run through the daemon with the providers and logins the bots already use. Per George (2026-09-27): no rules sit in front of the judge, and auto must work without a Jev key.

How:

  • Judge. Each round asks every judge the same eleven yes/no questions, with thresholds 0.35 and 0.70. An answer outside 0 to 1 is a failed check.
    • Jev is called on TypeSafe's API from the approver.
      • Its answers are capped at 64 KiB.
      • After a 429 or 529 it waits the longer of Retry-After and the local backoff.
      • An answer to an earlier request doesn't clear a newer backoff.
    • Any other model runs as a hidden, tool-less bot approver.TAG, and the tag can be at most 87 bytes.
      • Each round forks the bot, sends one JSON prompt (queued when every active slot is taken), reads back one JSON object of probabilities, and deletes the fork.
      • An existing bot of that name is replaced only if it has exactly the judge's instructions and no tools. Otherwise the approver refuses to start (approver_name_taken).
      • Forks left by a stopped approver are found by listing names from the approver.TAG. prefix, not by listing every bot.
    • A round takes one of 32 judge slots before it reads anything.
    • Jev rounds get 10 s from announcement to verdict, and general-model rounds 30 s. Calls still waiting past that are denied as not reviewed.
    • A breaker trips after 3 failed checks in a row or 20 in a turn.
    • The CLI waits for the approver's serving line, printed once the judge is ready.
  • What the judge sees.
    • The person's prompts, in the order written, following delegations up to 8 deep.
      • A deeper chain is judged "intent too long". So is one with more than 64 delegating turns, or with more prompt text across them than one 128 KiB read.
      • So is a turn, or an ancestor, whose steers don't all fit.
    • The round's calls, and how the turn's earlier calls ended. At most 128 KiB of cut arguments is read back.
      • A cut call that no gate covers can't be read back. A write or edit is matched by the path in its preview, or judged too long without one. Any other such call keeps its preview, with consent not counted.
    • Files the turn wrote that a call names as a whole word, up to 48 KiB each.
      • Only regular files, read on the blocking pool.
      • Never from a write or edit that failed.
      • If an earlier call in the same round writes or edits the file, that call is named instead.
    • An optional environment note (--note): a regular file of at most 96,000 bytes.
    • Secrets are redacted, paths included, before anything is sent. The redaction tests' synthetic tokens are joined at run time, so secret scanners don't flag them.
  • Daemon support.
    • submit takes from {bot, turn} (schema 38: turns.from_bot, turns.from_turn), and tool shells get AGENT_TURN, so the approver can tell a person's words from a bot's.
    • A new prompts read op returns a turn's prompts with their authors, its started calls, and the bot's earlier prompts.
      • It stays within a byte budget that also counts 64 bytes per entry.
      • It reports prompts_more, calls_more, and more when entries are left out.
    • tool_completed carries failed, and a gated tool_started carries its planning node.
    • TYPESAFE_API_KEY is kept out of tool environments. A daemon the CLI starts keeps it only when a --provider names it as its key variable.
  • Benchmark harness. bench.approval_judges replays labeled rounds through the real daemon and approver, once per judge. A second gate that nobody allows keeps every labeled call from running.
  • Docs. APPROVALS (automatic mode, which model judges, what was built, judges compared), CLI, RUST_PROTOTYPE, NEXT 45, and EVIDENCE.
    • The PR also drops the protocol doc's sentences about a session serving its own tag again, since main now refuses that.

Measured:

  • Approver cost. Linux container, one bot, 200 turns, judges that answer at once, bench.approval_overhead, compared with a client that answers directly:
    • At 74f726b, Jev adds 2.7 ms p50 and no commit. A general model through the daemon adds 11.5 ms p50, 8.6 ms of daemon CPU, and 11 commits a round.
    • Rechecked at aed1669 against 74f726b, interleaved: Jev adds 2.2 against 2.3 ms, and a general model 8.8 against 9.7 ms, with the same commits.
  • Judges compared. George's Mac, 81458d2, 341 labeled calls that should all run, two passes in opposite order:
    • gpt-6-luna at low reasoning allowed 303 and 309, with a p50 of about 2.9 s. Its slowest round took 25.4 s, against its 30 s deadline.
    • Jev allowed 275 and 276, refusing most of the rest as "unclear", with a p50 of about 165 ms. It cost $0.0217 a pass.
    • Neither judge failed a check. False allows are unmeasured, since every call should run.
  • Both are recorded in APPROVALS "Measure" item 4 and in EVIDENCE.

Follow-ups, listed in APPROVALS under "Not built yet":

  • Add a fork's inherited turns to earlier.
  • Rotate the log of the approver the CLI starts.
  • Check the readiness of an approver that is already serving.
  • Handle consent that an earlier call in the same round uses up.
  • Count the questions in the request limit.
  • Handle stdout backpressure.
  • Read completions in prompts only for the calls that fit.
  • Forget a bot's judged requests once its turn ends.
  • Show the judge a round's earlier calls that wait on another tag's gate, or on none and haven't started. Today the judge doesn't see them. Plain --approval auto puts every consequential tool under one tag, so only a mixed setup hits this.

Not in this PR: a labeled set of calls that should not run, and the app's approval cards.

Checks at 5960e1e, after merging main (the fork PR took schemas 36 and 37): cargo fmt --check, clippy --all-targets, all Rust tests (318), and the Python suite (380 tests, OK, 23 skipped). The Python tests use a stand-in judge server, so they spend nothing on Jev.

🤖 Generated with Claude Code

@gitguardian

gitguardian Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T19:11:44.526614Z 5960e1e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lydakis
lydakis force-pushed the claude/project-thread-3o0ntp branch from 6d3c31f to c324bc2 Compare September 27, 2026 16:21
…ated call

`agent approver` serves a gate tag (default `auto`) and asks a judge about
every round waiting on it: Jev over its API when picked and keyed, or any
model the daemon serves, run as a hidden no-tool bot through the daemon.
`--approval auto` gates a new bot's tools under the `auto` tag and starts
the approver when no session serves it.

The daemon records who wrote each prompt (`submit` takes `from`, tools get
`AGENT_TURN`, schema 36), reads a turn's prompts and calls for the judge
(`prompts`), marks failed calls on `tool_completed`, and keeps
`TYPESAFE_API_KEY` out of tool environments. `bench.approval_judges`
replays labeled rounds through the daemon and approver per judge, with
no labeled call ever run.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CQhx9X5f5c9cNiajDFZpck

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d3c31f1c8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/client.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/store/db.rs Resolved
Comment thread client/src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/client.rs Resolved
@lydakis
lydakis force-pushed the claude/project-thread-3o0ntp branch from c324bc2 to 2721659 Compare September 27, 2026 16:25
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2721659633

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/client.rs Resolved
- A bot named approver.TAG that is not a judge is refused
  (approver_name_taken), not deleted; the sweep removes only the
  base's own tool-less forks.
- The judge's turn is queued when every active slot is taken, so it
  starts within the round's deadline instead of failing.
- run on an existing bot and fork start the approver whenever an auto
  gate answers the bot, and fork does so before the fork is committed.
- The CLI waits for the approver's own serving line, printed once the
  judge is ready, rather than for the lease alone.
- Dedupe keeps only each bot's latest turn; delegations are walked in
  the order they were written; rounds are grouped in linear time.
- Paths are redacted; a write or edit planned earlier in the same round
  is named in a later call's files; a written file is read only if
  regular, without blocking, and no further than 48 KiB.
- prompts counts 64 bytes per call and earlier prompt and reports
  calls_more; a cut call list asks no consent question.
- A round takes its judge slot before reading anything; a Jev answer
  past 64 KiB fails; an earlier request's answer keeps a newer backoff.

Follow-ups, in APPROVALS: a fork's inherited turns in earlier prompts,
and rotation for the CLI-started approver's log.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CQhx9X5f5c9cNiajDFZpck
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

aed1669 against 74f726b, interleaved: Jev adds 2.2 against 2.3 ms and a
general model 8.8 against 9.7 ms over the direct client, same commits.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CQhx9X5f5c9cNiajDFZpck
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 81458d214c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/client.rs Resolved
Comment thread src/store/db.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread client/src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
- prompts counts 64 bytes per steer too and reports prompts_more; a
  turn whose steers do not all fit is judged too long, since the
  person's latest word may be missing.
- A malformed Retry-After falls back to the local backoff, and a valid
  one is capped at 60 s.
- A written file is read on the blocking pool, off the runtime thread
  that renews the lease.
- A file is named only by its path or file name as a whole word in the
  call's strings, so ./configure does not send a file named config.
- A model judge's tag is at most 87 bytes, so its forks' names fit.
- Cut calls' arguments are read whole only up to the text limit; past
  it only writes and edits are read, for their paths, and the allowed
  list is marked cut.

Follow-ups, in APPROVALS: readiness of an approver already serving,
one-time consent across calls of a round, questions in the request
limit, and stdout backpressure.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CQhx9X5f5c9cNiajDFZpck
George's Mac, 81458d2, two passes of opposite order over 341 benign
calls: gpt-6-luna at low reasoning allowed 303 and 309, Jev 275 and
276; Jev answered in about 165 ms p50 against about 2.9 s. The set has
no calls that should not run, so false allows stay unmeasured.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CQhx9X5f5c9cNiajDFZpck
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 73e2b5437c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/client.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/store/db.rs Resolved
Comment thread src/approver.rs Resolved
- A delegating turn whose steers do not all fit is judged too long,
  as the judged turn already is.
- Only a bot with exactly the judge's instructions and no tools is
  taken for an old judge and replaced.
- Planned calls' arguments are read whole only up to the text limit;
  past it the round is too long to judge anyway.
- A write or edit that failed shows no file.
- Jev is typesafe/jev-*, so a daemon provider named typesafe still
  runs through the daemon.
- A Retry-After shorter than the local backoff waits the backoff.

Follow-up, in APPROVALS: reading completions in prompts only for the
calls that fit.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CQhx9X5f5c9cNiajDFZpck
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8dfe59380e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread client/src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
- A delegation chain deeper than 8, or more than 64 delegating turns
  for one round, is judged too long rather than read in part.
- A judge probability outside 0 to 1 is a failed check, for Jev as
  for a general model.

Follow-up, in APPROVALS: forgetting a bot's judged requests once its
turn ends.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CQhx9X5f5c9cNiajDFZpck
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d8496b71a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/client.rs Resolved
Comment thread src/client.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/client.rs Resolved
Comment thread src/approver.rs Resolved
Comment thread src/client.rs Resolved
Comment thread src/approver.rs Resolved
The fork PR took schemas 36 and 37, so prompt authors move to 38.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CQhx9X5f5c9cNiajDFZpck
A cut call no gate covers has no planning node: a write or edit is now
matched by the path its preview holds, and judged too long without one;
any other such call keeps its preview with consent not counted. The
delegating turns share one 128 KiB budget with the turn's prompts. The
judge's stale forks are found by name prefix, not by listing every bot.
The note is a bounded regular file, Jev is typesafe/jev-* exactly, and
a provider that names TYPESAFE_API_KEY keeps it in the daemon.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CQhx9X5f5c9cNiajDFZpck
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@lydakis
lydakis merged commit 512f7ae into main Sep 27, 2026
1 check passed
@lydakis
lydakis deleted the claude/project-thread-3o0ntp branch September 27, 2026 19:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Built on 2026-09-27, for the automatic approver:

P2 Badge Mark the automatic approver as built in the status header

This newly added section records the automatic approver as built, but the document's opening status still says that it is not built and directs readers to this section, even though agent approver and --approval auto are implemented by this change. Update the status header so the design record does not give the opposite availability state from the current code and its own implementation section.

AGENTS.md reference: AGENTS.md:L31-L31

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/approver.rs
Comment on lines +290 to +292
if bot["created_by"] == base.as_str()
&& bot["tools"].as_array().is_some_and(Vec::is_empty)
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify stale judge forks by identity before deleting

When a former user bot named approver.<tag> left a tool-less child under this prefix and that base name is later reused by the judge, this test matches only the textual created_by name and empty tools. On the next approver restart it therefore deletes the old child even though its created_by_id refers to the former bot identity and its instructions may not be the judge's; require the current base identity and an unambiguous judge signature before deletion.

AGENTS.md reference: AGENTS.md:L32-L32

Useful? React with 👍 / 👎.

Comment thread src/store/db.rs
Comment on lines +7247 to +7250
// before, so every stored prompt reads as a person's.
conn.execute_batch(
"ALTER TABLE turns ADD COLUMN from_bot TEXT;
ALTER TABLE turns ADD COLUMN from_turn INTEGER;",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Do not grant human authorship during migration

When a schema-37 store contains a prompt submitted by another bot—for example, queued delegated work that survives until the upgraded daemon runs—adding nullable columns leaves that prompt indistinguishable from a human prompt, and prompt_entry consequently omits from so the approver treats it as consent-bearing person text. A later delegated risky call can therefore be allowed based on words written by a model; migrate legacy authors as unknown/untrusted (or reject data whose author cannot be converted) rather than silently assigning human authority.

AGENTS.md reference: AGENTS.md:L27-L30

Useful? React with 👍 / 👎.

Comment thread docs/APPROVALS.md
Comment on lines +417 to 419
back. A gated call with no approver waits, parked and visible in
`approvals`, rather than running or failing silently, until its gate's
15 s expiry denies it and ends the turn. So if the approver dies and

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the documented auto expiry to 45 seconds

This section still says an unattended auto gate expires after 15 seconds, but AUTO_EXPIRE_MS now creates these gates with a 45-second expiry to accommodate the general model's 30-second deadline, and the same document describes 45 seconds elsewhere. Controllers using this operational documentation will wait for or declare failure at the wrong time, so update this remaining value with the implementation.

AGENTS.md reference: AGENTS.md:L31-L31

Useful? React with 👍 / 👎.

Comment thread bench/approval_judges.py
Comment on lines +186 to +190
if reason.startswith('not reviewed'):
counts['not_reviewed'] += 1
risky += reason.startswith('judged risky')
unclear += reason.startswith('judged unclear')
if got == expected:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep failed checks out of label accuracy counts

When a judge returns not reviewed because it timed out, overloaded, or failed, this increments not_reviewed but then continues into the label comparison: an expected denial is also counted as right, while an expected allow is also counted as false_deny. The reported outcome categories therefore overlap and can make a failing judge appear accurate or inflate its false-denial rate; stop classification after recording not_reviewed so the comparison preserves distinct measurement outcomes.

AGENTS.md reference: AGENTS.md:L44-L48

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants