feat(project-boilerplate): add infra-coverage quiz, integrations template, design/incident/research pages - #15
Merged
Conversation
…late, design/incident/research pages Quizzes the 21-category infrastructure pick-list (hosting, DB, auth IdP, payments, email, queues, cron, storage, search, browser rendering, bot protection, analytics, APM, feature flags, IaC, cache, secrets, AI/LLM) and produces one `docs/architecture/integrations/<provider>.md` per active service. Specialises email, queues, and cron into their own dedicated architecture/operations pages. Adds style-guide, incident postmortem, feature-flags, and research templates. Captures patterns missing from the previous skill that real production codebases (socialqueue, bullion-api) document: build-vs-runtime env var split (e.g. Neon pooled-vs-direct), OpenNext + Cloudflare cron-handler patch mechanic, `__Secure-` cookie name in HTTPS, custom migration runner with `--mark-applied` drift recovery, IdP endpoint surface (plugin endpoints not on the typed `auth.api.*`), service-interface + Null fallback pattern (Null impl used in prod when binding isn't configured). AGENTS.md regen step gains a `## Stack integrations` table (auto-built from on-disk integration pages) and a `## Gotchas` section (drained from per-platform Gotcha quiz answers). Validation gains three checks: integration coverage, stack integrations sync, binding documentation.
- SKILL.md Step 3a → Step 4; Step 4 → Step 5. Pre-flight reference updated.
- Step 4 rewritten to handle three pre-flight states explicitly
(`detected`, `declared-but-no-doc`, `neither`) instead of branching only
on `neither`. `declared-but-no-doc` no longer asks the user — wiring
is already there.
- Cron handling: no per-provider `integrations/<cron-provider>.md` —
`cron-jobs.md` covers it end-to-end. Rule now says so explicitly.
- Validation step 7: dropped the `integrations/README.md` carve-out
(no template existed) and tightened to "every binding in the project's
hosting config has a matching integration page; test-only / framework
deps exempt".
- Validation step 9: broadened from `wrangler.toml`/`wrangler.jsonc`
only to "the project's hosting config" (covers Vercel/Fly/Railway
too), and added the build-only / runtime-only split capture rule.
- Added Constraints rule: normalize any user-supplied filename
component to `[a-z0-9-]` before substituting into a path. Addresses
the Low finding from the security audit.
- page-templates.md: typo fixes ("DRizzle" → "Drizzle", broken
parenthetical in deploy.md quiz, unclosed `<accountId>` tag), TODO
marker consistency (`<!-- TODO: not yet adopted -->` →
`<!-- TODO: fill -->`), and `email.md` See-also path
(`../integrations/<provider>.md` → `integrations/<provider>.md` —
same directory).
Owner
Author
Automated reviewFindings
Acceptance criteria coverageOmitted — no linked issues on this PR. Security
Risklow — pure additive doc change to a skill file; no production module touched, no schema/authz/env/signature invariants affected, fully reversible by reverting one commit. |
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.
Summary
Quizzes a 21-category infrastructure pick-list during pre-flight and generates one
docs/architecture/integrations/<provider>.mdper active service. Adds gated-infra branch (Step 3a) so users opt in per-category, plus dedicated templates for email, queues, cron, style-guide, incident postmortems, feature flags, and "we tried X" research notes.## Stack integrationsand## Gotchassections added to AGENTS.md regen step. Validation gains three new checks: integration coverage, stack integrations sync, binding documentation.Patterns captured from real projects
These were documented in socialqueue and bullion-api but had no quiz surface in the skill:
DATABASE_URL(Worker secret, pooled) vsDATABASE_URL_DIRECT(build only, direct endpoint for DDL).worker.tsre-exportsfetchbut notscheduled.__Secure-cookie name — middleware must read bothidp.session_token(HTTP) and__Secure-idp.session_token(HTTPS).--mark-applieddrift recovery for live DBs that were created viadrizzle-kit push.auth.api.*; CLI/CORS quirks.Diff
skills/project-boilerplate/SKILL.md— 175 → 214 lines (+39, well under 300 budget). Added Pre-flight step 5/6, quiz-loop Step 3a, AGENTS.md## Stack integrations/## Gotchas, three new validation checks, Skipped infra reporting.skills/project-boilerplate/references/page-templates.md— 1246 → 2241 lines (loaded on demand). Added 21-category pick-list, universalintegrations/<provider>.mdtemplate,email.md,queues.md,style-guide.md,incident-YYYY-MM-DD-<slug>.md,feature-flags.md,research/<topic>.md,competitors.md. Extendedoverview.mdStack table to enumerate all 21 categories; extendedauth.md,data-model.md,deploy/<platform>.md,env-vars.md,cron-jobs.md,observability.md,testing/strategy.md,mocking-services.mdwith infra-aware quiz questions and slots.Verification
bin/sync --dry-runclean; project-boilerplate still distributed to bullion-api, socialqueue, paulund, monlife.wc -l: SKILL.md 214 / page-templates.md 2241.git statusafter commit: only the two intended files changed.Test plan
pnpm init, Next.js) — confirm Skipped infra list is rendered.wrangler.toml+ Stripe + Resend bindings — confirm threeintegrations/*.mdpages are scaffolded with the universal template, plusemail.md.[[send_email]]and[[queues.producers]]bindings — confirm wiring section of each integration page carries the verbatim binding snippet.## Stack integrationstable is generated from on-disk integration files and## Gotchasis omitted when the per-platform Gotcha quiz is empty.