Account – Knowledge base (detail/editor)
- Path:
/account/knowledge-bases/[kbId] - Parent:
knowledge-bases.md
Purpose (business goal)
Section titled “Purpose (business goal)”Edit, validate, and publish a knowledge base to define brand voice, facts, and compliance constraints.
This KB detail/editor may be accessed from:
Account → Knowledge Bases(knowledge-bases.md) for cross-workspace discovery, orWorkspace → Knowledge base(workspace-knowledge-base.md) for workspace-scoped navigation.
User roles & permissions
Section titled “User roles & permissions”- Workspace Admin, Manager (if allowed)
- Permissions:
kb.edit,kb.publish(TBD)
Reference: Roles & Permissions Model
Layout structure
Section titled “Layout structure”- Same page-shell pattern as Workspace open: header block + main content card.
- Header shows KB context (workspace and connected-channel count).
- Header also includes the top tab switcher (
Objectives,Documents) in the same header section for consistency with Workspace open layout. - The header context row is the single source for KB metadata chips/details (status, linkage, objectives count, documents count, apps). Do not duplicate that summary row inside the Objectives card.
- Workspace and KB group chips in the header context are interactive:
- Workspace chip navigates to
/account/workspaces/[workspaceId] - Group chip navigates to the same workspace with that KB group preselected in the group filter
- Workspace chip navigates to
- Main card is the KB editor itself:
Objectivestab:- body:
KbSettingsAccordion(same accordion used in Get Started Step 3)
- body:
Documentstab is a dedicated surface for KB documents (MVP placeholder supported)
- Accordion sections include: Brand personality, Primary objective, Secondary objective, Greetings, Closing, Emojis, Hashtags, Exceptions, Clarifications, Default CTA, Custom objectives.
Components used
Section titled “Components used”- Knowledge Base Mapping: Component: Knowledge Base Mapping
- KB settings accordion:
src/components/kb/kb-settings-accordion.tsx
States
Section titled “States”- Empty: new KB draft
- Loading: fetching KB content
- Error: validation/publish error
- Complete: saved/published
Business logic (high-level)
Section titled “Business logic (high-level)”- Enforce required compliance fields.
- Publish triggers downstream refresh.
- Clicking a KB card or KB name in table view navigates to this route.
- Breadcrumb behavior on this route is context-aware:
- Default entry (from
Account → Knowledge Bases):Account > Knowledge bases > [KB name]. - Workspace-scoped entry (from a workspace KB list):
Account > Workspaces > [Workspace name] > [KB name]. - In workspace-scoped mode,
[KB name]is a dropdown listing KBs in the same workspace for quick switching.
- Default entry (from
Domain refs:
API dependencies
Section titled “API dependencies”GET /knowledge-bases/{id}PUT /knowledge-bases/{id}POST /knowledge-bases/{id}/publish
Enterprise constraints
Section titled “Enterprise constraints”- Approval workflows (future)
Edge cases
Section titled “Edge cases”- Concurrent edits / conflicts
Security & compliance considerations
Section titled “Security & compliance considerations”- Audit edits and publish
Reference: Security & Compliance
Analytics events (if applicable)
Section titled “Analytics events (if applicable)”kb.published
Reference: Analytics Events (MVP)