@cassiomc1/forgeloop 0.1.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 (63) hide show
  1. package/.cursor/rules/project-loop.mdc +18 -0
  2. package/.forgeloop/.gitignore +2 -0
  3. package/.github/copilot-instructions.md +16 -0
  4. package/AGENTS.md +16 -0
  5. package/AGENT_COMPATIBILITY.md +147 -0
  6. package/CLAUDE.md +14 -0
  7. package/CONTRACT_COVERAGE.md +27 -0
  8. package/DELEGATION_PROTOCOL.md +91 -0
  9. package/ENG/accessibility-eng.md +155 -0
  10. package/ENG/clean-code-eng.md +223 -0
  11. package/ENG/design-code-eng.md +511 -0
  12. package/ENG/games-code-design-web-eng.md +751 -0
  13. package/ENG/perf-code-eng.md +441 -0
  14. package/ENG/premium-sites-studio-eng.md +320 -0
  15. package/ENG/sec-code-eng.md +706 -0
  16. package/ENG/test-code-eng.md +257 -0
  17. package/EXECUTION_STATE.md +107 -0
  18. package/GUIDE_ROUTER.md +274 -0
  19. package/LICENSE +21 -0
  20. package/LICENSE-DOCS.md +13 -0
  21. package/LOOP_ENGINEERING.md +551 -0
  22. package/LOOP_SYSTEM_DESIGN.md +394 -0
  23. package/ORCHESTRATOR_INTEGRATION.md +106 -0
  24. package/PROJECT_PROFILE.md +124 -0
  25. package/QUALITY_SCORECARD.md +54 -0
  26. package/README.md +492 -0
  27. package/TERMINOLOGY.md +21 -0
  28. package/THIRD_PARTY_NOTICES.md +129 -0
  29. package/THREAT_MODEL.md +35 -0
  30. package/package.json +51 -0
  31. package/schemas/delegated-result.schema.json +33 -0
  32. package/schemas/evidence.schema.json +15 -0
  33. package/schemas/execution-receipt.schema.json +46 -0
  34. package/schemas/routing-input.schema.json +17 -0
  35. package/schemas/routing-result.schema.json +17 -0
  36. package/schemas/task-brief.schema.json +24 -0
  37. package/schemas/work-state.schema.json +46 -0
  38. package/src/cli.js +341 -0
  39. package/src/commands/clear-state.js +11 -0
  40. package/src/commands/doctor.js +165 -0
  41. package/src/commands/init.js +42 -0
  42. package/src/commands/inspect.js +17 -0
  43. package/src/commands/route.js +32 -0
  44. package/src/commands/status.js +29 -0
  45. package/src/commands/update.js +109 -0
  46. package/src/commands/validate-protocol.js +133 -0
  47. package/src/commands/validate-receipt.js +19 -0
  48. package/src/commands/validate-state.js +30 -0
  49. package/src/core/agent-support.js +89 -0
  50. package/src/core/conformance.js +133 -0
  51. package/src/core/delegation.js +283 -0
  52. package/src/core/evidence.js +56 -0
  53. package/src/core/filesystem.js +122 -0
  54. package/src/core/inspect.js +115 -0
  55. package/src/core/json-safety.js +54 -0
  56. package/src/core/manifest.js +75 -0
  57. package/src/core/protocol.js +81 -0
  58. package/src/core/receipt.js +129 -0
  59. package/src/core/repository.js +19 -0
  60. package/src/core/router.js +296 -0
  61. package/src/core/schema-validation.js +179 -0
  62. package/src/core/templates.js +56 -0
  63. package/src/core/work-state.js +471 -0
@@ -0,0 +1,320 @@
1
+ ---
2
+ name: premium-sites-studio-eng
3
+ language: en
4
+ description: "Complete process for building premium websites at major design-studio quality."
5
+ version: "2026.09"
6
+ last-reviewed: "2026-08-10"
7
+ ---
8
+
9
+ # Premium Websites at Studio Level — Complete Process
10
+
11
+ > This guide defines the production process. For detailed visual rules, also use [`design-code-eng.md`](./design-code-eng.md). For accessibility, code quality, testing, security, and performance, consult the related documents at the end. A high-end website is not only a beautiful interface: it is a coherent, useful, fast, accessible, measurable, and maintainable experience.
12
+ >
13
+ > **Tooling policy**: identify the stack, the stage, and the applicable checks; prefer an already available equivalent that produces compatible evidence. Ask for authorization before installing a tool or changing the environment. If no safe equivalent exists, record the required check as blocked and never claim that it passed. Do not install merely optional resources.
14
+
15
+ ## 1. Quality bar
16
+
17
+ A website is ready only when it meets all of these criteria at the same time:
18
+
19
+ - **Clarity:** within seconds, people understand what it is, who it is for, and what action they can take.
20
+ - **Intent:** every section, image, animation, and word has a business or experience purpose.
21
+ - **Coherence:** brand, content, interface, motion, responsiveness, and behavior form one system.
22
+ - **Distinctiveness:** the solution has its own visual and narrative idea; it is not a recolored template.
23
+ - **Inclusion:** keyboard, screen reader, zoom, contrast, reduced motion, and different devices are considered from the start.
24
+ - **Performance:** the experience is fast on the audience's real devices and networks, not only on the developer's computer.
25
+ - **Reliability:** loading, error, empty, consent, form, and integration states behave predictably.
26
+ - **Operations:** someone can update content, measure results, fix problems, and evolve the site after launch.
27
+
28
+ ## 2. How to use this guide
29
+
30
+ Follow the gates in order. Within each gate, use the canonical [Loop Engineering](../LOOP_ENGINEERING.md) cycle; do not start costly implementation before the previous gate has a verifiable output or recorded uncertainty.
31
+
32
+ 1. **Brief and strategy:** objective, audience, positioning, offer, constraints, and metrics.
33
+ 2. **Content and architecture:** content inventory, sitemap, navigation, journeys, and data model.
34
+ 3. **Creative direction:** concept, references, tone, imagery, typography, color, composition, and motion.
35
+ 4. **Design system:** tokens, components, states, breakpoints, usage rules, and recorded decisions.
36
+ 5. **Prototype and validation:** test hierarchy, comprehension, navigation, and conversion before full implementation.
37
+ 6. **Implementation:** build with semantic HTML, predictable components, real or representative data, and progressive enhancement.
38
+ 7. **Quality:** run accessibility, performance, security, SEO, compatibility, functional testing, and visual regression.
39
+ 8. **Launch and operations:** deploy with observability, rollback plan, analytics, documentation, and an accountable owner.
40
+
41
+ Each gate must have a verifiable output. If a decision remains ambiguous, record the hypothesis, risk, owner, and next test; do not hide uncertainty behind aesthetics.
42
+
43
+ ## 3. Gate 1 — Brief, strategy, and success
44
+
45
+ Before choosing colors or components, produce a short brief:
46
+
47
+ ```md
48
+ # Website brief
49
+
50
+ ## Context
51
+ - Brand/product:
52
+ - Business problem:
53
+ - Why this website exists now:
54
+
55
+ ## Audience
56
+ - Primary audience:
57
+ - Secondary audiences:
58
+ - Prior knowledge:
59
+ - Needs and objections:
60
+
61
+ ## Desired outcome
62
+ - Primary action:
63
+ - Secondary actions:
64
+ - Primary metric:
65
+ - Quality metrics:
66
+
67
+ ## Constraints
68
+ - Available content:
69
+ - Technology/CMS:
70
+ - Languages and regions:
71
+ - Timeline and team:
72
+ - Legal, accessibility, and security requirements:
73
+
74
+ ## Non-goals
75
+ - What the website does not need to solve:
76
+ ```
77
+
78
+ Rules:
79
+
80
+ - Do not invent positioning, testimonials, numbers, clients, awards, or claims to fill the page.
81
+ - Distinguish **objective**, **hypothesis**, and **metric**. “Look premium” is not a sufficient metric.
82
+ - Define one primary action per page. If everything is a priority, nothing is.
83
+ - Identify what must be approved by the client, user, or legal team before writing the interface.
84
+ - Define audience, device, network speed, language, location, and technology as context — not as end-stage details.
85
+
86
+ ## 4. Gate 2 — Content, architecture, and journeys
87
+
88
+ ### Content inventory
89
+
90
+ Before final layouts, organize a table with:
91
+
92
+ | Page/section | Purpose | Real content | Source/owner | Status | CTA | Media requirement |
93
+ | --- | --- | --- | --- | --- | --- | --- |
94
+ | Home/hero | Explain proposition | Headline, support, proof | Marketing | approved | Explore product | video/image |
95
+
96
+ Valid statuses: `draft`, `in review`, `approved`, `blocked`, `outdated`. Placeholder content cannot be treated as ready for visual or conversion QA.
97
+
98
+ ### Information architecture
99
+
100
+ - Create sitemap, primary navigation, secondary navigation, footer, and return paths.
101
+ - Organize around user intent, not the company's internal structure.
102
+ - Give every page a title, promise, primary action, and success state.
103
+ - Avoid navigation that depends only on hover, gestures, horizontal scrolling, or animation.
104
+ - Plan readable URLs, titles, descriptions, headings, breadcrumbs, and social sharing from the architecture stage.
105
+ - For CMS sites, model content as reusable data; do not repeat the same copy in multiple components.
106
+ - For multilingual sites, treat translation, text expansion, locale, currency, date, SEO, and fallbacks as first-class requirements.
107
+
108
+ ### Critical journeys
109
+
110
+ Map at least:
111
+
112
+ - first visit → understanding → exploration → primary action;
113
+ - search/navigation → detail page → conversion;
114
+ - form → validation → submission → confirmation → error recovery;
115
+ - slow mobile device → priority content → essential interaction;
116
+ - returning user → update, support, or next action.
117
+
118
+ ## 5. Gate 3 — Creative direction
119
+
120
+ Produce creative direction before multiplying screens. It must answer:
121
+
122
+ - What is the experience's central idea?
123
+ - What feeling should remain after the visit?
124
+ - What visual contrast differentiates the brand?
125
+ - What is structural and what is decoration?
126
+ - Which references describe language, and which are merely visual copies that are prohibited?
127
+ - How does the idea work without imagery, audio, hover, and with reduced motion?
128
+
129
+ Recommended deliverables:
130
+
131
+ - an annotated moodboard, not just a collage;
132
+ - photography/illustration/3D direction and cropping rules;
133
+ - primary and supporting typography with license and fallback;
134
+ - semantic color palette and contrast examples;
135
+ - composition, rhythm, and density principles;
136
+ - storyboard for motion and video moments;
137
+ - an explicit list of anti-patterns that do not belong to the brand.
138
+
139
+ The [premium visual guide](./design-code-eng.md) provides palettes, typography, layout, components, and motion. Use it as an execution system, not as a substitute for strategic direction.
140
+
141
+ ## 6. Gate 4 — Production design system
142
+
143
+ ### Tokens
144
+
145
+ Define tokens before components:
146
+
147
+ - brand color, surfaces, text, border, focus, success, warning, error, and information;
148
+ - typography by function: display, heading, body, label, caption, and code;
149
+ - spacing, container, grid, radius, border, shadow, and elevation scales;
150
+ - breakpoints based on behavior, not specific devices;
151
+ - motion: duration, easing, distance, stagger, and reduction rules;
152
+ - z-index, layers, opacity, and interaction states.
153
+
154
+ Use semantic tokens (`color.text.primary`) instead of scattering raw values (`#111111`) across components. Dark mode and themes should swap tokens, not require a copied interface.
155
+
156
+ ### Components
157
+
158
+ Every production component should have:
159
+
160
+ - purpose, anatomy, and usage rules;
161
+ - necessary variants, without infinite cosmetic variants;
162
+ - `default`, `hover`, `focus-visible`, `active`, `disabled`, `loading`, `error`, and `success` states when applicable;
163
+ - behavior on mobile, keyboard, zoom, long content, and missing media;
164
+ - HTML semantics and accessibility contract;
165
+ - realistic example data and known limits;
166
+ - a test or acceptance criterion;
167
+ - a recorded decision when there is a meaningful trade-off.
168
+
169
+ Do not turn every section into a single disposable component. Componentize real repeated patterns and preserve freedom for special compositions.
170
+
171
+ ### Maturity criterion
172
+
173
+ A component is not ready because it exists in Figma. It is ready when another person can use it without asking the author how it should behave.
174
+
175
+ ## 7. Gate 5 — UX, prototype, and validation
176
+
177
+ - Prototype hierarchy, navigation, and critical states first; visual detail comes later.
178
+ - Test with near-real content, including long titles, missing images, errors, and small screens.
179
+ - Validate five questions: “what is it?”, “is it for me?”, “why trust it?”, “what do I do now?”, and “what happens next?”.
180
+ - Observe where people hesitate, not only whether they can click.
181
+ - Record decisions and issues by severity: blocker, high, medium, low.
182
+ - “Works in my viewport” is not validation.
183
+
184
+ ## 8. Gate 6 — Premium implementation
185
+
186
+ ### Architecture
187
+
188
+ - Separate content, data, components, layout, tokens, integrations, and media.
189
+ - Keep components small, named, and searchable; follow [`clean-code-eng.md`](./clean-code-eng.md).
190
+ - Use semantic HTML before ARIA and progressive enhancement for essential content.
191
+ - Choose a rendering strategy (static, server-side, hybrid, or client-side) based on content, SEO, personalization, and interaction needs.
192
+ - Do not add a framework, animation library, 3D, or CMS just because it is fashionable.
193
+ - Treat dependencies, fonts, images, and external scripts as product and security decisions.
194
+ - Keep a single source for tokens and content; avoid drift between Figma, code, and CMS.
195
+
196
+ ### Content and media
197
+
198
+ - Use images and video with documented license, attribution, and purpose.
199
+ - Define `alt`, captions, transcript, poster, aspect ratio, focal point, and fallback.
200
+ - Reserve media space before loading to avoid layout shift.
201
+ - Do not use video, 3D, custom cursors, or parallax to hide a weak proposition.
202
+ - Essential content must remain understandable when media is blocked or unavailable.
203
+
204
+ ### Motion
205
+
206
+ - Motion should explain change, hierarchy, spatial relationship, or feedback; it should not exist only to impress.
207
+ - Use entry, continuity, exit, and error states consistently.
208
+ - Prefer `transform` and `opacity`, pause work outside the viewport, and respect `prefers-reduced-motion`.
209
+ - Every essential interaction must work without hover, pointer lock, audio, or complex gestures.
210
+ - For trailers, demos, and HTML motion graphics, use [HyperFrames](https://hyperframes.heygen.com) and follow the [official quickstart](https://hyperframes.heygen.com/quickstart). Preserve brand tokens and validate the render as a separate audiovisual product.
211
+
212
+ ## 9. Gate 7 — Technical quality
213
+
214
+ This guide orchestrates the specialized guides; it does not duplicate them.
215
+
216
+ | Area | Minimum gate | Reference |
217
+ | --- | --- | --- |
218
+ | Code | lint, format, typing, architecture review, and dependency review | [`clean-code-eng.md`](./clean-code-eng.md) |
219
+ | Accessibility | keyboard, focus, semantics, contrast, zoom/reflow, screen reader, and `prefers-reduced-motion` | [`accessibility-eng.md`](./accessibility-eng.md) |
220
+ | Testing | unit, integration, E2E, accessibility, and visual regression | [`test-code-eng.md`](./test-code-eng.md) |
221
+ | Performance | baseline, budgets, Web Vitals, real network/device, and regression | [`perf-code-eng.md`](./perf-code-eng.md) |
222
+ | Security | secrets, headers, dependencies, forms, uploads, CSP, and third parties | [`sec-code-eng.md`](./sec-code-eng.md) |
223
+ | Design | tokens, components, responsiveness, real content, and Anti-Slop | [`design-code-eng.md`](./design-code-eng.md) |
224
+
225
+ ### Minimum QA matrix
226
+
227
+ Test critical flows in a documented matrix that includes:
228
+
229
+ - wide desktop, smaller desktop, tablet, and mobile;
230
+ - Chromium/Chrome, Firefox, and Safari when they are in scope;
231
+ - keyboard, touch, mouse/trackpad, and screen reader when applicable;
232
+ - 200% zoom, reflow, dark mode, high contrast, and reduced motion;
233
+ - fast network, constrained network, cold cache, and low-performance device;
234
+ - short, long, translated, missing, invalid, and loading content;
235
+ - cookies/consent, third-party blocking, and CMS/API failure.
236
+
237
+ Record browser, device, version, steps, evidence, severity, owner, and status. A beautiful screenshot is not a reproducible test.
238
+
239
+ ## 10. SEO, discovery, and trust
240
+
241
+ - Every page should have a search intent or a clear reason not to be indexed.
242
+ - Use coherent heading hierarchy, unique title/description, canonical, sitemap, robots, and structured data when appropriate.
243
+ - Write for people; do not sacrifice clarity for keywords.
244
+ - Ensure crawlable links, indexable error states when needed, Open Graph, favicon, manifest, and correct sharing.
245
+ - Do not publish claims, reviews, client logos, or structured data without source and authorization.
246
+ - Validate accessibility, performance, privacy, and SEO together: a growth tactic that harms trust is a regression.
247
+
248
+ ## 11. Launch and operations
249
+
250
+ Before deployment, confirm:
251
+
252
+ - production environment, variables, and secrets are separated;
253
+ - domain, TLS, redirects, cache, CDN, and headers are correct;
254
+ - analytics has consent, named events, and a privacy plan;
255
+ - error monitoring, uptime, Web Vitals, conversion, and forms are monitored;
256
+ - CMS backup/export and rollback plan exist;
257
+ - editing documentation, owners, dependencies, and content expiry are documented;
258
+ - post-deploy smoke tests cover critical pages and journeys;
259
+ - there is a plan to update fonts, libraries, content, consent, and dependencies.
260
+
261
+ Launch is a transition stage, not the end of the project. Schedule a review after real data, stabilization fixes, and an evidence-based improvement cycle.
262
+
263
+ ## 12. Studio anti-patterns
264
+
265
+ - Starting with the hero before understanding objective, content, and audience.
266
+ - Using lorem ipsum, invented numbers, or unlicensed images.
267
+ - Copying a visual reference without understanding the logic that makes it good.
268
+ - Creating a huge design system without enough product to justify its parts.
269
+ - Building every page with different tokens, spacing, and components.
270
+ - Using animation to delay content access or prevent navigation.
271
+ - Treating desktop as the only version and “responsive” as automatic shrinking.
272
+ - Performing QA only at the end, in one browser and on one computer.
273
+ - Measuring only local Lighthouse or only conversion, ignoring accessibility and quality.
274
+ - Delivering a site that only its author can maintain.
275
+
276
+ ## 13. Template for `CLAUDE.md` / `AGENTS.md`
277
+
278
+ ```md
279
+ ## Premium website at studio level
280
+
281
+ - Read `premium-sites-studio-eng.md` before creating or reviewing pages.
282
+ - Close brief, content, architecture, and creative direction before full implementation.
283
+ - Use `design-code-eng.md` for tokens, layout, components, and motion.
284
+ - Use real or representative content; do not invent claims, logos, metrics, or testimonials.
285
+ - Keep content, tokens, components, integrations, and media separate.
286
+ - Preserve semantic HTML, keyboard, focus, contrast, zoom, reflow, and reduced motion.
287
+ - Validate desktop, mobile, Safari/Firefox/Chromium, constrained network, and long content.
288
+ - Run lint, format, tests, accessibility, performance, security, and visual regression checks.
289
+ - Document decisions, risks, exceptions, owners, and next tests.
290
+ - Before deployment, validate SEO, analytics/consent, headers, TLS, rollback, and smoke tests.
291
+ - If the project has HTML video or motion, consult HyperFrames and validate preview/render.
292
+ ```
293
+
294
+ ## 14. Final checklist
295
+
296
+ - [ ] Brief approved with objective, audience, primary action, metrics, and non-goals.
297
+ - [ ] Real content inventoried, reviewed, licensed, and assigned to an owner.
298
+ - [ ] Sitemap, journeys, URLs, and content model defined.
299
+ - [ ] Creative direction documented and distinct from copied references.
300
+ - [ ] Tokens, components, variants, states, and decisions recorded.
301
+ - [ ] Prototype validated with long content, error, loading, mobile, and reduced motion.
302
+ - [ ] Implementation has no unjustified dependencies or effects.
303
+ - [ ] Accessibility, testing, performance, and security approved.
304
+ - [ ] Technical SEO, sharing, analytics, and consent reviewed.
305
+ - [ ] QA executed in a documented matrix with evidence and severity.
306
+ - [ ] Deployment, rollback, monitoring, CMS, and owners documented.
307
+ - [ ] Post-launch review scheduled using real data.
308
+
309
+ ## Related documents and references
310
+
311
+ - [Premium design](./design-code-eng.md)
312
+ - [Accessibility](./accessibility-eng.md)
313
+ - [Clean Code](./clean-code-eng.md)
314
+ - [Testing](./test-code-eng.md)
315
+ - [Performance](./perf-code-eng.md)
316
+ - [Security](./sec-code-eng.md)
317
+ - [HyperFrames](https://hyperframes.heygen.com)
318
+ - [Web Content Accessibility Guidelines (WCAG)](https://www.w3.org/TR/WCAG22/)
319
+ - [Web Vitals](https://web.dev/articles/vitals)
320
+ - [Google Search — SEO Starter Guide](https://developers.google.com/search/docs/fundamentals/seo-starter-guide)