Repository navigation
Best practices (sample): a sample project in every workspace - #1200
Open
JorimTheuns wants to merge 7 commits into
Open
JorimTheuns wants to merge 7 commits into
JorimTheuns wants to merge 7 commits into
Conversation
Each workspace gets its own copy of "Best practices (sample)": three placeholder conversations of practitioners describing how they used dembrane, plus a seeded chat that answers "How do other organisations use dembrane, and how should I set up my first project?". - db: expand migration 0015 adds project.is_sample and project.sample_version. - samples: seedBestPractices(db, owner, workspaceId, now). It derives every id with uuid5 from the workspace (BEST_PRACTICES_IDS) and takes a per-copy advisory lock. It never resurrects a deleted copy and makes no writes when the copy is current. A newer fixture rewrites only the conversations, chunks and seeded chat turns; user chats and reports are left alone. - samples: backfillBestPractices, an idempotent keyset backfill with a time budget that skips deleted workspaces and orgs, excluded demo orgs and copies a user deleted. The worker runs it every 10 minutes. - tenancy and account: workspace creation enqueues samples.seed-best-practices inside the creation transaction (signup's personal workspace enqueues it best effort). Workspace removal soft-deletes the copy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MNLytqu8PVd9qtSMkP7dT
A sample project is not the workspace's own work, so it counts toward no allowance or statistic: - audio cap: stampOverCap, workspaceSeconds and both workspaceOverCapActive queries - chat: the free chat allowance and the 3-turn cap on the BFF, reply and agentic paths - reports: the free report check and countWorkspaceReports - workspace and org project counts, the usage card, staff liveProjects, stats countedProjectIds and the accounts synthetic filter - the portal: storage.project() reports conversations as closed, and conversations cannot move into or out of a sample (conversation.move_sample) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MNLytqu8PVd9qtSMkP7dT
The project home shows "This is a sample project. The organisations, people and conversations in it are invented." on projects with is_sample set. It also hides the Take part card and the Upload audio shortcut there. Adds the friendly message for conversation.move_sample and extracts and compiles the catalogs. Non-English locales are not translated yet. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MNLytqu8PVd9qtSMkP7dT
42 invented conversations of practitioners describing how they used dembrane, written from research into real use and reviewed against the docs and code, replace the placeholder fixture. The seeded chat answers the onboarding question from them, and the fixture test now checks the brand rules users will read. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MNLytqu8PVd9qtSMkP7dT
Contributor
|
Hi @claude! Thank you for contributing to Dembrane ECHO! Before we consider your Pull Request, we ask that you sign our Contributor License Agreement (CLA). This is only required for your first Pull Request. Please review the CLA, and sign it by adding your GitHub username to the contributors.yml file. Thanks! |
On a free workspace the sample's chats share 10 user turns (the seeded question included) and the sample gets one report of its own, so new users can explore it without spending their free chat or report, and model use on it stays bounded. The chat views stop blocking a sample chat at three turns and show the limit when the server refuses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MNLytqu8PVd9qtSMkP7dT
…talogs Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MNLytqu8PVd9qtSMkP7dT
Adds conversations on a whole participatory budget cycle, groups keeping their own clustering, screens between repeated rounds, asking who was missing, switching on only what a project needs, quiet voices in a teacher college and residents taking over hosting. Sharpens four existing ones, and corrects nine that said hosts can upload text: the dashboard upload takes audio only, so text goes in through the portal's text option. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MNLytqu8PVd9qtSMkP7dT
JorimTheuns
marked this pull request as ready for review
October 10, 2026 18:41
spashii
approved these changes
Oct 10, 2026
This branch has not been deployed
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.
Requested by Jor · project thread
Before: a new workspace opens empty, so a new user has nothing to ask the assistant about and no example of how other organisations use dembrane.
After: every workspace has a "Best practices (sample)" project with 49 invented conversations of practitioners describing how they used dembrane (setup, the room, analysis, sharing back, and what went wrong), plus a seeded chat that answers "How do other organisations use dembrane, and how should I set up my first project?". A banner says the project is a sample and everything in it is invented. The onboarding video opens on this chat.
The copy doesn't count toward the workspace's usage or free-tier limits. On a free workspace it has its own small allowance instead: 10 chat questions across its chats (the seeded one included) and 1 report.
How
packages/samples:seedBestPractices(db, owner, workspaceId, now)andBEST_PRACTICES_IDS(uuid5 of the workspace). Idempotent; a deleted copy stays deleted; a newer fixture rewrites only the seeded conversations, chunks and the seeded chat's turns, never user chats, reports or project settings.project.is_sampleandproject.sample_version.samples.seed-best-practicesin their transaction; a periodic backfill seeds existing workspaces in batches (skips deleted workspaces, deleted copies, the demo and Millbrook orgs).Open questions
Tests: platform
bun test --parallel1155 pass / 0 fail (162 skipped need parity DB or provider credentials); sample tests 39 pass; typecheck, biome and package checks clean; frontend tsc clean, vitest on project routes 94 pass.🤖 Generated with Claude Code
https://claude.ai/code/session_016MNLytqu8PVd9qtSMkP7dT
Generated by Claude Code
Generated by Claude Code