Skip to content

sprint: dependency resolution - #21

Merged
dsiddharth2 merged 22 commits into
mainfrom
sprint/dep-resolution
Apr 17, 2026
Merged

dsiddharth2 merged 22 commits into
mainfrom
sprint/dep-resolution

Conversation

@dsiddharth2

Copy link
Copy Markdown
Owner

Summary

  • Dependency resolution across install/remove with tracker schema installed_as / dependencies / dependents, DFS resolver, and community-index dep lookup.
  • Install flow: resolver runs before download; multi-dep installs route through a TUI plan screen (will-install / already-satisfied / scope toggle). Single-package installs bypass the plan screen.
  • Remove flow: dependent check with interactive Cancel / Cascade / Force prompt; orphan-prune prompt after any remove; `--yes` auto-accepts orphan prune.
  • Post-install hook notice: new `frontmatter.js` parser; CLI prints a hook warning when a skill declares a hook; JSON mode sets `hookRequired: true`.
  • Harvest docs under `plug/docs/` (features, architecture, decisions, api) + README updates for the new install/remove UX.

Test plan

  • `npm test` green (292/292)
  • Cumulative review across Phases 1-5: 0H, 0M, 0L
  • Harvest review + re-review: APPROVED (docs corrected for real interactive UX)
  • Manual smoke: `plug install ` — plan screen renders, scope toggle works, installs deps
  • Manual smoke: `plug remove ` — prompt Cancel/Cascade/Force; orphan prune prompt after
  • Manual smoke: install a skill with `hook:` frontmatter — CLI prints hook notice

dsiddharth2 and others added 20 commits April 17, 2026 12:23
Both HIGH findings resolved:
1. addDependents now uses merge/dedup semantics with multi-parent test
2. _cascade flag fully defined with shallow-cascade depth rule

All 12 checklist items pass. Plan approved for execution.
- Task 2.1: community-index.js confirmed from Sprint 2 — fetchCommunityIndex and getStaleCommunityIndexCache already exported, no change needed
- Task 2.2: resolver.js — buildPackageMap (official + community, community wins), DFS with cycle/optional/unknown handling, getInstalled loaded once per resolve()
- Task 2.3: resolver.test.js — 9 test cases covering all resolver scenarios; 273/273 tests pass
- Wire remove.js: check pkg.dependents before removal; show select prompt
  (Cancel / Cascade / Force) when dependents exist and !_cascade
- Cascade: removes each dependent with _cascade:true, then removes target
- Force: removes only target file + trackRemove + removeDependentEdge per dependent
- _pruneOrphans: fires after any successful remove; prompts or auto-prunes with --yes
- Extend tests/remove.test.js with 6 new cases covering all paths; 287/287 pass
@dsiddharth2
dsiddharth2 force-pushed the sprint/dep-resolution branch from 7b6b013 to da6ec5a Compare April 17, 2026 06:54
…package resolution

This commit fixes the following issues:
1. Support for left/right arrow navigation in the TUI installation scope selector.
2. Resolution of community packages during installation by including community index in findPackage/findAllPackages.
3. Robust handling of download paths for community packages, supporting custom entry points even when meta.json is missing.
…l packages

Allows packages to specify a 'files' array in meta.json or community index to download multiple assets (scripts, prompts, etc.) during installation.
@dsiddharth2
dsiddharth2 merged commit 9b8bba5 into main Apr 17, 2026
2 checks passed
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.

1 participant