# Knowledge subtree — `packages/core/knowledge/`

The knowledge layer sits inside `@stravica-ai/engineering-pa-core` and is the in-package home for the team-library shape adopted in [knowledge-system.md](https://github.com/Stravica/dave/blob/main/operator/knowledge/engineering/standards/knowledge-system.md).

## Layer separation

Three owner-distinct layers (Karpathy LLM Wiki):

- **`raw/`** — intake. PA-writable subfolders (`raw/{paName}/...`). Append-only observations, confirmations, retractions. The PA owns this surface; nothing else writes here.
- **`canonical/`** — wiki. Librarian-only write. Curated, deduplicated, conflict-annotated. This is what other agents retrieve from.
- **`schema/`** — librarian configuration. Per-team customisation of distillation rules, domain taxonomy, retrieval weights, half-lives, importance tiers.

The librarian is the sole writer to `canonical/`. PAs never bypass distillation.

## Status

**Skeleton — v0.1.0.** Directories exist as placeholders. v0.1.0 does NOT ship:

- a deployed librarian service (lands in Phase 3)
- a real `schema/librarian-config.json` (lands in Phase 3)
- seed canonical content (lands in Phase 3)
- per-PA `raw/{paName}/` subfolders (created per-onboarding by the scaffolder)

This README and the empty subtrees exist so that Phase 1 Task 4 (minimal-core port) has slots to drop ported content into, and so that the methodology document is reflected on disk from day one.

## Conflict handling, observation routing, retrieval, memory typing, recency, schema

These are all governed by [knowledge-system.md](https://github.com/Stravica/dave/blob/main/operator/knowledge/engineering/standards/knowledge-system.md). That document is the authoritative reference for every implementation choice in this subtree. The eight deferred operator decisions noted at the bottom of that document remain open.

## Layout

```
packages/core/knowledge/
  README.md              # this file
  schema/                # librarian configuration (empty in v0.1.0)
  raw/                   # intake — append-only observations (empty in v0.1.0)
  canonical/             # wiki — librarian-only writes (empty in v0.1.0)

  # 7-bucket knowledge scaffolds (Wave B-3 A-series, 0.2.0):
  operator-interface/    # Bucket 1 — session boot/end, communication, escalation
  work-management/       # Bucket 2 — work items, projects, progress.md, spawn-log
  delegation-dispatch/   # Bucket 3 — 8-section brief, dispatch envelope, modes
  knowledge-memory/      # Bucket 4 — retrieval, staging, journal, Librarian
  engineering-discipline/ # Bucket 5 — role ladder, git safety, worktree isolation
  content-voice/         # Bucket 6 — banned-tells taxonomy, capture procedure
  platform-tooling/      # Bucket 7 — pa, desk, environment, workspace, MCP
```

## Bucket knowledge scaffolds (Wave B-3 A-series, `0.2.0`)

The seven bucket directories under this tree are **structural scaffolds** every operator copies into `operator/knowledge/<bucket-slug>/` and populates. Each ships a `README.md` (scope statement + pointer to the CLAUDE.md bucket that references it) + canonical subdocs (`.md` files with HTML-comment headers explaining what belongs, plus `<!-- OPERATOR: populate -->` markers for operator content).

The scaffolds are the shape every operator inherits by copying; the shape is what makes cross-operator PA operating models mutually intelligible. Full detail: `packages/core/docs/pa-operating-model.md` § "The 7-bucket taxonomy".
