@studiolxd/lxd-cli 0.1.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,36 @@
1
+ Copyright (c) 2026 Studio LXD. All rights reserved.
2
+
3
+ PROPRIETARY SOFTWARE — NOT OPEN SOURCE
4
+
5
+ This software and its source code (the "Software"), distributed as the npm
6
+ package "@studiolxd/lxd-cli", are the proprietary property of Studio LXD.
7
+ Studio LXD retains all right, title, and interest in and to the Software.
8
+
9
+ The Software may be made publicly available on a package registry (e.g., npm)
10
+ for distribution convenience. Public availability does NOT constitute an
11
+ open-source license and does NOT grant any rights beyond those expressly stated
12
+ below or otherwise expressly granted in writing by Studio LXD.
13
+
14
+ Downloading, installing, or accessing the Software from npm or any other source
15
+ does NOT grant you any right to:
16
+
17
+ - copy, reproduce, or store the Software except as strictly required to run it
18
+ for its intended purpose;
19
+ - modify, adapt, translate, or create derivative works of the Software;
20
+ - redistribute, republish, sublicense, sell, rent, lease, or otherwise
21
+ transfer the Software or access to it;
22
+ - remove or alter any proprietary notices.
23
+
24
+ You may use the Software only under, and subject to, the terms provided by
25
+ Studio LXD. Any use not expressly permitted is prohibited.
26
+
27
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
29
+ FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL STUDIO LXD BE
30
+ LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN
31
+ CONNECTION WITH THE SOFTWARE OR ITS USE.
32
+
33
+ Studio LXD may change these license terms at any time, including adopting an
34
+ open-source or open-core model for future versions, at its sole discretion.
35
+
36
+ For licensing inquiries, contact Studio LXD.
package/README.md ADDED
@@ -0,0 +1,123 @@
1
+ # @studiolxd/lxd-cli
2
+
3
+ A **local-first, CLI-first** authoring tool that takes you from a *learning goal* to a
4
+ *publishable elearning package* — built by **your own external AI coding agent** (Claude Code,
5
+ Cursor, Codex, …). The CLI doesn't replace the agent; it **orchestrates** the workflow: capture a
6
+ structured package specification, generate agent-ready handoff materials, preview locally, validate,
7
+ and export to multiple targets.
8
+
9
+ > Not a SaaS, not a visual editor, not a block builder, not tied to one AI provider, one frontend
10
+ > framework, or one LMS standard.
11
+
12
+ ## Status
13
+
14
+ Implements the full v1 vertical: US1 (single-experience → web), US2 (SCORM tracking + export),
15
+ US3 (multi-experience), US4 (extensible official mechanics), US5 (advanced design direction).
16
+
17
+ ## Requirements
18
+
19
+ - Node.js ≥ 20 (macOS / Linux / Windows)
20
+ - Your own AI coding agent for the implementation step (run manually)
21
+
22
+ ## Install
23
+
24
+ ```bash
25
+ npm install # install deps
26
+ npm run build # bundle the CLI to dist/ (+ copy runtime assets)
27
+ npm link # optional: expose `lxd` globally for local dev
28
+ # or run from source during dev:
29
+ npx tsx src/cli/index.ts <command>
30
+ ```
31
+
32
+ ## Quickest start — the guided wizard
33
+
34
+ ```bash
35
+ lxd create my-course # (alias: lxd wizard) one guided, interactive session:
36
+ # answer prompts → buffers in memory → writes the package in one
37
+ # commit → optional validation (default yes) + handoff (default no)
38
+ ```
39
+ Create-new only and non-destructive: on an existing package it asks before replacing; cancelling
40
+ before the commit leaves zero files. The wizard reuses the same core as the commands below.
41
+
42
+ ## The workflow (individual commands)
43
+
44
+ ```bash
45
+ lxd init my-course && cd my-course # scaffold a package project
46
+ lxd goal -g "Recognize workplace hazards"
47
+ lxd audience -d "New staff" -m 20
48
+ lxd experience add --id spot --purpose "Find hazards" --scenario "aisle" --mechanic risk-detection
49
+ lxd structure --sync
50
+ lxd design -l brief -b "Clean, accessible, corporate"
51
+ lxd evaluation -c all-required
52
+ lxd tracking --report completion score success
53
+ lxd validate # actionable pass/fail across all checks
54
+ lxd handoff # write .agent/** specs + prompts + scaffold generated/
55
+ # → run YOUR agent against .agent/** to produce generated/
56
+ lxd preview --mock-lms # build + serve locally, with a mock LMS
57
+ lxd export --target web --target scorm-1.2 --target scorm-2004
58
+ ```
59
+
60
+ See **[docs/commands.md](docs/commands.md)** for the full command reference and
61
+ **[specs/001-elearning-package-cli/quickstart.md](specs/001-elearning-package-cli/quickstart.md)**
62
+ for runnable scenarios.
63
+
64
+ ## Concepts
65
+
66
+ - **Package** is the top-level unit; it contains **one or more experiences**.
67
+ - **Experience mechanics** are official, declarative manifests (`src/mechanics/manifests/`), with an
68
+ optional code plugin for advanced cases. New official mechanics are added without core changes.
69
+ - **Design direction** is a first-class, multi-level input (brief → tokens → patterns →
70
+ design-system → full constraints), carried into the agent handoff.
71
+ - **Tracking** uses per-experience signals aggregated into a single LMS state via explicit roll-up
72
+ rules.
73
+ - **Adapters** are the extension seams, behind documented contracts:
74
+ - Framework adapter (v1: Vanilla JS + Web Components)
75
+ - Export adapters (v1: `web`, `scorm-1.2`, `scorm-2004`)
76
+ - **Agent handoff** is the reserved boundary: v1 produces materials for manual use; programmatic
77
+ invocation is a future extension. The handoff transmits the **full instructional intent** —
78
+ audience, package tone, and per-experience purpose, scenario, mechanic guidance (incl. plugin
79
+ enrichment), feedback, and tracking — and instructs the agent to treat the materials as the
80
+ source of truth (not to infer the learning design from code).
81
+
82
+ ## External assets (not vendored)
83
+
84
+ - [`@studiolxd/scorm`](https://github.com/studiolxd/scorm) — SCORM runtime/tracking, consumed by
85
+ generated projects as a **versioned dependency**. SCORM-targeted packages **must** use it: the
86
+ handoff forbids hand-rolling a SCORM runtime, and `validate` **fails** if `generated/` contains a
87
+ custom runtime (`window.API`/`LMS*`/2004 handlers) instead of `@studiolxd/scorm`.
88
+ - [`scorm-skills`](https://github.com/studiolxd/scorm-skills) — canonical SCORM guidance, referenced
89
+ as a **versioned snapshot** in `.agent/scorm-skills/` when a SCORM target is selected.
90
+
91
+ Both are external and versioned; the CLI never vendors or forks them. Generated projects update
92
+ their versions only via `lxd assets update` — never silently.
93
+
94
+ ## Develop
95
+
96
+ ```bash
97
+ npm run typecheck # tsc --noEmit
98
+ npm run lint # eslint
99
+ npm test # vitest (unit + contract + integration)
100
+ npm run build # esbuild bundle + asset copy
101
+ ```
102
+
103
+ CI runs typecheck/lint/build/test on macOS, Linux, and Windows (Node 20).
104
+
105
+ ## Release (manual)
106
+
107
+ The package publishes to npm as **`@studiolxd/lxd-cli`** under the **`next`** dist-tag (never
108
+ `latest`). It is **proprietary** (`UNLICENSED`, all rights reserved) — public on npm ≠ open source.
109
+ Nothing here publishes automatically; publishing is a deliberate manual step.
110
+
111
+ ```bash
112
+ npm run verify:pack # pack → install the tarball in a clean temp dir → run the installed lxd
113
+ # (--help/--version/mechanic list/init). Needs network for dependency install.
114
+ npm publish --tag next --access public # manual; run only after verify:pack passes
115
+ ```
116
+
117
+ `prepublishOnly` re-runs typecheck + lint + tests before any publish, and `prepack` rebuilds `dist/`,
118
+ so a broken or stale package cannot be published. After publishing, real-world use:
119
+
120
+ ```bash
121
+ npx @studiolxd/lxd-cli@next --help
122
+ npm install -g @studiolxd/lxd-cli@next && lxd create
123
+ ```