kld-sdd 2.4.19 → 2.5.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/lib/init.js +9 -12
- package/package.json +1 -1
- package/skywalk-sdd/index.cjs +1808 -129
- package/templates/hooks/claude/hooks/sdd-apply-test-gate.cjs +175 -28
- package/templates/hooks/claude/hooks/sdd-post-tool.cjs +42 -21
- package/templates/openspec/proposal.md +0 -1
- package/templates/openspec/spec.md +2 -2
- package/templates/skills/kld-sdd/opsx-apply/SKILL.md +64 -355
- package/templates/skills/kld-sdd/opsx-apply/checklist.md +94 -0
- package/templates/skills/kld-sdd/opsx-apply/reference.md +403 -0
- package/templates/skills/kld-sdd/opsx-archive/SKILL.md +21 -5
- package/templates/skills/kld-sdd/opsx-archive/checklist.md +33 -0
- package/templates/skills/kld-sdd/opsx-check/SKILL.md +28 -4
- package/templates/skills/kld-sdd/opsx-check/checklist.md +37 -0
- package/templates/skills/kld-sdd/opsx-design/SKILL.md +46 -50
- package/templates/skills/kld-sdd/opsx-design/checklist.md +46 -0
- package/templates/skills/kld-sdd/opsx-design/reference.md +44 -0
- package/templates/skills/kld-sdd/opsx-propose/SKILL.md +51 -95
- package/templates/skills/kld-sdd/opsx-propose/checklist.md +44 -0
- package/templates/skills/kld-sdd/opsx-propose/reference.md +94 -0
- package/templates/skills/kld-sdd/opsx-spec/SKILL.md +46 -50
- package/templates/skills/kld-sdd/opsx-spec/checklist.md +46 -0
- package/templates/skills/kld-sdd/opsx-spec/reference.md +49 -0
- package/templates/skills/kld-sdd/opsx-task/SKILL.md +42 -45
- package/templates/skills/kld-sdd/opsx-task/checklist.md +46 -0
- package/templates/skills/kld-sdd/opsx-task/reference.md +40 -0
- package/templates/skills/kld-sdd/opsx-test/SKILL.md +12 -0
package/lib/init.js
CHANGED
|
@@ -782,7 +782,7 @@ function initGlobalOverview() {
|
|
|
782
782
|
|
|
783
783
|
/**
|
|
784
784
|
* 部署 SDD Telemetry 数据目录
|
|
785
|
-
*
|
|
785
|
+
* 创建本地数据目录用于存储事件和活跃状态(最终报告落 openspec/changes/<change>/reports/,不再写 skywalk-sdd/reports/)
|
|
786
786
|
*/
|
|
787
787
|
function deployTelemetryDataDir() {
|
|
788
788
|
console.log('📊 正在初始化 SDD Telemetry 数据目录...');
|
|
@@ -795,18 +795,13 @@ function deployTelemetryDataDir() {
|
|
|
795
795
|
fs.mkdirSync(dataDir, { recursive: true });
|
|
796
796
|
}
|
|
797
797
|
|
|
798
|
-
//
|
|
798
|
+
// 创建本地数据目录(事件和活跃状态存储;报告落 change 子目录,不在此创建)
|
|
799
799
|
const eventsDir = path.join(dataDir, 'events');
|
|
800
|
-
const reportsDir = path.join(dataDir, 'reports');
|
|
801
800
|
const stateDir = path.join(dataDir, 'state');
|
|
802
801
|
if (!fs.existsSync(eventsDir)) {
|
|
803
802
|
fs.mkdirSync(eventsDir, { recursive: true });
|
|
804
803
|
console.log(' ✓ 创建 skywalk-sdd/events/ 数据目录');
|
|
805
804
|
}
|
|
806
|
-
if (!fs.existsSync(reportsDir)) {
|
|
807
|
-
fs.mkdirSync(reportsDir, { recursive: true });
|
|
808
|
-
console.log(' ✓ 创建 skywalk-sdd/reports/ 报告目录');
|
|
809
|
-
}
|
|
810
805
|
if (!fs.existsSync(stateDir)) {
|
|
811
806
|
fs.mkdirSync(stateDir, { recursive: true });
|
|
812
807
|
console.log(' ✓ 创建 skywalk-sdd/state/ 活跃阶段状态目录');
|
|
@@ -876,10 +871,14 @@ function installGitHookShim(cwd, hookName, scriptPath) {
|
|
|
876
871
|
* 这些脚本只做质量门禁和 CI 补充记录,不替代 OPSX 主采集链路。
|
|
877
872
|
*/
|
|
878
873
|
function deployQualityGateTemplates() {
|
|
879
|
-
console.log('🧰 正在部署 SDD Git hooks / CI 兜底模板...');
|
|
880
|
-
|
|
881
874
|
const pkgPath = getPackagePath();
|
|
882
875
|
const cwd = process.cwd();
|
|
876
|
+
// U4: 非 Git 项目跳过 Git hooks / CI 兜底模板(按需部署,不污染非 Git 项目根)
|
|
877
|
+
if (!fs.existsSync(path.join(cwd, '.git'))) {
|
|
878
|
+
console.log('🧰 非 Git 项目,跳过 Git hooks / CI 兜底模板部署');
|
|
879
|
+
return false;
|
|
880
|
+
}
|
|
881
|
+
console.log('🧰 正在部署 SDD Git hooks / CI 兜底模板...');
|
|
883
882
|
const dataDir = path.join(cwd, 'skywalk-sdd');
|
|
884
883
|
const gitHooksTemplateDir = path.join(pkgPath, 'templates', 'git-hooks');
|
|
885
884
|
const ciTemplateDir = path.join(pkgPath, 'templates', 'ci');
|
|
@@ -936,7 +935,6 @@ function updateGitignore() {
|
|
|
936
935
|
'.workbuddy/commands/personal-*',
|
|
937
936
|
'.agents/commands/personal-*',
|
|
938
937
|
'skywalk-sdd/events/',
|
|
939
|
-
'skywalk-sdd/reports/',
|
|
940
938
|
'skywalk-sdd/state/',
|
|
941
939
|
'.worktrees/'
|
|
942
940
|
];
|
|
@@ -951,9 +949,8 @@ function updateGitignore() {
|
|
|
951
949
|
.workbuddy/commands/personal-*
|
|
952
950
|
.agents/commands/personal-*
|
|
953
951
|
|
|
954
|
-
# SDD Telemetry
|
|
952
|
+
# SDD Telemetry 数据(本地度量,可选提交;最终报告落 openspec/changes/<change>/reports/ 随 change 提交)
|
|
955
953
|
skywalk-sdd/events/
|
|
956
|
-
skywalk-sdd/reports/
|
|
957
954
|
skywalk-sdd/state/
|
|
958
955
|
|
|
959
956
|
# SDD Apply 隔离 worktree(本地临时目录)
|