@cleocode/cleo 2026.2.8 → 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 +22676 -26012
- package/dist/cli/index.js.map +4 -4
- package/dist/mcp/index.js +1651 -802
- 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 +3 -4
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleocode/cleo",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.3.0",
|
|
4
4
|
"description": "CLEO V2 - TypeScript task management CLI for AI coding agents",
|
|
5
5
|
"mcpName": "io.github.kryptobaseddev/cleo-mcp-server",
|
|
6
6
|
"type": "module",
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"bin": {
|
|
13
13
|
"cleo": "dist/cli/index.js",
|
|
14
|
-
"ct": "dist/cli/index.js"
|
|
15
|
-
"cleo-mcp": "dist/mcp/index.js"
|
|
14
|
+
"ct": "dist/cli/index.js"
|
|
16
15
|
},
|
|
17
16
|
"repository": {
|
|
18
17
|
"type": "git",
|
|
@@ -57,7 +56,7 @@
|
|
|
57
56
|
"packages/ct-skills",
|
|
58
57
|
"schemas",
|
|
59
58
|
"templates",
|
|
60
|
-
"skills",
|
|
59
|
+
"packages/ct-skills/skills",
|
|
61
60
|
"completions",
|
|
62
61
|
"server.json"
|
|
63
62
|
],
|
|
@@ -77,6 +77,54 @@ ct dash # Project overview
|
|
|
77
77
|
- `find` returns minimal fields only (99% less context)
|
|
78
78
|
- Use `show` only when you need full details for a specific task
|
|
79
79
|
|
|
80
|
+
### Work Selection Decision Tree
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
START
|
|
84
|
+
├─ Has active session? → `session status`
|
|
85
|
+
│ ├─ YES → Has active task? → `tasks current`
|
|
86
|
+
│ │ ├─ YES → Continue working on it
|
|
87
|
+
│ │ └─ NO → `tasks next` → pick suggestion → `tasks start {id}`
|
|
88
|
+
│ └─ NO → `session list` → resume or start new
|
|
89
|
+
│ └─ `session start --scope epic:{id} --auto-focus`
|
|
90
|
+
├─ Know what to work on?
|
|
91
|
+
│ ├─ YES → `tasks find "query"` → `tasks show {id}` → `tasks start {id}`
|
|
92
|
+
│ └─ NO → `admin dash` → identify priority → `tasks next`
|
|
93
|
+
└─ Epic-level work?
|
|
94
|
+
└─ `tasks tree {epicId}` → find actionable leaf → `tasks start {id}`
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Context Bloat Anti-Patterns
|
|
98
|
+
|
|
99
|
+
| Anti-Pattern | Token Cost | Efficient Alternative | Savings |
|
|
100
|
+
|-------------|-----------|----------------------|---------|
|
|
101
|
+
| `tasks list` (no filters) | 2000-5000 | `tasks find "query"` | 80-90% |
|
|
102
|
+
| `admin help --tier 2` first | 2000+ | `admin help` (tier 0 default) | 60-75% |
|
|
103
|
+
| `tasks show` for every task | 400 x N | `tasks find` then `show` for 1-2 | 70-90% |
|
|
104
|
+
| Reading full epic tree | 1000-3000 | `tasks next` for suggestions | 80% |
|
|
105
|
+
| Repeated `session list` | 300 x N | Once at startup, cache result | 90% |
|
|
106
|
+
| `tasks analyze` before starting | 800-1500 | `tasks next --explain` | 50% |
|
|
107
|
+
|
|
108
|
+
### Progressive Disclosure Triggers
|
|
109
|
+
|
|
110
|
+
Load only what you need. Escalate tiers when the task demands it:
|
|
111
|
+
|
|
112
|
+
**Stay at Tier 0** (default -- 80% of work):
|
|
113
|
+
- Single task execution (implement, fix, test)
|
|
114
|
+
- Task discovery and status updates
|
|
115
|
+
- Session start/end
|
|
116
|
+
|
|
117
|
+
**Escalate to Tier 1** when:
|
|
118
|
+
- Managing research artifacts or consensus docs
|
|
119
|
+
- Running validation/compliance checks
|
|
120
|
+
- Working with memory or check domains
|
|
121
|
+
|
|
122
|
+
**Escalate to Tier 2** when:
|
|
123
|
+
- Orchestrating multi-agent workflows
|
|
124
|
+
- Managing release pipelines
|
|
125
|
+
- Working with nexus cross-project operations
|
|
126
|
+
- Spawning subagents with protocol injection
|
|
127
|
+
|
|
80
128
|
## Session Protocol
|
|
81
129
|
|
|
82
130
|
Sessions track work context across agent interactions.
|
|
@@ -130,28 +178,7 @@ After EVERY command:
|
|
|
130
178
|
|
|
131
179
|
## RCSD-IVTR Lifecycle
|
|
132
180
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
RCSD PIPELINE (setup): Research -> Consensus -> Specification -> Decomposition
|
|
137
|
-
EXECUTION (delivery): Implementation -> Contribution -> Release
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Each stage has a lifecycle gate. Entering a later stage requires prior stages to be `completed` or `skipped`. Gate enforcement is configured in `.cleo/config.json` (`strict` | `advisory` | `off`).
|
|
141
|
-
|
|
142
|
-
### Conditional Protocols (9 Types)
|
|
143
|
-
|
|
144
|
-
| Protocol | Use Case |
|
|
145
|
-
|----------|----------|
|
|
146
|
-
| Research | Information gathering |
|
|
147
|
-
| Consensus | Multi-agent decisions |
|
|
148
|
-
| Specification | Document creation |
|
|
149
|
-
| Decomposition | Task breakdown |
|
|
150
|
-
| Implementation | Code execution |
|
|
151
|
-
| Contribution | Work attribution |
|
|
152
|
-
| Release | Version management |
|
|
153
|
-
| Artifact Publish | Artifact distribution |
|
|
154
|
-
| Provenance | Supply chain integrity |
|
|
181
|
+
**Lifecycle**: See CLEO-INJECTION.md standard tier for full RCASD-IVTR+C pipeline details, or `references/rcsd-lifecycle.md` for gate enforcement and subagent architecture.
|
|
155
182
|
|
|
156
183
|
## Time Estimates Prohibited
|
|
157
184
|
|
|
@@ -1,45 +1,47 @@
|
|
|
1
1
|
# CLEO Protocol
|
|
2
2
|
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Status: ACTIVE
|
|
5
5
|
|
|
6
|
-
<!-- MVI Progressive Disclosure: minimal -> standard -> orchestrator -->
|
|
7
|
-
|
|
8
|
-
<!-- TIER:minimal -->
|
|
9
6
|
## CLEO Identity
|
|
10
7
|
|
|
11
8
|
You are a CLEO protocol agent. Use MCP-first operations:
|
|
12
9
|
- `cleo_query` for reads
|
|
13
10
|
- `cleo_mutate` for writes
|
|
14
11
|
|
|
15
|
-
##
|
|
12
|
+
## Mandatory Efficiency Sequence
|
|
16
13
|
|
|
17
|
-
Run
|
|
18
|
-
1. `cleo_query session
|
|
19
|
-
2. `cleo_query admin
|
|
20
|
-
3. `cleo_query tasks
|
|
14
|
+
Run cheapest-first at session start:
|
|
15
|
+
1. `cleo_query session status` — resume existing? (~200 tokens)
|
|
16
|
+
2. `cleo_query admin dash` — project overview (~500 tokens)
|
|
17
|
+
3. `cleo_query tasks current` — active task? (~100 tokens)
|
|
18
|
+
4. `cleo_query tasks next` — what to work on (~300 tokens)
|
|
19
|
+
5. `cleo_query tasks show` — full details for chosen task (~400 tokens)
|
|
21
20
|
|
|
22
|
-
##
|
|
21
|
+
## Agent Work Loop
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
Repeat until session ends:
|
|
24
|
+
1. `tasks current` or `tasks next` → pick task
|
|
25
|
+
2. `tasks show {id}` → read requirements
|
|
26
|
+
3. Do the work (code, test, document)
|
|
27
|
+
4. `tasks complete {id}` → mark done
|
|
28
|
+
5. `tasks next` → continue or end session
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
- `tasks add`
|
|
30
|
-
- `tasks update`
|
|
31
|
-
- `tasks complete`
|
|
30
|
+
## Context Ethics
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
Every MCP call costs tokens. Budget wisely:
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
| Operation | ~Tokens | When to Use |
|
|
35
|
+
|-----------|---------|-------------|
|
|
36
|
+
| `tasks find` | 200-400 | Discovery (NOT `tasks list`) |
|
|
37
|
+
| `tasks show` | 300-600 | After choosing a specific task |
|
|
38
|
+
| `tasks list` | 1000-5000 | ONLY for direct children of a known parent |
|
|
39
|
+
| `admin help` | 500-2000 | ONCE per session, at tier 0 first |
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
ct done T1234
|
|
42
|
-
```
|
|
41
|
+
**Anti-patterns:**
|
|
42
|
+
- Calling `tasks list` without filters (returns ALL tasks with notes)
|
|
43
|
+
- Calling `admin help --tier 2` before trying tier 0
|
|
44
|
+
- Reading full task details for tasks you won't work on
|
|
43
45
|
|
|
44
46
|
## Error Handling
|
|
45
47
|
|
|
@@ -56,121 +58,13 @@ Always check `success` and exit code values. Treat non-zero exit code as failure
|
|
|
56
58
|
## Time Estimates Prohibited
|
|
57
59
|
|
|
58
60
|
Agents MUST NOT provide hours/days/week estimates. Use `small`, `medium`, `large` sizing.
|
|
59
|
-
<!-- /TIER:minimal -->
|
|
60
|
-
|
|
61
|
-
<!-- TIER:standard -->
|
|
62
|
-
## Session Protocol
|
|
63
|
-
|
|
64
|
-
**Step 0 (MANDATORY):** Always call `cleo_query session list` before starting a session.
|
|
65
|
-
|
|
66
|
-
Use session operations to start and end work:
|
|
67
|
-
- MCP `session` operations (`start`, `end`)
|
|
68
|
-
- CLI `ct session` commands
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
ct session list # ALWAYS first
|
|
72
|
-
ct session start --scope epic:T001 --auto-focus --name "Work Session"
|
|
73
|
-
ct session end --note "summary" # ALWAYS when done
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## RCASD-IVTR+C Lifecycle
|
|
77
|
-
|
|
78
|
-
Canonical name is RCASD. Legacy references may still mention RCSD for compatibility.
|
|
79
|
-
|
|
80
|
-
Lifecycle protocols:
|
|
81
|
-
- Research
|
|
82
|
-
- Consensus
|
|
83
|
-
- Specification
|
|
84
|
-
- Decomposition
|
|
85
|
-
- Implementation
|
|
86
|
-
- Contribution
|
|
87
|
-
- Release
|
|
88
|
-
- Artifact Publish
|
|
89
|
-
- Provenance
|
|
90
|
-
|
|
91
|
-
Record lifecycle artifacts in `MANIFEST.jsonl`.
|
|
92
|
-
|
|
93
|
-
## Token System
|
|
94
|
-
|
|
95
|
-
Use Token placeholders such as `{{TASK_ID}}` during composition.
|
|
96
|
-
|
|
97
|
-
## Skill Ecosystem
|
|
98
|
-
|
|
99
|
-
Load focused skills for complex workflows, including `ct-orchestrator`.
|
|
100
|
-
|
|
101
|
-
## Release Workflow
|
|
102
|
-
|
|
103
|
-
Use CLI release flow:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
ct release ship patch
|
|
107
|
-
```
|
|
108
|
-
<!-- /TIER:standard -->
|
|
109
|
-
|
|
110
|
-
<!-- TIER:orchestrator -->
|
|
111
|
-
## Architecture Overview
|
|
112
|
-
|
|
113
|
-
CLEO uses a 2-tier orchestration model: orchestrator control + delegated execution.
|
|
114
|
-
|
|
115
|
-
## ORC Constraints
|
|
116
|
-
|
|
117
|
-
- ORC-001
|
|
118
|
-
- ORC-002
|
|
119
|
-
- ORC-003
|
|
120
|
-
- ORC-004
|
|
121
|
-
- ORC-005
|
|
122
|
-
- ORC-006
|
|
123
|
-
- ORC-007
|
|
124
|
-
- ORC-008
|
|
125
|
-
|
|
126
|
-
## BASE Constraints
|
|
127
|
-
|
|
128
|
-
- BASE-001
|
|
129
|
-
- BASE-002
|
|
130
|
-
- BASE-003
|
|
131
|
-
- BASE-004
|
|
132
|
-
- BASE-005
|
|
133
|
-
- BASE-006
|
|
134
|
-
- BASE-007
|
|
135
|
-
|
|
136
|
-
## Spawn Pipeline
|
|
137
|
-
|
|
138
|
-
Orchestrate subagent sequencing using `orchestrate` planning operations:
|
|
139
|
-
- `analyze`
|
|
140
|
-
- `ready`
|
|
141
|
-
- `next`
|
|
142
|
-
|
|
143
|
-
## Protocol Stack
|
|
144
|
-
|
|
145
|
-
Apply the protocol stack in order with explicit gate checks.
|
|
146
|
-
|
|
147
|
-
## Token Pre-Resolution
|
|
148
|
-
|
|
149
|
-
All orchestration token payloads must satisfy `tokenResolution.fullyResolved` before execution.
|
|
150
|
-
|
|
151
|
-
## Lifecycle Gate Enforcement
|
|
152
|
-
|
|
153
|
-
Support both strict and advisory gate modes.
|
|
154
|
-
|
|
155
|
-
## Anti-Patterns
|
|
156
|
-
|
|
157
|
-
### Orchestrator Anti-Patterns
|
|
158
|
-
|
|
159
|
-
Avoid speculative spawning, gate skipping, and hidden state mutation.
|
|
160
|
-
|
|
161
|
-
### Subagent Anti-Patterns
|
|
162
|
-
|
|
163
|
-
Avoid direct release actions, protocol bypass, and unmanaged context growth.
|
|
164
61
|
|
|
165
|
-
##
|
|
62
|
+
## Escalation
|
|
166
63
|
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
- OUTPUT
|
|
172
|
-
- RETURN
|
|
173
|
-
<!-- /TIER:orchestrator -->
|
|
64
|
+
For deeper guidance beyond this minimal protocol:
|
|
65
|
+
- **Session & lifecycle**: `cleo_query admin help` or load `ct-cleo` skill
|
|
66
|
+
- **Orchestration**: `cleo_query admin help --tier 2` or load `ct-orchestrator` skill
|
|
67
|
+
- **Operations reference**: `docs/specs/CLEO-OPERATIONS-REFERENCE.md`
|
|
174
68
|
|
|
175
69
|
## References
|
|
176
70
|
|
package/templates/cleo-gitignore
CHANGED
|
@@ -1,65 +1,82 @@
|
|
|
1
|
-
#
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# .cleo/.gitignore — Deny-by-default for CLEO project data
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# STRATEGY: Ignore everything, then explicitly allow only tracked files.
|
|
5
|
+
# This prevents runtime data (databases, logs, caches, metrics) from ever
|
|
6
|
+
# being accidentally committed.
|
|
2
7
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# todo.json, todo-archive.json, config.json, sessions.json,
|
|
7
|
-
# project-context.json, todo-log.jsonl, .sequence,
|
|
8
|
-
# templates/, schemas/
|
|
9
|
-
#
|
|
10
|
-
# IGNORED (listed below):
|
|
8
|
+
# Canonical audit: .cleo/agent-outputs/T5159-cleo-file-audit.md
|
|
9
|
+
# ADR: ADR-013-data-integrity-checkpoint-architecture.md
|
|
10
|
+
# =============================================================================
|
|
11
11
|
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
*.tmp
|
|
12
|
+
# Step 1: Ignore everything in .cleo/
|
|
13
|
+
*
|
|
15
14
|
|
|
16
|
-
#
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
# =============================================================================
|
|
16
|
+
# ALLOW LIST — files and directories that SHOULD be tracked
|
|
17
|
+
# =============================================================================
|
|
19
18
|
|
|
20
|
-
#
|
|
21
|
-
|
|
19
|
+
# Step 2: Allow this .gitignore itself
|
|
20
|
+
!.gitignore
|
|
22
21
|
|
|
23
|
-
#
|
|
24
|
-
|
|
22
|
+
# Step 3: Allow project configuration files
|
|
23
|
+
!config.json
|
|
24
|
+
!project-context.json
|
|
25
|
+
!project-info.json
|
|
26
|
+
!setup-otel.sh
|
|
27
|
+
!DATA-SAFETY-IMPLEMENTATION-SUMMARY.md
|
|
25
28
|
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
context-states/
|
|
29
|
+
# Step 4: Allow schemas directory
|
|
30
|
+
!schemas/
|
|
31
|
+
!schemas/**
|
|
30
32
|
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*.db-shm
|
|
33
|
+
# Step 5: Allow templates directory
|
|
34
|
+
!templates/
|
|
35
|
+
!templates/**
|
|
35
36
|
|
|
36
|
-
#
|
|
37
|
-
|
|
37
|
+
# Step 6: Allow ADRs directory (architecture decisions — project-level, not CLEO-specific)
|
|
38
|
+
!adrs/
|
|
39
|
+
!adrs/**
|
|
38
40
|
|
|
39
|
-
# RCASD lifecycle
|
|
40
|
-
rcasd/
|
|
41
|
+
# Step 7: Allow RCASD lifecycle provenance directory
|
|
42
|
+
# Structure: rcasd/{epic#}/research/, consensus/, architecture/, specs/, contributions/
|
|
43
|
+
!rcasd/
|
|
44
|
+
!rcasd/**
|
|
41
45
|
|
|
42
|
-
#
|
|
43
|
-
|
|
46
|
+
# Step 8: Allow agent-outputs directory
|
|
47
|
+
!agent-outputs/
|
|
48
|
+
!agent-outputs/**
|
|
44
49
|
|
|
45
|
-
#
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
# =============================================================================
|
|
51
|
+
# EXPLICIT DENY — safety net that overrides allow rules above
|
|
52
|
+
# =============================================================================
|
|
48
53
|
|
|
49
|
-
#
|
|
50
|
-
|
|
54
|
+
# SQLite databases — NEVER track (data loss root cause, ADR-013)
|
|
55
|
+
*.db
|
|
56
|
+
*.db-shm
|
|
57
|
+
*.db-wal
|
|
58
|
+
*.db-journal
|
|
51
59
|
|
|
52
|
-
#
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
# Logs — NEVER track (append-only runtime data)
|
|
61
|
+
log.json
|
|
62
|
+
tasks-log.jsonl
|
|
63
|
+
todo-log.jsonl
|
|
64
|
+
bypass-log.json
|
|
65
|
+
qa-log.json
|
|
57
66
|
|
|
58
|
-
#
|
|
59
|
-
|
|
67
|
+
# Caches and transient state
|
|
68
|
+
.deps-cache/
|
|
69
|
+
.context-alert-state.json
|
|
70
|
+
.context-state*.json
|
|
71
|
+
context-states/
|
|
72
|
+
.git-checkpoint-state
|
|
73
|
+
.migration-state.json
|
|
60
74
|
|
|
61
|
-
#
|
|
62
|
-
.
|
|
75
|
+
# Instance-specific runtime data
|
|
76
|
+
migrations.json
|
|
77
|
+
sync/
|
|
78
|
+
metrics/
|
|
63
79
|
|
|
64
|
-
#
|
|
65
|
-
|
|
80
|
+
# Backups — NEVER track
|
|
81
|
+
.backups/
|
|
82
|
+
backups/
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
|
-
# Pre-commit guardrails
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
# committed. They can corrupt the database when checked out on another
|
|
6
|
-
# machine. This covers tasks.db, brain.db, and any future SQLite databases.
|
|
2
|
+
# Pre-commit guardrails:
|
|
3
|
+
# 1. Reject SQLite WAL/SHM files (data corruption risk).
|
|
4
|
+
# 2. Block commits when core CLEO files are gitignored (data integrity).
|
|
7
5
|
#
|
|
8
6
|
# Installation: Automatically installed via `cleo init`
|
|
9
7
|
|
|
10
8
|
set -e
|
|
11
9
|
|
|
12
|
-
# ── WAL/SHM/journal files
|
|
10
|
+
# ── 1. WAL/SHM/journal files ──────────────────────────────────────────
|
|
13
11
|
BAD_FILES=$(git diff --cached --name-only | grep -E '\.(db-wal|db-shm|db-journal)$' || true)
|
|
14
12
|
|
|
15
13
|
if [ -n "$BAD_FILES" ]; then
|
|
@@ -20,3 +18,23 @@ if [ -n "$BAD_FILES" ]; then
|
|
|
20
18
|
echo "To fix: git rm --cached <file>"
|
|
21
19
|
exit 1
|
|
22
20
|
fi
|
|
21
|
+
|
|
22
|
+
# ── 2. Core file gitignore protection ─────────────────────────────────
|
|
23
|
+
PROTECTED_FILES=".cleo/tasks.db .cleo/config.json .cleo/.gitignore .cleo/project-info.json .cleo/project-context.json"
|
|
24
|
+
IGNORED_CORE=""
|
|
25
|
+
|
|
26
|
+
for f in $PROTECTED_FILES; do
|
|
27
|
+
if [ -f "$f" ] && git check-ignore -q "$f" 2>/dev/null; then
|
|
28
|
+
IGNORED_CORE="$IGNORED_CORE $f"
|
|
29
|
+
fi
|
|
30
|
+
done
|
|
31
|
+
|
|
32
|
+
if [ -n "$IGNORED_CORE" ]; then
|
|
33
|
+
echo "ERROR: Critical CLEO files are being ignored by .gitignore:"
|
|
34
|
+
echo "$IGNORED_CORE"
|
|
35
|
+
echo ""
|
|
36
|
+
echo "These files MUST be tracked by git for CLEO data integrity."
|
|
37
|
+
echo "Check .gitignore and .cleo/.gitignore for rules ignoring these files."
|
|
38
|
+
echo "To fix: remove the ignore rule, then: git add <file>"
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://cleo-dev.com/schemas/v1/agent-configs.schema.json",
|
|
4
|
-
"schemaVersion": "1.0.0",
|
|
5
|
-
"title": "CLEO Agent Configurations Registry Schema",
|
|
6
|
-
"description": "Global registry tracking agent configuration files (CLAUDE.md, AGENTS.md, GEMINI.md) at ~/.cleo/agent-configs.json. Monitors CLEO instruction injection versions and setup status across all supported LLM agent CLIs.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"required": ["schemaVersion", "lastUpdated", "configs"],
|
|
9
|
-
"additionalProperties": false,
|
|
10
|
-
|
|
11
|
-
"properties": {
|
|
12
|
-
"schemaVersion": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
15
|
-
"description": "Schema version for this registry file (semver). Initial version: 1.0.0."
|
|
16
|
-
},
|
|
17
|
-
"lastUpdated": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"format": "date-time",
|
|
20
|
-
"description": "ISO 8601 timestamp of last registry modification. Updated when any config entry changes."
|
|
21
|
-
},
|
|
22
|
-
"configs": {
|
|
23
|
-
"type": "object",
|
|
24
|
-
"description": "Agent configuration files keyed by absolute file path. Each entry tracks injection version and setup status for one agent config file.",
|
|
25
|
-
"additionalProperties": {
|
|
26
|
-
"$ref": "#/definitions/agentConfigEntry"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
"definitions": {
|
|
32
|
-
"agentConfigEntry": {
|
|
33
|
-
"type": "object",
|
|
34
|
-
"description": "Single agent configuration file tracking entry. Monitors CLEO instruction injection version and setup state.",
|
|
35
|
-
"required": ["version", "method", "setupDate", "status"],
|
|
36
|
-
"additionalProperties": false,
|
|
37
|
-
"properties": {
|
|
38
|
-
"version": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
41
|
-
"description": "CLEO version of injected instructions. Extracted from <!-- CLEO:START vX.X.X --> marker."
|
|
42
|
-
},
|
|
43
|
-
"method": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"enum": ["@", "inline", "embed"],
|
|
46
|
-
"description": "Injection method used: @=@ reference to ~/.cleo/docs/, inline=marker-based injection, embed=full content embedded."
|
|
47
|
-
},
|
|
48
|
-
"setupDate": {
|
|
49
|
-
"type": "string",
|
|
50
|
-
"format": "date-time",
|
|
51
|
-
"description": "ISO 8601 timestamp when this config file was first created/configured by CLEO."
|
|
52
|
-
},
|
|
53
|
-
"lastChecked": {
|
|
54
|
-
"type": ["string", "null"],
|
|
55
|
-
"format": "date-time",
|
|
56
|
-
"description": "ISO 8601 timestamp of most recent validation check. Null if never validated since setup."
|
|
57
|
-
},
|
|
58
|
-
"status": {
|
|
59
|
-
"type": "string",
|
|
60
|
-
"enum": ["current", "outdated", "missing", "invalid"],
|
|
61
|
-
"description": "Config file health status: current=version matches CLI, outdated=old version detected, missing=file not found, invalid=corrupt or unparseable."
|
|
62
|
-
},
|
|
63
|
-
"cliVersion": {
|
|
64
|
-
"type": ["string", "null"],
|
|
65
|
-
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
66
|
-
"description": "CLEO CLI version when last checked. Used to detect version drift between agent config and installed CLI."
|
|
67
|
-
},
|
|
68
|
-
"agentType": {
|
|
69
|
-
"type": ["string", "null"],
|
|
70
|
-
"enum": ["claude", "gemini", "codex", "kimi", null],
|
|
71
|
-
"description": "Agent type inferred from config file name/path. Null if cannot determine."
|
|
72
|
-
},
|
|
73
|
-
"notes": {
|
|
74
|
-
"type": ["string", "null"],
|
|
75
|
-
"maxLength": 500,
|
|
76
|
-
"description": "Optional notes about this config (e.g., manual edits detected, custom setup, migration status)."
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
"examples": [
|
|
83
|
-
{
|
|
84
|
-
"schemaVersion": "1.0.0",
|
|
85
|
-
"lastUpdated": "2026-01-05T14:23:45Z",
|
|
86
|
-
"configs": {
|
|
87
|
-
"/home/user/.claude/CLAUDE.md": {
|
|
88
|
-
"version": "0.50.2",
|
|
89
|
-
"method": "@",
|
|
90
|
-
"setupDate": "2026-01-01T10:00:00Z",
|
|
91
|
-
"lastChecked": "2026-01-05T14:23:45Z",
|
|
92
|
-
"status": "current",
|
|
93
|
-
"cliVersion": "0.50.2",
|
|
94
|
-
"agentType": "claude",
|
|
95
|
-
"notes": null
|
|
96
|
-
},
|
|
97
|
-
"/home/user/.claude/AGENTS.md": {
|
|
98
|
-
"version": "0.50.2",
|
|
99
|
-
"method": "@",
|
|
100
|
-
"setupDate": "2026-01-01T10:00:00Z",
|
|
101
|
-
"lastChecked": "2026-01-05T14:23:45Z",
|
|
102
|
-
"status": "current",
|
|
103
|
-
"cliVersion": "0.50.2",
|
|
104
|
-
"agentType": null,
|
|
105
|
-
"notes": null
|
|
106
|
-
},
|
|
107
|
-
"/home/user/.gemini/GEMINI.md": {
|
|
108
|
-
"version": "0.50.1",
|
|
109
|
-
"method": "@",
|
|
110
|
-
"setupDate": "2026-01-01T10:00:00Z",
|
|
111
|
-
"lastChecked": "2026-01-05T14:23:45Z",
|
|
112
|
-
"status": "outdated",
|
|
113
|
-
"cliVersion": "0.50.2",
|
|
114
|
-
"agentType": "gemini",
|
|
115
|
-
"notes": "Needs update to v0.50.2"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
}
|