Skip to content

feat(feed-hermit): feed-to-brief pipeline plugin#612

Open
gtapps wants to merge 2 commits into
mainfrom
feat/briefing-hermit-plugin
Open

feat(feed-hermit): feed-to-brief pipeline plugin#612
gtapps wants to merge 2 commits into
mainfrom
feat/briefing-hermit-plugin

Conversation

@gtapps

@gtapps gtapps commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

New domain plugin feed-hermit (v0.1.0): a self-contained feed-to-brief pipeline — a curated source registry → fetch → score → write → deliver → archive → weekly-synthesis flow, with source-health analytics driven entirely by archive frontmatter. This is the seventh shipped plugin and the first "big pipeline" domain plugin, with the smallest dependency surface of the extraction series (core only).

Changes

  • 8 skillsfeed-brief (the 7-phase pipeline, --morning|--evening|--slot), weekly-digest, add-source, source-scout, source-health, story-arcs, deep-dive, hatch. Named feed-brief (not brief) to avoid trigger collision with core's status-summary brief skill.
  • source-fetcher Haiku agent — raw web/RSS collection with an explicit tmp/feed-source-items-<slot>.json output contract.
  • Scripts (zero runtime deps)reddit-fetch.ts (unauthenticated hot.json by default, optional OAuth2 client-credentials path; exit 0 success / 1 error), validate-sources.ts (PostToolUse registry-table validator, keyed on feed-sources.md).
  • fetch-guard.ts PreToolUse hook — WebFetch domain allowlist scraped from feed-sources.md + an infra list; blocks off-allowlist fetches (exit 2), fails open on unreadable registry. Prompt-injection containment shipped now rather than deferred.
  • State-templates + hatch — seeds empty feed-sources.md/feed-categories.md/FEEDS.md at the project root (opt-in generic starter pack), registers morning/evening/weekly routines and a monthly source-scout scheduled check, appends the Feed Workflow block, adds tmp/ to .gitignore.
  • docs/schema.md — the two data contracts (registry + archive frontmatter) documented verbatim, preserving the load-bearing sources_skipped vs sources_quiet distinction that powers source-health.
  • Root wiring — marketplace entry, test-feed.yml CI (path-filtered, bun test), README + root CLAUDE.md updated to seven plugins.

Review + fixes folded in on this branch

  • fetch-guard.ts — block reason now written to stderr (so the model receives it on exit 2), case-insensitive/lowercased host matching (an uppercase domain in the registry no longer blocks a legitimate source), and a SOURCES_FILE constant deduping the repeated filename literal.
  • validate-sources.ts — colon-tolerant markdown separator regex, so alignment rows (:---:) no longer false-flag as invalid types.
  • reddit-fetch.ts — clamp a non-positive limit to the default (was silently dropping posts / returning empty).
  • CI — operator-facing state-templates reference docs via ${CLAUDE_PLUGIN_ROOT}/docs/... instead of bare docs/..., satisfying core's operator-doc-refs guard (this was the failing check).

Corrections vs the original extraction spec

  • reddit_fetch.py's real contract is 0/1 (no exit-2 "unconfigured"); the TS port matches the live script, not its stale tests/docs.
  • No bin/hermit-chrome-start exists in core — Chrome availability is treated as a deployment concern; sources skip gracefully when it's down. launch_chrome.py not ported.
  • No core brief-block substrate (C4) or fetch-allowlist hook (C5) exists yet, so no dead brief-blocks/ template and no fetch_source_files meta key; both noted as planned core integrations. The fetch guard ships plugin-local until C5 lands.
  • The Discord-reaction → brief-feedback producer lives in the channel layer (not shipped here); weekly-digest consumes it and degrades silently when absent.

Test plan

  • cd plugins/feed-hermit && bun test52 pass, 0 fail (reddit-fetch exit-code contract via spawn, validate-sources cases, fetch-guard allow/block/fail-open, schema-contract, skill-structure).
  • Core suite (plugins/claude-code-hermit) → green, incl. the marketplace↔dir bidirectional-sync invariant, operator-doc-refs, and skill-structure.
  • bunx tsc --noEmit (repo-wide, strict) → 0 errors.
  • Scoped grep sweep — briefing-hermit / news-brief / BRIEFING.md / any briefing inside plugins/feed-hermit/zero (the only surviving briefing in the repo is the generic core artifact-type, which is orthogonal).
  • Hook smoke — fetch-guard.ts blocks an off-allowlist URL against a feed-sources.md allowlist; validate-sources.ts fires on a feed-sources.md edit and passes through a foreign sources.md.
  • Not yet run: a live /feed-hermit:hatch smoke on a real target project.

gtapps added 2 commits July 16, 2026 12:27
Extracts a self-contained briefing product into a new domain plugin: a
curated source registry (sources.md/categories.md with a validate-sources
hook), the 7-phase news-brief pipeline, weekly-digest synthesis, source
curation skills (add-source/source-scout/source-health), story-arcs and
deep-dive follow-ups, and a Haiku source-fetcher agent. Ships a plugin-local
fetch-guard PreToolUse hook (WebFetch domain allowlist from sources.md) for
prompt-injection containment rather than deferring the guard. reddit-fetch.ts
is a zero-dependency TS port (unauthenticated by default, optional OAuth2
client-credentials path), exit 0/1. The pipeline skill is named news-brief to
avoid trigger collision with core's status-summary brief skill.
Rename the still-unreleased plugin to feed-hermit (feed-to-brief identity):
"briefing/news" mischaracterized what it ingests, and the operator-owned root
files now take a collision-free feed- prefix so the validate-sources hook no
longer trips on a foreign sources.md. Flagship skill news-brief becomes
feed-brief; internal vocab, archive dir, config key, and prose move to the
feed/brief voice. Folds in the earlier fetch-guard/validate-sources/reddit-fetch
review fixes and the operator-doc-refs CI fix. No behavior change; unreleased,
so no field migration.
@gtapps
gtapps marked this pull request as ready for review July 16, 2026 18:16
@gtapps gtapps changed the title feat(briefing-hermit): news/trending briefing pipeline plugin feat(feed-hermit): feed-to-brief pipeline plugin Jul 16, 2026
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