Skip to content
hamburger-liePublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Thinker

Thinker 是一个可复刻的市场趋势分析程序仓库。它把产品信息、竞品卖点和可选爬虫信号整理成结构化趋势报告,并且内置了一个 repo-local skill,方便后续在 Codex 工作流里复用。

当前这套系统的定位是:

  • 方向筛选雷达
  • 结构化趋势报告引擎
  • 可解释的 spark / fuel / friction / momentum / confidence 评分流水线

它不是一个“保证预测销量”的黑盒模型。

当前能力

  • 调用 /api/analyze 生成结构化趋势报告
  • 通过规则引擎输出机会、风险、建议和图表数据
  • 在有 GEMINI_API_KEY 时做 AI 增强整理
  • 在没有 AI 配置时走稳定的规则回退
  • 使用 thin runner 从本地 JSON 直接跑分析
  • 内置 skills/market-trend-radar/ 作为 repo-local skill 文档壳

Quick Start

前置条件:Node.js 22+

  1. 安装依赖
npm install
  1. 复制环境变量模板
copy .env.example .env
  1. 启动本地开发服务
npm run dev

服务默认启动在 http://localhost:3000。

Thin Runner

直接跑一个本地 JSON 输入:

npm run analyze:run -- examples/pet-grooming-slicker.json

也可以直接运行内置示例:

npm run analyze:example

示例输入文件见 examples/pet-grooming-slicker.json。

API

本地服务启动后,可以 POST 到:

http://localhost:3000/api/analyze

最小输入格式:

{
  "industry": "home therapy device",
  "description": "smart cold therapy and recovery products"
}

更完整的输入支持 products[] 和 crawlSignals[]。详细格式见 input-contract.md。

Skill

仓库内置了一个 repo-local skill:

配套参考文档:

这个 skill 适合在当前仓库工作区里使用,让 agent 直接调用已测试的引擎与 runner,而不是重新拼装提示词逻辑。

Environment Variables

  • GEMINI_API_KEY: 可选,用于增强老板摘要、风险提示和建议动作
  • FMP_API_KEY: 预留,后续可接外部资金/量化数据
  • JINA_API_KEY: 预留,后续可接网页清洗/抓取能力

Verification

npm test
npm run lint
npm run build

Project Layout

src/                           core analysis and frontend code
scripts/                       thin runner and helper scripts
tests/                         analysis, API, and runner verification
examples/                      reusable local input payloads
skills/market-trend-radar/     repo-local skill wrapper and references
docs/                          design and implementation history

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages