@cleocode/cleo 2026.4.4 → 2026.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/cleo",
3
- "version": "2026.4.4",
3
+ "version": "2026.4.6",
4
4
  "description": "CLEO CLI — the assembled product consuming @cleocode/core",
5
5
  "type": "module",
6
6
  "main": "./dist/cli/index.js",
@@ -13,12 +13,12 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "citty": "^0.2.1",
16
- "@cleocode/cant": "2026.4.4",
17
- "@cleocode/caamp": "2026.4.4",
18
- "@cleocode/contracts": "2026.4.4",
19
- "@cleocode/core": "2026.4.4",
20
- "@cleocode/lafs": "2026.4.4",
21
- "@cleocode/runtime": "2026.4.4"
16
+ "@cleocode/caamp": "2026.4.6",
17
+ "@cleocode/cant": "2026.4.6",
18
+ "@cleocode/contracts": "2026.4.6",
19
+ "@cleocode/lafs": "2026.4.6",
20
+ "@cleocode/core": "2026.4.6",
21
+ "@cleocode/runtime": "2026.4.6"
22
22
  },
23
23
  "engines": {
24
24
  "node": ">=24.0.0"
@@ -31,7 +31,8 @@
31
31
  "dist",
32
32
  "migrations",
33
33
  "completions",
34
- "bin"
34
+ "bin",
35
+ "templates"
35
36
  ],
36
37
  "repository": {
37
38
  "type": "git",
@@ -0,0 +1,34 @@
1
+ # CleoOS Hub Bundle
2
+
3
+ This directory contains the seed assets for the **CleoOS Hub**, the
4
+ operator-global, cross-project workspace that lives under `$CLEO_HOME`
5
+ (typically `~/.local/share/cleo/` on Linux).
6
+
7
+ These files ship with `@cleocode/cleo` and are copied into the operator's
8
+ home directory by `ensureCleoOsHub()` on first run. The copy is **never
9
+ overwriting**: any human or agent edits to the installed files are
10
+ preserved across upgrades.
11
+
12
+ ## Layout
13
+
14
+ ```
15
+ templates/cleoos-hub/
16
+ ├── pi-extensions/ # Pi extensions (CANT-aware orchestration helpers)
17
+ │ ├── orchestrator.ts # Wave-based parallel orchestrator
18
+ │ ├── stage-guide.ts # Stage-aware lifecycle guidance loader
19
+ │ └── cant-bridge.ts # Bridge between CANT workflows and Pi tooling
20
+ └── global-recipes/ # Global Justfile Hub
21
+ ├── justfile # Cross-project recipe library
22
+ └── README.md # Authoring/runner conventions
23
+ ```
24
+
25
+ ## Editing rules
26
+
27
+ - These are **template seeds**, not the runtime copies. Operators edit the
28
+ installed copies under `$CLEO_HOME`, not these.
29
+ - Updates to these templates only reach existing installs when the
30
+ installed files are missing — if they exist, they are kept as-is to
31
+ preserve user/agent edits. Use `cleo upgrade --include-global` followed
32
+ by manual reconciliation if you intentionally want to refresh them.
33
+ - The Pi extensions are validated source — do not patch them in place
34
+ without bumping the @cleocode/cleo package version.
@@ -0,0 +1,46 @@
1
+ # CleoOS Global Recipes Hub
2
+
3
+ This directory is the Single Source of Truth for cross-project automation
4
+ **recipes** — shell commands that any agent can invoke regardless of which
5
+ project it's working in.
6
+
7
+ ## The three-way SSoT split (Phase 4 alignment)
8
+
9
+ CleoOS separates protocol, workflow, and deterministic automation into
10
+ three distinct representations, each with a dedicated SSoT:
11
+
12
+ | Purpose | SSoT | Location | Authors |
13
+ |---|---|---|---|
14
+ | **Agent protocols & constraints** | SKILL.md files | `packages/skills/skills/ct-*` | Humans (edit), Chef Agent (propose) |
15
+ | **Agent workflows & hooks** | .cant files | `.cleo/agents/*.cant` + `$CLEO_HOME/cant-workflows` | Humans + agents |
16
+ | **Deterministic automation** | justfile recipes | `$CLEO_HOME/global-recipes/justfile` + project-local | Humans + Chef Agent |
17
+
18
+ **Do not duplicate protocol text into justfile recipes.** Recipes should
19
+ wrap `cleo` CLI commands that resolve the protocol from skills at runtime.
20
+
21
+ ## Writers
22
+
23
+ - **Humans** — edit `justfile` and sibling files directly with your editor.
24
+ - **Cleo Chef Agent** — the meta-agent cooks up new recipes via the
25
+ `pm_upsert_global_recipe` tool binding (available from Phase 3 onward).
26
+
27
+ ## Runners
28
+
29
+ Agents invoke recipes via the `pm_run_action` tool binding, which resolves to:
30
+
31
+ just -f $CLEO_HOME/global-recipes/justfile <recipe> [args...]
32
+
33
+ Local project `justfile`s still take precedence for project-specific work.
34
+
35
+ ## Naming
36
+
37
+ - Keep recipe names lowercase-kebab
38
+ - Prefix domain-specific recipes (`rcasd-init`, `schema-validate`)
39
+ - Document every recipe with a comment above the rule
40
+ - Reference skills by name (e.g. `ct-research-agent`) — don't embed prose
41
+
42
+ ## Governance
43
+
44
+ Context anchoring strictness is enforced per project/global config
45
+ (`cleo config get contextAnchoring.mode`). Default: `block` — recipes that
46
+ reference files or paths not in the BRAIN-anchored inventory will be blocked.
@@ -0,0 +1,68 @@
1
+ # CleoOS Global Justfile Hub
2
+ # Cross-project recipe library managed by humans (via editor) and
3
+ # the meta Cleo Chef Agent (via pm_upsert_global_recipe tool).
4
+ #
5
+ # Location: {cleoHome}/global-recipes/justfile
6
+ # Invoke: just -f $CLEO_HOME/global-recipes/justfile <recipe>
7
+ #
8
+ # ARCHITECTURE (Phase 4 SSoT):
9
+ # - Protocol text lives in @cleocode/skills (SKILL.md files)
10
+ # - Recipes here WRAP 'cleo' CLI commands — they don't re-encode protocol
11
+ # - Stage-specific behavior goes through 'cleo lifecycle guidance <stage>'
12
+ # - Agent-facing recipes should invoke skills via 'cleo skills info' or
13
+ # delegate to 'cleo orchestrate spawn <taskId>' which injects skills
14
+
15
+ # Default: list recipes
16
+ default:
17
+ @just --list --justfile "{{justfile()}}"
18
+
19
+ # Bootstrap a new project (greenfield)
20
+ # Invoked by Phase 5 init flow for empty directories.
21
+ bootstrap project-type="node":
22
+ @echo "[cleoos] bootstrap {{project-type}} — scaffolds CLEO state + loads Tier 0 skills"
23
+ @test -d .cleo || cleo init
24
+ @cleo lifecycle guidance research
25
+
26
+ # Load stage-aware LLM guidance — used by the Cleo Chef Agent and Pi extensions
27
+ stage-guidance stage="research":
28
+ @cleo lifecycle guidance {{stage}}
29
+
30
+ # List all available skills (backed by packages/skills/skills/)
31
+ skills:
32
+ @cleo skills list
33
+
34
+ # Inspect a specific skill
35
+ skill-info name:
36
+ @cleo skills info {{name}}
37
+
38
+ # Dispatch lint for detected project type
39
+ lint:
40
+ @if test -f package.json; then \
41
+ if grep -q '"lint"' package.json 2>/dev/null; then \
42
+ pnpm lint 2>/dev/null || npm run lint; \
43
+ else \
44
+ echo "[cleoos] no lint script in package.json"; \
45
+ fi; \
46
+ elif test -f Cargo.toml; then \
47
+ cargo clippy -- -D warnings; \
48
+ else \
49
+ echo "[cleoos] no known project type for lint"; \
50
+ fi
51
+
52
+ # Dispatch tests for detected project type
53
+ test:
54
+ @if test -f package.json; then \
55
+ if grep -q '"test"' package.json 2>/dev/null; then \
56
+ pnpm test 2>/dev/null || npm test; \
57
+ else \
58
+ echo "[cleoos] no test script in package.json"; \
59
+ fi; \
60
+ elif test -f Cargo.toml; then \
61
+ cargo test; \
62
+ else \
63
+ echo "[cleoos] no known project type for test"; \
64
+ fi
65
+
66
+ # List all recipes across the global hub (convenience alias for discovery)
67
+ recipes:
68
+ @just --list --justfile "{{justfile()}}"