wiki-agent-rules-research.md13.4 KBView on GitHub # Sales Wiki Agent Rules Research
Based on implementations of Karpathy's LLM Wiki pattern.
---
## Sources
| Implementation | URL | Key Features |
|----------------|-----|--------------|
| balukosuri/llm-wiki-karpathy | https://github.com/balukosuri/llm-wiki-karpathy | CLAUDE.md schema, Obsidian integration, ingest/query/lint workflows |
| arturseo-geo/llm-knowledge-base | https://github.com/arturseo-geo/llm-knowledge-base/blob/main/AGENTS.md | Detailed AGENTS.md, confidence levels, session startup checklist |
| gayawellness/anamnesis | https://github.com/gayawellness/anamnesis/blob/main/SCHEMA.md | Strategic envelope, authority hierarchy, weight calculation |
| decodethefuture.org guide | https://decodethefuture.org/en/llm-wiki-karpathy-pattern/ | Production-ready CLAUDE.md template |
---
## Key Patterns from Implementations
### 1. Session Startup Checklist
From arturseo-geo:
```markdown
At the start of every session, the agent confirms:
- [ ] AGENTS.md read and schema version noted
- [ ] wiki/_index.md loaded (article count: ___)
- [ ] wiki/_concepts.md loaded (concept count: ___)
- [ ] learning/_review.md checked (cards due today: ___)
- [ ] Ready to receive instructions
```
### 2. Clear Workflows (Ingest, Query, Lint)
From decodethefuture.org:
**Ingest:**
1. Read the new source end to end
2. Identify key concepts, entities, claims
3. For each: create or update the relevant wiki page
4. Add/update cross-references ([[wikilinks]])
5. Update index.md
6. Append to log.md
**Query:**
1. Load index.md first (lightweight map)
2. Pull specific articles needed
3. Answer with citations
4. Optionally file answer back as new page
**Lint:**
- Every page in wiki/ appears in index.md
- Every [[wikilink]] resolves to a real file
- No two pages cover the same concept
- Conflicting claims are flagged, not silently overwritten
### 3. Index Maintenance Rules
From arturseo-geo:
```markdown
The agent updates wiki/_index.md after EVERY write operation. Format:
| Article | Type | Confidence | Updated | Tags |
|---|---|---|---|---|
| [Transformer Attention](concepts/transformer-attention.md) | concept | high | 2026-04-05 | attention |
```
### 4. Page Schema with Frontmatter
From arturseo-geo:
```yaml
---
title: "Transformer Attention"
type: concept # concept | topic | summary
created: 2026-04-05
updated: 2026-04-05
confidence: high # high | medium | low | speculative
sources:
- ../summaries/attention-is-all-you-need.md
related:
- ../concepts/multi-head-attention.md
tags: [attention, transformer, nlp]
---
```
### 5. Confidence Levels
From arturseo-geo:
| Level | Meaning |
|-------|---------|
| high | Well-sourced, multiple corroborating sources |
| medium | Single source or partial coverage |
| low | Thin sources, needs more data |
| speculative | Agent-inferred, not directly sourced |
Rule: "Articles with fewer than 2 sources must be marked `confidence: low`"
### 6. Quality Rules
From arturseo-geo:
- **Never hallucinate citations.** Every claim must trace to a source or be marked `source: agent-inferred`
- **No orphans.** Every article must appear in at least one other article or index
- **Flat is fine.** Don't over-nest directories. Flat scales to 1,000+ articles
- **One concept per file.** Split articles that cover multiple distinct concepts
- **Backlinks are bidirectional.** If A links to B, B must link back to A
### 7. Authority Hierarchy
From anamnesis:
| Authority | Who Sets It | Initial Weight |
|-----------|-------------|----------------|
| explicit | User stated directly | Highest trust |
| system | Automated processes | Medium trust |
| inferred | AI-derived | Lowest trust — must earn weight |
"AI-generated memories begin at low weight because they haven't been validated."
### 8. Log Maintenance
From decodethefuture.org:
```markdown
wiki/log.md is append-only, newest first
Format: ## YYYY-MM-DD — [source filename]
then a bullet list of changes made
```
### 9. Naming Conventions
From multiple:
- All filenames: lowercase, hyphens only, no spaces
- Pattern: `kebab-case.md`
- Example: `transformer-attention.md`, not `Transformer Attention.md`
---
## Applied to Cedar Sales Wiki
### _schema.md Structure
```markdown
# Sales Wiki — Agent Operating Rules
## Purpose
Org-level sales knowledge base maintained by Cedar's AI agent.
Contains patterns extracted from conversations, curated reference content,
and agent-generated playbooks.
## Session Startup
Before any wiki operation, agent:
1. Reads _schema.md (this file)
2. Reads _index.md (catalog of all pages)
3. Notes any pages marked needs_review: true
4. Confirms ready state
## Directory Structure
wiki/
├── _index.md # Master catalog
├── _schema.md # This file
├── _log.md # Chronological activity log
├── _proposals/ # Proposed new categories
├── techniques/ # Sales techniques
│ └── playbooks/ # Generated guides
├── objections/ # Objection handling
│ └── playbooks/
├── competitors/ # Competitive intel
│ └── playbooks/
├── stages/ # Stage-specific patterns
│ └── playbooks/
├── product/ # Product knowledge
│ └── playbooks/
└── customers/ # Customer knowledge
└── playbooks/
## Page Types
### Pattern Pages (techniques/, objections/, competitors/, stages/)
Contain examples extracted from conversations.
Frontmatter:
---
type: technique | objection | competitor | stage
title: "Page Title"
summary: "One-line description"
keywords: [keyword1, keyword2]
source: extracted | curated | hybrid
maturity: draft | validated | core
outcome_stats:
used_in: 12
won: 8
lost: 4
win_rate: 0.67
related:
- path/to/related-page.md
created: 2026-05-04
updated: 2026-05-04
---
### Reference Pages (product/, customers/)
Contain curated content enriched with extracted examples.
Frontmatter:
---
type: feature | value_prop | testimonial | use_case | case_study
title: "Page Title"
summary: "One-line description"
source: curated | hybrid
last_verified: 2026-05-04
owner: marketing | sales | product
related:
- path/to/related-page.md
---
### Playbook Pages (*/playbooks/)
Agent-generated or user-provided actionable guides.
Frontmatter:
---
type: playbook
title: "Discovery Call Guide"
created_by: agent | user
derived_from:
- stages/discovery.md
- techniques/question-layering.md
last_generated: 2026-05-04
needs_review: false
---
## Example Format (Grep-able)
All examples follow this format for analytics:
### [YYYY-MM-DD] Rep Name | Company Name | Outcome
[[conversation: conv_id]] [[event: evt_id]]
**Stage:** Stage Name | **Call type:** Type
> "Verbatim quote from transcript..."
**Outcome:** Description of result
## When to Create vs Update
### Add example to EXISTING page when:
- New extraction matches an existing technique/objection/competitor
- Grouping key (competitorName, objectionTheme, skillArea) matches existing page
- Content adds another instance of a documented pattern
### Create NEW page when:
- Grouping key doesn't match any existing page
- Pattern is distinct enough to warrant its own page
- At least 2 examples of the pattern exist (avoid single-instance pages)
### Propose NEW CATEGORY when:
- Multiple extractions don't fit any existing category
- Pattern is significant and recurring
- Write to _proposals/ and await human approval
## Autonomous vs Approval-Required
### Autonomous (background events — emails, meetings):
- Add examples to existing pages
- Update outcome_stats
- Create new pages within existing categories
- Update _index.md
- Append to _log.md
### Requires Approval (live chat):
- Create new categories
- Delete pages
- Major restructuring
- Generate playbooks (unless explicitly requested)
## Index Maintenance
Update _index.md after EVERY write operation.
Format:
| Path | Title | Type | Maturity | Updated | Example Count |
|------|-------|------|----------|---------|---------------|
| techniques/pricing-anchoring.md | Pricing Anchoring | technique | validated | 2026-05-04 | 8 |
## Log Format
_log.md is append-only, newest first:
## 2026-05-04
### Meeting: Acme Corp Discovery Call
- Added example to techniques/question-layering.md
- Added example to objections/budget-timing.md
- Updated outcome_stats on 2 pages
### Ingest: competitor-x mentioned
- Created new page: competitors/competitor-x.md
- Added to _index.md
## Lint Checklist
Periodic health check:
- [ ] Every page in wiki/ appears in _index.md
- [ ] Every [[wikilink]] resolves to a real file
- [ ] No two pages cover the same pattern
- [ ] outcome_stats match actual example counts
- [ ] Playbooks with stale sources marked needs_review: true
- [ ] Orphan pages (no inbound links) flagged
## Naming Conventions
- Filenames: lowercase, hyphens, no spaces
- Example: `pricing-anchoring-tco.md` not `Pricing Anchoring TCO.md`
- Playbooks: `{topic}-guide.md`, `{topic}-checklist.md`
## Conflict Resolution
When sources conflict:
1. Note the conflict explicitly in the page
2. Cite both sources with their outcomes
3. Mark page as maturity: draft until resolved
4. Flag for human review if significant
```
---
### _index.md Structure
```markdown
# Sales Wiki Index
Last updated: 2026-05-04
Total pages: 47
## Quick Stats
- Techniques: 12 pages, 89 examples
- Objections: 8 pages, 56 examples
- Competitors: 4 pages, 23 examples
- Stages: 5 pages, 67 examples
- Product: 15 pages
- Customers: 3 case studies, 12 testimonials
---
## Techniques
| Page | Maturity | Win Rate | Examples | Updated |
|------|----------|----------|----------|---------|
| [Pricing Anchoring via TCO](techniques/pricing-anchoring-tco.md) | validated | 67% | 12 | 2026-05-04 |
| [Multi-threading](techniques/multi-threading.md) | validated | 72% | 8 | 2026-05-03 |
| [Discovery Question Layering](techniques/question-layering.md) | draft | -- | 3 | 2026-05-02 |
### Playbooks
- [Pricing Conversation Guide](techniques/playbooks/pricing-guide.md)
---
## Objections
| Page | Maturity | Overcome Rate | Examples | Updated |
|------|----------|---------------|----------|---------|
| [Budget Timing](objections/budget-timing.md) | validated | 45% | 11 | 2026-05-04 |
| [Security Compliance](objections/security-compliance.md) | validated | 78% | 9 | 2026-05-03 |
### Playbooks
- [Common Objections Cheatsheet](objections/playbooks/common-objections.md)
---
## Competitors
| Page | Maturity | Win Rate vs | Examples | Updated |
|------|----------|-------------|----------|---------|
| [Competitor X](competitors/competitor-x.md) | draft | 55% | 7 | 2026-05-04 |
| [Status Quo](competitors/status-quo.md) | validated | 62% | 16 | 2026-05-03 |
### Playbooks
- [Competitor X Talk Track](competitors/playbooks/competitor-x-talk-track.md)
---
## Stages
| Page | Maturity | Examples | Updated |
|------|----------|----------|---------|
| [Discovery](stages/discovery.md) | validated | 23 | 2026-05-04 |
| [Demo](stages/demo.md) | validated | 18 | 2026-05-03 |
| [Technical Review](stages/technical-review.md) | draft | 5 | 2026-05-02 |
| [Proposal](stages/proposal.md) | validated | 12 | 2026-05-01 |
| [Negotiation](stages/negotiation.md) | draft | 9 | 2026-05-01 |
### Playbooks
- [Discovery Call Guide](stages/playbooks/discovery-call-guide.md)
- [Demo Prep Checklist](stages/playbooks/demo-prep-checklist.md)
---
## Product
| Page | Type | Last Verified | Updated |
|------|------|---------------|---------|
| [Workflow Automation](product/features/automation.md) | feature | 2026-05-01 | 2026-05-04 |
| [Integrations](product/features/integrations.md) | feature | 2026-04-15 | 2026-05-02 |
| [Value Props](product/value-props.md) | value_prop | 2026-05-01 | 2026-05-03 |
| [ROI Examples](product/roi-examples.md) | testimonial | -- | 2026-05-04 |
---
## Customers
### Case Studies
| Page | Outcome | Deal Size | Updated |
|------|---------|-----------|---------|
| [Acme Corp Q1 2026](customers/case-studies/acme-corp-2026-q1.md) | Won | $180K | 2026-04-15 |
### Testimonials
- [Customer Testimonials](customers/testimonials.md) — 12 examples
### Use Cases
| Page | Updated |
|------|---------|
| [Enterprise Sales](customers/use-cases/enterprise-sales.md) | 2026-05-01 |
---
## Pending Review
Pages marked needs_review: true
| Page | Reason | Flagged |
|------|--------|---------|
| [Discovery Call Guide](stages/playbooks/discovery-call-guide.md) | Source patterns updated | 2026-05-04 |
---
## Recent Activity
See [_log.md](_log.md) for full history.
### 2026-05-04
- 3 new examples added
- 1 new competitor page created
- 1 playbook flagged for review
```
---
## Key Decisions for Cedar
Based on research, recommended rules:
### 1. Autonomous for Background Events
Agent writes to wiki without approval for:
- Email/meeting extractions
- Adding examples to existing pages
- Creating pages within existing categories
- Updating stats
### 2. Approval Required for Live Chat
Agent asks before:
- Creating new categories
- Generating playbooks
- Major restructuring
- Deleting anything
### 3. Confidence/Maturity Progression
- `draft` — fewer than 3 examples or single source
- `validated` — 3+ examples with consistent outcomes
- `core` — foundational pattern, high confidence
### 4. Playbook Auto-Update
When source patterns change significantly:
- Mark playbook `needs_review: true`
- If `created_by: agent`, can auto-regenerate
- If `created_by: user`, wait for human approval
### 5. Win Rate Tracking
outcome_stats computed from grep pattern:
- Count `| Won$` and `| Lost$` in page
- Update on every example add
- Store in frontmatter for quick index access