refactor(factory): genericize pipeline code + launch contract (P1)#33
Merged
Conversation
De-couple the generic website factory from the current client's vertical/vendor so client identity lives only in the DomainSpec, not the machinery: - llm.ts: content-generation system prompt is vertical-neutral (the user prompt already carries business_name/vertical/geography from the spec) instead of hardcoding "insurance supplementing businesses". - UnknownResolverStage: SAFE_DEFAULTS drops the 3 public-adjuster/insurance disclaimer defaults; disclaimer text must come from the spec's compliance section, never invented by the generic factory. Generic contact/design-token defaults stay. - launch-env.required.yaml + verify-launch-env.mjs: the AccuLynx-specific `crm` group becomes provider-agnostic (CRM_PROVIDER selects the vendor); the public-adjuster `licensing` group becomes vertical-neutral `professional_license`, required only when the client sets LICENSE_DISPLAY_REQUIRED=true (default: not required). - verify-visual-qa.mjs: pages are derived from the DomainSpec routes (QA_PAGES env → spec route slugs → home only), not a hardcoded client route list. - fixtures/ci-test-spec.yaml: neutral synthetic vertical/geography/keywords so the CI fixture isn't a thin copy of the real client. Verified: tsc=0; normalize-spec:check passes; verify-launch-env --ci exits 0; no ACCULYNX_/PUBLIC_ADJUSTER_LICENSE refs remain in src/scripts/config. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VqWfuXWTn5jo8f5fnkSozx
There was a problem hiding this comment.
Pull request overview
Refactors the website factory toward a client-agnostic pipeline by removing client-specific assumptions from prompts, defaults, fixtures, and launch/QA contracts, relying on the DomainSpec as the single source of client/vertical details.
Changes:
- Makes content-generation system prompting vertical-neutral and removes insurance/public-adjuster-specific safe-default disclaimers.
- Renames launch env contract groups/vars to provider-agnostic CRM + vertical-neutral professional licensing with conditional gating.
- Derives Visual QA page targets from the DomainSpec routes (with env override) and updates CI fixture data to be neutral.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| validation/launch_env_report.json | Updates launch env validation report format/status to reflect CI warning mode + new secret/config grouping. |
| src/stages/UnknownResolverStage.ts | Removes client/vertical-specific disclaimer safe-defaults; keeps generic placeholders only. |
| src/services/llm.ts | Updates content-generation system prompt to be vertical-neutral. |
| scripts/verify-visual-qa.mjs | Resolves QA page list from DomainSpec routes (or QA_PAGES), instead of hardcoding client routes. |
| scripts/verify-launch-env.mjs | Renames env vars/groups (CRM, professional license) and updates gating rules for CI vs production. |
| fixtures/ci-test-spec.yaml | Replaces client-specific vertical/geography/keywords with synthetic neutral values. |
| config/launch-env.required.yaml | Renames AccuLynx/licensing groups to generic crm/professional_license and updates variable set/semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- verify-visual-qa.mjs: resolvePages() normalizes to leading-slash paths so both
QA_PAGES entries and spec route slugs build valid URLs ('about' → '/about').
- verify-launch-env.mjs: move VERCEL_ORG_ID/VERCEL_PROJECT_ID out of
secretsForLaunch (they are identifiers, not secrets) into requiredForLaunch —
no longer mislabeled as "missing secrets" / inflating secrets_checked.
- verify-launch-env.mjs: the LICENSE_DISPLAY_REQUIRED gate now enforces
PROFESSIONAL_LICENSE_NUMBER + STATE + TYPE together (matching the
professional_license contract), not just NUMBER.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqWfuXWTn5jo8f5fnkSozx
|
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.



First of three PRs removing client-specific drift so the repo is a generic, client-agnostic website factory driven only by the DomainSpec. No data moves in this PR — pure code/config genericization.
Changes
src/services/llm.ts— content-generation system prompt is vertical-neutral (the user prompt already carriesbusiness_name/vertical/geographyfrom the spec) instead of hardcoding "insurance supplementing businesses".src/stages/UnknownResolverStage.ts—SAFE_DEFAULTSdrops the 3 public-adjuster/insurance disclaimer defaults; disclaimer text must come from the spec'scompliancesection, never invented by the factory. Generic contact/design-token defaults stay.config/launch-env.required.yaml+scripts/verify-launch-env.mjs— the AccuLynx-specific group becomes a provider-agnosticcrmgroup (CRM_PROVIDERselects the vendor); the public-adjusterlicensinggroup becomes vertical-neutralprofessional_license, required only when the client setsLICENSE_DISPLAY_REQUIRED=true(default: not required).scripts/verify-visual-qa.mjs— pages derived from DomainSpec routes (QA_PAGESenv → spec route slugs → home only), not a hardcoded client route list.fixtures/ci-test-spec.yaml— neutral synthetic vertical/geography/keywords.Verification
tsc --noEmit= 0normalize-spec:checkpasses (client spec untouched here)verify-launch-env --ciexits 0ACCULYNX_/PUBLIC_ADJUSTER_LICENSEreferences remain insrc/,scripts/,config/Follow-ups
examples/supplemental-insurance-pros/, extract a genericastro_template/, namespace build output byclient_id.🤖 Generated with Claude Code
Generated by Claude Code