Skip to content

ce-compound: Phase 2 step 8 scripts/validate-frontmatter.py resolves against project root, not the skill dir → frontmatter validation silently skipped #898

@Neikan-BSN

Description

@Neikan-BSN

Summary

ce-compound Phase 2 step 8 instructs the agent to:

Run python3 scripts/validate-frontmatter.py <output-path> to catch silent-corruption parser-safety issues …

That path is repo-relative. But validate-frontmatter.py does not exist in user repos — it ships inside the skill bundle at skills/ce-compound/scripts/validate-frontmatter.py (and an identical copy under skills/ce-compound-refresh/scripts/). So an agent reading scripts/… as project-root-relative looks in <repo>/scripts/, finds nothing, and silently skips the parser-safety validation step — the doc gets written and committed unvalidated.

Confirmed absent from scripts/ in 7 separate consuming repos; present only in the plugin bundle.

This is a recurring class, already fixed for sibling skills

Same defect, previously reported and closed for other skills:

ce-compound's validate-frontmatter.py is another instance that slipped through the same fix.

Why it matters (and an irony)

The validator exists specifically to prevent the silent-YAML-data-loss class from #606 (/ce-compound emits invalid YAML frontmatter when symptoms[] item starts with backtick). Because step 8's invocation path is broken, the protection added for #606 doesn't actually run in normal usage — the exact silent-corruption it guards against can ship undetected.

Repro

  1. Run /ce-compound (Full mode) in any repo that doesn't happen to have its own scripts/validate-frontmatter.py.
  2. At Phase 2 step 8, python3 scripts/validate-frontmatter.py <doc>No such file or directory.
  3. The agent (reasonably) treats the step as N/A and proceeds. No validation occurs.

Environment

  • Plugin: compound-engineering@compound-engineering-plugin v3.9.4 (gitCommitSha 422ffc77d1c8d269b9c7b400ad90d3929f1859f8)
  • Script confirmed stdlib-only (no PyYAML dep), so it runs fine once invoked at the right path.

Suggested fix

  1. In ce-compound Phase 2 step 8 (and ce-compound-refresh if it shares the pattern), resolve the script from the skill base directory, not project-root-relative — mirroring the ce-worktree: script path resolves against project root instead of plugin directory #764/ce-code-review resolve-base helper path resolves against project root #811 fixes. The skill already surfaces its base dir at load (Base directory for this skill: <path>), so the instruction can point there, e.g. invoke <skill-base>/scripts/validate-frontmatter.py.
  2. The skill's Support Files section lists references/ and assets/ but not scripts/ — add it so the bundled helper is part of the documented contract.
  3. Keep the script skill-bundled (do not instruct users to copy it per-repo — that would drift from the canonical copy on plugin upgrades).

Happy to send a PR if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions