Repository navigation
fix: agent guidance truth and implementation-derived consistency checks - #606
Merged
Merged
Conversation
Refs #539 #540 #585 #558 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tradictions Add scripts/check-agent-facts.ts (wired into check:docs) that derives an inventory from implementation sources -- extension bundle set, auth/admin kit adoption, --with canonical ordering, MCP tool counts and the store shortLinks contract -- and fails on agent-visible prose contradicting it. Fix the forms, ui, --with ordering and MCP count contradictions it found. Refs #541 Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # llms-full.txt
# Conflicts: # llms-full.txt
# Conflicts: # llms-full.txt
….ts's self-import check-agent-facts.ts (new in this PR) imports packages/core/src/mcp.ts, which imports its own public export '@jimhoyd/urlcode/agent-context' to prove that export is sufficient. That resolves to dist/agent-context.js, which the docs CI job (changed by #596 to skip building) never produces. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # docs/RECIPES.md # llms-full.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent guidance truth and consistency checks (PR 8).
What changed
#539 — generated AGENTS.md trust section.
packages/core/src/agents-guide.tsnow separates the injected context (only declaredargs/env/secrets) from trusted Node's ambient authority (process.env, filesystem, network, installed modules), and says outright that this is not confinement.starters/default/AGENTS.mdis regenerated and still under 80 lines.test/cli.test.tsasserts both halves and rejects the old wording.#540 — stored short links. The authoring and operations skills (and the plugin copies),
docs/AI-AUTHORING.md,docs/EXTENSIONS.md, plusROUTING.md,SPECIFICATION.md,BEST-PRACTICES.mdandpackages/admin/docs/SPIKE-ADMIN.mdnow send readers toextensions.store.config.shortLinksand state its constraints: a bounded unique key, a requiredformat: http-urldestination, one counter, and a public GET/HEAD redirect mount. A gap is reported only for needs beyond that.#585 — wildcard rule.
get_contextpathShape/wildcardMounts, thestaticandredirectcapability constraints, the schema descriptions forstatic/redirect, the authoring skill and AI-AUTHORING all give the same rule:/**/*/*#558 — trust-model prose. Rewrote MIDDLEWARE-EXAMPLES, LOCAL-DEVELOPMENT (the starter has no routes now; there is no "sandboxed"
/hello), READINESS:224, RECIPES:26/28, TYPESCRIPT:7, and the guest-API sentences in MIDDLEWARE.md, yaml/functions.md and ROUTING.md. All now describe trusted-by-default withsandbox: trueas the opt-in.scripts/check-trust-model-prose.tsgains anunscoped-guest-apirule. It flags "guest API" and "sandboxed function(s)" unless the sentence names the opt-in or the trusted mode, or sits under a sandbox/guest/QuickJS heading. It has regression fixtures. The rule covers prose only, so it does not flag the bare "guest" inrecipes/middleware/*.mjscomments. A TODO for #555 marks where to widen it.#541 — semantic consistency check. New
scripts/check-agent-facts.tsis wired intocheck:docs, and so intonpm run verifyand the CI docs job. It builds an inventory from implementation sources:prepare-extension-bundles.ts, cross-checked againstBUNDLE_CATALOG_NAMESauth-ui.ts/admin-ui.ts--withcanonicalization ininit-with.tsmcpToolInventoryexportshortLinksauthoring surfaceIt then fails on agent-visible prose that contradicts any of those facts. Exemptions need
<!-- agent-facts: exempt REASON -->with a non-empty reason.--inventoryprints the JSON. When run against the prose on main, it catches every contradiction listed in the issue and several more.Contradictions fixed:
packages/forms/llms.txt)llms.txtnow describes kit adoptionauth,admin,uiis not refused (COMPOSING-A-SITE)Regenerated:
llms-full.txtand the plugin skill copies. A changeset covers the ui and formsllms.txtpatches.Evidence
npm run typecheck,npm run lint,npm run check: passnpm test: 778 pass, 1 skipped, after updating the documentation-check count intest/ci-release.test.tsfrom 8 to 9npm run verify:workspaces: passnpm run test:package: passtest/agent-facts.test.ts: inventory matches the implementation, the prose check passes, and context, capability and schema all state the wildcard ruleLimitations
--withordering fact is read from the source text ofinit-with.ts. It fails loudly if that shape changes.Closes #539
Closes #540
Closes #541
Closes #585
Closes #558
🤖 Generated with Claude Code