@cleocode/core 2026.3.44 → 2026.3.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/admin/import-tasks.d.ts +10 -2
  2. package/dist/admin/import-tasks.d.ts.map +1 -1
  3. package/dist/bootstrap.d.ts.map +1 -1
  4. package/dist/index.js +1890 -504
  5. package/dist/index.js.map +4 -4
  6. package/dist/init.d.ts.map +1 -1
  7. package/dist/injection.d.ts +1 -1
  8. package/dist/injection.d.ts.map +1 -1
  9. package/dist/internal.d.ts +3 -1
  10. package/dist/internal.d.ts.map +1 -1
  11. package/dist/nexus/index.d.ts +2 -0
  12. package/dist/nexus/index.d.ts.map +1 -1
  13. package/dist/nexus/transfer-types.d.ts +123 -0
  14. package/dist/nexus/transfer-types.d.ts.map +1 -0
  15. package/dist/nexus/transfer.d.ts +31 -0
  16. package/dist/nexus/transfer.d.ts.map +1 -0
  17. package/dist/routing/capability-matrix.d.ts +6 -4
  18. package/dist/routing/capability-matrix.d.ts.map +1 -1
  19. package/dist/scaffold.d.ts +16 -9
  20. package/dist/scaffold.d.ts.map +1 -1
  21. package/dist/skills/agents/install.d.ts.map +1 -1
  22. package/dist/skills/routing-table.d.ts +17 -16
  23. package/dist/skills/routing-table.d.ts.map +1 -1
  24. package/dist/skills/skill-paths.d.ts.map +1 -1
  25. package/dist/store/brain-sqlite.d.ts +4 -1
  26. package/dist/store/brain-sqlite.d.ts.map +1 -1
  27. package/dist/store/nexus-sqlite.d.ts +4 -1
  28. package/dist/store/nexus-sqlite.d.ts.map +1 -1
  29. package/dist/store/sqlite.d.ts +4 -1
  30. package/dist/store/sqlite.d.ts.map +1 -1
  31. package/dist/store/tasks-schema.d.ts +3 -3
  32. package/dist/store/tasks-schema.d.ts.map +1 -1
  33. package/dist/store/validation-schemas.d.ts +5 -4
  34. package/dist/store/validation-schemas.d.ts.map +1 -1
  35. package/dist/system/health.d.ts.map +1 -1
  36. package/dist/ui/index.d.ts +0 -1
  37. package/dist/ui/index.d.ts.map +1 -1
  38. package/package.json +9 -4
  39. package/schemas/adr-frontmatter.schema.json +72 -0
  40. package/schemas/agent-configs.schema.json +120 -0
  41. package/schemas/agent-registry.json +243 -0
  42. package/schemas/agent-registry.schema.json +132 -0
  43. package/schemas/archive/research-manifest.schema.json +257 -0
  44. package/schemas/archive.schema.json +450 -0
  45. package/schemas/brain-decision.schema.json +69 -0
  46. package/schemas/brain-learning.schema.json +57 -0
  47. package/schemas/brain-pattern.schema.json +72 -0
  48. package/schemas/config.schema.json +2606 -0
  49. package/schemas/context-state.schema.json +137 -0
  50. package/schemas/contribution.schema.json +722 -0
  51. package/schemas/critical-path.schema.json +246 -0
  52. package/schemas/deps-cache.schema.json +97 -0
  53. package/schemas/doctor-output.schema.json +283 -0
  54. package/schemas/error.schema.json +161 -0
  55. package/schemas/export-package.schema.json +375 -0
  56. package/schemas/global-config.schema.json +219 -0
  57. package/schemas/grade.schema.json +49 -0
  58. package/schemas/log.schema.json +250 -0
  59. package/schemas/metrics.schema.json +328 -0
  60. package/schemas/migrations.schema.json +150 -0
  61. package/schemas/nexus-registry.schema.json +90 -0
  62. package/schemas/operation-constitution.schema.json +438 -0
  63. package/schemas/output.schema.json +164 -0
  64. package/schemas/project-context.schema.json +164 -0
  65. package/schemas/project-info.schema.json +180 -0
  66. package/schemas/projects-registry.schema.json +107 -0
  67. package/schemas/protocol-frontmatter.schema.json +72 -0
  68. package/schemas/rcasd-consensus-report.schema.json +10 -0
  69. package/schemas/rcasd-evidence.schema.json +42 -0
  70. package/schemas/rcasd-gate-result.schema.json +46 -0
  71. package/schemas/rcasd-hitl-resolution.schema.json +10 -0
  72. package/schemas/rcasd-index.schema.json +10 -0
  73. package/schemas/rcasd-manifest.schema.json +10 -0
  74. package/schemas/rcasd-research-output.schema.json +10 -0
  75. package/schemas/rcasd-spec-frontmatter.schema.json +10 -0
  76. package/schemas/rcasd-stage-transition.schema.json +38 -0
  77. package/schemas/releases.schema.json +267 -0
  78. package/schemas/skills-manifest.schema.json +91 -0
  79. package/schemas/skillsmp.schema.json +208 -0
  80. package/schemas/spec-index.schema.json +196 -0
  81. package/schemas/system-flow-atlas.schema.json +125 -0
  82. package/src/__tests__/injection-chain.test.ts +11 -10
  83. package/src/__tests__/injection-mvi-tiers.test.ts +4 -2
  84. package/src/admin/import-tasks.ts +53 -29
  85. package/src/agents/__tests__/capacity.test.d.ts +7 -0
  86. package/src/agents/__tests__/capacity.test.d.ts.map +1 -0
  87. package/src/agents/__tests__/capacity.test.js +173 -0
  88. package/src/agents/__tests__/capacity.test.js.map +1 -0
  89. package/src/agents/__tests__/registry.test.d.ts +8 -0
  90. package/src/agents/__tests__/registry.test.d.ts.map +1 -0
  91. package/src/agents/__tests__/registry.test.js +348 -0
  92. package/src/agents/__tests__/registry.test.js.map +1 -0
  93. package/src/agents/__tests__/retry.test.d.ts +7 -0
  94. package/src/agents/__tests__/retry.test.d.ts.map +1 -0
  95. package/src/agents/__tests__/retry.test.js +225 -0
  96. package/src/agents/__tests__/retry.test.js.map +1 -0
  97. package/src/bootstrap.ts +3 -1
  98. package/src/init.ts +63 -18
  99. package/src/injection.ts +11 -5
  100. package/src/intelligence/__tests__/impact.test.d.ts +15 -0
  101. package/src/intelligence/__tests__/impact.test.d.ts.map +1 -0
  102. package/src/intelligence/__tests__/impact.test.js +384 -0
  103. package/src/intelligence/__tests__/impact.test.js.map +1 -0
  104. package/src/intelligence/__tests__/patterns.test.d.ts +8 -0
  105. package/src/intelligence/__tests__/patterns.test.d.ts.map +1 -0
  106. package/src/intelligence/__tests__/patterns.test.js +370 -0
  107. package/src/intelligence/__tests__/patterns.test.js.map +1 -0
  108. package/src/intelligence/__tests__/prediction.test.d.ts +8 -0
  109. package/src/intelligence/__tests__/prediction.test.d.ts.map +1 -0
  110. package/src/intelligence/__tests__/prediction.test.js +314 -0
  111. package/src/intelligence/__tests__/prediction.test.js.map +1 -0
  112. package/src/internal.ts +7 -1
  113. package/src/nexus/__tests__/nexus-e2e.test.d.ts +12 -0
  114. package/src/nexus/__tests__/nexus-e2e.test.d.ts.map +1 -0
  115. package/src/nexus/__tests__/nexus-e2e.test.js +1220 -0
  116. package/src/nexus/__tests__/nexus-e2e.test.js.map +1 -0
  117. package/src/nexus/__tests__/transfer.test.d.ts +8 -0
  118. package/src/nexus/__tests__/transfer.test.d.ts.map +1 -0
  119. package/src/nexus/__tests__/transfer.test.js +372 -0
  120. package/src/nexus/__tests__/transfer.test.js.map +1 -0
  121. package/src/nexus/__tests__/transfer.test.ts +446 -0
  122. package/src/nexus/index.ts +14 -0
  123. package/src/nexus/transfer-types.ts +129 -0
  124. package/src/nexus/transfer.ts +314 -0
  125. package/src/routing/capability-matrix.ts +1435 -205
  126. package/src/scaffold.ts +18 -11
  127. package/src/skills/__tests__/routing-table.test.ts +53 -33
  128. package/src/skills/agents/install.ts +9 -1
  129. package/src/skills/routing-table.ts +39 -253
  130. package/src/skills/skill-paths.ts +3 -2
  131. package/src/store/__tests__/project-detect.test.ts +1 -1
  132. package/src/store/brain-sqlite.ts +7 -3
  133. package/src/store/nexus-sqlite.ts +7 -3
  134. package/src/store/sqlite.ts +9 -3
  135. package/src/store/tasks-schema.ts +1 -1
  136. package/src/system/health.ts +18 -7
  137. package/src/ui/index.ts +0 -6
  138. package/src/validation/operation-gate-validators.ts +2 -2
  139. package/templates/CLEO-INJECTION.md +120 -0
  140. package/templates/README.md +29 -0
  141. package/templates/agent-registry.json +305 -0
  142. package/templates/cleo-gitignore +74 -0
  143. package/templates/config.template.json +187 -0
  144. package/templates/git-hooks/commit-msg +149 -0
  145. package/templates/git-hooks/pre-commit +40 -0
  146. package/templates/git-hooks/pre-push +79 -0
  147. package/templates/github/ISSUE_TEMPLATE/bug_report.yml +143 -0
  148. package/templates/github/ISSUE_TEMPLATE/config.yml +8 -0
  149. package/templates/github/ISSUE_TEMPLATE/feature_request.yml +125 -0
  150. package/templates/github/ISSUE_TEMPLATE/help_question.yml +99 -0
  151. package/templates/global-config.template.json +56 -0
  152. package/templates/hooks/precompact-safestop.sh +89 -0
  153. package/templates/issue-templates/bug_report.yml +143 -0
  154. package/templates/issue-templates/config.yml +8 -0
  155. package/templates/issue-templates/feature_request.yml +125 -0
  156. package/templates/issue-templates/help_question.yml +99 -0
  157. package/templates/skillsmp.json.example +28 -0
  158. package/templates/skillsmp.json.example.md +214 -0
  159. package/dist/ui/injection-legacy.d.ts +0 -26
  160. package/dist/ui/injection-legacy.d.ts.map +0 -1
  161. package/src/ui/__tests__/injection-registry.test.d.ts +0 -11
  162. package/src/ui/__tests__/injection-registry.test.d.ts.map +0 -1
  163. package/src/ui/__tests__/injection-registry.test.js +0 -46
  164. package/src/ui/__tests__/injection-registry.test.js.map +0 -1
  165. package/src/ui/__tests__/injection-registry.test.ts +0 -57
  166. package/src/ui/injection-legacy.ts +0 -44
@@ -1036,7 +1036,7 @@ export async function startupHealthCheck(projectRoot?: string): Promise<StartupH
1036
1036
  !globalSchemaCheck.ok;
1037
1037
 
1038
1038
  if (globalNeedsRepair) {
1039
- // Auto-repair: ensureGlobalScaffold is idempotent and safe
1039
+ // Auto-repair home and templates via ensureGlobalScaffold (idempotent, safe)
1040
1040
  const scaffoldResult = await ensureGlobalScaffold();
1041
1041
 
1042
1042
  checks.push({
@@ -1049,12 +1049,23 @@ export async function startupHealthCheck(projectRoot?: string): Promise<StartupH
1049
1049
  repaired: scaffoldResult.home.action !== 'skipped',
1050
1050
  });
1051
1051
 
1052
- checks.push({
1053
- check: 'global_schemas',
1054
- status: 'pass',
1055
- message: `Schemas: ${scaffoldResult.schemas.installed} installed, ${scaffoldResult.schemas.updated} updated of ${scaffoldResult.schemas.total}`,
1056
- repaired: scaffoldResult.schemas.installed > 0 || scaffoldResult.schemas.updated > 0,
1057
- });
1052
+ // Schemas are read at runtime from the package path; only copy if stale
1053
+ if (!globalSchemaCheck.ok) {
1054
+ const { ensureGlobalSchemas } = await import('../schema-management.js');
1055
+ const schemaResult = ensureGlobalSchemas();
1056
+ checks.push({
1057
+ check: 'global_schemas',
1058
+ status: 'pass',
1059
+ message: `Schemas: ${schemaResult.installed} installed, ${schemaResult.updated} updated of ${schemaResult.total}`,
1060
+ repaired: schemaResult.installed > 0 || schemaResult.updated > 0,
1061
+ });
1062
+ } else {
1063
+ checks.push({
1064
+ check: 'global_schemas',
1065
+ status: 'pass',
1066
+ message: `All ${globalSchemaCheck.installed} schemas current`,
1067
+ });
1068
+ }
1058
1069
 
1059
1070
  checks.push({
1060
1071
  check: 'global_templates',
package/src/ui/index.ts CHANGED
@@ -59,9 +59,3 @@ export {
59
59
  // injection.ts -> CAAMP inject()/checkInjection()
60
60
  // mcp-config.ts -> CAAMP detectAllProviders()/installMcpServer()
61
61
  // injection-registry.ts -> CAAMP getInstructionFiles()
62
-
63
- // Injection legacy utilities (kept for validation output support)
64
- export {
65
- getValidationKey,
66
- INJECTION_VALIDATION_KEYS,
67
- } from './injection-legacy.js';
@@ -326,7 +326,7 @@ export async function validateLayer2Semantic(context: OperationContext): Promise
326
326
  // Session scope validation
327
327
  if (context.domain === 'session' && context.operation === 'start') {
328
328
  const scope = context.params?.scope as string | undefined;
329
- if (scope && !scope.match(/^(epic|task|global):/)) {
329
+ if (scope && scope !== 'global' && !scope.match(/^(epic|task):/)) {
330
330
  violations.push({
331
331
  layer: GateLayer.SEMANTIC,
332
332
  severity: ErrorSeverity.ERROR,
@@ -334,7 +334,7 @@ export async function validateLayer2Semantic(context: OperationContext): Promise
334
334
  message: `Invalid session scope format: ${scope}`,
335
335
  field: 'scope',
336
336
  constraint: 'Must be epic:<id>, task:<id>, or global',
337
- fix: 'Use format: epic:T1234, task:T5678, or global',
337
+ fix: 'Provide scope as "global" or "epic:TXXX"',
338
338
  });
339
339
  }
340
340
  }
@@ -0,0 +1,120 @@
1
+ # CLEO Protocol
2
+
3
+ Version: 2.1.0
4
+ Status: ACTIVE
5
+
6
+ ## CLEO Identity
7
+
8
+ You are a CLEO protocol agent. Use MCP-first operations:
9
+ - `query` for reads
10
+ - `mutate` for writes
11
+
12
+ ## Mandatory Efficiency Sequence
13
+
14
+ Run cheapest-first at session start:
15
+ 1. `query session status` — resume existing? (~200 tokens)
16
+ 2. `query admin dash` — project overview (~500 tokens)
17
+ 3. `query tasks current` — active task? (~100 tokens)
18
+ 4. `query tasks next` — what to work on (~300 tokens)
19
+ 5. `query tasks show` — full details for chosen task (~400 tokens)
20
+
21
+ ## Agent Work Loop
22
+
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
29
+
30
+ ## Context Ethics
31
+
32
+ Every MCP call costs tokens. Budget wisely:
33
+
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 |
40
+
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
45
+
46
+ ## Error Handling
47
+
48
+ Always check `success` and exit code values. Treat non-zero exit code as failure.
49
+
50
+ ## Task Discovery
51
+
52
+ **ALWAYS use `tasks find` for discovery. NEVER use `tasks list` for browsing.**
53
+
54
+ - `tasks find` → minimal fields, fast, low context cost ✓
55
+ - `tasks list` → full notes arrays, huge, use only for direct children ✗
56
+ - `tasks show` → full details for a specific known task ID ✓
57
+
58
+ ## Time Estimates Prohibited
59
+
60
+ Agents MUST NOT provide hours/days/week estimates. Use `small`, `medium`, `large` sizing.
61
+
62
+ ## Session Quick Reference
63
+
64
+ | Goal | Operation | Gateway |
65
+ |------|-----------|---------|
66
+ | Check active session | `session status` | query |
67
+ | Resume context from last session | `session handoff.show` | query |
68
+ | Start working | `session start` (scope required) | mutate |
69
+ | Stop working | `session end` | mutate |
70
+
71
+ For advanced session ops (find, suspend, resume, debrief, decisions): see `.cleo/agent-outputs/T5124-session-decision-tree.md`
72
+
73
+ **Budget note**: `session list` defaults to 10 results (~500-2000 tokens). Prefer `session find` for discovery (~200-400 tokens).
74
+
75
+ ## Memory Protocol
76
+
77
+ CLEO includes a native BRAIN memory system. Use the 3-layer retrieval pattern for token-efficient access:
78
+
79
+ | Step | Operation | Gateway | ~Tokens | Purpose |
80
+ |------|-----------|---------|---------|---------|
81
+ | 1 | `memory brain.search` | query | 50/hit | Search index (IDs + titles) |
82
+ | 2 | `memory brain.timeline` | query | 200-500 | Context around an anchor ID |
83
+ | 3 | `memory brain.fetch` | query | 500/entry | Full details for filtered IDs |
84
+ | Save | `memory brain.observe` | mutate | — | Save observation to brain.db |
85
+
86
+ **Workflow**: Search first (cheap) → filter interesting IDs → fetch only what you need.
87
+
88
+ **Example**:
89
+ ```
90
+ query memory brain.search {query: "authentication"}
91
+ query memory brain.fetch {ids: ["O-abc123"]}
92
+ mutate memory brain.observe {text: "Found auth uses JWT", title: "Auth discovery"}
93
+ ```
94
+
95
+ **Anti-patterns:**
96
+ - Fetching all entries without searching first (expensive)
97
+ - Skipping brain.search and going straight to brain.fetch
98
+
99
+ ## Memory Bridge
100
+
101
+ CLEO auto-generates `.cleo/memory-bridge.md` from brain.db content. This file is `@`-referenced
102
+ in AGENTS.md so providers automatically load project memory context at session start.
103
+
104
+ **Contents**: Last session handoff, key learnings, active patterns, recent decisions, recent observations.
105
+
106
+ **Refreshes on**: `session.end`, `tasks.complete`, `memory.observe` (decisions), `cleo refresh-memory`.
107
+
108
+ If the file is missing, run `cleo init` or `cleo refresh-memory` to regenerate it.
109
+
110
+ ## Escalation
111
+
112
+ For deeper guidance beyond this minimal protocol:
113
+ - **Session & lifecycle**: `query admin help` or load `ct-cleo` skill
114
+ - **Orchestration**: `query admin help --tier 2` or load `ct-orchestrator` skill
115
+ - **Operations reference**: `docs/specs/CLEO-OPERATIONS-REFERENCE.md`
116
+
117
+ ## References
118
+
119
+ - `docs/specs/CLEO-OPERATIONS-REFERENCE.md`
120
+ - `docs/specs/VERB-STANDARDS.md`
@@ -0,0 +1,29 @@
1
+ # Templates
2
+
3
+ Bundled templates shipped with `@cleocode/core`. Used by `cleo init`, `cleo upgrade`, and the global bootstrap flow.
4
+
5
+ ## Directory Structure
6
+
7
+ | Path | Purpose | Used By |
8
+ |------|---------|---------|
9
+ | `CLEO-INJECTION.md` | Global injection protocol (thin bootstrap) | `~/.cleo/templates/` → `~/.agents/AGENTS.md` |
10
+ | `config.template.json` | Project config defaults | `cleo init` → `.cleo/config.json` |
11
+ | `global-config.template.json` | Global config defaults | Bootstrap → `~/.cleo/config.json` |
12
+ | `cleo-gitignore` | Default `.cleo/.gitignore` content | `cleo init` |
13
+ | `agent-registry.json` | Agent registry template | `cleo init` |
14
+ | `github/ISSUE_TEMPLATE/` | GitHub issue templates (user-facing) | `cleo issue` command |
15
+ | `git-hooks/` | Git hook templates | `cleo init` (optional) |
16
+
17
+ ## Template Resolution
18
+
19
+ All templates are resolved at runtime via `getPackageRoot() + '/templates/'`. They are bundled in the published npm package — never copied to `~/.cleo/` except for `CLEO-INJECTION.md` which is symlinked for provider `@`-reference resolution.
20
+
21
+ ## Injection Chain
22
+
23
+ ```
24
+ ~/.agents/AGENTS.md
25
+ └── @~/.cleo/templates/CLEO-INJECTION.md (symlink → npm package)
26
+
27
+ {project}/AGENTS.md
28
+ └── @~/.agents/AGENTS.md + @.cleo/project-context.json + @.cleo/memory-bridge.md
29
+ ```
@@ -0,0 +1,305 @@
1
+ {
2
+ "$schema": "https://cleo-dev.com/schemas/v1/agent-registry.schema.json",
3
+ "schemaVersion": "1.0.0",
4
+ "lastUpdated": "2026-01-27",
5
+ "agents": {
6
+ "claude-code": {
7
+ "id": "claude-code",
8
+ "displayName": "Claude Code",
9
+ "vendor": "Anthropic",
10
+ "globalDir": "$HOME/.claude",
11
+ "projectDir": ".claude",
12
+ "instructionFile": "CLAUDE.md",
13
+ "skillsDir": "skills",
14
+ "projectSkillsDir": ".claude/skills",
15
+ "priority": "high",
16
+ "status": "active",
17
+ "cliDetection": {
18
+ "method": "directory",
19
+ "check": "$HOME/.claude"
20
+ },
21
+ "agentSkillsCompatible": true,
22
+ "notes": "Primary CLEO target. Anthropic's official CLI."
23
+ },
24
+ "cursor": {
25
+ "id": "cursor",
26
+ "displayName": "Cursor",
27
+ "vendor": "Anysphere",
28
+ "globalDir": "$HOME/.cursor",
29
+ "projectDir": ".cursor",
30
+ "instructionFile": "AGENTS.md",
31
+ "skillsDir": "skills",
32
+ "projectSkillsDir": ".cursor/skills",
33
+ "priority": "high",
34
+ "status": "active",
35
+ "cliDetection": {
36
+ "method": "directory",
37
+ "check": "$HOME/.cursor"
38
+ },
39
+ "agentSkillsCompatible": true,
40
+ "notes": "Popular VS Code fork with AI integration"
41
+ },
42
+ "windsurf": {
43
+ "id": "windsurf",
44
+ "displayName": "Windsurf",
45
+ "vendor": "Codeium",
46
+ "globalDir": "$HOME/.codeium/windsurf",
47
+ "projectDir": ".windsurf",
48
+ "instructionFile": "AGENTS.md",
49
+ "skillsDir": "skills",
50
+ "projectSkillsDir": ".windsurf/skills",
51
+ "priority": "high",
52
+ "status": "active",
53
+ "cliDetection": {
54
+ "method": "directory",
55
+ "check": "$HOME/.codeium/windsurf"
56
+ },
57
+ "agentSkillsCompatible": true,
58
+ "notes": "Codeium's AI IDE"
59
+ },
60
+ "codex": {
61
+ "id": "codex",
62
+ "displayName": "OpenAI Codex",
63
+ "vendor": "OpenAI",
64
+ "globalDir": "$HOME/.codex",
65
+ "projectDir": ".codex",
66
+ "instructionFile": "AGENTS.md",
67
+ "skillsDir": "skills",
68
+ "projectSkillsDir": ".codex/skills",
69
+ "priority": "medium",
70
+ "status": "active",
71
+ "cliDetection": {
72
+ "method": "directory",
73
+ "check": "$HOME/.codex"
74
+ },
75
+ "agentSkillsCompatible": true,
76
+ "notes": "OpenAI's coding assistant"
77
+ },
78
+ "gemini-cli": {
79
+ "id": "gemini-cli",
80
+ "displayName": "Google Gemini",
81
+ "vendor": "Google",
82
+ "globalDir": "$HOME/.gemini",
83
+ "projectDir": ".gemini",
84
+ "instructionFile": "GEMINI.md",
85
+ "skillsDir": "skills",
86
+ "projectSkillsDir": ".gemini/skills",
87
+ "priority": "medium",
88
+ "status": "active",
89
+ "cliDetection": {
90
+ "method": "directory",
91
+ "check": "$HOME/.gemini"
92
+ },
93
+ "agentSkillsCompatible": true,
94
+ "notes": "Google's Gemini CLI assistant"
95
+ },
96
+ "github-copilot": {
97
+ "id": "github-copilot",
98
+ "displayName": "GitHub Copilot",
99
+ "vendor": "GitHub/Microsoft",
100
+ "globalDir": "$HOME/.copilot",
101
+ "projectDir": ".github",
102
+ "instructionFile": "AGENTS.md",
103
+ "skillsDir": "skills",
104
+ "projectSkillsDir": ".github/skills",
105
+ "priority": "medium",
106
+ "status": "active",
107
+ "cliDetection": {
108
+ "method": "directory",
109
+ "check": "$HOME/.copilot"
110
+ },
111
+ "agentSkillsCompatible": true,
112
+ "notes": "GitHub's AI pair programmer"
113
+ },
114
+ "opencode": {
115
+ "id": "opencode",
116
+ "displayName": "OpenCode",
117
+ "vendor": "OpenCode",
118
+ "globalDir": "$HOME/.config/opencode",
119
+ "projectDir": ".opencode",
120
+ "instructionFile": "AGENTS.md",
121
+ "skillsDir": "skills",
122
+ "projectSkillsDir": ".opencode/skills",
123
+ "priority": "medium",
124
+ "status": "active",
125
+ "cliDetection": {
126
+ "method": "directory",
127
+ "check": "$HOME/.config/opencode"
128
+ },
129
+ "agentSkillsCompatible": true,
130
+ "notes": "Open-source coding assistant"
131
+ },
132
+ "cline": {
133
+ "id": "cline",
134
+ "displayName": "Cline",
135
+ "vendor": "Cline",
136
+ "globalDir": "$HOME/.cline",
137
+ "projectDir": ".cline",
138
+ "instructionFile": "AGENTS.md",
139
+ "skillsDir": "skills",
140
+ "projectSkillsDir": ".cline/skills",
141
+ "priority": "medium",
142
+ "status": "active",
143
+ "cliDetection": {
144
+ "method": "directory",
145
+ "check": "$HOME/.cline"
146
+ },
147
+ "agentSkillsCompatible": true,
148
+ "notes": "VS Code extension for AI coding"
149
+ },
150
+ "kimi": {
151
+ "id": "kimi",
152
+ "displayName": "Kimi Coding",
153
+ "vendor": "Moonshot AI",
154
+ "globalDir": "$HOME/.kimi",
155
+ "projectDir": ".kimi",
156
+ "instructionFile": "AGENTS.md",
157
+ "skillsDir": "skills",
158
+ "projectSkillsDir": ".kimi/skills",
159
+ "priority": "medium",
160
+ "status": "active",
161
+ "cliDetection": {
162
+ "method": "directory",
163
+ "check": "$HOME/.kimi"
164
+ },
165
+ "agentSkillsCompatible": false,
166
+ "notes": "Moonshot AI's coding assistant"
167
+ },
168
+ "roo": {
169
+ "id": "roo",
170
+ "displayName": "Roo Code",
171
+ "vendor": "Roo",
172
+ "globalDir": "$HOME/.roo",
173
+ "projectDir": ".roo",
174
+ "instructionFile": "AGENTS.md",
175
+ "skillsDir": "skills",
176
+ "projectSkillsDir": ".roo/skills",
177
+ "priority": "low",
178
+ "status": "active",
179
+ "cliDetection": {
180
+ "method": "directory",
181
+ "check": "$HOME/.roo"
182
+ },
183
+ "agentSkillsCompatible": true,
184
+ "notes": "Roo coding assistant"
185
+ },
186
+ "continue": {
187
+ "id": "continue",
188
+ "displayName": "Continue",
189
+ "vendor": "Continue",
190
+ "globalDir": "$HOME/.continue",
191
+ "projectDir": ".continue",
192
+ "instructionFile": "AGENTS.md",
193
+ "skillsDir": "skills",
194
+ "projectSkillsDir": ".continue/skills",
195
+ "priority": "low",
196
+ "status": "active",
197
+ "cliDetection": {
198
+ "method": "directory",
199
+ "check": "$HOME/.continue"
200
+ },
201
+ "agentSkillsCompatible": false,
202
+ "notes": "Open-source AI coding assistant"
203
+ },
204
+ "antigravity": {
205
+ "id": "antigravity",
206
+ "displayName": "Antigravity",
207
+ "vendor": "Google",
208
+ "globalDir": "$HOME/.gemini/antigravity",
209
+ "projectDir": ".antigravity",
210
+ "instructionFile": "AGENTS.md",
211
+ "skillsDir": "global_skills",
212
+ "projectSkillsDir": ".antigravity/skills",
213
+ "priority": "low",
214
+ "status": "beta",
215
+ "cliDetection": {
216
+ "method": "directory",
217
+ "check": "$HOME/.gemini/antigravity"
218
+ },
219
+ "agentSkillsCompatible": true,
220
+ "notes": "Google's experimental coding assistant"
221
+ },
222
+ "goose": {
223
+ "id": "goose",
224
+ "displayName": "Goose",
225
+ "vendor": "Block",
226
+ "globalDir": "$HOME/.goose",
227
+ "projectDir": ".goose",
228
+ "instructionFile": "AGENTS.md",
229
+ "skillsDir": "skills",
230
+ "projectSkillsDir": ".goose/skills",
231
+ "priority": "low",
232
+ "status": "active",
233
+ "cliDetection": {
234
+ "method": "directory",
235
+ "check": "$HOME/.goose"
236
+ },
237
+ "agentSkillsCompatible": true,
238
+ "notes": "Block's open-source AI agent"
239
+ },
240
+ "kiro-cli": {
241
+ "id": "kiro-cli",
242
+ "displayName": "Kiro CLI",
243
+ "vendor": "Kiro",
244
+ "globalDir": "$HOME/.kiro",
245
+ "projectDir": ".kiro",
246
+ "instructionFile": "AGENTS.md",
247
+ "skillsDir": "skills",
248
+ "projectSkillsDir": ".kiro/skills",
249
+ "priority": "low",
250
+ "status": "beta",
251
+ "cliDetection": {
252
+ "method": "directory",
253
+ "check": "$HOME/.kiro"
254
+ },
255
+ "agentSkillsCompatible": true,
256
+ "notes": "Kiro command-line coding assistant"
257
+ },
258
+ "amp": {
259
+ "id": "amp",
260
+ "displayName": "Amp",
261
+ "vendor": "Sourcegraph",
262
+ "globalDir": "$HOME/.amp",
263
+ "projectDir": ".amp",
264
+ "instructionFile": "AGENTS.md",
265
+ "skillsDir": "skills",
266
+ "projectSkillsDir": ".amp/skills",
267
+ "priority": "low",
268
+ "status": "beta",
269
+ "cliDetection": {
270
+ "method": "directory",
271
+ "check": "$HOME/.amp"
272
+ },
273
+ "agentSkillsCompatible": true,
274
+ "notes": "Sourcegraph's AI coding assistant"
275
+ },
276
+ "trae": {
277
+ "id": "trae",
278
+ "displayName": "Trae",
279
+ "vendor": "ByteDance",
280
+ "globalDir": "$HOME/.trae",
281
+ "projectDir": ".trae",
282
+ "instructionFile": "AGENTS.md",
283
+ "skillsDir": "skills",
284
+ "projectSkillsDir": ".trae/skills",
285
+ "priority": "low",
286
+ "status": "beta",
287
+ "cliDetection": {
288
+ "method": "directory",
289
+ "check": "$HOME/.trae"
290
+ },
291
+ "agentSkillsCompatible": true,
292
+ "notes": "ByteDance's AI IDE"
293
+ }
294
+ },
295
+ "instructionFileMap": {
296
+ "CLAUDE.md": ["claude-code"],
297
+ "GEMINI.md": ["gemini-cli"],
298
+ "AGENTS.md": ["cursor", "windsurf", "codex", "github-copilot", "opencode", "cline", "kimi", "roo", "continue", "antigravity", "goose", "kiro-cli", "amp", "trae"]
299
+ },
300
+ "priorityTiers": {
301
+ "tier1": ["claude-code", "cursor", "windsurf"],
302
+ "tier2": ["codex", "gemini-cli", "github-copilot", "opencode", "cline", "kimi"],
303
+ "tier3": ["roo", "continue", "antigravity", "goose", "kiro-cli", "amp", "trae"]
304
+ }
305
+ }
@@ -0,0 +1,74 @@
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.
7
+ #
8
+ # Canonical audit: .cleo/agent-outputs/T5159-cleo-file-audit.md
9
+ # ADR: ADR-013-data-integrity-checkpoint-architecture.md
10
+ # =============================================================================
11
+
12
+ # Step 1: Ignore everything in .cleo/
13
+ *
14
+
15
+ # =============================================================================
16
+ # ALLOW LIST — files and directories that SHOULD be tracked
17
+ # =============================================================================
18
+
19
+ # Step 2: Allow this .gitignore itself
20
+ !.gitignore
21
+
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
28
+
29
+ # Step 4: Allow ADRs directory (architecture decisions — project-level, not CLEO-specific)
30
+ !adrs/
31
+ !adrs/**
32
+
33
+ # Step 5: Allow RCASD lifecycle provenance directory
34
+ # Structure: rcasd/{epic#}/research/, consensus/, architecture/, specs/, contributions/
35
+ !rcasd/
36
+ !rcasd/**
37
+
38
+ # Step 6: Allow agent-outputs directory
39
+ !agent-outputs/
40
+ !agent-outputs/**
41
+
42
+ # =============================================================================
43
+ # EXPLICIT DENY — safety net that overrides allow rules above
44
+ # =============================================================================
45
+
46
+ # SQLite databases — NEVER track (data loss root cause, ADR-013)
47
+ *.db
48
+ *.db-shm
49
+ *.db-wal
50
+ *.db-journal
51
+
52
+ # Logs — NEVER track (append-only runtime data)
53
+ log.json
54
+ tasks-log.jsonl
55
+ todo-log.jsonl
56
+ bypass-log.json
57
+ qa-log.json
58
+
59
+ # Caches and transient state
60
+ .deps-cache/
61
+ .context-alert-state.json
62
+ .context-state*.json
63
+ context-states/
64
+ .git-checkpoint-state
65
+ .migration-state.json
66
+
67
+ # Instance-specific runtime data
68
+ migrations.json
69
+ sync/
70
+ metrics/
71
+
72
+ # Backups — NEVER track
73
+ .backups/
74
+ backups/