ai-engineering-init 1.1.0
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/.claude/agents/code-reviewer.md +139 -0
- package/.claude/agents/project-manager.md +159 -0
- package/.claude/audio/completed.wav +0 -0
- package/.claude/commands/add-todo.md +255 -0
- package/.claude/commands/check.md +210 -0
- package/.claude/commands/crud.md +454 -0
- package/.claude/commands/dev.md +503 -0
- package/.claude/commands/init-docs.md +681 -0
- package/.claude/commands/next.md +251 -0
- package/.claude/commands/progress.md +242 -0
- package/.claude/commands/start.md +199 -0
- package/.claude/commands/sync.md +307 -0
- package/.claude/commands/update-status.md +428 -0
- package/.claude/docs/Mixin/344/275/277/347/224/250/346/214/207/345/215/227.md +299 -0
- package/.claude/docs/README.md +167 -0
- package/.claude/docs//345/211/215/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +599 -0
- package/.claude/docs//345/220/216/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +726 -0
- package/.claude/docs//345/267/245/344/275/234/346/265/201/345/274/200/345/217/221/346/214/207/345/215/227.md +714 -0
- package/.claude/docs//345/267/245/345/205/267/347/261/273/344/275/277/347/224/250/346/214/207/345/215/227.md +463 -0
- package/.claude/docs//346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/350/247/204/350/214/203.md +390 -0
- package/.claude/docs//346/226/260/345/212/237/350/203/275/345/274/200/345/217/221/346/265/201/347/250/213/350/247/204/350/214/203.md +688 -0
- package/.claude/docs//346/226/260/351/241/271/347/233/256/345/274/200/345/217/221/346/265/201/347/250/213.md +365 -0
- package/.claude/docs//346/241/206/346/236/266/350/257/264/346/230/216.md +393 -0
- package/.claude/docs//350/267/257/347/224/261/351/205/215/347/275/256/346/214/207/345/215/227.md +246 -0
- package/.claude/framework-config.json +73 -0
- package/.claude/hooks/pre-tool-use.js +117 -0
- package/.claude/hooks/skill-forced-eval.js +167 -0
- package/.claude/hooks/stop.js +58 -0
- package/.claude/settings.json +41 -0
- package/.claude/skills/add-skill/SKILL.md +352 -0
- package/.claude/skills/api-development/SKILL.md +560 -0
- package/.claude/skills/architecture-design/SKILL.md +756 -0
- package/.claude/skills/backend-annotations/SKILL.md +674 -0
- package/.claude/skills/banana-image/CHANGELOG.md +37 -0
- package/.claude/skills/banana-image/README.md +146 -0
- package/.claude/skills/banana-image/SKILL.md +164 -0
- package/.claude/skills/banana-image/assets/logo.png +0 -0
- package/.claude/skills/banana-image/references/advanced-usage.md +189 -0
- package/.claude/skills/banana-image/scripts/apply_template.py +125 -0
- package/.claude/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.claude/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.claude/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.claude/skills/banana-image/scripts/package.json +18 -0
- package/.claude/skills/banana-image/scripts/requirements.txt +10 -0
- package/.claude/skills/banana-image/templates/poster.json +22 -0
- package/.claude/skills/banana-image/templates/product.json +17 -0
- package/.claude/skills/banana-image/templates/social.json +22 -0
- package/.claude/skills/banana-image/templates/thumbnail.json +17 -0
- package/.claude/skills/brainstorm/SKILL.md +648 -0
- package/.claude/skills/bug-detective/SKILL.md +1206 -0
- package/.claude/skills/code-patterns/SKILL.md +590 -0
- package/.claude/skills/collaborating-with-codex/SKILL.md +174 -0
- package/.claude/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.claude/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.claude/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.claude/skills/crud-development/SKILL.md +649 -0
- package/.claude/skills/data-permission/SKILL.md +599 -0
- package/.claude/skills/database-ops/SKILL.md +407 -0
- package/.claude/skills/error-handler/SKILL.md +371 -0
- package/.claude/skills/file-oss-management/SKILL.md +863 -0
- package/.claude/skills/git-workflow/SKILL.md +375 -0
- package/.claude/skills/json-serialization/SKILL.md +357 -0
- package/.claude/skills/leniu-api-development/SKILL.md +803 -0
- package/.claude/skills/leniu-architecture-design/SKILL.md +598 -0
- package/.claude/skills/leniu-backend-annotations/SKILL.md +664 -0
- package/.claude/skills/leniu-code-patterns/SKILL.md +365 -0
- package/.claude/skills/leniu-crud-development/SKILL.md +1110 -0
- package/.claude/skills/leniu-data-permission/SKILL.md +256 -0
- package/.claude/skills/leniu-database-ops/SKILL.md +426 -0
- package/.claude/skills/leniu-error-handler/SKILL.md +462 -0
- package/.claude/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.claude/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.claude/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.claude/skills/leniu-java-entity/SKILL.md +751 -0
- package/.claude/skills/leniu-java-export/SKILL.md +560 -0
- package/.claude/skills/leniu-java-logging/SKILL.md +832 -0
- package/.claude/skills/leniu-java-mq/SKILL.md +338 -0
- package/.claude/skills/leniu-java-mybatis/SKILL.md +640 -0
- package/.claude/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/.claude/skills/leniu-java-task/SKILL.md +367 -0
- package/.claude/skills/leniu-java-total-line/SKILL.md +195 -0
- package/.claude/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/.claude/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/.claude/skills/leniu-mealtime/SKILL.md +215 -0
- package/.claude/skills/leniu-redis-cache/SKILL.md +316 -0
- package/.claude/skills/leniu-security-guard/SKILL.md +520 -0
- package/.claude/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.claude/skills/openspec-apply-change/SKILL.md +156 -0
- package/.claude/skills/openspec-archive-change/SKILL.md +114 -0
- package/.claude/skills/openspec-bulk-archive-change/SKILL.md +246 -0
- package/.claude/skills/openspec-continue-change/SKILL.md +118 -0
- package/.claude/skills/openspec-explore/SKILL.md +290 -0
- package/.claude/skills/openspec-ff-change/SKILL.md +101 -0
- package/.claude/skills/openspec-new-change/SKILL.md +74 -0
- package/.claude/skills/openspec-onboard/SKILL.md +529 -0
- package/.claude/skills/openspec-sync-specs/SKILL.md +138 -0
- package/.claude/skills/openspec-verify-change/SKILL.md +168 -0
- package/.claude/skills/performance-doctor/SKILL.md +627 -0
- package/.claude/skills/project-navigator/SKILL.md +305 -0
- package/.claude/skills/redis-cache/SKILL.md +839 -0
- package/.claude/skills/scheduled-jobs/SKILL.md +633 -0
- package/.claude/skills/security-guard/SKILL.md +748 -0
- package/.claude/skills/sms-mail/SKILL.md +766 -0
- package/.claude/skills/social-login/SKILL.md +668 -0
- package/.claude/skills/store-pc/SKILL.md +366 -0
- package/.claude/skills/task-tracker/SKILL.md +307 -0
- package/.claude/skills/tech-decision/SKILL.md +393 -0
- package/.claude/skills/tenant-management/SKILL.md +603 -0
- package/.claude/skills/test-development/SKILL.md +755 -0
- package/.claude/skills/ui-pc/SKILL.md +438 -0
- package/.claude/skills/utils-toolkit/SKILL.md +615 -0
- package/.claude/skills/websocket-sse/SKILL.md +716 -0
- package/.claude/skills/workflow-engine/SKILL.md +676 -0
- package/.claude/templates//345/276/205/345/212/236/346/270/205/345/215/225/346/250/241/346/235/277.md +56 -0
- package/.claude/templates//351/234/200/346/261/202/346/226/207/346/241/243/346/250/241/346/235/277.md +85 -0
- package/.claude/templates//351/241/271/347/233/256/347/212/266/346/200/201/346/250/241/346/235/277.md +43 -0
- package/.codex/skills/add-skill/SKILL.md +352 -0
- package/.codex/skills/add-todo/SKILL.md +269 -0
- package/.codex/skills/api-development/SKILL.md +693 -0
- package/.codex/skills/architecture-design/SKILL.md +628 -0
- package/.codex/skills/backend-annotations/SKILL.md +664 -0
- package/.codex/skills/banana-image/CHANGELOG.md +37 -0
- package/.codex/skills/banana-image/README.md +146 -0
- package/.codex/skills/banana-image/SKILL.md +164 -0
- package/.codex/skills/banana-image/assets/logo.png +0 -0
- package/.codex/skills/banana-image/references/advanced-usage.md +189 -0
- package/.codex/skills/banana-image/scripts/apply_template.py +125 -0
- package/.codex/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.codex/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.codex/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.codex/skills/banana-image/scripts/package.json +18 -0
- package/.codex/skills/banana-image/scripts/requirements.txt +10 -0
- package/.codex/skills/banana-image/templates/poster.json +22 -0
- package/.codex/skills/banana-image/templates/product.json +17 -0
- package/.codex/skills/banana-image/templates/social.json +22 -0
- package/.codex/skills/banana-image/templates/thumbnail.json +17 -0
- package/.codex/skills/brainstorm/SKILL.md +648 -0
- package/.codex/skills/bug-detective/SKILL.md +1206 -0
- package/.codex/skills/check/SKILL.md +367 -0
- package/.codex/skills/code-patterns/SKILL.md +442 -0
- package/.codex/skills/collaborating-with-codex/SKILL.md +174 -0
- package/.codex/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.codex/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.codex/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.codex/skills/crud/SKILL.md +265 -0
- package/.codex/skills/crud-development/SKILL.md +637 -0
- package/.codex/skills/data-permission/SKILL.md +591 -0
- package/.codex/skills/database-ops/SKILL.md +553 -0
- package/.codex/skills/dev/SKILL.md +187 -0
- package/.codex/skills/error-handler/SKILL.md +361 -0
- package/.codex/skills/file-oss-management/SKILL.md +863 -0
- package/.codex/skills/git-workflow/SKILL.md +375 -0
- package/.codex/skills/init-docs/SKILL.md +194 -0
- package/.codex/skills/json-serialization/SKILL.md +357 -0
- package/.codex/skills/leniu-api-development/SKILL.md +803 -0
- package/.codex/skills/leniu-architecture-design/SKILL.md +594 -0
- package/.codex/skills/leniu-backend-annotations/SKILL.md +662 -0
- package/.codex/skills/leniu-code-patterns/SKILL.md +365 -0
- package/.codex/skills/leniu-crud-development/SKILL.md +1110 -0
- package/.codex/skills/leniu-data-permission/SKILL.md +256 -0
- package/.codex/skills/leniu-database-ops/SKILL.md +426 -0
- package/.codex/skills/leniu-error-handler/SKILL.md +462 -0
- package/.codex/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.codex/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.codex/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.codex/skills/leniu-java-entity/SKILL.md +751 -0
- package/.codex/skills/leniu-java-export/SKILL.md +560 -0
- package/.codex/skills/leniu-java-logging/SKILL.md +832 -0
- package/.codex/skills/leniu-java-mq/SKILL.md +338 -0
- package/.codex/skills/leniu-java-mybatis/SKILL.md +640 -0
- package/.codex/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/.codex/skills/leniu-java-task/SKILL.md +367 -0
- package/.codex/skills/leniu-java-total-line/SKILL.md +195 -0
- package/.codex/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/.codex/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/.codex/skills/leniu-mealtime/SKILL.md +215 -0
- package/.codex/skills/leniu-redis-cache/SKILL.md +316 -0
- package/.codex/skills/leniu-security-guard/SKILL.md +520 -0
- package/.codex/skills/leniu-utils-toolkit/SKILL.md +378 -0
- package/.codex/skills/next/SKILL.md +137 -0
- package/.codex/skills/openspec-apply-change/SKILL.md +156 -0
- package/.codex/skills/openspec-archive-change/SKILL.md +114 -0
- package/.codex/skills/openspec-bulk-archive-change/SKILL.md +246 -0
- package/.codex/skills/openspec-continue-change/SKILL.md +118 -0
- package/.codex/skills/openspec-explore/SKILL.md +290 -0
- package/.codex/skills/openspec-ff-change/SKILL.md +101 -0
- package/.codex/skills/openspec-new-change/SKILL.md +74 -0
- package/.codex/skills/openspec-onboard/SKILL.md +529 -0
- package/.codex/skills/openspec-sync-specs/SKILL.md +138 -0
- package/.codex/skills/openspec-verify-change/SKILL.md +168 -0
- package/.codex/skills/performance-doctor/SKILL.md +627 -0
- package/.codex/skills/progress/SKILL.md +193 -0
- package/.codex/skills/project-navigator/SKILL.md +286 -0
- package/.codex/skills/redis-cache/SKILL.md +829 -0
- package/.codex/skills/scheduled-jobs/SKILL.md +633 -0
- package/.codex/skills/security-guard/SKILL.md +739 -0
- package/.codex/skills/sms-mail/SKILL.md +766 -0
- package/.codex/skills/social-login/SKILL.md +668 -0
- package/.codex/skills/start/SKILL.md +154 -0
- package/.codex/skills/store-pc/SKILL.md +491 -0
- package/.codex/skills/sync/SKILL.md +149 -0
- package/.codex/skills/task-tracker/SKILL.md +307 -0
- package/.codex/skills/tech-decision/SKILL.md +393 -0
- package/.codex/skills/tenant-management/SKILL.md +603 -0
- package/.codex/skills/test-development/SKILL.md +755 -0
- package/.codex/skills/ui-pc/SKILL.md +475 -0
- package/.codex/skills/update-status/SKILL.md +159 -0
- package/.codex/skills/utils-toolkit/SKILL.md +593 -0
- package/.codex/skills/websocket-sse/SKILL.md +716 -0
- package/.codex/skills/workflow-engine/SKILL.md +676 -0
- package/.cursor/agents/code-reviewer.md +139 -0
- package/.cursor/agents/project-manager.md +159 -0
- package/.cursor/commands/opsx-apply.md +152 -0
- package/.cursor/commands/opsx-archive.md +157 -0
- package/.cursor/commands/opsx-bulk-archive.md +242 -0
- package/.cursor/commands/opsx-continue.md +114 -0
- package/.cursor/commands/opsx-explore.md +174 -0
- package/.cursor/commands/opsx-ff.md +94 -0
- package/.cursor/commands/opsx-new.md +69 -0
- package/.cursor/commands/opsx-onboard.md +525 -0
- package/.cursor/commands/opsx-sync.md +134 -0
- package/.cursor/commands/opsx-verify.md +164 -0
- package/.cursor/mcp.json +22 -0
- package/.cursor/skills/add-skill/SKILL.md +352 -0
- package/.cursor/skills/api-development/SKILL.md +560 -0
- package/.cursor/skills/architecture-design/SKILL.md +756 -0
- package/.cursor/skills/backend-annotations/SKILL.md +674 -0
- package/.cursor/skills/banana-image/CHANGELOG.md +37 -0
- package/.cursor/skills/banana-image/README.md +146 -0
- package/.cursor/skills/banana-image/SKILL.md +164 -0
- package/.cursor/skills/banana-image/assets/logo.png +0 -0
- package/.cursor/skills/banana-image/references/advanced-usage.md +189 -0
- package/.cursor/skills/banana-image/scripts/apply_template.py +125 -0
- package/.cursor/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.cursor/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.cursor/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.cursor/skills/banana-image/scripts/package.json +18 -0
- package/.cursor/skills/banana-image/scripts/requirements.txt +10 -0
- package/.cursor/skills/banana-image/templates/poster.json +22 -0
- package/.cursor/skills/banana-image/templates/product.json +17 -0
- package/.cursor/skills/banana-image/templates/social.json +22 -0
- package/.cursor/skills/banana-image/templates/thumbnail.json +17 -0
- package/.cursor/skills/brainstorm/SKILL.md +648 -0
- package/.cursor/skills/bug-detective/SKILL.md +1206 -0
- package/.cursor/skills/code-patterns/SKILL.md +590 -0
- package/.cursor/skills/collaborating-with-codex/SKILL.md +174 -0
- package/.cursor/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.cursor/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.cursor/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.cursor/skills/crud-development/SKILL.md +649 -0
- package/.cursor/skills/data-permission/SKILL.md +599 -0
- package/.cursor/skills/database-ops/SKILL.md +407 -0
- package/.cursor/skills/error-handler/SKILL.md +371 -0
- package/.cursor/skills/file-oss-management/SKILL.md +863 -0
- package/.cursor/skills/git-workflow/SKILL.md +375 -0
- package/.cursor/skills/json-serialization/SKILL.md +357 -0
- package/.cursor/skills/leniu-api-development/SKILL.md +803 -0
- package/.cursor/skills/leniu-architecture-design/SKILL.md +598 -0
- package/.cursor/skills/leniu-backend-annotations/SKILL.md +664 -0
- package/.cursor/skills/leniu-code-patterns/SKILL.md +365 -0
- package/.cursor/skills/leniu-crud-development/SKILL.md +1110 -0
- package/.cursor/skills/leniu-data-permission/SKILL.md +256 -0
- package/.cursor/skills/leniu-database-ops/SKILL.md +426 -0
- package/.cursor/skills/leniu-error-handler/SKILL.md +462 -0
- package/.cursor/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.cursor/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.cursor/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.cursor/skills/leniu-java-entity/SKILL.md +751 -0
- package/.cursor/skills/leniu-java-export/SKILL.md +560 -0
- package/.cursor/skills/leniu-java-logging/SKILL.md +832 -0
- package/.cursor/skills/leniu-java-mq/SKILL.md +338 -0
- package/.cursor/skills/leniu-java-mybatis/SKILL.md +640 -0
- package/.cursor/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/.cursor/skills/leniu-java-task/SKILL.md +367 -0
- package/.cursor/skills/leniu-java-total-line/SKILL.md +195 -0
- package/.cursor/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/.cursor/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/.cursor/skills/leniu-mealtime/SKILL.md +215 -0
- package/.cursor/skills/leniu-redis-cache/SKILL.md +316 -0
- package/.cursor/skills/leniu-security-guard/SKILL.md +520 -0
- package/.cursor/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.cursor/skills/openspec-apply-change/SKILL.md +156 -0
- package/.cursor/skills/openspec-archive-change/SKILL.md +114 -0
- package/.cursor/skills/openspec-bulk-archive-change/SKILL.md +246 -0
- package/.cursor/skills/openspec-continue-change/SKILL.md +118 -0
- package/.cursor/skills/openspec-explore/SKILL.md +290 -0
- package/.cursor/skills/openspec-ff-change/SKILL.md +101 -0
- package/.cursor/skills/openspec-new-change/SKILL.md +74 -0
- package/.cursor/skills/openspec-onboard/SKILL.md +529 -0
- package/.cursor/skills/openspec-sync-specs/SKILL.md +138 -0
- package/.cursor/skills/openspec-verify-change/SKILL.md +168 -0
- package/.cursor/skills/performance-doctor/SKILL.md +627 -0
- package/.cursor/skills/project-navigator/SKILL.md +305 -0
- package/.cursor/skills/redis-cache/SKILL.md +839 -0
- package/.cursor/skills/scheduled-jobs/SKILL.md +633 -0
- package/.cursor/skills/security-guard/SKILL.md +748 -0
- package/.cursor/skills/sms-mail/SKILL.md +766 -0
- package/.cursor/skills/social-login/SKILL.md +668 -0
- package/.cursor/skills/store-pc/SKILL.md +366 -0
- package/.cursor/skills/task-tracker/SKILL.md +307 -0
- package/.cursor/skills/tech-decision/SKILL.md +393 -0
- package/.cursor/skills/tenant-management/SKILL.md +603 -0
- package/.cursor/skills/test-development/SKILL.md +755 -0
- package/.cursor/skills/ui-pc/SKILL.md +438 -0
- package/.cursor/skills/utils-toolkit/SKILL.md +615 -0
- package/.cursor/skills/websocket-sse/SKILL.md +716 -0
- package/.cursor/skills/workflow-engine/SKILL.md +676 -0
- package/AGENTS.md +669 -0
- package/CLAUDE.md +205 -0
- package/README.md +205 -0
- package/bin/index.js +179 -0
- package/init.sh +178 -0
- package/package.json +27 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: 自动代码审查助手,在完成功能开发后自动检查代码是否符合 leniu-tengyun-core 项目规范。当使用 /dev、/crud 命令完成代码生成后,或用户说"审查代码"、"检查代码"时自动调用。
|
|
4
|
+
model: sonnet
|
|
5
|
+
readonly: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
你是 leniu-tengyun-core(云食堂)的代码审查助手,负责在代码生成或修改后自动检查是否符合项目规范。
|
|
9
|
+
|
|
10
|
+
**核心架构**:四层架构(Controller → Business → Service → Mapper),包名 `net.xnzn.core.*`,JDK 21,双库物理隔离(无 tenant_id 字段)。
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 触发场景
|
|
15
|
+
|
|
16
|
+
1. `/dev` 或 `/crud` 命令完成后
|
|
17
|
+
2. 用户说"审查代码"、"检查代码"、"review"
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 后端审查清单
|
|
22
|
+
|
|
23
|
+
### 🔴 严重问题(必须修复)
|
|
24
|
+
|
|
25
|
+
#### 1. 包名规范
|
|
26
|
+
```bash
|
|
27
|
+
Grep pattern: "package org\.dromara\." path: [目标目录] # ❌ 必须为 0 个
|
|
28
|
+
Grep pattern: "package net\.xnzn\." path: [目标目录] # ✅ 应有结果
|
|
29
|
+
```
|
|
30
|
+
- ❌ `package org.dromara.xxx`
|
|
31
|
+
- ✅ `package net.xnzn.core.xxx`
|
|
32
|
+
|
|
33
|
+
#### 2. 禁止使用 RuoYi 工具类
|
|
34
|
+
```bash
|
|
35
|
+
Grep pattern: "MapstructUtils" path: [目标目录] glob: "*.java"
|
|
36
|
+
Grep pattern: "ServiceException" path: [目标目录] glob: "*.java"
|
|
37
|
+
Grep pattern: "import javax\.validation" path: [目标目录] glob: "*.java"
|
|
38
|
+
```
|
|
39
|
+
- ❌ `MapstructUtils.convert()` → ✅ `BeanUtil.copyProperties()`
|
|
40
|
+
- ❌ `throw new ServiceException()` → ✅ `throw new LeException()`
|
|
41
|
+
- ❌ `javax.validation.*` → ✅ `jakarta.validation.*`(JDK 21)
|
|
42
|
+
|
|
43
|
+
#### 3. 审计字段名称
|
|
44
|
+
```bash
|
|
45
|
+
Grep pattern: "private.*createBy\|private.*updateBy\|private.*createTime\|private.*updateTime" path: [目标目录] glob: "*.java"
|
|
46
|
+
```
|
|
47
|
+
- ❌ `createBy / updateBy / createTime / updateTime`
|
|
48
|
+
- ✅ `crby / upby / crtime / uptime`
|
|
49
|
+
|
|
50
|
+
#### 4. del_flag 值语义
|
|
51
|
+
```bash
|
|
52
|
+
Grep pattern: "delFlag.*=.*0\|del_flag.*=.*0" path: [目标目录] glob: "*.java"
|
|
53
|
+
```
|
|
54
|
+
- ❌ `delFlag = 0`(RuoYi 的正常值)
|
|
55
|
+
- ✅ `delFlag = 2`(leniu 的正常值,1=删除)
|
|
56
|
+
|
|
57
|
+
#### 5. Entity 不含 tenant_id
|
|
58
|
+
```bash
|
|
59
|
+
Grep pattern: "tenantId\|tenant_id" path: [目标目录] glob: "*.java"
|
|
60
|
+
```
|
|
61
|
+
- ❌ Entity 中有 `tenantId` 字段(双库物理隔离,无需此字段)
|
|
62
|
+
|
|
63
|
+
#### 6. 禁止 Map 传递业务数据
|
|
64
|
+
```bash
|
|
65
|
+
Grep pattern: "Map<String,\s*Object>" path: [目标目录] glob: "*.java"
|
|
66
|
+
```
|
|
67
|
+
- ❌ 返回 `Map<String, Object>` → ✅ 使用 VO 类
|
|
68
|
+
|
|
69
|
+
### 🟡 警告问题(建议修复)
|
|
70
|
+
|
|
71
|
+
#### 7. 请求体封装
|
|
72
|
+
```bash
|
|
73
|
+
Grep pattern: "@RequestBody [^L]" path: [目标目录] glob: "*Controller.java"
|
|
74
|
+
```
|
|
75
|
+
- 建议所有 POST 请求使用 `@RequestBody LeRequest<T>` 封装
|
|
76
|
+
|
|
77
|
+
#### 8. 依赖注入
|
|
78
|
+
```bash
|
|
79
|
+
Grep pattern: "@Autowired" path: [目标目录] glob: "*.java"
|
|
80
|
+
```
|
|
81
|
+
- 跨模块循环依赖时使用 `@Autowired @Lazy`
|
|
82
|
+
|
|
83
|
+
#### 9. 事务注解
|
|
84
|
+
```bash
|
|
85
|
+
Grep pattern: "@Transactional" path: [目标目录] glob: "*Service*.java"
|
|
86
|
+
```
|
|
87
|
+
- 写操作应使用 `@Transactional(rollbackFor = Exception.class)`
|
|
88
|
+
|
|
89
|
+
#### 10. 国际化异常
|
|
90
|
+
```bash
|
|
91
|
+
Grep pattern: 'new LeException\("[^"]*[\u4e00-\u9fa5]' path: [目标目录] glob: "*.java"
|
|
92
|
+
```
|
|
93
|
+
- 建议使用 `I18n.getMessage()` 替代硬编码中文
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 前端审查(如涉及)
|
|
98
|
+
|
|
99
|
+
前端项目路径:`/Users/xujiajun/Developer/frontProj/web`
|
|
100
|
+
|
|
101
|
+
### 🔴 严重问题
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# 检查是否正确处理响应码
|
|
105
|
+
Grep pattern: "\.code\s*==\s*200\|\.code\s*===\s*200" path: [前端目录] # ❌ 应为 10000
|
|
106
|
+
Grep pattern: "Admin-Token" path: [前端目录] glob: "*.js" # Token key 验证
|
|
107
|
+
```
|
|
108
|
+
- 成功码:`10000`(不是 200)
|
|
109
|
+
- Token:`Admin-Token`(localStorage)
|
|
110
|
+
- 租户:`MERCHANT-ID`(请求头)
|
|
111
|
+
- 金额:后端返回分,前端用 `money()` 转元显示
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 审查报告格式
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
# 代码审查报告
|
|
119
|
+
|
|
120
|
+
审查范围: [文件/模块]
|
|
121
|
+
|
|
122
|
+
## 严重问题(X 项)
|
|
123
|
+
1. [问题类型]
|
|
124
|
+
文件: path/to/file.java:行号
|
|
125
|
+
问题: 描述
|
|
126
|
+
修复: 代码示例
|
|
127
|
+
|
|
128
|
+
## 警告问题(X 项)
|
|
129
|
+
...
|
|
130
|
+
|
|
131
|
+
## 通过项
|
|
132
|
+
- [x] 包名规范 (net.xnzn.core.*)
|
|
133
|
+
- [x] 使用 LeException
|
|
134
|
+
- [x] 审计字段正确 (crby/crtime/upby/uptime)
|
|
135
|
+
- [x] del_flag 语义正确 (2=正常)
|
|
136
|
+
...
|
|
137
|
+
|
|
138
|
+
结论: ✅ 通过 / ⚠️ 需修复 / ❌ 不通过
|
|
139
|
+
```
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-manager
|
|
3
|
+
description: 专业的项目管理助手,负责创建和维护项目需求文档、进度跟踪、待办事项。当用户需要"更新项目进度"、"记录完成的任务"、"创建需求文档"、"查看项目状态"时自动调用。
|
|
4
|
+
model: sonnet
|
|
5
|
+
readonly: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
你是 leniu-tengyun-core(云食堂)项目的管理助手,负责文档维护和进度跟踪。
|
|
9
|
+
|
|
10
|
+
**项目信息**:
|
|
11
|
+
- 后端:`leniu-tengyun-core/`(Java 21 + pigx-framework + Spring Boot 3.x)
|
|
12
|
+
- 前端:`/Users/xujiajun/Developer/frontProj/web`(Vue 2)
|
|
13
|
+
- 包名:`net.xnzn.core.*`
|
|
14
|
+
- 架构:双库(系统库 + 商户库)+ 四层(Controller → Business → Service → Mapper)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 触发场景
|
|
19
|
+
|
|
20
|
+
| 触发词 | 操作 |
|
|
21
|
+
|-------|------|
|
|
22
|
+
| `/init-docs` 或"初始化项目文档" | 扫描项目,生成三个文档 |
|
|
23
|
+
| `/progress` 或"查看项目状态" | 读取并展示当前进度 |
|
|
24
|
+
| `/update-status` 或"更新项目进度" | 分析 Git 提交,更新状态文档 |
|
|
25
|
+
| `/add-todo` 或"添加待办" | 向待办清单添加任务 |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 文档结构
|
|
30
|
+
|
|
31
|
+
所有文档存放在 `docs/` 目录:
|
|
32
|
+
|
|
33
|
+
### docs/项目状态.md
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
# 项目状态
|
|
37
|
+
|
|
38
|
+
最后更新: YYYY-MM-DD HH:MM
|
|
39
|
+
|
|
40
|
+
## 📊 当前状态
|
|
41
|
+
- 项目阶段: 开发中/测试中/已上线
|
|
42
|
+
- 整体进度: X%
|
|
43
|
+
- 下一步: XXX
|
|
44
|
+
|
|
45
|
+
## ✅ 已完成
|
|
46
|
+
- [x] 功能名称 (完成日期: YYYY-MM-DD)
|
|
47
|
+
- 模块: sys-canteen / sys-kitchen / sys-drp
|
|
48
|
+
- 说明: 完成情况
|
|
49
|
+
|
|
50
|
+
## 🚧 进行中
|
|
51
|
+
- [ ] 功能名称 (开始: YYYY-MM-DD)
|
|
52
|
+
- 进度: X%
|
|
53
|
+
- 当前工作: XXX
|
|
54
|
+
|
|
55
|
+
## 📋 待办
|
|
56
|
+
- [ ] 功能名称
|
|
57
|
+
- 优先级: 高/中/低
|
|
58
|
+
- 所属模块: xxx
|
|
59
|
+
|
|
60
|
+
## ⚠️ 问题和风险
|
|
61
|
+
- 问题描述及解决方案
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### docs/需求文档.md
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
# 需求文档
|
|
68
|
+
|
|
69
|
+
最后更新: YYYY-MM-DD
|
|
70
|
+
|
|
71
|
+
## 项目概述
|
|
72
|
+
leniu-tengyun-core 云食堂平台,基于 pigx-framework,双库架构。
|
|
73
|
+
|
|
74
|
+
## 功能需求
|
|
75
|
+
|
|
76
|
+
### sys-canteen(食堂业务)
|
|
77
|
+
- [ ] REQ-001: 需求描述
|
|
78
|
+
- 优先级: 高/中/低
|
|
79
|
+
- 状态: 待开发/开发中/已完成
|
|
80
|
+
|
|
81
|
+
### sys-kitchen(后场厨房)
|
|
82
|
+
...
|
|
83
|
+
|
|
84
|
+
### sys-drp(供应链)
|
|
85
|
+
...
|
|
86
|
+
|
|
87
|
+
## 验收标准
|
|
88
|
+
...
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### docs/待办清单.md
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
# 待办清单
|
|
95
|
+
|
|
96
|
+
最后更新: YYYY-MM-DD HH:MM
|
|
97
|
+
|
|
98
|
+
## 🔥 高优先级
|
|
99
|
+
- [ ] 任务名称 (截止: YYYY-MM-DD)
|
|
100
|
+
|
|
101
|
+
## 📌 中优先级
|
|
102
|
+
- [ ] 任务名称
|
|
103
|
+
|
|
104
|
+
## 💡 低优先级
|
|
105
|
+
- [ ] 任务名称
|
|
106
|
+
|
|
107
|
+
## ✅ 最近完成
|
|
108
|
+
- [x] 任务名称 (完成于 YYYY-MM-DD)
|
|
109
|
+
|
|
110
|
+
## 📊 统计
|
|
111
|
+
- 待办: X | 完成: X | 完成率: X%
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 工作流程
|
|
117
|
+
|
|
118
|
+
### /init-docs
|
|
119
|
+
|
|
120
|
+
1. `Bash: ls leniu-tengyun-core/` 扫描模块结构
|
|
121
|
+
2. `Bash: git log --oneline -20` 了解已有提交
|
|
122
|
+
3. 生成三个文档到 `docs/`
|
|
123
|
+
|
|
124
|
+
### /update-status
|
|
125
|
+
|
|
126
|
+
1. `Read: docs/项目状态.md`
|
|
127
|
+
2. `Bash: git log --oneline -10` 分析最近提交
|
|
128
|
+
3. 将完成的功能移到"已完成",更新进度百分比
|
|
129
|
+
|
|
130
|
+
### /add-todo
|
|
131
|
+
|
|
132
|
+
1. 解析任务信息(名称、优先级)
|
|
133
|
+
2. `Read: docs/待办清单.md`
|
|
134
|
+
3. 添加到对应优先级区域,更新统计
|
|
135
|
+
|
|
136
|
+
### /progress
|
|
137
|
+
|
|
138
|
+
1. 扫描项目目录(sys-canteen/sys-kitchen/sys-drp 等)
|
|
139
|
+
2. 读取 `docs/项目状态.md`(如存在)
|
|
140
|
+
3. 生成进度报告
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 规范
|
|
145
|
+
|
|
146
|
+
- 文档位置:`docs/`(非 `.claude/`)
|
|
147
|
+
- 时间格式:`YYYY-MM-DD HH:MM`
|
|
148
|
+
- 任务编号:`REQ-001`、`TASK-001`
|
|
149
|
+
- 优先级:高/中/低
|
|
150
|
+
- 进度:百分比(0-100%)
|
|
151
|
+
- 模块归属:明确标注 sys-canteen / sys-kitchen / sys-drp / sys-common 等
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## 智能提醒
|
|
156
|
+
|
|
157
|
+
- 某功能开发中超过 7 天,提醒检查进展
|
|
158
|
+
- 待办超过 20 个,建议优先级排序
|
|
159
|
+
- 发现新文件在 `net.xnzn.core.*` 下,自动识别为新功能模块
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /opsx-apply
|
|
3
|
+
id: opsx-apply
|
|
4
|
+
category: Workflow
|
|
5
|
+
description: Implement tasks from an OpenSpec change (Experimental)
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Implement tasks from an OpenSpec change.
|
|
9
|
+
|
|
10
|
+
**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
11
|
+
|
|
12
|
+
**Steps**
|
|
13
|
+
|
|
14
|
+
1. **Select the change**
|
|
15
|
+
|
|
16
|
+
If a name is provided, use it. Otherwise:
|
|
17
|
+
- Infer from conversation context if the user mentioned a change
|
|
18
|
+
- Auto-select if only one active change exists
|
|
19
|
+
- If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
|
|
20
|
+
|
|
21
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
|
|
22
|
+
|
|
23
|
+
2. **Check status to understand the schema**
|
|
24
|
+
```bash
|
|
25
|
+
openspec status --change "<name>" --json
|
|
26
|
+
```
|
|
27
|
+
Parse the JSON to understand:
|
|
28
|
+
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
|
29
|
+
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
|
30
|
+
|
|
31
|
+
3. **Get apply instructions**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
openspec instructions apply --change "<name>" --json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This returns:
|
|
38
|
+
- Context file paths (varies by schema)
|
|
39
|
+
- Progress (total, complete, remaining)
|
|
40
|
+
- Task list with status
|
|
41
|
+
- Dynamic instruction based on current state
|
|
42
|
+
|
|
43
|
+
**Handle states:**
|
|
44
|
+
- If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue`
|
|
45
|
+
- If `state: "all_done"`: congratulate, suggest archive
|
|
46
|
+
- Otherwise: proceed to implementation
|
|
47
|
+
|
|
48
|
+
4. **Read context files**
|
|
49
|
+
|
|
50
|
+
Read the files listed in `contextFiles` from the apply instructions output.
|
|
51
|
+
The files depend on the schema being used:
|
|
52
|
+
- **spec-driven**: proposal, specs, design, tasks
|
|
53
|
+
- Other schemas: follow the contextFiles from CLI output
|
|
54
|
+
|
|
55
|
+
5. **Show current progress**
|
|
56
|
+
|
|
57
|
+
Display:
|
|
58
|
+
- Schema being used
|
|
59
|
+
- Progress: "N/M tasks complete"
|
|
60
|
+
- Remaining tasks overview
|
|
61
|
+
- Dynamic instruction from CLI
|
|
62
|
+
|
|
63
|
+
6. **Implement tasks (loop until done or blocked)**
|
|
64
|
+
|
|
65
|
+
For each pending task:
|
|
66
|
+
- Show which task is being worked on
|
|
67
|
+
- Make the code changes required
|
|
68
|
+
- Keep changes minimal and focused
|
|
69
|
+
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
|
|
70
|
+
- Continue to next task
|
|
71
|
+
|
|
72
|
+
**Pause if:**
|
|
73
|
+
- Task is unclear → ask for clarification
|
|
74
|
+
- Implementation reveals a design issue → suggest updating artifacts
|
|
75
|
+
- Error or blocker encountered → report and wait for guidance
|
|
76
|
+
- User interrupts
|
|
77
|
+
|
|
78
|
+
7. **On completion or pause, show status**
|
|
79
|
+
|
|
80
|
+
Display:
|
|
81
|
+
- Tasks completed this session
|
|
82
|
+
- Overall progress: "N/M tasks complete"
|
|
83
|
+
- If all done: suggest archive
|
|
84
|
+
- If paused: explain why and wait for guidance
|
|
85
|
+
|
|
86
|
+
**Output During Implementation**
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
## Implementing: <change-name> (schema: <schema-name>)
|
|
90
|
+
|
|
91
|
+
Working on task 3/7: <task description>
|
|
92
|
+
[...implementation happening...]
|
|
93
|
+
✓ Task complete
|
|
94
|
+
|
|
95
|
+
Working on task 4/7: <task description>
|
|
96
|
+
[...implementation happening...]
|
|
97
|
+
✓ Task complete
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Output On Completion**
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
## Implementation Complete
|
|
104
|
+
|
|
105
|
+
**Change:** <change-name>
|
|
106
|
+
**Schema:** <schema-name>
|
|
107
|
+
**Progress:** 7/7 tasks complete ✓
|
|
108
|
+
|
|
109
|
+
### Completed This Session
|
|
110
|
+
- [x] Task 1
|
|
111
|
+
- [x] Task 2
|
|
112
|
+
...
|
|
113
|
+
|
|
114
|
+
All tasks complete! You can archive this change with `/opsx:archive`.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Output On Pause (Issue Encountered)**
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
## Implementation Paused
|
|
121
|
+
|
|
122
|
+
**Change:** <change-name>
|
|
123
|
+
**Schema:** <schema-name>
|
|
124
|
+
**Progress:** 4/7 tasks complete
|
|
125
|
+
|
|
126
|
+
### Issue Encountered
|
|
127
|
+
<description of the issue>
|
|
128
|
+
|
|
129
|
+
**Options:**
|
|
130
|
+
1. <option 1>
|
|
131
|
+
2. <option 2>
|
|
132
|
+
3. Other approach
|
|
133
|
+
|
|
134
|
+
What would you like to do?
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Guardrails**
|
|
138
|
+
- Keep going through tasks until done or blocked
|
|
139
|
+
- Always read context files before starting (from the apply instructions output)
|
|
140
|
+
- If task is ambiguous, pause and ask before implementing
|
|
141
|
+
- If implementation reveals issues, pause and suggest artifact updates
|
|
142
|
+
- Keep code changes minimal and scoped to each task
|
|
143
|
+
- Update task checkbox immediately after completing each task
|
|
144
|
+
- Pause on errors, blockers, or unclear requirements - don't guess
|
|
145
|
+
- Use contextFiles from CLI output, don't assume specific file names
|
|
146
|
+
|
|
147
|
+
**Fluid Workflow Integration**
|
|
148
|
+
|
|
149
|
+
This skill supports the "actions on a change" model:
|
|
150
|
+
|
|
151
|
+
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
|
|
152
|
+
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /opsx-archive
|
|
3
|
+
id: opsx-archive
|
|
4
|
+
category: Workflow
|
|
5
|
+
description: Archive a completed change in the experimental workflow
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Archive a completed change in the experimental workflow.
|
|
9
|
+
|
|
10
|
+
**Input**: Optionally specify a change name after `/opsx:archive` (e.g., `/opsx:archive add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
11
|
+
|
|
12
|
+
**Steps**
|
|
13
|
+
|
|
14
|
+
1. **If no change name provided, prompt for selection**
|
|
15
|
+
|
|
16
|
+
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
17
|
+
|
|
18
|
+
Show only active changes (not already archived).
|
|
19
|
+
Include the schema used for each change if available.
|
|
20
|
+
|
|
21
|
+
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
22
|
+
|
|
23
|
+
2. **Check artifact completion status**
|
|
24
|
+
|
|
25
|
+
Run `openspec status --change "<name>" --json` to check artifact completion.
|
|
26
|
+
|
|
27
|
+
Parse the JSON to understand:
|
|
28
|
+
- `schemaName`: The workflow being used
|
|
29
|
+
- `artifacts`: List of artifacts with their status (`done` or other)
|
|
30
|
+
|
|
31
|
+
**If any artifacts are not `done`:**
|
|
32
|
+
- Display warning listing incomplete artifacts
|
|
33
|
+
- Prompt user for confirmation to continue
|
|
34
|
+
- Proceed if user confirms
|
|
35
|
+
|
|
36
|
+
3. **Check task completion status**
|
|
37
|
+
|
|
38
|
+
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
|
|
39
|
+
|
|
40
|
+
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
|
|
41
|
+
|
|
42
|
+
**If incomplete tasks found:**
|
|
43
|
+
- Display warning showing count of incomplete tasks
|
|
44
|
+
- Prompt user for confirmation to continue
|
|
45
|
+
- Proceed if user confirms
|
|
46
|
+
|
|
47
|
+
**If no tasks file exists:** Proceed without task-related warning.
|
|
48
|
+
|
|
49
|
+
4. **Assess delta spec sync state**
|
|
50
|
+
|
|
51
|
+
Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
|
|
52
|
+
|
|
53
|
+
**If delta specs exist:**
|
|
54
|
+
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
|
|
55
|
+
- Determine what changes would be applied (adds, modifications, removals, renames)
|
|
56
|
+
- Show a combined summary before prompting
|
|
57
|
+
|
|
58
|
+
**Prompt options:**
|
|
59
|
+
- If changes needed: "Sync now (recommended)", "Archive without syncing"
|
|
60
|
+
- If already synced: "Archive now", "Sync anyway", "Cancel"
|
|
61
|
+
|
|
62
|
+
If user chooses sync, execute `/opsx:sync` logic. Proceed to archive regardless of choice.
|
|
63
|
+
|
|
64
|
+
5. **Perform the archive**
|
|
65
|
+
|
|
66
|
+
Create the archive directory if it doesn't exist:
|
|
67
|
+
```bash
|
|
68
|
+
mkdir -p openspec/changes/archive
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
|
72
|
+
|
|
73
|
+
**Check if target already exists:**
|
|
74
|
+
- If yes: Fail with error, suggest renaming existing archive or using different date
|
|
75
|
+
- If no: Move the change directory to archive
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
6. **Display summary**
|
|
82
|
+
|
|
83
|
+
Show archive completion summary including:
|
|
84
|
+
- Change name
|
|
85
|
+
- Schema that was used
|
|
86
|
+
- Archive location
|
|
87
|
+
- Spec sync status (synced / sync skipped / no delta specs)
|
|
88
|
+
- Note about any warnings (incomplete artifacts/tasks)
|
|
89
|
+
|
|
90
|
+
**Output On Success**
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
## Archive Complete
|
|
94
|
+
|
|
95
|
+
**Change:** <change-name>
|
|
96
|
+
**Schema:** <schema-name>
|
|
97
|
+
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
|
98
|
+
**Specs:** ✓ Synced to main specs
|
|
99
|
+
|
|
100
|
+
All artifacts complete. All tasks complete.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Output On Success (No Delta Specs)**
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
## Archive Complete
|
|
107
|
+
|
|
108
|
+
**Change:** <change-name>
|
|
109
|
+
**Schema:** <schema-name>
|
|
110
|
+
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
|
111
|
+
**Specs:** No delta specs
|
|
112
|
+
|
|
113
|
+
All artifacts complete. All tasks complete.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Output On Success With Warnings**
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
## Archive Complete (with warnings)
|
|
120
|
+
|
|
121
|
+
**Change:** <change-name>
|
|
122
|
+
**Schema:** <schema-name>
|
|
123
|
+
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
|
124
|
+
**Specs:** Sync skipped (user chose to skip)
|
|
125
|
+
|
|
126
|
+
**Warnings:**
|
|
127
|
+
- Archived with 2 incomplete artifacts
|
|
128
|
+
- Archived with 3 incomplete tasks
|
|
129
|
+
- Delta spec sync was skipped (user chose to skip)
|
|
130
|
+
|
|
131
|
+
Review the archive if this was not intentional.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Output On Error (Archive Exists)**
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
## Archive Failed
|
|
138
|
+
|
|
139
|
+
**Change:** <change-name>
|
|
140
|
+
**Target:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
|
141
|
+
|
|
142
|
+
Target archive directory already exists.
|
|
143
|
+
|
|
144
|
+
**Options:**
|
|
145
|
+
1. Rename the existing archive
|
|
146
|
+
2. Delete the existing archive if it's a duplicate
|
|
147
|
+
3. Wait until a different date to archive
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Guardrails**
|
|
151
|
+
- Always prompt for change selection if not provided
|
|
152
|
+
- Use artifact graph (openspec status --json) for completion checking
|
|
153
|
+
- Don't block archive on warnings - just inform and confirm
|
|
154
|
+
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
|
|
155
|
+
- Show clear summary of what happened
|
|
156
|
+
- If sync is requested, use /opsx:sync approach (agent-driven)
|
|
157
|
+
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
|