@cleocode/skills 2026.5.81 → 2026.5.83

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 (31) hide show
  1. package/README.md +0 -1
  2. package/package.json +1 -1
  3. package/profiles/recommended.json +1 -1
  4. package/skills/manifest.json +45 -1
  5. package/skills/ct-grade-v2-1/MIGRATION.md +0 -28
  6. package/skills/ct-grade-v2-1/SKILL.md +0 -235
  7. package/skills/ct-grade-v2-1/agents/analysis-reporter.md +0 -203
  8. package/skills/ct-grade-v2-1/agents/blind-comparator.md +0 -157
  9. package/skills/ct-grade-v2-1/agents/scenario-runner.md +0 -160
  10. package/skills/ct-grade-v2-1/evals/evals.json +0 -74
  11. package/skills/ct-grade-v2-1/grade-viewer/__pycache__/build_op_stats.cpython-314.pyc +0 -0
  12. package/skills/ct-grade-v2-1/grade-viewer/__pycache__/generate_grade_review.cpython-314.pyc +0 -0
  13. package/skills/ct-grade-v2-1/grade-viewer/build_op_stats.py +0 -174
  14. package/skills/ct-grade-v2-1/grade-viewer/eval-analysis.json +0 -41
  15. package/skills/ct-grade-v2-1/grade-viewer/eval-report.md +0 -37
  16. package/skills/ct-grade-v2-1/grade-viewer/generate_grade_review.py +0 -1023
  17. package/skills/ct-grade-v2-1/grade-viewer/generate_grade_viewer.py +0 -548
  18. package/skills/ct-grade-v2-1/grade-viewer/grade-review-eval.html +0 -613
  19. package/skills/ct-grade-v2-1/grade-viewer/grade-review.html +0 -1532
  20. package/skills/ct-grade-v2-1/grade-viewer/viewer.html +0 -620
  21. package/skills/ct-grade-v2-1/manifest-entry.json +0 -31
  22. package/skills/ct-grade-v2-1/references/ab-testing.md +0 -173
  23. package/skills/ct-grade-v2-1/references/domains-ssot.md +0 -156
  24. package/skills/ct-grade-v2-1/references/grade-spec-v2.md +0 -167
  25. package/skills/ct-grade-v2-1/references/playbook-v2.md +0 -325
  26. package/skills/ct-grade-v2-1/references/token-tracking.md +0 -200
  27. package/skills/ct-grade-v2-1/scripts/generate_report.py +0 -419
  28. package/skills/ct-grade-v2-1/scripts/run_ab_test.py +0 -493
  29. package/skills/ct-grade-v2-1/scripts/run_scenario.py +0 -396
  30. package/skills/ct-grade-v2-1/scripts/setup_run.py +0 -207
  31. package/skills/ct-grade-v2-1/scripts/token_tracker.py +0 -175
@@ -1,157 +0,0 @@
1
- # Blind Comparator Agent
2
-
3
- You are a blind comparator for CLEO behavioral evaluation. You evaluate two outputs — labeled only as **Output A** and **Output B** — without knowing which configuration, interface, or scenario produced them.
4
-
5
- Your job is to produce an objective, evidence-based comparison in `comparison.json` format.
6
-
7
- ## Critical Rules
8
-
9
- 1. **You do NOT know and MUST NOT speculate** about which output came from MCP vs CLI, or which scenario variant was used.
10
- 2. **Judge on observable output quality only**: correctness, completeness, protocol adherence, efficiency.
11
- 3. **Be specific**: every score must have evidence from the actual outputs.
12
- 4. **Score independently first**, then declare a winner.
13
-
14
- ## Inputs
15
-
16
- You will receive:
17
- - `OUTPUT_A_PATH`: Path to arm A's output files (grade.json, operations.jsonl)
18
- - `OUTPUT_B_PATH`: Path to arm B's output files (grade.json, operations.jsonl)
19
- - `SCENARIO`: Which grade scenario was run (for rubric context)
20
- - `OUTPUT_PATH`: Where to write comparison.json
21
-
22
- ## Evaluation Dimensions
23
-
24
- For each output, assess:
25
-
26
- ### 1. Grade Score Accuracy (0-5 pts each)
27
- - Does the session score reflect the actual operations executed?
28
- - Are flags appropriate for the violations observed?
29
- - Is the score consistent with the evidence in the grade result?
30
-
31
- ### 2. Protocol Adherence (0-5 pts each)
32
- - Were all required operations for the scenario executed?
33
- - Were operations in the correct order?
34
- - Were operations well-formed (descriptions provided, params complete)?
35
-
36
- ### 3. Efficiency (0-5 pts each)
37
- - Did the execution use the minimal necessary operations?
38
- - Was `tasks.find` preferred over `tasks.list`?
39
- - Were redundant calls avoided?
40
-
41
- ### 4. Error Handling (0-5 pts each)
42
- - Were errors (if any) properly recovered from?
43
- - Were no unnecessary errors triggered?
44
-
45
- ## Process
46
-
47
- 1. Read `grade.json` from both output dirs
48
- 2. Read `operations.jsonl` from both output dirs
49
- 3. Score each dimension for A and B independently
50
- 4. Sum scores: content_score = (grade_accuracy + protocol_adherence) / 2, structure_score = (efficiency + error_handling) / 2
51
- 5. Declare winner (or tie if within 0.5 points)
52
- 6. Write comparison.json
53
-
54
- ## Output Format
55
-
56
- Write `comparison.json` to `OUTPUT_PATH`:
57
-
58
- ```json
59
- {
60
- "winner": "A",
61
- "reasoning": "Output A demonstrated complete protocol adherence with all 10 required operations executed in correct order. Output B missed the session.list-before-task-ops ordering, reducing its S1 score.",
62
- "rubric": {
63
- "A": {
64
- "content": {
65
- "grade_score_accuracy": 5,
66
- "protocol_adherence": 5
67
- },
68
- "structure": {
69
- "efficiency": 4,
70
- "error_handling": 5
71
- },
72
- "content_score": 5.0,
73
- "structure_score": 4.5,
74
- "overall_score": 9.5
75
- },
76
- "B": {
77
- "content": {
78
- "grade_score_accuracy": 3,
79
- "protocol_adherence": 2
80
- },
81
- "structure": {
82
- "efficiency": 4,
83
- "error_handling": 5
84
- },
85
- "content_score": 2.5,
86
- "structure_score": 4.5,
87
- "overall_score": 7.0
88
- }
89
- },
90
- "output_quality": {
91
- "A": {
92
- "score": 9,
93
- "strengths": ["All scenario operations present", "Correct ordering", "Descriptions on all tasks"],
94
- "weaknesses": ["Slightly verbose operation params"]
95
- },
96
- "B": {
97
- "score": 7,
98
- "strengths": ["Efficient operation count", "Good error recovery"],
99
- "weaknesses": ["session.list came after first task op (-10 S1)", "No admin.help call (-10 S5)"]
100
- }
101
- },
102
- "grade_comparison": {
103
- "A": {
104
- "total_score": 95,
105
- "grade": "A",
106
- "flags": []
107
- },
108
- "B": {
109
- "total_score": 75,
110
- "grade": "B",
111
- "flags": ["session.list called after task ops", "No admin.help or skill lookup calls"]
112
- }
113
- },
114
- "expectation_results": {
115
- "A": {
116
- "passed": 5,
117
- "total": 5,
118
- "pass_rate": 1.0,
119
- "details": [
120
- {"text": "session.list before any task op", "passed": true},
121
- {"text": "session.end called", "passed": true},
122
- {"text": "tasks.find used for discovery", "passed": true},
123
- {"text": "admin.help called", "passed": true},
124
- {"text": "No E_NOT_FOUND left unrecovered", "passed": true}
125
- ]
126
- },
127
- "B": {
128
- "passed": 3,
129
- "total": 5,
130
- "pass_rate": 0.60,
131
- "details": [
132
- {"text": "session.list before any task op", "passed": false},
133
- {"text": "session.end called", "passed": true},
134
- {"text": "tasks.find used for discovery", "passed": true},
135
- {"text": "admin.help called", "passed": false},
136
- {"text": "No E_NOT_FOUND left unrecovered", "passed": true}
137
- ]
138
- }
139
- }
140
- }
141
- ```
142
-
143
- ## Tie Handling
144
-
145
- If overall scores are within 0.5 points, declare `"winner": "tie"` and note both performed equivalently.
146
-
147
- ## Final Summary
148
-
149
- After writing comparison.json, output:
150
- ```
151
- WINNER: <A|B|tie>
152
- SCORE_A: <overall>
153
- SCORE_B: <overall>
154
- GRADE_A: <letter> (<total>/100)
155
- GRADE_B: <letter> (<total>/100)
156
- FILE: <comparison.json path>
157
- ```
@@ -1,160 +0,0 @@
1
- # Scenario Runner Agent
2
-
3
- You are a CLEO grade scenario executor. Your job is to run a specific grade playbook scenario using the CLI, capture the audit trail, and grade the resulting session.
4
-
5
- ## Inputs
6
-
7
- You will receive:
8
- - `SCENARIO`: Which scenario to run (s1|s2|s3|s4|s5|s6|s7|s8|s9|s10)
9
- - `OUTPUT_DIR`: Where to write results
10
- - `PROJECT_DIR`: Path to the CLEO project (for cleo-dev --cwd)
11
- - `RUN_NUMBER`: Integer (1, 2, 3...) for repeated runs
12
-
13
- ## Execution Protocol
14
-
15
- ### Step 1: Record start time
16
-
17
- Note the ISO timestamp before any operations.
18
-
19
- ### Step 2: Start a graded session
20
-
21
- ```bash
22
- cleo-dev --cwd <PROJECT_DIR> session start --grade --name "grade-<SCENARIO>-run<RUN>" --scope global
23
- ```
24
-
25
- Save the returned `sessionId`.
26
-
27
- If this fails (DB migration error, ENOENT, or non-zero exit):
28
- - Write `grade.json: { "error": "DB_UNAVAILABLE", "totalScore": null }`
29
- - Write `timing.json: { "error": "DB_UNAVAILABLE", "total_tokens": null, "duration_ms": null, "scenario": "<SCENARIO>", "run": <RUN_NUMBER>, "interface": "cli", "executor_start": "<ISO>", "executor_end": "<ISO>" }`
30
- - Output: `SESSION_START_FAILED: DB_UNAVAILABLE`
31
- - Stop. Do NOT abort silently.
32
-
33
- ### Step 3: Execute scenario operations
34
-
35
- Follow the exact operation sequence from the scenario playbook. All operations use the CLI.
36
-
37
- ```bash
38
- cleo-dev --cwd <PROJECT_DIR> find --status active
39
- ```
40
-
41
- Scenario sequences are in [../references/playbook-v2.md](../references/playbook-v2.md). Execute the operations in order. Do NOT skip operations — each one contributes to the grade.
42
-
43
- ### Step 4: End the session
44
-
45
- ```bash
46
- cleo-dev --cwd <PROJECT_DIR> session end
47
- ```
48
-
49
- ### Step 5: Grade the session
50
-
51
- ```bash
52
- cleo-dev --cwd <PROJECT_DIR> check grade --session "<saved-id>"
53
- ```
54
-
55
- Save the full GradeResult JSON.
56
-
57
- ### Step 6: Capture operations log
58
-
59
- Record every operation you executed as a JSONL file. Each line:
60
- ```json
61
- {"seq": 1, "domain": "tasks", "operation": "find", "params": {}, "success": true, "interface": "cli", "timestamp": "..."}
62
- ```
63
-
64
- ### Step 7: Write output files
65
-
66
- Write to `<OUTPUT_DIR>/<SCENARIO>/arm-<INTERFACE>/`:
67
-
68
- **grade.json** — The GradeResult from check.grade:
69
- ```json
70
- {
71
- "sessionId": "...",
72
- "totalScore": 85,
73
- "maxScore": 100,
74
- "dimensions": {...},
75
- "flags": [...],
76
- "entryCount": 12
77
- }
78
- ```
79
-
80
- **operations.jsonl** — One JSON object per line, each operation executed.
81
-
82
- **timing.json** — Fill in what you can; orchestrator fills `total_tokens` and `duration_ms`:
83
- ```json
84
- {
85
- "scenario": "<SCENARIO>",
86
- "run": <RUN_NUMBER>,
87
- "interface": "cli",
88
- "session_id": "<session-id>",
89
- "executor_start": "<ISO>",
90
- "executor_end": "<ISO>",
91
- "executor_duration_seconds": 0,
92
- "token_usage_id": "<id from admin.token response>",
93
- "total_tokens": null,
94
- "duration_ms": null
95
- }
96
- ```
97
-
98
- Note: `total_tokens` and `duration_ms` are filled by the orchestrator from the task completion notification — you cannot read them yourself.
99
-
100
- ### Step 8: Record token exchange (mandatory for token_usage table)
101
-
102
- After receiving the grade result, record the exchange to persist token measurements:
103
-
104
- ```bash
105
- cleo-dev --cwd <PROJECT_DIR> admin token record --session "<session-id>" --domain admin --operation grade --metadata '{"scenario":"<SCENARIO>","run":<RUN_NUMBER>}'
106
- ```
107
-
108
- Save the returned `id` as `token_usage_id` in timing.json.
109
-
110
- ## Quick Reference — Scenarios
111
-
112
- | Scenario | Name | Key Domains | Target Score |
113
- |----------|------|-------------|--------------|
114
- | s1 | Session Discipline | session, tasks | S1=20, S2=15+ |
115
- | s2 | Task Hygiene | tasks, session | S3=20, S1=20 |
116
- | s3 | Error Recovery | tasks, session | S4=20 |
117
- | s4 | Full Lifecycle | tasks, session, admin | All dims 15+ |
118
- | s5 | Multi-Domain Analysis | tasks, admin, pipeline | S5=15+ |
119
- | s6 | Memory Observe & Recall | memory, session | S5=15+, S2=15+ |
120
- | s7 | Decision Continuity | memory, session | S1=20, S5=15+ |
121
- | s8 | Pattern & Learning | memory, session | S2=15+, S5=15+ |
122
- | s9 | NEXUS Cross-Project | nexus, session, admin | S5=20, S1=20 |
123
- | s10 | Full System Throughput | all 8 domains | S2=15+, S5=15+ |
124
-
125
- ## Scenario Key Operations
126
-
127
- | Scenario | Key Operations | S1 | S2 | S3 | S4 | S5 |
128
- |---|---|---|---|---|---|---|
129
- | s1 | session.list, tasks.find, tasks.show, session.end | ✓ | ✓ | — | — | partial |
130
- | s2 | session.list, tasks.find, tasks.add×2, session.end | ✓ | — | ✓ | — | — |
131
- | s3 | session.list, tasks.show (E_NOT_FOUND), tasks.find (recover), tasks.add, session.end | ✓ | — | ✓ | ✓ | — |
132
- | s4 | session.list, admin.help, tasks.find, tasks.show, tasks.update, tasks.complete, session.end | ✓ | ✓ | ✓ | ✓ | ✓ |
133
- | s5 | session.list, admin.help, tasks.find (parent filter), tasks.show, session.context.drift, session.decision.log, session.record.decision, tasks.update, tasks.complete, session.end | ✓ | ✓ | ✓ | ✓ | ✓ |
134
- | s6 | memory.observe, memory.find, memory.timeline, memory.fetch, session.end | ✓ | ✓ | — | — | ✓ |
135
- | s7 | memory.decision.store, memory.decision.find, memory.find, memory.fetch, session.end | ✓ | — | — | — | ✓ |
136
- | s8 | memory.pattern.store, memory.learning.store, memory.pattern.find, memory.learning.find, session.end | — | ✓ | — | — | ✓ |
137
- | s9 | nexus.status, nexus.list, nexus.show, admin.dash, session.end | ✓ | — | — | — | ✓ |
138
- | s10 | session.list, admin.help, tasks.find, memory.find, nexus.status, pipeline.stage.status, admin.health, tools.skill.list, memory.observe, session.end | ✓ | ✓ | — | — | ✓ |
139
-
140
- ## Anti-patterns to Avoid
141
-
142
- Do NOT do these during scenario execution — they will lower the grade intentionally only if you are running the anti-pattern variant:
143
- - Calling `tasks.list` instead of `tasks.find` for discovery
144
- - Skipping `session.list` at the start
145
- - Creating tasks without descriptions
146
- - Ignoring `E_NOT_FOUND` errors without recovery lookup
147
- - Never calling `admin.help`
148
-
149
- ## Output
150
-
151
- When complete, summarize:
152
- ```
153
- SCENARIO: <id>
154
- RUN: <n>
155
- SESSION_ID: <id>
156
- TOTAL_SCORE: <n>/100
157
- GRADE: <letter>
158
- FLAGS: <count>
159
- FILES_WRITTEN: <list>
160
- ```
@@ -1,74 +0,0 @@
1
- [
2
- {
3
- "id": "eval-001",
4
- "description": "Grade a session — verify grading pipeline returns a valid GradeResult",
5
- "prompt": "Start a graded session, run query session list and admin dash, end session, then grade it",
6
- "expectations": [
7
- "Grade operation returns success: true",
8
- "totalScore is a number 0-100",
9
- "dimensions has 5 entries each with score and max",
10
- "flags is an array"
11
- ]
12
- },
13
- {
14
- "id": "eval-002",
15
- "description": "Session discipline — session.list before task ops scores S1=20",
16
- "prompt": "Run scenario S1 and verify session discipline dimension is 20/20",
17
- "expectations": [
18
- "S1 Session Discipline score = 20",
19
- "session.list was called before any task operation",
20
- "session.end was called",
21
- "No protocol flags"
22
- ]
23
- },
24
- {
25
- "id": "eval-003",
26
- "description": "Task efficiency — tasks.find used (not tasks.list) scores S2>=15",
27
- "prompt": "Run tasks.find query and verify efficiency score is 15 or higher",
28
- "expectations": [
29
- "S2 Task Efficiency score >= 15",
30
- "tasks.find was used instead of tasks.list",
31
- "No TASK_LIST_USED flag"
32
- ]
33
- },
34
- {
35
- "id": "eval-004",
36
- "description": "Task hygiene — task add with description scores S3=20",
37
- "prompt": "Add a task with both title and description, verify hygiene score is 20",
38
- "expectations": [
39
- "S3 Task Hygiene score = 20",
40
- "Task was created with non-empty description",
41
- "No MISSING_DESCRIPTION flag"
42
- ]
43
- },
44
- {
45
- "id": "eval-005",
46
- "description": "Protocol adherence — following CLEO workflow scores S4>=15",
47
- "prompt": "Follow the complete CLEO session workflow and verify protocol adherence",
48
- "expectations": [
49
- "S4 Protocol Adherence score >= 15",
50
- "Session started before task work",
51
- "Session ended after task work"
52
- ]
53
- },
54
- {
55
- "id": "eval-006",
56
- "description": "MCP gateway — MCP-sourced ops score S5>=15",
57
- "prompt": "Use MCP interface for all operations and verify gateway score is 15 or higher",
58
- "expectations": [
59
- "S5 MCP Gateway score >= 15",
60
- "Operations sourced from MCP (not CLI)",
61
- "audit_log shows gateway=query or gateway=mutate with source=mcp"
62
- ]
63
- },
64
- {
65
- "id": "eval-007",
66
- "description": "Memory recall — observe then find retrieves the observation",
67
- "prompt": "Run scenario S6: observe a fact then find it via memory.find",
68
- "expectations": [
69
- "memory.observe succeeds and returns an ID",
70
- "memory.find with matching query returns the observation",
71
- "Grade total score >= 60"
72
- ]
73
- }
74
- ]
@@ -1,174 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- build_op_stats.py — Aggregate operations.jsonl files from grade runs into per-operation statistics.
4
-
5
- Reads all operations.jsonl files under --grade-runs-dir and computes per-operation stats
6
- split by interface (mcp/cli). Output is a JSON object keyed by "domain.operation".
7
-
8
- Usage:
9
- python build_op_stats.py [options]
10
-
11
- Options:
12
- --grade-runs-dir PATH Directory containing grade run subdirectories
13
- (default: .cleo/metrics/grade-runs relative to cwd)
14
- --output PATH Output JSON file path
15
- (default: .cleo/metrics/per_operation_stats.json)
16
- --pretty Pretty-print JSON output (default: compact)
17
- --verbose Print progress to stderr
18
-
19
- Output format (per key "domain.operation"):
20
- {
21
- "mcp_calls": 42,
22
- "cli_calls": 10,
23
- "total_mcp_ms": 1234.5,
24
- "total_cli_ms": 456.7,
25
- "avg_mcp_ms": 29.4,
26
- "avg_cli_ms": 45.7,
27
- "runs_seen": 3
28
- }
29
-
30
- Also importable as a module:
31
- from build_op_stats import compute_stats
32
- stats = compute_stats(grade_runs_dir="/path/to/grade-runs")
33
- """
34
-
35
- import argparse
36
- import json
37
- import sys
38
- from pathlib import Path
39
-
40
-
41
- def compute_stats(grade_runs_dir, verbose=False):
42
- """
43
- Aggregate operations.jsonl files under grade_runs_dir.
44
-
45
- Returns dict keyed by "domain.operation" with accumulated stats.
46
- """
47
- runs_dir = Path(grade_runs_dir)
48
- stats = {}
49
- files_processed = 0
50
- lines_processed = 0
51
-
52
- if not runs_dir.exists():
53
- if verbose:
54
- print(f"[build_op_stats] Grade runs dir not found: {runs_dir}", file=sys.stderr)
55
- return stats
56
-
57
- for ops_file in sorted(runs_dir.rglob('operations.jsonl')):
58
- files_processed += 1
59
- if verbose:
60
- print(f"[build_op_stats] Processing: {ops_file}", file=sys.stderr)
61
-
62
- for line in ops_file.read_text(errors='replace').splitlines():
63
- line = line.strip()
64
- if not line:
65
- continue
66
- try:
67
- entry = json.loads(line)
68
- except json.JSONDecodeError:
69
- continue
70
-
71
- domain = entry.get('domain', 'unknown')
72
- operation = entry.get('operation', 'unknown')
73
- key = f"{domain}.{operation}"
74
- interface = entry.get('interface', 'mcp')
75
- duration = float(entry.get('duration_ms', 0) or 0)
76
-
77
- if key not in stats:
78
- stats[key] = {
79
- 'mcp_calls': 0,
80
- 'cli_calls': 0,
81
- 'total_mcp_ms': 0.0,
82
- 'total_cli_ms': 0.0,
83
- 'avg_mcp_ms': 0.0,
84
- 'avg_cli_ms': 0.0,
85
- 'runs_seen': set(),
86
- }
87
-
88
- # Track which run directory this came from
89
- # ops_file is e.g. .../grade-runs/run-20260308/s1/run-01/arm-mcp/operations.jsonl
90
- # run_id is the first path component relative to runs_dir (e.g. "run-20260308")
91
- run_id = ops_file.relative_to(runs_dir).parts[0]
92
- stats[key]['runs_seen'].add(run_id)
93
-
94
- if interface == 'cli':
95
- stats[key]['cli_calls'] += 1
96
- stats[key]['total_cli_ms'] += duration
97
- else:
98
- stats[key]['mcp_calls'] += 1
99
- stats[key]['total_mcp_ms'] += duration
100
-
101
- lines_processed += 1
102
-
103
- # Compute averages and convert sets to counts
104
- for key, v in stats.items():
105
- mc = v['mcp_calls']
106
- cc = v['cli_calls']
107
- v['avg_mcp_ms'] = round(v['total_mcp_ms'] / mc, 2) if mc > 0 else 0.0
108
- v['avg_cli_ms'] = round(v['total_cli_ms'] / cc, 2) if cc > 0 else 0.0
109
- v['total_mcp_ms'] = round(v['total_mcp_ms'], 2)
110
- v['total_cli_ms'] = round(v['total_cli_ms'], 2)
111
- v['runs_seen'] = len(v['runs_seen'])
112
-
113
- if verbose:
114
- print(f"[build_op_stats] Processed {files_processed} files, {lines_processed} lines → {len(stats)} unique operations", file=sys.stderr)
115
-
116
- return stats
117
-
118
-
119
- def find_cleo_dir(start='.'):
120
- """Walk up from start to find directory containing .cleo/tasks.db."""
121
- p = Path(start).resolve()
122
- while p != p.parent:
123
- if (p / '.cleo' / 'tasks.db').exists():
124
- return p
125
- p = p.parent
126
- return Path(start).resolve()
127
-
128
-
129
- def main():
130
- parser = argparse.ArgumentParser(
131
- description='Aggregate grade run operations.jsonl files into per-operation stats.'
132
- )
133
- parser.add_argument(
134
- '--grade-runs-dir',
135
- default=None,
136
- help='Directory containing grade run subdirectories (default: .cleo/metrics/grade-runs)'
137
- )
138
- parser.add_argument(
139
- '--output',
140
- default=None,
141
- help='Output JSON path (default: .cleo/metrics/per_operation_stats.json)'
142
- )
143
- parser.add_argument(
144
- '--pretty',
145
- action='store_true',
146
- help='Pretty-print JSON output'
147
- )
148
- parser.add_argument(
149
- '--verbose',
150
- action='store_true',
151
- help='Print progress to stderr'
152
- )
153
- args = parser.parse_args()
154
-
155
- workspace = find_cleo_dir('.')
156
-
157
- grade_runs_dir = args.grade_runs_dir or str(workspace / '.cleo' / 'metrics' / 'grade-runs')
158
- output_path = args.output or str(workspace / '.cleo' / 'metrics' / 'per_operation_stats.json')
159
-
160
- stats = compute_stats(grade_runs_dir, verbose=args.verbose)
161
-
162
- indent = 2 if args.pretty else None
163
- output_json = json.dumps(stats, indent=indent)
164
-
165
- out = Path(output_path)
166
- out.parent.mkdir(parents=True, exist_ok=True)
167
- out.write_text(output_json)
168
-
169
- print(f"Wrote {len(stats)} operation stats to {output_path}")
170
- return 0
171
-
172
-
173
- if __name__ == '__main__':
174
- sys.exit(main())
@@ -1,41 +0,0 @@
1
- {
2
- "total_grades": 31,
3
- "score_distribution": {
4
- "F (0)": 7,
5
- "D (45-59)": 10,
6
- "C (60-74)": 5,
7
- "B (75-89)": 8,
8
- "A (90+)": 1
9
- },
10
- "score_stats": {
11
- "mean": 64.6,
12
- "min": 50,
13
- "max": 95,
14
- "grades_with_data": 24,
15
- "zero_score_count": 7
16
- },
17
- "dimension_averages": {
18
- "sessionDiscipline": 5.8,
19
- "discoveryEfficiency": 9.0,
20
- "taskHygiene": 15.4,
21
- "errorProtocol": 15.3,
22
- "disclosureUse": 4.5
23
- },
24
- "flag_frequency": {
25
- "No admin.help calls": 21,
26
- "session.list never called": 18,
27
- "No MCP query calls": 13,
28
- "session.end never called": 12,
29
- "No audit entries": 7,
30
- "tasks.list used (prefer find)": 5,
31
- "Subtasks without exists check": 1,
32
- "Duplicate task creates": 1
33
- },
34
- "avg_audit_entries": 9.5,
35
- "token_estimate": {
36
- "avg_per_session_chars": 0,
37
- "avg_per_session_tokens": 1425.0,
38
- "method": "entry_count * 150 proxy",
39
- "note": "OTEL not enabled; enable with CLAUDE_CODE_ENABLE_TELEMETRY=1 for real counts"
40
- }
41
- }
@@ -1,37 +0,0 @@
1
- # CLEO Grade v2.1 — Comparative Analysis Report
2
-
3
- **Generated:** 2026-03-07 23:47 UTC
4
- **Source:** `/tmp/ct-grade-eval`
5
-
6
- > **DEPRECATED**: This report was generated when MCP was still supported. MCP has been removed.
7
- > All operations now use the CLI exclusively. These results are retained for historical reference only.
8
-
9
- ---
10
-
11
- ## Historical: MCP vs CLI Blind A/B Results
12
-
13
- **Overall winner: MCP**
14
-
15
- | Metric | Value |
16
- |--------|-------|
17
- | Total runs | 3 |
18
- | MCP wins | 3 (100.0%) |
19
- | CLI wins | 0 (0.0%) |
20
- | Ties | 0 |
21
- | Avg token delta (MCP–CLI) | +416.0 tokens |
22
- | Interpretation | MCP uses more tokens on average |
23
-
24
- ### Per-Operation Results
25
-
26
- | Operation | MCP wins | CLI wins | Ties | Token delta | MCP chars | CLI chars | MCP ms | CLI ms |
27
- |-----------|----------|----------|------|-------------|-----------|-----------|--------|--------|
28
- | `admin.version` **MCP** | 3 | 0 | 0 | +416t | 1664 | 0 | 930ms | 786ms |
29
-
30
- ### Recommendations
31
-
32
- - **MCP adds significant token overhead.** Consider whether MCP envelope verbosity can be reduced for high-frequency operations.
33
- - **MCP output quality is consistently higher.** Reinforces MCP-first agent protocol recommendation.
34
-
35
- ---
36
-
37
- *Report generated by ct-grade v2.1 `generate_report.py`*