Plugin RE-ARCHITECTURE v2 — unified thin surface + greenfield-first (#184, issue #191)#193
Conversation
…d-first, per-plugin conformance) Planning-only artifacts for TaskList #184 (Plugin RE-ARCHITECTURE v2, issue #191). research.md: Workflow wf_4d8ee812-f88 synthesis (11 agents), supervisor base-corrected against live alpha.16 (fc911ba) — resolves the synthesizer's false alpha.5 base-divergence alarm (Q1/Q2/Q3). Per-plugin confirmed smells; #181 coordination; locked Q4-Q7. plan.md: ONE unified architecture (3 tiers + centralization set in @netscript/plugin), greenfield `netscript plugin new` output contract built FIRST as the reference, per-plugin conformance (Decisions A-C), slice ordering S-core-1 -> S9-greenfield -> S-conform-{5} -> S-verify. Folds Unified #164/#166/#167-task/#168. e2e-cli-prod is a HARD gate. No implementation lands before PLAN-EVAL PASS (OpenHands minimax-M3, separate session). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
|
@openhands-agent model=openrouter/minimax/minimax-m3 output=pr-comment PLAN-EVAL (harness, separate session). This is a planning-only PR. Do NOT implement anything. Evaluate the plan for PLAN-GATE readiness and emit a verdict. SKILLActivate and apply these repo skills before evaluating:
What to read
Grade specifically (hard checks a–g)a. BASE DIVERGENCE — verify the corrected ground truth. The plan asserts the synthesizer's "alpha.5 missing ./service/./contract-base/./adapter/./scaffold" alarm was a stale-worktree FALSE ALARM, and that live alpha.16 ( b. DECISION A — streams = proxy, NO served oRPC contract. Confirm streams must NOT gain a c. ASPIRE base extension. Each connector's d. A11 / removal hazards. triggers: confirm the "A11-remove 6 deferred routes" instruction is correctly VOID because #181 lands first and BACKS them (verify the #181↔#184 sequencing is safe given the 4 hot shared contract/port files). streams: confirm the DELETE set (fabricated scaffolder, dead stream-api, CLI, type pass-throughs) leaves no live consumer dangling. e. CAST budget. The plan claims the per-connector f. GREENFIELD-FIRST ordering. Confirm g. e2e-cli-prod = HARD gate. Confirm the plan treats Also grade: layering correctness of the OutputPost a PR comment verdict: |
OpenHands Agent — CompletedModel: openrouter/minimax/minimax-m3 PLAN-EVAL summary — chore-plugin-rearch-v2--184SummaryPlan-evaluator session for harness run Changes
Validation
Responses to review comments or issue comments when relevantN/A — this is a planning-only evaluation. No source churn means no review-comment thread to address. Remaining risks
Run: https://github.com/rickylabs/netscript/actions/runs/28472274290 |
… fixes Reconcile PLAN-EVAL (minimax-M3) FAIL_PLAN findings into plan.md: - Cast mechanism: LOCK Resolution B (build()->PluginManifest, delete local *PluginManifest/inspect*, repoint README+test to core inspectPlugin) with a per-connector no-dangling grep gate (finding e). - S-conform-triggers: HARD BLOCK until #181 merges to main + rebase + deno-doc route re-verify; all other slices proceed independently (finding d.1). - streams: explicit delete-set with line refs (StreamsPluginManifest 67-76, collapse 137-142) + consumer repoint (probe-context.ts:2, stream-api_test.ts:3-5) + grep->0 gate (finding d.2). - Add explicit Risk register (R1-R8) (checklist: Risk register). - Add JSR surface itemization vs jsr-audit rubric for ./scaffold + ./service + trimmed -core subpaths (checklist: jsr-audit surface scan). - Resolve Open-decision 3: internal runtime/->application/ rename does not collide with the retained public ./runtime (presentation runtime-launch) subpath. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
|
@openhands-agent model=openrouter/minimax/minimax-m3 output=pr-comment PLAN-EVAL cycle 2 (harness, separate session). This is a planning-only PR. Do NOT implement anything. The cycle-1 verdict was SKILLActivate and apply these repo skills before evaluating:
What to read
Cycle-2 reconciliation verification (close each cycle-1 finding)Confirm each of the 6 cycle-1 findings is now actually resolved by the plan text (not merely gestured at). FAIL_PLAN if any is unresolved or introduces a new inconsistency:
Re-grade the original hard checks a–gRe-confirm (briefly, only flag regressions): (a) base-truth corrected (alpha.16 OutputPost a PR comment verdict: |
OpenHands Agent — CompletedModel: openrouter/minimax/minimax-m3 PLAN-EVAL cycle-2 — chore-plugin-rearch-v2--184 (PR #193, issue #184)Verdict: PASSCycle-1 Reconciliation verification (6 cycle-1 findings)
Hard checks a–g re-grade
Quality concerns to clean up in
|
…text cleanups Cycle-2 verdict PASS (minimax-M3). Apply the two non-blocking quality concerns flagged for cleanup before S-core-1: - QC-1: cast budget phrasing reconciled with the live base — gate now reads NO-NEW-CAST (net-new only); pre-existing in-core `as unknown as` casts (plugin-workers-core carries 20+) are grandfathered, not counted. - QC-2: streams probe-context.ts:2 line ref corrected — it imports StreamPayloadSchema (not the manifest type / a defineStream* factory), so it is unaffected; the grep StreamsPluginManifest->0 gate is the authority. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
S-core-1 —
|
| Gate | Result |
|---|---|
deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root packages/plugin --ext ts,tsx |
PASS — 146 files, 2 batches, 0 diagnostics |
deno run --allow-read --allow-run .llm/tools/run-deno-lint.ts --root packages/plugin --ext ts,tsx |
PASS — 146 files, 0 diagnostics |
deno run --allow-read --allow-run .llm/tools/run-deno-fmt.ts --root packages/plugin --ext ts,tsx |
PASS — 146 files, 0 findings |
| focused binder/scaffold tests | PASS — 3 passed, 0 failed |
cd packages/plugin && rtk proxy deno task test |
PASS — 69 passed, 0 failed |
cd packages/plugin && rtk proxy deno task publish:dry-run |
PASS — dry run complete; existing package slow-type carve-out and dynamic-import warning remain |
rtk proxy deno task arch:check |
PASS exit 0 — FAIL=0; existing WARN/INFO doctrine findings remain |
Notes:
- No new
anyoras unknown aswas introduced in the new S-core-1 files. AnyRouteruse is centralized in@netscript/plugin/servicerouter assembly so connectors can
stop owning that boundary during conformance slices.- Preflight drift recorded: cycle-2 PASS is represented by branch/user handoff and
plan.mdupdates;
the checked-inplan-eval.mdremains the older cycle-1FAIL_PLANartifact.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
S-core-1 complete —
|
| Gate | Result |
|---|---|
deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root packages/plugin --ext ts,tsx |
PASS — 152 files, 2 batches, 0 diagnostics |
deno run --allow-read --allow-run .llm/tools/run-deno-lint.ts --root packages/plugin --ext ts,tsx |
PASS — 152 files, 0 diagnostics |
deno run --allow-read --allow-run .llm/tools/run-deno-fmt.ts --root packages/plugin --ext ts,tsx |
PASS — 152 files, 0 findings |
| focused S-core-1 tests | PASS — 8 passed, 0 failed |
cd packages/plugin && rtk proxy deno task test |
PASS — 74 passed, 0 failed |
cd packages/plugin && rtk proxy deno task publish:dry-run |
PASS — dry run complete; pre-existing slow-type carve-out remains; dynamic-import warnings now include the pre-existing manifest resolver plus the new generated-registry loader |
rtk proxy deno task arch:check |
PASS exit 0 — FAIL=0; existing WARN/INFO doctrine findings remain |
No new any or as unknown as was introduced in the new S-core-1 files.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
S9 — GREENFIELD
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
S-conform-workersScope:
Commit:
Gate evidence:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
S-conform-sagasScope:
Commit:
Gate evidence:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
S-conform-streamsScope:
Commit:
Gate evidence:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
|
S-conform-auth — auth connector reference conformance Commit: Scope:
Gate evidence:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
|
S-conform-triggers — post-#181 trigger connector conformance Merge commit: Implementation commit: Scope:
Gate evidence:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
|
S-verify/finalize — final local verification Final summary commit: Completed slices:
Final gate evidence:
Notes:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
|
@openhands-agent model=openrouter/qwen/qwen3.7-max output=pr-comment iterations=500 run IMPL-EVAL on this PR. TASKThis is PR #193 — Plugin RE-ARCHITECTURE v2 (#184): conform all 5 connectors (workers, sagas, triggers, streams, auth) + greenfield SKILL (activate before evaluating)
INPUTS TO READ
VERIFY (re-run, do not trust)
OUTPUTWrite the verdict as a PR comment: |
OpenHands Agent — CompletedModel: openrouter/qwen/qwen3.7-max IMPL-EVAL Summary: Plugin RE-ARCHITECTURE v2 (#193)Verdict: PASSAll 6 gates passed. Implementation faithfully executes the approved plan without introducing new technical debt or architectural violations. Gate Results✅ Gate 1: Grep gates (manifest removal)Status: PASS Evidence:
Method: ✅ Gate 2: Net-new casts/anyStatus: PASS Evidence:
Method: ✅ Gate 3: arch:check (doctrine compliance)Status: PASS Evidence:
Method: ✅ Gate 4: Scoped check/lint/fmtStatus: PASS Evidence:
Method: ✅ Gate 5: Triggers v1 routes (deno doc)Status: PASS Evidence:
Method: ✅ Gate 6: Full E2E smokeStatus: PASS Evidence:
Method: Native worktree execution (not Debt AnalysisNo new debt introduced. Pre-existing WARN items documented but not blocking:
All connector conformance slices (workers, sagas, triggers, streams, auth) are clean: no per-connector manifest duplication, no redundant Lock HygieneNo deno.lock churn or source edits made. This was a read-only evaluation session. No commits, no file modifications. Branch state preserved. Plan FidelityImplementation exactly matches the approved plan: ✅ Resolution B (NO-NEW-CAST): Zero new casts in connectors; 3 centralized casts in No drift detected between plan decisions and implementation reality. RecommendationsNone. Implementation is ready to merge. Pre-existing debt (AP-23, A3) should be tracked separately but does not block this PR. Evaluator SeparationThis evaluation was performed as an independent session from the generator, using:
All gates re-derived from first principles. Final verdict: PASS Run: https://github.com/rickylabs/netscript/actions/runs/28481612013 |
* fix(plugin-quality): clear IMPL-EVAL caveats AP-23 + A3 (#193) AP-23: PublicDefinitionSchemaShape is now Readonly<Record<string, z.ZodTypeAny>> (was Record<string, any>). z.ZodTypeAny is the idiomatic "any Zod schema" type, already used elsewhere in this package; sound, no cast, and the deno-lint-ignore no-explicit-any directive is removed. A3: add a second grounded TS code example to 8 plugin/core READMEs (plugin-workers/sagas/streams/triggers-core + plugins/workers/sagas/triggers/streams) so each README has >= 2 TS fences. Every added example was extracted and deno check --unstable-kv'd against the real import map. Gates: check/lint/fmt(ts) + 8-README fmt + doctrine sweep all green; A3/AP-23 cleared everywhere with FAIL=0 and no new findings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct * chore(openhands): record run trace 28485075330-1 --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: OpenHands Bot <openhands@all-hands.dev>
…nfig (#199) * docs(site): reconcile to merged #193/#183/#190 surface + fmt-guard config Brings the doc site current with the three just-merged PRs, and hardens the standalone docs project config so `deno fmt` can never again reflow Vento markdown or split its `{{ comp }}` tags. Content (12 pages): - #190 fresh-ui: document the AI/workspace primitive catalog (11 L2 primitives + command-palette/search) and the headless Combobox interactive namespace; extra `ui:add` examples. (customize-fresh-ui, capabilities/fresh-ui) - #193 triggers-oRPC truth: triggers serve a typed v1 oRPC contract for introspection/management/SSE; only the webhook ingress endpoint (POST /api/v1/webhooks/:triggerId) stays a raw HMAC-verifying route by design. Corrected every stale "raw Hono, not oRPC" claim. (triggers, capabilities/index, contracts, architecture, glossary, deploy, storefront/05-shipping-webhook) - #183/#172 two-tier plugin shape: `netscript plugin new <name>` emits a core engine package + thin connector; --kind feature|proxy (default proxy), --overwrite. (cli-reference, author-a-plugin, plugin-system) Config: - docs/site/deno.json gains an fmt block (proseWrap preserve; excludes **/*.md, **/*.mdx, **/*.vto, _site/, _cache/) and a lint block, so the authored Markdown/Vento surface is out of scope for `deno fmt`. Verified: `deno task build` green (306 files); `check:links` green (18456 internal links across 130 pages resolve). Docs-only; no framework source. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct * chore(openhands): record run trace 28485224548-1 * docs(site): correct `plugin new` flag names (IMPL-EVAL #199 Domain 2 FAIL_FIX) The two-tier topology prose was correct, but the CLI flag spellings were invented. Ground truth (packages/cli/.../new/new-plugin-command.ts): - boolean `--feature` (default proxy) → kind: feature|proxy - boolean `--force` → overwrite - `--project-root <path>` There is no `--kind feature|proxy` flag and no `--overwrite` flag. Running `netscript plugin new billing --kind proxy` would fail. Corrected the two docs that showed the wrong flags: - cli-reference.md: example → `netscript plugin new billing` (proxy default); desc → `--feature` / `--force`. - how-to/author-a-plugin.md: example → `netscript plugin new notifier`; options prose → `--feature` (route-backed feature connector vs default proxy), `--force` (overwrite), `--project-root <path>`. Verified: `deno task build` green (306 files); `check:links` green (18456 internal links across 130 pages resolve). Docs-only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct * chore(openhands): record run trace 28486223232-1 --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: OpenHands Bot <openhands@all-hands.dev>
Workspace-wide prerelease bump alpha.16 -> alpha.17 via deno bump-version (all 32 members + cross-package jsr: constraints). Completed the pieces bump-version does not touch, matching the alpha.16 release template: root deno.json version, deno.lock @netscript pins (51), and the 5 plugins/*/scaffold.plugin.json version+dep pins. Also bumped the new GENERATED_PLUGIN_VERSION const (packages/cli .../new-plugin-use-case.ts, added in #193) so "netscript plugin new" stamps alpha.17 imports in lockstep. Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Plugin RE-ARCHITECTURE v2 (TaskList #184 · issue #191)
Re-architect
@netscript/plugin+ all 5 connectors (workers/sagas/triggers/streams/auth) +their
-coreengines to ONE unified, enterprise-grade, extra-thin surface. Buildnetscript plugin new <name>greenfield FIRST as the executable reference, then conform everyexisting plugin to its proven output.
Base-truth (supervisor-corrected)
Workflow synthesis (
wf_4d8ee812-f88, 11 agents) raised a base-divergence alarm claiming live@netscript/pluginwas alpha.5 missing./service/./contract-base/./adapter/./scaffold. Thatwas a stale-worktree false alarm — the synthesizer inspected its own alpha.5 checkout. Verified
against the live alpha.16 base (
fc911ba1):./contract-base(BASE_PLUGIN_CONTRACT_ROUTES),./service(createPluginService),./adapter,./protocolALL exist../scaffoldis the onegenuinely net-new subpath. Conformance is therefore mostly DELETION of connector duplication +
repointing at existing seams, not net-new seam construction.
The shape
@netscript/plugin(convention home) ·@netscript/plugin-<name>-core(the engine,domain→ports→application→adapters→presentation+contracts/v1) ·plugins/<name>(thinconnector: manifest + 1-line contract re-export + composition root + specifics).
@netscript/plugin:./contract-base,./service(now owning annotated router assembly +
bindPluginContract),./cli(base-meta + registryloader),
./scaffold(net-new typesafe codegen),./adapter,definePlugin().build()→ PluginManifest,verifyPlugin,@netscript/aspirebase,@netscript/kvWatchableKv, READMEtemplate.
sagas/triggers/auth (shared errors + typed describe route); triggers keeps ONE raw HMAC route.
Slice ordering
S-core-1(confirm/extend centralization set; build./scaffold) →S9greenfieldplugin newFIRST (dual-tier vertical slice, passes all 5 gates with zero hand edits) →S-conform-{workers,sagas,triggers,streams,auth}→S-verify. Folds Unified#164/#166/#167-task/#168.
Coordination with #181
#181 (triggers feature-backing) lands first and BACKS the 6 deferred triggers routes. #184's
triggers-conform runs against the post-#181 contract and does not remove those now-backed routes
(the synthesis "A11-remove 6 routes" instruction is VOID).
Gates
arch:check· scopedcheck/lint/fmt --ext ts,tsx(2-cast budget; NOany;AnyRouterboundary VANISHES) ·
publish --dry-runper package ·scaffold.runtimeE2E ·e2e-cli-prod(HARD release gate) · byte-identical generated-output guard.
Locked decisions
Q4=DEFER auth sibling-widening (debt
AUTH-BACKEND-ENV-CENTRALIZATION) · Q5=YESplugin newretires the
.templateskeleton · Q6=connector-private stream client, schema single-sourced in-core· Q7=WSL Codex implements / OpenHands evaluates.🤖 Generated with Claude Code