@amityco/social-plus-vise 0.8.1 → 0.12.2
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/CHANGELOG.md +207 -0
- package/README.md +107 -40
- package/dist/capabilities.js +447 -0
- package/dist/outcomes.js +463 -5
- package/dist/server.js +115 -3
- package/dist/tools/ast.js +25 -0
- package/dist/tools/compliance.js +88 -20
- package/dist/tools/debug.js +267 -0
- package/dist/tools/design.js +1496 -0
- package/dist/tools/docs.js +9 -4
- package/dist/tools/harness.js +17 -1
- package/dist/tools/integration.js +83 -7
- package/dist/tools/project.js +872 -67
- package/dist/tools/sdkVersion.js +129 -0
- package/dist/types.js +4 -0
- package/package.json +27 -6
- package/rules/auth.yaml +298 -38
- package/rules/comments.yaml +0 -72
- package/rules/feed.yaml +1151 -12
- package/rules/live-data.yaml +316 -36
- package/rules/push.yaml +140 -0
- package/rules/sdk-lifecycle.yaml +1428 -138
- package/rules/security.yaml +60 -0
- package/skills/social-plus-vise/SKILL.md +98 -55
- package/skills/social-plus-vise/reference/debugging.md +39 -0
- package/skills/social-plus-vise/reference/operations.md +59 -0
- package/skills/vise-harness-engineer/SKILL.md +35 -0
- package/social.plus-vise.png +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@amityco/social-plus-vise` are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## 0.12.2 — 2026-06-02
|
|
8
|
+
|
|
9
|
+
**Maintenance / hygiene release.** No functional change from `0.12.1` — identical rules, validators, and CLI. This release exists to scrub an anonymized customer name from the bundled `CHANGELOG`; `0.12.0` and `0.12.1` (which contained it) were unpublished from npm. Use `0.12.2`.
|
|
10
|
+
|
|
11
|
+
## 0.12.1 — 2026-06-02
|
|
12
|
+
|
|
13
|
+
**Theme:** False-positive-frontier sweep — cross-platform FP hardening driven by the benchmark factory, plus compiler/surface ground-truth for grading. Patch release: all changes are false-positive corrections to existing rules (no new rules, no new features, no breaking changes). TP detection held at **290/290** across all of the below; every fix is locked with a both-direction regression fixture (`test/run-native-idioms.mjs`).
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **iOS/Android/Flutter push rules** no longer fire on a host app's own generic push (APNs/FCM). `push.unregister.present` and `push.payload-contract-respected` now require a social.plus push **registration nexus** (`registerPushNotification`), not the OS primitive (`didRegisterForRemoteNotifications` / a bare `onMessageReceived`). *(brownfield-iOS cell)*
|
|
17
|
+
- **Ban-state** recognizes a `currentUserIsBanned` prop guard — the ban state fetched in a parent and passed down as a prop (a camelCase boolean form the marker missed). *(brownfield-Flutter cell)*
|
|
18
|
+
- **`custom-post-type.dataType-declared`** no longer flags a plain text post (`createPost({ data: { text } })`) as a custom-data post. *(weak-model-feed cell)*
|
|
19
|
+
- **Android brownfield cluster** — `dependency.sdk` scans feature-module Gradle files (not just `app/`); `setup.lifecycle` no longer flags application-scoped setup in a Hilt `@Module`; `auth.no-anonymous-write` recognizes a write gated on `getCurrentUserId()`. *(brownfield-Android cell)*
|
|
20
|
+
- **React Native** — `client.region` recognizes a positionally-passed region arg (`createClient(KEY, AMITY_REGION)`); `logout-on-user-switch` no longer treats a React `setCurrentUser` useState setter as an SDK user-switch (now keys on the real `setActiveUser`). *(react-native-feed cell)*
|
|
21
|
+
|
|
22
|
+
### Benchmark & quality infrastructure (`bench/`)
|
|
23
|
+
- **Grading ground truth** (`bench/ground-truth.mjs`) — runs the real toolchain (`flutter analyze`, `tsc --noEmit`) where available; on compiler-less Android, flags `AmityType.member` calls whose member isn't a real surface member. Internal grading aid, **not** a shipped rule (Vise deliberately does not type-check).
|
|
24
|
+
- **Scope-aware finding collection** — `bench/collect.mjs` takes an outcome and excludes out-of-scope rules (the same filter `vise check` uses), so a scoped build isn't graded against the validate-setup everything-sweep.
|
|
25
|
+
- **Marker-boundary audit** (`bench/audit-marker-boundaries.mjs`) — surfaces `\bIDENT\b` markers that would miss a longer camelCase SDK symbol. An occasional eyeball aid, deliberately **not** a CI gate.
|
|
26
|
+
|
|
27
|
+
### Docs
|
|
28
|
+
- **ARCHITECTURE.md** — new "Sources of Truth" section (facts vs. opinion, across the SDK / docs / Vise repos), with a pointer from the docs repo's `.docs-ops/README`.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 0.12.0 — 2026-06-01
|
|
33
|
+
|
|
34
|
+
**Theme:** Beyond correctness — design conformance, feature completeness, and a self-improving false-positive loop. This release folds in everything since `0.11.0` (which shipped without notes): a full design-contract system, an advisory completeness catalog, three new integration outcomes, SDK-version currency, a large cross-platform false-positive hardening pass (corpus **265 → 300 rules**), and the benchmark factory that now drives FP reduction. All changes are backward-compatible additions or corrections — no breaking CLI changes.
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
- **Design-contract system** — `vise design check` (advisory, non-blocking) verifies a build against a design contract, and `vise design preview` renders a visual conformance report. The contract can be **extracted from an HTML/CSS prototype** (graded extractor) or **derived from the host project's own design system** via `--from-project` (CSS custom properties, Android XML, Flutter named-params, iOS `.colorset` + Swift color extensions). The contract is fed forward into the plan and skill, its digest is recorded in the compliance flow, and undefined CSS-var references are flagged as token-hygiene issues.
|
|
38
|
+
- **Advisory completeness catalog** — feature-completeness nudges with recorded scope opt-outs (the agent can decline a capability with a logged reason; completeness never gates). The capability catalog was deepened to the full social.plus SDK surface, adding stories, events, livestream rooms, pinned posts, post impressions, and message edit/delete.
|
|
39
|
+
- **Three new outcomes** — `add-community` (first-class outcome and the template for future outcomes), `add-follow` (social graph), and `add-notifications` (in-app notification tray).
|
|
40
|
+
- **SDK-version currency** — `vise plan` now surfaces advisory guidance when a project pins an older SDK than the latest published, resolved from the npm registry (TS `@amityco/ts-sdk`, React Native `@amityco/ts-sdk-react-native`; native platforms version-agnostic). Bounded by a tight registry timeout with a graceful offline fallback.
|
|
41
|
+
- **Acme-derived rules** — comment-creation rule + routing fix, mention-rendering guidance, parent/child post-type handling, and several new `add-feed` plan steps, all from real-world gap analysis.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
- **Large cross-platform false-positive hardening pass** across iOS (v8), Android, Flutter, and TypeScript/React Native — the markers now recognize the idiomatic native forms agents actually write: ban-state via `isGlobalBanned`/`isGlobalBan` and agent-derived ban booleans; service/repository (non-UI) layers skipped for ban-state/role-gated/flag-count rules; region via idiomatic TS (`API_REGIONS`) and Flutter (`httpEndpoint`/`AmityRegion`) forms; live collections via Android `LiveData`, Jetpack Compose, and Paging3 (`collectAsLazyPagingItems`); Kotlin sealed-class discriminators; one-shot `await queryX()` no longer mistaken for a subscription.
|
|
45
|
+
- **Session-handler guidance corrected** — rules and findings named `AmitySessionHandler`, a type that exists in no SDK. Corrected to the real symbols: `SessionHandler` (Android/iOS) and a `(AccessTokenRenewal renewal)` callback (Flutter). Detection was unaffected; guidance only.
|
|
46
|
+
- **Corpus grew from 265 → 300 rules.**
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
- iOS live-collection crash on files larger than 32 KB.
|
|
50
|
+
- Flutter region marker keyed on a nonexistent `socketEndpoint`; replaced with the real `httpEndpoint`/`mqttEndpoint`/`uploadEndpoint` + `AmityRegional{Http,Mqtt}Endpoint` variants.
|
|
51
|
+
- Several moderation false positives (flag is a user-level action; delete/edit are owner-or-mod) and post-datatype scoping (a comment renderer is not a post renderer).
|
|
52
|
+
|
|
53
|
+
### Benchmark & quality infrastructure (`bench/`)
|
|
54
|
+
- **Benchmark factory** — a synthetic two-track loop. A change counts as an improvement only if **FP↓ AND TP held** (coupled metric). The true-positive detection rate is a static seeded corpus (`bench/tp-dashboard.mjs`, currently 290/290); the false-positive *rate* is measured on fresh blind builds, never a static corpus. An LLM grader classifies findings FP-vs-real and is validated against labeled ground truth before being trusted. A `bench:gate` CI gate enforces the coupled metric on every change.
|
|
55
|
+
- **FP-grader grounded in the authoritative SDK symbol surface** — the grader's symbol-existence judgments are now deterministic lookups against vendored snapshots distilled from the docs repo's machine-extracted surfaces (DocC ABI / Dokka GFM / TypeDoc / dartdoc), not model recall. `bench:symbols-drift` diffs the live surface against the vendored snapshot — the seam for a future SDK-release drift trigger.
|
|
56
|
+
|
|
57
|
+
### Docs
|
|
58
|
+
- README + ARCHITECTURE/RULES/TESTING refreshed for the design, completeness, and outcomes capabilities.
|
|
59
|
+
|
|
60
|
+
### Honest scope
|
|
61
|
+
The design, completeness, and SDK-version layers are **advisory** — they inform and attest, they do not gate (only correctness gates; 7 hard gates across 300 rules). The benchmark factory measures and narrows the false-positive frontier for the idioms it has seen; it does not close it in general. Symbol-surface grounding settles whether an API exists — not whether it is used idiomatically, which remains the hand-authored opinion layer that is the product.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 0.10.0 — 2026-05-29
|
|
66
|
+
|
|
67
|
+
**Theme:** Benchmark-driven sensor expansion. The Commune benchmark (9 new SDK domains: chat, push, social graph, moderation, comments) produced the first measured, defensible advantage for vise+skill over pure MCP: **7/9 working features vs 3/9** with the same agent on the same prompts. This release ships the sensors, rules, and findings.json improvements that produced that result.
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
- `react-native.chat.channel-type-dm` / `typescript.chat.channel-type-dm` (`warning`) — DM channels must use `type: 'conversation'`, not `type: 'community'`. Agents consistently choose `community` for 1-to-1 chats because it sounds plausible but silently creates a group channel with the wrong shape. Sensor requires `userIds` co-occurrence to avoid firing on legitimate community broadcasts.
|
|
71
|
+
- `react-native.follow.status-subscription` (`warning`) — `getFollowStatus` must be wrapped in a live subscription, not a one-shot query. A one-shot call captures state at mount and never updates — follow/unfollow actions are not reflected in the UI until the user navigates away.
|
|
72
|
+
- `rationale` field in `sp-vise/findings.json` — agents see *why* each rule exists, not just *what* it requires. Improves attestation quality on rules that allow it.
|
|
73
|
+
- Compliance.json rule entries now include a `title` field (digest-stable, separate from hashing) so agents and humans can identify rules without grepping definitions.
|
|
74
|
+
- Corpus grew from **262 → 265 rules**.
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
- **`vise init` now writes `sp-vise/findings.json` immediately** — agents see current rule violations on startup with no exploration needed. Combined with the `npm run sp-check` script added to scaffolded workspaces, agents follow a directed (read findings → fix → verify) loop instead of an exploratory (search → search → search → implement) loop.
|
|
78
|
+
- **`live-collection.api-mismatch`, `posts.activity-tag-filter`, `posts.reaction-stale-post-ref`, `user.ban-state-respected`** — all now skip `.d.ts` files to eliminate false positives from type stubs.
|
|
79
|
+
- **`user.ban-state-respected`** — `flagComment` and `flagPost` added to the recognised write-pattern list. Flagging is a moderation action and must be ban-guarded.
|
|
80
|
+
- **`react-native.push.unregister.present`** — recommendation generalised; no longer references benchmark-specific state variables. Surfaces the exact `useEffect` cleanup pattern needed.
|
|
81
|
+
- Reactive markers now include `.on('dataUpdated', ...)` — the event-emitter style of subscribing to LiveCollection updates is now recognised as a valid alternative to property-callback subscription.
|
|
82
|
+
- README updated with a step-by-step Quick Start that references `findings.json` directly.
|
|
83
|
+
|
|
84
|
+
### Benchmark infrastructure (`benchmarks/`)
|
|
85
|
+
- **Commune benchmark** added — 9-slice React Native scenario (CM-SETUP, CM-PRESENCE, CM-FEED, CM-EVENTS, CM-CHAT, CM-PUSH, CM-PROFILE, CM-MODERATE, CM-COMMENTS) covering chat, push, social graph, and moderation domains absent from TouchTunes. Three seed types per slice (`baseline`, `broken`, `greenfield`) for 27 fixture sets total.
|
|
86
|
+
- **Rules-as-markdown control arm** (`benchmarks/commune/run-commune-rules-arm.sh`) — injects the rule corpus as a static document into the agent prompt. Built to isolate whether vise's measured advantage comes from *information delivery* (the rules) or the *iterative verification loop* (sp-check).
|
|
87
|
+
- **TouchTunes runner improvements** — workspace isolation (`workspaces/broken/` vs `workspaces/baseline/` so agents can't peek at the answer), `< /dev/null` stdin redirect fix that was causing agy/codex to silently skip cells, `|| true` per-cell error isolation, and grader auto-attestation for no-file and `.d.ts`-pointing rules.
|
|
88
|
+
- **agy + codex runners** (`run-agy-cells.sh`, `run-codex-cells.sh`) — production-quality scripts with TTY-detection fixes and workspace isolation.
|
|
89
|
+
|
|
90
|
+
### Findings & reports
|
|
91
|
+
- `benchmarks/FINDINGS.html` — engineering-facing summary of the benchmark methodology, results, and what was/wasn't proven.
|
|
92
|
+
- `benchmarks/MARKETING.html` — three-tier marketing-claim framework (safe / concrete / honest / aspirational) with supporting wallclock data and a list of metrics to instrument next.
|
|
93
|
+
|
|
94
|
+
### Honest claim
|
|
95
|
+
On 9 new SDK domain implementations with codex gpt-5.4, vise+skill produced 7 working features vs 3 for pure MCP — same agent, same prompts. The cost: +28% wallclock per session. The net: −52% wallclock per *working* feature, because more features ship on the first try. Vise consistently catches five bug classes that capable models otherwise miss: wrong DM channel type, missing push register/unregister lifecycle, one-shot queries where live subscriptions are required, missing ban checks before write operations, and missing flag affordances on user-generated content.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 0.9.0 — 2026-05-27
|
|
100
|
+
|
|
101
|
+
**Theme:** Business model-grounded gap analysis; Next.js / SSR guard; environment hygiene expanded to all platforms.
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
- `typescript.client.no-ssr-init` (`error`) — SDK client must not be initialized in a Next.js Server Component, `layout.tsx` without `'use client'`, or inside `getServerSideProps`/`getStaticProps`. The primary demo-invisible failure mode for AI-native Next.js customers: `next dev` recovers from the error gracefully; `next build` + production does not.
|
|
105
|
+
- `react-native.secret.env-gitignore` — React Native env files containing secret-shaped keys must be excluded by `.gitignore`.
|
|
106
|
+
- `react-native.secret.env-example` — A `.env.example` or `.env.sample` must accompany any gitignored React Native env file.
|
|
107
|
+
- `flutter.secret.env-gitignore` — Flutter `.env` or `secrets.dart` files containing secret-shaped keys must be excluded by `.gitignore`.
|
|
108
|
+
- `android.secret.env-gitignore` — `local.properties` containing secret-shaped keys must be excluded by `.gitignore`.
|
|
109
|
+
- `ios.secret.env-gitignore` — `Secrets.plist` or `*.xcconfig` files containing secret-shaped keys must be excluded by `.gitignore`.
|
|
110
|
+
- Corpus grew from **256 → 262 rules**.
|
|
111
|
+
- `benchmarks/SDK_INTEGRATION_GAP_ANALYSIS.md` — business model-grounded gap analysis mapping every SDK-relevant value claim to Vise rule coverage, with a prioritised improvement backlog.
|
|
112
|
+
|
|
113
|
+
### Changed
|
|
114
|
+
- **Skill — "Stop Instead Of Guessing":** intake list now asks about Next.js rendering mode (Server Component vs `'use client'` vs Pages Router) before implementing SDK initialization.
|
|
115
|
+
- **Skill — "Session Renewal":** new feedforward: SDK collection queries must not fire before `login()` completes; gate collection setup behind the session-active signal.
|
|
116
|
+
- **Skill — "Live Collection API Mismatch":** new guidance: handle connection-state changes and render a reconnecting indicator when the WebSocket drops.
|
|
117
|
+
- **Skill — "Debugging & Troubleshooting":** compact `--brief` flag documented; `repairBrief` output described.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 0.7.0 — 2026-05-23
|
|
122
|
+
|
|
123
|
+
**Theme:** SDK-specific rule corpus expansion + measured cross-tool benchmark.
|
|
124
|
+
|
|
125
|
+
### Added
|
|
126
|
+
- 17 new SDK-specific rule families across 5 platforms = **85 new compliance rules** (corpus grew from 167 → 252):
|
|
127
|
+
- **Tier 1 — Silent-failure traps:** `session-handler.retained`, `live-collection.api-mismatch`, `posts.status-filter-applied`, `pagination.cursor-opaque`, `posts.parent-child-rendered`
|
|
128
|
+
- **Tier 2 — Wrong-target / silent misroute:** `feed.target-type-explicit`, `comment.reference-type-enum`, `channel.type-matches-shape`
|
|
129
|
+
- **Tier 3 — Moderator-only data leaking to user UI:** `moderation.role-gated-action`, `flag-count.not-leaked-to-non-mods`, `user.ban-state-respected`
|
|
130
|
+
- **Tier 4 — Notifications & unread state:** `notifications.amity-preferences-configured`, `unread.subscribed-not-counted`
|
|
131
|
+
- **Tier 5 — Custom config & types:** `reactions.configured-name-used`, `custom-post-type.dataType-declared`
|
|
132
|
+
- **Tier 6 — File upload & media:** `file-upload.via-amity-file-client`, `image-post.child-resolution-awaited`
|
|
133
|
+
- Multi-outcome measured benchmark (chat / comments / push on React + Flutter) with cross-tool validation (Antigravity / Gemini 3.5 Flash). See `benchmarks/RESULTS.md`.
|
|
134
|
+
- Fixture-foundation gates: `run-happy-path-clean.mjs` (every canonical happy-path must fire zero rules) and `run-fixture-symmetry.mjs` (every rule's positive fixture must not fire the rule).
|
|
135
|
+
- Dedicated React Native canonical happy-path fixture (previously shared with TypeScript).
|
|
136
|
+
- New CI exit code `4` for `contract-drift` (rules in `sp-vise/compliance.json` no longer match current ruleset).
|
|
137
|
+
|
|
138
|
+
### Fixed
|
|
139
|
+
- `*.secret.inline-api-key` now catches env-fallback literal leaks: `String.fromEnvironment(..., defaultValue: 'literal')` (Dart), `process.env.X ?? 'literal'` (JS/TS), ternary fallback. Previously these forms slipped past the regex because the literal wasn't directly assigned to `apiKey`.
|
|
140
|
+
- Four web/Flutter rule false-positives on idiomatic guarded code: `typescript.client.region` now accepts env-sourced and positional region declarations; `*.network.error-handling-present` recognizes React error-state idiom; `flutter.design.reuse-detected-tokens` credits `Theme.of(context)` reuse.
|
|
141
|
+
- Pre-existing CLI version assertion in `test/run-cli.mjs` (was pinned to `0.4.0`).
|
|
142
|
+
|
|
143
|
+
### Changed
|
|
144
|
+
- Project structure flattened — `packages/foundry/` layer removed; npm package now publishes from the repo root.
|
|
145
|
+
- README consolidated from two files (brand + developer) into a single customer-facing canonical README; internal architecture moved to `docs/`.
|
|
146
|
+
|
|
147
|
+
## 0.6.0 — 2026-05-22
|
|
148
|
+
|
|
149
|
+
**Theme:** v0.6 compliance expansion + 5-platform measured benchmark.
|
|
150
|
+
|
|
151
|
+
### Added
|
|
152
|
+
- Corpus grew to 167 rules across 10 domains.
|
|
153
|
+
- Outcomes: `add-comments`, `add-moderation`, `add-chat`.
|
|
154
|
+
- Five-platform measured benchmark (TypeScript / React Native / Flutter / Android / iOS) with real `vise check` and `vise run-sensors` artifacts.
|
|
155
|
+
|
|
156
|
+
### Fixed
|
|
157
|
+
- React Native platform detection priority (previously misdetected as TypeScript when both signals were present).
|
|
158
|
+
|
|
159
|
+
## 0.5.0 — 2026-05-21
|
|
160
|
+
|
|
161
|
+
**Theme:** AST-based sensors.
|
|
162
|
+
|
|
163
|
+
### Added
|
|
164
|
+
- Tree-sitter AST sensors for Kotlin / Swift / Dart literal detection.
|
|
165
|
+
- Phase 1 pilot: `typescript.auth.no-literal-user-id` resolves identifier-via-constant indirections.
|
|
166
|
+
- Phase 4: AST-aware comment stripping for `ui-states-present` and `design-reuse-detected-tokens` rules.
|
|
167
|
+
|
|
168
|
+
## 0.4.0 — 2026-05-20
|
|
169
|
+
|
|
170
|
+
**Theme:** Compliance harness.
|
|
171
|
+
|
|
172
|
+
### Added
|
|
173
|
+
- `vise check --ci`: read-only verification with structured exit codes for CI pipelines.
|
|
174
|
+
- Attestation flow: `vise attest` with rule id, signer, confidence, evidence, and rationale.
|
|
175
|
+
- `vise sync`: persist deterministic-pass attestation files.
|
|
176
|
+
- Engagement tracking: `vise engagement init/show` for tier / customer-id / scope metadata.
|
|
177
|
+
- `sp-vise/` sidecar directory: customer-visible compliance contract (`compliance.json`, `attestations/`, `engagement.json`, `inspection.json`).
|
|
178
|
+
- Cross-platform rule corpus.
|
|
179
|
+
- Native project skill installs.
|
|
180
|
+
|
|
181
|
+
## 0.3.0 — 2026-05-19
|
|
182
|
+
|
|
183
|
+
**Theme:** Foundry → Vise rename.
|
|
184
|
+
|
|
185
|
+
### Changed
|
|
186
|
+
- Renamed npm package to `@amityco/social-plus-vise`.
|
|
187
|
+
- Added `vise` short binary alias; kept `foundry-mcp` as a compatibility binary alias.
|
|
188
|
+
- Added Claude Code skill targets (`--target claude`, `--target claude-project .`).
|
|
189
|
+
- Documented Cursor, Copilot, and VS Code instruction installs.
|
|
190
|
+
|
|
191
|
+
## 0.2.1 — 2026-05-18
|
|
192
|
+
|
|
193
|
+
### Added
|
|
194
|
+
- `vise install-skill`, `vise print-skill`, and `vise skill-path` for bundled-skill installation.
|
|
195
|
+
|
|
196
|
+
## 0.2.0 — 2026-05-17
|
|
197
|
+
|
|
198
|
+
### Added
|
|
199
|
+
- Skill-guided CLI commands: `inspect`, `plan`, `validate`, `run-sensors`.
|
|
200
|
+
- The `social-plus-vise` skill guidance shipped as part of the package.
|
|
201
|
+
|
|
202
|
+
## 0.1.1 — 2026-05-16
|
|
203
|
+
|
|
204
|
+
### Added
|
|
205
|
+
- Initial npm publish.
|
|
206
|
+
- MCP adapter (stdio).
|
|
207
|
+
- Doc search backed by `https://learn.social.plus/llms-full.txt`.
|
package/README.md
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="./social.plus-vise.png" alt="social.plus Vise" width="320" />
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
1
|
<h1 align="center">social.plus Vise</h1>
|
|
6
2
|
|
|
7
3
|
<p align="center">
|
|
@@ -45,9 +41,11 @@ See [Usage Flow](#usage-flow) for the full step-by-step diagram.
|
|
|
45
41
|
|
|
46
42
|
---
|
|
47
43
|
|
|
48
|
-
## What Vise Does
|
|
44
|
+
## What Vise Does: Agentic Workflow Governance
|
|
49
45
|
|
|
50
|
-
|
|
46
|
+
Instead of just providing a CLI or AI skills, Vise implements a technique called **Agentic Workflow Governance**. Think of it as building a software factory directly on top of the customer's project.
|
|
47
|
+
|
|
48
|
+
Vise acts as the foreman of this factory, wrapping your local coding agents in compliance guardrails when they integrate social.plus SDKs. It inspects your project, grounds the agent in hosted docs, enforces 300 platform-specific compliance rules, checks the generated UI against the customer's design system, surfaces the full SDK feature surface so nothing is silently dropped, and runs your project's own build/lint/typecheck sensors. **Your source code never leaves your machine.**
|
|
51
49
|
|
|
52
50
|
| Layer | Purpose |
|
|
53
51
|
|---|---|
|
|
@@ -55,59 +53,104 @@ Vise is a **CLI + AI skill** that wraps coding agents in deterministic complianc
|
|
|
55
53
|
| **CLI** (`vise`) | Deterministic engine: inspects repos, searches docs, validates setup, runs sensors, manages attestations |
|
|
56
54
|
| **MCP adapter** | Optional stdio server for MCP-capable tools (Claude Code, Cursor, Codex, VS Code, Copilot) |
|
|
57
55
|
|
|
56
|
+
### What Vise validates: three layers
|
|
57
|
+
|
|
58
|
+
Vise validates on three layers, and the layer is set by the *kind of claim* — which keeps it false-positive-free where it gates:
|
|
59
|
+
|
|
60
|
+
| Layer | Claim | How | Enforcement |
|
|
61
|
+
|---|---|---|---|
|
|
62
|
+
| **SDK compliance** | "this is **wrong**" | 300 deterministic rules (session renewal, live-collection vs one-shot, no secret in logs, parent-child rendering, ban-state gating…) | **Hard gate** — `vise check` blocks until green or attested |
|
|
63
|
+
| **Design conformance** | "this **looks off**" | extract the customer's design system into a contract, then check token usage | **Advisory** — `vise design check`/`preview`; never fails a build |
|
|
64
|
+
| **Feature completeness** | "this is **missing**" | Vise proposes the full SDK feature surface per outcome; the agent opts out of anything out of scope with a recorded reason | **Advisory** — surfaced in `vise plan`/`check`; never fails a build |
|
|
65
|
+
|
|
66
|
+
Only correctness is gated (it can be made FP-free); conformance and completeness are surfaced, because "all post types" and "matches the brand" are legitimately scope-dependent. See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
|
67
|
+
|
|
68
|
+
### Design-conformant UI
|
|
69
|
+
|
|
70
|
+
Vise can ingest the customer's aesthetic into a **design contract** and guide generation to match it — from an HTML/CSS prototype (`vise design extract`) or from the host app's own design system across web + Android + Flutter + iOS (`vise design extract --from-project`: CSS vars/Tailwind/token modules, `colors.xml`, Flutter `Color(0x…)`, iOS `.colorset`/Swift). `vise design check` reports token conformance; `vise design preview` writes a visual review. All advisory.
|
|
71
|
+
|
|
72
|
+
### Supported integrations (outcomes)
|
|
73
|
+
|
|
74
|
+
`vise plan`/`init` classify the request into an outcome and tailor the plan, rules, and feature checklist: **feed** · **comments** · **chat** · **moderation** · **community** · **social graph (follow)** · **in-app notifications** · plus setup (SDK, push, live data).
|
|
75
|
+
|
|
58
76
|
### Why "Vise"
|
|
59
77
|
|
|
60
78
|
A bench vise holds the workpiece steady so the craftsman's hands are free to shape it. Without one, the workpiece drifts and cuts wander. Vise does the same for AI agents integrating SDKs: it clamps the integration to a known-good position (the real docs, the real project structure, the real compliance rules) so the agent can focus on creative work instead of guessing.
|
|
61
79
|
|
|
62
80
|
---
|
|
63
81
|
|
|
64
|
-
## Benchmark:
|
|
82
|
+
## Benchmark: Phase 1 Results
|
|
83
|
+
|
|
84
|
+
> **Every feature delivered correctly — confirmed independently with two different AI coding tools.**
|
|
85
|
+
> With Vise, both agents built all 9 social features with no production gaps. Without Vise, 3 out of 9 features had hidden problems that would only surface after users complained.
|
|
86
|
+
|
|
87
|
+
### What "delivered correctly" means
|
|
88
|
+
|
|
89
|
+
"Correct" doesn't just mean the code compiles. It means every feature handles the edge cases that matter to real users and real moderation teams:
|
|
90
|
+
|
|
91
|
+
- A **banned user** cannot type or submit a post — the send button is hidden, not just disabled-on-submit
|
|
92
|
+
- **Push notification preferences** are wired to the Amity API so users who opt out actually stop receiving notifications
|
|
93
|
+
- **Moderation actions** (report, flag, block) are surfaced in the UI so users can act on them, not buried in a hook
|
|
94
|
+
- **Chat and feed queries** use live, reactive subscriptions — not one-time fetches that go stale
|
|
95
|
+
|
|
96
|
+
Without Vise, AI agents frequently implement the primary feature correctly but miss these secondary requirements. They know about them in the abstract — but when building a chat screen, "ban state" feels out of scope and gets skipped. `sp-check` turns that vague awareness into a specific, actionable finding.
|
|
65
97
|
|
|
66
|
-
|
|
67
|
-
>
|
|
68
|
-
> **76% cheaper · 28% faster · 86% fewer issues**
|
|
98
|
+
### The experiment: three conditions, nine features
|
|
69
99
|
|
|
70
|
-
|
|
100
|
+
We ran a controlled experiment — the **Commune Benchmark** — to measure not just *whether* Vise helps, but *why*. Each of the nine features below was built from scratch by an AI agent under three independent conditions:
|
|
71
101
|
|
|
72
|
-
|
|
102
|
+
**Nine features built:**
|
|
103
|
+
SDK setup · User presence · Social feed · Events · Chat & DMs · Push notifications · User profile · Content moderation · Comments
|
|
73
104
|
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
| **Pure MCP**
|
|
77
|
-
| **
|
|
78
|
-
| **Vise
|
|
105
|
+
| Condition | What the agent had | The question it answers |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| **Pure MCP** | Access to social.plus docs only — no compliance guidance | Baseline: how well does the agent do on its own? |
|
|
108
|
+
| **Rules-as-Markdown** | The full 1,013-line compliance rulebook pasted directly into the prompt | Is the problem just that the agent doesn't know the rules? |
|
|
109
|
+
| **Vise + Skill** | Full Vise CLI — `sp-check` runs automatically, agent reads specific findings, fixes them, repeats until green | Does an active feedback loop change the outcome? |
|
|
110
|
+
|
|
111
|
+
The Rules-as-Markdown condition is the key isolation: if the agent already knows all the rules, does giving it the spec document fix the problem? The answer turned out to be **no** — knowing the rules and being forced to act on specific findings are different things.
|
|
112
|
+
|
|
113
|
+
### Results — features delivered without production gaps
|
|
114
|
+
|
|
115
|
+
| Coding agent (model) | Pure MCP | Rules-as-Markdown | Vise + Skill |
|
|
116
|
+
|---|---|---|---|
|
|
117
|
+
| **Cursor (Composer 2.5)** | 6 out of 9 ✗ | 5 out of 9 ✗ | **9 out of 9 ✅** |
|
|
118
|
+
| **Claude Code (Sonnet 4.6)** | 6 out of 9 ✗ | 7 out of 9 ✗ | **9 out of 9 ✅** |
|
|
79
119
|
|
|
80
|
-
|
|
120
|
+
The three features that consistently fail without Vise — **Chat**, **Moderation**, and **Push Notifications** — are exactly the ones with secondary compliance requirements (ban-state, report affordances, Amity preference API). Vise's `sp-check` catches these with a specific finding; the rules doc does not.
|
|
81
121
|
|
|
82
|
-
|
|
122
|
+
Both agents reached a perfect score with Vise. Neither could reach it with the compliance spec pasted into the prompt. All 9 passes were independently verified by code inspection — no scoring shortcuts.
|
|
83
123
|
|
|
84
|
-
|
|
124
|
+
### Efficiency — rework sessions needed
|
|
85
125
|
|
|
86
|
-
|
|
126
|
+
Vise delivers all 9 features correctly in a single session. The other conditions leave failing features that require additional sessions to diagnose (the gap isn't visible without `sp-check`) and fix.
|
|
87
127
|
|
|
88
|
-
|
|
|
128
|
+
| Coding agent (model) | Condition | Features correct | Rework sessions needed |
|
|
89
129
|
|---|---|---|---|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
| Manual rework needed? | Yes | No | Zero rework |
|
|
130
|
+
| **Cursor (Composer 2.5)** | Pure MCP | 6 / 9 ✗ | +3 or more |
|
|
131
|
+
| **Cursor (Composer 2.5)** | Rules-as-Markdown | 5 / 9 ✗ | +4 or more |
|
|
132
|
+
| **Cursor (Composer 2.5)** | **Vise + Skill** | **9 / 9 ✅** | **0 ✅** |
|
|
133
|
+
| **Claude Code (Sonnet 4.6)** | Pure MCP | 6 / 9 ✗ | +3 or more |
|
|
134
|
+
| **Claude Code (Sonnet 4.6)** | Rules-as-Markdown | 7 / 9 ✗ | +2 or more |
|
|
135
|
+
| **Claude Code (Sonnet 4.6)** | **Vise + Skill** | **9 / 9 ✅** | **0 ✅** |
|
|
97
136
|
|
|
98
|
-
|
|
137
|
+
<sub>Rework sessions are additional developer-initiated prompts needed after the initial session to diagnose and fix the failing features. Each failing feature typically requires at least one session to identify the gap and one to fix it — and that's without the benefit of `sp-check` pointing directly at the problem.</sub>
|
|
99
138
|
|
|
100
|
-
|
|
139
|
+
### Reproducibility
|
|
140
|
+
|
|
141
|
+
- **Gate-checked:** Every pass was verified by code inspection — the Vise workspaces contain an actual UI-level ban gate; the pure-MCP workspaces do not. Zero attestation shortcuts.
|
|
142
|
+
- **Built from scratch** (greenfield seed) — not patching existing code.
|
|
143
|
+
- **Three arms run with separate tooling.** The Rules-as-Markdown arm has no `sp-check` tool available — it cannot "cheat" by running the checker.
|
|
144
|
+
- **N=1 per cell (Phase 1).** Each agent ran each scenario once. Repeatability seeds on the three most discriminating slices (CM-CHAT, CM-MODERATE, CM-PUSH) are pending. These results should be treated as a strong initial signal, not a statistically settled finding.
|
|
145
|
+
- Full per-feature scorecards, agent transcripts, and workspace diffs: [`benchmarks/FINDINGS.html`](benchmarks/FINDINGS.html) · [`benchmarks/RULES_AS_MARKDOWN.html`](benchmarks/RULES_AS_MARKDOWN.html)
|
|
101
146
|
|
|
102
147
|
### Which mode should I use?
|
|
103
148
|
|
|
104
|
-
| If you
|
|
149
|
+
| If you… | Use | Why |
|
|
105
150
|
|---|---|---|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
110
|
-
For the full interactive report with charts, see [`benchmarks/report.html`](./benchmarks/report.html). For per-cell scorecards and prior benchmark versions, see [`benchmarks/RESULTS.md`](./benchmarks/RESULTS.md).
|
|
151
|
+
| Building new social features with an AI agent | **Vise CLI + Skill** | The only mode that reliably delivers all features correctly |
|
|
152
|
+
| Auditing existing social.plus code | `vise check --ci` | Grades any codebase against the full ruleset |
|
|
153
|
+
| Enforcing compliance in a CI pipeline | `vise check --ci` | Exits non-zero on failures; structured JSON output for logs |
|
|
111
154
|
|
|
112
155
|
---
|
|
113
156
|
|
|
@@ -121,7 +164,7 @@ For the full interactive report with charts, see [`benchmarks/report.html`](./be
|
|
|
121
164
|
| **Android (Kotlin)** | ✅ Full | Gradle assemble, unit tests |
|
|
122
165
|
| **iOS (Swift)** | ✅ Full | (static rule checks; runtime sensors WIP) |
|
|
123
166
|
|
|
124
|
-
Each platform has
|
|
167
|
+
Each platform has 52–54 rules across 10 compliance domains (feed, comments, moderation, chat, secrets, session & auth, notifications, live objects, logging hygiene, design tokens).
|
|
125
168
|
|
|
126
169
|
---
|
|
127
170
|
|
|
@@ -199,12 +242,24 @@ The flow above is what the skill teaches your AI agent. You — the human — dr
|
|
|
199
242
|
| `vise plan-harness [path] --request "..."` | (Pre-planning step) Build the harness around the request |
|
|
200
243
|
| `vise init [path] --request "..."` | Write the `sp-vise/` compliance contract for this project |
|
|
201
244
|
|
|
202
|
-
###
|
|
245
|
+
### Design contract (UI generation)
|
|
246
|
+
|
|
247
|
+
| Command | Purpose |
|
|
248
|
+
|---|---|
|
|
249
|
+
| `vise design extract <prototypePath> [--repo .] [--no-write]` | Read an HTML/CSS prototype and write a graded `sp-vise/design-contract.json` (declared CSS custom properties become exact tokens; repeated literals become inferred/advisory tokens; single-use literals are dropped) so generated social.plus UI can match the customer's aesthetic |
|
|
250
|
+
| `vise design extract --from-project [path] [--no-write]` | No external prototype? Derive the contract from the host project's **own** design system — CSS custom properties (incl. shadcn `:root` and Tailwind v4 `@theme`), TS/JS token modules, inline tailwind configs, **Android** `colors.xml`/`dimens.xml`, **Flutter** `Color(0x…)`, and **iOS** `.xcassets/*.colorset` + Swift `Color(hex:)`/`Color(red:g:b:)`. Reference values (`var()`/`theme()`/`calc()`) are skipped, so a var-mapped config contributes nothing rather than wrong tokens |
|
|
251
|
+
| `vise design check [path]` | Advisory, **non-blocking** report on how closely the UI code matches the contract (token coverage + on/off-contract color literals). Never fails a build and is **not** a `vise check` gate |
|
|
252
|
+
| `vise design preview [path] [--reference <prototype>]` | Write a self-contained `sp-vise/design-preview.html`: the contract's tokens as visual swatches + the conformance report + the HTML reference embedded for side-by-side review. Vise renders the artifact; a human/VLM judges the visual match. Dependency-free — **not** an automated pixel diff |
|
|
253
|
+
|
|
254
|
+
The extracted contract is **advisory input for generation**, not an enforcement gate: a token-poor prototype yields a weaker — never wrong — contract, and absence of a prototype simply means no contract (the existing `*.design.reuse-detected-tokens` rules still cover reuse of a host project's own design system).
|
|
255
|
+
|
|
256
|
+
### Documentation grounding & Troubleshooting
|
|
203
257
|
|
|
204
258
|
| Command | Purpose |
|
|
205
259
|
|---|---|
|
|
206
260
|
| `vise search-docs "<query>"` | Search social.plus docs for relevant pages |
|
|
207
261
|
| `vise get-doc-page <path>` | Fetch a specific doc page by path |
|
|
262
|
+
| `vise debug [path] --error "..." [--brief]` | Debug an SDK-specific runtime failure and emit a likely-cause summary plus a minimal repair brief |
|
|
208
263
|
|
|
209
264
|
### Compliance verification
|
|
210
265
|
|
|
@@ -225,6 +280,18 @@ The flow above is what the skill teaches your AI agent. You — the human — dr
|
|
|
225
280
|
| `vise run-sensors [path]` | Run detected project commands (npm scripts, Gradle, Flutter, lint, typecheck, SDK import smokes); never executes arbitrary shell |
|
|
226
281
|
| `vise run-sensors [path] --dry-run` | List what would run without executing |
|
|
227
282
|
|
|
283
|
+
### Troubleshooting quick loop
|
|
284
|
+
|
|
285
|
+
For SDK-specific runtime issues, start with the compact debug flow before broader repo exploration:
|
|
286
|
+
|
|
287
|
+
```sh
|
|
288
|
+
vise debug . --error-file logs/crash.log --brief
|
|
289
|
+
vise check . --ci
|
|
290
|
+
vise run-sensors .
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
`vise debug --brief` returns the likely rule, minimum patch shape, invariants to preserve, and verification commands for the first repair pass.
|
|
294
|
+
|
|
228
295
|
### Skill management
|
|
229
296
|
|
|
230
297
|
| Command | Purpose |
|
|
@@ -266,7 +333,7 @@ MCP-capable hosts can call Vise as structured tool calls instead of shell comman
|
|
|
266
333
|
|
|
267
334
|
### Tool names (snake_case per MCP convention)
|
|
268
335
|
|
|
269
|
-
`inspect_project`, `plan_harness`, `plan_integration`, `init_compliance`, `check_compliance`, `sync_compliance`, `attest_rule`, `explain_rule`, `init_engagement`, `show_engagement`, `search_docs`, `get_doc_page`, `validate_setup`, `run_sensors`.
|
|
336
|
+
`inspect_project`, `plan_harness`, `plan_integration`, `init_compliance`, `check_compliance`, `sync_compliance`, `attest_rule`, `explain_rule`, `init_engagement`, `show_engagement`, `search_docs`, `get_doc_page`, `debug_issue`, `validate_setup`, `run_sensors`.
|
|
270
337
|
|
|
271
338
|
These are the same operations as the CLI commands above, exposed as MCP tools.
|
|
272
339
|
|