Implementation guide

Build Davai from zero

A practical sequence for moving from empty folders to routed memory, generated indexes, sync promotion, and Janitor consolidation.

1Create the seven folders

identity/, semantic/, episodic/YYYY/MM/, procedural/, reference/, working/, decisions/.

2Define frontmatter

Use typed metadata before content conventions drift.

3Write PROTOCOL.md

Codify routing by retrieval question and decomposition rules.

4Seed identity and voice

Add durable user and response-style constraints first.

5Add INDEX.md generation

Walk canonical folders and emit a flat registry.

6Create intake flow

Route mixed input into working first, then split durable records.

7Add Janitor checks

Find stale working notes, broken links, missing verification, and drift.

8Wire canonical sync

Use the bare repo and post-receive hook described in sync.html.

9Instrument routing

Log input, chosen layer, confidence, and correction events.

10Benchmark and publish

Replace synthesized charts with harness output before performance claims.

Operational walkthroughs

The storyboard asset includes scripts for two videos: routing mixed intake and running a Janitor drift audit. The scripts currently assume a mem CLI, which is a production gap until the real tooling name is substituted or the CLI exists.

Open storyboard scripts
Intake decomposition from one mixed note to routed memory files.
The build should prove decomposition before adding automation.

Before canonical publication

Close the production gaps

Benchmark harness.Generate charts from real retrieval and router measurements across all seven trigger classes.
Frontmatter linter.Fail commits that omit required fields once the schema is in active use.
Cross-layer link checker.Run during Janitor and during post-receive promotion.
Routing telemetry.Persist decisions and correction labels to train a better router later.