@amityco/social-plus-vise 1.2.0 → 1.4.0

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +75 -2
  2. package/README.md +23 -10
  3. package/dist/capabilities.js +35 -4
  4. package/dist/entryState.js +71 -0
  5. package/dist/experience.js +70 -0
  6. package/dist/explore.js +51 -0
  7. package/dist/flow.js +382 -0
  8. package/dist/humanFormat.js +251 -0
  9. package/dist/intake.js +117 -0
  10. package/dist/intelligence/placement.js +2 -1
  11. package/dist/outcomes.js +141 -42
  12. package/dist/productExpectations.js +15 -0
  13. package/dist/requestReadiness.js +99 -0
  14. package/dist/server.js +675 -56
  15. package/dist/sidecar.js +5 -0
  16. package/dist/solutionPath.js +2 -2
  17. package/dist/tools/compliance.js +1014 -133
  18. package/dist/tools/creative.js +14 -12
  19. package/dist/tools/debug.js +83 -26
  20. package/dist/tools/design.js +344 -14
  21. package/dist/tools/experienceCompiler.js +1 -1
  22. package/dist/tools/experienceSensors.js +1 -1
  23. package/dist/tools/harness.js +13 -0
  24. package/dist/tools/integration.js +263 -90
  25. package/dist/tools/learning.js +1 -3
  26. package/dist/tools/project.js +987 -72
  27. package/dist/tools/sdkFacts.js +8 -1
  28. package/dist/tools/smoke.js +134 -0
  29. package/dist/tools/uxHarness.js +54 -6
  30. package/dist/uikitCustomization.js +22 -6
  31. package/dist/version.js +7 -3
  32. package/package.json +1 -1
  33. package/packages/intelligence/catalog/catalog.schema.json +1 -1
  34. package/packages/intelligence/catalog/experience-objects.json +2 -2
  35. package/packages/intelligence/catalog/variants.json +24 -0
  36. package/rules/event.yaml +3 -0
  37. package/rules/feed.yaml +251 -0
  38. package/rules/invitation.yaml +4 -0
  39. package/rules/live-data.yaml +110 -0
  40. package/rules/notification-tray.yaml +4 -0
  41. package/rules/poll.yaml +5 -0
  42. package/rules/sdk-lifecycle.yaml +559 -0
  43. package/rules/search.yaml +5 -0
  44. package/rules/security.yaml +12 -0
  45. package/rules/story.yaml +5 -0
  46. package/rules/user-blocking.yaml +5 -0
  47. package/skills/social-plus-vise/SKILL.md +163 -15
@@ -0,0 +1,99 @@
1
+ export function clarifyDimensions(input) {
2
+ const dims = [];
3
+ if (!input.platformDetected) {
4
+ dims.push("platform");
5
+ }
6
+ if (input.outcome === "unknown" && !input.creativeSelected && !input.uikitGuidedUnknown) {
7
+ dims.push("experience");
8
+ }
9
+ return dims;
10
+ }
11
+ const PLATFORM_QUESTION = {
12
+ dimension: "platform",
13
+ ask: "No social.plus SDK platform was detected in this repo. Which target app/platform should receive social.plus, and where is that app shell?",
14
+ why: "Vise validates real SDK code, not an abstract idea. A static or platform-unknown repo must be scaffolded or pointed at a real web TypeScript/React, React Native, Flutter, iOS, or Android surface before implementation can be verified.",
15
+ requiredDecision: "Target platform plus app/surface path to build in.",
16
+ options: [
17
+ "web TypeScript/React: package.json with @amityco/ts-sdk and a route/component to mount",
18
+ "React Native: app package plus screen/component path",
19
+ "Flutter: pubspec.yaml app plus widget/route path",
20
+ "iOS: Xcode/Swift package app plus view/module path",
21
+ "Android: Gradle app module plus Activity/Fragment/Compose screen path",
22
+ ],
23
+ answerFormat: "Tell the agent the target platform and app shell path; scaffold the platform first when it does not exist, then re-run `vise inspect` and `vise plan`.",
24
+ examples: [
25
+ "web TypeScript/React in apps/web, mount at /social",
26
+ "Android app module :app, add the surface to MainActivity/Compose navigation",
27
+ "Flutter app in mobile/, add the surface under lib/features/social/",
28
+ ],
29
+ doNot: [
30
+ "Do not paste SDK code into a static site before a platform has been chosen.",
31
+ "Do not assume web just because package.json is absent.",
32
+ ],
33
+ };
34
+ const EXPERIENCE_QUESTION = {
35
+ dimension: "experience",
36
+ routeTo: "vise creative",
37
+ ask: "The request did not name a buildable social experience. Which EI experience should be selected, or is this a no-fit for the current catalog?",
38
+ why: "A broad request like 'add social.plus features' needs a product direction before planning. Vise must not keyword-guess the experience; the host agent should use the EI candidate menu as advisory data and show the choice before accepting one.",
39
+ requiredDecision: "Selected EI experience variant, or explicit no-fit.",
40
+ answerFormat: "Run `vise creative . --request \"<intent>\"`, present the EI choice block, then run `vise creative accept . --variant <id|none> --rationale \"<why>\" --confidence high|medium|low`.",
41
+ examples: [
42
+ "community-first because the app needs topic/member spaces before feeds and chat",
43
+ "discovery-first because the core goal is browsing and finding social content",
44
+ "none because none of the surfaced candidates match the requested product motion",
45
+ ],
46
+ doNot: [
47
+ "Do not accept a variant before showing the recommendation, alternatives, tradeoffs, expected surfaces, and no-fit option.",
48
+ "Do not infer the experience from keywords alone.",
49
+ ],
50
+ };
51
+ export function clarifyGuidance(dims) {
52
+ if (dims.length === 0) {
53
+ return undefined;
54
+ }
55
+ const resolve = [];
56
+ if (dims.includes("platform")) {
57
+ resolve.push(PLATFORM_QUESTION);
58
+ }
59
+ if (dims.includes("experience")) {
60
+ resolve.push(EXPERIENCE_QUESTION);
61
+ }
62
+ const reasons = [
63
+ dims.includes("platform") ? "no SDK platform is detected" : undefined,
64
+ dims.includes("experience") ? "no buildable social feature is classified" : undefined,
65
+ ].filter((reason) => Boolean(reason));
66
+ const decisionChecklist = [
67
+ dims.includes("platform") ? "target platform/app shell and mount route or screen" : undefined,
68
+ dims.includes("experience") ? "selected EI experience, alternatives considered, or explicit no-fit" : undefined,
69
+ "after the request is classifiable: social.plus region (US/EU/SG), API-key env/config placeholder, identity source, feature scope, and route/surface placement",
70
+ "if the request is prebuilt/standard UI shaped: explicit solution_path=sdk|uikit|hybrid before hand-rolling UI",
71
+ ].filter((item) => Boolean(item));
72
+ const nextStepParts = [
73
+ "Stop before editing code and resolve `clarify.resolve` with the user",
74
+ dims.includes("experience") ? "run `vise creative`, present the EI choice block, then accept the chosen experience with rationale/confidence" : undefined,
75
+ dims.includes("platform") ? "confirm + scaffold the target platform/app shell (do not invent an integration on an undetected platform)" : undefined,
76
+ "then re-run `vise plan`.",
77
+ ].filter((part) => Boolean(part));
78
+ return {
79
+ why: `This request is not yet specific enough to produce a buildable plan (${reasons.join("; ")}).`,
80
+ resolve,
81
+ decisionChecklist,
82
+ unattended: {
83
+ status: "blocked",
84
+ mode: "handoff-required",
85
+ reason: "Blocking clarification is required before implementation can be planned safely.",
86
+ instruction: "If the user is not available, stop and return the clarify.resolve questions plus decisionChecklist. Do not choose defaults, scaffold speculative code, or proceed to init/build.",
87
+ allowedActions: [
88
+ "read-only inspect/plan output",
89
+ "run `vise creative` only to prepare an EI choice menu when the experience dimension is unresolved",
90
+ ],
91
+ resumeWhen: [
92
+ "the target platform/app shell is selected and scaffolded when required",
93
+ "the EI experience or no-fit decision is selected when required",
94
+ "a fresh `vise plan` no longer returns this clarify block",
95
+ ],
96
+ },
97
+ nextStep: nextStepParts.join(" — "),
98
+ };
99
+ }