feat(ECR-046): ScaleDefinition 元数据写面闭环并 Closed
explore.write POST/PUT · create→draft · status 仍 ECR-008 · migration 000055 · Loop STOP Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -57,7 +57,8 @@
|
||||
| [ops-image-card-deck-write.md](ops-image-card-deck-write.md) | ImageCardDeck **写面** | §7 | admin 写 · `GET /cards/decks` | ExploreConfig · **ECR-045** |
|
||||
| [ops-report-template.md](ops-report-template.md) | GrowthInsights ReportTemplate | §7 | `/admin/growth/report-templates*` | Ops · **ECR-038** |
|
||||
| [ops-funnel-definition.md](ops-funnel-definition.md) | GrowthInsights FunnelDefinition | §7 | `/admin/analytics/funnel-definitions*` | Ops · **ECR-039** |
|
||||
| [ops-scale-definition.md](ops-scale-definition.md) | ExploreConfig ScaleDefinition | §7 | `/admin/explore/scales*` | Ops · **ECR-040** |
|
||||
| [ops-scale-definition.md](ops-scale-definition.md) | ExploreConfig ScaleDefinition(只读) | §7 | `/admin/explore/scales*` | Ops · **ECR-040** |
|
||||
| [ops-scale-definition-write.md](ops-scale-definition-write.md) | ScaleDefinition **写面** | §7 | admin POST/PUT · status 仍 ECR-008 | ExploreConfig · **ECR-046** |
|
||||
|
||||
新功能:复制 `_TEMPLATE.md` → 填满 → 在本表登记 → 再编码。
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# 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-scale-definition.md) · [ops-content.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
|
||||
@@ -1,6 +1,7 @@
|
||||
# Feature Spec: ExploreConfig · ScaleDefinition(Ops · ECR-040)
|
||||
|
||||
> Status: `Active`(Loop continuous · **ECR-040 Closed**)
|
||||
> **写面:** [ops-scale-definition-write.md](ops-scale-definition-write.md)(**ECR-046 Closed**)
|
||||
> Parent: WAVE0-FROZEN · Predecessor: ECR-039 Closed
|
||||
> Capability: `ExploreConfig` · BC: `Explore_Reports`
|
||||
> 授权:`docs/WAVE0/LOOP_AUTHORIZATION.md`
|
||||
|
||||
Reference in New Issue
Block a user