From 87b5dcfd0521f560ce23a9158af17f3fd467f54c Mon Sep 17 00:00:00 2001 From: Yana Matrosova Date: Wed, 27 May 2026 18:09:41 +0300 Subject: [PATCH] NYM-1199: integrate OpenSpec AI for Node Families UI This commit introduces the foundational setup for developing the Node Families wallet frontend. It integrates the OpenSpec AI development workflow, including prompts and skills, to enable a structured, AI-assisted approach. Additionally, Storybook is configured for comprehensive UI component visualization, mocking, and testing for the new features. Refers to NYM-1199. --- .gitignore | 5 + nym-wallet/.amazonq/prompts/opsx-apply.md | 149 ++ nym-wallet/.amazonq/prompts/opsx-archive.md | 154 ++ nym-wallet/.amazonq/prompts/opsx-explore.md | 170 ++ nym-wallet/.amazonq/prompts/opsx-propose.md | 103 + .../skills/openspec-apply-change/SKILL.md | 156 ++ .../skills/openspec-archive-change/SKILL.md | 114 + .../.amazonq/skills/openspec-explore/SKILL.md | 288 ++ .../.amazonq/skills/openspec-propose/SKILL.md | 110 + nym-wallet/.eslintrc.json | 14 +- nym-wallet/.storybook/main.ts | 16 + nym-wallet/.storybook/preview.tsx | 14 + nym-wallet/README.md | 6 +- nym-wallet/e2e-report/index.html | 35 + .../01-pending-node-invites.png | Bin 0 -> 102149 bytes .../02-invite-accepted.png | Bin 0 -> 108254 bytes .../03-family-left.png | Bin 0 -> 110937 bytes .../04-invite-rejected.png | Bin 0 -> 106233 bytes .../01-multi-node-invite-states.png | Bin 0 -> 102030 bytes .../01-create-family-entry.png | Bin 0 -> 105498 bytes .../02-family-created.png | Bin 0 -> 120385 bytes .../03-node-invited-pending.png | Bin 0 -> 125922 bytes .../04-member-joined.png | Bin 0 -> 124921 bytes .../05-member-kicked.png | Bin 0 -> 106276 bytes .../06-family-disbanded.png | Bin 0 -> 107980 bytes .../node-families-wallet/.openspec.yaml | 2 + .../changes/node-families-wallet/design.md | 74 + .../changes/node-families-wallet/proposal.md | 51 + .../specs/node-families-operator/spec.md | 57 + .../specs/node-families-owner/spec.md | 133 + .../changes/node-families-wallet/tasks.md | 73 + nym-wallet/openspec/config.yaml | 20 + nym-wallet/package.json | 20 +- nym-wallet/test-results/.last-run.json | 4 + pnpm-lock.yaml | 2318 ++++++++++++++++- pnpm-workspace.yaml | 1 + 36 files changed, 4003 insertions(+), 84 deletions(-) create mode 100644 nym-wallet/.amazonq/prompts/opsx-apply.md create mode 100644 nym-wallet/.amazonq/prompts/opsx-archive.md create mode 100644 nym-wallet/.amazonq/prompts/opsx-explore.md create mode 100644 nym-wallet/.amazonq/prompts/opsx-propose.md create mode 100644 nym-wallet/.amazonq/skills/openspec-apply-change/SKILL.md create mode 100644 nym-wallet/.amazonq/skills/openspec-archive-change/SKILL.md create mode 100644 nym-wallet/.amazonq/skills/openspec-explore/SKILL.md create mode 100644 nym-wallet/.amazonq/skills/openspec-propose/SKILL.md create mode 100644 nym-wallet/.storybook/main.ts create mode 100644 nym-wallet/.storybook/preview.tsx create mode 100644 nym-wallet/e2e-report/index.html create mode 100644 nym-wallet/e2e-report/screenshots/operator-lifecycle-accept-leave-then-reject/01-pending-node-invites.png create mode 100644 nym-wallet/e2e-report/screenshots/operator-lifecycle-accept-leave-then-reject/02-invite-accepted.png create mode 100644 nym-wallet/e2e-report/screenshots/operator-lifecycle-accept-leave-then-reject/03-family-left.png create mode 100644 nym-wallet/e2e-report/screenshots/operator-lifecycle-accept-leave-then-reject/04-invite-rejected.png create mode 100644 nym-wallet/e2e-report/screenshots/operator-page-shows-multi-node-invite-states/01-multi-node-invite-states.png create mode 100644 nym-wallet/e2e-report/screenshots/owner-lifecycle-create-invite-accept-kick-disband/01-create-family-entry.png create mode 100644 nym-wallet/e2e-report/screenshots/owner-lifecycle-create-invite-accept-kick-disband/02-family-created.png create mode 100644 nym-wallet/e2e-report/screenshots/owner-lifecycle-create-invite-accept-kick-disband/03-node-invited-pending.png create mode 100644 nym-wallet/e2e-report/screenshots/owner-lifecycle-create-invite-accept-kick-disband/04-member-joined.png create mode 100644 nym-wallet/e2e-report/screenshots/owner-lifecycle-create-invite-accept-kick-disband/05-member-kicked.png create mode 100644 nym-wallet/e2e-report/screenshots/owner-lifecycle-create-invite-accept-kick-disband/06-family-disbanded.png create mode 100644 nym-wallet/openspec/changes/node-families-wallet/.openspec.yaml create mode 100644 nym-wallet/openspec/changes/node-families-wallet/design.md create mode 100644 nym-wallet/openspec/changes/node-families-wallet/proposal.md create mode 100644 nym-wallet/openspec/changes/node-families-wallet/specs/node-families-operator/spec.md create mode 100644 nym-wallet/openspec/changes/node-families-wallet/specs/node-families-owner/spec.md create mode 100644 nym-wallet/openspec/changes/node-families-wallet/tasks.md create mode 100644 nym-wallet/openspec/config.yaml create mode 100644 nym-wallet/test-results/.last-run.json diff --git a/.gitignore b/.gitignore index fc762c45d9..c852df21c0 100644 --- a/.gitignore +++ b/.gitignore @@ -83,6 +83,11 @@ test-tutorials/ # pnpm .pnpm-store/ +<<<<<<< HEAD tmp/ # operator tools scripts/nym-node-setup/auto-bond/nodes.csv +======= + +*storybook.log +>>>>>>> dea01ef63 (NYM-1199: integrate OpenSpec AI for Node Families UI) diff --git a/nym-wallet/.amazonq/prompts/opsx-apply.md b/nym-wallet/.amazonq/prompts/opsx-apply.md new file mode 100644 index 0000000000..e23ec64d14 --- /dev/null +++ b/nym-wallet/.amazonq/prompts/opsx-apply.md @@ -0,0 +1,149 @@ +--- +description: Implement tasks from an OpenSpec change (Experimental) +--- + +Implement tasks from an OpenSpec change. + +**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes. + +**Steps** + +1. **Select the change** + + If a name is provided, use it. Otherwise: + - Infer from conversation context if the user mentioned a change + - Auto-select if only one active change exists + - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select + + Always announce: "Using change: " and how to override (e.g., `/opsx:apply `). + +2. **Check status to understand the schema** + ```bash + openspec status --change "" --json + ``` + Parse the JSON to understand: + - `schemaName`: The workflow being used (e.g., "spec-driven") + - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others) + +3. **Get apply instructions** + + ```bash + openspec instructions apply --change "" --json + ``` + + This returns: + - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema) + - Progress (total, complete, remaining) + - Task list with status + - Dynamic instruction based on current state + + **Handle states:** + - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue` + - If `state: "all_done"`: congratulate, suggest archive + - Otherwise: proceed to implementation + +4. **Read context files** + + Read every file path listed under `contextFiles` from the apply instructions output. + The files depend on the schema being used: + - **spec-driven**: proposal, specs, design, tasks + - Other schemas: follow the contextFiles from CLI output + +5. **Show current progress** + + Display: + - Schema being used + - Progress: "N/M tasks complete" + - Remaining tasks overview + - Dynamic instruction from CLI + +6. **Implement tasks (loop until done or blocked)** + + For each pending task: + - Show which task is being worked on + - Make the code changes required + - Keep changes minimal and focused + - Mark task complete in the tasks file: `- [ ]` → `- [x]` + - Continue to next task + + **Pause if:** + - Task is unclear → ask for clarification + - Implementation reveals a design issue → suggest updating artifacts + - Error or blocker encountered → report and wait for guidance + - User interrupts + +7. **On completion or pause, show status** + + Display: + - Tasks completed this session + - Overall progress: "N/M tasks complete" + - If all done: suggest archive + - If paused: explain why and wait for guidance + +**Output During Implementation** + +``` +## Implementing: (schema: ) + +Working on task 3/7: +[...implementation happening...] +✓ Task complete + +Working on task 4/7: +[...implementation happening...] +✓ Task complete +``` + +**Output On Completion** + +``` +## Implementation Complete + +**Change:** +**Schema:** +**Progress:** 7/7 tasks complete ✓ + +### Completed This Session +- [x] Task 1 +- [x] Task 2 +... + +All tasks complete! You can archive this change with `/opsx:archive`. +``` + +**Output On Pause (Issue Encountered)** + +``` +## Implementation Paused + +**Change:** +**Schema:** +**Progress:** 4/7 tasks complete + +### Issue Encountered + + +**Options:** +1.