Skip to content

feat: positronick research — the agent "what's new" feed - #24

Merged
nsollazzo merged 1 commit into
mainfrom
feat/research-whats-new
Jul 8, 2026
Merged

feat: positronick research — the agent "what's new" feed#24
nsollazzo merged 1 commit into
mainfrom
feat/research-whats-new

Conversation

@nsollazzo

Copy link
Copy Markdown
Contributor

What

Adds a public, read-only positronick research command over GET /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.

positronick research                       # the full feed, newest first
positronick research --kind release        # only mirrored releases
positronick research --since 2026-06-01T09:00:00.000Z   # just the delta
positronick research hermes --json         # free-text query, machine-readable

Why

/api/research was 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

  • Filters travel server-side: --kind (article/release/link), --category, --tag, --since, --limit (1–100), plus an optional free-text query.
  • --since returns only strictly-newer posts; the printed/--json latest is the high-water mark within the same filter, ignoring --since, so feeding it back as the next --since converges instead of looping.
  • Flags validated before any network call (unknown --kind, out-of-range --limit). --json, exit codes, and the stderr/stdout split follow the existing read-command contract.
  • ResearchItem mirrors src/lib/types.ts field-for-field (incl. nullable canonicalUrl/publishedAt as pointers).

Contract changes (golden diffs)

  • New goldens: 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, --since delta + 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.
  • mockapi serves /api/research with the documented filter/latest semantics.

go test ./... -race, go vet, and golangci-lint run all clean.

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
nsollazzo force-pushed the feat/research-whats-new branch from 7a8acd1 to c898e58 Compare July 8, 2026 13:42
@nsollazzo
nsollazzo marked this pull request as ready for review July 8, 2026 13:42
@nsollazzo
nsollazzo merged commit 83cfce8 into main Jul 8, 2026
9 checks passed
@nsollazzo
nsollazzo deleted the feat/research-whats-new branch 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant