feat(ECR-028): AICoreConfig ToolDefinition 只读并 Closed
ToolDefinition catalog (000029) · Loop continuous.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Backend Design: ECR-028 ToolDefinition
|
||||
|
||||
| ID | BD-2026-028 |
|
||||
| Status | Approved |
|
||||
| Coding | Loop authorized |
|
||||
| Level | L2 |
|
||||
| Migration | YES 000029 |
|
||||
|
||||
## Backend Change Boundary
|
||||
|
||||
```text
|
||||
Domain: ToolDefinition (read)
|
||||
App: AdminHandler → admin.Service → AdminRepo
|
||||
API: GET /admin/ai/tools; GET /admin/ai/tools/{id}
|
||||
Permission: admin.ai_config.read
|
||||
Migration: 000029
|
||||
```
|
||||
|
||||
## Out of boundary
|
||||
|
||||
工具在线编辑 · 运行时绑定 · UGC · 真支付
|
||||
|
||||
Rollback: down migration + remove routes/UI
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
## 2026-08-08
|
||||
|
||||
- **ECR-028 Closed**:AICoreConfig ToolDefinition(migration 000029 · admin client · /ai/tools · 只读)
|
||||
- **ECR-027 Closed**:AICoreConfig KnowledgeChunk(migration 000028 · admin client · /ai/knowledge-chunks · 只读)
|
||||
- **ECR-026 Closed**:OpsCMS ScheduledPublication(migration 000027 · admin-h5 client + /cms · 只读)
|
||||
- **ECR-025 Closed**:OpsCMS FeedSlot(migration 000026 · admin-h5 /cms · 只读)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# CODE_REVIEW — ECR-028
|
||||
|
||||
**Verdict:** Approve → Closed
|
||||
|
||||
Date: 2026-08-08 · Loop continuous
|
||||
|
||||
- ToolDefinition 只读;无 UGC/真支付
|
||||
- Integration AC mapped · OpenAPI updated
|
||||
@@ -0,0 +1,22 @@
|
||||
ecr: ECR-028
|
||||
capability: AICoreConfig
|
||||
bounded_context: Ask_Ops
|
||||
parent: WAVE0-FROZEN
|
||||
predecessor: ECR-027
|
||||
change:
|
||||
type: additive
|
||||
breaking_change: false
|
||||
migration_required: true
|
||||
compatibility_notes: >
|
||||
Adds ToolDefinition read catalog. Forbidden: UGC / real payment.
|
||||
|
||||
apis:
|
||||
- method: GET
|
||||
path: /api/v1/admin/ai/tools
|
||||
change: added
|
||||
- method: GET
|
||||
path: /api/v1/admin/ai/tools/{id}
|
||||
change: added
|
||||
perms:
|
||||
- code: admin.ai_config.read
|
||||
change: unchanged
|
||||
@@ -0,0 +1,15 @@
|
||||
# ECR-028
|
||||
|
||||
**Title:** AICoreConfig · ToolDefinition(只读薄切片)
|
||||
**Status:** **Closed**
|
||||
**Closed:** 2026-08-08(Loop continuous)
|
||||
**Parent:** WAVE0-FROZEN · **Predecessor:** ECR-027 Closed
|
||||
**Change Level:** L2
|
||||
|
||||
## Change
|
||||
|
||||
ToolDefinition 只读 · migration 000029 · admin client · /ai/tools
|
||||
|
||||
## Linked
|
||||
|
||||
Spec `ops-tool-definition.md` · BD-2026-028 · CONTRACT_DIFF/ECR-028.yaml · TEST_REPORT/ECR-028.md
|
||||
@@ -0,0 +1,6 @@
|
||||
# ENGINEERING_SPEC — ECR-028
|
||||
|
||||
1. migration 000029
|
||||
2. AdminRepo/Service/Handler
|
||||
3. OpenAPI + admin-h5
|
||||
4. Integration · Closed
|
||||
@@ -0,0 +1,3 @@
|
||||
# HANDOFF — ECR-028 Architect → Engineer
|
||||
|
||||
Loop continuous · Approved + Coding. Migration 000029. Forbidden: UGC/真支付.
|
||||
@@ -0,0 +1,3 @@
|
||||
# HANDOFF — ECR-028 Engineer → Reviewer
|
||||
|
||||
TestAICoreToolDefinitions PASS · Ready for Closed.
|
||||
@@ -0,0 +1,3 @@
|
||||
# PRODUCT_SPEC — ECR-028
|
||||
|
||||
对齐 ops-tool-definition.md · Approved · Loop · L2 · ToolDefinition 只读
|
||||
@@ -0,0 +1,6 @@
|
||||
# STATE — ECR-028
|
||||
|
||||
| Status | **Closed** |
|
||||
| Phase | closed |
|
||||
| Spec | ops-tool-definition.md |
|
||||
| Updated | 2026-08-08 |
|
||||
@@ -0,0 +1,12 @@
|
||||
id: TASK-028-ECR028
|
||||
ecr: ECR-028
|
||||
title: AICoreConfig · ToolDefinition(只读薄切片)
|
||||
role: engineer
|
||||
status: closed
|
||||
change_level: L2
|
||||
parent: WAVE0-FROZEN
|
||||
predecessor: ECR-027
|
||||
acceptance:
|
||||
- Spec AC mapped
|
||||
- ToolDefinition read only
|
||||
- No UGC / payment
|
||||
@@ -0,0 +1,33 @@
|
||||
# TEST_REPORT — ECR-028 ToolDefinition
|
||||
|
||||
Date: 2026-08-08 · Loop continuous · commit: `PENDING`
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
cd apps/api && go test ./internal/integration/ -run TestAICoreToolDefinitions -count=1
|
||||
npm run build:admin
|
||||
python3 scripts/ess-validate.py --phase review --ecr ECR-028
|
||||
python3 scripts/ess-gate-check.py --ecr ECR-028
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
| Check | Result |
|
||||
|-------|--------|
|
||||
| TestAICoreToolDefinitions | PASS |
|
||||
| build:admin | PASS |
|
||||
| ess-validate review | PASS |
|
||||
| ess-gate-check | PASS |
|
||||
|
||||
## AC
|
||||
|
||||
| ID | Evidence |
|
||||
|----|----------|
|
||||
| AC-F-01 | list seed/empty ok |
|
||||
| AC-F-02 | get 200 |
|
||||
| AC-F-03 | 未知 id → 404 |
|
||||
| AC-S-01 | 401 |
|
||||
| AC-S-02 | 403 |
|
||||
| AC-P-01 | list < 500ms |
|
||||
| AC-O-01 | N/A 只读 |
|
||||
@@ -32,3 +32,4 @@
|
||||
| ECR-025 | OpsCMS · FeedSlot | **Closed** | Spec ops-feed-slot.md · BD-2026-025 · migration 000026 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
| ECR-026 | OpsCMS · ScheduledPublication | **Closed** | Spec ops-scheduled-publication.md · BD-2026-026 · migration 000027 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
| ECR-027 | AICoreConfig · KnowledgeChunk | **Closed** | Spec ops-knowledge-chunk.md · BD-2026-027 · migration 000028 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
| ECR-028 | AICoreConfig · ToolDefinition | **Closed** | Spec ops-tool-definition.md · BD-2026-028 · migration 000029 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
|
||||
@@ -55,4 +55,4 @@ Human 明文:**直接用 Loop,不用人工确认。**
|
||||
|
||||
| Done | Next |
|
||||
|------|------|
|
||||
| ECR-013A…027 Closed | **ECR-028** KnowledgeChunk→ToolDefinition |
|
||||
| ECR-013A…028 Closed | **ECR-029** BlockPolicy |
|
||||
|
||||
Reference in New Issue
Block a user