@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.
Files changed (107) hide show
  1. package/README.md +178 -0
  2. package/assets/agents/api-contract-validator-agent.md +960 -0
  3. package/assets/agents/aristotle-analyst-agent.md +705 -0
  4. package/assets/agents/aristotle-explorer-agent.md +152 -0
  5. package/assets/agents/aristotle-forecaster-agent.md +666 -0
  6. package/assets/agents/aristotle-validator-agent.md +667 -0
  7. package/assets/agents/assumption-excavator-agent.md +1354 -0
  8. package/assets/agents/code-auditor-agent.md +1061 -0
  9. package/assets/agents/code-optimizer-agent.md +876 -0
  10. package/assets/agents/code-validator-agent.md +846 -0
  11. package/assets/agents/docs-validator-agent.md +490 -0
  12. package/assets/agents/frontend-validator-agent.md +844 -0
  13. package/assets/agents/mcp-validator-agent.md +827 -0
  14. package/assets/agents/pre-implementation-architect-agent.md +1036 -0
  15. package/assets/agents/prompt-engineer-agent.md +1158 -0
  16. package/assets/agents/prompt-pattern-analyzer-agent.md +907 -0
  17. package/assets/agents/prompt-quality-validator-agent.md +1018 -0
  18. package/assets/agents/public-interface-validator-agent.md +951 -0
  19. package/assets/agents/release-readiness-agent.md +482 -0
  20. package/assets/agents/security-analyst-agent.md +1093 -0
  21. package/assets/agents/test-architect-agent.md +861 -0
  22. package/assets/agents/type-safety-validator-agent.md +932 -0
  23. package/assets/agents/workflow-synthesis-agent.md +836 -0
  24. package/assets/commands/agents/api-contract.md +135 -0
  25. package/assets/commands/agents/architect.md +135 -0
  26. package/assets/commands/agents/aristotle-analyst.md +115 -0
  27. package/assets/commands/agents/aristotle-explorer.md +92 -0
  28. package/assets/commands/agents/aristotle-forecaster.md +114 -0
  29. package/assets/commands/agents/aristotle-validator.md +114 -0
  30. package/assets/commands/agents/assumption-excavator.md +114 -0
  31. package/assets/commands/agents/audit.md +136 -0
  32. package/assets/commands/agents/docs-validate.md +133 -0
  33. package/assets/commands/agents/frontend.md +135 -0
  34. package/assets/commands/agents/mcp-validate.md +136 -0
  35. package/assets/commands/agents/optimize.md +133 -0
  36. package/assets/commands/agents/pattern-analyzer.md +126 -0
  37. package/assets/commands/agents/prompt-quality.md +134 -0
  38. package/assets/commands/agents/prompt-validate.md +135 -0
  39. package/assets/commands/agents/public-interface.md +134 -0
  40. package/assets/commands/agents/release.md +135 -0
  41. package/assets/commands/agents/security.md +137 -0
  42. package/assets/commands/agents/test-review.md +136 -0
  43. package/assets/commands/agents/type-safety.md +135 -0
  44. package/assets/commands/agents/validate.md +134 -0
  45. package/assets/commands/agents/workflow-synthesis.md +101 -0
  46. package/assets/commands/workflows/aristotle.md +543 -0
  47. package/assets/commands/workflows/post-implementation.md +577 -0
  48. package/assets/commands/workflows/pre-implementation.md +670 -0
  49. package/assets/commands/workflows/prompt-audit.md +754 -0
  50. package/assets/commands/workflows/ship.md +721 -0
  51. package/dist/cli.d.ts +2 -0
  52. package/dist/cli.js +436 -0
  53. package/dist/lib/config-merger.d.ts +26 -0
  54. package/dist/lib/config-merger.js +63 -0
  55. package/dist/lib/file-ops.d.ts +23 -0
  56. package/dist/lib/file-ops.js +86 -0
  57. package/dist/lib/hash.d.ts +1 -0
  58. package/dist/lib/hash.js +4 -0
  59. package/dist/lib/manifest.d.ts +16 -0
  60. package/dist/lib/manifest.js +34 -0
  61. package/dist/lib/paths.d.ts +14 -0
  62. package/dist/lib/paths.js +49 -0
  63. package/dist/lib/settings-merger.d.ts +43 -0
  64. package/dist/lib/settings-merger.js +91 -0
  65. package/dist/steps/agents.d.ts +8 -0
  66. package/dist/steps/agents.js +14 -0
  67. package/dist/steps/auth.d.ts +12 -0
  68. package/dist/steps/auth.js +80 -0
  69. package/dist/steps/commands.d.ts +9 -0
  70. package/dist/steps/commands.js +69 -0
  71. package/dist/steps/detect.d.ts +9 -0
  72. package/dist/steps/detect.js +30 -0
  73. package/dist/steps/mcp.d.ts +6 -0
  74. package/dist/steps/mcp.js +40 -0
  75. package/dist/steps/metrics.d.ts +22 -0
  76. package/dist/steps/metrics.js +176 -0
  77. package/dist/steps/shell.d.ts +2 -0
  78. package/dist/steps/shell.js +48 -0
  79. package/dist/steps/signup.d.ts +13 -0
  80. package/dist/steps/signup.js +92 -0
  81. package/dist/steps/verify.d.ts +10 -0
  82. package/dist/steps/verify.js +184 -0
  83. package/dist/test/auth.test.d.ts +1 -0
  84. package/dist/test/auth.test.js +43 -0
  85. package/dist/test/config-io.test.d.ts +1 -0
  86. package/dist/test/config-io.test.js +56 -0
  87. package/dist/test/config-merger.test.d.ts +1 -0
  88. package/dist/test/config-merger.test.js +94 -0
  89. package/dist/test/detect.test.d.ts +1 -0
  90. package/dist/test/detect.test.js +25 -0
  91. package/dist/test/file-ops.test.d.ts +1 -0
  92. package/dist/test/file-ops.test.js +100 -0
  93. package/dist/test/hash.test.d.ts +1 -0
  94. package/dist/test/hash.test.js +14 -0
  95. package/dist/test/manifest.test.d.ts +1 -0
  96. package/dist/test/manifest.test.js +78 -0
  97. package/dist/test/paths.test.d.ts +1 -0
  98. package/dist/test/paths.test.js +30 -0
  99. package/dist/test/settings-merger.test.d.ts +1 -0
  100. package/dist/test/settings-merger.test.js +167 -0
  101. package/dist/test/shell-profile.test.d.ts +1 -0
  102. package/dist/test/shell-profile.test.js +40 -0
  103. package/dist/test/shell.test.d.ts +1 -0
  104. package/dist/test/shell.test.js +71 -0
  105. package/dist/test/signup.test.d.ts +1 -0
  106. package/dist/test/signup.test.js +83 -0
  107. package/package.json +36 -0
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: public-interface
3
+ description: Validates public-facing quality - README accuracy, unused imports, dead code, export hygiene, error messages. Use AFTER test-architect passes.
4
+ ---
5
+
6
+ # Public Interface Validator
7
+ Validates public-facing quality - README accuracy, unused imports, dead code, export hygiene, error messages. Use AFTER test-architect passes.
8
+
9
+ ## Arguments
10
+
11
+ **Usage:** `/agents:public-interface <directory>`
12
+
13
+ **Examples:**
14
+ - `/agents:public-interface ./packages/sdk`
15
+ - `/agents:public-interface ./lib`
16
+ - `/agents:public-interface .`
17
+
18
+ **Target Directory:** $ARGUMENTS
19
+
20
+ ---
21
+
22
+ ## Pre-Flight
23
+
24
+ ```bash
25
+ echo "Running public interface 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 Public Interface Validator agent on the validated target directory:
53
+
54
+ **Agent:** public-interface-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
+ | Feature Completeness | 30 | All major capabilities documented in README with examples |
63
+ | Documentation Accuracy | 25 | README examples work and match current API |
64
+ | Code Hygiene | 20 | Clean code without dead weight |
65
+ | Export Quality | 15 | Public exports are documented and intentional |
66
+ | Consumer Experience | 10 | Library is pleasant to use |
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** | No README.md exists |
77
+ | **AF-002** | Major feature completely missing from README |
78
+ | **AF-003** | README examples reference non-existent exports |
79
+ | **AF-004** | README title/description misleading about capabilities |
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/public-interface.command.yaml`
134
+ **Agent:** `agents/public-interface-validator-agent.md`
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: release
3
+ description: Final release gate for packages and CLI tools. Validates version consistency, CLI --version, package.json, and docs. Detects semantic-release CI/CD vs manual publishing.
4
+ ---
5
+
6
+ # Release Readiness
7
+ Final release gate for packages and CLI tools. Validates version consistency, CLI --version, package.json, and docs. Detects semantic-release CI/CD vs manual publishing.
8
+
9
+ ## Arguments
10
+
11
+ **Usage:** `/agents:release <directory>`
12
+
13
+ **Examples:**
14
+ - `/agents:release ./packages/sdk`
15
+ - `/agents:release .`
16
+ - `/agents:release ./lib`
17
+
18
+ **Target Directory:** $ARGUMENTS
19
+
20
+ ---
21
+
22
+ ## Pre-Flight
23
+
24
+ ```bash
25
+ echo "Running release readiness check 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 Release Readiness agent on the validated target directory:
53
+
54
+ **Agent:** release-readiness-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
+ | Version Consistency | 25 | Validates package.json version matches CLI output and CHANGELOG |
63
+ | Package Configuration | 25 | Validates package.json fields, exports, and entry points |
64
+ | Documentation | 25 | Validates README, CHANGELOG, and API documentation |
65
+ | Release Hygiene | 25 | Validates no debug code, no secrets, fresh build |
66
+
67
+ ---
68
+
69
+ ## Auto-Fail Conditions
70
+
71
+ Critical issues that trigger immediate FAIL regardless of score:
72
+
73
+ | ID | Condition |
74
+ |----|-----------|
75
+ | **** | CLI --version does not match package.json version |
76
+ | **** | Missing CHANGELOG entry for current version |
77
+ | **** | Secrets or API keys in codebase |
78
+ | **** | README.md is missing |
79
+ | **** | Build artifacts stale or missing |
80
+ | **** | console.log in production paths (for libraries) |
81
+
82
+ ---
83
+
84
+ ## Decision Thresholds
85
+
86
+ | Score | Decision | Meaning |
87
+ |-------|----------|---------|
88
+ | **>=80** | ✅ PASS | Validation passed, proceed to next phase |
89
+ | **<80** | ❌ 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/release.command.yaml`
135
+ **Agent:** `agents/release-readiness-agent.md`
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: security
3
+ description: Run comprehensive security audit on a project. Use as FINAL gate before deployment. Scans for vulnerabilities, OWASP compliance, and security best practices.
4
+ ---
5
+
6
+ # Security Analyst
7
+ Run comprehensive security audit on a project. Use as FINAL gate before deployment. Scans for vulnerabilities, OWASP compliance, and security best practices.
8
+
9
+ ## Arguments
10
+
11
+ **Usage:** `/agents:security <directory>`
12
+
13
+ **Examples:**
14
+ - `/agents:security ./src`
15
+ - `/agents:security ./services/auth`
16
+ - `/agents:security .`
17
+
18
+ **Target Directory:** $ARGUMENTS
19
+
20
+ ---
21
+
22
+ ## Pre-Flight
23
+
24
+ ```bash
25
+ echo "Running security audit 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 Security Analyst agent on the validated target directory:
53
+
54
+ **Agent:** security-analyst-agent.md
55
+ **Model:** Sonnet
56
+ **Target:** $ARGUMENTS
57
+
58
+ The agent performs code quality validation across 6 categories (100 points total):
59
+
60
+ | Category | Points | Focus |
61
+ |----------|--------|-------|
62
+ | Secrets & Credentials | 20 | No hardcoded keys, passwords, or tokens in code |
63
+ | Injection Prevention | 20 | SQL, command, XSS, and path traversal prevention |
64
+ | Authentication & Authorization | 20 | JWT handling, password hashing, and access control |
65
+ | Data Protection | 15 | Secure cookies, encryption, and PII handling |
66
+ | Dependencies | 15 | npm audit clean and no known vulnerabilities |
67
+ | Security Configuration | 10 | Headers, CORS, error handling, debug mode |
68
+
69
+ ---
70
+
71
+ ## Auto-Fail Conditions
72
+
73
+ Critical issues that trigger immediate FAIL regardless of score:
74
+
75
+ | ID | Condition |
76
+ |----|-----------|
77
+ | **AF-001** | Hardcoded secrets or API keys in source code |
78
+ | **AF-002** | SQL injection or command injection confirmed |
79
+ | **AF-003** | Authentication bypass possible |
80
+ | **AF-004** | Critical npm vulnerability (CVSS >= 9.0) |
81
+ | **AF-005** | Secrets committed in git history |
82
+ | **AF-006** | RCE (Remote Code Execution) vector identified |
83
+
84
+ ---
85
+
86
+ ## Decision Thresholds
87
+
88
+ | Score | Decision | Meaning |
89
+ |-------|----------|---------|
90
+ | **>=85** | ✅ PASS | Validation passed, proceed to next phase |
91
+ | **<85** | ❌ FAIL | Validation failed, fix issues before proceeding |
92
+
93
+ **Note:** Any critical issue triggers FAIL regardless of score.
94
+
95
+ ---
96
+
97
+
98
+ ## PERSIST TO TRACKER (Required)
99
+
100
+ > **IMPORTANT:** Save to tracker IMMEDIATELY after agent completes, BEFORE presenting the summary to the user. The workflow is not complete until results are persisted.
101
+ **1. Get token metrics from buffer:**
102
+ ```bash
103
+ agent-metrics buffer list --since 5m -f tracker
104
+ ```
105
+
106
+ **2. Save to tracker (DO THIS FIRST):**
107
+
108
+ mcp__uluops-tracker__save_features_list
109
+
110
+ **3. Verify saved:** Compare `json.summary.total_issues` with saved count.
111
+
112
+ **4. THEN present summary to user.**
113
+
114
+ ### Field Mappings
115
+
116
+ **From JSON OUTPUT to Tracker:**
117
+ | Source | Tracker Field | Notes |
118
+ |--------|---------------|-------|
119
+ | `json.result.score` | `validators[].score` | Total score |
120
+ | `json.result.decision` | `validators[].status` | PASS/FAIL |
121
+ | `buffer.model` | `validators[].model` | From agent-metrics buffer |
122
+ | `buffer.tokens.input_tokens` | `input_tokens` | Raw input tokens |
123
+ | `buffer.tokens.output_tokens` | `output_tokens` | Output tokens |
124
+ | `buffer.tokens.cache_creation_tokens` | `cache_creation_tokens` | Cache creation |
125
+ | `buffer.tokens.cache_read_tokens` | `cache_read_tokens` | Cache reads |
126
+ | `buffer.tokens.total_effective_tokens` | `total_effective_tokens` | Effective total |
127
+ | `json.categories[].findings[].issues[]` | `recommendations[]` | Flatten nested structure |
128
+
129
+ **Note:** `json` = agent's JSON OUTPUT, `buffer` = `agent-metrics buffer list -f tracker`
130
+
131
+ ---
132
+
133
+ ## Source
134
+
135
+ **CDL Schema:** `udl/definition-languages/cdl-schema-v1.1.0.json`
136
+ **CDL Source:** `/home/alexs/uluops/uluops-agent-workflows/udl/cdl/v1/security.command.yaml`
137
+ **Agent:** `agents/security-analyst-agent.md`
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: test-review
3
+ description: Run Test Architect agent to validate test quality and coverage. Use after implementation passes code validator.
4
+ ---
5
+
6
+ # Test Architect
7
+ Run Test Architect agent to validate test quality and coverage. Use after implementation passes code validator.
8
+
9
+ ## Arguments
10
+
11
+ **Usage:** `/agents:test-review <directory>`
12
+
13
+ **Examples:**
14
+ - `/agents:test-review ./tests`
15
+ - `/agents:test-review ./src`
16
+ - `/agents:test-review .`
17
+
18
+ **Target Directory:** $ARGUMENTS
19
+
20
+ ---
21
+
22
+ ## Pre-Flight
23
+
24
+ ```bash
25
+ echo "Running test architecture review 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 Test Architect agent on the validated target directory:
53
+
54
+ **Agent:** test-architect-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
+ | Coverage Quality | 30 | Public function coverage, edge cases, error conditions, boundaries |
63
+ | Test Design | 25 | Behavior verification, single purpose, naming, AAA pattern |
64
+ | Test Independence | 20 | Order independence, no shared state, isolation, proper scoping |
65
+ | Mutation Resistance | 15 | Tests catch logic inversions, boundary errors, removed validation |
66
+ | Maintainability | 10 | No magic values, meaningful test data, appropriate DRY |
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** | Core functionality has no tests |
77
+ | **AF-002** | Tests pass regardless of implementation correctness |
78
+ | **AF-003** | Tests are coupled to implementation details |
79
+ | **AF-004** | Non-deterministic (flaky) tests detected |
80
+ | **AF-005** | Shared state causing test interference |
81
+ | **AF-006** | Error paths completely untested |
82
+
83
+ ---
84
+
85
+ ## Decision Thresholds
86
+
87
+ | Score | Decision | Meaning |
88
+ |-------|----------|---------|
89
+ | **>=70** | ✅ PASS | Validation passed, proceed to next phase |
90
+ | **<70** | ❌ 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/test-review.command.yaml`
136
+ **Agent:** `agents/test-architect-agent.md`
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: type-safety
3
+ description: Run Type Safety Validator on TypeScript projects. Validates beyond tsc—catches any abuse, unsafe assertions, type holes that pass compilation but cause runtime failures.
4
+ ---
5
+
6
+ # Type Safety Validator
7
+ Run Type Safety Validator on TypeScript projects. Validates beyond tsc—catches any abuse, unsafe assertions, type holes that pass compilation but cause runtime failures.
8
+
9
+ ## Arguments
10
+
11
+ **Usage:** `/agents:type-safety <directory>`
12
+
13
+ **Examples:**
14
+ - `/agents:type-safety ./src`
15
+ - `/agents:type-safety ./packages/api`
16
+ - `/agents:type-safety .`
17
+
18
+ **Target Directory:** $ARGUMENTS
19
+
20
+ ---
21
+
22
+ ## Pre-Flight
23
+
24
+ ```bash
25
+ echo "Running type safety 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 Type Safety Validator agent on the validated target directory:
53
+
54
+ **Agent:** type-safety-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
+ | Any Usage | 25 | Tracks explicit any, implicit any, and any isolation at boundaries |
63
+ | Type Assertions | 25 | Validates safe use of as casts, non-null assertions, and suppressions |
64
+ | Strict Mode Compliance | 20 | Validates strictNullChecks patterns, optional handling, union narrowing |
65
+ | Generic & Complex Types | 15 | Validates generic constraints, type complexity, utility type usage |
66
+ | Export Type Quality | 15 | Validates public API type accuracy, explicitness, and consumer safety |
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** | any in exported function signatures |
77
+ | **AF-002** | Double assertions (as unknown as Type) |
78
+ | **AF-003** | @ts-ignore on security/auth code without justification |
79
+ | **AF-004** | strict: false in tsconfig for library code |
80
+ | **AF-005** | Non-null assertions on untrusted/external data |
81
+
82
+ ---
83
+
84
+ ## Decision Thresholds
85
+
86
+ | Score | Decision | Meaning |
87
+ |-------|----------|---------|
88
+ | **>=80** | ✅ PASS | Validation passed, proceed to next phase |
89
+ | **<80** | ❌ 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/type-safety.command.yaml`
135
+ **Agent:** `agents/type-safety-validator-agent.md`