create-cmp-cli 0.7.1 → 0.9.0

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 (79) hide show
  1. package/README.md +72 -11
  2. package/llms.txt +6 -2
  3. package/package.json +1 -1
  4. package/src/commands/upgrade.mjs +8 -1
  5. package/src/lib/adr-seed.mjs +178 -0
  6. package/src/lib/registry.mjs +15 -2
  7. package/src/lib/tabs.mjs +91 -4
  8. package/src/lib/upgrade.mjs +49 -5
  9. package/src/scaffold.mjs +52 -1
  10. package/src/versions/candidates.json +4 -0
  11. package/src/versions/registry.json +88 -0
  12. package/template/.claude/skills/add-feature/SKILL.md +35 -10
  13. package/template/.claude/skills/add-repository/SKILL.md +1 -1
  14. package/template/.claude/skills/add-screen/SKILL.md +13 -7
  15. package/template/.githooks/pre-push +24 -0
  16. package/template/CLAUDE.md +196 -48
  17. package/template/README.md +23 -27
  18. package/template/composeApp/src/androidDebug/kotlin/com/example/app/inspector/CrashRecorder.kt +99 -0
  19. package/template/composeApp/src/androidDebug/kotlin/com/example/app/inspector/DbInspector.kt +144 -0
  20. package/template/composeApp/src/androidDebug/kotlin/com/example/app/inspector/InspectorHttpServer.kt +69 -2
  21. package/template/composeApp/src/androidDebug/kotlin/com/example/app/inspector/InspectorInit.kt +8 -4
  22. package/template/composeApp/src/androidDebug/kotlin/com/example/app/inspector/NavInspector.kt +31 -0
  23. package/template/composeApp/src/commonMain/kotlin/com/example/app/data/AppResultCatching.kt +32 -0
  24. package/template/composeApp/src/commonMain/kotlin/com/example/app/data/remote/ItemRepositoryImpl.kt +9 -2
  25. package/template/composeApp/src/commonMain/kotlin/com/example/app/domain/model/DomainError.kt +21 -0
  26. package/template/composeApp/src/commonMain/kotlin/com/example/app/domain/repository/ItemRepository.kt +4 -1
  27. package/template/composeApp/src/commonMain/kotlin/com/example/app/domain/result/AppResult.kt +23 -0
  28. package/template/composeApp/src/commonMain/kotlin/com/example/app/domain/usecase/GetItemsUseCase.kt +4 -1
  29. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/AppBottomBar.kt +138 -0
  30. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/AppButton.kt +56 -0
  31. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/AppHeader.kt +54 -0
  32. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/BaseScreen.kt +16 -8
  33. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/ContentStateContainer.kt +105 -0
  34. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/ContentUiState.kt +18 -0
  35. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/EmptyState.kt +58 -0
  36. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/ErrorState.kt +52 -0
  37. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/ListItemCard.kt +77 -0
  38. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/ScreenColumn.kt +47 -0
  39. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/Shimmer.kt +90 -0
  40. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/components/TestTagAutomation.kt +9 -9
  41. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/home/DetailScreen.kt +5 -27
  42. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/home/HomeScreen.kt +14 -70
  43. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/home/HomeViewModel.kt +33 -13
  44. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/navigation/AppNavHost.kt +13 -0
  45. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/navigation/AppShell.kt +7 -109
  46. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/navigation/NavInspectionHook.kt +21 -0
  47. package/template/composeApp/src/commonMain/kotlin/com/example/app/presentation/profile/ProfileScreen.kt +4 -27
  48. package/template/composeApp/src/commonTest/kotlin/com/example/app/data/AppResultCatchingTest.kt +52 -0
  49. package/template/composeApp/src/commonTest/kotlin/com/example/app/data/remote/ItemRepositoryImplTest.kt +29 -4
  50. package/template/composeApp/src/commonTest/kotlin/com/example/app/domain/usecase/GetItemsUseCaseTest.kt +8 -6
  51. package/template/composeApp/src/commonTest/kotlin/com/example/app/presentation/home/HomeViewModelTest.kt +39 -27
  52. package/template/composeApp/src/commonTest/kotlin/com/example/app/testing/fakes/FakeItemRepository.kt +10 -6
  53. package/template/composeApp/src/desktopMain/kotlin/com/example/app/inspector/ComponentStories.kt +269 -0
  54. package/template/composeApp/src/desktopMain/kotlin/com/example/app/inspector/PreviewRegistry.kt +37 -1
  55. package/template/composeApp/src/desktopTest/kotlin/com/example/app/conformance/ArchitectureConformanceTest.kt +207 -15
  56. package/template/composeApp/src/desktopTest/kotlin/com/example/app/conformance/ComponentConformanceTest.kt +84 -0
  57. package/template/composeApp/src/desktopTest/kotlin/com/example/app/presentation/home/HomeScreenTest.kt +36 -4
  58. package/template/docs/ARCHITECTURE.md +317 -34
  59. package/template/docs/TESTING.md +6 -5
  60. package/template/docs/adr/0002-maestro-over-appium-for-e2e.md +39 -0
  61. package/template/docs/adr/0003-jvm-desktop-target-is-harness-infrastructure.md +39 -0
  62. package/template/docs/adr/0004-fakes-not-mocks-for-unit-tests.md +48 -0
  63. package/template/qa/approvals.json +42 -0
  64. package/template/qa/approve.mjs +139 -0
  65. package/template/qa/arch-doc.mjs +69 -0
  66. package/template/qa/comment.mjs +76 -0
  67. package/template/qa/comments.json +4 -0
  68. package/template/qa/golden/home.json +3 -3
  69. package/template/qa/lib/approvals.mjs +806 -0
  70. package/template/qa/lib/arch-doc.mjs +451 -0
  71. package/template/qa/lib/comments.mjs +252 -0
  72. package/template/qa/lib/component-stories.mjs +183 -0
  73. package/template/qa/lib/inputs-hash.mjs +5 -1
  74. package/template/qa/scaffold-feature.mjs +184 -67
  75. package/template/qa/setup-hooks.mjs +33 -0
  76. package/template/qa/verify.mjs +118 -9
  77. package/template/specs/app-base.spec.md +44 -7
  78. package/template/specs/home.spec.md +7 -4
  79. package/template/specs/intent.md +50 -0
@@ -8,11 +8,14 @@
8
8
  - **HOME-02** — Given the repository returns items, When loading completes, Then the items are
9
9
  listed with their title and subtitle, and no error is shown.
10
10
  - **HOME-03** — Given the repository fails, When loading completes, Then a human-readable
11
- error message is shown (`home_error`) and no items are visible.
11
+ error message is shown (`home_error`) and no items are visible — the copy is mapped in
12
+ presentation from the failure's `DomainError` kind, never a raw exception message.
12
13
  - **HOME-04** — Given a load has failed, When the data source recovers and the user triggers a
13
- reload, Then the error clears and the items render.
14
+ reload (`home_retry`), Then the error clears and the items render.
14
15
  - **HOME-05** — Given items are listed, When the user taps an item, Then the app navigates to
15
16
  that item's detail.
16
17
  - **HOME-06** — Given the Home screen renders, When its structure is inspected, Then the
17
- screen matches its committed golden tree (`qa/golden/home.json`) — structural regressions
18
- are intentional, declared changes only.
18
+ screen matches its committed golden tree (`qa/golden/home.json`) — structural change must
19
+ be intentional and declared.
20
+ - **HOME-07** — Given the repository succeeds with zero items, When loading completes, Then
21
+ the empty state is shown (`home_empty`) and neither items nor an error are visible.
@@ -0,0 +1,50 @@
1
+ # Intent brief
2
+
3
+ > The root artifact everything else traces to (GENESIS-FLOW-DESIGN.md §0, conversation 0 of
4
+ > the genesis walk). This is prose, not a clause spec — no `// SPEC:` tags apply here, and
5
+ > `specCoverage` never scans this file (it only scans `specs/*.spec.md`). The `cmp-new`
6
+ > interview fills in the sections below before the design-language, architecture, components,
7
+ > and exemplar-feature conversations begin; each of those is expressed in the vocabulary this
8
+ > brief establishes.
9
+
10
+ ## Purpose
11
+
12
+ _not yet captured — filled by the cmp-new interview._ What is this app, in one or two
13
+ sentences? What problem does it solve, and for whom?
14
+
15
+ ## Audience
16
+
17
+ _not yet captured — filled by the cmp-new interview._ Who uses this app? One primary
18
+ audience beats a vague list — name them.
19
+
20
+ ## Platforms
21
+
22
+ _not yet captured — filled by the cmp-new interview._ Android, iOS, or both? Any platform-
23
+ specific constraints (e.g. iOS-only feature, Android-first launch)?
24
+
25
+ ## Brand feel
26
+
27
+ _not yet captured — filled by the cmp-new interview._ Two or three adjectives for how this
28
+ app should feel (e.g. "calm, trustworthy, minimal" vs. "playful, bold, energetic"). This
29
+ seeds conversation 1 (design language) — the candidates it proposes react to what's written
30
+ here.
31
+
32
+ ## Reference apps
33
+
34
+ _not yet captured — filled by the cmp-new interview._ One to three apps whose look, feel, or
35
+ interaction patterns this app should be judged against ("closer to X than Y").
36
+
37
+ ## First screens
38
+
39
+ _not yet captured — filled by the cmp-new interview._ What are the first 2–4 screens you see
40
+ in your head? This grounds conversation 4 — the exemplar feature is the user's *actual* first
41
+ feature, not a generic placeholder.
42
+
43
+ ## Glossary
44
+
45
+ _not yet captured — filled by the cmp-new interview._ The domain nouns specific to this app —
46
+ one line each, in the app's own vocabulary, not generic template terms (e.g. "**Trip** — a
47
+ single planned outing with an itinerary and companions", not "**Item**"). Usually falls out of
48
+ the Purpose/First screens answers above; confirm the list with the human rather than guessing.
49
+ This section is lifted verbatim into `docs/ARCHITECTURE.md` §8 — write it in the form you want
50
+ published: a Markdown bullet list, `**Term** — definition` per line.