@dittowords/spec-cli 0.0.1-alpha.8 → 0.0.1-alpha.9
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/README.md +1 -7
- package/dist/commands/init.js +1 -1
- package/dist/commands/pull.js +0 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,6 @@ surfaces:
|
|
|
37
37
|
rules:
|
|
38
38
|
- name: Confirmation dialogs should be direct
|
|
39
39
|
description: Keep confirmation copy terse and unambiguous
|
|
40
|
-
styleguide: Acme Inc.
|
|
41
40
|
section: Voice & Tone
|
|
42
41
|
- surface: actionText
|
|
43
42
|
name: Calls to action should use active voice
|
|
@@ -45,20 +44,17 @@ rules:
|
|
|
45
44
|
examples:
|
|
46
45
|
- from: "Your settings"
|
|
47
46
|
to: "Open settings"
|
|
48
|
-
styleguide: Acme Inc.
|
|
49
47
|
section: Voice & Tone
|
|
50
48
|
- term: sign up
|
|
51
49
|
disallowed:
|
|
52
50
|
- signup
|
|
53
51
|
- sign-up
|
|
54
52
|
description: Always use as two words (verb form)
|
|
55
|
-
styleguide: Acme Inc.
|
|
56
53
|
section: Terminology
|
|
57
54
|
locales:
|
|
58
55
|
de-DE:
|
|
59
56
|
- name: Use informal address
|
|
60
57
|
description: Use "Du" instead of "Sie" for all user-facing copy
|
|
61
|
-
styleguide: German
|
|
62
58
|
section: Formality
|
|
63
59
|
---
|
|
64
60
|
```
|
|
@@ -75,13 +71,11 @@ tags: [body, button, call-to-action, dialog-title, heading, nav]
|
|
|
75
71
|
rules:
|
|
76
72
|
- name: Write in active voice
|
|
77
73
|
description: Lead with verbs, avoid passive constructions
|
|
78
|
-
styleguide: Acme Inc.
|
|
79
74
|
section: Voice & Tone
|
|
80
75
|
locales:
|
|
81
76
|
de-DE:
|
|
82
77
|
- name: Use informal address
|
|
83
78
|
description: Use "Du" instead of "Sie" for all user-facing copy
|
|
84
|
-
styleguide: German
|
|
85
79
|
section: Formality
|
|
86
80
|
---
|
|
87
81
|
```
|
|
@@ -181,7 +175,7 @@ When writing or editing user-facing text for a component:
|
|
|
181
175
|
5. Rules come in two shapes:
|
|
182
176
|
- **Style rules** have `name`, `description`, and optional `examples` (before/after pairs). Use `examples` as concrete tone/shape guidance.
|
|
183
177
|
- **Terminology entries** have `term` and `disallowed`. Always use the `term` form; never use any of the `disallowed` alternatives.
|
|
184
|
-
6. Each rule carries
|
|
178
|
+
6. Each rule carries a `section` field (e.g. "Voice & Tone", "Terminology") providing context for how to interpret it.
|
|
185
179
|
7. If a `locales` key is present, it contains locale-scoped rules keyed by locale code (e.g. `de-DE`). When writing copy for a specific locale, follow the matching `locales.<code>` rules **in addition to** the base `rules`. When writing for the default/base locale, only follow `rules`. Locale-scoped rules never conflict — each locale is a separate boundary.
|
|
186
180
|
|
|
187
181
|
### Creating specs
|
package/dist/commands/init.js
CHANGED
|
@@ -43,7 +43,7 @@ When writing or editing text props for a component:
|
|
|
43
43
|
3. Respect ${c("maxLength")} — it's a layout constraint, not a suggestion.
|
|
44
44
|
4. Follow all rules in the ${c("rules")} key. Rules without a ${c("surface")} field apply to every surface; rules with ${c("surface")} apply only to that surface.
|
|
45
45
|
5. Rules come in two shapes: style rules (${c("name")}, ${c("description")}, ${c("examples")}) and terminology entries (${c("term")}, ${c("disallowed")}). For terminology entries, always use the ${c("term")} form and never use the ${c("disallowed")} alternatives.
|
|
46
|
-
6. Each rule carries ${c("
|
|
46
|
+
6. Each rule carries a ${c("section")} field (e.g. "Voice & Tone", "Terminology") providing context for how to interpret it.
|
|
47
47
|
7. If a ${c("locales")} key is present, it contains locale-scoped rules keyed by locale code. When writing copy for a specific locale, follow the matching locale's rules in addition to the base ${c("rules")}. When writing for the default locale, only follow ${c("rules")}.
|
|
48
48
|
|
|
49
49
|
${h3} Creating specs
|
package/dist/commands/pull.js
CHANGED