gorsee 0.2.15 → 0.2.16

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/README.md CHANGED
@@ -21,6 +21,10 @@ Read the strategic docs:
21
21
  - [Security Model](./docs/SECURITY_MODEL.md)
22
22
  - [Top-Tier Roadmap](./docs/TOP_TIER_ROADMAP.md)
23
23
  - [Top-Tier Competition Plan](./docs/TOP_TIER_COMPETITION_PLAN.md)
24
+ - [Competition Closure Plan](./docs/COMPETITION_CLOSURE_PLAN.md)
25
+ - [External Proof Intake](./docs/EXTERNAL_PROOF_INTAKE.md)
26
+ - [External Proof Pipeline](./docs/EXTERNAL_PROOF_PIPELINE.json)
27
+ - [External Proof Review](./docs/EXTERNAL_PROOF_REVIEW.md)
24
28
  - [Canonical Language Plan](./docs/CANONICAL_LANGUAGE_PLAN.md)
25
29
  - [Canonical Recipes](./docs/CANONICAL_RECIPES.md)
26
30
  - [Canonical Examples](./examples/README.md)
@@ -50,6 +54,8 @@ Read the strategic docs:
50
54
  - [AI Workflows](./docs/AI_WORKFLOWS.md)
51
55
  - [AI Artifact Contract](./docs/AI_ARTIFACT_CONTRACT.md)
52
56
  - [CLI Contract](./docs/CLI_CONTRACT.json)
57
+ - [Product Surface Audit](./docs/PRODUCT_SURFACE_AUDIT.md)
58
+ - [AI Integration Contract](./docs/AI_INTEGRATION_CONTRACT.json)
53
59
  - [AI IDE Sync Workflow](./docs/AI_IDE_SYNC_WORKFLOW.md)
54
60
  - [AI MCP Workflow](./docs/AI_MCP_WORKFLOW.md)
55
61
  - [AI Bridge Workflow](./docs/AI_BRIDGE_WORKFLOW.md)
@@ -60,6 +66,8 @@ Read the strategic docs:
60
66
  - [Starter Onboarding](./docs/STARTER_ONBOARDING.md)
61
67
  - [Market-Ready Proof](./docs/MARKET_READY_PROOF.md)
62
68
  - [Adoption Proof Manifest](./docs/ADOPTION_PROOF_MANIFEST.json)
69
+ - [Competition Backlog](./docs/COMPETITION_BACKLOG.json)
70
+ - [External Proof Registry](./docs/EXTERNAL_PROOF_REGISTRY.json)
63
71
  - [Release Contract](./docs/RELEASE_CONTRACT.json)
64
72
  - [Migration Guide](./docs/MIGRATION_GUIDE.md)
65
73
  - [Upgrade Playbook](./docs/UPGRADE_PLAYBOOK.md)
@@ -365,6 +373,7 @@ AI bootstrap and handoff:
365
373
  - [Reactive Hydration](./docs/REACTIVE_HYDRATION.md)
366
374
  - [Reactive Debugging](./docs/REACTIVE_DEBUGGING.md)
367
375
  - [Reactive Measurement Gaps](./docs/REACTIVE_MEASUREMENT_GAPS.md)
376
+ - [Reactive Measurement Contract](./docs/REACTIVE_MEASUREMENT_CONTRACT.json)
368
377
  - [Benchmark Policy](./docs/BENCHMARK_POLICY.md)
369
378
  - [Benchmark Methodology](./docs/BENCHMARK_METHODOLOGY.md)
370
379
  - [SSR Benchmark Proof](./docs/SSR_BENCHMARK_PROOF.md)
@@ -29,6 +29,18 @@ export interface AIFrameworkPacket {
29
29
  serverImports: string;
30
30
  routeExample: string;
31
31
  };
32
+ cli: {
33
+ topLevelCommands: Array<{
34
+ command: string;
35
+ stability: string;
36
+ purpose: string;
37
+ }>;
38
+ aiSubcommands: Array<{
39
+ command: string;
40
+ stability: string;
41
+ purpose: string;
42
+ }>;
43
+ };
32
44
  aiCommands: Array<{
33
45
  command: string;
34
46
  purpose: string;
@@ -16,13 +16,22 @@ const LOCAL_DOCS = [
16
16
  { path: "docs/APPLICATION_MODES.md", purpose: "\u041A\u0430\u043D\u043E\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u0440\u0435\u0436\u0438\u043C\u044B frontend/fullstack/server \u0438 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043C\u0435\u0436\u0434\u0443 \u043D\u0438\u043C\u0438" },
17
17
  { path: "docs/API_STABILITY.md", purpose: "\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u044B\u0435 \u043F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0435 entrypoints \u0438 migration semantics" },
18
18
  { path: "docs/PUBLIC_SURFACE_MAP.md", purpose: "\u041A\u0430\u043D\u043E\u043D\u0438\u0447\u0435\u0441\u043A\u0430\u044F import map \u0438 bounded public surfaces" },
19
+ { path: "docs/PRODUCT_SURFACE_AUDIT.md", purpose: "\u041A\u0440\u0430\u0442\u043A\u0438\u0439 \u0438\u043D\u0434\u0435\u043A\u0441 \u0437\u0430\u043A\u0440\u044B\u0442\u044B\u0445 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E \u0437\u0440\u0435\u043B\u044B\u0445 product surfaces" },
19
20
  { path: "docs/CLI_CONTRACT.json", purpose: "Machine-readable CLI command matrix \u0438 AI subcommand surface" },
21
+ { path: "docs/AI_INTEGRATION_CONTRACT.json", purpose: "Machine-readable local editor/tool integration contract for AI artifacts" },
20
22
  { path: "docs/SECURITY_MODEL.md", purpose: "Runtime/security guarantees \u0438 fail-closed \u043C\u043E\u0434\u0435\u043B\u044C" },
21
23
  { path: "docs/AI_WORKFLOWS.md", purpose: "\u041A\u0430\u043D\u043E\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0439 human+agent workflow" },
22
24
  { path: "docs/AI_SURFACE_STABILITY.md", purpose: "\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C AI-facing surface" },
23
25
  { path: "docs/AI_ARTIFACT_CONTRACT.md", purpose: "Versioned AI artifacts, checkpoints, and handoff expectations" },
24
26
  { path: "docs/AI_SESSION_PACKS.md", purpose: "Cross-session handoff \u0434\u043B\u044F \u0430\u0433\u0435\u043D\u0442\u043E\u0432" },
25
27
  { path: "docs/REACTIVE_RUNTIME.md", purpose: "\u0420\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C, diagnostics, resources, mutations, islands" },
28
+ { path: "docs/REACTIVE_MEASUREMENT_CONTRACT.json", purpose: "Machine-readable reactive benchmark backlog and remaining evidence gaps" },
29
+ { path: "docs/COMPETITION_CLOSURE_PLAN.md", purpose: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u0441\u043A\u0438\u0439 \u043F\u043B\u0430\u043D \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F remaining external competition gaps" },
30
+ { path: "docs/COMPETITION_BACKLOG.json", purpose: "Machine-readable backlog \u0434\u043B\u044F remaining external competition work" },
31
+ { path: "docs/EXTERNAL_PROOF_INTAKE.md", purpose: "\u041A\u0430\u043D\u043E\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0439 intake workflow \u0434\u043B\u044F \u0432\u043D\u0435\u0448\u043D\u0438\u0445 migration/reference \u043A\u0435\u0439\u0441\u043E\u0432" },
32
+ { path: "docs/EXTERNAL_PROOF_PIPELINE.json", purpose: "Pending queue for external proof candidates before acceptance" },
33
+ { path: "docs/EXTERNAL_PROOF_REVIEW.md", purpose: "Review workflow \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u0430 external proof \u0438\u0437 pending \u0432 accepted" },
34
+ { path: "docs/EXTERNAL_PROOF_REGISTRY.json", purpose: "Accepted registry for public external proof entries" },
26
35
  { path: "docs/SUPPORT_MATRIX.md", purpose: "\u041F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0435 runtime targets, CLI surfaces, and CI-validated contract" },
27
36
  { path: "docs/DEPLOY_TARGET_GUIDE.md", purpose: "Mode-aware deploy target guidance \u0438 runtime profiles" },
28
37
  { path: "docs/STARTER_ONBOARDING.md", purpose: "\u0421\u0442\u0430\u0440\u0442\u043E\u0432\u044B\u0435 app-\u043A\u043B\u0430\u0441\u0441\u044B \u0438 onboarding path" },
@@ -69,12 +78,31 @@ async function resolveFrameworkVersion() {
69
78
  }
70
79
  return;
71
80
  }
81
+ function normalizeCLICommands(value) {
82
+ if (!Array.isArray(value))
83
+ return [];
84
+ return value.flatMap((entry) => {
85
+ if (!entry || typeof entry !== "object")
86
+ return [];
87
+ const command = typeof entry.command === "string" ? entry.command : void 0, stability = typeof entry.stability === "string" ? entry.stability : void 0, purpose = typeof entry.purpose === "string" ? entry.purpose : void 0;
88
+ if (!command || !stability || !purpose)
89
+ return [];
90
+ return [{ command, stability, purpose }];
91
+ });
92
+ }
72
93
  async function resolveProjectName(cwd) {
73
94
  const pkg = await readJSON(join(cwd, "package.json"));
74
95
  if (typeof pkg?.name === "string" && pkg.name.trim().length > 0)
75
96
  return pkg.name;
76
97
  return basename(cwd);
77
98
  }
99
+ async function resolveCLIContract() {
100
+ const contract = await readJSON(join(import.meta.dir, "..", "..", "docs", "CLI_CONTRACT.json"));
101
+ return {
102
+ topLevelCommands: normalizeCLICommands(contract?.topLevelCommands),
103
+ aiSubcommands: normalizeCLICommands(contract?.aiSubcommands)
104
+ };
105
+ }
78
106
  async function collectDocRefs(cwd, refs) {
79
107
  const result = [];
80
108
  for (const ref of refs)
@@ -86,7 +114,7 @@ function renderDocLines(docs) {
86
114
  return docs.map((doc) => `- \`${doc.path}\` -- ${doc.purpose}`);
87
115
  }
88
116
  export async function buildAIFrameworkPacket(cwd) {
89
- const projectName = await resolveProjectName(cwd), appMode = resolveAppMode(await loadAppConfig(cwd)), localDocs = await collectDocRefs(cwd, LOCAL_DOCS), canonicalDocs = await collectDocRefs(cwd, CANONICAL_DOCS), frameworkReferencePath = await pathExists(join(cwd, "FRAMEWORK.md")) ? relative(cwd, join(cwd, "FRAMEWORK.md")) || "FRAMEWORK.md" : void 0, frameworkReferenceMarkdown = frameworkReferencePath ? await readFile(join(cwd, frameworkReferencePath), "utf-8") : generateFrameworkMD(projectName), rules = await resolveAIRulesFile(cwd);
117
+ const projectName = await resolveProjectName(cwd), appMode = resolveAppMode(await loadAppConfig(cwd)), localDocs = await collectDocRefs(cwd, LOCAL_DOCS), canonicalDocs = await collectDocRefs(cwd, CANONICAL_DOCS), frameworkReferencePath = await pathExists(join(cwd, "FRAMEWORK.md")) ? relative(cwd, join(cwd, "FRAMEWORK.md")) || "FRAMEWORK.md" : void 0, frameworkReferenceMarkdown = frameworkReferencePath ? await readFile(join(cwd, frameworkReferencePath), "utf-8") : generateFrameworkMD(projectName), rules = await resolveAIRulesFile(cwd), cliContract = await resolveCLIContract();
90
118
  return {
91
119
  kind: "gorsee.framework",
92
120
  schemaVersion: 1,
@@ -131,6 +159,7 @@ export async function buildAIFrameworkPacket(cwd) {
131
159
  serverImports: 'import { middleware, type Context } from "gorsee/server"',
132
160
  routeExample: "routes/users/[id].tsx -> /users/:id"
133
161
  },
162
+ cli: cliContract,
134
163
  aiCommands: AI_COMMANDS,
135
164
  operationModes: AI_OPERATION_MODES,
136
165
  transport: AI_TRANSPORT_CONTRACT,
@@ -146,7 +175,12 @@ export async function buildAIFrameworkPacket(cwd) {
146
175
  "Read AGENTS.md first when it exists.",
147
176
  "Read FRAMEWORK.md for the current app shape and syntax.",
148
177
  "Read docs/PUBLIC_SURFACE_MAP.md for the canonical import map and scoped stable surfaces.",
178
+ "Read docs/PRODUCT_SURFACE_AUDIT.md for the current closed-vs-partial maturity snapshot before making broad product claims.",
179
+ "Read docs/AI_INTEGRATION_CONTRACT.json when editor tooling, MCP, bridge, or session-handoff integration boundaries matter.",
149
180
  "Read docs/SUPPORT_MATRIX.md when runtime, packaging, or deploy assumptions matter.",
181
+ "Read docs/REACTIVE_MEASUREMENT_CONTRACT.json before making broad benchmark or reactivity evidence claims.",
182
+ "Read docs/COMPETITION_CLOSURE_PLAN.md and docs/COMPETITION_BACKLOG.json before making market-competition or adoption claims.",
183
+ "Use the external-proof intake/review/registry docs for real public migration stories and external references; do not treat pending entries as accepted proof.",
150
184
  "Prefer inspect/propose modes before apply/operate when the task is still ambiguous.",
151
185
  `Respect the current app.mode contract: ${appMode}.`,
152
186
  "Use gorsee/client for browser-safe code and gorsee/server for runtime/server boundaries.",
@@ -198,6 +232,14 @@ export function renderAIFrameworkMarkdown(packet) {
198
232
  "",
199
233
  ...packet.aiCommands.map((entry) => `- \`${entry.command}\` -- ${entry.purpose}`),
200
234
  "",
235
+ "## CLI Commands",
236
+ "",
237
+ ...packet.cli.topLevelCommands.map((entry) => `- \`${entry.command}\` [${entry.stability}] -- ${entry.purpose}`),
238
+ "",
239
+ "## CLI AI Subcommands",
240
+ "",
241
+ ...packet.cli.aiSubcommands.map((entry) => `- \`${entry.command}\` [${entry.stability}] -- ${entry.purpose}`),
242
+ "",
201
243
  "## AI Operation Modes",
202
244
  "",
203
245
  ...packet.operationModes.map((entry) => `- \`${entry.mode}\` -- ${entry.purpose}`),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gorsee",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "AI-first reactive full-stack TypeScript framework for deterministic human and agent collaboration",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.9",
@@ -76,6 +76,7 @@
76
76
  "api:policy": "node scripts/api-stability-check.mjs",
77
77
  "cli:policy": "node scripts/cli-contract-check.mjs",
78
78
  "adoption:policy": "node scripts/adoption-proof-check.mjs",
79
+ "competition:policy": "node scripts/competition-backlog-check.mjs",
79
80
  "ai:policy": "node scripts/ai-policy-check.mjs",
80
81
  "dx:policy": "node scripts/dx-policy-check.mjs",
81
82
  "maturity:policy": "node scripts/maturity-policy-check.mjs",
@@ -106,7 +107,7 @@
106
107
  "coverage:audit": "node scripts/coverage-audit-check.mjs",
107
108
  "repo:policy": "node scripts/repo-policy-check.mjs",
108
109
  "ci:policy": "node scripts/ci-policy-check.mjs",
109
- "verify:security": "bun run check && bun run product:policy && bun run dependency:policy && bun run deploy:policy && bun run api:policy && bun run cli:policy && bun run adoption:policy && bun run ai:policy && bun run dx:policy && bun run maturity:policy && bun run top-tier:exit && bun run runtime:policy && bun run runtime:security:policy && bun run benchmarks:policy && bun run benchmarks:realworld:check && bun run examples:policy && bun run proof:policy && bun run critical:surface && bun run coverage:audit && bun run repo:policy && bun run ci:policy && bun run compiler:promotion:check && bun run build:promotion:check && bun run backend:switch:evidence:check && bun run backend:default-switch:review:check && bun run backend:candidate:rollout:check && bun run compiler:default:rehearsal:check && bun run build:default:rehearsal:check && bun run test:security && bun run test:critical-surface && bun run test:confidence",
110
+ "verify:security": "bun run check && bun run product:policy && bun run dependency:policy && bun run deploy:policy && bun run api:policy && bun run cli:policy && bun run adoption:policy && bun run competition:policy && bun run ai:policy && bun run dx:policy && bun run maturity:policy && bun run top-tier:exit && bun run runtime:policy && bun run runtime:security:policy && bun run benchmarks:policy && bun run benchmarks:realworld:check && bun run examples:policy && bun run proof:policy && bun run critical:surface && bun run coverage:audit && bun run repo:policy && bun run ci:policy && bun run compiler:promotion:check && bun run build:promotion:check && bun run backend:switch:evidence:check && bun run backend:default-switch:review:check && bun run backend:candidate:rollout:check && bun run compiler:default:rehearsal:check && bun run build:default:rehearsal:check && bun run test:security && bun run test:critical-surface && bun run test:confidence",
110
111
  "check": "tsc --noEmit",
111
112
  "install:matrix": "node scripts/install-matrix-check.mjs",
112
113
  "dev": "bun run src/dev.ts",