@appsforgood/next-supabase-kit 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +2 -2
  3. package/UPGRADE.md +22 -0
  4. package/USER_GUIDE.html +808 -0
  5. package/USER_GUIDE.md +12 -10
  6. package/agents/app-engineer/agent.md +4 -0
  7. package/agents/copy/agent.md +16 -3
  8. package/agents/design/agent.md +7 -1
  9. package/agents/optional/deploy/agent.md +6 -0
  10. package/agents/optional/docs/agent.md +4 -0
  11. package/agents/optional/lead-architect/agent.md +8 -0
  12. package/agents/optional/research/agent.md +4 -0
  13. package/agents/planner/agent.md +8 -0
  14. package/agents/qa/agent.md +2 -0
  15. package/agents/security/agent.md +2 -0
  16. package/catalog.json +1 -0
  17. package/dist/index.js +74 -11
  18. package/dist/index.js.map +1 -1
  19. package/examples/next-supabase-installed/.agent-kit/config.json +1 -0
  20. package/examples/next-supabase-installed/.agent-kit/manifest.json +54 -49
  21. package/examples/next-supabase-installed/.antigravity/agent-kit/commands/copy.toml +1 -1
  22. package/examples/next-supabase-installed/.antigravity/runtime-skills/deslop/SKILL.md +62 -0
  23. package/examples/next-supabase-installed/.antigravity/runtime-skills/frontend-design/SKILL.md +90 -9
  24. package/examples/next-supabase-installed/.antigravity/runtime-skills/nextjs-app-router/SKILL.md +29 -9
  25. package/examples/next-supabase-installed/.antigravity/runtime-skills/owasp-security-review/SKILL.md +31 -9
  26. package/examples/next-supabase-installed/.antigravity/runtime-skills/planning/SKILL.md +11 -5
  27. package/examples/next-supabase-installed/.antigravity/runtime-skills/postgres-migrations/SKILL.md +25 -7
  28. package/examples/next-supabase-installed/.antigravity/runtime-skills/product-copy/SKILL.md +36 -4
  29. package/examples/next-supabase-installed/.antigravity/runtime-skills/supabase-auth-rls/SKILL.md +41 -9
  30. package/examples/next-supabase-installed/.antigravity/runtime-skills/testing-qa/SKILL.md +3 -3
  31. package/examples/next-supabase-installed/.claude/agents/app-engineer.md +4 -0
  32. package/examples/next-supabase-installed/.claude/agents/copy.md +16 -3
  33. package/examples/next-supabase-installed/.claude/agents/design.md +7 -1
  34. package/examples/next-supabase-installed/.claude/agents/planner.md +8 -0
  35. package/examples/next-supabase-installed/.claude/agents/qa.md +2 -0
  36. package/examples/next-supabase-installed/.claude/agents/security.md +2 -0
  37. package/examples/next-supabase-installed/.codex/agents/app-engineer.toml +4 -0
  38. package/examples/next-supabase-installed/.codex/agents/copy.toml +17 -4
  39. package/examples/next-supabase-installed/.codex/agents/design.toml +7 -1
  40. package/examples/next-supabase-installed/.codex/agents/planner.toml +8 -0
  41. package/examples/next-supabase-installed/.codex/agents/qa.toml +2 -0
  42. package/examples/next-supabase-installed/.codex/agents/security.toml +2 -0
  43. package/examples/next-supabase-installed/.cursor/agents/app-engineer.md +4 -0
  44. package/examples/next-supabase-installed/.cursor/agents/copy.md +16 -3
  45. package/examples/next-supabase-installed/.cursor/agents/design.md +7 -1
  46. package/examples/next-supabase-installed/.cursor/agents/planner.md +8 -0
  47. package/examples/next-supabase-installed/.cursor/agents/qa.md +2 -0
  48. package/examples/next-supabase-installed/.cursor/agents/security.md +2 -0
  49. package/examples/next-supabase-installed/.cursor/skills/deslop/SKILL.md +62 -0
  50. package/examples/next-supabase-installed/.cursor/skills/frontend-design/SKILL.md +90 -9
  51. package/examples/next-supabase-installed/.cursor/skills/nextjs-app-router/SKILL.md +29 -9
  52. package/examples/next-supabase-installed/.cursor/skills/owasp-security-review/SKILL.md +31 -9
  53. package/examples/next-supabase-installed/.cursor/skills/planning/SKILL.md +11 -5
  54. package/examples/next-supabase-installed/.cursor/skills/postgres-migrations/SKILL.md +25 -7
  55. package/examples/next-supabase-installed/.cursor/skills/product-copy/SKILL.md +36 -4
  56. package/examples/next-supabase-installed/.cursor/skills/supabase-auth-rls/SKILL.md +41 -9
  57. package/examples/next-supabase-installed/.cursor/skills/testing-qa/SKILL.md +3 -3
  58. package/examples/next-supabase-installed/AGENTS.md +1 -1
  59. package/examples/next-supabase-installed/USER_GUIDE.html +808 -0
  60. package/examples/next-supabase-installed/USER_GUIDE.md +12 -10
  61. package/examples/next-supabase-installed/skills/deslop/SKILL.md +62 -0
  62. package/examples/next-supabase-installed/skills/frontend-design/SKILL.md +90 -9
  63. package/examples/next-supabase-installed/skills/nextjs-app-router/SKILL.md +29 -9
  64. package/examples/next-supabase-installed/skills/owasp-security-review/SKILL.md +31 -9
  65. package/examples/next-supabase-installed/skills/planning/SKILL.md +11 -5
  66. package/examples/next-supabase-installed/skills/postgres-migrations/SKILL.md +25 -7
  67. package/examples/next-supabase-installed/skills/product-copy/SKILL.md +36 -4
  68. package/examples/next-supabase-installed/skills/supabase-auth-rls/SKILL.md +41 -9
  69. package/examples/next-supabase-installed/skills/testing-qa/SKILL.md +3 -3
  70. package/examples/next-supabase-installed/tree.txt +3 -0
  71. package/package.json +6 -4
  72. package/research/agent-skill-gap-report.md +11 -2
  73. package/skills/deslop/SKILL.md +62 -0
  74. package/skills/frontend-design/SKILL.md +90 -9
  75. package/skills/nextjs-app-router/SKILL.md +29 -9
  76. package/skills/owasp-security-review/SKILL.md +31 -9
  77. package/skills/planning/SKILL.md +11 -5
  78. package/skills/postgres-migrations/SKILL.md +25 -7
  79. package/skills/product-copy/SKILL.md +36 -4
  80. package/skills/supabase-auth-rls/SKILL.md +41 -9
  81. package/skills/testing-qa/SKILL.md +3 -3
  82. package/templates/next-supabase/AGENTS.md +1 -1
package/USER_GUIDE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # User Guide
2
2
 
3
- How to use the agents and skills in this repo.
3
+ How to use the agents and skills in this repo. Open **[USER_GUIDE.html](USER_GUIDE.html)** to read this as a designed page — that is the copy and layout to judge.
4
4
 
5
5
  **Agent** = who you ask. **Skill** = the workflow they follow. **Tool** = what they must use. For QA and UI, that tool is a **live browser plus screenshots**, not a file diff.
6
6
 
@@ -76,25 +76,26 @@ Files: `.antigravity/agent-kit/commands/*.toml`, `.antigravity/runtime-skills/*/
76
76
  | Is this done? | QA |
77
77
  | Landing / CTA words | Copy |
78
78
 
79
- Do not ask one chat to be all six.
79
+ Do not ask one chat to be all six. Planner names the next specialist. It does not run the other agents.
80
80
 
81
81
  ## Which skill do I use?
82
82
 
83
83
  | Skill | Use when |
84
84
  | --- | --- |
85
- | `planning` | Ambiguous work; pick an owner |
86
- | `nextjs-app-router` | Routes, Server Components, actions |
87
- | `supabase-auth-rls` | Auth, RLS, service role |
88
- | `postgres-migrations` | Schema and migrations |
89
- | `owasp-security-review` | Mutations, uploads, secrets |
90
- | `frontend-design` | Layout, hierarchy, anti-generic UI |
85
+ | `planning` | Ambiguous work; pick an owner and which skill they run |
86
+ | `nextjs-app-router` | App Router, Server vs Client, actions, `proxy.ts` |
87
+ | `supabase-auth-rls` | Auth, RLS, service role, Storage |
88
+ | `postgres-migrations` | Schema, constraints, RLS in the same change |
89
+ | `owasp-security-review` | Mutations, uploads, SSRF, secrets |
90
+ | `frontend-design` | Layout, simple palette, anti-generic UI |
91
91
  | `accessibility-wcag` | Keyboard, contrast, labels |
92
92
  | `browser-qa` | Any screen. Required for QA of UI |
93
93
  | `testing-qa` | Unit / regression / smoke only |
94
94
  | `product-copy` | Headlines and CTAs |
95
+ | `deslop` | Last copy pass. Copy always runs this |
95
96
  | `ship` | Release, env, rollback |
96
97
 
97
- QA of a screen always uses `browser-qa`, not `testing-qa` alone.
98
+ QA of a screen always uses `browser-qa`, not `testing-qa` alone. Each agent file names the skills it must run, then points at `catalog.json` for the rest.
98
99
 
99
100
  ## Standard workflows
100
101
 
@@ -118,7 +119,7 @@ Design + `frontend-design` + `browser-qa`. Desktop and mobile required. One happ
118
119
 
119
120
  ### Copy pass
120
121
 
121
- Copy agent reviews **rendered** screenshots, not just strings in TSX.
122
+ Copy reviews **rendered** screenshots, not just strings in TSX. Run `product-copy`, then **`deslop` last**. Do not hand off after the first draft.
122
123
 
123
124
  ## QA screenshot loop
124
125
 
@@ -179,3 +180,4 @@ Pristine files refresh. Local edits win or land in `.agent-kit/conflicts/`. Do n
179
180
  | No browser in Copilot / Codex | Use the Playwright commands in `browser-qa`. |
180
181
  | QA finished from the diff | Reject it. Re-run with the good QA prompt above. |
181
182
  | `doctor` fails USER_GUIDE | The screenshot fail-closed sentence must stay in this file. |
183
+ | Still have `QUALITY_GATES.md` / `COUNCIL.md` | Expected. `update` does not delete them. `doctor` lists leftovers. |
@@ -23,6 +23,10 @@ Code-only “it should work” is incomplete for anything the user can see or cl
23
23
 
24
24
  `nextjs-app-router`, `supabase-auth-rls`, `postgres-migrations`.
25
25
 
26
+ Run those skills. Do not treat a small route, form, or table as exempt.
27
+
28
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
29
+
26
30
  ## Handoff
27
31
 
28
32
  Security reviews auth/data/secret changes. Design reviews user-facing screens. QA always reviews behavior or UI changes with `browser-qa`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: copy
3
- description: Use for public-facing or conversion copy. Review the rendered words in screenshots, not just strings in TSX.
3
+ description: Use for public-facing or conversion copy. Review the rendered words in screenshots, not just strings in TSX. Always finish with the deslop skill.
4
4
  tools: [repo, edit, screenshot, image-review]
5
5
  requiredTools: [repo, image-review]
6
6
  ---
@@ -9,6 +9,8 @@ requiredTools: [repo, image-review]
9
9
 
10
10
  Write and review headlines, CTAs, empty states, and onboarding copy. Approve words as they appear on screen.
11
11
 
12
+ For this kit, copy must name specialists and ask the reader to paste a prompt or run `init`. Headlines that could sell any copilot fail. Public HTML is not done until the rendered screenshot shows the key line and CTA without truncation.
13
+
12
14
  ## Use when
13
15
 
14
16
  Landing pages, CTAs, positioning, empty states, pricing, or conversion copy.
@@ -20,8 +22,19 @@ Required: read the repo and review rendered copy from screenshots when the surfa
20
22
 
21
23
  ## Skills
22
24
 
23
- `product-copy`, `frontend-design`.
25
+ `product-copy` first, then `frontend-design` if the words live on a screen. **`deslop` last. Always.** Do not hand off after `product-copy` alone.
26
+
27
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
28
+
29
+ ## End run
30
+
31
+ 1. Write or edit with `product-copy`.
32
+ 2. Read the rendered screenshot (desktop and mobile when the surface is a page).
33
+ 3. Run `deslop`. Fix writing tells. List leftover visual P0s for Design.
34
+ 4. Run `deslop` a second time on your own rewrite.
35
+
36
+ If you skip step 3, the work is not done.
24
37
 
25
38
  ## Done when
26
39
 
27
- Copy is specific to this product, claims are not invented, and the rendered screenshot shows the CTA and key line without truncation or hierarchy collapse.
40
+ Copy is specific to this product, claims are not invented, `deslop` has been run as the last pass, and the rendered screenshot shows the CTA and key line without truncation or hierarchy collapse.
@@ -9,6 +9,10 @@ requiredTools: [browser, screenshot, image-review]
9
9
 
10
10
  Review and improve user-facing UI. Start from screenshots. Reject a single happy-path shot and reject generic AI-looking layout.
11
11
 
12
+ This kit’s HTML (especially `USER_GUIDE.html`) is an assignment desk, not a SaaS landing page. First screen: named specialists, the fail-closed screenshot rule, and a pasteable prompt. Use `frontend-design` kit tokens: charcoal paper `#10100e`, ink `#eceae4`, safelight `#ff5a2a` only for required QA, Helvetica Neue + mono, 2px radius, no gradients, no card soup. Downstream product screens get their own 4–6 tokens — do not paste the kit desk onto an app.
13
+
14
+ Public words on a screen hand to Copy. Copy finishes with `deslop`. You restyle leftover visual P0s.
15
+
12
16
  ## Use when
13
17
 
14
18
  Screens, components, layout, visual design, responsive behavior, or “it looks wrong.”
@@ -20,7 +24,9 @@ Required: open the running UI, capture desktop (~1280) and mobile (~390), and wr
20
24
 
21
25
  ## Skills
22
26
 
23
- `frontend-design`, `accessibility-wcag`, `browser-qa`.
27
+ `frontend-design`, `accessibility-wcag`, `browser-qa`. Visual P0 list lives in `deslop`; you fix pixels, Copy does not.
28
+
29
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
24
30
 
25
31
  ## Done when
26
32
 
@@ -9,4 +9,10 @@ requiredTools: [repo]
9
9
 
10
10
  Confirm release order, env vars, and rollback. Use the `ship` skill.
11
11
 
12
+ ## Skills
13
+
14
+ `ship`.
15
+
16
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
17
+
12
18
  Add with `agent-kit add agent deploy`.
@@ -9,4 +9,8 @@ requiredTools: [repo]
9
9
 
10
10
  Keep `USER_GUIDE.md`, `AGENTS.md`, and project docs accurate. Do not invent product claims.
11
11
 
12
+ ## Skills
13
+
14
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
15
+
12
16
  Add with `agent-kit add agent docs`.
@@ -9,4 +9,12 @@ requiredTools: [repo]
9
9
 
10
10
  Map affected layers and preserve behavioral contracts. Do not implement unless asked.
11
11
 
12
+ ## Skills
13
+
14
+ `planning`.
15
+
16
+ You name layers and tradeoffs. You do not run the other agents.
17
+
18
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
19
+
12
20
  Add with `agent-kit add agent lead-architect` only when the change spans data, auth, and presentation.
@@ -9,4 +9,8 @@ requiredTools: [repo]
9
9
 
10
10
  Inventory public agent/skill patterns. Extract structure only. Do not re-import an operating system.
11
11
 
12
+ ## Skills
13
+
14
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
15
+
12
16
  Add with `agent-kit add agent research`.
@@ -19,6 +19,14 @@ Allowed: `repo` (read and search only).
19
19
  Required: read the repo before naming owners.
20
20
  Do not edit product code.
21
21
 
22
+ ## Skills
23
+
24
+ `planning`.
25
+
26
+ You name the owner and reviewers. You do not run the other agents.
27
+
28
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
29
+
22
30
  ## Handoff
23
31
 
24
32
  Name one owner from: `app-engineer`, `security`, `design`, `qa`, `copy`.
@@ -23,6 +23,8 @@ Hard fail if the only evidence is a file diff.
23
23
 
24
24
  `browser-qa`, `testing-qa`, `accessibility-wcag`.
25
25
 
26
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
27
+
26
28
  ## Must not accept
27
29
 
28
30
  - “Reviewed `page.tsx`; layout looks correct.”
@@ -23,6 +23,8 @@ RLS/SQL-only findings may stay code + tests.
23
23
 
24
24
  `owasp-security-review`, `supabase-auth-rls`, `postgres-migrations`.
25
25
 
26
+ Available skills: `catalog.json` and the skill table in `USER_GUIDE.md`. Start with the skills named above. Use another listed skill when this job needs it.
27
+
26
28
  ## Done when
27
29
 
28
30
  Access control is enforced in Postgres or the server, not only in the UI. Login, redirect, and denied states were checked in the browser when they exist. Secrets stay server-only.
package/catalog.json CHANGED
@@ -13,6 +13,7 @@
13
13
  "browser-qa",
14
14
  "testing-qa",
15
15
  "product-copy",
16
+ "deslop",
16
17
  "ship"
17
18
  ],
18
19
  "optionalSkills": ["ui-polish", "docs", "upgrade", "debug"],
package/dist/index.js CHANGED
@@ -317,7 +317,7 @@ function generateAntigravityCommands(cwd, force, collector) {
317
317
  {
318
318
  name: "copy",
319
319
  description: "Review rendered conversion copy.",
320
- prompt: "Act as the copy agent. Review the rendered words in screenshots, not just strings in source."
320
+ prompt: "Act as the copy agent. Review the rendered words in screenshots, not just strings in source. Run product-copy first, then deslop last. Always."
321
321
  },
322
322
  {
323
323
  name: "test",
@@ -550,6 +550,13 @@ function validatePackage() {
550
550
  } else {
551
551
  findings.push({ level: "pass", area: "package", message: "USER_GUIDE.md includes the screenshot rule." });
552
552
  }
553
+ if (!existsSync6(join5(cwd, "USER_GUIDE.html"))) {
554
+ findings.push({ level: "fail", area: "package", message: "USER_GUIDE.html is missing." });
555
+ } else if (!readFileSync6(join5(cwd, "USER_GUIDE.html"), "utf8").includes("Do not review code alone")) {
556
+ findings.push({ level: "fail", area: "package", message: "USER_GUIDE.html dropped the screenshot fail-closed sentence." });
557
+ } else {
558
+ findings.push({ level: "pass", area: "package", message: "USER_GUIDE.html includes the screenshot rule." });
559
+ }
553
560
  if (!existsSync6(join5(cwd, "skills/browser-qa/SKILL.md"))) {
554
561
  findings.push({ level: "fail", area: "package", message: "skills/browser-qa/SKILL.md is missing." });
555
562
  }
@@ -559,6 +566,15 @@ function validatePackage() {
559
566
  // src/install/doctor.ts
560
567
  import { existsSync as existsSync7, readFileSync as readFileSync7 } from "fs";
561
568
  import { join as join6 } from "path";
569
+ var LEGACY_LEFTOVER_PATHS = [
570
+ "AGENT_ROSTER.md",
571
+ "COUNCIL.md",
572
+ "SKILLS.md",
573
+ "QUALITY_GATES.md",
574
+ "ASSISTANT_ADAPTERS.md",
575
+ ".agent-kit/agent-roster.json",
576
+ ".agent-kit/orchestrator.json"
577
+ ];
562
578
  function summarize(findings) {
563
579
  return {
564
580
  pass: findings.filter((item) => item.level === "pass").length,
@@ -570,6 +586,9 @@ function read(cwd, relative2) {
570
586
  const path = join6(cwd, relative2);
571
587
  return existsSync7(path) ? readFileSync7(path, "utf8") : null;
572
588
  }
589
+ function listLegacyLeftovers(cwd) {
590
+ return LEGACY_LEFTOVER_PATHS.filter((relative2) => existsSync7(join6(cwd, relative2)));
591
+ }
573
592
  function createDoctorReport(cwd) {
574
593
  const catalog = loadCatalog();
575
594
  const findings = [];
@@ -589,6 +608,18 @@ function createDoctorReport(cwd) {
589
608
  } else {
590
609
  findings.push({ level: "pass", area: "docs", message: "USER_GUIDE.md includes the screenshot fail-closed rule." });
591
610
  }
611
+ const htmlGuide = read(cwd, "USER_GUIDE.html");
612
+ if (!htmlGuide) {
613
+ findings.push({ level: "fail", area: "docs", message: "USER_GUIDE.html is missing. Run agent-kit init." });
614
+ } else if (!htmlGuide.includes("Do not review code alone") || !htmlGuide.includes('data-view="user-guide"')) {
615
+ findings.push({
616
+ level: "fail",
617
+ area: "docs",
618
+ message: "USER_GUIDE.html dropped the screenshot fail-closed rule or assignment-desk layout."
619
+ });
620
+ } else {
621
+ findings.push({ level: "pass", area: "docs", message: "USER_GUIDE.html is the visual field guide." });
622
+ }
592
623
  const qaSkill = read(cwd, ".cursor/skills/browser-qa/SKILL.md") ?? read(cwd, "skills/browser-qa/SKILL.md");
593
624
  if (!qaSkill) {
594
625
  findings.push({ level: "fail", area: "skills", message: "browser-qa skill is missing." });
@@ -610,6 +641,22 @@ function createDoctorReport(cwd) {
610
641
  findings.push({ level: "pass", area: "agents", message: `${id} declares tools.` });
611
642
  }
612
643
  }
644
+ const leftovers = listLegacyLeftovers(cwd);
645
+ if (leftovers.length > 0) {
646
+ const preview = leftovers.slice(0, 6).join(", ");
647
+ const extra = leftovers.length > 6 ? `, +${leftovers.length - 6} more` : "";
648
+ findings.push({
649
+ level: "warn",
650
+ area: "legacy",
651
+ message: `0.3 leftover files are still here: ${preview}${extra}. 0.4 uses AGENTS.md + USER_GUIDE. update never deletes these.`
652
+ });
653
+ } else {
654
+ findings.push({
655
+ level: "pass",
656
+ area: "legacy",
657
+ message: "No 0.3 council leftover files detected."
658
+ });
659
+ }
613
660
  return {
614
661
  findings,
615
662
  summary: summarize(findings),
@@ -623,14 +670,15 @@ import { join as join8 } from "path";
623
670
 
624
671
  // src/config/defaults.ts
625
672
  var PACKAGE_NAME = "@appsforgood/next-supabase-kit";
626
- var PACKAGE_VERSION = "0.4.0";
627
- var ROOT_DOCS = ["AGENTS.md", "USER_GUIDE.md"];
673
+ var PACKAGE_VERSION = "0.4.2";
674
+ var ROOT_DOCS = ["AGENTS.md", "USER_GUIDE.md", "USER_GUIDE.html"];
628
675
  var CURSOR_RULE_FILE = {
629
676
  source: "assistant-adapters/cursor-agent-kit.mdc",
630
677
  target: ".cursor/rules/cursor-agent-kit.mdc"
631
678
  };
632
679
  var CLAUDE_TEMPLATE = "templates/next-supabase/CLAUDE.md";
633
680
  var USER_GUIDE_SOURCE = "USER_GUIDE.md";
681
+ var USER_GUIDE_HTML_SOURCE = "USER_GUIDE.html";
634
682
  var AGENTS_DOC_SOURCE = "templates/next-supabase/AGENTS.md";
635
683
 
636
684
  // src/install/ide-activate.ts
@@ -701,6 +749,7 @@ function listManagedAssets(packageRoot, options = {}) {
701
749
  const assets = [
702
750
  { target: "AGENTS.md", sourcePath: join7(packageRoot, AGENTS_DOC_SOURCE), category: "root-doc" },
703
751
  { target: "USER_GUIDE.md", sourcePath: join7(packageRoot, USER_GUIDE_SOURCE), category: "root-doc" },
752
+ { target: "USER_GUIDE.html", sourcePath: join7(packageRoot, USER_GUIDE_HTML_SOURCE), category: "root-doc" },
704
753
  { target: CURSOR_RULE_FILE.target, sourcePath: join7(packageRoot, CURSOR_RULE_FILE.source), category: "adapter" }
705
754
  ];
706
755
  const activated = new Set(options.activated ?? ["cursor"]);
@@ -728,8 +777,10 @@ function initProject(options) {
728
777
  const templateHashes = {};
729
778
  const agentsDoc = readFileSync8(join8(packageRoot, AGENTS_DOC_SOURCE), "utf8");
730
779
  const userGuide = readFileSync8(join8(packageRoot, USER_GUIDE_SOURCE), "utf8");
780
+ const userGuideHtml = readFileSync8(join8(packageRoot, USER_GUIDE_HTML_SOURCE), "utf8");
731
781
  templateHashes["AGENTS.md"] = sha256(agentsDoc);
732
782
  templateHashes["USER_GUIDE.md"] = sha256(userGuide);
783
+ templateHashes["USER_GUIDE.html"] = sha256(userGuideHtml);
733
784
  recordCopy(
734
785
  result,
735
786
  copyTextWithConflict(join8(packageRoot, AGENTS_DOC_SOURCE), cwd, "AGENTS.md", {
@@ -744,6 +795,13 @@ function initProject(options) {
744
795
  conflictRoot: join8(cwd, ".agent-kit", "conflicts")
745
796
  })
746
797
  );
798
+ recordCopy(
799
+ result,
800
+ copyTextWithConflict(join8(packageRoot, USER_GUIDE_HTML_SOURCE), cwd, "USER_GUIDE.html", {
801
+ force,
802
+ conflictRoot: join8(cwd, ".agent-kit", "conflicts")
803
+ })
804
+ );
747
805
  if (options.legacyDocs) {
748
806
  const legacyRoot = join8(packageRoot, "templates", stack);
749
807
  const legacyDocs = ["SPEC.md", "DECISIONS.md", "DESIGN.md", "SECURITY.md", "TESTING.md", "QUALITY_GATES.md"];
@@ -940,7 +998,8 @@ function updateProject(options) {
940
998
  files: files2,
941
999
  libraryFoldersRefreshed: [],
942
1000
  manifestPath: ".agent-kit/manifest.json",
943
- summary: summarize2(files2)
1001
+ summary: summarize2(files2),
1002
+ leftoverDocs: listLegacyLeftovers(cwd)
944
1003
  };
945
1004
  }
946
1005
  const packageRoot = findPackageRoot();
@@ -993,7 +1052,7 @@ function updateProject(options) {
993
1052
  packageVersion: PACKAGE_VERSION,
994
1053
  schemaVersion: 3,
995
1054
  updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
996
- docs: ["AGENTS.md", "USER_GUIDE.md"],
1055
+ docs: ["AGENTS.md", "USER_GUIDE.md", "USER_GUIDE.html"],
997
1056
  assetHashes: nextHashes
998
1057
  };
999
1058
  writeText(join9(cwd, ".agent-kit", "manifest.json"), `${JSON.stringify(next, null, 2)}
@@ -1010,7 +1069,8 @@ function updateProject(options) {
1010
1069
  files,
1011
1070
  libraryFoldersRefreshed: [],
1012
1071
  manifestPath: ".agent-kit/manifest.json",
1013
- summary: summarize2(files)
1072
+ summary: summarize2(files),
1073
+ leftoverDocs: listLegacyLeftovers(cwd)
1014
1074
  };
1015
1075
  }
1016
1076
 
@@ -1053,14 +1113,14 @@ function fail(message) {
1053
1113
  // src/cli/index.ts
1054
1114
  var program = new Command();
1055
1115
  program.name("agent-kit").description("Install agents, skills, and a user guide. QA must review screenshots, not code alone.").version(PACKAGE_VERSION);
1056
- program.command("init").description("Install AGENTS.md, USER_GUIDE.md, and native IDE agents/skills.").option("--stack <stack>", "Stack profile", "next-supabase").option("--activate <targets...>", "IDE surfaces: cursor, claude, codex, copilot, antigravity, all").option("--legacy-docs", "Also copy leftover living-doc templates").option("--force", "Overwrite customized files").option("--json", "Machine-readable output").option("--dry-run", "Show what would be written").action((options) => {
1116
+ program.command("init").description("Install AGENTS.md, USER_GUIDE.md, USER_GUIDE.html, and native IDE agents/skills.").option("--stack <stack>", "Stack profile", "next-supabase").option("--activate <targets...>", "IDE surfaces: cursor, claude, codex, copilot, antigravity, all").option("--legacy-docs", "Also copy leftover living-doc templates").option("--force", "Overwrite customized files").option("--json", "Machine-readable output").option("--dry-run", "Show what would be written").action((options) => {
1057
1117
  if (options.dryRun) {
1058
1118
  if (options.json) {
1059
- printJson({ dryRun: true, wouldWrite: ["AGENTS.md", "USER_GUIDE.md", ".cursor/agents/", ".cursor/skills/"] });
1119
+ printJson({ dryRun: true, wouldWrite: ["AGENTS.md", "USER_GUIDE.md", "USER_GUIDE.html", ".cursor/agents/", ".cursor/skills/"] });
1060
1120
  return;
1061
1121
  }
1062
1122
  heading("init dry-run");
1063
- line("Would write AGENTS.md, USER_GUIDE.md, and native IDE agent/skill files.");
1123
+ line("Would write AGENTS.md, USER_GUIDE.md, USER_GUIDE.html, and native IDE agent/skill files.");
1064
1124
  return;
1065
1125
  }
1066
1126
  const result = initProject({
@@ -1078,7 +1138,7 @@ program.command("init").description("Install AGENTS.md, USER_GUIDE.md, and nativ
1078
1138
  line(`copied: ${result.copied.length}`);
1079
1139
  line(`unchanged: ${result.unchanged.length}`);
1080
1140
  line(`conflicts: ${result.conflicts.length}`);
1081
- detail("Read USER_GUIDE.md next.");
1141
+ detail("Open USER_GUIDE.html next.");
1082
1142
  });
1083
1143
  program.command("update").description("Refresh pristine installed files. Local edits win or become conflicts.").option("--force", "Overwrite customized files").option("--dry-run", "Preview only").option("--json", "Machine-readable output").action((options) => {
1084
1144
  const result = updateProject({ cwd: process.cwd(), force: Boolean(options.force), dryRun: Boolean(options.dryRun) });
@@ -1090,6 +1150,9 @@ program.command("update").description("Refresh pristine installed files. Local e
1090
1150
  line(
1091
1151
  `created ${result.summary.created}, updated ${result.summary.updated}, kept-local ${result.summary["kept-local"]}, conflicts ${result.summary.conflict}`
1092
1152
  );
1153
+ if (result.leftoverDocs.length > 0) {
1154
+ detail(`Left in place (not deleted): ${result.leftoverDocs.join(", ")}. Run doctor for the 0.4 layout.`);
1155
+ }
1093
1156
  });
1094
1157
  var add = program.command("add").description("Add an optional agent or skill.");
1095
1158
  add.command("skill <name>").description("Install one skill into .cursor/skills").option("--force", "Overwrite").option("--dry-run", "Preview").option("--json", "Machine-readable output").action((name, options) => {
@@ -1110,7 +1173,7 @@ add.command("agent <name>").description("Install one agent into .cursor/agents a
1110
1173
  line(`${result.action} ${result.target}`);
1111
1174
  if (!options.dryRun) detail(`Available agents: ${listAgents().join(", ")}`);
1112
1175
  });
1113
- program.command("doctor").description("Check that agents, skills, and the screenshot QA rule are present.").option("--json", "Machine-readable output").action((options) => {
1176
+ program.command("doctor").description("Check agents, skills, the screenshot QA rule, and leftover 0.3 council files.").option("--json", "Machine-readable output").action((options) => {
1114
1177
  const report2 = createDoctorReport(process.cwd());
1115
1178
  if (options.json) {
1116
1179
  printJson(report2);