Skip to content

[Request]: provide a bounded documentation fallback when agent discovery lacks coverage #759

Closed

Description

@jimhoyd

Problem or use case

At core main a324cd8, generated instructions in packages/core/src/agents-guide.ts tell routine-task agents not to read or grep packaged docs and to prefer bounded tools. But packages/core/src/agent-context.ts searches only llms.txt, AI-AUTHORING.md, YAML-REFERENCE.md, TOOLING.md and FUNCTION-SECURITY.md. Dedicated extension guides are outside that corpus.

A local probe of searchDocs('requiredWhen') returned [] although forms implements that feature. Searching 'form-records' returned generic excerpts rather than its authoritative composition contract. These observations establish retrieval gaps, not a measured claim that agents always generate unnecessary code.

The prescribed workflow can therefore leave an agent unable to distinguish an unsupported capability from material its retrieval surface does not cover. That conflicts with checking existing declarative features before writing custom plumbing.

Proposed behavior and alternatives

Keep bounded context, but support an explicit bounded fallback to relevant authoritative pages and installed inert extension schemas/artifacts. Search results should expose their coverage/omissions and a focused next step; absence of results must not imply absence of capability. Update generated instructions to permit that fallback.

Do not automatically import project-selected host code, activate extensions, load secrets, or dump all documentation. Preserve operator-controlled host loading and distinguish release catalog availability from installed/registered capabilities.

Acceptance:

  • Exercise forms requiredWhen and form-records with the generated authoring workflow; reach the authoritative material without an unrestricted full-document dump.
  • Unknown terms produce an honest no-match response with coverage limits.
  • Test the generated instruction and retrieval contract together, including an extension absent from the fixed core corpus.
  • Record the effect on representative tasks before claiming authoring improvements.

This is a follow-up to shipped #344 and deferred #174. It is distinct from schema descriptions (#750), dropped host context (#755), and the hosted authoring kit (jimhoyd-com/urlcode-ai#85); link their implementations rather than duplicating them.

Activity

  1. jimhoyd commented on Sep 26, 2026

    @jimhoyd
    CollaboratorAuthor

    Independent 0.6.2 release re-review (2026-09-26), using the published package installed by URLCode AI and a fresh urlcode init <site> --with form-records installation, not only workspace symlinks:

    • searchDocs('requiredWhen',{project}) reaches the installed forms README's Conditionally required fields section and schema paths in forms/form-records.
    • searchDocs('form-records',{project}) returns that add-on's README first and its descriptor second.
    • An unknown synthetic term returns no matches with explicit coverage and the warning that absence is not evidence of unsupported capability.
    • The actual installed/pin-verified add-on coverage lists ui, forms, store and form-records. No host activation is used by search.
    • Published schema property descriptions are now 204/204, with a maintenance check enforcing their presence ([Request]: describe every field in urlcode.schema.json #750).

    Related previous findings also rechecked against the installed release: default MCP refuses run_tests and leaves a trusted-handler marker absent; --allow-authoring exposes execution with the corrected annotations and the marker appears only after execution (#590). Extension inspection now retains the supplied host (#755), and explain_error recommends route.parameters (#757).

    The local discovery fix is verified. The same search response still needs explicit adaptation when exposed remotely: recorded separately on jimhoyd-com/urlcode-ai#63. The context command-generation follow-up is #778; neither is a reason to reopen this completed local search issue. These are synthetic local checks, not production deployment or independent security evidence.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions