Files
digital-psychology/.ai/product/feature-spec/ops-ask-operations.md
T
jackyu66gitandCursor 62cd8c45dd chore: 合入 stash Ops hardening 与 migration 000041
Ask/catalog 权限与审计加固、量表读权限统一,以及未提交的 ops hardening 变更。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 01:46:34 +08:00

43 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Feature Spec: AskOperationsOps · ECR-017
> Status: `Active`Loop continuous · **ECR-017 Closed**
> Parent: WAVE0-FROZEN · Predecessor: ECR-016 Closed
> Capability: `AskOperations` · BC: `Ask_Ops`
> 授权:`docs/WAVE0/LOOP_AUTHORIZATION.md`
## Non-goals
改写/删除消息正文 · SystemPrompt/Knowledge 配置 · QualityFeedback 写回 · AICoreConfig · 真支付 · UGC
## L2 读模型
| 概念 | 语义 |
|------|------|
| `AskSessionView` | 线程元数据 + message_count(列表) |
| 会话详情 | 只读消息序列(role/content/created_at |
## L3 API
| Method | Path | 权限 | 语义 |
|--------|------|------|------|
| GET | `/admin/ask/threads` | `admin.ask.read` | 列表(可选 `user_id` |
| GET | `/admin/ask/threads/:id` | `admin.ask.read` | 会话 meta(不含原文) |
| GET | `/admin/ask/threads/:id/messages` | `admin.ask.transcript.read` | 对话原文(审计 `ask.transcript.read` |
## Migration
`000019`:为 `super_admin` 授予 `admin.ask.read`(无新业务表)
## L4 AC
| ID | Then |
|----|------|
| AC-F-01 | 有消息线程 → list 含该 thread · message_count≥1 |
| AC-F-02 | detail 返回 user+assistant 消息 |
| AC-S-01 | 无 Admin → 401 |
| AC-S-02 | 无 ask.read → 403 |
| AC-P-01 | list &lt; 500ms 本机 |
| AC-O-01 | N/A 只读(无写审计强制) |
contract_diff: `docs/CONTRACT_DIFF/ECR-017.yaml`