@sun-asterisk/sungen 3.2.2 → 3.2.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capabilities/discover.d.ts.map +1 -1
- package/dist/capabilities/discover.js +26 -3
- package/dist/capabilities/discover.js.map +1 -1
- package/dist/cli/commands/add-flow.d.ts.map +1 -1
- package/dist/cli/commands/add-flow.js +2 -0
- package/dist/cli/commands/add-flow.js.map +1 -1
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +4 -0
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/capability.d.ts.map +1 -1
- package/dist/cli/commands/capability.js +61 -0
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +89 -2
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/eval.js +3 -3
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/gate.d.ts +3 -0
- package/dist/cli/commands/gate.d.ts.map +1 -0
- package/dist/cli/commands/gate.js +83 -0
- package/dist/cli/commands/gate.js.map +1 -0
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +2 -1
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +32 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/journey.d.ts +3 -0
- package/dist/cli/commands/journey.d.ts.map +1 -0
- package/dist/cli/commands/journey.js +114 -0
- package/dist/cli/commands/journey.js.map +1 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +10 -3
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/snapshot-builder.d.ts.map +1 -1
- package/dist/dashboard/snapshot-builder.js +10 -1
- package/dist/dashboard/snapshot-builder.js.map +1 -1
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +3 -1
- package/dist/exporters/csv-exporter.js.map +1 -1
- package/dist/exporters/json-exporter.js +3 -1
- package/dist/exporters/json-exporter.js.map +1 -1
- package/dist/exporters/mobile-app-id.d.ts +22 -0
- package/dist/exporters/mobile-app-id.d.ts.map +1 -0
- package/dist/exporters/mobile-app-id.js +37 -0
- package/dist/exporters/mobile-app-id.js.map +1 -0
- package/dist/exporters/spec-parser.d.ts.map +1 -1
- package/dist/exporters/spec-parser.js +6 -2
- package/dist/exporters/spec-parser.js.map +1 -1
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts +3 -0
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +7 -4
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +20 -3
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +4 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +4 -1
- package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +3 -0
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +48 -9
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/template-engine.d.ts +3 -0
- package/dist/generators/test-generator/template-engine.d.ts.map +1 -1
- package/dist/generators/test-generator/template-engine.js +11 -1
- package/dist/generators/test-generator/template-engine.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts +11 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +33 -0
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +8 -1
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/catalog/universal-viewpoints.yaml +15 -0
- package/dist/harness/eval/skill-lint.d.ts +3 -3
- package/dist/harness/eval/skill-lint.d.ts.map +1 -1
- package/dist/harness/eval/skill-lint.js +88 -68
- package/dist/harness/eval/skill-lint.js.map +1 -1
- package/dist/harness/journey.d.ts +88 -0
- package/dist/harness/journey.d.ts.map +1 -0
- package/dist/harness/journey.js +414 -0
- package/dist/harness/journey.js.map +1 -0
- package/dist/harness/quality-gates.d.ts +13 -0
- package/dist/harness/quality-gates.d.ts.map +1 -1
- package/dist/harness/quality-gates.js +23 -0
- package/dist/harness/quality-gates.js.map +1 -1
- package/dist/harness/sensors.d.ts +1 -1
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +32 -9
- package/dist/harness/sensors.js.map +1 -1
- package/dist/orchestrator/ai-rules-updater.d.ts +11 -3
- package/dist/orchestrator/ai-rules-updater.d.ts.map +1 -1
- package/dist/orchestrator/ai-rules-updater.js +44 -180
- package/dist/orchestrator/ai-rules-updater.js.map +1 -1
- package/dist/orchestrator/ai-skills/adapters.d.ts +28 -0
- package/dist/orchestrator/ai-skills/adapters.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/adapters.js +34 -0
- package/dist/orchestrator/ai-skills/adapters.js.map +1 -0
- package/dist/orchestrator/ai-skills/build.d.ts +10 -0
- package/dist/orchestrator/ai-skills/build.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/build.js +128 -0
- package/dist/orchestrator/ai-skills/build.js.map +1 -0
- package/dist/orchestrator/ai-skills/cap-stripper.d.ts +27 -0
- package/dist/orchestrator/ai-skills/cap-stripper.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/cap-stripper.js +78 -0
- package/dist/orchestrator/ai-skills/cap-stripper.js.map +1 -0
- package/dist/orchestrator/ai-skills/commands.d.ts +22 -0
- package/dist/orchestrator/ai-skills/commands.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/commands.js +109 -0
- package/dist/orchestrator/ai-skills/commands.js.map +1 -0
- package/dist/orchestrator/ai-skills/generator.d.ts +23 -0
- package/dist/orchestrator/ai-skills/generator.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/generator.js +79 -0
- package/dist/orchestrator/ai-skills/generator.js.map +1 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.d.ts +2 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.js +183 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.js.map +1 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.d.ts +8 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.js +28 -0
- package/dist/orchestrator/ai-skills/resolve-assistants.js.map +1 -0
- package/dist/orchestrator/ai-skills/writer.d.ts +15 -0
- package/dist/orchestrator/ai-skills/writer.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/writer.js +129 -0
- package/dist/orchestrator/ai-skills/writer.js.map +1 -0
- package/dist/orchestrator/flow-manager.d.ts +11 -0
- package/dist/orchestrator/flow-manager.d.ts.map +1 -1
- package/dist/orchestrator/flow-manager.js +147 -29
- package/dist/orchestrator/flow-manager.js.map +1 -1
- package/dist/orchestrator/mobile-runtime-scaffolder.d.ts +59 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.d.ts.map +1 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.js +298 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.js.map +1 -0
- package/dist/orchestrator/project-initializer.d.ts +44 -7
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +147 -79
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/screen-manager.d.ts +30 -0
- package/dist/orchestrator/screen-manager.d.ts.map +1 -1
- package/dist/orchestrator/screen-manager.js +205 -22
- package/dist/orchestrator/screen-manager.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/README.md +58 -0
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-add-flow.md → ai-src/commands/add-flow.md} +63 -2
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-add-screen.md → ai-src/commands/add-screen.md} +171 -6
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-create-test.md → ai-src/commands/create-test.md} +118 -4
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-dashboard.md → dist/orchestrator/templates/ai-src/commands/dashboard.md} +25 -3
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-delivery.md → dist/orchestrator/templates/ai-src/commands/delivery.md} +67 -3
- package/dist/orchestrator/templates/ai-src/commands/design.md +29 -0
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-feedback.md → dist/orchestrator/templates/ai-src/commands/feedback.md} +34 -3
- package/dist/orchestrator/templates/{ai-instructions/claude-cmd-locale.md → ai-src/commands/locale.md} +56 -4
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-review.md → dist/orchestrator/templates/ai-src/commands/review.md} +57 -2
- package/{src/orchestrator/templates/ai-instructions/claude-cmd-run-test.md → dist/orchestrator/templates/ai-src/commands/run-test.md} +116 -5
- package/dist/orchestrator/templates/ai-src/config/codex.md +8 -0
- package/{src/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md → dist/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md} +11 -0
- package/dist/orchestrator/templates/{ai-instructions/github-skill-sungen-error-mapping.md → ai-src/skills/sungen-error-mapping/SKILL.md} +49 -9
- package/{src/orchestrator/templates/ai-instructions/claude-skill-harness-audit.md → dist/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md} +5 -5
- package/{src/orchestrator/templates/ai-instructions/claude-skill-locale.md → dist/orchestrator/templates/ai-src/skills/sungen-locale/SKILL.md} +275 -3
- package/{src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix.md → dist/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md} +17 -0
- package/dist/orchestrator/templates/{ai-instructions/claude-skill-selector-fix-mobile.md → ai-src/skills/sungen-selector-fix-mobile/SKILL.md} +5 -0
- package/dist/orchestrator/templates/{ai-instructions/claude-skill-tc-generation.md → ai-src/skills/sungen-tc-generation/SKILL.md} +5 -0
- package/dist/orchestrator/templates/playwright.config.ts +7 -4
- package/package.json +3 -3
- package/src/capabilities/discover.ts +29 -3
- package/src/cli/commands/add-flow.ts +2 -0
- package/src/cli/commands/add.ts +4 -0
- package/src/cli/commands/capability.ts +64 -1
- package/src/cli/commands/delivery.ts +89 -2
- package/src/cli/commands/eval.ts +3 -3
- package/src/cli/commands/gate.ts +44 -0
- package/src/cli/commands/generate.ts +2 -1
- package/src/cli/commands/init.ts +50 -3
- package/src/cli/commands/journey.ts +72 -0
- package/src/cli/commands/update.ts +14 -4
- package/src/cli/index.ts +4 -0
- package/src/dashboard/snapshot-builder.ts +10 -1
- package/src/exporters/csv-exporter.ts +3 -1
- package/src/exporters/json-exporter.ts +3 -1
- package/src/exporters/mobile-app-id.ts +34 -0
- package/src/exporters/spec-parser.ts +6 -2
- package/src/generators/test-generator/adapters/adapter-interface.ts +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +7 -4
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +20 -3
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +4 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +4 -1
- package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +3 -0
- package/src/generators/test-generator/code-generator.ts +49 -9
- package/src/generators/test-generator/template-engine.ts +14 -1
- package/src/generators/test-generator/utils/selector-resolver.ts +51 -1
- package/src/harness/audit.ts +9 -2
- package/src/harness/catalog/universal-viewpoints.yaml +15 -0
- package/src/harness/eval/skill-lint.ts +71 -60
- package/src/harness/journey.ts +434 -0
- package/src/harness/quality-gates.ts +20 -0
- package/src/harness/sensors.ts +25 -8
- package/src/orchestrator/ai-rules-updater.ts +35 -197
- package/src/orchestrator/ai-skills/adapters.ts +52 -0
- package/src/orchestrator/ai-skills/build.ts +103 -0
- package/src/orchestrator/ai-skills/cap-stripper.ts +85 -0
- package/src/orchestrator/ai-skills/commands.ts +112 -0
- package/src/orchestrator/ai-skills/generator.ts +47 -0
- package/src/orchestrator/ai-skills/golden-skills.test.ts +124 -0
- package/src/orchestrator/ai-skills/resolve-assistants.ts +18 -0
- package/src/orchestrator/ai-skills/writer.ts +92 -0
- package/src/orchestrator/flow-manager.ts +165 -29
- package/src/orchestrator/mobile-runtime-scaffolder.ts +277 -0
- package/src/orchestrator/project-initializer.ts +159 -86
- package/src/orchestrator/screen-manager.ts +237 -22
- package/src/orchestrator/templates/ai-src/README.md +58 -0
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-add-flow.md → ai-src/commands/add-flow.md} +63 -2
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-add-screen.md → ai-src/commands/add-screen.md} +171 -6
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-create-test.md → ai-src/commands/create-test.md} +118 -4
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-dashboard.md → src/orchestrator/templates/ai-src/commands/dashboard.md} +25 -3
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-delivery.md → src/orchestrator/templates/ai-src/commands/delivery.md} +67 -3
- package/src/orchestrator/templates/ai-src/commands/design.md +29 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-feedback.md → src/orchestrator/templates/ai-src/commands/feedback.md} +34 -3
- package/src/orchestrator/templates/{ai-instructions/claude-cmd-locale.md → ai-src/commands/locale.md} +56 -4
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-review.md → src/orchestrator/templates/ai-src/commands/review.md} +57 -2
- package/{dist/orchestrator/templates/ai-instructions/claude-cmd-run-test.md → src/orchestrator/templates/ai-src/commands/run-test.md} +116 -5
- package/src/orchestrator/templates/ai-src/config/codex.md +8 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md → src/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md} +11 -0
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-error-mapping.md → src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md} +49 -9
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-harness-audit.md → src/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md} +5 -5
- package/{dist/orchestrator/templates/ai-instructions/claude-skill-locale.md → src/orchestrator/templates/ai-src/skills/sungen-locale/SKILL.md} +275 -3
- package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix.md → src/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md} +17 -0
- package/src/orchestrator/templates/{ai-instructions/claude-skill-selector-fix-mobile.md → ai-src/skills/sungen-selector-fix-mobile/SKILL.md} +5 -0
- package/src/orchestrator/templates/{ai-instructions/claude-skill-tc-generation.md → ai-src/skills/sungen-tc-generation/SKILL.md} +5 -0
- package/src/orchestrator/templates/playwright.config.ts +7 -4
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-design.md +0 -12
- package/dist/orchestrator/templates/ai-instructions/claude-skill-selector-fix.md +0 -347
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-add-flow.md +0 -86
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-add-screen.md +0 -131
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +0 -93
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-dashboard.md +0 -65
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-delivery.md +0 -83
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-design.md +0 -13
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-feedback.md +0 -24
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-locale.md +0 -70
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-review.md +0 -38
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +0 -155
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +0 -184
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-harness-audit.md +0 -85
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-locale.md +0 -291
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +0 -316
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +0 -221
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +0 -617
- package/src/orchestrator/templates/ai-instructions/claude-cmd-design.md +0 -12
- package/src/orchestrator/templates/ai-instructions/claude-skill-api-design.md +0 -62
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-figma-mcp.md +0 -82
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-figma-pat.md +0 -117
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-live.md +0 -60
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-local.md +0 -38
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture.md +0 -35
- package/src/orchestrator/templates/ai-instructions/claude-skill-dashboard.md +0 -121
- package/src/orchestrator/templates/ai-instructions/claude-skill-delivery.md +0 -141
- package/src/orchestrator/templates/ai-instructions/claude-skill-error-mapping.md +0 -157
- package/src/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +0 -446
- package/src/orchestrator/templates/ai-instructions/claude-skill-ingest-legacy.md +0 -79
- package/src/orchestrator/templates/ai-instructions/claude-skill-mobile-gestures.md +0 -109
- package/src/orchestrator/templates/ai-instructions/claude-skill-selector-fix.md +0 -347
- package/src/orchestrator/templates/ai-instructions/claude-skill-tc-review.md +0 -320
- package/src/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +0 -118
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-a-data-entry.md +0 -203
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-b-data-ops.md +0 -179
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-c-data-explore.md +0 -233
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-d-display.md +0 -226
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-e-identity.md +0 -177
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint.md +0 -118
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-add-flow.md +0 -86
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-add-screen.md +0 -131
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +0 -93
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-dashboard.md +0 -65
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-delivery.md +0 -83
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-design.md +0 -13
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-feedback.md +0 -24
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-locale.md +0 -70
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-review.md +0 -38
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +0 -155
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-api-design.md +0 -62
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +0 -184
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-mcp.md +0 -82
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-pat.md +0 -117
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-live.md +0 -60
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-local.md +0 -38
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture.md +0 -35
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-dashboard.md +0 -121
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +0 -141
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-error-mapping.md +0 -157
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +0 -446
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-harness-audit.md +0 -85
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md +0 -79
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-locale.md +0 -291
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md +0 -109
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +0 -316
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +0 -221
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +0 -617
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md +0 -320
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +0 -118
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md +0 -203
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md +0 -179
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md +0 -233
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md +0 -226
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md +0 -177
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md +0 -118
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-challenge.md → ai-src/agents/challenge.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-discovery.md → ai-src/agents/discovery.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-generator.md → ai-src/agents/generator.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-agent-reviewer.md → ai-src/agents/reviewer.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-config.md → ai-src/config/claude.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/copilot-config.md → ai-src/config/copilot.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-api-design.md → ai-src/skills/sungen-api-design/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture.md → ai-src/skills/sungen-capture/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-figma-mcp.md → ai-src/skills/sungen-capture/mode-figma-mcp.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-figma-pat.md → ai-src/skills/sungen-capture/mode-figma-pat.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-live.md → ai-src/skills/sungen-capture/mode-live.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-local.md → ai-src/skills/sungen-capture/mode-local.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-dashboard.md → ai-src/skills/sungen-dashboard/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-delivery.md → ai-src/skills/sungen-delivery/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-gherkin-syntax.md → ai-src/skills/sungen-gherkin-syntax/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-ingest-legacy.md → ai-src/skills/sungen-ingest-legacy/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-mobile-gestures.md → ai-src/skills/sungen-mobile-gestures/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-selector-keys.md → ai-src/skills/sungen-selector-keys/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-tc-review.md → ai-src/skills/sungen-tc-review/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-test-design-techniques.md → ai-src/skills/sungen-test-design-techniques/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint.md → ai-src/skills/sungen-viewpoint/SKILL.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-a-data-entry.md → ai-src/skills/sungen-viewpoint/group-a-data-entry.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-b-data-ops.md → ai-src/skills/sungen-viewpoint/group-b-data-ops.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-c-data-explore.md → ai-src/skills/sungen-viewpoint/group-c-data-explore.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-d-display.md → ai-src/skills/sungen-viewpoint/group-d-display.md} +0 -0
- /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-e-identity.md → ai-src/skills/sungen-viewpoint/group-e-identity.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-challenge.md → ai-src/agents/challenge.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-discovery.md → ai-src/agents/discovery.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-generator.md → ai-src/agents/generator.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-agent-reviewer.md → ai-src/agents/reviewer.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-config.md → ai-src/config/claude.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/copilot-config.md → ai-src/config/copilot.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-api-design.md → src/orchestrator/templates/ai-src/skills/sungen-api-design/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture.md → src/orchestrator/templates/ai-src/skills/sungen-capture/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-mcp.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-figma-mcp.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-pat.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-figma-pat.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-live.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-live.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-local.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-local.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-dashboard.md → src/orchestrator/templates/ai-src/skills/sungen-dashboard/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md → src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md → src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md → src/orchestrator/templates/ai-src/skills/sungen-ingest-legacy/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md → src/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md} +0 -0
- /package/src/orchestrator/templates/{ai-instructions/claude-skill-selector-keys.md → ai-src/skills/sungen-selector-keys/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md → src/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md → src/orchestrator/templates/ai-src/skills/sungen-test-design-techniques/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-a-data-entry.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-b-data-ops.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-c-data-explore.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-d-display.md} +0 -0
- /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-e-identity.md} +0 -0
|
@@ -1,617 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sungen-tc-generation
|
|
3
|
-
description: 'Use when create-test needs to translate spec.md/Figma/UI into .feature + test-data.yaml. Invoke after requirements are read, before any selectors.yaml work.'
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## ⚠️ Gotchas — read before generating
|
|
8
|
-
|
|
9
|
-
- **Write incrementally — never emit the whole suite in one response.** Build the `.feature` in batches via successive `Write`/`Edit` (≈10–15 scenarios per call). For **Full coverage**, write tier-by-tier: `Write` Tier 1 → `Edit` append Tier 2 → `Edit` append Tier 3.
|
|
10
|
-
→ One huge `Write` can exceed the model's output-token cap → `API Error: Claude's response exceeded the N output token maximum`. Single-pass full coverage only fits when `CLAUDE_CODE_MAX_OUTPUT_TOKENS ≥ 64000`; otherwise batch. Batching also lets the audit/reviewer run per batch — higher quality.
|
|
11
|
-
|
|
12
|
-
- **Generate group-by-group (sequential here).** Copilot has no sub-agents, so generate one viewpoint group/theme at a time, tier-by-tier, keeping each `VP-` theme in its own id prefix. (The Claude Code variant fans these out as parallel `sungen-generator` shards and merges — same output shape, just no speedup. Keep each theme self-contained so it would merge cleanly either way.)
|
|
13
|
-
|
|
14
|
-
- `spec_figma.md` exists → read file only, **NEVER** call `mcp__figma__*`
|
|
15
|
-
→ PAT auth flow already done by `sungen-capture` (mode figma-pat); re-calling fails or duplicates work.
|
|
16
|
-
|
|
17
|
-
- `selectors.yaml` → do **NOT** generate — handled by `run-test`
|
|
18
|
-
→ Selectors need live DOM inspection via Playwright MCP, only `run-test` triggers it.
|
|
19
|
-
|
|
20
|
-
- `@steps:` scenarios → **NO** priority tag (setup blocks, not test cases)
|
|
21
|
-
→ Priority tags filter test runs; setup blocks must always run via `@extend:`, never be filtered out.
|
|
22
|
-
|
|
23
|
-
- Hardcode exact error messages in test-data.yaml — never leave `{{error}}` vague
|
|
24
|
-
→ Assertions are string-equal; vague placeholders produce false-positive passes.
|
|
25
|
-
|
|
26
|
-
- `@parallel` required when mixing `@auth:X` + `@no-auth` in the same feature
|
|
27
|
-
→ Playwright shares browser context per worker; auth state leaks across scenarios without isolation.
|
|
28
|
-
|
|
29
|
-
- XSS ≠ SQL injection — generate as **2 separate scenarios**, never merge
|
|
30
|
-
→ Different attack vectors (client render vs DB query) and different observable failures (alert popup vs DB error).
|
|
31
|
-
|
|
32
|
-
- **SQL injection has 2 layers — generate both when field reaches a backend query:**
|
|
33
|
-
- Layer 1 → field UI: special chars blocked by input field → `@high` automated scenario
|
|
34
|
-
- Layer 2 → API server: field accepts alphanumeric (e.g. LIKE/search field) → send payload like `1 OR 1=1` directly to API (curl/Postman, bypass UI) → verify server uses parameterized query, not string concat → `@high @manual`
|
|
35
|
-
→ Skipping Layer 2 = missing real attack vector even when field validation is correct.
|
|
36
|
-
→ Trigger: any free-text field whose value reaches a LIKE, partial-match, or dynamic WHERE clause.
|
|
37
|
-
|
|
38
|
-
- **Concurrent / race conditions — generate `@manual` when spec or viewpoint mentions multi-tab, multi-user, or simultaneous actions:**
|
|
39
|
-
→ Examples: two browser tabs same search with different conditions must not contaminate each other; double-click submit must not create duplicates.
|
|
40
|
-
→ `@normal @manual` by default — unless data integrity at risk → `@high @manual`.
|
|
41
|
-
→ Do NOT skip because "hard to automate" — document as `@manual` so it appears in the test plan.
|
|
42
|
-
|
|
43
|
-
- Spec mentions outcomes on a **different user-facing surface** (another URL, mobile app, user portal, widget)
|
|
44
|
-
→ "Single screen focus" means don't test other screens' UI patterns — it does NOT exempt you from documenting business outcomes on other surfaces.
|
|
45
|
-
→ **Always generate `@manual` scenarios for the output surface** — at minimum one `@high @manual` per cross-surface business rule.
|
|
46
|
-
→ If the output surface is reachable with a different auth role in the same test run, use `@auth:role` + `@extend` setup instead of `@manual`.
|
|
47
|
-
→ Skipping these entirely = zero test can catch "admin creates record correctly but user never sees it" — the most silent failure class.
|
|
48
|
-
→ Add `Display surfaces` + `Cross-surface rules` to the Coverage Map (see Step 2).
|
|
49
|
-
|
|
50
|
-
- Spec uses **inclusive boundary operators** (`<=`, `>=`, `≤`, `≥`, "at least N", "no more than N", "up to and including")
|
|
51
|
-
→ The boundary point itself **must** be a test case — not just "inside" and "outside" regions.
|
|
52
|
-
→ Generate: `boundary - 1` (must fail/not-display), `boundary` (must pass/display), `boundary + 1` (must pass or fail depending on direction).
|
|
53
|
-
→ Example: `end_at >= now` → test `end_at = now` (inclusive: display), `end_at = now - 1s` (exclusive: no display).
|
|
54
|
-
→ Off-by-one at inclusive boundaries is the most common display-logic bug.
|
|
55
|
-
|
|
56
|
-
- **AND condition in business rule — test each branch failing independently:**
|
|
57
|
-
When spec defines "A AND B AND C must all be true", generate:
|
|
58
|
-
(1) A fails while B/C pass, (2) B fails while A/C pass, (3) C fails while A/B pass.
|
|
59
|
-
OR condition: generate 1 scenario per branch where that branch alone triggers the outcome.
|
|
60
|
-
→ Happy-path only = missing the most common multi-condition implementation bug.
|
|
61
|
-
|
|
62
|
-
- **Many inputs, same steps → ONE data-driven scenario (`@cases`), not N copies:**
|
|
63
|
-
When a rule needs lots of inputs with the *same* step shape (email/format validation,
|
|
64
|
-
BVA boundary triples, EP classes, decision-table rows), tag one scenario `@cases:<dataset>`,
|
|
65
|
-
reference each row's columns as `{{col}}`, and put the rows as a LIST in test-data:
|
|
66
|
-
```gherkin
|
|
67
|
-
@high @cases:email_validation
|
|
68
|
-
Scenario: VP-VAL-001 The email field rejects invalid formats
|
|
69
|
-
When User fill [Email] field with {{email}}
|
|
70
|
-
Then User see [Error] message with {{expected_error}}
|
|
71
|
-
```
|
|
72
|
-
```yaml
|
|
73
|
-
email_validation:
|
|
74
|
-
- { case: "no @", email: "plainaddress", expected_error: "Invalid email" }
|
|
75
|
-
- { case: "valid", email: "ok@x.com", expected_error: "" }
|
|
76
|
-
```
|
|
77
|
-
→ one `test()` per row, each labelled by `case`. Adding inputs = editing test-data (no recompile),
|
|
78
|
-
and env overlays apply. Prefer this over duplicating a scenario per value. (Gherkin
|
|
79
|
-
`Scenario Outline`/`Examples` is NOT supported — use `@cases`.)
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Tier System
|
|
84
|
-
|
|
85
|
-
| Tier | Priority | What to generate | When |
|
|
86
|
-
|---|---|---|---|
|
|
87
|
-
| **Tier 1** (default) | `@high` | Happy paths, required validation, core business rules, security basics | First run of `create-test` |
|
|
88
|
-
| **Tier 2** (expand) | `@normal` + `@low` | UI presence, optional validation, edge cases, cosmetic checks | User runs `create-test` with "Add viewpoints" mode |
|
|
89
|
-
|
|
90
|
-
**Tier 1 stops when:**
|
|
91
|
-
- Every core user task has a happy-path scenario
|
|
92
|
-
- Every validation rule has at least one negative case (required, format, boundary)
|
|
93
|
-
- Every business rule has at least one scenario
|
|
94
|
-
- Security basics covered (auth redirect, permission blocked, injection)
|
|
95
|
-
|
|
96
|
-
**Tier 2** only when the user explicitly chooses "Add viewpoints" or "Add new sections".
|
|
97
|
-
|
|
98
|
-
**Fast-path** — display-only screens (no form, no state machine, ≤2 sections):
|
|
99
|
-
skip Coverage Map (Step 2) entirely. Go straight to Output Format with Tier 1 VP-UI presence checks
|
|
100
|
-
and any obvious VP-SEC (auth redirect). Spec drives nothing here — viewpoint covers it.
|
|
101
|
-
|
|
102
|
-
## Update Mode
|
|
103
|
-
|
|
104
|
-
When `.feature` already has scenarios, summarize and ask:
|
|
105
|
-
1. **Add new sections** — append Tier 1 scenarios, continue numbering
|
|
106
|
-
2. **Add viewpoints** — expand existing sections with Tier 2 scenarios
|
|
107
|
-
3. **Replace all** — overwrite with fresh Tier 1 generation
|
|
108
|
-
|
|
109
|
-
For append: read highest `VP-<CAT>-<NNN>`, continue from next number. Never modify existing scenarios.
|
|
110
|
-
|
|
111
|
-
> **IDs are immutable & append-only.** The dashboard tracks each test case by its ID (namespaced at export as `<SCREEN>-<CAT>-<NNN>`, e.g. `LOGIN-SEC-001`). When updating a `.feature`:
|
|
112
|
-
> - **Never renumber** existing scenarios — even when earlier ones were deleted. Renumbering changes the dashboard key and loses that test's pass/fail history.
|
|
113
|
-
> - **New scenarios** take the next unused number per `VP-<CAT>` group (continue from the highest; do NOT fill gaps left by deletions).
|
|
114
|
-
> - **Deleting** a scenario retires its number permanently — never reuse it.
|
|
115
|
-
> - Editing a scenario's title text or steps is fine — the ID stays the same.
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Input Sources
|
|
120
|
-
|
|
121
|
-
Auto-detected by `create-test` before invoking this skill:
|
|
122
|
-
- `spec.md` — primary, always read if present
|
|
123
|
-
- `spec_figma.md` — Figma supplement (PAT flow already done — just read the file)
|
|
124
|
-
- `ui/*.png` — visual context
|
|
125
|
-
- `test-viewpoint.md` — test conditions checklist; scan entirely regardless of format.
|
|
126
|
-
Format varies across projects: hierarchical table (Level 1–4 columns), flat checklist,
|
|
127
|
-
prose, or mixed. Regardless of format:
|
|
128
|
-
1. Scan entire file top to bottom.
|
|
129
|
-
2. Each row / bullet / item = 1 viewpoint → add to `Viewpoint items` in Coverage Map.
|
|
130
|
-
3. Do NOT pre-classify into buckets before scanning — classify only when
|
|
131
|
-
writing the scenario.
|
|
132
|
-
4. **If it declares viewpoint IDs** (e.g. `VP0`, `VP1`…`VP12`, `MS-HP-001`), capture each
|
|
133
|
-
item WITH its ID and **reuse that ID as the scenario code** — do not invent a generic
|
|
134
|
-
`VP-<CAT>` scheme (the harness Taxonomy-match gate FAILs on mismatch).
|
|
135
|
-
- `qa/context.md` — project-wide context set by the QA lead. Read ONCE before building the Coverage Map; apply to every screen. Extraction rules:
|
|
136
|
-
- **Roles** → for each role in the table: add to the `@auth:X` tag pool; generate a VP-SEC blocked-access scenario for every role boundary relevant to this screen.
|
|
137
|
-
- **Testing strategy → Focus areas** → if `security` listed: VP-SEC is mandatory Tier 1 for every free-text input regardless of spec risk level; if `ui` not listed: all VP-UI scenarios move to Tier 2 minimum.
|
|
138
|
-
- **Testing strategy → Mandatory coverage** → each line is a hard override applied to this screen regardless of spec risk; document in `Context constraints` of the Coverage Map.
|
|
139
|
-
- **Testing strategy → Deprioritize/skip** → record in `Context constraints`; suppress those VP categories from Tier 1 generation.
|
|
140
|
-
- **Global business rules** → add each to the `Business rules` section tagged `[G]` (e.g. `[G1 – soft-delete only]`); treat as `HIGH` risk unless stated otherwise.
|
|
141
|
-
- **Error patterns** → use as fallback only when `spec.md` does not give exact error text; never override spec-specified messages.
|
|
142
|
-
- If `qa/context.md` is absent: proceed without it — no impact on the generation flow.
|
|
143
|
-
|
|
144
|
-
**Single screen focus**: one URL = one screen. Modals on same page = part of this screen.
|
|
145
|
-
This means: do not test other screens' UI layout or navigation. It does NOT mean skip documenting business outcomes that your screen's actions cause on other surfaces. Those cross-surface outcomes must appear in the Coverage Map and be covered by at least `@manual` scenarios.
|
|
146
|
-
|
|
147
|
-
**Capture real data** from live page or Figma: option labels, error messages, counter keywords. Hardcode in `test-data.yaml` — stale data that fails fast beats `@manual` that never runs.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Generation Workflow
|
|
152
|
-
|
|
153
|
-
### Step 1 — Orient: patterns + risk
|
|
154
|
-
|
|
155
|
-
Identify core user tasks. Categorize page sections by UI pattern group using `sungen-viewpoint`:
|
|
156
|
-
data entry (A), data manipulation (B), data exploration (C), display/feedback (D), identity (E).
|
|
157
|
-
|
|
158
|
-
Proceed directly to Step 2. Pause to ask the user only when section priority is genuinely ambiguous from spec (e.g. multiple top-level forms without business context).
|
|
159
|
-
|
|
160
|
-
### Step 2 — Build Coverage Map
|
|
161
|
-
|
|
162
|
-
Read `spec.md` fully, then extract into a Coverage Map **before writing any scenario**. Nothing is skipped at this stage — risk only affects depth in Step 3.
|
|
163
|
-
|
|
164
|
-
**Risk tags:** HIGH = complex business rules, cascading fields, multi-step state changes, auth/integration. LOW = display-only, static labels, read-only fields.
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
Context constraints: [populated from qa/context.md before writing any scenario]
|
|
168
|
-
roles: [list roles, e.g. admin / manager / staff]
|
|
169
|
-
strategy: [active overrides, e.g. "VP-SEC mandatory T1", "VP-UI → T2 only"]
|
|
170
|
-
global rules: [G1 – ...] → also appear in Business rules below tagged [G]
|
|
171
|
-
→ leave empty if qa/context.md is absent or has no entries applicable to this screen
|
|
172
|
-
User journeys: [J1 – ...], [J2 – ...]
|
|
173
|
-
Validation rules: [V1 – field → "exact error text"], [V2 – ...]
|
|
174
|
-
Business rules: [B1 HIGH – ...], [B2 LOW – ...]
|
|
175
|
-
Secondary behaviors: [SB1 – tiebreaker: when X identical → sort by Y DESC]
|
|
176
|
-
[SB2 – default state when no condition applies: ...]
|
|
177
|
-
→ capture "otherwise", "when tied", "secondary sort", "fallback" rules here
|
|
178
|
-
States: [StateA → StateB], [blocked: StateC → StateA]
|
|
179
|
-
Security: [S1 HIGH – OAuth/SSO flow], [S2 HIGH – free-text inputs → XSS + SQL injection]
|
|
180
|
-
Concurrency risks: [C1 – spec/viewpoint mentions multi-tab, concurrent edit, or simultaneous action]
|
|
181
|
-
→ leave empty if neither spec nor viewpoint mentions concurrency
|
|
182
|
-
Display surfaces: [Surface1 – /url, auth:role], [Surface2 – /url, auth:user] ← list every surface spec mentions as output
|
|
183
|
-
Cross-surface rules: [B1 – action on /admin → outcome on /user (3-condition AND logic)] ← mandatory if Display surfaces exist
|
|
184
|
-
Inclusive bounds: [start_at <= now → boundary: start_at=now must display], [end_at >= now → boundary: end_at=now must display]
|
|
185
|
-
Viewpoint items: [TV-01 – <exact wording from test-viewpoint row 1>]
|
|
186
|
-
[TV-02 – <exact wording from test-viewpoint row 2>]
|
|
187
|
-
→ one entry per row/bullet in test-viewpoint.md, regardless of format
|
|
188
|
-
→ leave empty if no test-viewpoint.md present
|
|
189
|
-
Spec gaps: [G1 – behavior undocumented → verify with dev]
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
**Example — login screen (2 sections, 5 validation rules):**
|
|
193
|
-
```
|
|
194
|
-
User journeys: [J1 – account login with valid credentials]
|
|
195
|
-
Validation rules: [V1 – empty email → "Invalid email address"],
|
|
196
|
-
[V2 – short password → "Password must be at least 6 characters"],
|
|
197
|
-
[V3 – invalid format → "Invalid email address"],
|
|
198
|
-
[V4 – wrong credentials → "Invalid email or password"]
|
|
199
|
-
Business rules: [B1 HIGH – toggle is same-page state, not route change]
|
|
200
|
-
States: [Default → Account form], [Account form → Google login],
|
|
201
|
-
[Account form → Loading → Success/Error]
|
|
202
|
-
Security: [S1 HIGH – free-text email/password → XSS + SQL injection]
|
|
203
|
-
Display surfaces: [Login page – /login, no-auth] ← same surface, no cross-surface rules needed
|
|
204
|
-
Cross-surface rules: (none)
|
|
205
|
-
Inclusive bounds: (none)
|
|
206
|
-
Spec gaps: [G1 – auth error on 401 unconfirmed on live]
|
|
207
|
-
|
|
208
|
-
Tier 1 output: VP-LOGIC-001 (toggle reveals form), VP-LOGIC-002 (restore Google state),
|
|
209
|
-
VP-LOGIC-003 (login success → redirect), VP-VAL-001 (empty fields),
|
|
210
|
-
VP-VAL-002 (invalid format), VP-VAL-003 (short password),
|
|
211
|
-
VP-VAL-004 (wrong credentials), VP-SEC-001 (XSS), VP-SEC-002 (SQL injection)
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
**Example — admin notice management screen (cross-surface + inclusive bounds):**
|
|
215
|
-
```
|
|
216
|
-
User journeys: [J1 – create notice], [J2 – edit notice], [J3 – toggle active], [J4 – delete notice]
|
|
217
|
-
Validation rules: [V1 – title empty → "必須項目です"], [V2 – end_at <= start_at → "終了日時は開始日時より後に…"],
|
|
218
|
-
[V3 – title > 255 chars → "255文字以内で入力してください"]
|
|
219
|
-
Business rules: [B1 CRITICAL – notice displays on user-facing portal only when: is_active=ON AND start_at<=now AND end_at>=now],
|
|
220
|
-
[B2 HIGH – is_active=ON by default on create; not on form],
|
|
221
|
-
[B3 HIGH – toggle not blocked by date range]
|
|
222
|
-
States: [Scheduled → Live → Expired], [any → OFF via toggle]
|
|
223
|
-
Security: [S1 HIGH – free-text title/content → XSS + SQL injection], [S2 HIGH – admin-only, non-admin blocked]
|
|
224
|
-
Display surfaces: [Admin panel – /admin/notices, auth:admin], [User portal – /user-facing-url, auth:user] ← TWO surfaces
|
|
225
|
-
Cross-surface rules: [B1 – admin creates/toggles → user portal shows/hides banner; 8-combination decision table]
|
|
226
|
-
Inclusive bounds: [start_at <= now → boundary: start_at=now must display], [end_at >= now → boundary: end_at=now must display]
|
|
227
|
-
Spec gaps: [G1 – exact content max length unconfirmed]
|
|
228
|
-
|
|
229
|
-
Tier 1 output (admin surface): VP-LOGIC-001 to VP-LOGIC-013, VP-VAL-001 to VP-VAL-007, VP-SEC-001 to VP-SEC-003
|
|
230
|
-
Cross-surface output (user portal): VP-LOGIC-CS-001 @manual (M-01: all 3 ON → display),
|
|
231
|
-
VP-LOGIC-CS-002 @manual (M-05: is_active=OFF → no display),
|
|
232
|
-
VP-LOGIC-CS-003 @manual (M-03: start_at future → no display),
|
|
233
|
-
VP-LOGIC-CS-004 @manual (M-02: end_at past → no display),
|
|
234
|
-
VP-LOGIC-CS-005 @manual (boundary: start_at=now → display),
|
|
235
|
-
VP-LOGIC-CS-006 @manual (boundary: end_at=now → display)
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
**❌ Bad Coverage Map — silently misses validation rules AND cross-surface outcomes:**
|
|
239
|
-
```
|
|
240
|
-
User journeys: [J1 – create notice], [J2 – edit notice]
|
|
241
|
-
Business rules: [B1 – display logic: is_active + date range]
|
|
242
|
-
Security: [S1 – admin only]
|
|
243
|
-
```
|
|
244
|
-
→ Output misses VP-VAL-* entirely (validation rules not listed with exact messages).
|
|
245
|
-
→ Output misses user portal scenarios entirely (no `Display surfaces` or `Cross-surface rules` field).
|
|
246
|
-
→ Output misses boundary tests for `start_at <= now`, `end_at >= now` (no `Inclusive bounds` field).
|
|
247
|
-
→ Root cause: Coverage Map only captured admin CRUD journeys; spec section on "display flow" and "user-facing surface" was not scanned into the map.
|
|
248
|
-
|
|
249
|
-
**✅ Good** — see admin notice example above: `Display surfaces` lists every URL spec mentions as output, `Cross-surface rules` maps each admin action to its user-facing outcome, `Inclusive bounds` flags every `<=`/`>=` for BVA. Every item maps to a VP-ID in `Tier 1 output`.
|
|
250
|
-
|
|
251
|
-
#### Critical business-viewpoint pre-gate — pass `sungen audit` on the FIRST pass
|
|
252
|
-
|
|
253
|
-
> The harness gate FAILS (and forces repair rounds → wasted tokens) when a page-type's critical **business** viewpoints are missing or **shallow**. Generate them correctly the first time. A business-critical `Then` must assert **DATA**, never just `see [X] page/section/modal`.
|
|
254
|
-
|
|
255
|
-
**By page-type, generate a DEEP scenario for each (before expanding UI/validation/subscription):**
|
|
256
|
-
|
|
257
|
-
| Page-type | Must-cover viewpoints (each with a data assertion) |
|
|
258
|
-
|---|---|
|
|
259
|
-
| **e-commerce list / home** | list-data (card has image+name+price+add) · product-detail-consistency · cart-correctness · category-filter-correctness · **brand-filter-correctness (separate from category)** · add-to-cart success · nav-core |
|
|
260
|
-
| **form** | required-validation · format/boundary · submit-success |
|
|
261
|
-
| **auth** | valid-login · invalid-credential · access-control |
|
|
262
|
-
|
|
263
|
-
**Required assertion shapes (use these, not bare visibility):**
|
|
264
|
-
- Card info: assert at **card level** (image+name+price together), e.g. `User see all [Product Card] contain {{...}}` — not `see [Section]` (section-level passes even if one card lacks price).
|
|
265
|
-
- Cross-screen consistency (detail/cart): **capture then compare** —
|
|
266
|
-
```gherkin
|
|
267
|
-
When User remember [Product Name] text as {{selected_product_name}}
|
|
268
|
-
And User remember [Product Price] text as {{selected_product_price}}
|
|
269
|
-
And User click [View Product] link
|
|
270
|
-
Then User see [Detail Product Name] header with {{selected_product_name}}
|
|
271
|
-
And User see [Detail Product Price] text contains {{selected_product_price}}
|
|
272
|
-
```
|
|
273
|
-
Cross-screen target → **automate it in the flow** (`/sungen:add-flow`), NOT as a `@manual` screen copy. A single home→target journey runs as one Playwright test, so it is automatable — "needs another screen" is not a reason for `@manual`. The screen keeps its screen-contract scenarios; the flow owns the cross-screen depth.
|
|
274
|
-
- Filter result (category AND brand, separately): `Then User see all [Result Product Name] contain {{selected_category}}` — proves EVERY item belongs, not one.
|
|
275
|
-
|
|
276
|
-
**Depth is a GATE dimension (harness-roadmap P1) — self-raise, never silently go shallow:**
|
|
277
|
-
- For every data-correctness theme the catalog marks `depth.requires: data-assertion`, emit its `depth.template` shape by **default** — don't wait for the repair loop. `sungen audit` measures `businessDepth` (ratio of these scenarios that assert data) against an intent threshold (functional ≥ 0.70); below it the **gate FAILs**.
|
|
278
|
-
- **Verify depth deterministically before the gate:** run `sungen depth-lint --screen <name>`. It classifies every shallow business-critical scenario into **deepen-in-place** (add the theme's value assertion — the printed `template` is a hint, fit it to the actual claim) vs **cross-screen** (route to a flow / `@manual:Mx`). Clear the `deepen` list first — this is the mechanical way to hit `businessDepth` on the first pass instead of churning repair rounds. Never fake a value assertion onto a visibility/behavior scenario the lint over-counts; leave it and note the over-count.
|
|
279
|
-
- `depth.cross_screen: true` (cart / detail / filter / brand correctness) → write the deep capture/compare shape as an **automated flow scenario** (in the flow — do NOT leave a full-step `@manual` duplicate on the screen). `@manual` is **only** for genuine judgment (M6 visual/UX · M8 not-worth · M9 human) or a missing capability (M1–M5/M7), and it **must** carry a reason code (`@manual:Mx`, or a reason comment the planner can infer). A `@manual` scenario that still has full automatable steps (a data assertion, no visual/mock/a11y judgment) is now flagged by `sungen audit` as `MANUAL-AUTOMATABLE`, and business-critical scenarios you defer to `@manual` are reported as `DEPTH-DEFERRED` (they do NOT silently inflate `businessDepth`). Deferring automatable work to `@manual` lowers quality — automate it in the flow instead.
|
|
280
|
-
- **Pick the right `@manual:Mx` code — it decides which driver can later automate the case** (`sungen audit` flags a code↔reason mismatch). Tag the code that matches the **oracle the reason describes**:
|
|
281
|
-
|
|
282
|
-
| The reason needs… | Code | Unblocked by |
|
|
283
|
-
|---|---|---|
|
|
284
|
-
| a data state you can't make from the UI (empty list, seeded record, missing-image product) | `M1` | data-factory / db |
|
|
285
|
-
| an **API/DB/persistence** assertion (stored value, parameterized-query / SQLi-safe, server-side effect) | `M2` | **api / db** |
|
|
286
|
-
| network / fault injection (offline, slow, request failure) | `M3` | mock |
|
|
287
|
-
| a stable selector / test-id that doesn't exist | `M4` | — (locator contract) |
|
|
288
|
-
| an external dependency (email, payment gateway, download) | `M5` | mail-file / contract |
|
|
289
|
-
| visual / UX / responsive / a11y judgment | `M6` | — (keep manual) |
|
|
290
|
-
| not worth automating · true human judgment | `M8` / `M9` | — (keep manual) |
|
|
291
|
-
|
|
292
|
-
e.g. "submit a payload then check the subscribers **table**" is an API+DB oracle → `@manual:M2` (NOT `M1`); "seed a DB with zero products" is a data state → `M1`; "throttle the network" → `M3`.
|
|
293
|
-
- **Prefer automation-ready `@requires:<cap>` over prose `@manual`.** When you *can* write the steps for a capability-manual case (an API/DB oracle, a seeded state), write it **automation-ready** — the real `@api`/`@query`/… steps tagged `@requires:<cap>` (e.g. `@requires:db @query:subscriber_row`) — instead of a prose `@manual:M2`. It compiles to a skipped-with-reason stub until `sungen capability add <cap>`, then runs as a real test with **no rewrite**. Reserve prose `@manual:Mx` for cases whose steps genuinely can't be expressed (M6/M8/M9 judgment, or a capability with no driver). `sungen audit` reports these as `AUTOMATION-READY-PENDING` (not a gap, not manual).
|
|
294
|
-
- **If the spec lacks the concrete value** a deep assertion needs (exact message, price, count): still write the deep shape with a `{{var}}` placeholder and leave a `# SPEC-GAP: <field> value not in spec` comment — do **not** downgrade to `see [X] section`. A visible gap is better than a silent shallow pass.
|
|
295
|
-
- **Blind-Spot Memory:** before finishing, run `sungen blindspot list --prompt` (Bash) and make sure the suite satisfies each recorded pattern (e.g. "for any Add/Create action: check success + resulting data state + duplicate/double-submit"). These are gaps QA hit before — don't repeat them.
|
|
296
|
-
|
|
297
|
-
**First-pass anti-patterns (these are exactly what the gate/reviewer reject — avoid them):**
|
|
298
|
-
- Title↔steps mismatch: e.g. a "no-result state" scenario that clicks a query which **returns** products. Steps must create the condition the title claims.
|
|
299
|
-
- Tautology `Then`: `click [Next Slide]` → `see [Carousel] section` (always visible, proves nothing). Assert the change (new slide title differs).
|
|
300
|
-
- Business-critical scenario ending at `see [Added] modal` / `see [Cart] page` / `see [Category Products] page` with no data assertion.
|
|
301
|
-
- Brand filter covered only as navigation (must assert products belong to the brand).
|
|
302
|
-
|
|
303
|
-
**Balance:** cover all the above (deep) BEFORE expanding subscription / UI-presence / extra validation edge cases. Do not over-invest in subscription while cart/detail/filter correctness are shallow.
|
|
304
|
-
|
|
305
|
-
#### Harness gates — satisfy on the FIRST pass (don't make the repair loop fix them)
|
|
306
|
-
|
|
307
|
-
`sungen audit` enforces these. Generate compliant output up front:
|
|
308
|
-
|
|
309
|
-
1. **Taxonomy-match** (`VP-TAXONOMY-MISMATCH`, gate-FAIL) — when `test-viewpoint.md` declares its own viewpoint IDs (e.g. `VP0`, `VP1`, … `VP12`, `MS-HP-001`, `MS-EH-001`), **reuse those IDs verbatim as the scenario codes**. Do NOT invent a generic `VP-UI / VP-LOGIC / VP-VAL` scheme — that breaks the coverage matrix. Only fall back to `VP-<CATEGORY>-<NNN>` when the viewpoint file declares no IDs.
|
|
310
|
-
2. **Spec-coverage triggers** (`TRIGGER-UNCOVERED`, gate-FAIL) — the Validation-Rules table lists a **trigger** per constraint (e.g. `blur, submit`). Generate one scenario **per (constraint × trigger)** — a `format` rule validating *on blur AND on submit* needs BOTH a blur scenario (`press Tab`) and a submit scenario (`click [Submit]` / `press Enter`). Never collapse the trigger × input matrix to one representative case.
|
|
311
|
-
3. **Claim-Proof** (`CLAIM-UNPROVEN`) — a title claiming `all`/`only`/`every`/`single`/`correct`/`same`/`changes`/`hidden`/`cleared`/`restored`/`independent`/`sanitized`/`announces` MUST have the matching assertion (`see all …`, count, `remember`+compare, `is hidden`, return-and-assert-empty, etc.). If the title promises it, the steps must prove it.
|
|
312
|
-
- **Negative / absence claims** (`does not` / `no` / `never` / `prevents` / `không` / `chưa` — any language; `no-side-effect/no-duplicate`, `negative-claim/absence`): the `Then` must **differ** between the claim holding and not holding. A terminal `see [X] page` that looks identical whether or not the bad thing happened proves nothing. For a side-effect that should NOT repeat (re-submit on back, re-charge, duplicate order, resend OTP), assert the **count is unchanged** (`User see [Records] table with {{one}}` / `row with {{count}}`); if it's not UI-observable, mark `@manual` with a request-count oracle (shape below). This is general — it covers any side-effect, not a fixed verb list.
|
|
313
|
-
4. **Downstream-scope** (`DOWNSTREAM-SCOPE-MISSING`) — when the spec's Navigation Flow / success target is **another screen** (e.g. a confirmation/sent page), don't stop at a terminal `see [X] page`. Either cover that screen's content/guards (if its viewpoint items are in scope — they often have their own `MS-*` IDs), or scaffold it (`sungen add --screen <name>`) and note the handoff. Do not silently drop the downstream surface.
|
|
314
|
-
5. **Manual-oracle** (`MANUAL-STEPS-INSUFFICIENT`) — every `@manual` scenario needs **setup · action · observable expected · oracle/tool**, not a one-line note. Use this comment shape:
|
|
315
|
-
```gherkin
|
|
316
|
-
@high @manual
|
|
317
|
-
Scenario: VP-… <claim>
|
|
318
|
-
# MANUAL: <why it can't be automated — needs network capture / inbox / screen-reader / multi-tab>
|
|
319
|
-
# Tester verifies:
|
|
320
|
-
# 1. <setup> e.g. seed a registered email; throttle the network
|
|
321
|
-
# 2. <action> e.g. click [Submit] with the request in flight
|
|
322
|
-
# 3. <observable> e.g. only ONE POST is dispatched
|
|
323
|
-
# 4. Oracle: <tool> e.g. DevTools Network panel / mail-catcher / NVDA
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
#### Tier 1 guard — minimum before writing scenarios
|
|
327
|
-
|
|
328
|
-
| Spec section | Minimum requirement | Tag |
|
|
329
|
-
|---|---|---|
|
|
330
|
-
| Required field | 1 required-error TC per field | `@high` |
|
|
331
|
-
| Validation rule | 1 exact-message TC per rule | `@high` |
|
|
332
|
-
| Business rule | 1 behavioral TC per rule | `@high` |
|
|
333
|
-
| **Secondary behavior / tiebreaker** | **1 TC per tiebreaker or fallback rule in `Secondary behaviors`** | **`@high`** |
|
|
334
|
-
| Auth / OAuth / permissions | 1 VP-SEC TC | `@high` |
|
|
335
|
-
| Free-text input | 1 XSS TC **and** 1 SQL injection TC (separate) | `@high` |
|
|
336
|
-
| **Free-text LIKE / partial-match field** | **1 field-level SQL TC + 1 API-level SQL `@manual` TC** | **`@high`** |
|
|
337
|
-
| Lifecycle states | 1 key state transition TC | `@high` |
|
|
338
|
-
| Public page | 1 accessible-without-auth TC | `@high` |
|
|
339
|
-
| **Cross-surface business rule** | **1 `@high @manual` TC per affected surface per rule** — even if not automated today | **`@high`** |
|
|
340
|
-
| **Inclusive boundary condition** (`<=`, `>=`) | **4 TCs per range: `min-1` (fail), `min` (pass), `max` (pass), `max+1` (fail)** — never skip the exact boundary point | **`@high`** |
|
|
341
|
-
| **Concurrency risk (from `Concurrency risks`)** | **1 `@manual` TC per risk — `@normal` unless data integrity at risk → `@high`** | **`@normal`** |
|
|
342
|
-
| States row (Default / Loading / Error / Success) | 1 visual state TC per named state — separate from lifecycle transition TC | `@normal` |
|
|
343
|
-
| Actions secondary (cancel, reset, export) | 1 behavior TC per secondary action | `@normal` |
|
|
344
|
-
|
|
345
|
-
> **Completeness check** — after generating all scenarios, scan Coverage Map line by line.
|
|
346
|
-
> Every spec item must map to at least one scenario. Every `Viewpoint items` entry must be mapped to a VP-ID or marked `[covered: VP-ID]`. Do NOT silently skip either source.
|
|
347
|
-
> Specifically verify: `Display surfaces` each have ≥1 scenario; `Inclusive bounds` each have a boundary-point TC.
|
|
348
|
-
|
|
349
|
-
#### Tier 2 strategy
|
|
350
|
-
|
|
351
|
-
Walk `spec.md` top-to-bottom and apply `sungen-viewpoint` Tier 2 checklist for each identified pattern. Depth by risk: high-risk section → all items; low-risk → presence checks only. Skip items already covered by Tier 1.
|
|
352
|
-
For HIGH-tagged sections: use the same depth as Step 3 (full BVA + Decision Table) when generating new Tier 2 VP-VAL items not already covered by Step 3. For LOW-tagged sections: EP valid + EP invalid only — skip BVA and Decision Table. Do NOT re-generate scenarios already created in Step 3.
|
|
353
|
-
|
|
354
|
-
**When `test-viewpoint.md` is present — mandatory line-by-line scan:**
|
|
355
|
-
Every item in `test-viewpoint.md` must appear in `Viewpoint items` of the Coverage Map (done in Step 2). In Tier 2, walk `Viewpoint items` line by line:
|
|
356
|
-
- Item already covered by Tier 1 → mark `[covered: VP-ID]`, skip.
|
|
357
|
-
- Item automatable → generate `@normal` scenario.
|
|
358
|
-
- Item requires DB setup / network manipulation → `@normal @manual`.
|
|
359
|
-
- Item marked as known bug → `@manual` with comment `# Known issue: <ID>`.
|
|
360
|
-
|
|
361
|
-
> **Viewpoint completeness check** — after Tier 2, every `Viewpoint items`
|
|
362
|
-
> entry must be mapped to a VP-ID or marked `[covered: VP-ID]`.
|
|
363
|
-
> If any item has neither → generate missing scenario before finishing.
|
|
364
|
-
> Do NOT silently skip viewpoint items because they seem redundant or
|
|
365
|
-
> hard to automate.
|
|
366
|
-
|
|
367
|
-
### Step 3 — Apply test design techniques
|
|
368
|
-
|
|
369
|
-
Delegate to `sungen-test-design-techniques` for technique selection and depth.
|
|
370
|
-
Risk level from Coverage Map drives depth: HIGH section → full BVA / Decision Table; LOW section → EP valid+invalid only.
|
|
371
|
-
|
|
372
|
-
**BVA constraint:** Use compact 4-point mode only (min-1, min, max, max+1). Do not apply Full 6-point mode.
|
|
373
|
-
|
|
374
|
-
### Step 4 — Supplement with viewpoint checklists
|
|
375
|
-
|
|
376
|
-
Use `sungen-viewpoint` for defect-prone patterns spec never documents. Skip items already covered by spec-driven scenarios.
|
|
377
|
-
|
|
378
|
-
> **XSS and SQL injection** are generated at Tier 1 guard (Step 2). Skip them when applying `sungen-viewpoint` Shared Checks — do not generate again.
|
|
379
|
-
|
|
380
|
-
#### 4a. Shared Checks — generate ONCE per screen
|
|
381
|
-
|
|
382
|
-
Apply the **Shared Checks table in `sungen-viewpoint`** (single source). Generate each at most once per screen, not per pattern. Since XSS and SQL injection are already covered at the Tier 1 guard (Step 2, above), at this step generate only the remaining ones that fit the screen: **Loading State** (any async fetch), **Empty State** (any list/table/card that can return 0 records), **URL Manipulation** (URL params affecting displayed data).
|
|
383
|
-
|
|
384
|
-
#### 4b. Pattern Tier 1 / Tier 2
|
|
385
|
-
|
|
386
|
-
**Gap check rule — Step 4b fills gaps from Step 3, not a new generation source:**
|
|
387
|
-
- **VP-VAL BVA/EP items**: skip if Step 3 already generated scenarios for that field. Generate only if Step 3 missed the field entirely.
|
|
388
|
-
- **VP-LOGIC, VP-UI, VP-SEC items**: generate normally — Step 3 does not cover these.
|
|
389
|
-
|
|
390
|
-
- **Tier 1**: all items from `#### Tier 1 — @high` → VP-LOGIC, VP-VAL, VP-SEC
|
|
391
|
-
- **Tier 2**: items from `#### Tier 2 — @normal + @low` → VP-UI
|
|
392
|
-
|
|
393
|
-
Risk weighting: high-risk section → all Tier 1 items. Low-risk (e.g. read-only table) → only clearly applicable items.
|
|
394
|
-
|
|
395
|
-
#### 4c. Cross-pattern interactions — where spec-invisible bugs live
|
|
396
|
-
|
|
397
|
-
For every pair of patterns present on the screen, walk the **⚡ Cross-pattern interactions** list in each `sungen-viewpoint` group file (single source). Never-miss pairs:
|
|
398
|
-
- **Create / Update / Delete × Data Table** — new record missing or count not updated; row shows stale data; last-record delete → blank page.
|
|
399
|
-
- **Search / Filter × Pagination** — results don't reset to page 1.
|
|
400
|
-
- **Form × Modal/Dialog** — modal stays open on success / data wiped on failure.
|
|
401
|
-
- **Import × Data Table** — table not refreshed / count wrong after import.
|
|
402
|
-
- **Sort × Data Table** — all cells in a row must reorder together (data must not shift to wrong columns).
|
|
403
|
-
- **Filter (≥2 active)** — generate 1 scenario with all filters active simultaneously to verify AND logic.
|
|
404
|
-
|
|
405
|
-
Cross-pattern: `@high` by default.
|
|
406
|
-
|
|
407
|
-
**Assert values, not existence.** Never bare "is visible". Capture exact error messages into test-data.yaml.
|
|
408
|
-
|
|
409
|
-
---
|
|
410
|
-
|
|
411
|
-
## Priority Tags
|
|
412
|
-
|
|
413
|
-
Every scenario **MUST** have exactly one priority tag. Assign by user impact per the **"Assign priority by user impact"** table in `sungen-gherkin-syntax`; override only when context differs.
|
|
414
|
-
|
|
415
|
-
Quick fallback: auth / CRUD / security / required-field / unique-constraint → `@high`; format validation / standard-range boundary / search / filter / sort → `@normal`; presence / label / placeholder / cosmetic → `@low`. (Inclusive-operator or critical boundary → `@high`.)
|
|
416
|
-
|
|
417
|
-
---
|
|
418
|
-
|
|
419
|
-
## SPA Wait-For Steps
|
|
420
|
-
|
|
421
|
-
```gherkin
|
|
422
|
-
Given User is on [Screen] page
|
|
423
|
-
And User wait for [Page Title] heading is visible
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
---
|
|
427
|
-
|
|
428
|
-
## Cleanup & Hooks
|
|
429
|
-
|
|
430
|
-
Add cleanup tags per the `sungen-gherkin-syntax` Cleanup table. Key rules:
|
|
431
|
-
- **Always `@cleanup:overlay`** if ANY section opens a dialog; **always `@cleanup:forms`** if the screen has inline search, filter, or editable forms.
|
|
432
|
-
- **`@parallel`** is required when mixing auth groups (`@auth:X` + `@no-auth`); recommended for validation-heavy features needing a clean form state per scenario.
|
|
433
|
-
- **`@afterEach`** hook only when `@cleanup:*` tags aren't enough (feature-specific reset logic).
|
|
434
|
-
|
|
435
|
-
---
|
|
436
|
-
|
|
437
|
-
## Output Format
|
|
438
|
-
|
|
439
|
-
**Files:** `qa/screens/<screen>/features/<screen>.feature` + `qa/screens/<screen>/test-data/<screen>.yaml`
|
|
440
|
-
|
|
441
|
-
Use step patterns and element types from `sungen-gherkin-syntax`.
|
|
442
|
-
**Naming**: reuse the **project's `test-viewpoint.md` IDs** when it declares them (e.g. `VP0`, `MS-HP-001`); otherwise `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
|
|
443
|
-
|
|
444
|
-
**Test data** — grouped by section, loaded at runtime:
|
|
445
|
-
|
|
446
|
-
```yaml
|
|
447
|
-
# login.yaml (base)
|
|
448
|
-
valid_email: admin@dev.example.com
|
|
449
|
-
valid_password: DevPass123
|
|
450
|
-
|
|
451
|
-
# login.staging.yaml (override)
|
|
452
|
-
valid_email: admin@staging.example.com
|
|
453
|
-
valid_password: StagingPass456
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
**DataTable vs Row Scope:**
|
|
457
|
-
|
|
458
|
-
| Pattern | Use when |
|
|
459
|
-
|---|---|
|
|
460
|
-
| `table match data:` + DataTable | Verifying **multiple rows** exist with expected values |
|
|
461
|
-
| `row in [Table] table with {{v}}` + `column with {{v}}` | Single row detail or action on a row |
|
|
462
|
-
|
|
463
|
-
---
|
|
464
|
-
|
|
465
|
-
## Worked Example — spec → Coverage Map → output
|
|
466
|
-
|
|
467
|
-
A minimal end-to-end pass. Use this to calibrate output: every Coverage Map line below maps to exactly one scenario, and every `{{var}}` exists in the YAML.
|
|
468
|
-
|
|
469
|
-
**① Input — `spec.md` (excerpt):**
|
|
470
|
-
```
|
|
471
|
-
## Coupon Form
|
|
472
|
-
- Code: required, free text, max 20 chars, must be unique.
|
|
473
|
-
- Discount %: required, integer 1–100 inclusive.
|
|
474
|
-
- Submit creates a coupon; it appears at the top of the Coupon List.
|
|
475
|
-
- Only authenticated admins can create coupons.
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
**② Coverage Map (Step 2 output):**
|
|
479
|
-
```
|
|
480
|
-
User journeys: [J1 – admin creates coupon → appears top of list]
|
|
481
|
-
Validation rules: [V1 – code empty → "Code is required"],
|
|
482
|
-
[V2 – code > 20 chars → "Code must be 20 characters or less"],
|
|
483
|
-
[V3 – duplicate code → "Code already exists"],
|
|
484
|
-
[V4 – discount empty → "Discount is required"]
|
|
485
|
-
Business rules: [B1 HIGH – new coupon sorts to top of list]
|
|
486
|
-
States: (none — no lifecycle)
|
|
487
|
-
Security: [S1 HIGH – free-text code → XSS + SQL injection], [S2 HIGH – admin-only]
|
|
488
|
-
Display surfaces: [Coupon admin – /admin/coupons, auth:admin] ← single surface
|
|
489
|
-
Cross-surface rules: (none)
|
|
490
|
-
Inclusive bounds: [discount 1–100 inclusive → BVA: 0, 1, 100, 101]
|
|
491
|
-
Spec gaps: (none)
|
|
492
|
-
|
|
493
|
-
Tier 1 output: VP-LOGIC-001 (create → top of list), VP-VAL-001 (code empty),
|
|
494
|
-
VP-VAL-002 (code > 20), VP-VAL-003 (duplicate code), VP-VAL-004 (discount empty),
|
|
495
|
-
VP-VAL-005 (discount=0 reject), VP-VAL-006 (discount=1 accept),
|
|
496
|
-
VP-VAL-007 (discount=100 accept), VP-VAL-008 (discount=101 reject),
|
|
497
|
-
VP-SEC-001 (XSS), VP-SEC-002 (SQL injection), VP-SEC-003 (non-admin blocked)
|
|
498
|
-
```
|
|
499
|
-
> Note how `Inclusive bounds` line forces 4 BVA scenarios (0/1/100/101), not just "valid + invalid".
|
|
500
|
-
|
|
501
|
-
**③ Output — `coupons.feature` (excerpt, 4 of 12 scenarios):**
|
|
502
|
-
```gherkin
|
|
503
|
-
@parallel @auth:admin
|
|
504
|
-
@cleanup:overlay
|
|
505
|
-
@cleanup:forms
|
|
506
|
-
Feature: Coupons Screen
|
|
507
|
-
|
|
508
|
-
Background:
|
|
509
|
-
Given User is on [Coupons] page
|
|
510
|
-
|
|
511
|
-
@steps:open_create_form
|
|
512
|
-
Scenario: Open create form
|
|
513
|
-
When User click [Create Coupon] button
|
|
514
|
-
Then User see [Create Coupon] dialog
|
|
515
|
-
|
|
516
|
-
# --- Section: Create Coupon (Tier 1) ---
|
|
517
|
-
|
|
518
|
-
@high @extend:open_create_form
|
|
519
|
-
Scenario: VP-LOGIC-001 Submit valid coupon adds it to top of list
|
|
520
|
-
Given User is on [Create Coupon] dialog
|
|
521
|
-
When User fill [Code] field with {{valid_coupon.code}}
|
|
522
|
-
And User fill [Discount] field with {{valid_coupon.discount}}
|
|
523
|
-
And User click [Save] button
|
|
524
|
-
Then User see [Create Coupon] dialog is hidden
|
|
525
|
-
And User see [Coupon List] row in [Coupon List] table with {{valid_coupon.code}}
|
|
526
|
-
|
|
527
|
-
@high @extend:open_create_form
|
|
528
|
-
Scenario: VP-VAL-005 Discount of 0 is rejected (boundary min-1)
|
|
529
|
-
Given User is on [Create Coupon] dialog
|
|
530
|
-
When User fill [Code] field with {{valid_coupon.code}}
|
|
531
|
-
And User fill [Discount] field with {{discount_zero}}
|
|
532
|
-
And User click [Save] button
|
|
533
|
-
Then User see [Discount Error] message with {{error.discount_range}}
|
|
534
|
-
|
|
535
|
-
@high @extend:open_create_form
|
|
536
|
-
Scenario: VP-VAL-006 Discount of 1 is accepted (boundary min)
|
|
537
|
-
Given User is on [Create Coupon] dialog
|
|
538
|
-
When User fill [Code] field with {{valid_coupon.code}}
|
|
539
|
-
And User fill [Discount] field with {{discount_min}}
|
|
540
|
-
And User click [Save] button
|
|
541
|
-
Then User see [Create Coupon] dialog is hidden
|
|
542
|
-
|
|
543
|
-
@high @no-auth
|
|
544
|
-
Scenario: VP-SEC-003 Unauthenticated user is redirected to login
|
|
545
|
-
Then User see [Login] page
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
**④ Output — `coupons.yaml` (excerpt):**
|
|
549
|
-
```yaml
|
|
550
|
-
valid_coupon:
|
|
551
|
-
code: "SAVE-{{$uuid}}"
|
|
552
|
-
discount: "20"
|
|
553
|
-
discount_zero: "0" # boundary min-1 (reject)
|
|
554
|
-
discount_min: "1" # boundary min (accept)
|
|
555
|
-
discount_max: "100" # boundary max (accept)
|
|
556
|
-
discount_over: "101" # boundary max+1 (reject)
|
|
557
|
-
error:
|
|
558
|
-
discount_range: "Discount must be between 1 and 100"
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
---
|
|
562
|
-
|
|
563
|
-
## Flow Test Generation
|
|
564
|
-
|
|
565
|
-
> **Auto-detect**: if path is `qa/flows/<name>/` → use this section. Skip Steps 1–4 above.
|
|
566
|
-
|
|
567
|
-
| Aspect | Screen | Flow |
|
|
568
|
-
|---|---|---|
|
|
569
|
-
| Section focus | UI patterns per section | Journey phases across screens |
|
|
570
|
-
| Selector format | `[Element]` | `[Screen:Element]` (namespaced) |
|
|
571
|
-
| Test data keys | `{{variable}}` | `{{phase.variable}}` |
|
|
572
|
-
| Feature tag | `@auto` / `@smoke` etc. | `@flow` (required) |
|
|
573
|
-
| Viewpoints | VP-UI/VAL/LOGIC/SEC per section | VP-LOGIC (transitions), VP-SEC (auth persistence), VP-VAL (cross-screen data) |
|
|
574
|
-
|
|
575
|
-
**Scenarios to generate:**
|
|
576
|
-
|
|
577
|
-
| Category | What to test |
|
|
578
|
-
|---|---|
|
|
579
|
-
| Happy path | Complete flow end-to-end with valid data |
|
|
580
|
-
| Auth persistence | Auth state maintained across screen transitions |
|
|
581
|
-
| Error recovery | Invalid input mid-flow → fix → continue |
|
|
582
|
-
| Cross-screen data | Data entered on screen A visible on screen B |
|
|
583
|
-
|
|
584
|
-
```gherkin
|
|
585
|
-
@flow @auth:user
|
|
586
|
-
Feature: Award Submission Flow
|
|
587
|
-
|
|
588
|
-
Background:
|
|
589
|
-
Given User is on [Login] page
|
|
590
|
-
|
|
591
|
-
@high
|
|
592
|
-
Scenario: User logs in successfully
|
|
593
|
-
When User fill [Login:Email] field with {{login.email}}
|
|
594
|
-
And User fill [Login:Password] field with {{login.password}}
|
|
595
|
-
And User click [Login:Submit] button
|
|
596
|
-
Then User see [Dashboard] page
|
|
597
|
-
|
|
598
|
-
@high
|
|
599
|
-
Scenario: User submits nomination
|
|
600
|
-
When User click [Dashboard:Awards] link
|
|
601
|
-
Then User see [Awards] page
|
|
602
|
-
When User fill [Awards:Nominee] field with {{submission.nominee}}
|
|
603
|
-
And User click [Awards:Submit] button
|
|
604
|
-
Then User see {{success_message}} message
|
|
605
|
-
```
|
|
606
|
-
|
|
607
|
-
```yaml
|
|
608
|
-
# flows/<name>/test-data/<name>.yaml
|
|
609
|
-
login:
|
|
610
|
-
email: "admin@example.com"
|
|
611
|
-
password: "secret123"
|
|
612
|
-
submission:
|
|
613
|
-
nominee: "John Doe"
|
|
614
|
-
success_message: "Award submitted successfully"
|
|
615
|
-
```
|
|
616
|
-
|
|
617
|
-
**Do NOT generate**: `selectors.yaml` (created during `run-test`), Playwright code (sungen compiles).
|