Skip to content

refactor(factory): genericize pipeline code + launch contract (P1)#33

Merged
cryptoxdog merged 2 commits into
mainfrom
claude/factory-genericize-p1
Jul 19, 2026
Merged

refactor(factory): genericize pipeline code + launch contract (P1)#33
cryptoxdog merged 2 commits into
mainfrom
claude/factory-genericize-p1

Conversation

@cryptoxdog

Copy link
Copy Markdown
Collaborator

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 carries business_name/vertical/geography from the spec) instead of hardcoding "insurance supplementing businesses".
  • src/stages/UnknownResolverStage.tsSAFE_DEFAULTS drops the 3 public-adjuster/insurance disclaimer defaults; disclaimer text must come from the spec's compliance section, 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-agnostic crm group (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).
  • scripts/verify-visual-qa.mjs — pages derived from 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.

Verification

  • tsc --noEmit = 0
  • normalize-spec:check passes (client spec untouched here)
  • verify-launch-env --ci exits 0
  • no ACCULYNX_/PUBLIC_ADJUSTER_LICENSE references remain in src/, scripts/, config/

Follow-ups

  • P2 — quarantine the client instance to examples/supplemental-insurance-pros/, extract a generic astro_template/, namespace build output by client_id.
  • P3 — genericize the docs + AccuLynx→configurable CRM references.

🤖 Generated with Claude Code


Generated by Claude Code

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
Copilot AI review requested due to automatic review settings July 19, 2026 02:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread scripts/verify-visual-qa.mjs
Comment thread scripts/verify-launch-env.mjs Outdated
Comment thread scripts/verify-launch-env.mjs Outdated
- 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
@sonarqubecloud

Copy link
Copy Markdown

@cryptoxdog
cryptoxdog merged commit 8a0dc38 into main Jul 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants