@sun-asterisk/sungen 3.2.2 → 3.2.3-beta.3
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/dist/capabilities/discover.d.ts.map +1 -1
- package/dist/capabilities/discover.js +26 -3
- package/dist/capabilities/discover.js.map +1 -1
- package/dist/cli/commands/add-flow.d.ts.map +1 -1
- package/dist/cli/commands/add-flow.js +2 -0
- package/dist/cli/commands/add-flow.js.map +1 -1
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +4 -0
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/capability.d.ts.map +1 -1
- package/dist/cli/commands/capability.js +61 -0
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +89 -2
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/eval.js +3 -3
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/gate.d.ts +3 -0
- package/dist/cli/commands/gate.d.ts.map +1 -0
- package/dist/cli/commands/gate.js +83 -0
- package/dist/cli/commands/gate.js.map +1 -0
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +2 -1
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +32 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/journey.d.ts +3 -0
- package/dist/cli/commands/journey.d.ts.map +1 -0
- package/dist/cli/commands/journey.js +114 -0
- package/dist/cli/commands/journey.js.map +1 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +10 -3
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/snapshot-builder.d.ts.map +1 -1
- package/dist/dashboard/snapshot-builder.js +10 -1
- package/dist/dashboard/snapshot-builder.js.map +1 -1
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +3 -1
- package/dist/exporters/csv-exporter.js.map +1 -1
- package/dist/exporters/json-exporter.js +3 -1
- package/dist/exporters/json-exporter.js.map +1 -1
- package/dist/exporters/mobile-app-id.d.ts +22 -0
- package/dist/exporters/mobile-app-id.d.ts.map +1 -0
- package/dist/exporters/mobile-app-id.js +37 -0
- package/dist/exporters/mobile-app-id.js.map +1 -0
- package/dist/exporters/spec-parser.d.ts.map +1 -1
- package/dist/exporters/spec-parser.js +6 -2
- package/dist/exporters/spec-parser.js.map +1 -1
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts +3 -0
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +7 -4
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +20 -3
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +4 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +4 -1
- package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +3 -0
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +48 -9
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/template-engine.d.ts +3 -0
- package/dist/generators/test-generator/template-engine.d.ts.map +1 -1
- package/dist/generators/test-generator/template-engine.js +11 -1
- package/dist/generators/test-generator/template-engine.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts +11 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +33 -0
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +8 -1
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/catalog/universal-viewpoints.yaml +15 -0
- package/dist/harness/eval/skill-lint.d.ts +3 -3
- package/dist/harness/eval/skill-lint.d.ts.map +1 -1
- package/dist/harness/eval/skill-lint.js +88 -68
- package/dist/harness/eval/skill-lint.js.map +1 -1
- package/dist/harness/journey.d.ts +88 -0
- package/dist/harness/journey.d.ts.map +1 -0
- package/dist/harness/journey.js +414 -0
- package/dist/harness/journey.js.map +1 -0
- package/dist/harness/quality-gates.d.ts +13 -0
- package/dist/harness/quality-gates.d.ts.map +1 -1
- package/dist/harness/quality-gates.js +23 -0
- package/dist/harness/quality-gates.js.map +1 -1
- package/dist/harness/sensors.d.ts +1 -1
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +32 -9
- package/dist/harness/sensors.js.map +1 -1
- package/dist/orchestrator/ai-rules-updater.d.ts +11 -3
- package/dist/orchestrator/ai-rules-updater.d.ts.map +1 -1
- package/dist/orchestrator/ai-rules-updater.js +44 -180
- package/dist/orchestrator/ai-rules-updater.js.map +1 -1
- package/dist/orchestrator/ai-skills/adapters.d.ts +28 -0
- package/dist/orchestrator/ai-skills/adapters.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/adapters.js +34 -0
- package/dist/orchestrator/ai-skills/adapters.js.map +1 -0
- package/dist/orchestrator/ai-skills/build.d.ts +10 -0
- package/dist/orchestrator/ai-skills/build.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/build.js +128 -0
- package/dist/orchestrator/ai-skills/build.js.map +1 -0
- package/dist/orchestrator/ai-skills/cap-stripper.d.ts +27 -0
- package/dist/orchestrator/ai-skills/cap-stripper.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/cap-stripper.js +78 -0
- package/dist/orchestrator/ai-skills/cap-stripper.js.map +1 -0
- package/dist/orchestrator/ai-skills/commands.d.ts +22 -0
- package/dist/orchestrator/ai-skills/commands.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/commands.js +109 -0
- package/dist/orchestrator/ai-skills/commands.js.map +1 -0
- package/dist/orchestrator/ai-skills/generator.d.ts +23 -0
- package/dist/orchestrator/ai-skills/generator.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/generator.js +79 -0
- package/dist/orchestrator/ai-skills/generator.js.map +1 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.d.ts +2 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.js +183 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.js.map +1 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.d.ts +8 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.js +28 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.js.map +1 -0
- package/dist/orchestrator/ai-skills/writer.d.ts +15 -0
- package/dist/orchestrator/ai-skills/writer.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/writer.js +129 -0
- package/dist/orchestrator/ai-skills/writer.js.map +1 -0
- package/dist/orchestrator/flow-manager.d.ts +11 -0
- package/dist/orchestrator/flow-manager.d.ts.map +1 -1
- package/dist/orchestrator/flow-manager.js +147 -29
- package/dist/orchestrator/flow-manager.js.map +1 -1
- package/dist/orchestrator/mobile-runtime-scaffolder.d.ts +59 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.d.ts.map +1 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.js +298 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.js.map +1 -0
- package/dist/orchestrator/project-initializer.d.ts +44 -7
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +147 -79
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/screen-manager.d.ts +30 -0
- package/dist/orchestrator/screen-manager.d.ts.map +1 -1
- package/dist/orchestrator/screen-manager.js +205 -22
- package/dist/orchestrator/screen-manager.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/README.md +58 -0
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-add-flow.md → ai-src/commands/add-flow.md} +63 -2
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-add-screen.md → ai-src/commands/add-screen.md} +171 -6
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-create-test.md → ai-src/commands/create-test.md} +118 -4
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-dashboard.md → dist/orchestrator/templates/ai-src/commands/dashboard.md} +25 -3
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-delivery.md → dist/orchestrator/templates/ai-src/commands/delivery.md} +67 -3
- package/dist/orchestrator/templates/ai-src/commands/design.md +29 -0
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-feedback.md → dist/orchestrator/templates/ai-src/commands/feedback.md} +34 -3
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-locale.md → ai-src/commands/locale.md} +56 -4
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-review.md → dist/orchestrator/templates/ai-src/commands/review.md} +57 -2
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-run-test.md → dist/orchestrator/templates/ai-src/commands/run-test.md} +116 -5
- package/dist/orchestrator/templates/ai-src/config/codex.md +8 -0
- package/{src/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md → dist/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md} +11 -0
- package/dist/orchestrator/templates/{ai-instructions/github-skill-sungen-error-mapping.md → ai-src/skills/sungen-error-mapping/SKILL.md} +49 -9
- package/{src/orchestrator/templates/ai-instructions/claude-skill-harness-audit.md → dist/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md} +5 -5
- package/{src/orchestrator/templates/ai-instructions/claude-skill-locale.md → dist/orchestrator/templates/ai-src/skills/sungen-locale/SKILL.md} +275 -3
- package/{src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix.md → dist/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md} +17 -0
- package/dist/orchestrator/templates/{ai-instructions/claude-skill-selector-fix-mobile.md → ai-src/skills/sungen-selector-fix-mobile/SKILL.md} +5 -0
- package/dist/orchestrator/templates/{ai-instructions/claude-skill-tc-generation.md → ai-src/skills/sungen-tc-generation/SKILL.md} +5 -0
- package/dist/orchestrator/templates/playwright.config.ts +7 -4
- package/package.json +3 -3
- package/src/capabilities/discover.ts +29 -3
- package/src/cli/commands/add-flow.ts +2 -0
- package/src/cli/commands/add.ts +4 -0
- package/src/cli/commands/capability.ts +64 -1
- package/src/cli/commands/delivery.ts +89 -2
- package/src/cli/commands/eval.ts +3 -3
- package/src/cli/commands/gate.ts +44 -0
- package/src/cli/commands/generate.ts +2 -1
- package/src/cli/commands/init.ts +50 -3
- package/src/cli/commands/journey.ts +72 -0
- package/src/cli/commands/update.ts +14 -4
- package/src/cli/index.ts +4 -0
- package/src/dashboard/snapshot-builder.ts +10 -1
- package/src/exporters/csv-exporter.ts +3 -1
- package/src/exporters/json-exporter.ts +3 -1
- package/src/exporters/mobile-app-id.ts +34 -0
- package/src/exporters/spec-parser.ts +6 -2
- package/src/generators/test-generator/adapters/adapter-interface.ts +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +7 -4
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +20 -3
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +4 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +4 -1
- package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +3 -0
- package/src/generators/test-generator/code-generator.ts +49 -9
- package/src/generators/test-generator/template-engine.ts +14 -1
- package/src/generators/test-generator/utils/selector-resolver.ts +51 -1
- package/src/harness/audit.ts +9 -2
- package/src/harness/catalog/universal-viewpoints.yaml +15 -0
- package/src/harness/eval/skill-lint.ts +71 -60
- package/src/harness/journey.ts +434 -0
- package/src/harness/quality-gates.ts +20 -0
- package/src/harness/sensors.ts +25 -8
- package/src/orchestrator/ai-rules-updater.ts +35 -197
- package/src/orchestrator/ai-skills/adapters.ts +52 -0
- package/src/orchestrator/ai-skills/build.ts +103 -0
- package/src/orchestrator/ai-skills/cap-stripper.ts +85 -0
- package/src/orchestrator/ai-skills/commands.ts +112 -0
- package/src/orchestrator/ai-skills/generator.ts +47 -0
- package/src/orchestrator/ai-skills/golden-skills.test.ts +124 -0
- package/src/orchestrator/ai-skills/resolve-assistants.ts +18 -0
- package/src/orchestrator/ai-skills/writer.ts +92 -0
- package/src/orchestrator/flow-manager.ts +165 -29
- package/src/orchestrator/mobile-runtime-scaffolder.ts +277 -0
- package/src/orchestrator/project-initializer.ts +159 -86
- package/src/orchestrator/screen-manager.ts +237 -22
- package/src/orchestrator/templates/ai-src/README.md +58 -0
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-add-flow.md → ai-src/commands/add-flow.md} +63 -2
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-add-screen.md → ai-src/commands/add-screen.md} +171 -6
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-create-test.md → ai-src/commands/create-test.md} +118 -4
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-dashboard.md → src/orchestrator/templates/ai-src/commands/dashboard.md} +25 -3
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-delivery.md → src/orchestrator/templates/ai-src/commands/delivery.md} +67 -3
- package/src/orchestrator/templates/ai-src/commands/design.md +29 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-feedback.md → src/orchestrator/templates/ai-src/commands/feedback.md} +34 -3
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-locale.md → ai-src/commands/locale.md} +56 -4
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-review.md → src/orchestrator/templates/ai-src/commands/review.md} +57 -2
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-run-test.md → src/orchestrator/templates/ai-src/commands/run-test.md} +116 -5
- package/src/orchestrator/templates/ai-src/config/codex.md +8 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md → src/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md} +11 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-error-mapping.md → src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md} +49 -9
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-harness-audit.md → src/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md} +5 -5
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-locale.md → src/orchestrator/templates/ai-src/skills/sungen-locale/SKILL.md} +275 -3
- package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix.md → src/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md} +17 -0
- package/src/orchestrator/templates/{ai-instructions/claude-skill-selector-fix-mobile.md → ai-src/skills/sungen-selector-fix-mobile/SKILL.md} +5 -0
- package/src/orchestrator/templates/{ai-instructions/claude-skill-tc-generation.md → ai-src/skills/sungen-tc-generation/SKILL.md} +5 -0
- package/src/orchestrator/templates/playwright.config.ts +7 -4
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-design.md +0 -12
- package/dist/orchestrator/templates/ai-instructions/claude-skill-selector-fix.md +0 -347
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-add-flow.md +0 -86
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-add-screen.md +0 -131
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +0 -93
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-dashboard.md +0 -65
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-delivery.md +0 -83
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-design.md +0 -13
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-feedback.md +0 -24
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-locale.md +0 -70
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-review.md +0 -38
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +0 -155
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +0 -184
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-harness-audit.md +0 -85
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-locale.md +0 -291
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +0 -316
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +0 -221
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +0 -617
- package/src/orchestrator/templates/ai-instructions/claude-cmd-design.md +0 -12
- package/src/orchestrator/templates/ai-instructions/claude-skill-api-design.md +0 -62
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-figma-mcp.md +0 -82
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-figma-pat.md +0 -117
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-live.md +0 -60
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-local.md +0 -38
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture.md +0 -35
- package/src/orchestrator/templates/ai-instructions/claude-skill-dashboard.md +0 -121
- package/src/orchestrator/templates/ai-instructions/claude-skill-delivery.md +0 -141
- package/src/orchestrator/templates/ai-instructions/claude-skill-error-mapping.md +0 -157
- package/src/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +0 -446
- package/src/orchestrator/templates/ai-instructions/claude-skill-ingest-legacy.md +0 -79
- package/src/orchestrator/templates/ai-instructions/claude-skill-mobile-gestures.md +0 -109
- package/src/orchestrator/templates/ai-instructions/claude-skill-selector-fix.md +0 -347
- package/src/orchestrator/templates/ai-instructions/claude-skill-tc-review.md +0 -320
- package/src/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +0 -118
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-a-data-entry.md +0 -203
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-b-data-ops.md +0 -179
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-c-data-explore.md +0 -233
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-d-display.md +0 -226
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-e-identity.md +0 -177
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint.md +0 -118
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-add-flow.md +0 -86
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-add-screen.md +0 -131
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +0 -93
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-dashboard.md +0 -65
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-delivery.md +0 -83
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-design.md +0 -13
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-feedback.md +0 -24
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-locale.md +0 -70
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-review.md +0 -38
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +0 -155
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-api-design.md +0 -62
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +0 -184
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-mcp.md +0 -82
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-pat.md +0 -117
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-live.md +0 -60
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-local.md +0 -38
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture.md +0 -35
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-dashboard.md +0 -121
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +0 -141
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-error-mapping.md +0 -157
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +0 -446
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-harness-audit.md +0 -85
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md +0 -79
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-locale.md +0 -291
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md +0 -109
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +0 -316
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +0 -221
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +0 -617
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md +0 -320
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +0 -118
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md +0 -203
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md +0 -179
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md +0 -233
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md +0 -226
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md +0 -177
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md +0 -118
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-challenge.md → ai-src/agents/challenge.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-discovery.md → ai-src/agents/discovery.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-generator.md → ai-src/agents/generator.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-reviewer.md → ai-src/agents/reviewer.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-config.md → ai-src/config/claude.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/copilot-config.md → ai-src/config/copilot.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-api-design.md → ai-src/skills/sungen-api-design/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture.md → ai-src/skills/sungen-capture/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-figma-mcp.md → ai-src/skills/sungen-capture/mode-figma-mcp.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-figma-pat.md → ai-src/skills/sungen-capture/mode-figma-pat.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-live.md → ai-src/skills/sungen-capture/mode-live.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-local.md → ai-src/skills/sungen-capture/mode-local.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-dashboard.md → ai-src/skills/sungen-dashboard/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-delivery.md → ai-src/skills/sungen-delivery/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-gherkin-syntax.md → ai-src/skills/sungen-gherkin-syntax/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-ingest-legacy.md → ai-src/skills/sungen-ingest-legacy/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-mobile-gestures.md → ai-src/skills/sungen-mobile-gestures/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-selector-keys.md → ai-src/skills/sungen-selector-keys/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-tc-review.md → ai-src/skills/sungen-tc-review/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-test-design-techniques.md → ai-src/skills/sungen-test-design-techniques/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint.md → ai-src/skills/sungen-viewpoint/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-a-data-entry.md → ai-src/skills/sungen-viewpoint/group-a-data-entry.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-b-data-ops.md → ai-src/skills/sungen-viewpoint/group-b-data-ops.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-c-data-explore.md → ai-src/skills/sungen-viewpoint/group-c-data-explore.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-d-display.md → ai-src/skills/sungen-viewpoint/group-d-display.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-e-identity.md → ai-src/skills/sungen-viewpoint/group-e-identity.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-challenge.md → ai-src/agents/challenge.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-discovery.md → ai-src/agents/discovery.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-generator.md → ai-src/agents/generator.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-reviewer.md → ai-src/agents/reviewer.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-config.md → ai-src/config/claude.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/copilot-config.md → ai-src/config/copilot.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-api-design.md → src/orchestrator/templates/ai-src/skills/sungen-api-design/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture.md → src/orchestrator/templates/ai-src/skills/sungen-capture/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-mcp.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-figma-mcp.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-pat.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-figma-pat.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-live.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-live.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-local.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-local.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-dashboard.md → src/orchestrator/templates/ai-src/skills/sungen-dashboard/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md → src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md → src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md → src/orchestrator/templates/ai-src/skills/sungen-ingest-legacy/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md → src/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-skill-selector-keys.md → ai-src/skills/sungen-selector-keys/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md → src/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md → src/orchestrator/templates/ai-src/skills/sungen-test-design-techniques/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-a-data-entry.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-b-data-ops.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-c-data-explore.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-d-display.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-e-identity.md} +0 -0
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sungen-capture-mobile
|
|
3
|
-
description: 'Capture a live mobile app screen via Appium MCP — locator tree + screenshot for visual context. Auto-loaded by create-test when the screen is @platform:mobile/android/ios.'
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Launch a mobile app on a device/emulator, capture **one locator tree** (`generate_locators`) and **one screenshot**, and save them as visual context for test generation. The mobile analogue of `sungen-capture-live` — same job, Appium MCP instead of Playwright MCP.
|
|
10
|
-
|
|
11
|
-
Use when the target is a native/Flutter/React-Native app (`@platform:android` or `@platform:ios`) running on a connected device or emulator.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Prerequisites
|
|
16
|
-
|
|
17
|
-
- `appium-mcp` connected (see `/mcp`). It runs Appium **embedded** — no separate server needed.
|
|
18
|
-
- A device/emulator booted: `adb devices` shows one for Android; a Simulator for iOS.
|
|
19
|
-
- The app **installed** on the device (`adb install -r <app>.apk` for Android).
|
|
20
|
-
- The screen's `Path:` (in `<screen>/features/*.feature` or `spec.md`) gives the app entry as
|
|
21
|
-
`<appPackage>/<appActivity>` (Android) or bundleId (iOS), e.g. `com.kngroup.media.converter/.MainActivity`.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Steps
|
|
26
|
-
|
|
27
|
-
### 1. Resolve target app + entry
|
|
28
|
-
|
|
29
|
-
Resolve in this order:
|
|
30
|
-
1. `Path:` line in the feature / `App ID` in `spec.md` → split into `appPackage` + `appActivity`.
|
|
31
|
-
A dual-id Path (`<pkg>/<activity> | <iosBundleId>`) → take the part for the OS you are exploring
|
|
32
|
-
(left of `|` = Android pkg/activity, right = iOS bundle id).
|
|
33
|
-
2. If missing → ask the user: *"What is the appPackage/appActivity (Android) or bundleId (iOS)?"*
|
|
34
|
-
3. **Navigation recipe** — read the feature's `Background:` (the in-app web-path analog). Line 1
|
|
35
|
-
`Given User is on [Home] screen` is the launcher/landing screen the app opens on; each following
|
|
36
|
-
`When/And User tap [...]` (or gesture) is one hop toward the target screen. You will **replay**
|
|
37
|
-
these in step 4.5 so you scan the screen this feature targets — not the launcher. An anchor-only
|
|
38
|
-
Background (no nav steps) ⇒ the target IS the launcher screen ⇒ no navigation needed.
|
|
39
|
-
|
|
40
|
-
### 2. Select device
|
|
41
|
-
|
|
42
|
-
`select_device` with `platform: android` (or `ios`). If exactly one device, it auto-selects.
|
|
43
|
-
If several, list them and ask the user which `deviceUdid`.
|
|
44
|
-
|
|
45
|
-
### 3. Create the session
|
|
46
|
-
|
|
47
|
-
`appium_session_management` `action=create`, `platform=android`, capabilities (JSON string):
|
|
48
|
-
```
|
|
49
|
-
appium:appPackage, appium:appActivity, appium:udid,
|
|
50
|
-
appium:noReset=true, appium:autoGrantPermissions=true, appium:newCommandTimeout=300
|
|
51
|
-
```
|
|
52
|
-
For iOS, call `prepare_ios_simulator` first, then create with `appium:bundleId`.
|
|
53
|
-
|
|
54
|
-
### 4. ⚠️ Wait for the screen to actually render
|
|
55
|
-
|
|
56
|
-
**This is the #1 gotcha for Flutter / RN apps.** Right after launch the app often shows a blank
|
|
57
|
-
splash — and the locator tree will contain **zero usable elements** (just an empty `FrameLayout`).
|
|
58
|
-
Do **not** capture yet. Take a quick `appium_screenshot`; if it's blank/splash, wait and re-check
|
|
59
|
-
until real content is drawn. Only then capture. (A Flutter app on a loading screen looks "invisible"
|
|
60
|
-
to Appium; the same app on a rendered screen exposes its full Semantics tree.)
|
|
61
|
-
|
|
62
|
-
### 4.5. ⚠️ Navigate to the target screen (replay the navigation recipe)
|
|
63
|
-
|
|
64
|
-
**This is what makes capture land on the RIGHT screen** — the mobile equivalent of `page.goto(url)`
|
|
65
|
-
on web. After the launcher screen has rendered, replay the `Background:` nav steps so Appium ends up
|
|
66
|
-
on the screen this feature targets, *then* capture there.
|
|
67
|
-
|
|
68
|
-
For each nav step **after** the `Given User is on [Home] screen` anchor, in order:
|
|
69
|
-
1. `generate_locators` (or `appium_get_page_source`) on the CURRENT screen.
|
|
70
|
-
2. Resolve the step's `[Label]` against the live tree — prefer `accessibility id`, then visible
|
|
71
|
-
`text`/`content-desc`, then an `xpath` on a distinctive substring. Gestures (`scroll to [X]`,
|
|
72
|
-
`swipe …`) follow `sungen-mobile-gestures`.
|
|
73
|
-
3. Perform the tap/gesture, then **wait for the next screen to render** (same blank-splash guard as
|
|
74
|
-
step 4) before the next step.
|
|
75
|
-
|
|
76
|
-
After the LAST step you are on the target screen — capture HERE (steps 5–6).
|
|
77
|
-
|
|
78
|
-
- **Anchor-only Background** (no nav steps) ⇒ the target IS the launcher screen ⇒ skip this step.
|
|
79
|
-
- **A step won't resolve** (its `[Label]` matches no element) ⇒ **STOP. Do not capture the wrong
|
|
80
|
-
screen.** Screenshot where you are and report: *"recipe step N: [Label] not found — fix the
|
|
81
|
-
Background nav path."* Fail loud (run-test would fail at the same step anyway).
|
|
82
|
-
- **No recipe yet** (guided-stub Background, but the target is NOT the launcher) ⇒ drive to the
|
|
83
|
-
screen interactively off the live tree (if unsure which control leads there, ask the user), then
|
|
84
|
-
**report the exact nav steps you took** so create-test/add-screen can write them into the
|
|
85
|
-
Background. Do **not** edit the `.feature` yourself — Gherkin authorship stays with those commands.
|
|
86
|
-
|
|
87
|
-
### 5. Capture the locator tree (primary AI context)
|
|
88
|
-
|
|
89
|
-
Call **`generate_locators`** — this is the mobile equivalent of the web accessibility snapshot. It
|
|
90
|
-
returns priority-ranked locators per interactable element: `accessibility id`, `id`, platform-native
|
|
91
|
-
(`-android uiautomator` / `-ios predicate string`), and `xpath`, plus `content-desc`/`text`,
|
|
92
|
-
`clickable`, `enabled`. This is what `sungen-tc-generation` and `sungen-selector-keys` consume.
|
|
93
|
-
|
|
94
|
-
If the tree is huge, also `appium_get_page_source` (saved to a file) and grep it — never dump the
|
|
95
|
-
full XML inline.
|
|
96
|
-
|
|
97
|
-
### 6. Screenshot
|
|
98
|
-
|
|
99
|
-
`appium_screenshot` → save to:
|
|
100
|
-
```
|
|
101
|
-
qa/screens/<screen>/requirements/ui/mobile-<timestamp>.png
|
|
102
|
-
```
|
|
103
|
-
`<timestamp>` = `YYYYMMDD-HHMM` local (e.g. `mobile-20260605-1645.png`).
|
|
104
|
-
|
|
105
|
-
### 7. Detect discrepancies vs spec
|
|
106
|
-
|
|
107
|
-
If `spec.md` exists, cross-check `generate_locators` labels against spec sections (fields in spec but
|
|
108
|
-
not on screen, and vice-versa). Report; do **not** auto-edit `spec.md`.
|
|
109
|
-
|
|
110
|
-
### 8. End the session
|
|
111
|
-
|
|
112
|
-
`appium_session_management` `action=delete` to free the device. Always clean up.
|
|
113
|
-
|
|
114
|
-
### 9. Report back
|
|
115
|
-
|
|
116
|
-
> Captured mobile screen `<appPackage>`:
|
|
117
|
-
> - Reached via: <N nav steps replayed from the Background recipe, or "launcher screen — no nav">
|
|
118
|
-
> - Locators: <N> interactable elements (M with accessibility-id)
|
|
119
|
-
> - Screenshot: `requirements/ui/mobile-<timestamp>.png`
|
|
120
|
-
> - Discrepancies vs spec: <count, or "none">
|
|
121
|
-
> - Discovered nav steps (only if the recipe was empty): <the taps you took, for create-test/add-screen to write into the Background>
|
|
122
|
-
|
|
123
|
-
Hand back to the calling command.
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## Cross-platform discovery (`@platform:mobile` — explore one OS, layer the rest)
|
|
128
|
-
|
|
129
|
-
When the screen is **`@platform:mobile`** (write-once-run-both), discover the **shared** cases first,
|
|
130
|
-
then peel off only what is genuinely OS-specific. You do **not** need to explore both OSes up front —
|
|
131
|
-
Flutter/RN expose the same Semantics on each, so one exploration covers most of it.
|
|
132
|
-
|
|
133
|
-
1. **Explore whichever OS has a device up** (Android or iOS — symmetric for Flutter). Capture the tree.
|
|
134
|
-
2. **Classify each component** into THREE buckets (not two):
|
|
135
|
-
- **Shared-exact** → a stable `accessibility id` equal on both OSes (Flutter Semantics → same value on
|
|
136
|
-
Android `content-desc` AND iOS `name`) → flat `type: accessibility-id` key in `<screen>.feature`.
|
|
137
|
-
- **Shared-variant** → SAME step/assertion on both OSes but the LOCATOR differs (composite
|
|
138
|
-
`content-desc` vs `-ios predicate`; partial/dynamic text via `descriptionContains` vs predicate
|
|
139
|
-
`CONTAINS`; a different attribute) → STILL `<screen>.feature`, with `android:`/`ios:` variant keys in
|
|
140
|
-
selectors.yaml. **A native locator alone is NOT a reason to split** — default for composite/partial text.
|
|
141
|
-
- **Sub-feature** → ONLY for genuine SCENARIO divergence: an element on ONE OS only, divergent
|
|
142
|
-
steps/flow, an OS-exclusive gesture/permission/dialog flow, or a case needing a per-platform
|
|
143
|
-
`nth`/`scope` (a variant can't diverge those). → `<screen>-android.feature` / `<screen>-ios.feature`.
|
|
144
|
-
3. **Report the classification** so create-test/run-test scaffolds the right thing:
|
|
145
|
-
- `<screen>.feature` `@platform:mobile` ← shared-exact AND shared-variant (the vast majority)
|
|
146
|
-
- `<screen>-android.feature` `@platform:android` ← ONLY scenario-divergent Android cases
|
|
147
|
-
- `<screen>-ios.feature` `@platform:ios` ← ONLY scenario-divergent iOS cases
|
|
148
|
-
4. **Verifying the other OS needs no second exploration** — just running the shared spec there
|
|
149
|
-
(`MOBILE_PLATFORM=both`) IS the check. Re-capture on the 2nd OS only for components that fail, and
|
|
150
|
-
move those into that OS's sub-feature. (Asking devs to add a Semantics label to an unlabeled element
|
|
151
|
-
converts an OS-specific case back into a shared one — prefer that when feasible.)
|
|
152
|
-
|
|
153
|
-
## Selector-quality notes (carry into selectors.yaml)
|
|
154
|
-
|
|
155
|
-
- **Prefer `accessibility id`** (Android `content-desc` / iOS `accessibilityIdentifier`) — most stable.
|
|
156
|
-
- For **Flutter**, the Semantics label surfaces as `content-desc` ⇒ it usually equals the **visible
|
|
157
|
-
text**, so it is **locale-dependent** ("Good afternoon!", "English"). Keep such values in test-data
|
|
158
|
-
and use `{{variable}}` + locale overlays (see `sungen-locale`).
|
|
159
|
-
- **Composite nodes**: cards may concatenate child text into one `content-desc` with `\n` → prefer an
|
|
160
|
-
xpath `contains(@content-desc,'…')` on a distinctive substring.
|
|
161
|
-
- **Duplicate labels** → use `nth`. **Unlabelled controls** (search fields, icon buttons) → fall back
|
|
162
|
-
to `xpath` / class.
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## What this skill does NOT do
|
|
167
|
-
|
|
168
|
-
- Does not run tests or generate `selectors.yaml` (that's `/sungen:run-test` + `sungen-selector-fix-mobile`)
|
|
169
|
-
- Does not generate Gherkin (that's `sungen-tc-generation`) — it may *report* discovered nav steps,
|
|
170
|
-
but writing them into the Background is create-test/add-screen's job
|
|
171
|
-
- Does not handle login/auth state (mobile auth is a separate concern — deep link / test build)
|
|
172
|
-
- Captures **the feature's target screen** per invocation — reached by replaying the Background
|
|
173
|
-
navigation recipe (step 4.5), not just the launcher. For a *different* screen, give it its own
|
|
174
|
-
feature + recipe and re-invoke.
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## Relationship to other capture skills
|
|
179
|
-
|
|
180
|
-
- `sungen-capture-figma` / `sungen-capture-local` — design/image sources (platform-agnostic)
|
|
181
|
-
- `sungen-capture-live` — web (Playwright MCP)
|
|
182
|
-
- `sungen-capture-mobile` — this skill, mobile (Appium MCP)
|
|
183
|
-
|
|
184
|
-
All write to `requirements/ui/` and report back to the caller.
|
package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-mcp.md
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Capture mode: figma-mcp
|
|
2
|
-
|
|
3
|
-
Pull **structured design data** (layout, typography, colors, component tree, design tokens) and a **PNG screenshot** from a Figma frame URL via the **Figma Dev Mode MCP**, so `sungen-tc-generation` can author Gherkin + test-data before a live domain exists. Use when the project is pre-launch or Figma is the source of truth and the live build lags the design.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- **Figma MCP server** (`https://mcp.figma.com/mcp`, HTTP transport) connected in `.mcp.json` — `sungen init` scaffolds this. On first use, Claude Code opens a browser for Figma OAuth. Official tools: `get_design_context`, `get_variable_defs`, `get_screenshot`.
|
|
8
|
-
- Figma account signed in with access to the file. **Dev/Full seats** get per-minute rate limits; **Starter/View seats** get monthly tool-call limits.
|
|
9
|
-
- A Figma URL with both **fileKey** and **nodeId**.
|
|
10
|
-
|
|
11
|
-
If the MCP is not connected, **do not fail silently** — tell the user:
|
|
12
|
-
> "Figma MCP not detected. Run `sungen init` to scaffold the config, or manually add `figma` with `url: https://mcp.figma.com/mcp` to `.mcp.json`. Then sign in when Claude Code prompts."
|
|
13
|
-
|
|
14
|
-
Then stop.
|
|
15
|
-
|
|
16
|
-
## Steps
|
|
17
|
-
|
|
18
|
-
### 1. Resolve Figma URL
|
|
19
|
-
|
|
20
|
-
Prefer in this order:
|
|
21
|
-
1. `Figma URL` field in `requirements/spec.md` (Overview section)
|
|
22
|
-
2. If empty/missing → `AskUserQuestion`: *"Paste the Figma frame URL"* (free text)
|
|
23
|
-
|
|
24
|
-
Accept any of these shapes:
|
|
25
|
-
```
|
|
26
|
-
https://www.figma.com/file/<fileKey>/<title>?node-id=<nodeId>
|
|
27
|
-
https://www.figma.com/design/<fileKey>/<title>?node-id=<nodeId>
|
|
28
|
-
https://www.figma.com/proto/<fileKey>/<title>?node-id=<nodeId>
|
|
29
|
-
```
|
|
30
|
-
Parse: `fileKey` = segment after `/file/`, `/design/`, or `/proto/`; `nodeId` = the `node-id` query param (pass `-` or `:` through as-is). If `node-id` is missing, ask the user to select a frame in Figma and copy the **frame URL** (not the file root).
|
|
31
|
-
|
|
32
|
-
### 2. Fetch design context
|
|
33
|
-
|
|
34
|
-
Call **both** in parallel:
|
|
35
|
-
```
|
|
36
|
-
get_design_context({ fileKey, nodeId })
|
|
37
|
-
get_variable_defs({ fileKey, nodeId })
|
|
38
|
-
```
|
|
39
|
-
`get_design_context` → layout, typography, colors, component structure, spacing. `get_variable_defs` → named design tokens.
|
|
40
|
-
|
|
41
|
-
### 3. Fetch screenshot
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
get_screenshot({ fileKey, nodeId })
|
|
45
|
-
```
|
|
46
|
-
Save the PNG to `requirements/ui/figma-<sanitized-nodeId>.png` (replace `:` and `-` with `_`, e.g. `42-15` → `figma-42_15.png`).
|
|
47
|
-
|
|
48
|
-
### 4. Write metadata dump
|
|
49
|
-
|
|
50
|
-
Combine design context + variables into `requirements/ui/figma-meta.md`:
|
|
51
|
-
```markdown
|
|
52
|
-
# Figma Capture — <nodeId>
|
|
53
|
-
**Source:** <full Figma URL>
|
|
54
|
-
**Captured:** <ISO date>
|
|
55
|
-
## Components
|
|
56
|
-
<component names + variants>
|
|
57
|
-
## Typography
|
|
58
|
-
<font families, sizes, weights, line heights>
|
|
59
|
-
## Colors
|
|
60
|
-
<color tokens + raw hex>
|
|
61
|
-
## Spacing & Layout
|
|
62
|
-
<spacing tokens, auto-layout specs>
|
|
63
|
-
## Text Content
|
|
64
|
-
<visible text strings — used by tc-generation to populate test-data>
|
|
65
|
-
```
|
|
66
|
-
Consumed by `sungen-tc-generation` as a secondary source alongside `spec.md`.
|
|
67
|
-
|
|
68
|
-
### 5. Report back
|
|
69
|
-
|
|
70
|
-
> Captured Figma frame `<nodeId>`: Components N · Text strings M · Design tokens K · Screenshot `requirements/ui/figma-<nodeId>.png` · Metadata `requirements/ui/figma-meta.md`
|
|
71
|
-
|
|
72
|
-
Then hand back to the calling command.
|
|
73
|
-
|
|
74
|
-
## Error handling
|
|
75
|
-
|
|
76
|
-
| Error | Action |
|
|
77
|
-
|---|---|
|
|
78
|
-
| MCP tool not available | Print setup instructions, stop, do not fall back silently |
|
|
79
|
-
| `fileKey` missing from URL | Ask user to paste a valid frame URL |
|
|
80
|
-
| `nodeId` missing from URL | Ask user to right-click a frame in Figma → *Copy link to selection* |
|
|
81
|
-
| `get_design_context` 403 | Ask user to check Dev Mode seat on that file |
|
|
82
|
-
| `get_screenshot` returns no image | Continue with metadata only; warn no PNG was captured |
|
package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-pat.md
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
# Capture mode: figma-pat
|
|
2
|
-
|
|
3
|
-
Figma URL → `spec_figma.md` envelope + LLM-synthesized narrative from cached raw node JSON. This mode is the active one when any of these is true: a sungen command was invoked with `--figma`, `requirements/spec_figma.md` exists, or the user says "generate from Figma".
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- [ ] `sungen figma auth check` succeeds — PAT is stored and valid
|
|
8
|
-
- [ ] Figma file URL is available (shared file or frame link)
|
|
9
|
-
- [ ] If auth missing → run `sungen figma auth set` and follow the walkthrough
|
|
10
|
-
|
|
11
|
-
**Never paste the PAT into any transcript, spec file, or commit.**
|
|
12
|
-
|
|
13
|
-
## Two-Layer Architecture
|
|
14
|
-
|
|
15
|
-
`spec_figma.md` has two layers separated by the `<!-- SYNTHESIS-BELOW -->` marker:
|
|
16
|
-
|
|
17
|
-
| Layer | Producer | Overwrite Rule |
|
|
18
|
-
|---|---|---|
|
|
19
|
-
| **Envelope** (above marker) | sungen CLI | Regenerated each `sungen figma` run — deterministic |
|
|
20
|
-
| **Narrative** (below marker) | This mode (LLM) | Replaced on re-synthesis — everything from marker to EOF |
|
|
21
|
-
|
|
22
|
-
The envelope contains: YAML frontmatter, Frame metadata, Screenshots. The narrative is synthesized by YOU from the cached raw Figma node JSON.
|
|
23
|
-
|
|
24
|
-
## Inputs You Read
|
|
25
|
-
|
|
26
|
-
The scaffolder persists a raw (unfiltered) Figma node tree to:
|
|
27
|
-
```
|
|
28
|
-
.sungen/figma-cache/<fileKey>/<versionId>/<nodeId>-raw.json
|
|
29
|
-
```
|
|
30
|
-
Read this file + the envelope frontmatter of `requirements/spec_figma.md` + any PNGs under `requirements/ui/`. You MUST NOT call the Figma REST API directly — the PAT is not available to you.
|
|
31
|
-
|
|
32
|
-
## Synthesis Task
|
|
33
|
-
|
|
34
|
-
Append 7 narrative sections below `<!-- SYNTHESIS-BELOW -->`. Each is inferred from the raw node tree (names, types, `characters`, layout bounds, auto-layout direction, componentProperties):
|
|
35
|
-
|
|
36
|
-
### 1. Purpose
|
|
37
|
-
One paragraph. What screen is this? Primary user goal? Infer from frame name + top-level text + dominant CTA.
|
|
38
|
-
|
|
39
|
-
### 2. ASCII Layout
|
|
40
|
-
Rough spatial sketch using box characters. Reflect top-bottom / left-right ordering from absoluteBoundingBox. Keep under ~20 lines:
|
|
41
|
-
```
|
|
42
|
-
┌──────────────────────────────────────┐
|
|
43
|
-
│ [Logo] [Sign In] │
|
|
44
|
-
├──────────────────────────────────────┤
|
|
45
|
-
│ Welcome back │
|
|
46
|
-
│ ┌────────────────────────────────┐ │
|
|
47
|
-
│ │ email@example.com │ │
|
|
48
|
-
│ └────────────────────────────────┘ │
|
|
49
|
-
│ [ Continue ] │
|
|
50
|
-
└──────────────────────────────────────┘
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 3. Regions
|
|
54
|
-
Bulleted list of major layout regions (header, sidebar, main, footer, modal…) with a one-line purpose each. Use auto-layout frames as region hints.
|
|
55
|
-
|
|
56
|
-
### 4. Actions
|
|
57
|
-
Every interactive element the user can trigger (button, link, icon-button, menu-item, toggle…):
|
|
58
|
-
```
|
|
59
|
-
- **<Action name>** — <what it does> (source: <node name>)
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 5. Form Fields
|
|
63
|
-
Every input. Include label, type (text/email/password/select/checkbox/radio/textarea/date), required hint if inferable, placeholder:
|
|
64
|
-
```
|
|
65
|
-
| Label | Type | Required | Placeholder |
|
|
66
|
-
|---|---|---|---|
|
|
67
|
-
```
|
|
68
|
-
Omit (write `_none_`) if no inputs exist.
|
|
69
|
-
|
|
70
|
-
### 6. Data Columns
|
|
71
|
-
If the screen shows a table/list/card grid — enumerate the columns/fields per row. Otherwise `_none_`.
|
|
72
|
-
|
|
73
|
-
### 7. Navigation
|
|
74
|
-
Outgoing links, tab bars, breadcrumbs, back buttons — anything that moves to another screen. Include explicit nav components and implicit CTAs that navigate.
|
|
75
|
-
|
|
76
|
-
## Synthesis Workflow
|
|
77
|
-
|
|
78
|
-
1. Read `requirements/spec_figma.md` — note `file_key`, `node_id`, `figma_version_id` from frontmatter
|
|
79
|
-
2. Read `.sungen/figma-cache/<file_key>/<figma_version_id>/<safe_node_id>-raw.json` (colons in node_id become underscores)
|
|
80
|
-
3. Traverse the tree. Collect names, types, `characters`, `componentProperties`, `absoluteBoundingBox`
|
|
81
|
-
4. Produce the 7 sections above
|
|
82
|
-
5. **Locate the insertion point** in `spec_figma.md`:
|
|
83
|
-
- **If `<!-- SYNTHESIS-BELOW -->` is present** → replace everything from the marker (inclusive) to EOF with: the marker line, a blank line, then the 7 sections.
|
|
84
|
-
- **If the marker is NOT present** (older file or hand-edited) → locate the last non-empty line of the envelope (usually the end of `## Screenshots`), append a blank line, then the marker, another blank line, then the 7 sections. Do NOT delete any envelope content.
|
|
85
|
-
- **If the file is missing entirely** → advise the user to re-run `sungen add --screen <screen> --figma <url> --refresh` to regenerate the envelope first. Do not fabricate one.
|
|
86
|
-
6. Preserve the envelope (frontmatter + Frame + Screenshots) byte-for-byte. Never touch content above the marker.
|
|
87
|
-
|
|
88
|
-
## Re-synthesis
|
|
89
|
-
|
|
90
|
-
- If the envelope's `figma_version_id` changed → envelope is fresh; re-run synthesis
|
|
91
|
-
- If only the narrative is stale → truncate from marker to EOF and regenerate
|
|
92
|
-
- Never edit content ABOVE the marker — that is the scaffolder's territory
|
|
93
|
-
|
|
94
|
-
## Selector Heuristics (for downstream `run-test`)
|
|
95
|
-
|
|
96
|
-
During `run-test` Phase 0, provisional selectors can be seeded from the raw JSON:
|
|
97
|
-
|
|
98
|
-
| Figma Signal | Provisional YAML Entry |
|
|
99
|
-
|---|---|
|
|
100
|
-
| Node name ends `Button`, has text | `role: button` + `name: "<text>"` |
|
|
101
|
-
| Node name ends `Input`/`Field` | `placeholder: "<placeholder text>"` |
|
|
102
|
-
| Node name ends `Link`, has text | `role: link` + `name: "<text>"` |
|
|
103
|
-
| componentProperties has `data-testid` | `testid: <value>` |
|
|
104
|
-
| Plain text leaf (outside interactive) | `text: "<content>"` |
|
|
105
|
-
| Node name ends `Icon` | `role: img` + `name: "<accessible name>"` |
|
|
106
|
-
|
|
107
|
-
Every provisional entry MUST carry:
|
|
108
|
-
```
|
|
109
|
-
# @needs-live-verify source=figma node_id=<id>
|
|
110
|
-
```
|
|
111
|
-
Provisional selectors feed `selectors.yaml` as candidates. `run-test` Phase 0 verifies them against the live page and overwrites incorrect entries.
|
|
112
|
-
|
|
113
|
-
## Security
|
|
114
|
-
|
|
115
|
-
- Never include the PAT in `spec_figma.md`, selectors, test data, or any committed file
|
|
116
|
-
- Never log or echo the PAT in terminal output
|
|
117
|
-
- Read only from `.sungen/figma-cache/` and screen directories — never from `.env`
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Capture mode: live
|
|
2
|
-
|
|
3
|
-
Navigate a running application, take **one accessibility snapshot** and **one screenshot**, and save them as visual context for test generation. Use when the app is live (dev, staging, or production with read-only access) and you want tests grounded in the actual rendered UI. Handles auth gracefully: if the page redirects to login, ask the user to sign in manually rather than injecting cookies.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- Playwright MCP connected.
|
|
8
|
-
- Dev/staging server reachable (or a public URL).
|
|
9
|
-
- `playwright.config.ts` exists at the project root (for `baseURL` fallback).
|
|
10
|
-
|
|
11
|
-
## Steps
|
|
12
|
-
|
|
13
|
-
### 1. Resolve target URL
|
|
14
|
-
|
|
15
|
-
1. `Live URL` field in `requirements/spec.md` (Overview section)
|
|
16
|
-
2. `baseURL` from `playwright.config.ts` + `URL Path` from `spec.md`
|
|
17
|
-
3. Neither → `AskUserQuestion`: *"Paste the full URL for the page to scan"*
|
|
18
|
-
|
|
19
|
-
### 2. Navigate
|
|
20
|
-
|
|
21
|
-
`browser_navigate` to the resolved URL.
|
|
22
|
-
|
|
23
|
-
### 3. Handle auth redirect
|
|
24
|
-
|
|
25
|
-
If the page redirects to a login route (URL contains `/login`, `/signin`, `/auth`, or content indicates a login screen):
|
|
26
|
-
1. Tell the user which login URL they landed on.
|
|
27
|
-
2. `AskUserQuestion`:
|
|
28
|
-
- **I'll log in manually** — wait for confirmation, then re-navigate to the target URL
|
|
29
|
-
- **Skip live scan** — switch to mode `local`
|
|
30
|
-
- **Cancel**
|
|
31
|
-
3. **Never** inject cookies or localStorage via `browser_evaluate` / `browser_run_code`. Auth belongs to the user.
|
|
32
|
-
|
|
33
|
-
### 4. Snapshot
|
|
34
|
-
|
|
35
|
-
Take **ONE** `browser_snapshot`. This accessibility tree is the primary AI context — roles, names, text, structure that tc-generation uses to identify sections and fields.
|
|
36
|
-
|
|
37
|
-
### 5. Screenshot (recommended)
|
|
38
|
-
|
|
39
|
-
Take **ONE** `browser_take_screenshot` with `fullPage: true`. Save to `requirements/ui/live-<timestamp>.png`, where `<timestamp>` is `YYYYMMDD-HHMM` local time (e.g. `live-20260421-1430.png`).
|
|
40
|
-
|
|
41
|
-
### 6a. Verify unauthenticated redirect target (flow capture only)
|
|
42
|
-
|
|
43
|
-
When capturing for a **flow** with security scenarios (e.g. "unauthenticated user cannot access X"):
|
|
44
|
-
1. Open a **fresh incognito/unauthenticated** context (no storage state).
|
|
45
|
-
2. `browser_navigate` to the protected route.
|
|
46
|
-
3. Record the **actual redirect URL** — do NOT assume `/login`; it may be `/register`, `/`, etc.
|
|
47
|
-
4. Report the redirect target: *"Unauthenticated access to `/dashboard` redirects to `/register`"*.
|
|
48
|
-
5. The caller must use the **actual redirect URL** in Gherkin assertions, never an assumed one.
|
|
49
|
-
|
|
50
|
-
Skip if the flow has no security scenarios or the user says to skip.
|
|
51
|
-
|
|
52
|
-
### 6. Detect discrepancies vs spec
|
|
53
|
-
|
|
54
|
-
If `spec.md` exists, cross-check the snapshot against spec sections: fields in spec but not in snapshot → *missing in UI*; elements in snapshot but not in spec → *missing in spec*. Report findings but **do not** auto-edit `spec.md`.
|
|
55
|
-
|
|
56
|
-
### 7. Report back
|
|
57
|
-
|
|
58
|
-
> Captured live page `<URL>`: Snapshot N interactive elements · Screenshot `requirements/ui/live-<timestamp>.png` · Discrepancies vs spec: <count or "none">
|
|
59
|
-
|
|
60
|
-
Hand back to the calling command. Scans **exactly one** page per invocation.
|
package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-local.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Capture mode: local
|
|
2
|
-
|
|
3
|
-
Use **pre-existing images** in `requirements/ui/` as visual context. No network, no MCP, no live site — works for any design tool (Figma export, Sketch, Penpot, Zeplin, hand-drawn, staging screenshots). This is the **baseline fallback**: if the live domain is down and Figma MCP isn't configured, this always works as long as the user drops images in the folder.
|
|
4
|
-
|
|
5
|
-
## Steps
|
|
6
|
-
|
|
7
|
-
### 1. List available images
|
|
8
|
-
|
|
9
|
-
Glob `requirements/ui/*.{png,jpg,jpeg,webp,gif}` and report count + filenames. Filter out metadata files (e.g. `figma-meta.md` written by mode figma-mcp) — those are read by `tc-generation` separately, not treated as images here.
|
|
10
|
-
|
|
11
|
-
### 2. Handle empty folder
|
|
12
|
-
|
|
13
|
-
If no images found:
|
|
14
|
-
1. Tell the user the folder is empty, with the full path so they can open it in Finder.
|
|
15
|
-
2. `AskUserQuestion`:
|
|
16
|
-
- **I'll drop images now** — wait for confirmation, then re-glob
|
|
17
|
-
- **Switch to Figma** — switch to mode `figma-mcp`
|
|
18
|
-
- **Switch to live page scan** — switch to mode `live`
|
|
19
|
-
- **Cancel** — abort create-test
|
|
20
|
-
3. If "drop images now", wait for confirmation (e.g. "done") then re-run step 1.
|
|
21
|
-
|
|
22
|
-
### 3. Read images for context
|
|
23
|
-
|
|
24
|
-
Use the `Read` tool on each image — Claude Code reads PNG/JPG/WebP directly as visual context. For large sets (>10 images), ask which are primary and which are states/variants to avoid loading too much at once.
|
|
25
|
-
|
|
26
|
-
### 4. Summarize
|
|
27
|
-
|
|
28
|
-
> Loaded N image(s) from `requirements/ui/`:
|
|
29
|
-
> - `<filename-1>` — <one-line description of what's visible>
|
|
30
|
-
> - `<filename-2>` — <one-line description>
|
|
31
|
-
|
|
32
|
-
Hand back to the calling command.
|
|
33
|
-
|
|
34
|
-
## File naming hints for users
|
|
35
|
-
|
|
36
|
-
Nudge users toward consistent filenames (don't enforce):
|
|
37
|
-
- `<section>-default.png` / `-error.png` / `-loading.png` / `-empty.png` — section states
|
|
38
|
-
- `full-page.png` / `viewport.png` — whole screen (auto-generated by `sungen add --capture`)
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sungen-capture
|
|
3
|
-
description: 'Acquire visual/design context for test generation from one of four sources (modes): figma-mcp, figma-pat, live, local. Auto-loaded by create-test/add-screen when a visual source is needed, or when --figma flag / spec_figma.md is present. Router skill — read only the mode file you need.'
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Bring **visual + design context** into test generation so `sungen-tc-generation` can author Gherkin + test-data grounded in the real UI. This is a **router**: pick exactly **one mode** for the run, then read only that mode's file. Do **not** read all four.
|
|
10
|
-
|
|
11
|
-
This skill never generates Gherkin or `selectors.yaml` — it only acquires context and reports back to the calling command.
|
|
12
|
-
|
|
13
|
-
## Pick the mode
|
|
14
|
-
|
|
15
|
-
| Mode | Read | Use when | Needs |
|
|
16
|
-
|---|---|---|---|
|
|
17
|
-
| **figma-mcp** | `mode-figma-mcp.md` | Pre-launch / Figma is source of truth, **Figma Dev Mode MCP** connected | Figma MCP + frame URL |
|
|
18
|
-
| **figma-pat** | `mode-figma-pat.md` | `--figma` flag was used, or `requirements/spec_figma.md` exists (synthesize narrative from cached raw node JSON) | `sungen figma auth` PAT |
|
|
19
|
-
| **live** | `mode-live.md` | App is running (dev/staging/prod read-only) and you want the actual rendered UI | Playwright MCP + reachable URL |
|
|
20
|
-
| **local** | `mode-local.md` | Images already dropped in `requirements/ui/` (any design tool, screenshots, mockups) — baseline fallback, no network | nothing |
|
|
21
|
-
|
|
22
|
-
### How the mode is chosen (when the caller didn't specify)
|
|
23
|
-
|
|
24
|
-
1. `requirements/spec_figma.md` exists → **figma-pat** (PAT flow already ran during `add-screen`).
|
|
25
|
-
2. `requirements/ui/` has images → **local**.
|
|
26
|
-
3. Neither → ask the user which source (figma-mcp / live / local), then load that one mode file.
|
|
27
|
-
|
|
28
|
-
Modes are **mutually exclusive per run**, but the user can run `create-test` again with a different mode to layer context. All modes write to `requirements/ui/` and report back.
|
|
29
|
-
|
|
30
|
-
## What this skill (any mode) does NOT do
|
|
31
|
-
|
|
32
|
-
- Does not generate Gherkin — that's `sungen-tc-generation`.
|
|
33
|
-
- Does not write `selectors.yaml` — that's `/sungen:run-test`.
|
|
34
|
-
- Does not inject auth/cookies — the user logs in manually (see `live`).
|
|
35
|
-
- Does not crawl or generate images.
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sungen-dashboard
|
|
3
|
-
description: 'Build a single-file HTML dashboard summarising test cases & Playwright results. Auto-loaded by /sungen:dashboard.'
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Generate `qa/dashboard/index.html` — a single-file, share-ready test report covering all (or selected) screens and flows. The HTML embeds the snapshot data inline, so it can be emailed, Slacked, or committed and opened by anyone via `file://` without any server.
|
|
10
|
-
|
|
11
|
-
**This skill delegates all heavy work to the `sungen dashboard` CLI.** The CLI is the source of truth for parsing logic — do NOT re-parse files in AI. Your role is only to:
|
|
12
|
-
|
|
13
|
-
1. Invoke the CLI.
|
|
14
|
-
2. Show its output verbatim.
|
|
15
|
-
3. Help the user decide next actions.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Architecture
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
User → /sungen:dashboard [screen...]
|
|
23
|
-
│
|
|
24
|
-
▼
|
|
25
|
-
sungen dashboard CLI (deterministic — no AI tokens)
|
|
26
|
-
├─ Discovery: qa/screens/* + qa/flows/*
|
|
27
|
-
├─ Reuse delivery parsers (.feature, .spec.ts, test-data.yaml, results.json)
|
|
28
|
-
├─ Build DashboardSnapshot JSON
|
|
29
|
-
├─ Write qa/dashboard/history/<runId>.json (max 20 retained, oldest pruned)
|
|
30
|
-
├─ Inject payload into pre-built HTML template
|
|
31
|
-
└─ Write qa/dashboard/index.html (~1MB, fully self-contained)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Source modules: `src/dashboard/*.ts` + `src/exporters/json-exporter.ts`.
|
|
35
|
-
UI source: `dashboard/` (built once, ships in npm package as `dist/dashboard/templates/index.html`).
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Required sources (CLI tolerates missing files)
|
|
40
|
-
|
|
41
|
-
| # | Source | Path | Required? |
|
|
42
|
-
|---|--------|------|-----------|
|
|
43
|
-
| 1 | Feature file | `qa/screens/<name>/features/<name>.feature` (or `qa/flows/...`) | Yes — screens without a feature are skipped |
|
|
44
|
-
| 2 | Test data | `qa/screens/<name>/test-data/<name>.yaml` | Optional — `{{vars}}` fall back to literal |
|
|
45
|
-
| 3 | Compiled spec | `specs/generated/<name>/<name>.spec.ts` | Optional — flagged as "Not compiled" if missing |
|
|
46
|
-
| 4 | Test results | `specs/generated/<name>/<name>-test-result.json` (or `test-results/results.json`) | Optional — TCs show as "Pending" if missing |
|
|
47
|
-
|
|
48
|
-
Unlike `sungen delivery`, the dashboard CLI is **forgiving** — it always renders whatever data is available. Pre-flight is implicit, not blocking.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Output structure
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
qa/dashboard/
|
|
56
|
-
├── index.html # share-ready single-file report
|
|
57
|
-
└── history/
|
|
58
|
-
├── 2026-04-26T...Z.json # past snapshots, oldest → newest
|
|
59
|
-
├── 2026-04-27T...Z.json
|
|
60
|
-
└── … # max 20, older pruned automatically
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Both should be committed to git so collaborators see the same trend lines.
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Dashboard views
|
|
68
|
-
|
|
69
|
-
| View | What it shows |
|
|
70
|
-
|------|---------------|
|
|
71
|
-
| **Overview** | Stat cards (total/passed/failed/pending), pass-rate donut, priority bar chart, trend mini-chart, per-screen progress bars |
|
|
72
|
-
| **Suites** | Tree: screen → scenarios; filter by search/status/priority; click → detail modal with steps, expected, error, trace |
|
|
73
|
-
| **Trends** | Pass-rate line chart + stacked status bars across all retained runs (requires ≥2 runs) |
|
|
74
|
-
| **Compare** | Pick base/head run; per-screen Δ table; lists of newly passing/failing/added/removed/changed tests |
|
|
75
|
-
| **Export** | Browser-side CSV / XLSX download. One-button generation, no server. Same column layout as `sungen delivery` |
|
|
76
|
-
|
|
77
|
-
Trends + Compare are disabled in the sidebar until at least 2 runs exist in history.
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## CLI command reference
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
# All screens + flows
|
|
85
|
-
sungen dashboard
|
|
86
|
-
|
|
87
|
-
# Specific targets
|
|
88
|
-
sungen dashboard kudos awards flow/checkout
|
|
89
|
-
|
|
90
|
-
# Skip history persistence (one-off / CI ephemeral)
|
|
91
|
-
sungen dashboard --no-history
|
|
92
|
-
|
|
93
|
-
# Cap retained history (default: 20)
|
|
94
|
-
sungen dashboard --max-history 50
|
|
95
|
-
|
|
96
|
-
# Auto-open in default browser
|
|
97
|
-
sungen dashboard --open
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Skill responsibilities (when invoked from /sungen:dashboard)
|
|
103
|
-
|
|
104
|
-
1. **Run the CLI** with whatever arguments came from `$ARGUMENTS`.
|
|
105
|
-
2. **Show the CLI output verbatim** — do not summarize, paraphrase, or omit warnings.
|
|
106
|
-
3. **Offer next-step options via `AskUserQuestion`** based on what just happened:
|
|
107
|
-
- On success → open dashboard, share file, run more tests, build for another screen, done.
|
|
108
|
-
- On error → diagnose from the error message; common causes are missing `qa/` directories or no targets.
|
|
109
|
-
4. **Do NOT** parse `.feature`, `.spec.ts`, or results files yourself — that is the CLI's job.
|
|
110
|
-
5. **Do NOT** touch files under `qa/dashboard/` directly — only the CLI writes there.
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Sharing the dashboard
|
|
115
|
-
|
|
116
|
-
The HTML is self-contained:
|
|
117
|
-
- No CDN or external font — system font stack only.
|
|
118
|
-
- All JS, CSS, charts, and the SheetJS library are inlined.
|
|
119
|
-
- The snapshot payload sits in `<script id="__SUNGEN_DASHBOARD__" type="application/json">…</script>`.
|
|
120
|
-
|
|
121
|
-
Acceptable sharing: email, Slack upload, S3 bucket, committed in git. The recipient opens it directly, no install required. ~1MB on disk, ~300KB gzipped over the wire.
|