Skip to content

ADFA-7302 | AI-Agent-MCP: read_sql_template, .read with a Pebble SQL template - #184

Open
davidschachterADFA wants to merge 16 commits into
sqlite-debugger/ADFA-7300from
sqlite-debugger/ADFA-7302
Open

davidschachterADFA wants to merge 16 commits into
sqlite-debugger/ADFA-7300from
sqlite-debugger/ADFA-7302

Conversation

@davidschachterADFA

@davidschachterADFA davidschachterADFA commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

ADFA-7302

Phase 2, P2-7 of the SQLite debugger (ADFA-7131), client side: AI-Agent-MCP reads a project's Pebble SQL templates through Code on the Go. Stacked on #178 (P2-5). The Code on the Go side is CodeOnTheGo #2329 (stacked on #2323), which adds get_template_variables and the plugin API SqlTemplateService.

What it adds (plugins/AI-Agent-MCP, 2.2.0, versionCode 5)

  • read_sql_template, the plugin's own tool, appears on each debugger entry whose server lists get_template_variables.
    • It fetches the variables and adds:
      • room_schemas;
      • per database, schema_matches and room_schema. schema_matches is true, false, or null when no schema of that version is exported.
      • db: the named database, or the only one.
    • It renders through SqlTemplateService and returns the SQL without running it. The model runs it one statement at a time with query or execute, binding user values as args.
    • Without template, it lists the project's *.sql.peb files.
  • The template functions are tool calls to the same app, on the call's session and handle: row_count (count(*)), distinct_values, sample_rows, integrity, suggest_indexes and lint_foreign_keys. A function runs only when the template calls it. distinct_values asks for one row more than its limit (at most 999) and fails when the column has more distinct values than that. sample_rows returns at most its limit (at most 1000). Both fail on a value the server cut. A function's call that throws fails the read with that exception, as the variables call does, so it is retried on the app's new address and worded the same way.
  • The help page (assets/docs/index.html) has an example template. It was rendered with the real renderer before the review fixes; its new database_errors line hasn't been rendered on a device yet.
  • When the app couldn't read a database, the returned SQL starts with a -- not read: <name>: <reason> line for it, and with -- truncated: ... when a list stopped at the server's 20,000 rows. A named database that wasn't read, or a read where no database was read, fails with the server's reasons.

Decisions (David; ADFA-7302's description):

Commits

  • 62d2d28, from the cloud session.

  • 0ac5690 merges ADFA-7300: AI-Agent-MCP switch to let the Agent change app databases #178 at 3ef6bac, its 2026-11-26 review fixes, with no conflicts.

  • For the 2026-11-27 review (ADFA-7131 comment 41657; David approved fixing all four):

    • 149be65: distinct_values and sample_rows send max_rows = their limit, and fail on has_more or truncated_cells (before, the server returned its default 100 rows and the plugin ignored has_more).
    • 13b149b: a template function's failed call reaches the caller as its own exception, so EndpointRetry and McpErrorFormatter handle it, instead of a flattened message.
    • 330a97f: version 2.2.0.
    • d846124 (a follow-up from the re-check, 41663): the tool description, the help page and the README say that sample_rows reads every column, so one value the server cuts (text over 4,096 bytes, a BLOB over 1,024) in any column fails the template.
    • 6767a16: five core tools, not four, in the test name, the KDoc's budget reasoning, McpServer's KDoc, the plugin description, the help page, the gallery page, addon.json and the README.
  • For the 2026-11-28 independent review (13 findings, 3 IMPORTANT; David approved fixing them, and documenting three), each re-checked:

    • ba9ece9: the unread-database and truncated lines above; distinct_values fails past its limit; Code on the Go's own errors (listing, schemas, render, a plugin disabled mid-call) come back as failed results that don't mark the app degraded; listing templates no longer marks the app available; a Code on the Go without SqlTemplateService gets the "templates unavailable" text; distinct_values takes a column map; a limit must be a whole number in range.
    • a8037e1: the help page, gallery page, README and manifest comment no longer say the plugin can't read the project. They say Code on the Go lists and renders the *.sql.peb templates and reads the Room schemas for read_sql_template, under debugger.endpoints, and the plugin has no filesystem or shell access of its own. Also documented: database_errors, truncated, that schema_matches matches by version only (the server gives no class name), and the lossy JSON values (integers past 2^53 as strings, BLOBs as maps). Stale tool counts are fixed (the server has 13 read-only tools).
    • 039e6b7: the help example counts unread databases instead of printing raw errors; a read where no database was read fails.
    • 6c58c17: help page wording.
  • From the cloud session's check of these commits (ADFA-7131 comments 41718 and 41719):

    • 468ce45: the gallery and help pages' privacy text. Project content reaches a server only with a call you approve, and that includes a read_sql_template call, whose template functions then send text from the template (a table name, or the SQL suggest_indexes analyses) to the app's SQLite debugger on the device without asking again.
    • 2aee424: the tool description starts with what the model needs, within the 200 characters AI Core shows of it (a test holds those words there); the "was not read" error is one line; distinct_values reports "more than the limit" before a cut value in its extra row; and a template that reads db on an app with two or more databases, with no database given, gets an error naming the databases and saying to call again with one (David's decision, 41719). A template that doesn't read db renders as before, and no default is picked.
  • 2026-11-30, at David's request: aa2b62c merges ADFA-7300: AI-Agent-MCP switch to let the Agent change app databases #178 at c5caa68 (main and 26.49, from ADFA-7139: AI-Agent-MCP connects to the SQLite debugger automatically #166), with no conflicts; this PR's own diff is unchanged (same patch-id). e6811a8: the README's requirement line above.

  • 1c44692 (2026-12-01, after the Note 20 run p31): read_sql_template's database argument says it is optional (omit it for the app's only database; a database file path from list_databases only when the app has several; not the app or its package), the description's first 200 characters, which are all AI Core shows the model, say so too, and every successful result starts with -- database: <path> (the app's only database) or (given). In p31 the model called again with the app's package or notes.db after every successful render, because nothing said database was optional or which database had been read (ADFA-7302 41812). With several databases and none given, no database is selected and no such line is written.

Tests

  • At 1c44692, against a plugin-api.jar built from #2329 bc03f42e6 (its API unchanged since d2d7d0216): testDebugUnitTest (399 tests, 2 new and one extended), assemblePlugin and addons check pass. With only SqlTemplateRead.kt reverted, 7 tests fail: the two new ones, the extended first-200-characters test and four exact-output tests.
  • At e6811a8, against a plugin-api.jar built from #2329 (its API matches d2d7d0216; later changes are Javadoc only): testDebugUnitTest (397 tests), assemblePlugin and addons check pass; the .cgp records 26.49 to 26.99.
  • At 2aee424, against a plugin-api.jar built from #2329 c1df2304e: testDebugUnitTest (397 tests), assemblePlugin and addons check pass. With 2aee424's change to SqlTemplateRead.kt reverted, its four new tests fail. 468ce45 is page text only; addons check passes.
  • At 039e6b7, against a plugin-api.jar built from #2329 c1df2304e: testDebugUnitTest (392 tests, 16 new, including ReadSqlTemplateDispatchTest for McpToolSource), assemblePlugin and addons check pass. With the fixes reverted, 11 of the 25 SqlTemplateRead and dispatch tests fail, and 039e6b7's test fails on its own. 6c58c17 is help text only; addons check passes.
  • At d846124, against a plugin-api.jar built from #2329 c1df2304e: testDebugUnitTest (376 tests), assemblePlugin and addons check pass.
  • At 6767a16 (the tree tested before it was committed as four commits), against a plugin-api.jar built from #2329's head 0ff47e417, copied into libs/ for the build only: testDebugUnitTest (376 tests), assemblePlugin and addons check pass. Revert proofs: before the fixes, the new tests find max_rows absent, a cut result rendered, and a failed result where the ConnectException was expected.
  • At 0ac5690, against a plugin-api.jar built from #2329's head 5ad33e91c, copied into libs/ for the build only: testDebugUnitTest (373 tests), assemblePlugin and addons check pass.
  • Local at 62d2d28, against a plugin-api.jar built from #2329's head 0edd649c3 and copied into libs/ for the build only (not committed): testDebugUnitTest (372 tests), assemblePlugin and addons check pass. Against the committed libs/, compileDebugKotlin fails on the missing SqlTemplateService types, as expected.
  • From the cloud session: 7 SqlTemplateReadTest tests and addons check.

Device check, after the review fixes (2026-12-01, p31; ADFA-7302 41812): with C-d-1130-0617 (#2262 bee421cc8 + #2329 d2d7d0216), this PR at e6811a8 and AI Core from #188, on Claude haiku: the example rendered -- notes.db: Room schema matches with the expected lines, and Room schema differs or is not exported with the identity hash changed; each time the model then called again with a wrong database (fixed by 1c44692, not yet rechecked on a device).

Device check (ADFA-7302's description), before the 2026-11-28 review fixes: on the Galaxy Note 20, with Code on the Go built from #2262 and #2329, AI-Agent-MCP 2.2.0 and AI Core 3.7.2 from addons #188 (ADFA-7340), in a Room app with exportSchema on:

  • The help page's example renders to -- notes.db: Room schema matches, one row count per table, and the orders line with :id.
  • schema_matches both ways: with the project's schema identity hash changed, the example renders Room schema differs or is not exported, and a template reading schema_matches shows true on the unchanged project.
  • sample_rows rendered once. The model then called again with the app's package name as database, which failed, and AI Core's stock failure message hid its answer (ADFA-7318).

Not done here:

  • A device render of the help page's changed example, and a device run of the review fixes.
  • libs/ is not refreshed in this PR. PR CI builds against the committed libs/, which lack SqlTemplateService, so this PR's CI fails to compile until #2329 is on CodeOnTheGo stage and Update libs from CodeOnTheGo has run. Publishing also needs the API in a plugin-api-latest release (plugins/README.md).

Merging: after #178, and after a Code on the Go release with #2329 and the libs/ refresh.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn

claude and others added 2 commits November 26, 2026 20:30
A tool of this plugin's own on each SQLite debugger entry whose server
has get_template_variables. It:
- fetches the variables from the app;
- adds the project's Room schemas and, per database, schema_matches and
  room_schema;
- has Code on the Go render the template (SqlTemplateService);
- returns the SQL, unrun.

The template functions are tool calls to the same app, made only when
called, on the call's session and handle: row_count (count(*)),
distinct_values, sample_rows, integrity, suggest_indexes and
lint_foreign_keys. Without a template it lists the project's
*.sql.peb files.

It starts switched on, last of the entry's five default tools, so in
compact mode it is the one AI-Core drops. The help page has an example
template, checked by rendering it with the host's renderer.

Version 3.0.0 (MAJOR): it needs the plugin API of Code on the Go 26.48,
whose libs/plugin-api.jar must be refreshed from CodeOnTheGo
sqlite-debugger/ADFA-7302 before this builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAZ8yszEP4MqbR9PLba
…gger/ADFA-7302

Brings in the #178 review fixes (the writes switch save, the hint KDoc).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn

@davidschachterADFA davidschachterADFA left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review of #184 at 0ac56909f5. Stacked on addons #178 (P2-5); host side is CodeOnTheGo #2329.

IMPORTANT

  • plugins/AI-Agent-MCP/src/main/kotlin/com/itsaky/androidide/plugins/aiagentmcp/debugger/SqlTemplateRead.kt:178 - sample_rows/distinct_values accept limits up to 1000 but the query call sends no max_rows, so the server returns 100 rows

MINOR

  • plugins/AI-Agent-MCP/build.gradle.kts:19 - versionName 3.0.0 is a MAJOR bump for a backwards-compatible feature
  • plugins/AI-Agent-MCP/src/main/kotlin/com/itsaky/androidide/plugins/aiagentmcp/debugger/SqlTemplateRead.kt:204 - a function's tool failure is flattened to a message by the host, so the endpoint retry and the app-not-answering message are bypassed

NITPICK - 1 inline, not listed

Verdict: COMMENT. This PR is authored by the account posting the review, and GitHub refuses APPROVE and REQUEST_CHANGES on your own PR. Severity rules: CodeOnTheGo REVIEW.md and CLAUDE.md (a ticket moves to QA with no outstanding critical, high or medium findings); addons has no written rule, so the default applied.


Generated by Claude Code

davidschachterADFA and others added 4 commits November 26, 2026 23:43
…le limit

Both accept a limit up to 1000, but their query call sent no max_rows, so
the server returned its default of 100 rows and set has_more, which they
ignored: sample_rows(db, "t", 500) handed the template 100 rows with no
error, and a value the server cut (truncated_cells) was spliced as if
whole (review of #184, ADFA-7131 comment 41657).

They now send max_rows equal to the limit, and fail, with the reason, when
has_more or truncated_cells is set. row_count and the tools that return
their whole result are unchanged. Before the fix the new tests find
max_rows absent ([null, null, null]) and a cut result rendered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
… caller

When a function's tool call threw (the app relaunched or went to the
background after the variables were fetched: ConnectException, a 401, a
timeout, or a cancel), the host passed on only its message as a
SqlTemplateException, so the read failed with "row_count(...) failed: Read
timed out" instead of being retried on the app's new address by
EndpointRetry and worded by McpErrorFormatter, as the variables call's own
failure is (review of #184, ADFA-7131 comment 41657).

The first exception a function's call throws is now kept and rethrown from
run() when the render fails. A failed result, the server answering with an
error, still fails the read with the server's message. Before the fix the
new test gets a failed result where it expects the ConnectException.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
read_sql_template is a backwards-compatible feature and min_ide_version
stays at 26.48, so this is a MINOR bump from 2.1.0 (CLAUDE.md); versionCode
5 is unchanged (review of #184, ADFA-7131 comment 41657; David).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
read_sql_template made CORE_TOOLS five, but the test was still named for
four (review of #184, ADFA-7131 comment 41657), and so were the CORE_TOOLS
KDoc's budget reasoning, McpServer's KDoc, the plugin description, the
help page, the gallery page, addon.json and the README. They now say five
(two apps use 10 of AI-Core's 12 tools). AutomaticServersTest's "four core
tools" is left: its server has no get_template_variables, so four is right
there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
… any column

sample_rows is SELECT *, and since 149be65 it fails rather than hand the
template a value the server cut (text over 4096 bytes, a BLOB over 1024),
so one long value in any column fails the whole template. The tool
description, the help page and the README now say so (follow-up from the
re-check, ADFA-7131 comment 41663; David).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
@davidschachterADFA

Copy link
Copy Markdown
Contributor Author

@hal-eisen-adfa A new commit since you were asked to review: d846124, docs only, a follow-up from the cloud agent's re-check (ADFA-7131 comment 41663). The tool description, the help page and the README now say that sample_rows reads every column. One value the server cuts (text over 4,096 bytes, a BLOB over 1,024) in any column fails the template.

@davidschachterADFA
davidschachterADFA marked this pull request as ready for review November 28, 2026 02:12
@davidschachterADFA

Copy link
Copy Markdown
Contributor Author

@hal-eisen-adfa This PR is ready for review now (David, 2026-11-28). ADFA-7302's device check passed on the Note 20 (ADFA-7302 comment 41698), and the description now records it. The Code on the Go side, CodeOnTheGo #2329, is ready too. Head: d846124. Its CI still fails to compile until #2329 is on stage and libs are updated, as the description says.

davidschachterADFA and others added 4 commits November 29, 2026 19:29
…rs, check limits

The review of #184 found several ways a read could look complete or blame the wrong party.
- A database that failed or was skipped at the time limit was missing from databases with no sign: the returned SQL now starts with one "-- not read: <database>: <reason>" line per such database, and a "-- truncated" line when the server cut a list. database_errors and truncated are variables. A call that names a database which was not read fails with the server's reason.
- distinct_values asks for one row more than its limit and fails when it comes back (its limit stops at 999), instead of silently returning the first rows. column may be a column map.
- A limit that is not a whole number fails; an absent or null one is the default.
- A failure of Code on the Go's own service (permission, cancellation, state) is a failed result, not an exception that marks the debugger degraded. A listing, a missing SqlTemplateService (also NoClassDefFoundError) and such a failure no longer record the app as available or degraded.
- A failed function's message reaches the caller whatever wording the host gives it.
- Tests for each, and for the database argument, a failed or non-JSON variables call, argument errors, an IllegalArgumentException render, and McpToolSource dispatch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
…as, and what read_sql_template returns

The README, both help pages and the manifest comment said the plugin cannot read the project. read_sql_template reads the project's *.sql.peb templates and Room schemas through Code on the Go's SqlTemplateService, under debugger.endpoints; they now say so, and that the plugin has no filesystem or shell access of its own.
They also document database_errors and truncated and the comment lines, that sample_rows returns at most its limit while distinct_values fails past its limit, that schema_matches ignores the Room class, and that values are the server's JSON (large integers as strings, BLOBs as maps). The help example checks database_errors. The stale tool counts (the server's 13 read-only tools; six tools per app with writes on) are fixed in the README and ReadOnlyTrust.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
… read where no database was read fails

The help example printed each database_errors entry's raw error into a comment, so a multi-line error left its later lines as live SQL, and it repeated the "-- not read" lines the plugin already adds. It now only counts them, and the help text says the plugin adds those lines.
With no database named and none read, db did not exist and a template failed on Pebble's strict-variables error without the reason. The read now fails with the server's reasons, one line each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
039e6b7 left a colon that no longer introduced what followed it. The
paragraph now says the SQL starts with the -- not read and -- truncated
lines first, then that a template should not print an error itself.
Text only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
@davidschachterADFA

Copy link
Copy Markdown
Contributor Author

@hal-eisen-adfa Four new commits since you were asked to review (David, 2026-11-28), answering an independent review of this PR: ba9ece9, a8037e1, 039e6b7 and 6c58c17. The description's Commits section lists what each does. In short:

  • The help page, gallery page, README and manifest comment no longer say the plugin can't read the project.
  • An unread database or a cut list now shows as a -- not read / -- truncated line in the SQL, and a named database that wasn't read fails the read.
  • distinct_values fails past its limit instead of stopping silently.
  • Code on the Go's own errors no longer mark the app degraded.

392 tests, assemblePlugin and addons check pass locally against #2329's plugin API. The help example's new line still needs a device render.

davidschachterADFA and others added 2 commits November 29, 2026 20:23
The gallery and help pages said project content reaches a server only
in a tool argument the model writes and you approve. read_sql_template's
template functions also send text from the template, such as a table
name or the SQL suggest_indexes analyses, to the app's SQLite debugger
on the device, under the one approval of read_sql_template. Both pages
now say so. Found by the cloud session's check of 2026-11-29 (ADFA-7131
comment 41718). Text only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
…eds, one-line errors, a helpful error when db is not set

AI Core keeps only the first 200 characters of a tool description, and the
description began with background. It now begins with what the tool does,
that nothing is run, how to run the SQL, and that -- not read and -- truncated
mean incomplete; a test holds those words in the first 200 characters.

The "was not read" error put the server's multi-line reason in as it was; it
is now one line like the other errors.

distinct_values reported a value the server cut when the extra row held one,
though the real reason is more distinct values than the limit. The limit is
now reported first.

A template that reads db on an app with two or more databases and no database
argument failed with Pebble's "Root attribute [db] does not exist". It now
says db is set only when database is given or the app has one database, lists
the databases, and asks to call again with database set. Templates that never
read db, and other unknown variables, behave as before. README and help say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
@davidschachterADFA

Copy link
Copy Markdown
Contributor Author

@hal-eisen-adfa Two more commits since my last note, from a check by David's cloud session (ADFA-7131 comments 41718 and 41719): 468ce45 and 2aee424.

  • The privacy text on the gallery and help pages now says that template functions send text from the template to the app's SQLite debugger, on the device, under the one read_sql_template approval.
  • The tool description starts with what the model needs, within the 200 characters AI Core shows.
  • The "was not read" error is one line, and distinct_values reports "more than the limit" first.
  • A template that reads db with two or more databases and no database given gets an error naming them (David's decision).

397 tests, assemblePlugin and addons check pass locally.

davidschachterADFA and others added 2 commits November 30, 2026 08:10
…d Code on the Go 26.49

#178 merged #166 at 265fd64, which merged main at 7c7e333 (main's
plugin-api.jar, which has the SQLite debugger API from stage) and raised
plugin.min_ide_version from 26.48 to 26.49, because 26.48 was released
before CodeOnTheGo#2261 merged. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
…th SqlTemplateService

The README said read_sql_template needs Code on the Go 26.48 or later. It
needs the first release with SqlTemplateService (CodeOnTheGo#2329, not
merged yet). On an older Code on the Go, down to the plugin's minimum
(now 26.49), the tool is listed and each call answers that this version
cannot render SQL templates (mcp_error_templates_unavailable).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
@davidschachterADFA

Copy link
Copy Markdown
Contributor Author

@hal-eisen-adfa two commits:

At e6811a8, against a plugin-api.jar built from #2329: 397 unit tests, assemblePlugin and the addons check pass; the .cgp records 26.49 to 26.99.

…nd which database it read

On a phone, Claude Haiku rendered a template successfully with no
database, then called again with database set to the app's package or
notes.db, which failed with "Unknown database", and then asked for
list_databases. Nothing told the model that database is optional or
which database the first call had read.

F28: the database parameter's description now says it is optional: omit
it to use the app's only database, give a list_databases path only when
the app has more than one, and it is a database file path, not the app or
package. It stays out of required.

F29: AI Core shows only the first 200 characters of a tool description,
and the default sat after them. The start of the description now says
database is optional and defaults to the app's only one, keeping what
the test of those 200 characters already required (it now requires
"database" and "optional" too). The rest of the guidance is kept,
including that an incomplete result must not be trusted.

F30: every successful result starts with "-- database: <path> (the app's
only database)" when no database was given, or "-- database: <path>
(given)" when one was, ahead of the -- not read and -- truncated lines.
With two or more databases and none given no database is selected, so
there is no such line.

Tests: the exact-output tests carry the new line; new tests cover the
schema text and both forms of the line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
@davidschachterADFA

Copy link
Copy Markdown
Contributor Author

Hal, one new commit on #184 (e6811a8..1c44692), from the Note 20 run of 2026-12-01: after every successful read_sql_template, the model called it again with the app's package or notes.db as database, which failed. Nothing told it that database is optional, or which database the render had used.

  • The database argument now says it is optional (omit it for the app's only database; a file path from list_databases only when the app has several; not the app or its package). The description's first 200 characters, which are all AI Core shows the model, say so too.
  • Every successful result starts with -- database: <path> (the app's only database) or (given).
  • 399 tests (2 new, 1 extended), assemblePlugin, addons check; with only the production file reverted, 7 tests fail.

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