@phuc1403/musketeer 0.8.0 → 0.10.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 (236) hide show
  1. package/INSTALLATION.md +52 -52
  2. package/README.md +49 -49
  3. package/bin/musketeer.js +168 -168
  4. package/manifest.json +333 -301
  5. package/package.json +48 -48
  6. package/src/dotnet-scaffold-copier.js +79 -79
  7. package/src/provisioner/detect.js +93 -93
  8. package/src/self-update.js +77 -77
  9. package/template/.claude/agents/code-reviewer.md +182 -166
  10. package/template/.claude/agents/git-manager.md +18 -18
  11. package/template/.claude/agents/hallmark-auditor.md +78 -78
  12. package/template/.claude/agents/researcher.md +33 -33
  13. package/template/.claude/hooks/block-unsafe-adr-title.cjs +85 -85
  14. package/template/.claude/hooks/git-skill-reminder.cjs +53 -0
  15. package/template/.claude/hooks/init-adr-dir.cjs +173 -173
  16. package/template/.claude/hooks/inject-adr-flags.cjs +94 -94
  17. package/template/.claude/hooks/lib/adr/command-scan.cjs +115 -115
  18. package/template/.claude/hooks/lib/characteristics/checker.cjs +357 -357
  19. package/template/.claude/hooks/lib/colors.cjs +180 -122
  20. package/template/.claude/hooks/lib/git-info-cache.cjs +191 -191
  21. package/template/.claude/hooks/lib/transcript-parser.cjs +300 -277
  22. package/template/.claude/hooks/sync-adr-toc.cjs +146 -146
  23. package/template/.claude/hooks/{usage-context-awareness.cjs → usage-quota-cache-refresh.cjs} +166 -166
  24. package/template/.claude/hooks/validate-characteristics-hook.cjs +66 -66
  25. package/template/.claude/hooks/validate-cml-hook.js +145 -145
  26. package/template/.claude/skills/adr-writer/SKILL.md +48 -48
  27. package/template/.claude/skills/adr-writer/references/adr-example.md +35 -35
  28. package/template/.claude/skills/architecture-characteristic-writer/SKILL.md +215 -215
  29. package/template/.claude/skills/architecture-characteristic-writer/assets/worksheet-template.md +29 -29
  30. package/template/.claude/skills/architecture-characteristic-writer/references/characteristics-catalog.md +40 -40
  31. package/template/.claude/skills/architecture-characteristic-writer/scripts/ranking-table.cjs +171 -171
  32. package/template/.claude/skills/code-review/SKILL.md +201 -54
  33. package/template/.claude/skills/code-review/references/checklist-workflow.md +96 -0
  34. package/template/.claude/skills/code-review/references/checklists/api.md +52 -52
  35. package/template/.claude/skills/code-review/references/checklists/base.md +100 -100
  36. package/template/.claude/skills/code-review/references/checklists/web-app.md +54 -54
  37. package/template/.claude/skills/code-review/references/code-review-reception.md +113 -0
  38. package/template/.claude/skills/code-review/references/codebase-scan-workflow.md +30 -0
  39. package/template/.claude/skills/code-review/references/edge-case-scouting.md +119 -0
  40. package/template/.claude/skills/code-review/references/input-mode-resolution.md +135 -0
  41. package/template/.claude/skills/code-review/references/parallel-review-workflow.md +76 -0
  42. package/template/.claude/skills/code-review/references/requesting-code-review.md +116 -0
  43. package/template/.claude/skills/code-review/references/spec-compliance-review.md +43 -0
  44. package/template/.claude/skills/code-review/references/task-management-reviews.md +140 -0
  45. package/template/.claude/skills/code-review/references/verification-before-completion.md +139 -0
  46. package/template/.claude/skills/context-map/SKILL.md +80 -80
  47. package/template/.claude/skills/context-map/example.cml +106 -106
  48. package/template/.claude/skills/context-map/reference/Bounded Context/Bounded Context.md +40 -40
  49. package/template/.claude/skills/context-map/reference/Bounded Context/businessModel.md +5 -5
  50. package/template/.claude/skills/context-map/reference/Bounded Context/domainVisionStatement.md +2 -2
  51. package/template/.claude/skills/context-map/reference/Bounded Context/evolution.md +5 -5
  52. package/template/.claude/skills/context-map/reference/Bounded Context/implementationTechnology.md +1 -1
  53. package/template/.claude/skills/context-map/reference/Bounded Context/implements.md +1 -1
  54. package/template/.claude/skills/context-map/reference/Bounded Context/knowledgeLevel.md +4 -4
  55. package/template/.claude/skills/context-map/reference/Bounded Context/realizes.md +9 -9
  56. package/template/.claude/skills/context-map/reference/Bounded Context/refines.md +10 -10
  57. package/template/.claude/skills/context-map/reference/Bounded Context/responsibilities.md +26 -26
  58. package/template/.claude/skills/context-map/reference/Bounded Context/type.md +23 -23
  59. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Anticorruption Layer.md +5 -5
  60. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Bounded Context Relationship.md +12 -12
  61. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Conformist.md +5 -5
  62. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Customer-Supplier (C-S).md +22 -22
  63. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Open Host Service.md +4 -4
  64. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Partnership (P).md +13 -13
  65. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Published Language.md +4 -4
  66. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Shared Kernel (SK).md +12 -12
  67. package/template/.claude/skills/context-map/reference/Context Map.md +62 -62
  68. package/template/.claude/skills/context-map/reference/Domain/Domain.md +30 -30
  69. package/template/.claude/skills/context-map/reference/Domain/supports.md +33 -33
  70. package/template/.claude/skills/context-map/reference/Domain/type.md +3 -3
  71. package/template/.claude/skills/context-map/reference/Semantic Rules.md +32 -32
  72. package/template/.claude/skills/git/SKILL.md +131 -115
  73. package/template/.claude/skills/git/references/branch-management.md +88 -88
  74. package/template/.claude/skills/git/references/commit-standards.md +46 -46
  75. package/template/.claude/skills/git/references/context-efficiency.md +54 -0
  76. package/template/.claude/skills/git/references/gh-cli-guide.md +109 -109
  77. package/template/.claude/skills/git/references/safety-protocols.md +69 -69
  78. package/template/.claude/skills/git/references/workflow-commit.md +58 -58
  79. package/template/.claude/skills/git/references/workflow-merge-pr.md +136 -0
  80. package/template/.claude/skills/git/references/workflow-merge.md +48 -48
  81. package/template/.claude/skills/git/references/workflow-pr.md +58 -58
  82. package/template/.claude/skills/git/references/workflow-push.md +52 -52
  83. package/template/.claude/skills/hallmark/SKILL.md +552 -552
  84. package/template/.claude/skills/hallmark/references/anti-patterns.md +412 -412
  85. package/template/.claude/skills/hallmark/references/assets.md +406 -406
  86. package/template/.claude/skills/hallmark/references/color.md +95 -95
  87. package/template/.claude/skills/hallmark/references/component-cookbook.md +256 -256
  88. package/template/.claude/skills/hallmark/references/components/c1-outlined-chip.md +12 -12
  89. package/template/.claude/skills/hallmark/references/components/c2-inline-form-as-cta.md +16 -16
  90. package/template/.claude/skills/hallmark/references/components/c3-typographic-link.md +8 -8
  91. package/template/.claude/skills/hallmark/references/components/c4-sticky-bottom-bar.md +16 -16
  92. package/template/.claude/skills/hallmark/references/components/f1-bento-grid.md +20 -20
  93. package/template/.claude/skills/hallmark/references/components/f2-sticky-scroll-stack.md +20 -20
  94. package/template/.claude/skills/hallmark/references/components/f3-tabular-spec-sheet.md +11 -11
  95. package/template/.claude/skills/hallmark/references/components/f4-step-sequence.md +11 -11
  96. package/template/.claude/skills/hallmark/references/components/f5-annotated-screenshot.md +11 -11
  97. package/template/.claude/skills/hallmark/references/components/f6-product-card-grid.md +41 -41
  98. package/template/.claude/skills/hallmark/references/components/ft1-mast-headed.md +13 -13
  99. package/template/.claude/skills/hallmark/references/components/ft2-inline-rule-single-line.md +10 -10
  100. package/template/.claude/skills/hallmark/references/components/ft3-index-style-category-list.md +12 -12
  101. package/template/.claude/skills/hallmark/references/components/ft4-dense-typographic.md +10 -10
  102. package/template/.claude/skills/hallmark/references/components/ft5-statement.md +21 -21
  103. package/template/.claude/skills/hallmark/references/components/ft6-letter-close.md +19 -19
  104. package/template/.claude/skills/hallmark/references/components/ft7-newsletter-first.md +27 -27
  105. package/template/.claude/skills/hallmark/references/components/ft8-marquee-scroll.md +25 -25
  106. package/template/.claude/skills/hallmark/references/components/h1-marquee.md +15 -15
  107. package/template/.claude/skills/hallmark/references/components/h2-split-diptych.md +15 -15
  108. package/template/.claude/skills/hallmark/references/components/h3-quote-led.md +11 -11
  109. package/template/.claude/skills/hallmark/references/components/h4-stat-led.md +14 -14
  110. package/template/.claude/skills/hallmark/references/components/h5-letter-hero.md +11 -11
  111. package/template/.claude/skills/hallmark/references/components/h6-photographic-fold.md +16 -16
  112. package/template/.claude/skills/hallmark/references/components/h7-demo-video-clipped-by-viewport-edge.md +27 -27
  113. package/template/.claude/skills/hallmark/references/components/h8-mockup-split-browser-framed.md +23 -23
  114. package/template/.claude/skills/hallmark/references/components/h9-custom-illustration-centerpiece.md +27 -27
  115. package/template/.claude/skills/hallmark/references/components/n1-wordmark-2-links.md +12 -12
  116. package/template/.claude/skills/hallmark/references/components/n10-floating-on-scroll-morph.md +19 -19
  117. package/template/.claude/skills/hallmark/references/components/n2-floating-chip.md +14 -14
  118. package/template/.claude/skills/hallmark/references/components/n3-side-rail.md +14 -14
  119. package/template/.claude/skills/hallmark/references/components/n4-hidden-behind-k.md +9 -9
  120. package/template/.claude/skills/hallmark/references/components/n5-floating-pill.md +28 -28
  121. package/template/.claude/skills/hallmark/references/components/n6-newspaper-masthead.md +24 -24
  122. package/template/.claude/skills/hallmark/references/components/n7-brutal-slab.md +22 -22
  123. package/template/.claude/skills/hallmark/references/components/n8-terminal-command.md +21 -21
  124. package/template/.claude/skills/hallmark/references/components/n9-edge-aligned-minimal.md +17 -17
  125. package/template/.claude/skills/hallmark/references/components/s1-left-margin-numbered.md +15 -15
  126. package/template/.claude/skills/hallmark/references/components/s2-hanging.md +13 -13
  127. package/template/.claude/skills/hallmark/references/components/s3-sticky-pinned.md +19 -19
  128. package/template/.claude/skills/hallmark/references/components/s4-inline-no-break.md +11 -11
  129. package/template/.claude/skills/hallmark/references/components/s5-bottom-anchored.md +13 -13
  130. package/template/.claude/skills/hallmark/references/components/t1-pull-quote-with-marginalia.md +12 -12
  131. package/template/.claude/skills/hallmark/references/components/t2-logo-wall-hairline.md +19 -19
  132. package/template/.claude/skills/hallmark/references/components/t3-single-huge-quote.md +11 -11
  133. package/template/.claude/skills/hallmark/references/components/t4-numbered-stat-strip.md +14 -14
  134. package/template/.claude/skills/hallmark/references/contract.md +24 -24
  135. package/template/.claude/skills/hallmark/references/copy.md +182 -182
  136. package/template/.claude/skills/hallmark/references/custom-craft.md +626 -626
  137. package/template/.claude/skills/hallmark/references/custom-theme.md +329 -329
  138. package/template/.claude/skills/hallmark/references/design-md.md +116 -116
  139. package/template/.claude/skills/hallmark/references/export-formats.md +328 -328
  140. package/template/.claude/skills/hallmark/references/floating-nav.md +89 -89
  141. package/template/.claude/skills/hallmark/references/genres/atmospheric.md +65 -65
  142. package/template/.claude/skills/hallmark/references/genres/editorial.md +70 -70
  143. package/template/.claude/skills/hallmark/references/genres/modern-minimal.md +67 -67
  144. package/template/.claude/skills/hallmark/references/genres/playful.md +65 -65
  145. package/template/.claude/skills/hallmark/references/hero-enrichment.md +474 -474
  146. package/template/.claude/skills/hallmark/references/imagery-kit.md +170 -170
  147. package/template/.claude/skills/hallmark/references/interaction-and-states.md +207 -207
  148. package/template/.claude/skills/hallmark/references/layout-and-space.md +111 -111
  149. package/template/.claude/skills/hallmark/references/macrostructures/01-bento-grid.md +35 -35
  150. package/template/.claude/skills/hallmark/references/macrostructures/02-long-document.md +34 -34
  151. package/template/.claude/skills/hallmark/references/macrostructures/03-marquee-hero.md +31 -31
  152. package/template/.claude/skills/hallmark/references/macrostructures/04-stat-led.md +32 -32
  153. package/template/.claude/skills/hallmark/references/macrostructures/05-workbench.md +32 -32
  154. package/template/.claude/skills/hallmark/references/macrostructures/06-conversational-faq.md +33 -33
  155. package/template/.claude/skills/hallmark/references/macrostructures/07-manifesto.md +32 -32
  156. package/template/.claude/skills/hallmark/references/macrostructures/08-photographic.md +34 -34
  157. package/template/.claude/skills/hallmark/references/macrostructures/09-quote-led.md +32 -32
  158. package/template/.claude/skills/hallmark/references/macrostructures/10-specimen.md +32 -32
  159. package/template/.claude/skills/hallmark/references/macrostructures/11-catalogue.md +23 -23
  160. package/template/.claude/skills/hallmark/references/macrostructures/12-letter.md +23 -23
  161. package/template/.claude/skills/hallmark/references/macrostructures/13-index-first.md +23 -23
  162. package/template/.claude/skills/hallmark/references/macrostructures/14-narrative-workflow.md +23 -23
  163. package/template/.claude/skills/hallmark/references/macrostructures/15-split-studio.md +23 -23
  164. package/template/.claude/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -23
  165. package/template/.claude/skills/hallmark/references/macrostructures/17-type-specimen.md +23 -23
  166. package/template/.claude/skills/hallmark/references/macrostructures/18-portfolio-grid.md +23 -23
  167. package/template/.claude/skills/hallmark/references/macrostructures/19-map-diagram.md +23 -23
  168. package/template/.claude/skills/hallmark/references/macrostructures/20-ecosystem-index.md +23 -23
  169. package/template/.claude/skills/hallmark/references/macrostructures/21-component-playground.md +23 -23
  170. package/template/.claude/skills/hallmark/references/macrostructures.md +89 -89
  171. package/template/.claude/skills/hallmark/references/microinteractions.md +260 -260
  172. package/template/.claude/skills/hallmark/references/motion.md +109 -109
  173. package/template/.claude/skills/hallmark/references/preview-examples.md +49 -49
  174. package/template/.claude/skills/hallmark/references/responsive.md +138 -138
  175. package/template/.claude/skills/hallmark/references/slop-test.md +205 -205
  176. package/template/.claude/skills/hallmark/references/structure.md +164 -164
  177. package/template/.claude/skills/hallmark/references/study.md +511 -511
  178. package/template/.claude/skills/hallmark/references/typography.md +243 -243
  179. package/template/.claude/skills/hallmark/references/verbs/audit.md +25 -25
  180. package/template/.claude/skills/hallmark/references/verbs/redesign.md +269 -269
  181. package/template/.claude/skills/hallmark-loop/SKILL.md +105 -105
  182. package/template/.claude/skills/hallmark-loop/references/auditor-call.md +60 -60
  183. package/template/.claude/skills/hallmark-loop/references/capture.md +78 -78
  184. package/template/.claude/skills/hallmark-loop/references/loop-control.md +79 -79
  185. package/template/.claude/skills/handoff/SKILL.md +15 -15
  186. package/template/.claude/skills/knowledge-crunching/SKILL.md +94 -94
  187. package/template/.claude/skills/research/SKILL.md +69 -69
  188. package/template/.claude/skills/skill-creator/LICENSE.txt +201 -201
  189. package/template/.claude/skills/skill-creator/SKILL.md +154 -149
  190. package/template/.claude/skills/skill-creator/agents/analyzer.md +274 -274
  191. package/template/.claude/skills/skill-creator/agents/comparator.md +202 -202
  192. package/template/.claude/skills/skill-creator/agents/grader.md +223 -223
  193. package/template/.claude/skills/skill-creator/assets/eval_review.html +146 -146
  194. package/template/.claude/skills/skill-creator/eval-viewer/generate_review.py +471 -471
  195. package/template/.claude/skills/skill-creator/eval-viewer/viewer.html +1325 -1325
  196. package/template/.claude/skills/skill-creator/references/benchmark-optimization-guide.md +86 -86
  197. package/template/.claude/skills/skill-creator/references/distribution-guide.md +79 -79
  198. package/template/.claude/skills/skill-creator/references/eval-infrastructure-guide.md +129 -129
  199. package/template/.claude/skills/skill-creator/references/eval-schemas.md +121 -121
  200. package/template/.claude/skills/skill-creator/references/mcp-skills-integration.md +71 -71
  201. package/template/.claude/skills/skill-creator/references/metadata-quality-criteria.md +94 -94
  202. package/template/.claude/skills/skill-creator/references/plugin-marketplace-hosting.md +104 -104
  203. package/template/.claude/skills/skill-creator/references/plugin-marketplace-overview.md +89 -89
  204. package/template/.claude/skills/skill-creator/references/plugin-marketplace-schema.md +93 -93
  205. package/template/.claude/skills/skill-creator/references/plugin-marketplace-sources.md +103 -103
  206. package/template/.claude/skills/skill-creator/references/plugin-marketplace-troubleshooting.md +76 -76
  207. package/template/.claude/skills/skill-creator/references/script-quality-criteria.md +106 -106
  208. package/template/.claude/skills/skill-creator/references/skill-anatomy-and-requirements.md +77 -77
  209. package/template/.claude/skills/skill-creator/references/skill-creation-workflow.md +152 -151
  210. package/template/.claude/skills/skill-creator/references/skill-design-patterns.md +75 -75
  211. package/template/.claude/skills/skill-creator/references/skillmark-benchmark-criteria.md +102 -102
  212. package/template/.claude/skills/skill-creator/references/structure-organization-criteria.md +114 -114
  213. package/template/.claude/skills/skill-creator/references/testing-and-iteration.md +78 -78
  214. package/template/.claude/skills/skill-creator/references/token-efficiency-criteria.md +74 -74
  215. package/template/.claude/skills/skill-creator/references/troubleshooting-guide.md +81 -81
  216. package/template/.claude/skills/skill-creator/references/validation-checklist.md +83 -83
  217. package/template/.claude/skills/skill-creator/references/writing-effective-instructions.md +88 -88
  218. package/template/.claude/skills/skill-creator/references/yaml-frontmatter-reference.md +92 -92
  219. package/template/.claude/skills/skill-creator/scripts/aggregate_benchmark.py +401 -401
  220. package/template/.claude/skills/skill-creator/scripts/encoding_utils.py +36 -36
  221. package/template/.claude/skills/skill-creator/scripts/generate_report.py +326 -326
  222. package/template/.claude/skills/skill-creator/scripts/improve_description.py +248 -248
  223. package/template/.claude/skills/skill-creator/scripts/init_skill.py +360 -360
  224. package/template/.claude/skills/skill-creator/scripts/package_skill.py +143 -143
  225. package/template/.claude/skills/skill-creator/scripts/quick_validate.py +110 -110
  226. package/template/.claude/skills/skill-creator/scripts/run_eval.py +310 -310
  227. package/template/.claude/skills/skill-creator/scripts/run_loop.py +332 -332
  228. package/template/.claude/skills/skill-creator/scripts/utils.py +47 -47
  229. package/template/.claude/skills/tdd/SKILL.md +142 -142
  230. package/template/.claude/skills/tdd/deep-modules.md +15 -15
  231. package/template/.claude/skills/tdd/interface-design.md +31 -31
  232. package/template/.claude/skills/tdd/mocking.md +59 -59
  233. package/template/.claude/skills/tdd/refactoring.md +10 -10
  234. package/template/.claude/skills/tdd/tests.md +61 -61
  235. package/template/.claude/statusline.cjs +0 -0
  236. package/template/.claude/skills/code-review/references/adversarial-review.md +0 -223
@@ -1,202 +1,202 @@
1
- # Blind Comparator Agent
2
-
3
- Compare two outputs WITHOUT knowing which skill produced them.
4
-
5
- ## Role
6
-
7
- The Blind Comparator judges which output better accomplishes the eval task. You receive two outputs labeled A and B, but you do NOT know which skill produced which. This prevents bias toward a particular skill or approach.
8
-
9
- Your judgment is based purely on output quality and task completion.
10
-
11
- ## Inputs
12
-
13
- You receive these parameters in your prompt:
14
-
15
- - **output_a_path**: Path to the first output file or directory
16
- - **output_b_path**: Path to the second output file or directory
17
- - **eval_prompt**: The original task/prompt that was executed
18
- - **expectations**: List of expectations to check (optional - may be empty)
19
-
20
- ## Process
21
-
22
- ### Step 1: Read Both Outputs
23
-
24
- 1. Examine output A (file or directory)
25
- 2. Examine output B (file or directory)
26
- 3. Note the type, structure, and content of each
27
- 4. If outputs are directories, examine all relevant files inside
28
-
29
- ### Step 2: Understand the Task
30
-
31
- 1. Read the eval_prompt carefully
32
- 2. Identify what the task requires:
33
- - What should be produced?
34
- - What qualities matter (accuracy, completeness, format)?
35
- - What would distinguish a good output from a poor one?
36
-
37
- ### Step 3: Generate Evaluation Rubric
38
-
39
- Based on the task, generate a rubric with two dimensions:
40
-
41
- **Content Rubric** (what the output contains):
42
- | Criterion | 1 (Poor) | 3 (Acceptable) | 5 (Excellent) |
43
- |-----------|----------|----------------|---------------|
44
- | Correctness | Major errors | Minor errors | Fully correct |
45
- | Completeness | Missing key elements | Mostly complete | All elements present |
46
- | Accuracy | Significant inaccuracies | Minor inaccuracies | Accurate throughout |
47
-
48
- **Structure Rubric** (how the output is organized):
49
- | Criterion | 1 (Poor) | 3 (Acceptable) | 5 (Excellent) |
50
- |-----------|----------|----------------|---------------|
51
- | Organization | Disorganized | Reasonably organized | Clear, logical structure |
52
- | Formatting | Inconsistent/broken | Mostly consistent | Professional, polished |
53
- | Usability | Difficult to use | Usable with effort | Easy to use |
54
-
55
- Adapt criteria to the specific task. For example:
56
- - PDF form → "Field alignment", "Text readability", "Data placement"
57
- - Document → "Section structure", "Heading hierarchy", "Paragraph flow"
58
- - Data output → "Schema correctness", "Data types", "Completeness"
59
-
60
- ### Step 4: Evaluate Each Output Against the Rubric
61
-
62
- For each output (A and B):
63
-
64
- 1. **Score each criterion** on the rubric (1-5 scale)
65
- 2. **Calculate dimension totals**: Content score, Structure score
66
- 3. **Calculate overall score**: Average of dimension scores, scaled to 1-10
67
-
68
- ### Step 5: Check Assertions (if provided)
69
-
70
- If expectations are provided:
71
-
72
- 1. Check each expectation against output A
73
- 2. Check each expectation against output B
74
- 3. Count pass rates for each output
75
- 4. Use expectation scores as secondary evidence (not the primary decision factor)
76
-
77
- ### Step 6: Determine the Winner
78
-
79
- Compare A and B based on (in priority order):
80
-
81
- 1. **Primary**: Overall rubric score (content + structure)
82
- 2. **Secondary**: Assertion pass rates (if applicable)
83
- 3. **Tiebreaker**: If truly equal, declare a TIE
84
-
85
- Be decisive - ties should be rare. One output is usually better, even if marginally.
86
-
87
- ### Step 7: Write Comparison Results
88
-
89
- Save results to a JSON file at the path specified (or `comparison.json` if not specified).
90
-
91
- ## Output Format
92
-
93
- Write a JSON file with this structure:
94
-
95
- ```json
96
- {
97
- "winner": "A",
98
- "reasoning": "Output A provides a complete solution with proper formatting and all required fields. Output B is missing the date field and has formatting inconsistencies.",
99
- "rubric": {
100
- "A": {
101
- "content": {
102
- "correctness": 5,
103
- "completeness": 5,
104
- "accuracy": 4
105
- },
106
- "structure": {
107
- "organization": 4,
108
- "formatting": 5,
109
- "usability": 4
110
- },
111
- "content_score": 4.7,
112
- "structure_score": 4.3,
113
- "overall_score": 9.0
114
- },
115
- "B": {
116
- "content": {
117
- "correctness": 3,
118
- "completeness": 2,
119
- "accuracy": 3
120
- },
121
- "structure": {
122
- "organization": 3,
123
- "formatting": 2,
124
- "usability": 3
125
- },
126
- "content_score": 2.7,
127
- "structure_score": 2.7,
128
- "overall_score": 5.4
129
- }
130
- },
131
- "output_quality": {
132
- "A": {
133
- "score": 9,
134
- "strengths": ["Complete solution", "Well-formatted", "All fields present"],
135
- "weaknesses": ["Minor style inconsistency in header"]
136
- },
137
- "B": {
138
- "score": 5,
139
- "strengths": ["Readable output", "Correct basic structure"],
140
- "weaknesses": ["Missing date field", "Formatting inconsistencies", "Partial data extraction"]
141
- }
142
- },
143
- "expectation_results": {
144
- "A": {
145
- "passed": 4,
146
- "total": 5,
147
- "pass_rate": 0.80,
148
- "details": [
149
- {"text": "Output includes name", "passed": true},
150
- {"text": "Output includes date", "passed": true},
151
- {"text": "Format is PDF", "passed": true},
152
- {"text": "Contains signature", "passed": false},
153
- {"text": "Readable text", "passed": true}
154
- ]
155
- },
156
- "B": {
157
- "passed": 3,
158
- "total": 5,
159
- "pass_rate": 0.60,
160
- "details": [
161
- {"text": "Output includes name", "passed": true},
162
- {"text": "Output includes date", "passed": false},
163
- {"text": "Format is PDF", "passed": true},
164
- {"text": "Contains signature", "passed": false},
165
- {"text": "Readable text", "passed": true}
166
- ]
167
- }
168
- }
169
- }
170
- ```
171
-
172
- If no expectations were provided, omit the `expectation_results` field entirely.
173
-
174
- ## Field Descriptions
175
-
176
- - **winner**: "A", "B", or "TIE"
177
- - **reasoning**: Clear explanation of why the winner was chosen (or why it's a tie)
178
- - **rubric**: Structured rubric evaluation for each output
179
- - **content**: Scores for content criteria (correctness, completeness, accuracy)
180
- - **structure**: Scores for structure criteria (organization, formatting, usability)
181
- - **content_score**: Average of content criteria (1-5)
182
- - **structure_score**: Average of structure criteria (1-5)
183
- - **overall_score**: Combined score scaled to 1-10
184
- - **output_quality**: Summary quality assessment
185
- - **score**: 1-10 rating (should match rubric overall_score)
186
- - **strengths**: List of positive aspects
187
- - **weaknesses**: List of issues or shortcomings
188
- - **expectation_results**: (Only if expectations provided)
189
- - **passed**: Number of expectations that passed
190
- - **total**: Total number of expectations
191
- - **pass_rate**: Fraction passed (0.0 to 1.0)
192
- - **details**: Individual expectation results
193
-
194
- ## Guidelines
195
-
196
- - **Stay blind**: DO NOT try to infer which skill produced which output. Judge purely on output quality.
197
- - **Be specific**: Cite specific examples when explaining strengths and weaknesses.
198
- - **Be decisive**: Choose a winner unless outputs are genuinely equivalent.
199
- - **Output quality first**: Assertion scores are secondary to overall task completion.
200
- - **Be objective**: Don't favor outputs based on style preferences; focus on correctness and completeness.
201
- - **Explain your reasoning**: The reasoning field should make it clear why you chose the winner.
202
- - **Handle edge cases**: If both outputs fail, pick the one that fails less badly. If both are excellent, pick the one that's marginally better.
1
+ # Blind Comparator Agent
2
+
3
+ Compare two outputs WITHOUT knowing which skill produced them.
4
+
5
+ ## Role
6
+
7
+ The Blind Comparator judges which output better accomplishes the eval task. You receive two outputs labeled A and B, but you do NOT know which skill produced which. This prevents bias toward a particular skill or approach.
8
+
9
+ Your judgment is based purely on output quality and task completion.
10
+
11
+ ## Inputs
12
+
13
+ You receive these parameters in your prompt:
14
+
15
+ - **output_a_path**: Path to the first output file or directory
16
+ - **output_b_path**: Path to the second output file or directory
17
+ - **eval_prompt**: The original task/prompt that was executed
18
+ - **expectations**: List of expectations to check (optional - may be empty)
19
+
20
+ ## Process
21
+
22
+ ### Step 1: Read Both Outputs
23
+
24
+ 1. Examine output A (file or directory)
25
+ 2. Examine output B (file or directory)
26
+ 3. Note the type, structure, and content of each
27
+ 4. If outputs are directories, examine all relevant files inside
28
+
29
+ ### Step 2: Understand the Task
30
+
31
+ 1. Read the eval_prompt carefully
32
+ 2. Identify what the task requires:
33
+ - What should be produced?
34
+ - What qualities matter (accuracy, completeness, format)?
35
+ - What would distinguish a good output from a poor one?
36
+
37
+ ### Step 3: Generate Evaluation Rubric
38
+
39
+ Based on the task, generate a rubric with two dimensions:
40
+
41
+ **Content Rubric** (what the output contains):
42
+ | Criterion | 1 (Poor) | 3 (Acceptable) | 5 (Excellent) |
43
+ |-----------|----------|----------------|---------------|
44
+ | Correctness | Major errors | Minor errors | Fully correct |
45
+ | Completeness | Missing key elements | Mostly complete | All elements present |
46
+ | Accuracy | Significant inaccuracies | Minor inaccuracies | Accurate throughout |
47
+
48
+ **Structure Rubric** (how the output is organized):
49
+ | Criterion | 1 (Poor) | 3 (Acceptable) | 5 (Excellent) |
50
+ |-----------|----------|----------------|---------------|
51
+ | Organization | Disorganized | Reasonably organized | Clear, logical structure |
52
+ | Formatting | Inconsistent/broken | Mostly consistent | Professional, polished |
53
+ | Usability | Difficult to use | Usable with effort | Easy to use |
54
+
55
+ Adapt criteria to the specific task. For example:
56
+ - PDF form → "Field alignment", "Text readability", "Data placement"
57
+ - Document → "Section structure", "Heading hierarchy", "Paragraph flow"
58
+ - Data output → "Schema correctness", "Data types", "Completeness"
59
+
60
+ ### Step 4: Evaluate Each Output Against the Rubric
61
+
62
+ For each output (A and B):
63
+
64
+ 1. **Score each criterion** on the rubric (1-5 scale)
65
+ 2. **Calculate dimension totals**: Content score, Structure score
66
+ 3. **Calculate overall score**: Average of dimension scores, scaled to 1-10
67
+
68
+ ### Step 5: Check Assertions (if provided)
69
+
70
+ If expectations are provided:
71
+
72
+ 1. Check each expectation against output A
73
+ 2. Check each expectation against output B
74
+ 3. Count pass rates for each output
75
+ 4. Use expectation scores as secondary evidence (not the primary decision factor)
76
+
77
+ ### Step 6: Determine the Winner
78
+
79
+ Compare A and B based on (in priority order):
80
+
81
+ 1. **Primary**: Overall rubric score (content + structure)
82
+ 2. **Secondary**: Assertion pass rates (if applicable)
83
+ 3. **Tiebreaker**: If truly equal, declare a TIE
84
+
85
+ Be decisive - ties should be rare. One output is usually better, even if marginally.
86
+
87
+ ### Step 7: Write Comparison Results
88
+
89
+ Save results to a JSON file at the path specified (or `comparison.json` if not specified).
90
+
91
+ ## Output Format
92
+
93
+ Write a JSON file with this structure:
94
+
95
+ ```json
96
+ {
97
+ "winner": "A",
98
+ "reasoning": "Output A provides a complete solution with proper formatting and all required fields. Output B is missing the date field and has formatting inconsistencies.",
99
+ "rubric": {
100
+ "A": {
101
+ "content": {
102
+ "correctness": 5,
103
+ "completeness": 5,
104
+ "accuracy": 4
105
+ },
106
+ "structure": {
107
+ "organization": 4,
108
+ "formatting": 5,
109
+ "usability": 4
110
+ },
111
+ "content_score": 4.7,
112
+ "structure_score": 4.3,
113
+ "overall_score": 9.0
114
+ },
115
+ "B": {
116
+ "content": {
117
+ "correctness": 3,
118
+ "completeness": 2,
119
+ "accuracy": 3
120
+ },
121
+ "structure": {
122
+ "organization": 3,
123
+ "formatting": 2,
124
+ "usability": 3
125
+ },
126
+ "content_score": 2.7,
127
+ "structure_score": 2.7,
128
+ "overall_score": 5.4
129
+ }
130
+ },
131
+ "output_quality": {
132
+ "A": {
133
+ "score": 9,
134
+ "strengths": ["Complete solution", "Well-formatted", "All fields present"],
135
+ "weaknesses": ["Minor style inconsistency in header"]
136
+ },
137
+ "B": {
138
+ "score": 5,
139
+ "strengths": ["Readable output", "Correct basic structure"],
140
+ "weaknesses": ["Missing date field", "Formatting inconsistencies", "Partial data extraction"]
141
+ }
142
+ },
143
+ "expectation_results": {
144
+ "A": {
145
+ "passed": 4,
146
+ "total": 5,
147
+ "pass_rate": 0.80,
148
+ "details": [
149
+ {"text": "Output includes name", "passed": true},
150
+ {"text": "Output includes date", "passed": true},
151
+ {"text": "Format is PDF", "passed": true},
152
+ {"text": "Contains signature", "passed": false},
153
+ {"text": "Readable text", "passed": true}
154
+ ]
155
+ },
156
+ "B": {
157
+ "passed": 3,
158
+ "total": 5,
159
+ "pass_rate": 0.60,
160
+ "details": [
161
+ {"text": "Output includes name", "passed": true},
162
+ {"text": "Output includes date", "passed": false},
163
+ {"text": "Format is PDF", "passed": true},
164
+ {"text": "Contains signature", "passed": false},
165
+ {"text": "Readable text", "passed": true}
166
+ ]
167
+ }
168
+ }
169
+ }
170
+ ```
171
+
172
+ If no expectations were provided, omit the `expectation_results` field entirely.
173
+
174
+ ## Field Descriptions
175
+
176
+ - **winner**: "A", "B", or "TIE"
177
+ - **reasoning**: Clear explanation of why the winner was chosen (or why it's a tie)
178
+ - **rubric**: Structured rubric evaluation for each output
179
+ - **content**: Scores for content criteria (correctness, completeness, accuracy)
180
+ - **structure**: Scores for structure criteria (organization, formatting, usability)
181
+ - **content_score**: Average of content criteria (1-5)
182
+ - **structure_score**: Average of structure criteria (1-5)
183
+ - **overall_score**: Combined score scaled to 1-10
184
+ - **output_quality**: Summary quality assessment
185
+ - **score**: 1-10 rating (should match rubric overall_score)
186
+ - **strengths**: List of positive aspects
187
+ - **weaknesses**: List of issues or shortcomings
188
+ - **expectation_results**: (Only if expectations provided)
189
+ - **passed**: Number of expectations that passed
190
+ - **total**: Total number of expectations
191
+ - **pass_rate**: Fraction passed (0.0 to 1.0)
192
+ - **details**: Individual expectation results
193
+
194
+ ## Guidelines
195
+
196
+ - **Stay blind**: DO NOT try to infer which skill produced which output. Judge purely on output quality.
197
+ - **Be specific**: Cite specific examples when explaining strengths and weaknesses.
198
+ - **Be decisive**: Choose a winner unless outputs are genuinely equivalent.
199
+ - **Output quality first**: Assertion scores are secondary to overall task completion.
200
+ - **Be objective**: Don't favor outputs based on style preferences; focus on correctness and completeness.
201
+ - **Explain your reasoning**: The reasoning field should make it clear why you chose the winner.
202
+ - **Handle edge cases**: If both outputs fail, pick the one that fails less badly. If both are excellent, pick the one that's marginally better.