fix: support marketing-based project layout in skills and runs
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.jsPrefermarketing/skills/for new installs when a project uses the department-based layout, but continue to read, update, and remove skills from bothmarketing/skills/and legacyskills/during migration. -
src/runs.jsPrefermarketing/squads/, keep legacysquads/run history visible during migration, de-duplicate identical run ids across both layouts, and ignore non-run output directories. -
src/init.jsandsrc/update.jsPrint the actual installed skill path instead of always loggingskills/.... -
src/readme/README.mdDocument both root-based and department-based dashboard paths. -
tests/skills.test.jsandtests/runs.test.jsAdd 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
- Create a test project with:
marketing/skills/example-skill/SKILL.mdmarketing/squads/example-squad/output/images/marketing/squads/example-squad/output/slides/
- Run
npx opensquad skills - Run
npx opensquad runs example-squad
Expected after patch:
skillslists skills installed inmarketing/skills/runsresolvesmarketing/squads/runsdoes not reportimagesorslidesas run ids
- 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/andmarketing/squads/
- keep an existing skill only in
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
- Run
node --test
Validation used locally
Validated locally against [email protected].
Results after patch:
npx opensquad skillscorrectly lists installed skills from mixed root andmarketing/layoutsnpx opensquad runs instagram-leadsresolvesmarketing/squadsnpx opensquad runs instagram-leadsno longer treatsimages/andslides/as runsnode --testpasses locally with138tests
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.