Files
truthseeker/postcss.config.mjs
Mao Nakamoto e2f584440d feat: initial truthseeker scaffold + first-principles analyzer
First-principles rebuttal generator. Given a URL (or pre-fetched
article text via --text), produces a structured JSON analysis:

- title, author, publication, publication_date, language
- 2-3 sentence neutral summary
- 3-5 core claims with type (factual/normative/causal) and
  evidence_quality flag
- 250-500 word first-principles critique (engages with the strongest
  version of the article's argument, separates claim types, refuses
  the tribal frame)
- named sources with role + attributed claim
- biases to consider (specific, not generic political-axis labels)
- what would change the assessment

## Stack
- Next.js 16 + React 19 + Tailwind v4
- Groq llama-3.3-70b-versatile via src/lib/llm.ts (single swap point
  for the LLM provider)
- No third-party deps for the article fetch — vanilla regex + entity
  decode in src/lib/article-fetch.ts, no jsdom/Readability overhead
- tsx-powered CLI at scripts/analyze-cli.ts: writes
  analyses/<slug>.md so output is reviewable + committable

## Modes
1. URL mode: `npm run analyze -- "https://..."`. Direct fetch with
   real browser-shaped headers. Works for most public sites.
2. Pre-fetched text mode: `npm run analyze -- "https://..." --text
   path/to/body.txt`. Escape hatch for bot-gated sources (Republik,
   most major paywalled outlets) — fetch in a logged-in browser, save
   to a file, pass the path in. URL still rides along for attribution.

## Why this project exists
Articles in the wild bundle factual, normative, and causal claims
under one rhetorical posture. The job of a careful reader is to
separate them, then engage with the load-bearing parts. truthseeker
does that mechanically so the reader's attention stays on the
substance.

## Architecture (SoC)
- src/lib/article-fetch.ts — HTTP + HTML → plain text (pure function)
- src/lib/llm.ts — Groq client (the only paid edge)
- src/lib/prompts.ts — system prompt + user-prompt builder (the
  load-bearing piece; iterate independently of plumbing)
- src/lib/analysis.ts — orchestrator: analyzeUrl + analyzeText
- src/app/api/analyze/route.ts — thin POST wrapper around analysis.ts
- src/app/page.tsx — URL input + result render (client-side)
- scripts/analyze-cli.ts — no-server CLI that calls the same analysis lib

Built as the first dogfood project on top of FleetCrown's bootstrap
loop. See https://fleetcrown.vercel.app/thoughts/from-idea-to-first-commit-the-fleetcrown-bootstrap-loop
for the loop's design context.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-05 15:48:43 +02:00

8 lines
94 B
JavaScript

const config = {
plugins: {
"@tailwindcss/postcss": {},
},
};
export default config;