Skip to content

[Bug]: generated AGENTS.md implies trusted route code is confined to declared bindings #539

Closed

Description

@jimhoyd

Runtime revision and environment

645239b2710fb98cdd5a5471262b0361d260edad; Node 26.8.2; macOS source checkout.

Minimal reproduction

Run urlcode init <directory> and read the generated AGENTS.md. Its trust section says a trusted, in-process function/middleware has "only declared args/env/secrets". The same text is produced by packages/core/src/agents-guide.ts.

Expected: agent guidance must distinguish the injected URLCode context (only declared/granted values) from the authority of trusted Node code, which can independently reach ambient process.env, filesystem, network, and installed modules.

Actual: the sentence reads as a confinement guarantee and conflicts with SECURITY.md, docs/FUNCTION-SECURITY.md, and docs/AI-AUTHORING.md.

Relevant output / evidence

  • packages/core/src/agents-guide.ts:88-91 generates the misleading sentence.
  • starters/default/AGENTS.md:49-52 is the committed emitted result.
  • Root SECURITY.md states that binding grants govern injected context, not trusted code ambient access.

Suggested fix: correct the generator, regenerate the starter guide, and add a regression assertion that the generated guide names both the injected-context limit and trusted Node ambient authority.

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