@contractspec/bundle.library 3.9.8 → 3.9.9

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 (70) hide show
  1. package/.turbo/turbo-build.log +222 -214
  2. package/CHANGELOG.md +52 -0
  3. package/dist/components/docs/DocsIndexPage.js +2 -2
  4. package/dist/components/docs/docsManifest.js +1 -1
  5. package/dist/components/docs/getting-started/DataViewTutorialPage.js +81 -6
  6. package/dist/components/docs/getting-started/index.js +94 -19
  7. package/dist/components/docs/guides/GuideDataExchangeImportTemplatesPage.content.d.ts +6 -0
  8. package/dist/components/docs/guides/GuideDataExchangeImportTemplatesPage.content.js +176 -0
  9. package/dist/components/docs/guides/GuideDataExchangeImportTemplatesPage.d.ts +1 -0
  10. package/dist/components/docs/guides/GuideDataExchangeImportTemplatesPage.js +176 -0
  11. package/dist/components/docs/guides/GuidesIndexPage.js +2 -2
  12. package/dist/components/docs/guides/index.d.ts +1 -0
  13. package/dist/components/docs/guides/index.js +220 -46
  14. package/dist/components/docs/index.js +1003 -309
  15. package/dist/components/docs/libraries/LibrariesApplicationShellPage.content.d.ts +22 -5
  16. package/dist/components/docs/libraries/LibrariesApplicationShellPage.content.js +125 -37
  17. package/dist/components/docs/libraries/LibrariesApplicationShellPage.js +125 -37
  18. package/dist/components/docs/libraries/LibrariesDataViewsPage.js +120 -3
  19. package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +101 -2
  20. package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -1
  21. package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +58 -4
  22. package/dist/components/docs/libraries/LibrariesTranslationRuntimePage.content.d.ts +10 -0
  23. package/dist/components/docs/libraries/LibrariesTranslationRuntimePage.content.js +43 -0
  24. package/dist/components/docs/libraries/LibrariesTranslationRuntimePage.d.ts +1 -0
  25. package/dist/components/docs/libraries/LibrariesTranslationRuntimePage.js +43 -0
  26. package/dist/components/docs/libraries/index.d.ts +1 -0
  27. package/dist/components/docs/libraries/index.js +496 -97
  28. package/dist/components/docs/specs/SpecsDataViewsPage.js +49 -3
  29. package/dist/components/docs/specs/index.js +60 -14
  30. package/dist/index.js +1014 -320
  31. package/dist/node/components/docs/DocsIndexPage.js +2 -2
  32. package/dist/node/components/docs/docsManifest.js +1 -1
  33. package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +81 -6
  34. package/dist/node/components/docs/getting-started/index.js +94 -19
  35. package/dist/node/components/docs/guides/GuideDataExchangeImportTemplatesPage.content.js +175 -0
  36. package/dist/node/components/docs/guides/GuideDataExchangeImportTemplatesPage.js +175 -0
  37. package/dist/node/components/docs/guides/GuidesIndexPage.js +2 -2
  38. package/dist/node/components/docs/guides/index.js +220 -46
  39. package/dist/node/components/docs/index.js +1003 -309
  40. package/dist/node/components/docs/libraries/LibrariesApplicationShellPage.content.js +125 -37
  41. package/dist/node/components/docs/libraries/LibrariesApplicationShellPage.js +125 -37
  42. package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +120 -3
  43. package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +101 -2
  44. package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -1
  45. package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +58 -4
  46. package/dist/node/components/docs/libraries/LibrariesTranslationRuntimePage.content.js +42 -0
  47. package/dist/node/components/docs/libraries/LibrariesTranslationRuntimePage.js +42 -0
  48. package/dist/node/components/docs/libraries/index.js +496 -97
  49. package/dist/node/components/docs/specs/SpecsDataViewsPage.js +49 -3
  50. package/dist/node/components/docs/specs/index.js +60 -14
  51. package/dist/node/index.js +1014 -320
  52. package/package.json +74 -26
  53. package/src/components/docs/docsManifest.test.ts +87 -0
  54. package/src/components/docs/docsManifest.ts +90 -3
  55. package/src/components/docs/generated/docs-index.notifications.json +7 -7
  56. package/src/components/docs/getting-started/DataViewTutorialPage.tsx +181 -50
  57. package/src/components/docs/guides/GuideDataExchangeImportTemplatesPage.content.ts +185 -0
  58. package/src/components/docs/guides/GuideDataExchangeImportTemplatesPage.tsx +186 -0
  59. package/src/components/docs/guides/GuidesIndexPage.tsx +49 -42
  60. package/src/components/docs/guides/index.ts +1 -0
  61. package/src/components/docs/libraries/LibrariesApplicationShellPage.content.ts +148 -35
  62. package/src/components/docs/libraries/LibrariesApplicationShellPage.tsx +38 -5
  63. package/src/components/docs/libraries/LibrariesDataViewsPage.tsx +267 -64
  64. package/src/components/docs/libraries/LibrariesDesignSystemPage.tsx +235 -0
  65. package/src/components/docs/libraries/LibrariesOverviewPage.tsx +8 -2
  66. package/src/components/docs/libraries/LibrariesPersonalizationPage.tsx +141 -31
  67. package/src/components/docs/libraries/LibrariesTranslationRuntimePage.content.ts +78 -0
  68. package/src/components/docs/libraries/LibrariesTranslationRuntimePage.tsx +137 -0
  69. package/src/components/docs/libraries/index.ts +1 -0
  70. package/src/components/docs/specs/SpecsDataViewsPage.tsx +239 -113
@@ -0,0 +1,175 @@
1
+ var S=Object.defineProperty;var A=(r)=>r;function I(r,o){this[r]=A.bind(null,o)}var O=(r,o)=>{for(var m in o)S(r,m,{get:o[m],enumerable:!0,configurable:!0,set:I.bind(o,m)})};var R=(r,o)=>()=>(r&&(o=r(r=0)),o);var g=`import {
2
+ createImportPlan,
3
+ createRecordBatch,
4
+ defineDataExchangeTemplate,
5
+ previewImport,
6
+ } from "@contractspec/lib.data-exchange-core";
7
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
8
+
9
+ const AccountImportSchema = defineSchemaModel({
10
+ name: "AccountImport",
11
+ fields: {
12
+ id: { type: ScalarTypeEnum.ID(), isOptional: false },
13
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
14
+ amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
15
+ active: { type: ScalarTypeEnum.Boolean(), isOptional: false },
16
+ tags: { type: ScalarTypeEnum.JSON(), isOptional: true },
17
+ },
18
+ });
19
+
20
+ const accountImportTemplate = defineDataExchangeTemplate({
21
+ key: "accounts.import",
22
+ version: "1.0.0",
23
+ title: "Account import",
24
+ columns: [
25
+ {
26
+ key: "id",
27
+ label: "Account ID",
28
+ targetField: "id",
29
+ required: true,
30
+ sourceAliases: ["Account Identifier", "External ID", "No compte"],
31
+ },
32
+ {
33
+ key: "status",
34
+ label: "Status",
35
+ targetField: "status",
36
+ required: true,
37
+ sourceAliases: ["Statut", "State"],
38
+ format: { kind: "text", trim: true, case: "lowercase" },
39
+ },
40
+ {
41
+ key: "amount",
42
+ label: "Amount",
43
+ targetField: "amount",
44
+ required: true,
45
+ sourceAliases: ["Montant", "Balance"],
46
+ format: { kind: "number", decimalSeparator: ",", thousandsSeparator: "." },
47
+ },
48
+ {
49
+ key: "active",
50
+ label: "Active",
51
+ targetField: "active",
52
+ sourceAliases: ["Actif", "Enabled"],
53
+ format: { kind: "boolean", trueValues: ["yes", "oui"], falseValues: ["no", "non"] },
54
+ },
55
+ {
56
+ key: "tags",
57
+ label: "Tags",
58
+ targetField: "tags",
59
+ format: { kind: "split", delimiter: ";" },
60
+ },
61
+ ],
62
+ });
63
+
64
+ const sourceBatch = createRecordBatch([
65
+ {
66
+ "No compte": "acc-1",
67
+ Statut: " Active ",
68
+ Montant: "1.234,50",
69
+ Actif: "oui",
70
+ Tags: "vip; beta",
71
+ },
72
+ ]);
73
+
74
+ const preview = previewImport(
75
+ createImportPlan({
76
+ source: { kind: "memory", batch: sourceBatch, format: "csv" },
77
+ target: { kind: "memory", format: "json" },
78
+ schema: AccountImportSchema,
79
+ sourceBatch,
80
+ template: accountImportTemplate,
81
+ }),
82
+ );
83
+
84
+ console.log(preview.plan.mappingSource); // "template"
85
+ console.log(preview.normalizedRecords[0]);`,h=`import { defineDataExchangeTemplate } from "@contractspec/lib.data-exchange-core";
86
+ import { dryRunImport, executeImport } from "@contractspec/lib.data-exchange-server";
87
+
88
+ const template = defineDataExchangeTemplate({
89
+ key: "accounts.import",
90
+ version: "1.0.0",
91
+ columns: [
92
+ { key: "id", label: "Account ID", targetField: "id", required: true, sourceAliases: ["Account Identifier"] },
93
+ { key: "amount", label: "Amount", targetField: "amount", format: { kind: "currency", currencySymbol: "€", decimalSeparator: "," } },
94
+ ],
95
+ });
96
+
97
+ const partnerSource = {
98
+ kind: "file",
99
+ path: "partner-accounts.csv",
100
+ format: "csv",
101
+ codecOptions: { csv: { delimiter: ";", skipRows: 1 } },
102
+ } as const;
103
+
104
+ const formatProfile = {
105
+ columns: {
106
+ amount: { kind: "currency", currencySymbol: "€", decimalSeparator: "," },
107
+ },
108
+ } as const;
109
+
110
+ const preview = await dryRunImport({
111
+ source: partnerSource,
112
+ target: { kind: "memory", format: "json" },
113
+ schema: AccountImportSchema,
114
+ template,
115
+ formatProfile,
116
+ });
117
+
118
+ const blockingIssues = preview.issues.filter((issue) => issue.severity === "error");
119
+
120
+ if (blockingIssues.length === 0) {
121
+ await executeImport({
122
+ source: partnerSource,
123
+ target: { kind: "memory", format: "json" },
124
+ schema: AccountImportSchema,
125
+ template,
126
+ formatProfile,
127
+ });
128
+ }`,f=`"use client";
129
+
130
+ import { useDataExchangeController } from "@contractspec/lib.data-exchange-client";
131
+
132
+ export function ImportMappingReview({ preview }) {
133
+ const controller = useDataExchangeController({ preview });
134
+ const replacementSourceColumn = controller.model.ignoredSourceColumns[0];
135
+
136
+ return (
137
+ <section>
138
+ {controller.model.templateRows.map((row) => (
139
+ <button
140
+ key={row.id}
141
+ type="button"
142
+ disabled={!replacementSourceColumn}
143
+ onClick={() => {
144
+ if (!replacementSourceColumn) return;
145
+ controller.selectAlias(row.targetField, replacementSourceColumn);
146
+ }}
147
+ >
148
+ {row.label}: {row.sourceField || "Unmatched"} -> {row.targetField}
149
+ {row.required ? " required" : ""}
150
+ {row.formatLabel ? \` (\${row.formatLabel})\` : ""}
151
+ </button>
152
+ ))}
153
+ {controller.model.unmatchedRequiredRows.length > 0 ? (
154
+ <p>Resolve required columns before import.</p>
155
+ ) : null}
156
+ </section>
157
+ );
158
+ }`,b=`You are adding an import flow to a ContractSpec app.
159
+
160
+ Define a reusable data-exchange template for this canonical schema:
161
+ - target fields, required flags, and display labels
162
+ - known partner column aliases
163
+ - value formats for numbers, dates, booleans, JSON, split/join lists, currency, and percentages
164
+
165
+ Wire the template into core preview planning and server dry-run execution. Keep explicit mappings higher precedence than template resolution. Return the template, preview call, server dry-run call, and tests for alias matching plus localized formatting.`,y=`A partner sent a CSV/JSON/XML file that does not match our recommended import template.
166
+
167
+ Compare the incoming headers and value samples against this ContractSpec data-exchange template. Propose:
168
+ - source-to-target column matches with confidence
169
+ - missing required target fields
170
+ - ignored source columns
171
+ - format overrides for localized numbers, booleans, dates, JSON, split/join lists, currency, or percentages
172
+
173
+ Do not execute the import. Produce a dry-run plan and the user-facing review copy.`,v=`cd packages/libs/data-exchange-core && bun test && bun run typecheck && bun run lint:check
174
+ cd packages/libs/data-exchange-client && bun test && bun run typecheck && bun run lint:check
175
+ cd packages/libs/data-exchange-server && bun test && bun run typecheck && bun run lint:check`;import{CodeBlock as c}from"@contractspec/lib.design-system";import{HStack as k,VStack as a}from"@contractspec/lib.design-system/layout";import{List as s,ListItem as l}from"@contractspec/lib.design-system/list";import{Code as d,H1 as E,H2 as i,H3 as u,P as p,Text as n}from"@contractspec/lib.design-system/typography";import w from"@contractspec/lib.ui-link";import{ChevronRight as D}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var F=["Explicit mappings win first, so existing integrations can keep their current mapping arrays.","Template resolution checks exact headers, aliases, normalized labels, and SchemaModel fallback inference.","Format profiles can override formats by target field or template column key without changing the template.","Required template columns become visible preview issues when no source column can be matched."],q=["text trim and case normalization","localized numbers with decimal and thousands separators","custom true/false boolean labels","dates and datetimes with accepted input formats","JSON parsing, empty-as-null, and default values","split/join delimiters, currency symbols, and percentages"];function U(){return t(a,{className:"space-y-8",children:[t(a,{className:"space-y-3",children:[e(n,{className:"editorial-kicker",children:"Build"}),e(E,{className:"font-bold text-4xl",children:"Import flexible files with data-exchange templates"}),e(p,{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:"Publish one recommended import shape, then let users import CSV/JSON/XML files with partner-specific headers, skipped rows, localized values, and alternate metadata layouts."})]}),t(a,{className:"card-subtle space-y-4 p-6",children:[e(i,{className:"font-bold text-2xl",children:"What you'll build"}),t(s,{className:"space-y-2 text-muted-foreground text-sm",children:[e(l,{children:e(n,{children:"A canonical template with target fields, aliases, and formats."})}),e(l,{children:e(n,{children:"A dry-run import that reports confidence, gaps, and ignored columns."})}),e(l,{children:e(n,{children:"A client review state where users remap, update formats, or accept inferred mappings."})})]})]}),t(a,{className:"space-y-4",children:[e(i,{className:"font-bold text-2xl",children:"1) Define the template"}),t(p,{className:"text-muted-foreground text-sm leading-7",children:["Use ",e(d,{children:"defineDataExchangeTemplate"})," for neutral import/export naming. ",e(d,{children:"defineImportTemplate"})," and"," ",e(d,{children:"defineExportTemplate"})," remain available aliases."]}),e(c,{language:"typescript",filename:"src/data-exchange/accounts-import.ts",code:g})]}),t(a,{className:"grid gap-4 md:grid-cols-2",children:[t(a,{className:"card-subtle space-y-3 p-6",children:[e(u,{className:"font-bold text-xl",children:"Mapping precedence"}),e(s,{className:"space-y-2 text-muted-foreground text-sm",children:F.map((r)=>e(l,{children:e(n,{children:r})},r))})]}),t(a,{className:"card-subtle space-y-3 p-6",children:[e(u,{className:"font-bold text-xl",children:"Supported value formats"}),e(s,{className:"space-y-2 text-muted-foreground text-sm",children:q.map((r)=>e(l,{children:e(n,{children:r})},r))})]})]}),t(a,{className:"space-y-4",children:[e(i,{className:"font-bold text-2xl",children:"2) Dry-run partner CSV, JSON, or XML files on the server"}),e(p,{className:"text-muted-foreground text-sm leading-7",children:"File, HTTP, and storage adapters accept codec options. CSV can set delimiters, quotes, skipped rows, header rows, or explicit columns. JSON can read records and metadata from custom keys. XML can use custom root, record, metadata, and attribute fields."}),e(c,{language:"typescript",filename:"src/server/import-accounts.ts",code:h})]}),t(a,{className:"space-y-4",children:[e(i,{className:"font-bold text-2xl",children:"3) Let users review the mapping"}),e(p,{className:"text-muted-foreground text-sm leading-7",children:"The shared controller exposes template rows, matched source columns, confidence, required status, formatting summaries, unmatched required rows, and ignored source columns. Actions let users remap columns, select aliases, update field formats, reset to the template, or accept inferred mappings."}),e(c,{language:"tsx",filename:"src/components/ImportMappingReview.tsx",code:f})]}),t(a,{className:"space-y-4",children:[e(i,{className:"font-bold text-2xl",children:"4) Verify the package stack"}),e(c,{language:"bash",filename:"verification",code:v})]}),t(a,{className:"grid gap-4 md:grid-cols-2",children:[t(a,{className:"card-subtle space-y-3 p-6",children:[e(u,{className:"font-bold text-xl",children:"Prompt: build a template"}),e(c,{language:"markdown",filename:"template-authoring.prompt.md",code:b})]}),t(a,{className:"card-subtle space-y-3 p-6",children:[e(u,{className:"font-bold text-xl",children:"Prompt: inspect a partner file"}),e(c,{language:"markdown",filename:"partner-import-review.prompt.md",code:y})]})]}),t(k,{className:"flex flex-wrap items-center gap-4 pt-4",children:[t(w,{href:"/llms/lib.data-exchange-core",className:"btn-primary",children:[e(n,{children:"Core package guide"}),e(D,{size:16})]}),e(w,{href:"/llms/lib.data-exchange-server",className:"btn-ghost",children:e(n,{children:"Server package guide"})})]})]})}export{U as GuideDataExchangeImportTemplatesPage};
@@ -1,5 +1,5 @@
1
- var r=Object.defineProperty;var s=(t)=>t;function o(t,a){this[t]=s.bind(null,a)}var u=(t,a)=>{for(var n in a)r(t,n,{get:a[n],enumerable:!0,configurable:!0,set:o.bind(a,n)})};var f=(t,a)=>()=>(t&&(a=t(t=0)),a);import{CodeBlock as d}from"@contractspec/lib.design-system";import c from"@contractspec/lib.ui-link";import{ArrowRight as l,CheckCircle2 as m,GitBranch as p}from"lucide-react";import{jsx as e,jsxs as i}from"react/jsx-runtime";var h=[{title:"Adopt one endpoint in Next.js",description:"Start inside a live app with one operation, one generated surface, and one clearly bounded change.",href:"/docs/guides/nextjs-one-endpoint",time:"25 min"},{title:"Import an existing codebase",description:"Stabilize what already exists instead of treating adoption as a rewrite project.",href:"/docs/guides/import-existing-codebases",time:"20 min"},{title:"Validation and typing",description:"Keep runtime validation and TypeScript behavior aligned from the same source definitions.",href:"/docs/guides/spec-validation-and-typing",time:"20 min"},{title:"Build a contract-driven form",description:"Use FormSpec to keep data shape, fields, layout, policy, and submit behavior aligned.",href:"/docs/guides/contract-driven-forms",time:"25 min"},{title:"Generate docs and clients",description:"Publish stable docs, schemas, and client-facing artifacts from the contract layer.",href:"/docs/guides/generate-docs-clients-schemas",time:"20 min"},{title:"Docs pipeline",description:"Feed generated reference material into the docs site without confusing ownership.",href:"/docs/guides/docs-generation-pipeline",time:"20 min"},{title:"Build a first module bundle",description:"Define one bundle spec, resolve a surface plan, and render it through the React host layer.",href:"/docs/guides/first-module-bundle",time:"20 min"},{title:"Host the Builder workbench",description:"Wire a Builder workspace snapshot, common commands, runtime modes, and mobile review links into the reusable host.",href:"/docs/guides/host-builder-workbench",time:"20 min"},{title:"Use Connect in a repo",description:"Enable Connect, verify agent actions locally, and inspect the resulting review and replay artifacts.",href:"/docs/guides/connect-in-a-repo",time:"15 min"},{title:"Author release capsules",description:"Pair changesets with structured release capsules and generate the artifacts that changelog and upgrade flows consume.",href:"/docs/guides/release-capsules",time:"15 min"},{title:"CI diff gating",description:"Use deterministic checks to catch drift and risky changes before they ship.",href:"/docs/guides/ci-contract-diff-gating",time:"15 min"}];function y(){return i("div",{className:"space-y-10",children:[i("div",{className:"space-y-3",children:[e("p",{className:"editorial-kicker",children:"Build"}),e("h1",{className:"font-serif text-4xl tracking-[-0.04em] md:text-5xl",children:"Adoption guides for teams that want to keep their code."}),e("p",{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:"These guides assume you are introducing ContractSpec into a real code base. Start with a narrow surface, verify the generated outputs, and expand only after the contract loop feels trustworthy."})]}),e("div",{className:"grid gap-4 md:grid-cols-2",children:h.map((t)=>i(c,{href:t.href,className:"editorial-panel",children:[i("div",{className:"flex items-start justify-between gap-4",children:[i("div",{children:[e("h2",{className:"font-semibold text-xl",children:t.title}),e("p",{className:"mt-2 text-muted-foreground text-sm leading-7",children:t.description})]}),e(l,{className:"mt-1 shrink-0",size:18})]}),i("div",{className:"mt-4 flex items-center gap-2 text-muted-foreground text-xs",children:[e(m,{size:14}),i("span",{children:["Target time: ",t.time]})]})]},t.href))}),i("div",{className:"editorial-panel space-y-4",children:[i("div",{className:"flex items-center gap-2 font-semibold text-[color:var(--rust)] text-sm uppercase tracking-[0.2em]",children:[e(p,{size:16}),"Working style"]}),i("ul",{className:"editorial-list",children:[i("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:"Run each guide in a branch or sandboxed workspace."})]}),i("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:"Prefer one bounded surface at a time: one endpoint, one workflow, one integration, one unsafe module."})]}),i("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:"Use the example and reference outputs to verify what changed, not just the narrative page."})]})]}),e(d,{language:"bash",filename:"guides-quickstart",code:`# list example systems
1
+ var N=Object.defineProperty;var O=(q)=>q;function Q(q,z){this[q]=O.bind(null,z)}var G=(q,z)=>{for(var F in z)N(q,F,{get:z[F],enumerable:!0,configurable:!0,set:Q.bind(z,F)})};var R=(q,z)=>()=>(q&&(z=q(q=0)),z);import{CodeBlock as U}from"@contractspec/lib.design-system";import{HStack as J,VStack as E}from"@contractspec/lib.design-system/layout";import{List as W,ListItem as K}from"@contractspec/lib.design-system/list";import{H1 as X,H2 as Y,P as M,Text as D}from"@contractspec/lib.design-system/typography";import Z from"@contractspec/lib.ui-link";import{ArrowRight as _,CheckCircle2 as $,GitBranch as w}from"lucide-react";import{jsx as f,jsxs as v}from"react/jsx-runtime";var A=[{title:"Adopt one endpoint in Next.js",description:"Start inside a live app with one operation, one generated surface, and one clearly bounded change.",href:"/docs/guides/nextjs-one-endpoint",time:"25 min"},{title:"Import an existing codebase",description:"Stabilize what already exists instead of treating adoption as a rewrite project.",href:"/docs/guides/import-existing-codebases",time:"20 min"},{title:"Validation and typing",description:"Keep runtime validation and TypeScript behavior aligned from the same source definitions.",href:"/docs/guides/spec-validation-and-typing",time:"20 min"},{title:"Build a contract-driven form",description:"Use FormSpec to keep data shape, fields, layout, policy, and submit behavior aligned.",href:"/docs/guides/contract-driven-forms",time:"25 min"},{title:"Flexible import templates",description:"Accept partner CSV, JSON, and XML files with alternate headers and localized values while preserving a canonical import contract.",href:"/docs/guides/data-exchange-import-templates",time:"25 min"},{title:"Generate docs and clients",description:"Publish stable docs, schemas, and client-facing artifacts from the contract layer.",href:"/docs/guides/generate-docs-clients-schemas",time:"20 min"},{title:"Docs pipeline",description:"Feed generated reference material into the docs site without confusing ownership.",href:"/docs/guides/docs-generation-pipeline",time:"20 min"},{title:"Build a first module bundle",description:"Define one bundle spec, resolve a surface plan, and render it through the React host layer.",href:"/docs/guides/first-module-bundle",time:"20 min"},{title:"Host the Builder workbench",description:"Wire a Builder workspace snapshot, common commands, runtime modes, and mobile review links into the reusable host.",href:"/docs/guides/host-builder-workbench",time:"20 min"},{title:"Use Connect in a repo",description:"Enable Connect, verify agent actions locally, and inspect the resulting review and replay artifacts.",href:"/docs/guides/connect-in-a-repo",time:"15 min"},{title:"Author release capsules",description:"Pair changesets with structured release capsules and generate the artifacts that changelog and upgrade flows consume.",href:"/docs/guides/release-capsules",time:"15 min"},{title:"CI diff gating",description:"Use deterministic checks to catch drift and risky changes before they ship.",href:"/docs/guides/ci-contract-diff-gating",time:"15 min"}];function p(){return v(E,{className:"space-y-10",children:[v(E,{className:"space-y-3",children:[f(D,{className:"editorial-kicker",children:"Build"}),f(X,{className:"font-serif text-4xl tracking-[-0.04em] md:text-5xl",children:"Adoption guides for teams that want to keep their code."}),f(M,{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:"These guides assume you are introducing ContractSpec into a real code base. Start with a narrow surface, verify the generated outputs, and expand only after the contract loop feels trustworthy."})]}),f(E,{className:"grid gap-4 md:grid-cols-2",children:A.map((q)=>v(Z,{href:q.href,className:"editorial-panel",children:[v(J,{className:"flex items-start justify-between gap-4",children:[v(E,{children:[f(Y,{className:"font-semibold text-xl",children:q.title}),f(M,{className:"mt-2 text-muted-foreground text-sm leading-7",children:q.description})]}),f(_,{className:"mt-1 shrink-0",size:18})]}),v(J,{className:"mt-4 flex items-center gap-2 text-muted-foreground text-xs",children:[f($,{size:14}),v(D,{children:["Target time: ",q.time]})]})]},q.href))}),v(E,{className:"editorial-panel space-y-4",children:[v(J,{className:"flex items-center gap-2 font-semibold text-[color:var(--rust)] text-sm uppercase tracking-[0.2em]",children:[f(w,{size:16}),f(D,{children:"Working style"})]}),v(W,{className:"editorial-list",children:[f(K,{children:f(D,{children:"Run each guide in a branch or sandboxed workspace."})}),f(K,{children:f(D,{children:"Prefer one bounded surface at a time: one endpoint, one workflow, one integration, one unsafe module."})}),f(K,{children:f(D,{children:"Use the example and reference outputs to verify what changed, not just the narrative page."})})]}),f(U,{language:"bash",filename:"guides-quickstart",code:`# list example systems
2
2
  contractspec examples list
3
3
 
4
4
  # validate the examples in this workspace
5
- contractspec examples validate --repo-root .`})]})]})}export{y as GuidesIndexPage};
5
+ contractspec examples validate --repo-root .`})]})]})}export{p as GuidesIndexPage};