@hegemonart/get-design-done 1.40.0 → 1.40.5
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +30 -0
- package/README.md +4 -0
- package/SKILL.md +1 -0
- package/agents/README.md +1 -0
- package/package.json +1 -1
- package/reference/cli-localization.md +61 -0
- package/reference/config-schema.md +8 -0
- package/reference/registry.json +7 -0
- package/reference/schemas/config.schema.json +5 -0
- package/reference/schemas/generated.d.ts +4 -0
- package/scripts/lib/i18n/index.cjs +95 -0
- package/scripts/lib/i18n/messages/de.json +7 -0
- package/scripts/lib/i18n/messages/en.json +27 -0
- package/scripts/lib/i18n/messages/fr.json +7 -0
- package/scripts/lib/i18n/messages/ja.json +7 -0
- package/scripts/lib/i18n/messages/ru.json +27 -0
- package/scripts/lib/i18n/messages/uk.json +7 -0
- package/scripts/lib/i18n/messages/zh.json +7 -0
- package/skills/locale/SKILL.md +51 -0
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "Get Design Done — 5-stage agent-orchestrated design pipeline with 9 connections, handoff-first workflow, bidirectional Figma write-back, 22+ specialized agents, queryable knowledge layer (intel store, dependency analysis, learnings extraction), and a self-improvement loop (reflector, frontmatter + budget feedback, global-skills layer). v1.20.0 ships the SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream, and resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) for rate-limit + 429 + context-overflow recovery. Full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation (auto-tag + GitHub Release + release-time smoke test).",
|
|
8
|
-
"version": "1.40.
|
|
8
|
+
"version": "1.40.5"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "get-design-done",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), Claude Design handoff, bidirectional Figma write-back, and a queryable intel store (.design/intel/) for dependency and learnings queries. Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation. Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain.",
|
|
15
|
-
"version": "1.40.
|
|
15
|
+
"version": "1.40.5",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "hegemonart"
|
|
18
18
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-design-done",
|
|
3
3
|
"short_name": "gdd",
|
|
4
|
-
"version": "1.40.
|
|
4
|
+
"version": "1.40.5",
|
|
5
5
|
"description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), handoff-first workflow via Claude Design bundles, bidirectional Figma write-back (annotations, Code Connect), queryable intel store (`.design/intel/`) for O(1) design surface lookups, and self-improvement loop (reflector agent, frontmatter + budget feedback, global-skills layer at `~/.claude/gdd/global-skills/`). Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings, reflect, apply-reflections. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows, lint + schema + frontmatter + stale-ref + shellcheck + gitleaks + injection-scan + blocking size-budget) and release automation (auto-tag + GitHub Release + release-time smoke test). Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain. v1.27.7 ships gdd-mcp (Phase 27.7): 12 read-only MCP tools for sub-3s priming. v1.28.0 (Phase 28): Foundational References Tier 2 — 5 new reference files (color-theory, composition, proportion-systems, i18n, contrast-advanced), 2 verifier i18n probes + 1 explore i18n-readiness probe, 12 additive cross-link insertions across 10 existing references, 2 orthogonal audit-scoring lens-tags (composition_alignment + i18n_readiness).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "hegemonart",
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,36 @@ All notable changes to get-design-done are documented here. Versions follow [sem
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.40.5] - 2026-06-01
|
|
8
|
+
|
|
9
|
+
### Phase 40.5 — GDD CLI Localization
|
|
10
|
+
|
|
11
|
+
GDD's README is multilingual, but the CLI talked English. 40.5 adds locale resolution + per-locale
|
|
12
|
+
message tables for the highest-traffic surface — `--help`, common error messages, and skill prompt
|
|
13
|
+
headers. English is always the final fallback, so a partial locale never breaks the CLI. **No new
|
|
14
|
+
runtime dependency, no new egress.**
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **`scripts/lib/i18n/index.cjs`** — locale resolver: `resolveLocale` (`config.locale` > env `LANG`/`LC_ALL` > `en`), `fallbackChain` (`locale → base → en`), `translate` (chain walk; a missing key returns the key, never throws), `descriptionFor` (`description_i18n` || English). Pure functions + a thin `loadTable` reader.
|
|
19
|
+
- **`scripts/lib/i18n/messages/{en,ru,uk,de,fr,zh,ja}.json`** — flat message tables. `en` is the complete source (24 keys: `help.*`/`error.*`/`prompt.*`/`status.*`), `ru` a full translation, `uk`/`de`/`fr`/`zh`/`ja` placeholders (a `_meta` marker + a starter subset) that fall back to English.
|
|
20
|
+
- **`skills/locale/SKILL.md`** (`/gdd:locale [<code>]`) — inspect the resolved locale + per-locale coverage, or set `.design/config.json#locale`.
|
|
21
|
+
- **`reference/cli-localization.md`** — the resolver contract + the add-a-locale contribution path (translate the table, add a `NOTICE` translator credit, open a PR; warn-only completeness). Registered. Distinct from `reference/i18n.md` (which covers *user-design* i18n).
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **`reference/schemas/config.schema.json`** — + `locale` (enum en/ru/uk/de/fr/zh/ja); `generated.d.ts` regenerated.
|
|
26
|
+
- **`agents/README.md`** — document the opt-in `description_i18n` frontmatter field (falls back to the English `description`; backward-compatible — the 28.5 contract validates it only when present).
|
|
27
|
+
|
|
28
|
+
### Notes
|
|
29
|
+
|
|
30
|
+
- **No new runtime dependency, no new egress.** Pure resolver + JSON tables + docs.
|
|
31
|
+
- The completeness gate is **warn-only** — only `en` + `ru` are full; the five placeholder locales rely on the English fallback and are never required to be 100%.
|
|
32
|
+
- 6-manifest lockstep at **v1.40.5** + `OFF_CADENCE_VERSIONS.add('1.40.5')` + the 34 live-pinned `manifests-version.txt` baselines forward-propagated 1.40.0 → 1.40.5.
|
|
33
|
+
- Inventory relock: registry-diff 159 → 160 (+`cli-localization`), skill-list 82 → 83 (+`locale`), skill-length-distribution relocked, tarball golden 721 → 731 (+10). No agent/event deltas. Root `SKILL.md` command table += `locale`.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
7
37
|
## [1.40.0] - 2026-06-01
|
|
8
38
|
|
|
9
39
|
### Phase 40 — Team Collaboration Mode
|
package/README.md
CHANGED
|
@@ -194,6 +194,10 @@ GDD migrates *your* design systems (above) — now it migrates **itself**. When
|
|
|
194
194
|
|
|
195
195
|
GDD's single-operator baseline now extends to **teams** — git-native + advisory, no server. Two developers working a cycle on parallel branches merge their `.design/STATE.md` **per section** ([`section-merge`](scripts/lib/collab/section-merge.cjs) unions decisions by `D-id`; a real conflict is only a same-id divergence, which [`conflict-resolver`](agents/conflict-resolver.md) reconciles with human confirmation — never auto-picking or dropping a decision). Decisions carry optional `[author= co-author=]` attribution, move through an async review queue (`proposed → reviewing → approved → locked`) with **hard locks** (the only escape is an audited [`/gdd:unlock-decision`](skills/unlock-decision/SKILL.md)), and [`/gdd:review-decisions`](skills/review-decisions/SKILL.md) surfaces what's pending. [`decision-journal-exporter`](agents/decision-journal-exporter.md) publishes a **pseudonymized, read-only** Notion/Confluence journal for stakeholders who don't run GDD. `gdd_cycle_mode` (designer/dev/full) partitions a cycle by role, a `permissions` model gates per-section writes, and `collab.multi_writer_enabled` switches the advisory lock to a team-mode backoff. The full contract: [`reference/multi-author-model.md`](reference/multi-author-model.md). **Everything is off by default** — a single-operator project is unaffected. **No new runtime dependency.**
|
|
196
196
|
|
|
197
|
+
### CLI localization (v1.40.5)
|
|
198
|
+
|
|
199
|
+
GDD's README is multilingual — now its **CLI** is too. [`/gdd:locale <code>`](skills/locale/SKILL.md) sets the language of `--help`, common error messages, and skill prompt headers, resolved by [`scripts/lib/i18n`](scripts/lib/i18n/index.cjs) (precedence: `config.locale` > env `LANG` > `en`; fallback chain `locale → base → en`). Flat-JSON message tables ship for **en** (complete source), **ru** (full), and **uk/de/fr/zh/ja** placeholders — a missing key always falls back to English, so a partial locale never breaks the CLI. Skills + agents can carry an opt-in `description_i18n` map. Adding a locale is a PR: translate the table, add a `NOTICE` credit (the contribution path is in [`reference/cli-localization.md`](reference/cli-localization.md)). Completeness is **warn-only**. **No new runtime dependency.**
|
|
200
|
+
|
|
197
201
|
### Previous releases
|
|
198
202
|
|
|
199
203
|
- **v1.26.0** — Headless Model Resolver (per-runtime tier→model map, `resolved_models` router field, per-runtime price tables, `reasoning-class` runtime-neutral alias).
|
package/SKILL.md
CHANGED
|
@@ -107,6 +107,7 @@ Each stage produces artifacts in `.design/` inside the current project.
|
|
|
107
107
|
| `migrate [--yes] [--dry-run]` | `get-design-done:gdd-migrate` | Phase 39.5 — migrate a project off GDD's own deprecated paths after an upgrade; reads `reference/DEPRECATIONS.md` via `deprecation-registry.cjs`, previews a diff, applies on confirm. Preview-first; never edits silently |
|
|
108
108
|
| `review-decisions [<id>] [--pending]` | `get-design-done:gdd-review-decisions` | Phase 40 — surface the async decision-review queue (`proposed → reviewing → approved → locked`); `--pending` shows decisions still awaiting action. Read-only |
|
|
109
109
|
| `unlock-decision <id> --approver <who> [--reason <text>] [--dry-run]` | `get-design-done:gdd-unlock-decision` | Phase 40 — reopen a LOCKED decision (the only escape hatch); requires an approver + writes an audit entry; previews before writing |
|
|
110
|
+
| `locale [<code>]` | `get-design-done:gdd-locale` | Phase 40.5 — inspect or set the GDD CLI locale (en/ru/uk/de/fr/zh/ja) for `--help`, errors, and skill prompt headers; missing keys fall back to English. No arg reports the resolved locale + coverage |
|
|
110
111
|
|
|
111
112
|
## Handoff Routing
|
|
112
113
|
|
package/agents/README.md
CHANGED
|
@@ -39,6 +39,7 @@ Every agent file begins with a YAML frontmatter block. All fields except `model`
|
|
|
39
39
|
|-------|------|-----------------|---------|
|
|
40
40
|
| `name` | kebab-case string | unique within plugin | Identifier passed to the `Task` tool — must match the filename without `.md` |
|
|
41
41
|
| `description` | string | free-form | One sentence: what the agent does + when it is spawned |
|
|
42
|
+
| `description_i18n` | object | `{ <locale>: "<description>" }` | **Phase 40.5, opt-in.** Localized descriptions keyed by locale (en/ru/uk/de/fr/zh/ja). `scripts/lib/i18n/index.cjs` `descriptionFor(frontmatter, locale)` resolves it via the fallback chain and falls back to the English `description` when a locale is absent. Backward-compatible — omit it and nothing changes. |
|
|
42
43
|
| `tools` | comma-separated list | `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`, `Task`, `WebFetch`, `TodoWrite`, `mcp__*` | Claude tools the agent may use — list only what is needed |
|
|
43
44
|
| `color` | enum | `yellow`, `green`, `blue`, `red` | Terminal display color for the agent's output |
|
|
44
45
|
| `model` | enum (optional) | `inherit`, `sonnet`, `haiku` | Omit to use the project's configured profile default. Use `inherit` to bypass the profile and use the highest available model (quality-tier work) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hegemonart/get-design-done",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.5",
|
|
4
4
|
"description": "A design-quality pipeline for AI coding agents: brief, plan, implement, and verify UI work against your design system.",
|
|
5
5
|
"author": "Hegemon",
|
|
6
6
|
"homepage": "https://github.com/hegemonart/get-design-done",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# CLI Localization — GDD's Own Surface
|
|
2
|
+
|
|
3
|
+
Phase 40.5 contract. `reference/i18n.md` covers internationalizing *user designs*; this file covers
|
|
4
|
+
**GDD's own CLI** — `--help`, the common error messages, and skill prompt headers. The goal is the
|
|
5
|
+
lowest-effort, highest-impact subset; full skill-body translation is deferred (per-locale demand).
|
|
6
|
+
|
|
7
|
+
## Resolution
|
|
8
|
+
|
|
9
|
+
`scripts/lib/i18n/index.cjs` resolves the active locale with this precedence:
|
|
10
|
+
|
|
11
|
+
1. **`.design/config.json#locale`** — an explicit per-project override (set via `/gdd:locale <code>`).
|
|
12
|
+
2. **`process.env`** — `LC_ALL` / `LC_MESSAGES` / `LANG` / `LANGUAGE` (normalized: `ru_RU.UTF-8` → `ru`).
|
|
13
|
+
3. **`en`** — the default.
|
|
14
|
+
|
|
15
|
+
A `C` / `POSIX` env locale resolves to `en`. The resolved code then drives a **fallback chain**
|
|
16
|
+
`locale → base → en` (e.g. `de-DE → de → en`), so a regional locale degrades to its base and finally
|
|
17
|
+
to English — the complete source table.
|
|
18
|
+
|
|
19
|
+
## Message tables
|
|
20
|
+
|
|
21
|
+
Flat-JSON tables live at `scripts/lib/i18n/messages/<locale>.json` (chosen over ICU MessageFormat for
|
|
22
|
+
simplicity). Each is `{ "_meta": { locale, coverage, fallback }, "<key>": "<string>", ... }`. Keys are
|
|
23
|
+
namespaced: `help.*` (usage + section headers), `error.*` (the common CLI errors), `prompt.*` (skill
|
|
24
|
+
prompt headers), `status.*`.
|
|
25
|
+
|
|
26
|
+
- **`en.json`** — the **complete source of truth**; every key lives here.
|
|
27
|
+
- **`ru.json`** — a complete second-locale translation (covers every `en` key).
|
|
28
|
+
- **`uk.json` / `de.json` / `fr.json` / `zh.json` / `ja.json`** — **placeholders**: a `_meta` marker
|
|
29
|
+
(`coverage: "placeholder"`) plus a starter subset. Any missing key falls back to `en` per the chain.
|
|
30
|
+
|
|
31
|
+
`translate(tables, key, locale)` walks the chain and returns the first hit, or the key itself if no
|
|
32
|
+
table has it (a missing key is always visible, never a crash).
|
|
33
|
+
|
|
34
|
+
## Frontmatter `description_i18n`
|
|
35
|
+
|
|
36
|
+
Skills and agents may carry an **opt-in** `description_i18n: { <locale>: "<description>" }` map.
|
|
37
|
+
`descriptionFor(frontmatter, locale)` returns the localized description via the fallback chain, or the
|
|
38
|
+
plain English `description` when the locale is absent. The field is fully backward-compatible — a
|
|
39
|
+
skill/agent without it is unaffected, and the Phase 28.5 contract only validates it (as an object of
|
|
40
|
+
locale→string) when present.
|
|
41
|
+
|
|
42
|
+
## Completeness policy
|
|
43
|
+
|
|
44
|
+
The completeness gate is **warn-only**. Only `en` (source) and `ru` (full) are expected to be 100%; the
|
|
45
|
+
five placeholder locales are intentionally partial and rely on the English fallback. A locale is never
|
|
46
|
+
required to be complete to ship — partial is better than English-only, and fallback guarantees no key
|
|
47
|
+
is ever missing at runtime.
|
|
48
|
+
|
|
49
|
+
## Adding or completing a locale (contribution path)
|
|
50
|
+
|
|
51
|
+
1. Edit `scripts/lib/i18n/messages/<locale>.json` — add the keys you can translate (any `en` key is
|
|
52
|
+
fair game; you do not need 100%).
|
|
53
|
+
2. Set `_meta.coverage` to `"complete"` once every `en` key is present, else leave `"placeholder"`.
|
|
54
|
+
3. Add a translator-credit line to `NOTICE` under the attributions section (name/handle + locale).
|
|
55
|
+
4. Open a PR. The warn-only gate reports coverage; it does not block on partial locales.
|
|
56
|
+
|
|
57
|
+
## Boundaries
|
|
58
|
+
|
|
59
|
+
`--help` + common errors + skill prompt headers only — not full skill bodies (deferred per demand),
|
|
60
|
+
not RTL terminal rendering (a terminal concern), not voice/conversational localization. English is
|
|
61
|
+
always the final fallback, so the CLI is never broken by a partial translation.
|
|
@@ -395,3 +395,11 @@ single-operator projects are unaffected. Full contract: `reference/multi-author-
|
|
|
395
395
|
team-mode policy (`scripts/lib/collab/lock-policy.cjs` — 30 s wait + 100 ms backoff);
|
|
396
396
|
`sync_backend` selects the cross-machine `.design/` backend (`scripts/lib/collab/sync-backend.cjs`,
|
|
397
397
|
default `git`; `s3`/`git-lfs` are opt-in declarations — a live client is not bundled this phase).
|
|
398
|
+
|
|
399
|
+
## CLI localization (Phase 40.5)
|
|
400
|
+
|
|
401
|
+
- **`locale`** (`en`|`ru`|`uk`|`de`|`fr`|`zh`|`ja`) — overrides the language of GDD's own `--help`,
|
|
402
|
+
common error messages, and skill prompt headers. Set via `/gdd:locale <code>`. Precedence: this key >
|
|
403
|
+
env `LANG`/`LC_ALL` > `en`. Missing message keys fall back to English (`scripts/lib/i18n/index.cjs`,
|
|
404
|
+
chain `locale → base → en`); `en` + `ru` are complete, the other five are placeholders. Full
|
|
405
|
+
contract: `reference/cli-localization.md`.
|
package/reference/registry.json
CHANGED
|
@@ -1035,6 +1035,13 @@
|
|
|
1035
1035
|
"type": "meta-rules",
|
|
1036
1036
|
"phase": 40,
|
|
1037
1037
|
"description": "Phase 40 team-collaboration contract: multi-writer STATE.md via a git-merge-driver with per-section semantic merge (scripts/lib/collab/section-merge.cjs — union by D-id, conflict only on same-id divergence); decision attribution line-suffix [author= co-author=] (attribution.cjs); the async review queue proposed->reviewing->approved->locked with hard locks + audited /gdd:unlock-decision (review-queue.cjs); the multi-writer advisory-lock policy (lock-policy.cjs, 30s/100ms backoff in team mode); sectional handoff gdd_cycle_mode designer|dev|full (cycle-mode.cjs); the permission model (permissions.cjs) + CI gate; decision-journal-exporter (pseudonymized, write-only Notion) + pr-commenter D-XX threading; opt-in cross-machine sync (sync-backend.cjs, defaults to git). Agents conflict-resolver + decision-journal-exporter; skills /gdd:review-decisions + /gdd:unlock-decision."
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"name": "cli-localization",
|
|
1041
|
+
"path": "reference/cli-localization.md",
|
|
1042
|
+
"type": "meta-rules",
|
|
1043
|
+
"phase": 40.5,
|
|
1044
|
+
"description": "Phase 40.5 CLI-localization contract: locale resolution (config.locale > env LANG > en) + fallback chain locale->base->en + flat-JSON message tables via scripts/lib/i18n/index.cjs; tables at scripts/lib/i18n/messages/{en,ru,uk,de,fr,zh,ja}.json (en source-complete, ru full, 5 placeholders with en fallback); the opt-in description_i18n frontmatter (descriptionFor falls back to English); /gdd:locale skill; warn-only completeness; the add-a-locale contribution path (translate table + NOTICE credit + PR). Distinct from reference/i18n.md (which covers USER-design i18n)."
|
|
1038
1045
|
}
|
|
1039
1046
|
]
|
|
1040
1047
|
}
|
|
@@ -41,6 +41,11 @@
|
|
|
41
41
|
"type": "string",
|
|
42
42
|
"description": "Latest plugin tag (e.g. \"v1.0.7.3\") whose update nudge the user has dismissed. Set by /gdd:check-update --dismiss and by hooks/update-check.sh on the --dismiss code path. When a newer tag ships, the nudge reappears."
|
|
43
43
|
},
|
|
44
|
+
"locale": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": ["en", "ru", "uk", "de", "fr", "zh", "ja"],
|
|
47
|
+
"description": "Phase 40.5 CLI locale override for GDD's own --help, error messages, and skill prompt headers. Set via /gdd:locale <code>. Precedence: this key > env LANG/LC_ALL > en. Missing message keys fall back to English per scripts/lib/i18n/index.cjs (locale -> base -> en). en + ru are complete; uk/de/fr/zh/ja are placeholders that fall back to English."
|
|
48
|
+
},
|
|
44
49
|
"gdd_cycle_mode": {
|
|
45
50
|
"type": "string",
|
|
46
51
|
"enum": ["designer", "dev", "full"],
|
|
@@ -101,6 +101,10 @@ export interface DesignConfigJson {
|
|
|
101
101
|
* Latest plugin tag (e.g. "v1.0.7.3") whose update nudge the user has dismissed. Set by /gdd:check-update --dismiss and by hooks/update-check.sh on the --dismiss code path. When a newer tag ships, the nudge reappears.
|
|
102
102
|
*/
|
|
103
103
|
update_dismissed?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Phase 40.5 CLI locale override for GDD's own --help, error messages, and skill prompt headers. Set via /gdd:locale <code>. Precedence: this key > env LANG/LC_ALL > en. Missing message keys fall back to English per scripts/lib/i18n/index.cjs (locale -> base -> en). en + ru are complete; uk/de/fr/zh/ja are placeholders that fall back to English.
|
|
106
|
+
*/
|
|
107
|
+
locale?: 'en' | 'ru' | 'uk' | 'de' | 'fr' | 'zh' | 'ja';
|
|
104
108
|
/**
|
|
105
109
|
* Phase 40 sectional handoff. designer = Brief + Explore only; dev = Plan + Design + Verify; full = all stages (default). scripts/lib/collab/cycle-mode.cjs gates STATE writes by stage so a designer and a dev can hand a cycle back and forth without overwriting each other's sections.
|
|
106
110
|
*/
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// Phase 40.5 — i18n/index.cjs — GDD CLI localization resolver.
|
|
3
|
+
//
|
|
4
|
+
// Resolves a locale (config override > env LANG > English), a fallback chain (locale → base → en),
|
|
5
|
+
// and translates a message key against per-locale flat-JSON tables. The pure functions (baseLocale,
|
|
6
|
+
// fallbackChain, resolveLocale, translate, descriptionFor) take their data as arguments and touch
|
|
7
|
+
// neither fs nor env directly — so they are trivially unit-testable. `loadTable` is the only fs reader.
|
|
8
|
+
//
|
|
9
|
+
// Contract: reference/cli-localization.md. Fallback is always to `en` (the complete source table).
|
|
10
|
+
|
|
11
|
+
const fs = require('node:fs');
|
|
12
|
+
const path = require('node:path');
|
|
13
|
+
|
|
14
|
+
const KNOWN_LOCALES = Object.freeze(['en', 'ru', 'uk', 'de', 'fr', 'zh', 'ja']);
|
|
15
|
+
const DEFAULT_LOCALE = 'en';
|
|
16
|
+
const MESSAGES_DIR = path.join(__dirname, 'messages');
|
|
17
|
+
|
|
18
|
+
/** Normalize a raw locale token: lowercase, `_`→`-`, strip an encoding suffix (`ru_RU.UTF-8` → `ru-ru`). */
|
|
19
|
+
function normalizeLocale(code) {
|
|
20
|
+
if (!code) return '';
|
|
21
|
+
return String(code).split('.')[0].split(':')[0].trim().toLowerCase().replace(/_/g, '-');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** The base of a locale (`de-de` → `de`; `en` → `en`). */
|
|
25
|
+
function baseLocale(code) {
|
|
26
|
+
return normalizeLocale(code).split('-')[0];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Resolution chain: [normalized, base, 'en'] with duplicates removed. */
|
|
30
|
+
function fallbackChain(code) {
|
|
31
|
+
const norm = normalizeLocale(code);
|
|
32
|
+
const chain = [];
|
|
33
|
+
for (const c of [norm, baseLocale(norm), DEFAULT_LOCALE]) {
|
|
34
|
+
if (c && !chain.includes(c)) chain.push(c);
|
|
35
|
+
}
|
|
36
|
+
return chain.length ? chain : [DEFAULT_LOCALE];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Resolve the active locale. Precedence: explicit config.locale > env.LANG/LC_ALL > 'en'.
|
|
41
|
+
* @param {{env?: object, configLocale?: string}} [opts]
|
|
42
|
+
*/
|
|
43
|
+
function resolveLocale(opts) {
|
|
44
|
+
const o = opts || {};
|
|
45
|
+
const fromConfig = normalizeLocale(o.configLocale);
|
|
46
|
+
if (fromConfig) return fromConfig;
|
|
47
|
+
const env = o.env || {};
|
|
48
|
+
const fromEnv = normalizeLocale(env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE);
|
|
49
|
+
if (fromEnv && fromEnv !== 'c' && fromEnv !== 'posix') return fromEnv;
|
|
50
|
+
return DEFAULT_LOCALE;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Translate `key` for `locale` against the supplied `tables` map ({ <locale>: {<key>: <string>} }).
|
|
55
|
+
* Walks the fallback chain; returns the first hit, else the key itself (so a missing key is visible,
|
|
56
|
+
* never throws).
|
|
57
|
+
*/
|
|
58
|
+
function translate(tables, key, locale) {
|
|
59
|
+
const map = tables || {};
|
|
60
|
+
for (const loc of fallbackChain(locale)) {
|
|
61
|
+
const t = map[loc];
|
|
62
|
+
if (t && Object.prototype.hasOwnProperty.call(t, key) && typeof t[key] === 'string') return t[key];
|
|
63
|
+
}
|
|
64
|
+
return key;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Resolve a skill/agent description for `locale`: frontmatter.description_i18n[<chain>] || .description.
|
|
69
|
+
* Opt-in + backward-compatible — absent description_i18n falls straight back to the English description.
|
|
70
|
+
*/
|
|
71
|
+
function descriptionFor(frontmatter, locale) {
|
|
72
|
+
const fm = frontmatter || {};
|
|
73
|
+
const i18n = fm.description_i18n;
|
|
74
|
+
if (i18n && typeof i18n === 'object') {
|
|
75
|
+
for (const loc of fallbackChain(locale)) {
|
|
76
|
+
if (typeof i18n[loc] === 'string' && i18n[loc].trim()) return i18n[loc];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return fm.description || '';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** Read a locale's flat-JSON table from disk. Returns {} on missing/parse error (fail-safe → fallback). */
|
|
83
|
+
function loadTable(locale, dir) {
|
|
84
|
+
const file = path.join(dir || MESSAGES_DIR, `${normalizeLocale(locale) || DEFAULT_LOCALE}.json`);
|
|
85
|
+
try {
|
|
86
|
+
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
87
|
+
} catch {
|
|
88
|
+
return {};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
module.exports = {
|
|
93
|
+
KNOWN_LOCALES, DEFAULT_LOCALE, MESSAGES_DIR,
|
|
94
|
+
normalizeLocale, baseLocale, fallbackChain, resolveLocale, translate, descriptionFor, loadTable,
|
|
95
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": { "locale": "en", "coverage": "complete", "fallback": null },
|
|
3
|
+
"help.usage": "Usage: gdd <command> [options]",
|
|
4
|
+
"help.tagline": "A design-quality pipeline for AI coding agents.",
|
|
5
|
+
"help.commands_header": "Commands",
|
|
6
|
+
"help.options_header": "Options",
|
|
7
|
+
"help.more": "Run `gdd help <command>` for details on a command.",
|
|
8
|
+
"help.pipeline": "Pipeline: brief -> explore -> plan -> design -> verify",
|
|
9
|
+
"error.no_state": "No .design/STATE.md found. Run /gdd:start to initialize a cycle.",
|
|
10
|
+
"error.no_config": "No .design/config.json found; using defaults.",
|
|
11
|
+
"error.stage_locked": "This stage is locked under the current cycle mode.",
|
|
12
|
+
"error.permission_denied": "Permission denied: your role cannot perform this action on this section.",
|
|
13
|
+
"error.budget_cap": "Budget cap reached. Raise the cap in .design/budget.json or wait for the next task.",
|
|
14
|
+
"error.connection_unavailable": "Connection unavailable. Configure it via /gdd:connections.",
|
|
15
|
+
"error.invalid_locale": "Unknown locale. Known locales: en, ru, uk, de, fr, zh, ja.",
|
|
16
|
+
"error.merge_conflict": "STATE.md has a merge conflict. Run the conflict-resolver to reconcile per section.",
|
|
17
|
+
"error.decision_locked": "This decision is locked. Use /gdd:unlock-decision <id> --approver <who> to reopen it.",
|
|
18
|
+
"error.no_telemetry": "No cost telemetry yet. Run a cycle first.",
|
|
19
|
+
"prompt.brief_header": "Stage 1 of 5 - Brief: capture the problem, audience, constraints, and metrics.",
|
|
20
|
+
"prompt.explore_header": "Stage 2 of 5 - Explore: inventory the design surface and interview for intent.",
|
|
21
|
+
"prompt.plan_header": "Stage 3 of 5 - Plan: decompose the work into tasks.",
|
|
22
|
+
"prompt.design_header": "Stage 4 of 5 - Design: execute the plan.",
|
|
23
|
+
"prompt.verify_header": "Stage 5 of 5 - Verify: score and audit against the design system.",
|
|
24
|
+
"status.complete": "Complete.",
|
|
25
|
+
"status.in_progress": "In progress.",
|
|
26
|
+
"status.blocked": "Blocked."
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": { "locale": "fr", "coverage": "placeholder", "fallback": "en" },
|
|
3
|
+
"help.tagline": "Un pipeline de qualité de conception pour les agents de codage IA.",
|
|
4
|
+
"status.complete": "Terminé.",
|
|
5
|
+
"status.in_progress": "En cours.",
|
|
6
|
+
"status.blocked": "Bloqué."
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": { "locale": "ru", "coverage": "complete", "fallback": "en" },
|
|
3
|
+
"help.usage": "Использование: gdd <команда> [параметры]",
|
|
4
|
+
"help.tagline": "Конвейер качества дизайна для ИИ-агентов программирования.",
|
|
5
|
+
"help.commands_header": "Команды",
|
|
6
|
+
"help.options_header": "Параметры",
|
|
7
|
+
"help.more": "Выполните `gdd help <команда>` для подробностей о команде.",
|
|
8
|
+
"help.pipeline": "Конвейер: brief -> explore -> plan -> design -> verify",
|
|
9
|
+
"error.no_state": "Файл .design/STATE.md не найден. Выполните /gdd:start, чтобы инициализировать цикл.",
|
|
10
|
+
"error.no_config": "Файл .design/config.json не найден; используются значения по умолчанию.",
|
|
11
|
+
"error.stage_locked": "Этот этап заблокирован в текущем режиме цикла.",
|
|
12
|
+
"error.permission_denied": "Доступ запрещён: ваша роль не может выполнить это действие в этом разделе.",
|
|
13
|
+
"error.budget_cap": "Достигнут лимит бюджета. Увеличьте лимит в .design/budget.json или дождитесь следующей задачи.",
|
|
14
|
+
"error.connection_unavailable": "Подключение недоступно. Настройте его через /gdd:connections.",
|
|
15
|
+
"error.invalid_locale": "Неизвестная локаль. Доступные локали: en, ru, uk, de, fr, zh, ja.",
|
|
16
|
+
"error.merge_conflict": "В STATE.md конфликт слияния. Запустите conflict-resolver для согласования по разделам.",
|
|
17
|
+
"error.decision_locked": "Это решение заблокировано. Используйте /gdd:unlock-decision <id> --approver <кто>, чтобы открыть его повторно.",
|
|
18
|
+
"error.no_telemetry": "Телеметрия затрат пока отсутствует. Сначала выполните цикл.",
|
|
19
|
+
"prompt.brief_header": "Этап 1 из 5 - Brief: зафиксируйте задачу, аудиторию, ограничения и метрики.",
|
|
20
|
+
"prompt.explore_header": "Этап 2 из 5 - Explore: исследуйте поверхность дизайна и уточните намерение.",
|
|
21
|
+
"prompt.plan_header": "Этап 3 из 5 - Plan: разбейте работу на задачи.",
|
|
22
|
+
"prompt.design_header": "Этап 4 из 5 - Design: выполните план.",
|
|
23
|
+
"prompt.verify_header": "Этап 5 из 5 - Verify: оцените и проверьте по дизайн-системе.",
|
|
24
|
+
"status.complete": "Готово.",
|
|
25
|
+
"status.in_progress": "В процессе.",
|
|
26
|
+
"status.blocked": "Заблокировано."
|
|
27
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-locale
|
|
3
|
+
description: "Inspects or sets the GDD CLI locale for this project. With no argument, reports the resolved locale (config.locale > env LANG > en), the fallback chain, and per-locale coverage (which message tables are complete vs placeholder). With a <code> (en/ru/uk/de/fr/zh/ja), sets .design/config.json#locale after previewing the change. Localizes --help, common error messages, and skill prompt headers via scripts/lib/i18n/; missing keys fall back to English, so a partial locale never breaks the CLI. Use to switch GDD's own output language."
|
|
4
|
+
argument-hint: "[<code>]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
tools: Read, Write, Bash, Grep, Glob
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /gdd:locale
|
|
10
|
+
|
|
11
|
+
Closes the English-only CLI gap: GDD's README is multilingual, but `--help`, errors, and skill prompt
|
|
12
|
+
headers spoke English until now. This skill inspects or sets the project's locale. Contract:
|
|
13
|
+
`../../reference/cli-localization.md`.
|
|
14
|
+
|
|
15
|
+
## Invocation
|
|
16
|
+
|
|
17
|
+
| Command | Behavior |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `/gdd:locale` | Report the resolved locale, the fallback chain, and per-locale coverage. |
|
|
20
|
+
| `/gdd:locale <code>` | Set `.design/config.json#locale` to `<code>` (en/ru/uk/de/fr/zh/ja), after preview. |
|
|
21
|
+
|
|
22
|
+
## Steps
|
|
23
|
+
|
|
24
|
+
1. **Resolve current.** Read `.design/config.json#locale` (if any) and the environment, then call the
|
|
25
|
+
resolver to report the active locale + chain:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node -e '
|
|
29
|
+
const i = require("./scripts/lib/i18n/index.cjs");
|
|
30
|
+
let cfg = {}; try { cfg = JSON.parse(require("fs").readFileSync(".design/config.json","utf8")); } catch {}
|
|
31
|
+
const loc = i.resolveLocale({ env: process.env, configLocale: cfg.locale });
|
|
32
|
+
const cov = i.KNOWN_LOCALES.map((l) => `${l}:${(i.loadTable(l)._meta||{}).coverage||"?"}`).join(" ");
|
|
33
|
+
console.log(JSON.stringify({ resolved: loc, chain: i.fallbackChain(loc), coverage: cov }));
|
|
34
|
+
'
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2. **No argument** → print the resolved locale, the fallback chain, and the coverage line (which
|
|
38
|
+
tables are `complete` vs `placeholder`). Stop.
|
|
39
|
+
3. **`<code>` argument** → validate it is in `KNOWN_LOCALES` (en/ru/uk/de/fr/zh/ja). Unknown → print the
|
|
40
|
+
`error.invalid_locale` message + the known list, change nothing.
|
|
41
|
+
4. **Preview + set.** Show `locale: <old> -> <code>`, then write `locale` into `.design/config.json`
|
|
42
|
+
(create the file if absent, preserving any existing keys). Confirm, and note that missing keys in a
|
|
43
|
+
placeholder locale fall back to English.
|
|
44
|
+
|
|
45
|
+
## Output
|
|
46
|
+
|
|
47
|
+
End with:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
## LOCALE COMPLETE
|
|
51
|
+
```
|