feat: positronick research — the agent "what's new" feed - #24
Merged
Conversation
Add a public, read-only `research` command over GET /api/research: published blog posts, mirrored GitHub releases, and mirrored news links, newest first, so agents avoid stale knowledge. - Filter with --kind (article/release/link), --category, --tag, or a free-text query; poll just the delta with --since <iso>. The printed `latest` timestamp is the value to pass back next time (high-water mark within the same filter, ignoring --since, so polling converges). - Unauthenticated, like the soul/listing reads. Flags validated before any network call; --json and exit codes follow the existing contract. - ResearchItem mirrors src/lib/types.ts field-for-field; mockapi serves /api/research with the documented filter/latest semantics so goldens pin it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nsollazzo
force-pushed
the
feat/research-whats-new
branch
from
July 8, 2026 13:42
7a8acd1 to
c898e58
Compare
nsollazzo
marked this pull request as ready for review
July 8, 2026 13:42
nsollazzo
added a commit
that referenced
this pull request
Jul 8, 2026
Public, read-only blog reader over the product blog endpoints, mirroring
the soul/listing reads and the `research` feed:
- api: PostCard/Post wire types (mirror PostMeta/Post in src/lib/types.ts);
Posts(kind)/Post(slug)/PostMarkdown(slug) over GET /api/blog,
/api/blog/{slug}, and /api/blog/{slug}.md.
- cli: `blog list` (--kind) and `blog show <slug>` (--raw), with did-you-mean
hints (exit 3) on a missing slug. --raw reads the .md endpoint, which —
unlike soul .md — never bumps a counter.
- mockapi: serves the three endpoints over a frozen Posts fixture.
- goldens: blog-list/blog-show (.json/.txt) + regenerated agent-docs.
Reuses PostKinds from the research branch (#24); stacked on it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds a public, read-only
positronick researchcommand overGET /api/research— the agent-facing "what's new" feed the product API exposes so coding agents avoid stale knowledge. Surfaces published blog posts, mirrored GitHub releases, and mirrored news links, newest first.Why
/api/researchwas built for the CLI but had no client. This closes that gap. It's the lowest-risk slice of the broader API sync: a public read, no auth, no admin surface, nothing sensitive.Behavior
--kind(article/release/link),--category,--tag,--since,--limit(1–100), plus an optional free-text query.--sincereturns only strictly-newer posts; the printed/--jsonlatestis the high-water mark within the same filter, ignoring--since, so feeding it back as the next--sinceconverges instead of looping.--kind, out-of-range--limit).--json, exit codes, and the stderr/stdout split follow the existing read-command contract.ResearchItemmirrorssrc/lib/types.tsfield-for-field (incl. nullablecanonicalUrl/publishedAtas pointers).Contract changes (golden diffs)
research.json,research-kind.json,research-since.json,research.txt.agent-docs.{json,txt}regenerated — the new command + a one-line intro mention.Tests
internal/cli/research_test.go: default feed ordering,--sincedelta + high-water-mark semantics,--kind/empty-match (latest: null), flag validation, stdout/stderr split.internal/api/research_test.go: query-param mapping (zero value sends no query; full set maps to the documented keys) + envelope decode.mockapiserves/api/researchwith the documented filter/latestsemantics.go test ./... -race,go vet, andgolangci-lint runall clean.