Skip to content

fix: support marketing-based project layout in skills and runs#24

Open
canovars wants to merge 2 commits intorenatoasse:masterfrom
canovars:fix/marketing-layout-paths
Open

fix: support marketing-based project layout in skills and runs#24
canovars wants to merge 2 commits intorenatoasse:masterfrom
canovars:fix/marketing-layout-paths

Conversation

@canovars
Copy link
Copy Markdown

@canovars canovars commented Apr 12, 2026

Closes #23

What

The CLI currently assumes that installed skills and squads always live at the project root:

  • skills/
  • squads/

That breaks repositories that organize work by department and use:

  • marketing/skills/
  • marketing/squads/

There is also a separate bug in runs: any directory under output/ is treated as a run, so folders like output/images/ and output/slides/ appear as false run entries.

This PR updates:

  • src/skills.js
    Prefer marketing/skills/ for new installs when a project uses the department-based layout, but continue to read, update, and remove skills from both marketing/skills/ and legacy skills/ during migration.

  • src/runs.js
    Prefer marketing/squads/, keep legacy squads/ run history visible during migration, de-duplicate identical run ids across both layouts, and ignore non-run output directories.

  • src/init.js and src/update.js
    Print the actual installed skill path instead of always logging skills/....

  • src/readme/README.md
    Document both root-based and department-based dashboard paths.

  • tests/skills.test.js and tests/runs.test.js
    Add regression coverage for mixed-layout migration cases.

Why

  • Keeps existing root-based projects working
  • Supports department-based repositories without requiring root aliases
  • Avoids hiding legacy installed skills or historical runs during partial migration
  • Keeps CLI output and README instructions aligned with runtime behavior

How to test

  1. Create a test project with:
    • marketing/skills/example-skill/SKILL.md
    • marketing/squads/example-squad/output/images/
    • marketing/squads/example-squad/output/slides/
  2. Run npx opensquad skills
  3. Run npx opensquad runs example-squad

Expected after patch:

  • skills lists skills installed in marketing/skills/
  • runs resolves marketing/squads/
  • runs does not report images or slides as run ids
  1. Add a mixed migration case:
    • keep an existing skill only in skills/legacy-skill/
    • keep an existing run only in squads/legacy-squad/output/<run-id>/
    • also create marketing/skills/ and marketing/squads/

Expected after patch:

  • the legacy skill remains visible to npx opensquad skills
  • legacy runs remain visible to npx opensquad runs
  • identical run ids across both layouts are listed only once
  1. Run node --test

Validation used locally

Validated locally against opensquad@0.1.15.

Results after patch:

  • npx opensquad skills correctly lists installed skills from mixed root and marketing/ layouts
  • npx opensquad runs instagram-leads resolves marketing/squads
  • npx opensquad runs instagram-leads no longer treats images/ and slides/ as runs
  • node --test passes locally with 138 tests

Notes

If you would prefer a more general configurable path mechanism instead of explicit marketing/... fallback, I can adapt the patch in a follow-up. This PR keeps the change intentionally narrow while preserving backward compatibility during migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support marketing/{skills,squads} project layout and ignore non-run output directories in runs

1 participant