Repository navigation
Add urlcode report: a read-only review page for a project or a change - #749
Merged
Merged
Conversation
…a change `urlcode report [BEFORE] [--policy F] [--host-file F] [--json]` prints one self-contained HTML page for the person reviewing a change: what needs attention, what changed since BEFORE and, per route, what happens to a request. It is a view over existing contracts, not a new analysis: routes are exactly explainProject's output, findings are reviewProject's and changes are summarizeChange's, so the page follows those contracts as they grow and handler details render generically. The only derived data is the attention list: add-ons the host file does not register or registers for another revision, invalid add-on requirements, disabled/expired routes, review findings, new code, sandbox flips, newly requested grants and removed routes, plus a by-name comparison of an operator policy with requestedPermissions (stale pin, ungranted env/secret/egress). No value reaches the page that those outputs omit and no project code runs. Project text is escaped and the page carries a CSP allowing no script, so it is safe to publish as a PR artifact. Output is deterministic. Docs: TOOLING.md review-report section, the AI-AUTHORING hand-back step, llms.txt and the generated starter guidance. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
enabled auto-merge (squash)
September 25, 2026 13:25
This was referenced Sep 25, 2026
jimhoyd
added a commit
that referenced
this pull request
Sep 25, 2026
Studio (#751) and the report (#749) were documented only in TOOLING.md, llms.txt and the CLI help. Add a row to the docs index, a sentence in the README's "Try it", and name studio next to report in the AI-authoring hand-back step. llms-full.txt regenerated. Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Problem and change
Reviewing an agent-made change meant reading
urlcode diff,reviewandexplainoutput separately, as YAML or JSON.urlcode report [BEFORE] [--policy F] [--host-file F] [--json] > report.htmlputs them on one self-contained page for a person:urlcode permissions); an add-on the host file does not register or registers for another revision; an add-on requirement that fails its policy schema. Check items: disabled or expired routes,reviewfindings, and withBEFORE: new function or middleware code,sandbox:flips, newly requested grants and removed routes.It is a view over existing contracts, not a new analysis: routes are exactly
explainProject's output (a test asserts this), findings arereviewProject's and changes aresummarizeChange's. Handler details render generically, so new handlers and fields appear without a change to the report. The only derived logic is the attention list (packages/core/src/project-report.ts).Docs: new review report section, the AI-AUTHORING hand-back step,
llms.txt, and one sentence in the generated starter guidance (edited throughagents-guide.ts, kept within its 80-line budget).Verification
npm run verify: pass, 0 failures.npm run test:package: pass (packed install and starter/cookbook checks).test/project-report.test.ts(8 tests): routes equalexplain's output; output is deterministic; project text is escaped and no<script>is emitted; a before/after change (new code, sandbox flip, requested secret, removed route, YAML-file side); missing and stale host registrations; policy with all grants, partial grants and a stale pin; grouped grant releases; the CLI with--jsonand--policy.node dist/cli.js: it listed the new trusted function, the removed route and the released grants, and with its local policy flagged a stale pin and one ungranted env name. That finding was checked: two core versions compute the same revision hash.Not run: a real
host.mjs(host checks are tested with synthetic registrations).Compatibility and security
New CLI command;
reportjoinshostFileCommandsandpolicyCommands. No YAML, schema or runtime change.Read-only: no project code runs, no binding value is read (a policy holds names only), and nothing is granted. It shows no value its sources omit.
The page escapes all project text and carries
Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline', so it is safe to publish as a PR artifact.Passing
--policyand--host-filewhose pins disagree stops with the same errordevgives (documented).Changes match the documented portable contract; docs/examples are updated where needed.
Relevant tests and package checks pass, or limitations are explained above.
No credentials, customer data or private project material are included.
Runtime/starter changes remain aligned where applicable.
🤖 Generated with Claude Code