Files
yingqing/core/backend
seaislee1209andClaude Opus 4.8 a24dbb868a refactor(extract): 写死契约瘦身为纯结构,craft 全交给 skill(消除重复/漂移、不降质)
承上轮讨论(商业级质量考量):写死的 _EXTRACT_OUTPUT_CONTRACT 原先掺了 craft 规则
(穿搭/空手/字数/visual_prompt 写法),与 skill 正文重复 → 有漂移、稀释质量之虞。
现只留「格式骨架」(JSON 形状 / character|scene 两类 / 不提商品 / id 规则 / segments
覆盖每镜 / 只输出 JSON);所有创作细则一律以 skill 正文为准。定位不变:skill 丢了也
保证出 JSON 不塌(流水线硬底线),质量则 100% 由 skill 单点驱动。

验证(全在瘦身版上):
- 完整 Django 套件 152/152 全绿。
- 真调豆包「瘦身前 vs 瘦身后」对比:角色/场景/segments 一致,visual_prompt 仍守住
  空手/不提商品/空镜/字数(craft 由 skill 驱动)—— 质量零退步。
- 本地起后端(sqlite+eager+真ARK)+前端+无头 chromium 真点提取按钮:闸门→提取→
  角色(女主/室友)场景(学生宿舍/大学教室)落库、entities_extracted=True、
  任务 succeeded、system_chars=7482(非空)、0 控制台错误。

可回退:tag extract-ok-baseline(66778fa)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 00:47:01 +08:00
..

AirShelf Backend

All backend code lives under AirShelf/core/backend by project decision.

Local bootstrap

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python manage.py migrate
python manage.py runserver 0.0.0.0:8000

Start workers in separate terminals:

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
source .venv/bin/activate
celery -A airshelf worker -l info -P threads -c 4   # 线程池 4 并发(出图/视频可并行;勿用 -P solo 串行)

ffmpeg must be available on PATH for Stage5 export jobs.

Runtime layout

  • Django project: airshelf
  • Domain apps: apps/*
  • Settings module: airshelf.settings.development
  • Celery app: airshelf.celery

Secrets must be supplied by environment variables or .env; never commit values from account.md.

Useful commands

python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py migrate
python manage.py bootstrap_volcano_models
python manage.py test apps.accounts apps.projects apps.billing