sisyo 1.7.0 → 1.8.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 (61) hide show
  1. package/LICENSE +16 -16
  2. package/README.md +167 -166
  3. package/bin/known-hashes.json +6 -1
  4. package/bin/sisyo.js +285 -285
  5. package/package.json +30 -30
  6. package/templates/.claude/rules/agents-and-tests.md +32 -24
  7. package/templates/.claude/rules/docs.md +19 -19
  8. package/templates/.claude/skills/fastapi-best-practices/ASYNC-PATTERNS.md +121 -121
  9. package/templates/.claude/skills/fastapi-best-practices/DATABASE.md +153 -153
  10. package/templates/.claude/skills/fastapi-best-practices/DEPENDENCIES.md +140 -140
  11. package/templates/.claude/skills/fastapi-best-practices/PROJECT-STRUCTURE.md +90 -90
  12. package/templates/.claude/skills/fastapi-best-practices/PYDANTIC-GUIDE.md +155 -155
  13. package/templates/.claude/skills/fastapi-best-practices/SKILL.md +123 -123
  14. package/templates/.claude/skills/g6-style/SKILL.md +125 -125
  15. package/templates/.claude/skills/g6-style/references/checks.md +58 -58
  16. package/templates/.claude/skills/g6-style/references/imagery.md +103 -103
  17. package/templates/.claude/skills/g6-style/references/motion.md +121 -121
  18. package/templates/.claude/skills/g6-style/references/sections.md +263 -263
  19. package/templates/.claude/skills/g6-style/references/tokens.md +197 -197
  20. package/templates/.claude/skills/hindsight/SKILL.md +175 -175
  21. package/templates/.claude/skills/hoang-auth/SKILL.md +188 -0
  22. package/templates/.claude/skills/html-docs/SKILL.md +207 -207
  23. package/templates/.claude/skills/i18n-multilang/SKILL.md +153 -153
  24. package/templates/.claude/skills/i18n-multilang/assets/languages.json +47 -47
  25. package/templates/.claude/skills/i18n-multilang/assets/plural-vectors.json +46 -46
  26. package/templates/.claude/skills/i18n-multilang/assets/project/README.md +17 -17
  27. package/templates/.claude/skills/i18n-multilang/assets/project/gitattributes.txt +6 -6
  28. package/templates/.claude/skills/i18n-multilang/assets/project/gitignore.txt +4 -4
  29. package/templates/.claude/skills/i18n-multilang/assets/project/glossary.json +6 -6
  30. package/templates/.claude/skills/i18n-multilang/assets/project/i18n.config.json +22 -22
  31. package/templates/.claude/skills/i18n-multilang/assets/project/locales/__source__/common.json +10 -10
  32. package/templates/.claude/skills/i18n-multilang/assets/project/notes/common.json +5 -5
  33. package/templates/.claude/skills/i18n-multilang/assets/project/style.md +20 -20
  34. package/templates/.claude/skills/i18n-multilang/references/format.md +100 -100
  35. package/templates/.claude/skills/i18n-multilang/references/languages.md +97 -97
  36. package/templates/.claude/skills/i18n-multilang/references/layout-and-versioning.md +256 -256
  37. package/templates/.claude/skills/i18n-multilang/references/numbers.md +161 -161
  38. package/templates/.claude/skills/i18n-multilang/references/platform-unity.md +142 -142
  39. package/templates/.claude/skills/i18n-multilang/references/platform-web.md +107 -107
  40. package/templates/.claude/skills/i18n-multilang/references/translation.md +143 -143
  41. package/templates/.claude/skills/i18n-multilang/references/voice.md +271 -271
  42. package/templates/.claude/skills/i18n-multilang/scripts/i18n.py +1041 -1041
  43. package/templates/.claude/skills/i18n-multilang/scripts/numwords.py +1013 -1013
  44. package/templates/.claude/skills/i18n-multilang/scripts/voice.py +478 -478
  45. package/templates/.claude/skills/neon-game-ui-ux-skill/COMPONENTS.md +490 -490
  46. package/templates/.claude/skills/neon-game-ui-ux-skill/GAMIFICATION.md +246 -246
  47. package/templates/.claude/skills/neon-game-ui-ux-skill/ICONS.md +249 -249
  48. package/templates/.claude/skills/neon-game-ui-ux-skill/LAYOUT-NAV.md +362 -362
  49. package/templates/.claude/skills/neon-game-ui-ux-skill/MOTION-A11Y.md +168 -168
  50. package/templates/.claude/skills/neon-game-ui-ux-skill/SKILL.md +137 -137
  51. package/templates/.claude/skills/neon-game-ui-ux-skill/TOKENS.md +323 -323
  52. package/templates/.claude/skills/react-page-oriented/SKILL.md +407 -407
  53. package/templates/.claude/skills/react-page-oriented/triggers.md +12 -12
  54. package/templates/.claude/skills/terraform-best-practices/SKILL.md +341 -341
  55. package/templates/.claude/skills/typesafe-jev/SKILL.md +148 -148
  56. package/templates/.claude/skills/vibe-docs/SKILL.md +242 -242
  57. package/templates/SISYO.md +37 -37
  58. package/templates/docs/99_progress/features.md +7 -7
  59. package/templates/docs/99_progress/handoff.md +19 -19
  60. package/templates/docs/99_progress/todo.md +15 -15
  61. package/templates/docs/MAP.md +26 -26
@@ -1,143 +1,143 @@
1
- # Translating with an agent
2
-
3
- The agent is the translator. The tool hands over exactly what needs translating, with context, and refuses answers
4
- that would break the app. Nothing is sent to an outside translation service.
5
-
6
- ## The loop for one language
7
-
8
- ```bash
9
- python <skill>/scripts/i18n.py status # which languages need work
10
- python <skill>/scripts/i18n.py todo --lang ja --limit 150 --out todo.ja.json
11
- # translate: write done.ja.json
12
- python <skill>/scripts/i18n.py apply done.ja.json # validates, writes locales/ja, stamps meta
13
- python <skill>/scripts/i18n.py todo --lang ja … # repeat until "0 of 0"
14
- python <skill>/scripts/i18n.py check --lang ja
15
- ```
16
-
17
- Keep `todo` / `done` files in a scratch folder, not in the repository.
18
-
19
- `todo.<lang>.json` gives, per text: `id` (`ns:key`), `state` (`missing`, `stale`, `incomplete`), `source`,
20
- `reference` (the same text in the reference language, when it is current), `note` (context, `max` length),
21
- `current` (the old translation of a stale text: change only what the new source requires), `forms` (the plural forms
22
- this language needs), `voice: true` (the line is spoken aloud in this language: see "Voice lines" below). At the top:
23
- the language, its plural forms, and the glossary for it.
24
-
25
- The answer file:
26
-
27
- ```json
28
- {
29
- "lang": "ru",
30
- "items": {
31
- "shop:title": "Магазин",
32
- "shop:buy": "Купить за {{price}} монет",
33
- "shop:items": { "one": "{{count}} предмет", "few": "{{count}} предмета", "many": "{{count}} предметов", "other": "{{count}} предмета" }
34
- }
35
- }
36
- ```
37
-
38
- `apply` rejects an item (and says why) when a placeholder is lost or invented, a plural form is missing, a forbidden
39
- word appears, the note's `max` is exceeded, or the key is locked. Fix and apply again; accepted items are already saved.
40
-
41
- ## Order and scale
42
-
43
- 1. **English first** when the source is not English. It becomes the `reference` every other language sees, which
44
- steadies meaning for languages where direct Vietnamese→X data is thin.
45
- 2. Then the other voice languages, then the rest.
46
- 3. Work in batches of 100–200 texts per language so every item gets attention and the answer file stays reviewable.
47
- One namespace at a time (`--ns`) keeps context coherent.
48
- 4. Many languages at once: one sub-agent per language (or per small group), each running the loop above on its own
49
- `--lang`. They write different files, so they do not collide; run `check` and `pack` once at the end, in the lead.
50
- Translation batches are execution work: give them to the cheaper model tier, and keep the lead on the session
51
- model for the review.
52
-
53
- ## Before translating: read
54
-
55
- - `i18n/style.md`: audience, tone, form of address, per-language rules. If it is empty, fill in the top part from the
56
- product's docs first: a translation without a brief guesses the register.
57
- - `i18n/glossary.json`: `keep` (names never translated), `terms` (fixed translations), `forbidden`.
58
- - The `note` of each text. When a short text has no note and its meaning is unclear ("Open", "Back", "Light"), look
59
- at where the key is used in the code before translating, then add the note so the next language does not ask again.
60
-
61
- ## Rules for the translation itself
62
-
63
- - Translate the **meaning for that screen**, not the words. A button is an action; a title is a noun phrase.
64
- - **Placeholders** `{{name}}` are copied exactly, moved to where the grammar wants them. Never translate, rename or
65
- drop one. (`{{count}}` may be omitted from a `_one` / `_zero` / `_two` form that spells the number out.)
66
- - **Plural forms**: write every form the language has, each a full natural sentence. For es / pt / fr / it / ca the
67
- `many` form (exact millions) is normally the `other` wording. Where a noun must agree with the number (Russian,
68
- Polish, Arabic), make it agree; do not paste one form into all slots.
69
- - **Length**: stay near the source length for buttons, tabs and labels. German, Russian, Finnish and Greek run 20–35%
70
- longer: prefer the shorter natural wording. `max` in a note is a hard limit.
71
- - **Register**: one form of address per language for the whole product, taken from `style.md` (for example informal
72
- `du` / `tu` / `tú` in a children's game, polite form for payment and account screens if the brief says so).
73
- - **Names and brands** in `keep` stay as written, in Latin letters, in every language.
74
- - **Punctuation and typography of the target language**: full-width 、。!? in Japanese and Chinese; ¿…? ¡…! in
75
- Spanish; in French a **no-break space (U+00A0)** before `: ; ! ?` (not a plain space, which lets the mark wrap
76
- alone onto the next line, and not the narrow U+202F, which many game fonts lack; `check` warns about the plain
77
- space); „…“ in German; no space before 。; the ellipsis character where the language uses it. Keep line breaks
78
- (`\n`) and leading/trailing spaces as in the source.
79
- - **Scripts**: zh-Hans and zh-Hant are different vocabularies as well as different characters (软件 / 軟體): translate
80
- each, do not convert. pt-BR and pt-PT differ in wording and spelling.
81
- - **Do not localise what the app formats**: digits, dates, prices and units arrive through placeholders already
82
- formatted.
83
- - **Digits written in the source sentence** keep their value. A whole number below 10,000 has no grouping mark in any
84
- language (`1500`); from 10,000 up use the target language's grouping (`12,000` en, `12.000` de / vi, `12 000` fr
85
- and ru with a no-break space). If the source itself has `1.500`, fix the source to `1500` first.
86
- - **Culture**: replace an idiom by the natural expression of the target language; keep jokes only if they survive.
87
- Nothing that reads as religious, political or rude in the target market.
88
- - If a source text is itself wrong or unclear, do not translate around it: fix the source (or ask), then translate.
89
-
90
- ## Voice lines (`"voice": true` in `todo`)
91
-
92
- The line will be spoken by the voice in this language, so translate it for the ear as well as the eye:
93
-
94
- - Short, natural spoken sentences. No abbreviations, symbols (`%`, `&`, `+`, `/`), emoji or brackets that a voice
95
- would have to guess: write the words.
96
- - Numbers as plain digits without a grouping mark, so the tool can read them.
97
- - Japanese and Korean put counters on numbers (`3つ`, `105まい`, `3개`), and the counter changes how the number is
98
- read. Write the natural sentence; the tool will then mark the line `blocked`, and the same pass that translated it
99
- writes its spoken text:
100
-
101
- ```bash
102
- python <skill>/scripts/voice.py plan --lang ja # which lines are blocked, and why
103
- python <skill>/scripts/voice.py say --lang ja --id game:say.reward "ほしを せんごひゃっこと コインを ひゃくごまい もらったよ!"
104
- ```
105
-
106
- `say` ties the spoken text to the shown text and checks that it says the same numbers ([numbers.md](numbers.md)).
107
- - Changing the words of a voice line puts its clip one step behind the text: the clip must be remade, or kept on
108
- purpose if the old words still fit ([voice.md](voice.md) §5). Do not reword a voiced line for taste alone.
109
-
110
- ## Review before it counts
111
-
112
- 1. `i18n.py check` with no errors; read every warning ("no … characters", "identical to the source", "Vietnamese
113
- letters are left") and fix or consciously accept it.
114
- 2. Self-review each batch once as a reader of that language: does every line sound like something a native app would
115
- say on that screen?
116
- 3. For the voice languages and the product's main markets, a second agent (fresh context) spot-checks a sample of
117
- 30–50 texts by translating them back and comparing meaning. Disagreements are fixed, not averaged.
118
- 4. Layout: after a language is first added, capture the main screens in that language (the product's screenshot
119
- tests) and look for clipped or overflowing text. German and Russian find most overflow; Thai and CJK find most
120
- font gaps.
121
-
122
- ## Corrections from people
123
-
124
- A person's correction outranks the agent's wording. Apply it and lock it:
125
-
126
- ```bash
127
- python <skill>/scripts/i18n.py apply fix.ja.json --lock
128
- ```
129
-
130
- A locked text is never overwritten by a later `apply` unless `--force` is passed, and `--force` needs the owner's
131
- word. When the source of a locked text changes, it shows up as `stale` with `"locked": true` in `todo`: propose the
132
- new translation to the owner instead of applying it silently.
133
-
134
- ## Adopting translations that already exist
135
-
136
- A project that already has translations shows them as `untracked`: present, but
137
- never stamped against a source text. After checking that they match the current source, record that:
138
-
139
- ```bash
140
- python <skill>/scripts/i18n.py stamp --lang en # or --all
141
- ```
142
-
143
- From then on a source change marks exactly the affected texts `stale`.
1
+ # Translating with an agent
2
+
3
+ The agent is the translator. The tool hands over exactly what needs translating, with context, and refuses answers
4
+ that would break the app. Nothing is sent to an outside translation service.
5
+
6
+ ## The loop for one language
7
+
8
+ ```bash
9
+ python <skill>/scripts/i18n.py status # which languages need work
10
+ python <skill>/scripts/i18n.py todo --lang ja --limit 150 --out todo.ja.json
11
+ # translate: write done.ja.json
12
+ python <skill>/scripts/i18n.py apply done.ja.json # validates, writes locales/ja, stamps meta
13
+ python <skill>/scripts/i18n.py todo --lang ja … # repeat until "0 of 0"
14
+ python <skill>/scripts/i18n.py check --lang ja
15
+ ```
16
+
17
+ Keep `todo` / `done` files in a scratch folder, not in the repository.
18
+
19
+ `todo.<lang>.json` gives, per text: `id` (`ns:key`), `state` (`missing`, `stale`, `incomplete`), `source`,
20
+ `reference` (the same text in the reference language, when it is current), `note` (context, `max` length),
21
+ `current` (the old translation of a stale text: change only what the new source requires), `forms` (the plural forms
22
+ this language needs), `voice: true` (the line is spoken aloud in this language: see "Voice lines" below). At the top:
23
+ the language, its plural forms, and the glossary for it.
24
+
25
+ The answer file:
26
+
27
+ ```json
28
+ {
29
+ "lang": "ru",
30
+ "items": {
31
+ "shop:title": "Магазин",
32
+ "shop:buy": "Купить за {{price}} монет",
33
+ "shop:items": { "one": "{{count}} предмет", "few": "{{count}} предмета", "many": "{{count}} предметов", "other": "{{count}} предмета" }
34
+ }
35
+ }
36
+ ```
37
+
38
+ `apply` rejects an item (and says why) when a placeholder is lost or invented, a plural form is missing, a forbidden
39
+ word appears, the note's `max` is exceeded, or the key is locked. Fix and apply again; accepted items are already saved.
40
+
41
+ ## Order and scale
42
+
43
+ 1. **English first** when the source is not English. It becomes the `reference` every other language sees, which
44
+ steadies meaning for languages where direct Vietnamese→X data is thin.
45
+ 2. Then the other voice languages, then the rest.
46
+ 3. Work in batches of 100–200 texts per language so every item gets attention and the answer file stays reviewable.
47
+ One namespace at a time (`--ns`) keeps context coherent.
48
+ 4. Many languages at once: one sub-agent per language (or per small group), each running the loop above on its own
49
+ `--lang`. They write different files, so they do not collide; run `check` and `pack` once at the end, in the lead.
50
+ Translation batches are execution work: give them to the cheaper model tier, and keep the lead on the session
51
+ model for the review.
52
+
53
+ ## Before translating: read
54
+
55
+ - `i18n/style.md`: audience, tone, form of address, per-language rules. If it is empty, fill in the top part from the
56
+ product's docs first: a translation without a brief guesses the register.
57
+ - `i18n/glossary.json`: `keep` (names never translated), `terms` (fixed translations), `forbidden`.
58
+ - The `note` of each text. When a short text has no note and its meaning is unclear ("Open", "Back", "Light"), look
59
+ at where the key is used in the code before translating, then add the note so the next language does not ask again.
60
+
61
+ ## Rules for the translation itself
62
+
63
+ - Translate the **meaning for that screen**, not the words. A button is an action; a title is a noun phrase.
64
+ - **Placeholders** `{{name}}` are copied exactly, moved to where the grammar wants them. Never translate, rename or
65
+ drop one. (`{{count}}` may be omitted from a `_one` / `_zero` / `_two` form that spells the number out.)
66
+ - **Plural forms**: write every form the language has, each a full natural sentence. For es / pt / fr / it / ca the
67
+ `many` form (exact millions) is normally the `other` wording. Where a noun must agree with the number (Russian,
68
+ Polish, Arabic), make it agree; do not paste one form into all slots.
69
+ - **Length**: stay near the source length for buttons, tabs and labels. German, Russian, Finnish and Greek run 20–35%
70
+ longer: prefer the shorter natural wording. `max` in a note is a hard limit.
71
+ - **Register**: one form of address per language for the whole product, taken from `style.md` (for example informal
72
+ `du` / `tu` / `tú` in a children's game, polite form for payment and account screens if the brief says so).
73
+ - **Names and brands** in `keep` stay as written, in Latin letters, in every language.
74
+ - **Punctuation and typography of the target language**: full-width 、。!? in Japanese and Chinese; ¿…? ¡…! in
75
+ Spanish; in French a **no-break space (U+00A0)** before `: ; ! ?` (not a plain space, which lets the mark wrap
76
+ alone onto the next line, and not the narrow U+202F, which many game fonts lack; `check` warns about the plain
77
+ space); „…“ in German; no space before 。; the ellipsis character where the language uses it. Keep line breaks
78
+ (`\n`) and leading/trailing spaces as in the source.
79
+ - **Scripts**: zh-Hans and zh-Hant are different vocabularies as well as different characters (软件 / 軟體): translate
80
+ each, do not convert. pt-BR and pt-PT differ in wording and spelling.
81
+ - **Do not localise what the app formats**: digits, dates, prices and units arrive through placeholders already
82
+ formatted.
83
+ - **Digits written in the source sentence** keep their value. A whole number below 10,000 has no grouping mark in any
84
+ language (`1500`); from 10,000 up use the target language's grouping (`12,000` en, `12.000` de / vi, `12 000` fr
85
+ and ru with a no-break space). If the source itself has `1.500`, fix the source to `1500` first.
86
+ - **Culture**: replace an idiom by the natural expression of the target language; keep jokes only if they survive.
87
+ Nothing that reads as religious, political or rude in the target market.
88
+ - If a source text is itself wrong or unclear, do not translate around it: fix the source (or ask), then translate.
89
+
90
+ ## Voice lines (`"voice": true` in `todo`)
91
+
92
+ The line will be spoken by the voice in this language, so translate it for the ear as well as the eye:
93
+
94
+ - Short, natural spoken sentences. No abbreviations, symbols (`%`, `&`, `+`, `/`), emoji or brackets that a voice
95
+ would have to guess: write the words.
96
+ - Numbers as plain digits without a grouping mark, so the tool can read them.
97
+ - Japanese and Korean put counters on numbers (`3つ`, `105まい`, `3개`), and the counter changes how the number is
98
+ read. Write the natural sentence; the tool will then mark the line `blocked`, and the same pass that translated it
99
+ writes its spoken text:
100
+
101
+ ```bash
102
+ python <skill>/scripts/voice.py plan --lang ja # which lines are blocked, and why
103
+ python <skill>/scripts/voice.py say --lang ja --id game:say.reward "ほしを せんごひゃっこと コインを ひゃくごまい もらったよ!"
104
+ ```
105
+
106
+ `say` ties the spoken text to the shown text and checks that it says the same numbers ([numbers.md](numbers.md)).
107
+ - Changing the words of a voice line puts its clip one step behind the text: the clip must be remade, or kept on
108
+ purpose if the old words still fit ([voice.md](voice.md) §5). Do not reword a voiced line for taste alone.
109
+
110
+ ## Review before it counts
111
+
112
+ 1. `i18n.py check` with no errors; read every warning ("no … characters", "identical to the source", "Vietnamese
113
+ letters are left") and fix or consciously accept it.
114
+ 2. Self-review each batch once as a reader of that language: does every line sound like something a native app would
115
+ say on that screen?
116
+ 3. For the voice languages and the product's main markets, a second agent (fresh context) spot-checks a sample of
117
+ 30–50 texts by translating them back and comparing meaning. Disagreements are fixed, not averaged.
118
+ 4. Layout: after a language is first added, capture the main screens in that language (the product's screenshot
119
+ tests) and look for clipped or overflowing text. German and Russian find most overflow; Thai and CJK find most
120
+ font gaps.
121
+
122
+ ## Corrections from people
123
+
124
+ A person's correction outranks the agent's wording. Apply it and lock it:
125
+
126
+ ```bash
127
+ python <skill>/scripts/i18n.py apply fix.ja.json --lock
128
+ ```
129
+
130
+ A locked text is never overwritten by a later `apply` unless `--force` is passed, and `--force` needs the owner's
131
+ word. When the source of a locked text changes, it shows up as `stale` with `"locked": true` in `todo`: propose the
132
+ new translation to the owner instead of applying it silently.
133
+
134
+ ## Adopting translations that already exist
135
+
136
+ A project that already has translations shows them as `untracked`: present, but
137
+ never stamped against a source text. After checking that they match the current source, record that:
138
+
139
+ ```bash
140
+ python <skill>/scripts/i18n.py stamp --lang en # or --all
141
+ ```
142
+
143
+ From then on a source change marks exactly the affected texts `stale`.