feat: positronick blog read commands (list/show) - #26
Closed
nsollazzo wants to merge 2 commits into
Closed
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>
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>
nsollazzo
force-pushed
the
feat/research-whats-new
branch
from
July 8, 2026 13:42
7a8acd1 to
c898e58
Compare
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.
Public, read-only blog reader over the product blog endpoints — the same pattern as the soul/listing reads and the shipped
researchcommand.What
internal/api/types.go—PostCard/Postwire types mirroringPostMeta/Postinsrc/lib/types.tsfield-for-field (nullable TS fields → Go pointers). ReusesPostKinds.internal/api/blog.go—Posts(ctx, kind),Post(ctx, slug),PostMarkdown(ctx, slug)overGET /api/blog(?kind=),/api/blog/{slug},/api/blog/{slug}.md. Unauthenticated, read-only.internal/cli/blog.go—positronick blog list(--kind, validated before any network call) andblog show <slug>(--raw), with soul-style did-you-mean hints (exit 3) on a missing slug.internal/mockapi— serves the three endpoints over a frozenPostsfixture (one per kind, varied nullable fields).blog-list.json,blog-show.json,blog-show.txt; regeneratedagent-docs.json/.txt(theblogcommands self-register).Design note:
blog show --rawreads the.mdendpointsoul show --rawdeliberately avoids the soul.mdendpoint because it bumps the install counter, so it prints the JSON detail's body instead. The blog.mdendpoint never bumpsviewCount(counting stays exclusive to the HTML page view), soblog --rawreads it directly — which keepsPostMarkdownlive (no dead code) and returns the true raw markdown file (frontmatter + body). The mock's.mdoutput is intentionally distinct from the JSONcontent(body-only) so the test proves--rawhit the.mdendpoint.Contract changes (per AGENTS.md)
New golden files pin the
--json/human output;agent-docsgoldens change because the command tree gainedblog/blog list/blog show. No existing goldens changed.Stacking
Built on
feat/research-whats-new(#24) to reusePostKindsand avoid a duplicate-definition conflict — base isfeat/research-whats-new, notmain. Merge after #24 (or retarget tomainonce #24 lands).Verification
go test ./... -race,go vet ./..., andgolangci-lint run ./...all green. No auth/admin surface.🤖 Generated with Claude Code