@cleocode/skills 2026.9.20 → 2026.9.22
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 +46 -63
- package/frontmatter.d.mts +60 -0
- package/frontmatter.mjs +277 -0
- package/index.d.ts +3 -3
- package/index.js +34 -9
- package/package.json +4 -2
- package/profiles/core.json +10 -3
- package/profiles/full.json +10 -6
- package/profiles/recommended.json +29 -3
- package/skills/_shared/manifest-operations.md +19 -40
- package/skills/_shared/skill-chaining-patterns.md +5 -9
- package/skills/_shared/subagent-protocol-base.md +6 -6
- package/skills/_shared/task-system-integration.md +6 -6
- package/skills/ct-adr-recorder/SKILL.md +22 -16
- package/skills/ct-artifact-publisher/SKILL.md +14 -6
- package/skills/ct-cleo/SKILL.md +97 -16
- package/skills/ct-cleo/__tests__/injection-content.test.ts +62 -13
- package/skills/ct-cleo/references/loom-lifecycle.md +1 -1
- package/skills/{ct-memory/SKILL.md → ct-cleo/references/memory.md} +10 -18
- package/skills/ct-cleo/references/orchestrator-constraints.md +5 -5
- package/skills/ct-cleo/references/session-protocol.md +17 -9
- package/skills/{ct-stickynote/SKILL.md → ct-cleo/references/sticky-notes.md} +7 -25
- package/skills/ct-codebase-mapper/SKILL.md +66 -38
- package/skills/ct-consensus-voter/SKILL.md +14 -6
- package/skills/ct-contribution/SKILL.md +11 -5
- package/skills/ct-council/SKILL.md +5 -0
- package/skills/ct-dev-workflow/SKILL.md +9 -8
- package/skills/ct-documentor/SKILL.md +37 -34
- package/skills/{ct-docs-review/__tests__/skill-docs-review.test.ts → ct-documentor/__tests__/reviewing-reference.test.ts} +4 -3
- package/skills/{ct-docs-write/__tests__/skill-docs-write.test.ts → ct-documentor/__tests__/writing-reference.test.ts} +4 -3
- package/skills/ct-documentor/references/anti-patterns.md +8 -8
- package/skills/{ct-docs-write → ct-documentor}/references/audience-targeting.md +5 -5
- package/skills/ct-documentor/references/chain-orchestration.md +19 -19
- package/skills/{ct-docs-write → ct-documentor}/references/cleo-style-guide.md +1 -1
- package/skills/ct-documentor/references/doc-types-and-templates.md +1 -1
- package/skills/{ct-docs-review → ct-documentor}/references/pr-review-mode.md +1 -1
- package/skills/{ct-docs-review/SKILL.md → ct-documentor/references/reviewing.md} +6 -22
- package/skills/ct-documentor/references/style-coordination.md +5 -5
- package/skills/{ct-docs-review → ct-documentor}/references/style-violations.md +1 -1
- package/skills/{ct-docs-write/SKILL.md → ct-documentor/references/writing.md} +5 -21
- package/skills/ct-epic-architect/SKILL.md +16 -9
- package/skills/ct-epic-architect/references/commands.md +5 -5
- package/skills/ct-epic-architect/references/output-format.md +2 -2
- package/skills/ct-epic-architect/references/patterns.md +2 -2
- package/skills/ct-epic-architect/references/skill-aware-execution.md +3 -3
- package/skills/ct-grade/SKILL.md +7 -4
- package/skills/ct-grade/agents/scenario-runner.md +1 -1
- package/skills/ct-ivt-looper/SKILL.md +27 -21
- package/skills/ct-lead/SKILL.md +49 -12
- package/skills/ct-lead/references/aggregation-protocol.md +44 -21
- package/skills/ct-lead/references/spawn-pattern.md +12 -11
- package/skills/ct-orchestrator/README.md +2 -2
- package/skills/ct-orchestrator/SKILL.md +34 -11
- package/skills/ct-orchestrator/references/SUBAGENT-PROTOCOL-BLOCK.md +4 -4
- package/skills/ct-orchestrator/references/autonomous-operation.md +4 -4
- package/skills/ct-orchestrator/references/orchestrator-compliance.md +3 -3
- package/skills/ct-orchestrator/references/orchestrator-patterns.md +20 -19
- package/skills/ct-orchestrator/references/orchestrator-recovery.md +13 -23
- package/skills/ct-orchestrator/references/orchestrator-spawning.md +9 -10
- package/skills/ct-orchestrator/references/orchestrator-tokens.md +9 -9
- package/skills/ct-provenance-keeper/SKILL.md +14 -6
- package/skills/ct-release-orchestrator/SKILL.md +23 -13
- package/skills/ct-release-orchestrator/references/composition.md +1 -1
- package/skills/ct-release-orchestrator/references/release-types.md +33 -15
- package/skills/ct-research-agent/SKILL.md +18 -12
- package/skills/ct-research-agent/references/triggers-and-routing.md +4 -4
- package/skills/{ct-skill-creator → ct-skill-author}/SKILL.md +12 -4
- package/skills/{ct-skill-validator → ct-skill-author}/agents/ecosystem-checker.md +1 -1
- package/skills/{ct-skill-validator → ct-skill-author}/evals/quality_evals.json +10 -10
- package/skills/{ct-skill-validator → ct-skill-author}/evals/trigger_queries.json +1 -1
- package/skills/{ct-skill-validator → ct-skill-author}/references/cleo-ecosystem-rules.md +8 -4
- package/skills/{ct-skill-creator → ct-skill-author}/references/provider-deployment.md +10 -6
- package/skills/{ct-skill-validator/SKILL.md → ct-skill-author/references/validating.md} +14 -16
- package/skills/{ct-skill-validator → ct-skill-author}/references/validation-rules.md +2 -2
- package/skills/{ct-skill-validator → ct-skill-author}/scripts/_skill_finder.py +2 -2
- package/skills/{ct-skill-validator → ct-skill-author}/scripts/check_depth.py +2 -5
- package/skills/{ct-skill-validator → ct-skill-author}/scripts/generate_validation_report.py +1 -1
- package/skills/{ct-skill-validator → ct-skill-author}/scripts/run_quality_eval.py +2 -2
- package/skills/ct-spec-writer/SKILL.md +13 -7
- package/skills/ct-task-executor/SKILL.md +21 -21
- package/skills/ct-task-executor/references/common-failures.md +3 -3
- package/skills/ct-task-executor/references/evidence-and-gates.md +1 -0
- package/skills/ct-validator/SKILL.md +15 -9
- package/skills/ct-validator/references/compliance-reports.md +1 -1
- package/skills/ct-validator/references/validation-modes.md +3 -3
- package/skills/manifest.json +1313 -481
- package/dispatch-config.json +0 -983
- package/provider-skills-map.json +0 -97
- package/skills/ct-docs-lookup/SKILL.md +0 -181
- package/skills/ct-docs-lookup/references/ctx7-workflow.md +0 -198
- package/skills/ct-docs-lookup/references/library-id-resolution.md +0 -217
- package/skills/ct-docs-lookup/references/version-specific-docs.md +0 -220
- package/skills/ct-master-tac/SKILL.md +0 -116
- package/skills/ct-master-tac/__tests__/install.test.ts +0 -283
- package/skills/ct-master-tac/bundled/README.md +0 -40
- package/skills/ct-master-tac/bundled/protocols/architecture-decision.cant +0 -90
- package/skills/ct-master-tac/bundled/protocols/artifact-publish.cant +0 -105
- package/skills/ct-master-tac/bundled/protocols/consensus.cant +0 -85
- package/skills/ct-master-tac/bundled/protocols/contribution.cant +0 -92
- package/skills/ct-master-tac/bundled/protocols/decomposition.cant +0 -102
- package/skills/ct-master-tac/bundled/protocols/implementation.cant +0 -77
- package/skills/ct-master-tac/bundled/protocols/provenance.cant +0 -100
- package/skills/ct-master-tac/bundled/protocols/release.cant +0 -107
- package/skills/ct-master-tac/bundled/protocols/research.cant +0 -77
- package/skills/ct-master-tac/bundled/protocols/specification.cant +0 -77
- package/skills/ct-master-tac/bundled/protocols/testing.cant +0 -99
- package/skills/ct-master-tac/bundled/protocols/validation.cant +0 -75
- package/skills/ct-master-tac/bundled/teams/platform.cant +0 -115
- package/skills/ct-master-tac/manifest.json +0 -55
- package/skills/ct-skill-creator/eval-viewer/__pycache__/generate_review.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/manifest-entry.json +0 -17
- package/skills/ct-skill-creator/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/aggregate_benchmark.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/generate_report.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/improve_description.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/init_skill.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/quick_validate.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/run_eval.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/run_loop.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/utils.cpython-314.pyc +0 -0
- package/skills/ct-skill-validator/manifest-entry.json +0 -20
- package/skills/ct-stickynote/README.md +0 -14
- package/skills/signaldock-connect/SKILL.md +0 -132
- package/skills/signaldock-connect/assets/agent-card.json +0 -48
- package/skills/signaldock-connect/references/api-endpoints.md +0 -131
- package/skills.json +0 -495
- /package/skills/{ct-docs-review → ct-documentor}/references/inline-comment-patterns.md +0 -0
- /package/skills/{ct-docs-write → ct-documentor}/references/markdown-patterns.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/agents/analyzer.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/agents/comparator.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/agents/grader.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/assets/eval_review.html +0 -0
- /package/skills/{ct-skill-validator → ct-skill-author}/assets/valid-skill-example.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/eval-viewer/generate_review.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/eval-viewer/viewer.html +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/dynamic-context.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/frontmatter.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/invocation-control.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/output-patterns.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/schemas.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/workflows.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/__init__.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/aggregate_benchmark.py +0 -0
- /package/skills/{ct-skill-validator → ct-skill-author}/scripts/audit_body.py +0 -0
- /package/skills/{ct-skill-validator → ct-skill-author}/scripts/check_ecosystem.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/generate_report.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/improve_description.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/init_skill.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/package_skill.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/quick_validate.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/run_eval.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/run_loop.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/utils.py +0 -0
- /package/skills/{ct-skill-validator → ct-skill-author}/scripts/validate.py +0 -0
|
@@ -15,7 +15,7 @@ The manifest system provides O(1) append operations and race-condition-free conc
|
|
|
15
15
|
**Default Paths**:
|
|
16
16
|
- Output directory: `.cleo/agent-outputs/` (configurable via `agentOutputs.directory`)
|
|
17
17
|
- Manifest store: `pipeline_manifest` SQLite table (canonical per ADR-027)
|
|
18
|
-
- CLI: `cleo manifest append <json
|
|
18
|
+
- CLI: `cleo manifest append --entry '<json>'` — the only supported write path
|
|
19
19
|
|
|
20
20
|
**Design Principles**:
|
|
21
21
|
- Append-only writes preserve audit trail
|
|
@@ -239,12 +239,9 @@ cleo research show jwt-auth-2026-02-07 # Check linked_tasks
|
|
|
239
239
|
|
|
240
240
|
---
|
|
241
241
|
|
|
242
|
-
###
|
|
242
|
+
### research unlink (retired)
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
> `cleo research update <id>` to change status, or remove the link manually from the task record.
|
|
246
|
-
|
|
247
|
-
---
|
|
244
|
+
Retired. Link edits go through `cleo research link`; there is no unlink verb.
|
|
248
245
|
|
|
249
246
|
### cleo research links
|
|
250
247
|
|
|
@@ -322,19 +319,13 @@ cleo research archive --before-date 2026-01-01
|
|
|
322
319
|
|
|
323
320
|
---
|
|
324
321
|
|
|
325
|
-
###
|
|
322
|
+
### research archive-list (retired)
|
|
326
323
|
|
|
327
|
-
|
|
328
|
-
> `cleo research list --status archived` or query the archive file directly.
|
|
329
|
-
|
|
330
|
-
---
|
|
324
|
+
Retired. List archived entries with `cleo manifest list --filter archived`.
|
|
331
325
|
|
|
332
|
-
###
|
|
326
|
+
### research status (retired)
|
|
333
327
|
|
|
334
|
-
|
|
335
|
-
> for manifest statistics.
|
|
336
|
-
|
|
337
|
-
---
|
|
328
|
+
Retired. Use `cleo research stats` or `cleo manifest stats`.
|
|
338
329
|
|
|
339
330
|
### cleo research stats
|
|
340
331
|
|
|
@@ -369,33 +360,21 @@ cleo research stats
|
|
|
369
360
|
|
|
370
361
|
---
|
|
371
362
|
|
|
372
|
-
###
|
|
373
|
-
|
|
374
|
-
> **Note**: Not currently implemented in the CLI. Manifest validation occurs automatically
|
|
375
|
-
> when entries are created via `cleo research add`.
|
|
376
|
-
|
|
377
|
-
---
|
|
378
|
-
|
|
379
|
-
### cleo research compact
|
|
363
|
+
### research validate (retired)
|
|
380
364
|
|
|
381
|
-
|
|
382
|
-
> manifest size.
|
|
365
|
+
Retired. Validate a subagent's output with `cleo orchestrate validate <taskId>` or `cleo check output`.
|
|
383
366
|
|
|
384
|
-
|
|
367
|
+
### research compact (retired)
|
|
385
368
|
|
|
386
|
-
|
|
369
|
+
Retired. The pipeline_manifest table needs no compaction (ADR-027).
|
|
387
370
|
|
|
388
|
-
|
|
389
|
-
> for entry details.
|
|
371
|
+
### research get (retired)
|
|
390
372
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
### cleo research inject
|
|
373
|
+
Retired. Use `cleo research show <id>` or `cleo manifest show <id>`.
|
|
394
374
|
|
|
395
|
-
|
|
396
|
-
> subagent prompts via `cleo orchestrator spawn <taskId>`.
|
|
375
|
+
### research inject (retired)
|
|
397
376
|
|
|
398
|
-
|
|
377
|
+
Retired. `cleo orchestrate spawn <taskId>` embeds the subagent protocol in the prompt it returns.
|
|
399
378
|
|
|
400
379
|
## Manifest Entry Schema
|
|
401
380
|
|
|
@@ -454,7 +433,7 @@ When present, the `audit` field provides operational metadata:
|
|
|
454
433
|
| `{{EPIC_ID}}` | Parent epic identifier | `T3147` |
|
|
455
434
|
| `{{DATE}}` | Current date | `2026-02-07` |
|
|
456
435
|
| `{{TOPIC_SLUG}}` | URL-safe topic name | `jwt-authentication` |
|
|
457
|
-
| `{{OUTPUT_DIR}}` | Output directory | `.cleo/agent-outputs` |
|
|
436
|
+
| `{{OUTPUT_DIR}}` | Output directory | `.cleo/agent-outputs` (legacy token — do not write there; record output with `cleo docs add`) |
|
|
458
437
|
|
|
459
438
|
|
|
460
439
|
### Command Tokens (CLEO Defaults)
|
|
@@ -477,7 +456,7 @@ When present, the `audit` field provides operational metadata:
|
|
|
477
456
|
```markdown
|
|
478
457
|
## Output Requirements
|
|
479
458
|
|
|
480
|
-
1.
|
|
459
|
+
1. Record findings with `cleo docs add {{TASK_ID}} --content - --type <kind> --slug {{TOPIC_SLUG}}`
|
|
481
460
|
2. Create manifest entry:
|
|
482
461
|
|
|
483
462
|
```bash
|
|
@@ -526,7 +505,7 @@ echo '{"id": "test", "title": "Test"}' >> .cleo/agent-outputs/legacy-manifest.js
|
|
|
526
505
|
|
|
527
506
|
**Solution**: Use `cleo manifest append`
|
|
528
507
|
```bash
|
|
529
|
-
cleo manifest append '{"id":"test","task_id":"T###","type":"research","status":"complete","output":"path/to/output.md","summary":"brief","key_findings":["..."]}'
|
|
508
|
+
cleo manifest append --entry '{"id":"test","task_id":"T###","type":"research","status":"complete","output":"path/to/output.md","summary":"brief","key_findings":["..."]}'
|
|
530
509
|
```
|
|
531
510
|
|
|
532
511
|
---
|
|
@@ -542,7 +521,7 @@ echo "$json" >> .cleo/agent-outputs/legacy-manifest.jsonl
|
|
|
542
521
|
|
|
543
522
|
**Solution**: Use `cleo manifest append`
|
|
544
523
|
```bash
|
|
545
|
-
cleo manifest append '{"id":"...","task_id":"T####","type":"...","status":"complete","output":"...","summary":"...","key_findings":["..."]}'
|
|
524
|
+
cleo manifest append --entry '{"id":"...","task_id":"T####","type":"...","status":"complete","output":"...","summary":"...","key_findings":["..."]}'
|
|
546
525
|
```
|
|
547
526
|
|
|
548
527
|
---
|
|
@@ -41,7 +41,7 @@ The orchestrator delegates work to a subagent via `orchestrate.spawn` with skill
|
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
43
|
# Generate fully-resolved spawn prompt
|
|
44
|
-
cleo
|
|
44
|
+
cleo orchestrate spawn T1234 --json
|
|
45
45
|
|
|
46
46
|
# Provider adapter executes the prompt using its native mechanism
|
|
47
47
|
# - Claude Code: Task tool with cleo-subagent type
|
|
@@ -84,14 +84,10 @@ A skill invokes other skills to complete workflow phases. The loaded skill maint
|
|
|
84
84
|
|
|
85
85
|
```markdown
|
|
86
86
|
# Via Skill tool (programmatic)
|
|
87
|
-
Skill(skill="ct-
|
|
88
|
-
Skill(skill="ct-docs-write")
|
|
89
|
-
Skill(skill="ct-docs-review")
|
|
87
|
+
Skill(skill="ct-documentor") # writing + review references
|
|
90
88
|
|
|
91
89
|
# Via slash command (user-facing)
|
|
92
|
-
/ct-
|
|
93
|
-
/ct-docs-write
|
|
94
|
-
/ct-docs-review
|
|
90
|
+
/ct-documentor
|
|
95
91
|
```
|
|
96
92
|
|
|
97
93
|
### When to Use Skill Chaining
|
|
@@ -180,7 +176,7 @@ Subagent MUST NOT return output content in response.
|
|
|
180
176
|
### Rule 3: File-Based Details (MUST)
|
|
181
177
|
|
|
182
178
|
Detailed findings go to output files, not manifest or response:
|
|
183
|
-
- Full analysis → `
|
|
179
|
+
- Full analysis → `cleo docs add <taskId> --content - --type research --slug <topic>`
|
|
184
180
|
- Summary only → pipeline_manifest key_findings (via `cleo manifest append`)
|
|
185
181
|
|
|
186
182
|
### Rule 4: Token Injection (SHOULD)
|
|
@@ -213,7 +209,7 @@ TOPIC_SLUG # URL-safe topic name
|
|
|
213
209
|
Before spawning subagent:
|
|
214
210
|
- [ ] Identify appropriate skill for task type
|
|
215
211
|
- [ ] Prepare token context (TASK_ID, DATE, TOPIC_SLUG)
|
|
216
|
-
- [ ] `cleo
|
|
212
|
+
- [ ] `cleo orchestrate spawn <taskId> --json`
|
|
217
213
|
- [ ] Verify token resolution is complete (`tokenResolution.fullyResolved`)
|
|
218
214
|
|
|
219
215
|
Before chaining to another skill:
|
|
@@ -15,8 +15,8 @@ All subagents operating under an orchestrator MUST follow this protocol.
|
|
|
15
15
|
|
|
16
16
|
| ID | Rule | Compliance |
|
|
17
17
|
|----|------|------------|
|
|
18
|
-
| OUT-001 | MUST
|
|
19
|
-
| OUT-002 | MUST append ONE entry via `cleo manifest append <json
|
|
18
|
+
| OUT-001 | MUST record findings with `cleo docs add {{TASK_ID}} --content - --type <kind> --slug {{TOPIC_SLUG}}` (never a raw file under `.cleo/agent-outputs/`) | Required |
|
|
19
|
+
| OUT-002 | MUST append ONE entry via `cleo manifest append --entry '<json>'` (writes to pipeline_manifest table per ADR-027/T1093) | Required |
|
|
20
20
|
| OUT-003 | MUST return ONLY: "[Type] complete. Manifest appended to pipeline_manifest." | Required |
|
|
21
21
|
| OUT-004 | MUST NOT return output content in response | Required |
|
|
22
22
|
|
|
@@ -36,7 +36,7 @@ Valid return messages:
|
|
|
36
36
|
|
|
37
37
|
## Output File Format
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Record it with `cleo docs add {{TASK_ID}} --content - --type <kind> --slug {{TOPIC_SLUG}}`, using this body:
|
|
40
40
|
|
|
41
41
|
```markdown
|
|
42
42
|
# {{TITLE}}
|
|
@@ -107,7 +107,7 @@ Reference: @skills/_shared/task-system-integration.md
|
|
|
107
107
|
1. Read task: {{TASK_SHOW_CMD}} {{TASK_ID}}
|
|
108
108
|
2. Start task: {{TASK_START_CMD}} {{TASK_ID}}
|
|
109
109
|
3. Do work: [skill-specific execution]
|
|
110
|
-
4.
|
|
110
|
+
4. Record output: `cleo docs add {{TASK_ID}} --content - --type <kind> --slug {{TOPIC_SLUG}}`
|
|
111
111
|
5. Create manifest entry: cleo research add [flags]
|
|
112
112
|
6. Complete: {{TASK_COMPLETE_CMD}} {{TASK_ID}}
|
|
113
113
|
7. Return: "[Type] complete. Manifest appended to pipeline_manifest."
|
|
@@ -154,7 +154,7 @@ Reference: @skills/_shared/task-system-integration.md
|
|
|
154
154
|
Before returning, verify:
|
|
155
155
|
|
|
156
156
|
- [ ] Task started via `{{TASK_START_CMD}}`
|
|
157
|
-
- [ ] Output
|
|
157
|
+
- [ ] Output recorded with `cleo docs add` (slug in the return message)
|
|
158
158
|
- [ ] Manifest entry created via `cleo research add`
|
|
159
159
|
- [ ] Task completed via `{{TASK_COMPLETE_CMD}}`
|
|
160
160
|
- [ ] Response is ONLY the summary message
|
|
@@ -177,7 +177,7 @@ Before returning, verify:
|
|
|
177
177
|
|-------|---------|-------------|
|
|
178
178
|
| `{{EPIC_ID}}` | `""` | Parent epic ID |
|
|
179
179
|
| `{{SESSION_ID}}` | `""` | Session identifier |
|
|
180
|
-
| `{{OUTPUT_DIR}}` | `.cleo/agent-outputs` | Output directory |
|
|
180
|
+
| `{{OUTPUT_DIR}}` | `.cleo/agent-outputs` | Output directory (legacy token — do not write there; record output with `cleo docs add`) |
|
|
181
181
|
|
|
182
182
|
### Task System Tokens (CLEO defaults)
|
|
183
183
|
|
|
@@ -120,7 +120,7 @@ When the task system is CLEO, these additional commands are available:
|
|
|
120
120
|
|---------|---------|
|
|
121
121
|
| `cleo current` | Show current task |
|
|
122
122
|
| `cleo session start` | Begin work session |
|
|
123
|
-
| `cleo session end` | End
|
|
123
|
+
| `cleo session end` | End THIS terminal's session (elsewhere: `--session <id>`; unbound → `E_SESSION_UNBOUND`) |
|
|
124
124
|
| `cleo analyze` | Task triage with scoring |
|
|
125
125
|
| `cleo deps show {{TASK_ID}}` | Check task dependencies |
|
|
126
126
|
| `cleo tree {{EPIC_ID}}` | Visualize hierarchy rooted at epic |
|
|
@@ -133,24 +133,24 @@ Sessions persist across Claude conversations and support long-running work.
|
|
|
133
133
|
- Sessions receive timeout warning after **72 hours** of inactivity
|
|
134
134
|
- Active sessions are auto-ended after **7 days** (configurable via `retention.autoEndActiveAfterDays`)
|
|
135
135
|
- Ended/suspended sessions can be cleaned up with `cleo session gc`
|
|
136
|
-
- Stale active sessions
|
|
136
|
+
- Stale active sessions cleaned with `cleo session gc --max-age <days>`
|
|
137
137
|
|
|
138
138
|
**Session Commands**:
|
|
139
139
|
|
|
140
140
|
| Command | Purpose |
|
|
141
141
|
|---------|---------|
|
|
142
|
-
| `cleo session start --scope epic:{{EPIC_ID}}` | Begin scoped session |
|
|
142
|
+
| `cleo session start --scope epic:{{EPIC_ID}} --name "..."` | Begin scoped session (`--name` is required) |
|
|
143
143
|
| `cleo session end --note "summary"` | End session properly |
|
|
144
144
|
| `cleo session list` | Check existing sessions |
|
|
145
145
|
| `cleo session resume <id>` | Resume previous session |
|
|
146
146
|
| `cleo session gc` | Clean up ended/suspended sessions |
|
|
147
|
-
| `cleo session gc --
|
|
147
|
+
| `cleo session gc --max-age <days>` | Also end active sessions older than N days |
|
|
148
148
|
|
|
149
149
|
**Best Practices**:
|
|
150
150
|
- **MUST** check `cleo session list` before starting new sessions
|
|
151
151
|
- **SHOULD** end sessions properly with `cleo session end --note "summary"` to avoid accumulation
|
|
152
152
|
- **SHOULD** use `cleo session gc` periodically to clean up old ended/suspended sessions
|
|
153
|
-
- **MAY** use `cleo session gc --
|
|
153
|
+
- **MAY** use `cleo session gc --max-age <days>` to end stale active sessions
|
|
154
154
|
- Long-running sessions (multi-day work) are expected and supported
|
|
155
155
|
|
|
156
156
|
---
|
|
@@ -168,7 +168,7 @@ When tokens are not explicitly configured, assume CLEO defaults:
|
|
|
168
168
|
| `{{TASK_LIST_CMD}}` | `cleo list` |
|
|
169
169
|
| `{{TASK_FIND_CMD}}` | `cleo find` |
|
|
170
170
|
| `{{TASK_ADD_CMD}}` | `cleo add` |
|
|
171
|
-
| `{{OUTPUT_DIR}}` | `.cleo/agent-outputs` |
|
|
171
|
+
| `{{OUTPUT_DIR}}` | `.cleo/agent-outputs` (legacy token — do not write there; record output with `cleo docs add`) |
|
|
172
172
|
|
|
173
173
|
|
|
174
174
|
---
|
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
name: ct-adr-recorder
|
|
3
3
|
description: "Records Architecture Decision Records from accepted consensus verdicts. Use when promoting a consensus outcome to a formal ADR: drafts the document in the proposed-then-accepted HITL lifecycle, links to the originating consensus manifest, persists the decision to the canonical SQLite decisions table, and triggers downstream invalidation when an accepted ADR is later superseded. Triggers on phrases like 'write ADR', 'record architecture decision', 'formalize this decision', 'lock in the choice', 'create ADR-XXX', or when a consensus task reaches completed status and needs formalization."
|
|
4
4
|
protocol: architecture_decision
|
|
5
|
-
loomStage: architecture_decision
|
|
6
5
|
adrRefs:
|
|
7
6
|
- ADR-053
|
|
8
7
|
- ADR-070
|
|
8
|
+
metadata:
|
|
9
|
+
version: 1.0.2
|
|
10
|
+
tier: on-demand
|
|
11
|
+
install: harness
|
|
12
|
+
covers:
|
|
13
|
+
- packages/core/src/validation/protocols/cant/architecture-decision.cant
|
|
14
|
+
- packages/core/src/validation/protocols/protocols-markdown/architecture-decision.md
|
|
15
|
+
loomStage: architecture_decision
|
|
16
|
+
lastReviewed: 2026-09-28
|
|
17
|
+
stability: stable
|
|
9
18
|
---
|
|
10
19
|
|
|
11
20
|
# ADR Recorder
|
|
@@ -224,27 +233,24 @@ Validate every ADR manifest entry through `cleo check protocol`:
|
|
|
224
233
|
|
|
225
234
|
```bash
|
|
226
235
|
# Draft reaches proposed: runs inside the skill, before HITL hand-off.
|
|
227
|
-
cleo check protocol \
|
|
228
|
-
--
|
|
229
|
-
--taskId T4798 \
|
|
236
|
+
cleo check protocol architecture-decision \
|
|
237
|
+
--task-id T4798 \
|
|
230
238
|
--status proposed \
|
|
231
|
-
--
|
|
232
|
-
--
|
|
239
|
+
--persisted-in-db true \
|
|
240
|
+
--adr-content "$(cat docs/adr/ADR-0042.md)"
|
|
233
241
|
|
|
234
242
|
# HITL accepts the ADR: rerun with the review flag.
|
|
235
|
-
cleo check protocol \
|
|
236
|
-
--
|
|
237
|
-
--taskId T4798 \
|
|
243
|
+
cleo check protocol architecture-decision \
|
|
244
|
+
--task-id T4798 \
|
|
238
245
|
--status accepted \
|
|
239
|
-
--
|
|
240
|
-
--
|
|
246
|
+
--hitl-reviewed true \
|
|
247
|
+
--persisted-in-db true
|
|
241
248
|
|
|
242
249
|
# Later supersession: include the cascade flag.
|
|
243
|
-
cleo check protocol \
|
|
244
|
-
--
|
|
245
|
-
--taskId T4798 \
|
|
250
|
+
cleo check protocol architecture-decision \
|
|
251
|
+
--task-id T4798 \
|
|
246
252
|
--status superseded \
|
|
247
|
-
--
|
|
253
|
+
--downstream-flagged true
|
|
248
254
|
```
|
|
249
255
|
|
|
250
256
|
Exit code 0 = valid. Exit code 65 = `HANDOFF_REQUIRED`. Exit code 18 = `CASCADE_FAILED`. Exit code 84 = `PROVENANCE_REQUIRED` (attempted ADR without a linked consensus).
|
|
@@ -270,7 +276,7 @@ Exit code 0 = valid. Exit code 65 = `HANDOFF_REQUIRED`. Exit code 18 = `CASCADE_
|
|
|
270
276
|
5. The manifest entry MUST set `agent_type: "decision"` and reference the output markdown file.
|
|
271
277
|
6. Superseding an accepted ADR MUST trigger the downstream cascade over linked specs, decomps, and impls.
|
|
272
278
|
7. Agents MUST NOT retry the HITL handoff on a loop; wait for the human reviewer.
|
|
273
|
-
8. Always validate via `cleo check protocol
|
|
279
|
+
8. Always validate via `cleo check protocol architecture-decision` before exiting.
|
|
274
280
|
|
|
275
281
|
## See also / References
|
|
276
282
|
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ct-artifact-publisher
|
|
3
3
|
description: "Builds and publishes artifacts to registries (npm, PyPI, cargo, docker, GitHub releases, generic tarballs) following the validate, then dry-run, then build, then publish, then record-provenance pipeline. Invoked by ct-release-orchestrator as a sub-skill when a release has artifact config. Never stores credentials in output or manifest (ARTP-008), always dry-runs first (ARTP-002), halts and attempts rollback on failure (ARTP-009). Triggers when a release config has at least one enabled artifact handler."
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.2
|
|
6
|
+
tier: on-demand
|
|
7
|
+
install: harness
|
|
8
|
+
covers:
|
|
9
|
+
- packages/core/src/validation/protocols/cant/artifact-publish.cant
|
|
10
|
+
- packages/core/src/validation/protocols/protocols-markdown/artifact-publish.md
|
|
11
|
+
lastReviewed: 2026-09-28
|
|
12
|
+
stability: stable
|
|
4
13
|
---
|
|
5
14
|
|
|
6
15
|
# Artifact Publisher
|
|
@@ -109,11 +118,10 @@ Missing credentials exit 90 (`E_PROVENANCE_CONFIG_INVALID` bubbled from provenan
|
|
|
109
118
|
Validate the sub-protocol entry through `cleo check protocol`:
|
|
110
119
|
|
|
111
120
|
```bash
|
|
112
|
-
cleo check protocol \
|
|
113
|
-
--
|
|
114
|
-
--
|
|
115
|
-
--
|
|
116
|
-
--buildPassed true
|
|
121
|
+
cleo check protocol artifact-publish \
|
|
122
|
+
--task-id T4901 \
|
|
123
|
+
--artifact-type npm-package \
|
|
124
|
+
--build-passed true
|
|
117
125
|
```
|
|
118
126
|
|
|
119
127
|
Exit code 0 = artifact published successfully. Exit code 85 = unknown artifact type. Exit code 86 = validation failed. Exit code 87 = build failed. Exit code 88 = publish failed, rollback attempted. Exit code 89 = rollback failed, dirty state.
|
|
@@ -143,4 +151,4 @@ This skill always hands off to ct-provenance-keeper after publish, before writin
|
|
|
143
151
|
5. SHA-256 checksums are mandatory for every build output.
|
|
144
152
|
6. Provenance MUST be recorded via `record_release()` after publish, via ct-provenance-keeper.
|
|
145
153
|
7. On first publish failure, halt and attempt rollback; exit 88 on clean rollback, 89 on dirty.
|
|
146
|
-
8. Validate every run via `cleo check protocol
|
|
154
|
+
8. Validate every run via `cleo check protocol artifact-publish`.
|
package/skills/ct-cleo/SKILL.md
CHANGED
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
name: ct-cleo
|
|
3
3
|
description: CLEO task management protocol - session, task, and workflow guidance. Use when managing tasks, sessions, or multi-agent workflows with the CLEO CLI protocol.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 2.
|
|
6
|
-
|
|
5
|
+
version: 2.22.2
|
|
6
|
+
tier: core
|
|
7
|
+
install: harness
|
|
8
|
+
covers:
|
|
9
|
+
- packages/cleo/src/cli/commands/session.ts
|
|
10
|
+
- packages/cleo/src/cli/commands/focus.ts
|
|
11
|
+
- packages/cleo/src/cli/commands/sticky.ts
|
|
12
|
+
lastReviewed: 2026-09-28
|
|
7
13
|
stability: stable
|
|
8
14
|
---
|
|
9
15
|
|
|
@@ -25,6 +31,43 @@ Provider reference delivery must be verified or embedded self-contained; static
|
|
|
25
31
|
instruction checks do not establish live Codex, Claude, or Kimi behavior.
|
|
26
32
|
|
|
27
33
|
|
|
34
|
+
## Asking the owner (HITL ask tool)
|
|
35
|
+
|
|
36
|
+
Whenever you need the owner to answer, decide, approve or choose ANYTHING, use the
|
|
37
|
+
ask tool (`AskUserQuestion` in Claude Code, or the provider equivalent listed in
|
|
38
|
+
CAAMP's `PROVIDER_ASK_TOOLS`) with concrete, detailed, selectable options. Never
|
|
39
|
+
ask inside a response, and never bury a question or decision in prose. Each option
|
|
40
|
+
states what happens and its trade-offs; put the recommended option first. Do not
|
|
41
|
+
send routine status chatter: report only when done or when a decision is needed.
|
|
42
|
+
|
|
43
|
+
- **Subagents never ask the human.** Return the question with its options to your
|
|
44
|
+
orchestrator (`blocked` plus `{question, options[{label, description}], recommended}`
|
|
45
|
+
in the manifest); the orchestrator asks via its ask tool.
|
|
46
|
+
- **No ask tool in the harness:** emit one LAFS `hitl.request` envelope
|
|
47
|
+
`{question, options[{label, description}], recommended}` and stop.
|
|
48
|
+
|
|
49
|
+
## Project identity and moving between devices
|
|
50
|
+
|
|
51
|
+
A project is identified by its portable `project_id` in `.cleo/project-id`
|
|
52
|
+
(tracked, write-once; ADR-094). A path is only a per-device hint, so a moved or
|
|
53
|
+
restored checkout keeps its identity. After a new device, restore or migration,
|
|
54
|
+
or when a known repo reports "Not inside a CLEO project", registry paths are
|
|
55
|
+
unreachable, or nexus hits `ENOENT` on an old path, run and report:
|
|
56
|
+
|
|
57
|
+
1. `cleo doctor projects` — machine-wide: moved, missing, split and temp rows with
|
|
58
|
+
remedies. Dry-run by default; `--apply` rebinds only on nonce proof and writes a
|
|
59
|
+
receipt; `--rollback <id>` restores.
|
|
60
|
+
2. `cleo doctor project-identity` — missing, conflicting or uncommitted id.
|
|
61
|
+
3. `cleo doctor --all-projects` — unreachable registered projects.
|
|
62
|
+
4. `cleo nexus projects clean --orphans --dry-run` — NEVER without `--dry-run`;
|
|
63
|
+
it deletes rows for projects that merely moved.
|
|
64
|
+
5. `cleo doctor credentials` — credentials still keyed by an old path.
|
|
65
|
+
6. `cleo doctor global-delivery` — `~/.cleo`, the global hub reference and every
|
|
66
|
+
harness CLEO skill install must resolve (a `~/.cleo` link carried by dotfiles from
|
|
67
|
+
Linux dangles on macOS and silences all of them). `--repair` relinks with a receipt.
|
|
68
|
+
|
|
69
|
+
Never delete registry rows for projects that may have moved.
|
|
70
|
+
|
|
28
71
|
## Guarded knowledge repair
|
|
29
72
|
|
|
30
73
|
Use `cleo doctor knowledge --dry-run` to inspect findings and sourced proposals.
|
|
@@ -60,13 +103,14 @@ applies reviewed input through the same lifecycle; `--fix --actor AGENT` handles
|
|
|
60
103
|
confirmed stubs. `cleo doctor repair` retains its separate database-recovery semantics.
|
|
61
104
|
|
|
62
105
|
<!-- thin-pointer: full protocol is in CLEO-INJECTION.md (T9148) -->
|
|
63
|
-
|
|
64
|
-
Emit any section with: `cleo briefing inject --section <name>`
|
|
106
|
+
The always-loaded core is `~/.cleo/templates/CLEO-INJECTION.md`; reference sections ship in the
|
|
107
|
+
package's `CLEO-REFERENCE.md` (T12580). Emit any section with: `cleo briefing inject --section <name>`
|
|
65
108
|
|
|
66
|
-
|
|
67
|
-
· `
|
|
68
|
-
· `
|
|
69
|
-
· `
|
|
109
|
+
Core: `session-start` · `work-loop` · `triggers` · `session-commands` · `output-contract`
|
|
110
|
+
· `error-handling` · `pre-complete-gate` · `rules` · `escalation`. On demand: `task-creation`
|
|
111
|
+
· `task-discovery` · `task-relationships` · `memory` · `memory-jit` · `data-location` · `nexus`
|
|
112
|
+
· `orchestration` · `playbooks` · `documents` · `human-render` · `spawn-tiers` · `evidence`
|
|
113
|
+
· `projection` · `knowledge-repair`
|
|
70
114
|
|
|
71
115
|
Task find defaults to lexical query terms. Fuzzy character-subsequence matching requires `--fuzzy`; inspect per-row `match.kind` and `match.fields` before inferring related work. `--in` restricts the source field. Matching mode and fuzzy field explanations survive scalar/human output on stderr. Semantic retrieval remains separately identified.
|
|
72
116
|
|
|
@@ -78,11 +122,35 @@ Use `cleo backup inspect <snapshot> --record-id <id>` for read-only historical e
|
|
|
78
122
|
|
|
79
123
|
Code-graph answers (`cleo nexus impact`, `context`, `full-context`, `why`, `search-code`, `task-symbols`, `clusters`, `flows`) carry `meta._nexus.freshness`: stale file count and sample, whether the queried symbol's own file is stale, and the refresh command with an estimated cost. A query refreshes up to 25 stale files inline within a 60 s budget (`nexus.autoRefresh.maxFiles`/`budgetMs`/`enabled`) and discloses it in `freshness.autoRefresh`; beyond that it answers from the stale index with `W_NEXUS_INDEX_STALE`. `unknown` freshness is never fresh. `cleo nexus analyze` re-parses only changed files, re-resolves every file, and reports `mode`, `reason` and per-phase cost; it falls back to a full parse (and says why) when there is no parse cache, the extractor build changed, or over 30% of files changed. `--full` forces a rebuild.
|
|
80
124
|
|
|
125
|
+
## Sessions are terminal-bound (T12500)
|
|
126
|
+
|
|
127
|
+
`cleo session start` binds the calling agent process (`CLAUDE_CODE_SESSION_ID`,
|
|
128
|
+
`CODEX_THREAD_ID`, …), pane (`TMUX_PANE`, …) or tab (`TERM_SESSION_ID`, …). Session
|
|
129
|
+
mutations from an unbound caller fail with `E_SESSION_UNBOUND` instead of
|
|
130
|
+
guessing the newest session; bind with `cleo session start`, `cleo session resume
|
|
131
|
+
<id>` or `CLEO_SESSION_ID=<id>`, or name the target with `--session <id>`. CI and
|
|
132
|
+
multi-step scripts must export `CLEO_SESSION_ID`. Unattributed mutations warn on
|
|
133
|
+
stderr; `session status` / `briefing` label a guessed session `unbound: true`.
|
|
134
|
+
|
|
135
|
+
- A session a human started in a tab is adopted by Claude Code in that tab
|
|
136
|
+
(also after a Claude restart). An adopter works in it but cannot end it without
|
|
137
|
+
`--session <id>`, and starting its own session never takes over the tab. A
|
|
138
|
+
session Claude started can be ended from the tab.
|
|
139
|
+
- Two Claude instances that each start a session stay isolated; a sibling tmux
|
|
140
|
+
pane never sees another pane's session.
|
|
141
|
+
- Agent-tool subagents inherit the parent's `CLAUDE_CODE_SESSION_ID` and act in
|
|
142
|
+
the parent's session; `cleo orchestrate spawn` gives workers their own.
|
|
143
|
+
|
|
144
|
+
## Typed decisions (`cleo decide`, T12491)
|
|
145
|
+
|
|
146
|
+
`decide` answers typed questions (yes/no, choice, score) through a swappable Jev-wire provider and falls back to local heuristics when unconfigured or failing. It needs two settings, an API URL and a key: `printf %s "$KEY" | cleo decide config --url <u> --key-stdin` (optional `--model`; `--clear` removes them). The key is kept in a 0600 file and never printed. `cleo decide status` probes reachability and `cleo decide ask --state <text> --noul <q>` runs one debug question.
|
|
147
|
+
|
|
81
148
|
## Quick Reference
|
|
82
149
|
|
|
83
150
|
| Need | Command |
|
|
84
151
|
|------|---------|
|
|
85
152
|
| Start session | `cleo session status` → `cleo briefing` |
|
|
153
|
+
| End session (from another terminal) | `cleo session end --session <id>` |
|
|
86
154
|
| Find work | `cleo next` → `cleo focus <id>` |
|
|
87
155
|
| Search tasks | `cleo find "query"` |
|
|
88
156
|
| Complete task | `cleo verify T### --gate ... --evidence "..."` → `cleo complete T###` |
|
|
@@ -161,7 +229,18 @@ This internal budget contract does not add a `--token-budget` flag to add/update
|
|
|
161
229
|
|
|
162
230
|
## Skill-Specific Extensions
|
|
163
231
|
|
|
164
|
-
|
|
232
|
+
### Reference files
|
|
233
|
+
|
|
234
|
+
| File | Load it when you |
|
|
235
|
+
|------|------------------|
|
|
236
|
+
| `references/session-protocol.md` | start, resume or end sessions; pick skills |
|
|
237
|
+
| `references/orchestrator-constraints.md` | spawn subagents from an orchestrator |
|
|
238
|
+
| `references/loom-lifecycle.md` | move an epic through the LOOM stages |
|
|
239
|
+
| `references/anti-patterns.md` | check a plan against known mistakes |
|
|
240
|
+
| `references/memory.md` | recall or record BRAIN memory (progressive disclosure) |
|
|
241
|
+
| `references/sticky-notes.md` | capture a thought before it is a task: `cleo sticky jot "..."`, then `cleo sticky convert <id> --to-task` |
|
|
242
|
+
|
|
243
|
+
- Task hierarchy, Saga commands, add-batch decomposition, docs policy, and evidence detail live in the on-demand reference; emit `task-creation`, `documents`, and `evidence` when needed.
|
|
165
244
|
- For add-batch input, The top-level JSON MUST be an array of task objects, not an object wrapper like `{ "tasks": [...] }`.
|
|
166
245
|
- Dry-run count semantics: `/data/count` and `/data/wouldCreate` predict writes; `/data/insertedCount` must be `0` for dry-run.
|
|
167
246
|
- Mutation output paths: use `/data/created/0`, `/data/updated/0`, and `/data/deleted/0`; never parse legacy full records. `--output id` emits affected IDs once in created/updated/deleted order from these canonical arrays.
|
|
@@ -326,11 +405,12 @@ and planning document generation (T10634):
|
|
|
326
405
|
|
|
327
406
|
Example — dry-run a scaffold before applying:
|
|
328
407
|
```bash
|
|
329
|
-
# Validate scaffold payload
|
|
330
|
-
cleo workgraph validate
|
|
408
|
+
# Validate scaffold payload (read-only)
|
|
409
|
+
cleo workgraph validate scaffold.json
|
|
331
410
|
|
|
332
|
-
#
|
|
333
|
-
cleo workgraph apply
|
|
411
|
+
# Preview, then apply the validated scaffold atomically
|
|
412
|
+
cleo workgraph apply scaffold.json --dry-run
|
|
413
|
+
cleo workgraph apply scaffold.json
|
|
334
414
|
```
|
|
335
415
|
|
|
336
416
|
## Task Context (PM-Core V2 — T10629/T10630/T10631)
|
|
@@ -364,11 +444,11 @@ cite decisions by durable BRAIN decision IDs.
|
|
|
364
444
|
|
|
365
445
|
| Need | Command |
|
|
366
446
|
|------|---------|
|
|
367
|
-
| Store a decision | `cleo memory store --
|
|
447
|
+
| Store a decision | `cleo memory decision-store --decision "..." --rationale "..."` |
|
|
368
448
|
| Search decisions | `cleo memory decision-find --query <term>` |
|
|
369
449
|
| Find by type | `cleo memory find <term> --type decision` |
|
|
370
450
|
| Fetch full record | `cleo memory fetch <decisionId>` |
|
|
371
|
-
|
|
|
451
|
+
| Find by epic | `cleo memory decision-find "<epicId>"` (no epic filter — query text, then verify `source_table`/`source_rowid`) |
|
|
372
452
|
| Check status | `cleo memory fetch <id>` → check `confirmation_state` field |
|
|
373
453
|
|
|
374
454
|
**Why BRAIN decisions over markdown ledgers:**
|
|
@@ -379,7 +459,8 @@ cite decisions by durable BRAIN decision IDs.
|
|
|
379
459
|
|
|
380
460
|
**Migration rule:** When you encounter a decision ONLY in a markdown ledger
|
|
381
461
|
(`.cleo/adrs/`, `.cleo/agent-outputs/`), store it in the BRAIN with
|
|
382
|
-
`cleo memory store --
|
|
462
|
+
`cleo memory decision-store --decision "..." --rationale "..."` and cite the
|
|
463
|
+
BRAIN ID going forward.
|
|
383
464
|
|
|
384
465
|
## Evidence must prove task criteria
|
|
385
466
|
|
|
@@ -41,13 +41,55 @@ const injectionPath = resolve(
|
|
|
41
41
|
/** Read once — all assertions operate on this string */
|
|
42
42
|
const injectionContent = readFileSync(injectionPath, 'utf-8');
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* T12580: CLEO-INJECTION.md is the always-loaded core; reference sections
|
|
46
|
+
* moved to CLEO-REFERENCE.md and are printed on demand with
|
|
47
|
+
* `cleo briefing inject --section <name>`. Content that moved is asserted
|
|
48
|
+
* where it now lives AND through the core's pointer table, so the test still
|
|
49
|
+
* proves an agent can reach it.
|
|
50
|
+
*/
|
|
51
|
+
const referenceContent = readFileSync(
|
|
52
|
+
resolve(thisDir, '../../../../core/templates/CLEO-REFERENCE.md'),
|
|
53
|
+
'utf-8',
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
/** Body of one on-demand section in the reference, or '' when absent. */
|
|
57
|
+
function referenceSection(name: string): string {
|
|
58
|
+
const open = `<!-- CLEO-INJECTION:section=${name} -->`;
|
|
59
|
+
const start = referenceContent.indexOf(open);
|
|
60
|
+
if (start === -1) return '';
|
|
61
|
+
const end = referenceContent.indexOf(`<!-- /CLEO-INJECTION:section=${name} -->`, start);
|
|
62
|
+
return end === -1 ? '' : referenceContent.slice(start + open.length, end);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Section names the core's "On-demand reference" table points at (first column). */
|
|
66
|
+
function corePointers(): Set<string> {
|
|
67
|
+
const table = injectionContent.slice(injectionContent.indexOf('## On-demand reference'));
|
|
68
|
+
const rows = table.slice(0, table.indexOf('\n## ', 5)).split('\n');
|
|
69
|
+
return new Set(
|
|
70
|
+
rows
|
|
71
|
+
.filter((line) => line.startsWith('| `'))
|
|
72
|
+
.flatMap((line) => [...(line.split('|')[1] ?? '').matchAll(/`([a-z][a-z0-9-]+)`/g)])
|
|
73
|
+
.map((m) => m[1] as string),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Assert `name` is pointed at by the core AND declared in the reference; return its body. */
|
|
78
|
+
function onDemand(name: string): string {
|
|
79
|
+
expect(injectionContent).toContain('cleo briefing inject --section <name>');
|
|
80
|
+
expect(corePointers()).toContain(name);
|
|
81
|
+
const body = referenceSection(name);
|
|
82
|
+
expect(body, `reference section ${name}`).not.toBe('');
|
|
83
|
+
return body;
|
|
84
|
+
}
|
|
85
|
+
|
|
44
86
|
// ---------------------------------------------------------------------------
|
|
45
87
|
// Required section markers
|
|
46
88
|
// ---------------------------------------------------------------------------
|
|
47
89
|
|
|
48
90
|
describe('CLEO-INJECTION.md — required section markers', () => {
|
|
49
|
-
it('
|
|
50
|
-
expect(
|
|
91
|
+
it('delivers "Memory Protocol (JIT)" on demand (core pointer → reference section)', () => {
|
|
92
|
+
expect(onDemand('memory-jit')).toMatch(/^## Memory Protocol \(JIT\)/m);
|
|
51
93
|
});
|
|
52
94
|
|
|
53
95
|
it('contains "Escalation" H2 section', () => {
|
|
@@ -63,8 +105,10 @@ describe('CLEO-INJECTION.md — required section markers', () => {
|
|
|
63
105
|
expect(injectionContent).toMatch(/^## Work Loop/m);
|
|
64
106
|
});
|
|
65
107
|
|
|
66
|
-
it('
|
|
67
|
-
expect(
|
|
108
|
+
it('delivers "Task Discovery" on demand, with the discovery quick form in the core', () => {
|
|
109
|
+
expect(onDemand('task-discovery')).toMatch(/^## Task Discovery/m);
|
|
110
|
+
expect(injectionContent).toContain('cleo find "query"');
|
|
111
|
+
expect(injectionContent).toContain('cleo list --parent <id>');
|
|
68
112
|
});
|
|
69
113
|
});
|
|
70
114
|
|
|
@@ -111,17 +155,22 @@ describe('CLEO-INJECTION.md — command correctness', () => {
|
|
|
111
155
|
expect(injectionContent).toContain('cleo find');
|
|
112
156
|
});
|
|
113
157
|
|
|
114
|
-
it('documents add-batch array input and dry-run count fields', () => {
|
|
115
|
-
|
|
116
|
-
expect(
|
|
117
|
-
expect(
|
|
158
|
+
it('documents add-batch array input and dry-run count fields (task-creation, on demand)', () => {
|
|
159
|
+
const section = onDemand('task-creation');
|
|
160
|
+
expect(section).toContain('top-level JSON array of task objects');
|
|
161
|
+
expect(section).toContain('/data/wouldCreate');
|
|
162
|
+
expect(section).toContain('/data/insertedCount');
|
|
118
163
|
});
|
|
119
164
|
|
|
120
|
-
it('documents docs path policy, strict preflight, and runtime doc kinds', () => {
|
|
121
|
-
|
|
122
|
-
expect(
|
|
123
|
-
expect(
|
|
124
|
-
expect(
|
|
165
|
+
it('documents docs path policy, strict preflight, and runtime doc kinds (documents, on demand)', () => {
|
|
166
|
+
const section = onDemand('documents');
|
|
167
|
+
expect(section).toContain('repo-relative paths');
|
|
168
|
+
expect(section).toContain('arbitrary external absolute paths');
|
|
169
|
+
expect(section).toContain('cleo docs list-types');
|
|
170
|
+
expect(section).toContain('DocKindRegistry');
|
|
171
|
+
// The canonical-doc write/read triggers stay in the core.
|
|
172
|
+
expect(injectionContent).toContain('cleo docs add --type <kind> --slug <kebab-handle>');
|
|
173
|
+
expect(injectionContent).toContain('cleo docs fetch <slug>');
|
|
125
174
|
});
|
|
126
175
|
|
|
127
176
|
it('uses contract-backed mutate field paths', () => {
|