@alextis59/athena 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/cli/help.js +1 -1
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +119 -6
- package/dist/cli/run.js.map +1 -1
- package/dist/indexer/index.d.ts +1 -1
- package/dist/indexer/index.d.ts.map +1 -1
- package/dist/indexer/run.d.ts +16 -1
- package/dist/indexer/run.d.ts.map +1 -1
- package/dist/indexer/run.js +160 -2
- package/dist/indexer/run.js.map +1 -1
- package/dist/parsers/pdf2llm.d.ts +2 -2
- package/dist/parsers/pdf2llm.js +1 -1
- package/package.json +5 -4
- package/docs/QUALITY.md +0 -137
- package/docs/SECURITY.md +0 -140
- package/docs/adr/0001-sqlite-driver.md +0 -23
- package/docs/agentic-rag-specifications.md +0 -670
- package/docs/agentic-rag-study.md +0 -1056
- package/docs/exec-plans/template.md +0 -67
- package/docs/implementation-plan.md +0 -1433
- package/docs/index.md +0 -61
- package/docs/mcp-integration.md +0 -227
- package/docs/tech-debt-tracker.md +0 -21
- package/docs/validation-corpus.md +0 -71
|
@@ -1,1433 +0,0 @@
|
|
|
1
|
-
# Athena Implementation Plan
|
|
2
|
-
|
|
3
|
-
Date: 2026-07-03
|
|
4
|
-
|
|
5
|
-
Related documents:
|
|
6
|
-
|
|
7
|
-
- [Agentic RAG Tool Design Study](./agentic-rag-study.md)
|
|
8
|
-
- [Agentic RAG Tool Specifications](./agentic-rag-specifications.md)
|
|
9
|
-
|
|
10
|
-
## Purpose
|
|
11
|
-
|
|
12
|
-
This document turns the study and specifications into a step-by-step execution
|
|
13
|
-
plan for building `athena`, the local-first documentation RAG command.
|
|
14
|
-
|
|
15
|
-
It is also the project progress ledger. Update the checkboxes as implementation
|
|
16
|
-
work lands, and only mark an item complete when the matching proof command,
|
|
17
|
-
test, or manual validation has passed.
|
|
18
|
-
|
|
19
|
-
## Ground Rules
|
|
20
|
-
|
|
21
|
-
- The project name is `athena`.
|
|
22
|
-
- The npm package name is `@alextis59/athena`.
|
|
23
|
-
- The CLI binary name is `athena`.
|
|
24
|
-
- `npx @alextis59/athena` is only the package-run invocation.
|
|
25
|
-
- Runtime cache lives in `.athena/`.
|
|
26
|
-
- Athena owns the agentic loop. No agent SDK should control tool selection,
|
|
27
|
-
tool execution, step limits, memory, streaming, or citation validation.
|
|
28
|
-
- `pdf-2-llm` is the canonical PDF ingestion dependency.
|
|
29
|
-
- Local operation is the default. Remote model or embedding providers require
|
|
30
|
-
explicit user configuration.
|
|
31
|
-
- Citations are product data, not display-only strings.
|
|
32
|
-
- MCP and external coding-agent support are integrations, not the core runtime.
|
|
33
|
-
|
|
34
|
-
## Progress Snapshot
|
|
35
|
-
|
|
36
|
-
- [x] Study document committed.
|
|
37
|
-
- [x] Specifications document committed.
|
|
38
|
-
- [x] Implementation plan created.
|
|
39
|
-
- [x] Validation document corpus retrieved and locked.
|
|
40
|
-
- [x] Code scaffold created.
|
|
41
|
-
- [x] First runnable `athena` command available.
|
|
42
|
-
- [x] Markdown-only local RAG MVP complete.
|
|
43
|
-
- [x] Local embeddings and hybrid search complete.
|
|
44
|
-
- [x] PDF RAG with `pdf-2-llm` complete.
|
|
45
|
-
- [x] Evaluation harness complete.
|
|
46
|
-
- [x] MCP bridge complete.
|
|
47
|
-
|
|
48
|
-
## Completion Policy
|
|
49
|
-
|
|
50
|
-
For this plan, "done" means all of the following are true:
|
|
51
|
-
|
|
52
|
-
- the implementation exists in the repository;
|
|
53
|
-
- automated tests or documented manual checks pass;
|
|
54
|
-
- behavior matches the specifications;
|
|
55
|
-
- citations remain source-backed;
|
|
56
|
-
- the work is committed;
|
|
57
|
-
- this file has been updated with checked items and proof notes.
|
|
58
|
-
|
|
59
|
-
Do not check off implementation items for partial scaffolding unless the item
|
|
60
|
-
explicitly says it is scaffolding.
|
|
61
|
-
|
|
62
|
-
## Milestone 0: Repository Foundation
|
|
63
|
-
|
|
64
|
-
Goal: establish a maintainable Node/TypeScript project with a real `athena`
|
|
65
|
-
binary, repeatable local checks, and a clear module layout.
|
|
66
|
-
|
|
67
|
-
### 0.1 Package and Tooling
|
|
68
|
-
|
|
69
|
-
- [x] Decide the package manager and lockfile policy.
|
|
70
|
-
Proof: repository contains one committed lockfile or an explicit decision
|
|
71
|
-
note explaining why no lockfile is committed yet.
|
|
72
|
-
- [x] Create `package.json` with package name, `bin.athena`, module type, and
|
|
73
|
-
public/private package decision.
|
|
74
|
-
Proof: `npm pkg get name bin` shows the expected package and binary fields.
|
|
75
|
-
- [x] Add TypeScript configuration.
|
|
76
|
-
Proof: `npm run typecheck` runs and reports no compiler errors.
|
|
77
|
-
- [x] Add source formatting and linting commands.
|
|
78
|
-
Proof: `npm run lint` and formatting checks run locally.
|
|
79
|
-
- [x] Add test runner setup.
|
|
80
|
-
Proof: `npm test` runs at least one smoke test.
|
|
81
|
-
- [x] Add build script that emits runnable CLI output.
|
|
82
|
-
Proof: `npm run build` completes and creates the expected distribution files.
|
|
83
|
-
- [x] Add `.gitignore` entries for local build artifacts, model caches, and
|
|
84
|
-
`.athena/` runtime indexes.
|
|
85
|
-
Proof: `git status --short` stays clean after running build and basic index
|
|
86
|
-
commands.
|
|
87
|
-
|
|
88
|
-
### 0.2 Project Layout
|
|
89
|
-
|
|
90
|
-
- [x] Create the baseline `src/` layout:
|
|
91
|
-
`cli/`, `config/`, `storage/`, `indexer/`, `parsers/`, `retrieval/`,
|
|
92
|
-
`embeddings/`, `agent/`, `server/`, `ui/`, and `mcp/`.
|
|
93
|
-
Proof: source folders exist and are referenced by the build.
|
|
94
|
-
- [x] Add stable shared types for sources, documents, chunks, locators,
|
|
95
|
-
citations, parser artifacts, tool results, and provider events.
|
|
96
|
-
Proof: typecheck exercises imports across at least two modules.
|
|
97
|
-
- [x] Add central error types for user-facing CLI failures and internal failures.
|
|
98
|
-
Proof: CLI smoke tests can assert exit code and message shape.
|
|
99
|
-
- [x] Add internal logging helpers with quiet/default/debug modes.
|
|
100
|
-
Proof: a test or smoke command verifies log level filtering.
|
|
101
|
-
|
|
102
|
-
### 0.3 CLI Shell
|
|
103
|
-
|
|
104
|
-
- [x] Implement the top-level `athena` CLI entrypoint.
|
|
105
|
-
Proof: `node dist/cli/main.js --help` or equivalent displays Athena help.
|
|
106
|
-
- [x] Add subcommands: default, `index`, `serve`, `ask`, `doctor`, and `mcp`.
|
|
107
|
-
Proof: each subcommand appears in CLI help.
|
|
108
|
-
- [x] Add common options: `--root`, `--config`, `--db`, `--host`, `--port`,
|
|
109
|
-
`--debug`, and `--json` where applicable.
|
|
110
|
-
Proof: CLI parser tests cover option parsing and default values.
|
|
111
|
-
- [x] Add process exit-code policy for user errors, runtime failures, and
|
|
112
|
-
interrupted commands.
|
|
113
|
-
Proof: tests cover at least one success and one failure path.
|
|
114
|
-
|
|
115
|
-
Milestone 0 proof, 2026-07-03:
|
|
116
|
-
|
|
117
|
-
- `npm pkg get name bin type main types scripts` reported package name
|
|
118
|
-
`@alextis59/athena`, binary `./dist/cli/main.js`, ESM module type,
|
|
119
|
-
declaration entry, and build/lint/test/typecheck scripts.
|
|
120
|
-
- `npm run format:check` passed.
|
|
121
|
-
- `npm run lint` passed.
|
|
122
|
-
- `npm run typecheck` passed.
|
|
123
|
-
- `npm test` passed 6 smoke tests.
|
|
124
|
-
- `npm run build` passed.
|
|
125
|
-
- `node dist/cli/main.js --help` displayed Athena help with `default`,
|
|
126
|
-
`index`, `serve`, `ask`, `doctor`, and `mcp`.
|
|
127
|
-
|
|
128
|
-
## Milestone 1: Configuration and Storage Core
|
|
129
|
-
|
|
130
|
-
Goal: load optional configuration, create `.athena/index.sqlite`, and maintain
|
|
131
|
-
versioned database state before indexing real documents.
|
|
132
|
-
|
|
133
|
-
### 1.1 Configuration
|
|
134
|
-
|
|
135
|
-
- [x] Implement config discovery for `athena.config.ts`,
|
|
136
|
-
`athena.config.mjs`, and `athena.config.json`.
|
|
137
|
-
Proof: tests load each supported config type from a fixture.
|
|
138
|
-
- [x] Add `defineConfig()` for typed user configuration.
|
|
139
|
-
Proof: TypeScript fixture imports `defineConfig` from the package.
|
|
140
|
-
- [x] Implement default config values matching the specifications.
|
|
141
|
-
Proof: snapshot or object tests verify include/exclude patterns, server
|
|
142
|
-
defaults, local embedding defaults, and PDF defaults.
|
|
143
|
-
- [x] Validate user config with clear errors.
|
|
144
|
-
Proof: invalid config fixture fails with field-level diagnostics.
|
|
145
|
-
- [x] Add remote-provider opt-in checks for embeddings and chat models.
|
|
146
|
-
Proof: tests verify document text cannot be sent remotely unless explicitly
|
|
147
|
-
configured.
|
|
148
|
-
|
|
149
|
-
### 1.2 Database Foundation
|
|
150
|
-
|
|
151
|
-
- [x] Select and document the SQLite driver.
|
|
152
|
-
Proof: a short decision note is added near storage code or in a committed
|
|
153
|
-
ADR-style comment/doc.
|
|
154
|
-
- [x] Create `.athena/` directory management.
|
|
155
|
-
Proof: `athena doctor --root <fixture>` reports missing and initialized cache
|
|
156
|
-
states clearly.
|
|
157
|
-
- [x] Add migration runner with schema version tracking.
|
|
158
|
-
Proof: migration tests create a fresh database and upgrade an older fixture.
|
|
159
|
-
- [x] Create required tables: `sources`, `documents`, `chunks`, `chunks_fts`,
|
|
160
|
-
`embeddings`, `runs`, `parser_artifacts`, `conversation_turns`, and
|
|
161
|
-
`answer_citations`.
|
|
162
|
-
Proof: schema test verifies all required tables and key columns.
|
|
163
|
-
- [x] Add indexes for source paths, hashes, chunk source IDs, embedding cache
|
|
164
|
-
keys, and citation lookups.
|
|
165
|
-
Proof: schema test checks required indexes.
|
|
166
|
-
- [x] Add transaction helper for index updates.
|
|
167
|
-
Proof: rollback test verifies partial index writes do not persist.
|
|
168
|
-
|
|
169
|
-
### 1.3 Doctor Command
|
|
170
|
-
|
|
171
|
-
- [x] Implement `athena doctor` database checks.
|
|
172
|
-
Proof: doctor output includes database status, schema version, and table
|
|
173
|
-
availability.
|
|
174
|
-
- [x] Add parser availability checks.
|
|
175
|
-
Proof: doctor reports `pdf-2-llm` availability without importing it during
|
|
176
|
-
non-PDF commands unnecessarily.
|
|
177
|
-
- [x] Add embedding provider diagnostics.
|
|
178
|
-
Proof: doctor reports local model cache state and configured provider.
|
|
179
|
-
- [x] Add UI port availability diagnostics.
|
|
180
|
-
Proof: test or manual check covers occupied and free port cases.
|
|
181
|
-
|
|
182
|
-
Milestone 1 proof, 2026-07-03:
|
|
183
|
-
|
|
184
|
-
- `npm run format:check` passed.
|
|
185
|
-
- `npm run lint` passed.
|
|
186
|
-
- `npm run typecheck` passed.
|
|
187
|
-
- `npm test` passed 16 tests covering config formats, typed `defineConfig`,
|
|
188
|
-
validation diagnostics, remote-provider opt-in, migrations, schema tables and
|
|
189
|
-
indexes, transaction rollback, doctor database states, and port diagnostics.
|
|
190
|
-
- `npm run build` passed.
|
|
191
|
-
- Built CLI check: `node dist/cli/main.js doctor --root <tmp> --port 4318`
|
|
192
|
-
reported a missing cache with schema unavailable.
|
|
193
|
-
- Built storage and doctor check: initializing the same temp root through
|
|
194
|
-
`initializeDatabase()` then running
|
|
195
|
-
`node dist/cli/main.js doctor --root <tmp> --port 4318 --json` reported
|
|
196
|
-
schema version 1 and all required tables/indexes present.
|
|
197
|
-
|
|
198
|
-
## Milestone 2: Validation Document Corpus Retrieval
|
|
199
|
-
|
|
200
|
-
Goal: collect a representative set of real and synthetic documents early, so
|
|
201
|
-
parser, indexing, retrieval, citation, PDF, and UI behavior are validated
|
|
202
|
-
against varied source material instead of only hand-made unit fixtures.
|
|
203
|
-
|
|
204
|
-
### 2.1 Corpus Policy and Manifest
|
|
205
|
-
|
|
206
|
-
- [x] Define where validation documents live.
|
|
207
|
-
Proof: a committed corpus note documents committed fixtures, downloaded
|
|
208
|
-
artifacts, ignored cache paths, and expected directory layout.
|
|
209
|
-
- [x] Define licensing and redistribution rules.
|
|
210
|
-
Proof: the corpus note distinguishes committed license-compatible samples
|
|
211
|
-
from download-only third-party documents.
|
|
212
|
-
- [x] Create a corpus manifest schema.
|
|
213
|
-
Proof: manifest entries include ID, document type, source URL or generator,
|
|
214
|
-
license, retrieval date, expected hash, size, language, and intended test
|
|
215
|
-
coverage.
|
|
216
|
-
- [x] Decide how large third-party files are cached.
|
|
217
|
-
Proof: the plan documents whether large files live under an ignored local
|
|
218
|
-
cache such as `.athena/corpus-cache/` or a dedicated ignored fixture cache.
|
|
219
|
-
- [x] Add checksum verification requirements for downloaded samples.
|
|
220
|
-
Proof: the retrieval plan rejects changed files unless the manifest is
|
|
221
|
-
intentionally updated.
|
|
222
|
-
|
|
223
|
-
### 2.2 Real Document Retrieval Targets
|
|
224
|
-
|
|
225
|
-
- [x] Retrieve Markdown documentation samples.
|
|
226
|
-
Proof: corpus manifest includes at least a README-style guide, an API
|
|
227
|
-
reference page, and a changelog or migration note.
|
|
228
|
-
- [x] Retrieve MDX documentation samples.
|
|
229
|
-
Proof: corpus includes MDX with headings, fenced code, imports, and embedded
|
|
230
|
-
JSX that should not be executed.
|
|
231
|
-
- [x] Retrieve plain text and extensionless documentation samples.
|
|
232
|
-
Proof: corpus includes files such as LICENSE, CHANGELOG, NOTICE, or CLI help
|
|
233
|
-
text with stable line ranges.
|
|
234
|
-
- [x] Retrieve reStructuredText documentation samples.
|
|
235
|
-
Proof: corpus includes RST headings, directives, lists, and code blocks.
|
|
236
|
-
- [x] Retrieve AsciiDoc documentation samples.
|
|
237
|
-
Proof: corpus includes AsciiDoc sections, lists, tables, and code blocks.
|
|
238
|
-
- [x] Retrieve HTML documentation samples.
|
|
239
|
-
Proof: corpus includes static HTML with navigation, scripts/styles that must
|
|
240
|
-
be ignored, headings, links, and code examples.
|
|
241
|
-
- [x] Retrieve born-digital PDF samples.
|
|
242
|
-
Proof: corpus includes searchable PDFs with paragraphs, headings, page
|
|
243
|
-
numbers, and extractable text.
|
|
244
|
-
- [x] Retrieve table-heavy PDF samples.
|
|
245
|
-
Proof: corpus includes PDFs where table sidecars and page-region citations
|
|
246
|
-
are necessary to answer validation questions.
|
|
247
|
-
- [x] Retrieve hard PDF samples.
|
|
248
|
-
Proof: corpus includes at least one malformed, encrypted, scanned,
|
|
249
|
-
low-confidence, or unsupported PDF case with expected warning behavior.
|
|
250
|
-
- [x] Retrieve mixed-language or non-English samples when practical.
|
|
251
|
-
Proof: corpus manifest records language and script coverage for any
|
|
252
|
-
multilingual, RTL, or CJK samples.
|
|
253
|
-
|
|
254
|
-
### 2.3 Synthetic Control Documents
|
|
255
|
-
|
|
256
|
-
- [x] Add synthetic documents with known answers and exact citations.
|
|
257
|
-
Proof: fixtures contain deterministic questions with expected path, line, or
|
|
258
|
-
page citations.
|
|
259
|
-
- [x] Add ambiguous-heading controls.
|
|
260
|
-
Proof: corpus contains repeated section titles across different files so
|
|
261
|
-
retrieval must use path and surrounding context.
|
|
262
|
-
- [x] Add exact-symbol controls.
|
|
263
|
-
Proof: corpus contains API names, CLI flags, environment variables, and
|
|
264
|
-
config keys that must rank above vague conceptual matches.
|
|
265
|
-
- [x] Add semantic-only controls.
|
|
266
|
-
Proof: corpus contains answerable questions where the relevant text does not
|
|
267
|
-
share exact query terms.
|
|
268
|
-
- [x] Add stale or superseded-document controls.
|
|
269
|
-
Proof: corpus includes old and current versions so ranking can penalize
|
|
270
|
-
superseded chunks.
|
|
271
|
-
|
|
272
|
-
### 2.4 Retrieval Script and Ground Truth
|
|
273
|
-
|
|
274
|
-
- [x] Add a corpus retrieval command or script.
|
|
275
|
-
Proof: one command downloads or generates the corpus into the documented
|
|
276
|
-
location without modifying source implementation files.
|
|
277
|
-
- [x] Add offline fallback behavior.
|
|
278
|
-
Proof: the command can verify an already-cached corpus without network
|
|
279
|
-
access.
|
|
280
|
-
- [x] Add ground-truth question files.
|
|
281
|
-
Proof: every required document type has at least one question with expected
|
|
282
|
-
answer facts and citation targets.
|
|
283
|
-
- [x] Add negative questions.
|
|
284
|
-
Proof: ground truth includes questions that should be refused or marked
|
|
285
|
-
unsupported because the answer is absent from the corpus.
|
|
286
|
-
- [x] Add corpus health reporting.
|
|
287
|
-
Proof: the retrieval command reports document counts by type, hash status,
|
|
288
|
-
missing files, and license/redistribution status.
|
|
289
|
-
|
|
290
|
-
### 2.5 Corpus Acceptance
|
|
291
|
-
|
|
292
|
-
- [x] Corpus covers every first-class document type.
|
|
293
|
-
Proof: health output reports Markdown, MDX, text, extensionless, RST,
|
|
294
|
-
AsciiDoc, HTML, and PDF samples.
|
|
295
|
-
- [x] Corpus includes realistic real-world documents.
|
|
296
|
-
Proof: manifest contains source URLs, retrieval dates, and checksums for
|
|
297
|
-
downloaded documents.
|
|
298
|
-
- [x] Corpus includes deterministic synthetic controls.
|
|
299
|
-
Proof: committed fixtures and ground-truth files make parser and retrieval
|
|
300
|
-
failures reproducible.
|
|
301
|
-
- [x] Corpus can be refreshed intentionally.
|
|
302
|
-
Proof: manifest update workflow records changed hashes and review notes.
|
|
303
|
-
- [x] Corpus can validate the MVP before embeddings exist.
|
|
304
|
-
Proof: at least one Markdown/text/RST/AsciiDoc/HTML question set is answerable
|
|
305
|
-
through lexical retrieval only.
|
|
306
|
-
- [x] Corpus can validate PDF behavior once `pdf-2-llm` is integrated.
|
|
307
|
-
Proof: PDF question set requires page, region, confidence, warning, and table
|
|
308
|
-
sidecar metadata where applicable.
|
|
309
|
-
|
|
310
|
-
Milestone 2 proof, 2026-07-03:
|
|
311
|
-
|
|
312
|
-
- `test/corpus/manifest.schema.json` defines the manifest schema.
|
|
313
|
-
- `docs/validation-corpus.md` documents committed fixtures, ignored download
|
|
314
|
-
cache paths, licensing, redistribution policy, checksum policy, and refresh
|
|
315
|
-
workflow.
|
|
316
|
-
- `npm run corpus:retrieve` downloaded or verified 19 entries: Markdown,
|
|
317
|
-
MDX, text, extensionless, RST, AsciiDoc, HTML, PDF, and French HTML
|
|
318
|
-
non-English coverage.
|
|
319
|
-
- `npm run corpus:health` verified the already-cached corpus offline with
|
|
320
|
-
`Hash status: ok=19`.
|
|
321
|
-
- `npm test` passed manifest and ground-truth coverage tests, including
|
|
322
|
-
negative-question coverage and every first-class document type.
|
|
323
|
-
|
|
324
|
-
## Milestone 3: File Discovery and Incremental Indexing
|
|
325
|
-
|
|
326
|
-
Goal: discover supported docs, skip unchanged files, and record source metadata
|
|
327
|
-
deterministically.
|
|
328
|
-
|
|
329
|
-
### 3.1 Discovery
|
|
330
|
-
|
|
331
|
-
- [x] Implement file discovery from the configured root.
|
|
332
|
-
Proof: fixture test returns Markdown, MDX, text, RST, AsciiDoc, HTML, PDF, and
|
|
333
|
-
extensionless documentation files.
|
|
334
|
-
- [x] Apply default exclusions: `.git/**`, `node_modules/**`, `.athena/**`,
|
|
335
|
-
`dist/**`, `build/**`, `coverage/**`, and unsupported binary files.
|
|
336
|
-
Proof: discovery fixture confirms excluded paths are omitted.
|
|
337
|
-
- [x] Add include/exclude override support from config.
|
|
338
|
-
Proof: tests cover custom include and exclude patterns.
|
|
339
|
-
- [x] Normalize paths to stable repository-relative paths.
|
|
340
|
-
Proof: tests pass on paths with nested directories and spaces.
|
|
341
|
-
- [x] Classify file kind before parsing.
|
|
342
|
-
Proof: tests map extensions and extensionless names to expected kinds.
|
|
343
|
-
|
|
344
|
-
### 3.2 Hashing and Source State
|
|
345
|
-
|
|
346
|
-
- [x] Hash source bytes for every discovered file.
|
|
347
|
-
Proof: tests verify changed contents alter the hash.
|
|
348
|
-
- [x] Store path, kind, size, mtime, hash, parser name, parser version, parser
|
|
349
|
-
options hash, and indexed timestamp.
|
|
350
|
-
Proof: database tests inspect inserted `sources` rows.
|
|
351
|
-
- [x] Skip unchanged files on repeat indexing.
|
|
352
|
-
Proof: `athena index` run twice against a fixture reports zero changed files
|
|
353
|
-
on the second run.
|
|
354
|
-
- [x] Reindex changed files and delete stale chunks.
|
|
355
|
-
Proof: modifying one fixture file only replaces that file's document and
|
|
356
|
-
chunk rows.
|
|
357
|
-
- [x] Remove index rows for deleted files.
|
|
358
|
-
Proof: deleting a fixture source removes its source, document, chunks,
|
|
359
|
-
embeddings, parser artifacts, and FTS rows.
|
|
360
|
-
|
|
361
|
-
### 3.3 Index Command
|
|
362
|
-
|
|
363
|
-
- [x] Implement `athena index`.
|
|
364
|
-
Proof: command exits zero after indexing a Markdown fixture.
|
|
365
|
-
- [x] Add progress output for discovered, skipped, parsed, embedded, failed, and
|
|
366
|
-
committed counts.
|
|
367
|
-
Proof: CLI snapshot or manual output includes all count fields.
|
|
368
|
-
- [x] Add `--json` output mode for automation.
|
|
369
|
-
Proof: command emits parseable JSON with the same counts.
|
|
370
|
-
- [x] Exit non-zero on parser, migration, or embedding failures.
|
|
371
|
-
Proof: fixture with forced parser failure returns a non-zero exit code.
|
|
372
|
-
- [x] Persist run metadata in `runs`.
|
|
373
|
-
Proof: database test verifies run status and timestamps.
|
|
374
|
-
|
|
375
|
-
Milestone 3 proof, 2026-07-03:
|
|
376
|
-
|
|
377
|
-
- `npm run format:check` passed.
|
|
378
|
-
- `npm run lint` passed.
|
|
379
|
-
- `npm run typecheck` passed.
|
|
380
|
-
- `npm test` passed 24 tests, including kind classification, default
|
|
381
|
-
exclusions, include/exclude overrides, hash changes, repeat indexing skips,
|
|
382
|
-
changed-file updates, deleted-file cleanup, non-zero database failure, and
|
|
383
|
-
persisted run metadata.
|
|
384
|
-
- `npm run build` passed.
|
|
385
|
-
- Built CLI check: indexing a temp root with `README.md` and `docs/guide.md`
|
|
386
|
-
returned JSON with `discovered=2`, `committed=2`, then a second run returned
|
|
387
|
-
`skipped=2`, and SQLite contained 2 sources plus 2 index runs.
|
|
388
|
-
|
|
389
|
-
## Milestone 4: Text Document Parsing and Source-Aware Chunking
|
|
390
|
-
|
|
391
|
-
Goal: convert non-PDF documentation into chunks with stable line and heading
|
|
392
|
-
locators.
|
|
393
|
-
|
|
394
|
-
### 4.1 Markdown and MDX
|
|
395
|
-
|
|
396
|
-
- [x] Implement Markdown parser with line positions.
|
|
397
|
-
Proof: parser tests produce document text and heading path metadata.
|
|
398
|
-
- [x] Preserve fenced code blocks as searchable text.
|
|
399
|
-
Proof: fixture query can find an identifier inside a code block.
|
|
400
|
-
- [x] Preserve heading hierarchy for chunk metadata.
|
|
401
|
-
Proof: chunks include heading paths such as `Authentication > Tokens`.
|
|
402
|
-
- [x] Support MDX files without executing embedded code.
|
|
403
|
-
Proof: MDX fixture parses safely and stores line ranges.
|
|
404
|
-
- [x] Store parser warnings for malformed or partially parsed documents.
|
|
405
|
-
Proof: fixture with malformed Markdown records a warning without crashing.
|
|
406
|
-
|
|
407
|
-
### 4.2 Plain Text and Markup Formats
|
|
408
|
-
|
|
409
|
-
- [x] Implement `.txt` and extensionless documentation parser.
|
|
410
|
-
Proof: README and CHANGELOG-style fixtures produce line-located chunks.
|
|
411
|
-
- [x] Implement `.rst` parser fallback.
|
|
412
|
-
Proof: RST fixture indexes headings and body text.
|
|
413
|
-
- [x] Implement `.adoc` parser fallback.
|
|
414
|
-
Proof: AsciiDoc fixture indexes headings and body text.
|
|
415
|
-
- [x] Implement HTML parser that extracts visible text and heading structure.
|
|
416
|
-
Proof: HTML fixture omits scripts/styles and includes visible headings.
|
|
417
|
-
- [x] Store normalized text separately from source text when useful for search.
|
|
418
|
-
Proof: database row includes both text and normalized text fields.
|
|
419
|
-
|
|
420
|
-
### 4.3 Chunking
|
|
421
|
-
|
|
422
|
-
- [x] Implement deterministic chunking with target size, overlap, and hard
|
|
423
|
-
maximum controls.
|
|
424
|
-
Proof: chunking tests are stable across repeated runs.
|
|
425
|
-
- [x] Keep chunks within source-aware boundaries when possible.
|
|
426
|
-
Proof: headings, lists, tables, and code blocks are not split unnecessarily in
|
|
427
|
-
fixtures.
|
|
428
|
-
- [x] Store locators as structured JSON.
|
|
429
|
-
Proof: chunk rows include line ranges for text-like files.
|
|
430
|
-
- [x] Estimate token counts per chunk.
|
|
431
|
-
Proof: chunk rows contain token estimates and tests cover long documents.
|
|
432
|
-
- [x] Add neighboring chunk relationships by source and ordinal.
|
|
433
|
-
Proof: retrieval tests can fetch before/after chunks.
|
|
434
|
-
|
|
435
|
-
Milestone 4 proof, 2026-07-03:
|
|
436
|
-
|
|
437
|
-
- `npm run format:check` passed.
|
|
438
|
-
- `npm run lint` passed.
|
|
439
|
-
- `npm run typecheck` passed.
|
|
440
|
-
- `npm test` passed 30 tests, including Markdown/MDX parsing, malformed
|
|
441
|
-
Markdown warnings, plain text, RST, AsciiDoc, HTML script/style omission,
|
|
442
|
-
deterministic chunking, indexed documents/chunks, structured line locators,
|
|
443
|
-
token estimates, and previous/next chunk IDs.
|
|
444
|
-
- `npm run build` passed.
|
|
445
|
-
- Built CLI check: indexing a temp Markdown root returned `parsed=1`,
|
|
446
|
-
`committed=1`, and SQLite contained one document plus a line-located chunk
|
|
447
|
-
with title `Auth`.
|
|
448
|
-
|
|
449
|
-
## Milestone 5: Lexical Retrieval and Core Tools
|
|
450
|
-
|
|
451
|
-
Goal: make indexed Markdown searchable and expose citation-aware tools before
|
|
452
|
-
adding semantic search.
|
|
453
|
-
|
|
454
|
-
### 5.1 SQLite FTS5
|
|
455
|
-
|
|
456
|
-
- [x] Create and populate `chunks_fts`.
|
|
457
|
-
Proof: schema and indexing tests verify FTS rows for each searchable chunk.
|
|
458
|
-
- [x] Implement lexical search with ranking and snippets.
|
|
459
|
-
Proof: exact symbol fixture returns the expected chunk first.
|
|
460
|
-
- [x] Add path-prefix and kind filters.
|
|
461
|
-
Proof: retrieval tests restrict results by `docs/` and `markdown`.
|
|
462
|
-
- [x] Boost heading and exact identifier matches.
|
|
463
|
-
Proof: ranking fixture places heading match above body-only match.
|
|
464
|
-
- [x] Penalize stale or superseded chunks.
|
|
465
|
-
Proof: stale chunk fixture does not appear in normal retrieval results.
|
|
466
|
-
|
|
467
|
-
### 5.2 Tool Runtime
|
|
468
|
-
|
|
469
|
-
- [x] Define JSON schemas for `searchDocs`, `readSourceRange`, `grepDocs`,
|
|
470
|
-
`listDocs`, and `relatedChunks`.
|
|
471
|
-
Proof: tool schema tests validate accepted and rejected inputs.
|
|
472
|
-
- [x] Implement `searchDocs` over FTS-only retrieval for this milestone.
|
|
473
|
-
Proof: tool test returns chunk IDs, paths, headings, snippets, scores, and
|
|
474
|
-
locators.
|
|
475
|
-
- [x] Implement `readSourceRange`.
|
|
476
|
-
Proof: tool test reads exact line ranges from indexed source files.
|
|
477
|
-
- [x] Implement `grepDocs` for exact string and bounded regex search.
|
|
478
|
-
Proof: tool test finds identifiers and rejects unsafe or unbounded patterns.
|
|
479
|
-
- [x] Implement `listDocs`.
|
|
480
|
-
Proof: tool test lists indexed sources filtered by path prefix and kind.
|
|
481
|
-
- [x] Implement `relatedChunks`.
|
|
482
|
-
Proof: tool test returns configured neighbors around a chunk ID.
|
|
483
|
-
- [x] Track which chunks and source ranges are retrieved or read during a turn.
|
|
484
|
-
Proof: citation validation tests can distinguish seen and unseen sources.
|
|
485
|
-
|
|
486
|
-
Milestone 5 proof, 2026-07-03:
|
|
487
|
-
|
|
488
|
-
- `npm run format:check` passed.
|
|
489
|
-
- `npm run lint` passed.
|
|
490
|
-
- `npm run typecheck` passed.
|
|
491
|
-
- `npm test` passed 33 tests, including FTS population, exact-symbol ranking,
|
|
492
|
-
path/kind filters, stale-result penalty, tool schemas, `searchDocs`,
|
|
493
|
-
`readSourceRange`, `grepDocs`, `listDocs`, `relatedChunks`, and per-turn
|
|
494
|
-
retrieval/read trace tracking.
|
|
495
|
-
- `npm run build` passed.
|
|
496
|
-
|
|
497
|
-
## Milestone 6: Local Server and Chat UI Shell
|
|
498
|
-
|
|
499
|
-
Goal: launch a local UI that can inspect the index, search sources, and display
|
|
500
|
-
citations before the full agent loop is enabled.
|
|
501
|
-
|
|
502
|
-
### 6.1 Server
|
|
503
|
-
|
|
504
|
-
- [x] Implement `athena serve`.
|
|
505
|
-
Proof: command starts an HTTP server bound to `127.0.0.1` by default.
|
|
506
|
-
- [x] Add configurable host and port.
|
|
507
|
-
Proof: server tests or manual checks verify configured binding.
|
|
508
|
-
- [x] Add index status endpoint.
|
|
509
|
-
Proof: endpoint returns schema version, source counts, chunk counts, and last
|
|
510
|
-
run status.
|
|
511
|
-
- [x] Add retrieval endpoints backed by the core tools.
|
|
512
|
-
Proof: API tests search, read source ranges, and list docs.
|
|
513
|
-
- [x] Add source preview endpoint with path validation.
|
|
514
|
-
Proof: tests reject path traversal and unknown files.
|
|
515
|
-
- [x] Add graceful shutdown handling.
|
|
516
|
-
Proof: integration test or manual check confirms process exits cleanly.
|
|
517
|
-
|
|
518
|
-
### 6.2 UI
|
|
519
|
-
|
|
520
|
-
- [x] Create chat panel shell.
|
|
521
|
-
Proof: HTTP UI smoke test fetches the chat surface from the live local
|
|
522
|
-
server.
|
|
523
|
-
- [x] Add index status indicator.
|
|
524
|
-
Proof: UI shows ready, stale, indexing, and error states from fixtures or
|
|
525
|
-
mocked responses.
|
|
526
|
-
- [x] Add source citation list.
|
|
527
|
-
Proof: UI contract test includes citation actions and source metadata fields.
|
|
528
|
-
- [x] Add source preview panel for text line ranges.
|
|
529
|
-
Proof: API test reads exact Markdown lines, and UI contract test includes the
|
|
530
|
-
preview panel and line-open action.
|
|
531
|
-
- [x] Add retrieval trace drawer.
|
|
532
|
-
Proof: search API returns selected chunk trace data, and UI contract test
|
|
533
|
-
includes the trace panel.
|
|
534
|
-
- [x] Add source filter controls.
|
|
535
|
-
Proof: API test verifies path and kind filtering, and UI contract test
|
|
536
|
-
includes the controls.
|
|
537
|
-
- [x] Preserve copied answer citations.
|
|
538
|
-
Proof: copy action includes citation labels in copied text.
|
|
539
|
-
|
|
540
|
-
Milestone 6 proof, 2026-07-03:
|
|
541
|
-
|
|
542
|
-
- `npm run format:check` passed.
|
|
543
|
-
- `npm run lint` passed.
|
|
544
|
-
- `npm run typecheck` passed.
|
|
545
|
-
- `npm test` passed 35 tests, including a live `startAthenaServer()` integration
|
|
546
|
-
test for `/`, `/api/status`, `/api/search`, `/api/read`, `/api/docs`,
|
|
547
|
-
`/api/grep`, `/api/related`, and `/api/source`.
|
|
548
|
-
- `npm run build` passed.
|
|
549
|
-
- Built-output smoke passed: `node dist/cli/main.js index --root <tmp> --json`
|
|
550
|
-
committed one Markdown source, `startAthenaServer()` from `dist/index.js`
|
|
551
|
-
served the UI, and `/api/search?q=ATHENA_INDEX_BATCH_SIZE` returned
|
|
552
|
-
`docs/guide.md`.
|
|
553
|
-
|
|
554
|
-
Milestone 6 UI status and copy proof, 2026-07-03:
|
|
555
|
-
|
|
556
|
-
- `npm run typecheck` passed.
|
|
557
|
-
- Focused
|
|
558
|
-
`npm test -- --test-name-pattern "server exposes status|deriveIndexStatusIndicator|renderAppHtml"`
|
|
559
|
-
passed 59 tests, including the `/api/status` ready indicator,
|
|
560
|
-
ready/stale/indexing/error status-state derivation, status indicator markup,
|
|
561
|
-
and copy behavior that sends snippet text plus a bracketed citation label to
|
|
562
|
-
the clipboard helper.
|
|
563
|
-
|
|
564
|
-
## Milestone 7: Custom Agent Loop and Markdown RAG MVP
|
|
565
|
-
|
|
566
|
-
Goal: answer questions from Markdown sources using Athena-owned tool calling and
|
|
567
|
-
citation validation.
|
|
568
|
-
|
|
569
|
-
### 7.1 Model Provider Interface
|
|
570
|
-
|
|
571
|
-
- [x] Define `ModelProvider.streamResponse()`.
|
|
572
|
-
Proof: type tests or unit tests exercise streamed message, tool-call, and
|
|
573
|
-
completion events.
|
|
574
|
-
- [x] Implement a first chat-generation provider adapter.
|
|
575
|
-
Proof: configured provider can stream a simple answer in an integration
|
|
576
|
-
check.
|
|
577
|
-
- [x] Keep provider SDKs behind adapters only.
|
|
578
|
-
Proof: the agent loop imports Athena interfaces, not provider-owned agent
|
|
579
|
-
runtimes.
|
|
580
|
-
- [x] Add model configuration and environment validation.
|
|
581
|
-
Proof: missing credentials or model settings fail with actionable messages.
|
|
582
|
-
- [x] Add deterministic fake provider for tests.
|
|
583
|
-
Proof: agent loop tests run without network access.
|
|
584
|
-
|
|
585
|
-
Milestone 7.1 proof, 2026-07-03:
|
|
586
|
-
|
|
587
|
-
- `npm run typecheck` passed.
|
|
588
|
-
- `npm run lint` passed.
|
|
589
|
-
- Provider-focused `npm test -- --test-name-pattern
|
|
590
|
-
"ModelProvider|Ollama|FakeModelProvider|validateModelProviderConfig"` passed
|
|
591
|
-
38 tests, including scripted fake-provider events, model config validation,
|
|
592
|
-
and an Ollama adapter stream using a fake `fetch`.
|
|
593
|
-
|
|
594
|
-
### 7.2 Loop Execution
|
|
595
|
-
|
|
596
|
-
- [x] Build model messages from the current question, compact memory, and
|
|
597
|
-
retrieval policy.
|
|
598
|
-
Proof: tests inspect message construction for first and follow-up turns.
|
|
599
|
-
- [x] Expose Athena tool schemas to the model.
|
|
600
|
-
Proof: test verifies available tools and schemas match implemented tools.
|
|
601
|
-
- [x] Validate tool-call inputs before execution.
|
|
602
|
-
Proof: invalid path, range, limit, and regex inputs are rejected.
|
|
603
|
-
- [x] Execute tool calls and append tool results.
|
|
604
|
-
Proof: loop test performs search then source read.
|
|
605
|
-
- [x] Enforce default max step count of 6.
|
|
606
|
-
Proof: fake-provider runaway loop stops with a clear tool-budget message.
|
|
607
|
-
- [x] Stream partial output to CLI and UI consumers.
|
|
608
|
-
Proof: stream test observes incremental events before completion.
|
|
609
|
-
- [x] Persist compact conversation turns.
|
|
610
|
-
Proof: `conversation_turns` rows store user question, answer summary,
|
|
611
|
-
citations, timestamp, and optional pinned sources.
|
|
612
|
-
|
|
613
|
-
Milestone 7.2 proof, 2026-07-03:
|
|
614
|
-
|
|
615
|
-
- `npm run typecheck` passed.
|
|
616
|
-
- `npm run lint` passed.
|
|
617
|
-
- Loop-focused `npm test -- --test-name-pattern
|
|
618
|
-
"runAgentTurn|buildModelMessages|createModelToolDefinitions"` passed 43 tests,
|
|
619
|
-
including message construction, tool schema exposure, search/read tool
|
|
620
|
-
execution, invalid path rejection, step-budget stop behavior, streaming
|
|
621
|
-
message deltas, and `conversation_turns` persistence.
|
|
622
|
-
|
|
623
|
-
### 7.3 Citation Validation
|
|
624
|
-
|
|
625
|
-
- [x] Define normalized citation data model for text-like sources.
|
|
626
|
-
Proof: citation tests parse and serialize path, line range, chunk ID, and
|
|
627
|
-
label.
|
|
628
|
-
- [x] Validate cited paths exist in the index.
|
|
629
|
-
Proof: unknown-path citation is rejected.
|
|
630
|
-
- [x] Validate line ranges are inside file bounds.
|
|
631
|
-
Proof: out-of-range citation is rejected.
|
|
632
|
-
- [x] Validate cited chunks or source ranges were retrieved or read during the
|
|
633
|
-
turn.
|
|
634
|
-
Proof: unseen-source citation is rejected.
|
|
635
|
-
- [x] Require citations for substantive doc-derived claims.
|
|
636
|
-
Proof: answer test marks unsupported answer as refused or unsupported.
|
|
637
|
-
- [x] Store validated answer citations in `answer_citations`.
|
|
638
|
-
Proof: database test verifies citation rows after a successful answer.
|
|
639
|
-
|
|
640
|
-
Milestone 7.3 proof, 2026-07-03:
|
|
641
|
-
|
|
642
|
-
- `npm run typecheck` passed.
|
|
643
|
-
- `npm run lint` passed.
|
|
644
|
-
- Citation-focused `npm test -- --test-name-pattern "citation|runAgentTurn"`
|
|
645
|
-
passed 48 tests, including text citation parse/serialize, unknown-path
|
|
646
|
-
rejection, out-of-range rejection, unread-source rejection, substantive
|
|
647
|
-
answer citation requirement, and `answer_citations` persistence.
|
|
648
|
-
|
|
649
|
-
### 7.4 Markdown MVP Acceptance
|
|
650
|
-
|
|
651
|
-
- [x] `athena index` indexes Markdown files.
|
|
652
|
-
Proof: fixture command creates sources, documents, chunks, and FTS rows.
|
|
653
|
-
- [x] Unchanged Markdown files are skipped on the second run.
|
|
654
|
-
Proof: second index command reports skipped files and no rewritten chunks.
|
|
655
|
-
- [x] `athena serve` starts a local UI.
|
|
656
|
-
Proof: HTTP UI smoke test opens the UI.
|
|
657
|
-
- [x] A question can be answered from Markdown.
|
|
658
|
-
Proof: integration test asks a known fixture question and receives the
|
|
659
|
-
expected cited answer.
|
|
660
|
-
- [x] Answer citations open exact line ranges.
|
|
661
|
-
Proof: API and agent tests open the cited source range.
|
|
662
|
-
- [x] `athena ask "..."` returns terminal-readable citations.
|
|
663
|
-
Proof: CLI test checks answer text and citation label output.
|
|
664
|
-
|
|
665
|
-
Milestone 7.4 proof, 2026-07-03:
|
|
666
|
-
|
|
667
|
-
- `npm run typecheck` passed.
|
|
668
|
-
- Ask-focused `npm test -- --test-name-pattern
|
|
669
|
-
"runCli ask|terminal citations|requires a question"` passed 50 tests,
|
|
670
|
-
including `athena ask` with an injected deterministic provider, a Markdown
|
|
671
|
-
source-range read, streamed answer text, terminal `Citations:` output, and the
|
|
672
|
-
missing-question usage error.
|
|
673
|
-
|
|
674
|
-
## Milestone 8: Local Embeddings and Hybrid Search
|
|
675
|
-
|
|
676
|
-
Goal: improve retrieval quality with local embeddings, cached vectors, and
|
|
677
|
-
hybrid ranking while preserving local-first privacy.
|
|
678
|
-
|
|
679
|
-
### 8.1 Embedding Provider Interface
|
|
680
|
-
|
|
681
|
-
- [x] Define embedding provider interface with model metadata.
|
|
682
|
-
Proof: unit tests cover provider name, model, dimensions, normalization, and
|
|
683
|
-
revision/digest fields.
|
|
684
|
-
- [x] Implement Transformers.js or ONNX local provider.
|
|
685
|
-
Proof: local fixture generates embeddings without remote network calls after
|
|
686
|
-
model availability is satisfied.
|
|
687
|
-
- [x] Set default model to `mixedbread-ai/mxbai-embed-xsmall-v1`.
|
|
688
|
-
Proof: default config test verifies provider, model, dimensions, pooling, and
|
|
689
|
-
normalization values.
|
|
690
|
-
- [x] Add batching and progress reporting.
|
|
691
|
-
Proof: indexing output reports embedding batch progress for large fixtures.
|
|
692
|
-
- [x] Add explicit opt-in provider adapters for Ollama, OpenAI, Voyage, Cohere,
|
|
693
|
-
and Gemini as separate follow-up tasks.
|
|
694
|
-
Proof: each remote adapter has config validation and privacy warnings before
|
|
695
|
-
document text can be sent.
|
|
696
|
-
|
|
697
|
-
### 8.2 Vector Storage
|
|
698
|
-
|
|
699
|
-
- [x] Select initial vector backend: `sqlite-vec` or MVP in-process scan.
|
|
700
|
-
Proof: decision is documented with migration implications.
|
|
701
|
-
- [x] Store vector metadata in `embeddings`.
|
|
702
|
-
Proof: database test verifies chunk ID, cache key, provider metadata, and
|
|
703
|
-
dimensions.
|
|
704
|
-
- [x] Compute embedding cache keys from chunk text hash, provider, model,
|
|
705
|
-
dimensions, pooling, normalization, quantization, revision/digest, and
|
|
706
|
-
chunking strategy version.
|
|
707
|
-
Proof: cache-key tests change each input and observe key changes.
|
|
708
|
-
- [x] Skip unchanged vectors.
|
|
709
|
-
Proof: repeat indexing does not regenerate embeddings for unchanged chunks.
|
|
710
|
-
- [x] Invalidate only affected vectors when embedding model settings change.
|
|
711
|
-
Proof: test changes model config and verifies source parsing is not repeated.
|
|
712
|
-
|
|
713
|
-
### 8.3 Hybrid Retrieval
|
|
714
|
-
|
|
715
|
-
- [x] Implement vector search.
|
|
716
|
-
Proof: semantic fixture returns `semantic-auth.md` for `login credentials`
|
|
717
|
-
without an FTS score.
|
|
718
|
-
- [x] Merge FTS and vector results with deduplication.
|
|
719
|
-
Proof: hybrid test verifies unique chunk IDs and stable merged scores.
|
|
720
|
-
- [x] Add neighboring context expansion.
|
|
721
|
-
Proof: related chunk expansion improves context returned to the agent.
|
|
722
|
-
- [x] Add ranking boosts for identifiers, headings, source titles, and recently
|
|
723
|
-
read related chunks.
|
|
724
|
-
Proof: ranking tests cover each boost.
|
|
725
|
-
- [x] Add ranking penalties for overly generic chunks.
|
|
726
|
-
Proof: generic overview fixture is not over-promoted.
|
|
727
|
-
- [x] Display retrieval trace in the UI.
|
|
728
|
-
Proof: UI trace shows FTS score, vector score, merged score, and selected
|
|
729
|
-
context.
|
|
730
|
-
|
|
731
|
-
### 8.4 Embeddings Acceptance
|
|
732
|
-
|
|
733
|
-
- [x] Default local embeddings are generated.
|
|
734
|
-
Proof: `athena index` creates embeddings for fixture chunks.
|
|
735
|
-
- [x] Vectors are cached.
|
|
736
|
-
Proof: repeat indexing skips unchanged vectors.
|
|
737
|
-
- [x] Lexical and vector search are merged.
|
|
738
|
-
Proof: retrieval tests compare FTS-only, vector-only, and hybrid results.
|
|
739
|
-
- [x] Changing the embedding model invalidates only affected vectors.
|
|
740
|
-
Proof: model-change test preserves source and parser rows while rebuilding
|
|
741
|
-
vector rows.
|
|
742
|
-
|
|
743
|
-
Milestone 8 embedding storage proof, 2026-07-03:
|
|
744
|
-
|
|
745
|
-
- `npm run typecheck` passed.
|
|
746
|
-
- `npm run lint` passed.
|
|
747
|
-
- Embedding-focused `npm test -- --test-name-pattern
|
|
748
|
-
"Embedding|embedding|athena index records|model settings change"` passed 54
|
|
749
|
-
tests, including deterministic local vector metadata, cache-key invalidation
|
|
750
|
-
inputs, vector encode/decode, default index-time embedding rows, repeat-index
|
|
751
|
-
vector cache hits, and model-change vector refresh without source reparsing.
|
|
752
|
-
- Initial vector backend decision: store Float32 vectors as SQLite BLOBs and use
|
|
753
|
-
an MVP in-process scan for the upcoming hybrid retrieval step. This avoids a
|
|
754
|
-
migration dependency while the retrieval scorer is still evolving.
|
|
755
|
-
|
|
756
|
-
Milestone 8 local Transformers.js provider proof, 2026-07-03:
|
|
757
|
-
|
|
758
|
-
- `npm run typecheck` passed.
|
|
759
|
-
- `npm run lint` passed.
|
|
760
|
-
- Focused `npm test -- --test-name-pattern
|
|
761
|
-
"TransformersJsEmbeddingProvider|DeterministicEmbeddingProvider|stores
|
|
762
|
-
embedding vectors|embedding batch progress|model settings change"` passed 58
|
|
763
|
-
tests, including a fake local feature-extraction loader with
|
|
764
|
-
`local_files_only: true`, mean pooling, normalization, tensor-to-vector
|
|
765
|
-
conversion, deterministic fallback when local model files are unavailable,
|
|
766
|
-
and index-time provider preparation before cache-key calculation.
|
|
767
|
-
- Built smoke passed: `node dist/cli/main.js index --root "$tmp" --json`
|
|
768
|
-
recorded `provider: "transformers-js"`, `dimensions: 384`, and
|
|
769
|
-
`implementation: "transformers-js-local-deterministic"` metadata when no
|
|
770
|
-
local model cache was present.
|
|
771
|
-
|
|
772
|
-
Milestone 8 remote embedding adapter proof, 2026-07-03:
|
|
773
|
-
|
|
774
|
-
- `npm run typecheck` passed.
|
|
775
|
-
- `npm run lint` passed.
|
|
776
|
-
- Provider-focused `npm test -- --test-name-pattern` run passed 92 tests,
|
|
777
|
-
including provider-specific REST payloads for Ollama, OpenAI, Voyage, Cohere,
|
|
778
|
-
and Gemini; injected fetch adapters with no live network calls; API-key
|
|
779
|
-
validation for cloud providers; explicit
|
|
780
|
-
`allowRemoteDocumentText` enforcement; HTTP error reporting; invalid vector
|
|
781
|
-
shape rejection; stable provider metadata revisions; and indexed result
|
|
782
|
-
ordering for providers that return embedding indexes.
|
|
783
|
-
- Full gate passed after the adapter implementation: `npm run format:check`,
|
|
784
|
-
`npm run lint`, `npm run typecheck`, `npm test` with 92 tests,
|
|
785
|
-
`npm run build`, and `npm run eval` with 21 corpus questions, 21 sources,
|
|
786
|
-
synthetic retrieval 5/5, hybrid retrieval 2/2, table PDF 1/1, hard PDF 1/1,
|
|
787
|
-
and answer policy 1/1.
|
|
788
|
-
|
|
789
|
-
Milestone 8 hybrid retrieval proof, 2026-07-03:
|
|
790
|
-
|
|
791
|
-
- `npm run typecheck` passed.
|
|
792
|
-
- `npm run lint` passed.
|
|
793
|
-
- Focused `npm test -- --test-name-pattern
|
|
794
|
-
"RetrievalToolRuntime|athena server exposes"` passed 54 tests, including
|
|
795
|
-
vector-only semantic retrieval, FTS and vector score merging, chunk
|
|
796
|
-
deduplication, API trace score serialization, and UI trace rendering of
|
|
797
|
-
`searchScores`.
|
|
798
|
-
- Built smoke passed: `node dist/cli/main.js index --root "$tmp" --json`
|
|
799
|
-
followed by compiled `RetrievalToolRuntime.searchDocs({ query: "login
|
|
800
|
-
credentials" })` returned `oauth.md` with `fts: 0`, positive vector score,
|
|
801
|
-
and merged score.
|
|
802
|
-
|
|
803
|
-
Milestone 8 embedding progress proof, 2026-07-03:
|
|
804
|
-
|
|
805
|
-
- `npm run typecheck` passed.
|
|
806
|
-
- `npm run lint` passed.
|
|
807
|
-
- Focused `npm test -- --test-name-pattern
|
|
808
|
-
"embedding batch progress|stores embedding vectors|records, skips"` passed
|
|
809
|
-
55 tests, including a 40-document fixture that reports `Embedding batch 1/2`
|
|
810
|
-
and `Embedding batch 2/2` on stderr while preserving final index output on
|
|
811
|
-
stdout.
|
|
812
|
-
- Built smoke passed: `node dist/cli/main.js index --root "$tmp"` on a
|
|
813
|
-
40-document fixture reported two embedding batch lines on stderr and
|
|
814
|
-
`embedded: 40` on stdout.
|
|
815
|
-
|
|
816
|
-
Milestone 8 neighboring context proof, 2026-07-03:
|
|
817
|
-
|
|
818
|
-
- `npm run typecheck` passed.
|
|
819
|
-
- `npm run lint` passed.
|
|
820
|
-
- Focused `npm test -- --test-name-pattern
|
|
821
|
-
"RetrievalToolRuntime returns related neighboring chunks|RetrievalToolRuntime
|
|
822
|
-
searches"` passed 55 tests, including search-time neighboring chunk
|
|
823
|
-
expansion, `contextOfChunkId` trace output, and deduplication of expanded
|
|
824
|
-
results.
|
|
825
|
-
- Built smoke passed: compiled `RetrievalToolRuntime.searchDocs({ query:
|
|
826
|
-
"p5w10", pathPrefix: "long.md", limit: 3 })` returned a neighboring result
|
|
827
|
-
with `contextOfChunkId` and a matching trace score marker.
|
|
828
|
-
|
|
829
|
-
Milestone 8 ranking boost proof, 2026-07-03:
|
|
830
|
-
|
|
831
|
-
- `npm run typecheck` passed.
|
|
832
|
-
- `npm run lint` passed.
|
|
833
|
-
- Focused `npm test -- --test-name-pattern
|
|
834
|
-
"applies identifier|RetrievalToolRuntime searches"` passed 56 tests,
|
|
835
|
-
including identifier, heading, source-title, and recently read source boost
|
|
836
|
-
fixtures.
|
|
837
|
-
- Built smoke passed: compiled retrieval ranked `ranking/identifier-match.md`
|
|
838
|
-
first for `ATHENA_CACHE_DIR cache` and `ranking/recent-beta.md` first after
|
|
839
|
-
reading that source range.
|
|
840
|
-
|
|
841
|
-
Milestone 8 generic penalty proof, 2026-07-03:
|
|
842
|
-
|
|
843
|
-
- `npm run typecheck` passed.
|
|
844
|
-
- `npm run lint` passed.
|
|
845
|
-
- Focused `npm test -- --test-name-pattern
|
|
846
|
-
"applies identifier|RetrievalToolRuntime searches"` passed 56 tests,
|
|
847
|
-
including a generic overview fixture that ranks below the specific
|
|
848
|
-
cache-directory document.
|
|
849
|
-
- Built smoke passed: compiled retrieval ranked
|
|
850
|
-
`ranking/generic/specific-cache.md` above `ranking/generic/overview.md` for
|
|
851
|
-
`cache directory`.
|
|
852
|
-
|
|
853
|
-
## Milestone 9: PDF RAG with `pdf-2-llm`
|
|
854
|
-
|
|
855
|
-
Goal: use the published `pdf-2-llm` package to index PDFs with source maps,
|
|
856
|
-
page regions, warnings, confidence, and citation-aware UI behavior.
|
|
857
|
-
|
|
858
|
-
### 9.1 Dependency and Adapter
|
|
859
|
-
|
|
860
|
-
- [x] Add `pdf-2-llm` as a package dependency.
|
|
861
|
-
Proof: lockfile and package manifest include the published npm package.
|
|
862
|
-
- [x] Import the Node parser from `pdf-2-llm/node`.
|
|
863
|
-
Proof: parser adapter uses `convertPdfToMarkdown` from the Node export.
|
|
864
|
-
- [x] Add parser version and option-hash tracking.
|
|
865
|
-
Proof: PDF source rows include parser package version and parser options hash.
|
|
866
|
-
- [x] Add timeout and error handling for slow or malformed PDFs.
|
|
867
|
-
Proof: fixture with forced timeout records a parser failure without corrupting
|
|
868
|
-
the index.
|
|
869
|
-
- [x] Preserve generated Markdown, source maps, document IR metadata, table
|
|
870
|
-
sidecars, extracted asset references, diagnostics, warning codes, and
|
|
871
|
-
confidence summaries when available.
|
|
872
|
-
Proof: parser artifact tests inspect stored records for each supported field.
|
|
873
|
-
|
|
874
|
-
### 9.2 PDF Chunking and Storage
|
|
875
|
-
|
|
876
|
-
- [x] Chunk generated PDF Markdown with page-aware locators.
|
|
877
|
-
Proof: chunks include source path, page number, Markdown range, and source-map
|
|
878
|
-
reference metadata.
|
|
879
|
-
- [x] Store PDF parser artifacts in `parser_artifacts`.
|
|
880
|
-
Proof: database test retrieves generated Markdown and metadata by source ID.
|
|
881
|
-
- [x] Store table sidecars and extracted asset references under `.athena/blobs/`.
|
|
882
|
-
Proof: fixture table or asset can be opened from stored artifact metadata.
|
|
883
|
-
- [x] Store warning and confidence data on chunks.
|
|
884
|
-
Proof: low-confidence PDF fixture produces chunk warning/confidence fields.
|
|
885
|
-
- [x] Rebuild PDF artifacts when parser version or options change.
|
|
886
|
-
Proof: changing PDF parser config invalidates only affected PDF sources.
|
|
887
|
-
|
|
888
|
-
### 9.3 PDF Tooling and Citations
|
|
889
|
-
|
|
890
|
-
- [x] Implement `readPdfSource`.
|
|
891
|
-
Proof: tool returns generated Markdown, page metadata, region metadata, and
|
|
892
|
-
warnings for a known PDF fixture.
|
|
893
|
-
- [x] Extend `searchDocs` output for PDF chunks.
|
|
894
|
-
Proof: PDF search result includes page, heading, snippet, score, confidence,
|
|
895
|
-
warning codes, and locator.
|
|
896
|
-
- [x] Validate PDF citations against known source paths.
|
|
897
|
-
Proof: unknown PDF path is rejected.
|
|
898
|
-
- [x] Validate page numbers are inside document bounds.
|
|
899
|
-
Proof: out-of-range page citation is rejected.
|
|
900
|
-
- [x] Validate page regions have source-map backing when required.
|
|
901
|
-
Proof: unsupported region citation is rejected or marked uncertain according
|
|
902
|
-
to config.
|
|
903
|
-
- [x] Include confidence score and warning codes in PDF citation data.
|
|
904
|
-
Proof: answer citation rows include PDF confidence and warning metadata.
|
|
905
|
-
|
|
906
|
-
### 9.4 PDF UI
|
|
907
|
-
|
|
908
|
-
- [x] Add PDF citation rendering.
|
|
909
|
-
Proof: UI displays path, page number, confidence, and warning state.
|
|
910
|
-
- [x] Add generated Markdown preview for PDF citations.
|
|
911
|
-
Proof: clicking a PDF citation opens the generated Markdown range.
|
|
912
|
-
- [x] Add page-region metadata preview.
|
|
913
|
-
Proof: UI shows source-map coordinates or region details when available.
|
|
914
|
-
- [x] Add uncertain citation display for low-confidence regions.
|
|
915
|
-
Proof: low-confidence fixture displays warning/confidence state near the
|
|
916
|
-
citation.
|
|
917
|
-
- [x] Add table sidecar link behavior.
|
|
918
|
-
Proof: citation or preview can open table sidecar data when present.
|
|
919
|
-
|
|
920
|
-
### 9.5 PDF Acceptance
|
|
921
|
-
|
|
922
|
-
- [x] `pdf-2-llm` is installed from npm.
|
|
923
|
-
Proof: package manifest and lockfile reference the package.
|
|
924
|
-
- [x] PDFs are converted through `pdf-2-llm/node`.
|
|
925
|
-
Proof: adapter test confirms the Node export is used.
|
|
926
|
-
- [x] Generated Markdown and source maps are stored.
|
|
927
|
-
Proof: database/artifact test retrieves both for a fixture PDF.
|
|
928
|
-
- [x] PDF citations include page and region metadata.
|
|
929
|
-
Proof: answer test verifies citation JSON shape.
|
|
930
|
-
- [x] Low-confidence regions are visible in the UI.
|
|
931
|
-
Proof: browser test or screenshot fixture shows warning/confidence state.
|
|
932
|
-
|
|
933
|
-
Milestone 9 dependency and adapter proof, 2026-07-03:
|
|
934
|
-
|
|
935
|
-
- `npm view pdf-2-llm version name license main types exports bin dependencies --json`
|
|
936
|
-
confirmed `pdf-2-llm@1.1.0`, license `0BSD`, CLI binaries `pdf-2-llm`
|
|
937
|
-
and `pdf2md`, and a `./node` export with package types.
|
|
938
|
-
- `npm install pdf-2-llm@1.1.0` added the published package to
|
|
939
|
-
`package.json` and `package-lock.json`; npm audit reported 0 vulnerabilities.
|
|
940
|
-
- `npm run typecheck` passed.
|
|
941
|
-
- Focused
|
|
942
|
-
`npm test -- --test-name-pattern "parsePdfFile|pdf-2-llm parser artifacts|classifySourceKind|discoverSources"`
|
|
943
|
-
passed 62 tests, including adapter use of a fake `convertPdfToMarkdown`
|
|
944
|
-
from the Node export shape, parser option hashing, timeout and malformed
|
|
945
|
-
converter errors, generated Markdown/source-map/document-IR/assets/
|
|
946
|
-
diagnostics/warnings/confidence artifact preservation, PDF source row parser
|
|
947
|
-
version and option hash storage, PDF chunk page/confidence locators, and
|
|
948
|
-
unchanged PDF skip behavior.
|
|
949
|
-
- Built smoke passed: compiled `indexRoot({ root, pdfConverter })` from
|
|
950
|
-
`dist/indexer/index.js` wrote a `pdf-2-llm` source row, a page-4 PDF locator,
|
|
951
|
-
and `source-map` parser artifact for a temporary PDF fixture.
|
|
952
|
-
|
|
953
|
-
Milestone 9 PDF chunk storage proof, 2026-07-03:
|
|
954
|
-
|
|
955
|
-
- `npm run typecheck` passed.
|
|
956
|
-
- Focused
|
|
957
|
-
`npm test -- --test-name-pattern "parsePdfFile|pdf-2-llm parser artifacts"`
|
|
958
|
-
passed 62 tests, including PDF chunk locators with source path, page,
|
|
959
|
-
generated-Markdown start/end lines, source-map kind, source-map region
|
|
960
|
-
geometry, stable region ID, confidence, low-confidence warning codes, and a
|
|
961
|
-
parser-option change that reparses the unchanged PDF and updates the source
|
|
962
|
-
option hash.
|
|
963
|
-
- Built smoke passed: compiled `indexRoot({ root, pdfConverter })` wrote a PDF
|
|
964
|
-
locator with page 4, generated-Markdown lines 1-3, `pdf-low-confidence`
|
|
965
|
-
warning code, source-map region geometry, and a stable `pdf_region_*` ID.
|
|
966
|
-
|
|
967
|
-
Milestone 9 PDF blob sidecar proof, 2026-07-03:
|
|
968
|
-
|
|
969
|
-
- `npm run typecheck` passed.
|
|
970
|
-
- Focused `npm test -- --test-name-pattern "pdf-2-llm parser artifacts"`
|
|
971
|
-
passed 62 tests, including a PDF table asset whose content is written under
|
|
972
|
-
`.athena/blobs/pdf-assets/<sourceId>/`, whose parser artifact stores
|
|
973
|
-
`athenaBlobPath` and `contentStored: true`, and whose inline asset content is
|
|
974
|
-
omitted from the database artifact payload.
|
|
975
|
-
- Built smoke passed: compiled `indexRoot({ root, pdfConverter })` wrote
|
|
976
|
-
`tables/table-1.csv` under `.athena/blobs/pdf-assets/<sourceId>/` and the
|
|
977
|
-
`assets` artifact referenced that sidecar without inline `content`.
|
|
978
|
-
|
|
979
|
-
Milestone 9 PDF read tooling proof, 2026-07-03:
|
|
980
|
-
|
|
981
|
-
- `npm run typecheck` passed.
|
|
982
|
-
- `npm run lint` passed.
|
|
983
|
-
- `npm run format:check` passed.
|
|
984
|
-
- `npm test` passed 63 tests.
|
|
985
|
-
- `npm run build` passed.
|
|
986
|
-
- Focused
|
|
987
|
-
`npm test -- --test-name-pattern "readPdfSource|generated PDF Markdown|toolSchemas|createModelToolDefinitions"`
|
|
988
|
-
passed 63 tests, including model tool schema exposure for `readPdfSource`,
|
|
989
|
-
PDF search results with snippet, score, page, confidence, warning codes, and
|
|
990
|
-
locator metadata, `readPdfSource` returning generated Markdown,
|
|
991
|
-
source-map entries, region metadata, warnings, confidence, assets, trace
|
|
992
|
-
locators, page-bound rejection, and source-map-backed region validation.
|
|
993
|
-
- Built smoke passed: compiled `dist/indexer/index.js` and
|
|
994
|
-
`dist/retrieval/index.js` indexed a fake PDF converter result, then
|
|
995
|
-
`readPdfSource` returned page 2, one source-map entry, one asset, confidence
|
|
996
|
-
`0.5`, and a PDF trace locator.
|
|
997
|
-
|
|
998
|
-
Milestone 9 PDF citation validation proof, 2026-07-03:
|
|
999
|
-
|
|
1000
|
-
- `npm run typecheck` passed.
|
|
1001
|
-
- Focused
|
|
1002
|
-
`npm test -- --test-name-pattern "citation|PDF citation|runAgentTurn persists PDF"`
|
|
1003
|
-
passed 66 tests, including PDF citation parse/serialize, unknown PDF path
|
|
1004
|
-
rejection, PDF answer citation persistence with page, region ID, confidence,
|
|
1005
|
-
warning codes, and source-map region metadata, and existing text citation
|
|
1006
|
-
validation.
|
|
1007
|
-
- `npm run lint` passed.
|
|
1008
|
-
- `npm run format:check` passed.
|
|
1009
|
-
- `npm test` passed 66 tests.
|
|
1010
|
-
- `npm run build` passed.
|
|
1011
|
-
- Built smoke passed: compiled `dist/index.js` exported
|
|
1012
|
-
`parseAnswerCitations`, `parsePdfCitations`, `serializePdfCitation`, and
|
|
1013
|
-
`renderTerminalCitations` for `[manual.pdf p.2#pdf_region_abc123]`.
|
|
1014
|
-
|
|
1015
|
-
Milestone 9 PDF UI proof, 2026-07-03:
|
|
1016
|
-
|
|
1017
|
-
- `npm run typecheck` passed.
|
|
1018
|
-
- Focused `npm test -- --test-name-pattern "PDF preview|local chat/search UI|server exposes"`
|
|
1019
|
-
passed 67 tests, including the UI contract for PDF preview actions,
|
|
1020
|
-
confidence/warning/region rendering hooks, sidecar asset controls, and the
|
|
1021
|
-
server PDF preview/sidecar endpoints.
|
|
1022
|
-
- `npm run format:check` passed.
|
|
1023
|
-
- `npm run lint` passed.
|
|
1024
|
-
- `npm test` passed 67 tests.
|
|
1025
|
-
- `npm run build` passed.
|
|
1026
|
-
- Built smoke passed: compiled `dist/server/index.js` served the static UI,
|
|
1027
|
-
`/api/pdf` returned page 2 with one asset and confidence metadata, and
|
|
1028
|
-
`/api/pdf-asset` returned the table sidecar content.
|
|
1029
|
-
|
|
1030
|
-
## Milestone 10: Evaluation Harness and Quality Gates
|
|
1031
|
-
|
|
1032
|
-
Goal: prevent retrieval, citation, PDF, and cache correctness regressions.
|
|
1033
|
-
|
|
1034
|
-
### 10.1 Evaluation Corpus
|
|
1035
|
-
|
|
1036
|
-
- [x] Promote the Milestone 2 validation corpus into the evaluation harness.
|
|
1037
|
-
Proof: eval configuration references corpus manifest IDs instead of ad hoc
|
|
1038
|
-
fixture paths.
|
|
1039
|
-
- [x] Add synthetic Markdown corpus with known answers.
|
|
1040
|
-
Proof: tests use the corpus for deterministic answer checks.
|
|
1041
|
-
- [x] Add realistic API-doc corpus.
|
|
1042
|
-
Proof: retrieval tests include symbols, flags, methods, and concepts.
|
|
1043
|
-
- [x] Add ambiguous-heading corpus.
|
|
1044
|
-
Proof: retrieval tests distinguish repeated heading names across files.
|
|
1045
|
-
- [x] Add table-heavy PDF fixture.
|
|
1046
|
-
Proof: PDF tests cover table sidecar persistence and citation behavior.
|
|
1047
|
-
- [x] Add malformed, encrypted, or unsupported PDF fixture.
|
|
1048
|
-
Proof: parser warning/failure behavior is tested without crashing.
|
|
1049
|
-
- [x] Add optional multilingual or RTL/CJK fixtures if target users require
|
|
1050
|
-
them.
|
|
1051
|
-
Proof: the current MVP corpus keeps one non-English French HTML fixture and
|
|
1052
|
-
the corpus test requires non-English coverage; no RTL/CJK target-user
|
|
1053
|
-
requirement is identified yet.
|
|
1054
|
-
|
|
1055
|
-
### 10.2 Parser and Index Tests
|
|
1056
|
-
|
|
1057
|
-
- [x] Test unchanged files are skipped.
|
|
1058
|
-
- [x] Test changed files are reindexed.
|
|
1059
|
-
- [x] Test deleted files are removed from the index.
|
|
1060
|
-
- [x] Test line ranges remain stable.
|
|
1061
|
-
- [x] Test PDF source maps point to valid page regions.
|
|
1062
|
-
- [x] Test warning and confidence fields survive storage.
|
|
1063
|
-
- [x] Test table sidecars can be opened from citations.
|
|
1064
|
-
- [x] Test migration upgrades preserve existing source and chunk rows.
|
|
1065
|
-
|
|
1066
|
-
### 10.3 Retrieval Tests
|
|
1067
|
-
|
|
1068
|
-
- [x] Test exact symbol query returns the symbol's defining section.
|
|
1069
|
-
- [x] Test semantic query returns the relevant conceptual section.
|
|
1070
|
-
- [x] Test hybrid retrieval outperforms FTS-only and vector-only on the
|
|
1071
|
-
evaluation corpus.
|
|
1072
|
-
- [x] Test low-confidence PDF chunks are not over-promoted.
|
|
1073
|
-
- [x] Test source filters work by path and type.
|
|
1074
|
-
- [x] Test neighboring chunks are added without duplicating results.
|
|
1075
|
-
- [x] Test ranking remains deterministic for tied scores.
|
|
1076
|
-
|
|
1077
|
-
### 10.4 Answer and Agent Tests
|
|
1078
|
-
|
|
1079
|
-
- [x] Test answers include citations for doc-derived claims.
|
|
1080
|
-
- [x] Test unsupported claims are refused or marked unsupported.
|
|
1081
|
-
- [x] Test citations open the expected source range.
|
|
1082
|
-
- [x] Test follow-up questions use prior context without skipping fresh
|
|
1083
|
-
retrieval.
|
|
1084
|
-
- [x] Test max-step guard stops runaway tool loops.
|
|
1085
|
-
- [x] Test invalid tool input cannot reach filesystem or database internals.
|
|
1086
|
-
- [x] Test final citation validation runs on every turn.
|
|
1087
|
-
|
|
1088
|
-
### 10.5 Regression Commands
|
|
1089
|
-
|
|
1090
|
-
- [x] Add `npm test`.
|
|
1091
|
-
Proof: all unit and integration tests pass locally.
|
|
1092
|
-
- [x] Add `npm run typecheck`.
|
|
1093
|
-
Proof: compiler passes without emitted output or with expected build output.
|
|
1094
|
-
- [x] Add `npm run lint`.
|
|
1095
|
-
Proof: lint passes on source and tests.
|
|
1096
|
-
- [x] Add `npm run eval`.
|
|
1097
|
-
Proof: evaluation harness reports parser, retrieval, answer, and PDF results.
|
|
1098
|
-
- [x] Add CI workflow if this repository will run hosted checks.
|
|
1099
|
-
Proof: GitHub Actions or equivalent check runs the same local commands.
|
|
1100
|
-
|
|
1101
|
-
Milestone 10 evaluation corpus harness proof, 2026-07-03:
|
|
1102
|
-
|
|
1103
|
-
- `npm run typecheck` passed with `scripts/eval.ts` included through
|
|
1104
|
-
`tsconfig.test.json`.
|
|
1105
|
-
- Focused `npm test -- --test-name-pattern "evaluation|corpus"` passed 70
|
|
1106
|
-
tests, including eval-plan binding from `ground-truth.json` source IDs to
|
|
1107
|
-
`manifest.json`, unknown source-ID diagnostics, and eval-plan rendering.
|
|
1108
|
-
- `npm run eval` passed offline and reported 20 questions, 19 healthy corpus
|
|
1109
|
-
entries, 1 negative question, 8 document types, and redistribution counts of
|
|
1110
|
-
`committed=6` and `download-only=13`.
|
|
1111
|
-
|
|
1112
|
-
Milestone 10 synthetic retrieval eval proof, 2026-07-03:
|
|
1113
|
-
|
|
1114
|
-
- `npm run typecheck` passed with the synthetic eval runner included.
|
|
1115
|
-
- Focused `npm test -- --test-name-pattern "evaluation|corpus"` passed 73
|
|
1116
|
-
tests, including a temporary index built from supported synthetic Markdown and
|
|
1117
|
-
text controls, exact-symbol retrieval with `admin-guide.md` as the top result,
|
|
1118
|
-
semantic-control retrieval, and an explicit exclusion for the current
|
|
1119
|
-
unsupported extensionless `cli-help` fixture.
|
|
1120
|
-
- `npm run eval` passed offline and reported `Synthetic retrieval: 4/4 passed`.
|
|
1121
|
-
|
|
1122
|
-
Milestone 10 realistic API retrieval eval proof, 2026-07-03:
|
|
1123
|
-
|
|
1124
|
-
- `npm run typecheck` passed with the real API eval runner included.
|
|
1125
|
-
- Focused `npm test -- --test-name-pattern "evaluation|corpus|inherited alias"`
|
|
1126
|
-
passed 73 tests, including a cached Node fs API document indexed with Vite
|
|
1127
|
-
and Prettier Markdown distractors, `fsPromises.access(path[, mode])` retrieval
|
|
1128
|
-
with `node-fs-api.md` ranked first, and an embedding tokenizer regression for
|
|
1129
|
-
inherited object keys such as `function`.
|
|
1130
|
-
- `npm run eval` passed offline and reported `API retrieval: 1/1 passed`.
|
|
1131
|
-
|
|
1132
|
-
Milestone 10 ambiguous-heading eval proof, 2026-07-03:
|
|
1133
|
-
|
|
1134
|
-
- Focused
|
|
1135
|
-
`npm test -- --test-name-pattern "ambiguous heading|applies identifier|evaluation"`
|
|
1136
|
-
passed 74 tests, including the corpus eval that ranks `admin-guide.md` first
|
|
1137
|
-
over `user-guide.md` for the repeated `Tokens` heading and the retrieval
|
|
1138
|
-
runtime fixture for the same ambiguity.
|
|
1139
|
-
- `npm run eval` passed offline and reported `Ambiguous headings: 1/1 passed`.
|
|
1140
|
-
|
|
1141
|
-
Milestone 10 table-heavy PDF eval proof, 2026-07-03:
|
|
1142
|
-
|
|
1143
|
-
- Fixed parser warning artifact IDs so repeated PDF warnings use an
|
|
1144
|
-
ordinal-salted ID while preserving the stored `warning` artifact kind.
|
|
1145
|
-
- Focused
|
|
1146
|
-
`npm test -- --test-name-pattern "table-heavy PDF|repeated PDF parser warnings|evaluation"`
|
|
1147
|
-
passed 76 tests, including a real cached IRS W-4 index, PDF citation region
|
|
1148
|
-
ID, source-map entries, `table.low_confidence`, confidence metadata,
|
|
1149
|
-
persisted table sidecar blob path, nonzero sidecar bytes, and duplicate
|
|
1150
|
-
warning payload storage.
|
|
1151
|
-
- `npm run typecheck` passed with the table-heavy PDF eval result types.
|
|
1152
|
-
- `npm run eval` passed offline and reported `Table PDF: 1/1 passed`.
|
|
1153
|
-
|
|
1154
|
-
Milestone 10 hard PDF eval proof, 2026-07-03:
|
|
1155
|
-
|
|
1156
|
-
- Focused `npm test -- --test-name-pattern "hard PDF|table-heavy PDF|evaluation"`
|
|
1157
|
-
passed 77 tests, including the encrypted qpdf fixture indexing without a
|
|
1158
|
-
failed index count, producing one document row, zero citeable chunks, parser
|
|
1159
|
-
artifacts, `security.password_required`, `conversion.not_implemented`,
|
|
1160
|
-
`pdf-low-confidence`, zero page count, and zero confidence.
|
|
1161
|
-
- `npm run typecheck` passed with the hard-PDF eval result types.
|
|
1162
|
-
- `npm run eval` passed offline and reported `Hard PDF: 1/1 passed`.
|
|
1163
|
-
|
|
1164
|
-
Milestone 10 parser and index regression proof, 2026-07-03:
|
|
1165
|
-
|
|
1166
|
-
- Focused
|
|
1167
|
-
`npm test -- --test-name-pattern "migrateDatabase|records, skips, changes, deletes|line locators|PDF locators"`
|
|
1168
|
-
passed 78 tests, including unchanged-file skips, changed-file reindexing,
|
|
1169
|
-
deleted-source cleanup, deterministic chunk line locators, PDF page/region
|
|
1170
|
-
locator metadata, and migration preservation of seeded source, document, and
|
|
1171
|
-
chunk rows.
|
|
1172
|
-
- `npm run typecheck` passed with the migration preservation test.
|
|
1173
|
-
|
|
1174
|
-
Milestone 10 retrieval regression proof, 2026-07-03:
|
|
1175
|
-
|
|
1176
|
-
- Focused
|
|
1177
|
-
`npm test -- --test-name-pattern "low-confidence PDF|applies identifier|generated PDF Markdown|searches, filters"`
|
|
1178
|
-
passed 79 tests, including exact-symbol lookup for
|
|
1179
|
-
`ATHENA_INDEX_BATCH_SIZE`, vector-only semantic lookup for login credentials,
|
|
1180
|
-
path and kind filters, low-confidence PDF demotion behind an equivalent
|
|
1181
|
-
Markdown source, neighbor deduplication, and deterministic ordering for tied
|
|
1182
|
-
scores.
|
|
1183
|
-
- `npm run typecheck` passed with the low-confidence and deterministic ranking
|
|
1184
|
-
tests.
|
|
1185
|
-
|
|
1186
|
-
Milestone 10 hybrid retrieval comparison proof, 2026-07-03:
|
|
1187
|
-
|
|
1188
|
-
- Added committed synthetic hybrid comparison fixtures under
|
|
1189
|
-
`test/corpus/synthetic/hybrid/semantic/` and a ground-truth question that
|
|
1190
|
-
requires vector recovery when FTS has no lexical hit.
|
|
1191
|
-
- Added evaluation-only `searchDocsWithMode` support for hybrid, FTS-only, and
|
|
1192
|
-
vector-only retrieval without exposing those modes to model tool schemas.
|
|
1193
|
-
- Focused
|
|
1194
|
-
`npm test -- --test-name-pattern "evaluation|hybrid retrieval|corpus manifest|renderEvaluationPlan"`
|
|
1195
|
-
passed 82 tests, including the hybrid comparison reporting
|
|
1196
|
-
`hybrid=2`, `fts=1`, and `vector=1`.
|
|
1197
|
-
- `npm run typecheck` passed with the hybrid comparison result types.
|
|
1198
|
-
- `npm run eval` reports `Hybrid retrieval: 2/2 passed (hybrid=2, fts=1, vector=1)`.
|
|
1199
|
-
|
|
1200
|
-
Milestone 10 answer and agent proof, 2026-07-03:
|
|
1201
|
-
|
|
1202
|
-
- Focused `npm test -- --test-name-pattern "runAgentTurn|parse.*Citations|terminal citations"`
|
|
1203
|
-
passed 80 tests, including cited text and PDF answers, terminal citation
|
|
1204
|
-
rendering, source-range validation, rejection of unseen/out-of-range
|
|
1205
|
-
citations, rejection of substantive uncited answers, follow-up context with a
|
|
1206
|
-
fresh search/read path, invalid tool input rejection before filesystem access,
|
|
1207
|
-
and max-step tool-budget termination.
|
|
1208
|
-
- `npm run typecheck` passed with the follow-up retrieval regression.
|
|
1209
|
-
|
|
1210
|
-
Milestone 10 regression command proof, 2026-07-03:
|
|
1211
|
-
|
|
1212
|
-
- Added `.github/workflows/ci.yml` to run `npm ci`, `npm run format:check`,
|
|
1213
|
-
`npm run lint`, `npm run typecheck`, `npm test`, `npm run build`, and
|
|
1214
|
-
`npm run eval` on pushes to `main` and pull requests.
|
|
1215
|
-
- `npm run eval` passed offline and reported corpus health, synthetic
|
|
1216
|
-
retrieval, API retrieval, ambiguous-heading retrieval, hybrid retrieval,
|
|
1217
|
-
table-heavy PDF, encrypted hard PDF, and `Answer policy: 1/1 passed`.
|
|
1218
|
-
- The same local gate passed with `npm run format:check`, `npm run lint`,
|
|
1219
|
-
`npm run typecheck`, `npm test`, `npm run build`, and `npm run eval`.
|
|
1220
|
-
|
|
1221
|
-
## Milestone 11: MCP and External Agent Integration
|
|
1222
|
-
|
|
1223
|
-
Goal: expose Athena's retrieval tools to external agents without letting them
|
|
1224
|
-
bypass Athena citation validation or read-only defaults.
|
|
1225
|
-
|
|
1226
|
-
### 11.1 MCP Server
|
|
1227
|
-
|
|
1228
|
-
- [x] Implement `athena mcp`.
|
|
1229
|
-
Proof: command starts an MCP server over the chosen transport.
|
|
1230
|
-
- [x] Expose citation-aware retrieval tools only.
|
|
1231
|
-
Proof: MCP tool list includes `searchDocs`, `readSourceRange`,
|
|
1232
|
-
`readPdfSource`, `grepDocs`, `listDocs`, and `relatedChunks`.
|
|
1233
|
-
- [x] Keep MCP mode read-only by default.
|
|
1234
|
-
Proof: tests verify no write/edit tools are exposed.
|
|
1235
|
-
- [x] Reuse the same index and tool validation as the UI/agent.
|
|
1236
|
-
Proof: MCP tests call the same tool implementations.
|
|
1237
|
-
- [x] Add path and source validation for every MCP request.
|
|
1238
|
-
Proof: path traversal and unknown source requests are rejected.
|
|
1239
|
-
|
|
1240
|
-
### 11.2 External Agent Documentation
|
|
1241
|
-
|
|
1242
|
-
- [x] Document OpenCode or coding-agent setup.
|
|
1243
|
-
Proof: docs show how to start `athena mcp` and connect a client.
|
|
1244
|
-
- [x] Document that external agents consume Athena retrieval and do not own
|
|
1245
|
-
Athena's agent loop.
|
|
1246
|
-
Proof: integration docs explicitly state the boundary.
|
|
1247
|
-
- [x] Document trace compatibility between UI and MCP usage.
|
|
1248
|
-
Proof: MCP calls can be inspected through stored run or retrieval trace data.
|
|
1249
|
-
- [x] Add manual smoke test for MCP search and source read.
|
|
1250
|
-
Proof: committed test notes or automated script shows expected tool output.
|
|
1251
|
-
|
|
1252
|
-
Milestone 11 MCP server proof, 2026-07-03:
|
|
1253
|
-
|
|
1254
|
-
- Implemented `athena mcp` as a stdio JSON-RPC MCP server using protocol
|
|
1255
|
-
version `2025-03-26`.
|
|
1256
|
-
- The server exposes only read-only retrieval tools:
|
|
1257
|
-
`searchDocs`, `readSourceRange`, `readPdfSource`, `grepDocs`, `listDocs`,
|
|
1258
|
-
and `relatedChunks`.
|
|
1259
|
-
- MCP tool calls dispatch to `RetrievalToolRuntime`, so they reuse the same
|
|
1260
|
-
index, path checks, PDF read path, and retrieval behavior as the UI and agent.
|
|
1261
|
-
- Focused `npm test -- --test-name-pattern "MCP|mcp"` passed 85 tests,
|
|
1262
|
-
including initialization, `tools/list`, read-only tool annotations, no
|
|
1263
|
-
write/edit/delete tools, retrieval tool calls, unsafe path rejection, unknown
|
|
1264
|
-
tool rejection, and the `runCli(["mcp", ...])` command path.
|
|
1265
|
-
- `npm run typecheck` passed with the MCP protocol and tool result types.
|
|
1266
|
-
|
|
1267
|
-
Milestone 11 external agent documentation proof, 2026-07-03:
|
|
1268
|
-
|
|
1269
|
-
- Added `docs/mcp-integration.md` with OpenCode local MCP configuration,
|
|
1270
|
-
installed-package and development-checkout command examples, external-agent
|
|
1271
|
-
boundary notes, MCP response trace shape, and a manual stdio smoke test for
|
|
1272
|
-
`tools/list`, `searchDocs`, and `readSourceRange`.
|
|
1273
|
-
- Updated MCP tool results to include a `{ result, trace }` JSON envelope so
|
|
1274
|
-
external-agent calls expose `seenChunkIds`, `readLocators`, and
|
|
1275
|
-
`searchScores` consistently with Athena's runtime trace model.
|
|
1276
|
-
- Focused `npm test -- --test-name-pattern "MCP|mcp"` passed with trace
|
|
1277
|
-
assertions for search and source-read calls.
|
|
1278
|
-
- Built CLI smoke passed: `node dist/cli/main.js mcp --root "$tmpdir"`
|
|
1279
|
-
returned 4 JSON-RPC responses, 6 tools, `docs/admin-guide.md` as the top
|
|
1280
|
-
search hit, and 1 read trace locator.
|
|
1281
|
-
|
|
1282
|
-
Milestone 11 external agent provider option proof, 2026-07-05:
|
|
1283
|
-
|
|
1284
|
-
- Added `agent.provider` with `opencode` as the default and `codex` as the
|
|
1285
|
-
alternate provider.
|
|
1286
|
-
- Added `athena mcp --agent-provider <opencode|codex>` for one-off MCP setup.
|
|
1287
|
-
- Updated OpenCode and Codex MCP setup docs while preserving the same read-only
|
|
1288
|
-
tool exposure for both providers.
|
|
1289
|
-
|
|
1290
|
-
## Release Readiness Checklist
|
|
1291
|
-
|
|
1292
|
-
Use this before publishing a public package or tagging a release.
|
|
1293
|
-
|
|
1294
|
-
- [x] `athena --help` displays correct command name and subcommands.
|
|
1295
|
-
- [x] `npx @alextis59/athena` works from a fixture docs folder.
|
|
1296
|
-
- [x] Default startup builds or updates `.athena/index.sqlite`.
|
|
1297
|
-
- [x] Default startup skips unchanged files.
|
|
1298
|
-
- [x] Default startup opens or prints the local UI URL.
|
|
1299
|
-
- [x] `athena index` exits non-zero on parser, migration, or embedding failure.
|
|
1300
|
-
- [x] `athena serve` fails clearly when the index is missing unless `--build`
|
|
1301
|
-
is provided.
|
|
1302
|
-
- [x] `athena ask` returns cited terminal answers.
|
|
1303
|
-
- [x] `athena doctor` reports database, schema, source count, embedding
|
|
1304
|
-
provider, `pdf-2-llm`, warnings, model cache, and port state.
|
|
1305
|
-
- [x] Local embeddings are the default.
|
|
1306
|
-
- [x] Remote providers require explicit configuration.
|
|
1307
|
-
- [x] Markdown citations open exact line ranges.
|
|
1308
|
-
- [x] PDF citations include page, region, confidence, and warning metadata.
|
|
1309
|
-
- [x] Low-confidence PDF citations are visible as uncertain.
|
|
1310
|
-
- [x] Citation validator rejects unknown paths, out-of-range lines/pages,
|
|
1311
|
-
unsupported PDF regions, and unseen sources.
|
|
1312
|
-
- [x] Conversation memory stores compact summaries, citations, timestamps, and
|
|
1313
|
-
optional pinned sources.
|
|
1314
|
-
- [x] Validation corpus retrieval and health checks pass.
|
|
1315
|
-
- [x] Evaluation harness uses the validation corpus for every supported document
|
|
1316
|
-
type.
|
|
1317
|
-
- [x] Full test, typecheck, lint, and eval commands pass.
|
|
1318
|
-
- [x] Package metadata, license, README, and documentation are ready for npm.
|
|
1319
|
-
|
|
1320
|
-
Release readiness startup proof, 2026-07-03:
|
|
1321
|
-
|
|
1322
|
-
- `athena --help` is covered by `runCli renders help successfully`, including
|
|
1323
|
-
the default startup description and listed subcommands.
|
|
1324
|
-
- Bare `athena` is covered by `runCli default builds the index, skips unchanged
|
|
1325
|
-
files, and prints the UI URL`, which creates `.athena/index.sqlite`, starts a
|
|
1326
|
-
local server on an ephemeral port, and verifies a second run skips the
|
|
1327
|
-
unchanged fixture file.
|
|
1328
|
-
- `athena serve` missing-index behavior is covered by `runCli serve requires an
|
|
1329
|
-
existing index unless --build is provided`, which rejects a missing cache with
|
|
1330
|
-
instructions to run `athena index` or `athena serve --build`, then verifies
|
|
1331
|
-
`--build` indexes and prints the server URL.
|
|
1332
|
-
- Full gate passed after the startup behavior change: `npm run format:check`,
|
|
1333
|
-
`npm run lint`, `npm run typecheck`, `npm test` with 94 tests,
|
|
1334
|
-
`npm run build`, and `npm run eval` with 21 corpus questions, 21 sources,
|
|
1335
|
-
synthetic retrieval 5/5, hybrid retrieval 2/2, table PDF 1/1, hard PDF 1/1,
|
|
1336
|
-
and answer policy 1/1.
|
|
1337
|
-
|
|
1338
|
-
Release readiness diagnostics proof, 2026-07-03:
|
|
1339
|
-
|
|
1340
|
-
- `athena doctor` now reports source, document, chunk, and parser-warning
|
|
1341
|
-
counts alongside database state, schema version, table availability,
|
|
1342
|
-
`pdf-2-llm` availability, embedding provider/model, model cache state, and
|
|
1343
|
-
server port availability.
|
|
1344
|
-
- Focused `npm test -- --test-name-pattern
|
|
1345
|
-
"doctor|database and embedding failures|parser failures"` passed 95 tests,
|
|
1346
|
-
including doctor output for missing, initialized, and indexed warning-bearing
|
|
1347
|
-
fixtures; occupied-port JSON diagnostics; `athena index` non-zero exit on a
|
|
1348
|
-
bad database path; no-network remote embedding failure via empty API key; and
|
|
1349
|
-
failed-run recording for PDF parser failures.
|
|
1350
|
-
- Full gate passed after the diagnostics change: `npm run format:check`,
|
|
1351
|
-
`npm run lint`, `npm run typecheck`, `npm test` with 95 tests,
|
|
1352
|
-
`npm run build`, and `npm run eval` with 21 corpus questions, 21 sources,
|
|
1353
|
-
synthetic retrieval 5/5, hybrid retrieval 2/2, table PDF 1/1, hard PDF 1/1,
|
|
1354
|
-
and answer policy 1/1.
|
|
1355
|
-
|
|
1356
|
-
Release readiness package proof, 2026-07-03:
|
|
1357
|
-
|
|
1358
|
-
- README now documents installation, `npx @alextis59/athena`, CLI commands, common
|
|
1359
|
-
options, local-first defaults, configuration, remote-provider opt-in,
|
|
1360
|
-
citation guarantees, MCP integration, and development verification commands.
|
|
1361
|
-
- Added an ISC `LICENSE` file and package metadata for keywords and author.
|
|
1362
|
-
- Fixed the executable bin entrypoint so npm's `.bin/athena` symlink runs the
|
|
1363
|
-
CLI instead of falling through silently.
|
|
1364
|
-
- Local package-run smoke from a fixture docs folder passed:
|
|
1365
|
-
`npx --yes --package /home/alextis/Work/Git/alextis59/athena athena --help`
|
|
1366
|
-
printed Athena help, and
|
|
1367
|
-
`npx --yes --package /home/alextis/Work/Git/alextis59/athena athena index --json`
|
|
1368
|
-
created `.athena/index.sqlite` with one discovered, parsed, embedded, and
|
|
1369
|
-
committed source.
|
|
1370
|
-
- `npm pack --dry-run --json` reported `@alextis59/athena@1.0.0`, included `LICENSE`,
|
|
1371
|
-
`README.md`, `docs`, `package.json`, and executable `dist/cli/main.js`, with
|
|
1372
|
-
201 package entries and no bundled dependencies.
|
|
1373
|
-
- Remaining release checklist items are covered by the committed test and eval
|
|
1374
|
-
gate: `athena ask` terminal citations, default local embeddings, remote
|
|
1375
|
-
provider opt-in checks, Markdown and PDF citation validation, low-confidence
|
|
1376
|
-
PDF uncertainty, conversation memory persistence, corpus health, and
|
|
1377
|
-
evaluation coverage across AsciiDoc, extensionless, HTML, Markdown, MDX, PDF,
|
|
1378
|
-
RST, and text documents.
|
|
1379
|
-
- Final package slice gate passed: `npm run format:check`, `npm run lint`,
|
|
1380
|
-
`npm run typecheck`, `npm test` with 95 tests, `npm run build`,
|
|
1381
|
-
`npm run eval`, and `npm pack --dry-run --json`.
|
|
1382
|
-
|
|
1383
|
-
Scoped package publish proof, 2026-07-04:
|
|
1384
|
-
|
|
1385
|
-
- `npm view athena name version description maintainers --json` confirmed the
|
|
1386
|
-
unscoped `athena` package name is already owned on npm, so Athena publishes
|
|
1387
|
-
as `@alextis59/athena` while preserving the installed binary name `athena`.
|
|
1388
|
-
- `npm view @alextis59/athena name version --json` returned npm `E404`, so the
|
|
1389
|
-
scoped package target is not currently published on the public registry.
|
|
1390
|
-
- `npm pack --dry-run --json` reported `@alextis59/athena@1.0.0`, included
|
|
1391
|
-
`LICENSE`, `README.md`, `docs`, `package.json`, and executable
|
|
1392
|
-
`dist/cli/main.js`, with 201 package entries and no bundled dependencies.
|
|
1393
|
-
- Tarball command smoke passed from `alextis59-athena-1.0.0.tgz`:
|
|
1394
|
-
`npx --yes --package ./alextis59-athena-1.0.0.tgz athena --help` printed
|
|
1395
|
-
Athena help, and
|
|
1396
|
-
`npx --yes --package ./alextis59-athena-1.0.0.tgz athena index --root <fixture> --json`
|
|
1397
|
-
created `.athena/index.sqlite` with one discovered, parsed, embedded, and
|
|
1398
|
-
committed source.
|
|
1399
|
-
- `npm publish --dry-run --json` passed with public access after running the
|
|
1400
|
-
`prepublishOnly` gate, including format, lint, typecheck, 100 tests, offline
|
|
1401
|
-
eval, and build.
|
|
1402
|
-
|
|
1403
|
-
## Suggested Build Order
|
|
1404
|
-
|
|
1405
|
-
1. Finish Milestone 0 so every later change has a repeatable command surface.
|
|
1406
|
-
2. Finish Milestone 1 before writing indexers, because parsers and retrieval
|
|
1407
|
-
need stable persistence.
|
|
1408
|
-
3. Finish Milestone 2 before parser and retrieval work, because the validation
|
|
1409
|
-
corpus should shape what "works" means.
|
|
1410
|
-
4. Finish Milestones 3 through 5 to prove local Markdown retrieval without any
|
|
1411
|
-
model dependency.
|
|
1412
|
-
5. Finish Milestone 6 so citations and traces can be inspected visually.
|
|
1413
|
-
6. Finish Milestone 7 to complete the Markdown-only RAG MVP.
|
|
1414
|
-
7. Finish Milestone 8 to improve retrieval quality with local embeddings.
|
|
1415
|
-
8. Finish Milestone 9 to support PDFs through `pdf-2-llm`.
|
|
1416
|
-
9. Finish Milestone 10 before changing ranking, chunking, PDF parsing, or agent
|
|
1417
|
-
citation behavior aggressively.
|
|
1418
|
-
10. Finish Milestone 11 after the internal tool and citation model is stable.
|
|
1419
|
-
|
|
1420
|
-
## Per-PR Checklist
|
|
1421
|
-
|
|
1422
|
-
For each implementation PR or commit sequence:
|
|
1423
|
-
|
|
1424
|
-
- [x] Scope is tied to one milestone or a clearly named cross-cutting fix.
|
|
1425
|
-
- [x] Tests or manual proof cover the changed behavior.
|
|
1426
|
-
- [x] `npm run typecheck` passes when TypeScript code changes.
|
|
1427
|
-
- [x] `npm test` passes when behavior changes.
|
|
1428
|
-
- [x] `npm run eval` passes when retrieval, ranking, parsing, or citations
|
|
1429
|
-
change.
|
|
1430
|
-
- [x] `docs/implementation-plan.md` is updated if checklist progress changes.
|
|
1431
|
-
- [x] User-facing behavior changes are reflected in README or docs.
|
|
1432
|
-
- [x] No generated `.athena/` cache, model cache, or local runtime artifact is
|
|
1433
|
-
committed.
|