交付 FastAPI/Celery/Vue 薄壳、FORCE RLS、Compose 回环与 review 修复证据,关闭 M01 DONE_LOCAL。 Co-authored-by: Cursor <cursoragent@cursor.com>
151 lines
3.7 KiB
Markdown
151 lines
3.7 KiB
Markdown
# Task Context Pack
|
||
|
||
## Task Goal
|
||
|
||
完成 Watchman M01 基础框架:实现 S1–S7、补齐 critic/review 必改与建议顺带项,并留下可回查证据。
|
||
|
||
## Knowledge Posture
|
||
|
||
- Mode: standard
|
||
- Maturity: L1
|
||
|
||
## Current Slice Or Group
|
||
|
||
当前:review 修复收尾已完成;等待复审结果与用户最终确认。不再扩大 M01 范围。
|
||
|
||
## Gate Policy
|
||
|
||
- Recommended: strict
|
||
- Selected: autonomous(任务局部)
|
||
- finalApprovalRequired: true
|
||
- Policy Notes: 分析→编码门禁已过。仓库 `gatePolicy.defaultMode` 保持 balanced(D17)。最终批准仍需用户确认。
|
||
|
||
## Bugfix Context
|
||
|
||
不适用(本轮为 review 修复)。
|
||
|
||
## Requirement Source
|
||
|
||
`.task/2026-11-17/m01-foundation/requirement.md`
|
||
|
||
## Implementation Source
|
||
|
||
`.task/2026-11-17/m01-foundation/implementation-plan.md`
|
||
|
||
## Involved Modules Or Areas
|
||
|
||
`services/watchman`、`web/`、`deploy/`、`docs/evidence/M01/`。
|
||
|
||
## Loaded Context
|
||
|
||
### Global Rules
|
||
|
||
AGENTS.md 托管段门禁;sy-standards;密钥不入库。
|
||
|
||
### Knowledge Map Matches
|
||
|
||
M01 基础框架。
|
||
|
||
### Path-Proximity Rules
|
||
|
||
无模块级 MODULE_RULES。
|
||
|
||
### Excluded Context
|
||
|
||
syops 业务代码、M02+、生产部署。
|
||
|
||
## Loaded Rules
|
||
|
||
- `standards://api/api-envelope?version=1.1.0`
|
||
- `standards://api/error-handling?version=1.1.1`
|
||
- `standards://engineering/code-layout?version=1.0.1`
|
||
- `standards://engineering/code-comments?version=1.1.1`
|
||
- `standards://security/red-line?version=1.1.0`
|
||
- `standards://security/env-secrets?version=1.1.1`
|
||
- `standards://frontend/frontend-stack?version=2.1.0`
|
||
- `standards://frontend/element-plus?version=1.0.2`
|
||
- D01、D04、D12–D18
|
||
|
||
## Loaded Docs
|
||
|
||
- `docs/tasks/M01.md`
|
||
- `docs/decisions.md`
|
||
- `docs/runbook.md`
|
||
- `docs/evidence/M01/*`
|
||
|
||
## Execution Mode
|
||
|
||
- Mode: sequential
|
||
- Current Slice Or Group: review-fixup(已实现)
|
||
- Parallel Members: 无
|
||
- Fallback Order: N/A
|
||
- Shared Files: N/A
|
||
- Merge Owner: 主 Agent
|
||
- Conflict Resolution Rule: 信封与 RLS 语义冻结
|
||
- Validation Level: module
|
||
|
||
## Execution Chain
|
||
|
||
实现 → 独立 review → 必改/建议修复 → Playwright/pytest → 复审 → 用户最终确认。
|
||
|
||
## Allowed Modification Scope
|
||
|
||
- `services/watchman/**`
|
||
- `web/**`
|
||
- `deploy/**`
|
||
- `.env.example`、`.env.shared`
|
||
- `docs/tasks/M01.md`、`docs/progress.md`、`docs/runbook.md`、`docs/decisions.md`、`docs/evidence/M01/**`、`docs/handoffs/**`
|
||
- `.task/2026-11-17/m01-foundation/**`
|
||
- `.gitignore`
|
||
|
||
## Forbidden Modification Scope
|
||
|
||
- 提交真实密码
|
||
- 写入 `D:\PROJECT\syops`
|
||
- 业务模块、Casdoor、vben5、Redis、生产部署
|
||
- 未经确认的门禁姿态放宽
|
||
- DONE_LOCAL/git commit(除非用户明确要求)
|
||
|
||
## Key Existing Classes Or Entrypoints
|
||
|
||
- `python -m watchman api|worker|beat`
|
||
- `web/apps/console` Vite 5173
|
||
- `/health`、`/platform/*`
|
||
|
||
## Required Behavior
|
||
|
||
- 数值信封无额外顶层字段;`/health` 不泄漏机密
|
||
- env 分层;启动缺键失败;probe/docs 非生产收口
|
||
- FORCE RLS;幂等;调用方不可传租户;commit 后租户重绑
|
||
- 前端三态 + 截图证据
|
||
|
||
## Non-goals
|
||
|
||
M02 登录、业务规则、真实企微、生产 Compose。
|
||
|
||
## Implementation Steps
|
||
|
||
1. (已完成)必改与建议修复。
|
||
2. (进行中)独立复审。
|
||
3. 用户最终确认后关 M01。
|
||
|
||
## Validation Commands
|
||
|
||
- `uv run pytest services/watchman/tests -q`
|
||
- `cd web/apps/console && pnpm test:unit && pnpm typecheck && pnpm test:e2e`
|
||
|
||
## Assumptions
|
||
|
||
- 本机 Postgres + RabbitMQ Compose 可用。
|
||
- `.env.local` 已配置且不入库。
|
||
|
||
## Risks
|
||
|
||
- 复审可能再发现残余项。
|
||
- 无 commit hash,证据与工作区绑定需靠文件路径与命令输出。
|
||
|
||
## Stop Conditions
|
||
|
||
- 复审 FAIL 或用户要求改口径时停止。
|
||
- 不自动 DONE_LOCAL/不自动 commit。
|