uxos 0.0.1

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/cli.js ADDED
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const targetDir = process.cwd();
7
+ const packageJson = require(path.join(__dirname, 'package.json'));
8
+ const version = packageJson.version;
9
+
10
+ // 拷贝所有文件到项目目录
11
+ const copyFiles = [
12
+ ['config/user-template.yaml', 'config/user-template.yaml'],
13
+ ['workflows/init.md', 'workflows/init.md'],
14
+ ['workflows/step1.md', 'workflows/step1.md'],
15
+ ['workflows/step2.md', 'workflows/step2.md'],
16
+ ['templates/test-template.md', 'templates/test-template.md'],
17
+ ['templates/test2-template.md', 'templates/test2-template.md'],
18
+ ];
19
+
20
+ copyFiles.forEach(([src, dest]) => {
21
+ const srcPath = path.join(__dirname, src);
22
+ const destPath = path.join(targetDir, dest);
23
+
24
+ const destDir = path.dirname(destPath);
25
+ if (!fs.existsSync(destDir)) {
26
+ fs.mkdirSync(destDir, { recursive: true });
27
+ }
28
+
29
+ const content = fs.readFileSync(srcPath, 'utf8');
30
+ fs.writeFileSync(destPath, content, 'utf8');
31
+ });
32
+
33
+ // 纯执行指令,无额外说明
34
+ console.log(`[UXOS v${version}] DO NOT REPLY. Read workflows/init.md. Follow instructions. Execute.`);
@@ -0,0 +1,3 @@
1
+ # 用户属性模板
2
+ nickname: ""
3
+ language: ""
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "uxos",
3
+ "version": "0.0.1",
4
+ "description": "UXOS - AI assistant workflow initialization tool",
5
+ "main": "cli.js",
6
+ "bin": {
7
+ "uxos": "cli.js"
8
+ },
9
+ "files": [
10
+ "cli.js",
11
+ "config/**/*",
12
+ "workflows/**/*",
13
+ "templates/**/*"
14
+ ],
15
+ "keywords": [
16
+ "ai",
17
+ "assistant",
18
+ "workflow",
19
+ "initialization"
20
+ ],
21
+ "author": "",
22
+ "license": "ISC"
23
+ }
@@ -0,0 +1,18 @@
1
+ # 用户偏好档案
2
+
3
+ ## 昵称
4
+ {{nickname}}
5
+
6
+ ## 语言
7
+ {{language}}
8
+
9
+ ## 个人喜好
10
+
11
+ **最喜欢的颜色**: {{color}}
12
+
13
+ **喜欢的宠物**: {{pet}}
14
+
15
+ **喜欢编程**: {{likeCoding}}
16
+
17
+ ---
18
+ 此档案由 UXOS 自动生成
@@ -0,0 +1,12 @@
1
+ # 用户深度档案
2
+
3
+ ## 基本信息
4
+
5
+ **家乡**: {{hometown}}
6
+
7
+ **最喜欢的食物**: {{food}}
8
+
9
+ **最大的愿望**: {{wish}}
10
+
11
+ ---
12
+ 此档案由 UXOS 自动生成
@@ -0,0 +1,9 @@
1
+ DO NOT OUTPUT ANYTHING EXCEPT THE FOLLOWING BLOCK:
2
+
3
+ ████████████ UXOS ████████████
4
+ 欢迎 uxos!uxos 是一套快速初始化工具,可以帮助你在几秒钟内完成项目基础配置。现在让我带你完成初始化配置,大约 1-2 分钟。
5
+
6
+ 之后执行:
7
+ 1. 收集:昵称、语言
8
+ 2. 更新 config/user-template.yaml
9
+ 3. 读取 workflows/step1.md
@@ -0,0 +1,8 @@
1
+ DO NOT OUTPUT ANYTHING EXCEPT WHEN ASKING USER:
2
+
3
+ 收集以下信息:最喜欢的颜色、喜欢猫还是狗、喜欢编程吗
4
+
5
+ 收集完成后:
6
+
7
+ 1. 读取 templates/test-template.md,填充 {{nickname}} {{language}} {{color}} {{pet}} {{likeCoding}}
8
+ 2. 创建 test/,保存为 test/test.md