tux-review 0.1.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.
Files changed (60) hide show
  1. package/README.md +67 -0
  2. package/bin/tux.js +17 -0
  3. package/client/tux-review.css +155 -0
  4. package/client/tux-review.js +586 -0
  5. package/package.json +59 -0
  6. package/skills/tux-design-create.md +50 -0
  7. package/skills/tux-design-incorporate.md +61 -0
  8. package/skills/tux-design-install.md +56 -0
  9. package/skills/tux-design-start-review.md +51 -0
  10. package/skills/tux-design-stop-review.md +44 -0
  11. package/skills/tux-feedback-delete.md +45 -0
  12. package/skills/tux-feedback-export.md +47 -0
  13. package/skills/tux-feedback-show.md +55 -0
  14. package/skills/tux-live-create.md +50 -0
  15. package/skills/tux-live-incorporate.md +62 -0
  16. package/skills/tux-live-install.md +63 -0
  17. package/skills/tux-live-start-review.md +47 -0
  18. package/skills/tux-live-stop-review.md +46 -0
  19. package/src/canonical.js +28 -0
  20. package/src/cli.js +229 -0
  21. package/src/config.js +72 -0
  22. package/src/design.js +140 -0
  23. package/src/errors.js +28 -0
  24. package/src/feedback.js +289 -0
  25. package/src/ids.js +57 -0
  26. package/src/index.js +17 -0
  27. package/src/live.js +261 -0
  28. package/src/schema.js +77 -0
  29. package/src/serve-main.js +42 -0
  30. package/src/server.js +347 -0
  31. package/src/store.js +72 -0
  32. package/src/templates.js +44 -0
  33. package/templates/angular/README.md +19 -0
  34. package/templates/angular/angular.json +49 -0
  35. package/templates/angular/package.json +25 -0
  36. package/templates/angular/src/app/app.component.html +40 -0
  37. package/templates/angular/src/app/app.component.ts +30 -0
  38. package/templates/angular/src/index.html +11 -0
  39. package/templates/angular/src/main.ts +4 -0
  40. package/templates/angular/src/styles.css +11 -0
  41. package/templates/angular/tsconfig.app.json +8 -0
  42. package/templates/angular/tsconfig.json +11 -0
  43. package/templates/react/README.md +18 -0
  44. package/templates/react/index.html +12 -0
  45. package/templates/react/package.json +18 -0
  46. package/templates/react/src/App.jsx +80 -0
  47. package/templates/react/src/main.jsx +6 -0
  48. package/templates/react/src/styles.css +11 -0
  49. package/templates/vanilla/README.md +22 -0
  50. package/templates/vanilla/index.html +18 -0
  51. package/templates/vanilla/package.json +6 -0
  52. package/templates/vanilla/src/app.js +79 -0
  53. package/templates/vanilla/src/styles.css +11 -0
  54. package/templates/vue/README.md +18 -0
  55. package/templates/vue/index.html +12 -0
  56. package/templates/vue/package.json +17 -0
  57. package/templates/vue/src/App.vue +61 -0
  58. package/templates/vue/src/main.js +5 -0
  59. package/templates/vue/src/styles.css +11 -0
  60. package/templates/vue/vite.config.js +6 -0
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: tux-design-create
3
+ description: Create or update a clickable TUX design from project requirements — screens, routes, components, UI states, verification.
4
+ ---
5
+
6
+ # tux-design-create
7
+
8
+ Create or update a clickable design from project requirements after the
9
+ design capability is available (SPC sections 36–37, 81).
10
+
11
+ ## Resolve the CLI
12
+
13
+ Choose one TUX CLI variant; both implement the same commands and canonical
14
+ JSON output, so do not install both:
15
+
16
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
17
+ `npx --yes --package=tux-review tux --version` and prefix commands with
18
+ `npx --yes --package=tux-review tux …`.
19
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
20
+ `python -m pip install tux-review` in the active virtual environment),
21
+ then use `tux --version`. For a one-off run, use
22
+ `pipx run tux-review tux --version`.
23
+
24
+ All commands below use the neutral form `tux <domain> <action>`. Replace
25
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
26
+ one-off variant.
27
+
28
+ ## Workflow
29
+
30
+ 1. **Read requirements** near the design (for example
31
+ `requirements/<feature>/requirements.md`). Identify screens, routes,
32
+ components, interactions, and UI states.
33
+ 2. Choose the framework from the requirements or ask:
34
+ `tux design create --framework vanilla|react|vue|angular`.
35
+ 3. Run the command — it scaffolds `requirements/<slug>/design/` with a
36
+ runnable multi-route design (vanilla: History-API SPA with tabs and a
37
+ modal; react/vue: vite scaffolds; angular: standalone component
38
+ scaffold) and TUX targeting attributes
39
+ (`data-tux-id`, `data-tux-component`, `data-tux-instance`).
40
+ 4. **Implement the screens**: replace placeholder content with the
41
+ requirements-derived pages, keep the route structure, wire real
42
+ interactions (tabs, modals, drawers, forms).
43
+ 5. Mark component instances with `data-tux-instance` so feedback on one
44
+ instance never appears on another (SPC section 85).
45
+ 6. Run `tux design start-review`, navigate every route, and verify the
46
+ review capability: create feedback on a component, reload, see the
47
+ marker restored, and confirm
48
+ `tux feedback show --format json` returns it.
49
+ 7. Report the created routes, components, and UI states with the
50
+ verification result.
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: tux-design-incorporate
3
+ description: Process design-session feedback into the development workflow — validate, group, deduplicate, surface conflicts, verify the framework, preserve IDs.
4
+ ---
5
+
6
+ # tux-design-incorporate
7
+
8
+ Process unresolved feedback of the design session using the user's
9
+ methodology, including the testing and verification methodology of the
10
+ framework in use (SPC sections 49–57, 90).
11
+
12
+ ## Resolve the CLI
13
+
14
+ Choose one TUX CLI variant; both implement the same commands and canonical
15
+ JSON output, so do not install both:
16
+
17
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
18
+ `npx --yes --package=tux-review tux --version` and prefix commands with
19
+ `npx --yes --package=tux-review tux …`.
20
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
21
+ `python -m pip install tux-review` in the active virtual environment),
22
+ then use `tux --version`. For a one-off run, use
23
+ `pipx run tux-review tux --version`.
24
+
25
+ All commands below use the neutral form `tux <domain> <action>`. Replace
26
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
27
+ one-off variant.
28
+
29
+ ## Workflow
30
+
31
+ 1. Load the open design feedback in scope:
32
+ `tux feedback show --status open --origin design --format json`
33
+ (optionally `--mine`, `--route <route>`, `--session <name>`). The
34
+ default scope is all open design feedback — not `--mine` (SPC
35
+ section 52).
36
+ 2. **Validate** every item against the schema (`tux feedback show <id>`
37
+ for details). Malformed items are reported, never dropped.
38
+ 3. **Group** by route/component/instance. The CLI pre-computes groups,
39
+ duplicates, and conflicts: run
40
+ `tux feedback incorporate --strategy export-only --origin design --format json`
41
+ to inspect the report without changing anything.
42
+ 4. **Duplicates** (identical normalized text on the same target): keep
43
+ every original, consolidate the request, and preserve the source IDs
44
+ in the traceability record (SPC section 53).
45
+ 5. **Conflicts** (an approval contradicting a requested change on the
46
+ same target): surface them with `requires_decision: true` and ask the
47
+ user. Do not resolve explicit contradictions silently (SPC section 54).
48
+ 6. **Choose the methodology** with the user when interactive:
49
+ consolidate first · update requirements · create implementation tasks
50
+ · apply actionable changes directly · review conflicts first · export
51
+ only. Then run
52
+ `tux feedback incorporate --strategy consolidate|requirements|tasks|direct --origin design --format json`.
53
+ The CLI marks processed items `incorporated`, records the batch under
54
+ `.tux/incorporations/`, and keeps every feedback ID.
55
+ 7. **Implement and verify** using the methodology of the framework in
56
+ use: apply the changes to the design, then verify each item in the
57
+ running UI (`tux design start-review`) and record the result with
58
+ `tux feedback validate --record <id> --result passed|failed --note "<observed>"`.
59
+ Only successfully verified feedback counts as resolved (SPC 94).
60
+ 8. Report what was incorporated, what needs a decision, and where the
61
+ traceability lives. Feedback items are never deleted by this skill.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: tux-design-install
3
+ description: Install TUX into the clickable design environment of the current project — discovery, config, review client wiring, tests, verification.
4
+ ---
5
+
6
+ # tux-design-install
7
+
8
+ Establish a correct, tested, and accepted TUX design installation in the
9
+ current project (SPC sections 28–31, 79).
10
+
11
+ ## Resolve the CLI
12
+
13
+ Choose one TUX CLI variant; both implement the same commands and canonical
14
+ JSON output, so do not install both:
15
+
16
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
17
+ `npx --yes --package=tux-review tux --version` and prefix commands with
18
+ `npx --yes --package=tux-review tux …`.
19
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
20
+ `python -m pip install tux-review` in the active virtual environment),
21
+ then use `tux --version`. For a one-off run, use
22
+ `pipx run tux-review tux --version`.
23
+
24
+ All commands below use the neutral form `tux <domain> <action>`. Replace
25
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
26
+ one-off variant. Never automate the visual review interface — the CLI and
27
+ the canonical JSON output are the machine interface.
28
+
29
+ ## Workflow
30
+
31
+ 1. **Discover** the project: design root (default `requirements/`),
32
+ framework (vanilla, react, vue, angular), package manager, dev server,
33
+ test framework.
34
+ 2. Run `tux design install --framework <framework>` — this creates or
35
+ updates `tux.config.json` with the canonical defaults
36
+ (`design.root`, `review.store`, `review.host`, `review.port`,
37
+ `identity.provider`).
38
+ 3. If no clickable design exists yet, run the `tux-design-create` skill.
39
+ 4. **Wire the review client**: the design is served through
40
+ `tux design start-review` (static hosting + script injection). No
41
+ manual script tags are required; a design may also include the client
42
+ via `/__tux__/bootstrap.js` + `/__tux__/client.js` on its own.
43
+ 5. **Route awareness**: verify the design exposes real routes (paths or
44
+ History-API navigation). Add `data-tux-component`,
45
+ `data-tux-instance`, `data-tux-id` attributes for component-level
46
+ targeting where missing.
47
+ 6. **Tests**: add the required integration checks (loading, default
48
+ activation, config activation, URL override, feedback
49
+ create→persist→reload→CLI retrieval, route awareness, SPA navigation,
50
+ machine interface `tux feedback show --format json`).
51
+ 7. **Run and verify** per SPC section 86: build/start, activate, create
52
+ feedback on multiple routes, reload, verify persistence, verify CLI.
53
+ 8. **Accept**: report `passed`, `partial`, or `failed`. Never report
54
+ `passed` when only a dependency was added, feedback persistence
55
+ failed, route tracking failed, CLI JSON failed, or the target design
56
+ is broken (SPC section 87).
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: tux-design-start-review
3
+ description: Start the clickable-mockup review server, gather design feedback, verify the review loop end to end.
4
+ ---
5
+
6
+ # tux-design-start-review
7
+
8
+ Start the clickable-mockup server with TUX review functionality and
9
+ verify the review loop (SPC sections 38, 88).
10
+
11
+ ## Resolve the CLI
12
+
13
+ Choose one TUX CLI variant; both implement the same commands and canonical
14
+ JSON output, so do not install both:
15
+
16
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
17
+ `npx --yes --package=tux-review tux --version` and prefix commands with
18
+ `npx --yes --package=tux-review tux …`.
19
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
20
+ `python -m pip install tux-review` in the active virtual environment),
21
+ then use `tux --version`. For a one-off run, use
22
+ `pipx run tux-review tux --version`.
23
+
24
+ All commands below use the neutral form `tux <domain> <action>`. Replace
25
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
26
+ one-off variant.
27
+
28
+ ## Workflow
29
+
30
+ 1. Run `tux design start-review --session <name>` from the project root
31
+ (or the design directory). It starts the server detached and returns
32
+ the state (URL, pid, session); use `--foreground` to keep it in the
33
+ foreground and `--port` when the canonical port 4173 is taken. The
34
+ server hosts the design, injects the Review Client, exposes the
35
+ feedback API, and persists to the configured store.
36
+ 2. Manage the lifecycle: `tux design status` reports running state with
37
+ URL, session and feedback count; `tux design stop-review` stops it. Stopping
38
+ never deletes feedback.
39
+ 3. Verify activation: the client must load without `?tux=on` when the
40
+ config is default-enabled (SPC section 64), and must stay inert with
41
+ `?tux=off`.
42
+ 4. Walk the acceptance scenario (SPC section 88): navigate to
43
+ `/products`, comment on a component, navigate to `/checkout`, comment
44
+ on a button, open the modal, comment inside the modal, reload,
45
+ revisit the routes — all markers must reappear in the correct
46
+ context.
47
+ 5. Verify the machine interface: `tux feedback show --format json` must
48
+ return all feedback created in the browser, with routes, components,
49
+ and UI state attached.
50
+ 6. Report the review URL, session name, feedback count, and the
51
+ verification result.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: tux-design-stop-review
3
+ description: Stop the design review server cleanly — check state first, report the session summary, preserve every feedback item.
4
+ ---
5
+
6
+ # tux-design-stop-review
7
+
8
+ End a design review session deliberately: check the server state, hand
9
+ over a session summary, then stop the server without touching the
10
+ feedback store (SPC sections 38 and 41 — design status and stop-review
11
+ share the live semantics).
12
+
13
+ ## Resolve the CLI
14
+
15
+ Choose one TUX CLI variant; both implement the same commands and canonical
16
+ JSON output, so do not install both:
17
+
18
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
19
+ `npx --yes --package=tux-review tux --version` and prefix commands with
20
+ `npx --yes --package=tux-review tux …`.
21
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
22
+ `python -m pip install tux-review` in the active virtual environment),
23
+ then use `tux --version`. For a one-off run, use
24
+ `pipx run tux-review tux --version`.
25
+
26
+ All commands below use the neutral form `tux <domain> <action>`. Replace
27
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
28
+ one-off variant.
29
+
30
+ ## Workflow
31
+
32
+ 1. Check the current state: `tux design status --format json` — reports
33
+ `running` with URL, session and feedback count, or `stopped`. Never
34
+ stop blind.
35
+ 2. Report the session summary before stopping: review URL, session name,
36
+ feedback count. Stopping ends the server, not the session data.
37
+ 3. Stop with `tux design stop-review --format json`. The output confirms
38
+ `stopped: true` with the pid; `stopped: false` with reason
39
+ `not running` means there was nothing to stop.
40
+ 4. Verify: `tux design status` now reports `stopped`, and the feedback
41
+ store still contains every item — stopping MUST NOT delete feedback
42
+ (SPC section 41).
43
+ 5. Report the final state: server stopped, feedback count preserved,
44
+ store path.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: tux-feedback-delete
3
+ description: Delete TUX feedback items by ID, a list of IDs, or all — with ownership and confirmation semantics.
4
+ ---
5
+
6
+ # tux-feedback-delete
7
+
8
+ Delete feedback items (SPC sections 45–47). Deleting is destructive:
9
+ confirm with the user before removing anything that was not explicitly
10
+ named.
11
+
12
+ ## Resolve the CLI
13
+
14
+ Choose one TUX CLI variant; both implement the same commands and canonical
15
+ JSON output, so do not install both:
16
+
17
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
18
+ `npx --yes --package=tux-review tux --version` and prefix commands with
19
+ `npx --yes --package=tux-review tux …`.
20
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
21
+ `python -m pip install tux-review` in the active virtual environment),
22
+ then use `tux --version`. For a one-off run, use
23
+ `pipx run tux-review tux --version`.
24
+
25
+ All commands below use the neutral form `tux <domain> <action>`. Replace
26
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
27
+ one-off variant.
28
+
29
+ ## Workflow
30
+
31
+ 1. Delete one item: `tux feedback delete <feedback-id>`.
32
+ 2. Delete a list of items: repeat the command per ID, or remove a whole
33
+ scope with `tux feedback clear --mine` (current identity) /
34
+ `tux feedback clear --all --force` (everything; requires explicit
35
+ confirmation) — both accept `--route` and `--session` to bound the
36
+ scope.
37
+ 3. Delete everything for one context: combine scopes, e.g.
38
+ `tux feedback clear --all --force --origin design --session <name>`.
39
+ 4. A missing ID fails with exit code 6 and does not touch the store;
40
+ report it instead of retrying blindly.
41
+ 5. Never delete feedback to "clean up" without an explicit user request:
42
+ feedback is the durable record of the review (SPC section 94). Deletion
43
+ is reserved for duplicates the user approved, spam, or user-requested
44
+ removal.
45
+ 6. Report exactly which IDs were deleted and which remain.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: tux-feedback-export
3
+ description: Export TUX feedback as canonical JSON or JSONL — serialize without interpretation for handoff to humans, tools or agents.
4
+ ---
5
+
6
+ # tux-feedback-export
7
+
8
+ Export feedback as a file or stream, serialized without interpretation
9
+ (SPC section 46). Export never mutates the store.
10
+
11
+ ## Resolve the CLI
12
+
13
+ Choose one TUX CLI variant; both implement the same commands and canonical
14
+ JSON output, so do not install both:
15
+
16
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
17
+ `npx --yes --package=tux-review tux --version` and prefix commands with
18
+ `npx --yes --package=tux-review tux …`.
19
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
20
+ `python -m pip install tux-review` in the active virtual environment),
21
+ then use `tux --version`. For a one-off run, use
22
+ `pipx run tux-review tux --version`.
23
+
24
+ All commands below use the neutral form `tux <domain> <action>`. Replace
25
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
26
+ one-off variant.
27
+
28
+ ## Workflow
29
+
30
+ 1. Export the full store as canonical JSON:
31
+ `tux feedback export --format json` (array, fixed key order,
32
+ 2-space indent, UTF-8, `\n`).
33
+ 2. Export line-delimited for streaming/line tools:
34
+ `tux feedback export --format jsonl` — one compact JSON object per
35
+ line, keys in schema order.
36
+ 3. Scope the export the same way as the survey: `--origin design|live`,
37
+ `--route`, `--session`, `--status`, `--mine` (export composes with
38
+ the show filters; use `tux feedback show` first if you need the
39
+ filtered view for orientation).
40
+ 4. Redirect the stream to a file when the user asked for an artifact:
41
+ `tux feedback export --format json > tux-feedback.json`. The output
42
+ is deterministic — the same store always produces byte-identical
43
+ files on Node and Python.
44
+ 5. Never edit exported content: the export is the record. Corrections
45
+ happen in the store (`feedback update`, `feedback validate --record`)
46
+ and are exported again.
47
+ 6. Report the export path, format and item count.
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: tux-feedback-show
3
+ description: Show TUX feedback — the complete canonical item by ID, or a filtered survey of all items with deterministic, machine-readable output.
4
+ ---
5
+
6
+ # tux-feedback-show
7
+
8
+ Show feedback items (SPC section 42): `tux feedback show` without an ID
9
+ surveys all items with deterministic, machine-readable output;
10
+ `tux feedback show <id>` prints the complete canonical item — location,
11
+ target, UI state, author, status, incorporation and validation
12
+ metadata.
13
+
14
+ ## Resolve the CLI
15
+
16
+ Choose one TUX CLI variant; both implement the same commands and canonical
17
+ JSON output, so do not install both:
18
+
19
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
20
+ `npx --yes --package=tux-review tux --version` and prefix commands with
21
+ `npx --yes --package=tux-review tux …`.
22
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
23
+ `python -m pip install tux-review` in the active virtual environment),
24
+ then use `tux --version`. For a one-off run, use
25
+ `pipx run tux-review tux --version`.
26
+
27
+ All commands below use the neutral form `tux <domain> <action>`. Replace
28
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
29
+ one-off variant.
30
+
31
+ ## Workflow
32
+
33
+ 1. Run `tux feedback show --format json` for the full survey. The output
34
+ is a canonical JSON array: fixed key order, no locale, no timestamps
35
+ beyond the stored ones.
36
+ 2. Narrow the survey with filters — they compose:
37
+ `--status open|incorporated|resolved|rejected`,
38
+ `--type change|issue|question|approval`,
39
+ `--origin design|live`,
40
+ `--route <route>`,
41
+ `--session <name>`,
42
+ `--mine` (current identity).
43
+ 3. Prefer explicit filters over post-filtering the JSON: the CLI output
44
+ is byte-identical between the Node and Python implementations and
45
+ safe to parse with any tool.
46
+ 4. Show one item: `tux feedback show <feedback-id>` — prints the
47
+ complete canonical JSON of that item. Filters and `--format` do not
48
+ apply in ID mode.
49
+ 5. A missing ID fails with exit code 6 and
50
+ `error: feedback not found: <id>` on stderr — report it, never
51
+ guess.
52
+ 6. Cite item IDs verbatim in your report; the ID is the stable
53
+ reference across incorporation and validation. Use `tux feedback
54
+ incorporate --strategy export-only --format json` to see
55
+ grouping/duplicates/conflicts before deciding.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: tux-live-create
3
+ description: Create or update clickable live pages in the target technology (vanilla, react, vue, angular) wired with TUX targeting attributes.
4
+ ---
5
+
6
+ # tux-live-create
7
+
8
+ Create or update clickable live pages using the methodology and the
9
+ target technology chosen by the user (SPC section 32).
10
+
11
+ ## Resolve the CLI
12
+
13
+ Choose one TUX CLI variant; both implement the same commands and canonical
14
+ JSON output, so do not install both:
15
+
16
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
17
+ `npx --yes --package=tux-review tux --version` and prefix commands with
18
+ `npx --yes --package=tux-review tux …`.
19
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
20
+ `python -m pip install tux-review` in the active virtual environment),
21
+ then use `tux --version`. For a one-off run, use
22
+ `pipx run tux-review tux --version`.
23
+
24
+ All commands below use the neutral form `tux <domain> <action>`. Replace
25
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
26
+ one-off variant.
27
+
28
+ ## Workflow
29
+
30
+ 1. **Clarify** the target technology (vanilla, react, vue, angular) and
31
+ the pages to build. For a green-field live app run
32
+ `tux live create --framework <framework> --name <slug>` — it
33
+ scaffolds the same runnable multi-route application as
34
+ `tux design create`, but as a live app (`"kind": "live"`, feedback
35
+ gathered through it carries `"origin": "live"`).
36
+ 2. For an existing application do not scaffold — extend the running app
37
+ in its own idiom instead (components, routes, state) and keep the
38
+ build system untouched.
39
+ 3. **Wire targeting attributes** on the components under review:
40
+ `data-tux-component` on component roots, `data-tux-instance` on
41
+ component instances, `data-tux-id` on individual elements, and
42
+ `data-tux-state` for bounded UI-state capture (SPC sections 13–15).
43
+ 4. **Verify** with `tux live start-review --url <dev-server>`: create
44
+ feedback on a page, a component instance and a modal; reload and
45
+ confirm the markers restore; confirm
46
+ `tux feedback show --format json` returns the items with
47
+ `"origin": "live"`.
48
+ 5. **Accept**: report pages, components, routes and the verification
49
+ result. Never report `passed` when persistence or route tracking
50
+ failed.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: tux-live-incorporate
3
+ description: Process live-session feedback into the development workflow — validate, group, deduplicate, surface conflicts, verify the framework, preserve IDs.
4
+ ---
5
+
6
+ # tux-live-incorporate
7
+
8
+ Process unresolved feedback of the live session using the user's
9
+ methodology, including the testing and verification methodology of the
10
+ framework in use (SPC sections 49–57, 90).
11
+
12
+ ## Resolve the CLI
13
+
14
+ Choose one TUX CLI variant; both implement the same commands and canonical
15
+ JSON output, so do not install both:
16
+
17
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
18
+ `npx --yes --package=tux-review tux --version` and prefix commands with
19
+ `npx --yes --package=tux-review tux …`.
20
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
21
+ `python -m pip install tux-review` in the active virtual environment),
22
+ then use `tux --version`. For a one-off run, use
23
+ `pipx run tux-review tux --version`.
24
+
25
+ All commands below use the neutral form `tux <domain> <action>`. Replace
26
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
27
+ one-off variant.
28
+
29
+ ## Workflow
30
+
31
+ 1. Load the open live feedback in scope:
32
+ `tux feedback show --status open --origin live --format json`
33
+ (optionally `--mine`, `--route <route>`, `--session <name>`). The
34
+ default scope is all open live feedback — not `--mine` (SPC
35
+ section 52).
36
+ 2. **Validate** every item against the schema (`tux feedback show <id>`
37
+ for details). Malformed items are reported, never dropped.
38
+ 3. **Group** by route/component/instance. The CLI pre-computes groups,
39
+ duplicates, and conflicts: run
40
+ `tux feedback incorporate --strategy export-only --origin live --format json`
41
+ to inspect the report without changing anything.
42
+ 4. **Duplicates** (identical normalized text on the same target): keep
43
+ every original, consolidate the request, and preserve the source IDs
44
+ in the traceability record (SPC section 53).
45
+ 5. **Conflicts** (an approval contradicting a requested change on the
46
+ same target): surface them with `requires_decision: true` and ask the
47
+ user. Do not resolve explicit contradictions silently (SPC section 54).
48
+ 6. **Choose the methodology** with the user when interactive:
49
+ consolidate first · update requirements · create implementation tasks
50
+ · apply actionable changes directly · review conflicts first · export
51
+ only. Then run
52
+ `tux feedback incorporate --strategy consolidate|requirements|tasks|direct --origin live --format json`.
53
+ The CLI marks processed items `incorporated`, records the batch under
54
+ `.tux/incorporations/`, and keeps every feedback ID.
55
+ 7. **Implement and verify** using the methodology of the framework in
56
+ use: apply the changes to the application, then verify each item in
57
+ the running UI (`tux live start-review --url …`) and record the
58
+ result with
59
+ `tux feedback validate --record <id> --result passed|failed --note "<observed>"`.
60
+ Only successfully verified feedback counts as resolved (SPC 94).
61
+ 8. Report what was incorporated, what needs a decision, and where the
62
+ traceability lives. Feedback items are never deleted by this skill.
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: tux-live-install
3
+ description: Install TUX live review into an existing application — discovery, least-invasive strategy, activation controls, build exclusion, tests.
4
+ ---
5
+
6
+ # tux-live-install
7
+
8
+ Establish a correct, tested, and accepted TUX live-review installation in
9
+ an existing application (SPC sections 32–35, 80).
10
+
11
+ ## Resolve the CLI
12
+
13
+ Choose one TUX CLI variant; both implement the same commands and canonical
14
+ JSON output, so do not install both:
15
+
16
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
17
+ `npx --yes --package=tux-review tux --version` and prefix commands with
18
+ `npx --yes --package=tux-review tux …`.
19
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
20
+ `python -m pip install tux-review` in the active virtual environment),
21
+ then use `tux --version`. For a one-off run, use
22
+ `pipx run tux-review tux --version`.
23
+
24
+ All commands below use the neutral form `tux <domain> <action>`. Replace
25
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
26
+ one-off variant.
27
+
28
+ ## Workflow
29
+
30
+ 1. **Discover** the application: runtime, framework (Vanilla, React,
31
+ Next.js, Vue, Nuxt, Angular, Svelte/SvelteKit, Vite, Webpack,
32
+ FastAPI, Flask, Django), build system, dev server, router, SPA vs
33
+ multi-page, middleware, proxy setup, configuration system, test
34
+ framework. Report unsupported setups explicitly (SPC section 33).
35
+ 2. Run `tux live install` — it detects the setup and selects the
36
+ least-invasive valid strategy (proxy injection by default: zero
37
+ application changes; the reverse proxy injects the Review Client into
38
+ HTML responses).
39
+ 3. **Configure** the review service: `tux.config.json`
40
+ (`review.enabled`, `review.store`, `review.host`, `review.port`,
41
+ `identity`). Identity may come from local config, environment, or
42
+ application authentication (SPC section 21).
43
+ 4. **Activation controls**: implement the three-layer model (SPC
44
+ sections 62–67): build-time inclusion, startup configuration, URL
45
+ runtime override (`?tux=on`, `?tux=off`), with the normative
46
+ precedence BUILD ABSENCE > URL OVERRIDE > CONFIG > DEFAULT ENABLED.
47
+ 5. **Build exclusion**: verify a deployment without TUX contains no
48
+ Review Client, no bootstrap, no review API, no feedback endpoints,
49
+ and no TUX assets (SPC section 63). `?tux=on` on such a build must
50
+ change nothing.
51
+ 6. **Tests**: add the required integration tests (SPC section 85):
52
+ loading included/excluded, default activation, config activation, URL
53
+ override both directions, build exclusion, feedback
54
+ create→persist→reload→retrieve, editing, deletion (`delete one`,
55
+ `clear --mine`, `clear --all`), route awareness, SPA navigation,
56
+ component instance identity, UI state, persistence across restart,
57
+ and `tux feedback show --format json` producing valid canonical JSON.
58
+ 7. **Run and verify** per SPC sections 86–87, then security-check
59
+ (section 70): runtime disabling is not removal; recommend build
60
+ exclusion for environments that do not need TUX.
61
+ 8. **Accept**: report `passed`, `partial`, or `failed` — never `passed`
62
+ when runtime was not tested, persistence failed, CLI JSON failed,
63
+ URL precedence failed, or build exclusion failed.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: tux-live-start-review
3
+ description: Start the UIX framework (vanilla, react, vue, angular) with the feedback system attached and verify live review.
4
+ ---
5
+
6
+ # tux-live-start-review
7
+
8
+ Start the user's framework — angular, vue, react or vanilla — with the
9
+ TUX feedback system attached, and verify live review (SPC sections
10
+ 39–41, 82).
11
+
12
+ ## Resolve the CLI
13
+
14
+ Choose one TUX CLI variant; both implement the same commands and canonical
15
+ JSON output, so do not install both:
16
+
17
+ 1. **Node.js/npm** — use an existing `tux --version` on PATH, or run
18
+ `npx --yes --package=tux-review tux --version` and prefix commands with
19
+ `npx --yes --package=tux-review tux …`.
20
+ 2. **Python/PyPI** — install with `pipx install tux-review` (or
21
+ `python -m pip install tux-review` in the active virtual environment),
22
+ then use `tux --version`. For a one-off run, use
23
+ `pipx run tux-review tux --version`.
24
+
25
+ All commands below use the neutral form `tux <domain> <action>`. Replace
26
+ `tux` with the Node `npx … tux` prefix only when you chose the Node
27
+ one-off variant.
28
+
29
+ ## Workflow
30
+
31
+ 1. Attach to a running application with
32
+ `tux live start-review --url http://localhost:3000`, or let TUX launch
33
+ it: `tux live start-review -- npm run dev` (the command after `--` is
34
+ spawned; its port defaults to 3000, override with `--target-port`).
35
+ The command works for every framework — vanilla static servers,
36
+ `ng serve`, `vite`, `next dev`. Use `--session <name>` to name the
37
+ review session.
38
+ 2. Verify: the application remains fully functional behind the proxy;
39
+ the Review Client is active according to configuration; the feedback
40
+ API answers; `tux live status` reports `running` with URL, target,
41
+ session and feedback count.
42
+ 3. Hand the review URL to the reviewers. Runtime activation follows the
43
+ canonical rules: config-disabled start is enabled ad hoc with
44
+ `?tux=on`, disabled again with `?tux=off` (SPC section 89).
45
+ 4. Stop with `tux live stop-review` when the session ends. Stopping must never
46
+ delete feedback (SPC section 41).
47
+ 5. Report the review URL, session, target, and the verification result.