@supportpages.io/wtfm 0.0.0-stage → 0.3.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.
- package/LICENSE +201 -0
- package/NOTICE +23 -0
- package/README.md +392 -2
- package/dist/actions.d.ts +98 -0
- package/dist/actions.js +86 -0
- package/dist/actions.js.map +1 -0
- package/dist/agent-settings.d.ts +22 -0
- package/dist/agent-settings.js +35 -0
- package/dist/agent-settings.js.map +1 -0
- package/dist/api.d.ts +14 -0
- package/dist/api.js +159 -0
- package/dist/api.js.map +1 -0
- package/dist/article-link.d.ts +16 -0
- package/dist/article-link.js +25 -0
- package/dist/article-link.js.map +1 -0
- package/dist/artifacts.d.ts +45 -0
- package/dist/artifacts.js +144 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/brand.d.ts +4 -0
- package/dist/brand.js +9 -0
- package/dist/brand.js.map +1 -0
- package/dist/bridge.d.ts +2964 -0
- package/dist/bridge.js +1036 -0
- package/dist/bridge.js.map +1 -0
- package/dist/capacity.d.ts +5 -0
- package/dist/capacity.js +11 -0
- package/dist/capacity.js.map +1 -0
- package/dist/credentials.d.ts +13 -0
- package/dist/credentials.js +88 -0
- package/dist/credentials.js.map +1 -0
- package/dist/development-tls.d.ts +8 -0
- package/dist/development-tls.js +38 -0
- package/dist/development-tls.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.js +18 -0
- package/dist/errors.js.map +1 -0
- package/dist/export.d.ts +11 -0
- package/dist/export.js +91 -0
- package/dist/export.js.map +1 -0
- package/dist/hosted-operations.d.ts +108 -0
- package/dist/hosted-operations.js +120 -0
- package/dist/hosted-operations.js.map +1 -0
- package/dist/hosting-benefits.d.ts +66 -0
- package/dist/hosting-benefits.js +67 -0
- package/dist/hosting-benefits.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/local-inventory.d.ts +22 -0
- package/dist/local-inventory.js +59 -0
- package/dist/local-inventory.js.map +1 -0
- package/dist/local-setup.d.ts +208 -0
- package/dist/local-setup.js +140 -0
- package/dist/local-setup.js.map +1 -0
- package/dist/pairing.d.ts +71 -0
- package/dist/pairing.js +235 -0
- package/dist/pairing.js.map +1 -0
- package/dist/preferences.d.ts +18 -0
- package/dist/preferences.js +44 -0
- package/dist/preferences.js.map +1 -0
- package/dist/progress.d.ts +205 -0
- package/dist/progress.js +224 -0
- package/dist/progress.js.map +1 -0
- package/dist/reminders.d.ts +31 -0
- package/dist/reminders.js +73 -0
- package/dist/reminders.js.map +1 -0
- package/dist/replace-connection.d.ts +6 -0
- package/dist/replace-connection.js +77 -0
- package/dist/replace-connection.js.map +1 -0
- package/dist/repository-actions.d.ts +18 -0
- package/dist/repository-actions.js +9 -0
- package/dist/repository-actions.js.map +1 -0
- package/dist/repository-benefits.d.ts +96 -0
- package/dist/repository-benefits.js +64 -0
- package/dist/repository-benefits.js.map +1 -0
- package/dist/run-update.d.ts +17 -0
- package/dist/run-update.js +27 -0
- package/dist/run-update.js.map +1 -0
- package/dist/runs.d.ts +541 -0
- package/dist/runs.js +146 -0
- package/dist/runs.js.map +1 -0
- package/dist/runtime.d.ts +12 -0
- package/dist/runtime.js +58 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schema.d.ts +277 -0
- package/dist/schema.js +66 -0
- package/dist/schema.js.map +1 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +298 -0
- package/dist/server.js.map +1 -0
- package/dist/session.d.ts +1714 -0
- package/dist/session.js +619 -0
- package/dist/session.js.map +1 -0
- package/dist/settings.d.ts +9 -0
- package/dist/settings.js +21 -0
- package/dist/settings.js.map +1 -0
- package/dist/sync.d.ts +495 -0
- package/dist/sync.js +191 -0
- package/dist/sync.js.map +1 -0
- package/dist/telemetry-scrub.d.ts +13 -0
- package/dist/telemetry-scrub.js +51 -0
- package/dist/telemetry-scrub.js.map +1 -0
- package/dist/telemetry.d.ts +73 -0
- package/dist/telemetry.js +173 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/walkthroughs.d.ts +224 -0
- package/dist/walkthroughs.js +109 -0
- package/dist/walkthroughs.js.map +1 -0
- package/dist/workspace.d.ts +14 -0
- package/dist/workspace.js +127 -0
- package/dist/workspace.js.map +1 -0
- package/dist/writer-agent.d.ts +21 -0
- package/dist/writer-agent.js +27 -0
- package/dist/writer-agent.js.map +1 -0
- package/dist/writer-entry.d.ts +171 -0
- package/dist/writer-entry.js +233 -0
- package/dist/writer-entry.js.map +1 -0
- package/dist/writing-style.d.ts +7 -0
- package/dist/writing-style.js +52 -0
- package/dist/writing-style.js.map +1 -0
- package/engine/SYNC.json +4 -0
- package/engine/VERSION +1 -0
- package/engine/detect-project/README.md +141 -0
- package/engine/detect-project/SKILL.md +1421 -0
- package/engine/detect-project/assets/desktop/desktop-frame.css +428 -0
- package/engine/detect-project/assets/game/game-frame.css +132 -0
- package/engine/detect-project/assets/macosui/LICENSE-puppertino.txt +21 -0
- package/engine/detect-project/assets/macosui/VERSIONS.txt +1 -0
- package/engine/detect-project/assets/macosui/fonts.css +15 -0
- package/engine/detect-project/assets/macosui/macos-frame.css +481 -0
- package/engine/detect-project/assets/macosui/puppertino.css +2153 -0
- package/engine/detect-project/assets/mobileui/LICENSE-fonts.txt +13 -0
- package/engine/detect-project/assets/mobileui/LICENSE-framework7.txt +52 -0
- package/engine/detect-project/assets/mobileui/VERSIONS.txt +6 -0
- package/engine/detect-project/assets/mobileui/device-frame.css +316 -0
- package/engine/detect-project/assets/mobileui/f7-color-theme.mjs +1345 -0
- package/engine/detect-project/assets/mobileui/f7-icons-names.json +1254 -0
- package/engine/detect-project/assets/mobileui/fonts.css +16 -0
- package/engine/detect-project/assets/mobileui/framework7-components.css +39 -0
- package/engine/detect-project/assets/mobileui/framework7-core.css +5245 -0
- package/engine/detect-project/assets/mobileui/icons.css +31 -0
- package/engine/detect-project/assets/mobileui/md3-defaults.css +89 -0
- package/engine/detect-project/assets/mobileui/platforms.json +46 -0
- package/engine/detect-project/assets/tailwind-fallback.css +1729 -0
- package/engine/detect-project/assets/webtui/LICENSE-webtui.txt +28 -0
- package/engine/detect-project/assets/webtui/VERSIONS.txt +7 -0
- package/engine/detect-project/assets/webtui/terminal-frame.css +195 -0
- package/engine/detect-project/assets/webtui/theme-catppuccin.css +1 -0
- package/engine/detect-project/assets/webtui/theme-everforest.css +1 -0
- package/engine/detect-project/assets/webtui/theme-gruvbox.css +1 -0
- package/engine/detect-project/assets/webtui/theme-nord.css +1 -0
- package/engine/detect-project/assets/webtui/theme-vitesse.css +1 -0
- package/engine/detect-project/assets/webtui/themes.json +37 -0
- package/engine/detect-project/assets/webtui/webtui-core.css +1 -0
- package/engine/detect-project/assets/win32ui/7css.css +2 -0
- package/engine/detect-project/assets/win32ui/LICENSE-7css.txt +21 -0
- package/engine/detect-project/assets/win32ui/VERSIONS.txt +1 -0
- package/engine/detect-project/assets/win32ui/win32-frame.css +278 -0
- package/engine/detect-project/package-lock.json +12 -0
- package/engine/detect-project/package.json +10 -0
- package/engine/detect-project/scripts/apply_runtime_profiles.js +313 -0
- package/engine/detect-project/scripts/check_css_health.js +412 -0
- package/engine/detect-project/scripts/check_project_map.js +150 -0
- package/engine/detect-project/scripts/check_runtime_coverage.js +311 -0
- package/engine/detect-project/scripts/check_runtime_recipe_quality.js +184 -0
- package/engine/detect-project/scripts/classify_app_type.sh +246 -0
- package/engine/detect-project/scripts/classify_surface.sh +95 -0
- package/engine/detect-project/scripts/classify_workspace.js +39 -0
- package/engine/detect-project/scripts/compile_css.sh +447 -0
- package/engine/detect-project/scripts/detect_static.js +645 -0
- package/engine/detect-project/scripts/detect_structure.js +187 -0
- package/engine/detect-project/scripts/include_census.js +451 -0
- package/engine/detect-project/scripts/json_get.js +142 -0
- package/engine/detect-project/scripts/merge_json.js +52 -0
- package/engine/detect-project/scripts/recommend_model_tier.js +252 -0
- package/engine/detect-project/scripts/resolve_route_chains.js +135 -0
- package/engine/detect-project/scripts/run_css_build.sh +40 -0
- package/engine/detect-project/scripts/sanitize_css.js +83 -0
- package/engine/detect-project/scripts/test_classify_surface.js +108 -0
- package/engine/detect-project/scripts/test_node_helpers.js +142 -0
- package/engine/detect-project/scripts/test_recommend_model_tier.js +119 -0
- package/engine/detect-project/scripts/test_resolve_route_chains.js +182 -0
- package/engine/detect-project/scripts/test_runtime_coverage.js +323 -0
- package/engine/detect-project/scripts/test_runtime_recipe_quality.js +187 -0
- package/engine/detect-project/scripts/theme_overrides.js +169 -0
- package/engine/detect-project/scripts/write_branding.js +129 -0
- package/engine/generate-illustrated-article/SKILL.md +461 -0
- package/engine/generate-illustrated-article/contracts/desktop.md +90 -0
- package/engine/generate-illustrated-article/contracts/game.md +38 -0
- package/engine/generate-illustrated-article/contracts/label-evidence.md +38 -0
- package/engine/generate-illustrated-article/contracts/macos.md +79 -0
- package/engine/generate-illustrated-article/contracts/mobile.md +40 -0
- package/engine/generate-illustrated-article/contracts/terminal.md +29 -0
- package/engine/generate-illustrated-article/contracts/win32.md +43 -0
- package/engine/generate-illustrated-article/package-lock.json +366 -0
- package/engine/generate-illustrated-article/package.json +15 -0
- package/engine/generate-illustrated-article/scripts/article_blocks.js +34 -0
- package/engine/generate-illustrated-article/scripts/check_article_json.js +105 -0
- package/engine/generate-illustrated-article/scripts/emit_walkthrough_signals.js +100 -0
- package/engine/generate-illustrated-article/scripts/extract_images.js +187 -0
- package/engine/generate-illustrated-article/scripts/generate_content_images.js +376 -0
- package/engine/generate-illustrated-article/scripts/include_census.js +451 -0
- package/engine/generate-illustrated-article/scripts/inject_assets.js +1691 -0
- package/engine/generate-illustrated-article/scripts/jit_mockup_css.js +191 -0
- package/engine/generate-illustrated-article/scripts/label_evidence.js +87 -0
- package/engine/generate-illustrated-article/scripts/lint_article_copy.js +252 -0
- package/engine/generate-illustrated-article/scripts/lint_mockup_fidelity.js +2403 -0
- package/engine/generate-illustrated-article/scripts/polish_tickets.js +1148 -0
- package/engine/generate-illustrated-article/scripts/related_repos.sh +52 -0
- package/engine/generate-illustrated-article/scripts/render_all.js +177 -0
- package/engine/generate-illustrated-article/scripts/render_mockup.js +665 -0
- package/engine/generate-illustrated-article/scripts/render_ready.js +164 -0
- package/engine/generate-illustrated-article/scripts/resolve_workspace.sh +86 -0
- package/engine/generate-illustrated-article/scripts/runtime_region_geometry.js +55 -0
- package/engine/generate-illustrated-article/scripts/source_paths.js +49 -0
- package/engine/generate-illustrated-article/scripts/test_control_visibility.js +30 -0
- package/engine/generate-illustrated-article/scripts/test_emit_walkthrough_signals.js +157 -0
- package/engine/generate-illustrated-article/scripts/test_generate_content_images.js +168 -0
- package/engine/generate-illustrated-article/scripts/test_include_census.js +126 -0
- package/engine/generate-illustrated-article/scripts/test_label_evidence.js +49 -0
- package/engine/generate-illustrated-article/scripts/test_lint_article_copy.js +138 -0
- package/engine/generate-illustrated-article/scripts/test_lint_mockup_fidelity.js +653 -0
- package/engine/generate-illustrated-article/scripts/test_node_ports.js +152 -0
- package/engine/generate-illustrated-article/scripts/test_polish_tickets.js +481 -0
- package/engine/generate-illustrated-article/scripts/test_related_repos.js +64 -0
- package/engine/generate-illustrated-article/scripts/test_render_ready.js +85 -0
- package/engine/generate-illustrated-article/scripts/test_source_paths.js +68 -0
- package/engine/generate-illustrated-article/scripts/trace_hook.js +79 -0
- package/engine/generate-illustrated-article/scripts/trace_hook.sh +4 -0
- package/engine/generate-illustrated-article/scripts/validate_html.js +114 -0
- package/engine/generate-illustrated-article/scripts/watermark.js +69 -0
- package/install.sh +14 -0
- package/package.json +57 -4
- package/scripts/auth.mjs +33 -0
- package/scripts/auto-update.mjs +7 -0
- package/scripts/build-plugin.mjs +58 -0
- package/scripts/build-release.mjs +94 -0
- package/scripts/check-release.mjs +40 -0
- package/scripts/check-runtime.mjs +10 -0
- package/scripts/cli.mjs +8 -0
- package/scripts/install.mjs +64 -0
- package/scripts/lib/agent-runner.mjs +181 -0
- package/scripts/lib/agent-settings.mjs +215 -0
- package/scripts/lib/article-skills.mjs +82 -0
- package/scripts/lib/auto-update.mjs +50 -0
- package/scripts/lib/brand.mjs +9 -0
- package/scripts/lib/browser.mjs +12 -0
- package/scripts/lib/claude-connection.mjs +33 -0
- package/scripts/lib/claude-permissions.mjs +47 -0
- package/scripts/lib/claude-plugin.mjs +15 -0
- package/scripts/lib/claude-writer.mjs +10 -0
- package/scripts/lib/cli-main.mjs +85 -0
- package/scripts/lib/cli.mjs +888 -0
- package/scripts/lib/codex-config.mjs +51 -0
- package/scripts/lib/codex-integration.mjs +61 -0
- package/scripts/lib/codex-skill.mjs +34 -0
- package/scripts/lib/harness-models.mjs +109 -0
- package/scripts/lib/install.mjs +269 -0
- package/scripts/lib/managed-writer.mjs +38 -0
- package/scripts/lib/planning.mjs +263 -0
- package/scripts/lib/prepare-update.mjs +85 -0
- package/scripts/lib/refresh-writers.mjs +12 -0
- package/scripts/lib/remove.mjs +167 -0
- package/scripts/lib/renderer.mjs +34 -0
- package/scripts/lib/terminal.mjs +252 -0
- package/scripts/lib/uninit.mjs +72 -0
- package/scripts/lib/update.mjs +55 -0
- package/scripts/lib/writer-recovery.mjs +35 -0
- package/scripts/lib/yolo.mjs +362 -0
- package/scripts/plugin-session.mjs +65 -0
- package/scripts/prepare-update.mjs +12 -0
- package/scripts/publish-release.mjs +92 -0
- package/scripts/skills/supportpages/SKILL.md +120 -0
- package/scripts/smoke-release.mjs +101 -0
- package/server.json +27 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# detect-project skill (formerly detect-branding)
|
|
2
|
+
|
|
3
|
+
Detects the CSS framework, design tokens, brand colours, fonts, and user-facing structure of a project, then compiles (or synthesises) a CSS bundle the `generate-illustrated-article` and `generate-walkthrough` skills can load so their mockups visually match the actual product. After detection it deterministically recommends a provider-agnostic `low`, `medium`, or `high` model tier for those mockups.
|
|
4
|
+
|
|
5
|
+
## Invocation
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/detect-project [codebase_path]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Defaults to the current working directory.
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
A six-step pipeline:
|
|
16
|
+
|
|
17
|
+
1. **Static detection** — Pure regex pass via `scripts/detect_static.js`. Finds the framework (Tailwind, Bootstrap, Bulma, Foundation, MUI, custom, none), source CSS files, `:root` design tokens, SCSS variable literals, Tailwind config extend block, Rails-style default brand colour patterns, Google Fonts URLs, external stylesheet links.
|
|
18
|
+
|
|
19
|
+
2. **In-session LLM refinement** — Claude (in your current session) reads the static-detector output and resolves what regex can't: SCSS variable chains (`$primary: $brand-blue → #...`), Tailwind config imports, `@apply` component class dependencies, brand-colour usage validation, plugin detection. No subprocess, no extra API call — just smarter use of the LLM already in the room.
|
|
20
|
+
|
|
21
|
+
3. **Source compilation** — Runs the project's own build pipeline via `scripts/compile_css.sh`: `npm install --ignore-scripts` if needed, then `npx @tailwindcss/cli` / `npx tailwindcss` / `npx sass` / `npx postcss` depending on framework. This produces the exact CSS the project would serve in production. 180s timeout per command.
|
|
22
|
+
|
|
23
|
+
4. **Fallback synthesis** — When source compilation fails (broken config, missing deps, network failure), falls back to: framework CDN download (Bootstrap, Bulma, Foundation) OR a hand-written Tailwind utility fallback (`assets/tailwind-fallback.css`, ~200 utility classes + preflight reset), plus theme-aware overrides (`scripts/theme_overrides.js`) that generate `--bs-primary` / `.btn-primary` / `--color-*` style overrides matching the detected brand colours.
|
|
24
|
+
|
|
25
|
+
5. **Sanitization** — Strips compile-time-only directives (`@tailwind`, `@apply`, `@theme`, `@plugin`, `@layer`, etc.) from the final output so browsers can parse it cleanly.
|
|
26
|
+
|
|
27
|
+
6. **Model-tier recommendation** — Classifies the completed project cache without another model call or source-tree scan. Complex runtime editors, canvas scenes, and rich desktop workspaces select `high`; specialized surfaces and degraded detection paths receive conservative floors. The parent application maps the tier to current model IDs.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
|
|
31
|
+
Writes to `<codebase>/.rtfm/`:
|
|
32
|
+
|
|
33
|
+
| File | Purpose |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `branding.json` | Canonical detection + compilation summary. **Plausibly checkable into version control** — small, human-readable. The article/walkthrough skills read this. |
|
|
36
|
+
| `project_map.json` | Structure cache plus `mockup_model_recommendation.tier` (`low`, `medium`, or `high`). **Plausibly checkable into version control.** |
|
|
37
|
+
| `branding.css` | Compiled or synthesised CSS bundle. Often 50-150KB. Auto-`.gitignore`'d. |
|
|
38
|
+
| `branding-detect.json` | Raw output of the static + refinement passes (debugging / audit). Auto-`.gitignore`'d. |
|
|
39
|
+
| `branding.css.method.txt` | One-word compile method tag (`tailwind_v4`, `sass`, `fallback_synthesis`, etc.). Auto-`.gitignore`'d. |
|
|
40
|
+
| `.gitignore` | Auto-written, so the cache dir self-manages what to ignore. |
|
|
41
|
+
|
|
42
|
+
The recommendation object also includes `schema_version`, `policy_version`, an explainable numeric `score`, and machine-readable `reasons`. The stable parent-facing contract is `project_map.json.mockup_model_recommendation.tier`.
|
|
43
|
+
|
|
44
|
+
To reclassify an existing cache after the heuristic changes without repeating project detection:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
node detect-project/scripts/recommend_model_tier.js .rtfm/project_map.json .rtfm/branding.json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Parent-app integration
|
|
51
|
+
|
|
52
|
+
Use the recommendation to choose the model profile for subsequent `generate-illustrated-article` and `generate-walkthrough` runs:
|
|
53
|
+
|
|
54
|
+
1. Run `detect-project` and wait for it to complete successfully. On a first run, do not launch model-tier classification in parallel: the classifier depends on the enriched and validated project cache that detection produces.
|
|
55
|
+
2. Read `<codebase>/.rtfm/project_map.json`.
|
|
56
|
+
3. Require `mockup_model_recommendation.schema_version === 1` and a `tier` of `low`, `medium`, or `high`.
|
|
57
|
+
4. Resolve that tier through a parent-owned configuration mapping to the current harness, model, and reasoning effort.
|
|
58
|
+
5. Use the resolved profile for every mockup-generating skill in that project. The recommendation is intentionally project-wide and reflects its hardest normal user-facing surface.
|
|
59
|
+
|
|
60
|
+
Example cache contract:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mockup_model_recommendation": {
|
|
65
|
+
"schema_version": 1,
|
|
66
|
+
"policy_version": "heuristic-v1",
|
|
67
|
+
"tier": "high",
|
|
68
|
+
"score": 13,
|
|
69
|
+
"source": "heuristic",
|
|
70
|
+
"reasons": [
|
|
71
|
+
{
|
|
72
|
+
"code": "complex_runtime_surface",
|
|
73
|
+
"weight": 7,
|
|
74
|
+
"evidence": {
|
|
75
|
+
"recipe_count": 2,
|
|
76
|
+
"max_regions": 11,
|
|
77
|
+
"max_states": 8,
|
|
78
|
+
"populated_canvas": true
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Only `tier` is a routing input. Treat `score`, `policy_version`, and `reasons` as observability and debugging data; their shape and thresholds may evolve. Do not infer a model family or reasoning effort directly from the score.
|
|
87
|
+
|
|
88
|
+
Parent-side pseudocode:
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
const recommendation = projectMap.mockup_model_recommendation;
|
|
92
|
+
const valid = recommendation?.schema_version === 1
|
|
93
|
+
&& ['low', 'medium', 'high'].includes(recommendation.tier);
|
|
94
|
+
|
|
95
|
+
// Preserve mockup quality when an old, partial, or unreadable cache is found.
|
|
96
|
+
const tier = valid ? recommendation.tier : 'high';
|
|
97
|
+
const profile = configuredMockupProfiles[tier];
|
|
98
|
+
|
|
99
|
+
await runMockupSkill({
|
|
100
|
+
harness: profile.harness,
|
|
101
|
+
model: profile.model,
|
|
102
|
+
reasoningEffort: profile.reasoningEffort,
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Keep `configuredMockupProfiles` outside this repository so model migrations do not require changing or rerunning the skill. Log the chosen tier and `policy_version` with each generation for later benchmark analysis.
|
|
107
|
+
|
|
108
|
+
When a valid `.rtfm/` cache already exists, the parent may run the cache-only classifier shown above instead of rerunning detection. It performs no source-tree exploration or model call and rewrites only `mockup_model_recommendation` in `project_map.json`. Re-run full detection when project structure, runtime surfaces, or styling changes; reclassifying stale detection data cannot discover new complexity.
|
|
109
|
+
|
|
110
|
+
## How other skills consume the cache
|
|
111
|
+
|
|
112
|
+
`generate-illustrated-article` and `generate-walkthrough` check `./.rtfm/branding.json` at their start. If present, they use it (copying `branding.css` into each generation's output dir). If absent, they fall back to running the static detector inline (no LLM refinement, no compilation) and print a one-line note suggesting `/detect-project` for better fidelity.
|
|
113
|
+
|
|
114
|
+
## Cache staleness
|
|
115
|
+
|
|
116
|
+
Manual for v1. Re-run `/detect-project` when:
|
|
117
|
+
- The project's `tailwind.config.{js,ts}` changes
|
|
118
|
+
- Brand colours in model code change
|
|
119
|
+
- Layout templates change (fonts, external stylesheets)
|
|
120
|
+
- You manually edit `branding.json` and want to regenerate `branding.css`
|
|
121
|
+
|
|
122
|
+
The article/walkthrough skills will print a warning if `branding.json` is more than 7 days old, but won't block.
|
|
123
|
+
|
|
124
|
+
## When NOT to run this
|
|
125
|
+
|
|
126
|
+
- One-off article / walkthrough generations where you don't care about visual fidelity — the fallback inline detection in the other skills is fine.
|
|
127
|
+
- Projects with no CSS framework at all (the skill will detect `framework=none` and produce minimal output). Run it once to confirm, but no harm in skipping.
|
|
128
|
+
|
|
129
|
+
## Limitations (v1)
|
|
130
|
+
|
|
131
|
+
- **No hash-based cache invalidation** — manual re-run.
|
|
132
|
+
- **Per-tenant runtime branding** — only static defaults baked into the codebase. DB-driven per-tenant theming isn't detected.
|
|
133
|
+
- **CSS-in-JS deep extraction** — styled-components / Emotion / MUI theme objects are detected as the framework but theme palette isn't extracted.
|
|
134
|
+
- **Multi-format SCSS** — Sass syntax only (`.scss` / `.sass`). Less and Stylus not supported.
|
|
135
|
+
- **npm install** failures due to native deps (e.g. node-sass needing python build tools) are surfaced as errors; the skill falls back to synthesis.
|
|
136
|
+
|
|
137
|
+
## Requirements
|
|
138
|
+
|
|
139
|
+
- `node` (>= 22.12)
|
|
140
|
+
- Optional: `npx`, `npm` (only needed for source compilation; fallback synthesis works without them)
|
|
141
|
+
- Optional: `ffmpeg` (only for `generate-walkthrough`, not used here)
|