@ranger1/dx 0.1.104 → 0.1.106

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.
Files changed (36) hide show
  1. package/lib/codex-initial.js +79 -5
  2. package/package.json +1 -1
  3. package/skills/backend-audit-fixer/SKILL.md +98 -0
  4. package/skills/backend-audit-fixer/references/backend-layering.md +103 -0
  5. package/skills/backend-audit-fixer/references/e2e.md +60 -0
  6. package/skills/backend-audit-fixer/references/env-accessor.md +73 -0
  7. package/skills/backend-audit-fixer/references/error-handling.md +77 -0
  8. package/skills/{naming-audit-fixer/references/fix-guide.md → backend-audit-fixer/references/naming-fix-guide.md} +8 -3
  9. package/skills/backend-audit-fixer/references/naming.md +139 -0
  10. package/skills/backend-audit-fixer/references/pagination-dto.md +52 -0
  11. package/skills/create-issue/SKILL.md +90 -0
  12. package/skills/feature-decide-plan-execute/SKILL.md +537 -0
  13. package/skills/issues-batch-deliver/SKILL.md +549 -0
  14. package/skills/pr-train-ship/SKILL.md +669 -0
  15. package/skills/backend-layering-audit-fixer/SKILL.md +0 -180
  16. package/skills/e2e-audit-fixer/SKILL.md +0 -76
  17. package/skills/e2e-audit-fixer/agents/openai.yaml +0 -4
  18. package/skills/env-accessor-audit-fixer/SKILL.md +0 -149
  19. package/skills/env-accessor-audit-fixer/agents/openai.yaml +0 -7
  20. package/skills/error-handling-audit-fixer/SKILL.md +0 -187
  21. package/skills/error-handling-audit-fixer/agents/openai.yaml +0 -7
  22. package/skills/git-pr-ship/SKILL.md +0 -528
  23. package/skills/multi-pr-feature-delivery/SKILL.md +0 -493
  24. package/skills/multi-pr-feature-delivery/agents/openai.yaml +0 -7
  25. package/skills/naming-audit-fixer/SKILL.md +0 -149
  26. package/skills/pagination-dto-audit-fixer/SKILL.md +0 -69
  27. package/skills/pagination-dto-audit-fixer/agents/openai.yaml +0 -7
  28. /package/skills/{env-accessor-audit-fixer → backend-audit-fixer}/references/bootstrap-env-foundation.md +0 -0
  29. /package/skills/{error-handling-audit-fixer/references/foundation-bootstrap.md → backend-audit-fixer/references/error-handling-foundation-bootstrap.md} +0 -0
  30. /package/skills/{error-handling-audit-fixer → backend-audit-fixer}/references/error-handling-standard.md +0 -0
  31. /package/skills/{pagination-dto-audit-fixer → backend-audit-fixer}/references/pagination-standard.md +0 -0
  32. /package/skills/{e2e-audit-fixer/scripts/e2e_e2e_audit.py → backend-audit-fixer/scripts/e2e_audit.py} +0 -0
  33. /package/skills/{env-accessor-audit-fixer → backend-audit-fixer}/scripts/env_accessor_audit.py +0 -0
  34. /package/skills/{error-handling-audit-fixer → backend-audit-fixer}/scripts/error_handling_audit.py +0 -0
  35. /package/skills/{naming-audit-fixer/scripts/audit_naming.py → backend-audit-fixer/scripts/naming_audit.py} +0 -0
  36. /package/skills/{pagination-dto-audit-fixer → backend-audit-fixer}/scripts/pagination_dto_audit.py +0 -0
@@ -1,69 +0,0 @@
1
- ---
2
- name: pagination-dto-audit-fixer
3
- description: Use when backend 或 NestJS 接口涉及分页列表,需要检查或修复分页 Request DTO 未继承 BasePaginationRequestDto、分页 Response DTO 未继承 BasePaginationResponseDto、Controller/Service 手工拼装分页返回结构,或需要输出不符合统一分页规范的文件清单并按标准改造。
4
- ---
5
-
6
- # 分页 DTO 规范检查与修复
7
-
8
- ## 概览
9
-
10
- 对后端分页接口执行统一规范审计,先稳定识别非标准分页 DTO 和手工分页返回,再按统一基类完成改造。优先使用随技能提供的扫描脚本作为问题清单真值源,再根据结果实施代码修复。
11
-
12
- ## 快速开始
13
-
14
- 1. 先运行扫描脚本:
15
-
16
- ```bash
17
- CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
18
- python "$CODEX_HOME/skills/pagination-dto-audit-fixer/scripts/pagination_dto_audit.py" \
19
- --workspace /Users/a1/work/ai-monorepo
20
- ```
21
-
22
- 2. 需要结构化结果时输出 JSON:
23
-
24
- ```bash
25
- python "$CODEX_HOME/skills/pagination-dto-audit-fixer/scripts/pagination_dto_audit.py" \
26
- --workspace /Users/a1/work/ai-monorepo \
27
- --output-json /tmp/pagination-dto-audit.json
28
- ```
29
-
30
- 3. 根据扫描结果逐项修复,再重新运行扫描确认问题是否消失。
31
-
32
- ## 执行流程
33
-
34
- 1. 扫描 `apps/backend/src/**/*.ts`,必要时用 `--include-glob` 扩大范围。
35
- 2. 优先识别三类问题:
36
- - 请求 DTO 自己声明 `page/limit/pageSize/currentPage`,但未继承 `BasePaginationRequestDto`
37
- - 响应 DTO 命中 `items/data/total/page/limit/pageSize/currentPage` 等分页字段,但未继承 `BasePaginationResponseDto`
38
- - Controller / Service / UseCase 直接 `return { ... }` 手工拼装分页结构
39
- 3. 输出问题清单后,再阅读 [references/pagination-standard.md](./references/pagination-standard.md) 对照修复。
40
- 4. 修复时保持接口兼容性;若历史字段名不是标准字段,显式说明保留策略或转换策略。
41
- 5. 修复完成后重新扫描,并按项目常规命令补跑测试或最小验证。
42
-
43
- ## 修复准则
44
-
45
- - 请求 DTO:改为继承 `BasePaginationRequestDto`,仅保留额外查询参数。
46
- - 响应 DTO:优先改为 `extends BasePaginationResponseDto<ItemResponseDto>`,或改用工厂 `createPaginationResponseDto(ItemResponseDto)`。
47
- - 返回构造:优先返回统一分页 DTO 实例,不继续在 Controller 中拼 `{ items, total, page, limit }`。
48
- - OpenAPI:补齐 `@ApiProperty`,确保 `items` 的元素类型明确。
49
- - 兼容处理:若线上消费者依赖 `data/currentPage/pageSize`,在过渡期显式映射,不要静默删字段。
50
-
51
- ## 判断原则
52
-
53
- - 同时出现 `total` 且出现 `items` 或 `data`,再叠加 `page/limit/pageSize/currentPage` 中任一字段,可视为强分页信号。
54
- - 若类名或返回变量名包含 `Pagination`、`Paginated`、`ListResponse`、`PageResult`,优先人工复核。
55
- - 若只是普通列表返回且没有总数或页码字段,不归入本技能。
56
-
57
- ## 输出要求
58
-
59
- 执行这个技能时,最终输出至少包含:
60
-
61
- 1. 问题文件清单
62
- 2. 每个问题的类型与定位
63
- 3. 建议修复方式
64
- 4. 已应用的修改与剩余风险
65
-
66
- ## 资源
67
-
68
- - 扫描脚本:`scripts/pagination_dto_audit.py`
69
- - 参考规范:`references/pagination-standard.md`
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "分页 DTO 检查修复"
3
- short_description: "检查并修复后端分页 DTO 是否符合统一分页基类规范"
4
- default_prompt: "使用 $pagination-dto-audit-fixer 检查 backend 中分页 DTO 和分页返回结构是否符合统一规范,并给出可执行修复建议。"
5
-
6
- policy:
7
- allow_implicit_invocation: true