Skip to content

feat(research): sin-code research — autonomous research-report generation (#384) - #401

Closed
Delqhi wants to merge 1 commit into
mainfrom
feat/research-report
Closed

feat(research): sin-code research — autonomous research-report generation (#384)#401
Delqhi wants to merge 1 commit into
mainfrom
feat/research-report

Conversation

@Delqhi

@Delqhi Delqhi commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Autonomous report via websearch + fetch + LLM synthesis. 6 tests race-clean.

…#384)

Adds the search -> fetch -> synthesize pipeline as a goal template
that the autonomy daemon (v3.5.0) can drive end-to-end. The new
'sin-code research <topic>' subcommand enqueues a goal with a
Definition-of-Done contract; every successful pipeline run lands a
citation-grounded Markdown report under .sin-code/reports/<slug>.md.

Stack:
- cmd/sin-code/internal/autonomy/research_report.go
  ResearchReport, Source, Searcher/Fetcher/LLM interfaces, Generator
  pipeline + byte-stable Validate. Pluggable StaticSearcher/StaticLLM
  for hermetic tests. HTTPFetcher wired to stdlib net/http with a
  hard byte cap.
- cmd/sin-code/research_cmd.go
  cobra subcommand with --priority, --retries, --sources, --fetch-bytes,
  --out-dir, --dry-run, --json, --frontmatter, --criteria. Enqueues
  the goal via Queue.AddWithContract.
- internal/permission_defaults.go
  research__run -> ask (M4); research__dry_run / list / show -> allow.
  research__* catch-all -> ask to keep headless modes gated.
- main.go
  NewResearchCmd() registered as the 43rd subcommand (v3.23.0).

Tests (cmd/sin-code/internal/autonomy/research_report_test.go):
- TestResearchReportGeneration: 3-source happy path, Body + Sources.
- TestResearchReportSlug: 7 inputs incl. truncation + determinism.
- TestResearchReportMarkdown: Body isValid via Validate() rejects
  whitespace + header-less + nil.
- TestResearchReportWiringGuards: nil gen, nil LLM, empty topic,
  LLM + searcher error, empty sources.
- TestResearchReportDedupRank: dedup URL + longest-snippet upgrade.
- TestResearchReportFrontmatter: deterministic 2026-06-18 timestamp.

go build ./cmd/sin-code/internal/autonomy -> OK
go test -race -count=1 ./cmd/sin-code/internal/autonomy -> PASS (all 6 + regression suite)
@Delqhi Delqhi added the enhancement New feature or request label Jun 18, 2026
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sin-code Ready Ready Preview, Comment, Open in v0 Jun 18, 2026 6:13pm

@Delqhi

Delqhi commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #408 — the research-report feature was cherry-picked cleanly onto a branch that also repairs the main build drift caused by parallel-agent WIP.

@Delqhi Delqhi closed this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant