sisyo 1.7.0 → 1.9.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 +177 -166
  3. package/bin/known-hashes.json +8 -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 +39 -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 +139 -242
  57. package/templates/SISYO.md +39 -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,24 +1,32 @@
1
- # Agents, Tests and Deploys Rule
2
-
3
- The owner's rules (2026-11-16) for every project. A project's `SISYO.md` may be stricter, never looser.
4
-
5
- ## Models
6
- - Default: Opus (Opus 5.5 as of 2026-11) at effort `xhigh`, for the main session and for every agent it starts (`model: "opus"`, `effort: "xhigh"`).
7
- - A model above Opus (Fable) only when the owner names it for a task, typically one about money or something important. Never switch on your own judgement.
8
- - Small or single-area work is done in the main session. Agents are for work that splits into independent parts running in parallel.
9
-
10
- ## Writing code
11
- 1. Before writing code, read the related parts: the code that calls it and that it calls, the existing tests, the project's skills and docs for the area.
12
- 2. Write the test cases first, then the code.
13
- 3. Working alone: run the tests related to the change once, at the end (the tests of the packages changed, the browser or e2e checks of the pages changed). Not the whole suite.
14
- 4. Agents in parallel: each writes its tests and runs none. When all are done, one pass runs the tests of the combined work once, on the zone the batch touched (lint, typecheck, the touched packages' tests, the changed pages' checks), and fixes what fails.
15
- 5. Nobody runs the project's whole test gate locally "to be sure".
16
-
17
- ## Deploys
18
- - A deploy to dev or staging does not run the whole test gate: build, deploy, smoke check. A broken build still stops it.
19
- - A deploy that reaches production runs the whole gate on the exact commit released, and deploys nothing if it fails. Where a push to `main` deploys production, that push is a production deploy.
20
- - The PR's CI run, where a project has one, is the one whole run for a change before production.
21
- - If a project's CI does not work this way yet, propose the change (a workflow change usually goes through the project's review rule); do not change it on your own.
22
-
23
- ## Why
24
- Batches took hours: the whole gate ran in each agent, again in each integration pass, on the PR, on the push to `main` and in the dev deploy, the last ones at once on one shared runner host.
1
+ # Agents, Tests and Deploys Rule
2
+
3
+ The owner's rules (2026-11-16) for every project. A project's `SISYO.md` may be stricter, never looser.
4
+
5
+ ## Models
6
+ - Default: Opus (Opus 5.5 as of 2026-11) at effort `xhigh`, for the main session and for every agent it starts (`model: "opus"`, `effort: "xhigh"`).
7
+ - A model above Opus (Fable) only when the owner names it for a task, typically one about money or something important. Never switch on your own judgement.
8
+ - Small or single-area work is done in the main session. Agents are for work that splits into independent parts running in parallel.
9
+
10
+ ## Writing code
11
+ 1. Before writing code, read the related parts: the code that calls it and that it calls, the existing tests, the project's skills and docs for the area.
12
+ 2. Write the test cases first, then the code.
13
+ 3. Working alone: run the tests related to the change once, at the end (the tests of the packages changed, the browser or e2e checks of the pages changed). Not the whole suite.
14
+ 4. Agents in parallel: each writes its tests and runs none. When all are done, one pass runs the tests of the combined work once, on the zone the batch touched (lint, typecheck, the touched packages' tests, the changed pages' checks), and fixes what fails.
15
+ 5. Nobody runs the project's whole test gate locally "to be sure".
16
+
17
+ ## Sessions and agents
18
+ - Do the work in the main session and manage it yourself. Start an agent only for a large part that is independent and truly runs in parallel, never for a short step (a lookup, a build or deploy with the project's existing scripts) that the main session would then sit waiting on.
19
+ - At most 4 agents run at the same time in one session. More parallel work waits for a free place or goes to another session.
20
+ - Keep each batch small: if its changes would make the test pass select most of the project's test groups, split the batch, so each pass runs only the groups that batch touched.
21
+ - A session is not the project's memory; the docs and git are. When a session has run long (about a day of work, a transcript over about 5 MB, tool calls that take minutes to answer, or a frozen tab), write the handoff, end the session, and continue in a new one that starts from the handoff.
22
+
23
+ ## Deploys
24
+ - A deploy to dev or staging does not run the whole test gate: build, deploy, smoke check. A broken build still stops it.
25
+ - A deploy that reaches production runs the whole gate on the exact commit released, and deploys nothing if it fails. Where a push to `main` deploys production, that push is a production deploy.
26
+ - The PR's CI run, where a project has one, is the one whole run for a change before production.
27
+ - If a project's CI does not work this way yet, propose the change (a workflow change usually goes through the project's review rule); do not change it on your own.
28
+
29
+ ## Why
30
+ Batches took hours: the whole gate ran in each agent, again in each integration pass, on the PR, on the push to `main` and in the dev deploy, the last ones at once on one shared runner host.
31
+
32
+ A long session slowed to a crawl (2026-11-16): one session carried its lead and up to ten agents for a day. Simple file reads and edits took one to three minutes each, while other sessions on the same PC took seconds. The lead waited 2 h 40 min on an agent writing a deploy runbook, and one batch of 811 changed files made the test pass select every group (3 h 30 min).
@@ -1,19 +1,39 @@
1
- # Doc Management Rule
2
-
3
- 3-level routing: MAP.md → _summary.md → detail files.
4
-
5
- When changing code that affects project structure or behavior:
6
- 1. Read docs/MAP.md to find relevant folder
7
- 2. Read _summary.md of that folder (if exists)
8
- 3. Update detail file (or create if new)
9
- 4. Update _summary.md table
10
- 5. Update MAP.md summary line
11
-
12
- When a feature is completed or added:
13
- - Log it in docs/99_progress/features.md (date, name, status, link to spec)
14
-
15
- Before ending session or when context gets large:
16
- - Write docs/99_progress/handoff.md
17
-
18
- At session start:
19
- - Read docs/MAP.md then docs/99_progress/handoff.md
1
+ # Docs and Code Rule
2
+
3
+ The owner's rules (2026-11-30) for every project: two sets of docs for two kinds of readers, and code that explains
4
+ itself. A project's `SISYO.md` may be stricter, never looser.
5
+
6
+ ## Agent docs: `docs/` in the repo
7
+ Readers: agents. Goal: find, load and fix one fact quickly, with few tokens.
8
+ - English, as short as possible: facts, tables, lists, paths. No prose, no history, no repeating what the code says.
9
+ - 3-level routing: `docs/MAP.md` → `<folder>/_summary.md` → detail file. One topic per file, under about 100 lines.
10
+ - Refer to code by path (`src/auth/service.ts`) and do not copy it. Write what the code cannot say: why, contracts,
11
+ constraints, gotchas, commands.
12
+ - Describe what is true now. Replace outdated lines; do not append. Git keeps the history.
13
+ - After a change: update the detail file, then `_summary.md`, then the MAP.md line (skill `vibe-docs`).
14
+ - Session start: read MAP.md, then `99_progress/handoff.md`. Before the session ends, write the handoff (≤ 30 lines).
15
+ - When a feature is done, add one line to `99_progress/features.md`.
16
+
17
+ ## Human docs: the project's hub
18
+ Readers: the owner and other people. Goal: understand the system in a few minutes.
19
+ - Location: the project's Kicho hub when it has one (`.kicho-devflow.json`, skill `kicho-devflow`), written in the
20
+ owner's language.
21
+ - Short and plain. Cover the architecture, the main techniques and why they were chosen, and the key numbers
22
+ (performance, tests, data sizes, costs), plus one summary per sprint.
23
+ - Leave out code-level detail, long path lists and agent task progress.
24
+ - Write for a person. Never paste agent docs there, and never put human prose into `docs/`. When the sources of these
25
+ pages are kept in the repo, keep them outside `docs/` (for example `kicho-pages/`).
26
+
27
+ ## Code reads like prose
28
+ - Names say what a thing is or does:
29
+ - functions are verb phrases (`sendReminderEmail`);
30
+ - booleans are questions (`isExpired`, `hasPaidPlan`);
31
+ - values are nouns, with units where needed (`timeoutMs`, `priceYen`).
32
+ Use only abbreviations everyone knows.
33
+ - Keep functions small, with one job each. If a block of code needs a heading, extract it into a function named
34
+ after that heading.
35
+ - No comments. Rename or extract code instead. Write a comment only for what the code cannot say:
36
+ - why a choice that looks wrong is right (a workaround and its bug link, a spec or law, a security reason);
37
+ - where a magic value comes from;
38
+ - doc comments that tooling publishes (the API of a public package).
39
+ - In code you change, delete the comments that the names now say. Never sweep comments out of the whole repo.
@@ -1,121 +1,121 @@
1
- # Async Patterns
2
-
3
- ## Route Types Comparison
4
-
5
- | Route Type | Blocking Code | Event Loop | Use Case |
6
- |------------|--------------|------------|----------|
7
- | `async def` + `await` | Non-blocking | Free | Async I/O (httpx, asyncpg) |
8
- | `def` (sync) | Runs in threadpool | Free | Sync libraries, simple ops |
9
- | `async def` + blocking | BLOCKS EVERYTHING | Blocked | NEVER DO THIS |
10
-
11
- ## I/O Operations
12
-
13
- ### Async Database Calls
14
-
15
- ```python
16
- # GOOD - async database
17
- @router.get("/users/{user_id}")
18
- async def get_user(user_id: int):
19
- user = await db.fetch_one("SELECT * FROM users WHERE id = $1", user_id)
20
- return user
21
- ```
22
-
23
- ### Sync Libraries in Async Routes
24
-
25
- ```python
26
- from fastapi.concurrency import run_in_threadpool
27
-
28
- @router.get("/sync-lib")
29
- async def use_sync_library():
30
- # Run sync code in threadpool
31
- result = await run_in_threadpool(sync_client.fetch_data)
32
- return result
33
- ```
34
-
35
- ### HTTP Calls
36
-
37
- ```python
38
- import httpx
39
-
40
- # GOOD - async HTTP client
41
- @router.get("/external")
42
- async def call_external():
43
- async with httpx.AsyncClient() as client:
44
- response = await client.get("https://api.example.com/data")
45
- return response.json()
46
- ```
47
-
48
- ## CPU-Intensive Tasks
49
-
50
- CPU-bound work blocks regardless of async/sync. Offload to workers:
51
-
52
- ```python
53
- from fastapi import BackgroundTasks
54
-
55
- @router.post("/process")
56
- async def process_data(background_tasks: BackgroundTasks):
57
- # Queue for background processing
58
- background_tasks.add_task(heavy_computation, data)
59
- return {"status": "processing"}
60
-
61
- # For heavy CPU work, use Celery or multiprocessing
62
- ```
63
-
64
- ## Common Mistakes
65
-
66
- ### Blocking in Async Route
67
-
68
- ```python
69
- # BAD - blocks entire server
70
- @router.get("/terrible")
71
- async def terrible():
72
- time.sleep(10) # NEVER do this in async route
73
- return {"done": True}
74
-
75
- # GOOD - use sync route for blocking code
76
- @router.get("/acceptable")
77
- def acceptable():
78
- time.sleep(10) # runs in threadpool
79
- return {"done": True}
80
-
81
- # BEST - use async sleep
82
- @router.get("/perfect")
83
- async def perfect():
84
- await asyncio.sleep(10)
85
- return {"done": True}
86
- ```
87
-
88
- ### Sync ORM in Async Route
89
-
90
- ```python
91
- # BAD
92
- @router.get("/users")
93
- async def get_users():
94
- return db.query(User).all() # sync ORM blocks event loop
95
-
96
- # GOOD - use async ORM or threadpool
97
- @router.get("/users")
98
- async def get_users():
99
- return await run_in_threadpool(lambda: db.query(User).all())
100
-
101
- # BEST - use async ORM (SQLAlchemy 2.0 async)
102
- @router.get("/users")
103
- async def get_users():
104
- result = await session.execute(select(User))
105
- return result.scalars().all()
106
- ```
107
-
108
- ## Dependencies
109
-
110
- Prefer async dependencies when possible:
111
-
112
- ```python
113
- # GOOD - async dependency
114
- async def get_current_user(token: str = Depends(oauth2_scheme)):
115
- user = await users_service.get_by_token(token)
116
- return user
117
-
118
- # OK but less efficient - sync dependency runs in threadpool
119
- def get_settings():
120
- return Settings()
121
- ```
1
+ # Async Patterns
2
+
3
+ ## Route Types Comparison
4
+
5
+ | Route Type | Blocking Code | Event Loop | Use Case |
6
+ |------------|--------------|------------|----------|
7
+ | `async def` + `await` | Non-blocking | Free | Async I/O (httpx, asyncpg) |
8
+ | `def` (sync) | Runs in threadpool | Free | Sync libraries, simple ops |
9
+ | `async def` + blocking | BLOCKS EVERYTHING | Blocked | NEVER DO THIS |
10
+
11
+ ## I/O Operations
12
+
13
+ ### Async Database Calls
14
+
15
+ ```python
16
+ # GOOD - async database
17
+ @router.get("/users/{user_id}")
18
+ async def get_user(user_id: int):
19
+ user = await db.fetch_one("SELECT * FROM users WHERE id = $1", user_id)
20
+ return user
21
+ ```
22
+
23
+ ### Sync Libraries in Async Routes
24
+
25
+ ```python
26
+ from fastapi.concurrency import run_in_threadpool
27
+
28
+ @router.get("/sync-lib")
29
+ async def use_sync_library():
30
+ # Run sync code in threadpool
31
+ result = await run_in_threadpool(sync_client.fetch_data)
32
+ return result
33
+ ```
34
+
35
+ ### HTTP Calls
36
+
37
+ ```python
38
+ import httpx
39
+
40
+ # GOOD - async HTTP client
41
+ @router.get("/external")
42
+ async def call_external():
43
+ async with httpx.AsyncClient() as client:
44
+ response = await client.get("https://api.example.com/data")
45
+ return response.json()
46
+ ```
47
+
48
+ ## CPU-Intensive Tasks
49
+
50
+ CPU-bound work blocks regardless of async/sync. Offload to workers:
51
+
52
+ ```python
53
+ from fastapi import BackgroundTasks
54
+
55
+ @router.post("/process")
56
+ async def process_data(background_tasks: BackgroundTasks):
57
+ # Queue for background processing
58
+ background_tasks.add_task(heavy_computation, data)
59
+ return {"status": "processing"}
60
+
61
+ # For heavy CPU work, use Celery or multiprocessing
62
+ ```
63
+
64
+ ## Common Mistakes
65
+
66
+ ### Blocking in Async Route
67
+
68
+ ```python
69
+ # BAD - blocks entire server
70
+ @router.get("/terrible")
71
+ async def terrible():
72
+ time.sleep(10) # NEVER do this in async route
73
+ return {"done": True}
74
+
75
+ # GOOD - use sync route for blocking code
76
+ @router.get("/acceptable")
77
+ def acceptable():
78
+ time.sleep(10) # runs in threadpool
79
+ return {"done": True}
80
+
81
+ # BEST - use async sleep
82
+ @router.get("/perfect")
83
+ async def perfect():
84
+ await asyncio.sleep(10)
85
+ return {"done": True}
86
+ ```
87
+
88
+ ### Sync ORM in Async Route
89
+
90
+ ```python
91
+ # BAD
92
+ @router.get("/users")
93
+ async def get_users():
94
+ return db.query(User).all() # sync ORM blocks event loop
95
+
96
+ # GOOD - use async ORM or threadpool
97
+ @router.get("/users")
98
+ async def get_users():
99
+ return await run_in_threadpool(lambda: db.query(User).all())
100
+
101
+ # BEST - use async ORM (SQLAlchemy 2.0 async)
102
+ @router.get("/users")
103
+ async def get_users():
104
+ result = await session.execute(select(User))
105
+ return result.scalars().all()
106
+ ```
107
+
108
+ ## Dependencies
109
+
110
+ Prefer async dependencies when possible:
111
+
112
+ ```python
113
+ # GOOD - async dependency
114
+ async def get_current_user(token: str = Depends(oauth2_scheme)):
115
+ user = await users_service.get_by_token(token)
116
+ return user
117
+
118
+ # OK but less efficient - sync dependency runs in threadpool
119
+ def get_settings():
120
+ return Settings()
121
+ ```