theslopmachine 0.6.2 → 0.7.1

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 (77) hide show
  1. package/MANUAL.md +21 -6
  2. package/README.md +55 -7
  3. package/RELEASE.md +16 -1
  4. package/assets/agents/developer.md +41 -1
  5. package/assets/agents/slopmachine-claude.md +101 -60
  6. package/assets/agents/slopmachine.md +40 -17
  7. package/assets/claude/agents/developer.md +42 -5
  8. package/assets/skills/clarification-gate/SKILL.md +25 -5
  9. package/assets/skills/claude-worker-management/SKILL.md +290 -57
  10. package/assets/skills/developer-session-lifecycle/SKILL.md +83 -38
  11. package/assets/skills/development-guidance/SKILL.md +21 -1
  12. package/assets/skills/evaluation-triage/SKILL.md +34 -23
  13. package/assets/skills/final-evaluation-orchestration/SKILL.md +88 -50
  14. package/assets/skills/hardening-gate/SKILL.md +17 -3
  15. package/assets/skills/integrated-verification/SKILL.md +3 -3
  16. package/assets/skills/planning-gate/SKILL.md +32 -3
  17. package/assets/skills/planning-guidance/SKILL.md +72 -13
  18. package/assets/skills/retrospective-analysis/SKILL.md +2 -2
  19. package/assets/skills/scaffold-guidance/SKILL.md +129 -124
  20. package/assets/skills/submission-packaging/SKILL.md +33 -27
  21. package/assets/skills/verification-gates/SKILL.md +44 -14
  22. package/assets/slopmachine/backend-evaluation-prompt.md +1 -1
  23. package/assets/slopmachine/frontend-evaluation-prompt.md +5 -5
  24. package/assets/slopmachine/scaffold-playbooks/android-kotlin-compose.md +81 -0
  25. package/assets/slopmachine/scaffold-playbooks/android-kotlin-views.md +191 -0
  26. package/assets/slopmachine/scaffold-playbooks/android-native-java.md +203 -0
  27. package/assets/slopmachine/scaffold-playbooks/angular-default.md +181 -0
  28. package/assets/slopmachine/scaffold-playbooks/backend-baseline.md +142 -0
  29. package/assets/slopmachine/scaffold-playbooks/backend-family-matrix.md +80 -0
  30. package/assets/slopmachine/scaffold-playbooks/database-module-matrix.md +80 -0
  31. package/assets/slopmachine/scaffold-playbooks/django-default.md +166 -0
  32. package/assets/slopmachine/scaffold-playbooks/docker-baseline.md +189 -0
  33. package/assets/slopmachine/scaffold-playbooks/docker-shared-contract.md +334 -0
  34. package/assets/slopmachine/scaffold-playbooks/electron-vite-default.md +124 -0
  35. package/assets/slopmachine/scaffold-playbooks/expo-react-native-default.md +73 -0
  36. package/assets/slopmachine/scaffold-playbooks/fastapi-default.md +134 -0
  37. package/assets/slopmachine/scaffold-playbooks/frontend-baseline.md +160 -0
  38. package/assets/slopmachine/scaffold-playbooks/frontend-family-matrix.md +134 -0
  39. package/assets/slopmachine/scaffold-playbooks/generic-unknown-tech-guide.md +136 -0
  40. package/assets/slopmachine/scaffold-playbooks/go-chi-default.md +160 -0
  41. package/assets/slopmachine/scaffold-playbooks/ios-linux-portable.md +93 -0
  42. package/assets/slopmachine/scaffold-playbooks/ios-native-objective-c.md +151 -0
  43. package/assets/slopmachine/scaffold-playbooks/ios-native-swift.md +188 -0
  44. package/assets/slopmachine/scaffold-playbooks/laravel-default.md +216 -0
  45. package/assets/slopmachine/scaffold-playbooks/livewire-default.md +265 -0
  46. package/assets/slopmachine/scaffold-playbooks/overlay-module-matrix.md +130 -0
  47. package/assets/slopmachine/scaffold-playbooks/platform-family-matrix.md +79 -0
  48. package/assets/slopmachine/scaffold-playbooks/selection-matrix.md +72 -0
  49. package/assets/slopmachine/scaffold-playbooks/spring-boot-default.md +182 -0
  50. package/assets/slopmachine/scaffold-playbooks/tauri-default.md +80 -0
  51. package/assets/slopmachine/scaffold-playbooks/vue-vite-default.md +162 -0
  52. package/assets/slopmachine/scaffold-playbooks/web-default.md +96 -0
  53. package/assets/slopmachine/templates/AGENTS.md +41 -3
  54. package/assets/slopmachine/templates/CLAUDE.md +111 -0
  55. package/assets/slopmachine/test-coverage-prompt.md +561 -0
  56. package/assets/slopmachine/utils/claude_create_session.mjs +3 -2
  57. package/assets/slopmachine/utils/claude_live_channel.mjs +188 -0
  58. package/assets/slopmachine/utils/claude_live_common.mjs +411 -0
  59. package/assets/slopmachine/utils/claude_live_hook.py +47 -0
  60. package/assets/slopmachine/utils/claude_live_launch.mjs +187 -0
  61. package/assets/slopmachine/utils/claude_live_status.mjs +25 -0
  62. package/assets/slopmachine/utils/claude_live_stop.mjs +46 -0
  63. package/assets/slopmachine/utils/claude_live_turn.mjs +277 -0
  64. package/assets/slopmachine/utils/claude_resume_session.mjs +3 -2
  65. package/assets/slopmachine/utils/claude_wait_for_rate_limit_reset.mjs +23 -0
  66. package/assets/slopmachine/utils/claude_wait_for_rate_limit_reset.sh +5 -0
  67. package/assets/slopmachine/utils/claude_worker_common.mjs +361 -4
  68. package/assets/slopmachine/utils/cleanup_delivery_artifacts.py +4 -0
  69. package/assets/slopmachine/utils/export_ai_session.mjs +1 -1
  70. package/assets/slopmachine/utils/normalize_claude_session.py +153 -0
  71. package/assets/slopmachine/utils/package_claude_session.mjs +123 -0
  72. package/assets/slopmachine/utils/prepare_strict_audit_workspace.mjs +65 -0
  73. package/package.json +1 -1
  74. package/src/constants.js +42 -3
  75. package/src/init.js +173 -28
  76. package/src/install.js +156 -8
  77. package/src/send-data.js +56 -57
@@ -0,0 +1,160 @@
1
+ # Frontend Baseline Scaffold Playbook
2
+
3
+ Use this when the request is for a plain frontend category scaffold and the prompt does not already force a framework-specific server/runtime model.
4
+
5
+ ## Decision summary
6
+
7
+ - **chosen default:** React + Vite + TypeScript
8
+ - **why:** safest official SPA bootstrap to verify quickly with Docker, minimal real frontend tests, and low baseline complexity
9
+ - **verified runtime:** `docker compose up --build`
10
+ - **verified broad test path:** `./run_tests.sh`
11
+
12
+ ## Official bootstrap matrix
13
+
14
+ | Stack | Official/bootstrap path | Good fit | Why not the default prototype here |
15
+ | --- | --- | --- | --- |
16
+ | React + Vite | `npm create vite@latest frontend-baseline -- --template react-ts` | Fast typed SPA baseline; easy Docker + Vitest path | Chosen default |
17
+ | Vue + Vite | `npm create vue@latest` | Strong official starter; excellent when prompt explicitly says Vue | Slightly more prompt/config surface for a category-open default |
18
+ | Angular | `ng new <project-name>` | Best when Angular conventions are required | Heavier install/build/test footprint than needed for a generic baseline scaffold |
19
+
20
+ ## Evidence basis for the matrix
21
+
22
+ - React docs currently recommend a framework for production-scale React apps, but React's own from-scratch guidance points to build tools such as Vite when a lighter client-only app is appropriate.
23
+ - Vite docs provide the official `npm create vite@latest` bootstrap and list `react-ts` / `vue-ts` templates.
24
+ - Vue docs provide `npm create vue@latest` as the official SPA bootstrap path.
25
+ - Angular docs provide `ng new` after Angular CLI installation as the official local bootstrap path.
26
+
27
+ For a **category-level frontend baseline**, the safest prototype is the one with the lowest runtime/test burden while still using an official starter. That is React + Vite here.
28
+
29
+ ## Chosen default stack and version pins
30
+
31
+ Verified prototype pins:
32
+
33
+ - Node image: `node:22.21.1-alpine3.22`
34
+ - React: `19.2.4`
35
+ - React DOM: `19.2.4`
36
+ - Vite: `8.0.4`
37
+ - `@vitejs/plugin-react`: `6.0.1`
38
+ - TypeScript: `6.0.2`
39
+ - Vitest: `4.1.4`
40
+ - `@testing-library/react`: `16.3.2`
41
+ - `@testing-library/jest-dom`: `6.9.1`
42
+ - `@testing-library/user-event`: `14.6.1`
43
+ - `jsdom`: `29.0.2`
44
+
45
+ Compatibility pins used in this verified lab:
46
+
47
+ - `@rolldown/binding-darwin-arm64@1.0.0-rc.12` as an **optional** dependency for current macOS arm64 + npm optional-binding behavior
48
+ - `@emnapi/core@1.9.2`
49
+ - `@emnapi/runtime@1.9.2`
50
+
51
+ ## Safe defaults
52
+
53
+ - no `.env` file required
54
+ - no secrets committed
55
+ - no pre-seeded runtime exports required
56
+ - baseline-only UI, not a feature-complete app
57
+ - Docker host port bound to `127.0.0.1` with a random host port to reduce local collisions
58
+ - healthcheck required before test smoke step proceeds
59
+
60
+ ## Docker / Compose pattern
61
+
62
+ Recommended baseline pattern:
63
+
64
+ 1. **multi-stage Dockerfile**
65
+ - shared `npm ci` base
66
+ - `development` target runs `vite` on `0.0.0.0:5173`
67
+ - `verify` target runs `npm run verify`
68
+ 2. **Compose services**
69
+ - `web` service for `docker compose up --build`
70
+ - `test` service behind a `test` profile for containerized verification
71
+ 3. **port strategy**
72
+ - expose only the app port
73
+ - prefer `127.0.0.1::5173` so parallel local worktrees do not collide
74
+ 4. **health strategy**
75
+ - wait for `wget http://127.0.0.1:5173` healthcheck before curl smoke tests
76
+
77
+ ## Testing baseline
78
+
79
+ Minimum real testing floor for this playbook:
80
+
81
+ - Vitest component tests
82
+ - React Testing Library rendering assertions
83
+ - one small interaction test (`Show verification commands` toggle)
84
+ - one containerized smoke check that confirms the app shell is served through Compose
85
+ - one containerized broad path that runs lint + unit tests + production build
86
+
87
+ Suggested scripts:
88
+
89
+ - `npm run test`
90
+ - `npm run verify`
91
+ - `./run_tests.sh`
92
+
93
+ `./run_tests.sh` should:
94
+
95
+ 1. build Docker images
96
+ 2. start `web`
97
+ 3. wait for health
98
+ 4. `curl` the served HTML shell
99
+ 5. run the `test` profile container
100
+ 6. tear down cleanly
101
+
102
+ ## README requirements
103
+
104
+ The scaffold `README.md` should explicitly state:
105
+
106
+ - that this is a **baseline scaffold**
107
+ - chosen stack and why it was picked
108
+ - `docker compose up --build`
109
+ - `./run_tests.sh`
110
+ - any optional local iteration commands
111
+ - what is included now vs intentionally deferred
112
+ - no `.env` / no secrets policy
113
+ - main files worth reusing later
114
+
115
+ ## Verification commands actually run in the verified prototype
116
+
117
+ User-facing commands verified:
118
+
119
+ ```bash
120
+ npm create vite@latest frontend-baseline -- --template react-ts
121
+ npm install
122
+ npm run verify
123
+ docker pull node:22.21.1-alpine3.22
124
+ docker compose up --build
125
+ ./run_tests.sh
126
+ ```
127
+
128
+ Supporting commands used during verification:
129
+
130
+ ```bash
131
+ docker compose port web 5173
132
+ curl -fsS http://127.0.0.1:<mapped-port>
133
+ docker compose down --remove-orphans
134
+ ```
135
+
136
+ Observed verification results in the prototype lab:
137
+
138
+ - local `npm run verify`: passed
139
+ - containerized `./run_tests.sh`: passed
140
+ - runtime `docker compose up --build`: passed and served the app shell
141
+
142
+ ## Known caveats
143
+
144
+ - The curl smoke check validates the served HTML shell, not hydrated browser DOM behavior. Keep Vitest component tests for actual UI assertions.
145
+ - Current Vite 8 / Rolldown behavior on macOS arm64 under npm may need the optional native binding and `emnapi` compatibility pins noted above.
146
+ - Angular remains a documented alternative, not the verified prototype, because its baseline cost is higher for category-level scaffolding.
147
+ - Vue + Vite remains the preferred fallback when the prompt explicitly requires Vue.
148
+
149
+ ## What to reuse later
150
+
151
+ Reuse these parts directly for later frontend prompts:
152
+
153
+ - the React + Vite official bootstrap path
154
+ - the multi-stage Dockerfile pattern
155
+ - random localhost host-port mapping
156
+ - healthcheck + curl smoke test flow
157
+ - `./run_tests.sh` as the canonical broad-path wrapper
158
+ - the README honesty checklist
159
+
160
+ Do **not** treat this playbook as a signal to pre-add routing, auth, API clients, or E2E browsers unless the prompt explicitly needs them.
@@ -0,0 +1,134 @@
1
+ # Frontend Scaffold Family Matrix
2
+
3
+ Use this as the family-level reference for turning CSV stack labels and prompt cues into a concrete frontend scaffold choice.
4
+
5
+ This is intentionally about **frontend families**, not prompt-specific apps.
6
+
7
+ ## Interpretation rules
8
+
9
+ 1. Existing repo reality and explicit prompt framework names beat generic labels.
10
+ 2. `modern_frontend_framework` and `html_css_js` are **intake labels**, not real scaffold families.
11
+ 3. `server-rendered HTML` is a **delivery mode**, not enough by itself; resolve it to a concrete root such as HTMX, Thymeleaf, or Livewire.
12
+ 4. Prefer the lightest official/bootstrap path that still supports the shared Docker contract and minimal real tests.
13
+
14
+ ## Prepared frontend family matrix
15
+
16
+ | Family | Support tier | Official/bootstrap init path | Safe default direction | Choose this when | Backend composition | Docker composition | Minimal real testing baseline | Required wrapper/runtime/test expectations |
17
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
18
+ | **React + Vite + TypeScript** | **First-line default** | `npm create vite@latest <app> -- --template react-ts` | Node 22 LTS; React 19; Vite 8; strict TypeScript; Tailwind CSS by default; prefer `shadcn/ui`; fallback to Material UI or Ant Design when `shadcn/ui` is not the right fit; Vitest + Testing Library | Prompt says React, prompt only says `modern_frontend_framework`, or we need the safest generic SPA baseline | Best with decoupled REST/JSON backends across Node/Python/Java/Go/PHP; also fine for pure frontend/no-backend work | Fullstack: separate frontend build/edge service plus internal backend. Pure frontend: single web container is fine | 1 component render test, 1 interaction/state test, production build smoke, container smoke of served shell | Must provide `docker compose up --build`, `./run_tests.sh`, `npm run test`, and `npm run build` |
19
+ | **Vue + Vite + TypeScript** | **First-line when Vue is explicit; experimentally verified** | `npm create vue@latest` | Node 22 LTS; Vue 3; Vite 8; TypeScript on; Composition API + `<script setup>`; Tailwind CSS by default; prefer a stable `shadcn`-style Vue port when it is well-documented for the chosen stack, otherwise default to Ant Design Vue; add Router/Pinia only when the prompt needs them; Vitest baseline | Prompt says Vue, existing repo is Vue, or prompt body clearly describes a Vue app but stack label is generic | Same decoupled API pairing pattern as React + Vite | Same SPA pattern as React: dedicated frontend service when fullstack, static edge publish when appropriate | 1 component test, 1 state/interaction test, production build smoke, container smoke | Must provide `docker compose up --build`, `./run_tests.sh`, `npm run test`, and `npm run build`; see `vue-vite-default.md` |
20
+ | **Angular** | **Prepared and experimentally verified, but not generic default** | Install Angular CLI, then `ng new <app>` | Current Angular stable CLI/workspace; standalone components; strict mode; active/maintenance Node LTS; SSR off unless explicitly required; Tailwind CSS by default when styling is open; Angular Material as the default documented component system | Prompt explicitly says Angular or org conventions clearly require Angular | Best with decoupled REST/JSON backends; avoid as the category-open default because scaffold/build/test footprint is heavier | Same SPA pattern as React/Vue: separate frontend build/runtime surface in fullstack work | 1 generated component or page test, 1 routing/smoke assertion, production build smoke | Must provide `docker compose up --build`, `./run_tests.sh`, `ng test --watch=false` (or equivalent non-watch test target), and `ng build`; see `angular-default.md` |
21
+ | **HTMX + server-rendered templates** | **First-line `html_css_js` default** | No standalone app generator. Start from the backend family's official scaffold, then add htmx via vendored asset or `npm install htmx.org@2` if an asset pipeline exists | htmx 2.x; return HTML fragments instead of JSON by default; progressive enhancement first; keep JS light and local | Prompt is form-heavy/workflow-heavy, partial-page updates are enough, backend should own validation/state, or prompt only says `html_css_js` | Best with backend-rendered templates in Python, Go, PHP, Java, Ruby, etc. | Usually no separate JS frontend container. Publish one app-facing backend service; optional thin reverse proxy only if it adds real value | 1 full-page route/template test, 1 partial/fragment swap response test, 1 HTTP smoke through container | Must provide `docker compose up --build`, `./run_tests.sh`, backend-native tests, and an HTTP/page smoke. No separate frontend test runner is required unless extra JS is added |
22
+ | **Thymeleaf / Spring server-rendered HTML** | **Prepared backend-coupled family** | Spring Initializr with `web,thymeleaf` (optionally devtools), or equivalent `spring init` flow | Java 21 LTS; current Spring Boot 3.x stable; Thymeleaf starter; server-rendered pages first; add HTMX only if the prompt needs richer partial updates | Backend is Spring Boot / Java and the UI should stay template-first instead of becoming a separate SPA | Same Spring app owns routes, views, validation, and any JSON endpoints | Single Spring app-facing service is acceptable; DB stays internal; thin reverse proxy optional, not required | 1 controller/view test, 1 rendered-page assertion, build/test smoke via Maven or Gradle | Must provide `docker compose up --build`, `./run_tests.sh`, and `./mvnw test` or `./gradlew test`, plus HTTP smoke |
23
+ | **Livewire / Laravel server-driven UI** | **Prepared backend-coupled family when warranted; experimentally verified** | `laravel new <app>` (or `composer create-project laravel/laravel <app>`), then `composer require livewire/livewire`; `php artisan livewire:layout` when needed | Current stable Laravel + Livewire 4; Blade layouts; keep Livewire/Alpine bundled the Laravel way; use Laravel Vite defaults instead of inventing a separate SPA | Backend is Laravel/PHP and prompt wants reactive forms/tables/workflows without splitting into a separate JS frontend | Same Laravel app owns routes, auth, validation, rendering, and Livewire updates | No separate frontend container required. Use one Laravel app-facing service or the normal nginx+php-fpm pair as a single app surface | 1 page/feature test, 1 Livewire component test, asset/build smoke when Vite assets exist | Must provide `docker compose up --build`, `./run_tests.sh`, `php artisan test`, and `npm run build` when Laravel assets are part of the scaffold; see `livewire-default.md` |
24
+
25
+ ## Cross-family defaults
26
+
27
+ ### Shared Docker contract
28
+
29
+ All web families above inherit the same baseline contract from the existing scaffold playbooks:
30
+
31
+ - required runtime command: `docker compose up --build`
32
+ - required broad test command: `./run_tests.sh`
33
+ - only one app-facing service should be host-published by default
34
+ - healthchecks must drive readiness
35
+ - no checked-in `.env` dependency for the baseline itself
36
+
37
+ The main family split is:
38
+
39
+ - **SPA families** (React/Vue/Angular): usually a separate frontend build/runtime surface
40
+ - **server-driven families** (HTMX/Thymeleaf/Livewire): frontend usually lives inside the backend app surface
41
+
42
+ ### Shared UI defaults
43
+
44
+ - for web UI-bearing scaffolds, default to Tailwind CSS when the ecosystem supports it cleanly
45
+ - prefer `shadcn/ui` or an equivalent well-documented port only where it is truly supported by the chosen ecosystem
46
+ - otherwise prefer a mainstream documented component library appropriate to that stack rather than a niche or weakly documented UI kit
47
+
48
+ ### Wrapper expectations
49
+
50
+ - Every family needs an honest `README.md` that states scaffold scope and the real runtime/test commands.
51
+ - Every family needs at least one **real static test layer** plus one **runtime smoke proof**.
52
+ - For SPA families, the static test layer is normally frontend unit/component tests.
53
+ - For server-driven families, the static test layer is normally backend-native page/component/controller tests.
54
+
55
+ ## Placeholder/label vs real family
56
+
57
+ ### Treat these as placeholders / intake labels
58
+
59
+ - `modern_frontend_framework`
60
+ - `html_css_js`
61
+ - `server-rendered HTML`
62
+ - generic phrases like “modern SPA”, “admin dashboard”, or “frontend UI”
63
+
64
+ These labels are not enough to choose tooling on their own. They must resolve to a real family.
65
+
66
+ ### Treat these as real frontend families
67
+
68
+ - React + Vite
69
+ - Vue + Vite
70
+ - Angular
71
+ - HTMX
72
+ - Thymeleaf
73
+ - Livewire
74
+
75
+ ### Treat these as prompt-explicit exceptions, not current default prep targets
76
+
77
+ The CSV-derived prompt bodies also mention concrete ecosystems such as Svelte, jQuery/Layui, Templ, Yew, Leptos, and Dioxus. Those are real frameworks in their own ecosystems, but they should not become the default family-prep set here unless the prompt or repo explicitly requires them.
78
+
79
+ ## Default resolution rules for the CSV labels
80
+
81
+ ### When the prompt says only `modern_frontend_framework`
82
+
83
+ Recommended default:
84
+
85
+ - **React + Vite + TypeScript**
86
+
87
+ Why:
88
+
89
+ - it already matches the verified `frontend-baseline.md` direction
90
+ - it has the cleanest official bootstrap path for a category-open SPA scaffold
91
+ - it has the lowest generic runtime/test burden while still supporting a strong component-test baseline
92
+
93
+ Use Vue + Vite instead only when the prompt body or repo explicitly signals Vue.
94
+ Use Angular only when the prompt or repo explicitly signals Angular.
95
+
96
+ ## Verified concrete playbooks
97
+
98
+ - `frontend-baseline.md` — verified open-ended React/Vite default
99
+ - `vue-vite-default.md` — experimentally verified Vue/Vite baseline
100
+ - `angular-default.md` — experimentally verified Angular baseline
101
+ - `livewire-default.md` — experimentally verified Livewire baseline
102
+
103
+ ## Playwright rule
104
+
105
+ - do not assume Playwright belongs in every frontend scaffold
106
+ - include Playwright only when the prompt explicitly requires it or when the concrete family playbook has experimentally verified it
107
+ - if a family playbook includes Playwright, the documented commands must have been run successfully on that family baseline
108
+ - until that is true, keep Playwright out of the scaffold default and rely on lighter real test layers plus Docker smoke
109
+
110
+ ### When the prompt says only `html_css_js`
111
+
112
+ Recommended default:
113
+
114
+ - **HTMX + server-rendered templates**
115
+
116
+ Why:
117
+
118
+ - it is the most portable concrete resolution of the generic `html_css_js` label
119
+ - it keeps validation, auth, and state transitions on the backend where many of these prompts already place them
120
+ - it supports real partial-page interactivity without forcing a full SPA runtime
121
+
122
+ Refinements:
123
+
124
+ - if the backend is Spring Boot, prefer **Thymeleaf** as the concrete root
125
+ - if the backend is Laravel and the prompt wants richer server-driven interactivity, prefer **Livewire**
126
+ - if the prompt explicitly forbids JS enhancement, fall back to plain server-rendered templates without HTMX
127
+
128
+ ## Practical family selection order
129
+
130
+ 1. explicit framework in prompt or repo
131
+ 2. backend-coupled frontend family if the backend strongly implies one (`Thymeleaf` for Spring, `Livewire` for Laravel)
132
+ 3. `modern_frontend_framework` -> React + Vite default
133
+ 4. `html_css_js` -> HTMX + server-rendered templates default
134
+ 5. only expand beyond this matrix when the prompt explicitly names a different ecosystem
@@ -0,0 +1,136 @@
1
+ # Generic Unknown-Tech Scaffold Guide
2
+
3
+ Use this guide when a prompt names a technology, framework, or stack family that does not yet have a concrete verified playbook.
4
+
5
+ ## Goal
6
+
7
+ Produce a safe, honest scaffold by following a repeatable search-and-selection method instead of improvising from memory.
8
+
9
+ This guide is for:
10
+
11
+ - frameworks we have not explicitly studied yet
12
+ - niche stacks not yet represented in the family matrices
13
+ - new versions or ecosystem variants that sit near, but not inside, an existing playbook
14
+
15
+ ## Core rule
16
+
17
+ Do not invent a custom scaffold when an official or clearly de facto standard bootstrap path exists.
18
+
19
+ Use the official or most widely maintained bootstrap/init path first, then adapt it only enough to satisfy the shared Docker contract and scaffold acceptance contract.
20
+
21
+ ## Search order
22
+
23
+ When the stack is not yet covered directly:
24
+
25
+ 1. read `docker-shared-contract.md`
26
+ 2. resolve the nearest platform family and runtime expectations from the family matrices
27
+ 3. check Context7 for the framework/package if available
28
+ 4. if Context7 is insufficient, use targeted web research for:
29
+ - official docs
30
+ - official CLI/bootstrap command
31
+ - current stable version guidance
32
+ - official testing setup guidance
33
+ - official Docker or deployment guidance if published
34
+ 5. prefer official docs over blogs unless the official docs are clearly incomplete
35
+ 6. if several credible bootstrap paths exist, choose the one with:
36
+ - strongest official support
37
+ - least custom wiring
38
+ - easiest honest Docker baseline
39
+ - easiest minimal real test setup
40
+ - best current maintenance posture
41
+
42
+ ## What to extract from docs
43
+
44
+ Before generating the scaffold, identify and write down:
45
+
46
+ - official bootstrap/init command
47
+ - current stable major version family to target
48
+ - required runtime toolchain versions
49
+ - official package manager path
50
+ - official testing path
51
+ - any official build/preview commands
52
+ - any known Linux or Docker caveats
53
+ - whether the stack expects server-rendered, SPA, mobile, desktop, or native runtime semantics
54
+
55
+ ## Default selection rules
56
+
57
+ - follow the prompt and existing repo first
58
+ - if the prompt names only a language or placeholder, resolve it through the family matrices first
59
+ - if the stack is truly unknown after that, choose the nearest established family and then substitute the official bootstrap path for the new stack
60
+ - do not silently downgrade to a different ecosystem just because it is easier
61
+
62
+ ## UI defaults
63
+
64
+ For web UI-bearing scaffolds, unless the prompt or existing repo clearly dictates otherwise:
65
+
66
+ - default CSS system: Tailwind CSS when the ecosystem supports it cleanly
67
+ - React-family component default: `shadcn/ui`
68
+ - Vue-family component default: a well-known `shadcn`-style Vue port when it is stable and well documented for the chosen stack; otherwise a mainstream library such as Ant Design Vue
69
+ - Angular-family component default: Angular Material
70
+ - server-rendered HTML family default: Tailwind CSS plus server-rendered component partials; do not force a SPA component library into a backend-owned HTML scaffold
71
+
72
+ If the existing project already uses another UI system, preserve and extend that system instead of forcing these defaults.
73
+
74
+ ## Playwright rule
75
+
76
+ - do not add Playwright to the scaffold by default just because a frontend exists
77
+ - add Playwright only when one of these is true:
78
+ - the prompt explicitly requires it
79
+ - the selected concrete family playbook has experimentally verified it
80
+ - the owner intentionally chooses to absorb the extra setup cost at scaffold time
81
+ - if Playwright is included, it must actually run in the verified scaffold; do not list it in docs or package scripts as decorative future intent
82
+ - if Playwright is not included, keep the baseline honest and rely on unit/component/route tests plus Docker smoke until a later verification phase or later feature work justifies it
83
+
84
+ ## Database default rules
85
+
86
+ If the prompt requires persistence and no explicit database is named:
87
+
88
+ - use the database-module matrix to choose the default
89
+ - keep database setup behind `./init_db.sh`
90
+ - keep secrets/config out of `.env`
91
+ - use generated runtime config in ignored paths or Docker-managed state
92
+
93
+ ## Docker contract application
94
+
95
+ Every unknown-tech scaffold must still satisfy:
96
+
97
+ - `docker compose up --build` is real and meaningful
98
+ - containerized `./run_tests.sh` is real and meaningful
99
+ - healthchecks/readiness are present when appropriate
100
+ - no `.env` dependency
101
+ - no placeholder secret literals in tracked files
102
+ - honest README with exact runtime/test commands and proof boundary
103
+
104
+ ## Minimal real test floor
105
+
106
+ At scaffold time, require at least:
107
+
108
+ - one or more real tests for core baseline logic or rendering
109
+ - one real build/runtime verification path in `./run_tests.sh`
110
+ - one real smoke-level proof behind `docker compose up --build`
111
+
112
+ Do not accept a scaffold that is mostly generator output with empty tests.
113
+
114
+ ## Documentation floor
115
+
116
+ `README.md` must already state:
117
+
118
+ - scaffold status versus implemented scope
119
+ - exact Docker command
120
+ - exact broad test command
121
+ - main module layout
122
+ - key toolchain/runtime assumptions
123
+ - honesty boundaries for what the Linux/Docker baseline does and does not prove
124
+
125
+ ## Output for a new stack
126
+
127
+ When you finish scaffolding an unknown-tech stack, capture:
128
+
129
+ - the exact official bootstrap command used
130
+ - the chosen pinned versions
131
+ - the Docker strategy used
132
+ - the test strategy used
133
+ - exact commands that passed
134
+ - whether the playbook is now experimentally verified or still only specified
135
+
136
+ Then turn that into a new concrete family playbook if the stack looks likely to recur.
@@ -0,0 +1,160 @@
1
+ # Go Chi Default Scaffold Playbook
2
+
3
+ Use this playbook when the request explicitly asks for a Go baseline or when the backend family has already been narrowed to Go and there is no repo evidence pushing Gin or a heavier framework.
4
+
5
+ Verified lab: `/Users/yohannesakd/code/eaglepoint/demonstration/scaffold-lab/go-chi-baseline`
6
+
7
+ ## Goal
8
+
9
+ Create a Go-only baseline that:
10
+
11
+ - follows the default Go family direction in `backend-family-matrix.md`
12
+ - keeps dependency versions pinned and conservative
13
+ - uses a safe default database pattern with real persistence
14
+ - makes `docker compose up --build` the primary runtime command
15
+ - makes `./run_tests.sh` the portable broad verification command
16
+ - includes minimal real API tests
17
+ - stops at baseline infrastructure instead of product features
18
+
19
+ ## Why Chi remains the default
20
+
21
+ - `backend-family-matrix.md` already marks Go + Chi as the safe default when the prompt only says Go.
22
+ - The Go project guidance for server projects recommends `cmd/` plus `internal/` packages, which fits a small Chi service cleanly.
23
+ - Chi's documented `chi.NewRouter()` plus middleware stack provides a real HTTP surface without adding heavier framework defaults that the baseline does not need.
24
+
25
+ Gin stays a fallback only when the prompt explicitly wants Gin or clearly benefits from higher-level binding helpers.
26
+
27
+ ## Bootstrap rule
28
+
29
+ - use the standard Go module bootstrap plus Chi
30
+ - keep the module layout small and explicit
31
+ - do not add code generators or larger framework layers just to make the tree feel more enterprise-shaped
32
+
33
+ Reusable bootstrap commands:
34
+
35
+ ```bash
36
+ go mod init go-chi-baseline
37
+ go get github.com/go-chi/chi/v5@v5.2.5
38
+ go get modernc.org/sqlite@v1.37.1
39
+ go test ./...
40
+ go run ./cmd/server
41
+ ```
42
+
43
+ ## Safe pinned defaults
44
+
45
+ - Go `1.24.2`
46
+ - Chi `v5.2.5`
47
+ - SQLite driver `modernc.org/sqlite v1.37.1`
48
+ - Docker builder image: `golang:1.24.2-alpine3.21`
49
+ - Docker runtime image: `alpine:3.21`
50
+
51
+ ## Database pattern
52
+
53
+ - default to SQLite for the baseline because it keeps the local runtime secret-free and easy to verify
54
+ - place the SQLite file in a Docker-managed volume, not in the repo
55
+ - generate the runtime config file at container startup instead of committing `.env`
56
+ - keep `./init_db.sh` as the single database bootstrap entrypoint
57
+ - use `database/sql` with one explicit store package and idempotent schema bootstrap
58
+
59
+ ## Required runtime contract
60
+
61
+ - runtime: `docker compose up --build`
62
+ - tests: `./run_tests.sh`
63
+ - DB bootstrap: `./init_db.sh`
64
+ - all three commands must be real
65
+
66
+ ## Minimum API floor
67
+
68
+ At baseline, include all of the following:
69
+
70
+ - `GET /health` proving API boot and database connectivity
71
+ - `POST /items` creating a persisted record
72
+ - `GET /items` returning persisted records
73
+ - at least two real tests hitting those routes through `httptest`
74
+
75
+ ## Compose pattern
76
+
77
+ - one `app` service
78
+ - one `test` service behind a `test` profile using the same source tree in a containerized Go toolchain
79
+ - expose only the API port to `127.0.0.1`
80
+ - prefer Docker-assigned random host ports to avoid collisions
81
+ - include an app healthcheck that exercises `/health`
82
+ - store generated config and DB state in named volumes
83
+
84
+ ## README requirements
85
+
86
+ `README.md` must state:
87
+
88
+ - that this is baseline only
89
+ - the exact pinned stack
90
+ - the exact runtime command
91
+ - the exact test command
92
+ - the exact DB bootstrap command
93
+ - that no `.env` file is used
94
+ - what is intentionally excluded
95
+
96
+ ## Experimental verification for this lab
97
+
98
+ Commands run in `/Users/yohannesakd/code/eaglepoint/demonstration/scaffold-lab/go-chi-baseline`:
99
+
100
+ ```bash
101
+ docker compose build
102
+ ./init_db.sh
103
+ docker compose up --build -d
104
+ docker compose ps
105
+ docker compose port app 8080
106
+ curl -fsS "http://127.0.0.1:32806/health"
107
+ curl -fsS -X POST "http://127.0.0.1:32806/items" -H "content-type: application/json" -d '{"name":"manual-smoke-item"}'
108
+ curl -fsS "http://127.0.0.1:32806/items"
109
+ docker compose down --volumes --remove-orphans
110
+ python3 - <<'PY'
111
+ import signal
112
+ import subprocess
113
+ import time
114
+ from urllib.request import urlopen
115
+
116
+ cwd = "/Users/yohannesakd/code/eaglepoint/demonstration/scaffold-lab/go-chi-baseline"
117
+ proc = subprocess.Popen(["docker", "compose", "up", "--build"], cwd=cwd)
118
+ error = None
119
+ try:
120
+ deadline = time.time() + 180
121
+ while time.time() < deadline:
122
+ try:
123
+ port_output = subprocess.check_output(["docker", "compose", "port", "app", "8080"], cwd=cwd, text=True).strip()
124
+ if port_output:
125
+ host = port_output.split(":")[-1]
126
+ with urlopen(f"http://127.0.0.1:{host}/health", timeout=2) as response:
127
+ body = response.read().decode("utf-8")
128
+ if response.status == 200 and '"status":"ok"' in body and '"database":"ok"' in body:
129
+ print(f"docker compose up --build reached healthy /health on http://127.0.0.1:{host}/health")
130
+ break
131
+ except Exception as exc:
132
+ error = exc
133
+ time.sleep(2)
134
+ else:
135
+ raise RuntimeError(f"go chi baseline never became ready: {error}")
136
+ finally:
137
+ proc.send_signal(signal.SIGINT)
138
+ try:
139
+ proc.wait(timeout=30)
140
+ except subprocess.TimeoutExpired:
141
+ proc.kill()
142
+ proc.wait(timeout=30)
143
+ subprocess.run(["docker", "compose", "down", "-v", "--remove-orphans"], cwd=cwd, check=True)
144
+ PY
145
+ ./run_tests.sh
146
+ ```
147
+
148
+ Observed result:
149
+
150
+ - `./init_db.sh` printed `database initialized`
151
+ - detached startup reached healthy state on `127.0.0.1:32806`
152
+ - `GET /health`, `POST /items`, and `GET /items` all returned successful real API responses against the running container
153
+ - attached `docker compose up --build` reached a healthy `/health` endpoint at `http://127.0.0.1:32807/health` before controlled shutdown
154
+ - `./run_tests.sh` finished with passing Go tests and printed `Go Chi smoke check passed at http://app:8080`
155
+
156
+ ## Expected caveats
157
+
158
+ - the baseline uses idempotent schema bootstrap instead of a full migration framework
159
+ - SQLite is the safe local baseline default, not a production concurrency recommendation
160
+ - switch to PostgreSQL only when the prompt or existing repo actually needs a network database