@cleocode/cleo 2026.2.9 → 2026.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -13
- package/dist/cli/index.js +1920 -1180
- package/dist/cli/index.js.map +4 -4
- package/dist/mcp/index.js +1645 -793
- package/dist/mcp/index.js.map +4 -4
- package/drizzle/20260301053344_careless_changeling/migration.sql +27 -0
- package/drizzle/20260301053344_careless_changeling/snapshot.json +2598 -0
- package/package.json +2 -2
- package/packages/ct-skills/skills/ct-cleo/SKILL.md +49 -22
- package/templates/CLEO-INJECTION.md +32 -138
- package/templates/cleo-gitignore +66 -49
- package/templates/git-hooks/pre-commit +24 -6
- package/schemas/archive/agent-configs.schema.json +0 -120
- package/schemas/archive/agent-registry.schema.json +0 -132
- package/schemas/archive/archive.schema.json +0 -450
- package/schemas/archive/claudedocs-frontmatter.schema.json +0 -162
- package/schemas/archive/commands-index.schema.json +0 -158
- package/schemas/archive/contribution.schema.json +0 -722
- package/schemas/archive/critical-path.schema.json +0 -246
- package/schemas/archive/deps-cache.schema.json +0 -97
- package/schemas/archive/doctor-output.schema.json +0 -283
- package/schemas/archive/error.schema.json +0 -161
- package/schemas/archive/export-package.schema.json +0 -375
- package/schemas/archive/global-config.schema.json +0 -219
- package/schemas/archive/log.schema.json +0 -250
- package/schemas/archive/metrics.schema.json +0 -328
- package/schemas/archive/migrations.schema.json +0 -150
- package/schemas/archive/nexus-registry.schema.json +0 -90
- package/schemas/archive/output.schema.json +0 -164
- package/schemas/archive/rcsd-consensus-report.schema.json +0 -491
- package/schemas/archive/rcsd-hitl-resolution.schema.json +0 -216
- package/schemas/archive/rcsd-index.schema.json +0 -384
- package/schemas/archive/rcsd-manifest.schema.json +0 -264
- package/schemas/archive/rcsd-research-output.schema.json +0 -564
- package/schemas/archive/rcsd-spec-frontmatter.schema.json +0 -225
- package/schemas/archive/releases.schema.json +0 -267
- package/schemas/archive/skills-manifest.schema.json +0 -91
- package/schemas/archive/skillsmp.schema.json +0 -208
- package/schemas/archive/spec-index.schema.json +0 -196
- package/schemas/archive/todo.schema.json +0 -995
- package/schemas/claudedocs-frontmatter.schema.json +0 -162
- package/schemas/commands-index.schema.json +0 -158
- package/schemas/rcsd-consensus-report.schema.json +0 -494
- package/schemas/rcsd-hitl-resolution.schema.json +0 -219
- package/schemas/rcsd-index.schema.json +0 -387
- package/schemas/rcsd-manifest.schema.json +0 -267
- package/schemas/rcsd-research-output.schema.json +0 -567
- package/schemas/rcsd-spec-frontmatter.schema.json +0 -225
- package/schemas/todo.schema.json +0 -994
- package/skills/_shared/cleo-style-guide.md +0 -84
- package/skills/_shared/manifest-operations.md +0 -810
- package/skills/_shared/placeholders.json +0 -433
- package/skills/_shared/skill-chaining-patterns.md +0 -240
- package/skills/_shared/subagent-protocol-base.md +0 -221
- package/skills/_shared/task-system-integration.md +0 -232
- package/skills/_shared/testing-framework-config.md +0 -110
- package/skills/agentskills-integrate.md +0 -104
- package/skills/agentskills-specs.md +0 -255
- package/skills/agentskills-what-are-skills.md +0 -75
- package/skills/manifest.json +0 -510
- package/templates/AGENT-INJECTION.md +0 -166
- /package/schemas/{research-manifest.schema.json → archive/research-manifest.schema.json} +0 -0
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
# Subagent Protocol Base Reference
|
|
2
|
-
|
|
3
|
-
**Provenance**: @task T3155, @epic T3147
|
|
4
|
-
**Version**: 1.0.1
|
|
5
|
-
**Updated**: 2026-02-07
|
|
6
|
-
|
|
7
|
-
This reference defines the RFC 2119 protocol for subagent output and handoff.
|
|
8
|
-
All subagents operating under an orchestrator MUST follow this protocol.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Output Requirements (RFC 2119)
|
|
13
|
-
|
|
14
|
-
### Mandatory Rules
|
|
15
|
-
|
|
16
|
-
| ID | Rule | Compliance |
|
|
17
|
-
|----|------|------------|
|
|
18
|
-
| OUT-001 | MUST write findings to `{{OUTPUT_DIR}}/{{DATE}}_{{TOPIC_SLUG}}.md` | Required |
|
|
19
|
-
| OUT-002 | MUST append ONE line to `{{MANIFEST_PATH}}` | Required |
|
|
20
|
-
| OUT-003 | MUST return ONLY: "Research complete. See MANIFEST.jsonl for summary." | Required |
|
|
21
|
-
| OUT-004 | MUST NOT return research content in response | Required |
|
|
22
|
-
|
|
23
|
-
### Rationale
|
|
24
|
-
|
|
25
|
-
- **OUT-001**: Persistent storage for orchestrator and future agents
|
|
26
|
-
- **OUT-002**: Manifest enables O(1) lookup of key findings
|
|
27
|
-
- **OUT-003**: Minimal response preserves orchestrator context
|
|
28
|
-
- **OUT-004**: Full content would bloat orchestrator context window
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Output File Format
|
|
33
|
-
|
|
34
|
-
Write to `{{OUTPUT_DIR}}/{{DATE}}_{{TOPIC_SLUG}}.md`:
|
|
35
|
-
|
|
36
|
-
```markdown
|
|
37
|
-
# {{TITLE}}
|
|
38
|
-
|
|
39
|
-
## Summary
|
|
40
|
-
|
|
41
|
-
{{2-3 sentence overview}}
|
|
42
|
-
|
|
43
|
-
## Findings
|
|
44
|
-
|
|
45
|
-
### {{Category 1}}
|
|
46
|
-
|
|
47
|
-
{{Details}}
|
|
48
|
-
|
|
49
|
-
### {{Category 2}}
|
|
50
|
-
|
|
51
|
-
{{Details}}
|
|
52
|
-
|
|
53
|
-
## Recommendations
|
|
54
|
-
|
|
55
|
-
{{Action items}}
|
|
56
|
-
|
|
57
|
-
## Sources
|
|
58
|
-
|
|
59
|
-
{{Citations/references}}
|
|
60
|
-
|
|
61
|
-
## Linked Tasks
|
|
62
|
-
|
|
63
|
-
- Epic: {{EPIC_ID}}
|
|
64
|
-
- Task: {{TASK_ID}}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Manifest Entry Format
|
|
70
|
-
|
|
71
|
-
@skills/_shared/manifest-operations.md
|
|
72
|
-
|
|
73
|
-
Use `cleo research add` to create manifest entries instead of manual JSONL appends.
|
|
74
|
-
|
|
75
|
-
**Quick Reference**:
|
|
76
|
-
```bash
|
|
77
|
-
cleo research add \
|
|
78
|
-
--title "{{TITLE}}" \
|
|
79
|
-
--file "{{DATE}}_{{TOPIC_SLUG}}.md" \
|
|
80
|
-
--topics "topic1,topic2,topic3" \
|
|
81
|
-
--findings "Finding 1,Finding 2,Finding 3" \
|
|
82
|
-
--status complete \
|
|
83
|
-
--task {{TASK_ID}} \
|
|
84
|
-
--agent-type research
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
See the reference above for:
|
|
88
|
-
- Complete CLI command syntax
|
|
89
|
-
- Field definitions and constraints
|
|
90
|
-
- Agent type values (RCSD-IVTR + workflow types)
|
|
91
|
-
- Manifest entry schema
|
|
92
|
-
- Anti-patterns to avoid
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Task Lifecycle Integration
|
|
97
|
-
|
|
98
|
-
Reference: @skills/_shared/task-system-integration.md
|
|
99
|
-
|
|
100
|
-
### Execution Sequence
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
1. Read task: {{TASK_SHOW_CMD}} {{TASK_ID}}
|
|
104
|
-
2. Start task: {{TASK_START_CMD}} {{TASK_ID}}
|
|
105
|
-
3. Do work: [skill-specific execution]
|
|
106
|
-
4. Write output: {{OUTPUT_DIR}}/{{DATE}}_{{TOPIC_SLUG}}.md
|
|
107
|
-
5. Create manifest entry: cleo research add [flags]
|
|
108
|
-
6. Complete: {{TASK_COMPLETE_CMD}} {{TASK_ID}}
|
|
109
|
-
7. Return: "Research complete. See MANIFEST.jsonl for summary."
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Research Linking
|
|
115
|
-
|
|
116
|
-
### Link Research to Task
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
{{TASK_LINK_CMD}} {{TASK_ID}} {{RESEARCH_ID}}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**Purpose**: Associate research output with originating task for bidirectional discovery.
|
|
123
|
-
|
|
124
|
-
**CLEO Default**: `cleo research link {{TASK_ID}} {{RESEARCH_ID}}`
|
|
125
|
-
|
|
126
|
-
**When to Link**:
|
|
127
|
-
- SHOULD link after writing research output to manifest
|
|
128
|
-
- SHOULD link when research directly supports task objectives
|
|
129
|
-
- MAY skip if research is exploratory/tangential
|
|
130
|
-
|
|
131
|
-
### Verify Link
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
{{TASK_SHOW_CMD}} {{TASK_ID}}
|
|
135
|
-
# Check: linkedResearch array contains research ID
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Benefits
|
|
139
|
-
|
|
140
|
-
| Benefit | Description |
|
|
141
|
-
|---------|-------------|
|
|
142
|
-
| Bidirectional discovery | Task → Research and Research → Task |
|
|
143
|
-
| Context preservation | Future agents can find prior research |
|
|
144
|
-
| Audit trail | Complete record of work artifacts |
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Completion Checklist
|
|
149
|
-
|
|
150
|
-
Before returning, verify:
|
|
151
|
-
|
|
152
|
-
- [ ] Task started via `{{TASK_START_CMD}}`
|
|
153
|
-
- [ ] Output file written to `{{OUTPUT_DIR}}/`
|
|
154
|
-
- [ ] Manifest entry created via `cleo research add`
|
|
155
|
-
- [ ] Task completed via `{{TASK_COMPLETE_CMD}}`
|
|
156
|
-
- [ ] Response is ONLY the summary message
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## Token Reference
|
|
161
|
-
|
|
162
|
-
### Required Tokens (MUST be provided)
|
|
163
|
-
|
|
164
|
-
| Token | Description | Example |
|
|
165
|
-
|-------|-------------|---------|
|
|
166
|
-
| `{{TASK_ID}}` | Current task identifier | `T1234` |
|
|
167
|
-
| `{{DATE}}` | Current date | `2026-01-19` |
|
|
168
|
-
| `{{TOPIC_SLUG}}` | URL-safe topic name | `authentication-research` |
|
|
169
|
-
|
|
170
|
-
### Optional Tokens (defaults available)
|
|
171
|
-
|
|
172
|
-
| Token | Default | Description |
|
|
173
|
-
|-------|---------|-------------|
|
|
174
|
-
| `{{EPIC_ID}}` | `""` | Parent epic ID |
|
|
175
|
-
| `{{SESSION_ID}}` | `""` | Session identifier |
|
|
176
|
-
| `{{OUTPUT_DIR}}` | `claudedocs/agent-outputs` | Output directory |
|
|
177
|
-
| `{{MANIFEST_PATH}}` | `{{OUTPUT_DIR}}/MANIFEST.jsonl` | Manifest location |
|
|
178
|
-
|
|
179
|
-
### Task System Tokens (CLEO defaults)
|
|
180
|
-
|
|
181
|
-
| Token | CLEO Default |
|
|
182
|
-
|-------|--------------|
|
|
183
|
-
| `{{TASK_SHOW_CMD}}` | `cleo show` |
|
|
184
|
-
| `{{TASK_START_CMD}}` | `cleo start` |
|
|
185
|
-
| `{{TASK_COMPLETE_CMD}}` | `cleo complete` |
|
|
186
|
-
| `{{TASK_LINK_CMD}}` | `cleo research link` |
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Error Handling
|
|
191
|
-
|
|
192
|
-
### Partial Completion
|
|
193
|
-
|
|
194
|
-
If work cannot complete fully:
|
|
195
|
-
|
|
196
|
-
1. Write partial findings to output file
|
|
197
|
-
2. Set manifest `"status": "partial"`
|
|
198
|
-
3. Add blocking reason to `needs_followup`
|
|
199
|
-
4. Complete task (partial work is still progress)
|
|
200
|
-
5. Return: "Research partial. See MANIFEST.jsonl for details."
|
|
201
|
-
|
|
202
|
-
### Blocked Status
|
|
203
|
-
|
|
204
|
-
If work cannot proceed:
|
|
205
|
-
|
|
206
|
-
1. Write blocking analysis to output file
|
|
207
|
-
2. Set manifest `"status": "blocked"`
|
|
208
|
-
3. Add blocker details to `needs_followup`
|
|
209
|
-
4. Do NOT complete task (leave for orchestrator decision)
|
|
210
|
-
5. Return: "Research blocked. See MANIFEST.jsonl for blocker details."
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## Anti-Patterns
|
|
215
|
-
|
|
216
|
-
| Pattern | Problem | Solution |
|
|
217
|
-
|---------|---------|----------|
|
|
218
|
-
| Returning full content | Bloats orchestrator context | Return only summary message |
|
|
219
|
-
| Manual JSONL append | No validation, race conditions | Use `cleo research add` |
|
|
220
|
-
| Missing manifest entry | Orchestrator can't find findings | Always create manifest entry |
|
|
221
|
-
| Incomplete checklist | Protocol violation | Verify all items before return |
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
# Task System Integration Reference
|
|
2
|
-
|
|
3
|
-
This reference defines portable task management commands using dynamic tokens.
|
|
4
|
-
Skills and templates SHOULD reference this file instead of hardcoding CLEO commands.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Task Lifecycle Commands
|
|
9
|
-
|
|
10
|
-
### Read Task Details
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
{{TASK_SHOW_CMD}} {{TASK_ID}}
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
**Purpose**: Get full task context before starting work.
|
|
17
|
-
|
|
18
|
-
**CLEO Default**: `cleo show {{TASK_ID}}`
|
|
19
|
-
|
|
20
|
-
### Start Task
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
{{TASK_START_CMD}} {{TASK_ID}}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
**Purpose**: Mark task as active/in-progress.
|
|
27
|
-
|
|
28
|
-
**CLEO Default**: `cleo start {{TASK_ID}}`
|
|
29
|
-
|
|
30
|
-
### Complete Task
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
{{TASK_COMPLETE_CMD}} {{TASK_ID}}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
**Purpose**: Mark task as done after work completes.
|
|
37
|
-
|
|
38
|
-
**CLEO Default**: `cleo complete {{TASK_ID}}`
|
|
39
|
-
|
|
40
|
-
### Link Research
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
{{TASK_LINK_CMD}} {{TASK_ID}} {{RESEARCH_ID}}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**Purpose**: Associate research output with task.
|
|
47
|
-
|
|
48
|
-
**CLEO Default**: `cleo research link {{TASK_ID}} {{RESEARCH_ID}}`
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Query Commands
|
|
53
|
-
|
|
54
|
-
### List Tasks
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
{{TASK_LIST_CMD}} [--status STATUS] [--parent EPIC_ID]
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
**CLEO Default**: `cleo list`
|
|
61
|
-
|
|
62
|
-
### Find Tasks
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
{{TASK_FIND_CMD}} "query"
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**CLEO Default**: `cleo find`
|
|
69
|
-
|
|
70
|
-
### Add Task
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
{{TASK_ADD_CMD}} "Title" [OPTIONS]
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**CLEO Default**: `cleo add`
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## File Attachment
|
|
81
|
-
|
|
82
|
-
### Attach Files to Task
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
{{TASK_ADD_CMD}} "Title" --files "path1,path2"
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Or update existing task:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
cleo update {{TASK_ID}} --files "path1,path2"
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**Purpose**: Attach context files for agent reference.
|
|
95
|
-
|
|
96
|
-
**CLEO Default**: `cleo add/update --files "paths"`
|
|
97
|
-
|
|
98
|
-
**Storage**: `.files` array in task JSON
|
|
99
|
-
|
|
100
|
-
### When to Use --files vs Research Link
|
|
101
|
-
|
|
102
|
-
| Method | Use Case | Storage |
|
|
103
|
-
|--------|----------|---------|
|
|
104
|
-
| `--files` | Reference existing docs, code files | Task `.files` array |
|
|
105
|
-
| `research link` | Connect subagent research outputs | Task `.linkedResearch` array |
|
|
106
|
-
|
|
107
|
-
### Guidelines
|
|
108
|
-
|
|
109
|
-
- **SHOULD** use `--files` for input context (specs, designs, code files)
|
|
110
|
-
- **SHOULD** use `research link` for output artifacts (research findings)
|
|
111
|
-
- **MAY** combine both for comprehensive task context
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## CLEO-Specific Extensions
|
|
116
|
-
|
|
117
|
-
When the task system is CLEO, these additional commands are available:
|
|
118
|
-
|
|
119
|
-
| Command | Purpose |
|
|
120
|
-
|---------|---------|
|
|
121
|
-
| `cleo current` | Show current active task |
|
|
122
|
-
| `cleo session start` | Begin work session |
|
|
123
|
-
| `cleo session end` | End work session |
|
|
124
|
-
| `cleo analyze` | Task triage with scoring |
|
|
125
|
-
| `cleo deps {{TASK_ID}}` | Check task dependencies |
|
|
126
|
-
| `cleo tree --parent {{EPIC_ID}}` | Visualize hierarchy |
|
|
127
|
-
|
|
128
|
-
### Session Lifecycle
|
|
129
|
-
|
|
130
|
-
Sessions persist across Claude conversations and support long-running work.
|
|
131
|
-
|
|
132
|
-
**Key Behaviors**:
|
|
133
|
-
- Sessions receive timeout warning after **72 hours** of inactivity
|
|
134
|
-
- Active sessions are auto-ended after **7 days** (configurable via `retention.autoEndActiveAfterDays`)
|
|
135
|
-
- Ended/suspended sessions can be cleaned up with `cleo session gc`
|
|
136
|
-
- Stale active sessions (72h+) cleaned with `cleo session gc --include-active`
|
|
137
|
-
|
|
138
|
-
**Session Commands**:
|
|
139
|
-
|
|
140
|
-
| Command | Purpose |
|
|
141
|
-
|---------|---------|
|
|
142
|
-
| `cleo session start --scope epic:{{EPIC_ID}}` | Begin scoped session |
|
|
143
|
-
| `cleo session end --note "summary"` | End session properly |
|
|
144
|
-
| `cleo session list` | Check existing sessions |
|
|
145
|
-
| `cleo session resume <id>` | Resume previous session |
|
|
146
|
-
| `cleo session gc` | Clean up ended/suspended sessions |
|
|
147
|
-
| `cleo session gc --include-active` | Also clean stale active sessions |
|
|
148
|
-
|
|
149
|
-
**Best Practices**:
|
|
150
|
-
- **MUST** check `cleo session list` before starting new sessions
|
|
151
|
-
- **SHOULD** end sessions properly with `cleo session end --note "summary"` to avoid accumulation
|
|
152
|
-
- **SHOULD** use `cleo session gc` periodically to clean up old ended/suspended sessions
|
|
153
|
-
- **MAY** use `cleo session gc --include-active` to clean stale active sessions (72h+ inactive)
|
|
154
|
-
- Long-running sessions (multi-day work) are expected and supported
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## Token Defaults
|
|
159
|
-
|
|
160
|
-
When tokens are not explicitly configured, assume CLEO defaults:
|
|
161
|
-
|
|
162
|
-
| Token | Default Value |
|
|
163
|
-
|-------|---------------|
|
|
164
|
-
| `{{TASK_SHOW_CMD}}` | `cleo show` |
|
|
165
|
-
| `{{TASK_START_CMD}}` | `cleo start` |
|
|
166
|
-
| `{{TASK_COMPLETE_CMD}}` | `cleo complete` |
|
|
167
|
-
| `{{TASK_LINK_CMD}}` | `cleo research link` |
|
|
168
|
-
| `{{TASK_LIST_CMD}}` | `cleo list` |
|
|
169
|
-
| `{{TASK_FIND_CMD}}` | `cleo find` |
|
|
170
|
-
| `{{TASK_ADD_CMD}}` | `cleo add` |
|
|
171
|
-
| `{{OUTPUT_DIR}}` | `claudedocs/agent-outputs` |
|
|
172
|
-
| `{{MANIFEST_PATH}}` | `{{OUTPUT_DIR}}/MANIFEST.jsonl` |
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## Usage in Skills
|
|
177
|
-
|
|
178
|
-
Reference this file from SKILL.md:
|
|
179
|
-
|
|
180
|
-
```markdown
|
|
181
|
-
### Task System Integration
|
|
182
|
-
|
|
183
|
-
@skills/_shared/task-system-integration.md
|
|
184
|
-
|
|
185
|
-
Execute lifecycle commands:
|
|
186
|
-
1. Read task: `{{TASK_SHOW_CMD}} {{TASK_ID}}`
|
|
187
|
-
2. Start task: `{{TASK_START_CMD}} {{TASK_ID}}`
|
|
188
|
-
3. Complete: `{{TASK_COMPLETE_CMD}} {{TASK_ID}}`
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## Usage in Templates
|
|
194
|
-
|
|
195
|
-
Include task lifecycle section in templates:
|
|
196
|
-
|
|
197
|
-
```markdown
|
|
198
|
-
### Task Lifecycle
|
|
199
|
-
|
|
200
|
-
1. MUST read task details: `{{TASK_SHOW_CMD}} {{TASK_ID}}`
|
|
201
|
-
2. MUST start task: `{{TASK_START_CMD}} {{TASK_ID}}`
|
|
202
|
-
3. MUST complete task: `{{TASK_COMPLETE_CMD}} {{TASK_ID}}`
|
|
203
|
-
4. SHOULD link research: `{{TASK_LINK_CMD}} {{TASK_ID}} {{RESEARCH_ID}}`
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
## Non-CLEO Configurations
|
|
209
|
-
|
|
210
|
-
### Linear
|
|
211
|
-
|
|
212
|
-
```yaml
|
|
213
|
-
TASK_SHOW_CMD: "linear issue view"
|
|
214
|
-
TASK_START_CMD: "linear issue update --status in-progress"
|
|
215
|
-
TASK_COMPLETE_CMD: "linear issue update --status done"
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Jira
|
|
219
|
-
|
|
220
|
-
```yaml
|
|
221
|
-
TASK_SHOW_CMD: "jira issue view"
|
|
222
|
-
TASK_START_CMD: "jira issue move --status 'In Progress'"
|
|
223
|
-
TASK_COMPLETE_CMD: "jira issue move --status 'Done'"
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### GitHub Issues
|
|
227
|
-
|
|
228
|
-
```yaml
|
|
229
|
-
TASK_SHOW_CMD: "gh issue view"
|
|
230
|
-
TASK_START_CMD: "gh issue edit --add-label 'in-progress'"
|
|
231
|
-
TASK_COMPLETE_CMD: "gh issue close"
|
|
232
|
-
```
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Testing Framework Configuration
|
|
2
|
-
|
|
3
|
-
CLEO supports 16 testing frameworks. Configure your project's testing setup in `.cleo/config.json`:
|
|
4
|
-
|
|
5
|
-
## Framework Examples
|
|
6
|
-
|
|
7
|
-
### Node.js with Vitest (TypeScript)
|
|
8
|
-
```json
|
|
9
|
-
{
|
|
10
|
-
"validation": {
|
|
11
|
-
"testing": {
|
|
12
|
-
"framework": "vitest",
|
|
13
|
-
"command": "vitest run",
|
|
14
|
-
"directory": "tests",
|
|
15
|
-
"testFilePatterns": ["**/*.test.ts"]
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Node.js with Jest
|
|
22
|
-
```json
|
|
23
|
-
{
|
|
24
|
-
"validation": {
|
|
25
|
-
"testing": {
|
|
26
|
-
"framework": "jest",
|
|
27
|
-
"command": "jest --passWithNoTests",
|
|
28
|
-
"testFilePatterns": ["**/*.test.js", "**/*.spec.js"]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Python with pytest
|
|
35
|
-
```json
|
|
36
|
-
{
|
|
37
|
-
"validation": {
|
|
38
|
-
"testing": {
|
|
39
|
-
"framework": "pytest",
|
|
40
|
-
"command": "pytest -v",
|
|
41
|
-
"directory": "tests",
|
|
42
|
-
"testFilePatterns": ["**/test_*.py"]
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Rust with Cargo
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
"validation": {
|
|
52
|
-
"testing": {
|
|
53
|
-
"framework": "cargo",
|
|
54
|
-
"command": "cargo test"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Go
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"validation": {
|
|
64
|
-
"testing": {
|
|
65
|
-
"framework": "go",
|
|
66
|
-
"command": "go test ./..."
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Supported Frameworks
|
|
73
|
-
|
|
74
|
-
| Framework | Extension | Ecosystem |
|
|
75
|
-
|-----------|-----------|-----------|
|
|
76
|
-
| bats | .bats | Bash |
|
|
77
|
-
| jest, vitest, playwright, cypress, mocha, ava, uvu, tap | .test.js/.ts | Node.js |
|
|
78
|
-
| node:test, deno, bun | .test.ts | Runtime built-ins |
|
|
79
|
-
| pytest | _test.py | Python |
|
|
80
|
-
| go | _test.go | Go |
|
|
81
|
-
| cargo | .rs | Rust |
|
|
82
|
-
| custom | varies | Any |
|
|
83
|
-
|
|
84
|
-
## Validation Gates
|
|
85
|
-
|
|
86
|
-
Enable test validation before releases:
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"validation": {
|
|
90
|
-
"testing": {
|
|
91
|
-
"requirePassingTests": true,
|
|
92
|
-
"runOnComplete": true
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Auto-Detection
|
|
99
|
-
|
|
100
|
-
Run `cleo init --detect` to automatically configure your project based on manifest files (package.json, Cargo.toml, pyproject.toml, etc.).
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
# Preview detection
|
|
104
|
-
cleo init --detect --dry-run
|
|
105
|
-
|
|
106
|
-
# Apply configuration
|
|
107
|
-
cleo init --detect
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
See `docs/guides/project-config.mdx` for full documentation.
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# Integrate skills into your agent
|
|
2
|
-
|
|
3
|
-
> How to add Agent Skills support to your agent or tool.
|
|
4
|
-
|
|
5
|
-
This guide explains how to add skills support to an AI agent or development tool.
|
|
6
|
-
|
|
7
|
-
## Integration approaches
|
|
8
|
-
|
|
9
|
-
The two main approaches to integrating skills are:
|
|
10
|
-
|
|
11
|
-
**Filesystem-based agents** operate within a computer environment (bash/unix) and represent the most capable option. Skills are activated when models issue shell commands like `cat /path/to/my-skill/SKILL.md`. Bundled resources are accessed through shell commands.
|
|
12
|
-
|
|
13
|
-
**Tool-based agents** function without a dedicated computer environment. Instead, they implement tools allowing models to trigger skills and access bundled assets. The specific tool implementation is up to the developer.
|
|
14
|
-
|
|
15
|
-
## Overview
|
|
16
|
-
|
|
17
|
-
A skills-compatible agent needs to:
|
|
18
|
-
|
|
19
|
-
1. **Discover** skills in configured directories
|
|
20
|
-
2. **Load metadata** (name and description) at startup
|
|
21
|
-
3. **Match** user tasks to relevant skills
|
|
22
|
-
4. **Activate** skills by loading full instructions
|
|
23
|
-
5. **Execute** scripts and access resources as needed
|
|
24
|
-
|
|
25
|
-
## Skill discovery
|
|
26
|
-
|
|
27
|
-
Skills are folders containing a `SKILL.md` file. Your agent should scan configured directories for valid skills.
|
|
28
|
-
|
|
29
|
-
## Loading metadata
|
|
30
|
-
|
|
31
|
-
At startup, parse only the frontmatter of each `SKILL.md` file. This keeps initial context usage low.
|
|
32
|
-
|
|
33
|
-
### Parsing frontmatter
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
function parseMetadata(skillPath):
|
|
37
|
-
content = readFile(skillPath + "/SKILL.md")
|
|
38
|
-
frontmatter = extractYAMLFrontmatter(content)
|
|
39
|
-
|
|
40
|
-
return {
|
|
41
|
-
name: frontmatter.name,
|
|
42
|
-
description: frontmatter.description,
|
|
43
|
-
path: skillPath
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Injecting into context
|
|
48
|
-
|
|
49
|
-
Include skill metadata in the system prompt so the model knows what skills are available.
|
|
50
|
-
|
|
51
|
-
Follow your platform's guidance for system prompt updates. For example, for Claude models, the recommended format uses XML:
|
|
52
|
-
|
|
53
|
-
```xml theme={null}
|
|
54
|
-
<available_skills>
|
|
55
|
-
<skill>
|
|
56
|
-
<name>pdf-processing</name>
|
|
57
|
-
<description>Extracts text and tables from PDF files, fills forms, merges documents.</description>
|
|
58
|
-
<location>/path/to/skills/pdf-processing/SKILL.md</location>
|
|
59
|
-
</skill>
|
|
60
|
-
<skill>
|
|
61
|
-
<name>data-analysis</name>
|
|
62
|
-
<description>Analyzes datasets, generates charts, and creates summary reports.</description>
|
|
63
|
-
<location>/path/to/skills/data-analysis/SKILL.md</location>
|
|
64
|
-
</skill>
|
|
65
|
-
</available_skills>
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
For filesystem-based agents, include the `location` field with the absolute path to the SKILL.md file. For tool-based agents, the location can be omitted.
|
|
69
|
-
|
|
70
|
-
Keep metadata concise. Each skill should add roughly 50-100 tokens to the context.
|
|
71
|
-
|
|
72
|
-
## Security considerations
|
|
73
|
-
|
|
74
|
-
Script execution introduces security risks. Consider:
|
|
75
|
-
|
|
76
|
-
* **Sandboxing**: Run scripts in isolated environments
|
|
77
|
-
* **Allowlisting**: Only execute scripts from trusted skills
|
|
78
|
-
* **Confirmation**: Ask users before running potentially dangerous operations
|
|
79
|
-
* **Logging**: Record all script executions for auditing
|
|
80
|
-
|
|
81
|
-
## Reference implementation
|
|
82
|
-
|
|
83
|
-
The [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref) library provides Python utilities and a CLI for working with skills.
|
|
84
|
-
|
|
85
|
-
For example:
|
|
86
|
-
|
|
87
|
-
**Validate a skill directory:**
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
skills-ref validate <path>
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
**Generate `<available_skills>` XML for agent prompts:**
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
skills-ref to-prompt <path>...
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Use the library source code as a reference implementation.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://agentskills.io/llms.txt
|