oh-my-codex-cli 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 (292) hide show
  1. package/.agent/skills/agent-kb/HOW_TO_USE.md +428 -0
  2. package/.agent/skills/agent-kb/README.md +46 -0
  3. package/.agent/skills/agent-kb/SKILL.md +128 -0
  4. package/.agent/skills/agent-kb/references/intelligent-analysis-explained.md +333 -0
  5. package/.agent/skills/agent-kb/references/query-optimization.md +225 -0
  6. package/.agent/skills/aireview/SKILL.md +704 -0
  7. package/.agent/skills/analyze/SKILL.md +81 -0
  8. package/.agent/skills/architect-planner/HOW_TO_USE.md +238 -0
  9. package/.agent/skills/architect-planner/README.md +41 -0
  10. package/.agent/skills/architect-planner/SKILL.md +539 -0
  11. package/.agent/skills/auto-mbti/SKILL.md +291 -0
  12. package/.agent/skills/autopilot/SKILL.md +222 -0
  13. package/.agent/skills/backend-patterns/SKILL.md +602 -0
  14. package/.agent/skills/bdd-generator/README.md +78 -0
  15. package/.agent/skills/bdd-generator/SKILL.md +436 -0
  16. package/.agent/skills/brainstorming/HOW_TO_USE.md +289 -0
  17. package/.agent/skills/brainstorming/README.md +41 -0
  18. package/.agent/skills/brainstorming/SKILL.md +165 -0
  19. package/.agent/skills/build-fix/SKILL.md +190 -0
  20. package/.agent/skills/cancel/SKILL.md +658 -0
  21. package/.agent/skills/checkpoint/SKILL.md +94 -0
  22. package/.agent/skills/code-review/SKILL.md +273 -0
  23. package/.agent/skills/coding-standards/SKILL.md +535 -0
  24. package/.agent/skills/conductor/SKILL.md +128 -0
  25. package/.agent/skills/conductor/commands/conductor/implement.toml +358 -0
  26. package/.agent/skills/conductor/commands/conductor/newTrack.toml +142 -0
  27. package/.agent/skills/conductor/commands/conductor/revert.toml +123 -0
  28. package/.agent/skills/conductor/commands/conductor/setup.toml +429 -0
  29. package/.agent/skills/conductor/commands/conductor/status.toml +57 -0
  30. package/.agent/skills/conductor/scripts/install.sh +89 -0
  31. package/.agent/skills/conductor/templates/code_styleguides/csharp.md +115 -0
  32. package/.agent/skills/conductor/templates/code_styleguides/dart.md +238 -0
  33. package/.agent/skills/conductor/templates/code_styleguides/general.md +23 -0
  34. package/.agent/skills/conductor/templates/code_styleguides/go.md +48 -0
  35. package/.agent/skills/conductor/templates/code_styleguides/html-css.md +49 -0
  36. package/.agent/skills/conductor/templates/code_styleguides/javascript.md +51 -0
  37. package/.agent/skills/conductor/templates/code_styleguides/python.md +37 -0
  38. package/.agent/skills/conductor/templates/code_styleguides/typescript.md +43 -0
  39. package/.agent/skills/conductor/templates/rules/README.md +23 -0
  40. package/.agent/skills/conductor/templates/rules/agents.md +49 -0
  41. package/.agent/skills/conductor/templates/rules/coding-style.md +70 -0
  42. package/.agent/skills/conductor/templates/rules/dev.md +20 -0
  43. package/.agent/skills/conductor/templates/rules/git-workflow.md +45 -0
  44. package/.agent/skills/conductor/templates/rules/hooks.md +6 -0
  45. package/.agent/skills/conductor/templates/rules/patterns.md +55 -0
  46. package/.agent/skills/conductor/templates/rules/performance.md +47 -0
  47. package/.agent/skills/conductor/templates/rules/research.md +26 -0
  48. package/.agent/skills/conductor/templates/rules/review.md +22 -0
  49. package/.agent/skills/conductor/templates/rules/security.md +36 -0
  50. package/.agent/skills/conductor/templates/rules/testing.md +30 -0
  51. package/.agent/skills/conductor/templates/workflow.md +333 -0
  52. package/.agent/skills/consensus/HOW_TO_USE.md +191 -0
  53. package/.agent/skills/consensus/README.md +41 -0
  54. package/.agent/skills/consensus/SKILL.md +317 -0
  55. package/.agent/skills/content-research-writer/SKILL.md +537 -0
  56. package/.agent/skills/debug-analysis/SKILL.md +331 -0
  57. package/.agent/skills/deepinit/SKILL.md +347 -0
  58. package/.agent/skills/deepsearch/SKILL.md +56 -0
  59. package/.agent/skills/doctor/SKILL.md +158 -0
  60. package/.agent/skills/drawio/EXAMPLES.md +382 -0
  61. package/.agent/skills/drawio/QUICK_START.md +237 -0
  62. package/.agent/skills/drawio/README.md +315 -0
  63. package/.agent/skills/drawio/SETUP_GUIDE.md +254 -0
  64. package/.agent/skills/drawio/SKILL.md +1176 -0
  65. package/.agent/skills/e2e/SKILL.md +396 -0
  66. package/.agent/skills/ecomode/SKILL.md +160 -0
  67. package/.agent/skills/electron-driver/SKILL.md +144 -0
  68. package/.agent/skills/electron-driver/scripts/driver-template.js +71 -0
  69. package/.agent/skills/eval/SKILL.md +140 -0
  70. package/.agent/skills/eval-harness/SKILL.md +242 -0
  71. package/.agent/skills/evolve/SKILL.md +213 -0
  72. package/.agent/skills/frontend-design/SKILL.md +42 -0
  73. package/.agent/skills/frontend-patterns/SKILL.md +646 -0
  74. package/.agent/skills/frontend-ui-ux/SKILL.md +70 -0
  75. package/.agent/skills/git-master/SKILL.md +75 -0
  76. package/.agent/skills/help/SKILL.md +89 -0
  77. package/.agent/skills/iterative-retrieval/SKILL.md +217 -0
  78. package/.agent/skills/local-skills-setup/SKILL.md +483 -0
  79. package/.agent/skills/log-analyzer/SKILL.md +187 -0
  80. package/.agent/skills/mcp-setup/SKILL.md +226 -0
  81. package/.agent/skills/multi-model-research/HOW_TO_USE.md +614 -0
  82. package/.agent/skills/multi-model-research/README.md +233 -0
  83. package/.agent/skills/multi-model-research/SKILL.md +541 -0
  84. package/.agent/skills/multi-model-research/references/troubleshooting.md +415 -0
  85. package/.agent/skills/note/SKILL.md +80 -0
  86. package/.agent/skills/omc-setup/SKILL.md +219 -0
  87. package/.agent/skills/orchestrate/SKILL.md +620 -0
  88. package/.agent/skills/patent-workflow/IMPLEMENTATION_SUMMARY.md +500 -0
  89. package/.agent/skills/patent-workflow/README.md +455 -0
  90. package/.agent/skills/patent-workflow/SKILL.md +1036 -0
  91. package/.agent/skills/patent-workflow/tools/irr_checker.py +260 -0
  92. package/.agent/skills/patent-workflow/tools/sample_terminology.json +49 -0
  93. package/.agent/skills/patent-workflow/tools/term_checker.py +355 -0
  94. package/.agent/skills/pattern-recognition/SKILL.md +792 -0
  95. package/.agent/skills/pipeline/SKILL.md +448 -0
  96. package/.agent/skills/plan/SKILL.md +309 -0
  97. package/.agent/skills/planning-methodology/SKILL.md +370 -0
  98. package/.agent/skills/planning-with-files/SKILL.md +210 -0
  99. package/.agent/skills/planning-with-files/examples.md +202 -0
  100. package/.agent/skills/planning-with-files/reference.md +218 -0
  101. package/.agent/skills/planning-with-files/scripts/check-complete.ps1 +42 -0
  102. package/.agent/skills/planning-with-files/scripts/check-complete.sh +44 -0
  103. package/.agent/skills/planning-with-files/scripts/init-session.ps1 +120 -0
  104. package/.agent/skills/planning-with-files/scripts/init-session.sh +120 -0
  105. package/.agent/skills/planning-with-files/scripts/session-catchup.py +208 -0
  106. package/.agent/skills/planning-with-files/templates/findings.md +95 -0
  107. package/.agent/skills/planning-with-files/templates/progress.md +114 -0
  108. package/.agent/skills/planning-with-files/templates/task_plan.md +132 -0
  109. package/.agent/skills/project-analyze/CLAUDE.md +18 -0
  110. package/.agent/skills/project-analyze/HOW_TO_USE.md +145 -0
  111. package/.agent/skills/project-analyze/README.md +42 -0
  112. package/.agent/skills/project-analyze/SKILL.md +289 -0
  113. package/.agent/skills/project-analyze/SKILL.md.backup +287 -0
  114. package/.agent/skills/project-analyze/SKILL.md.backup_20260105_093646 +287 -0
  115. package/.agent/skills/project-analyze/assets/analysis-report-template.md +433 -0
  116. package/.agent/skills/project-analyze/references/analysis-patterns.md +422 -0
  117. package/.agent/skills/project-analyze/references/projectmind-explained.md +535 -0
  118. package/.agent/skills/project-session-manager/SKILL.md +428 -0
  119. package/.agent/skills/project-session-manager/lib/config.sh +86 -0
  120. package/.agent/skills/project-session-manager/lib/parse.sh +121 -0
  121. package/.agent/skills/project-session-manager/lib/session.sh +132 -0
  122. package/.agent/skills/project-session-manager/lib/tmux.sh +103 -0
  123. package/.agent/skills/project-session-manager/lib/worktree.sh +171 -0
  124. package/.agent/skills/project-session-manager/psm.sh +629 -0
  125. package/.agent/skills/project-session-manager/templates/feature.md +56 -0
  126. package/.agent/skills/project-session-manager/templates/issue-fix.md +57 -0
  127. package/.agent/skills/project-session-manager/templates/pr-review.md +65 -0
  128. package/.agent/skills/project-session-manager/templates/projects.json +19 -0
  129. package/.agent/skills/quality-check/HOW_TO_USE.md +171 -0
  130. package/.agent/skills/quality-check/README.md +50 -0
  131. package/.agent/skills/quality-check/SKILL.md +240 -0
  132. package/.agent/skills/quality-check/SKILL.md.backup +238 -0
  133. package/.agent/skills/quality-check/SKILL.md.backup_20260105_093646 +238 -0
  134. package/.agent/skills/quality-check/assets/quality-report-template.md +437 -0
  135. package/.agent/skills/quality-check/references/refactoring-patterns.md +550 -0
  136. package/.agent/skills/quality-check/references/scoring-criteria.md +454 -0
  137. package/.agent/skills/quality-validation/SKILL.md +519 -0
  138. package/.agent/skills/quality-validation/SKILL.md.backup +573 -0
  139. package/.agent/skills/quality-validation/SKILL.md.backup_20260105_093646 +573 -0
  140. package/.agent/skills/ralph/SKILL.md +236 -0
  141. package/.agent/skills/ralph-init/SKILL.md +78 -0
  142. package/.agent/skills/ralplan/SKILL.md +58 -0
  143. package/.agent/skills/refactor-clean/SKILL.md +49 -0
  144. package/.agent/skills/release/SKILL.md +84 -0
  145. package/.agent/skills/research/SKILL.md +526 -0
  146. package/.agent/skills/research-methodology/SKILL.md +268 -0
  147. package/.agent/skills/review/SKILL.md +53 -0
  148. package/.agent/skills/security-review/SKILL.md +509 -0
  149. package/.agent/skills/security-review/cloud-infrastructure-security.md +361 -0
  150. package/.agent/skills/setup-pm/SKILL.md +102 -0
  151. package/.agent/skills/skill/SKILL.md +424 -0
  152. package/.agent/skills/skill-create/SKILL.md +209 -0
  153. package/.agent/skills/skill-debugger/HOW_TO_USE.md +244 -0
  154. package/.agent/skills/skill-debugger/README.md +44 -0
  155. package/.agent/skills/skill-debugger/SKILL.md +326 -0
  156. package/.agent/skills/skill-debugger/diagnostic_checklist.md +115 -0
  157. package/.agent/skills/skill-development/SKILL.md +661 -0
  158. package/.agent/skills/skill-development/references/skill-creator-original.md +209 -0
  159. package/.agent/skills/skill-doc-generator/README.md +37 -0
  160. package/.agent/skills/skill-doc-generator/SKILL.md +331 -0
  161. package/.agent/skills/skill-quality-analyzer/HOW_TO_USE.md +243 -0
  162. package/.agent/skills/skill-quality-analyzer/README.md +61 -0
  163. package/.agent/skills/skill-quality-analyzer/SKILL.md +247 -0
  164. package/.agent/skills/skill-quality-analyzer/analyzer.py +209 -0
  165. package/.agent/skills/skill-quality-analyzer/expected_output.json +81 -0
  166. package/.agent/skills/skill-quality-analyzer/sample_input.json +9 -0
  167. package/.agent/skills/skill-tester/README.md +46 -0
  168. package/.agent/skills/skill-tester/SKILL.md +345 -0
  169. package/.agent/skills/start-dev/SKILL.md +701 -0
  170. package/.agent/skills/swarm/SKILL.md +691 -0
  171. package/.agent/skills/task-kb-lookup/SKILL.md +211 -0
  172. package/.agent/skills/task-kb-record/SKILL.md +417 -0
  173. package/.agent/skills/tdd/SKILL.md +446 -0
  174. package/.agent/skills/tdd-generator/DEMO.md +516 -0
  175. package/.agent/skills/tdd-generator/README.md +89 -0
  176. package/.agent/skills/tdd-generator/SKILL.md +278 -0
  177. package/.agent/skills/tdd-workflow/SKILL.md +424 -0
  178. package/.agent/skills/test-coverage/SKILL.md +48 -0
  179. package/.agent/skills/thinkdeep/HOW_TO_USE.md +183 -0
  180. package/.agent/skills/thinkdeep/README.md +41 -0
  181. package/.agent/skills/thinkdeep/SKILL.md +343 -0
  182. package/.agent/skills/ui-ux-pro-max/SKILL.md +228 -0
  183. package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
  184. package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
  185. package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
  186. package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
  187. package/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
  188. package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  189. package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  190. package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  191. package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  192. package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  193. package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  194. package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  195. package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  196. package/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
  197. package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
  198. package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  199. package/.agent/skills/ui-ux-pro-max/scripts/core.py +236 -0
  200. package/.agent/skills/ui-ux-pro-max/scripts/search.py +61 -0
  201. package/.agent/skills/ultrapilot/SKILL.md +647 -0
  202. package/.agent/skills/ultraqa/SKILL.md +152 -0
  203. package/.agent/skills/ultrawork/SKILL.md +123 -0
  204. package/.agent/skills/update-codemaps/SKILL.md +38 -0
  205. package/.agent/skills/update-docs/SKILL.md +52 -0
  206. package/.agent/skills/verification-loop/SKILL.md +140 -0
  207. package/.agent/skills/verify/SKILL.md +80 -0
  208. package/.agent/skills/writer-memory/SKILL.md +459 -0
  209. package/.agent/skills/writer-memory/lib/character-tracker.ts +338 -0
  210. package/.agent/skills/writer-memory/lib/memory-manager.ts +804 -0
  211. package/.agent/skills/writer-memory/lib/relationship-graph.ts +400 -0
  212. package/.agent/skills/writer-memory/lib/scene-organizer.ts +544 -0
  213. package/.agent/skills/writer-memory/lib/synopsis-builder.ts +339 -0
  214. package/.agent/skills/writer-memory/templates/synopsis-template.md +46 -0
  215. package/.governance/skill-lint.allowlist +4 -0
  216. package/.governance/skill-llm.allowlist +4 -0
  217. package/AGENTS.md +59 -0
  218. package/LICENSE +21 -0
  219. package/README.md +169 -0
  220. package/README.zh.md +145 -0
  221. package/bin/omcodex.js +8 -0
  222. package/commands/conductor/implement.toml +358 -0
  223. package/commands/conductor/newTrack.toml +142 -0
  224. package/commands/conductor/revert.toml +123 -0
  225. package/commands/conductor/setup.toml +429 -0
  226. package/commands/conductor/status.toml +57 -0
  227. package/docs/ALIGNMENT.md +40 -0
  228. package/docs/CODEX.md +133 -0
  229. package/docs/NOTIFY.md +81 -0
  230. package/docs/SKILL_GOVERNANCE.md +72 -0
  231. package/docs/SKILL_GOVERNANCE_FRAMEWORK.md +182 -0
  232. package/docs/SKILL_GOVERNANCE_FRAMEWORK.zh.md +170 -0
  233. package/package.json +50 -0
  234. package/prompts/architect.md +105 -0
  235. package/prompts/executor.md +134 -0
  236. package/prompts/planner.md +113 -0
  237. package/scripts/check-skill-governance.sh +84 -0
  238. package/scripts/check-skill-llm-governance.js +302 -0
  239. package/scripts/eval-skills.js +217 -0
  240. package/scripts/generate-catalog-docs.js +95 -0
  241. package/scripts/generate-codex-mcp-config.sh +22 -0
  242. package/scripts/install-codex-force.sh +5 -0
  243. package/scripts/install-codex-incremental.sh +5 -0
  244. package/scripts/install-codex.sh +79 -0
  245. package/scripts/notify-dispatch.js +15 -0
  246. package/scripts/setup-package-manager.js +137 -0
  247. package/src/catalog/generated/public-catalog.json +547 -0
  248. package/src/catalog/manifest.json +542 -0
  249. package/src/catalog/reader.js +43 -0
  250. package/src/catalog/schema.js +79 -0
  251. package/src/cli/doctor.js +62 -0
  252. package/src/cli/index.js +85 -0
  253. package/src/cli/notify.js +127 -0
  254. package/src/cli/route.js +43 -0
  255. package/src/cli/setup.js +155 -0
  256. package/src/cli/team.js +125 -0
  257. package/src/config/generator.js +119 -0
  258. package/src/mcp/memory-server.js +241 -0
  259. package/src/mcp/state-server.js +112 -0
  260. package/src/mcp/trace-server.js +168 -0
  261. package/src/notify/dispatch.js +74 -0
  262. package/src/notify/extensibility/dispatcher.js +113 -0
  263. package/src/notify/extensibility/events.js +15 -0
  264. package/src/notify/extensibility/loader.js +54 -0
  265. package/src/router/skill-router.js +90 -0
  266. package/src/team/auto-advance.js +72 -0
  267. package/src/team/orchestrator.js +82 -0
  268. package/src/team/state-store.js +33 -0
  269. package/src/utils/paths.js +33 -0
  270. package/templates/AGENTS.md +15 -0
  271. package/templates/catalog-manifest.json +542 -0
  272. package/templates/code_styleguides/csharp.md +115 -0
  273. package/templates/code_styleguides/dart.md +238 -0
  274. package/templates/code_styleguides/general.md +23 -0
  275. package/templates/code_styleguides/go.md +48 -0
  276. package/templates/code_styleguides/html-css.md +49 -0
  277. package/templates/code_styleguides/javascript.md +51 -0
  278. package/templates/code_styleguides/python.md +37 -0
  279. package/templates/code_styleguides/typescript.md +43 -0
  280. package/templates/rules/README.md +23 -0
  281. package/templates/rules/agents.md +49 -0
  282. package/templates/rules/coding-style.md +70 -0
  283. package/templates/rules/dev.md +20 -0
  284. package/templates/rules/git-workflow.md +45 -0
  285. package/templates/rules/notify.md +6 -0
  286. package/templates/rules/patterns.md +55 -0
  287. package/templates/rules/performance.md +47 -0
  288. package/templates/rules/research.md +26 -0
  289. package/templates/rules/review.md +22 -0
  290. package/templates/rules/security.md +36 -0
  291. package/templates/rules/testing.md +30 -0
  292. package/templates/workflow.md +333 -0
@@ -0,0 +1,454 @@
1
+ # CodeDNA Quality Scoring Criteria
2
+
3
+ ## Overview
4
+
5
+ CodeDNA uses 6 dimensions to evaluate code quality, each scored 0-10. Total score is out of 60.
6
+
7
+ **Score Interpretation**:
8
+ - **50-60 (A)**: Excellent - Production-ready, well-maintained
9
+ - **40-49 (B)**: Good - Minor improvements needed
10
+ - **30-39 (C)**: Fair - Significant refactoring recommended
11
+ - **20-29 (D)**: Poor - Major issues, refactor urgently
12
+ - **0-19 (F)**: Critical - Complete rewrite recommended
13
+
14
+ ---
15
+
16
+ ## Dimension 1: Clarity (0-10)
17
+
18
+ **Definition**: How easy is the code to read and understand?
19
+
20
+ ### Scoring Rubric
21
+
22
+ **10 - Exceptional**:
23
+ - All variables and functions have descriptive, self-documenting names
24
+ - Code reads like prose, intention is immediately clear
25
+ - No mental overhead to understand what code does
26
+ - Minimal comments needed because code is self-explanatory
27
+ - Consistent naming conventions throughout
28
+
29
+ **8-9 - Excellent**:
30
+ - Most names are descriptive and clear
31
+ - Code structure follows logical flow
32
+ - Some comments for complex logic
33
+ - Minor naming inconsistencies
34
+
35
+ **6-7 - Good**:
36
+ - Generally clear names, few generic variables
37
+ - Code can be understood with some effort
38
+ - Comments help but could be more comprehensive
39
+ - Some inconsistency in naming style
40
+
41
+ **4-5 - Fair**:
42
+ - Mix of clear and unclear names (x, temp, data)
43
+ - Requires reading multiple times to understand
44
+ - Comments are sparse or outdated
45
+ - Inconsistent naming conventions
46
+
47
+ **2-3 - Poor**:
48
+ - Many generic names (a, b, x, temp)
49
+ - Logic is convoluted and hard to follow
50
+ - Comments missing where needed
51
+ - Inconsistent or misleading names
52
+
53
+ **0-1 - Critical**:
54
+ - Single-letter variables everywhere
55
+ - Code is virtually unreadable
56
+ - No comments or misleading comments
57
+ - Names contradict actual behavior
58
+
59
+ ### Key Indicators
60
+
61
+ **Positive**:
62
+ - `calculateUserTaxAmount()` instead of `calc()`
63
+ - `isUserEligibleForDiscount` instead of `check()`
64
+ - `const MAX_RETRIES = 3` instead of magic number
65
+ - Early returns to reduce nesting
66
+
67
+ **Negative**:
68
+ - Generic names: `data`, `temp`, `x`, `result`
69
+ - Abbreviations: `usr`, `calc`, `proc`
70
+ - Deep nesting (> 3 levels)
71
+ - Long functions (> 50 lines) without clear sections
72
+
73
+ ---
74
+
75
+ ## Dimension 2: Structure (0-10)
76
+
77
+ **Definition**: How well is the code organized and modular?
78
+
79
+ ### Scoring Rubric
80
+
81
+ **10 - Exceptional**:
82
+ - Perfect modularity, each module has single responsibility
83
+ - Clear separation of concerns
84
+ - Dependencies are minimal and explicit
85
+ - Code is DRY, zero duplication
86
+ - Logical file and folder structure
87
+
88
+ **8-9 - Excellent**:
89
+ - Good modular design with occasional coupling
90
+ - Most concerns are separated
91
+ - Minimal duplication (< 5%)
92
+ - Clear module boundaries
93
+
94
+ **6-7 - Good**:
95
+ - Reasonable organization with some issues
96
+ - Some tight coupling between modules
97
+ - Moderate duplication (5-15%)
98
+ - Could benefit from better separation
99
+
100
+ **4-5 - Fair**:
101
+ - Poor organization, God objects/functions
102
+ - Significant coupling
103
+ - Noticeable duplication (15-30%)
104
+ - Mixed concerns within modules
105
+
106
+ **2-3 - Poor**:
107
+ - Monolithic structure, everything in few files
108
+ - High coupling, hard to change anything
109
+ - Heavy duplication (30-50%)
110
+ - No clear separation of concerns
111
+
112
+ **0-1 - Critical**:
113
+ - Complete spaghetti code
114
+ - Everything interdependent
115
+ - Massive duplication (> 50%)
116
+ - No discernible structure
117
+
118
+ ### Key Indicators
119
+
120
+ **Positive**:
121
+ - Single Responsibility Principle followed
122
+ - Functions < 30 lines on average
123
+ - Classes < 300 lines
124
+ - Clear dependency direction (no circular deps)
125
+ - Shared code extracted to utilities
126
+
127
+ **Negative**:
128
+ - God classes/functions (> 500 lines)
129
+ - Circular dependencies
130
+ - Code duplication across files
131
+ - Mixed layers (UI + business logic + data access)
132
+
133
+ ---
134
+
135
+ ## Dimension 3: Examples (0-10)
136
+
137
+ **Definition**: Quality and coverage of documentation and examples
138
+
139
+ ### Scoring Rubric
140
+
141
+ **10 - Exceptional**:
142
+ - Comprehensive API documentation
143
+ - Multiple usage examples for all public APIs
144
+ - Edge cases documented
145
+ - Integration examples provided
146
+ - Updated with code changes
147
+
148
+ **8-9 - Excellent**:
149
+ - Good API documentation
150
+ - Examples for most common use cases
151
+ - Some edge case documentation
152
+ - Generally up-to-date
153
+
154
+ **6-7 - Good**:
155
+ - Basic API documentation
156
+ - Examples for main use cases
157
+ - Limited edge case coverage
158
+ - Minor outdated sections
159
+
160
+ **4-5 - Fair**:
161
+ - Sparse documentation
162
+ - Few examples, only happy path
163
+ - No edge case coverage
164
+ - Some outdated information
165
+
166
+ **2-3 - Poor**:
167
+ - Minimal documentation
168
+ - Examples missing or trivial
169
+ - Outdated or incorrect examples
170
+ - No edge case information
171
+
172
+ **0-1 - Critical**:
173
+ - No documentation
174
+ - No examples
175
+ - Code is undiscoverable without reading source
176
+
177
+ ### Key Indicators
178
+
179
+ **Positive**:
180
+ - JSDoc/docstrings for all public APIs
181
+ - README with quickstart examples
182
+ - Code comments for complex logic
183
+ - Integration examples in tests
184
+ - Changelog maintained
185
+
186
+ **Negative**:
187
+ - No API documentation
188
+ - Comments only say what code does (redundant)
189
+ - Outdated examples
190
+ - No usage guidance
191
+ - Missing README
192
+
193
+ ---
194
+
195
+ ## Dimension 4: Trigger Detection (0-10)
196
+
197
+ **Definition**: How well does the code handle edge cases and error conditions?
198
+
199
+ ### Scoring Rubric
200
+
201
+ **10 - Exceptional**:
202
+ - All edge cases identified and handled
203
+ - Comprehensive error handling with recovery
204
+ - Input validation at all boundaries
205
+ - Clear error messages with actionable guidance
206
+ - Graceful degradation
207
+
208
+ **8-9 - Excellent**:
209
+ - Most edge cases handled
210
+ - Good error handling with some recovery
211
+ - Input validation present
212
+ - Helpful error messages
213
+
214
+ **6-7 - Good**:
215
+ - Common edge cases handled
216
+ - Basic error handling (try-catch)
217
+ - Some input validation
218
+ - Generic error messages
219
+
220
+ **4-5 - Fair**:
221
+ - Few edge cases handled
222
+ - Inconsistent error handling
223
+ - Limited input validation
224
+ - Vague error messages
225
+
226
+ **2-3 - Poor**:
227
+ - Edge cases ignored
228
+ - Minimal error handling
229
+ - No input validation
230
+ - Error messages unhelpful or missing
231
+
232
+ **0-1 - Critical**:
233
+ - No edge case handling
234
+ - No error handling (will crash)
235
+ - No validation (accepts anything)
236
+ - Silent failures
237
+
238
+ ### Key Indicators
239
+
240
+ **Positive**:
241
+ - Null/undefined checks
242
+ - Array bounds checking
243
+ - Division by zero checks
244
+ - Try-catch around external calls
245
+ - Input validation with clear error messages
246
+
247
+ **Negative**:
248
+ - Assumes inputs are always valid
249
+ - No null checks
250
+ - Array access without bounds check
251
+ - Uncaught exceptions
252
+ - Silent failures (errors swallowed)
253
+
254
+ ---
255
+
256
+ ## Dimension 5: Best Practices (0-10)
257
+
258
+ **Definition**: Adherence to language-specific and general best practices
259
+
260
+ ### Scoring Rubric
261
+
262
+ **10 - Exceptional**:
263
+ - Follows all language idioms
264
+ - Security best practices applied
265
+ - Performance optimizations where appropriate
266
+ - Proper concurrency/async handling
267
+ - Modern language features used appropriately
268
+
269
+ **8-9 - Excellent**:
270
+ - Follows most best practices
271
+ - Good security awareness
272
+ - Reasonable performance
273
+ - Async handling mostly correct
274
+
275
+ **6-7 - Good**:
276
+ - Follows common practices
277
+ - Some security considerations
278
+ - Acceptable performance
279
+ - Basic async handling
280
+
281
+ **4-5 - Fair**:
282
+ - Mix of good and poor practices
283
+ - Security gaps
284
+ - Performance issues
285
+ - Async patterns problematic
286
+
287
+ **2-3 - Poor**:
288
+ - Ignores best practices
289
+ - Security vulnerabilities
290
+ - Significant performance issues
291
+ - Async handling incorrect
292
+
293
+ **0-1 - Critical**:
294
+ - Anti-patterns everywhere
295
+ - Critical security flaws
296
+ - Unusable performance
297
+ - Fundamentally broken async
298
+
299
+ ### Key Indicators
300
+
301
+ **Positive**:
302
+ - Immutable data structures where appropriate
303
+ - Pure functions (no side effects)
304
+ - Proper async/await usage
305
+ - Security: input sanitization, parameterized queries
306
+ - Resource cleanup (finally blocks, context managers)
307
+
308
+ **Negative**:
309
+ - Mutable state everywhere
310
+ - Global variables
311
+ - Callback hell
312
+ - SQL injection vulnerabilities
313
+ - Resource leaks
314
+
315
+ ---
316
+
317
+ ## Dimension 6: Maintainability (0-10)
318
+
319
+ **Definition**: How easy is the code to modify, test, and extend?
320
+
321
+ ### Scoring Rubric
322
+
323
+ **10 - Exceptional**:
324
+ - Trivial to add features
325
+ - 90%+ test coverage with quality tests
326
+ - Zero technical debt
327
+ - Changes are isolated, no ripple effects
328
+ - Comprehensive test suite runs fast (< 1 min)
329
+
330
+ **8-9 - Excellent**:
331
+ - Easy to add features
332
+ - 70-89% test coverage
333
+ - Minimal technical debt
334
+ - Changes have limited ripple effects
335
+ - Good test suite (< 5 min)
336
+
337
+ **6-7 - Good**:
338
+ - Moderate difficulty to add features
339
+ - 50-69% test coverage
340
+ - Some technical debt
341
+ - Changes may affect multiple areas
342
+ - Adequate test suite (< 15 min)
343
+
344
+ **4-5 - Fair**:
345
+ - Difficult to add features without breaking things
346
+ - 30-49% test coverage
347
+ - Significant technical debt
348
+ - Changes cause widespread issues
349
+ - Slow or unreliable tests
350
+
351
+ **2-3 - Poor**:
352
+ - Very difficult to modify
353
+ - 10-29% test coverage
354
+ - Heavy technical debt
355
+ - Fear of changing anything
356
+ - Tests rarely run or are broken
357
+
358
+ **0-1 - Critical**:
359
+ - Impossible to modify safely
360
+ - < 10% test coverage
361
+ - Overwhelming technical debt
362
+ - Every change breaks something
363
+ - No tests or tests don't work
364
+
365
+ ### Key Indicators
366
+
367
+ **Positive**:
368
+ - High test coverage (unit + integration)
369
+ - Tests are fast and reliable
370
+ - CI/CD pipeline in place
371
+ - Clear interfaces and contracts
372
+ - Easy to mock dependencies
373
+
374
+ **Negative**:
375
+ - Low test coverage
376
+ - Flaky tests
377
+ - No CI/CD
378
+ - Tight coupling makes testing hard
379
+ - Changes require touching many files
380
+
381
+ ---
382
+
383
+ ## Combined Scoring Examples
384
+
385
+ ### Example 1: Excellent Code (Score: 56/60)
386
+
387
+ ```javascript
388
+ /**
389
+ * Calculates the total price with tax and discount applied.
390
+ * @param {number} basePrice - Original price before adjustments
391
+ * @param {number} taxRate - Tax rate as decimal (e.g., 0.08 for 8%)
392
+ * @param {number} discountPercentage - Discount as percentage (e.g., 10 for 10%)
393
+ * @returns {number} Final price with tax and discount
394
+ * @throws {Error} If inputs are invalid
395
+ */
396
+ function calculateFinalPrice(basePrice, taxRate, discountPercentage) {
397
+ // Validate inputs
398
+ if (basePrice < 0 || taxRate < 0 || discountPercentage < 0 || discountPercentage > 100) {
399
+ throw new Error('Invalid input: prices and rates must be non-negative, discount must be 0-100');
400
+ }
401
+
402
+ const discountAmount = basePrice * (discountPercentage / 100);
403
+ const priceAfterDiscount = basePrice - discountAmount;
404
+ const taxAmount = priceAfterDiscount * taxRate;
405
+ const finalPrice = priceAfterDiscount + taxAmount;
406
+
407
+ return parseFloat(finalPrice.toFixed(2));
408
+ }
409
+ ```
410
+
411
+ **Scores**:
412
+ - Clarity: 10 (clear names, logical flow)
413
+ - Structure: 9 (single responsibility, well-organized)
414
+ - Examples: 9 (JSDoc with examples)
415
+ - Trigger Detection: 10 (comprehensive validation)
416
+ - Best Practices: 9 (proper error handling, immutable)
417
+ - Maintainability: 9 (easily testable)
418
+
419
+ **Total**: 56/60 (A)
420
+
421
+ ---
422
+
423
+ ### Example 2: Poor Code (Score: 18/60)
424
+
425
+ ```javascript
426
+ function calc(p, t, d) {
427
+ var x = p - (p * d / 100);
428
+ var y = x + (x * t);
429
+ return y;
430
+ }
431
+ ```
432
+
433
+ **Scores**:
434
+ - Clarity: 2 (cryptic names)
435
+ - Structure: 4 (too simple to be wrong, but not modular)
436
+ - Examples: 0 (no documentation)
437
+ - Trigger Detection: 1 (no validation, will fail on bad input)
438
+ - Best Practices: 3 (uses var, no error handling)
439
+ - Maintainability: 2 (impossible to test without docs)
440
+
441
+ **Total**: 12/60 (F)
442
+
443
+ ---
444
+
445
+ ## Weighting Guidelines
446
+
447
+ Not all dimensions are equally important for all projects:
448
+
449
+ **API Libraries**: Examples (15%), Maintainability (20%), Structure (20%)
450
+ **Backend Services**: Best Practices (20%), Trigger Detection (20%)
451
+ **Frontend UI**: Clarity (20%), Maintainability (15%)
452
+ **Scripts/Tools**: Clarity (15%), Trigger Detection (20%)
453
+
454
+ Adjust focus based on context while maintaining holistic view.