macca-method 2.1.1 → 2.1.2

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 (60) hide show
  1. package/.agents/macca-lock.json +1 -1
  2. package/.agents/skills/_shared/references/brainstorm-session.md +5 -5
  3. package/.agents/skills/_shared/references/invocation-policy.md +20 -20
  4. package/.agents/skills/_shared/references/output-ownership.md +11 -11
  5. package/.agents/skills/_shared/references/scope-rules.md +1 -1
  6. package/.agents/skills/_shared/references/skill-catalog.md +20 -20
  7. package/.agents/skills/_shared/scripts/validate-skills.py +37 -15
  8. package/.agents/skills/add-feature/SKILL.md +9 -3
  9. package/.agents/skills/antislop-copywriting/SKILL.md +372 -0
  10. package/.agents/skills/brainstorm-api/SKILL.md +28 -16
  11. package/.agents/skills/brainstorm-api/assets/api.template.md +35 -15
  12. package/.agents/skills/brainstorm-architecture/SKILL.md +35 -15
  13. package/.agents/skills/brainstorm-architecture/assets/architecture.template.md +44 -25
  14. package/.agents/skills/brainstorm-prd/SKILL.md +47 -17
  15. package/.agents/skills/brainstorm-prd/assets/PRD.template.md +47 -23
  16. package/.agents/skills/brainstorm-rules/SKILL.md +36 -19
  17. package/.agents/skills/brainstorm-rules/assets/rules.template.md +32 -18
  18. package/.agents/skills/brainstorm-schema/SKILL.md +18 -8
  19. package/.agents/skills/brainstorm-schema/assets/schema.template.md +25 -10
  20. package/.agents/skills/brainstorm-styleguide/SKILL.md +37 -19
  21. package/.agents/skills/brainstorm-styleguide/assets/StyleGuide.template.md +78 -60
  22. package/.agents/skills/brainstorm-task/SKILL.md +27 -14
  23. package/.agents/skills/brainstorm-task/assets/Task.template.md +29 -18
  24. package/.agents/skills/bug-fix/SKILL.md +25 -1
  25. package/.agents/skills/code-review/SKILL.md +7 -7
  26. package/.agents/skills/code-review/references/review-checklist.md +21 -10
  27. package/.agents/skills/developer/SKILL.md +8 -0
  28. package/.agents/skills/developer/references/execute-task.md +13 -7
  29. package/.agents/skills/help/SKILL.md +32 -20
  30. package/.agents/skills/meet/SKILL.md +9 -4
  31. package/.agents/skills/quick-dev/SKILL.md +27 -22
  32. package/.agents/skills/release-readiness/SKILL.md +17 -13
  33. package/.agents/skills/skill-creator/LICENSE.txt +202 -0
  34. package/.agents/skills/skill-creator/SKILL.md +485 -0
  35. package/.agents/skills/skill-creator/agents/analyzer.md +274 -0
  36. package/.agents/skills/skill-creator/agents/comparator.md +202 -0
  37. package/.agents/skills/skill-creator/agents/grader.md +223 -0
  38. package/.agents/skills/skill-creator/assets/eval_review.html +146 -0
  39. package/.agents/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  40. package/.agents/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  41. package/.agents/skills/skill-creator/references/schemas.md +441 -0
  42. package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  43. package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  44. package/.agents/skills/skill-creator/scripts/generate_report.py +326 -0
  45. package/.agents/skills/skill-creator/scripts/improve_description.py +247 -0
  46. package/.agents/skills/skill-creator/scripts/package_skill.py +136 -0
  47. package/.agents/skills/skill-creator/scripts/quick_validate.py +103 -0
  48. package/.agents/skills/skill-creator/scripts/run_eval.py +310 -0
  49. package/.agents/skills/skill-creator/scripts/run_loop.py +328 -0
  50. package/.agents/skills/skill-creator/scripts/utils.py +47 -0
  51. package/.agents/skills/spec-audit/SKILL.md +28 -1
  52. package/.agents/skills/spec-compliance/SKILL.md +31 -18
  53. package/.agents/skills/spec-init/SKILL.md +29 -17
  54. package/README.md +158 -122
  55. package/bin/macca-method.js +1378 -1077
  56. package/package.json +40 -40
  57. package/scripts/run-skill-validator.js +27 -9
  58. package/scripts/test-install.js +599 -357
  59. package/scripts/test-upgrade-legacy.js +119 -100
  60. package/scripts/validate-skill-behavior.js +175 -64
@@ -0,0 +1,441 @@
1
+ # JSON Schemas
2
+
3
+ ## Table of Contents
4
+
5
+ 1. evals.json
6
+ 2. history.json
7
+ 3. grading.json
8
+ 4. metrics.json
9
+ 5. timing.json
10
+ 6. benchmark.json
11
+ 7. comparison.json
12
+ 8. analysis.json
13
+
14
+ This document defines the JSON schemas used by skill-creator.
15
+
16
+ ---
17
+
18
+ ## evals.json
19
+
20
+ Defines the evals for a skill. Located at `evals/evals.json` within the skill directory.
21
+
22
+ ```json
23
+ {
24
+ "skill_name": "example-skill",
25
+ "evals": [
26
+ {
27
+ "id": 1,
28
+ "prompt": "User's example prompt",
29
+ "expected_output": "Description of expected result",
30
+ "files": ["evals/files/sample1.pdf"],
31
+ "expectations": [
32
+ "The output includes X",
33
+ "The skill used script Y"
34
+ ]
35
+ }
36
+ ]
37
+ }
38
+ ```
39
+
40
+ **Fields:**
41
+ - `skill_name`: Name matching the skill's frontmatter
42
+ - `evals[].id`: Unique integer identifier
43
+ - `evals[].prompt`: The task to execute
44
+ - `evals[].expected_output`: Human-readable description of success
45
+ - `evals[].files`: Optional list of input file paths (relative to skill root)
46
+ - `evals[].expectations`: List of verifiable statements
47
+
48
+ ---
49
+
50
+ ## history.json
51
+
52
+ Tracks version progression in Improve mode. Located at workspace root.
53
+
54
+ ```json
55
+ {
56
+ "started_at": "2026-01-15T10:30:00Z",
57
+ "skill_name": "pdf",
58
+ "current_best": "v2",
59
+ "iterations": [
60
+ {
61
+ "version": "v0",
62
+ "parent": null,
63
+ "expectation_pass_rate": 0.65,
64
+ "grading_result": "baseline",
65
+ "is_current_best": false
66
+ },
67
+ {
68
+ "version": "v1",
69
+ "parent": "v0",
70
+ "expectation_pass_rate": 0.75,
71
+ "grading_result": "won",
72
+ "is_current_best": false
73
+ },
74
+ {
75
+ "version": "v2",
76
+ "parent": "v1",
77
+ "expectation_pass_rate": 0.85,
78
+ "grading_result": "won",
79
+ "is_current_best": true
80
+ }
81
+ ]
82
+ }
83
+ ```
84
+
85
+ **Fields:**
86
+ - `started_at`: ISO timestamp of when improvement started
87
+ - `skill_name`: Name of the skill being improved
88
+ - `current_best`: Version identifier of the best performer
89
+ - `iterations[].version`: Version identifier (v0, v1, ...)
90
+ - `iterations[].parent`: Parent version this was derived from
91
+ - `iterations[].expectation_pass_rate`: Pass rate from grading
92
+ - `iterations[].grading_result`: "baseline", "won", "lost", or "tie"
93
+ - `iterations[].is_current_best`: Whether this is the current best version
94
+
95
+ ---
96
+
97
+ ## grading.json
98
+
99
+ Output from the grader agent. Located at `<run-dir>/grading.json`.
100
+
101
+ ```json
102
+ {
103
+ "expectations": [
104
+ {
105
+ "text": "The output includes the name 'John Smith'",
106
+ "passed": true,
107
+ "evidence": "Found in transcript Step 3: 'Extracted names: John Smith, Sarah Johnson'"
108
+ },
109
+ {
110
+ "text": "The spreadsheet has a SUM formula in cell B10",
111
+ "passed": false,
112
+ "evidence": "No spreadsheet was created. The output was a text file."
113
+ }
114
+ ],
115
+ "summary": {
116
+ "passed": 2,
117
+ "failed": 1,
118
+ "total": 3,
119
+ "pass_rate": 0.67
120
+ },
121
+ "execution_metrics": {
122
+ "tool_calls": {
123
+ "Read": 5,
124
+ "Write": 2,
125
+ "Bash": 8
126
+ },
127
+ "total_tool_calls": 15,
128
+ "total_steps": 6,
129
+ "errors_encountered": 0,
130
+ "output_chars": 12450,
131
+ "transcript_chars": 3200
132
+ },
133
+ "timing": {
134
+ "executor_duration_seconds": 165.0,
135
+ "grader_duration_seconds": 26.0,
136
+ "total_duration_seconds": 191.0
137
+ },
138
+ "claims": [
139
+ {
140
+ "claim": "The form has 12 fillable fields",
141
+ "type": "factual",
142
+ "verified": true,
143
+ "evidence": "Counted 12 fields in field_info.json"
144
+ }
145
+ ],
146
+ "user_notes_summary": {
147
+ "uncertainties": ["Used 2023 data, may be stale"],
148
+ "needs_review": [],
149
+ "workarounds": ["Fell back to text overlay for non-fillable fields"]
150
+ },
151
+ "eval_feedback": {
152
+ "suggestions": [
153
+ {
154
+ "assertion": "The output includes the name 'John Smith'",
155
+ "reason": "A hallucinated document that mentions the name would also pass"
156
+ }
157
+ ],
158
+ "overall": "Assertions check presence but not correctness."
159
+ }
160
+ }
161
+ ```
162
+
163
+ **Fields:**
164
+ - `expectations[]`: Graded expectations with evidence
165
+ - `summary`: Aggregate pass/fail counts
166
+ - `execution_metrics`: Tool usage and output size (from executor's metrics.json)
167
+ - `timing`: Wall clock timing (from timing.json)
168
+ - `claims`: Extracted and verified claims from the output
169
+ - `user_notes_summary`: Issues flagged by the executor
170
+ - `eval_feedback`: (optional) Improvement suggestions for the evals, only present when the grader identifies issues worth raising
171
+
172
+ ---
173
+
174
+ ## metrics.json
175
+
176
+ Output from the executor agent. Located at `<run-dir>/outputs/metrics.json`.
177
+
178
+ ```json
179
+ {
180
+ "tool_calls": {
181
+ "Read": 5,
182
+ "Write": 2,
183
+ "Bash": 8,
184
+ "Edit": 1,
185
+ "Glob": 2,
186
+ "Grep": 0
187
+ },
188
+ "total_tool_calls": 18,
189
+ "total_steps": 6,
190
+ "files_created": ["filled_form.pdf", "field_values.json"],
191
+ "errors_encountered": 0,
192
+ "output_chars": 12450,
193
+ "transcript_chars": 3200
194
+ }
195
+ ```
196
+
197
+ **Fields:**
198
+ - `tool_calls`: Count per tool type
199
+ - `total_tool_calls`: Sum of all tool calls
200
+ - `total_steps`: Number of major execution steps
201
+ - `files_created`: List of output files created
202
+ - `errors_encountered`: Number of errors during execution
203
+ - `output_chars`: Total character count of output files
204
+ - `transcript_chars`: Character count of transcript
205
+
206
+ ---
207
+
208
+ ## timing.json
209
+
210
+ Wall clock timing for a run. Located at `<run-dir>/timing.json`.
211
+
212
+ **How to capture:** When a subagent task completes, the task notification includes `total_tokens` and `duration_ms`. Save these immediately — they are not persisted anywhere else and cannot be recovered after the fact.
213
+
214
+ ```json
215
+ {
216
+ "total_tokens": 84852,
217
+ "duration_ms": 23332,
218
+ "total_duration_seconds": 23.3,
219
+ "executor_start": "2026-01-15T10:30:00Z",
220
+ "executor_end": "2026-01-15T10:32:45Z",
221
+ "executor_duration_seconds": 165.0,
222
+ "grader_start": "2026-01-15T10:32:46Z",
223
+ "grader_end": "2026-01-15T10:33:12Z",
224
+ "grader_duration_seconds": 26.0
225
+ }
226
+ ```
227
+
228
+ ---
229
+
230
+ ## benchmark.json
231
+
232
+ Output from Benchmark mode. Located at `benchmarks/<timestamp>/benchmark.json`.
233
+
234
+ ```json
235
+ {
236
+ "metadata": {
237
+ "skill_name": "pdf",
238
+ "skill_path": "/path/to/pdf",
239
+ "executor_model": "claude-sonnet-4-20250514",
240
+ "analyzer_model": "most-capable-model",
241
+ "timestamp": "2026-01-15T10:30:00Z",
242
+ "evals_run": [1, 2, 3],
243
+ "runs_per_configuration": 3
244
+ },
245
+
246
+ "runs": [
247
+ {
248
+ "eval_id": 1,
249
+ "eval_name": "Ocean",
250
+ "configuration": "with_skill",
251
+ "run_number": 1,
252
+ "result": {
253
+ "pass_rate": 0.85,
254
+ "passed": 6,
255
+ "failed": 1,
256
+ "total": 7,
257
+ "time_seconds": 42.5,
258
+ "tokens": 3800,
259
+ "tool_calls": 18,
260
+ "errors": 0
261
+ },
262
+ "expectations": [
263
+ {"text": "...", "passed": true, "evidence": "..."}
264
+ ],
265
+ "notes": [
266
+ "Used 2023 data, may be stale",
267
+ "Fell back to text overlay for non-fillable fields"
268
+ ]
269
+ }
270
+ ],
271
+
272
+ "run_summary": {
273
+ "with_skill": {
274
+ "pass_rate": {"mean": 0.85, "stddev": 0.05, "min": 0.80, "max": 0.90},
275
+ "time_seconds": {"mean": 45.0, "stddev": 12.0, "min": 32.0, "max": 58.0},
276
+ "tokens": {"mean": 3800, "stddev": 400, "min": 3200, "max": 4100}
277
+ },
278
+ "without_skill": {
279
+ "pass_rate": {"mean": 0.35, "stddev": 0.08, "min": 0.28, "max": 0.45},
280
+ "time_seconds": {"mean": 32.0, "stddev": 8.0, "min": 24.0, "max": 42.0},
281
+ "tokens": {"mean": 2100, "stddev": 300, "min": 1800, "max": 2500}
282
+ },
283
+ "delta": {
284
+ "pass_rate": "+0.50",
285
+ "time_seconds": "+13.0",
286
+ "tokens": "+1700"
287
+ }
288
+ },
289
+
290
+ "notes": [
291
+ "Assertion 'Output is a PDF file' passes 100% in both configurations - may not differentiate skill value",
292
+ "Eval 3 shows high variance (50% ± 40%) - may be flaky or model-dependent",
293
+ "Without-skill runs consistently fail on table extraction expectations",
294
+ "Skill adds 13s average execution time but improves pass rate by 50%"
295
+ ]
296
+ }
297
+ ```
298
+
299
+ **Fields:**
300
+ - `metadata`: Information about the benchmark run
301
+ - `skill_name`: Name of the skill
302
+ - `timestamp`: When the benchmark was run
303
+ - `evals_run`: List of eval names or IDs
304
+ - `runs_per_configuration`: Number of runs per config (e.g. 3)
305
+ - `runs[]`: Individual run results
306
+ - `eval_id`: Numeric eval identifier
307
+ - `eval_name`: Human-readable eval name (used as section header in the viewer)
308
+ - `configuration`: Must be `"with_skill"` or `"without_skill"` (the viewer uses this exact string for grouping and color coding)
309
+ - `run_number`: Integer run number (1, 2, 3...)
310
+ - `result`: Nested object with `pass_rate`, `passed`, `total`, `time_seconds`, `tokens`, `errors`
311
+ - `run_summary`: Statistical aggregates per configuration
312
+ - `with_skill` / `without_skill`: Each contains `pass_rate`, `time_seconds`, `tokens` objects with `mean` and `stddev` fields
313
+ - `delta`: Difference strings like `"+0.50"`, `"+13.0"`, `"+1700"`
314
+ - `notes`: Freeform observations from the analyzer
315
+
316
+ **Important:** The viewer reads these field names exactly. Using `config` instead of `configuration`, or putting `pass_rate` at the top level of a run instead of nested under `result`, will cause the viewer to show empty/zero values. Always reference this schema when generating benchmark.json manually.
317
+
318
+ ---
319
+
320
+ ## comparison.json
321
+
322
+ Output from blind comparator. Located at `<grading-dir>/comparison-N.json`.
323
+
324
+ ```json
325
+ {
326
+ "winner": "A",
327
+ "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.",
328
+ "rubric": {
329
+ "A": {
330
+ "content": {
331
+ "correctness": 5,
332
+ "completeness": 5,
333
+ "accuracy": 4
334
+ },
335
+ "structure": {
336
+ "organization": 4,
337
+ "formatting": 5,
338
+ "usability": 4
339
+ },
340
+ "content_score": 4.7,
341
+ "structure_score": 4.3,
342
+ "overall_score": 9.0
343
+ },
344
+ "B": {
345
+ "content": {
346
+ "correctness": 3,
347
+ "completeness": 2,
348
+ "accuracy": 3
349
+ },
350
+ "structure": {
351
+ "organization": 3,
352
+ "formatting": 2,
353
+ "usability": 3
354
+ },
355
+ "content_score": 2.7,
356
+ "structure_score": 2.7,
357
+ "overall_score": 5.4
358
+ }
359
+ },
360
+ "output_quality": {
361
+ "A": {
362
+ "score": 9,
363
+ "strengths": ["Complete solution", "Well-formatted", "All fields present"],
364
+ "weaknesses": ["Minor style inconsistency in header"]
365
+ },
366
+ "B": {
367
+ "score": 5,
368
+ "strengths": ["Readable output", "Correct basic structure"],
369
+ "weaknesses": ["Missing date field", "Formatting inconsistencies", "Partial data extraction"]
370
+ }
371
+ },
372
+ "expectation_results": {
373
+ "A": {
374
+ "passed": 4,
375
+ "total": 5,
376
+ "pass_rate": 0.80,
377
+ "details": [
378
+ {"text": "Output includes name", "passed": true}
379
+ ]
380
+ },
381
+ "B": {
382
+ "passed": 3,
383
+ "total": 5,
384
+ "pass_rate": 0.60,
385
+ "details": [
386
+ {"text": "Output includes name", "passed": true}
387
+ ]
388
+ }
389
+ }
390
+ }
391
+ ```
392
+
393
+ ---
394
+
395
+ ## analysis.json
396
+
397
+ Output from post-hoc analyzer. Located at `<grading-dir>/analysis.json`.
398
+
399
+ ```json
400
+ {
401
+ "comparison_summary": {
402
+ "winner": "A",
403
+ "winner_skill": "path/to/winner/skill",
404
+ "loser_skill": "path/to/loser/skill",
405
+ "comparator_reasoning": "Brief summary of why comparator chose winner"
406
+ },
407
+ "winner_strengths": [
408
+ "Clear step-by-step instructions for handling multi-page documents",
409
+ "Included validation script that caught formatting errors"
410
+ ],
411
+ "loser_weaknesses": [
412
+ "Vague instruction 'process the document appropriately' led to inconsistent behavior",
413
+ "No script for validation, agent had to improvise"
414
+ ],
415
+ "instruction_following": {
416
+ "winner": {
417
+ "score": 9,
418
+ "issues": ["Minor: skipped optional logging step"]
419
+ },
420
+ "loser": {
421
+ "score": 6,
422
+ "issues": [
423
+ "Did not use the skill's formatting template",
424
+ "Invented own approach instead of following step 3"
425
+ ]
426
+ }
427
+ },
428
+ "improvement_suggestions": [
429
+ {
430
+ "priority": "high",
431
+ "category": "instructions",
432
+ "suggestion": "Replace 'process the document appropriately' with explicit steps",
433
+ "expected_impact": "Would eliminate ambiguity that caused inconsistent behavior"
434
+ }
435
+ ],
436
+ "transcript_insights": {
437
+ "winner_execution_pattern": "Read skill -> Followed 5-step process -> Used validation script",
438
+ "loser_execution_pattern": "Read skill -> Unclear on approach -> Tried 3 different methods"
439
+ }
440
+ }
441
+ ```