Replace the old team draft with the adopted CommunityRule Creative Team Rule #108

Merged
an.di merged 2 commits from adilallo/fix/CR-302-team-rule into main 2026-11-13 00:01:35 +00:00
Member

Overview

The public catalog still served the September team draft, titled "The CommunityRule Project." This writes the Rule the team adopted on 30 Oct — title CommunityRule Creative Team, the Home-hero summary, and the remade-deck cards — into that featured row, including at container start, so a deploy cannot keep serving the old body.

Changes

  • Build the adopted Rule from the Home hero chips and remade-deck presets (lib/create/teamRule.ts).
  • Upsert that row as public and featured; if a second featured copy exists under either title, take it private (prisma/seed/teamRule.ts). Full seed calls the same helper.
  • Bundle scripts/seed-team-rule.ts into the image and run it in start.sh after prisma migrate deploy, before the server listens, so title, summary, and document land together.
  • Ops deploy and runbook notes: this one seed is the exception to “seed is not every deploy.”
  • Unit tests for the payload (no old-draft title or summary) and for the upsert / extra-row behavior.

Screenshots

01-home-hero-desktop-1440.png

How to Test

  1. From repo root, with local Postgres: node --env-file=.env --import tsx scripts/seed-team-rule.ts (or npx prisma db seed). Confirm the log line Seeded team Rule: … CommunityRule Creative Team.
  2. GET /api/rules — the featured list includes CommunityRule Creative Team and does not include The CommunityRule Project. The summary is “We build and maintain CommunityRule for the communities that use it…” Open the Rule’s document and check it has none of the old draft phrases (for example “Skill-Based Contribution”, “Conflict Resolution Council”).
  3. Open / at 1440, 1024, 768, and 390. The hero card title and summary should match that catalog row. Chips should match the Home set; Consensus may read “Consensus” on the hero and “Consensus decision-making” from the catalog name.
  4. After a staging deploy, container logs should show the seed line before Listening on port 3000. Reload /api/rules on staging and repeat step 2.

Notes

  • Home still paints the card from messages/en/components/heroBanner.json, not from GET /api/rules. This PR makes the catalog row match that copy; wiring the hero to the API is leftover.
  • The word-for-word copy file was not in the repo. The published body is the remade-deck presets for the chips the Home hero already shows.
  • Re-running the seed is safe (idempotent upsert).02-team-rule-card.png03-home-hero-tablet-1024.png04-home-hero-tablet-768.png05-home-hero-phone-390.png
## Overview The public catalog still served the September team draft, titled "The CommunityRule Project." This writes the Rule the team adopted on 30 Oct — title **CommunityRule Creative Team**, the Home-hero summary, and the remade-deck cards — into that featured row, including at container start, so a deploy cannot keep serving the old body. ## Changes - Build the adopted Rule from the Home hero chips and remade-deck presets (`lib/create/teamRule.ts`). - Upsert that row as public and featured; if a second featured copy exists under either title, take it private (`prisma/seed/teamRule.ts`). Full seed calls the same helper. - Bundle `scripts/seed-team-rule.ts` into the image and run it in `start.sh` after `prisma migrate deploy`, before the server listens, so title, summary, and document land together. - Ops deploy and runbook notes: this one seed is the exception to “seed is not every deploy.” - Unit tests for the payload (no old-draft title or summary) and for the upsert / extra-row behavior. ## Screenshots ![01-home-hero-desktop-1440.png](attachments/b6ce5dee-6eb8-49be-af58-ed6a16542254) ## How to Test 1. From repo root, with local Postgres: `node --env-file=.env --import tsx scripts/seed-team-rule.ts` (or `npx prisma db seed`). Confirm the log line `Seeded team Rule: … CommunityRule Creative Team`. 2. `GET /api/rules` — the featured list includes **CommunityRule Creative Team** and does not include **The CommunityRule Project**. The summary is “We build and maintain CommunityRule for the communities that use it…” Open the Rule’s document and check it has none of the old draft phrases (for example “Skill-Based Contribution”, “Conflict Resolution Council”). 3. Open `/` at 1440, 1024, 768, and 390. The hero card title and summary should match that catalog row. Chips should match the Home set; Consensus may read “Consensus” on the hero and “Consensus decision-making” from the catalog name. 4. After a staging deploy, container logs should show the seed line **before** `Listening on port 3000`. Reload `/api/rules` on staging and repeat step 2. ## Notes - Home still paints the card from `messages/en/components/heroBanner.json`, not from `GET /api/rules`. This PR makes the catalog row match that copy; wiring the hero to the API is leftover. - The word-for-word copy file was not in the repo. The published body is the remade-deck presets for the chips the Home hero already shows. - Re-running the seed is safe (idempotent upsert).![02-team-rule-card.png](attachments/01832228-5ca4-45c1-b1e3-acfebf8070db)![03-home-hero-tablet-1024.png](attachments/4248ea79-4387-448d-a892-e8cfc5e7b460)![04-home-hero-tablet-768.png](attachments/67dd3bfe-0576-4ffe-8cec-ddbe827a662a)![05-home-hero-phone-390.png](attachments/e7f249f1-0050-433c-aa36-ba527b93b37e)
an.di added 2 commits 2026-11-13 00:01:10 +00:00
Staging still listed the September draft under the old project name. Seed now
upserts the adopted title, summary, and remade-deck cards, and a data migration
renames the existing row so the public catalog picks it up on deploy.
an.di self-assigned this 2026-11-13 00:01:17 +00:00
an.di merged commit d3acd9aa9a into main 2026-11-13 00:01:35 +00:00
an.di deleted branch adilallo/fix/CR-302-team-rule 2026-11-13 00:01:35 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CommunityRule/community-rule#108