@zat-design/sisyphus-scene 4.6.3-beta.2 → 4.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mcp/sisyphus-react.json +1 -1
- package/package.json +1 -1
- package/skills/sisyphus-scene/SKILL.md +48 -9
- package/skills/sisyphus-scene/agents/openai.yaml +3 -3
- package/skills/sisyphus-scene/assets/ai-contract.json +1 -1
- package/skills/sisyphus-scene/evals/fixtures/review-gate/invalid/components/DetailPanel/index.tsx +11 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/invalid/config/index.tsx +18 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/invalid/constants/index.ts +1 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/invalid/index.tsx +36 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/invalid/services/index.ts +3 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/invalid/utils/request.ts +10 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/valid/components/DetailPanel/index.tsx +24 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/valid/index.tsx +35 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/valid/services/index.ts +3 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/valid/shared/constants.ts +1 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/valid/shared/consumer-a.ts +3 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate/valid/shared/consumer-b.ts +3 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/invalid/config/formColumns.ts +13 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/invalid/flowHelper.ts +3 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/invalid/package.json +7 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/valid/components/DirectControl.tsx +7 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/valid/config/formColumns.ts +20 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/valid/context/BusinessContext.tsx +3 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/valid/hooks/useBusinessState.ts +3 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/valid/package.json +7 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/valid/protocol.ts +4 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/valid/services/index.ts +1 -0
- package/skills/sisyphus-scene/evals/fixtures/review-gate-v1.5/valid/utils/flowHelper.ts +3 -0
- package/skills/sisyphus-scene/evals/fixtures/valid-decisions.json +4 -4
- package/skills/sisyphus-scene/evals/review-gate-cases.yaml +140 -0
- package/skills/sisyphus-scene/evals/review-routing-cases.yaml +33 -0
- package/skills/sisyphus-scene/evals/trigger-cases.yaml +3 -0
- package/skills/sisyphus-scene/references/approved-examples.yaml +1 -1
- package/skills/sisyphus-scene/references/platform-claude.md +7 -0
- package/skills/sisyphus-scene/references/platform-codex.md +7 -0
- package/skills/sisyphus-scene/references/platform-cursor.md +7 -0
- package/skills/sisyphus-scene/references/review-guard.md +151 -0
- package/skills/sisyphus-scene/references/review-standard.md +130 -0
- package/skills/sisyphus-scene/references/validation-rules.md +6 -5
- package/skills/sisyphus-scene/references/workflow.md +24 -0
- package/skills/sisyphus-scene/scripts/evaluate-review-gate.mjs +222 -0
- package/skills/sisyphus-scene/scripts/validate-skill.mjs +43 -1
package/mcp/sisyphus-react.json
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sisyphus-scene
|
|
3
|
-
description: 基于与 Scene Agent 完全同版的 @zat-design/sisyphus-react 4.x 和 Ant Design 6,从页面截图或需求描述识别保险业务场景并生成 React/TypeScript
|
|
3
|
+
description: 基于与 Scene Agent 完全同版的 @zat-design/sisyphus-react 4.x 和 Ant Design 6,从页面截图或需求描述识别保险业务场景并生成 React/TypeScript 脚手架,或按用户指定文件/目录路径执行内置 Sisyphus CR 只读规范审查。用于查询列表、Tab 分组列表、列表弹窗、多 Tab 详情、分区详情、列表跳转详情、步骤条分区表单、参考其他应用实现、组合新场景和路径代码审查;支持 Claude Code、Codex、Cursor,不绑定 Umi Max。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Sisyphus 业务场景生成
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
为保险核心系统生成可验证的页面骨架,或对指定路径执行只读 Sisyphus 规范审查。场景模板只决定结构,组件 MCP 决定真实 API;路径审查使用内置 `sisyphus-cr@1.5.0` 规则,不依赖外部 CR 技能。
|
|
9
|
+
|
|
10
|
+
## 意图路由
|
|
11
|
+
|
|
12
|
+
在项目探测、SceneSpec、MCP 查询和任何写入前先确定模式:
|
|
13
|
+
|
|
14
|
+
- 用户明确使用“审查”“代码审查”“规范检查”或 `review`,并提供可解析的文件或目录路径时,进入 `path-review`。
|
|
15
|
+
- 路径可为绝对路径、相对当前工作目录的路径或反引号包裹路径。先解析为绝对路径并验证存在、可读;缺失或无法解析时输出 CR 三段式“无法判断”,不猜测目标。
|
|
16
|
+
- “参考某路径生成页面”“按某目录现有实现改造”等生成意图没有明确审查动词时,保持 `generation-gate`。
|
|
17
|
+
- “审查并修复 <path>”仍进入 `path-review`,遵守只读边界,只交付问题清单和修复计划,不修改代码。
|
|
18
|
+
|
|
19
|
+
### path-review
|
|
20
|
+
|
|
21
|
+
读取 `references/review-guard.md` 和 `references/review-standard.md`,发现最近项目规则、依赖、TypeScript/Sisyphus 证据和必要直接调用链,再创建独立只读子代理审查目标。文件只审查自身;目录递归审查并忽略生成、依赖和缓存目录。该模式不建立 `SceneSpec`、不查询 Sisyphus 或 Ant Design MCP、不生成代码、不进入自动修复。最终只输出“规范审查 / 问题清单 / 修复计划”。
|
|
22
|
+
|
|
23
|
+
### generation-gate
|
|
24
|
+
|
|
25
|
+
其他 Scene 请求继续执行以下 PC 基线和生成工作流。
|
|
9
26
|
|
|
10
27
|
## PC 系统交互基线
|
|
11
28
|
|
|
@@ -23,9 +40,10 @@ description: 基于与 Scene Agent 完全同版的 @zat-design/sisyphus-react 4.
|
|
|
23
40
|
- 仅支持 React + TypeScript、`assets/ai-contract.json` 声明的 Sisyphus 完全同版组合和 Ant Design 6。
|
|
24
41
|
- 所有生成的 `.ts`、`.tsx` 运行时函数必须使用箭头函数,包括组件、事件处理、配置工厂、service 和回调。禁止函数声明/表达式、对象或类方法、getter、setter 和 constructor;目标项目已有非箭头写法也不得覆盖此规则。
|
|
25
42
|
- Umi Max、React Router、请求库、权限和状态库都属于目标项目适配,不是技能依赖。
|
|
26
|
-
- 无论场景是否命中模板,先查询 Sisyphus MCP 的组件列表、完整 API 和 demo。
|
|
43
|
+
- `generation-gate` 无论场景是否命中模板,先查询 Sisyphus MCP 的组件列表、完整 API 和 demo。
|
|
27
44
|
- 只有 Sisyphus MCP 明确给出 `missing` 的能力才可进入 Ant Design 补全;`unverified` 必须先修复 MCP 连接或版本问题。
|
|
28
45
|
- Sisyphus、Ant Design 和项目公共组件都无法覆盖时停止生成,显式报告缺口。
|
|
46
|
+
- 确定性脚手架校验通过后,必须按 `references/review-guard.md` 创建独立只读规范门卫子代理;平台无法创建子代理时阻断,不得降级为主 Agent 自审。
|
|
29
47
|
- 不自动升级依赖、不修改全局布局、不创建新的基础组件库、不把临时场景自动写回本技能。
|
|
30
48
|
- 不声称“100% 合规”;只汇报实际证据和验证结果。
|
|
31
49
|
|
|
@@ -33,12 +51,14 @@ description: 基于与 Scene Agent 完全同版的 @zat-design/sisyphus-react 4.
|
|
|
33
51
|
|
|
34
52
|
| 阶段 | 核心动作 | 停止条件 |
|
|
35
53
|
| ---------- | ------------------------------------- | ------------------------------------- |
|
|
54
|
+
| 意图路由 | 区分路径审查与场景生成 | 审查意图没有可解析路径 |
|
|
36
55
|
| 项目探测 | 读平台规则、依赖和相邻实现 | 规则冲突且无法确定优先级 |
|
|
37
56
|
| 版本门禁 | 校验本地依赖、MCP 元数据和 Scene 契约 | 版本、schema、哈希或 MCP 连接不可验证 |
|
|
38
57
|
| 场景建模 | 从截图/需求建立 `SceneSpec` | 缺少会改变页面结构的关键决策 |
|
|
39
58
|
| MCP 取证 | 查组件、API、类型和单个 demo | 任一必需能力为 `unverified` |
|
|
40
59
|
| 缺口决策 | 为每项需求生成 `ComponentDecision` | 组件体系无法覆盖必需能力 |
|
|
41
|
-
|
|
|
60
|
+
| 生成与门禁 | 生成、脚手架校验、CR 门卫与自动修复 | 两轮后仍有任意问题或无法判断 |
|
|
61
|
+
| 项目验收 | typecheck、测试、页面和影响检查 | 存在未处理的验证或影响风险 |
|
|
42
62
|
|
|
43
63
|
## 执行工作流
|
|
44
64
|
|
|
@@ -152,12 +172,14 @@ node scripts/resolve-versions.mjs --root <项目根目录>
|
|
|
152
172
|
- 只有确认项目使用 React Router 时才生成对应 import。
|
|
153
173
|
- 无法确认导航实现时注入 `onView`、`onEdit`、`onBack` 等回调。
|
|
154
174
|
- 写代码前先按 `fileStructureAdapter.conventions` 输出“职责 → 文件路径”映射;配置、组件、services、models、assets、utils、hooks 和类型文件必须落到项目指定位置,禁止把有明确目录归属的文件平铺到页面根目录。
|
|
175
|
+
- 枚举页面或组件根目录的非入口源码;纯函数工具、DTO/payload 转换、解析、克隆、布局和历史计算进入 `utils/`,类型、配置/注册表、请求、组件和 Context 分别进入责任层。React 组件、状态 Hook、请求和明确的协议/基础设施模块不机械移入 `utils/`。
|
|
176
|
+
- Sisyphus columns 字段监听使用 `fieldProps.onFieldChange`;简单必填只配置 `required: true`;已有 `label` 时不重复生成默认 placeholder。直接控件 `onChange`、复杂 `rules` 和特殊业务 placeholder 保持其合理用法。
|
|
155
177
|
- 页面内子组件按项目证据使用独立目录、样式文件和 `components/index.ts` barrel;类型文件严格使用 `typeConvention`,不得自行改名为 `types.ts`。
|
|
156
178
|
- 请求、权限、状态和类型文件遵循目标项目证据。若 `requestAdapter` 声明全局错误拦截,不重复添加请求 `try/catch` 或 `res.status === 200` 判断。
|
|
157
179
|
- 把所有适用规则中的 MUST/禁止项转换为逐文件自检清单;组件内部顺序、Hooks、导出方式、命名和样式规则没有自动校验时也必须人工核对并如实报告。
|
|
158
180
|
- 无需求时不创建空 `hooks`、`models`、`utils`、`assets`、样式或菜单文件。
|
|
159
181
|
|
|
160
|
-
### 9.
|
|
182
|
+
### 9. 确定性校验与规范门卫
|
|
161
183
|
|
|
162
184
|
运行:
|
|
163
185
|
|
|
@@ -169,19 +191,34 @@ node scripts/validate-scaffold.mjs \
|
|
|
169
191
|
--profile <ProjectProfile JSON>
|
|
170
192
|
```
|
|
171
193
|
|
|
172
|
-
|
|
194
|
+
脚手架校验通过后执行以下不可跳过的闭环:
|
|
195
|
+
|
|
196
|
+
1. 读取 `references/review-guard.md`,通过平台原生子代理能力创建独立只读审查子代理。
|
|
197
|
+
2. 只传入用户需求与豁免摘要、本轮 `SceneSpec`、本次生成或修改的文件清单、项目根目录、目标目录、同一份 `ProjectProfile`、全部 `ComponentDecision` 和当前轮次。门卫可以读取直接依赖和项目规则取证,但不得报告清单外问题或修改文件。
|
|
198
|
+
3. 门卫只能输出“规范审查 / 问题清单 / 修复计划”,并包含 `references/review-guard.md` 要求的 `reviewMode: generation-gate`、`ruleVersion: sisyphus-cr@1.5.0` 元数据。将输出保存到任务临时目录,并运行 `node scripts/evaluate-review-gate.mjs --mode generation-gate --root <项目根目录> --report-root <任务临时目录> --report <报告文件> --round <0|1|2>`。
|
|
199
|
+
4. 只有门禁脚本返回 `status: passed` 才允许进入项目验证。返回 `status: repair` 时,主 Agent 按问题编号在文件清单内做最小修复,并使用 `nextRound` 进入下一轮。
|
|
200
|
+
5. 每轮修复后先重新运行 `validate-scaffold.mjs`,再创建新的独立只读子代理复审。
|
|
201
|
+
6. 自动修复最多 2 轮。门禁脚本返回 `status: blocked` 时立即停止;P0、P1、P2 任一遗留问题、报告格式不完整或“无法判断”都阻断交付。不得忽略 P2,也不得降级为主 Agent 自审。
|
|
202
|
+
7. 修复需要改动清单外源码、公共 API、路由、权限、依赖或全局布局时立即停止并报告,不自动扩大权限。
|
|
203
|
+
|
|
204
|
+
详细规则、证据要求、合理反例和输出契约见 `references/review-guard.md`。
|
|
205
|
+
|
|
206
|
+
### 10. 项目验证并交付
|
|
207
|
+
|
|
208
|
+
门卫通过后再运行目标项目的 typecheck、lint 和相关测试;有截图时启动页面做视觉核对。完成后运行 GitNexus detect changes。未执行的验证必须标记“未验证”。
|
|
173
209
|
|
|
174
210
|
## 输出格式
|
|
175
211
|
|
|
176
|
-
按顺序输出:
|
|
212
|
+
`path-review` 只使用 CR 的三个一级部分。`generation-gate` 按顺序输出:
|
|
177
213
|
|
|
178
214
|
1. 中文场景名、匹配级别和能力组合
|
|
179
215
|
2. 目标项目与版本门禁结果
|
|
180
216
|
3. Sisyphus MCP 组件/API/demo 证据
|
|
181
217
|
4. `ComponentDecision` 摘要和全部 Ant Design fallback
|
|
182
218
|
5. 生成文件树与完整代码
|
|
183
|
-
6.
|
|
184
|
-
7.
|
|
219
|
+
6. 门卫审查结论、自动修复轮次和最终问题清单
|
|
220
|
+
7. 实际执行的检查及结果
|
|
221
|
+
8. 未解决项和按优先级排列的 TODO;门卫未通过时明确标记“阻断交付”
|
|
185
222
|
|
|
186
223
|
## 资源路由
|
|
187
224
|
|
|
@@ -189,6 +226,8 @@ node scripts/validate-scaffold.mjs \
|
|
|
189
226
|
- 场景与能力模型:`references/scene-model.md`
|
|
190
227
|
- 数据和项目适配契约:`references/integration-contracts.md`
|
|
191
228
|
- 生成后校验规则:`references/validation-rules.md`
|
|
229
|
+
- 只读规范门卫与自动修复闭环:`references/review-guard.md`
|
|
230
|
+
- Sisyphus CR 完整审查基线:`references/review-standard.md`
|
|
192
231
|
- 可引用的团队批准样例:`references/approved-examples.yaml`
|
|
193
232
|
- 结构模板注册表:`assets/templates/scene-registry.json`
|
|
194
233
|
- 同版本 MCP/Scene 机器契约:`assets/ai-contract.json`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface:
|
|
2
|
-
display_name: 'Sisyphus
|
|
3
|
-
short_description: '
|
|
4
|
-
default_prompt: 'Use $sisyphus-scene to
|
|
2
|
+
display_name: 'Sisyphus 场景生成与审查'
|
|
3
|
+
short_description: '生成保险业务页面脚手架,或按指定路径执行只读规范审查'
|
|
4
|
+
default_prompt: 'Use $sisyphus-scene to route this request to verified scene generation or read-only path review.'
|
|
5
5
|
|
|
6
6
|
policy:
|
|
7
7
|
allow_implicit_invocation: true
|
package/skills/sisyphus-scene/evals/fixtures/review-gate/invalid/components/DetailPanel/index.tsx
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface DetailPanelProps {
|
|
2
|
+
detail: Record<string, unknown>;
|
|
3
|
+
loading: boolean;
|
|
4
|
+
onLoad: (id: string) => void;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const DetailPanel = ({ detail, loading, onLoad }: DetailPanelProps) => (
|
|
8
|
+
<button disabled={loading} onClick={() => onLoad('next')} type="button">
|
|
9
|
+
{String(detail.name || '加载')}
|
|
10
|
+
</button>
|
|
11
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Button } from 'antd';
|
|
2
|
+
|
|
3
|
+
interface CreateColumnsOptions {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
onEdit: (id: string) => void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const createTableColumns = ({ loading, onEdit }: CreateColumnsOptions) => [
|
|
9
|
+
{ dataIndex: 'name', title: '名称' },
|
|
10
|
+
{
|
|
11
|
+
title: '操作',
|
|
12
|
+
render: (_: unknown, record: { id: string }) => (
|
|
13
|
+
<Button loading={loading} onClick={() => onEdit(record.id)}>
|
|
14
|
+
编辑
|
|
15
|
+
</Button>
|
|
16
|
+
),
|
|
17
|
+
},
|
|
18
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const STATUS_OPTIONS = [{ label: '生效', value: 'active' }];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useRequest } from 'ahooks';
|
|
2
|
+
import { Form, message } from 'antd';
|
|
3
|
+
import { ProForm, ProSpin } from '@zat-design/sisyphus-react';
|
|
4
|
+
import { useRef, useState } from 'react';
|
|
5
|
+
|
|
6
|
+
import { DetailPanel } from './components/DetailPanel';
|
|
7
|
+
import { getEntity } from './services';
|
|
8
|
+
|
|
9
|
+
export const InvalidReviewPage = () => {
|
|
10
|
+
const [form] = Form.useForm();
|
|
11
|
+
const [loading, setLoading] = useState(false);
|
|
12
|
+
const [detail, setDetail] = useState<Record<string, unknown>>({});
|
|
13
|
+
const currentId = useRef('');
|
|
14
|
+
const { loading: requestLoading, runAsync } = useRequest(getEntity, { manual: true });
|
|
15
|
+
|
|
16
|
+
const handleLoad = async (id: string) => {
|
|
17
|
+
currentId.current = id;
|
|
18
|
+
setLoading(true);
|
|
19
|
+
try {
|
|
20
|
+
const response = await runAsync(id);
|
|
21
|
+
setDetail(response.data);
|
|
22
|
+
} catch {
|
|
23
|
+
message.error('加载详情失败');
|
|
24
|
+
} finally {
|
|
25
|
+
setLoading(false);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
<ProSpin spinning={requestLoading} />
|
|
32
|
+
<DetailPanel loading={loading} detail={detail} onLoad={handleLoad} />
|
|
33
|
+
<ProForm form={form} columns={[]} />
|
|
34
|
+
</>
|
|
35
|
+
);
|
|
36
|
+
};
|
package/skills/sisyphus-scene/evals/fixtures/review-gate/valid/components/DetailPanel/index.tsx
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Form, type FormInstance } from 'antd';
|
|
2
|
+
|
|
3
|
+
interface DetailPanelProps {
|
|
4
|
+
antdForm: FormInstance;
|
|
5
|
+
dataSource: { rowOperationLoading: boolean };
|
|
6
|
+
onLoad: () => void;
|
|
7
|
+
onToggleRow: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const DetailPanel = ({
|
|
11
|
+
antdForm,
|
|
12
|
+
dataSource,
|
|
13
|
+
onLoad,
|
|
14
|
+
onToggleRow,
|
|
15
|
+
}: DetailPanelProps) => (
|
|
16
|
+
<Form form={antdForm}>
|
|
17
|
+
<button disabled={dataSource.rowOperationLoading} onClick={onToggleRow} type="button">
|
|
18
|
+
行操作
|
|
19
|
+
</button>
|
|
20
|
+
<button onClick={onLoad} type="button">
|
|
21
|
+
加载
|
|
22
|
+
</button>
|
|
23
|
+
</Form>
|
|
24
|
+
);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useRequest } from 'ahooks';
|
|
2
|
+
import { Form, message } from 'antd';
|
|
3
|
+
import { ProForm, ProSpin } from '@zat-design/sisyphus-react';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
|
|
6
|
+
import { DetailPanel } from './components/DetailPanel';
|
|
7
|
+
import { requestWithoutGlobalErrorFeedback } from './services';
|
|
8
|
+
|
|
9
|
+
export const ValidReviewPage = () => {
|
|
10
|
+
const [proForm] = ProForm.useForm();
|
|
11
|
+
const [antdForm] = Form.useForm();
|
|
12
|
+
const [rowOperationLoading, setRowOperationLoading] = useState(false);
|
|
13
|
+
const { loading, runAsync } = useRequest(requestWithoutGlobalErrorFeedback, { manual: true });
|
|
14
|
+
|
|
15
|
+
const handleLoad = async () => {
|
|
16
|
+
try {
|
|
17
|
+
await runAsync();
|
|
18
|
+
} catch (error) {
|
|
19
|
+
message.error(error instanceof Error ? error.message : '请求失败');
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<ProSpin spinning={loading} />
|
|
26
|
+
<DetailPanel
|
|
27
|
+
antdForm={antdForm}
|
|
28
|
+
dataSource={{ rowOperationLoading }}
|
|
29
|
+
onLoad={handleLoad}
|
|
30
|
+
onToggleRow={() => setRowOperationLoading((value) => !value)}
|
|
31
|
+
/>
|
|
32
|
+
<ProForm form={proForm} columns={[]} />
|
|
33
|
+
</>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SHARED_STATUS_OPTIONS = [{ label: '生效', value: 'active' }];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const formColumns = [
|
|
2
|
+
{
|
|
3
|
+
type: 'ProInput',
|
|
4
|
+
name: 'policyName',
|
|
5
|
+
label: '保单名称',
|
|
6
|
+
required: true,
|
|
7
|
+
rules: [{ required: true, message: '请输入保单名称' }],
|
|
8
|
+
fieldProps: {
|
|
9
|
+
placeholder: '请输入保单名称',
|
|
10
|
+
onChange: (value: unknown) => value,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const formColumns = [
|
|
2
|
+
{
|
|
3
|
+
type: 'ProInput',
|
|
4
|
+
name: 'policyName',
|
|
5
|
+
label: '保单名称',
|
|
6
|
+
required: true,
|
|
7
|
+
fieldProps: {
|
|
8
|
+
onFieldChange: (value: unknown) => value,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
type: 'ProInput',
|
|
13
|
+
name: 'policyCode',
|
|
14
|
+
label: '保单号',
|
|
15
|
+
rules: [{ pattern: /^P\d{8}$/, message: '保单号格式为 P 加 8 位数字' }],
|
|
16
|
+
fieldProps: {
|
|
17
|
+
placeholder: '例如 P12345678',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getPolicy = async (id: string) => ({ id, name: '测试保单' });
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"apiEvidence": {
|
|
9
9
|
"tool": "sisyphus-get-component-api",
|
|
10
10
|
"target": "ProForm",
|
|
11
|
-
"libraryVersion": "4.6.3
|
|
11
|
+
"libraryVersion": "4.6.3",
|
|
12
12
|
"schemaVersion": 2
|
|
13
13
|
},
|
|
14
14
|
"demoEvidence": {
|
|
15
15
|
"tool": "sisyphus-get-example",
|
|
16
16
|
"target": "ProForm/demos/base.tsx",
|
|
17
|
-
"libraryVersion": "4.6.3
|
|
17
|
+
"libraryVersion": "4.6.3",
|
|
18
18
|
"schemaVersion": 2,
|
|
19
19
|
"exampleId": "ProForm/demos/base.tsx"
|
|
20
20
|
}
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"apiEvidence": {
|
|
29
29
|
"tool": "sisyphus-get-component-api",
|
|
30
30
|
"target": "ProTable",
|
|
31
|
-
"libraryVersion": "4.6.3
|
|
31
|
+
"libraryVersion": "4.6.3",
|
|
32
32
|
"schemaVersion": 2
|
|
33
33
|
},
|
|
34
34
|
"demoEvidence": {
|
|
35
35
|
"tool": "sisyphus-get-example",
|
|
36
36
|
"target": "ProTable/demos/base.tsx",
|
|
37
|
-
"libraryVersion": "4.6.3
|
|
37
|
+
"libraryVersion": "4.6.3",
|
|
38
38
|
"schemaVersion": 2,
|
|
39
39
|
"exampleId": "ProTable/demos/base.tsx"
|
|
40
40
|
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
policy:
|
|
3
|
+
reviewer: independent-read-only-subagent
|
|
4
|
+
max_repair_rounds: 2
|
|
5
|
+
blocking_priorities:
|
|
6
|
+
- P0
|
|
7
|
+
- P1
|
|
8
|
+
- P2
|
|
9
|
+
cases:
|
|
10
|
+
- id: private-constants
|
|
11
|
+
kind: invalid
|
|
12
|
+
fixture: evals/fixtures/review-gate/invalid/constants/index.ts
|
|
13
|
+
evidence: ordinary-page-private-constants-directory
|
|
14
|
+
expected_rule: directory-responsibility
|
|
15
|
+
- id: mirrored-request-loading
|
|
16
|
+
kind: invalid
|
|
17
|
+
fixture: evals/fixtures/review-gate/invalid/index.tsx
|
|
18
|
+
evidence: useRequest-loading-copied-to-local-state
|
|
19
|
+
expected_rule: request-loading-source
|
|
20
|
+
- id: flat-custom-component-loading
|
|
21
|
+
kind: invalid
|
|
22
|
+
fixture: evals/fixtures/review-gate/invalid/index.tsx
|
|
23
|
+
evidence: request-loading-passed-as-flat-prop-to-project-component
|
|
24
|
+
expected_rule: custom-component-data-source
|
|
25
|
+
- id: dynamic-column-in-config
|
|
26
|
+
kind: invalid
|
|
27
|
+
fixture: evals/fixtures/review-gate/invalid/config/index.tsx
|
|
28
|
+
evidence: config-column-contains-jsx-permission-callback-and-runtime-loading
|
|
29
|
+
expected_rule: table-column-responsibility
|
|
30
|
+
- id: wrong-sisyphus-form-instance
|
|
31
|
+
kind: invalid
|
|
32
|
+
fixture: evals/fixtures/review-gate/invalid/index.tsx
|
|
33
|
+
evidence: form-use-form-instance-consumed-by-pro-form
|
|
34
|
+
expected_rule: sisyphus-form-instance
|
|
35
|
+
- id: duplicate-request-error-message
|
|
36
|
+
kind: invalid
|
|
37
|
+
fixture: evals/fixtures/review-gate/invalid/index.tsx
|
|
38
|
+
evidence: global-request-message-plus-local-fixed-error
|
|
39
|
+
expected_rule: duplicate-error-feedback
|
|
40
|
+
- id: service-formatting
|
|
41
|
+
kind: invalid
|
|
42
|
+
fixture: evals/fixtures/review-gate/invalid/services/index.ts
|
|
43
|
+
evidence: jsdoc-export-and-adjacent-services-packed-on-one-line
|
|
44
|
+
expected_rule: service-layout
|
|
45
|
+
- id: stale-async-response
|
|
46
|
+
kind: invalid
|
|
47
|
+
fixture: evals/fixtures/review-gate/invalid/index.tsx
|
|
48
|
+
evidence: earlier-detail-request-can-overwrite-new-record
|
|
49
|
+
expected_rule: async-race-safety
|
|
50
|
+
- id: third-party-loading-is-valid
|
|
51
|
+
kind: valid
|
|
52
|
+
fixture: evals/fixtures/review-gate/valid/index.tsx
|
|
53
|
+
evidence: request-loading-passed-directly-to-sisyphus-public-api
|
|
54
|
+
expected_result: review-passed
|
|
55
|
+
- id: antd-form-instance-is-valid
|
|
56
|
+
kind: valid
|
|
57
|
+
fixture: evals/fixtures/review-gate/valid/components/DetailPanel/index.tsx
|
|
58
|
+
evidence: form-use-form-instance-consumed-only-by-antd-form
|
|
59
|
+
expected_result: review-passed
|
|
60
|
+
- id: business-loading-is-valid
|
|
61
|
+
kind: valid
|
|
62
|
+
fixture: evals/fixtures/review-gate/valid/index.tsx
|
|
63
|
+
evidence: non-request-row-operation-lock
|
|
64
|
+
expected_result: review-passed
|
|
65
|
+
- id: shared-constants-is-valid
|
|
66
|
+
kind: valid
|
|
67
|
+
fixture: evals/fixtures/review-gate/valid/shared/constants.ts
|
|
68
|
+
evidence: constants-module-used-by-multiple-business-modules
|
|
69
|
+
expected_result: review-passed
|
|
70
|
+
- id: local-error-message-is-valid-without-global-handler
|
|
71
|
+
kind: valid
|
|
72
|
+
fixture: evals/fixtures/review-gate/valid/index.tsx
|
|
73
|
+
evidence: request-layer-does-not-display-api-message
|
|
74
|
+
expected_result: review-passed
|
|
75
|
+
- id: first-review-pass
|
|
76
|
+
kind: workflow
|
|
77
|
+
review_results:
|
|
78
|
+
- passed
|
|
79
|
+
expected_repair_rounds: 0
|
|
80
|
+
expected_result: delivery-allowed
|
|
81
|
+
- id: repair-then-pass
|
|
82
|
+
kind: workflow
|
|
83
|
+
review_results:
|
|
84
|
+
- failed-p1
|
|
85
|
+
- passed
|
|
86
|
+
expected_repair_rounds: 1
|
|
87
|
+
expected_result: delivery-allowed
|
|
88
|
+
- id: two-rounds-still-failing
|
|
89
|
+
kind: workflow
|
|
90
|
+
review_results:
|
|
91
|
+
- failed-p1
|
|
92
|
+
- failed-p2
|
|
93
|
+
- failed-p2
|
|
94
|
+
expected_repair_rounds: 2
|
|
95
|
+
expected_result: blocked
|
|
96
|
+
- id: flat-root-utility
|
|
97
|
+
kind: invalid
|
|
98
|
+
fixture: evals/fixtures/review-gate-v1.5/invalid/flowHelper.ts
|
|
99
|
+
evidence: pure-helper-flattened-in-page-root
|
|
100
|
+
expected_rule: root-source-responsibility
|
|
101
|
+
- id: sisyphus-columns-on-change
|
|
102
|
+
kind: invalid
|
|
103
|
+
fixture: evals/fixtures/review-gate-v1.5/invalid/config/formColumns.ts
|
|
104
|
+
evidence: sisyphus-column-field-props-on-change
|
|
105
|
+
expected_rule: sisyphus-on-field-change
|
|
106
|
+
- id: duplicate-simple-required-rule
|
|
107
|
+
kind: invalid
|
|
108
|
+
fixture: evals/fixtures/review-gate-v1.5/invalid/config/formColumns.ts
|
|
109
|
+
evidence: required-true-plus-simple-required-rule
|
|
110
|
+
expected_rule: duplicate-required-validation
|
|
111
|
+
- id: redundant-default-placeholder
|
|
112
|
+
kind: invalid
|
|
113
|
+
fixture: evals/fixtures/review-gate-v1.5/invalid/config/formColumns.ts
|
|
114
|
+
evidence: placeholder-repeats-label-default
|
|
115
|
+
expected_rule: default-placeholder
|
|
116
|
+
- id: utils-directory-is-valid
|
|
117
|
+
kind: valid
|
|
118
|
+
fixture: evals/fixtures/review-gate-v1.5/valid/utils/flowHelper.ts
|
|
119
|
+
evidence: pure-helper-under-utils-directory
|
|
120
|
+
expected_result: review-passed
|
|
121
|
+
- id: direct-control-on-change-is-valid
|
|
122
|
+
kind: valid
|
|
123
|
+
fixture: evals/fixtures/review-gate-v1.5/valid/components/DirectControl.tsx
|
|
124
|
+
evidence: directly-rendered-react-input-public-on-change
|
|
125
|
+
expected_result: review-passed
|
|
126
|
+
- id: complex-validation-rules-are-valid
|
|
127
|
+
kind: valid
|
|
128
|
+
fixture: evals/fixtures/review-gate-v1.5/valid/config/formColumns.ts
|
|
129
|
+
evidence: regex-validation-without-duplicate-required-rule
|
|
130
|
+
expected_result: review-passed
|
|
131
|
+
- id: special-placeholder-is-valid
|
|
132
|
+
kind: valid
|
|
133
|
+
fixture: evals/fixtures/review-gate-v1.5/valid/config/formColumns.ts
|
|
134
|
+
evidence: placeholder-explains-required-business-format
|
|
135
|
+
expected_result: review-passed
|
|
136
|
+
- id: responsibility-layer-exceptions-are-valid
|
|
137
|
+
kind: valid
|
|
138
|
+
fixture: evals/fixtures/review-gate-v1.5/valid/protocol.ts
|
|
139
|
+
evidence: component-hook-service-context-and-protocol-remain-in-own-layers
|
|
140
|
+
expected_result: review-passed
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
cases:
|
|
3
|
+
- id: relative-review-path
|
|
4
|
+
prompt: '审查 src/pages/Policy'
|
|
5
|
+
expected_mode: path-review
|
|
6
|
+
expected_path: src/pages/Policy
|
|
7
|
+
- id: absolute-review-path
|
|
8
|
+
prompt: '规范检查 /workspace/src/pages/Policy/index.tsx'
|
|
9
|
+
expected_mode: path-review
|
|
10
|
+
expected_path: /workspace/src/pages/Policy/index.tsx
|
|
11
|
+
- id: backtick-review-path
|
|
12
|
+
prompt: 'review `src/pages/Claim`'
|
|
13
|
+
expected_mode: path-review
|
|
14
|
+
expected_path: src/pages/Claim
|
|
15
|
+
- id: reference-path-stays-generation
|
|
16
|
+
prompt: '参考 src/pages/Policy 生成一个理赔列表页'
|
|
17
|
+
expected_mode: generation-gate
|
|
18
|
+
- id: review-without-path-unresolved
|
|
19
|
+
prompt: '审查一下这个页面'
|
|
20
|
+
expected_mode: path-review-unresolved
|
|
21
|
+
expected_result: unable-to-determine
|
|
22
|
+
- id: missing-review-path-unresolved
|
|
23
|
+
prompt: '审查 src/pages/Missing'
|
|
24
|
+
expected_mode: path-review-unresolved
|
|
25
|
+
expected_result: unable-to-determine
|
|
26
|
+
- id: non-sisyphus-review-path-undetermined
|
|
27
|
+
prompt: '审查 src/plain-react'
|
|
28
|
+
expected_mode: path-review
|
|
29
|
+
expected_result: unable-to-determine
|
|
30
|
+
- id: review-and-fix-remains-read-only
|
|
31
|
+
prompt: '审查并修复 src/pages/Policy'
|
|
32
|
+
expected_mode: path-review
|
|
33
|
+
mutation_allowed: false
|
|
@@ -5,8 +5,11 @@ should_trigger:
|
|
|
5
5
|
- '参考 claim 应用实现一个多 Tab 详情编辑页'
|
|
6
6
|
- '这个布局不在已有场景里,请根据 Sisyphus demo 组合'
|
|
7
7
|
- '做一个右侧步骤锚点、统一校验的长表单'
|
|
8
|
+
- '使用 sisyphus-scene 审查 src/pages/Policy'
|
|
9
|
+
- '规范检查 `/workspace/src/pages/Claim/index.tsx`'
|
|
8
10
|
should_not_trigger:
|
|
9
11
|
- '解释一下 React useEffect'
|
|
10
12
|
- '修复这个现有组件的业务 bug'
|
|
11
13
|
- '给 antd4 项目生成 CRUD 页面'
|
|
12
14
|
- '给 Sisyphus v3 项目兼容一个旧页面'
|
|
15
|
+
- '审查一下 React 的最佳实践'
|