@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,17 +6,53 @@
|
|
|
6
6
|
import * as fs from 'fs';
|
|
7
7
|
import * as path from 'path';
|
|
8
8
|
import { execSync } from 'child_process';
|
|
9
|
-
import {
|
|
9
|
+
import { buildOutputs } from './ai-skills/build';
|
|
10
|
+
import { applyOutputs } from './ai-skills/writer';
|
|
11
|
+
import { AdapterKey } from './ai-skills/adapters';
|
|
12
|
+
import {
|
|
13
|
+
MobileInitOptions,
|
|
14
|
+
emitMobileRuntime,
|
|
15
|
+
writeMobileCapabilities,
|
|
16
|
+
installMobileDriver,
|
|
17
|
+
} from './mobile-runtime-scaffolder';
|
|
18
|
+
|
|
19
|
+
export { MobileInitOptions };
|
|
20
|
+
|
|
21
|
+
function sungenVersion(): string {
|
|
22
|
+
try { return require(path.join(__dirname, '..', '..', 'package.json')).version || '0.0.0'; }
|
|
23
|
+
catch { return '0.0.0'; }
|
|
24
|
+
}
|
|
10
25
|
|
|
11
26
|
export class ProjectInitializer {
|
|
12
27
|
private baseCwd: string;
|
|
13
28
|
private cwd: string;
|
|
14
29
|
private createdItems: string[] = [];
|
|
15
30
|
private skippedItems: string[] = [];
|
|
31
|
+
private agents: AdapterKey[];
|
|
32
|
+
private force: boolean;
|
|
33
|
+
private mobile: MobileInitOptions;
|
|
16
34
|
|
|
17
|
-
constructor(private baseUrl: string) {
|
|
35
|
+
constructor(private baseUrl: string, opts: { agents?: AdapterKey[]; force?: boolean; enabled?: boolean; mobileOnly?: boolean; appPackage?: string; appActivity?: string; appApk?: string; androidUdid?: string; iosBundleId?: string; iosDevice?: string; iosVersion?: string } = {}) {
|
|
18
36
|
this.baseCwd = process.cwd();
|
|
19
37
|
this.cwd = this.baseCwd;
|
|
38
|
+
this.agents = opts.agents && opts.agents.length ? opts.agents : (['claude'] as AdapterKey[]);
|
|
39
|
+
this.force = opts.force ?? false;
|
|
40
|
+
this.mobile = {
|
|
41
|
+
enabled: opts.enabled ?? false,
|
|
42
|
+
mobileOnly: opts.mobileOnly ?? false,
|
|
43
|
+
appPackage: opts.appPackage,
|
|
44
|
+
appActivity: opts.appActivity,
|
|
45
|
+
appApk: opts.appApk,
|
|
46
|
+
androidUdid: opts.androidUdid,
|
|
47
|
+
iosBundleId: opts.iosBundleId,
|
|
48
|
+
iosDevice: opts.iosDevice,
|
|
49
|
+
iosVersion: opts.iosVersion,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Mobile-only project: no Playwright/web scaffolding. */
|
|
54
|
+
private get mobileOnly(): boolean {
|
|
55
|
+
return !!this.mobile.mobileOnly;
|
|
20
56
|
}
|
|
21
57
|
|
|
22
58
|
/**
|
|
@@ -30,34 +66,41 @@ export class ProjectInitializer {
|
|
|
30
66
|
this.createdItems = [];
|
|
31
67
|
this.skippedItems = [];
|
|
32
68
|
|
|
33
|
-
console.log(
|
|
69
|
+
console.log(`🚀 Initializing Sungen ${this.mobileOnly ? 'mobile-only ' : ''}project...\n`);
|
|
34
70
|
|
|
35
71
|
if (normalizedProjectName) {
|
|
36
72
|
this.createProjectRoot(normalizedProjectName);
|
|
37
73
|
}
|
|
38
74
|
|
|
39
|
-
// Create directories
|
|
75
|
+
// Create directories (mobile-only skips the web Playwright storage dir)
|
|
40
76
|
this.createDirectories();
|
|
41
77
|
|
|
42
78
|
// Create qa/context.md for QA lead to fill project-wide context
|
|
43
79
|
this.createContext();
|
|
44
80
|
|
|
45
|
-
// Create qa/capabilities.yaml —
|
|
81
|
+
// Create qa/capabilities.yaml — web default; mobile path uses writeMobileCapabilities
|
|
46
82
|
this.createCapabilities();
|
|
47
83
|
|
|
48
|
-
// Ensure package.json and install Playwright
|
|
84
|
+
// Ensure package.json and install deps (Playwright for web; skipped for mobile-only)
|
|
49
85
|
await this.setupDependencies();
|
|
50
86
|
|
|
51
|
-
//
|
|
52
|
-
this.
|
|
87
|
+
// Web-only scaffolding — skipped entirely for a mobile-only project
|
|
88
|
+
if (!this.mobileOnly) {
|
|
89
|
+
this.createPlaywrightConfig();
|
|
90
|
+
this.createSpecsBase();
|
|
91
|
+
}
|
|
53
92
|
|
|
54
|
-
// Create tsconfig.json if doesn't exist
|
|
93
|
+
// Create tsconfig.json if doesn't exist (needed by both web + mobile)
|
|
55
94
|
this.createTsConfig();
|
|
56
95
|
|
|
57
|
-
//
|
|
58
|
-
this.createSpecsBase();
|
|
96
|
+
// specs/test-data.ts (runtime YAML loader) — shared by BOTH web and mobile specs
|
|
59
97
|
this.createSpecsTestData();
|
|
60
98
|
|
|
99
|
+
// Mobile harness (Appium/WebdriverIO) — when `--mobile` (a mobile-only project)
|
|
100
|
+
if (this.mobile.enabled) {
|
|
101
|
+
this.emitMobileHarness();
|
|
102
|
+
}
|
|
103
|
+
|
|
61
104
|
// Create/update .gitignore
|
|
62
105
|
this.updateGitignore();
|
|
63
106
|
|
|
@@ -90,17 +133,14 @@ export class ProjectInitializer {
|
|
|
90
133
|
}
|
|
91
134
|
|
|
92
135
|
/**
|
|
93
|
-
* Create essential directories only
|
|
136
|
+
* Create essential directories only.
|
|
137
|
+
* Mobile-only: skips specs/storage (Playwright auth state); qa/screens + qa/flows still created
|
|
138
|
+
* (1-platform model — mobile uses the same tree as web, NOT a separate qa/mobile/ path).
|
|
94
139
|
*/
|
|
95
140
|
private createDirectories(): void {
|
|
96
|
-
const dirs =
|
|
97
|
-
'qa',
|
|
98
|
-
'qa/screens',
|
|
99
|
-
'qa/flows',
|
|
100
|
-
'specs',
|
|
101
|
-
'specs/generated',
|
|
102
|
-
'specs/storage',
|
|
103
|
-
];
|
|
141
|
+
const dirs = this.mobileOnly
|
|
142
|
+
? ['qa', 'qa/screens', 'qa/flows', 'specs', 'specs/generated']
|
|
143
|
+
: ['qa', 'qa/screens', 'qa/flows', 'specs', 'specs/generated', 'specs/storage'];
|
|
104
144
|
|
|
105
145
|
for (const dir of dirs) {
|
|
106
146
|
const fullPath = path.join(this.cwd, dir);
|
|
@@ -147,13 +187,17 @@ export class ProjectInitializer {
|
|
|
147
187
|
}
|
|
148
188
|
|
|
149
189
|
/**
|
|
150
|
-
* Update .gitignore with Sungen-specific entries
|
|
190
|
+
* Update .gitignore with Sungen-specific entries.
|
|
191
|
+
* Mobile projects add .env.appium (device ids + machine paths) and specs/.auth-mobile/
|
|
192
|
+
* (Appium auth contract). Web projects add Playwright auth state + report dirs.
|
|
151
193
|
*/
|
|
152
194
|
private updateGitignore(): void {
|
|
153
195
|
const gitignorePath = path.join(this.cwd, '.gitignore');
|
|
154
196
|
const sungenEntries = [
|
|
155
197
|
'# Sungen generated files',
|
|
156
198
|
'specs/.auth/', // session storage state = cookies/tokens (sensitive)
|
|
199
|
+
'specs/.auth-mobile/', // mobile auth contract = credentials (sensitive)
|
|
200
|
+
'.env.appium', // local mobile-test env = machine paths + device/team ids (.example IS committed)
|
|
157
201
|
'test-results/',
|
|
158
202
|
'playwright-report/',
|
|
159
203
|
'.playwright-mcp/',
|
|
@@ -199,7 +243,8 @@ export class ProjectInitializer {
|
|
|
199
243
|
}
|
|
200
244
|
|
|
201
245
|
/**
|
|
202
|
-
* Create VS Code settings for Copilot auto-attach
|
|
246
|
+
* Create VS Code settings for Copilot auto-attach.
|
|
247
|
+
* Mobile-only: approves wdio + npx appium instead of npx playwright.
|
|
203
248
|
*/
|
|
204
249
|
private createVSCodeSettings(): void {
|
|
205
250
|
const settingsPath = path.join(this.cwd, '.vscode', 'settings.json');
|
|
@@ -214,7 +259,9 @@ export class ProjectInitializer {
|
|
|
214
259
|
'github.copilot.chat.agent.runTasks': true,
|
|
215
260
|
'chat.tools.terminal.autoApprove': {
|
|
216
261
|
sungen: true,
|
|
217
|
-
|
|
262
|
+
...(this.mobileOnly
|
|
263
|
+
? { wdio: true, 'npx appium': true }
|
|
264
|
+
: { 'npx playwright': true }),
|
|
218
265
|
},
|
|
219
266
|
};
|
|
220
267
|
|
|
@@ -224,15 +271,14 @@ export class ProjectInitializer {
|
|
|
224
271
|
this.skippedItems.push('.vscode/settings.json');
|
|
225
272
|
}
|
|
226
273
|
|
|
227
|
-
// .vscode/mcp.json (Copilot format) —
|
|
274
|
+
// .vscode/mcp.json (Copilot format) — appium-mcp for mobile-only, Playwright MCP otherwise
|
|
228
275
|
this.mergeMCPConfig(
|
|
229
276
|
path.join(this.cwd, '.vscode', 'mcp.json'),
|
|
230
277
|
'servers',
|
|
231
278
|
{
|
|
232
|
-
|
|
233
|
-
command: 'npx',
|
|
234
|
-
args: ['@playwright/mcp@latest'],
|
|
235
|
-
},
|
|
279
|
+
...(this.mobileOnly
|
|
280
|
+
? { 'appium-mcp': { command: 'npx', args: ['-y', 'appium-mcp'] } }
|
|
281
|
+
: { playwright: { command: 'npx', args: ['@playwright/mcp@latest'] } }),
|
|
236
282
|
figma: {
|
|
237
283
|
type: 'http',
|
|
238
284
|
url: 'https://mcp.figma.com/mcp',
|
|
@@ -243,18 +289,17 @@ export class ProjectInitializer {
|
|
|
243
289
|
}
|
|
244
290
|
|
|
245
291
|
/**
|
|
246
|
-
* Create root .mcp.json for Claude Code
|
|
292
|
+
* Create root .mcp.json for Claude Code.
|
|
293
|
+
* Mobile-only: appium-mcp instead of Playwright MCP. Figma always included.
|
|
247
294
|
*/
|
|
248
295
|
private createClaudeMCPConfig(): void {
|
|
249
296
|
this.mergeMCPConfig(
|
|
250
297
|
path.join(this.cwd, '.mcp.json'),
|
|
251
298
|
'mcpServers',
|
|
252
299
|
{
|
|
253
|
-
|
|
254
|
-
type: 'stdio',
|
|
255
|
-
command: 'npx',
|
|
256
|
-
args: ['@playwright/mcp@latest'],
|
|
257
|
-
},
|
|
300
|
+
...(this.mobileOnly
|
|
301
|
+
? { 'appium-mcp': { type: 'stdio', command: 'npx', args: ['-y', 'appium-mcp'] } }
|
|
302
|
+
: { playwright: { type: 'stdio', command: 'npx', args: ['@playwright/mcp@latest'] } }),
|
|
258
303
|
figma: {
|
|
259
304
|
type: 'http',
|
|
260
305
|
url: 'https://mcp.figma.com/mcp',
|
|
@@ -337,10 +382,18 @@ export class ProjectInitializer {
|
|
|
337
382
|
if (projectName) {
|
|
338
383
|
console.log(` ${stepIndex++}. cd ${projectName}`);
|
|
339
384
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
385
|
+
if (this.mobileOnly) {
|
|
386
|
+
console.log(` ${stepIndex++}. Fill in .env.appium with your device/app details (see .env.appium.example)`);
|
|
387
|
+
console.log(` ${stepIndex++}. Create your first screen: sungen add --screen <name>`);
|
|
388
|
+
console.log(` ${stepIndex++}. Use AI (Copilot/Claude) to generate Gherkin + selectors from the live app`);
|
|
389
|
+
console.log(` ${stepIndex++}. Compile tests: sungen generate --screen <name>`);
|
|
390
|
+
console.log(` ${stepIndex++}. Run tests: npm run test:mobile\n`);
|
|
391
|
+
} else {
|
|
392
|
+
console.log(` ${stepIndex++}. Create your first screen: sungen add --screen <name> --path <url-path>`);
|
|
393
|
+
console.log(` ${stepIndex++}. Use AI (Copilot/Claude) to generate Gherkin + selectors from the live page`);
|
|
394
|
+
console.log(` ${stepIndex++}. Compile tests: sungen generate --screen <name>`);
|
|
395
|
+
console.log(` ${stepIndex++}. Run tests: npx playwright test\n`);
|
|
396
|
+
}
|
|
344
397
|
}
|
|
345
398
|
|
|
346
399
|
/**
|
|
@@ -348,28 +401,17 @@ export class ProjectInitializer {
|
|
|
348
401
|
* Shares `AI_RULES_FILE_MAPPING` with `sungen update` so a newly added
|
|
349
402
|
* skill / command template only needs to be registered once.
|
|
350
403
|
*/
|
|
404
|
+
/**
|
|
405
|
+
* Create AI rules files for the selected assistants from the single source (ai-src).
|
|
406
|
+
* Shares the generator (ai-skills/build) with `sungen update` so a skill is authored once.
|
|
407
|
+
*/
|
|
351
408
|
private createAIRules(): void {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
this.skippedItems.push(outputRelPath);
|
|
359
|
-
continue;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
const outputDir = path.dirname(outputPath);
|
|
363
|
-
if (!fs.existsSync(outputDir)) {
|
|
364
|
-
fs.mkdirSync(outputDir, { recursive: true });
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
const templatePath = path.join(aiTemplateDir, templateFile);
|
|
368
|
-
const content = fs.readFileSync(templatePath, 'utf-8');
|
|
369
|
-
fs.writeFileSync(outputPath, content, 'utf-8');
|
|
370
|
-
this.createdItems.push(outputRelPath);
|
|
371
|
-
}
|
|
372
|
-
|
|
409
|
+
// Single-source generator (decision 1A). Managed skill/command files are written;
|
|
410
|
+
// config files (CLAUDE.md/AGENTS.md/copilot-instructions) are skip-if-exists unless --force.
|
|
411
|
+
const outputs = buildOutputs(this.agents);
|
|
412
|
+
const r = applyOutputs(this.cwd, outputs, { version: sungenVersion(), force: this.force });
|
|
413
|
+
this.createdItems.push(...r.created);
|
|
414
|
+
this.skippedItems.push(...r.skippedConfig);
|
|
373
415
|
}
|
|
374
416
|
|
|
375
417
|
/**
|
|
@@ -390,8 +432,9 @@ export class ProjectInitializer {
|
|
|
390
432
|
}
|
|
391
433
|
|
|
392
434
|
/**
|
|
393
|
-
* Create qa/capabilities.yaml — the platform driver profile
|
|
394
|
-
*
|
|
435
|
+
* Create qa/capabilities.yaml — the platform driver profile.
|
|
436
|
+
* Web default: platform=web, enabled=[web].
|
|
437
|
+
* Mobile: platform=mobile, enabled=[mobile] (via writeMobileCapabilities from the scaffolder).
|
|
395
438
|
*/
|
|
396
439
|
private createCapabilities(): void {
|
|
397
440
|
const p = path.join(this.cwd, 'qa', 'capabilities.yaml');
|
|
@@ -399,13 +442,18 @@ export class ProjectInitializer {
|
|
|
399
442
|
this.skippedItems.push('qa/capabilities.yaml');
|
|
400
443
|
return;
|
|
401
444
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
445
|
+
|
|
446
|
+
if (this.mobile.enabled) {
|
|
447
|
+
writeMobileCapabilities(this.cwd);
|
|
448
|
+
} else {
|
|
449
|
+
const content =
|
|
450
|
+
'# Sungen capability profile — which runtime/drivers this project uses.\n' +
|
|
451
|
+
'# platform: the runtime adapter — web → Playwright, mobile → Appium.\n' +
|
|
452
|
+
'# enabled: drivers turned on (add more via `sungen capability add <driver>`).\n\n' +
|
|
453
|
+
'platform: web\n' +
|
|
454
|
+
'enabled:\n - web\n';
|
|
455
|
+
fs.writeFileSync(p, content, 'utf-8');
|
|
456
|
+
}
|
|
409
457
|
this.createdItems.push('qa/capabilities.yaml');
|
|
410
458
|
}
|
|
411
459
|
|
|
@@ -451,6 +499,20 @@ export class ProjectInitializer {
|
|
|
451
499
|
this.createdItems.push('specs/generated/test-data.ts');
|
|
452
500
|
}
|
|
453
501
|
|
|
502
|
+
/**
|
|
503
|
+
* Delegate to mobile-runtime-scaffolder to emit Appium/WDIO harness files,
|
|
504
|
+
* then best-effort install @sungen/driver-mobile at lockstep version.
|
|
505
|
+
* Called only when `--mobile` is set.
|
|
506
|
+
*/
|
|
507
|
+
private emitMobileHarness(): void {
|
|
508
|
+
const result = emitMobileRuntime(this.cwd, this.mobile);
|
|
509
|
+
this.createdItems.push(...result.created);
|
|
510
|
+
this.skippedItems.push(...result.skipped);
|
|
511
|
+
|
|
512
|
+
// Best-effort driver install — non-fatal so offline init still scaffolds.
|
|
513
|
+
installMobileDriver(this.cwd);
|
|
514
|
+
}
|
|
515
|
+
|
|
454
516
|
/**
|
|
455
517
|
* Read a template file from the templates directory
|
|
456
518
|
*/
|
|
@@ -476,8 +538,11 @@ export class ProjectInitializer {
|
|
|
476
538
|
// Ensure standard scripts exist in package.json
|
|
477
539
|
this.ensurePackageScripts(packageJsonPath);
|
|
478
540
|
|
|
479
|
-
//
|
|
480
|
-
const requiredDeps =
|
|
541
|
+
// Mobile-only drops @playwright/test (no web runner needed).
|
|
542
|
+
const requiredDeps = this.mobileOnly
|
|
543
|
+
? ['@types/node', 'yaml']
|
|
544
|
+
: ['@playwright/test', '@types/node', 'yaml'];
|
|
545
|
+
|
|
481
546
|
let missingDeps: string[] = requiredDeps;
|
|
482
547
|
try {
|
|
483
548
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
@@ -489,15 +554,17 @@ export class ProjectInitializer {
|
|
|
489
554
|
|
|
490
555
|
if (missingDeps.length === 0) {
|
|
491
556
|
console.log('✓ All dependencies already installed\n');
|
|
492
|
-
|
|
557
|
+
} else {
|
|
558
|
+
console.log(`📦 Installing ${missingDeps.join(', ')}...\n`);
|
|
559
|
+
execSync(`npm install -D ${missingDeps.join(' ')}`, execOpts);
|
|
493
560
|
}
|
|
494
561
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
562
|
+
// Chromium is only needed for the web (Playwright) runner — skip for mobile-only projects.
|
|
563
|
+
if (!this.mobileOnly) {
|
|
564
|
+
console.log('\n🎭 Installing Chromium (default browser)...\n');
|
|
565
|
+
execSync('npx playwright install --with-deps chromium', execOpts);
|
|
566
|
+
console.log('\n💡 To install other browsers: npm run install:browsers -- firefox webkit\n');
|
|
567
|
+
}
|
|
501
568
|
}
|
|
502
569
|
|
|
503
570
|
/**
|
|
@@ -516,15 +583,21 @@ export class ProjectInitializer {
|
|
|
516
583
|
packageJson.scripts = {};
|
|
517
584
|
}
|
|
518
585
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
586
|
+
// Mobile-only projects get just the generate + mobile-run scripts (no Playwright web scripts).
|
|
587
|
+
const standardScripts: Record<string, string> = this.mobileOnly
|
|
588
|
+
? {
|
|
589
|
+
'generate': 'sungen generate --all',
|
|
590
|
+
'test:mobile': 'wdio run wdio.conf.ts',
|
|
591
|
+
}
|
|
592
|
+
: {
|
|
593
|
+
'test': 'playwright test specs/generated/',
|
|
594
|
+
'test:headed': 'playwright test specs/generated/ --headed',
|
|
595
|
+
'test:debug': 'playwright test specs/generated/ --debug',
|
|
596
|
+
'test:ui': 'playwright test specs/generated/ --ui',
|
|
597
|
+
'report': 'playwright show-report',
|
|
598
|
+
'generate': 'sungen generate --all',
|
|
599
|
+
'install:browsers': 'npx playwright install',
|
|
600
|
+
};
|
|
528
601
|
|
|
529
602
|
let added = 0;
|
|
530
603
|
for (const [name, command] of Object.entries(standardScripts)) {
|