Files
ECC/tests/scripts
7aa071c5e9 fix(continuous-learning-v2): emit loadable frontmatter from evolve --generate
Artifacts written by `evolve --generate` are inert: Claude Code (and every
spec-compliant Agent Skills client) injects only `name` + `description` at
startup and will not load an artifact missing them.

Today the generator writes:
  - skills:   `# {name}` with no frontmatter block at all
  - commands: `# {cmd_name}` with no frontmatter block at all
  - agents:   `model`/`tools` only, no `name`, no `description`

So the whole evolve pipeline terminates in files that can never load. I hit
this on a real install: 12 generated artifacts across two projects, none of
which Claude Code had ever seen.

This adds a `_evolved_description()` helper and emits proper frontmatter for
all three artifact kinds. The description is sanitised for the two things that
break loaders: `: ` in an unquoted scalar (rejected by strict YAML parsers)
and `<`/`>` (system-prompt injection risk).

Adds two tests to tests/scripts/instinct-cli-evolve-generate.test.js. Both
fail against current main and pass with this change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 22:26:22 -03:00
..