packwise-skills 1.1.0 → 1.2.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.
- package/.cursorrules +1 -1
- package/CLAUDE.md +1 -1
- package/LICENSE +21 -0
- package/README.md +130 -53
- package/bin/packwise.js +131 -25
- package/install.sh +51 -17
- package/package.json +1 -1
- package/skill.md +313 -88
package/.cursorrules
CHANGED
|
@@ -6,7 +6,7 @@ This project contains a universal build & packaging skill set for AI-assisted de
|
|
|
6
6
|
|
|
7
7
|
## Instructions
|
|
8
8
|
|
|
9
|
-
1. Read `skill.md` — it contains the complete
|
|
9
|
+
1. Read `skill.md` — it contains the complete 9-step workflow
|
|
10
10
|
2. Scan the user's project first (framework, language, dependencies)
|
|
11
11
|
3. Ask the user key questions (platform, architecture, signing, protection)
|
|
12
12
|
4. Recommend the BEST approach with reasoning + alternatives
|
package/CLAUDE.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
When the user asks to **build, package, distribute, or ship** any software project:
|
|
6
6
|
|
|
7
|
-
1. Read `skill.md` for the complete
|
|
7
|
+
1. Read `skill.md` for the complete 9-step workflow
|
|
8
8
|
2. Follow the workflow exactly — do not skip steps
|
|
9
9
|
3. After building, always run the mandatory security audit
|
|
10
10
|
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Thomas520TOM
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -22,64 +22,106 @@
|
|
|
22
22
|
<img src="https://img.shields.io/badge/tested-10-success?style=flat-square" alt="tested">
|
|
23
23
|
</a>
|
|
24
24
|
<a href="#installation">
|
|
25
|
-
<img src="https://img.shields.io/badge/works%20with-Claude%20Code%20%7C%20OpenCode%20%7C%
|
|
25
|
+
<img src="https://img.shields.io/badge/works%20with-Claude%20Code%20%7C%20Cursor%20%7C%20OpenCode%20%7C%20Copilot-yellow?style=flat-square" alt="works with">
|
|
26
26
|
</a>
|
|
27
27
|
</p>
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
**Packwise** is a universal build & packaging skill
|
|
31
|
+
**Packwise** is a universal build & packaging skill pack that gives your AI a structured, consultant-grade workflow — scanning, recommending, and executing builds with mandatory security audits across 20+ platforms.
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
35
|
## Why This Exists
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Most AI coding assistants treat build as an afterthought — they suggest a command and hope for the best. **Packwise** gives your AI a real packaging workflow.
|
|
38
38
|
|
|
39
39
|
<div align="center">
|
|
40
40
|
|
|
41
41
|
| Without Packwise | With Packwise |
|
|
42
42
|
|:---:|:---:|
|
|
43
|
-
| `
|
|
43
|
+
| `npm run build` and pray | Scans project, identifies framework/version, recommends with reasoning |
|
|
44
44
|
| No security checks | Mandatory credential scan, `.env` detection, source map cleanup |
|
|
45
|
-
|
|
|
46
|
-
| One-shot
|
|
47
|
-
| No post-build verification | Mandatory audit: credentials, integrity, file structure |
|
|
45
|
+
| Ignores platform specifics | Asks target platform, arch, signing, output upfront |
|
|
46
|
+
| One-shot, no follow-up | Recommend → confirm → execute, with alternatives |
|
|
48
47
|
|
|
49
48
|
</div>
|
|
50
49
|
|
|
51
50
|
---
|
|
52
51
|
|
|
52
|
+
## Quick Demo
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
You: > package my Electron app for Windows and macOS
|
|
56
|
+
|
|
57
|
+
AI: Scan Results:
|
|
58
|
+
- Framework: Electron 31 + React 18 + Express + SQLite
|
|
59
|
+
- Language: TypeScript | Complexity: L2
|
|
60
|
+
Is this correct? [Correct / Add / Exclude / Correct]
|
|
61
|
+
|
|
62
|
+
You: Correct
|
|
63
|
+
|
|
64
|
+
AI: [Popup] Target users? → General consumers
|
|
65
|
+
[Popup] Platform? → Windows + macOS
|
|
66
|
+
[Popup] Architecture? → Win x64 | macOS Universal
|
|
67
|
+
... (17 interactive questions via popups)
|
|
68
|
+
|
|
69
|
+
AI: RECOMMENDED: Electron 31 + electron-builder
|
|
70
|
+
Alternative A: Tauri (3-10MB, needs Rust rewrite)
|
|
71
|
+
Which approach? [Recommended / Alt A / Alt B / Custom]
|
|
72
|
+
|
|
73
|
+
You: 1
|
|
74
|
+
|
|
75
|
+
AI: FINAL BUILD PLAN | Reply 'yes' to start
|
|
76
|
+
|
|
77
|
+
You: yes
|
|
78
|
+
|
|
79
|
+
AI: [Popup] Logo? → /path/to/icon.png | Crop corners? → Yes
|
|
80
|
+
[Popup] Output? → ./release/
|
|
81
|
+
[Popup] Config changes: [1] Add electron-builder.yml [2] ...
|
|
82
|
+
[Popup] Approve? → Approve all
|
|
83
|
+
|
|
84
|
+
AI: Building... Done
|
|
85
|
+
Audit: No credentials, no .env, no .map
|
|
86
|
+
Output:
|
|
87
|
+
MyApp-v1.0.0-windows-x64.exe
|
|
88
|
+
MyApp-v1.0.0-macos-universal.dmg
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
53
93
|
## How It Works
|
|
54
94
|
|
|
55
|
-
|
|
95
|
+
A **9-step build workflow**:
|
|
56
96
|
|
|
57
97
|
| Step | Action | Result |
|
|
58
98
|
|:----:|--------|--------|
|
|
59
99
|
| **1** | **Scan** — detect framework, language, dependencies, `.env` files | Project analysis |
|
|
60
|
-
| **2** | **Intake** —
|
|
100
|
+
| **2** | **Intake** — build overview confirmation, then 18 questions (some per-platform) | User preferences |
|
|
61
101
|
| **3** | **Analyze** — combine scan + answers + online research (if needed) | Strategy options |
|
|
62
102
|
| **4** | **Recommend** — present best approach with reasoning + alternatives | Decision support |
|
|
63
103
|
| **5** | **Confirm** — user selects, final build plan generated | Confirmed plan |
|
|
64
|
-
| **6** | **
|
|
65
|
-
| **7** | **
|
|
66
|
-
| **8** | **
|
|
104
|
+
| **6** | **Prepare** — detect config gaps, propose fixes, user approves each | Ready-to-build project |
|
|
105
|
+
| **7** | **Execute** — load sub-skill, run build commands | Installers / packages |
|
|
106
|
+
| **8** | **Audit** — credentials, `.env`, `.map`, package integrity | Security report |
|
|
107
|
+
| **9** | **Report** — structured final build report | Delivery |
|
|
67
108
|
|
|
68
109
|
---
|
|
69
110
|
|
|
70
111
|
## Key Advantages
|
|
71
112
|
|
|
72
|
-
|
|
113
|
+
What makes Packwise different from a generic build command:
|
|
73
114
|
|
|
74
115
|
| Capability | What It Means |
|
|
75
116
|
|------------|---------------|
|
|
76
|
-
| **44 sub-skills** |
|
|
117
|
+
| **44 sub-skills** | Platform-specific knowledge, not generic advice |
|
|
77
118
|
| **20+ platforms** | Desktop, mobile, web, backend, AI/ML, CLI, plugins, embedded, cloud |
|
|
78
119
|
| **Mandatory security** | Every build ends with a credential and integrity audit |
|
|
79
|
-
| **Consultant workflow** |
|
|
120
|
+
| **Consultant workflow** | Recommends, confirms, then executes — no auto-builds |
|
|
80
121
|
| **Version-verified** | Build commands checked against npm, PyPI, crates.io, official registries |
|
|
81
|
-
| **
|
|
82
|
-
| **
|
|
122
|
+
| **Selective install** | Install only the skills you need via `--only` |
|
|
123
|
+
| **11 agents** | Claude Code, Cursor, OpenCode, Copilot, and 7 more |
|
|
124
|
+
| **Interactive Q&A** | All questions via popup UI, not text dumps |
|
|
83
125
|
|
|
84
126
|
---
|
|
85
127
|
|
|
@@ -124,36 +166,50 @@ Then invoke in your AI agent:
|
|
|
124
166
|
> package my Electron app for Windows
|
|
125
167
|
```
|
|
126
168
|
|
|
169
|
+
### Updating
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npx packwise-skills update
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
This automatically detects your installation method and updates to the latest version.
|
|
176
|
+
|
|
127
177
|
---
|
|
128
178
|
|
|
129
179
|
### Selective Installation
|
|
130
180
|
|
|
131
|
-
|
|
181
|
+
Install only the sub-skills you need with `--only`. Core files (`skill.md`, `audit.md`, `CLAUDE.md`) are always installed.
|
|
132
182
|
|
|
183
|
+
**By category:**
|
|
133
184
|
```bash
|
|
134
|
-
# Desktop + Mobile only
|
|
135
185
|
npx packwise-skills --only desktop,mobile
|
|
136
|
-
|
|
137
|
-
# Backend + Cloud only
|
|
138
186
|
npx packwise-skills --only backend,cloud
|
|
187
|
+
```
|
|
139
188
|
|
|
140
|
-
|
|
141
|
-
|
|
189
|
+
**By specific framework:**
|
|
190
|
+
```bash
|
|
191
|
+
npx packwise-skills --only electron,tauri,react-native
|
|
192
|
+
npx packwise-skills --only docker,kubernetes
|
|
142
193
|
```
|
|
143
194
|
|
|
144
|
-
|
|
195
|
+
**Mix both:**
|
|
196
|
+
```bash
|
|
197
|
+
npx packwise-skills --only electron,mobile
|
|
198
|
+
```
|
|
145
199
|
|
|
200
|
+
Works with curl too:
|
|
146
201
|
```bash
|
|
147
|
-
curl -fsSL https://raw.githubusercontent.com/Thomas520TOM/packwise-skills/main/install.sh | bash -s -- --only
|
|
202
|
+
curl -fsSL https://raw.githubusercontent.com/Thomas520TOM/packwise-skills/main/install.sh | bash -s -- --only electron,mobile
|
|
148
203
|
```
|
|
149
204
|
|
|
150
|
-
**
|
|
151
|
-
|
|
205
|
+
**Categories:** `desktop` `mobile` `web` `backend` `ai` `cli` `plugins` `embedded` `security` `cloud` `cross-platform`
|
|
206
|
+
|
|
207
|
+
**Frameworks:** `electron` `tauri` `android` `ios` `react-native` `flutter-mobile` `docker` `kubernetes` `spa` `ssr` and [more](bin/packwise.js)
|
|
152
208
|
|
|
153
209
|
---
|
|
154
210
|
|
|
155
211
|
<details>
|
|
156
|
-
<summary><strong>Other AI tools</strong> — OpenCode, Cursor,
|
|
212
|
+
<summary><strong>Other AI tools</strong> — OpenCode, Cursor, Codex CLI, OpenClaw, WorkBuddy, Trae, Hermes, GitHub Copilot</summary>
|
|
157
213
|
|
|
158
214
|
**OpenCode** — copy to `.opencode/skills/packwise/` and reference in prompts:
|
|
159
215
|
```bash
|
|
@@ -164,6 +220,24 @@ cp -r sub-skills/ .opencode/skills/packwise/
|
|
|
164
220
|
|
|
165
221
|
**Cursor** — add to `.cursor/skills/` or reference via `@packwise` in prompts.
|
|
166
222
|
|
|
223
|
+
**Codex CLI** — copy to project root as `PACKWISE.md` (auto-read as context).
|
|
224
|
+
|
|
225
|
+
**OpenClaw** — copy to `.openclaw/skills/packwise/` and reference in prompts:
|
|
226
|
+
```bash
|
|
227
|
+
mkdir -p .openclaw/skills/packwise/
|
|
228
|
+
cp skill.md audit.md .openclaw/skills/packwise/
|
|
229
|
+
cp -r sub-skills/ .openclaw/skills/packwise/
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**WorkBuddy** — copy to `~/.workbuddy/skills/` or use `/project:packwise`.
|
|
233
|
+
|
|
234
|
+
**Trae** — copy to `.trae/skills/packwise/` and reference in prompts:
|
|
235
|
+
```bash
|
|
236
|
+
mkdir -p .trae/skills/packwise/
|
|
237
|
+
cp skill.md audit.md .trae/skills/packwise/
|
|
238
|
+
cp -r sub-skills/ .trae/skills/packwise/
|
|
239
|
+
```
|
|
240
|
+
|
|
167
241
|
**Hermes / LangChain Agents** — add to `hermes.config.yaml`:
|
|
168
242
|
```yaml
|
|
169
243
|
skills:
|
|
@@ -171,9 +245,12 @@ skills:
|
|
|
171
245
|
name: packwise
|
|
172
246
|
```
|
|
173
247
|
|
|
174
|
-
**
|
|
175
|
-
|
|
176
|
-
|
|
248
|
+
**GitHub Copilot** — copy to `.copilot/skills/packwise/` and reference in prompts:
|
|
249
|
+
```bash
|
|
250
|
+
mkdir -p .copilot/skills/packwise/
|
|
251
|
+
cp skill.md audit.md .copilot/skills/packwise/
|
|
252
|
+
cp -r sub-skills/ .copilot/skills/packwise/
|
|
253
|
+
```
|
|
177
254
|
|
|
178
255
|
**Any LLM agent** — copy `skill.md` + `sub-skills/` to your project and prompt:
|
|
179
256
|
```
|
|
@@ -209,35 +286,35 @@ Full instructions: [INSTALL.md](INSTALL.md)
|
|
|
209
286
|
```
|
|
210
287
|
skill.md (Main Orchestrator)
|
|
211
288
|
│
|
|
212
|
-
├─
|
|
289
|
+
├─ 1. Scan ─────────── Detect framework, language, deps, env
|
|
290
|
+
│
|
|
291
|
+
├─ 2. Intake ────────── Build overview → confirm scope → ask 18 questions
|
|
213
292
|
│
|
|
214
|
-
├─
|
|
215
|
-
│ ├─ Part A: Project Summary ← scan results displayed
|
|
216
|
-
│ ├─ Part B: Questions ← interactive options with defaults
|
|
217
|
-
│ └─ Part C: Confirmation ← summary table for user approval
|
|
293
|
+
├─ 3. Analyze ───────── Combine scan + answers + online research
|
|
218
294
|
│
|
|
219
|
-
├─
|
|
295
|
+
├─ 4. Recommend ⭐ ──── Best approach + alternatives + reasoning
|
|
220
296
|
│
|
|
221
|
-
├─
|
|
297
|
+
├─ 5. Confirm ───────── User selects → final build plan
|
|
222
298
|
│
|
|
223
|
-
├─
|
|
299
|
+
├─ 6. Prepare ───────── Logo + output location → detect config gaps → user approves
|
|
224
300
|
│
|
|
225
|
-
├─
|
|
226
|
-
│
|
|
227
|
-
│ ├─
|
|
228
|
-
│ ├─
|
|
229
|
-
│ ├─
|
|
230
|
-
│ ├─
|
|
231
|
-
│ ├─
|
|
232
|
-
│ ├─
|
|
233
|
-
│ ├─
|
|
234
|
-
│ ├─
|
|
235
|
-
│ ├─
|
|
236
|
-
│
|
|
301
|
+
├─ 7. Execute ───────── Load sub-skill → run platform-specific build
|
|
302
|
+
│ │
|
|
303
|
+
│ ├─ desktop/ ──────── Electron, Tauri, Qt, Flutter Desktop, games, VR
|
|
304
|
+
│ ├─ mobile/ ───────── Android, iOS, HarmonyOS, Flutter, React Native
|
|
305
|
+
│ ├─ web/ ──────────── Vite, Next.js, PWA, Serverless, WASM
|
|
306
|
+
│ ├─ backend/ ──────── Node.js, Python, Go, Rust, Java, PHP
|
|
307
|
+
│ ├─ ai/ ───────────── PyTorch, Ollama, llama.cpp, vLLM
|
|
308
|
+
│ ├─ cli/ ──────────── PyInstaller, npm/PyPI publishing
|
|
309
|
+
│ ├─ plugins/ ──────── Chrome, VS Code, JetBrains
|
|
310
|
+
│ ├─ embedded/ ─────── ESP32, STM32, ROS, car infotainment
|
|
311
|
+
│ ├─ cloud/ ────────── Docker, Kubernetes, CI/CD
|
|
312
|
+
│ ├─ security/ ─────── Pentest tools, scanners
|
|
313
|
+
│ └─ cross-platform/ ─ .NET MAUI, Kotlin Multiplatform
|
|
237
314
|
│
|
|
238
|
-
├─
|
|
315
|
+
├─ 8. Audit 🔒 ──────── Credentials, .env, .map, package integrity
|
|
239
316
|
│
|
|
240
|
-
└─
|
|
317
|
+
└─ 9. Report ────────── Structured final build report
|
|
241
318
|
```
|
|
242
319
|
|
|
243
320
|
---
|
package/bin/packwise.js
CHANGED
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Packwise CLI — Universal installer for AI agent build skills
|
|
5
5
|
*
|
|
6
|
-
* Detects installed AI agents and copies skill files to the right location.
|
|
7
|
-
*
|
|
8
6
|
* Usage:
|
|
9
|
-
* npx packwise-skills
|
|
10
|
-
* npx packwise-skills
|
|
11
|
-
* npx packwise-skills --only
|
|
12
|
-
* npx packwise-skills
|
|
13
|
-
* npx packwise-skills
|
|
7
|
+
* npx packwise-skills # Install all skills
|
|
8
|
+
* npx packwise-skills --only desktop,mobile # By category
|
|
9
|
+
* npx packwise-skills --only electron,react-native # By specific framework
|
|
10
|
+
* npx packwise-skills --only electron,mobile # Mix both
|
|
11
|
+
* npx packwise-skills uninstall # Remove
|
|
12
|
+
* npx packwise-skills list # Show installed
|
|
13
|
+
* npx packwise-skills update # Update to latest version
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* desktop, mobile, web, backend, ai, cli, plugins, embedded, security, cloud, cross-platform
|
|
15
|
+
* Categories: desktop, mobile, web, backend, ai, cli, plugins, embedded, security, cloud, cross-platform
|
|
17
16
|
*/
|
|
18
17
|
|
|
19
18
|
const fs = require('fs');
|
|
@@ -21,7 +20,23 @@ const path = require('path');
|
|
|
21
20
|
const os = require('os');
|
|
22
21
|
|
|
23
22
|
const CORE_FILES = ['skill.md', 'audit.md', 'CLAUDE.md'];
|
|
24
|
-
|
|
23
|
+
|
|
24
|
+
const CATEGORY_MAP = {
|
|
25
|
+
desktop: ['electron', 'tauri', 'native-app', 'web-to-desktop', 'game-dev', 'vr-ar', 'smart-platforms', 'scenarios'],
|
|
26
|
+
mobile: ['android', 'ios', 'harmonyos', 'flutter-mobile', 'react-native', 'capacitor', 'wearables'],
|
|
27
|
+
web: ['spa', 'ssr', 'pwa', 'serverless-edge', 'monorepo', 'wasm'],
|
|
28
|
+
backend: ['node-server', 'python-server', 'go-server', 'rust-backend', 'java-spring', 'php-laravel'],
|
|
29
|
+
ai: ['python-ml', 'local-llm'],
|
|
30
|
+
cli: ['python-cli', 'sdk-library'],
|
|
31
|
+
plugins: ['browser-extension', 'vscode-extension', 'jetbrains-plugin'],
|
|
32
|
+
embedded: ['esp32', 'stm32', 'ros', 'car-infotainment'],
|
|
33
|
+
security: ['security-tools'],
|
|
34
|
+
cloud: ['docker', 'kubernetes', 'ci-cd-pipelines', 'payment-integration'],
|
|
35
|
+
'cross-platform': ['multiplatform'],
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const ALL_CATEGORIES = Object.keys(CATEGORY_MAP);
|
|
39
|
+
const ALL_FRAMEWORKS = Object.values(CATEGORY_MAP).flat();
|
|
25
40
|
const HOME = os.homedir();
|
|
26
41
|
const CWD = process.cwd();
|
|
27
42
|
|
|
@@ -58,21 +73,76 @@ const AGENTS = [
|
|
|
58
73
|
projectDir: path.join(CWD, 'skills', 'packwise'),
|
|
59
74
|
installTarget: 'project',
|
|
60
75
|
},
|
|
76
|
+
{
|
|
77
|
+
name: 'OpenClaw',
|
|
78
|
+
detect: () => fs.existsSync(path.join(HOME, '.openclaw')) || fs.existsSync(path.join(CWD, '.openclaw')),
|
|
79
|
+
projectDir: path.join(CWD, '.openclaw', 'skills', 'packwise'),
|
|
80
|
+
installTarget: 'project',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'WorkBuddy',
|
|
84
|
+
detect: () => fs.existsSync(path.join(HOME, '.workbuddy')) || fs.existsSync(path.join(CWD, '.workbuddy')),
|
|
85
|
+
userDir: path.join(HOME, '.workbuddy', 'skills', 'packwise'),
|
|
86
|
+
projectDir: path.join(CWD, '.workbuddy', 'skills', 'packwise'),
|
|
87
|
+
installTarget: 'user',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Trae',
|
|
91
|
+
detect: () => fs.existsSync(path.join(HOME, '.trae')) || fs.existsSync(path.join(CWD, '.trae')),
|
|
92
|
+
projectDir: path.join(CWD, '.trae', 'skills', 'packwise'),
|
|
93
|
+
installTarget: 'project',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'Codex CLI',
|
|
97
|
+
detect: () => false, // No directory marker; user must manually place PACKWISE.md
|
|
98
|
+
projectDir: path.join(CWD, 'skills', 'packwise'),
|
|
99
|
+
installTarget: 'project',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'Hermes',
|
|
103
|
+
detect: () => fs.existsSync(path.join(CWD, 'hermes.config.yaml')) || fs.existsSync(path.join(CWD, 'hermes.config.yml')),
|
|
104
|
+
projectDir: path.join(CWD, 'skills', 'packwise'),
|
|
105
|
+
installTarget: 'project',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'GitHub Copilot',
|
|
109
|
+
detect: () => fs.existsSync(path.join(CWD, '.copilot')) || fs.existsSync(path.join(HOME, '.copilot')),
|
|
110
|
+
projectDir: path.join(CWD, '.copilot', 'skills', 'packwise'),
|
|
111
|
+
installTarget: 'project',
|
|
112
|
+
},
|
|
61
113
|
];
|
|
62
114
|
|
|
63
|
-
// Parse --only flag
|
|
115
|
+
// Parse --only flag (supports categories and individual frameworks)
|
|
64
116
|
const onlyIndex = process.argv.indexOf('--only');
|
|
65
|
-
const
|
|
117
|
+
const onlyRaw = onlyIndex !== -1
|
|
66
118
|
? process.argv[onlyIndex + 1]?.split(',').map(c => c.trim().toLowerCase())
|
|
67
119
|
: null;
|
|
68
120
|
|
|
69
|
-
|
|
70
|
-
|
|
121
|
+
// Resolve to list of frameworks to install
|
|
122
|
+
let onlyFrameworks = null;
|
|
123
|
+
let onlyLabels = [];
|
|
124
|
+
|
|
125
|
+
if (onlyRaw) {
|
|
126
|
+
const invalid = onlyRaw.filter(c => !ALL_CATEGORIES.includes(c) && !ALL_FRAMEWORKS.includes(c));
|
|
71
127
|
if (invalid.length) {
|
|
72
|
-
console.log(`\n Unknown
|
|
73
|
-
console.log(
|
|
128
|
+
console.log(`\n Unknown: ${invalid.join(', ')}`);
|
|
129
|
+
console.log(`\n Categories: ${ALL_CATEGORIES.join(', ')}`);
|
|
130
|
+
console.log(` Frameworks: ${ALL_FRAMEWORKS.join(', ')}\n`);
|
|
74
131
|
process.exit(1);
|
|
75
132
|
}
|
|
133
|
+
|
|
134
|
+
onlyFrameworks = new Set();
|
|
135
|
+
for (const item of onlyRaw) {
|
|
136
|
+
if (ALL_CATEGORIES.includes(item)) {
|
|
137
|
+
// Expand category to all its frameworks
|
|
138
|
+
CATEGORY_MAP[item].forEach(f => onlyFrameworks.add(f));
|
|
139
|
+
onlyLabels.push(item);
|
|
140
|
+
} else {
|
|
141
|
+
// Individual framework
|
|
142
|
+
onlyFrameworks.add(item);
|
|
143
|
+
onlyLabels.push(item);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
76
146
|
}
|
|
77
147
|
|
|
78
148
|
// Parse command (skip --only and its value)
|
|
@@ -120,12 +190,18 @@ function installTo(target) {
|
|
|
120
190
|
// Copy sub-skills
|
|
121
191
|
const subSkillsSrc = path.join(sourceDir, 'sub-skills');
|
|
122
192
|
if (fs.existsSync(subSkillsSrc)) {
|
|
123
|
-
if (
|
|
124
|
-
// Selective install
|
|
125
|
-
for (const cat of
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
193
|
+
if (onlyFrameworks) {
|
|
194
|
+
// Selective install by individual framework
|
|
195
|
+
for (const cat of ALL_CATEGORIES) {
|
|
196
|
+
for (const fw of CATEGORY_MAP[cat]) {
|
|
197
|
+
if (onlyFrameworks.has(fw)) {
|
|
198
|
+
const fwSrc = path.join(subSkillsSrc, cat, fw + '.md');
|
|
199
|
+
if (fs.existsSync(fwSrc)) {
|
|
200
|
+
const destDir = path.join(target, 'sub-skills', cat);
|
|
201
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
202
|
+
fs.copyFileSync(fwSrc, path.join(destDir, fw + '.md'));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
129
205
|
}
|
|
130
206
|
}
|
|
131
207
|
} else {
|
|
@@ -139,8 +215,8 @@ function installTo(target) {
|
|
|
139
215
|
if (command === 'install' || command === undefined) {
|
|
140
216
|
console.log('\n Packwise — Universal Build & Packaging Skills\n');
|
|
141
217
|
|
|
142
|
-
if (
|
|
143
|
-
console.log(` Selective install: ${
|
|
218
|
+
if (onlyFrameworks) {
|
|
219
|
+
console.log(` Selective install: ${onlyLabels.join(', ')}`);
|
|
144
220
|
console.log(` (skill.md, audit.md, CLAUDE.md are always included)\n`);
|
|
145
221
|
}
|
|
146
222
|
|
|
@@ -209,8 +285,38 @@ else if (command === 'list') {
|
|
|
209
285
|
console.log('');
|
|
210
286
|
}
|
|
211
287
|
|
|
288
|
+
else if (command === 'update') {
|
|
289
|
+
console.log('\n Packwise — Update\n');
|
|
290
|
+
|
|
291
|
+
const { execSync } = require('child_process');
|
|
292
|
+
let updated = false;
|
|
293
|
+
|
|
294
|
+
for (const agent of AGENTS) {
|
|
295
|
+
const targets = [agent.userDir, agent.projectDir].filter(Boolean);
|
|
296
|
+
for (const target of targets) {
|
|
297
|
+
if (fs.existsSync(target) && fs.existsSync(path.join(target, '.git'))) {
|
|
298
|
+
console.log(` Updating ${agent.name}: ${target}`);
|
|
299
|
+
try {
|
|
300
|
+
execSync('git pull', { cwd: target, stdio: 'pipe' });
|
|
301
|
+
console.log(` ✓ Updated ${agent.name}`);
|
|
302
|
+
updated = true;
|
|
303
|
+
} catch (e) {
|
|
304
|
+
console.log(` ✗ Failed to update ${agent.name}: ${e.message}`);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (!updated) {
|
|
311
|
+
console.log(' No git-based installations found.');
|
|
312
|
+
console.log(' If installed via npm, run: npm update -g packwise-skills');
|
|
313
|
+
console.log(' If installed via curl, re-run the install script.');
|
|
314
|
+
}
|
|
315
|
+
console.log('');
|
|
316
|
+
}
|
|
317
|
+
|
|
212
318
|
else {
|
|
213
319
|
console.log(`\n Unknown command: ${command}`);
|
|
214
|
-
console.log(' Usage: npx packwise-skills [install|uninstall|list] [--only desktop,mobile]\n');
|
|
320
|
+
console.log(' Usage: npx packwise-skills [install|uninstall|list|update] [--only desktop,mobile]\n');
|
|
215
321
|
process.exit(1);
|
|
216
322
|
}
|
package/install.sh
CHANGED
|
@@ -4,6 +4,25 @@ set -e
|
|
|
4
4
|
REPO="https://github.com/Thomas520TOM/packwise-skills.git"
|
|
5
5
|
SKILL_NAME="packwise-skills"
|
|
6
6
|
|
|
7
|
+
# Category → Framework mapping
|
|
8
|
+
declare -A CAT_FW=(
|
|
9
|
+
[desktop]="electron tauri native-app web-to-desktop game-dev vr-ar smart-platforms scenarios"
|
|
10
|
+
[mobile]="android ios harmonyos flutter-mobile react-native capacitor wearables"
|
|
11
|
+
[web]="spa ssr pwa serverless-edge monorepo wasm"
|
|
12
|
+
[backend]="node-server python-server go-server rust-backend java-spring php-laravel"
|
|
13
|
+
[ai]="python-ml local-llm"
|
|
14
|
+
[cli]="python-cli sdk-library"
|
|
15
|
+
[plugins]="browser-extension vscode-extension jetbrains-plugin"
|
|
16
|
+
[embedded]="esp32 stm32 ros car-infotainment"
|
|
17
|
+
[security]="security-tools"
|
|
18
|
+
[cloud]="docker kubernetes ci-cd-pipelines payment-integration"
|
|
19
|
+
[cross-platform]="multiplatform"
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
ALL_CATEGORIES="${!CAT_FW[*]}"
|
|
23
|
+
ALL_FRAMEWORKS=""
|
|
24
|
+
for fw in "${CAT_FW[@]}"; do ALL_FRAMEWORKS="$ALL_FRAMEWORKS $fw"; done
|
|
25
|
+
|
|
7
26
|
# Parse --only flag
|
|
8
27
|
ONLY=""
|
|
9
28
|
for arg in "$@"; do
|
|
@@ -21,9 +40,8 @@ NC='\033[0m'
|
|
|
21
40
|
echo "🔧 Installing packwise-skills..."
|
|
22
41
|
echo ""
|
|
23
42
|
|
|
24
|
-
# Detect AI agent
|
|
43
|
+
# Detect AI agent
|
|
25
44
|
INSTALL_PATH=""
|
|
26
|
-
|
|
27
45
|
if [ -d "$HOME/.claude" ]; then
|
|
28
46
|
INSTALL_PATH="$HOME/.claude/skills/$SKILL_NAME"
|
|
29
47
|
AGENT="Claude Code (user-level)"
|
|
@@ -45,11 +63,9 @@ echo -e "📦 Detected agent: ${YELLOW}${AGENT}${NC}"
|
|
|
45
63
|
echo -e "📁 Install path: ${INSTALL_PATH}"
|
|
46
64
|
echo ""
|
|
47
65
|
|
|
48
|
-
#
|
|
66
|
+
# Clone to temp
|
|
49
67
|
TMP_DIR=$(mktemp -d)
|
|
50
68
|
git clone --depth 1 "$REPO" "$TMP_DIR" > /dev/null 2>&1
|
|
51
|
-
|
|
52
|
-
# Create target directory
|
|
53
69
|
mkdir -p "$INSTALL_PATH"
|
|
54
70
|
|
|
55
71
|
# Always copy core files
|
|
@@ -57,27 +73,45 @@ cp "$TMP_DIR/skill.md" "$INSTALL_PATH/"
|
|
|
57
73
|
cp "$TMP_DIR/audit.md" "$INSTALL_PATH/"
|
|
58
74
|
cp "$TMP_DIR/CLAUDE.md" "$INSTALL_PATH/"
|
|
59
75
|
|
|
60
|
-
# Copy sub-skills
|
|
76
|
+
# Copy sub-skills
|
|
61
77
|
if [ -n "$ONLY" ]; then
|
|
62
|
-
|
|
63
|
-
echo " (skill.md, audit.md, CLAUDE.md are always included)"
|
|
64
|
-
echo ""
|
|
65
|
-
IFS=',' read -ra CATEGORIES <<< "$ONLY"
|
|
78
|
+
IFS=',' read -ra ITEMS <<< "$ONLY"
|
|
66
79
|
mkdir -p "$INSTALL_PATH/sub-skills"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
80
|
+
|
|
81
|
+
for item in "${ITEMS[@]}"; do
|
|
82
|
+
item=$(echo "$item" | tr -d ' ')
|
|
83
|
+
|
|
84
|
+
if [[ -n "${CAT_FW[$item]+x}" ]]; then
|
|
85
|
+
# It's a category — install all frameworks in it
|
|
86
|
+
echo " ✓ Category: $item"
|
|
87
|
+
for fw in ${CAT_FW[$item]}; do
|
|
88
|
+
src="$TMP_DIR/sub-skills/$item/$fw.md"
|
|
89
|
+
if [ -f "$src" ]; then
|
|
90
|
+
mkdir -p "$INSTALL_PATH/sub-skills/$item"
|
|
91
|
+
cp "$src" "$INSTALL_PATH/sub-skills/$item/"
|
|
92
|
+
fi
|
|
93
|
+
done
|
|
94
|
+
elif echo "$ALL_FRAMEWORKS" | grep -qw "$item"; then
|
|
95
|
+
# It's an individual framework — find its category and install
|
|
96
|
+
for cat in "${!CAT_FW[@]}"; do
|
|
97
|
+
if echo "${CAT_FW[$cat]}" | grep -qw "$item"; then
|
|
98
|
+
src="$TMP_DIR/sub-skills/$cat/$item.md"
|
|
99
|
+
if [ -f "$src" ]; then
|
|
100
|
+
mkdir -p "$INSTALL_PATH/sub-skills/$cat"
|
|
101
|
+
cp "$src" "$INSTALL_PATH/sub-skills/$cat/"
|
|
102
|
+
echo " ✓ $cat/$item"
|
|
103
|
+
fi
|
|
104
|
+
break
|
|
105
|
+
fi
|
|
106
|
+
done
|
|
72
107
|
else
|
|
73
|
-
echo " ⚠
|
|
108
|
+
echo " ⚠ Unknown: $item"
|
|
74
109
|
fi
|
|
75
110
|
done
|
|
76
111
|
else
|
|
77
112
|
cp -r "$TMP_DIR/sub-skills" "$INSTALL_PATH/"
|
|
78
113
|
fi
|
|
79
114
|
|
|
80
|
-
# Cleanup
|
|
81
115
|
rm -rf "$TMP_DIR"
|
|
82
116
|
|
|
83
117
|
echo ""
|
package/package.json
CHANGED
package/skill.md
CHANGED
|
@@ -80,9 +80,10 @@ package/
|
|
|
80
80
|
3. Analyze & Research → Combine scan results + user answers + online research (if needed)
|
|
81
81
|
4. Recommend & Guide → Present RECOMMENDED solution + 2-3 alternatives with reasoning → discuss with user
|
|
82
82
|
5. Confirm Plan → User selects final approach → generate confirmation summary
|
|
83
|
-
6.
|
|
84
|
-
7.
|
|
85
|
-
8.
|
|
83
|
+
6. Prepare Project → Detect config gaps → propose modifications → user approves each change → apply
|
|
84
|
+
7. Execute → Load sub-skill → run build process (≤15% deviation without approval)
|
|
85
|
+
8. Audit → Execute audit.md (mandatory, cannot be skipped)
|
|
86
|
+
9. Final Report → Output structured build report
|
|
86
87
|
```
|
|
87
88
|
|
|
88
89
|
> **Guidance Philosophy**: The LLM acts as a **build consultant**, not a form-filler. After scanning and asking questions, the LLM MUST synthesize all information, perform targeted research if needed, and present a clear recommendation with reasoning. The user should feel guided, not interrogated.
|
|
@@ -91,7 +92,20 @@ package/
|
|
|
91
92
|
|
|
92
93
|
After scanning, the AI reports findings and asks questions **in one interactive session**. Do NOT split across multiple steps.
|
|
93
94
|
|
|
94
|
-
**Format**:
|
|
95
|
+
**Format**: Every question MUST be presented via an interactive selection mechanism. Group 3-4 questions per call when possible.
|
|
96
|
+
|
|
97
|
+
**Language**: ALL questions and options MUST be bilingual (Chinese + English). Every question text, option label, and option description must appear in both languages. Example: `Q1. Who are the target users? / 目标用户是谁?`
|
|
98
|
+
|
|
99
|
+
**Agent-specific interaction patterns:**
|
|
100
|
+
- **Claude Code**: Use `AskUserQuestion` tool (popup with selectable options + input field)
|
|
101
|
+
- **Cursor**: Present questions as numbered options in chat; user replies with numbers
|
|
102
|
+
- **OpenCode / OpenClaw / Trae**: Use structured option lists in chat; user replies with numbers
|
|
103
|
+
- **Codex CLI**: Present questions as numbered options; user replies with numbers
|
|
104
|
+
- **GitHub Copilot**: Present questions as numbered options; user replies with numbers
|
|
105
|
+
- **Hermes / LangChain**: Present questions as numbered options; user replies with numbers
|
|
106
|
+
- **WorkBuddy / Windsurf / Zed AI**: Present questions as numbered options; user replies with numbers
|
|
107
|
+
|
|
108
|
+
> **Rule**: Every question MUST offer selectable options (never open-ended text). Include a default option (LLM auto-detected value) and a custom option for free-text input. The LLM should never ask questions without providing choices.
|
|
95
109
|
|
|
96
110
|
---
|
|
97
111
|
|
|
@@ -133,97 +147,220 @@ The LLM MUST verify that all required dependencies for the detected framework ar
|
|
|
133
147
|
|
|
134
148
|
---
|
|
135
149
|
|
|
136
|
-
#### Part B:
|
|
150
|
+
#### Part B: Build Overview Confirmation
|
|
151
|
+
|
|
152
|
+
> After scanning, the FIRST thing the LLM MUST do is present a build overview and ask the user to confirm, correct, or supplement before asking any other questions. This ensures the LLM correctly understood the project scope.
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
📋 Build Overview / 构建总览
|
|
156
|
+
|
|
157
|
+
Project type / 项目类型: [detected type / 检测到的类型]
|
|
158
|
+
Framework / 框架: [detected framework / 检测到的框架]
|
|
159
|
+
Language / 语言: [detected language / 检测到的语言]
|
|
160
|
+
Entry point / 入口文件: [detected entry / 检测到的入口]
|
|
161
|
+
Build config / 构建配置: [detected config files / 检测到的配置文件]
|
|
162
|
+
Dependencies / 依赖: [key dependencies / 关键依赖]
|
|
163
|
+
Output expected / 预期产出: [e.g., desktop installer / 例如:桌面安装包]
|
|
164
|
+
|
|
165
|
+
Is this correct? Any files to add or exclude?
|
|
166
|
+
以上信息是否正确?是否需要添加或排除某些文件?
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Present the build overview and options using the agent's interactive selection mechanism (see format guidelines above):
|
|
170
|
+
|
|
171
|
+
- ✅ **Correct, proceed / 正确,继续**
|
|
172
|
+
- 📝 **Need to add files / 需要添加文件** → type the files after selecting
|
|
173
|
+
- 🗑️ **Need to exclude files / 需要排除文件** → type the files after selecting
|
|
174
|
+
- 🔄 **Need to correct / 需要修正** → describe the corrections after selecting
|
|
175
|
+
|
|
176
|
+
> Only proceed to Q1 after the user confirms the build overview. If the user requests changes, update the overview and re-confirm.
|
|
177
|
+
|
|
178
|
+
---
|
|
137
179
|
|
|
138
|
-
|
|
139
|
-
- 1. ⭐ General consumers → One-click installer (NSIS/DMG/APK)
|
|
140
|
-
- 2. Enterprise internal → MSI/Group Policy/MDM
|
|
141
|
-
- 3. Developers → npm/pip/cargo
|
|
142
|
-
- 4. Government/military → Domestic platform adaptation
|
|
180
|
+
#### Part C: Key Questions
|
|
143
181
|
|
|
144
|
-
**
|
|
145
|
-
- 1. ⭐
|
|
146
|
-
- 2.
|
|
147
|
-
- 3.
|
|
148
|
-
- 4.
|
|
182
|
+
**Q1. Who are the target users? / 目标用户是谁?**
|
|
183
|
+
- 1. ⭐ General consumers → One-click installer (NSIS/DMG/APK) / 普通消费者 → 一键安装包
|
|
184
|
+
- 2. Enterprise internal → MSI/Group Policy/MDM / 企业内部 → MSI/组策略/MDM
|
|
185
|
+
- 3. Developers → npm/pip/cargo / 开发者 → npm/pip/cargo
|
|
186
|
+
- 4. Government/military → Domestic platform adaptation / 政府军工 → 国产化平台适配
|
|
149
187
|
|
|
150
|
-
**
|
|
188
|
+
**Q2. Distribution channel? / 分发渠道?**
|
|
189
|
+
- 1. ⭐ Website download → Code signing + auto-update / 官网下载 → 代码签名 + 自动更新
|
|
190
|
+
- 2. App Store → Store signing + review compliance / 应用商店 → 商店签名 + 审核合规
|
|
191
|
+
- 3. Enterprise internal → MDM/Group Policy / 企业内部 → MDM/组策略
|
|
192
|
+
- 4. Open source → GitHub Releases / npm / PyPI / 开源 → GitHub Releases / npm / PyPI
|
|
193
|
+
|
|
194
|
+
**Q3a. Desktop platform(s)? / 桌面端平台?** (multi-select / 多选)
|
|
151
195
|
- 1. ⭐ Windows
|
|
152
196
|
- 2. macOS
|
|
153
197
|
- 3. Linux
|
|
154
|
-
- 4.
|
|
155
|
-
- 5. Android
|
|
156
|
-
- 6. iOS/iPadOS
|
|
198
|
+
- 4. None / 不需要桌面端
|
|
157
199
|
|
|
158
|
-
**Q3b.
|
|
200
|
+
**Q3b. Mobile platform(s)? / 移动端平台?** (multi-select / 多选)
|
|
201
|
+
- 1. Android
|
|
202
|
+
- 2. iOS/iPadOS
|
|
203
|
+
- 3. HarmonyOS / 鸿蒙
|
|
204
|
+
- 4. None / 不需要移动端
|
|
159
205
|
|
|
160
|
-
|
|
161
|
-
> "You selected Windows and macOS. Now choose architecture for each:"
|
|
206
|
+
**Q3c. Architecture per platform? / 各平台架构?** (ask for EACH platform selected in Q3a/Q3b / 按 Q3a/Q3b 选择的平台逐个询问)
|
|
162
207
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
**
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
>
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
|
|
205
|
-
**
|
|
206
|
-
- 1. ⭐
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
|
|
210
|
-
**
|
|
211
|
-
- 1. ⭐
|
|
212
|
-
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
208
|
+
> Example: If user selected "Windows + macOS" in Q3a, ask:
|
|
209
|
+
> "You selected Windows and macOS. Now choose architecture for each:"
|
|
210
|
+
> 示例:如果用户在 Q3a 选择了 "Windows + macOS",询问:
|
|
211
|
+
> "您选择了 Windows 和 macOS,请为每个平台选择架构:"
|
|
212
|
+
|
|
213
|
+
- **Windows 架构?**
|
|
214
|
+
- 1. ⭐ x64 only / 仅 x64(最常见,覆盖 99% 电脑)
|
|
215
|
+
- 2. ARM64 only / 仅 ARM64(Surface Pro X、骁龙笔记本)
|
|
216
|
+
- 3. Both x64 + ARM64 / 同时输出 x64 + ARM64 两个安装包
|
|
217
|
+
- **macOS 架构?**
|
|
218
|
+
- 1. ⭐ Universal Binary / 通用二进制(x64 + ARM64 合并,兼容所有 Mac)
|
|
219
|
+
- 2. ARM64 only / 仅 ARM64(Apple Silicon M1+,不支持 Intel Mac)
|
|
220
|
+
- 3. x64 only / 仅 x64(仅 Intel Mac,不推荐)
|
|
221
|
+
- **Linux 架构?**
|
|
222
|
+
- 1. ⭐ x64 only / 仅 x64(最常见)
|
|
223
|
+
- 2. ARM64 only / 仅 ARM64(树莓派 4/5、ARM 服务器)
|
|
224
|
+
- 3. Both x64 + ARM64 / 同时输出 x64 + ARM64 两个包
|
|
225
|
+
- **Android 架构?**
|
|
226
|
+
- 1. ⭐ ARM64 (v8a) — covers 95%+ devices / 覆盖 95%+ 现代设备
|
|
227
|
+
- 2. ARM64 + ARMv7 — for older devices / 兼容旧设备,APK 体积更大
|
|
228
|
+
- 3. Universal APK — all architectures / 全架构,体积最大
|
|
229
|
+
- **iOS 架构?**
|
|
230
|
+
- 1. ⭐ ARM64 (all modern Apple devices, automatic) / 所有现代 Apple 设备,自动适配
|
|
231
|
+
|
|
232
|
+
> All selected architecture packages will be output to the same target folder (see output location in Step 6).
|
|
233
|
+
> 所有选中的架构包将输出到同一目标文件夹(见 Step 6 输出位置)。
|
|
234
|
+
|
|
235
|
+
**Q3d. Architecture output mode? / 架构输出模式?** (only ask when user selected 2+ architectures for a platform in Q3c / 仅当用户在 Q3c 中为某平台选择了 2 个以上架构时才询问)
|
|
236
|
+
|
|
237
|
+
> **Interaction flow / 交互流程**: First ask "Separate or Merged?" per platform. If user selects "Separate", follow up with a second question to select which specific architectures to output. Do NOT try to combine both questions into one call.
|
|
238
|
+
> 先按平台询问"分开还是合并?"。如果用户选择"分开",再用第二个问题选择具体输出哪些架构。不要把两个问题合并在一次调用中。
|
|
239
|
+
|
|
240
|
+
> This determines how multi-architecture builds are packaged. Based on your Q3c selections, here is what will be output:
|
|
241
|
+
> 决定多架构构建如何打包。根据您在 Q3c 的选择,以下是输出预览:
|
|
242
|
+
|
|
243
|
+
**Example / 示例:** If you selected Windows (x64 + ARM64) + macOS (Universal Binary) in Q3c:
|
|
244
|
+
|
|
245
|
+
| Mode / 模式 | Output / 输出 | Count / 数量 |
|
|
246
|
+
|------|--------|:-----:|
|
|
247
|
+
| **Separate / 分开** | `MyApp-v1.0.0-windows-x64.exe` + `MyApp-v1.0.0-windows-arm64.exe` + `MyApp-v1.0.0-macos-universal.dmg` | 3 files |
|
|
248
|
+
| **Merged / 合并** | `MyApp-v1.0.0-windows.exe` (x64+ARM64) + `MyApp-v1.0.0-macos-universal.dmg` | 2 files |
|
|
249
|
+
|
|
250
|
+
- **Windows (if x64 + ARM64 selected in Q3c)? / Windows(如在 Q3c 选择了 x64 + ARM64)?**
|
|
251
|
+
- 1. ⭐ Separate — select which to output (multi-select) / 分开 — 选择输出哪些(多选):
|
|
252
|
+
- x64
|
|
253
|
+
- ARM64
|
|
254
|
+
- 2. Merged — single installer / 合并 — 单个安装包
|
|
255
|
+
- **macOS (if Universal Binary NOT selected in Q3c)? / macOS(如未选择通用二进制)?**
|
|
256
|
+
- 1. ⭐ Separate — select which to output (multi-select) / 分开 — 选择输出哪些(多选):
|
|
257
|
+
- x64 (Intel)
|
|
258
|
+
- ARM64 (Apple Silicon)
|
|
259
|
+
- 2. Merged — single `.dmg` / 合并 — 单个 `.dmg`
|
|
260
|
+
- **Linux (if x64 + ARM64 selected in Q3c)? / Linux(如选择了 x64 + ARM64)?**
|
|
261
|
+
- 1. ⭐ Separate — select which to output (multi-select) / 分开 — 选择输出哪些(多选):
|
|
262
|
+
- x64
|
|
263
|
+
- ARM64
|
|
264
|
+
- 2. Merged — single package / 合并 — 单个包
|
|
265
|
+
- **Android (if multiple architectures selected in Q3c)? / Android(如选择了多个架构)?**
|
|
266
|
+
- 1. ⭐ Separate — select which to output (multi-select) / 分开 — 选择输出哪些(多选):
|
|
267
|
+
- ARM64 (v8a)
|
|
268
|
+
- ARMv7
|
|
269
|
+
- Universal / 全架构
|
|
270
|
+
- 2. Single APK — all architectures merged / 单个 APK — 全架构合并
|
|
271
|
+
|
|
272
|
+
> **Naming convention / 命名规范** (auto-applied for separate output / 分开输出时自动应用):
|
|
273
|
+
> `[AppName]-v[Version]-[OS]-[Arch].[ext]`
|
|
274
|
+
> Examples / 示例: `MyApp-v1.0.0-windows-x64.exe`, `MyApp-v1.0.0-macos-arm64.dmg`
|
|
275
|
+
|
|
276
|
+
> **After user selects, show final output list / 用户选择后,展示最终输出列表**:
|
|
277
|
+
> ```
|
|
278
|
+
> 📦 Build output / 构建输出 (2 files):
|
|
279
|
+
> 1. MyApp-v1.0.0-windows-x64.exe (Windows x64)
|
|
280
|
+
> 2. MyApp-v1.0.0-macos-arm64.dmg (macOS ARM64)
|
|
281
|
+
> ```
|
|
282
|
+
> If user deselects an architecture, it is excluded from the build entirely.
|
|
283
|
+
> 如果用户取消勾选某个架构,该架构将完全不参与构建。
|
|
284
|
+
|
|
285
|
+
**Q3e. Minimum OS version? / 最低系统版本?** (ask for EACH platform selected in Q3a/Q3b / 按 Q3a/Q3b 选择的平台逐个询问)
|
|
286
|
+
|
|
287
|
+
- **Windows (if selected)?**
|
|
288
|
+
- 1. ⭐ Windows 10 (most common, Electron 31+ requires) / 最常见,Electron 31+ 要求
|
|
289
|
+
- 2. Windows 11
|
|
290
|
+
- 3. Custom / 自定义 → type version in tool / 在工具中输入版本号
|
|
291
|
+
- **macOS (if selected)?**
|
|
292
|
+
- 1. ⭐ macOS 10.15 (Catalina, Electron 31 default) / Electron 31 默认
|
|
293
|
+
- 2. macOS 12 (Monterey)
|
|
294
|
+
- 3. Custom / 自定义 → type version in tool / 在工具中输入版本号
|
|
295
|
+
- **Linux (if selected)?**
|
|
296
|
+
- 1. ⭐ No specific requirement / 无特殊要求
|
|
297
|
+
- 2. Custom / 自定义 → type requirement in tool / 在工具中输入要求
|
|
298
|
+
- **Android (if selected)?**
|
|
299
|
+
- 1. ⭐ Android 8.0 (API 26, covers 95%+ devices) / 覆盖 95%+ 设备
|
|
300
|
+
- 2. Android 10 (API 29)
|
|
301
|
+
- 3. Custom / 自定义 → type API level in tool / 在工具中输入 API 级别
|
|
302
|
+
- **iOS (if selected)?**
|
|
303
|
+
- 1. ⭐ iOS 15.0 (minimum for modern SwiftUI features) / 现代 SwiftUI 最低要求
|
|
304
|
+
- 2. iOS 16.0
|
|
305
|
+
- 3. Custom / 自定义 → type version in tool / 在工具中输入版本号
|
|
306
|
+
|
|
307
|
+
**Q4. App name? / 应用名称?**
|
|
308
|
+
- 1. ⭐ [detected folder name] / [检测到的文件夹名称]
|
|
309
|
+
- 2. Custom / 自定义 → type name in tool / 在工具中输入名称
|
|
310
|
+
|
|
311
|
+
**Q4b. Version? / 版本号?**
|
|
312
|
+
- 1. ⭐ [detected from package.json or default 1.0.0] / [从 package.json 检测或默认 1.0.0]
|
|
313
|
+
- 2. Custom / 自定义 → type version in tool / 在工具中输入版本号
|
|
314
|
+
|
|
315
|
+
**Q4c. Copyright holder? / 版权持有者?**
|
|
316
|
+
- 1. ⭐ [detected from git config user.name] / [从 git 配置的用户名检测]
|
|
317
|
+
- 2. Custom / 自定义 → type name in tool / 在工具中输入名称
|
|
318
|
+
|
|
319
|
+
**Q4d. Language / Localization? / 语言 / 本地化?**
|
|
320
|
+
- 1. ⭐ English only / 仅英文(默认)
|
|
321
|
+
- 2. Chinese / 中文(简体 + 繁体)
|
|
322
|
+
- 3. Multi-language / 多语言(English + Chinese)
|
|
323
|
+
- 4. Custom / 自定义 → type languages in tool / 在工具中输入语言
|
|
324
|
+
|
|
325
|
+
**Q4e. License file? / 许可证文件?**
|
|
326
|
+
- 1. ⭐ [detected from LICENSE file, e.g., MIT] / [从 LICENSE 文件检测,如 MIT]
|
|
327
|
+
- 2. Open source (Apache/GPL/其他) / 开源协议 → type in tool / 在工具中输入
|
|
328
|
+
- 3. Proprietary / Commercial / 商业 / 专有
|
|
329
|
+
- 4. None / 无 — do not include license in package / 不在安装包中包含许可证
|
|
330
|
+
|
|
331
|
+
**Q4f. Installer UI customization? / 安装界面自定义?**
|
|
332
|
+
- 1. ⭐ Default theme / 默认主题(简洁标准外观)
|
|
333
|
+
- 2. Custom branding / 自定义品牌 → describe in tool / 在工具中描述需求(如自定义欢迎页、背景图、文字颜色等)
|
|
334
|
+
- 3. Minimal / unbranded / 极简无品牌 — 无 logo、无自定义文字,纯功能性安装器
|
|
335
|
+
|
|
336
|
+
**Q6. Source code protection level? / 源码保护等级?**
|
|
337
|
+
|
|
338
|
+
> This determines how hard it is for someone to decompile and read your source code.
|
|
339
|
+
> 决定他人反编译和读取源码的难度。
|
|
340
|
+
|
|
341
|
+
- 1. ⭐ **Standard / 标准** — Code bundled (ASAR for Electron; Rust compiled for Tauri) / 代码打包(Electron: ASAR; Tauri: 已编译 Rust,反编译难度高)
|
|
342
|
+
- 2. **Obfuscation / 混淆** — JS/TS code scrambled, adds ~1 min build time / 代码混淆,增加约 1 分钟构建时间
|
|
343
|
+
- 3. **Full protection / 完整保护** — Obfuscation + AES encryption + image embedding, adds ~5 min / 混淆 + AES 加密 + 图片嵌入,增加约 5 分钟
|
|
344
|
+
- 4. **None / 不保护** — Open source, no protection needed / 开源项目,无需保护
|
|
345
|
+
|
|
346
|
+
**Q7. Clear test data and hardcoded keys? / 清除测试数据和硬编码密钥?**
|
|
347
|
+
- 1. ⭐ Yes, clean everything / 是,全部清除
|
|
348
|
+
- 2. No (dev build only) / 否(仅开发构建)
|
|
349
|
+
|
|
350
|
+
**Q8. Code signing? / 代码签名?**
|
|
351
|
+
- 1. ⭐ Yes, I have certificates / 是,我有证书
|
|
352
|
+
- 2. No signing (will show security warnings to users) / 不签名(用户将看到安全警告)
|
|
353
|
+
- 3. Not yet, guide me through the process / 还没有,引导我完成申请流程
|
|
354
|
+
|
|
355
|
+
**Q9. Auto-update and release type? / 自动更新与发布类型?**
|
|
356
|
+
- 1. ⭐ First publish + auto-update / 首次发布 + 自动更新
|
|
357
|
+
- 2. First publish, no auto-update / 首次发布,不自动更新
|
|
358
|
+
- 3. Update existing app + auto-update / 更新已有应用 + 自动更新
|
|
359
|
+
- 4. Update existing app, no auto-update / 更新已有应用,不自动更新
|
|
360
|
+
|
|
361
|
+
**Q10. Any special requirements? / 特殊需求?**
|
|
362
|
+
- 1. ⭐ None / 无
|
|
363
|
+
- 2. Custom / 自定义 → describe in tool / 在工具中描述需求
|
|
227
364
|
|
|
228
365
|
---
|
|
229
366
|
|
|
@@ -355,7 +492,95 @@ Only proceed to execution after the user explicitly confirms.
|
|
|
355
492
|
|
|
356
493
|
---
|
|
357
494
|
|
|
358
|
-
### Step
|
|
495
|
+
### Step 6: Prepare Project
|
|
496
|
+
|
|
497
|
+
After the user confirms the build plan, the LLM MUST check whether the project is ready for the chosen packaging strategy. Many projects require configuration changes, dependency additions, or file modifications before they can be built successfully.
|
|
498
|
+
|
|
499
|
+
> **Core rule**: Every modification to the user's project requires explicit approval. Never auto-apply changes.
|
|
500
|
+
|
|
501
|
+
#### 6a. Detect Gaps
|
|
502
|
+
|
|
503
|
+
Based on the confirmed build plan and the selected sub-skill, scan for:
|
|
504
|
+
|
|
505
|
+
| Check | Examples |
|
|
506
|
+
|-------|---------|
|
|
507
|
+
| **Missing config files** | `electron-builder.yml`, `tauri.conf.json`, `Dockerfile`, `.github/workflows/build.yml` |
|
|
508
|
+
| **Missing dependencies** | `electron-builder` not in `devDependencies`, `tauri-cli` not installed |
|
|
509
|
+
| **Outdated or incorrect config** | Wrong `main` field in `package.json`, missing `build` scripts |
|
|
510
|
+
| **Missing build assets** | App icon not found or wrong format, no `entitlements.plist` for macOS |
|
|
511
|
+
| **Signing prerequisites** | No signing certificates configured, missing env vars |
|
|
512
|
+
| **Framework-specific requirements** | iOS: no `ExportOptions.plist`; Tauri: Rust toolchain not detected |
|
|
513
|
+
|
|
514
|
+
#### 6b. Ask User Preferences
|
|
515
|
+
|
|
516
|
+
Before presenting the modification plan, the LLM MUST ask the following questions using the agent's interactive selection mechanism (see format guidelines above):
|
|
517
|
+
|
|
518
|
+
**Logo / Icon / Logo 图标:**
|
|
519
|
+
- 1. ⭐ I have a logo / 我有 logo → type file path in tool / 在工具中输入文件路径
|
|
520
|
+
- 2. Need to generate / 需要生成 → Recommend tool based on platform / 根据平台推荐工具
|
|
521
|
+
- 3. Use default / 使用默认 → Not recommended for production / 不建议用于正式发布
|
|
522
|
+
|
|
523
|
+
**Output location / 输出位置:**
|
|
524
|
+
- 1. ⭐ `./release/` (default / 默认)
|
|
525
|
+
- 2. Custom path / 自定义路径 → type path in tool / 在工具中输入路径
|
|
526
|
+
|
|
527
|
+
> When multiple architectures are output separately (Q3d), filenames automatically include platform and architecture: `[AppName]-v[Version]-[OS]-[Arch].[ext]`
|
|
528
|
+
> 当多架构分开输出时(Q3d),文件名自动包含平台和架构信息。
|
|
529
|
+
|
|
530
|
+
> **Note**: Encryption/protection level (Q6) was already confirmed in Step 2. Use that answer directly — do NOT ask again.
|
|
531
|
+
> **注意**:加密/保护等级(Q6)已在 Step 2 确认,直接使用,不要重复询问。
|
|
532
|
+
|
|
533
|
+
**After logo path is provided / 提供 logo 路径后,追问:**
|
|
534
|
+
- 1. ⭐ Crop and round corners for installer icon / 裁切圆角用于安装包图标
|
|
535
|
+
- 2. Use original as-is / 使用原图不处理
|
|
536
|
+
- 3. Skip / 跳过
|
|
537
|
+
|
|
538
|
+
#### 6c. Present Modification Plan
|
|
539
|
+
|
|
540
|
+
Present ALL required changes to the user in a structured checklist **before making any changes**, then use the agent's interactive selection mechanism for confirmation:
|
|
541
|
+
|
|
542
|
+
```
|
|
543
|
+
📋 Pre-Build Preparation / 构建前准备 — [Framework] [Platform]
|
|
544
|
+
|
|
545
|
+
App icon / 应用图标: Please provide the logo file path / 请提供 logo 文件路径
|
|
546
|
+
→ Crop and round corners? / 是否裁切圆角?(yes/no)
|
|
547
|
+
|
|
548
|
+
Config changes needed / 需要的配置变更:
|
|
549
|
+
|
|
550
|
+
[1] Add file / 添加文件: electron-builder.yml
|
|
551
|
+
→ NSIS installer, code signing, auto-update
|
|
552
|
+
[2] Add dependency / 添加依赖: electron-builder (devDependency)
|
|
553
|
+
→ Required build tool / 构建必需工具
|
|
554
|
+
[3] Modify / 修改: package.json → add "build" script
|
|
555
|
+
→ "build": "electron-builder --win --mac"
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
Then use the agent's interactive selection mechanism:
|
|
559
|
+
|
|
560
|
+
- ✅ **Approve all / 全部同意**
|
|
561
|
+
- ☑️ **Approve selectively / 选择性同意** → type the numbers in tool / 在工具中输入编号 (e.g., "1,3")
|
|
562
|
+
- ➕ **Need to add changes / 需要补充修改** → describe the additional changes in tool / 在工具中描述补充内容
|
|
563
|
+
- ❌ **Reject all / 全部拒绝** → explain what to change in tool / 在工具中说明需要修改的内容
|
|
564
|
+
|
|
565
|
+
> Only apply changes the user explicitly approved. If user adds new changes, append them to the plan and re-confirm.
|
|
566
|
+
|
|
567
|
+
#### 6c. Apply Approved Changes
|
|
568
|
+
|
|
569
|
+
- Only apply changes the user explicitly approved
|
|
570
|
+
- For each applied change, show a brief confirmation
|
|
571
|
+
- If the user skips a critical change, warn about potential build failure but respect the decision
|
|
572
|
+
- After all changes are applied, re-confirm readiness before proceeding to Execute
|
|
573
|
+
|
|
574
|
+
#### 6d. What This Step Does NOT Do
|
|
575
|
+
|
|
576
|
+
- Does NOT modify business logic or application source code
|
|
577
|
+
- Does NOT change framework version or architecture decisions (those were finalized in Step 5)
|
|
578
|
+
- Does NOT install system-level tools (e.g., Xcode, Android SDK) — those are user's responsibility
|
|
579
|
+
- Does NOT create signing certificates or provisioning profiles
|
|
580
|
+
|
|
581
|
+
> **Why this step exists**: Skipping project preparation is the #1 cause of build failures. A missing config file or wrong dependency version can waste hours of debugging. This step catches those issues early and fixes them with user approval.
|
|
582
|
+
|
|
583
|
+
---
|
|
359
584
|
|
|
360
585
|
When the user's project does NOT match any existing sub-skill (e.g., a niche framework, emerging technology, or proprietary platform):
|
|
361
586
|
|
|
@@ -523,7 +748,7 @@ Present similar products and their packaging approaches to help the user decide.
|
|
|
523
748
|
|
|
524
749
|
# Phase 5: Recommendation & Confirmation
|
|
525
750
|
|
|
526
|
-
> **Note**:
|
|
751
|
+
> **Note**: All user-facing questions (Q1-Q10) are now handled in **Step 2: Intake** above. This phase focuses ONLY on presenting recommendations after the intake is complete.
|
|
527
752
|
|
|
528
753
|
Based on the user's answers in Step 2, present:
|
|
529
754
|
|