cangming-ai-dev-kit 0.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.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/adapters/claude-code/.claude-plugin/plugin.json +20 -0
  3. data/adapters/claude-code/agents/coder.md +22 -0
  4. data/adapters/claude-code/agents/planner.md +24 -0
  5. data/adapters/claude-code/agents/reviewer.md +23 -0
  6. data/adapters/claude-code/hooks/hooks.json +16 -0
  7. data/adapters/codex/.codex-plugin/plugin.json +26 -0
  8. data/adapters/codex/AGENTS.md.template +45 -0
  9. data/core/references/review_checklist.md +48 -0
  10. data/core/references/verify_rules.md +48 -0
  11. data/core/references/workflow.md +65 -0
  12. data/core/scripts/detect_project_type.sh +49 -0
  13. data/core/scripts/summarize_context.sh +55 -0
  14. data/core/scripts/verify_project.sh +61 -0
  15. data/core/skills/code-review/SKILL.md +71 -0
  16. data/core/skills/plan-first/SKILL.md +56 -0
  17. data/core/skills/safe-code-change/SKILL.md +48 -0
  18. data/core/skills/verify-before-done/SKILL.md +71 -0
  19. data/domains/harmony/references/arkts_syntax.md +90 -0
  20. data/domains/harmony/references/arkui_rules.md +81 -0
  21. data/domains/harmony/references/common_compile_errors.md +40 -0
  22. data/domains/harmony/references/harmony_project_structure.md +56 -0
  23. data/domains/harmony/references/hvigor_ohpm_hdc_commands.md +40 -0
  24. data/domains/harmony/scripts/build_hap.sh +39 -0
  25. data/domains/harmony/scripts/lint_harmony.sh +39 -0
  26. data/domains/harmony/scripts/test_harmony.sh +32 -0
  27. data/domains/harmony/scripts/verify_harmony.sh +92 -0
  28. data/domains/harmony/skills/harmony-code/SKILL.md +73 -0
  29. data/domains/harmony/skills/harmony-plan/SKILL.md +68 -0
  30. data/domains/harmony/skills/harmony-verify/SKILL.md +68 -0
  31. data/exe/cangming-dev-kit +6 -0
  32. data/lib/cangming_ai_dev_kit/adapter.rb +68 -0
  33. data/lib/cangming_ai_dev_kit/cli.rb +88 -0
  34. data/lib/cangming_ai_dev_kit/commands/init.rb +53 -0
  35. data/lib/cangming_ai_dev_kit/commands/sync.rb +25 -0
  36. data/lib/cangming_ai_dev_kit/commands/verify.rb +32 -0
  37. data/lib/cangming_ai_dev_kit/syncer.rb +102 -0
  38. data/lib/cangming_ai_dev_kit/verifier.rb +134 -0
  39. data/lib/cangming_ai_dev_kit/version.rb +5 -0
  40. data/lib/cangming_ai_dev_kit.rb +7 -0
  41. data/marketplace/.claude-plugin/marketplace.json +21 -0
  42. metadata +88 -0
@@ -0,0 +1,134 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CangmingAiDevKit
4
+ class Verifier
5
+ Result = Struct.new(:pass, :fail, :warn, keyword_init: true)
6
+
7
+ CHECK_PATHS = [
8
+ # dirs
9
+ { type: :dir, path: "core/skills" },
10
+ { type: :dir, path: "core/references" },
11
+ { type: :dir, path: "core/scripts" },
12
+ { type: :dir, path: "domains/harmony/skills" },
13
+ { type: :dir, path: "domains/harmony/references" },
14
+ { type: :dir, path: "domains/harmony/scripts" },
15
+ { type: :dir, path: "adapters/claude-code" },
16
+ { type: :dir, path: "adapters/codex" },
17
+ { type: :dir, path: "marketplace/.claude-plugin" },
18
+
19
+ # top-level
20
+ { type: :file, path: "README.md" },
21
+ { type: :file, path: "AGENTS.md" },
22
+ { type: :file, path: "CLAUDE.md" },
23
+ { type: :file, path: "cangming-ai-dev-kit.gemspec" },
24
+ { type: :file, path: "exe/cangming-dev-kit" },
25
+
26
+ # core skills
27
+ { type: :file, path: "core/skills/plan-first/SKILL.md" },
28
+ { type: :file, path: "core/skills/safe-code-change/SKILL.md" },
29
+ { type: :file, path: "core/skills/code-review/SKILL.md" },
30
+ { type: :file, path: "core/skills/verify-before-done/SKILL.md" },
31
+
32
+ # core references
33
+ { type: :file, path: "core/references/workflow.md" },
34
+ { type: :file, path: "core/references/review_checklist.md" },
35
+ { type: :file, path: "core/references/verify_rules.md" },
36
+
37
+ # harmony skills
38
+ { type: :file, path: "domains/harmony/skills/harmony-plan/SKILL.md" },
39
+ { type: :file, path: "domains/harmony/skills/harmony-code/SKILL.md" },
40
+ { type: :file, path: "domains/harmony/skills/harmony-verify/SKILL.md" },
41
+
42
+ # harmony references
43
+ { type: :file, path: "domains/harmony/references/arkts_syntax.md" },
44
+ { type: :file, path: "domains/harmony/references/arkui_rules.md" },
45
+ { type: :file, path: "domains/harmony/references/harmony_project_structure.md" },
46
+ { type: :file, path: "domains/harmony/references/hvigor_ohpm_hdc_commands.md" },
47
+ { type: :file, path: "domains/harmony/references/common_compile_errors.md" },
48
+
49
+ # plugin JSONs
50
+ { type: :file, path: "adapters/claude-code/.claude-plugin/plugin.json" },
51
+ { type: :file, path: "adapters/codex/.codex-plugin/plugin.json" },
52
+ { type: :file, path: "marketplace/.claude-plugin/marketplace.json" },
53
+
54
+ # adapter files
55
+ { type: :file, path: "adapters/claude-code/hooks/hooks.json" },
56
+ { type: :file, path: "adapters/claude-code/agents/planner.md" },
57
+ { type: :file, path: "adapters/claude-code/agents/coder.md" },
58
+ { type: :file, path: "adapters/claude-code/agents/reviewer.md" },
59
+ { type: :file, path: "adapters/codex/AGENTS.md.template" },
60
+ ].freeze
61
+
62
+ EXECUTABLE_PATHS = %w[
63
+ core/scripts/detect_project_type.sh
64
+ core/scripts/verify_project.sh
65
+ core/scripts/summarize_context.sh
66
+ domains/harmony/scripts/lint_harmony.sh
67
+ domains/harmony/scripts/test_harmony.sh
68
+ domains/harmony/scripts/build_hap.sh
69
+ domains/harmony/scripts/verify_harmony.sh
70
+ ].freeze
71
+
72
+ JSON_PATHS = %w[
73
+ adapters/claude-code/.claude-plugin/plugin.json
74
+ adapters/codex/.codex-plugin/plugin.json
75
+ marketplace/.claude-plugin/marketplace.json
76
+ adapters/claude-code/hooks/hooks.json
77
+ ].freeze
78
+
79
+ def initialize(root_dir)
80
+ @root = root_dir
81
+ end
82
+
83
+ def verify
84
+ result = Result.new(pass: 0, fail: 0, warn: 0)
85
+
86
+ puts "--- 目录/文件完整性 ---"
87
+ CHECK_PATHS.each do |check|
88
+ full = File.join(@root, check[:path])
89
+ ok = check[:type] == :dir ? Dir.exist?(full) : File.exist?(full)
90
+ if ok
91
+ puts " ✓ #{check[:path]}"
92
+ result.pass += 1
93
+ else
94
+ puts " ✗ #{check[:path]}"
95
+ result.fail += 1
96
+ end
97
+ end
98
+
99
+ puts ""
100
+ puts "--- 可执行脚本 ---"
101
+ EXECUTABLE_PATHS.each do |path|
102
+ full = File.join(@root, path)
103
+ if File.exist?(full) && File.executable?(full)
104
+ puts " ✓ #{path}"
105
+ result.pass += 1
106
+ elsif File.exist?(full)
107
+ puts " ⚠ #{path} 不可执行"
108
+ result.warn += 1
109
+ else
110
+ puts " ✗ #{path}"
111
+ result.fail += 1
112
+ end
113
+ end
114
+
115
+ puts ""
116
+ puts "--- JSON 语法 ---"
117
+ JSON_PATHS.each do |path|
118
+ full = File.join(@root, path)
119
+ next unless File.exist?(full)
120
+ begin
121
+ require "json"
122
+ JSON.parse(File.read(full))
123
+ puts " ✓ #{path}"
124
+ result.pass += 1
125
+ rescue JSON::ParserError => e
126
+ puts " ✗ #{path}: #{e.message}"
127
+ result.fail += 1
128
+ end
129
+ end
130
+
131
+ result
132
+ end
133
+ end
134
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CangmingAiDevKit
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "cangming_ai_dev_kit/version"
4
+ require_relative "cangming_ai_dev_kit/adapter"
5
+ require_relative "cangming_ai_dev_kit/syncer"
6
+ require_relative "cangming_ai_dev_kit/verifier"
7
+ require_relative "cangming_ai_dev_kit/cli"
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "cangming-ai-dev-kit-marketplace",
3
+ "version": "0.1.0",
4
+ "description": "cangming-ai-dev-kit 私有 Marketplace 示例",
5
+ "plugins": [
6
+ {
7
+ "name": "cangming-dev-core",
8
+ "version": "0.1.0",
9
+ "description": "通用开发核心能力:plan / code / review / verify",
10
+ "source": "../adapters/claude-code",
11
+ "type": "local"
12
+ },
13
+ {
14
+ "name": "harmony-superpowers",
15
+ "version": "0.1.0",
16
+ "description": "HarmonyOS(鸿蒙)领域开发能力:ArkTS / ArkUI / hvigor / ohpm",
17
+ "source": "../adapters/claude-code",
18
+ "type": "local"
19
+ }
20
+ ]
21
+ }
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cangming-ai-dev-kit
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - cangming
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2026-05-12 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: |
14
+ cangming-ai-dev-kit provides cross-agent development skills
15
+ (plan-first, safe-code-change, code-review, verify-before-done),
16
+ domain-specific knowledge (HarmonyOS/ArkTS/ArkUI), and shell scripts.
17
+ Install with `gem install` and use the CLI to sync skills to Claude Code or Codex.
18
+ email:
19
+ executables:
20
+ - cangming-dev-kit
21
+ extensions: []
22
+ extra_rdoc_files: []
23
+ files:
24
+ - adapters/claude-code/.claude-plugin/plugin.json
25
+ - adapters/claude-code/agents/coder.md
26
+ - adapters/claude-code/agents/planner.md
27
+ - adapters/claude-code/agents/reviewer.md
28
+ - adapters/claude-code/hooks/hooks.json
29
+ - adapters/codex/.codex-plugin/plugin.json
30
+ - adapters/codex/AGENTS.md.template
31
+ - core/references/review_checklist.md
32
+ - core/references/verify_rules.md
33
+ - core/references/workflow.md
34
+ - core/scripts/detect_project_type.sh
35
+ - core/scripts/summarize_context.sh
36
+ - core/scripts/verify_project.sh
37
+ - core/skills/code-review/SKILL.md
38
+ - core/skills/plan-first/SKILL.md
39
+ - core/skills/safe-code-change/SKILL.md
40
+ - core/skills/verify-before-done/SKILL.md
41
+ - domains/harmony/references/arkts_syntax.md
42
+ - domains/harmony/references/arkui_rules.md
43
+ - domains/harmony/references/common_compile_errors.md
44
+ - domains/harmony/references/harmony_project_structure.md
45
+ - domains/harmony/references/hvigor_ohpm_hdc_commands.md
46
+ - domains/harmony/scripts/build_hap.sh
47
+ - domains/harmony/scripts/lint_harmony.sh
48
+ - domains/harmony/scripts/test_harmony.sh
49
+ - domains/harmony/scripts/verify_harmony.sh
50
+ - domains/harmony/skills/harmony-code/SKILL.md
51
+ - domains/harmony/skills/harmony-plan/SKILL.md
52
+ - domains/harmony/skills/harmony-verify/SKILL.md
53
+ - exe/cangming-dev-kit
54
+ - lib/cangming_ai_dev_kit.rb
55
+ - lib/cangming_ai_dev_kit/adapter.rb
56
+ - lib/cangming_ai_dev_kit/cli.rb
57
+ - lib/cangming_ai_dev_kit/commands/init.rb
58
+ - lib/cangming_ai_dev_kit/commands/sync.rb
59
+ - lib/cangming_ai_dev_kit/commands/verify.rb
60
+ - lib/cangming_ai_dev_kit/syncer.rb
61
+ - lib/cangming_ai_dev_kit/verifier.rb
62
+ - lib/cangming_ai_dev_kit/version.rb
63
+ - marketplace/.claude-plugin/marketplace.json
64
+ homepage: https://github.com/cangming/cangming-ai-dev-kit
65
+ licenses:
66
+ - MIT
67
+ metadata: {}
68
+ post_install_message:
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 2.6.0
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ requirements: []
83
+ rubygems_version: 3.0.3.1
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: AI Coding Harness capability kit — reusable dev skills for Claude Code and
87
+ Codex
88
+ test_files: []