|
2 | 2 |
|
3 | 3 | ## Adding or editing loops |
4 | 4 |
|
5 | | -- Treat `scripts/loop-data.mjs` as the canonical SEO/GEO content catalog for |
6 | | - every public loop. |
7 | | -- Keep the matching searchable row in `site/index.html` aligned with the |
8 | | - catalog entry, including title, prompt, attribution, link, and visible |
9 | | - count. |
10 | | -- Every loop must have a stable slug, unique search title and description, |
11 | | - contributor attribution, published and modified dates, practical context, |
12 | | - verification criteria, and related-loop links. |
13 | | -- After changing the catalog or homepage rows, run |
14 | | - `node scripts/build-skill-catalog.mjs` and |
15 | | - `node scripts/build-loop-pages.mjs`, capture the versioned page screenshots, |
16 | | - and then run `node scripts/build-social-images.mjs`. Commit the skill catalog, |
17 | | - public Markdown/JSON catalogs, screenshots, generated detail pages, |
18 | | - `site/sitemap.xml`, and `site/feed.xml`. |
19 | | -- Capture the homepage and every loop page in the light theme at 1200 x 630 |
20 | | - using the versioned filenames in `site/assets/social/`. Before recapturing |
21 | | - published artwork, bump `site.socialImageVersion` in |
22 | | - `scripts/loop-data.mjs`; the social-image builder refuses to replace a path |
23 | | - already present in `HEAD`. |
24 | | -- Preserve older versioned social cards so links that already use them keep |
25 | | - their artwork. Remove an old card only as an explicit cleanup. |
26 | | -- Run the full repository checks before committing: |
| 5 | +- The production catalog database is the source of truth for public loops. |
| 6 | + The current Git tree holds application code and the content-free site shell. |
| 7 | + Do not commit published loop records, bootstrap data, generated loop pages, |
| 8 | + catalogs, feeds, sitemaps, or offline catalog fallbacks. Legacy public |
| 9 | + records remain in pre-migration Git history intentionally; do not rewrite |
| 10 | + shared history as part of routine catalog work. |
| 11 | +- Publish a reviewed loop from a JSON file outside the repository with: |
| 12 | + |
| 13 | + ```bash |
| 14 | + LOOP_PUBLISH_TOKEN=... \ |
| 15 | + npm --prefix worker run loop:publish -- /path/to/loop.json |
| 16 | + ``` |
| 17 | + |
| 18 | + Use `worker/examples/loop.json` as the record template. The command validates |
| 19 | + the complete record before writing it, and the Worker records every revision. |
| 20 | +- Every loop must have a stable slug, unique number, search title and |
| 21 | + description, contributor attribution, published and modified dates, |
| 22 | + practical context, verification criteria, category, keywords, and valid |
| 23 | + related-loop slugs. |
| 24 | +- Do not hand-edit the homepage, detail pages, catalogs, feed, sitemap, or skill |
| 25 | + content when publishing a database record. The Worker renders those public |
| 26 | + surfaces from the same record. New loops use the shared social card unless a |
| 27 | + reviewed HTTPS `socialImageUrl` is supplied. |
| 28 | +- Keep bootstrap and backup exports outside the repository with owner-only |
| 29 | + permissions. The one-time bootstrap command requires an explicit private |
| 30 | + file path; routine recovery exports use `npm --prefix worker run loops:export`. |
| 31 | + Restore an export only into a fresh empty catalog with |
| 32 | + `npm --prefix worker run loops:restore`; never overwrite a live catalog. |
| 33 | +- Changes to the site shell, Worker, schema, or renderers still go through |
| 34 | + GitHub. Run the full repository checks before committing those code changes: |
27 | 35 |
|
28 | 36 | ```bash |
29 | | - node scripts/build-skill-catalog.mjs |
30 | | - node scripts/build-loop-pages.mjs |
31 | | - node scripts/build-social-images.mjs |
32 | | - node --check scripts/audit-seo-geo.mjs |
33 | | - node --check scripts/build-social-images.mjs |
34 | 37 | node --check site/script.js |
35 | | - node --check scripts/build-loop-pages.mjs |
36 | | - node --check scripts/loop-data.mjs |
37 | | - node --check scripts/validate-loop-data.mjs |
38 | | - node scripts/audit-seo-geo.mjs |
39 | 38 | node scripts/check.mjs |
40 | 39 | npm --prefix worker run check |
41 | 40 | python3 -m json.tool site/.herenow/data.json >/dev/null |
42 | 41 | python3 -m json.tool scripts/seo-geo-query-benchmark.json >/dev/null |
43 | 42 | git diff --check |
44 | 43 | ``` |
45 | 44 |
|
46 | | -- Do not add a loop if the checks report drift between the homepage, source |
47 | | - catalog, live catalogs, installable skill fallback, generated pages, |
48 | | - structured data, sitemap, or feed. |
| 45 | +- Do not publish a loop unless its public homepage row, detail page, |
| 46 | + `catalog.json`, `catalog.md`, sitemap, and feed all read back from production |
| 47 | + with the expected slug and modified date. |
49 | 48 |
|
50 | 49 | ## Protected forms |
51 | 50 |
|
@@ -85,6 +84,7 @@ npm exec -- wrangler secret put TURNSTILE_SECRET_KEY |
85 | 84 | npm exec -- wrangler secret put TURNSTILE_HOSTNAMES |
86 | 85 | npm exec -- wrangler secret put HERENOW_API_KEY |
87 | 86 | npm exec -- wrangler secret put HERENOW_SITE_SLUG |
| 87 | +npm exec -- wrangler secret put LOOP_PUBLISH_TOKEN |
88 | 88 | npm run deploy |
89 | 89 | ``` |
90 | 90 |
|
@@ -123,10 +123,18 @@ curl -sS "https://here.now/api/v1/publishes/{slug}/data/weekly_signups?limit=50" |
123 | 123 | active deployment, then fetch and fast-forward again before selecting the |
124 | 124 | deployment revision. |
125 | 125 | - Hold the lock through here.now finalize and production verification. |
126 | | -- Deploy and verify the form Worker before publishing a site revision that |
127 | | - changes Site Data form collections to owner-only. |
128 | | -- Verify both `https://signals.forwardfuture.ai/loop-library/` and the backing |
129 | | - here.now Site before reporting success. |
| 126 | +- Deploy and verify the Worker before publishing a site revision that changes |
| 127 | + Site Data form collections, catalog storage, or database-backed rendering. |
| 128 | +- For the initial database cutover, deploy the Worker, import the reviewed |
| 129 | + private bootstrap bundle, verify all canonical database surfaces, and only |
| 130 | + then deploy the content-free here.now shell. Never publish the empty shell |
| 131 | + before the database catalog is active. |
| 132 | +- The exact Worker routes at `signals.forwardfuture.ai/loop-library` and |
| 133 | + `signals.forwardfuture.ai/loop-library/*` render database content and pass |
| 134 | + site-shell assets through to the explicit `PUBLIC_ORIGIN_URL` here.now |
| 135 | + hostname. Update that variable if the backing Site changes. Verify the |
| 136 | + canonical URL for database content and the backing here.now Site for the |
| 137 | + static shell before reporting success. |
130 | 138 | - After a production content deployment, submit |
131 | 139 | `https://signals.forwardfuture.ai/loop-library/sitemap.xml` in Google Search |
132 | 140 | Console and Bing Webmaster Tools. Verify that the custom domain's root |
|
0 commit comments