yjcli 0.0.4__tar.gz → 0.0.6__tar.gz
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.
- {yjcli-0.0.4 → yjcli-0.0.6}/PKG-INFO +28 -5
- {yjcli-0.0.4 → yjcli-0.0.6}/README.md +27 -4
- {yjcli-0.0.4 → yjcli-0.0.6}/pyproject.toml +1 -1
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/commands/sync.py +18 -3
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/skills/yj-arch-core/SKILL.md +9 -3
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/skills/yj-backend-service/SKILL.md +1 -1
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/templates/AGENTS.md +1 -1
- yjcli-0.0.6/src/yjcli/data/templates/Makefile +31 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/templates/TOOLS.md +11 -9
- yjcli-0.0.6/src/yjcli/data/templates/make.bat +48 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/frontend → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/listen}/.env.development +1 -1
- {yjcli-0.0.4/src/yjcli/data/templates/platform/frontend → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/listen}/.env.local-dev +1 -1
- {yjcli-0.0.4/src/yjcli/data/templates/platform/backend → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/listen}/.env.production +1 -1
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/templates/platform/scripts/run.bat +22 -11
- yjcli-0.0.6/src/yjcli/data/templates/platform/scripts/run.sh +190 -0
- yjcli-0.0.6/src/yjcli/modules/constants.py +29 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/services/scaffold.py +49 -10
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/services/sync.py +36 -2
- yjcli-0.0.4/src/yjcli/data/templates/Makefile +0 -14
- yjcli-0.0.4/src/yjcli/data/templates/make.bat +0 -44
- yjcli-0.0.4/src/yjcli/data/templates/platform/backend/.env.development +0 -4
- yjcli-0.0.4/src/yjcli/data/templates/platform/backend/.env.local-dev +0 -4
- yjcli-0.0.4/src/yjcli/data/templates/platform/cli/.env.development +0 -2
- yjcli-0.0.4/src/yjcli/data/templates/platform/cli/.env.examples +0 -5
- yjcli-0.0.4/src/yjcli/data/templates/platform/cli/.env.local-dev +0 -2
- yjcli-0.0.4/src/yjcli/data/templates/platform/cli/.env.production +0 -2
- yjcli-0.0.4/src/yjcli/data/templates/platform/frontend/.env.examples +0 -11
- yjcli-0.0.4/src/yjcli/data/templates/platform/frontend/.env.production +0 -4
- yjcli-0.0.4/src/yjcli/data/templates/platform/mobile-app/.env.development +0 -2
- yjcli-0.0.4/src/yjcli/data/templates/platform/mobile-app/.env.examples +0 -5
- yjcli-0.0.4/src/yjcli/data/templates/platform/mobile-app/.env.local-dev +0 -2
- yjcli-0.0.4/src/yjcli/data/templates/platform/mobile-app/.env.production +0 -2
- yjcli-0.0.4/src/yjcli/data/templates/platform/pc-app/.env.development +0 -2
- yjcli-0.0.4/src/yjcli/data/templates/platform/pc-app/.env.examples +0 -5
- yjcli-0.0.4/src/yjcli/data/templates/platform/pc-app/.env.local-dev +0 -2
- yjcli-0.0.4/src/yjcli/data/templates/platform/pc-app/.env.production +0 -2
- yjcli-0.0.4/src/yjcli/data/templates/platform/scripts/run.sh +0 -145
- yjcli-0.0.4/src/yjcli/modules/constants.py +0 -15
- {yjcli-0.0.4 → yjcli-0.0.6}/.gitignore +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/LICENSE +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/__init__.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/__main__.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/cli.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/commands/__init__.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/commands/add.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/commands/init_cmd.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/__init__.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/claude-rules/output-discipline.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/claude-rules/skill-backend-msa.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/claude-rules/skill-backend-service.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/claude-rules/skill-browser-extension.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/claude-rules/skill-cli.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/claude-rules/skill-frontend.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/claude-rules/skill-mobile-app.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/claude-rules/skill-pc-app.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/claude-rules/yj-arch-core.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/cursor-rules/output-discipline.mdc +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/cursor-rules/skill-backend-msa.mdc +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/cursor-rules/skill-backend-service.mdc +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/cursor-rules/skill-browser-extension.mdc +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/cursor-rules/skill-cli.mdc +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/cursor-rules/skill-frontend.mdc +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/cursor-rules/skill-mobile-app.mdc +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/cursor-rules/skill-pc-app.mdc +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/cursor-rules/yj-arch-core.mdc +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/skills/yj-backend-msa/SKILL.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/skills/yj-browser-extension/SKILL.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/skills/yj-cli/SKILL.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/skills/yj-frontend/SKILL.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/skills/yj-mobile-app/SKILL.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/skills/yj-pc-app/SKILL.md +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/templates/.gitignore +0 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/backend-service → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/app}/.env.development +0 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/browser-extension → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/app}/.env.examples +0 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/backend-service → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/app}/.env.local-dev +0 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/backend-service → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/app}/.env.production +0 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/backend → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/listen}/.env.examples +0 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/browser-extension → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/worker}/.env.development +0 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/backend-service → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/worker}/.env.examples +0 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/browser-extension → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/worker}/.env.local-dev +0 -0
- {yjcli-0.0.4/src/yjcli/data/templates/platform/browser-extension → yjcli-0.0.6/src/yjcli/data/templates/platform/envs/worker}/.env.production +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/templates/platform/frontend/package.json +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/templates/platform/frontend/vite.config.ts +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/data/templates/settings.json +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/modules/__init__.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/modules/fsutil.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/modules/paths.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/modules/prompt.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/services/__init__.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/services/status.py +0 -0
- {yjcli-0.0.4 → yjcli-0.0.6}/src/yjcli/services/wiring.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: yjcli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: Scaffold platforms, services, and AI agent wiring (Cursor/Claude) for YJ architecture repos.
|
|
5
5
|
Project-URL: Homepage, https://github.com/yseiren87/yjcli
|
|
6
6
|
Project-URL: Repository, https://github.com/yseiren87/yjcli
|
|
@@ -27,14 +27,14 @@ Description-Content-Type: text/markdown
|
|
|
27
27
|
|
|
28
28
|
CLI that scaffolds YJ platform folders, services, and Cursor/Claude agent wiring.
|
|
29
29
|
|
|
30
|
-
Templates, skills, and
|
|
30
|
+
Templates, skills, rules, and root make files ship inside the package and are **copied** into the target repo.
|
|
31
31
|
|
|
32
32
|
## Install
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
uv tool install yjcli
|
|
36
36
|
# pin a version:
|
|
37
|
-
uv tool install yjcli==0.0.
|
|
37
|
+
uv tool install yjcli==0.0.5
|
|
38
38
|
|
|
39
39
|
yjcli --version
|
|
40
40
|
yjcli -h
|
|
@@ -53,8 +53,12 @@ uv tool uninstall yjcli
|
|
|
53
53
|
uv tool install yjcli
|
|
54
54
|
cd /path/to/your-repo
|
|
55
55
|
yjcli init --all
|
|
56
|
+
yjcli add service -p backend -n api
|
|
56
57
|
# edit AGENTS.md, then:
|
|
57
58
|
yjcli sync agents
|
|
59
|
+
|
|
60
|
+
make backend # start all backend services
|
|
61
|
+
make backend NAME=api # start one service
|
|
58
62
|
```
|
|
59
63
|
|
|
60
64
|
## Platforms
|
|
@@ -68,7 +72,23 @@ Use with `-p` / `--platform` (repeatable):
|
|
|
68
72
|
- `AGENTS.md`, `CLAUDE.md` (mirror of `AGENTS.md`)
|
|
69
73
|
- `.cursor/` / `.claude/` skills, rules, and Claude `settings.json`
|
|
70
74
|
- Root `Makefile`, `make.bat`, `TOOLS.md`, `.gitignore`
|
|
71
|
-
- Selected platform roots (
|
|
75
|
+
- Selected platform roots (`*/scripts/run.sh` / `run.bat`)
|
|
76
|
+
|
|
77
|
+
## Run (`make`)
|
|
78
|
+
|
|
79
|
+
Platform targets are discovered from `*/scripts/run.sh` (after `add platform`). No Makefile edits when adding services.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
make <platform> # all services under that platform (concurrent)
|
|
83
|
+
make <platform> NAME=<service> # one service
|
|
84
|
+
make help
|
|
85
|
+
|
|
86
|
+
# Windows:
|
|
87
|
+
make.bat <platform>
|
|
88
|
+
make.bat <platform> NAME=<service>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Examples: `make backend`, `make backend NAME=api`.
|
|
72
92
|
|
|
73
93
|
## Sync
|
|
74
94
|
|
|
@@ -77,7 +97,8 @@ Use with `-p` / `--platform` (repeatable):
|
|
|
77
97
|
| `yjcli sync agents` | After editing `AGENTS.md` — refreshes `CLAUDE.md` |
|
|
78
98
|
| `yjcli sync skills` | Refresh packaged skills only |
|
|
79
99
|
| `yjcli sync rules` | Refresh packaged rules only |
|
|
80
|
-
| `yjcli sync
|
|
100
|
+
| `yjcli sync make` | Overwrite root `Makefile` / `make.bat` and each installed platform’s `scripts/run.sh` · `run.bat` |
|
|
101
|
+
| `yjcli sync all` | After upgrading `yjcli` — agents + skills + rules + make (+ platform run scripts) |
|
|
81
102
|
|
|
82
103
|
Edit `AGENTS.md` only; do not edit `CLAUDE.md` by hand.
|
|
83
104
|
|
|
@@ -91,6 +112,7 @@ Edit `AGENTS.md` only; do not edit `CLAUDE.md` by hand.
|
|
|
91
112
|
- `add service` needs the platform root first (`init` or `add platform`).
|
|
92
113
|
- Non-interactive use requires flags (`-p` / `-n` / `--all`, etc.); omit them only in a TTY prompt.
|
|
93
114
|
- `doctor` checks the **installed package** assets, not your target repo.
|
|
115
|
+
- Services are discovered by directory; `add service` does not edit `run.sh` / `Makefile`.
|
|
94
116
|
|
|
95
117
|
## Commands
|
|
96
118
|
|
|
@@ -110,6 +132,7 @@ yjcli add service -p backend -n api
|
|
|
110
132
|
yjcli sync agents
|
|
111
133
|
yjcli sync skills
|
|
112
134
|
yjcli sync rules
|
|
135
|
+
yjcli sync make
|
|
113
136
|
yjcli sync all
|
|
114
137
|
yjcli doctor
|
|
115
138
|
```
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
CLI that scaffolds YJ platform folders, services, and Cursor/Claude agent wiring.
|
|
4
4
|
|
|
5
|
-
Templates, skills, and
|
|
5
|
+
Templates, skills, rules, and root make files ship inside the package and are **copied** into the target repo.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
uv tool install yjcli
|
|
11
11
|
# pin a version:
|
|
12
|
-
uv tool install yjcli==0.0.
|
|
12
|
+
uv tool install yjcli==0.0.5
|
|
13
13
|
|
|
14
14
|
yjcli --version
|
|
15
15
|
yjcli -h
|
|
@@ -28,8 +28,12 @@ uv tool uninstall yjcli
|
|
|
28
28
|
uv tool install yjcli
|
|
29
29
|
cd /path/to/your-repo
|
|
30
30
|
yjcli init --all
|
|
31
|
+
yjcli add service -p backend -n api
|
|
31
32
|
# edit AGENTS.md, then:
|
|
32
33
|
yjcli sync agents
|
|
34
|
+
|
|
35
|
+
make backend # start all backend services
|
|
36
|
+
make backend NAME=api # start one service
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
## Platforms
|
|
@@ -43,7 +47,23 @@ Use with `-p` / `--platform` (repeatable):
|
|
|
43
47
|
- `AGENTS.md`, `CLAUDE.md` (mirror of `AGENTS.md`)
|
|
44
48
|
- `.cursor/` / `.claude/` skills, rules, and Claude `settings.json`
|
|
45
49
|
- Root `Makefile`, `make.bat`, `TOOLS.md`, `.gitignore`
|
|
46
|
-
- Selected platform roots (
|
|
50
|
+
- Selected platform roots (`*/scripts/run.sh` / `run.bat`)
|
|
51
|
+
|
|
52
|
+
## Run (`make`)
|
|
53
|
+
|
|
54
|
+
Platform targets are discovered from `*/scripts/run.sh` (after `add platform`). No Makefile edits when adding services.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
make <platform> # all services under that platform (concurrent)
|
|
58
|
+
make <platform> NAME=<service> # one service
|
|
59
|
+
make help
|
|
60
|
+
|
|
61
|
+
# Windows:
|
|
62
|
+
make.bat <platform>
|
|
63
|
+
make.bat <platform> NAME=<service>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Examples: `make backend`, `make backend NAME=api`.
|
|
47
67
|
|
|
48
68
|
## Sync
|
|
49
69
|
|
|
@@ -52,7 +72,8 @@ Use with `-p` / `--platform` (repeatable):
|
|
|
52
72
|
| `yjcli sync agents` | After editing `AGENTS.md` — refreshes `CLAUDE.md` |
|
|
53
73
|
| `yjcli sync skills` | Refresh packaged skills only |
|
|
54
74
|
| `yjcli sync rules` | Refresh packaged rules only |
|
|
55
|
-
| `yjcli sync
|
|
75
|
+
| `yjcli sync make` | Overwrite root `Makefile` / `make.bat` and each installed platform’s `scripts/run.sh` · `run.bat` |
|
|
76
|
+
| `yjcli sync all` | After upgrading `yjcli` — agents + skills + rules + make (+ platform run scripts) |
|
|
56
77
|
|
|
57
78
|
Edit `AGENTS.md` only; do not edit `CLAUDE.md` by hand.
|
|
58
79
|
|
|
@@ -66,6 +87,7 @@ Edit `AGENTS.md` only; do not edit `CLAUDE.md` by hand.
|
|
|
66
87
|
- `add service` needs the platform root first (`init` or `add platform`).
|
|
67
88
|
- Non-interactive use requires flags (`-p` / `-n` / `--all`, etc.); omit them only in a TTY prompt.
|
|
68
89
|
- `doctor` checks the **installed package** assets, not your target repo.
|
|
90
|
+
- Services are discovered by directory; `add service` does not edit `run.sh` / `Makefile`.
|
|
69
91
|
|
|
70
92
|
## Commands
|
|
71
93
|
|
|
@@ -85,6 +107,7 @@ yjcli add service -p backend -n api
|
|
|
85
107
|
yjcli sync agents
|
|
86
108
|
yjcli sync skills
|
|
87
109
|
yjcli sync rules
|
|
110
|
+
yjcli sync make
|
|
88
111
|
yjcli sync all
|
|
89
112
|
yjcli doctor
|
|
90
113
|
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""yjcli sync <what> — refresh agent docs / skills / rules."""
|
|
1
|
+
"""yjcli sync <what> — refresh agent docs / skills / rules / make."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ import typer
|
|
|
9
9
|
from yjcli.services import sync as sync_svc
|
|
10
10
|
|
|
11
11
|
app = typer.Typer(
|
|
12
|
-
help="Sync AGENTS.md mirror, skills, or
|
|
12
|
+
help="Sync AGENTS.md mirror, skills, rules, or Makefile/make.bat into the target repo.",
|
|
13
13
|
no_args_is_help=True,
|
|
14
14
|
context_settings={"help_option_names": ["-h", "--help"]},
|
|
15
15
|
)
|
|
@@ -60,6 +60,21 @@ def sync_rules(
|
|
|
60
60
|
sync_svc.sync_rules(path, force=True)
|
|
61
61
|
|
|
62
62
|
|
|
63
|
+
@app.command("make")
|
|
64
|
+
def sync_make(
|
|
65
|
+
path: Path = typer.Option(
|
|
66
|
+
Path("."),
|
|
67
|
+
"--path",
|
|
68
|
+
help="Target repository root (default: cwd).",
|
|
69
|
+
file_okay=False,
|
|
70
|
+
dir_okay=True,
|
|
71
|
+
resolve_path=True,
|
|
72
|
+
),
|
|
73
|
+
) -> None:
|
|
74
|
+
"""Overwrite root Makefile/make.bat and installed platforms' run.sh/run.bat."""
|
|
75
|
+
sync_svc.sync_make(path, force=True)
|
|
76
|
+
|
|
77
|
+
|
|
63
78
|
@app.command("all")
|
|
64
79
|
def sync_all(
|
|
65
80
|
path: Path = typer.Option(
|
|
@@ -71,5 +86,5 @@ def sync_all(
|
|
|
71
86
|
resolve_path=True,
|
|
72
87
|
),
|
|
73
88
|
) -> None:
|
|
74
|
-
"""Sync AGENTS.md → CLAUDE.md, skills, and
|
|
89
|
+
"""Sync AGENTS.md → CLAUDE.md, skills, rules, make files, and platform run scripts."""
|
|
75
90
|
sync_svc.sync_all(path, force=True)
|
|
@@ -40,7 +40,9 @@ browser-extension/ # yj-browser-extension
|
|
|
40
40
|
- `backend/proto/` is reserved (see yj-backend-msa).
|
|
41
41
|
- `browser-extension/native_{name}/` → **yj-backend-service**.
|
|
42
42
|
- Do not invent new platform roots or put app code at repo root.
|
|
43
|
-
- Do not add per-service `scripts/` or edit root Makefile for each new service.
|
|
43
|
+
- Do not add per-service `scripts/` or edit root Makefile for each new service/platform.
|
|
44
|
+
Root `make <platform>` starts all services under that platform (concurrent); `NAME=<service>` runs one.
|
|
45
|
+
Platforms are discovered via `*/scripts/run.sh`; services via sibling dirs (no script edits on `add service`).
|
|
44
46
|
|
|
45
47
|
## Environment (guardrails only)
|
|
46
48
|
|
|
@@ -49,8 +51,12 @@ Allowed files at each service root (no plain `.env`):
|
|
|
49
51
|
`.env.local-dev` · `.env.development` · `.env.production` · `.env.examples`
|
|
50
52
|
|
|
51
53
|
- Do not invent alternate names (including Vite `.env` / `.env.local`) unless a thin loader maps to this set.
|
|
52
|
-
- Env field sets come from `templates/platform/<
|
|
53
|
-
- `
|
|
54
|
+
- Env field sets come from `templates/platform/envs/<kind>/` via platform mapping (`listen` / `worker` / `app`).
|
|
55
|
+
- `listen`: `backend` (PORT 8080), `frontend` (PORT 5173)
|
|
56
|
+
- `worker`: `backend-service`, `browser-extension/native_*` (HOST/PORT optional comments)
|
|
57
|
+
- `app`: `cli`, `mobile-app`, `pc-app`, `browser-extension` (NAME/VERSION only)
|
|
58
|
+
Do not invent fields/filenames outside those templates.
|
|
59
|
+
- `HOST`/`PORT` are required for `listen`. For `worker` they are optional — add only if needed.
|
|
54
60
|
- Commit `.env.examples` only; never commit the other three.
|
|
55
61
|
- Local platform `run.*` uses `.env.local-dev` only — do not hardcode HOST/PORT in scripts.
|
|
56
62
|
|
|
@@ -25,7 +25,7 @@ backend-service/
|
|
|
25
25
|
views/ # optional — only if SSR/templating enabled
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
`browser-extension/native_{name}/` uses the same roles and the
|
|
28
|
+
`browser-extension/native_{name}/` uses the same roles and the `worker` env templates as `backend-service`. Prefer calling it a native host service, not an MSA node, unless the user explicitly adopts MSA.
|
|
29
29
|
|
|
30
30
|
`HOST`/`PORT` are **optional** here — add them to `.env.*` only when the process actually listens.
|
|
31
31
|
|
|
@@ -17,7 +17,7 @@ Paths from `yjcli init` are fixed; add platform/app rows with `<path>` / `<role>
|
|
|
17
17
|
| `AGENTS.md` | Agent / contributor guide (this file) |
|
|
18
18
|
| `CLAUDE.md` | Mirror of `AGENTS.md` — do not edit; refresh with `yjcli sync agents` |
|
|
19
19
|
| `TOOLS.md` | Release-tools feature spec (version / deploy / git) |
|
|
20
|
-
| `Makefile` | Root run entry
|
|
20
|
+
| `Makefile` | Root run entry — `make <platform>` (all services) or `NAME=<service>` (one); platforms auto-discovered |
|
|
21
21
|
| `make.bat` | Windows counterpart of root Makefile |
|
|
22
22
|
| `.gitignore` | Canonical ignore rules |
|
|
23
23
|
| `.cursor/skills/` | Cursor skills (copied from package) |
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Platform targets are discovered from */scripts/run.sh (after yjcli add platform).
|
|
2
|
+
# Usage:
|
|
3
|
+
# make <platform> # all services under that platform (concurrent)
|
|
4
|
+
# make <platform> NAME=<service> # one service
|
|
5
|
+
|
|
6
|
+
PLATFORMS := $(patsubst %/scripts/run.sh,%,$(wildcard */scripts/run.sh))
|
|
7
|
+
|
|
8
|
+
.PHONY: help $(PLATFORMS)
|
|
9
|
+
|
|
10
|
+
help:
|
|
11
|
+
@echo "Usage:"
|
|
12
|
+
@echo " make <platform> # start all services concurrently"
|
|
13
|
+
@echo " make <platform> NAME=<service> # start one service"
|
|
14
|
+
@echo ""
|
|
15
|
+
@echo "Available platforms (dirs with scripts/run.sh):"
|
|
16
|
+
@if [ -z "$(PLATFORMS)" ]; then \
|
|
17
|
+
echo " (none — run: yjcli add platform)"; \
|
|
18
|
+
else \
|
|
19
|
+
for p in $(PLATFORMS); do echo " $$p"; done; \
|
|
20
|
+
fi
|
|
21
|
+
@echo ""
|
|
22
|
+
@echo "Example: make backend"
|
|
23
|
+
@echo " make backend NAME=api"
|
|
24
|
+
|
|
25
|
+
$(PLATFORMS):
|
|
26
|
+
@test -x "$@/scripts/run.sh" || (echo "missing: $@/scripts/run.sh"; exit 1)
|
|
27
|
+
@if [ -n "$(NAME)" ]; then \
|
|
28
|
+
"$@/scripts/run.sh" "$(NAME)" $(ARGS); \
|
|
29
|
+
else \
|
|
30
|
+
"$@/scripts/run.sh" $(ARGS); \
|
|
31
|
+
fi
|
|
@@ -51,11 +51,12 @@ Out of scope: app business logic, scaffold of product code, editor agent rules (
|
|
|
51
51
|
| ID | Requirement |
|
|
52
52
|
|----|-------------|
|
|
53
53
|
| S1 | No secrets in git. Tokens only via I9/I10/I11. |
|
|
54
|
-
| S2 | Destructive steps (publish, push, tag) require explicit confirmation
|
|
55
|
-
| S3 | User can abort the whole flow with
|
|
54
|
+
| S2 | Destructive steps (publish, push, tag) require **explicit** confirmation (`y`/`n`). No default answer. |
|
|
55
|
+
| S3 | User can abort the whole flow with `exit` on any prompt (clean exit). |
|
|
56
56
|
| S4 | Steps are logged with clear section boundaries (readable in a terminal). |
|
|
57
57
|
| S5 | Missing config/secrets → fail with actionable message (what to set, where). |
|
|
58
58
|
| S6 | Do not force-overwrite existing git tags matching I12 unless the project explicitly opts in (default: **fail**). |
|
|
59
|
+
| S7 | Interactive answers: yes/no prompts accept only `y`/`n`/`exit` (also `yes`/`no`). Empty or other input → **re-ask** (never treat Enter as No/Yes). Free-text prompts: empty → re-ask unless the step allows empty; `exit` cancels. |
|
|
59
60
|
|
|
60
61
|
---
|
|
61
62
|
|
|
@@ -69,7 +70,7 @@ Out of scope: app business logic, scaffold of product code, editor agent rules (
|
|
|
69
70
|
| V2 | Support bumps: `major` → `X+1.0.0`, `minor` → `X.Y+1.0`, `fix` → `X.Y.Z+1`. |
|
|
70
71
|
| V3 | After bump, write I2; if I3 is non-empty, update those to the same version. |
|
|
71
72
|
| V4 | Optional: show latest version from production target I7 when query is possible; if unavailable, warn and continue. |
|
|
72
|
-
| V5 | Interactive bump: ask whether to bump; if yes, ask `major`/`minor`/`fix` (invalid/empty → re-ask; cancel per S3). |
|
|
73
|
+
| V5 | Interactive bump: ask whether to bump (S7); if yes, ask `major`/`minor`/`fix` (invalid/empty → re-ask; cancel per S3). |
|
|
73
74
|
| V6 | Non-interactive mode (optional): accept bump kind via flags/env; do not hang on stdin. |
|
|
74
75
|
|
|
75
76
|
### 3.2 Acceptance
|
|
@@ -88,14 +89,14 @@ Out of scope: app business logic, scaffold of product code, editor agent rules (
|
|
|
88
89
|
| D1 | **Test**: run project-defined verification before publish (unit/smoke/e2e — project chooses). Fail stops the pipeline. |
|
|
89
90
|
| D2 | **Build**: produce publishable artifact(s) for I7 (and I8 if used). |
|
|
90
91
|
| D3 | **Validate** (recommended): dry-run or registry check when the ecosystem supports it. |
|
|
91
|
-
| D4 | **Confirm** then **Publish** to I7 using I10.
|
|
92
|
+
| D4 | **Confirm** then **Publish** to I7 using I10. Confirm per S7 (`y`/`n`/`exit`; no default). |
|
|
92
93
|
| D5 | Provide a **staging path** when I8 exists: publish to I8 without requiring a version bump or git push (unless project opts in). |
|
|
93
94
|
| D6 | Production path may optionally chain into C3 after successful publish (project chooses). |
|
|
94
95
|
|
|
95
96
|
### 4.2 Acceptance
|
|
96
97
|
|
|
97
98
|
- Failed D1 or D2 → no publish.
|
|
98
|
-
-
|
|
99
|
+
- Confirm `n` → no publish, abort. Confirm empty/garbage → re-ask. `exit` → clean cancel.
|
|
99
100
|
- Missing I10 → fail per S5.
|
|
100
101
|
|
|
101
102
|
---
|
|
@@ -108,15 +109,16 @@ Out of scope: app business logic, scaffold of product code, editor agent rules (
|
|
|
108
109
|
|----|----------|
|
|
109
110
|
| G1 | Operate only on git root I4. |
|
|
110
111
|
| G2 | Show status: branch, remote I6, current version (I2), whether tag I12(version) exists. |
|
|
111
|
-
| G3 | **Commit
|
|
112
|
-
| G4 | **Tag**: create tag from I12 + current I2 version; if exists → fail (S6). |
|
|
113
|
-
| G5 | **Push**: push current branch + new tag to I6. |
|
|
112
|
+
| G3 | **Commit**: if working tree dirty, ask to commit (S7). `n` or cancel → **stop** (no tag/push). Require non-empty message. If clean, proceed without a new commit. |
|
|
113
|
+
| G4 | **Tag**: create tag from I12 + current I2 version; confirm per S7; if exists → fail (S6). |
|
|
114
|
+
| G5 | **Push**: confirm per S7, then push current branch + new tag to I6. |
|
|
114
115
|
| G6 | Auth: non-interactive for scripted use (PAT from I11 for HTTPS, or SSH agent). Do not open browser login flows in the happy path. |
|
|
115
116
|
| G7 | Never persist raw tokens into remote URLs in git config. |
|
|
116
117
|
|
|
117
118
|
### 5.2 Acceptance
|
|
118
119
|
|
|
119
|
-
- Clean tree + new version tag → tag created and pushed when confirmed.
|
|
120
|
+
- Clean tree + new version tag → tag created and pushed when confirmed (`y`).
|
|
121
|
+
- Dirty tree + commit declined (`n`) → no tag, no push.
|
|
120
122
|
- Existing tag → fail, no force-push by default.
|
|
121
123
|
- Missing I11 when HTTPS PAT is required → fail per S5.
|
|
122
124
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal EnableExtensions EnableDelayedExpansion
|
|
3
|
+
|
|
4
|
+
if /I "%~1"=="" goto help
|
|
5
|
+
if /I "%~1"=="help" goto help
|
|
6
|
+
|
|
7
|
+
set "PLATFORM=%~1"
|
|
8
|
+
if not exist "%PLATFORM%\scripts\run.bat" (
|
|
9
|
+
echo Unknown target: %PLATFORM%
|
|
10
|
+
echo Expected: %PLATFORM%\scripts\run.bat ^(yjcli add platform^)
|
|
11
|
+
exit /b 1
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
set "NAME="
|
|
15
|
+
shift
|
|
16
|
+
:parse
|
|
17
|
+
if "%~1"=="" goto run_exec
|
|
18
|
+
set "ARG=%~1"
|
|
19
|
+
if /I "%ARG:~0,5%"=="NAME=" set "NAME=%ARG:~5%"
|
|
20
|
+
shift
|
|
21
|
+
goto parse
|
|
22
|
+
|
|
23
|
+
:run_exec
|
|
24
|
+
if "%NAME%"=="" (
|
|
25
|
+
call "%PLATFORM%\scripts\run.bat"
|
|
26
|
+
) else (
|
|
27
|
+
call "%PLATFORM%\scripts\run.bat" "%NAME%"
|
|
28
|
+
)
|
|
29
|
+
exit /b %ERRORLEVEL%
|
|
30
|
+
|
|
31
|
+
:help
|
|
32
|
+
echo Usage:
|
|
33
|
+
echo make.bat ^<platform^> # all services ^(separate windows^)
|
|
34
|
+
echo make.bat ^<platform^> NAME=^<service^> # one service
|
|
35
|
+
echo.
|
|
36
|
+
echo Available platforms (dirs with scripts\run.bat):
|
|
37
|
+
set "FOUND="
|
|
38
|
+
for /d %%D in (*) do (
|
|
39
|
+
if exist "%%D\scripts\run.bat" (
|
|
40
|
+
echo %%D
|
|
41
|
+
set "FOUND=1"
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
if not defined FOUND echo ^(none — run: yjcli add platform^)
|
|
45
|
+
echo.
|
|
46
|
+
echo Example: make.bat backend
|
|
47
|
+
echo make.bat backend NAME=api
|
|
48
|
+
exit /b 0
|
|
@@ -3,14 +3,7 @@ setlocal EnableExtensions EnableDelayedExpansion
|
|
|
3
3
|
set "PLATFORM_DIR=%~dp0.."
|
|
4
4
|
cd /d "%PLATFORM_DIR%"
|
|
5
5
|
|
|
6
|
-
if "%~1"==""
|
|
7
|
-
echo Usage: scripts\run.bat ^<service_name^> [args...]
|
|
8
|
-
echo Available services:
|
|
9
|
-
for /d %%D in (*) do (
|
|
10
|
-
if /I not "%%~nxD"=="scripts" if /I not "%%~nxD"=="proto" echo %%~nxD
|
|
11
|
-
)
|
|
12
|
-
exit /b 1
|
|
13
|
-
)
|
|
6
|
+
if "%~1"=="" goto run_all
|
|
14
7
|
|
|
15
8
|
set "NAME=%~1"
|
|
16
9
|
shift
|
|
@@ -41,12 +34,12 @@ for /f "usebackq tokens=1* delims==" %%A in (`findstr /R "^[A-Za-z_][A-Za-z0-9_]
|
|
|
41
34
|
set "%%A=%%B"
|
|
42
35
|
)
|
|
43
36
|
|
|
44
|
-
echo env: %ENV_FILE%
|
|
37
|
+
echo [%NAME%] env: %ENV_FILE%
|
|
45
38
|
|
|
46
39
|
if defined PORT (
|
|
47
40
|
call :kill_by_port %PORT%
|
|
48
41
|
) else (
|
|
49
|
-
echo PORT unset in .env.local-dev; using pidfile fallback
|
|
42
|
+
echo [%NAME%] PORT unset in .env.local-dev; using pidfile fallback
|
|
50
43
|
)
|
|
51
44
|
call :kill_by_pidfile
|
|
52
45
|
|
|
@@ -65,9 +58,27 @@ if exist "package.json" (
|
|
|
65
58
|
exit /b %ERRORLEVEL%
|
|
66
59
|
)
|
|
67
60
|
|
|
68
|
-
echo
|
|
61
|
+
echo [%NAME%] exists but has no run convention yet.
|
|
69
62
|
exit /b 1
|
|
70
63
|
|
|
64
|
+
:run_all
|
|
65
|
+
set "ANY="
|
|
66
|
+
for /d %%D in (*) do (
|
|
67
|
+
if /I not "%%~nxD"=="scripts" if /I not "%%~nxD"=="proto" (
|
|
68
|
+
if exist "%%D\.env.local-dev" (
|
|
69
|
+
echo starting %%~nxD
|
|
70
|
+
start "%%~nxD" cmd /c "cd /d "%PLATFORM_DIR%" && call scripts\run.bat %%~nxD"
|
|
71
|
+
set "ANY=1"
|
|
72
|
+
)
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
if not defined ANY (
|
|
76
|
+
echo no services under %PLATFORM_DIR% ^(run: yjcli add service^)
|
|
77
|
+
exit /b 1
|
|
78
|
+
)
|
|
79
|
+
echo All services started in separate windows.
|
|
80
|
+
exit /b 0
|
|
81
|
+
|
|
71
82
|
:kill_by_port
|
|
72
83
|
set "KPORT=%~1"
|
|
73
84
|
for /f "tokens=5" %%P in ('netstat -ano ^| findstr /R ":%KPORT% .*LISTENING"') do (
|