Repository navigation
feat(analysis): read the dates assets give as days, for agents to find by day - #504
Merged
Merged
Conversation
adeelahmad
force-pushed
the
claude/project-thread-hyaa6h
branch
3 times, most recently
from
October 17, 2026 06:13
eab0d32 to
174eb17
Compare
…d by day With Settings > Analysis > Read dates on (off by default), analysis reads each line for the dates it gives and keeps them in date_said: the words, the first and last day they mean, the period (day, weekend, week, month, year) and whether they were worked out from the asset's own date. "next Tuesday" in a recording made on a Wednesday is the Tuesday after, "last week" the Monday to Sunday before, "March 2024" all of March. Agents find what was said about a day or a range with GET /api/v1/dates (start and end as YYYY-MM-DD, YYYY-MM or YYYY), the MCP tool list_dates and the assistant's find_dates, each date with its line and a link to that moment, within what the person can read. English rules in Lens's own code, no model or package. A weekday alone, a date that reads two ways (10/11/2026), "may" in small letters and a bare number like "2000 people" are left out rather than guessed. Rows go with the recording when it's deleted, reset or moved, and are cleared when its lines are split or merged until analysis reads them again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014z3r72SB2quWGKbgGt46mZ
adeelahmad
force-pushed
the
claude/project-thread-hyaa6h
branch
from
October 17, 2026 06:39
174eb17 to
7dc69ca
Compare
21 of 23 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: a line saying "next Tuesday" or "last week" was only text; an agent asked what was planned for a day had to search words and work the calendar out itself.
After: with Settings → Analysis → Read dates as days on (off by default), analysis reads the dates each line gives as days on the calendar, worked out from the asset's own date: "next Tuesday" in a recording made on a Wednesday is the Tuesday after, "last week" Monday to Sunday before, "March 2024" all of March. Agents ask what was said about a day or range with
GET /api/v1/dates, the MCP toollist_datesand the assistant'sfind_dates, each date with its line and a link to that moment, within what the person can read. A weekday alone, a date that reads two ways ("10/11/2026"), "may" in small letters and a bare number are left out rather than guessed.How:
app/domain/dates.pyholds English rules (no model or package: dateparser couldn't read "next Tuesday") and writesdate_saidrows (words, first and last day, period, whether it was relative). The rows go with the recording when it's deleted, reset or moved, and are cleared when its lines are split or merged until analysis reads them again. OpenAPI and the client regenerated withmake openapi. The README's built list anddocs/requirements.mdnow carry this and the series' merged pieces (cleanup #476, punctuation #485, spaCy #492), each with the tests that check it.Motivation and Context
Adeel asked for "dates extraction" in the cleanup series (#476 cleanup, #485 punctuation, #492 spaCy). Grammar follows.
find's date filter (#398) is when an asset was made; this is the days its words talk about.Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.Done questions (AGENTS.md)
GET /api/v1/dates, MCPlist_dates, assistantfind_dates, the setting throughPUT /api/v1/settings/analysisandchange_settings.date_saidis a new table thatSCHEMAadds on start; assets already there are read on Reprocess (Analyze), as the docs say.make requirementspasses).tests/api/test_dates.py(rules, ambiguity, off by default, API, MCP, assistant);docs/processing.md,docs/api.md,docs/mcp.md,docs/assistant.md,docs/requirements.md, README, CHANGELOG, DEVLOG updated; OpenAPI regenerated withmake openapi.acl.scope,library.in_scope) and the MCP and assistant tool patterns.Local CI (
ci/local-ci.sh): backend (embedded and server SurrealDB), Next.js, pre-commit and title passed; after the README and requirements rows, pre-commit and title again.🤖 Generated with Claude Code
https://claude.ai/code/session_014z3r72SB2quWGKbgGt46mZ