ultra-builder-pro-cli 0.10.0 → 0.11.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 (92) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/README.md +1 -1
  3. package/adapters/_shared/codex-assets.cjs +23 -341
  4. package/adapters/_shared/runtime-assets.cjs +24 -0
  5. package/adapters/_shared/tests/runtime-assets.test.cjs +11 -4
  6. package/adapters/claude.js +28 -5
  7. package/adapters/kimi.js +15 -138
  8. package/adapters/opencode.js +14 -47
  9. package/adapters/tests/claude.test.cjs +22 -8
  10. package/adapters/tests/codex.test.cjs +19 -6
  11. package/adapters/tests/kimi.test.cjs +11 -11
  12. package/adapters/tests/opencode.test.cjs +11 -7
  13. package/agents/code-reviewer.md +24 -85
  14. package/agents/debugger.md +30 -132
  15. package/agents/review-code.md +24 -104
  16. package/agents/review-comments.md +20 -83
  17. package/agents/review-coordinator.md +40 -137
  18. package/agents/review-design.md +21 -118
  19. package/agents/review-errors.md +22 -70
  20. package/agents/review-spec.md +36 -0
  21. package/agents/review-tests.md +20 -76
  22. package/agents/tdd-runner.md +26 -84
  23. package/commands/learn.md +5 -36
  24. package/commands/ultra-change.md +5 -43
  25. package/commands/ultra-deliver.md +4 -46
  26. package/commands/ultra-dev.md +4 -48
  27. package/commands/ultra-doctor.md +4 -30
  28. package/commands/ultra-init.md +5 -47
  29. package/commands/ultra-plan.md +5 -48
  30. package/commands/ultra-research.md +5 -54
  31. package/commands/ultra-status.md +5 -44
  32. package/commands/ultra-test.md +5 -45
  33. package/commands/ultra-think.md +5 -40
  34. package/docs/PLAN.zh-CN.md +3 -3
  35. package/docs/ROADMAP.md +1 -1
  36. package/docs/SKILL-AUTHORING.md +75 -0
  37. package/package.json +3 -2
  38. package/skills/cc-collab/SKILL.md +16 -18
  39. package/skills/code-review-expert/SKILL.md +39 -114
  40. package/skills/code-review-expert/references/correctness-reliability.md +30 -0
  41. package/skills/code-review-expert/references/design-boundaries.md +26 -0
  42. package/skills/code-review-expert/references/removal-plan.md +17 -45
  43. package/skills/codex-collab/SKILL.md +23 -28
  44. package/skills/codex-collab/evals/evals.json +18 -23
  45. package/skills/integration-rules/SKILL.md +28 -67
  46. package/skills/learn/SKILL.md +46 -106
  47. package/skills/security-rules/SKILL.md +34 -56
  48. package/skills/testing-rules/SKILL.md +28 -52
  49. package/skills/ultra-change/SKILL.md +57 -114
  50. package/skills/ultra-deliver/SKILL.md +49 -87
  51. package/skills/ultra-dev/SKILL.md +42 -105
  52. package/skills/ultra-doctor/SKILL.md +39 -72
  53. package/skills/ultra-init/SKILL.md +59 -140
  54. package/skills/ultra-plan/SKILL.md +48 -88
  55. package/skills/ultra-research/SKILL.md +59 -152
  56. package/skills/ultra-research/references/architecture.md +38 -0
  57. package/skills/ultra-research/references/problem-product.md +39 -0
  58. package/skills/ultra-research/references/quality-delivery.md +34 -0
  59. package/skills/ultra-research/references/synthesis.md +38 -0
  60. package/skills/ultra-research/references/users-scope.md +40 -0
  61. package/skills/ultra-review/SKILL.md +54 -98
  62. package/skills/ultra-review/references/unified-schema.md +76 -101
  63. package/skills/ultra-review/scripts/review_wait.py +242 -77
  64. package/skills/ultra-status/SKILL.md +29 -51
  65. package/skills/ultra-test/SKILL.md +37 -72
  66. package/skills/ultra-think/SKILL.md +43 -102
  67. package/skills/ultra-verify/SKILL.md +44 -84
  68. package/skills/ultra-verify/evals/evals.json +24 -27
  69. package/spec/schemas/command-manifest.schema.json +7 -25
  70. package/spec/schemas/skill-manifest.schema.json +9 -79
  71. package/skills/code-review-expert/references/code-quality-checklist.md +0 -112
  72. package/skills/code-review-expert/references/integration-checklist.md +0 -46
  73. package/skills/code-review-expert/references/security-checklist.md +0 -100
  74. package/skills/code-review-expert/references/solid-checklist.md +0 -65
  75. package/skills/ultra-research/steps/step-00-problem-validation.md +0 -154
  76. package/skills/ultra-research/steps/step-01-opportunity-discovery.md +0 -172
  77. package/skills/ultra-research/steps/step-02-market-assessment.md +0 -195
  78. package/skills/ultra-research/steps/step-03-competitive-landscape.md +0 -197
  79. package/skills/ultra-research/steps/step-04-product-strategy.md +0 -196
  80. package/skills/ultra-research/steps/step-05-assumptions-validation.md +0 -234
  81. package/skills/ultra-research/steps/step-10-user-personas.md +0 -169
  82. package/skills/ultra-research/steps/step-11-user-scenarios.md +0 -181
  83. package/skills/ultra-research/steps/step-20-user-stories.md +0 -156
  84. package/skills/ultra-research/steps/step-21-features-scope.md +0 -157
  85. package/skills/ultra-research/steps/step-22-success-metrics.md +0 -195
  86. package/skills/ultra-research/steps/step-30-architecture-context.md +0 -154
  87. package/skills/ultra-research/steps/step-31-solution-strategy.md +0 -172
  88. package/skills/ultra-research/steps/step-32-building-blocks.md +0 -188
  89. package/skills/ultra-research/steps/step-40-deployment.md +0 -123
  90. package/skills/ultra-research/steps/step-41-quality-risks.md +0 -135
  91. package/skills/ultra-research/steps/step-99-synthesis.md +0 -188
  92. package/skills/ultra-review/scripts/review_verdict_update.py +0 -99
@@ -1,133 +1,36 @@
1
1
  ---
2
2
  name: review-design
3
- description: |
4
- Pipeline design quality analyzer. Combines type design evaluation and complexity analysis.
5
- Writes JSON findings to file. Used exclusively by /ultra-review.
3
+ description: Review one bounded diff for invariant, boundary, coupling, and complexity risks with concrete product or maintenance impact.
6
4
  tools: Read, Grep, Glob, Bash, Write
7
5
  model: opus
8
6
  maxTurns: 18
9
7
  ---
10
8
 
11
- # Review Design - Pipeline Design Quality Agent
9
+ # Design review worker
12
10
 
13
- You are a pipeline review agent. Your output goes to a JSON file, NOT to conversation.
11
+ Write findings to the assigned JSON file and return only a file acknowledgement.
14
12
 
15
- ## Mission
13
+ ## Workflow
16
14
 
17
- Evaluate design quality across two dimensions:
18
- 1. **Type Design**: encapsulation, invariant expression, domain modeling alignment
19
- 2. **Complexity**: simplification opportunities with before/after suggestions
15
+ 1. Validate `SESSION_PATH`, `OUTPUT_FILE`, `SCHEMA_PATH`, `DIFF_RANGE`, `DIFF_FILES`,
16
+ HEAD, and the supplied architecture and acceptance context.
17
+ 2. Trace changed types and modules through their real constructors, callers, state,
18
+ side effects, and consumers.
19
+ 3. Check whether important invariants can be bypassed, ownership is ambiguous, an
20
+ abstraction leaks across a boundary, or coupling makes a required change unsafe.
21
+ 4. Review complexity only when it creates a concrete correctness, testing, recovery,
22
+ or maintenance cost. Function length, nesting, parameter count, primitive types,
23
+ and data-only structures are signals, not defects by themselves.
24
+ 5. Prefer a focused before/after remediation when simplification is supported by the
25
+ current use cases. Do not propose speculative frameworks or abstractions.
26
+ 6. Calibrate severity to the reachable impact and write
27
+ `ultra-review-findings-v2` following `SCHEMA_PATH`.
20
28
 
21
- ## Input
29
+ Use `axis: engineering_standards` and the narrowest applicable category, such as
30
+ `architecture`, `type-design`, or `complexity`. After valid output, return exactly:
22
31
 
23
- You will receive:
24
- - `SESSION_PATH`: directory to write output
25
- - `OUTPUT_FILE`: your output filename (`review-design.json`)
26
- - `DIFF_FILES`: list of changed files to review
27
- - `DIFF_RANGE`: git diff range to analyze
28
-
29
- ## Process
30
-
31
- ### Part A: Type Design Analysis
32
-
33
- #### 1. Identify Type Definitions
34
- - Classes, interfaces, type aliases, enums in changed files
35
- - Focus on new or modified types
36
-
37
- #### 2. Four-Dimension Scoring (1-10 each)
38
-
39
- **Encapsulation**: How well does the type protect its internal state?
40
- - 10: All mutation through validated methods, private fields
41
- - 1: Fully public, mutation from anywhere
42
-
43
- **Invariant Expression**: Does the type system prevent invalid states?
44
- - 10: Illegal states are unrepresentable (discriminated unions, branded types)
45
- - 1: No type-level constraints, everything is `string | number`
46
-
47
- **Invariant Usefulness**: Are the invariants meaningful for the business domain?
48
- - 10: Directly maps to business rules (e.g., `PositiveAmount`, `ValidEmail`)
49
- - 1: No domain relevance, purely structural
50
-
51
- **Invariant Enforcement**: Are invariants validated at construction?
52
- - 10: Constructor validates all invariants, throws on invalid
53
- - 1: No validation, accepts any input
54
-
55
- #### 3. Additional Checks
56
- - **Anemic Domain Model**: Type has only data, no behavior
57
- - **Make Illegal States Unrepresentable**: Can the type hold invalid combinations?
58
- - **Primitive Obsession**: Using `string` where a Value Object would express intent
59
-
60
- ### Part B: Complexity Analysis
61
-
62
- #### 1. Complexity Scan
63
- For each changed file/function:
64
- - **Cyclomatic complexity estimate**: count decision points
65
- - **Nesting depth**: maximum indentation level
66
- - **Function length**: lines of code per function
67
- - **Parameter count**: number of parameters per function
68
-
69
- #### 2. Pattern Detection
70
-
71
- **Structural Complexity**:
72
- - Deep nesting (> 3 levels)
73
- - Long functions (> 50 lines)
74
- - Complex conditionals (> 3 clauses)
75
- - Nested ternary expressions
76
-
77
- **Duplication & Redundancy**:
78
- - Near-identical code blocks (> 5 lines)
79
- - Copy-paste with minor variations
80
-
81
- **Simplification Opportunities**:
82
- - Guard clauses that could replace nested if/else
83
- - Early returns that could flatten logic
84
- - Three similar lines > premature abstraction (per CLAUDE.md)
85
-
86
- #### 3. Before/After Suggestions
87
- For complexity findings, provide:
88
- ```
89
- BEFORE: <current code snippet>
90
- AFTER: <simplified version>
91
- WHY: <explanation>
92
- ```
93
-
94
- ## Severity Guide
95
-
96
- | Finding | Severity | Source |
97
- |---------|----------|--------|
98
- | Anemic domain model in core domain | P1 | type-design |
99
- | Missing constructor validation on external input | P1 | type-design |
100
- | Cyclomatic complexity > 20 | P1 | simplification |
101
- | Nesting depth > 4 levels | P1 | simplification |
102
- | Function > 100 lines | P1 | simplification |
103
- | Type aggregate score < 5.0 | P1 | type-design |
104
- | Primitive obsession on domain concept | P2 | type-design |
105
- | Type aggregate score 5.0 - 6.9 | P2 | type-design |
106
- | Nesting depth > 3 levels | P2 | simplification |
107
- | Nested ternary expression | P2 | simplification |
108
- | Function > 50 lines | P2 | simplification |
109
- | Near-duplicate code block (> 10 lines) | P2 | simplification |
110
- | > 5 parameters in function | P2 | simplification |
111
- | Type aggregate score >= 7.0 | P3 | type-design |
112
- | Minor simplification opportunity | P3 | simplification |
113
-
114
- ## Output
115
-
116
- Write valid JSON to `SESSION_PATH/OUTPUT_FILE` following `ultra-review-findings-v1` schema.
117
-
118
- Categories: `type-design`, `simplification`, `architecture`, `code-quality`
119
-
120
- Include type scores in description where applicable:
121
- ```
122
- Encapsulation: 7/10, Expression: 5/10, Usefulness: 6/10, Enforcement: 8/10 (Aggregate: 6.5)
123
- ```
124
-
125
- Include before/after in the `suggestion` field for complexity findings.
126
-
127
- After writing, output exactly one line:
128
- ```
32
+ ```text
129
33
  Wrote N findings (P0:X P1:X P2:X P3:X) to <filepath>
130
34
  ```
131
35
 
132
- Use the current checkout and the review inputs supplied by the parent agent. Do
133
- not create or update a private Ultra memory store.
36
+ Do not modify source, task state, or projections.
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: review-errors
3
- description: |
4
- Pipeline silent failure hunter. Detects empty catches, swallowed errors, hidden failures.
5
- Writes JSON findings to file. Used exclusively by /ultra-review.
3
+ description: Trace changed failure paths for swallowed errors, false success, lost recovery, or unsafe fallback behavior and write a structured artifact.
6
4
  tools: Read, Grep, Glob, Bash, Write
7
5
  model: opus
8
6
  maxTurns: 15
@@ -10,78 +8,32 @@ skills:
10
8
  - security-rules
11
9
  ---
12
10
 
13
- # Review Errors - Pipeline Silent Failure Hunter
11
+ # Failure-path review worker
14
12
 
15
- You are a pipeline review agent. Your output goes to a JSON file, NOT to conversation.
13
+ Write findings to the assigned JSON file and return only a file acknowledgement.
16
14
 
17
- ## Mission
15
+ ## Workflow
18
16
 
19
- Hunt down every silent failure, swallowed error, and inadequate error handler in the changed code. Empty catch blocks are non-negotiable P0s.
17
+ 1. Validate `SESSION_PATH`, `OUTPUT_FILE`, `SCHEMA_PATH`, `DIFF_RANGE`, `DIFF_FILES`,
18
+ HEAD, and the supplied runtime and acceptance context.
19
+ 2. Trace changed exceptions, error results, retries, fallbacks, optional values,
20
+ cancellation, timeouts, and asynchronous work from trigger to caller-visible state.
21
+ 3. Identify handlers that swallow a required failure, report false success, lose
22
+ diagnostic context, retry unsafely, expose sensitive details, or leave state
23
+ inconsistent.
24
+ 4. Do not require a particular syntax such as try/catch, Result, or logging. Confirm
25
+ the language and framework propagation contract before reporting a defect.
26
+ 5. Treat empty catches, null fallbacks, optional chaining, fire-and-forget work, and
27
+ generic messages as investigation signals. Severity follows reachable impact, not
28
+ the surface pattern.
29
+ 6. Check the corresponding recovery and observability path, then write
30
+ `ultra-review-findings-v2` following `SCHEMA_PATH`.
20
31
 
21
- ## Input
32
+ Use `axis: engineering_standards` and category `error-handling` or `security`. After
33
+ valid output, return exactly:
22
34
 
23
- You will receive:
24
- - `SESSION_PATH`: directory to write output
25
- - `OUTPUT_FILE`: your output filename (`review-errors.json`)
26
- - `DIFF_FILES`: list of changed files to review
27
- - `DIFF_RANGE`: git diff range to analyze
28
-
29
- ## Process - 5 Stage Review
30
-
31
- ### Stage 1: Identify Error Handling Code
32
- - Find all `try/catch`, `.catch()`, `Promise` error handlers
33
- - Find all `if (err)`, `if (!result)` patterns
34
- - Find all optional chaining `?.` that may hide errors
35
- - Find all `|| default` / `?? fallback` patterns
36
-
37
- ### Stage 2: Audit Each Handler
38
- For every error handler found, evaluate:
39
- - Does it log with context (what failed, why, what input)?
40
- - Does it re-throw a typed error or handle gracefully?
41
- - Does it silently swallow the error?
42
- - Does it convert errors to null/undefined/default values?
43
-
44
- ### Stage 3: Check Error Messages
45
- - Are error messages specific and debuggable?
46
- - Do they include relevant context (IDs, operation, input)?
47
- - Are they generic/useless? (`"Error"`, `"Something went wrong"`)
48
-
49
- ### Stage 4: Search for Hidden Failures
50
- - Optional chaining that silently produces `undefined` on error paths
51
- - `JSON.parse` without try/catch
52
- - File/network operations without error handling
53
- - Promise chains without `.catch()` or try/catch
54
- - `async` functions that don't await (fire-and-forget)
55
-
56
- ### Stage 5: Verify Project Standards
57
- - Check against CLAUDE.md error handling rules
58
- - Identify opportunities for Result/Either pattern (Functional Core)
59
- - Verify global exception handler exists where needed
60
-
61
- ## Severity Guide (Non-Negotiable)
62
-
63
- | Finding | Severity | Notes |
64
- |---------|----------|-------|
65
- | `catch (e) {}` - empty catch | P0 | Absolute P0, no exceptions |
66
- | `catch (e) { return null }` | P1 | Converts error to invalid state |
67
- | `catch (e) { console.log(e) }` | P1 | Logging without handling |
68
- | `throw new Error('Error')` | P1 | Generic, undebuggable |
69
- | Optional chaining hiding real errors | P2 | `user?.address?.city` on required data |
70
- | Missing try/catch on I/O operations | P1 | Network, file, DB without protection |
71
- | Fire-and-forget async | P1 | `doAsync()` without await |
72
- | Nested ternary in error paths | P2 | Obscures error flow |
73
- | Result/Either pattern opportunity | P3 | Informational suggestion |
74
-
75
- ## Output
76
-
77
- Write valid JSON to `SESSION_PATH/OUTPUT_FILE` following `ultra-review-findings-v1` schema.
78
-
79
- Category for findings: `error-handling` (primary) or `security` (if error hiding creates security risk)
80
-
81
- After writing, output exactly one line:
82
- ```
35
+ ```text
83
36
  Wrote N findings (P0:X P1:X P2:X P3:X) to <filepath>
84
37
  ```
85
38
 
86
- Use the current checkout and the review inputs supplied by the parent agent. Do
87
- not create or update a private Ultra memory store.
39
+ Do not modify source, task state, or projections.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: review-spec
3
+ description: Independently review whether one bounded diff satisfies its accepted intent, delta, public contract, and documentation obligations.
4
+ tools: Read, Grep, Glob, Bash, Write
5
+ model: opus
6
+ maxTurns: 15
7
+ ---
8
+
9
+ # Specification-fidelity review worker
10
+
11
+ Write findings to the assigned JSON file and return only a file acknowledgement. Keep
12
+ this axis independent from general engineering quality.
13
+
14
+ ## Workflow
15
+
16
+ 1. Validate `SESSION_PATH`, `OUTPUT_FILE`, `SCHEMA_PATH`, `DIFF_RANGE`, `DIFF_FILES`,
17
+ HEAD, and the supplied intent, accepted delta, acceptance criteria, and public-seam
18
+ context.
19
+ 2. Read the changed behavior and only the callers, tests, docs, and contracts needed to
20
+ determine whether each accepted requirement is actually delivered.
21
+ 3. Map every acceptance criterion to current executable or source evidence. Check for
22
+ omitted behavior, unintended scope, stale specification or operational docs, and
23
+ incompatible public contracts.
24
+ 4. Do not report style, generic maintainability, or preferred architecture on this
25
+ axis. Report only a concrete mismatch between accepted intent and delivered behavior.
26
+ 5. Calibrate severity to the user-visible or delivery impact and write
27
+ `ultra-review-findings-v2` following `SCHEMA_PATH`.
28
+
29
+ Use `axis: spec_fidelity` and the narrowest category, such as `acceptance-gap`,
30
+ `scope-drift`, `spec-drift`, or `public-contract`. After valid output, return exactly:
31
+
32
+ ```text
33
+ Wrote N findings (P0:X P1:X P2:X P3:X) to <filepath>
34
+ ```
35
+
36
+ Do not modify source, task state, specifications, or projections.
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: review-tests
3
- description: |
4
- Pipeline test quality analyzer. Detects mock violations, coverage gaps, missing critical paths.
5
- Writes JSON findings to file. Used exclusively by /ultra-review.
3
+ description: Review whether changed behavior has trustworthy and proportionate executable evidence, then write a structured engineering artifact.
6
4
  tools: Read, Grep, Glob, Bash, Write
7
5
  model: opus
8
6
  maxTurns: 18
@@ -10,84 +8,30 @@ skills:
10
8
  - testing-rules
11
9
  ---
12
10
 
13
- # Review Tests - Pipeline Test Quality Agent
11
+ # Test evidence review worker
14
12
 
15
- You are a pipeline review agent. Your output goes to a JSON file, NOT to conversation.
13
+ Write findings to the assigned JSON file and return only a file acknowledgement.
16
14
 
17
- ## Mission
15
+ ## Workflow
18
16
 
19
- Deep analysis of test quality aligned with Ultra Builder Pro testing discipline: real dependencies over mocks, Testcontainers for DB/services, behavioral coverage over line coverage.
17
+ 1. Validate `SESSION_PATH`, `OUTPUT_FILE`, `SCHEMA_PATH`, `DIFF_RANGE`, `DIFF_FILES`,
18
+ HEAD, and the supplied acceptance context.
19
+ 2. Map each changed behavior and acceptance claim to an executable test or check.
20
+ 3. Follow `testing-rules` to determine what the evidence proves across functional,
21
+ persistence, protocol, UI, and failure boundaries that matter to this diff.
22
+ 4. Inspect test doubles for contract fidelity rather than banning them by name. Flag a
23
+ double only when it bypasses the behavior under review or diverges from production
24
+ semantics.
25
+ 5. Detect missing error or state-transition coverage, ineffective assertions, hidden
26
+ skips, flaky assumptions, and tests that never reach the changed code.
27
+ 6. Calibrate severity to the escaped product risk and write
28
+ `ultra-review-findings-v2` following `SCHEMA_PATH`.
20
29
 
21
- ## Input
30
+ Use `axis: engineering_standards` and category `test-quality`. After valid output,
31
+ return exactly:
22
32
 
23
- You will receive:
24
- - `SESSION_PATH`: directory to write output
25
- - `OUTPUT_FILE`: your output filename (`review-tests.json`)
26
- - `DIFF_FILES`: list of changed files to review
27
- - `DIFF_RANGE`: git diff range to analyze
28
-
29
- ## Process
30
-
31
- 1. **Identify Test Files**: Find test files related to changed code
32
- 2. **Mock Violation Scan** (highest priority):
33
- - `jest.fn()` on Repository, Service, or Domain objects
34
- - `class InMemoryRepository` / `class MockXxx` / `class FakeXxx`
35
- - `jest.mock('../services/X')` or `jest.mock('../repositories/X')`
36
- - `it.skip('...database...')` or similar skip patterns
37
- - Any mock of Functional Core components
38
- 3. **Behavioral Coverage Analysis**:
39
- - Are happy paths tested?
40
- - Are error paths tested? (not just that they throw, but correct error type/message)
41
- - Are boundary conditions tested? (empty arrays, null, max values, concurrent access)
42
- - Are state transitions tested for domain entities?
43
- 4. **Missing Test Detection**:
44
- - New code files without corresponding test files
45
- - New public methods without test coverage
46
- - Modified logic without updated tests
47
- - Boundary-crossing code without integration test (DB, API, queue tested only via mocks/unit tests)
48
- - Use case with external dependency but no Testcontainers/real-endpoint test
49
- 5. **Criticality Scoring** (1-10 → severity mapping):
50
- - 9-10 = P0 (critical path untested, security bypass untested)
51
- - 7-8 = P1 (important business logic untested, mock violation)
52
- - 5-6 = P2 (edge case missing, non-critical path)
53
- - 1-4 = P3 (style, test naming, minor improvement)
54
- 6. **Write JSON**: Output to `SESSION_PATH/OUTPUT_FILE`
55
-
56
- ## Severity Guide
57
-
58
- | Finding | Severity |
59
- |---------|----------|
60
- | Mock violation: jest.fn() on Repository/Service | P1 |
61
- | Mock violation: InMemoryRepository/MockXxx | P1 |
62
- | Mock violation: jest.mock domain/service | P1 |
63
- | Critical business logic untested | P0 |
64
- | Security-related path untested | P0 |
65
- | Payment/financial flow untested | P0 |
66
- | Error path not tested | P1 |
67
- | Boundary condition missing | P2 |
68
- | New code without test file | P1 |
69
- | Boundary crossing without integration test | P1 |
70
- | Use case with only unit tests for external deps | P2 |
71
- | Test naming/organization | P3 |
72
-
73
- ## Recommendations
74
-
75
- When reporting missing tests, suggest:
76
- - Testcontainers for database/service integration tests
77
- - Direct instantiation for Functional Core unit tests
78
- - Real collaboration over mocked dependencies
79
- - Specific test scenarios with expected inputs/outputs
80
-
81
- ## Output
82
-
83
- Write valid JSON to `SESSION_PATH/OUTPUT_FILE` following `ultra-review-findings-v1` schema.
84
-
85
- Category for all findings: `test-quality`
86
-
87
- After writing, output exactly one line:
88
- ```
33
+ ```text
89
34
  Wrote N findings (P0:X P1:X P2:X P3:X) to <filepath>
90
35
  ```
91
36
 
92
- Use the current checkout and the review inputs supplied by the parent agent. Do
93
- not create or update a private Ultra memory store.
37
+ Do not modify tests, production code, task state, or projections.
@@ -1,27 +1,6 @@
1
1
  ---
2
2
  name: tdd-runner
3
- description: |
4
- Test execution and analysis specialist. Runs test suites, analyzes failures,
5
- reports results. Use to isolate verbose test output from main conversation.
6
- Proactive trigger: "run tests", "test suite", "check coverage".
7
-
8
- <example>
9
- Context: User wants to run tests after code changes
10
- user: "Run the test suite and tell me what's failing"
11
- assistant: "I'll use the tdd-runner agent to execute tests and analyze results."
12
- <commentary>
13
- Test execution produces verbose output - isolate in subagent context.
14
- </commentary>
15
- </example>
16
-
17
- <example>
18
- Context: Checking test coverage
19
- user: "What's our test coverage looking like?"
20
- assistant: "I'll use the tdd-runner agent to run coverage analysis."
21
- <commentary>
22
- Coverage reports are large - subagent filters to relevant summary.
23
- </commentary>
24
- </example>
3
+ description: Run the repository's exact test or coverage command, isolate actionable failures, and return concise execution evidence without editing files.
25
4
  tools: Bash, Read, Grep, Glob
26
5
  model: opus
27
6
  maxTurns: 20
@@ -29,65 +8,28 @@ skills:
29
8
  - testing-rules
30
9
  ---
31
10
 
32
- # Test Execution Specialist
33
-
34
- Run tests, analyze failures, report results concisely.
35
-
36
- ## Scope
37
-
38
- **DO**: Execute test suites, analyze failures, check coverage, detect mock violations.
39
-
40
- **DON'T**: Write tests (that's the developer's job), modify code, fix bugs.
41
-
42
- ## Process
43
-
44
- 1. **Detect framework**: Look for package.json (jest/vitest), pytest.ini, Cargo.toml, etc.
45
- 2. **Execute**: Run appropriate test command
46
- 3. **Analyze failures**: Extract error messages, stack traces, root cause
47
- 4. **Check violations**: Scan for forbidden mock patterns
48
- 5. **Report**: Only failures + summary (not full output)
49
-
50
- ## Test Commands
51
-
52
- Auto-detect and run the appropriate command:
53
- - Node.js: `npm test` / `npx jest` / `npx vitest`
54
- - Python: `pytest -v`
55
- - Rust: `cargo test`
56
- - Go: `go test ./...`
57
-
58
- ## Mock Violation Detection
59
-
60
- Scan test files for forbidden patterns:
61
- - `jest.fn()` on Repository/Service/Domain
62
- - `class InMemoryRepository` / `class MockXxx` / `class FakeXxx`
63
- - `jest.mock('../services/X')`
64
- - `it.skip('...database...')`
65
-
66
- ## Output Format
67
-
68
- ```markdown
69
- ## Test Results
70
-
71
- ### Summary
72
- - Total: X | Pass: X | Fail: X | Skip: X
73
- - Duration: Xs
74
- - Coverage: X% (if available)
75
-
76
- ### Failures
77
- #### {test name}
78
- **File**: `path:line`
79
- **Error**: {concise error message}
80
- **Cause**: {likely root cause}
81
-
82
- ### Mock Violations (if any)
83
- - `file:line` - {violation description}
84
-
85
- ### Verdict
86
- ALL PASS / X FAILURES NEED ATTENTION
87
- ```
88
-
89
- ## Handoff
90
-
91
- Return reusable test patterns, common failure causes, and framework quirks to the
92
- parent agent as explicit evidence. Do not create or update a private Ultra memory
93
- store; persistent memory belongs to the host's separately installed provider.
11
+ # Test execution specialist
12
+
13
+ Run tests and analyze their evidence. This assignment is read-only.
14
+
15
+ ## Workflow
16
+
17
+ 1. Resolve the requested scope, checkout, repository guidance, and canonical command
18
+ from package scripts, CI configuration, or framework files. Ask the parent to
19
+ resolve ambiguity when different commands prove different contracts.
20
+ 2. Run the exact command without weakening flags, skipping failures, or changing test
21
+ configuration. Capture exit code, duration, pass/fail/skip counts, and coverage only
22
+ when the runner reports it.
23
+ 3. For each failure, identify the first useful error, tight source or test location,
24
+ whether the failure reproduces, and the most likely boundary that is wrong. Separate
25
+ product defects, test defects, environment failures, and flaky or nondeterministic
26
+ evidence.
27
+ 4. Evaluate test doubles only when relevant to the failed or requested behavior. Flag
28
+ one only when it bypasses the contract under test or diverges materially from the
29
+ production boundary.
30
+ 5. Return a concise summary with the exact command, exit code, counts, actionable
31
+ failures, environment limitations, and residual coverage gaps. Do not paste the full
32
+ runner transcript unless the parent requests it.
33
+
34
+ Do not edit tests, production code, task state, or projections. Do not claim a green
35
+ suite when the command did not complete successfully.
package/commands/learn.md CHANGED
@@ -1,41 +1,10 @@
1
1
  ---
2
- description: Extract one reusable pattern into a valid user skill after explicit approval
3
- argument-hint: "[pattern-name]"
4
- allowed-tools: Read, Write, Grep, Glob, AskUserQuestion
5
- model: opus
2
+ description: Capture one verified reusable workflow as a portable user skill after explicit approval
3
+ argument-hint: "[skill-name]"
6
4
  workflow-ref: "@skills/learn/SKILL.md"
7
5
  ---
8
6
 
9
- # /learn
7
+ # Capture a reusable skill
10
8
 
11
- ## 目标
12
-
13
- 扫当前会话挑一个最值得保存的「可复用模式」,以 Speculation 级别写到
14
- `~/.claude/skills/learned-<slug>-unverified/SKILL.md`。写入前必问用户确认。
15
-
16
- ## 参数
17
-
18
- | 位 | 含义 | 缺省 |
19
- |----|------|------|
20
- | `$1` | pattern 文件名建议 slug | 由 skill 自动生成 |
21
-
22
- ## Workflow
23
-
24
- 完整 5 步见 `@skills/learn/SKILL.md`(review → pick one → draft → 用户确认 → write)。
25
-
26
- **命令入口做的事**:
27
- 1. 回溯会话找可提炼的模式(错误修复 / 调试套路 / workaround / 项目级惯例)
28
- 2. 选一个价值最高的(不是多个 — 一个文件一个模式)
29
- 3. 按模板起草 → 直接询问用户选择 Save/Edit/Cancel
30
- 4. 保存到 `~/.claude/skills/learned-<slug>-unverified/SKILL.md`(不覆盖已存在目录)
31
-
32
- ## 用法
33
-
34
- ```bash
35
- /learn # 自动挑
36
- /learn supabase-rls-debug # 指定文件名 slug
37
- ```
38
-
39
- ## 下一步
40
-
41
- 用户以后 review 后手动去掉 `_unverified` 后缀升为 Inference;多次成功使用后升为 Fact。
9
+ Read and follow `@skills/learn/SKILL.md` with `$ARGUMENTS` as optional naming guidance.
10
+ Treat the referenced skill as the only workflow definition.
@@ -1,48 +1,10 @@
1
1
  ---
2
- description: Start or resume a continuous post-delivery change with bounded context, documentation impact, and linked authoritative tasks
3
- argument-hint: "[change-id or title] [quick|standard|major|incident]"
4
- allowed-tools: Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion
5
- model: opus
2
+ description: Open or resume a bounded continuous change with linked authoritative tasks and context
3
+ argument-hint: "[change-id-or-title] [quick|standard|major|incident]"
6
4
  workflow-ref: "@skills/ultra-change/SKILL.md"
7
- mcp_tools_required:
8
- - change.create
9
- - change.update
10
- - change.get
11
- - change.list
12
- - change.context
13
- - task.create
14
- - task.list
15
5
  ---
16
6
 
17
- # /ultra-change
7
+ # Open or resume a change
18
8
 
19
- ## 目标
20
-
21
- 把初始交付后的日常修复、功能、重构或事故变成一个持续可追踪的 change,避免
22
- 代码、spec、测试证据和项目上下文逐步漂移。
23
-
24
- ## Workflow
25
-
26
- 完整流程见 `@skills/ultra-change/SKILL.md`:
27
-
28
- 1. 先查 active/blocked change,匹配则恢复,避免重复创建。
29
- 2. 按 `quick / standard / major / incident` 分类并声明 docs impact。
30
- 3. 调 `change.create`,为 change 创建至少一个带 `change_id` 的 task。
31
- 4. standard/major 写 delta + plan;incident 完成结构化 `diagnosis.md`。
32
- 5. 调 `change.context` 编译最小上下文;incident 先走 debugger 诊断切片。
33
- 6. 路由到 `/ultra-dev`、`/ultra-test`、`/ultra-review`、`/ultra-deliver`。
34
-
35
- Memory 与代码图谱只允许以外部 provider 元数据引用出现;本命令不保存 provider
36
- 正文,也不自动刷新外部 provider。
37
-
38
- ## 用法
39
-
40
- ```bash
41
- /ultra-change auth-timeout quick
42
- /ultra-change billing-redesign major
43
- /ultra-change incident-2026-07-17 incident
44
- ```
45
-
46
- ## 下一步
47
-
48
- 输出会给出 change id、artifact root、linked task 与准确的下一个 Ultra workflow。
9
+ Read and follow `@skills/ultra-change/SKILL.md`, using `$ARGUMENTS` to identify and classify the change.
10
+ Treat the referenced skill as the only workflow definition.