← Back to overview

Socrates Documentation

Client Knowledge Base

The living docs each client gets, and how they're built.

Client Knowledge Base — Living Documents

Each client has a folder named [Client Name] in the Flood — Client Content Profiles shared drive. Reads use the native Drive connector; writes use the Socrates tools. The doc/sheet name is the lookup key — search name contains '[Client Name] — [Doc Type]'. Keep names exact.

Contents

Six living docs (application/vnd.google-apps.document):

Doc Type (name suffix) Purpose
Brand Guidelines Voice, tone, banned words, messaging, entity facts, named author(s) + credentials
ICP Personas Extensive target-customer profiles that aim every piece
Competitors & Gap Analysis Competitors, on-site content gaps, off-site citation gaps, crawlability findings
Page Content Template Structure pattern for service/landing pages
Blog Content Template Structure pattern for blog posts

Three sheets (application/vnd.google-apps.spreadsheet):

Sheet Type (name suffix) Purpose
Internal Linking Webmap Every internal link placed (source → destination)
Target Prompts & Visibility High-intent AI prompts + tracked Share of Model (measurement-loop.md)
Content Run Log One row per finished piece, for audit + visibility correlation

(Webmap is a Sheet so appends are atomic — see internal-linking.md.)

Step 0 — Detect first run

Search for [Client] — Brand Guidelines. Absent → onboarding. Present → load the set and proceed. A missing connector result means "not found yet," not "client doesn't exist."

Step 1 — Onboarding: resolve each item, then write with Socrates

Three-way resolution per item: 1. Stored — already in Drive → load and use. 2. Provided — uploaded with the request → adopt (Brand Guidelines via adopt-brand-guide; others parsed into the kb-templates.md schema). 3. Generated — neither → build via research (below).

Then write the whole set in one call: socrates_create_client_kb(client_name, seed_content). It creates the folder, the five docs (from markdown→HTML), and the three sheets (seeded headers), skipping anything that already exists. Also run the AI-crawlability check (geo-quality-standards.md) and record it in the gap doc.

Fallback: if Socrates is unreachable, return a paste-ready setup packet (output-format.md).

Scope: full onboarding is research-heavy. If the requester only wants a fast first article, generate what that article needs (Brand Guidelines, the relevant template, seed the Webmap) and mark the rest "not yet built." Default is the full set.

Generation methods (all obey the no-fabrication guardrails)

Brand Guidelines

crawl_site the domain (~10 pages); extract_structured on homepage + a key page for fonts/hex/JSON-LD/entity data. Synthesise voice (observed, with evidence note), terminology, banned words, messaging, audience, entity facts actually found, and a named author + credentials for E-E-A-T. Uploaded guidelines win; research fills gaps.

ICP Personas

2–4 personas from who the site addresses, services, language, plus tavily_search on buyer profiles/pains. Schema in kb-templates.md. Capture each persona's real questions — they feed FAQs and target AI-prompts. Mark inferred vs evidenced.

Competitors & Gap Analysis

Identify competitors (provided or via tavily_search/SERP). crawl_site each competitor and the client; diff for on-site gaps (topics/pages/formats rivals cover that the client lacks) and off-site citation gaps (where rivals get cited that the client doesn't — Reddit, YouTube, G2/Clutch, roundups, news; geo-quality-standards.md). Add the crawlability findings. Output competitor profiles + a prioritised gap backlog.

Internal Linking Webmap (Sheet)

Seed from the client crawl: every existing internal link as source → destination rows. Engine appends after each piece.

Page / Blog Content Templates

Sample existing pages/posts via crawl_site + extract_structured. Extract heading hierarchy, section order, components, table usage, typical length, FAQ presence, E-E-A-T signals, schema types. Synthesise reusable templates noting strengths and consistent gaps.

Target Prompts & Visibility (Sheet)

Seed the client's 250–500 high-intent prompts (from personas, services, category, competitor terms) and pull current standing from Peec AI. Full method: measurement-loop.md.

Content Run Log (Sheet)

Created empty with headers; populated one row per finished piece via socrates_log_run.

Research caching

Cache reusable topic research into the relevant KB doc (or a notes section) so overlapping future topics don't re-pay the research cost.

Keeping the KB current

Every item is ever-evolving. After each approved Final Draft, Socrates writes the changes (drafting-workflow.md triggers): Webmap and Run Log every time; other docs only on material learning.