@sun-asterisk/sungen 3.2.2-beta.9 → 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/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.map +1 -1
- package/dist/cli/commands/journey.js +24 -2
- package/dist/cli/commands/journey.js.map +1 -1
- 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/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 +37 -1
- package/dist/harness/journey.d.ts.map +1 -1
- package/dist/harness/journey.js +146 -19
- package/dist/harness/journey.js.map +1 -1
- 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 -5
- 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/dist/orchestrator/templates/{ai-instructions/claude-cmd-run-test.md → ai-src/commands/run-test.md} +116 -8
- 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} +31 -10
- 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/{src/orchestrator/templates/ai-instructions/claude-skill-selector-fix-mobile.md → dist/orchestrator/templates/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/generate.ts +2 -1
- package/src/cli/commands/init.ts +50 -3
- package/src/cli/commands/journey.ts +20 -3
- package/src/cli/commands/update.ts +14 -4
- 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 +167 -19
- 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 -5
- 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/src/orchestrator/templates/{ai-instructions/claude-cmd-run-test.md → ai-src/commands/run-test.md} +116 -8
- 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} +31 -10
- 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/{dist/orchestrator/templates/ai-instructions/claude-skill-selector-fix-mobile.md → src/orchestrator/templates/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 -94
- 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 -158
- 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 -176
- 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 -94
- 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 -158
- 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 -176
- 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
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import * as fs from 'fs';
|
|
7
7
|
import * as path from 'path';
|
|
8
8
|
import { chromium } from '@playwright/test';
|
|
9
|
+
import { readCapabilities } from '../harness/capability';
|
|
9
10
|
|
|
10
11
|
export interface ScreenOptions {
|
|
11
12
|
name: string;
|
|
@@ -13,6 +14,20 @@ export interface ScreenOptions {
|
|
|
13
14
|
capture?: boolean;
|
|
14
15
|
feature?: string;
|
|
15
16
|
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional per-OS tag emitter: 'android' | 'ios'. When set, the feature stub
|
|
19
|
+
* gets @platform:android or @platform:ios for OS-specific screens. Does NOT
|
|
20
|
+
* affect directory routing (always qa/screens/). Mobile project is detected via
|
|
21
|
+
* qa/capabilities.yaml, not this flag.
|
|
22
|
+
*/
|
|
23
|
+
platform?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Mobile navigation recipe (the in-app web-path analog). A `>`-separated list of nav steps
|
|
26
|
+
* that take the app from launch to THIS screen, e.g. "tap [My Page] tab > tap [Settings] row".
|
|
27
|
+
* Scaffolded into the feature's Background after the `Given User is on [Home] screen` anchor.
|
|
28
|
+
* Mobile-only; ignored (with a warning) for web projects. Omit when this IS the launcher screen.
|
|
29
|
+
*/
|
|
30
|
+
reach?: string;
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
export class ScreenManager {
|
|
@@ -31,15 +46,31 @@ export class ScreenManager {
|
|
|
31
46
|
// Validate screen name
|
|
32
47
|
this.validateScreenName(options.name);
|
|
33
48
|
|
|
49
|
+
// Detect project platform from qa/capabilities.yaml (single source of truth)
|
|
50
|
+
const caps = readCapabilities(this.cwd);
|
|
51
|
+
const isMobile = caps.platform === 'mobile';
|
|
52
|
+
|
|
53
|
+
// --reach is mobile-only; warn and drop when the project is web
|
|
54
|
+
if (options.reach && !isMobile) {
|
|
55
|
+
console.warn(
|
|
56
|
+
`Warning: --reach is a mobile navigation recipe and is ignored for web projects ` +
|
|
57
|
+
`(web screens are addressed by their --path URL). Dropping it.`
|
|
58
|
+
);
|
|
59
|
+
options = { ...options, reach: undefined };
|
|
60
|
+
}
|
|
61
|
+
|
|
34
62
|
// Normalize screen name for directory
|
|
35
63
|
const screenName = this.normalizeScreenName(options.name);
|
|
64
|
+
// Always use qa/screens/ regardless of platform (1-platform model — no qa/mobile/ tree)
|
|
36
65
|
const screenDir = path.join(this.screensDir, screenName);
|
|
37
66
|
|
|
38
|
-
// Derive filename: --feature flag creates "<screen>-<feature>" name
|
|
67
|
+
// Derive filename: --feature flag creates "<screen>-<feature>" name.
|
|
68
|
+
// For mobile, `path` is the app entry (pkg/Activity), NOT a URL — never derive
|
|
69
|
+
// the filename from it; use the screen name instead.
|
|
39
70
|
let filename: string;
|
|
40
71
|
if (options.feature) {
|
|
41
72
|
filename = `${screenName}-${this.normalizeScreenName(options.feature)}`;
|
|
42
|
-
} else if (options.path) {
|
|
73
|
+
} else if (options.path && !isMobile) {
|
|
43
74
|
filename = this.extractFilenameFromPath(options.path);
|
|
44
75
|
} else {
|
|
45
76
|
filename = screenName;
|
|
@@ -92,18 +123,25 @@ export class ScreenManager {
|
|
|
92
123
|
const featureContent = this.generateFeatureTemplate(options, filename);
|
|
93
124
|
fs.writeFileSync(featurePath, featureContent, 'utf-8');
|
|
94
125
|
|
|
95
|
-
// Generate empty selector YAML
|
|
126
|
+
// Generate empty selector YAML. Web gets a `page` entry (the route); mobile
|
|
127
|
+
// selectors come from Appium MCP at run-test, so it's just a header comment.
|
|
96
128
|
if (!fs.existsSync(selectorPath)) {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
129
|
+
const selectorLines = isMobile
|
|
130
|
+
? [
|
|
131
|
+
`# ${options.name} Screen Selectors (mobile)`,
|
|
132
|
+
`# Generated at /sungen:run-test via Appium MCP — accessibility-id preferred.`,
|
|
133
|
+
``,
|
|
134
|
+
]
|
|
135
|
+
: [
|
|
136
|
+
`# ${options.name} Screen Selectors`,
|
|
137
|
+
`# Fill via AI or manually`,
|
|
138
|
+
``,
|
|
139
|
+
`${screenName}:`,
|
|
140
|
+
` type: 'page'`,
|
|
141
|
+
` value: '${options.path || `/${screenName}`}'`,
|
|
142
|
+
``,
|
|
143
|
+
];
|
|
144
|
+
fs.writeFileSync(selectorPath, selectorLines.join('\n'), 'utf-8');
|
|
107
145
|
}
|
|
108
146
|
|
|
109
147
|
// Generate empty test-data YAML
|
|
@@ -186,9 +224,9 @@ export class ScreenManager {
|
|
|
186
224
|
].join('\n'), 'utf-8');
|
|
187
225
|
}
|
|
188
226
|
|
|
189
|
-
// Auto-screenshot: capture page only when --capture is set (requires --path)
|
|
227
|
+
// Auto-screenshot: capture page only when --capture is set and not mobile (requires --path)
|
|
190
228
|
// Use filename (not screenName) so each feature gets its own screenshots
|
|
191
|
-
if (options.capture && options.path) {
|
|
229
|
+
if (options.capture && options.path && !isMobile) {
|
|
192
230
|
await this.captureScreenshot(options.path, requirementsUiDir, filename);
|
|
193
231
|
}
|
|
194
232
|
|
|
@@ -204,12 +242,21 @@ export class ScreenManager {
|
|
|
204
242
|
}
|
|
205
243
|
console.log('');
|
|
206
244
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
245
|
+
if (isMobile) {
|
|
246
|
+
console.log('Next steps:');
|
|
247
|
+
console.log(` 1. Fill requirements/spec.md with screen spec (elements, actions, business rules)`);
|
|
248
|
+
console.log(` Use /sungen:add-screen with sungen-capture-mobile to scan via Appium MCP`);
|
|
249
|
+
console.log(` 2. Generate test cases: /sungen:create-test ${screenName}`);
|
|
250
|
+
console.log(` 3. Compile: sungen generate --screen ${screenName} --framework appium`);
|
|
251
|
+
console.log(` 4. Run: npm run test:mobile\n`);
|
|
252
|
+
} else {
|
|
253
|
+
console.log('Next steps:');
|
|
254
|
+
console.log(` 1. Fill requirements/spec.md with screen spec (fields, validation, business rules)`);
|
|
255
|
+
console.log(` Optionally add UI designs to requirements/ui/ (screenshots, mockups)`);
|
|
256
|
+
console.log(` 2. Generate test cases: /sungen:create-test ${screenName} (or /sungen-create-test)`);
|
|
257
|
+
console.log(` 3. Compile: sungen generate --screen ${screenName}`);
|
|
258
|
+
console.log(` 4. Run: npx playwright test\n`);
|
|
259
|
+
}
|
|
213
260
|
}
|
|
214
261
|
|
|
215
262
|
/**
|
|
@@ -291,6 +338,57 @@ export class ScreenManager {
|
|
|
291
338
|
}
|
|
292
339
|
|
|
293
340
|
private generateSpecTemplate(options: ScreenOptions, screenName: string): string {
|
|
341
|
+
const caps = readCapabilities(this.cwd);
|
|
342
|
+
const isMobile = caps.platform === 'mobile';
|
|
343
|
+
|
|
344
|
+
if (isMobile) {
|
|
345
|
+
const appEntry = options.path || this.readWdioAppEntry() || '<appPackage>';
|
|
346
|
+
return `# ${options.name} Screen Specification
|
|
347
|
+
|
|
348
|
+
## Overview
|
|
349
|
+
- **App Entry:** ${appEntry}
|
|
350
|
+
- **Platform:** mobile (Android + iOS)
|
|
351
|
+
- **Auth Required:** no
|
|
352
|
+
- **Reach:** ${options.reach || '<!-- nav recipe: how to reach this screen from app launch, e.g. "tap [My Page] tab > tap [Settings] row" -->'}
|
|
353
|
+
|
|
354
|
+
## Sections
|
|
355
|
+
|
|
356
|
+
### Section: [Section Name]
|
|
357
|
+
- **Type:** list | card | form | modal | navigation | tab-bar
|
|
358
|
+
- **Description:** [Brief description of this section]
|
|
359
|
+
|
|
360
|
+
#### Elements
|
|
361
|
+
| Element | Type | Identifier | Notes |
|
|
362
|
+
|---------|------|------------|-------|
|
|
363
|
+
| [Element Name] | button | accessibility-id | [tap target, e.g., submits form] |
|
|
364
|
+
|
|
365
|
+
#### Actions
|
|
366
|
+
| Action | Element | Behavior |
|
|
367
|
+
|--------|---------|----------|
|
|
368
|
+
| [Action Name] | button | [What happens on tap] |
|
|
369
|
+
|
|
370
|
+
#### States
|
|
371
|
+
| State | Condition | Visual |
|
|
372
|
+
|-------|-----------|--------|
|
|
373
|
+
| Default | Screen load | [Default appearance] |
|
|
374
|
+
| Loading | After tap | [Loading indicator] |
|
|
375
|
+
| Error | Action fails | [Error appearance] |
|
|
376
|
+
| Success | Action complete | [Success behavior] |
|
|
377
|
+
|
|
378
|
+
## Business Rules
|
|
379
|
+
<!-- Rules that affect test logic: limits, permissions, conditions -->
|
|
380
|
+
- [Rule 1]
|
|
381
|
+
|
|
382
|
+
## Accessibility
|
|
383
|
+
<!-- Accessibility IDs, content-desc, aria-labels -->
|
|
384
|
+
- Accessibility IDs: [element: id]
|
|
385
|
+
|
|
386
|
+
## Notes
|
|
387
|
+
<!-- Edge cases, known issues, environment-specific behavior -->
|
|
388
|
+
- [Note 1]
|
|
389
|
+
`;
|
|
390
|
+
}
|
|
391
|
+
|
|
294
392
|
const pagePath = options.path || `/${screenName}`;
|
|
295
393
|
return `# ${options.name} Screen Specification
|
|
296
394
|
|
|
@@ -348,9 +446,48 @@ export class ScreenManager {
|
|
|
348
446
|
|
|
349
447
|
private generateFeatureTemplate(options: ScreenOptions, filename: string): string {
|
|
350
448
|
const screenName = this.normalizeScreenName(options.name);
|
|
351
|
-
const featurePath = options.path || `/${screenName}`;
|
|
352
449
|
const description = options.description || `interact with the ${options.name} screen`;
|
|
353
450
|
|
|
451
|
+
const caps = readCapabilities(this.cwd);
|
|
452
|
+
const isMobile = caps.platform === 'mobile';
|
|
453
|
+
|
|
454
|
+
if (isMobile) {
|
|
455
|
+
// Determine platform tag: --platform android/ios emits a per-OS tag for OS-specific screens.
|
|
456
|
+
// Default (no --platform) = cross-platform, no OS-specific tag.
|
|
457
|
+
const platformTag =
|
|
458
|
+
options.platform === 'android' ? '@platform:android'
|
|
459
|
+
: options.platform === 'ios' ? '@platform:ios'
|
|
460
|
+
: '@platform:mobile';
|
|
461
|
+
|
|
462
|
+
// App entry: explicit --path → wdio.conf.ts default → placeholder.
|
|
463
|
+
const appEntry = options.path || this.readWdioAppEntry() || '<appPackage>';
|
|
464
|
+
|
|
465
|
+
// Navigation recipe (Background block)
|
|
466
|
+
const background = this.buildMobileBackground(options.reach);
|
|
467
|
+
|
|
468
|
+
return `${platformTag}
|
|
469
|
+
Feature: ${options.name} Screen
|
|
470
|
+
|
|
471
|
+
As a user
|
|
472
|
+
I want to ${description}
|
|
473
|
+
So that I can accomplish my tasks
|
|
474
|
+
Path: ${appEntry}
|
|
475
|
+
|
|
476
|
+
# Mobile (Appium) — selectors generated at /sungen:run-test via Appium MCP.
|
|
477
|
+
# Use accessibility-id selectors; assert text content with \`header with {{var}}\`
|
|
478
|
+
# (compiles to content-desc/label via toHaveAttribute). See sungen-mobile-gestures
|
|
479
|
+
# for swipe/long-press/scroll steps.
|
|
480
|
+
|
|
481
|
+
${background}
|
|
482
|
+
@high
|
|
483
|
+
Scenario: Sample scenario for ${options.name}
|
|
484
|
+
When User tap [element]
|
|
485
|
+
Then User see [result] header with {{result_text}}
|
|
486
|
+
`;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// Web feature stub
|
|
490
|
+
const featurePath = options.path || `/${screenName}`;
|
|
354
491
|
return `Feature: ${options.name} Screen
|
|
355
492
|
|
|
356
493
|
As a user
|
|
@@ -367,4 +504,82 @@ export class ScreenManager {
|
|
|
367
504
|
Then User see [result] text with {{success}}
|
|
368
505
|
`;
|
|
369
506
|
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Read the default app entry (`<appPackage>/<appActivity>`) from the project's wdio.conf.ts so a
|
|
510
|
+
* mobile `add-screen` without `--path` scaffolds a real, runnable `Path:` matching the configured
|
|
511
|
+
* app instead of a `<placeholder>`. Supports both the env-default form
|
|
512
|
+
* (`APP_PACKAGE = process.env.APP_PACKAGE || '…'`) and the literal capability form
|
|
513
|
+
* (`'appium:appPackage': '…'`). Returns null when wdio.conf.ts is absent or unparseable.
|
|
514
|
+
*/
|
|
515
|
+
private readWdioAppEntry(): string | null {
|
|
516
|
+
const wdioPath = path.join(this.cwd, 'wdio.conf.ts');
|
|
517
|
+
if (!fs.existsSync(wdioPath)) return null;
|
|
518
|
+
let src: string;
|
|
519
|
+
try {
|
|
520
|
+
src = fs.readFileSync(wdioPath, 'utf-8');
|
|
521
|
+
} catch {
|
|
522
|
+
return null;
|
|
523
|
+
}
|
|
524
|
+
const pick = (re: RegExp): string | undefined => src.match(re)?.[1]?.trim();
|
|
525
|
+
const pkg =
|
|
526
|
+
pick(/APP_PACKAGE\s*=\s*process\.env\.APP_PACKAGE\s*\|\|\s*['"]([^'"]+)['"]/) ??
|
|
527
|
+
pick(/['"]appium:appPackage['"]\s*:\s*['"]([^'"]+)['"]/);
|
|
528
|
+
if (!pkg) return null;
|
|
529
|
+
const activity =
|
|
530
|
+
pick(/APP_ACTIVITY\s*=\s*process\.env\.APP_ACTIVITY\s*\|\|\s*['"]([^'"]+)['"]/) ??
|
|
531
|
+
pick(/['"]appium:appActivity['"]\s*:\s*['"]([^'"]+)['"]/);
|
|
532
|
+
return activity ? `${pkg}/${activity}` : pkg;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Build the Background block for a mobile screen — the navigation recipe (in-app web-path
|
|
537
|
+
* analog). Line 1 is the `Given User is on [Home] screen` launcher/landing anchor; each step
|
|
538
|
+
* from `--reach` (a `>`-separated list) becomes a `When/And User <step>` nav line, taking the
|
|
539
|
+
* app from launch to THIS screen. capture-mobile replays these to land on the target screen
|
|
540
|
+
* before scanning. With no recipe, emit a guided stub (anchor + commented placeholder).
|
|
541
|
+
*/
|
|
542
|
+
private buildMobileBackground(reach?: string): string {
|
|
543
|
+
// Normalize one nav segment to a bare step body ("tap [My Page] tab"): drop any leading
|
|
544
|
+
// Gherkin keyword and a leading "User " so we can re-emit "When/And User <body>" cleanly.
|
|
545
|
+
const normalizeStep = (raw: string): string =>
|
|
546
|
+
raw
|
|
547
|
+
.trim()
|
|
548
|
+
.replace(/^(given|when|and|then|but)\s+/i, '')
|
|
549
|
+
.replace(/^user\s+/i, '')
|
|
550
|
+
.trim();
|
|
551
|
+
|
|
552
|
+
const steps = (reach || '')
|
|
553
|
+
.split('>')
|
|
554
|
+
.map(normalizeStep)
|
|
555
|
+
.filter(Boolean);
|
|
556
|
+
|
|
557
|
+
if (steps.length === 0) {
|
|
558
|
+
// No recipe → guided stub. Keep the anchor (correct as-is when this IS the launcher
|
|
559
|
+
// screen); the comments tell create-test / capture-mobile how to fill the nav steps.
|
|
560
|
+
return [
|
|
561
|
+
' Background:',
|
|
562
|
+
' # Navigation recipe — how to reach THIS screen from app launch (the in-app',
|
|
563
|
+
' # web-path analog). Line 1 is the launcher/landing screen the app opens on;',
|
|
564
|
+
' # add a `When/And User tap [...]` per hop to reach this screen. capture-mobile',
|
|
565
|
+
' # replays these so Appium lands here (not the launcher) before scanning. Leave',
|
|
566
|
+
' # only the anchor if this IS the launcher screen. Prefill with',
|
|
567
|
+
' # --reach "tap [Tab] > tap [Row]" at add-screen time.',
|
|
568
|
+
' Given User is on [Home] screen',
|
|
569
|
+
' # When User tap [<tab or button that leads to this screen>]',
|
|
570
|
+
'',
|
|
571
|
+
].join('\n');
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
const navLines = steps.map(
|
|
575
|
+
(body, i) => ` ${i === 0 ? 'When' : 'And'} User ${body}`,
|
|
576
|
+
);
|
|
577
|
+
return [
|
|
578
|
+
' Background:',
|
|
579
|
+
' # Navigation recipe — replayed by capture-mobile to land on this screen before scanning.',
|
|
580
|
+
' Given User is on [Home] screen',
|
|
581
|
+
...navLines,
|
|
582
|
+
'',
|
|
583
|
+
].join('\n');
|
|
584
|
+
}
|
|
370
585
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# ai-src — the SINGLE SOURCE for sungen's AI assistant assets
|
|
2
|
+
|
|
3
|
+
**Author skills, commands, and config HERE. Nothing else.** Do NOT create or edit a
|
|
4
|
+
`templates/ai-instructions/` folder — that per-assistant layout is retired. (A CI guardrail
|
|
5
|
+
in `golden-skills.test.ts` fails the build if it reappears.)
|
|
6
|
+
|
|
7
|
+
## Layout
|
|
8
|
+
```
|
|
9
|
+
ai-src/
|
|
10
|
+
├── skills/<name>/SKILL.md # one skill (+ optional aux .md fragments, e.g. viewpoint groups)
|
|
11
|
+
├── commands/<name>.md # one workflow command (structured frontmatter, see below)
|
|
12
|
+
└── config/{claude,copilot,codex}.md # per-assistant config (CLAUDE.md / copilot-instructions / AGENTS.md)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## How it ships
|
|
16
|
+
`sungen init` / `sungen update` call `ai-skills/build.ts` → `buildOutputs(adapters)`, which
|
|
17
|
+
renders each source file per assistant:
|
|
18
|
+
|
|
19
|
+
| Assistant | skill output | command output | config output |
|
|
20
|
+
|-----------|--------------|----------------|---------------|
|
|
21
|
+
| claude | `.claude/skills/<n>/SKILL.md` | `.claude/commands/sungen/<n>.md` | `CLAUDE.md` |
|
|
22
|
+
| copilot | `.github/skills/<n>/SKILL.md` | `.github/prompts/sungen-<n>.prompt.md` | `.github/copilot-instructions.md` |
|
|
23
|
+
| codex | `.agents/skills/<n>/SKILL.md` | `.agents/skills/sungen-<n>/SKILL.md` (commands become skills) | `AGENTS.md` |
|
|
24
|
+
|
|
25
|
+
`--assistant claude|copilot|codex|all` (repeatable, default `claude`) selects targets.
|
|
26
|
+
|
|
27
|
+
## Per-assistant deltas — cap-fences
|
|
28
|
+
When one assistant needs different wording (e.g. Claude has parallel sub-agents, Copilot is
|
|
29
|
+
sequential), fence the delta. Claude is the **canonical** content; other adapters strip down.
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
{{#cap parallel-subagents}}
|
|
33
|
+
...kept only for adapters that HAVE the cap (claude)...
|
|
34
|
+
{{/cap}}
|
|
35
|
+
{{^cap parallel-subagents}}
|
|
36
|
+
...kept only for adapters that LACK it (copilot, codex)...
|
|
37
|
+
{{/cap}}
|
|
38
|
+
```
|
|
39
|
+
Valid cap tags live in `ai-skills/cap-stripper.ts` (`VALID_CAPS`). An unknown tag or an
|
|
40
|
+
unclosed fence FAILS the build — never a silent drop.
|
|
41
|
+
|
|
42
|
+
## Command frontmatter
|
|
43
|
+
```
|
|
44
|
+
---
|
|
45
|
+
name: create-test # omit if Claude command had no name line
|
|
46
|
+
description: "<canonical Claude description>"
|
|
47
|
+
argument-hint: [screen-name] # verbatim Claude form
|
|
48
|
+
order: 20 # workflow step (advisory; parallel paths may share)
|
|
49
|
+
claude-tools: "Read, Grep, ..." # Claude allowed-tools (verbatim)
|
|
50
|
+
copilot-tools: "[vscode, ...]" # Copilot tools array
|
|
51
|
+
codex-trigger: "Run when the user asks to ..." # explicit Codex trigger (disambiguation)
|
|
52
|
+
---
|
|
53
|
+
<body, may contain cap-fences>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## After editing
|
|
57
|
+
Run `npm test` (or `tsx src/orchestrator/ai-skills/golden-skills.test.ts`). If you
|
|
58
|
+
intentionally changed output, re-freeze fixtures: add `--update`, then review the diff.
|
|
@@ -1,36 +1,65 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: add-flow
|
|
3
|
-
description:
|
|
3
|
+
description: "Add a new Sungen flow — scaffolds directories for E2E cross-screen testing, helps fill spec.md, and can capture visuals via the capture skills"
|
|
4
4
|
argument-hint: [flow-name] [--path <start-url>]
|
|
5
|
-
|
|
5
|
+
order: 10
|
|
6
|
+
claude-tools: "Read, Grep, Bash, Glob, Edit, Write, AskUserQuestion, mcp__playwright__browser_navigate, mcp__playwright__browser_take_screenshot, mcp__playwright__browser_snapshot, mcp__figma__get_design_context, mcp__figma__get_variable_defs, mcp__figma__get_screenshot"
|
|
7
|
+
copilot-tools: "[vscode, execute, read, agent, edit, search, todo]"
|
|
8
|
+
codex-trigger: "Run when the user asks to add a NEW cross-screen end-to-end flow. Step 1 (flow variant). Do NOT use for a single screen, creating test cases, or running tests."
|
|
6
9
|
---
|
|
10
|
+
{{^cap parallel-subagents}}
|
|
11
|
+
**Input**: Flow name and optional starting URL (e.g., `/sungen-add-flow award-submission --path /login`).
|
|
7
12
|
|
|
13
|
+
{{/cap}}
|
|
8
14
|
You are adding a new Sungen flow for E2E cross-screen test generation.
|
|
9
15
|
|
|
10
16
|
## Parameters
|
|
11
17
|
|
|
18
|
+
{{#cap parallel-subagents}}
|
|
12
19
|
Parse from `$ARGUMENTS`:
|
|
13
20
|
- **flow** — flow name (e.g., `award-submission`, `user-onboarding`)
|
|
21
|
+
{{/cap}}
|
|
22
|
+
{{^cap parallel-subagents}}
|
|
23
|
+
- **flow** — ${input:flow:flow name (e.g., award-submission, user-onboarding)}
|
|
24
|
+
{{/cap}}
|
|
14
25
|
- **--path \<url\>** — starting page URL path (default: `/login`)
|
|
15
26
|
- **--description \<text\>** — flow description (optional)
|
|
16
27
|
|
|
28
|
+
{{#cap parallel-subagents}}
|
|
17
29
|
If **flow** is missing, ask: "What is the flow name? (e.g., `award-submission`, `user-onboarding`)"
|
|
18
30
|
If **path** is missing, ask: "What is the starting URL path? (e.g., `/login`)"
|
|
19
31
|
|
|
32
|
+
{{/cap}}
|
|
20
33
|
## Steps
|
|
21
34
|
|
|
22
35
|
### 1. Scaffold the flow
|
|
23
36
|
|
|
37
|
+
{{^cap parallel-subagents}}
|
|
38
|
+
Run with #tool:terminal:
|
|
39
|
+
{{/cap}}
|
|
24
40
|
```bash
|
|
41
|
+
{{#cap parallel-subagents}}
|
|
25
42
|
sungen add-flow --flow <name> --path <path>
|
|
43
|
+
{{/cap}}
|
|
44
|
+
{{^cap parallel-subagents}}
|
|
45
|
+
sungen add-flow --flow ${input:flow} --path ${input:path}
|
|
46
|
+
{{/cap}}
|
|
26
47
|
```
|
|
27
48
|
|
|
28
49
|
This creates:
|
|
29
50
|
```
|
|
51
|
+
{{#cap parallel-subagents}}
|
|
30
52
|
qa/flows/<name>/
|
|
31
53
|
├── features/<name>.feature # Gherkin with @flow tag, Background, sample scenarios
|
|
32
54
|
├── selectors/<name>.yaml # Namespaced keys: "login:submit", "awards:submit"
|
|
33
55
|
├── test-data/<name>.yaml # Namespaced data: login.email, submission.nominee
|
|
56
|
+
{{/cap}}
|
|
57
|
+
{{^cap parallel-subagents}}
|
|
58
|
+
qa/flows/${input:flow}/
|
|
59
|
+
├── features/${input:flow}.feature # Gherkin with @flow tag, Background, sample scenarios
|
|
60
|
+
├── selectors/${input:flow}.yaml # Namespaced keys: "login:submit", "awards:submit"
|
|
61
|
+
├── test-data/${input:flow}.yaml # Namespaced data: login.email, submission.nominee
|
|
62
|
+
{{/cap}}
|
|
34
63
|
└── requirements/
|
|
35
64
|
├── spec.md # Flow specification
|
|
36
65
|
└── ui/ # Screenshots, mockups
|
|
@@ -47,19 +76,39 @@ Record the screen list — you will need it for:
|
|
|
47
76
|
|
|
48
77
|
### 2. Capture visual source
|
|
49
78
|
|
|
79
|
+
{{#cap parallel-subagents}}
|
|
50
80
|
Use `AskUserQuestion`: *"Pick a visual source for this flow's screens:"*
|
|
81
|
+
{{/cap}}
|
|
82
|
+
{{^cap parallel-subagents}}
|
|
83
|
+
Ask: *"Pick a visual source for this flow's screens:"*
|
|
84
|
+
{{/cap}}
|
|
51
85
|
- **Figma designs** (Recommended for pre-launch) — invoke `sungen-capture` skill (mode figma-mcp) for each screen
|
|
52
86
|
- **Live page scan** (dev/staging is up) — invoke `sungen-capture` skill (mode live) for each screen URL
|
|
53
87
|
- **Local images** — invoke `sungen-capture` skill (mode local) to load from `requirements/ui/`
|
|
54
88
|
- **Skip** — user will drop images manually into `requirements/ui/` later
|
|
55
89
|
|
|
90
|
+
{{#cap parallel-subagents}}
|
|
56
91
|
Each capture skill writes outputs into `qa/flows/<name>/requirements/ui/` and reports back a summary. Do not inline capture logic here — always delegate to the skill so behavior stays consistent with `/sungen:create-test`.
|
|
92
|
+
{{/cap}}
|
|
93
|
+
{{^cap parallel-subagents}}
|
|
94
|
+
Each capture skill writes outputs into `qa/flows/${input:flow}/requirements/ui/` and reports back a summary. Do not inline capture logic here — always delegate to the skill.
|
|
95
|
+
{{/cap}}
|
|
57
96
|
|
|
58
97
|
### 3. Fill spec.md
|
|
59
98
|
|
|
99
|
+
{{#cap parallel-subagents}}
|
|
60
100
|
Use `AskUserQuestion`: *"Fill `spec.md` now? (You can reference the captured visuals)"* — offer **Yes, fill now (Recommended)** / **Skip, fill later**.
|
|
101
|
+
{{/cap}}
|
|
102
|
+
{{^cap parallel-subagents}}
|
|
103
|
+
Ask: *"Fill `spec.md` now? (You can reference the captured visuals)"* — offer **Yes, fill now (Recommended)** / **Skip, fill later**.
|
|
104
|
+
{{/cap}}
|
|
61
105
|
|
|
106
|
+
{{#cap parallel-subagents}}
|
|
62
107
|
If yes → open `qa/flows/<name>/requirements/spec.md` and help the user fill:
|
|
108
|
+
{{/cap}}
|
|
109
|
+
{{^cap parallel-subagents}}
|
|
110
|
+
If yes → open `qa/flows/${input:flow}/requirements/spec.md` and help the user fill:
|
|
111
|
+
{{/cap}}
|
|
63
112
|
- **Screens list** — ordered list of screens with URL paths
|
|
64
113
|
- **Flow steps** — what the user does at each screen
|
|
65
114
|
- **Transitions** — what triggers navigation between screens
|
|
@@ -70,13 +119,25 @@ Reference the captured visuals from Step 2 to suggest field names, form elements
|
|
|
70
119
|
|
|
71
120
|
### 4. Next steps
|
|
72
121
|
|
|
122
|
+
{{#cap parallel-subagents}}
|
|
73
123
|
Tell the user what was created, then use `AskUserQuestion` to offer next steps:
|
|
124
|
+
{{/cap}}
|
|
125
|
+
{{^cap parallel-subagents}}
|
|
126
|
+
Tell the user what was created and offer next steps:
|
|
127
|
+
{{/cap}}
|
|
74
128
|
|
|
129
|
+
{{#cap parallel-subagents}}
|
|
75
130
|
- **`/sungen:create-test <name>`** — Create test scenarios for the flow (Recommended)
|
|
131
|
+
{{/cap}}
|
|
132
|
+
{{^cap parallel-subagents}}
|
|
133
|
+
- **`/sungen-create-test ${input:flow}`** — Generate test scenarios for the flow (Recommended)
|
|
134
|
+
{{/cap}}
|
|
76
135
|
- **Done for now** — I'll come back later
|
|
77
136
|
|
|
137
|
+
{{#cap parallel-subagents}}
|
|
78
138
|
If user picks `/sungen:create-test`, **you MUST use the Skill tool** to invoke it. Do NOT generate test cases yourself — the skill auto-loads `sungen-gherkin-syntax` and `sungen-tc-generation`.
|
|
79
139
|
|
|
140
|
+
{{/cap}}
|
|
80
141
|
## Key Rules
|
|
81
142
|
|
|
82
143
|
- Flows are **independent** from screens — own selectors, own test-data
|