This plan executes the PRD in four milestones (M0-M3) with explicit deliverables, dependencies, and acceptance criteria.
- Single local user with multiple local/remote agents.
- TypeScript/Node stack from
TECH_SPEC.md. - No UI in v1.
- Initialize repository structure (
src/,db/migrations/,test/fixtures/). - Implement SQLite migrations and base repositories.
- Implement URL canonicalization + deterministic ID generation.
- Build
saveand metadata-onlyfindcommands. - Add JSON output envelope and standardized errors.
- Working CLI binary
linkledger. - SQLite schema migrated on first run.
saveidempotency on canonical URL.
- Saving same URL twice returns same
item_id. findreturns saved item by title/url text.--jsonoutput is valid and stable.
- None.
- Implement annotations and tag commands.
- Add FTS5 index and weighted BM25 ranking.
- Build
brief,related,status,retrycommands. - Add highlight cap policy and confidence validation.
- Implement worker loop + ingest job processing for article adapter.
- End-to-end save -> parse -> find -> brief flow.
- Highlight-first retrieval with ranking reason metadata.
findsupports tags/type/date filters.briefdefault output is compact (no full chunks unless--expand-chunks).statusandretrycorrectly reflect job lifecycle.- p95 latency targets met on 1k-item dataset.
- M0 complete.
- Implement X adapter.
- Implement YouTube adapter (metadata + transcript/chunk path where available).
- Implement PDF adapter.
- Add adapter fallback rules and parse failure observability.
- Improve retry/backoff and stale revalidation (>30 days).
- Multi-source ingestion with consistent normalized chunks.
- Better failure isolation by source type.
- Each source type has fixture-backed parser tests.
- Parse failures expose clear reason and remain queryable.
- Retry path recovers transient failures.
- M1 command and worker infrastructure complete.
- Finalize JSON schema docs and examples for agents.
- Add benchmark suite for 1k/5k/10k datasets.
- Add migration safety tests and backup/restore docs.
- Integrate
briefin your content agent workflow. - Stabilize release (
v0.1.0).
- Agent-consumable brief payload in production-like workflow.
- Performance and reliability baseline documented.
-
=30% draft reuse metric can be measured.
- 10k-item search benchmark within targets.
- End-to-end workflow validated in at least 5 real drafting tasks.
- M2 complete.
- Documentation
- Keep command docs current with implementation.
- Data safety
- Add
linkledger backupin backlog if DB risk grows.
- Developer experience
- Add make/npm scripts for migrate/test/bench.
linkledger-cli/
src/
cli/
services/
adapters/
db/
ranking/
db/
migrations/
test/
unit/
integration/
fixtures/
scripts/
seed-benchmark-data.ts
bench-find.ts
PRD.md
TECH_SPEC.md
IMPLEMENTATION_PLAN.md
TEST_PLAN.md
DECISIONS.md
- Parser fragility
- Mitigation: fixture tests per adapter; explicit parse failure states.
- Search quality drift
- Mitigation: quality checks for top-k relevance; capped annotation volume.
- SQLite lock contention
- Mitigation: WAL + single writer + retry/backoff.
- M0-M3 acceptance criteria met.
- Test suite and benchmark gates green.
- CLI contract documented and stable for agent consumption.
- Decision log updated for any changes made during implementation.