@jimhoyd/urlcode 0.4.1 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/.claude/skills/urlcode-authoring/SKILL.md +60 -7
  2. package/.claude/skills/urlcode-operations/SKILL.md +4 -0
  3. package/README.md +19 -15
  4. package/SECURITY.md +5 -3
  5. package/dist/BUILD-MANIFEST.json +31 -28
  6. package/dist/agent-context.js +82 -0
  7. package/dist/agents-guide.js +42 -42
  8. package/dist/authoring.js +12 -2
  9. package/dist/body-schema.js +159 -0
  10. package/dist/build-cloudflare.js +2 -0
  11. package/dist/capabilities.js +1 -1
  12. package/dist/cli.js +29 -12
  13. package/dist/config.js +74 -6
  14. package/dist/context.js +4 -6
  15. package/dist/errors.js +3 -1
  16. package/dist/examples.js +1 -1
  17. package/dist/extensions.js +138 -3
  18. package/dist/http-policy.js +19 -4
  19. package/dist/http-response.js +2 -2
  20. package/dist/init-with.js +71 -9
  21. package/dist/mcp.js +15 -2
  22. package/dist/pattern-guard.js +32 -0
  23. package/dist/policies/security.js +0 -0
  24. package/dist/policy.js +16 -0
  25. package/dist/project-tests.js +35 -11
  26. package/dist/readiness.js +188 -32
  27. package/dist/recipes.js +1 -1
  28. package/dist/router.js +17 -0
  29. package/dist/runtime.js +26 -3
  30. package/dist/scaffold.js +0 -0
  31. package/dist/server.js +26 -3
  32. package/dist/site.js +0 -0
  33. package/dist/tooling.js +3 -1
  34. package/dist/types/agent-context.d.ts +44 -0
  35. package/dist/types/authoring.d.ts +3 -1
  36. package/dist/types/body-schema.d.ts +58 -0
  37. package/dist/types/config.d.ts +10 -2
  38. package/dist/types/context.d.ts +1 -1
  39. package/dist/types/errors.d.ts +9 -1
  40. package/dist/types/examples.d.ts +1 -1
  41. package/dist/types/extensions.d.ts +105 -2
  42. package/dist/types/http-policy.d.ts +3 -0
  43. package/dist/types/init-with.d.ts +10 -1
  44. package/dist/types/pattern-guard.d.ts +10 -0
  45. package/dist/types/project-tests.d.ts +9 -0
  46. package/dist/types/readiness.d.ts +71 -0
  47. package/dist/types/recipes.d.ts +1 -1
  48. package/dist/types/runtime.d.ts +4 -0
  49. package/dist/types/server.d.ts +9 -1
  50. package/dist/types/tooling.d.ts +2 -0
  51. package/dist/types/types.d.ts +13 -0
  52. package/dist/types.js +10 -2
  53. package/dist/typescript-authoring.js +5 -3
  54. package/dist/verify-deployment.js +16 -10
  55. package/examples/body-validation/README.md +16 -0
  56. package/examples/body-validation/example.yaml +17 -0
  57. package/examples/body-validation/tests/requests.json +15 -0
  58. package/examples/body-validation/urlcode.yaml +34 -0
  59. package/examples/coverage-waiver/README.md +8 -0
  60. package/examples/coverage-waiver/example.yaml +16 -0
  61. package/examples/coverage-waiver/functions/notes.mjs +2 -0
  62. package/examples/coverage-waiver/tests/requests.json +3 -0
  63. package/examples/coverage-waiver/urlcode.yaml +10 -0
  64. package/examples/data-dir/README.md +39 -0
  65. package/examples/data-dir/data/welcome.txt +1 -0
  66. package/examples/data-dir/example.yaml +22 -0
  67. package/examples/data-dir/functions/note.mjs +18 -0
  68. package/examples/data-dir/tests/requests.json +6 -0
  69. package/examples/data-dir/urlcode.yaml +6 -0
  70. package/examples/lifecycle/README.md +15 -0
  71. package/examples/lifecycle/example.yaml +19 -0
  72. package/examples/lifecycle/functions/notes.mjs +29 -0
  73. package/examples/lifecycle/tests/requests.json +12 -0
  74. package/examples/lifecycle/urlcode.yaml +29 -0
  75. package/examples/not-found/README.md +10 -0
  76. package/examples/not-found/example.yaml +17 -0
  77. package/examples/not-found/public/404.html +3 -0
  78. package/examples/not-found/public/index.html +3 -0
  79. package/examples/not-found/tests/requests.json +7 -0
  80. package/examples/not-found/urlcode.yaml +7 -0
  81. package/examples/shared-blocks/README.md +11 -0
  82. package/examples/shared-blocks/example.yaml +17 -0
  83. package/examples/shared-blocks/tests/requests.json +7 -0
  84. package/examples/shared-blocks/urlcode.yaml +37 -0
  85. package/llms-full.txt +436 -149
  86. package/llms.txt +44 -6
  87. package/package.json +15 -22
  88. package/recipes/static-page/README.md +9 -0
  89. package/recipes/static-page/public/index.html +11 -0
  90. package/recipes/static-page/recipe.yaml +21 -0
  91. package/recipes/static-page/tests/requests.json +22 -0
  92. package/recipes/static-page/urlcode.yaml +7 -0
  93. package/recipes/static-plus-api/README.md +6 -0
  94. package/recipes/static-plus-api/urlcode.yaml +4 -0
  95. package/recipes/store-crud/README.md +53 -0
  96. package/recipes/store-crud/recipe.yaml +31 -0
  97. package/recipes/store-crud/tests/requests.json +18 -0
  98. package/recipes/store-crud/urlcode.yaml +18 -0
  99. package/schemas/urlcode.schema.json +125 -60
  100. package/skills/urlcode/SKILL.md +53 -26
  101. package/starters/default/AGENTS.md +43 -43
  102. package/starters/page/README.md +14 -0
  103. package/starters/page/public/index.html +12 -0
  104. package/starters/page/tests/requests.json +17 -0
  105. package/starters/page/urlcode.yaml +6 -0
  106. package/.claude-plugin/marketplace.json +0 -18
  107. package/CONTRIBUTING.md +0 -112
  108. package/ROADMAP.md +0 -66
  109. package/docs/AI-AUTHORING.md +0 -338
  110. package/docs/ASSETS.md +0 -107
  111. package/docs/AUTH-BACKUP.md +0 -32
  112. package/docs/AWS.md +0 -86
  113. package/docs/BEST-PRACTICES.md +0 -276
  114. package/docs/BULK.md +0 -79
  115. package/docs/CAPABILITIES.md +0 -192
  116. package/docs/CAPACITY.md +0 -305
  117. package/docs/CI-FOLLOWUP-2026-09-19.md +0 -97
  118. package/docs/CI-RELEASE-AUDIT-2026-09-19.md +0 -322
  119. package/docs/CI.md +0 -147
  120. package/docs/CLOUDFLARE.md +0 -109
  121. package/docs/CODEBASE-AUDIT-2026-09-20.md +0 -284
  122. package/docs/COMPLIANCE.md +0 -239
  123. package/docs/COMPOSING-A-SITE.md +0 -278
  124. package/docs/CONDITIONS.md +0 -74
  125. package/docs/DEPLOYMENT-CHECKS.md +0 -108
  126. package/docs/DEVELOPMENT-PIPELINE.md +0 -270
  127. package/docs/EGRESS.md +0 -125
  128. package/docs/EXTENSIONS.md +0 -438
  129. package/docs/FRAMEWORK.md +0 -217
  130. package/docs/FUNCTION-SECURITY.md +0 -254
  131. package/docs/HTTP.md +0 -129
  132. package/docs/INSTALL.md +0 -128
  133. package/docs/INTERCHANGE.md +0 -134
  134. package/docs/LOAD-TESTING.md +0 -91
  135. package/docs/LOCAL-DEVELOPMENT.md +0 -102
  136. package/docs/MIDDLEWARE-EXAMPLES.md +0 -75
  137. package/docs/MIDDLEWARE.md +0 -102
  138. package/docs/MONITORING.md +0 -115
  139. package/docs/OBSERVABILITY.md +0 -222
  140. package/docs/OPEN-DECISIONS.md +0 -224
  141. package/docs/OPERATIONAL-PROOF.md +0 -41
  142. package/docs/OPERATIONS.md +0 -201
  143. package/docs/ORGANIZATION.md +0 -135
  144. package/docs/PERFORMANCE.md +0 -72
  145. package/docs/PLUGINS.md +0 -271
  146. package/docs/POLICIES.md +0 -211
  147. package/docs/PRERENDER.md +0 -245
  148. package/docs/PROJECT-DIRECTION.md +0 -118
  149. package/docs/PROVIDER-VERIFICATION.md +0 -84
  150. package/docs/READINESS.md +0 -150
  151. package/docs/README.md +0 -87
  152. package/docs/RECIPES.md +0 -99
  153. package/docs/RELEASE-0.4.0-alpha.3.md +0 -50
  154. package/docs/RELEASE-0.4.1.md +0 -73
  155. package/docs/RELEASE-READINESS.md +0 -117
  156. package/docs/RELEASE-SECURITY.md +0 -96
  157. package/docs/RESILIENCE.md +0 -161
  158. package/docs/ROUTING.md +0 -92
  159. package/docs/SANDBOX-REVIEW.md +0 -72
  160. package/docs/SCAFFOLDING.md +0 -70
  161. package/docs/SECURITY-AUDIT.md +0 -164
  162. package/docs/SITE.md +0 -150
  163. package/docs/SPECIFICATION.md +0 -359
  164. package/docs/SPIKE-AI-FRAMEWORK-BENCHMARK.md +0 -288
  165. package/docs/SPIKE-BUSINESS-SUITE.md +0 -1029
  166. package/docs/SPIKE-CORE-LAYERING.md +0 -368
  167. package/docs/SPIKE-DEFAULT-TRUST-MODEL.md +0 -211
  168. package/docs/STANDARDS.md +0 -311
  169. package/docs/STARTERS.md +0 -83
  170. package/docs/STATIC.md +0 -105
  171. package/docs/TOOLING.md +0 -298
  172. package/docs/TUNNELS.md +0 -72
  173. package/docs/TYPESCRIPT-AUTHORING.md +0 -87
  174. package/docs/TYPESCRIPT.md +0 -123
  175. package/docs/VERCEL.md +0 -114
  176. package/docs/VERSION-ALIGNMENT.md +0 -80
  177. package/docs/YAML-GUIDE.md +0 -57
  178. package/docs/YAML-REFERENCE.md +0 -449
  179. package/docs/archive/2026-09-19/EXTENSION-IMPLEMENTATION.md +0 -68
  180. package/docs/archive/2026-09-19/MANAGEMENT-SECURITY.md +0 -102
  181. package/docs/archive/2026-09-19/NEXT-PHASE-PLAN.md +0 -108
  182. package/docs/archive/2026-09-19/NEXT-STEPS.md +0 -646
  183. package/docs/archive/2026-09-19/OPEN-DECISIONS.md +0 -277
  184. package/docs/archive/2026-09-19/RELEASE-SECURITY.md +0 -186
  185. package/docs/archive/2026-09-19/ROADMAP.md +0 -387
  186. package/docs/archive/2026-09-19/SPIKE-EXTENSION-MODEL.md +0 -430
  187. package/docs/archive/2026-09-19/SPIKE-EXTENSIONS.md +0 -492
  188. package/docs/archive/2026-09-19/SPIKE-LAMBDA-COMPILE.md +0 -365
  189. package/docs/archive/2026-09-19/SPIKE-MONOREPO.md +0 -778
  190. package/docs/archive/2026-09-19/USABILITY-REVIEW.md +0 -139
  191. package/docs/archive/README.md +0 -28
  192. package/docs/policies/agents.md +0 -182
  193. package/docs/policies/cache.md +0 -152
  194. package/docs/policies/compression.md +0 -169
  195. package/docs/policies/contract.md +0 -52
  196. package/docs/policies/hardened.md +0 -56
  197. package/docs/policies/interoperability.md +0 -169
  198. package/docs/policies/operations.md +0 -45
  199. package/docs/policies/security.md +0 -161
  200. package/docs/policies/throttle.md +0 -103
  201. package/docs/yaml/assets.md +0 -36
  202. package/docs/yaml/conditions.md +0 -20
  203. package/docs/yaml/functions.md +0 -168
  204. package/docs/yaml/middleware.md +0 -31
  205. package/docs/yaml/organization.md +0 -74
  206. package/docs/yaml/policies.md +0 -37
  207. package/docs/yaml/redirects.md +0 -64
  208. package/docs/yaml/responses.md +0 -57
  209. package/docs/yaml/site.md +0 -24
  210. package/packaging/claude-plugin/.claude-plugin/plugin.json +0 -19
  211. package/packaging/claude-plugin/skills/urlcode-authoring/SKILL.md +0 -120
  212. package/packaging/claude-plugin/skills/urlcode-operations/SKILL.md +0 -108
@@ -1,646 +0,0 @@
1
- # Historical record
2
-
3
- Archived 2026-09-19. This records an earlier implementation or proposal, not
4
- current instructions. See the [current roadmap](../../../ROADMAP.md),
5
- [current contract](../../SPECIFICATION.md) and [open decisions](../../OPEN-DECISIONS.md).
6
- Remaining acceptance work is not declared complete by archiving this record.
7
-
8
- <!-- trust-model-prose: historical-file -->
9
- <!-- guidance-claims: ignore-file -->
10
-
11
- # Next steps: closing the gaps
12
-
13
- Status: plan written 2026-09-18 from the cleanup, the
14
- [usability review](USABILITY-REVIEW.md) and the AI-first framework brief.
15
- Each item says what it fixes, where the work is, how it is proven, and its
16
- size (S: a day, M: a week, L: more). Phases can overlap; order inside a phase
17
- is the recommended sequence. The [roadmap](ROADMAP.md) owns what ships;
18
- this page owns how the gaps close.
19
-
20
- ## The rule everything below serves
21
-
22
- > Your AI should build your application, not your framework.
23
-
24
- Agents rebuild the same routing, validation, middleware, auth plumbing,
25
- policies, admin patterns and deployment glue on every project, and the person
26
- ends up owning it. URLCode's job is a small, deterministic, portable vocabulary
27
- in readable YAML, so generated code goes to the part that is the application.
28
- The agent describes what; the runtime owns how. The three tests that decide
29
- what gets built are in [project direction](../../PROJECT-DIRECTION.md#why-your-ai-should-build-your-application-not-your-framework):
30
- the boundary test (do agents generate this across unrelated projects?), the
31
- feature test (does it reduce what the agent must know, generate, debug or
32
- maintain?) and the evidence test (measured repetition, not a feature list).
33
-
34
- The order below follows from that. **Prove the thesis before building on
35
- it.** Phase 0 is the benchmark; if it shows a large saving, the rest is worth
36
- the work, and if it shows a small one, the abstraction is not doing enough yet
37
- and the next phases change. Nothing here weakens the security model: a
38
- `sandbox: true` route's isolation stays exactly as strict, grants stay
39
- operator-owned regardless of a route's trust setting, agents cannot
40
- self-authorize, unsupported behavior fails with the route named, and
41
- inspection tooling never becomes a privilege escalation path.
42
-
43
- **Status 2026-09-19 (sequence).** Most of Phases 1, 3 and 4 landed before the
44
- Phase 0 benchmark produced a single model-backed run. The instrument is built
45
- and tested (`benchmarks/agent/harness.ts`, `benchmarks/agent/count-lines.ts`,
46
- `benchmarks/agent/adapters/anthropic.ts`), but `benchmarks/agent/runs/` holds
47
- only `baseline.json`, a stub record, so the application-specific code ratio is
48
- still unmeasured and the re-prioritization 0.1 describes has never been
49
- exercised. This is an observation about the order the work happened in, not a
50
- change of priorities: Phase 0 still owns the evidence, and Phase 5 is still how
51
- each shipped phase gets measured. Items below are marked from the source at this
52
- revision.
53
-
54
- ## Phase 0: prove the thesis (M, core `benchmarks/agent/`, before anything else)
55
-
56
- ### 0.1 The agent benchmark — partly done
57
-
58
- Done 2026-09-19, the instrument only: the runner, the counting rule, the tasks
59
- and the storage format exist and are tested — `benchmarks/agent/harness.ts`
60
- (`runArm`, `summarize`, `securityChecklist`, `writeRun`),
61
- `benchmarks/agent/count-lines.ts` (`classify`, `codeRatio`),
62
- `benchmarks/agent/adapters.ts` (`selectAdapter`, `stubAdapter`) with
63
- `benchmarks/agent/adapters/anthropic.ts`, ten task directories under
64
- `benchmarks/agent/tasks/`, both arm preambles under `benchmarks/agent/prompts/`,
65
- `npm run benchmark:agent`, and `test/agent-benchmark.test.ts` ("the counting
66
- rule: functions and declared modules are the idea, everything else is
67
- plumbing"). The measurement is not done: `benchmarks/agent/runs/` holds only
68
- `baseline.json`, whose `model` is `stub`, and `benchmarks/agent/README.md`
69
- states that no number there is evidence until a stored run with a real model
70
- adapter backs it. Running the tasks in both arms against a real model, storing
71
- the runs and publishing only what they support remains the work below.
72
-
73
- Fixes: there is no evidence that URLCode saves agent effort, and the whole
74
- plan depends on it.
75
-
76
- - Work: ten representative tasks first, twenty later: redirect service, URL
77
- shortener, webhook receiver, small JSON API, static site plus API,
78
- OAuth-protected internal app, CRUD backend, admin backend, file and download
79
- service, API proxy, contact form, authenticated endpoint. Each task has a
80
- natural-language prompt, an acceptance test suite that is the same for both
81
- arms, and two harness configurations: conventional (the agent picks its own
82
- stack) and URLCode (the agent has the skill, `urlcode context` and the
83
- recipes). Run each arm several times with the same model. Capture input,
84
- output and total tokens, generated lines and files, agent turns, retries,
85
- failures, wall time, tests passed, and a checklist of obvious security
86
- mistakes. Store raw runs under `benchmarks/agent/runs/` with model, date and
87
- harness version.
88
- - The headline metric is the **application-specific code ratio**: generated
89
- lines that are the idea versus generated lines that are plumbing, counted
90
- by a documented rule (files under `functions/` and the application's own
91
- modules count as the idea; routing, auth, sessions, middleware, validation,
92
- headers, static serving, deployment and test scaffolding count as plumbing).
93
- Report it beside tokens and turns.
94
- - Proof: a reproducible runner; a README that states exactly what the
95
- numbers are and are not. Publish only what the stored runs support.
96
- A result like "same application, 65 percent fewer generated lines and half
97
- the tokens" is the story; a result like 8 percent means the vocabulary is
98
- too small or too hard to discover, and Phases 1, 3 and 4 are re-prioritized
99
- from what the runs show the agent still had to write.
100
-
101
- ### 0.2 Authoring regression evals (S, once 0.1 exists) — done
102
-
103
- Done 2026-09-19: the five prompts are `benchmarks/agent/evals/*.yaml`
104
- (`add-redirect`, `add-authenticated-endpoint`, `serve-directory`,
105
- `add-middleware`, `create-webhook-endpoint`), scored against the eight criteria
106
- by `scoreEval` and `summarizeEvals` in `benchmarks/agent/harness.ts`, gated
107
- against `benchmarks/agent/runs/baseline.json` by `benchmarks/agent/gate.ts`, and
108
- run weekly by `.github/workflows/evals.yml`. Caveat: the committed baseline is a
109
- stub record and the scheduled job skips cleanly when no model key is configured,
110
- so the recorded pass rate proves the pipeline, not a model's behavior.
111
-
112
- Prompts for common requests ("add a redirect", "add an authenticated
113
- endpoint", "serve this directory", "add middleware", "create a webhook
114
- endpoint") scored on: native functionality chosen, valid YAML, no unsupported
115
- fields, no unnecessary JavaScript, no boundary violations, tests written,
116
- validation run, provider limits respected. Run on a schedule; a new feature
117
- must not lower the pass rate.
118
-
119
- ## Phase 1: agent discovery (S each, no contract changes)
120
-
121
- What exists: `llms.txt`, `AGENTS.md` (for working on the runtime),
122
- `docs/AI-AUTHORING.md`, `docs/FRAMEWORK.md`, the JSON Schema, the generated
123
- field reference, the cookbook, recipes, `validate`/`test`/`audit`, MCP
124
- read-side tools (`inspectProject`, `validateProject`, `explainRoute`,
125
- `getCapabilities`, `previewImport`/`previewExport`, `listRecipes`/`showRecipe`).
126
- Keep all of it. The gap is that an agent still has to read documents to find
127
- facts the runtime already knows.
128
-
129
- ### 1.1 Application-level `AGENTS.md` from `urlcode init` (S, core) — done
130
-
131
- Done 2026-09-19: `renderAgentsGuide` in `src/agents-guide.ts` generates the file
132
- from the installed capability catalog, `initProject` in `src/authoring.ts`
133
- writes it, and `initProjectWith` in `src/init-with.ts` calls `initProject`, so
134
- `init --with` writes it into the project directory too; `renderMcpConfig` writes
135
- `.mcp.json` beside it. `test/cli.test.ts` asserts the commands, the packaged
136
- skill path and the MCP tool names the file lists, its length bound, and that the
137
- committed `starters/default/AGENTS.md` equals what `init` generates from this
138
- runtime. Caveat: the public `urlcode-template` copy is outside this repository
139
- and is not checked here; `npm run check:downstream-skills` stays advisory.
140
-
141
- Fixes: a project made with URLCode is not self-describing to Claude Code,
142
- Codex or any repository-aware agent. Today's `AGENTS.md` explains how to work
143
- on the runtime, not on an application.
144
-
145
- - Work: `urlcode init` (and `init --with`, 2.3 below) writes `AGENTS.md` into
146
- the project: inspect `urlcode.yaml` first; run `urlcode context` (1.3);
147
- check capabilities and search recipes before writing code; prefer native
148
- handlers; never recreate routing, validation, middleware, policies or
149
- authentication the runtime provides; validate, test, audit; report
150
- unsupported requirements instead of inventing fields; never create or
151
- approve grants. Generated from the installed runtime's capability list so
152
- it names only what that version has.
153
- - Proof: starter test asserts the file exists and lists the commands; the
154
- public `urlcode-template` gets the same file.
155
-
156
- ### 1.2 `llms-full.txt` and clean Markdown for the docs site (S, core; S, urlcode-docs) — partly done
157
-
158
- Done 2026-09-19, the core side: `scripts/build-llms-full.ts` generates
159
- `llms-full.txt` from 15 authoring documents in reading order with a table of
160
- contents and a token estimate in the file header, `npm run check` runs it with
161
- `--check`, and `test/llms-full.test.ts` covers determinism, rejection of a stale
162
- copy and the conservative link rewriting. The docs-site half is not done here:
163
- serving `/docs/<page>.md` beside `/docs/<page>` belongs to `urlcode-docs` and is
164
- not verifiable from this repository.
165
-
166
- Fixes: `llms.txt` must stay a compact index, but an agent that wants complete
167
- context has to fetch forty files.
168
-
169
- - Work: `scripts/build-llms-full.ts` concatenates the authoring documents
170
- (framework, AI authoring, YAML guide, field reference, specification,
171
- routing, HTTP, middleware, assets, policies, extensions) in
172
- reading order with a table of contents; checked in `npm run check` for
173
- staleness like the field reference. The docs site serves `/docs/<page>.md`
174
- beside `/docs/<page>` so agents never parse HTML. Do not adopt `agents.txt`
175
- or similar until a convention settles.
176
- - Proof: `npm run check` fails on a stale `llms-full.txt`; token estimate
177
- recorded in the file header.
178
-
179
- ### 1.3 `urlcode context` with a token budget (M, core) — done
180
-
181
- Done 2026-09-19: `urlcode context [--project] [--budget] [--json] [--stats]` in
182
- `src/cli.ts` over `buildContext`, `renderContext`, `estimateTokens` and
183
- `documentationTokens` in `src/context.ts`, derived from the compiled project and
184
- the capability catalog; `--stats` writes the estimate to stderr so stdout stays
185
- parseable. `test/context.test.ts` covers the cookbook and starter summaries,
186
- byte-identical output across runs, the fixed budget drop order with the estimate
187
- never exceeded, the CLI's YAML and JSON forms, and MCP `get_context`
188
- (`src/mcp.ts`) returning the same data read-only.
189
-
190
- Fixes: the central gap. An agent needs a handful of facts about this project
191
- and this runtime and spends tens of thousands of tokens reading documentation
192
- to get them.
193
-
194
- - Work: `urlcode context [--project DIR] [--budget N] [--json] [--stats]`
195
- emits deterministic YAML (or JSON): runtime and schema version; project
196
- summary (route count, handlers used, extensions declared, policies in
197
- effect, custom functions and middleware files, bindings requested);
198
- constraints that matter for generation (no guest network or Node APIs, no
199
- regex routes, path shape, one handler per route, no interpolation); target
200
- support for the project's features; and the exact `validate`/`test`/`audit`
201
- commands with the intentional route count filled in. `--budget` drops
202
- sections in a fixed order (per-route detail, then target table, then
203
- constraints prose) until the estimate fits; estimation is a documented
204
- characters-per-token approximation, no tokenizer dependency. `--stats`
205
- prints the estimated size of the documentation corpus versus the emitted
206
- context, labeled as estimates. Derived from the compiled project and the
207
- capability catalog, never from prose.
208
- - Proof: snapshot tests for the cookbook and the starter; a test that the
209
- same project yields byte-identical output twice; budget test that output
210
- never exceeds the estimate; MCP tool `get_context` returns the same data.
211
-
212
- ### 1.4 Capability and schema fragment queries (M, core) — done
213
-
214
- Done 2026-09-19: `urlcode capabilities <name>` and `urlcode schema <path>` in
215
- `src/cli.ts` over `getCapability` in `src/capability-query.ts` and
216
- `getSchemaFragment`/`schemaPathNames` in `src/schema-query.ts`, both re-exported
217
- from `src/tooling.ts` and served as MCP `get_capability` and `get_schema`
218
- (`src/mcp.ts`). `test/capability-query.test.ts` asserts that every catalog name
219
- resolves with a valid, size-bounded fragment, that every schema path yields a
220
- valid inline fragment and an unknown path lists the valid names, that entries
221
- report bundled usage, grants and refusals from existing data, and that the CLI
222
- fails closed on unknown names.
223
-
224
- Fixes: `urlcode capabilities` reports target support per handler; an agent
225
- cannot ask "what does `throttle` accept, where does it run, which recipe
226
- shows it" or "give me only the schema for `redirect`".
227
-
228
- - Work: `urlcode capabilities <name> [--json]` extends the existing catalog
229
- entry with the schema fragment, constraints, required grants, per-target
230
- support, known unsupported behavior and related recipes and examples.
231
- `urlcode schema <path>` (`route`, `redirect`, `middleware`, `policies.cache`,
232
- `extensions`) returns only that fragment of `schemas/urlcode.schema.json`,
233
- resolving `$ref`s. Both derive from the schema and the catalog; nothing is
234
- hand-maintained. MCP gains `get_capability` and `get_schema`.
235
- - Proof: a test that every capability name resolves and every fragment is
236
- valid JSON Schema; a size test that no fragment exceeds a fixed byte cap.
237
-
238
- ### 1.5 The URLCode agent skill (S, core `skills/urlcode/`) — done
239
-
240
- Done 2026-09-19: `skills/urlcode/SKILL.md` is 104 lines, ships in the package,
241
- and is named by the generated `AGENTS.md` through `skillPath` in
242
- `src/agents-guide.ts`; `test/cli.test.ts` asserts the reference and
243
- `test/release.test.ts` asserts the packaged starter copy. Caveat: the
244
- with-and-without comparison in the proof line waits on 0.1 — the URLCode arm
245
- preamble (`benchmarks/agent/prompts/urlcode.md`) assumes the skill, and no model
246
- run has been stored to compare against.
247
-
248
- Fixes: agents that support skills have no packaged instruction for URLCode.
249
-
250
- - Work: a small skill (under 150 lines) that teaches the loop: recognize a
251
- project by `urlcode.yaml`; run `urlcode context`; query a capability;
252
- search recipes and examples; prefer YAML; write minimal functions; validate,
253
- test, audit; respect grants and never approve one; report unsupported
254
- requirements. It tells the agent how to retrieve the minimum, and links
255
- nothing else. Ship in the package under `skills/` and reference it from
256
- the generated `AGENTS.md`.
257
- - Proof: the authoring evals in Phase 5 run with and without the skill.
258
-
259
- ## Phase 2: make the ladder real (no contract changes)
260
-
261
- ### 2.1 Publish the three extension packages (decision, S) — done
262
-
263
- Done 2026-09-18: `@jimhoyd/urlcode-ui`, `-auth` and `-admin` are on npm as
264
- `0.1.0-alpha.x` against core `0.4.0-alpha.1`. The alpha caveat stays: source
265
- complete, independent review, deployment evidence and accessibility
266
- assessment pending ([issue 58](https://github.com/jimhoyd-com/urlcode/issues/58)).
267
-
268
- Fixed: every install step in the "add accounts" row of the usability review
269
- except the revision pin. Before this, a person or an agent cloned three private
270
- repositories, ran `pack-sources.mjs` with four paths and a SHA, and installed
271
- four tarballs.
272
-
273
- - Decide: publish `@jimhoyd/urlcode-ui`, `-auth`, `-admin` as `0.1.0-alpha.N`
274
- to npm with provenance, from tags on `main`, keeping the "private until
275
- reviewed" caveats in each README and status file. An alpha on npm is a
276
- distribution channel, not an endorsement.
277
- - Work: copy core's `release.yml` shape into each repo (candidate build, npm
278
- audit, `npm pack`, attest, publish behind a repository variable). Drop
279
- `"private": true` only in the release commit. Set real peer ranges.
280
- - Proof: a clean directory installs core and auth from the registry and runs
281
- `urlcode-auth init`, `bootstrap`, `serve`; admin's
282
- `scripts/clean-project-acceptance.mjs` runs against the published tarballs.
283
-
284
- ### 2.2 One place for peer revisions (S)
285
-
286
- Fixes: three disagreeing lists of verified peer commits (the CI workflows,
287
- `ACCEPTANCE.md` in auth and admin, the pack script's core-revision check).
288
-
289
- - Work: `peers.json` in auth and admin; the workflows read it; the pack
290
- script defaults from it; `ACCEPTANCE.md` links to it. 2.1 has shipped, so
291
- the published versions (`@jimhoyd/urlcode@0.4.0-alpha.1`,
292
- `@jimhoyd/urlcode-ui@0.1.0-alpha.4`) replace the SHAs and the file can go.
293
-
294
- ### 2.3 `urlcode init --with auth,admin,ui` (M, core plus each extension) — done
295
-
296
- Done 2026-09-19: `--with` is parsed in `src/cli.ts` and implemented by
297
- `parseWithNames`, `loadScaffold` and `initProjectWith` in `src/init-with.ts`,
298
- which resolves `@jimhoyd/urlcode-<name>` from the invoking directory, refuses a
299
- missing package or one without a `scaffold` export before writing anything,
300
- merges the fragments into the starter through a last include, and writes one
301
- `host.mjs` (`renderHost`), one `README.md` (`renderReadme`), `.mcp.json` and the
302
- `AGENTS.md` from 1.1, printing the `inspectExtensionRevision` digest for
303
- pinning. `test/init-with.test.ts` uses a fake `@jimhoyd/urlcode-<name>` package
304
- in a temporary `node_modules` and, when companion checkouts are present,
305
- composes the real auth and admin scaffolds. Caveat: each extension's own
306
- `scaffold` export and admin's clean-project acceptance live in those
307
- repositories and are not verified here.
308
-
309
- Fixes: three initializers with three directory conventions; no single command
310
- produces the layered project the framework page describes.
311
-
312
- - Work in core: `--with a,b,c` resolves the installed
313
- `@jimhoyd/urlcode-<name>` from the invoking directory and calls its
314
- `scaffold` export (a small documented contract returning a YAML fragment,
315
- host imports and entries, and a README section). Core merges fragments into
316
- `urlcode.yaml`, writes one `host.mjs`, one `README.md`, the `AGENTS.md`
317
- from 1.1, and prints the `inspectExtensionRevision` SHA. A missing package
318
- refuses with the install command; core never imports the packages at build
319
- time. Each extension exports `scaffold` built from its existing `init`.
320
- - Proof: a core test with a fake `@jimhoyd/urlcode-demo` package in a temp
321
- `node_modules`; each extension tests that its `scaffold` output validates
322
- with core; admin's clean-project acceptance uses the new command.
323
-
324
- ### 2.4 Print extension schemas: `urlcode extensions` (M, core) — partly done
325
-
326
- Done 2026-09-19, the command and the MCP tool: `urlcode extensions
327
- [--host-file] [--json]` in `src/cli.ts` over `describeExtensions` in
328
- `src/tooling.ts` prints each registration's name, version, targets,
329
- configuration schema, policy schema, mounts, policy routes and revision-pin
330
- verdict, and without a host file names the declared extensions and says schemas
331
- need one. The same function is exported from `src/index.ts` and served as MCP
332
- `get_extensions`, offered only when the operator started the server with a host
333
- file, which `test/extensions.test.ts` asserts against the
334
- `examples/extensions` registry. Not done: the fold-in. `urlcode context
335
- --host-file` reports host extension names and a plugin count rather than their
336
- schemas (`buildContext` in `src/context.ts`), and `urlcode capabilities auth`
337
- takes no host file, so registered contracts are not part of either view.
338
-
339
- Fixes: an agent cannot discover what `extensions.auth.config` accepts without
340
- reading auth's source; `urlcode mcp` cannot serve it.
341
-
342
- - Work: `urlcode extensions --host-file … [--json]` loads the host file as
343
- `validate` does and prints each registration's name, contract version,
344
- targets, configuration schema and policy schema; the same data through the
345
- SDK and an MCP tool. Folds into `urlcode context` and `capabilities auth`
346
- when a host file is given.
347
- - Proof: test against the `examples/extensions` demo registry.
348
-
349
- ## Phase 3: retrieval instead of reading (M each, core)
350
-
351
- ### 3.1 Recipes as the vocabulary of common behavior — done
352
-
353
- Done 2026-09-19: every bundled recipe carries `recipe.yaml`, and the catalog is
354
- now ten — `authenticated-json-api`, `contact-form`, `cors-api`, `health-page`,
355
- `json-api`, `middleware`, `protected-download`, `static-plus-api`, `typescript`
356
- and `webhook-receiver` — which covers the seven this item names.
357
- `urlcode recipes search|show|add` runs through `src/ecosystem-cli.ts` over
358
- `searchRecipes` and `showRecipe` in `src/recipes.ts`, matching id, description,
359
- tags and capabilities locally with no service, and MCP gained `search_recipes`.
360
- `npm run check` validates the metadata and requires its derived fields to equal
361
- the capability preflight (`checkCatalog` and `derivedDifferences` in
362
- `scripts/check.ts`), and `test/recipes.test.ts` asserts a search hit per recipe
363
- and that every recipe validates, passes its fixtures and audits with its
364
- declared route count. Growing the catalog from the Phase 6 repetition log has
365
- not started; the current ten are the seed list above.
366
-
367
- Fixes: four bundled recipes with a README each and no metadata; an agent
368
- cannot search them, and nothing tells it to look before generating.
369
-
370
- - Work: every recipe gains `recipe.yaml`: `id`, `description`,
371
- `capabilities`, `tags`, `complexity`, required external services, grants,
372
- configuration inputs, files, target compatibility, tests and expected
373
- behavior. `urlcode recipes search <text>` matches id, description, tags and
374
- capabilities locally (no AI service); `show` prints the metadata first.
375
- MCP gains `search_recipes`. Grow the catalog from observed repetition (see
376
- Phase 6), starting with: authenticated JSON endpoint, webhook receiver with
377
- signature check via `proxy`/signals, contact form to a signal, protected
378
- download, health and readiness page, CORS API, static site with API.
379
- - Proof: schema for `recipe.yaml` checked in `npm run check`; a search test
380
- per recipe; every recipe still validates, tests and audits.
381
-
382
- ### 3.2 Examples become searchable the same way — done
383
-
384
- Done 2026-09-19: each example carries `example.yaml` in the recipe metadata
385
- shape, `urlcode examples search <text>` runs through `src/ecosystem-cli.ts` over
386
- `searchExamples` in `src/examples.ts` and names the smallest runnable match with
387
- its route, and the cookbook's per-route tags are generated into
388
- `examples/cookbook/route-index.json` by `scripts/build-cookbook-index.ts`,
389
- checked by `npm run check`. `scripts/check.ts` holds example metadata to the
390
- same preflight as recipes, and `test/recipes.test.ts` ("examples carry the same
391
- metadata shape and search returns the smallest runnable match with its route")
392
- is the search test.
393
-
394
- - Work: `examples/*/example.yaml` with the same metadata shape; `urlcode
395
- examples search <text>` returns the smallest matching runnable example and
396
- its route. The cookbook's forty routes get per-route tags in one index file.
397
- - Proof: search test; count audit unchanged.
398
-
399
- ### 3.3 `urlcode explain` from compiled semantics — done
400
-
401
- Done 2026-09-19: `urlcode explain [/route] [--json]` in `src/cli.ts` over
402
- `runExplainCommand` in `src/explain-cli.ts` and `explainRoute`/`explainProject`
403
- in `src/explain.ts`, derived from the compiled IR, including extension policy
404
- requirements when a host file is supplied. `test/explain.test.ts` covers the
405
- project table and route detail through the CLI, the sandbox boolean, the
406
- extension-protected route with a host registry, the nearest-route miss that
407
- never carries binding values, and that explain agrees with the runtime on
408
- methods and policies for every route.
409
-
410
- Fixes: `explainRoute` exists in the SDK and MCP; there is no CLI, and the
411
- output repeats matching rather than effective behavior.
412
-
413
- - Work: `urlcode explain [/route] [--json]` prints, per route, the effective
414
- methods, handler, middleware chain, validated inputs, policies in effect
415
- (including `extensions.auth` requirements when a host file is given),
416
- cache and no-store outcome, bindings and target support, derived from the
417
- compiled IR. Whole-project form lists every route in one screen.
418
- - Proof: snapshot tests on the cookbook; a test that `explain` and the
419
- runtime agree on methods and policies for every route.
420
-
421
- ### 3.4 A generated semantic manifest — done
422
-
423
- Done 2026-09-19: `urlcode manifest [--json]` shares the `src/explain-cli.ts`
424
- entry and runs `buildManifest` in `src/manifest.ts`; `build` writes
425
- `manifest.json` beside the artifact and MCP offers `get_manifest`.
426
- `test/manifest.test.ts` asserts determinism, that the revision equals the
427
- extension revision digest, that external requirements and recipe provenance are
428
- listed by name and never by value, and that the CLI prints the bytes the build
429
- writes.
430
-
431
- - Work: `urlcode manifest [--json]` (also written by `build` and offered by
432
- MCP as `get_manifest`) emits routes, capabilities, recipe provenance,
433
- external requirements, custom functions, requested bindings, target
434
- compatibility and the revision digest. Generated only; never checked in as
435
- a source of truth. `context` is a budgeted view of the same data.
436
- - Proof: manifest equals `inspectProject` output for the same project;
437
- digest equals `inspectExtensionRevision`.
438
-
439
- ### 3.5 MCP authoring layer, separately authorized (M, core) — done
440
-
441
- Done 2026-09-19: `src/mcp-authoring.ts` adds `create_route`, `add_recipe` and
442
- `scaffold_feature` plus the `run_validate`, `run_test` and `run_audit` runners,
443
- enabled only by `--allow-authoring` on the operator's command line, which
444
- `src/cli.ts` refuses for any other command and which no tool argument or
445
- environment variable can set (`src/mcp.ts`). Every write is validated before it
446
- lands and returns the verdict. `test/mcp-authoring.test.ts` asserts the tools
447
- are absent without the flag, that absolute, parent, symlinked, dotenv, git and
448
- operator paths are refused, and that a create is followed by validation in one
449
- call.
450
-
451
- Fixes: MCP is read-only by design; an agent that wants to add a recipe or a
452
- route still has to write files by hand.
453
-
454
- - Work: keep the read side as is and add the new read tools above. Add an
455
- authoring server mode enabled only by an explicit flag on the operator's
456
- command line (`urlcode mcp --allow-authoring --project DIR`): `add_recipe`,
457
- `create_route`, `scaffold_feature` (writes YAML and placeholder files
458
- through the existing scaffold path), and `validate`/`test`/`audit` runners.
459
- Every write is confined to the selected project, refuses paths outside it,
460
- never touches operator files, grants, policies or host files, and returns
461
- the validation verdict. Nothing in either mode reads secrets, creates
462
- grants, deploys, or changes operator security policy.
463
- - Proof: tests that authoring tools are absent without the flag; path
464
- confinement tests; a write followed by `validate` in one call.
465
-
466
- ## Phase 4: fewer lines for the common case (schema additions, `version: "1"` stays valid)
467
-
468
- ### 4.1 Short form for function routes (M, core) — done
469
-
470
- Done 2026-09-19: `normalizeRoute` in `src/config.ts` expands
471
- `function: functions/x.mjs` into `{source, args}` with an argument per `{param}`
472
- and a required bounded path parameter for any the route does not declare itself
473
- (`SHORT_FORM_PATH_SCHEMA`), and a string `middleware` entry into `{source}`; the
474
- long form stays the IR. Both shapes are in
475
- `schemas/urlcode.schema.json` (`$defs.route.properties.function` and
476
- `.middleware`) and the generated field reference lists them as options.
477
- `test/config.test.ts` ("function and middleware short forms normalize to the
478
- long form the long form compiles to") asserts identical output, that a declared
479
- parameter keeps its schema, and that a bad short-form string is refused with the
480
- route named; the cookbook uses the short form in
481
- `examples/cookbook/routes/middleware.yaml`.
482
-
483
- Fixes: the smallest function route is ten lines.
484
-
485
- - Work: `function: functions/hello.mjs` as a string expands every `{param}`
486
- to a required bounded string parameter and matching `args` entry; same for
487
- `middleware: [functions/x.mjs]`. The long form stays the canonical IR;
488
- `routes`, `audit`, `explain` and the field reference show the expansion.
489
- - Proof: generated reference updated; cookbook gains a short-form route with
490
- fixtures; a test that short and long forms compile to identical IR.
491
-
492
- ### 4.2 Route-level `auth` as the semantic form (M, core plus auth) — done
493
-
494
- Done 2026-09-19: the route-level `auth` key is in the schema
495
- (`$defs.route.properties.auth` over `$defs.routeAuth` in
496
- `schemas/urlcode.schema.json`) and expanded by `normalizeRouteAuth` in
497
- `src/config.ts`, which refuses a route that declares `auth` without an
498
- `extensions.auth` declaration, alongside `policies.extensions.auth`, or with
499
- `policies.extensions: false`; `required: false` documents intent and emits
500
- nothing. The type is documented in `src/types.ts`, and `test/recipes.test.ts`
501
- ("the authenticated recipes use the auth short form and never let credentials
502
- reach the guest") covers both `auth: true` and a role requirement. The `cache`
503
- short form this item defers to later shipped with it:
504
- `$defs.route.properties.cache` and the cache branch of `normalizeRoute`, refused
505
- alongside `policies.cache`. Caveat: the auth repository's HTTP tests are outside
506
- this repository and were not run here.
507
-
508
- Fixes: protecting a route today is `policies: { extensions: { auth: {} } }`,
509
- which is the mechanism, not the intent. The form an agent should write is
510
- `auth: { required: true, role: admin }`. (Delivered in `0.4.0-alpha.1` with
511
- `role` singular; `routeAuth` sets `additionalProperties: false`, so the plural
512
- `roles` this plan originally proposed is rejected by the validator.)
513
-
514
- - Work: a route-level `auth` key that expands to the `policies.extensions.auth`
515
- requirement the auth extension validates; `roles` maps to the extension's
516
- policy schema. Valid only when an `auth` extension is declared, refused
517
- with the route named otherwise. The same pattern applies later to `cache:
518
- { strategy: public, maxAge: 3600 }` over the cache policy where the policy
519
- form is more verbose than the intent.
520
- - Proof: a test that the short form compiles to the identical requirement;
521
- `explain` shows both; the auth repo's HTTP tests pass unchanged.
522
-
523
- ### 4.3 Semantic over implementation configuration (rule, ongoing)
524
-
525
- Every new field describes intended behavior (`auth: required`), never a
526
- provider or framework knob. Review new YAML fields against this in PR
527
- templates and the AI authoring matrix.
528
-
529
- ## Phase 5: keep measuring
530
-
531
- Phase 0 runs again after each of Phases 1 to 4 lands, on the same tasks and
532
- model, so every feature shows its effect on tokens, turns and the
533
- application-specific code ratio. The repetition log in Phase 6 is fed from
534
- the benchmark runs: every plumbing line the agent still wrote in the URLCode
535
- arm is an entry.
536
-
537
- ## Phase 6: grow from observed repetition (rule, ongoing)
538
-
539
- When building an application with URLCode, record every place an agent still
540
- generated commodity infrastructure and classify it: missing primitive,
541
- policy, recipe, capability, documentation, example, integration, or
542
- legitimately application-specific. Keep the log in `docs/REPETITION-LOG.md`
543
- with the project, the code that was written and the classification. Candidate
544
- areas the brief lists (CRUD, webhooks, email, uploads, jobs, pagination, API
545
- envelopes) are built only when the log shows them repeating. The application
546
- data question is the first entry:
547
-
548
- ### 6.1 Spike: a declared `collection` handler with an admin view (M to write, L to build)
549
-
550
- "Full-fledged application" today means "site with accounts". Write
551
- `docs/SPIKE-COLLECTIONS.md` against the same principles as links: YAML
552
- declares a collection with a JSON Schema for records, exact bounded query and
553
- mutation routes, operator-owned SQLite, no guest queries; admin registers a
554
- generic records screen; functions receive records as validated `args`. It
555
- must answer portability to serverless targets, limits, schema migration and
556
- whether links become a collection. Decide after review; build nothing first.
557
-
558
- ## Phase 7: one presentation story (extension repos)
559
-
560
- ### 7.1 Shared markup helpers into urlcode-ui (S)
561
-
562
- `hiddenField`, `postForm`, `withDeadline` in the ui main entry; auth and
563
- admin drop their copies (`admin-markup.ts`, `admin-deadline.ts`).
564
-
565
- ### 7.2 Auth and admin render through the kit (L) — partly done
566
-
567
- Done 2026-09-19, the core prerequisite only: the immutable-cache exception for
568
- hashed extension assets shipped. `ExtensionImmutableAssets` and
569
- `validateAssetPrefix` in `src/extensions.ts` bound a declared prefix to literal
570
- segments under the extension's mounts, and `immutableAssetResponse` is what
571
- lets such a response carry an asset cache-control instead of `no-store`. The
572
- rendering work itself is in the auth, admin and ui repositories and is not
573
- verified from here.
574
-
575
- Auth exports its catalogue and templates with view models, takes an optional
576
- `ui` from the host, and renders with `ui.kit.page` when present; admin the
577
- same. Needs the runtime change first: an immutable-cache exception for hashed
578
- extension assets (core, S). Proof: `urlcode-ui doctor` shows full coverage;
579
- existing HTTP tests pass under both render paths; a themed browser
580
- walkthrough. Retire the `presentation` option one minor version later.
581
-
582
- ## Phase 8: evidence still missing (unchanged from issue 58)
583
-
584
- | Gap | Plan | Owner and size |
585
- |---|---|---|
586
- | Browser and device WebAuthn coverage | Playwright with a virtual authenticator in auth CI; one manual pass on Safari and Android | auth, M |
587
- | Accessibility assessment | Automated axe pass in the browser walkthroughs plus one manual screen-reader and forced-colors pass | ui, auth, admin, M |
588
- | Soak, backup and recovery on a deployment | `operational-drills` with `URLCODE_SOAK_SECONDS=3600` on a real host; auth's recovery drill against a restored snapshot | core and auth, M |
589
- | Provider deployments | Deploy `examples/provider-conformance` to one Vercel, AWS and Cloudflare account; run `verify-provider` | core, M, needs accounts |
590
- | Live Google, Apple and SES | Deferred by the owner; synthetic signed fixtures stay | auth, later |
591
- | Independent security review | `SANDBOX-REVIEW.md` is the package; commission one reviewer before any non-alpha auth release | all, L, external |
592
-
593
- ## Phase 9: hardening left from the audit (core, S each)
594
-
595
- - Direct tests for the sandbox pool, worker crash recovery and timeout kill
596
- path (`src/functions.ts`, `src/function-worker.ts`, `src/guest-api.ts`) —
597
- done 2026-09-19: `test/sandbox-pool.test.ts` covers load shedding with slot
598
- reuse, parallel workers with per-slot heaps, the 250 ms-to-30 s respawn
599
- backoff, the deadline kill with slot replacement, an abrupt worker exit
600
- failing the in-flight invocation, startup failure and close, and the guest
601
- `Request`/`Response`/context surface.
602
- - Re-verify the remaining line-number rows in `STANDARDS.md`; cite symbols —
603
- done 2026-09-19: `docs/STANDARDS.md` records that every row was re-verified
604
- at `8d7dd01` and now cites the implementing function or constant rather than
605
- a line number, names the test that proves it, and says "unverified at
606
- 8d7dd01" where a row could not be re-checked; no line-number citation
607
- remains in the file.
608
- - Split the longest reference documents (YAML guide, policies) into task pages
609
- under 200 lines, so retrieval returns one page — done 2026-09-19:
610
- `docs/yaml/` holds nine pages (largest `functions.md`, 160 lines) and
611
- `docs/policies/` nine (largest `agents.md`, 182 lines), with
612
- `docs/YAML-GUIDE.md` down to 57 lines. Caveat: `docs/POLICIES.md` is still
613
- 203 lines as the index page.
614
- - A pre-test check in the extension repos that fails fast with the SQLite
615
- requirement named. Not verifiable from this repository.
616
-
617
- ## Sequence at a glance
618
-
619
- What remains, as of 2026-09-19:
620
-
621
- ```
622
- Phase 0 instrument built and tested; no model-backed run stored, so the
623
- code-ratio evidence is still missing. Evals (0.2) run weekly.
624
- Phase 1 done: AGENTS.md from init, llms-full, urlcode context,
625
- capability/schema queries, the skill
626
- left: the docs site's /docs/<page>.md (urlcode-docs)
627
- Phase 2 done: published alphas, init --with, urlcode extensions + get_extensions
628
- left: peers.json (auth, admin); extension schemas folded into
629
- urlcode context and capabilities <name>
630
- Phase 3 done: recipe metadata + search, examples search, explain, manifest,
631
- MCP authoring behind --allow-authoring
632
- Phase 4 done: short-form function and middleware routes, route-level auth,
633
- the cache short form; 4.3 stays a standing rule for new fields
634
- Phase 5 waits on a Phase 0 run with a real model
635
- Phase 6 not started: no docs/REPETITION-LOG.md, no docs/SPIKE-COLLECTIONS.md
636
- Phase 7 extension repos; the core immutable-asset exception 7.2 needs is done
637
- Phase 8 proof gaps, in parallel, as people and environments allow
638
- Phase 9 done: sandbox pool tests, STANDARDS symbol citations, split reference
639
- pages; left: the extension repos' SQLite pre-test check
640
- ```
641
-
642
- Phase 0 decides whether the rest is worth doing and in what order. Phases 1
643
- and 3 are what an agent meets first; the rest makes that cheaper or proves it.
644
- Because Phases 1, 3 and 4 landed ahead of the first model-backed run, that run
645
- now measures what shipped rather than choosing it; Phase 5's re-runs are where
646
- the choosing role returns.