Skip to content

Latest commit

 

History

History
100 lines (77 loc) · 3.75 KB

File metadata and controls

100 lines (77 loc) · 3.75 KB

主播小号监管系统

为新心文化传媒公司检测签约主播是否违反合同私自开设小号的监管系统

Project Structure

主播小号监管系统/
├── CLAUDE.md           This file
├── .gitignore          Ignores credentials, data, temp files
├── specs/              Specifications (/speccy output, /build input)
├── context/            Domain knowledge and references
└── .tmp/               Scratch work (gitignored)

Development Workflow

/speccy → specs/{name}.md → /build specs/{name}.md → /ship
  • /speccy interviews and writes a structured spec to specs/
  • /build reads the spec, explores, designs, implements, reviews, tests
  • /ship commits, creates PR, waits for CI, merges

Memory

Claude Code's built-in auto-memory persists curated facts across sessions with no plugin required — see ~/.claude/projects/<project>/memory/MEMORY.md.

For the methodology layer (plan → build → finish), install the superpowers plugin:

claude plugin install superpowers

mad-skills defers its overlapping /speccy, /build, and /ship stages to superpowers when it is present, and falls back to its own standalone pipeline when it is absent.

Branch Discipline

  • Always sync to main before starting new work — run /sync or git checkout main && git pull before creating a feature branch
  • Never branch from a feature branch — always branch from an up-to-date main
  • One feature per branch — don't stack unrelated changes on the same branch
  • After shipping a PR, sync immediately — checkout main and pull before starting the next task
  • If a PR is pending review, switch to main before starting unrelated work — don't build on top of an unmerged branch

These rules prevent divergent branches that require complex rebases with risk of silent conflict resolution.

Worktree Discipline

  • Relative paths don't follow a Bash cd — Read/Write/Edit tools resolve relative paths against the session's own working directory, not wherever a worktree checkout or cd left the shell; use absolute paths once inside a worktree
  • Never reuse an existing worktree for an unrelated task — a leftover worktree from a different feature is not a safe place to start new work
  • Don't leave worktrees dangling once a branch is finished — clean up through whichever tool created the worktree once its branch is merged or abandoned

These rules prevent file-tool paths from silently resolving against the wrong tree.

Guardrails

  • Verify tool output format before chaining into another tool
  • Do not assume APIs support batch operations — check first
  • Preserve intermediate outputs when workflows fail mid-execution
  • Use persistent tasks (TaskCreate/TaskUpdate) for cross-session tracking
  • Temporary files go in .tmp/ — never store important data there
  • Don't build before designing — rewrites everything
  • Don't skip connection validation — hours wasted on broken integrations
  • Don't skip data modelling — schema changes cascade into UI rewrites

本地启动

前置条件

  • Python 3.12+
  • Node.js 18+
  • Docker Desktop
  • douyins (erma0/douyin) 已安装并配置 cookie

启动步骤

  1. docker compose up -d — 启动 PostgreSQL + Redis
  2. cd backend && pip install -r requirements.txt && uvicorn app.main:app --reload — 后端 API
  3. cd backend && celery -A app.worker.celery_app worker --loglevel=info --pool=solo — 异步任务
  4. cd frontend && npm install && npm run dev — 前端页面
  5. 打开 http://localhost:5173

首次使用

  1. 在「侦查工作台」输入主播抖音号,点击「开始侦查」
  2. 等待几分钟(侦查在后台异步执行)
  3. 点击「查看报告」查看嫌疑结果