Skip to content

feat: Documents Skill Library with pack/skill management#18

Draft
falfaddaghi wants to merge 1 commit intomainfrom
adw/feature-documents-skill-library-60d267bf
Draft

feat: Documents Skill Library with pack/skill management#18
falfaddaghi wants to merge 1 commit intomainfrom
adw/feature-documents-skill-library-60d267bf

Conversation

@falfaddaghi
Copy link
Copy Markdown
Member

Summary

Adds a full Documents Skill Library to Nexus Workflow Studio, allowing users to author, version, organize, publish, and export reusable Markdown skills grouped into packs/plugins. The library supports workspace and user-local scopes with branch/fork flows, three-way Markdown merge, real-time collaborative editing via Hocuspocus/Y.js, and self-contained .nexus workflow export artifacts. Workflow Skill nodes are extended to reference skills by stable scope + packId + packVersion + skillId identity through a new skill picker dialog.

Plan: docs/tasks/feature-documents-skill-library-60d267bf/plan-feature-documents-skill-library-60d267bf.md
ADW tracking ID: 60d267bf

Implementation Checklist

  • Phase 1 — Data Foundation: Library-store storage layer (src/lib/library-store/) with config, object-store (RustFS-compatible key layout), SHA-256 hashing, type definitions, and Zod v4 schemas for manifests and API payloads
  • Phase 1 — LibraryStore class: Full LibraryStore singleton with pack/skill/document CRUD, optimistic concurrency, soft-delete, fork, merge-base (three-way diff3), publish pack/skill versions, and live skill resolution
  • Phase 2 — Editor & Collaboration: Documents panel UI (src/components/workflow/documents-panel/) with pack browser, file tree, Markdown editor, preview, per-document Y.js collab binding, branch/head/base status badges, and presence indicators
  • Phase 3 — Skills & Validation: Skill creation with SKILL.md entrypoints, normalized manifest generation, resolved skill preview, validation panel (missing entrypoint, broken references, duplicate IDs, invalid frontmatter, conflict state), and skill picker dialog wired to the Skill node
  • Phase 4 — Publishing & Branch Merges: Publish pack version and skill version flows; fork workspace packs into user-local library; merge-base with three-way Markdown merge; conflict records and resolution dialog
  • Phase 5 — Export & Import: Self-contained .nexus zip export (manifest.json, workflow.json, libraries/…, runtime/resolver-metadata.json, hashes.json); Nexus-native archive import and best-effort Agent Skills folder/zip import; integrity validation on import/export
  • Skill node data model: Extended SkillNodeData with libraryRef (scope + packId + packVersion + skillId); generator routes through live resolver when ref is set; pack badge on node renderer
  • Library-docs Zustand store: src/store/library-docs/store.ts mirroring API actions with pending-merge and fork-behind-base state
  • API routes: 20+ Next.js App Router routes under src/app/api/library/ (session, packs, documents, skills, versions, publish, fork, merge, resolve, import, export)
  • Tests: library-store, library-merge, library-validation, library-export, library-import, library-resolver, library-docs store tests, and updated Skill node generator tests
  • Workspace wiring: .env.example, .gitignore, docker-compose.yml, scripts/start.sh, next.config.ts, README.md updates
  • E2E test spec described in docs/tasks/feature-documents-skill-library-60d267bf/e2e-feature-documents-skill-library-60d267bf.md

Key Changes

Area What changed
src/lib/library-store/ New storage layer: object-store, store, manifest builder, three-way merge, hashing, validation, resolver, import, export, schemas (1 161-line store, ~2 600 lines total)
src/app/api/library/ 20+ REST routes for the full library API mirroring Brain route patterns
src/components/workflow/documents-panel/ Full library panel UI: pack browser, file tree, Markdown editor with Y.js collab, skill detail, publish panel, branch status, conflict resolve dialog
src/components/workflow/properties/skill-picker-dialog.tsx New skill picker dialog (216 lines) for Skill node library reference
src/lib/library-client.ts Typed fetch wrapper for library API (258 lines)
src/store/library-docs/store.ts Zustand slice for library state (298 lines)
src/nodes/skill/ Extended types, constants, fields, generator, and renderer for libraryRef
src/lib/collaboration/lib-doc-collab.ts Per-document Y.Text binding reusing Hocuspocus infrastructure
src/types/library.ts + src/types/workflow.ts Shared LibraryScope, PackRef, SkillRef, SkillBundle types; updated workflow union
src/lib/__tests__/ Six new test files covering storage, merge, validation, export/import, resolver

@falfaddaghi falfaddaghi force-pushed the adw/feature-documents-skill-library-60d267bf branch from 473333f to f5018e3 Compare April 25, 2026 12:12
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