Quick Reference
REBUILD DEX JR.
ollama create dexjr
-f Modelfile.dexjr-v4.6
-f Modelfile.dexjr-v4.6
CORPUS COUNT
python -c "import chromadb; c=
chromadb.PersistentClient(path=
r'C:\...\.dex-jr\chromadb');
print(col.count())"
chromadb.PersistentClient(path=
r'C:\...\.dex-jr\chromadb');
print(col.count())"
STANDARD RAG QUERY
python dex-bridge.py
"your query here"
--top 8
"your query here"
--top 8
CANON INGEST
python dex-ingest.py
--path "C:\path\to\folder"
--build-canon --fast
--path "C:\path\to\folder"
--build-canon --fast
COUNCIL RUN (FULL)
python dex-council.py
--from-file "PROMPT.txt"
--all --rag --save council-runs/NAME --ingest
--from-file "PROMPT.txt"
--all --rag --save council-runs/NAME --ingest
CHROMADB BACKUP
xcopy "C:\...\.dex-jr\chromadb"
"D:\DDL_Backup\chromadb"
/E /H /Y
"D:\DDL_Backup\chromadb"
/E /H /Y
Scripts
dex-bridge.py
Primary query interface. RAG retrieval, generation, auto-ingest back to corpus.
LIVE v1.2▼
| Flag | Description | Type |
|---|---|---|
| "query" | Positional query string. No flag needed. python dex-bridge.py "question" | required |
| --top N | Chunks to retrieve. Default: 5. Use 10–15 for complex cross-artifact queries. | optional |
| --raw | Search ddl_archive (unweighted) instead of dex_canon. For historical/pre-governance queries. | optional |
| --external | Include ext_ collections (ext_creator, ext_reference) in retrieval. | optional |
| --model | Override default model. Default: dexjr. e.g. --model llama3.1:8b | optional |
| --verbose | Show retrieved chunks with similarity scores. Essential for debugging retrieval quality. | optional |
| --node | Route to compute node. Options: local (default), laptop (GAMINGLAPTOP 192.168.0.210) | optional |
| --no-ingest | Skip auto-ingest. Use for calibration runs and testing. | optional |
| --interactive | Persistent session — query multiple times without reloading the model. | optional |
Governance query
$ python dex-bridge.py "What does STD-VAULT-002 say about intake classification?" --top 8
Calibration run (no corpus pollution)
$ python dex-bridge.py "Summarize your Modelfile constraints" --no-ingest --verbose
Auto-ingest: every query+response → bridge-ingest/ → swept to corpus. Bug fixed v1.2: stray chat_url arg in get_embedding() caused latent crash.
dex_weights.py
Weighted query engine. Applies collection authority hierarchy per ADR-CORPUS-001.
WEIGHTED▼
| Flag | Description | Type |
|---|---|---|
| "query" | Positional query string. | required |
| --n N | Weighted results to return. Default: 5. | optional |
| --external | Include ext_ collections with assigned weights. | optional |
| --stats | Display full COLLECTIONS weight table and FILE_TYPE_WEIGHTS. Diagnostic mode — no query needed. | optional |
Weighted query
$ python dex_weights.py "How does the corpus authority model work?" --n 10
Show weight table
$ python dex_weights.py --stats
Weights per ADR-CORPUS-001: dex_canon 1.00 · dex_decisions 0.95 · dex_dave 0.90 · code/canonpress/products 0.85 · dex_site 0.80 · ext_reference 0.75 · ddl_archive 0.65
dex-ingest.py
Corpus builder. 23 file types, nomic-embed-text embeddings, ChromaDB writes. Produced 566K chunks from 12,134+ files.
LIVE v2.1▼
| Flag | Description | Type |
|---|---|---|
| --path | Source directory to scan. | required |
| --build-canon | Canon-only ingest → dex_canon. Does not expand RAW archive. | optional |
| --collection | Route to named collection. e.g. --collection dex_code · Governed by ADR-CORPUS-001. | optional |
| --ext-filter | Limit to specific extensions. Space separated. e.g. --ext-filter .py .ts .tsx .js .cs .sql | optional |
| --nominated-by | Provenance tag for ext_ chunks. Records nominating seat(s). e.g. --nominated-by "1002,1004" | optional |
| --fast | Skip existing ID load. Use on append-only sources or auto-ingest paths. | optional |
| --reset | DESTRUCTIVE — delete and rebuild collection. Requires explicit confirmation. | optional |
Daily canon ingest
$ python dex-ingest.py --path "C:\path\to\folder" --build-canon --fast
Named collection — code corpus
$ python dex-ingest.py --path "C:\Users\dexjr\99_DexUniverseArchive" --collection dex_code --ext-filter .py .ts .tsx .jsx .js .cs .sql --fast
External source with provenance
$ python dex-ingest.py --path "C:\ext-sources\kimball" --collection ext_reference --ext-filter .txt .md --nominated-by "1002,1004" --fast
23 extensions: .bas .bat .cs .css .csv .html .ipynb .js .json .jsx .md .mjs .prisma .ps1 .py .sh .sql .toml .ts .tsx .txt .yaml .yml · Phantom chunk count bug fixed · SyntaxWarning fixed v2.1
dex-council.py
AutoCouncil v3.0. Six-model async deliberation with RAG injection, governance context, and auto-ingest.
AUTOCOUNCIL v3.0▼
| Flag | Description | Type |
|---|---|---|
| --from-file | Path to .txt prompt file. Preferred for council reviews. | required* |
| "prompt" | Inline prompt string. Alternative to --from-file. | required* |
| --all | All available models — local + cloud. | optional |
| --local-only | Local models only. No API cost. Offline capable. | optional |
| --cloud-only | Cloud only (Gemini 2.5 Flash, Mistral Small). Requires .env API keys. | optional |
| --rag | Enable RAG — injects top-k canon chunks into council context. | optional |
| --save | Save responses to folder. e.g. --save council-runs/CR-ADR-001 | optional |
| --ingest | Auto-ingest saved run into AutoCouncil-Live after completion. | optional |
| --synthesize | Re-synthesize from saved folder. e.g. --synthesize council-runs/CR-ADR-001 | optional |
| --retry | Retry failed models once. Handles transient API timeouts. | optional |
| --timeout | Seconds per model. Default: 180. e.g. --timeout 300 | optional |
| --verbose | Full responses instead of previews during run. | optional |
Full council review (canonical)
$ python dex-council.py --from-file "C:\Users\dexjr\dex-rag\prompts\CR-ADR-CORPUS-001.txt" --all --rag --save council-runs/CR-ADR-001 --ingest
Re-synthesize from saved folder
$ python dex-council.py --synthesize council-runs/CR-ADR-001
Local models: qwen2.5-coder:7b, llama3.1:8b, deepseek-r1:8b · Cloud: Gemini 2.5 Flash, Mistral Small · Synthesizer: dexjr · API keys: C:\Users\dexjr\dex-rag\.env · Auto-ingest target: AutoCouncil-Live (not DDL-Standards-Canon) · Timeout 300s in v3.0
dex-deliberate.py
Deliberation engine. Multi-round — models read each other's positions and revise. For contested architecture decisions.
DELIBERATION▼
Standard deliberation
$ python dex-deliberate.py "Should dex_dave outrank product collections in the authority hierarchy?"
Differs from dex-council.py — models see each other's initial positions before round 2. Produces genuine position revision. Use for contested decisions where convergence matters.
dex-sweep.py
Nightly corpus sweep. Watches source folders, copies new files, runs ingest, writes timestamped JSON reports.
LIVE▼
| Flag | Description | Type |
|---|---|---|
| (none) | Run once. Scan, copy, ingest. Standard nightly run. | default |
| --dry-run | Scan and report without acting. Preview before a major run. | optional |
| --watch | Continuous watch mode on interval. | optional |
| --interval N | Minutes between watch-mode sweeps. Default: 60. | optional |
Nightly sweep (Task Scheduler target)
$ python dex-sweep.py
# → sweep-reports/sweep_2026-03-15_0300.json
# → sweep-reports/sweep_2026-03-15_0300.json
Full 23-type extension set · Indentation bug fixed (copy_to_corpus was silently broken) · Timeout 600s · JSON reports: files_found, files_copied, files_skipped, source_folders, sizes, ingestion_status
Utility Scripts
dex-acquire.py
Topical acquisition. Fetches URLs by topic scoring, writes to any named collection.
UTILITY▼
Crawls approved domains for topical relevance. Scores against query embedding. Ingests above-threshold results into the specified collection with provenance metadata.
dex-fetch.py
URL fetch and ingest. Used for vetted external creator content.
UTILITY▼
Single-URL ingest path. Fetches, extracts text, chunks, embeds, writes to the target collection. Preferred for council-approved creator additions to ext_creator.
dex-search-api.py
FastAPI endpoint at :8787. Serves semantic search queries against production collections.
UTILITY · API▼
HTTP interface to the corpus. Used by MindFrame on the DDL site and by any service that needs to query the rig without spawning a shell. Returns ranked chunks with similarity scores and source metadata.
dex-whisper.py
Video/audio transcription pipeline. Used for long-form recording ingestion.
UTILITY▼
Whisper-based transcription. Input: video/audio directory. Output: text transcripts routed to DDL-Standards-Canon/video_transcripts/ for ingest by dex-ingest.py. Supports incremental runs via --skip-existing.
dex-ocr.py
OCR pipeline (Tesseract). Used for iCloud DirectScreens and image-based document ingestion.
UTILITY▼
Tesseract-backed OCR. Picks up images from iCloud DirectScreens drops, extracts text, writes to DDL-Standards-Canon, and triggers dex-ingest.py. Required dependency: Tesseract at C:\Program Files\Tesseract-OCR\tesseract.exe.
Modelfile Version History
| Version | Deployed | Status | Summary |
|---|---|---|---|
| v4.1 | 2026-03-09 | Superseded | Baseline. Timeout + persona fixes. Both fix targets open. |
| v4.2 | 2026-03-13 | Superseded | CR- posture over-trigger hardened — prefix-only trigger. Fix 1: PASS |
| v4.3 | 2026-03-13 | DISCARDED | Category scaffold attempted. Fix 1 regressed. Rolled back immediately. |
| v4.4 | 2026-03-13 | Superseded | Binary gate added. Fix 1 holds. Fix 2: partial pass only. |
| v4.5 | 2026-03-13 | Superseded | Hard stop on Step 3b. Fix 1: PASS · Fix 2: PASS |
| v4.6 ★ | 2026-03-14 | CURRENT | Search query over-trigger fixed. Fix 3: PASS · OBS-DJ-004 (synthesis confabulation) open → v4.7 |
Corpus Collections
| Collection | Weight | Status | Contents |
|---|---|---|---|
| dex_canon | 1.00 | LIVE | Ratified governance — standards, protocols, council verdicts, ADRs |
| ddl_archive | 0.65 | LIVE | Full historical RAW — threads, messages, session logs |
| dex_code | 0.85 | LIVE | All DDL code files — .py .ts .tsx .jsx .js .cs .sql and more |
| ext_creator | 0.85 | LIVE | Approved external creator voices — 922 chunks ingested |
| ext_reference | 0.75 | PROVISIONED | Empty — awaiting curation policy. Target: council-approved external reference texts. |
| dex_decisions | 0.95 | PLANNED | Decision ledger — ADR-CORPUS-001 is the first artifact. Highest build priority. |
| dex_lore | 0.95 | PLANNED | DexVerse origin docs, council profiles, DEXLORE narrative |
| dex_canonpress | 0.85 | PLANNED | CanonPress articles across all six series |
| dex_auditforge | 0.85 | PLANNED | AuditForge schema, API routes, council reviews |
| dex_blindspot | 0.85 | PLANNED | BlindSpot schema and behavioral analytics content |
| dex_site | 0.80 | PLANNED | DDL site JSX/TSX components and routes |
| dex_dave | 0.90 | PLANNED | Operator voice — hard-gated per ADR-CORPUS-001 Rule 3. Isolated from governance queries. |
| dex_graveyard | 0.80 | PLANNED | Anti-patterns only — manual --collection flag, never in default routes |
Infrastructure
REBORN (Primary)
Local: 192.168.0.198
Tailscale: 100.117.38.55
User: dexjr
GPU: RTX 3070 8GB
Ollama: 8 models · :11434
GAMINGLAPTOP (Node 2)
Local: 192.168.0.210
Tailscale: pending
GPU: RTX 3060
Route: --node laptop
Env: OLLAMA_CHAT_URL_LAPTOP
WORKINGSURFACE
Tailscale: 100.92.99.115
User: dkitc
Role: operator terminal
Git push: primary machine
DEX JR. (Seat 1010)
Model: qwen2.5-coder:7b
Modelfile: v4.6 CURRENT
Judgment: ~92%
Next: v4.7 OBS-DJ-004
CHROMADB
dex_canon: 253,978
ddl_archive: 291,520
dex_code: 20,384
ext_creator: 922
Total: 566,804
GIT WORKFLOW
cd C:\Users\dexjr\dex-raggit pullPush from Surface (dkitc)git add . && git commit -m "msg"git push
Path Reference
Scripts
C:\Users\dexjr\dex-rag\
Prompts
C:\Users\dexjr\dex-rag\prompts\
Council Runs
C:\Users\dexjr\dex-rag\council-runs\
Sweep Reports
C:\Users\dexjr\dex-rag\sweep-reports\
Bridge Ingest
C:\Users\dexjr\dex-rag\bridge-ingest\
ChromaDB
C:\Users\dkitc\.dex-jr\chromadb\
Backup
D:\DDL_Backup\chromadb\
Archive
C:\Users\dexjr\99_DexUniverseArchive\
AutoCouncil Live
C:\...\00_Archive\AutoCouncil-Live\
Canon Dir
C:\...\00_Archive\DDL-Standards-Canon\
Ingest Drop
C:\Users\dkitc\Downloads\DDL_Ingest\
GitHub Repo
github.com/dropdownlogistics/dex-rag
Navigate the Vault
01 — THE CORPUS
Half a Million Chunks
What these scripts built. 566,804 chunks. Every command on this page feeds into it.
Explore the Corpus →
02 — THE COUNCIL
Ten Seats. Three Verdicts.
dex-council.py runs the local version. Seat 1010 synthesizes. Nine cloud seats deliberate in parallel.
Meet the Council →
03 — THE METHOD
Chaos → Structured → Automated
These scripts are the Automated phase. The corpus is Structured. The raw archives were Chaos.
Understand the Method →
04 — THE PRODUCTS
Three Products. One Rig.
All three feed the corpus. The corpus feeds Dex Jr. The loop is the architecture.
See the Products →