Build a complete, self-healing knowledge base for any company using Senso
npx @senso-ai/shipables install saroopbharwani/senso-kb-builderBuild and continuously strengthen a Senso knowledge base for any company. One command triggers the full lifecycle: brand setup, content types, research, ingestion, prompt creation, content generation, draft publishing, and self-healing gap detection.
This is an additive workflow. Never delete or clear existing KB content. Each run layers new research and content on top of what's already there. The more comprehensive the KB becomes over time, the better the search quality and content generation. Treat the KB as a living, growing asset — every run should make it more robust.
npm install -g @senso-ai/cliSENSO_API_KEY environment variable setsenso skills install --allActivate this skill when the user asks to:
Before ANY writes, verify the target:
senso whoami --output json --quiet
Show the user the org name and ask them to confirm. If they say no, tell them to update SENSO_API_KEY in their .env file and retry.
Do not proceed until the user confirms the org.
If the user hasn't specified a company, ask:
Which company do you want to build a KB for?
Use their answer as the target for all subsequent steps.
Check if a brand kit already exists:
senso brand-kit get --output json --quiet
If already configured, skip to 1b. If the guidelines are empty or missing:
senso brand-kit set --data '{
"guidelines": {
"brand_name": "Company Name",
"brand_domain": "company.com",
"brand_description": "What the company does in 1-2 sentences",
"voice_and_tone": "Description of how the brand communicates",
"author_persona": "Who content is written as (e.g., The Company Team)",
"global_writing_rules": [
"Rule 1",
"Rule 2"
]
}
}' --output json --quiet
Critical: You MUST call senso brand-kit set to configure the brand in Senso. Do NOT just document brand info as a KB article — the brand kit powers content generation.
Check if content types exist:
senso content-types list --output json --quiet
If none exist, create at least 3 templates. If some already exist, review them and add any missing types:
FAQ Page:
senso content-types create --data '{
"name": "FAQ Page",
"config": {
"template": "Create a comprehensive FAQ page with 8-12 questions and answers. Each Q&A should be concise (2-3 sentences per answer). Group related questions under subheadings. Use the brand voice throughout. End with a clear call-to-action.",
"writing_rules": ["Keep answers under 100 words", "Use natural question phrasing", "Link to detailed resources where relevant"]
}
}' --output json --quiet
Blog Post:
senso content-types create --data '{
"name": "Blog Post",
"config": {
"template": "Write a 1000-1500 word educational blog post. Start with a hook that identifies the reader pain point. Include 3-5 subheadings. Use data, examples, or case studies to support key points. End with a summary and call-to-action. Optimize for search with a clear primary keyword.",
"writing_rules": ["Use subheadings every 200-300 words", "Include at least one statistic or proof point", "Write at a professional but accessible reading level"]
}
}' --output json --quiet
Comparison Page:
senso content-types create --data '{
"name": "Comparison Page",
"config": {
"template": "Create a fair but persuasive comparison page. Start with the problem both solutions address. Use a comparison table for features. Highlight 3-4 key differentiators. Include a section on who each solution is best for. End with a recommendation and call-to-action.",
"writing_rules": ["Be factually accurate about competitors", "Lead with value not features", "Include a comparison table"]
}
}' --output json --quiet
Use web search to research the company thoroughly. Cover:
Check existing folders first (senso kb my-files --output json --quiet). Reuse existing folders where they match. Only create new folders for categories not already covered:
senso kb create-folder --name "Company Overview" --output json --quiet
senso kb create-folder --name "Products & Features" --output json --quiet
senso kb create-folder --name "Use Cases & Industries" --output json --quiet
senso kb create-folder --name "Competitive Intel" --output json --quiet
senso kb create-folder --name "Case Studies" --output json --quiet
senso kb create-folder --name "FAQs" --output json --quiet
senso kb create-folder --name "Content Strategy" --output json --quiet
Save the returned folder IDs — you'll need them for ingestion.
For each research finding, create a separate document:
senso kb create-raw --data '{
"title": "Document Title",
"text": "Markdown content here...",
"kb_folder_node_id": "folder-id-here"
}' --output json --quiet
Rules:
senso credits --output json --quiet
Warn the user if credits are low before proceeding.
Create questions that potential customers would ask, across all funnel stages:
senso prompts create --data '{
"question_text": "What is [topic] and why does it matter?",
"type": "awareness"
}' --output json --quiet
Funnel stages:
Create at least 8-12 prompts across all stages.
Use the content type IDs from Phase 1 and prompt IDs from 3b:
senso generate sample --prompt-id <prompt_id> --content-type-id <content_type_id> --output json --quiet
Warning: Each generation takes 30-90 seconds. Inform the user before starting.
Generate at least 2-3 pieces of content using different prompt + content type combinations.
Save generated content into the review pipeline:
senso engine draft --data '{
"geo_question_id": "<prompt_uuid>",
"raw_markdown": "<generated_markdown>",
"seo_title": "<seo_title>"
}' --output json --quiet
Search the KB for each major topic:
senso search "<topic>" --output json --quiet
For each search, evaluate:
For any gaps found:
Provide a KB Health Report:
| Dimension | Status |
|---|---|
| Brand kit configured | Yes/No |
| Content types created | Count |
| Documents ingested | Count |
| Folders organized | Count |
| Prompts created | Count |
| Content generated | Count |
| Drafts published | Count |
| Gaps found | Count |
| Gaps filled | Count |
| Search quality (avg score) | Score |
After the report, ask the user:
Run another heal pass? [Y/n]
If yes, repeat Phase 4. Each pass should find fewer gaps as the KB matures.
| Operation | Command |
|---|---|
| Check org | senso whoami --output json --quiet |
| Get brand kit | senso brand-kit get --output json --quiet |
| Set brand kit | senso brand-kit set --data '{...}' --output json --quiet |
| List content types | senso content-types list --output json --quiet |
| Create content type | senso content-types create --data '{...}' --output json --quiet |
| List KB files | senso kb my-files --output json --quiet |
| List folder contents | senso kb children <folder_id> --output json --quiet |
| Create folder | senso kb create-folder --name "X" --output json --quiet |
| Create raw content | senso kb create-raw --data '{...}' --output json --quiet |
| Search KB | senso search "<query>" --output json --quiet |
| Check credits | senso credits --output json --quiet |
| List prompts | senso prompts list --output json --quiet |
| Create prompt | senso prompts create --data '{...}' --output json --quiet |
| Generate content | senso generate sample --prompt-id <id> --content-type-id <id> --output json --quiet |
| Save draft | senso engine draft --data '{...}' --output json --quiet |
| Get document | senso content get <content_id> --output json --quiet |
All commands MUST include --output json --quiet flags.
SENSO_API_KEYSenso API key for authenticating CLI commands. Get yours at https://v2.senso.ai