tenhaw 0.0.0-bootstrap

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 (123) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE-CONTENT +15 -0
  3. package/README.md +52 -0
  4. package/dist/chunk-BKPOQVTM.js +74 -0
  5. package/dist/chunk-ZIEK7SCN.js +73 -0
  6. package/dist/index.d.ts +24 -0
  7. package/dist/index.js +319 -0
  8. package/dist/scaffold.d.ts +14 -0
  9. package/dist/scaffold.js +8 -0
  10. package/instructions/ai-readiness-assessment/AGENTS.md +9 -0
  11. package/instructions/ai-roi-business-case/AGENTS.md +9 -0
  12. package/instructions/ai-usecase-register/AGENTS.md +9 -0
  13. package/instructions/build-ai-adoption-dashboard/AGENTS.md +9 -0
  14. package/instructions/delivery-metrics-dora/AGENTS.md +9 -0
  15. package/instructions/portfolio-tracking/AGENTS.md +9 -0
  16. package/instructions/product-operating-model/AGENTS.md +9 -0
  17. package/package.json +58 -0
  18. package/templates/ai-adoption-dashboard/AGENTS.md +22 -0
  19. package/templates/ai-adoption-dashboard/CLAUDE.md +22 -0
  20. package/templates/ai-adoption-dashboard/LICENSE +21 -0
  21. package/templates/ai-adoption-dashboard/LICENSE-CONTENT +15 -0
  22. package/templates/ai-adoption-dashboard/README.md +56 -0
  23. package/templates/ai-adoption-dashboard/app/globals.css +2 -0
  24. package/templates/ai-adoption-dashboard/app/layout.tsx +4 -0
  25. package/templates/ai-adoption-dashboard/app/page.tsx +14 -0
  26. package/templates/ai-adoption-dashboard/e2e/app.spec.ts +27 -0
  27. package/templates/ai-adoption-dashboard/lib/io.ts +42 -0
  28. package/templates/ai-adoption-dashboard/lib/model.test.ts +4 -0
  29. package/templates/ai-adoption-dashboard/lib/model.ts +9 -0
  30. package/templates/ai-adoption-dashboard/lib/workspace.tsx +49 -0
  31. package/templates/ai-adoption-dashboard/next-env.d.ts +7 -0
  32. package/templates/ai-adoption-dashboard/next.config.mjs +2 -0
  33. package/templates/ai-adoption-dashboard/package.json +31 -0
  34. package/templates/ai-adoption-dashboard/playwright.config.ts +2 -0
  35. package/templates/ai-adoption-dashboard/public/example.csv +5 -0
  36. package/templates/ai-adoption-dashboard/public/example.json +34 -0
  37. package/templates/ai-adoption-dashboard/public/llms.txt +6 -0
  38. package/templates/ai-adoption-dashboard/tsconfig.json +36 -0
  39. package/templates/ai-adoption-dashboard/vitest.config.ts +2 -0
  40. package/templates/ai-readiness-assessment/AGENTS.md +22 -0
  41. package/templates/ai-readiness-assessment/CLAUDE.md +22 -0
  42. package/templates/ai-readiness-assessment/LICENSE +21 -0
  43. package/templates/ai-readiness-assessment/LICENSE-CONTENT +15 -0
  44. package/templates/ai-readiness-assessment/README.md +56 -0
  45. package/templates/ai-readiness-assessment/app/globals.css +2 -0
  46. package/templates/ai-readiness-assessment/app/layout.tsx +4 -0
  47. package/templates/ai-readiness-assessment/app/page.tsx +11 -0
  48. package/templates/ai-readiness-assessment/e2e/app.spec.ts +27 -0
  49. package/templates/ai-readiness-assessment/lib/io.ts +42 -0
  50. package/templates/ai-readiness-assessment/lib/model.test.ts +5 -0
  51. package/templates/ai-readiness-assessment/lib/model.ts +5 -0
  52. package/templates/ai-readiness-assessment/lib/workspace.tsx +49 -0
  53. package/templates/ai-readiness-assessment/next-env.d.ts +7 -0
  54. package/templates/ai-readiness-assessment/next.config.mjs +2 -0
  55. package/templates/ai-readiness-assessment/package.json +32 -0
  56. package/templates/ai-readiness-assessment/playwright.config.ts +2 -0
  57. package/templates/ai-readiness-assessment/public/example.json +154 -0
  58. package/templates/ai-readiness-assessment/public/llms.txt +6 -0
  59. package/templates/ai-readiness-assessment/tsconfig.json +36 -0
  60. package/templates/ai-readiness-assessment/vitest.config.ts +2 -0
  61. package/templates/ai-usecase-register/AGENTS.md +22 -0
  62. package/templates/ai-usecase-register/CLAUDE.md +22 -0
  63. package/templates/ai-usecase-register/LICENSE +21 -0
  64. package/templates/ai-usecase-register/LICENSE-CONTENT +15 -0
  65. package/templates/ai-usecase-register/README.md +56 -0
  66. package/templates/ai-usecase-register/app/globals.css +2 -0
  67. package/templates/ai-usecase-register/app/layout.tsx +4 -0
  68. package/templates/ai-usecase-register/app/page.tsx +16 -0
  69. package/templates/ai-usecase-register/e2e/app.spec.ts +27 -0
  70. package/templates/ai-usecase-register/lib/io.ts +42 -0
  71. package/templates/ai-usecase-register/lib/model.test.ts +7 -0
  72. package/templates/ai-usecase-register/lib/model.ts +9 -0
  73. package/templates/ai-usecase-register/lib/workspace.tsx +49 -0
  74. package/templates/ai-usecase-register/next-env.d.ts +7 -0
  75. package/templates/ai-usecase-register/next.config.mjs +2 -0
  76. package/templates/ai-usecase-register/package.json +33 -0
  77. package/templates/ai-usecase-register/playwright.config.ts +2 -0
  78. package/templates/ai-usecase-register/public/example.json +41 -0
  79. package/templates/ai-usecase-register/public/llms.txt +6 -0
  80. package/templates/ai-usecase-register/tsconfig.json +36 -0
  81. package/templates/ai-usecase-register/vitest.config.ts +2 -0
  82. package/templates/delivery-metrics-dashboard/AGENTS.md +22 -0
  83. package/templates/delivery-metrics-dashboard/CLAUDE.md +22 -0
  84. package/templates/delivery-metrics-dashboard/LICENSE +21 -0
  85. package/templates/delivery-metrics-dashboard/LICENSE-CONTENT +15 -0
  86. package/templates/delivery-metrics-dashboard/README.md +56 -0
  87. package/templates/delivery-metrics-dashboard/app/globals.css +2 -0
  88. package/templates/delivery-metrics-dashboard/app/layout.tsx +4 -0
  89. package/templates/delivery-metrics-dashboard/app/page.tsx +13 -0
  90. package/templates/delivery-metrics-dashboard/e2e/app.spec.ts +27 -0
  91. package/templates/delivery-metrics-dashboard/lib/io.ts +42 -0
  92. package/templates/delivery-metrics-dashboard/lib/model.test.ts +5 -0
  93. package/templates/delivery-metrics-dashboard/lib/model.ts +19 -0
  94. package/templates/delivery-metrics-dashboard/lib/workspace.tsx +49 -0
  95. package/templates/delivery-metrics-dashboard/next-env.d.ts +7 -0
  96. package/templates/delivery-metrics-dashboard/next.config.mjs +2 -0
  97. package/templates/delivery-metrics-dashboard/package.json +32 -0
  98. package/templates/delivery-metrics-dashboard/playwright.config.ts +2 -0
  99. package/templates/delivery-metrics-dashboard/public/example.json +98 -0
  100. package/templates/delivery-metrics-dashboard/public/llms.txt +6 -0
  101. package/templates/delivery-metrics-dashboard/tsconfig.json +36 -0
  102. package/templates/delivery-metrics-dashboard/vitest.config.ts +2 -0
  103. package/templates/product-operating-model/AGENTS.md +22 -0
  104. package/templates/product-operating-model/CLAUDE.md +22 -0
  105. package/templates/product-operating-model/LICENSE +21 -0
  106. package/templates/product-operating-model/LICENSE-CONTENT +15 -0
  107. package/templates/product-operating-model/README.md +56 -0
  108. package/templates/product-operating-model/app/globals.css +2 -0
  109. package/templates/product-operating-model/app/layout.tsx +4 -0
  110. package/templates/product-operating-model/app/page.tsx +11 -0
  111. package/templates/product-operating-model/e2e/app.spec.ts +27 -0
  112. package/templates/product-operating-model/lib/io.ts +42 -0
  113. package/templates/product-operating-model/lib/model.test.ts +6 -0
  114. package/templates/product-operating-model/lib/model.ts +4 -0
  115. package/templates/product-operating-model/lib/workspace.tsx +49 -0
  116. package/templates/product-operating-model/next-env.d.ts +7 -0
  117. package/templates/product-operating-model/next.config.mjs +2 -0
  118. package/templates/product-operating-model/package.json +32 -0
  119. package/templates/product-operating-model/playwright.config.ts +2 -0
  120. package/templates/product-operating-model/public/example.json +119 -0
  121. package/templates/product-operating-model/public/llms.txt +6 -0
  122. package/templates/product-operating-model/tsconfig.json +36 -0
  123. package/templates/product-operating-model/vitest.config.ts +2 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tenhaw
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,15 @@
1
+ Tenhaw AI Readiness Framework and authored framework content in spec/content
2
+ are licensed under the Creative Commons Attribution 4.0 International licence.
3
+ Copyright (c) 2026 Tenhaw.
4
+
5
+ Licence: https://creativecommons.org/licenses/by/4.0/
6
+ Legal code: https://creativecommons.org/licenses/by/4.0/legalcode.en
7
+
8
+ When sharing or adapting this content, provide appropriate credit, a licence
9
+ link, and an indication of changes. A suitable credit is:
10
+ "Tenhaw AI Readiness Framework, CC BY 4.0, https://tenhaw.com."
11
+
12
+ Numerical results and user-supplied evidence remain the user's material.
13
+ The optional audit promotion can be suppressed independently of applicable
14
+ framework-content credits. Code is MIT; third-party sources retain their own
15
+ rights and are summarised with links rather than relicensed here.
@@ -0,0 +1,56 @@
1
+ # Ai readiness assessment
2
+
3
+ A working internal tool starter from Tenhaw Kit. Synthetic examples are included. Your imports and edits stay in browser localStorage.
4
+
5
+ ## When to use
6
+
7
+ Use this when building an internal ai readiness assessment. Start locally, inspect the sample model and replace it with your own imported data. Add authenticated shared persistence only when you need collaboration across users.
8
+
9
+ ## Run
10
+
11
+ ```sh
12
+ pnpm install
13
+ pnpm dev
14
+ pnpm build
15
+ pnpm test
16
+ pnpm typecheck
17
+ ```
18
+
19
+ Inside the Tenhaw Kit monorepo, first run the root library build. A scaffolded copy resolves released @tenhaw packages instead of workspace links. Publication must be verified separately; source builds do not prove registry availability.
20
+
21
+ ## Data and calculations
22
+
23
+ JSON is `{ "answers": [{ "questionId": "strategy-1", "score": 3, "evidence": "optional" }] }`. Thirty questions across six dimensions. Missing questions are excluded and coverage is shown. Maturity bands require at least 80% coverage. HTML report export and Print / PDF are available.
24
+
25
+ See `lib/model.ts` for the example and import validation. Calculation rules live in the @tenhaw packages; shared JSON Schemas and golden vectors live in the Tenhaw Kit source repository.
26
+
27
+ Files up to 2 MB are accepted. CSV and delivery-event imports are capped at 10,000 rows; domain schema limits also apply. JSON export preserves the input model. CSV exports protect text cells against spreadsheet formula injection. Browser storage can be unavailable or full; keep an exported JSON backup before clearing storage, changing origin or changing devices.
28
+
29
+ ## Deploy
30
+
31
+ The Next.js build uses static export (`out/`). There is no API endpoint or shared database receiving the imported data. Deploy static output anywhere, including Vercel. The starter contains no credential fields, token collection, scheduled collectors or telemetry.
32
+
33
+ [Deploy to Vercel](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FTenhaw%2Ftemplate-ai-readiness-assessment&project-name=ai-readiness-assessment) requires the public satellite repository to have been published. A local build does not verify that external release.
34
+
35
+ ## Extend with authentication and a database
36
+
37
+ Before adding server persistence, remove static export and implement authentication plus authorisation for every read, write, import and export route. Auth.js can supply the session, but checking a session alone does not define who may access each record. Protect production deployments as well as previews.
38
+
39
+ A database is deliberately not included in this browser-local baseline. For collaboration, add Drizzle with an explicit SQLite or PostgreSQL schema and dialect-specific migrations, then write a one-time import from the exported JSON. Setting DATABASE_URL alone does not switch database dialects. Keep credentials server-side and out of NEXT_PUBLIC variables.
40
+
41
+ Run GitHub/Jira collectors locally with your read-only environment tokens and import their output. Do not add hosted collection until access control and credential storage are implemented and tested.
42
+
43
+ ## Check the browser workflow
44
+
45
+ ```sh
46
+ pnpm exec playwright install chromium
47
+ pnpm e2e
48
+ ```
49
+
50
+ The browser test opens the synthetic workspace and verifies JSON export. Unit tests cover meaningful import and calculation boundaries. No live source-system tokens are needed.
51
+
52
+ ## Licence and attribution
53
+
54
+ Code: MIT. The bundled readiness framework content remains CC BY 4.0 where used. Set `NEXT_PUBLIC_TENHAW_ATTRIBUTION=false` before building to remove the optional marketing footer; applicable licence notices remain.
55
+
56
+ Built with Tenhaw Kit. [Get expert help applying this](https://tenhaw.com/contact?utm_source=template&utm_medium=readme&utm_campaign=tenhaw-kit&utm_content=ai-readiness-assessment#book).
@@ -0,0 +1,2 @@
1
+ :root{color-scheme:dark;--ink:#0a0d12;--panel:#111821;--line:#293544;--text:#e9eef3;--muted:#a8b4c2;--yellow:#ffd400;--green:#39e58c}*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.55}a{color:var(--yellow);text-underline-offset:4px}button,input,select,textarea{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--panel);color:var(--text);padding:9px 14px;border:1px solid var(--line);border-radius:5px;cursor:pointer;text-decoration:none;font-weight:600}button:hover,.button:hover{border-color:var(--muted)}button:focus-visible,.button:focus-within,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--yellow);outline-offset:4px}.primary{background:var(--yellow);color:var(--ink);border-color:var(--yellow)}.subtle{background:transparent;color:var(--muted)}.button input[type=file]{position:absolute;width:1px;height:1px;opacity:0}.workspace{min-height:100vh;display:grid;grid-template-columns:230px 1fr}.sidebar{border-right:1px solid var(--line);padding:28px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;gap:10px;align-items:center;font-size:22px;font-weight:700;margin-bottom:52px}.mark{background:var(--yellow);color:var(--ink);width:34px;height:34px;display:grid;place-items:center;font-size:25px;line-height:1}.muted{color:var(--muted)}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.16em;color:var(--muted);margin:0 0 15px}.sidebar nav{display:grid;gap:5px}.nav{justify-content:flex-start;background:none;border-color:transparent;font-size:14px}.nav.active{background:#202a34;color:var(--yellow)}.sidebar-note{margin-top:auto;padding-top:48px;font-size:12px;color:var(--muted)}.sidebar-note p{margin:8px 0}.sidebar-note small{font-size:11px}.dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:7px}main{min-width:0;max-width:1500px;width:100%;padding:42px 48px}header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:26px;margin-bottom:24px}h1{font-size:clamp(27px,3vw,38px);letter-spacing:-.04em;line-height:1.15;margin:0 0 14px}h2{font-size:17px;margin:0;font-weight:600}h3{font-size:15px}.lede{color:var(--muted);max-width:700px;margin:0}.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.notice{font-size:12px;color:var(--muted);margin:12px 0 26px;min-height:19px}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));border:1px solid var(--line);margin:0 0 28px;border-radius:6px;overflow:hidden}.stat{padding:20px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:10px;background:var(--panel)}.stat:last-child{border-right:0}.stat>span{color:var(--muted);font-size:12px}.stat strong{font-size:30px;font-weight:500;letter-spacing:-.04em;line-height:1.2}.stat small{color:var(--muted);font-size:11px}.panel{border:1px solid var(--line);background:var(--panel);padding:24px;border-radius:6px;margin-bottom:22px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.panel-heading small{color:var(--muted);font-size:11px}.columns{display:grid;grid-template-columns:1fr 1fr;gap:22px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:13px}th{font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:0 12px 12px 0}td{padding:13px 12px 13px 0;border-top:1px solid var(--line);vertical-align:top}td:first-child{font-weight:600}tbody tr:hover{background:#18222e}.bar-row{margin:18px 0}.bar-row>div:first-child{display:flex;justify-content:space-between;font-size:12px;margin-bottom:8px}.bar-row strong{font-weight:500;color:var(--muted)}.track{height:7px;background:#263240;border-radius:3px;overflow:hidden}.track>span{height:100%;display:block;background:var(--yellow);border-radius:3px}.tag{display:inline-block;font-size:10px;padding:3px 7px;border:1px solid var(--line);border-radius:3px;color:var(--muted);white-space:nowrap}.tag.good{color:var(--green);border-color:#275944}.tag.warn{color:var(--yellow);border-color:#6c601d}label.field{display:flex;flex-direction:column;gap:6px;font-size:12px;margin-bottom:15px;color:var(--muted)}input:not([type=file]),select,textarea{background:var(--ink);border:1px solid var(--line);padding:9px 11px;border-radius:4px;color:var(--text);min-width:0}textarea{width:100%;min-height:140px;font-family:monospace;font-size:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.form-grid .wide{grid-column:1/-1}.question{padding:18px 0;border-top:1px solid var(--line)}.question:first-of-type{border-top:0}.question label{display:block}.question-title{font-size:14px;font-weight:600}.question small{display:block;color:var(--muted);margin:6px 0 12px}.question select{width:100%;max-width:600px;margin-bottom:10px}.question input{display:block;width:100%;max-width:600px}details{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}summary{cursor:pointer;color:var(--muted);font-size:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;background:var(--ink);padding:18px;border-radius:5px;max-height:500px;overflow:auto}.empty{color:var(--muted);font-size:13px}.notes{font-size:12px;color:var(--muted)}.notes li{margin:8px 0}.matrix{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quadrant{min-height:130px;border:1px solid var(--line);padding:14px}.quadrant h3{color:var(--muted);margin-top:0;font-size:11px}.quadrant p{margin:8px 0;font-size:12px}.score{font-variant-numeric:tabular-nums}.progress{width:100%;accent-color:var(--yellow)}footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;border-top:1px solid var(--line);margin-top:40px;padding-top:20px;color:var(--muted);font-size:10px}.skip{position:fixed;top:-100px;left:20px;background:var(--yellow);color:var(--ink);padding:10px;z-index:20}.skip:focus{top:10px}@media(max-width:1000px){main{padding:32px 26px}.workspace{grid-template-columns:185px 1fr}.sidebar{padding:24px 12px}.columns{grid-template-columns:1fr}}@media(max-width:700px){.workspace{display:block}.sidebar{height:auto;position:static;border-right:0;border-bottom:1px solid var(--line);padding:16px 20px}.brand{margin-bottom:18px}.sidebar>.eyebrow,.sidebar-note{display:none}.sidebar nav{display:flex;overflow:auto;gap:5px}.nav{font-size:12px;white-space:nowrap;padding:8px 10px}main{padding:28px 20px}.stats{grid-template-columns:1fr 1fr}.stat{padding:16px}.stat strong{font-size:24px}.panel{padding:18px}.form-grid{grid-template-columns:1fr}.toolbar{gap:7px}.toolbar button,.toolbar .button{font-size:12px;padding:8px 10px}}
2
+ @media print{.sidebar,.toolbar,.notice,footer{display:none}.workspace{display:block}main{padding:0;max-width:none}body{background:white;color:#111;color-scheme:light}.panel,.stat{background:white;border-color:#aaa;break-inside:avoid}pre{background:#f4f4f4;color:#111}.muted,.lede,.notes,.stat>span,th{color:#333}.track{background:#ddd}.track>span{background:#666}button,input,select{color:#111;background:white}}
@@ -0,0 +1,4 @@
1
+ import type { Metadata } from "next";
2
+ import "./globals.css";
3
+ export const metadata: Metadata = { title: "Ai readiness assessment | Tenhaw Kit", description: "A local-first internal tool starter. Synthetic examples included. Your imported data stays in this browser.", robots: { index: false, follow: false } };
4
+ export default function Layout({children}:{children:React.ReactNode}) { return <html lang="en-GB"><body>{children}</body></html>; }
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { useState } from "react";
3
+ import { renderReadinessReport } from "@tenhaw/ai-readiness";
4
+ import { framework, example, validateAssessment, assess } from "../lib/model";
5
+ import { Workspace, Stats, Panel, Table, Bar, FileActions, useWorkspace, number, JsonReport, download } from "../lib/workspace";
6
+ export default function Page(){const [section,setSection]=useState("Overview");const [dimensionId,setDimensionId]=useState(framework.dimensions[0]!.id);const state=useWorkspace("tenhaw-readiness-v1",example,validateAssessment);const ready=state.ready;const report=assess(state.data);const dimension=framework.dimensions.find(d=>d.id===dimensionId)!;
7
+ function answer(questionId:string,score:number|undefined,evidence?:string){state.setData(previous=>{const current=previous.answers.find(answer=>answer.questionId===questionId);const others=previous.answers.filter(answer=>answer.questionId!==questionId);return {answers:score===undefined?others:[...others,{questionId,score,evidence:evidence??current?.evidence??""}]};});}
8
+ return <Workspace ready={ready} title="AI readiness" description="Build an evidence-based view of six dimensions, then agree the gaps to address first." section={section} setSection={setSection} sections={["Overview","Questionnaire","Gaps","Methodology"]} notice={state.notice} actions={<><FileActions ready={ready} name="readiness-responses" data={state.data} reset={state.reset} onError={state.setNotice} onImport={source=>{state.setData(validateAssessment(JSON.parse(source)));state.setNotice("Responses imported into this browser.");}}/><button disabled={!ready} type="button" onClick={()=>{state.setData({answers:[]});setSection("Questionnaire");state.setNotice("New blank assessment started.");}}>Start blank</button><button disabled={!ready} type="button" onClick={()=>download("readiness-report.html",renderReadinessReport(report,"html",{source:"template"}),"text/html")}>HTML report</button><button disabled={!ready} type="button" onClick={()=>window.print()}>Print / PDF</button></>}>
9
+ <Stats items={[{label:"Overall score",value:report.overall===null?"Not scored":`${number(report.overall,2)} / 5`,note:"Weighted mean of answered dimensions"},{label:"Response coverage",value:`${Math.round(report.coverage*100)}%`,note:`${state.data.answers.length} of 30 questions`},{label:"Maturity band",value:report.band??"Insufficient coverage",note:"Requires at least 80% answers"},{label:"Priority gaps",value:report.gaps.length,note:"Answered questions scoring 1 or 2"}]}/>
10
+ {section==="Questionnaire"?<Panel title="Your assessment" aside="Unanswered questions are excluded"><label className="field">Dimension<select disabled={!ready} value={dimensionId} onChange={event=>setDimensionId(event.target.value)}>{framework.dimensions.map(d=><option key={d.id} value={d.id}>{d.label}</option>)}</select></label>{dimension.questions.map((question,i)=>{const current=state.data.answers.find(a=>a.questionId===question.id);return <div className="question" key={question.id}><label htmlFor={question.id} className="question-title">{i+1}. {question.text}</label><small>Choose the level supported by your evidence.</small><select disabled={!ready} id={question.id} value={current?.score??""} onChange={event=>answer(question.id,event.target.value?Number(event.target.value):undefined)}><option value="">Unanswered</option>{question.anchors.map(anchor=><option key={anchor.score} value={anchor.score}>{anchor.score}. {anchor.label}: {anchor.description}</option>)}</select>{current&&<label className="field">Evidence (optional)<input disabled={!ready} value={current.evidence??""} onChange={event=>answer(question.id,current.score,event.target.value)} placeholder="Link or short note supporting this score" maxLength={4000}/></label>}</div>;})}</Panel>:section==="Gaps"?<Panel title="What to work on next"><Table headers={["Question","Dimension","Score","Priority","Action"]} rows={report.gaps.map(gap=>[gap.questionId,framework.dimensions.find(d=>d.id===gap.dimensionId)?.label,gap.score,number(gap.priority,2),gap.recommendation])}/>{report.gaps.length===0&&<p className="notes">Answer the questionnaire to identify gaps. An unanswered question is unknown, not evidence of readiness.</p>}</Panel>:section==="Methodology"?<Panel title="How scoring works"><p className="notes">Each dimension is the mean of its answered questions. The overall is a weighted mean, renormalised over dimensions with answers. Coverage is answered / 30, not statistical confidence. Maturity bands are withheld below 80% coverage.</p><Table headers={["Dimension","Default weight"]} rows={framework.dimensions.map(d=>[d.label,`${Math.round(d.weight*100)}%`])}/><ul className="notes">{report.limitations.map(line=><li key={line}>{line}</li>)}</ul><p className="notes">Tenhaw AI Readiness Framework, <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>. Framework content attribution remains when the optional promotion is hidden.</p><JsonReport value={report}/></Panel>:<div className="columns"><Panel title="Readiness by dimension" aside="Score out of five">{report.dimensions.map(d=><Bar key={d.id} label={d.label} value={d.score??0} max={5} detail={d.score===null?"Unanswered":`${number(d.score,2)} / 5`}/>)}</Panel><Panel title="Evidence coverage"><Table headers={["Dimension","Answered","Coverage"]} rows={report.dimensions.map(d=>[d.label,`${d.answered} / ${d.total}`,`${Math.round(d.coverage*100)}%`])}/><p className="notes">Use the questionnaire to replace synthetic answers. This is self-assessment support, not a certification or legal advice.</p></Panel></div>}
11
+ </Workspace>;}
@@ -0,0 +1,27 @@
1
+ import { test, expect } from "@playwright/test";
2
+
3
+ test("server-rendered data controls stay disabled before hydration", async ({ browser }) => {
4
+ const context = await browser.newContext({ javaScriptEnabled: false });
5
+ try {
6
+ const page = await context.newPage();
7
+ await page.goto("/");
8
+ await expect(page.locator(".workspace")).toHaveAttribute("data-state", "loading");
9
+ await expect(page.getByRole("button", { name: "Export JSON", exact: true })).toBeDisabled();
10
+ await expect(page.getByRole("button", { name: "Reset to example", exact: true })).toBeDisabled();
11
+ await expect(page.locator('input[type="file"]')).toBeDisabled();
12
+ } finally {
13
+ await context.close();
14
+ }
15
+ });
16
+
17
+ test("restores the local workspace before enabling export", async ({ page }) => {
18
+ await page.goto("/");
19
+ await expect(page.getByRole("heading", { level: 1 })).toBeVisible();
20
+ await expect(page.getByText("Data stays in this browser.", { exact: true })).toBeVisible();
21
+ await expect(page.locator(".workspace")).toHaveAttribute("data-state", "ready");
22
+ const button = page.getByRole("button", { name: "Export JSON", exact: true });
23
+ await expect(button).toBeEnabled();
24
+ const download = page.waitForEvent("download");
25
+ await button.click();
26
+ expect((await download).suggestedFilename()).toMatch(/\.json$/);
27
+ });
@@ -0,0 +1,42 @@
1
+ export function record(value: unknown, path = "input"): Record<string, unknown> {
2
+ if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error(`${path}: expected an object.`);
3
+ return value as Record<string, unknown>;
4
+ }
5
+ export function text(value: unknown, path: string): string {
6
+ if (typeof value !== "string" || !value.trim() || value.length > 2000) throw new Error(`${path}: use text between 1 and 2,000 characters.`);
7
+ return value.trim();
8
+ }
9
+ export function finite(value: unknown, path: string, min = 0, max = 1_000_000_000): number {
10
+ if (value === "" || value === null || value === undefined) throw new Error(`${path}: a number is required.`);
11
+ const result = typeof value === "number" ? value : typeof value === "string" ? Number(value) : NaN;
12
+ if (!Number.isFinite(result) || result < min || result > max) throw new Error(`${path}: use a number between ${min} and ${max}.`);
13
+ return result;
14
+ }
15
+ export function list(value: unknown, path: string): unknown[] {
16
+ if (!Array.isArray(value) || value.length > 10000) throw new Error(`${path}: expected an array of at most 10,000 records.`);
17
+ return value;
18
+ }
19
+
20
+ /** RFC 4180-style parsing; quoted commas, double quotes and embedded newlines supported. */
21
+ export function parseCsv(source: string): Record<string,string>[] {
22
+ const rows:string[][]=[]; let row:string[]=[], field="",quoted=false,closed=false;
23
+ const input=source.replace(/^\uFEFF/,"");
24
+ for(let i=0;i<input.length;i++) {const char=input[i];
25
+ if(quoted) {if(char==='"'&&input[i+1]==='"'){field+='"';i++;}else if(char==='"'){quoted=false;closed=true;}else field+=char;}
26
+ else if(char==='"'){if(field || closed) throw new Error("CSV: unexpected quote.");quoted=true;}
27
+ else if(char===","){row.push(field);field="";closed=false;}
28
+ else if(char==="\n"||char==="\r"){if(char==="\r"&&input[i+1]==="\n")i++;row.push(field);if(row.some(Boolean))rows.push(row);row=[];field="";closed=false;}
29
+ else {if(closed)throw new Error("CSV: unexpected text after a closing quote.");field+=char;}
30
+ }
31
+ if(quoted)throw new Error("CSV: an opening quote is not closed.");
32
+ row.push(field);if(row.some(Boolean))rows.push(row);
33
+ const headers=rows.shift()?.map(header=>header.trim());
34
+ if(!headers?.length || headers.some(header=>!header) || new Set(headers).size!==headers.length)throw new Error("CSV: use unique, non-empty column headers.");
35
+ if(rows.length>10000)throw new Error("CSV: at most 10,000 rows are supported.");
36
+ return rows.map((cells,i)=>{if(cells.length!==headers.length)throw new Error(`CSV row ${i+2}: expected ${headers.length} columns.`);return Object.fromEntries(headers.map((header,j)=>[header,cells[j]]));});
37
+ }
38
+ export function toCsv(rows: Record<string,unknown>[], headers?:string[]): string {
39
+ const columns=headers??Object.keys(rows[0]??{});
40
+ const escape=(value:unknown)=>{let content=value===null||value===undefined?"":String(value);if(/^[\t\r\n ]*[=+@-]/.test(content)&&typeof value!=="number")content="'"+content;return '"'+content.replaceAll('"','""')+'"';};
41
+ return [columns.map(escape).join(","),...rows.map(row=>columns.map(key=>escape(row[key])).join(","))].join("\r\n");
42
+ }
@@ -0,0 +1,5 @@
1
+ import { it,expect } from "vitest";
2
+ import { assess,example,framework,validateAssessment } from "./model";
3
+ it("covers the complete questionnaire and reports the synthetic gaps",()=>{expect(framework.dimensions.flatMap(d=>d.questions)).toHaveLength(30);expect(assess(example).coverage).toBe(1);expect(assess(example).gaps.length).toBeGreaterThan(0);});
4
+ it("withholds bands for incomplete data",()=>{expect(assess({answers:[{questionId:"strategy-1",score:5}]}).band).toBeNull();expect(assess({answers:[]}).overall).toBeNull();});
5
+ it("rejects malformed imported responses",()=>{expect(()=>validateAssessment({answers:[{questionId:"bogus",score:3}]})).toThrow();});
@@ -0,0 +1,5 @@
1
+ import { loadFramework, scoreReadiness, validateResponses, type ReadinessResponse } from "@tenhaw/ai-readiness";
2
+ export const framework=loadFramework();
3
+ export const example:ReadinessResponse={answers:framework.dimensions.flatMap((dimension,i)=>dimension.questions.map((question,j)=>({questionId:question.id,score:((i+j)%4)+1,evidence:"Synthetic example. Replace with your evidence."})))};
4
+ export const validateAssessment=(value:unknown)=>validateResponses(value);
5
+ export function assess(value:unknown){return scoreReadiness(validateResponses(value));}
@@ -0,0 +1,49 @@
1
+ "use client";
2
+
3
+ import { useEffect, useState, type ReactNode } from "react";
4
+ import { buildUtmUrl } from "@tenhaw/core";
5
+
6
+ export function useWorkspace<T>(key: string, sample: T, validate: (value: unknown) => T) {
7
+ const [data, setData] = useState<T>(sample);
8
+ const [notice, setNotice] = useState("Synthetic examples. Import your own file to begin.");
9
+ const [ready, setReady] = useState(false);
10
+ useEffect(() => {
11
+ try {
12
+ const saved = localStorage.getItem(key);
13
+ if (saved) { setData(validate(JSON.parse(saved))); setNotice("Restored from this browser."); }
14
+ } catch { setNotice("Saved data could not be read. Synthetic examples loaded."); }
15
+ setReady(true);
16
+ }, [key, validate]);
17
+ useEffect(() => {
18
+ if (!ready) return;
19
+ try { localStorage.setItem(key, JSON.stringify(data)); }
20
+ catch { setNotice("Browser storage is unavailable or full. Export a JSON copy to keep your work."); }
21
+ }, [data, key, ready]);
22
+ function reset() { setData(sample); setNotice("Synthetic examples restored."); }
23
+ function clear() { localStorage.removeItem(key); setNotice("Saved copy removed. Export anything you need before closing this tab."); }
24
+ return { data, setData, notice, setNotice, reset, clear, ready };
25
+ }
26
+
27
+ export function download(name: string, data: unknown, type = "application/json") {
28
+ const body = typeof data === "string" ? data : JSON.stringify(data, null, 2);
29
+ const url = URL.createObjectURL(new Blob([body], { type }));
30
+ const anchor = document.createElement("a"); anchor.href = url; anchor.download = name; anchor.click();
31
+ setTimeout(() => URL.revokeObjectURL(url), 1000);
32
+ }
33
+
34
+ export function Workspace({ title, description, section, setSection, sections, children, actions, notice, ready }: {
35
+ title: string; description: string; section: string; setSection: (section: string) => void;
36
+ sections: string[]; children: ReactNode; actions?: ReactNode; notice: string; ready: boolean;
37
+ }) {
38
+ return <div className="workspace" data-state={ready ? "ready" : "loading"} aria-busy={!ready}><a className="skip" href="#workspace-main">Skip to workspace</a><aside className="sidebar"><div className="brand"><span className="mark" aria-hidden="true">t.</span><span>tenhaw<span className="muted"> / kit</span></span></div><span className="eyebrow">INTERNAL WORKSPACE</span><nav aria-label="Workspace views">{sections.map(item => <button disabled={!ready} key={item} type="button" aria-current={item === section ? "page" : undefined} className={item === section ? "nav active" : "nav"} onClick={() => setSection(item)}>{item}</button>)}</nav><div className="sidebar-note"><span className="dot" /> Local workspace<p>Data stays in this browser.</p><small>No account, shared database or usage tracking.</small></div></aside><main id="workspace-main"><header><div><p className="eyebrow">TENHAW KIT / {section.toUpperCase()}</p><h1>{title}</h1><p className="lede">{description}</p></div></header><div className="toolbar">{actions}</div><p className="notice" role="status">{notice}</p>{children}<footer>{process.env.NEXT_PUBLIC_TENHAW_ATTRIBUTION !== "false" && <span>Built with Tenhaw Kit. <a href={buildUtmUrl({source:"template",medium:"footer",content:title.toLowerCase().replaceAll(" ","-")})}>Get help applying this</a></span>}<span>Imported records stay on this device. Export before clearing browser storage.</span></footer></main></div>;
39
+ }
40
+
41
+ export function FileActions<T>({data, name, onImport, onError, reset, csv, ready}: {ready:boolean;data:T;name:string;onImport:(text:string,extension:string)=>void;onError:(message:string)=>void;reset:()=>void;csv?:string}) {
42
+ return <><label className="button primary">Import {csv !== undefined ? "CSV / JSON" : "JSON"}<input disabled={!ready} type="file" accept={csv !== undefined ? ".json,.csv" : ".json"} onChange={async event => { const file = event.target.files?.[0]; event.target.value=""; if (!file) return; if (file.size > 2_000_000) {onError("Choose a file under 2 MB."); return;} try {onImport(await file.text(), file.name.toLowerCase().endsWith(".csv") ? "csv" : "json");} catch(error) {onError(error instanceof Error ? error.message : "Could not import this file.");} }} /></label><button disabled={!ready} type="button" onClick={()=>download(name+".json",data)}>Export JSON</button>{csv !== undefined && <button disabled={!ready} type="button" onClick={()=>download(name+".csv",csv,"text/csv;charset=utf-8")}>Export CSV</button>}<button disabled={!ready} type="button" className="subtle" onClick={reset}>Reset to example</button></>;
43
+ }
44
+ export function Stats({items}:{items:{label:string;value:ReactNode;note?:string}[]}) { return <div className="stats">{items.map(item=><article key={item.label} className="stat"><span>{item.label}</span><strong>{item.value}</strong>{item.note && <small>{item.note}</small>}</article>)}</div>; }
45
+ export function Panel({title,children,aside}:{title:string;children:ReactNode;aside?:string}) { return <section className="panel"><div className="panel-heading"><h2>{title}</h2>{aside && <small>{aside}</small>}</div>{children}</section>; }
46
+ export function Bar({label,value,max=100,detail}:{label:string;value:number;max?:number;detail?:string}) {return <div className="bar-row"><div><span>{label}</span><strong>{detail ?? `${Math.round(value)}%`}</strong></div><div className="track"><span style={{width:`${Math.min(100,Math.max(0,max > 0 ? value/max*100 : 0))}%`}} /></div></div>;}
47
+ export function Table({headers,rows}:{headers:string[];rows:ReactNode[][]}) {return <div className="table-scroll"><table><thead><tr>{headers.map(header=><th key={header} scope="col">{header}</th>)}</tr></thead><tbody>{rows.map((row,i)=><tr key={i}>{row.map((cell,j)=><td key={j}>{cell}</td>)}</tr>)}</tbody></table>{rows.length===0&&<p className="empty">No records yet.</p>}</div>;}
48
+ export function JsonReport({value}:{value:unknown}) {return <details><summary>Inspect calculation output</summary><pre>{JSON.stringify(value,null,2)}</pre></details>;}
49
+ export const number = (value:number|null, digits=1) => value === null ? "Insufficient data" : value.toLocaleString("en-GB",{maximumFractionDigits:digits});
@@ -0,0 +1,7 @@
1
+ /// <reference types="next" />
2
+ /// <reference types="next/image-types/global" />
3
+ import "./.next/types/routes.d.ts";
4
+ import "./.next/types/root-params.d.ts";
5
+
6
+ // NOTE: This file should not be edited
7
+ // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
@@ -0,0 +1,2 @@
1
+ /** @type {import('next').NextConfig} */
2
+ export default { output: 'export', trailingSlash: true, transpilePackages: ["@tenhaw/core", "@tenhaw/ai-readiness"] };
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@tenhaw-template/ai-readiness-assessment",
3
+ "version": "0.0.0-bootstrap",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "typecheck": "tsc --noEmit",
10
+ "test": "vitest run",
11
+ "e2e": "playwright test"
12
+ },
13
+ "dependencies": {
14
+ "next": "16.4.5",
15
+ "react": "19.2.4",
16
+ "react-dom": "19.2.4",
17
+ "@tenhaw/core": "0.0.0-bootstrap",
18
+ "@tenhaw/ai-readiness": "0.0.0-bootstrap"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^22.0.0",
22
+ "@types/react": "^19.0.0",
23
+ "@types/react-dom": "^19.0.0",
24
+ "typescript": "^5.9.0",
25
+ "vitest": "^3.2.0",
26
+ "@playwright/test": "^1.56.0"
27
+ },
28
+ "license": "MIT",
29
+ "author": "Tenhaw (https://tenhaw.com)",
30
+ "homepage": "https://kit.tenhaw.com/templates/ai-readiness-assessment/",
31
+ "type": "module"
32
+ }
@@ -0,0 +1,2 @@
1
+ import { defineConfig } from "@playwright/test";
2
+ export default defineConfig({testDir:"./e2e", use:{baseURL:"http://localhost:3100"}, webServer:{command:"pnpm dev --port 3100",url:"http://localhost:3100",reuseExistingServer:!process.env.CI}});
@@ -0,0 +1,154 @@
1
+ {
2
+ "answers": [
3
+ {
4
+ "questionId": "strategy-1",
5
+ "score": 1,
6
+ "evidence": "Synthetic example. Replace with your evidence."
7
+ },
8
+ {
9
+ "questionId": "strategy-2",
10
+ "score": 2,
11
+ "evidence": "Synthetic example. Replace with your evidence."
12
+ },
13
+ {
14
+ "questionId": "strategy-3",
15
+ "score": 3,
16
+ "evidence": "Synthetic example. Replace with your evidence."
17
+ },
18
+ {
19
+ "questionId": "strategy-4",
20
+ "score": 4,
21
+ "evidence": "Synthetic example. Replace with your evidence."
22
+ },
23
+ {
24
+ "questionId": "strategy-5",
25
+ "score": 1,
26
+ "evidence": "Synthetic example. Replace with your evidence."
27
+ },
28
+ {
29
+ "questionId": "data-1",
30
+ "score": 2,
31
+ "evidence": "Synthetic example. Replace with your evidence."
32
+ },
33
+ {
34
+ "questionId": "data-2",
35
+ "score": 3,
36
+ "evidence": "Synthetic example. Replace with your evidence."
37
+ },
38
+ {
39
+ "questionId": "data-3",
40
+ "score": 4,
41
+ "evidence": "Synthetic example. Replace with your evidence."
42
+ },
43
+ {
44
+ "questionId": "data-4",
45
+ "score": 1,
46
+ "evidence": "Synthetic example. Replace with your evidence."
47
+ },
48
+ {
49
+ "questionId": "data-5",
50
+ "score": 2,
51
+ "evidence": "Synthetic example. Replace with your evidence."
52
+ },
53
+ {
54
+ "questionId": "technology-1",
55
+ "score": 3,
56
+ "evidence": "Synthetic example. Replace with your evidence."
57
+ },
58
+ {
59
+ "questionId": "technology-2",
60
+ "score": 4,
61
+ "evidence": "Synthetic example. Replace with your evidence."
62
+ },
63
+ {
64
+ "questionId": "technology-3",
65
+ "score": 1,
66
+ "evidence": "Synthetic example. Replace with your evidence."
67
+ },
68
+ {
69
+ "questionId": "technology-4",
70
+ "score": 2,
71
+ "evidence": "Synthetic example. Replace with your evidence."
72
+ },
73
+ {
74
+ "questionId": "technology-5",
75
+ "score": 3,
76
+ "evidence": "Synthetic example. Replace with your evidence."
77
+ },
78
+ {
79
+ "questionId": "people-1",
80
+ "score": 4,
81
+ "evidence": "Synthetic example. Replace with your evidence."
82
+ },
83
+ {
84
+ "questionId": "people-2",
85
+ "score": 1,
86
+ "evidence": "Synthetic example. Replace with your evidence."
87
+ },
88
+ {
89
+ "questionId": "people-3",
90
+ "score": 2,
91
+ "evidence": "Synthetic example. Replace with your evidence."
92
+ },
93
+ {
94
+ "questionId": "people-4",
95
+ "score": 3,
96
+ "evidence": "Synthetic example. Replace with your evidence."
97
+ },
98
+ {
99
+ "questionId": "people-5",
100
+ "score": 4,
101
+ "evidence": "Synthetic example. Replace with your evidence."
102
+ },
103
+ {
104
+ "questionId": "governance-1",
105
+ "score": 1,
106
+ "evidence": "Synthetic example. Replace with your evidence."
107
+ },
108
+ {
109
+ "questionId": "governance-2",
110
+ "score": 2,
111
+ "evidence": "Synthetic example. Replace with your evidence."
112
+ },
113
+ {
114
+ "questionId": "governance-3",
115
+ "score": 3,
116
+ "evidence": "Synthetic example. Replace with your evidence."
117
+ },
118
+ {
119
+ "questionId": "governance-4",
120
+ "score": 4,
121
+ "evidence": "Synthetic example. Replace with your evidence."
122
+ },
123
+ {
124
+ "questionId": "governance-5",
125
+ "score": 1,
126
+ "evidence": "Synthetic example. Replace with your evidence."
127
+ },
128
+ {
129
+ "questionId": "delivery-1",
130
+ "score": 2,
131
+ "evidence": "Synthetic example. Replace with your evidence."
132
+ },
133
+ {
134
+ "questionId": "delivery-2",
135
+ "score": 3,
136
+ "evidence": "Synthetic example. Replace with your evidence."
137
+ },
138
+ {
139
+ "questionId": "delivery-3",
140
+ "score": 4,
141
+ "evidence": "Synthetic example. Replace with your evidence."
142
+ },
143
+ {
144
+ "questionId": "delivery-4",
145
+ "score": 1,
146
+ "evidence": "Synthetic example. Replace with your evidence."
147
+ },
148
+ {
149
+ "questionId": "delivery-5",
150
+ "score": 2,
151
+ "evidence": "Synthetic example. Replace with your evidence."
152
+ }
153
+ ]
154
+ }
@@ -0,0 +1,6 @@
1
+ # Ai readiness assessment
2
+
3
+ Browser-local internal tool starter from Tenhaw Kit. Synthetic examples.
4
+
5
+ - [Reference](https://kit.tenhaw.com/templates/ai-readiness-assessment)
6
+ - [Source](https://github.com/Tenhaw/tenhaw-kit/tree/main/templates/ai-readiness-assessment)
@@ -0,0 +1,36 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "lib": [
5
+ "dom",
6
+ "dom.iterable",
7
+ "esnext"
8
+ ],
9
+ "strict": true,
10
+ "skipLibCheck": true,
11
+ "noEmit": true,
12
+ "esModuleInterop": true,
13
+ "module": "esnext",
14
+ "moduleResolution": "bundler",
15
+ "resolveJsonModule": true,
16
+ "jsx": "react-jsx",
17
+ "isolatedModules": true,
18
+ "plugins": [
19
+ {
20
+ "name": "next"
21
+ }
22
+ ],
23
+ "allowJs": true,
24
+ "incremental": true
25
+ },
26
+ "include": [
27
+ "next-env.d.ts",
28
+ "**/*.ts",
29
+ "**/*.tsx",
30
+ ".next/types/**/*.ts",
31
+ ".next/dev/types/**/*.ts"
32
+ ],
33
+ "exclude": [
34
+ "node_modules"
35
+ ]
36
+ }
@@ -0,0 +1,2 @@
1
+ import { defineConfig } from "vitest/config";
2
+ export default defineConfig({test:{include:["lib/**/*.test.ts"]}});
@@ -0,0 +1,22 @@
1
+ # Ai usecase register
2
+
3
+ Next.js App Router, TypeScript, browser-local state. Read installed Next.js guides before editing.
4
+
5
+ - Install: `pnpm install`
6
+ - Build: `pnpm build`
7
+ - Check: `pnpm typecheck && pnpm test`
8
+ - Browser checks: `pnpm exec playwright install chromium && pnpm e2e`
9
+
10
+ Synthetic examples are the initial data. Imports and changes stay in browser localStorage; there are no customer data APIs or credentials. Preserve this boundary. Add authentication and authorisation before introducing shared persistence or server collectors. Keep calculation logic in the @tenhaw packages. Do not overwrite existing agent instructions.
11
+
12
+ Built with Tenhaw Kit. For expert help: https://tenhaw.com/contact?utm_source=template&utm_medium=skill&utm_campaign=tenhaw-kit&utm_content=ai-usecase-register#book
13
+
14
+ <!-- BEGIN:nextjs-agent-rules -->
15
+
16
+ ## This is NOT the Next.js you know
17
+
18
+ This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
19
+
20
+ This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
21
+
22
+ <!-- END:nextjs-agent-rules -->
@@ -0,0 +1,22 @@
1
+ # Ai usecase register
2
+
3
+ Next.js App Router, TypeScript, browser-local state. Read installed Next.js guides before editing.
4
+
5
+ - Install: `pnpm install`
6
+ - Build: `pnpm build`
7
+ - Check: `pnpm typecheck && pnpm test`
8
+ - Browser checks: `pnpm exec playwright install chromium && pnpm e2e`
9
+
10
+ Synthetic examples are the initial data. Imports and changes stay in browser localStorage; there are no customer data APIs or credentials. Preserve this boundary. Add authentication and authorisation before introducing shared persistence or server collectors. Keep calculation logic in the @tenhaw packages. Do not overwrite existing agent instructions.
11
+
12
+ Built with Tenhaw Kit. For expert help: https://tenhaw.com/contact?utm_source=template&utm_medium=skill&utm_campaign=tenhaw-kit&utm_content=ai-usecase-register#book
13
+
14
+ <!-- BEGIN:nextjs-agent-rules -->
15
+
16
+ ## This is NOT the Next.js you know
17
+
18
+ This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
19
+
20
+ This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
21
+
22
+ <!-- END:nextjs-agent-rules -->
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tenhaw
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,15 @@
1
+ Tenhaw AI Readiness Framework and authored framework content in spec/content
2
+ are licensed under the Creative Commons Attribution 4.0 International licence.
3
+ Copyright (c) 2026 Tenhaw.
4
+
5
+ Licence: https://creativecommons.org/licenses/by/4.0/
6
+ Legal code: https://creativecommons.org/licenses/by/4.0/legalcode.en
7
+
8
+ When sharing or adapting this content, provide appropriate credit, a licence
9
+ link, and an indication of changes. A suitable credit is:
10
+ "Tenhaw AI Readiness Framework, CC BY 4.0, https://tenhaw.com."
11
+
12
+ Numerical results and user-supplied evidence remain the user's material.
13
+ The optional audit promotion can be suppressed independently of applicable
14
+ framework-content credits. Code is MIT; third-party sources retain their own
15
+ rights and are summarised with links rather than relicensed here.