@cleocode/cleo 2026.3.2 → 2026.3.6

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 (76) hide show
  1. package/README.md +1 -3
  2. package/dist/cli/index.js +7381 -3507
  3. package/dist/cli/index.js.map +4 -4
  4. package/dist/mcp/index.js +5792 -2097
  5. package/dist/mcp/index.js.map +4 -4
  6. package/package.json +4 -4
  7. package/packages/ct-skills/index.js +1 -1
  8. package/packages/ct-skills/package.json +0 -2
  9. package/packages/ct-skills/profiles/core.json +1 -1
  10. package/packages/ct-skills/profiles/full.json +4 -5
  11. package/packages/ct-skills/profiles/minimal.json +3 -3
  12. package/packages/ct-skills/profiles/recommended.json +2 -2
  13. package/packages/ct-skills/provider-skills-map.json +97 -0
  14. package/packages/ct-skills/skills/_shared/skill-chaining-patterns.md +23 -26
  15. package/packages/ct-skills/skills/_shared/testing-framework-config.md +9 -9
  16. package/packages/ct-skills/skills/ct-cleo/SKILL.md +21 -1
  17. package/packages/ct-skills/skills/ct-dev-workflow/SKILL.md +1 -1
  18. package/packages/ct-skills/skills/ct-documentor/SKILL.md +1 -1
  19. package/packages/ct-skills/skills/ct-epic-architect/SKILL.md +1 -1
  20. package/packages/ct-skills/skills/ct-grade/SKILL.md +214 -0
  21. package/packages/ct-skills/skills/ct-orchestrator/SKILL.md +119 -43
  22. package/packages/ct-skills/skills/ct-orchestrator/orchestrator-prompt.txt +17 -0
  23. package/packages/ct-skills/skills/ct-orchestrator/references/orchestrator-patterns.md +1 -1
  24. package/packages/ct-skills/skills/ct-research-agent/SKILL.md +1 -1
  25. package/packages/ct-skills/skills/ct-spec-writer/SKILL.md +1 -1
  26. package/packages/ct-skills/skills/ct-task-executor/SKILL.md +1 -1
  27. package/packages/ct-skills/skills/ct-validator/SKILL.md +1 -1
  28. package/packages/ct-skills/skills/manifest.json +217 -947
  29. package/packages/ct-skills/skills.json +244 -3
  30. package/templates/CLEO-INJECTION.md +37 -0
  31. package/templates/README.md +4 -4
  32. package/templates/cleo-gitignore +3 -11
  33. package/templates/git-hooks/pre-commit +1 -1
  34. package/packages/ct-skills/protocols/agent-protocol.md +0 -260
  35. package/packages/ct-skills/protocols/artifact-publish.md +0 -587
  36. package/packages/ct-skills/protocols/consensus.md +0 -309
  37. package/packages/ct-skills/protocols/contribution.md +0 -375
  38. package/packages/ct-skills/protocols/decomposition.md +0 -352
  39. package/packages/ct-skills/protocols/implementation.md +0 -344
  40. package/packages/ct-skills/protocols/provenance.md +0 -600
  41. package/packages/ct-skills/protocols/release.md +0 -635
  42. package/packages/ct-skills/protocols/research.md +0 -248
  43. package/packages/ct-skills/protocols/specification.md +0 -287
  44. package/packages/ct-skills/protocols/testing.md +0 -346
  45. package/packages/ct-skills/protocols/validation.md +0 -229
  46. package/packages/ct-skills/skills/ct-gitbook/SKILL.md +0 -516
  47. package/packages/ct-skills/skills/ct-gitbook/assets/SUMMARY.md +0 -28
  48. package/packages/ct-skills/skills/ct-gitbook/assets/gitbook.yaml +0 -14
  49. package/packages/ct-skills/skills/ct-gitbook/references/api-sdk.md +0 -318
  50. package/packages/ct-skills/skills/ct-gitbook/references/auth-sso.md +0 -208
  51. package/packages/ct-skills/skills/ct-gitbook/references/change-requests.md +0 -169
  52. package/packages/ct-skills/skills/ct-gitbook/references/content-blocks.md +0 -230
  53. package/packages/ct-skills/skills/ct-gitbook/references/docs-sites.md +0 -202
  54. package/packages/ct-skills/skills/ct-gitbook/references/git-sync.md +0 -175
  55. package/packages/ct-skills/skills/ct-gitbook/references/llm-ready.md +0 -178
  56. package/packages/ct-skills/skills/ct-gitbook/references/migration.md +0 -263
  57. package/packages/ct-skills/skills/ct-library-implementer-bash/SKILL.md +0 -316
  58. package/packages/ct-skills/skills/ct-skill-lookup/SKILL.md +0 -179
  59. package/packages/ct-skills/skills/ct-test-writer-bats/SKILL.md +0 -347
  60. package/packages/ct-skills/skills/railway-platform/SKILL.md +0 -506
  61. package/packages/ct-skills/skills/railway-platform/_shared/scripts/railway-api.sh +0 -180
  62. package/packages/ct-skills/skills/railway-platform/_shared/scripts/railway-common.sh +0 -262
  63. package/packages/ct-skills/skills/railway-platform/references/01-getting-started.md +0 -149
  64. package/packages/ct-skills/skills/railway-platform/references/02-projects.md +0 -116
  65. package/packages/ct-skills/skills/railway-platform/references/03-services.md +0 -147
  66. package/packages/ct-skills/skills/railway-platform/references/04-deployments.md +0 -210
  67. package/packages/ct-skills/skills/railway-platform/references/05-databases.md +0 -142
  68. package/packages/ct-skills/skills/railway-platform/references/06-environments.md +0 -261
  69. package/packages/ct-skills/skills/railway-platform/references/07-domains.md +0 -139
  70. package/packages/ct-skills/skills/railway-platform/references/08-volumes.md +0 -533
  71. package/packages/ct-skills/skills/railway-platform/references/09-networking.md +0 -592
  72. package/packages/ct-skills/skills/railway-platform/references/10-cron.md +0 -488
  73. package/packages/ct-skills/skills/railway-platform/references/11-functions.md +0 -170
  74. package/packages/ct-skills/skills/railway-platform/references/12-monorepo.md +0 -294
  75. package/packages/ct-skills/skills/railway-platform/references/13-troubleshooting.md +0 -335
  76. package/packages/ct-skills/skills/railway-platform/references/14-railway-metal.md +0 -197
@@ -1,346 +0,0 @@
1
- # Testing Protocol
2
-
3
- **Provenance**: @task T3155, @epic T3147
4
- **Version**: 1.0.1
5
- **Type**: Conditional Protocol
6
- **Stage**: IVTR - T (Testing)
7
- **Max Active**: 3 protocols (including base)
8
-
9
- ---
10
-
11
- ## Trigger Conditions
12
-
13
- This protocol activates when the task involves:
14
-
15
- | Trigger | Keywords | Context |
16
- |---------|----------|---------|
17
- | Test Creation | "test", "write tests", "add tests" | New test development |
18
- | Test Execution | "run tests", "execute tests", "bats" | Test running |
19
- | Coverage | "coverage", "test coverage" | Coverage improvement |
20
- | Test Fixes | "fix test", "flaky", "failing test" | Test maintenance |
21
-
22
- **Explicit Override**: `--protocol testing` flag on task creation.
23
-
24
- **Lifecycle Position**: After Validation (V), before Release (R)
25
-
26
- ---
27
-
28
- ## Requirements (RFC 2119)
29
-
30
- ### MUST
31
-
32
- | Requirement | Description |
33
- |-------------|-------------|
34
- | TEST-001 | MUST write tests using BATS framework for Bash |
35
- | TEST-002 | MUST place unit tests in `tests/unit/` |
36
- | TEST-003 | MUST place integration tests in `tests/integration/` |
37
- | TEST-004 | MUST achieve 100% pass rate before release |
38
- | TEST-005 | MUST test all MUST requirements from specifications |
39
- | TEST-006 | MUST write test summary to manifest |
40
- | TEST-007 | MUST set `agent_type: "testing"` in manifest |
41
-
42
- ### SHOULD
43
-
44
- | Requirement | Description |
45
- |-------------|-------------|
46
- | TEST-010 | SHOULD test edge cases and error paths |
47
- | TEST-011 | SHOULD include setup/teardown fixtures |
48
- | TEST-012 | SHOULD use descriptive test names |
49
- | TEST-013 | SHOULD document test rationale |
50
-
51
- ### MAY
52
-
53
- | Requirement | Description |
54
- |-------------|-------------|
55
- | TEST-020 | MAY add golden tests for output verification |
56
- | TEST-021 | MAY add performance benchmarks |
57
- | TEST-022 | MAY add stress tests for concurrency |
58
-
59
- ---
60
-
61
- ## Test Structure
62
-
63
- ### Directory Layout
64
-
65
- ```
66
- tests/
67
- ├── unit/ # Unit tests (isolated functions)
68
- │ ├── protocol-validation.bats
69
- │ ├── changelog-association.bats
70
- │ └── lifecycle-enforcement.bats
71
- ├── integration/ # Integration tests (workflows)
72
- │ ├── release-ship.bats
73
- │ ├── commit-hook.bats
74
- │ └── backfill-releases.bats
75
- ├── golden/ # Golden output tests
76
- │ └── output-format.bats
77
- ├── fixtures/ # Test data
78
- │ ├── sample-todo.json
79
- │ └── test-manifest.jsonl
80
- └── test_helper/ # BATS helpers
81
- ├── bats-support/
82
- └── bats-assert/
83
- ```
84
-
85
- ### BATS Test Template
86
-
87
- ```bash
88
- #!/usr/bin/env bats
89
-
90
- load '../test_helper/bats-support/load'
91
- load '../test_helper/bats-assert/load'
92
-
93
- # =============================================================================
94
- # Test: feature-name.bats
95
- # Task: T####
96
- # Protocol: testing
97
- # =============================================================================
98
-
99
- setup() {
100
- # Load functions to test
101
- source "$BATS_TEST_DIRNAME/../../lib/feature.sh"
102
-
103
- # Create test fixtures
104
- export TEST_DIR=$(mktemp -d)
105
- }
106
-
107
- teardown() {
108
- # Cleanup
109
- rm -rf "$TEST_DIR"
110
- }
111
-
112
- @test "function_name should handle normal input" {
113
- run function_name "normal input"
114
- assert_success
115
- assert_output --partial "expected"
116
- }
117
-
118
- @test "function_name should reject invalid input" {
119
- run function_name ""
120
- assert_failure
121
- assert_output --partial "error"
122
- }
123
-
124
- @test "function_name should handle edge case" {
125
- run function_name "edge case"
126
- assert_success
127
- }
128
- ```
129
-
130
- ---
131
-
132
- ## Test Categories
133
-
134
- ### Unit Tests
135
-
136
- Test isolated functions without external dependencies.
137
-
138
- ```bash
139
- @test "validate_research_protocol returns 0 for valid research" {
140
- run validate_research_protocol "T2680"
141
- assert_success
142
- }
143
- ```
144
-
145
- ### Integration Tests
146
-
147
- Test workflows involving multiple components.
148
-
149
- ```bash
150
- @test "release ship should populate tasks and generate changelog" {
151
- run cleo release create v0.99.0
152
- run cleo release ship v0.99.0 --dry-run
153
- assert_success
154
- assert_output --partial "tasks populated"
155
- }
156
- ```
157
-
158
- ### Golden Tests
159
-
160
- Verify output format hasn't changed unexpectedly.
161
-
162
- ```bash
163
- @test "cleo list output matches golden format" {
164
- run cleo list --json
165
- assert_success
166
- diff <(echo "$output" | jq -S .) tests/golden/list-output.json
167
- }
168
- ```
169
-
170
- ---
171
-
172
- ## Running Tests
173
-
174
- ### All Tests
175
-
176
- ```bash
177
- ./tests/run-all-tests.sh
178
- ```
179
-
180
- ### Specific Suite
181
-
182
- ```bash
183
- # Unit tests only
184
- bats tests/unit/*.bats
185
-
186
- # Integration tests only
187
- bats tests/integration/*.bats
188
-
189
- # Single file
190
- bats tests/unit/protocol-validation.bats
191
- ```
192
-
193
- ### With Coverage
194
-
195
- ```bash
196
- # Run with TAP output for CI
197
- bats --tap tests/unit/*.bats > test-results.tap
198
- ```
199
-
200
- ---
201
-
202
- ## Output Format
203
-
204
- ### Test Summary
205
-
206
- ```markdown
207
- # Test Report: T####
208
-
209
- **Date**: YYYY-MM-DD
210
- **Tester**: agent-id
211
- **Task**: T####
212
-
213
- ## Summary
214
-
215
- - **Total Tests**: N
216
- - **Passed**: X
217
- - **Failed**: Y
218
- - **Skipped**: Z
219
- - **Pass Rate**: X%
220
-
221
- ## Test Files Created
222
-
223
- | File | Tests | Status |
224
- |------|-------|--------|
225
- | tests/unit/feature.bats | 20 | PASS |
226
- | tests/integration/workflow.bats | 14 | PASS |
227
-
228
- ## Coverage
229
-
230
- | Requirement | Tests | Covered |
231
- |-------------|-------|---------|
232
- | IMPL-001 | 3 | Yes |
233
- | IMPL-002 | 2 | Yes |
234
- ```
235
-
236
- ### Manifest Entry
237
-
238
- @skills/_shared/manifest-operations.md
239
-
240
- Use `cleo research add` to create the manifest entry:
241
-
242
- ```bash
243
- cleo research add \
244
- --title "Testing: [Feature Name]" \
245
- --file "T####-test-report.md" \
246
- --topics "testing,bats,quality" \
247
- --findings "TESTS: N written,RESULT: X/Y passed,COVERAGE: Z requirements" \
248
- --status complete \
249
- --task T#### \
250
- --not-actionable \
251
- --agent-type testing
252
- ```
253
-
254
- ---
255
-
256
- ## Integration Points
257
-
258
- ### With Validation Protocol
259
-
260
- ```
261
- Validation (V) ──► Testing (T)
262
- │ │
263
- │ Identifies │ Writes tests for:
264
- │ gaps │ - Uncovered paths
265
- │ │ - Edge cases
266
- │ │ - Error handling
267
- ```
268
-
269
- ### With Release Protocol
270
-
271
- ```
272
- Testing (T) ──► Release (R)
273
- │ │
274
- │ Gates: │ Requires:
275
- │ - 100% pass │ - All tests pass
276
- │ - Coverage │ - No skipped tests
277
- ```
278
-
279
- ---
280
-
281
- ## Exit Codes
282
-
283
- | Code | Constant | Description |
284
- |------|----------|-------------|
285
- | 0 | SUCCESS | All tests pass |
286
- | 1 | TEST_FAILURE | One or more tests failed |
287
- | 69 | EXIT_TESTS_SKIPPED | Tests were skipped |
288
- | 70 | EXIT_COVERAGE_INSUFFICIENT | Coverage below threshold |
289
-
290
- ---
291
-
292
- ## Best Practices
293
-
294
- ### Test Naming
295
-
296
- ```bash
297
- # Good: Describes behavior
298
- @test "populate_release_tasks should discover tasks in date window"
299
-
300
- # Bad: Too vague
301
- @test "test populate function"
302
- ```
303
-
304
- ### Fixtures
305
-
306
- ```bash
307
- # Use fixtures for complex test data
308
- setup() {
309
- cp tests/fixtures/sample-todo.json "$TEST_DIR/todo.json"
310
- }
311
- ```
312
-
313
- ### Isolation
314
-
315
- ```bash
316
- # Each test should be independent
317
- setup() {
318
- export TEST_DIR=$(mktemp -d)
319
- export TODO_FILE="$TEST_DIR/todo.json"
320
- }
321
-
322
- teardown() {
323
- rm -rf "$TEST_DIR"
324
- }
325
- ```
326
-
327
- ---
328
-
329
- ## Cross-Cutting: Contribution Protocol
330
-
331
- When testing involves multi-agent work:
332
-
333
- 1. **Record tester identity** in manifest
334
- 2. **Attribute test authorship** via comments
335
- 3. **Track test consensus** if multiple testers
336
-
337
- See: `protocols/contribution.md` for attribution requirements.
338
-
339
- ---
340
-
341
- ## References
342
-
343
- - **Test Framework**: [BATS](https://github.com/bats-core/bats-core)
344
- - **Existing Tests**: `tests/unit/`, `tests/integration/`
345
- - **Test Helpers**: `tests/test_helper/bats-support/`, `tests/test_helper/bats-assert/`
346
- - **Specification**: `docs/specs/PROTOCOL-ENFORCEMENT-SPEC.md`
@@ -1,229 +0,0 @@
1
- # Validation Protocol
2
-
3
- **Provenance**: @task T3155, @epic T3147
4
- **Version**: 1.0.1
5
- **Type**: Conditional Protocol
6
- **Stage**: IVTR - V (Validation)
7
- **Max Active**: 3 protocols (including base)
8
-
9
- ---
10
-
11
- ## Trigger Conditions
12
-
13
- This protocol activates when the task involves:
14
-
15
- | Trigger | Keywords | Context |
16
- |---------|----------|---------|
17
- | Verification | "validate", "verify", "check", "audit" | Correctness checking |
18
- | Quality | "quality", "qa", "review" | Quality assurance |
19
- | Compliance | "compliance", "conform", "standard" | Standards adherence |
20
- | Smoke Test | "smoke", "sanity", "basic test" | Initial verification |
21
-
22
- **Explicit Override**: `--protocol validation` flag on task creation.
23
-
24
- **Lifecycle Position**: After Implementation (I), before Testing (T)
25
-
26
- ---
27
-
28
- ## Requirements (RFC 2119)
29
-
30
- ### MUST
31
-
32
- | Requirement | Description |
33
- |-------------|-------------|
34
- | VALID-001 | MUST verify implementation matches specification |
35
- | VALID-002 | MUST run existing test suite and report results |
36
- | VALID-003 | MUST check protocol compliance via `lib/protocol-validation.sh` |
37
- | VALID-004 | MUST document pass/fail status for each validation check |
38
- | VALID-005 | MUST write validation summary to manifest |
39
- | VALID-006 | MUST set `agent_type: "validation"` in manifest |
40
- | VALID-007 | MUST block progression if critical validations fail |
41
-
42
- ### SHOULD
43
-
44
- | Requirement | Description |
45
- |-------------|-------------|
46
- | VALID-010 | SHOULD verify edge cases identified in specification |
47
- | VALID-011 | SHOULD check for regressions in related functionality |
48
- | VALID-012 | SHOULD validate error handling paths |
49
- | VALID-013 | SHOULD measure against acceptance criteria |
50
-
51
- ### MAY
52
-
53
- | Requirement | Description |
54
- |-------------|-------------|
55
- | VALID-020 | MAY perform performance validation |
56
- | VALID-021 | MAY verify security constraints |
57
- | VALID-022 | MAY suggest additional test cases |
58
-
59
- ---
60
-
61
- ## Validation Checklist
62
-
63
- ### Code Validation
64
-
65
- ```bash
66
- # 1. Syntax check
67
- bash -n scripts/*.sh lib/*.sh
68
-
69
- # 2. Protocol compliance
70
- source lib/protocol-validation.sh
71
- validate_implementation_protocol "$TASK_ID"
72
-
73
- # 3. Run existing tests
74
- bats tests/unit/*.bats
75
- bats tests/integration/*.bats
76
- ```
77
-
78
- ### Specification Compliance
79
-
80
- | Check | Command | Pass Criteria |
81
- |-------|---------|---------------|
82
- | Spec exists | `ls docs/specs/*.md` | File present |
83
- | RFC 2119 keywords | `grep -E "MUST|SHOULD|MAY"` | Keywords present |
84
- | Implementation matches | Manual review | All MUST satisfied |
85
-
86
- ### Exit Code Validation
87
-
88
- | Exit Code | Meaning | Action |
89
- |-----------|---------|--------|
90
- | 0 | All validations pass | Proceed to Testing |
91
- | 62 | Specification mismatch | Fix implementation |
92
- | 64 | Implementation protocol violation | Fix provenance |
93
- | 67 | Generic protocol violation | Review and fix |
94
-
95
- ---
96
-
97
- ## Output Format
98
-
99
- ### Validation Report
100
-
101
- ```markdown
102
- # Validation Report: T####
103
-
104
- **Date**: YYYY-MM-DD
105
- **Validator**: agent-id
106
- **Task**: T####
107
- **Epic**: T####
108
-
109
- ## Summary
110
-
111
- - **Status**: PASS | FAIL | PARTIAL
112
- - **Checks Passed**: X/Y
113
- - **Critical Issues**: N
114
-
115
- ## Detailed Results
116
-
117
- | Check | Result | Notes |
118
- |-------|--------|-------|
119
- | Syntax | PASS | No errors |
120
- | Tests | PASS | 48/48 pass |
121
- | Protocol | PASS | Compliance 95% |
122
-
123
- ## Issues Found
124
-
125
- 1. [Issue description]
126
- 2. [Issue description]
127
-
128
- ## Recommendations
129
-
130
- 1. [Action item]
131
- ```
132
-
133
- ### Manifest Entry
134
-
135
- @skills/_shared/manifest-operations.md
136
-
137
- Use `cleo research add` to create the manifest entry:
138
-
139
- ```bash
140
- cleo research add \
141
- --title "Validation: [Feature Name]" \
142
- --file "T####-validation-report.md" \
143
- --topics "validation,qa" \
144
- --findings "RESULT: X/Y checks passed,ISSUES: N found,STATUS: PASS|FAIL" \
145
- --status complete \
146
- --task T#### \
147
- --actionable \
148
- --agent-type validation
149
- ```
150
-
151
- ---
152
-
153
- ## Integration Points
154
-
155
- ### With Implementation Protocol
156
-
157
- ```
158
- Implementation (I) ──► Validation (V)
159
-
160
- ├── Run tests
161
- ├── Check compliance
162
- └── Verify spec match
163
- ```
164
-
165
- ### With Testing Protocol
166
-
167
- ```
168
- Validation (V) ──► Testing (T)
169
- │ │
170
- │ ├── Write new tests
171
- │ └── Full coverage
172
-
173
- └── Identifies gaps for Testing to fill
174
- ```
175
-
176
- ### With lib/protocol-validation.sh
177
-
178
- The validation protocol uses these functions:
179
-
180
- | Function | Purpose | Exit Code |
181
- |----------|---------|-----------|
182
- | `validate_implementation_protocol()` | Check IMPL-* compliance | 64 |
183
- | `validate_specification_protocol()` | Check SPEC-* compliance | 62 |
184
- | `validate_protocol()` | Generic protocol check | 67 |
185
-
186
- ---
187
-
188
- ## Enforcement
189
-
190
- ### Via lib/protocol-validation.sh
191
-
192
- ```bash
193
- source lib/protocol-validation.sh
194
-
195
- # Validate a specific protocol
196
- validate_implementation_protocol "$TASK_ID" "$MANIFEST_ENTRY" "true"
197
-
198
- # Generic validation
199
- validate_protocol "implementation" "$TASK_ID" "$DATA"
200
- ```
201
-
202
- ### Exit Codes
203
-
204
- | Code | Constant | Description |
205
- |------|----------|-------------|
206
- | 62 | EXIT_PROTOCOL_SPECIFICATION | Spec validation failed |
207
- | 64 | EXIT_PROTOCOL_IMPLEMENTATION | Implementation validation failed |
208
- | 67 | EXIT_PROTOCOL_GENERIC | Generic validation failed |
209
- | 68 | EXIT_VALIDATION_INCOMPLETE | Validation not finished |
210
-
211
- ---
212
-
213
- ## Cross-Cutting: Contribution Protocol
214
-
215
- When validation involves multi-agent work:
216
-
217
- 1. **Record validator identity** in manifest
218
- 2. **Attribute findings** to validating agent
219
- 3. **Track validation consensus** if multiple validators
220
-
221
- See: `protocols/contribution.md` for attribution requirements.
222
-
223
- ---
224
-
225
- ## References
226
-
227
- - **Specification**: `docs/specs/PROTOCOL-ENFORCEMENT-SPEC.md`
228
- - **Implementation**: `lib/protocol-validation.sh`
229
- - **Tests**: `tests/unit/protocol-validation.bats`