@uluops/setup 0.2.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.
- package/README.md +178 -0
- package/assets/agents/api-contract-validator-agent.md +960 -0
- package/assets/agents/aristotle-analyst-agent.md +705 -0
- package/assets/agents/aristotle-explorer-agent.md +152 -0
- package/assets/agents/aristotle-forecaster-agent.md +666 -0
- package/assets/agents/aristotle-validator-agent.md +667 -0
- package/assets/agents/assumption-excavator-agent.md +1354 -0
- package/assets/agents/code-auditor-agent.md +1061 -0
- package/assets/agents/code-optimizer-agent.md +876 -0
- package/assets/agents/code-validator-agent.md +846 -0
- package/assets/agents/docs-validator-agent.md +490 -0
- package/assets/agents/frontend-validator-agent.md +844 -0
- package/assets/agents/mcp-validator-agent.md +827 -0
- package/assets/agents/pre-implementation-architect-agent.md +1036 -0
- package/assets/agents/prompt-engineer-agent.md +1158 -0
- package/assets/agents/prompt-pattern-analyzer-agent.md +907 -0
- package/assets/agents/prompt-quality-validator-agent.md +1018 -0
- package/assets/agents/public-interface-validator-agent.md +951 -0
- package/assets/agents/release-readiness-agent.md +482 -0
- package/assets/agents/security-analyst-agent.md +1093 -0
- package/assets/agents/test-architect-agent.md +861 -0
- package/assets/agents/type-safety-validator-agent.md +932 -0
- package/assets/agents/workflow-synthesis-agent.md +836 -0
- package/assets/commands/agents/api-contract.md +135 -0
- package/assets/commands/agents/architect.md +135 -0
- package/assets/commands/agents/aristotle-analyst.md +115 -0
- package/assets/commands/agents/aristotle-explorer.md +92 -0
- package/assets/commands/agents/aristotle-forecaster.md +114 -0
- package/assets/commands/agents/aristotle-validator.md +114 -0
- package/assets/commands/agents/assumption-excavator.md +114 -0
- package/assets/commands/agents/audit.md +136 -0
- package/assets/commands/agents/docs-validate.md +133 -0
- package/assets/commands/agents/frontend.md +135 -0
- package/assets/commands/agents/mcp-validate.md +136 -0
- package/assets/commands/agents/optimize.md +133 -0
- package/assets/commands/agents/pattern-analyzer.md +126 -0
- package/assets/commands/agents/prompt-quality.md +134 -0
- package/assets/commands/agents/prompt-validate.md +135 -0
- package/assets/commands/agents/public-interface.md +134 -0
- package/assets/commands/agents/release.md +135 -0
- package/assets/commands/agents/security.md +137 -0
- package/assets/commands/agents/test-review.md +136 -0
- package/assets/commands/agents/type-safety.md +135 -0
- package/assets/commands/agents/validate.md +134 -0
- package/assets/commands/agents/workflow-synthesis.md +101 -0
- package/assets/commands/workflows/aristotle.md +543 -0
- package/assets/commands/workflows/post-implementation.md +577 -0
- package/assets/commands/workflows/pre-implementation.md +670 -0
- package/assets/commands/workflows/prompt-audit.md +754 -0
- package/assets/commands/workflows/ship.md +721 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +436 -0
- package/dist/lib/config-merger.d.ts +26 -0
- package/dist/lib/config-merger.js +63 -0
- package/dist/lib/file-ops.d.ts +23 -0
- package/dist/lib/file-ops.js +86 -0
- package/dist/lib/hash.d.ts +1 -0
- package/dist/lib/hash.js +4 -0
- package/dist/lib/manifest.d.ts +16 -0
- package/dist/lib/manifest.js +34 -0
- package/dist/lib/paths.d.ts +14 -0
- package/dist/lib/paths.js +49 -0
- package/dist/lib/settings-merger.d.ts +43 -0
- package/dist/lib/settings-merger.js +91 -0
- package/dist/steps/agents.d.ts +8 -0
- package/dist/steps/agents.js +14 -0
- package/dist/steps/auth.d.ts +12 -0
- package/dist/steps/auth.js +80 -0
- package/dist/steps/commands.d.ts +9 -0
- package/dist/steps/commands.js +69 -0
- package/dist/steps/detect.d.ts +9 -0
- package/dist/steps/detect.js +30 -0
- package/dist/steps/mcp.d.ts +6 -0
- package/dist/steps/mcp.js +40 -0
- package/dist/steps/metrics.d.ts +22 -0
- package/dist/steps/metrics.js +176 -0
- package/dist/steps/shell.d.ts +2 -0
- package/dist/steps/shell.js +48 -0
- package/dist/steps/signup.d.ts +13 -0
- package/dist/steps/signup.js +92 -0
- package/dist/steps/verify.d.ts +10 -0
- package/dist/steps/verify.js +184 -0
- package/dist/test/auth.test.d.ts +1 -0
- package/dist/test/auth.test.js +43 -0
- package/dist/test/config-io.test.d.ts +1 -0
- package/dist/test/config-io.test.js +56 -0
- package/dist/test/config-merger.test.d.ts +1 -0
- package/dist/test/config-merger.test.js +94 -0
- package/dist/test/detect.test.d.ts +1 -0
- package/dist/test/detect.test.js +25 -0
- package/dist/test/file-ops.test.d.ts +1 -0
- package/dist/test/file-ops.test.js +100 -0
- package/dist/test/hash.test.d.ts +1 -0
- package/dist/test/hash.test.js +14 -0
- package/dist/test/manifest.test.d.ts +1 -0
- package/dist/test/manifest.test.js +78 -0
- package/dist/test/paths.test.d.ts +1 -0
- package/dist/test/paths.test.js +30 -0
- package/dist/test/settings-merger.test.d.ts +1 -0
- package/dist/test/settings-merger.test.js +167 -0
- package/dist/test/shell-profile.test.d.ts +1 -0
- package/dist/test/shell-profile.test.js +40 -0
- package/dist/test/shell.test.d.ts +1 -0
- package/dist/test/shell.test.js +71 -0
- package/dist/test/signup.test.d.ts +1 -0
- package/dist/test/signup.test.js +83 -0
- package/package.json +36 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp-validate
|
|
3
|
+
description: Validate Model Context Protocol (MCP) server implementation. Validates tools, resources, prompts, transport, and security.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# MCP Validator
|
|
7
|
+
Validate Model Context Protocol (MCP) server implementation. Validates tools, resources, prompts, transport, and security.
|
|
8
|
+
|
|
9
|
+
## Arguments
|
|
10
|
+
|
|
11
|
+
**Usage:** `/agents:mcp-validate <directory>`
|
|
12
|
+
|
|
13
|
+
**Examples:**
|
|
14
|
+
- `/agents:mcp-validate ./servers/my-mcp`
|
|
15
|
+
- `/agents:mcp-validate ./mcp-tools`
|
|
16
|
+
- `/agents:mcp-validate .`
|
|
17
|
+
|
|
18
|
+
**Target Directory:** $ARGUMENTS
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Pre-Flight
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
echo "Running MCP validation on $ARGUMENTS..."
|
|
26
|
+
echo "======================================="
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Verify the target directory exists:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
test -d "$ARGUMENTS" && echo "✓ Directory exists: $ARGUMENTS" || echo "ERROR: Directory '$ARGUMENTS' not found"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Enter and confirm location:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd "$ARGUMENTS" && pwd
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Check path exists:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
[ -e "$ARGUMENTS" ] && echo "✓ $ARGUMENTS exists" || echo "Target directory does not exist"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Agent Invocation
|
|
51
|
+
|
|
52
|
+
Run the MCP Validator agent on the validated target directory:
|
|
53
|
+
|
|
54
|
+
**Agent:** mcp-validator-agent.md
|
|
55
|
+
**Model:** Sonnet
|
|
56
|
+
**Target:** $ARGUMENTS
|
|
57
|
+
|
|
58
|
+
The agent performs code quality validation across 5 categories (100 points total):
|
|
59
|
+
|
|
60
|
+
| Category | Points | Focus |
|
|
61
|
+
|----------|--------|-------|
|
|
62
|
+
| Tools Implementation | 25 | Tool definitions, schemas, descriptions, error handling |
|
|
63
|
+
| Resources Implementation | 20 | Resource URIs, templates, MIME types, subscriptions |
|
|
64
|
+
| Prompts Implementation | 15 | Prompt templates, arguments, usage patterns |
|
|
65
|
+
| Transport & Protocol | 20 | JSON-RPC, initialization, capabilities, versioning |
|
|
66
|
+
| Security & Best Practices | 20 | Input validation, authorization, error handling |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Auto-Fail Conditions
|
|
71
|
+
|
|
72
|
+
Critical issues that trigger immediate FAIL regardless of score:
|
|
73
|
+
|
|
74
|
+
| ID | Condition |
|
|
75
|
+
|----|-----------|
|
|
76
|
+
| **AF-001** | Missing JSON-RPC message handling |
|
|
77
|
+
| **AF-002** | No capability declaration in server initialization |
|
|
78
|
+
| **AF-003** | Tools without inputSchema definitions |
|
|
79
|
+
| **AF-004** | Hardcoded secrets in tool implementations |
|
|
80
|
+
| **AF-005** | No error handling for tool execution failures |
|
|
81
|
+
| **AF-006** | Direct eval() or exec() of user-provided input |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Decision Thresholds
|
|
86
|
+
|
|
87
|
+
| Score | Decision | Meaning |
|
|
88
|
+
|-------|----------|---------|
|
|
89
|
+
| **>=80** | ✅ PASS | Validation passed, proceed to next phase |
|
|
90
|
+
| **<80** | ❌ FAIL | Validation failed, fix issues before proceeding |
|
|
91
|
+
|
|
92
|
+
**Note:** Any critical issue triggers FAIL regardless of score.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## PERSIST TO TRACKER (Required)
|
|
98
|
+
|
|
99
|
+
> **IMPORTANT:** Save to tracker IMMEDIATELY after agent completes, BEFORE presenting the summary to the user. The workflow is not complete until results are persisted.
|
|
100
|
+
**1. Get token metrics from buffer:**
|
|
101
|
+
```bash
|
|
102
|
+
agent-metrics buffer list --since 5m -f tracker
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**2. Save to tracker (DO THIS FIRST):**
|
|
106
|
+
|
|
107
|
+
mcp__uluops-tracker__save_features_list
|
|
108
|
+
|
|
109
|
+
**3. Verify saved:** Compare `json.summary.total_issues` with saved count.
|
|
110
|
+
|
|
111
|
+
**4. THEN present summary to user.**
|
|
112
|
+
|
|
113
|
+
### Field Mappings
|
|
114
|
+
|
|
115
|
+
**From JSON OUTPUT to Tracker:**
|
|
116
|
+
| Source | Tracker Field | Notes |
|
|
117
|
+
|--------|---------------|-------|
|
|
118
|
+
| `json.result.score` | `validators[].score` | Total score |
|
|
119
|
+
| `json.result.decision` | `validators[].status` | PASS/FAIL |
|
|
120
|
+
| `buffer.model` | `validators[].model` | From agent-metrics buffer |
|
|
121
|
+
| `buffer.tokens.input_tokens` | `input_tokens` | Raw input tokens |
|
|
122
|
+
| `buffer.tokens.output_tokens` | `output_tokens` | Output tokens |
|
|
123
|
+
| `buffer.tokens.cache_creation_tokens` | `cache_creation_tokens` | Cache creation |
|
|
124
|
+
| `buffer.tokens.cache_read_tokens` | `cache_read_tokens` | Cache reads |
|
|
125
|
+
| `buffer.tokens.total_effective_tokens` | `total_effective_tokens` | Effective total |
|
|
126
|
+
| `json.categories[].findings[].issues[]` | `recommendations[]` | Flatten nested structure |
|
|
127
|
+
|
|
128
|
+
**Note:** `json` = agent's JSON OUTPUT, `buffer` = `agent-metrics buffer list -f tracker`
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Source
|
|
133
|
+
|
|
134
|
+
**CDL Schema:** `udl/definition-languages/cdl-schema-v1.1.0.json`
|
|
135
|
+
**CDL Source:** `/home/alexs/uluops/uluops-agent-workflows/udl/cdl/v1/mcp-validate.command.yaml`
|
|
136
|
+
**Agent:** `agents/mcp-validator-agent.md`
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: optimize
|
|
3
|
+
description: Run Optimizer agent on a project/directory. Analyzes structure, performance, bundle hygiene, and maintainability. Reports only - does not auto-apply changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Optimizer
|
|
7
|
+
Run Optimizer agent on a project/directory. Analyzes structure, performance, bundle hygiene, and maintainability. Reports only - does not auto-apply changes.
|
|
8
|
+
|
|
9
|
+
## Arguments
|
|
10
|
+
|
|
11
|
+
**Usage:** `/agents:optimize <directory>`
|
|
12
|
+
|
|
13
|
+
**Examples:**
|
|
14
|
+
- `/agents:optimize ./src`
|
|
15
|
+
- `/agents:optimize ./packages/api`
|
|
16
|
+
- `/agents:optimize .`
|
|
17
|
+
|
|
18
|
+
**Target Directory:** $ARGUMENTS
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Pre-Flight
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
echo "Running code optimization analysis on $ARGUMENTS..."
|
|
26
|
+
echo "==================================================="
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Verify the target directory exists:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
test -d "$ARGUMENTS" && echo "✓ Directory exists: $ARGUMENTS" || echo "ERROR: Directory '$ARGUMENTS' not found"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Enter and confirm location:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd "$ARGUMENTS" && pwd
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Check path exists:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
[ -e "$ARGUMENTS" ] && echo "✓ $ARGUMENTS exists" || echo "Target directory does not exist"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Agent Invocation
|
|
51
|
+
|
|
52
|
+
Run the Code Optimizer agent on the validated target directory:
|
|
53
|
+
|
|
54
|
+
**Agent:** code-optimizer-agent.md
|
|
55
|
+
**Model:** Sonnet
|
|
56
|
+
**Target:** $ARGUMENTS
|
|
57
|
+
|
|
58
|
+
The agent performs code quality validation across 4 categories (100 points total):
|
|
59
|
+
|
|
60
|
+
| Category | Points | Focus |
|
|
61
|
+
|----------|--------|-------|
|
|
62
|
+
| Structure & Duplication | 30 | Code organization, DRY principles, module responsibilities |
|
|
63
|
+
| Performance & Hot Paths | 25 | Async patterns, allocations, request handling, retry logic |
|
|
64
|
+
| Bundle & Dependencies | 20 | Unused code removal, dependency hygiene, tree-shaking |
|
|
65
|
+
| Readability & Maintainability | 25 | Naming, function size, comments, types, code style |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Auto-Fail Conditions
|
|
70
|
+
|
|
71
|
+
Critical issues that trigger immediate FAIL regardless of score:
|
|
72
|
+
|
|
73
|
+
| ID | Condition |
|
|
74
|
+
|----|-----------|
|
|
75
|
+
| **AF-001** | Recommended refactor would change public API signatures |
|
|
76
|
+
| **AF-002** | Refactor requires modifying tests to pass |
|
|
77
|
+
| **AF-003** | Performance optimization trades correctness for speed |
|
|
78
|
+
| **AF-004** | Unsafe memory patterns or race conditions introduced |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Decision Thresholds
|
|
83
|
+
|
|
84
|
+
| Score | Decision | Meaning |
|
|
85
|
+
|-------|----------|---------|
|
|
86
|
+
| **>=80** | ✅ PASS | Validation passed, proceed to next phase |
|
|
87
|
+
| **<80** | ❌ FAIL | Validation failed, fix issues before proceeding |
|
|
88
|
+
|
|
89
|
+
**Note:** Any critical issue triggers FAIL regardless of score.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## PERSIST TO TRACKER (Required)
|
|
95
|
+
|
|
96
|
+
> **IMPORTANT:** Save to tracker IMMEDIATELY after agent completes, BEFORE presenting the summary to the user. The workflow is not complete until results are persisted.
|
|
97
|
+
**1. Get token metrics from buffer:**
|
|
98
|
+
```bash
|
|
99
|
+
agent-metrics buffer list --since 5m -f tracker
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**2. Save to tracker (DO THIS FIRST):**
|
|
103
|
+
|
|
104
|
+
mcp__uluops-tracker__save_features_list
|
|
105
|
+
|
|
106
|
+
**3. Verify saved:** Compare `json.summary.total_issues` with saved count.
|
|
107
|
+
|
|
108
|
+
**4. THEN present summary to user.**
|
|
109
|
+
|
|
110
|
+
### Field Mappings
|
|
111
|
+
|
|
112
|
+
**From JSON OUTPUT to Tracker:**
|
|
113
|
+
| Source | Tracker Field | Notes |
|
|
114
|
+
|--------|---------------|-------|
|
|
115
|
+
| `json.result.score` | `validators[].score` | Total score |
|
|
116
|
+
| `json.result.decision` | `validators[].status` | PASS/FAIL |
|
|
117
|
+
| `buffer.model` | `validators[].model` | From agent-metrics buffer |
|
|
118
|
+
| `buffer.tokens.input_tokens` | `input_tokens` | Raw input tokens |
|
|
119
|
+
| `buffer.tokens.output_tokens` | `output_tokens` | Output tokens |
|
|
120
|
+
| `buffer.tokens.cache_creation_tokens` | `cache_creation_tokens` | Cache creation |
|
|
121
|
+
| `buffer.tokens.cache_read_tokens` | `cache_read_tokens` | Cache reads |
|
|
122
|
+
| `buffer.tokens.total_effective_tokens` | `total_effective_tokens` | Effective total |
|
|
123
|
+
| `json.categories[].findings[].issues[]` | `recommendations[]` | Flatten nested structure |
|
|
124
|
+
|
|
125
|
+
**Note:** `json` = agent's JSON OUTPUT, `buffer` = `agent-metrics buffer list -f tracker`
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Source
|
|
130
|
+
|
|
131
|
+
**CDL Schema:** `udl/definition-languages/cdl-schema-v1.1.0.json`
|
|
132
|
+
**CDL Source:** `/home/alexs/uluops/uluops-agent-workflows/udl/cdl/v1/optimize.command.yaml`
|
|
133
|
+
**Agent:** `agents/code-optimizer-agent.md`
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pattern-analyzer
|
|
3
|
+
description: Analyzes ecosystem-wide patterns across all agents, commands, and workflows. Detects conventions, identifies inconsistencies, and learns from validation failures.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pattern Analyzer
|
|
7
|
+
Analyzes ecosystem-wide patterns across all agents, commands, and workflows. Detects conventions, identifies inconsistencies, and learns from validation failures.
|
|
8
|
+
|
|
9
|
+
## Arguments
|
|
10
|
+
|
|
11
|
+
**Usage:** `/agents:pattern-analyzer <directory>`
|
|
12
|
+
|
|
13
|
+
**Examples:**
|
|
14
|
+
- `/agents:pattern-analyzer agents/`
|
|
15
|
+
- `/agents:pattern-analyzer commands/`
|
|
16
|
+
- `/agents:pattern-analyzer .`
|
|
17
|
+
|
|
18
|
+
**Target Directory:** $ARGUMENTS
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Pre-Flight
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
echo "Running pattern analysis..."
|
|
26
|
+
echo "==========================="
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Verify the target directory exists:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
test -d "$ARGUMENTS" && echo "✓ Directory exists: $ARGUMENTS" || echo "ERROR: Directory '$ARGUMENTS' not found"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Enter and confirm location:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd "$ARGUMENTS" && pwd
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Agent Invocation
|
|
45
|
+
|
|
46
|
+
Run the Pattern Analyzer agent on the validated target directory:
|
|
47
|
+
|
|
48
|
+
**Agent:** prompt-pattern-analyzer-agent.md
|
|
49
|
+
**Model:** Sonnet
|
|
50
|
+
**Target:** $ARGUMENTS
|
|
51
|
+
|
|
52
|
+
The agent performs code quality validation across 4 categories (100 points total):
|
|
53
|
+
|
|
54
|
+
| Category | Points | Focus |
|
|
55
|
+
|----------|--------|-------|
|
|
56
|
+
| Convention Extraction | 25 | Identifies scoring frameworks, decision keywords, thresholds, and structural patterns |
|
|
57
|
+
| Consistency Analysis | 30 | Measures terminology variance, flags outliers, quantifies drift |
|
|
58
|
+
| Evolution Opportunities | 25 | Identifies redundancy, refactoring opportunities, and emerging best practices |
|
|
59
|
+
| Failure Pattern Learning | 20 | Analyzes historical audit scores and extracts common failure modes |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Auto-Fail Conditions
|
|
64
|
+
|
|
65
|
+
Critical issues that trigger immediate FAIL regardless of score:
|
|
66
|
+
|
|
67
|
+
| ID | Condition |
|
|
68
|
+
|----|-----------|
|
|
69
|
+
| **AF-001** | Fewer than 5 agents in ecosystem |
|
|
70
|
+
| **AF-002** | No agents discovered at expected paths |
|
|
71
|
+
| **AF-003** | High variance prevents pattern extraction |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Decision Thresholds
|
|
76
|
+
|
|
77
|
+
| Score | Decision | Meaning |
|
|
78
|
+
|-------|----------|---------|
|
|
79
|
+
| **>=75** | ✅ PASS | Validation passed, proceed to next phase |
|
|
80
|
+
| **<75** | ❌ FAIL | Validation failed, fix issues before proceeding |
|
|
81
|
+
|
|
82
|
+
**Note:** Any critical issue triggers FAIL regardless of score.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## PERSIST TO TRACKER (Required)
|
|
88
|
+
|
|
89
|
+
> **IMPORTANT:** Save to tracker IMMEDIATELY after agent completes, BEFORE presenting the summary to the user. The workflow is not complete until results are persisted.
|
|
90
|
+
**1. Get token metrics from buffer:**
|
|
91
|
+
```bash
|
|
92
|
+
agent-metrics buffer list --since 5m -f tracker
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**2. Save to tracker (DO THIS FIRST):**
|
|
96
|
+
|
|
97
|
+
mcp__uluops-tracker__save_features_list
|
|
98
|
+
|
|
99
|
+
**3. Verify saved:** Compare `json.summary.total_issues` with saved count.
|
|
100
|
+
|
|
101
|
+
**4. THEN present summary to user.**
|
|
102
|
+
|
|
103
|
+
### Field Mappings
|
|
104
|
+
|
|
105
|
+
**From JSON OUTPUT to Tracker:**
|
|
106
|
+
| Source | Tracker Field | Notes |
|
|
107
|
+
|--------|---------------|-------|
|
|
108
|
+
| `json.result.score` | `validators[].score` | Total score |
|
|
109
|
+
| `json.result.decision` | `validators[].status` | PASS/FAIL |
|
|
110
|
+
| `buffer.model` | `validators[].model` | From agent-metrics buffer |
|
|
111
|
+
| `buffer.tokens.input_tokens` | `input_tokens` | Raw input tokens |
|
|
112
|
+
| `buffer.tokens.output_tokens` | `output_tokens` | Output tokens |
|
|
113
|
+
| `buffer.tokens.cache_creation_tokens` | `cache_creation_tokens` | Cache creation |
|
|
114
|
+
| `buffer.tokens.cache_read_tokens` | `cache_read_tokens` | Cache reads |
|
|
115
|
+
| `buffer.tokens.total_effective_tokens` | `total_effective_tokens` | Effective total |
|
|
116
|
+
| `json.categories[].findings[].issues[]` | `recommendations[]` | Flatten nested structure |
|
|
117
|
+
|
|
118
|
+
**Note:** `json` = agent's JSON OUTPUT, `buffer` = `agent-metrics buffer list -f tracker`
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Source
|
|
123
|
+
|
|
124
|
+
**CDL Schema:** `udl/definition-languages/cdl-schema-v1.1.0.json`
|
|
125
|
+
**CDL Source:** `/home/alexs/uluops/uluops-agent-workflows/udl/cdl/v1/pattern-analyzer.command.yaml`
|
|
126
|
+
**Agent:** `agents/prompt-pattern-analyzer-agent.md`
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prompt-quality
|
|
3
|
+
description: Validates prompts against prompt engineering best practices for clarity, context, structure, and effectiveness.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prompt Quality Validator
|
|
7
|
+
Validates prompts against prompt engineering best practices for clarity, context, structure, and effectiveness.
|
|
8
|
+
|
|
9
|
+
## Arguments
|
|
10
|
+
|
|
11
|
+
**Usage:** `/agents:prompt-quality <directory>`
|
|
12
|
+
|
|
13
|
+
**Examples:**
|
|
14
|
+
- `/agents:prompt-quality agents/my-agent.md`
|
|
15
|
+
- `/agents:prompt-quality commands/my-cmd.md`
|
|
16
|
+
|
|
17
|
+
**Target Directory:** $ARGUMENTS
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Pre-Flight
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
echo "Running prompt quality validation on $ARGUMENTS..."
|
|
25
|
+
echo "=================================================="
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Verify the target directory exists:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
test -d "$ARGUMENTS" && echo "✓ Directory exists: $ARGUMENTS" || echo "ERROR: Directory '$ARGUMENTS' not found"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Enter and confirm location:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cd "$ARGUMENTS" && pwd
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Check file exists:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
[ -f "$ARGUMENTS" ] && echo "✓ $ARGUMENTS found" || echo "Target file does not exist"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Agent Invocation
|
|
50
|
+
|
|
51
|
+
Run the Prompt Quality Validator agent on the validated target directory:
|
|
52
|
+
|
|
53
|
+
**Agent:** prompt-quality-validator-agent.md
|
|
54
|
+
**Model:** Sonnet
|
|
55
|
+
**Target:** $ARGUMENTS
|
|
56
|
+
|
|
57
|
+
The agent performs code quality validation across 5 categories (100 points total):
|
|
58
|
+
|
|
59
|
+
| Category | Points | Focus |
|
|
60
|
+
|----------|--------|-------|
|
|
61
|
+
| Clarity & Specificity | 25 | Validates task definition, scope, format, vagueness, and examples |
|
|
62
|
+
| Context & Background | 20 | Validates context sufficiency, audience, constraints, and role assignment |
|
|
63
|
+
| Structure & Organization | 20 | Validates section headers, step decomposition, formatting, and modularity |
|
|
64
|
+
| Effectiveness Techniques | 20 | Validates few-shot examples, chain-of-thought, error prevention, and edge cases |
|
|
65
|
+
| Quality Assurance | 15 | Validates success criteria, testability, and instruction consistency |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Auto-Fail Conditions
|
|
70
|
+
|
|
71
|
+
Critical issues that trigger immediate FAIL regardless of score:
|
|
72
|
+
|
|
73
|
+
| ID | Condition |
|
|
74
|
+
|----|-----------|
|
|
75
|
+
| **AF-001** | Missing task definition/mission |
|
|
76
|
+
| **AF-002** | No output format specification |
|
|
77
|
+
| **AF-003** | Conflicting instructions detected |
|
|
78
|
+
| **AF-004** | More than 3 vague qualifiers in directives |
|
|
79
|
+
| **AF-005** | Complex pattern with zero examples |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Decision Thresholds
|
|
84
|
+
|
|
85
|
+
| Score | Decision | Meaning |
|
|
86
|
+
|-------|----------|---------|
|
|
87
|
+
| **>=75** | ✅ PASS | Validation passed, proceed to next phase |
|
|
88
|
+
| **<75** | ❌ FAIL | Validation failed, fix issues before proceeding |
|
|
89
|
+
|
|
90
|
+
**Note:** Any critical issue triggers FAIL regardless of score.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## PERSIST TO TRACKER (Required)
|
|
96
|
+
|
|
97
|
+
> **IMPORTANT:** Save to tracker IMMEDIATELY after agent completes, BEFORE presenting the summary to the user. The workflow is not complete until results are persisted.
|
|
98
|
+
**1. Get token metrics from buffer:**
|
|
99
|
+
```bash
|
|
100
|
+
agent-metrics buffer list --since 5m -f tracker
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**2. Save to tracker (DO THIS FIRST):**
|
|
104
|
+
|
|
105
|
+
mcp__uluops-tracker__save_features_list
|
|
106
|
+
|
|
107
|
+
**3. Verify saved:** Compare `json.summary.total_issues` with saved count.
|
|
108
|
+
|
|
109
|
+
**4. THEN present summary to user.**
|
|
110
|
+
|
|
111
|
+
### Field Mappings
|
|
112
|
+
|
|
113
|
+
**From JSON OUTPUT to Tracker:**
|
|
114
|
+
| Source | Tracker Field | Notes |
|
|
115
|
+
|--------|---------------|-------|
|
|
116
|
+
| `json.result.score` | `validators[].score` | Total score |
|
|
117
|
+
| `json.result.decision` | `validators[].status` | PASS/FAIL |
|
|
118
|
+
| `buffer.model` | `validators[].model` | From agent-metrics buffer |
|
|
119
|
+
| `buffer.tokens.input_tokens` | `input_tokens` | Raw input tokens |
|
|
120
|
+
| `buffer.tokens.output_tokens` | `output_tokens` | Output tokens |
|
|
121
|
+
| `buffer.tokens.cache_creation_tokens` | `cache_creation_tokens` | Cache creation |
|
|
122
|
+
| `buffer.tokens.cache_read_tokens` | `cache_read_tokens` | Cache reads |
|
|
123
|
+
| `buffer.tokens.total_effective_tokens` | `total_effective_tokens` | Effective total |
|
|
124
|
+
| `json.categories[].findings[].issues[]` | `recommendations[]` | Flatten nested structure |
|
|
125
|
+
|
|
126
|
+
**Note:** `json` = agent's JSON OUTPUT, `buffer` = `agent-metrics buffer list -f tracker`
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Source
|
|
131
|
+
|
|
132
|
+
**CDL Schema:** `udl/definition-languages/cdl-schema-v1.1.0.json`
|
|
133
|
+
**CDL Source:** `/home/alexs/uluops/uluops-agent-workflows/udl/cdl/v1/prompt-quality.command.yaml`
|
|
134
|
+
**Agent:** `agents/prompt-quality-validator-agent.md`
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prompt-validate
|
|
3
|
+
description: Validates AI agent prompts for quality and consistency before deployment. Run before adding new agents to the project.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prompt Validator
|
|
7
|
+
Validates AI agent prompts for quality and consistency before deployment. Run before adding new agents to the project.
|
|
8
|
+
|
|
9
|
+
## Arguments
|
|
10
|
+
|
|
11
|
+
**Usage:** `/agents:prompt-validate <directory>`
|
|
12
|
+
|
|
13
|
+
**Examples:**
|
|
14
|
+
- `/agents:prompt-validate agents/my-agent.md`
|
|
15
|
+
- `/agents:prompt-validate vdl/my-validator.yaml`
|
|
16
|
+
|
|
17
|
+
**Target Directory:** $ARGUMENTS
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Pre-Flight
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
echo "Running prompt validation on $ARGUMENTS..."
|
|
25
|
+
echo "=========================================="
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Verify the target directory exists:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
test -d "$ARGUMENTS" && echo "✓ Directory exists: $ARGUMENTS" || echo "ERROR: Directory '$ARGUMENTS' not found"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Enter and confirm location:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cd "$ARGUMENTS" && pwd
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Check file exists:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
[ -f "$ARGUMENTS" ] && echo "✓ $ARGUMENTS found" || echo "Target file does not exist"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Agent Invocation
|
|
50
|
+
|
|
51
|
+
Run the Prompt Validator agent on the validated target directory:
|
|
52
|
+
|
|
53
|
+
**Agent:** prompt-engineer-agent.md
|
|
54
|
+
**Model:** Sonnet
|
|
55
|
+
**Target:** $ARGUMENTS
|
|
56
|
+
|
|
57
|
+
The agent performs code quality validation across 5 categories (100 points total):
|
|
58
|
+
|
|
59
|
+
| Category | Points | Focus |
|
|
60
|
+
|----------|--------|-------|
|
|
61
|
+
| Clarity & Specificity | 25 | Mission is unambiguous, success criteria explicit, output format clear |
|
|
62
|
+
| Structure & Organization | 20 | Logical flow, consistent formatting, and information hierarchy |
|
|
63
|
+
| Completeness | 25 | Edge cases, fallbacks, error handling, examples, and constraints |
|
|
64
|
+
| Effectiveness | 20 | Scoring is actionable, criteria measurable, output usable |
|
|
65
|
+
| Consistency | 10 | Adherence to project conventions and terminology |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Auto-Fail Conditions
|
|
70
|
+
|
|
71
|
+
Critical issues that trigger immediate FAIL regardless of score:
|
|
72
|
+
|
|
73
|
+
| ID | Condition |
|
|
74
|
+
|----|-----------|
|
|
75
|
+
| **AF-001** | Undefined or vague mission statement |
|
|
76
|
+
| **AF-002** | No output format specification |
|
|
77
|
+
| **AF-003** | Conflicting instructions in different sections |
|
|
78
|
+
| **AF-004** | Subjective-only decision criteria |
|
|
79
|
+
| **AF-005** | Missing error/edge case handling |
|
|
80
|
+
| **AF-006** | Scoring points that cannot be objectively verified |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Decision Thresholds
|
|
85
|
+
|
|
86
|
+
| Score | Decision | Meaning |
|
|
87
|
+
|-------|----------|---------|
|
|
88
|
+
| **>=75** | ✅ PASS | Validation passed, proceed to next phase |
|
|
89
|
+
| **<75** | ❌ FAIL | Validation failed, fix issues before proceeding |
|
|
90
|
+
|
|
91
|
+
**Note:** Any critical issue triggers FAIL regardless of score.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## PERSIST TO TRACKER (Required)
|
|
97
|
+
|
|
98
|
+
> **IMPORTANT:** Save to tracker IMMEDIATELY after agent completes, BEFORE presenting the summary to the user. The workflow is not complete until results are persisted.
|
|
99
|
+
**1. Get token metrics from buffer:**
|
|
100
|
+
```bash
|
|
101
|
+
agent-metrics buffer list --since 5m -f tracker
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**2. Save to tracker (DO THIS FIRST):**
|
|
105
|
+
|
|
106
|
+
mcp__uluops-tracker__save_features_list
|
|
107
|
+
|
|
108
|
+
**3. Verify saved:** Compare `json.summary.total_issues` with saved count.
|
|
109
|
+
|
|
110
|
+
**4. THEN present summary to user.**
|
|
111
|
+
|
|
112
|
+
### Field Mappings
|
|
113
|
+
|
|
114
|
+
**From JSON OUTPUT to Tracker:**
|
|
115
|
+
| Source | Tracker Field | Notes |
|
|
116
|
+
|--------|---------------|-------|
|
|
117
|
+
| `json.result.score` | `validators[].score` | Total score |
|
|
118
|
+
| `json.result.decision` | `validators[].status` | PASS/FAIL |
|
|
119
|
+
| `buffer.model` | `validators[].model` | From agent-metrics buffer |
|
|
120
|
+
| `buffer.tokens.input_tokens` | `input_tokens` | Raw input tokens |
|
|
121
|
+
| `buffer.tokens.output_tokens` | `output_tokens` | Output tokens |
|
|
122
|
+
| `buffer.tokens.cache_creation_tokens` | `cache_creation_tokens` | Cache creation |
|
|
123
|
+
| `buffer.tokens.cache_read_tokens` | `cache_read_tokens` | Cache reads |
|
|
124
|
+
| `buffer.tokens.total_effective_tokens` | `total_effective_tokens` | Effective total |
|
|
125
|
+
| `json.categories[].findings[].issues[]` | `recommendations[]` | Flatten nested structure |
|
|
126
|
+
|
|
127
|
+
**Note:** `json` = agent's JSON OUTPUT, `buffer` = `agent-metrics buffer list -f tracker`
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Source
|
|
132
|
+
|
|
133
|
+
**CDL Schema:** `udl/definition-languages/cdl-schema-v1.1.0.json`
|
|
134
|
+
**CDL Source:** `/home/alexs/uluops/uluops-agent-workflows/udl/cdl/v1/prompt-validate.command.yaml`
|
|
135
|
+
**Agent:** `agents/prompt-engineer-agent.md`
|