explore.write POST/PUT · create→draft · status 仍 ECR-008 · migration 000055 · Loop STOP Co-authored-by: Cursor <cursoragent@cursor.com>
2.2 KiB
2.2 KiB
Feature Spec: ExploreConfig · ScaleDefinition 写面(Ops · ECR-046)
Status:
Active(Implemented · ECR-046 Closed)
Auth:docs/WAVE0/ECR-046_WRITE_AUTHORIZATION.md(仅 ECR-046)
Predecessor: ECR-040 只读 · ECR-008 status PATCH · ECR-045 Closed
关联:ops-scale-definition.md · ops-content.md
1. 目标
运营可在 Explore 侧 创建/更新量表元数据(slug/title/description);上下架仍走 ECR-008。Closed 后 STOP。
2. In / Out
| In | Out |
|---|---|
POST/PUT /admin/explore/scales* |
PATCH status(ECR-008 独占) |
复用 admin.explore.write |
题干 / scale_questions |
复用表 scales |
soft-delete · Prompt/Knowledge/Chunk |
创建默认 status=draft |
支付 · UGC · 自动 ECR-047 |
| 审计 | 新权限子系统 |
3. 双通道矩阵(强制)
| API | 权限 | 字段 |
|---|---|---|
POST/PUT /admin/explore/scales* |
admin.explore.write |
slug · title · description |
PATCH /admin/scales/{id} |
admin.content.write |
仅 status(既有) |
4. Domain
| 字段 | 规则 |
|---|---|
slug |
唯一;^[a-z][a-z0-9-]{1,62}$ |
title |
必填 · ≤128 |
description |
≤512 · 可空串 |
status |
创建固定 draft;本刀 PUT 不得改 status |
5. C 端可观察
| 条件 | 行为 |
|---|---|
| 新建 draft | C 端 published list 不含 |
| ECR-008 PATCH → published | C 端 list 含(既有 /scales) |
| 不新增 C 端路由 | — |
6. Migration
000054→000055_ops_scale_definition_write:幂等确认 admin.explore.write
7. UI
admin-h5:量表元数据页(新建/编辑 slug·title·description);上下架仍在「内容」页。
8. AC
| ID | Then |
|---|---|
| AC-F-01 | POST → list/get 可见 · status=draft |
| AC-F-02 | PUT 改 title → get 反映;status 不变 |
| AC-F-03 | 重复 slug → 409 |
| AC-F-04 | draft 不在 C 端 published list;PATCH published 后出现 |
| AC-S-01/02 | 401;仅 read → POST 403 |
| AC-A-01 | 写产生审计 |
| AC-O-01 | explore PUT 带 status 被忽略或不接受;无题干写;无 soft-delete |
9. Closed 后
立即 STOP · 禁自动 ECR-047