Untitled


id: WO-0008 title: "Maya — Conversational KB Talent (RAG-as-Wiki)" requestor: Oscar (CEO) assignee: Pablo (Production Line Architect) participants: [Riley (R&D Analyst), Camille (Customer Success), Kai (Knowledge Manager), Ivan (Infrastructure), Diego (Deployment)] status: in-progress jira_key: created: 2026-05-12 started: 2026-05-26 completed: decision_ref: TFD-0023 impacts: process: client request intake & deflection (CON-0006) capability: replaces Confluence wiki with conversational RAG; bundleable with every delivered digital talent roles: [customer-success, knowledge-manager] client: Internal first (factory + STM pilot), then bundled with each delivered talent product_type: Conversational KB digital talent (RAG over markdown + HTML corpus) production_line: digital-talent language: French (primary) / English references: [CON-0006, RD-0003, RD-0028]

Request

Build Maya (Memory & Answers) — a conversational knowledge base talent that replaces the JSM-Confluence deflection pattern with native RAG. Maya reads a corpus (markdown decisions, request outputs, HTML deliverables, lessons learned), answers client questions conversationally with citations, and routes unresolved cases to ticket creation.

Two distinct deployments:

  1. Maya-Factory — internal: reads talent-factory/ corpus (decisions, requests, KB learnings). Used by Camille for client triage, by the team for institutional knowledge retrieval.
  2. Maya-Client (per client) — bundled with each delivered digital talent. Reads that client's delivered solutions + KB. Becomes the deflection layer in the client portal.

Sibling pattern to dt-coach, negotiation-coach, fitness-coach — but the first factory infrastructure talent that is also a client deliverable.

Strategic rationale

  • Cannibalize Confluence: JSM-Confluence deflection (CON-0006 Stack A) costs money + is keyword-based + can't render rich HTML. Maya beats it on every axis: native FR/EN, semantic understanding, conversational, free corpus (git), bundleable.
  • Eat your own dog food: the factory builds digital talents that read docs and answer; Maya is that pattern turned inward.
  • Product differentiation: every delivered talent ships with its own Maya. Clients get a chatbot trained on their solutions. Hard for competitors to match.
  • Aligned with feedback_delivery-model-foundry-not-hosted: Maya is packaged as a digital talent, not a hosted service. Customer runs it independently with their LLM of choice.

Client Profile (M1 — internal pilot)

Field Value
Client Talent Factory (internal)
Segment Camille (CS), Riley (R&D), the CEO
Need Conversational retrieval over factory KB; basis for client-facing deployments
Language French primary, English
AI platform Claude API (Haiku for retrieval, Opus/Sonnet for synthesis)

Product Definition

# Capability Description
1 Corpus ingestion Index a directory of markdown + HTML + PDF into a manifest (titles, summaries, paths). No vector DB required for <10k docs.
2 Conversational retrieval Multi-turn dialogue; understands FR/EN mixed; clarifies ambiguous queries before answering
3 Citation by paragraph Every claim cites the source file + section (Claude API citations native)
4 Deflection → ticket handoff When Maya can't answer or user says "ouvre un ticket", capture the conversation context and route to JSM (or Telegram for Maya-Factory)
5 Embeddable widget Single <script> widget that drops into Astro/Vercel pages, JSM portal, Teams app
6 Bilingual native FR/EN mixed input handled without language switching; output matches user's last language
7 Per-deployment corpus Each Maya instance is configured with corpus_path — factory uses talent-factory/, STM Maya uses OneDrive-STM/agent-ea/, etc.
8 Re-indexing on commit Hook on git commit updates the manifest. Always fresh against the corpus.

Scope

  • In: Conversational RAG with citations, deflection routing, embeddable widget, FR/EN, manifest-based indexing
  • Out (v1): Vector DB (overkill for current volume), authentication (handled by the host portal), analytics dashboard (handled by JSM/portal)
  • Compliance: Each Maya instance only reads its configured corpus. No cross-tenant leakage. Citations always include source path.

Acceptance Criteria

  • Given a question in French about the factory R&D pipeline, when asked through the widget, then Maya answers with citations to the right files in departments/executive/rd-analyst-riley/ and company/decisions/TFD-0012*
  • Given a question in English mixed with French terms (typical CEO style), when asked, then Maya parses and answers without forcing language switch
  • Given a question Maya cannot answer from corpus, when reached, then Maya proposes "create a ticket" and forwards conversation context to JSM (or Telegram for Maya-Factory)
  • Given a corpus update (git commit), when triggered, then the manifest re-indexes within 60s and new content is searchable
  • Given a Maya-Client deployment for STM, when STM user queries, then only STM corpus is read (no factory-internal leakage)
  • Given any answer, when delivered, then citations link to the actual source file (clickable in widget)

Definition of Done

  • All acceptance criteria pass
  • Maya-Factory deployed to factory team (CEO + Camille + Riley access)
  • One Maya-Client instance configured for STM corpus as POC
  • Deployment package: standalone digital talent with corpus_path env var, deployable to client repo
  • Widget embeddable in JSM portal (POC) and beta-portal (production)
  • QA certification completed (qa-certification.md)
  • Deflection handoff to JSM verified end-to-end
  • Documentation: client integration guide (how to wire Maya into their portal)

Success Criteria

  • 30-day: Maya-Factory answers ≥70% of internal team queries correctly without fallback to manual search. Maya-Client (STM) handles ≥3 real STM questions during pilot.
  • 90-day: Maya bundled with at least 2 delivered talents (STM agent-ea + 1 other). Confluence usage in factory drops or stops entirely. Measurable deflection rate on JSM portal (% tickets prevented).

Agent Context

References

  • CON-0006 — Client request intake lifecycle (Maya is the deflection layer in that architecture)
  • RD-0003 synthesis-strategique — §3 "What the video omits" mentions memory systems and bilingual as factory assets
  • RD-0028 — Context7 MCP eval (parallel pattern: doc injection into LLM context)
  • project_beta-portal — host of Maya-Factory widget
  • project_framework-library — Maya may need to read framework docs as part of corpus
  • feedback_documentation-format — HTML deliverables in corpus must remain readable by Maya
  • feedback_delivery-model-foundry-not-hosted — Maya packaged for customer execution with LLM flexibility

Constraints

  • Follow production line stages: production-lines/digital-talent/
  • Naming: WO-PROD-{NNN}-{slug} per TFD-0009
  • LLM flexibility per foundry model: Maya must work with Claude API by default but accept Anthropic-compatible local model endpoints (per model-config-pattern). No hard-coded model.
  • Bilingual FR/EN support; French primary for STM
  • No vector DB in v1 — manifest-based retrieval + Claude long context. Re-evaluate at 10k docs.
  • Citation format must be machine-parseable so the widget can render clickable source links

Verification

  • Run: standard digital-talent QA gate (8/8 functional, ≥5/6 edge cases)
  • Additional: deflection routing test (Maya → JSM ticket creation with conversation context preserved)
  • Expected: QA pass, deployment manifest, internal pilot live, STM POC live

Production Details

Deliverable Set

Artifact Description
CLAUDE.md Maya agent configuration
.claude/commands/maya-*.md Skills: ingest, query, route-to-ticket, reindex
widget/ Embeddable JS widget (Astro component + standalone bundle)
corpus.config.yaml Per-deployment corpus path + filters
manifest.json Generated index (titles, summaries, paths)
Integration guide Client doc: how to wire Maya into their portal/JSM/Teams

Skill Inventory

Populated during Stage 3 Design.

Customization Values

Dimension Value
Methodology RAG with manifest-based retrieval + Claude long context citations
Repository tool git (source of truth for corpus)
Diagram standard Mermaid in answers when relevant
Publication target npm package + standalone deployment
Model selection Haiku for retrieval/clarification, Sonnet/Opus for synthesis (per model-config-pattern); customer can swap

Dependencies

Dependency Source Status
CON-0006 lifecycle decision Philippe (in flight) Pending — Maya is one of its building blocks
RD-0028 Context7 evaluation Riley Open — adjacent pattern, may inform retrieval design
beta-portal Vercel deploy Ivan Open — Maya-Factory widget needs a host
JSM activation Ivan + Atlassian Pending — deflection handoff target

Build Estimate

Component Effort
Stage 1-3 (Intake → Design) ~3 days
Stage 4 (Assembly: ingestion + retrieval + widget) ~5 days
Stage 5-6 (QA + Deploy factory + STM POC) ~2 days
Total ~2 weeks