@snowdreamtech/unirtm-linux-arm-5 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/LICENSE +21 -0
- package/README.md +225 -0
- package/README_zh-CN.md +228 -0
- package/bin/unirtm +0 -0
- package/package.json +28 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present SnowdreamTech Inc.
|
|
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
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# UniRTM (Universal Runtime Manager)
|
|
2
|
+
|
|
3
|
+
Inspired by [mise](https://github.com/jdx/mise) (licensed under MIT). Special thanks to jdx and the mise community for the great ideas.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/cd.yml)
|
|
7
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/pages.yml)
|
|
8
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/codeql.yml)
|
|
9
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
10
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
11
|
+
[](https://github.com/snowdreamtech/template/releases/latest)
|
|
12
|
+
[](https://opensource.org/license/MIT)
|
|
13
|
+
[](https://github.com/snowdreamtech/template/releases/latest)
|
|
14
|
+
[](https://github.com/snowdreamtech/template/blob/main/.github/dependabot.yml)
|
|
15
|
+
[](https://github.com/pre-commit/pre-commit)
|
|
16
|
+
[](https://github.com/snowdreamtech/template)
|
|
17
|
+
[](https://github.com/snowdreamtech/template/issues)
|
|
18
|
+
[](https://github.com/snowdreamtech/template)
|
|
19
|
+
|
|
20
|
+
[English](README.md) | [简体中文](README_zh-CN.md)
|
|
21
|
+
|
|
22
|
+
An enterprise-grade, foundational template designed for multi-AI IDE collaboration. This repository serves as a **Single Source of Truth** for AI agent rules, workflows, and project configurations, supporting over 50 different AI-assisted IDEs with massive multi-language support.
|
|
23
|
+
|
|
24
|
+
## 🌟 Features
|
|
25
|
+
|
|
26
|
+
- **Multi-IDE Compatibility**: Out-of-the-box support for Cursor, Windsurf, GitHub Copilot, Cline, Roo Code, Trae, Gemini, Claude Code, and 50+ other AI editors.
|
|
27
|
+
- **Unified Rule System**: Centralized rule definitions in `.agent/rules/`. Changes propagate automatically to all supported IDEs via a secure symlink/redirect pattern.
|
|
28
|
+
- **80+ Language & Framework Rules**: Pre-configured high-quality rules from Rust, Go, TypeScript, Python to Ansible, Kubernetes, and API design.
|
|
29
|
+
- **Smart Workflows (SpecKit)**: Standardized `.agent/workflows/` commands (`speckit.plan`, `speckit.analyze`, `snowdreamtech.init`) that behave consistently across all supported environments.
|
|
30
|
+
- **Triple Guarantee Quality**: 100% code purity enforced through Pre-commit and GitHub Actions integrated quality gates.
|
|
31
|
+
- **Cross-Platform Ready**: Runs seamlessly on macOS (Homebrew/MacPorts), Linux, and Windows.
|
|
32
|
+
|
|
33
|
+
## 🏗️ Section 1 — Design & Architecture
|
|
34
|
+
|
|
35
|
+
### Overview
|
|
36
|
+
|
|
37
|
+
The Snowdream Tech Template is a foundational scaffold engineered to solve the "N-IDE Fragmentation" problem. It standardizes the development environment, AI agent rules, and automation pipelines across varied platforms and languages.
|
|
38
|
+
|
|
39
|
+
**Key Capabilities:**
|
|
40
|
+
|
|
41
|
+
- Provides a **Unified Rule Engine** that governs AI behavior consistently across 50+ IDEs.
|
|
42
|
+
- Enforces **Cross-Platform Portability** through dynamically adapting POSIX shell automation.
|
|
43
|
+
- Implements a **Triple Guarantee Quality Gate** (IDE, CLI, CI) to prevent regressions.
|
|
44
|
+
- Supports **Massive Multi-Language Stacks** with modular onboarding logic.
|
|
45
|
+
|
|
46
|
+
### Architecture
|
|
47
|
+
|
|
48
|
+
```mermaid
|
|
49
|
+
graph TD
|
|
50
|
+
A["Developers & Agents"] -->|Operates via| IDE["Cursor / Windsurf / Copilot / 50+ Others"]
|
|
51
|
+
IDE -->|Reads Rules via Redirects| R1[".vscode/"]
|
|
52
|
+
IDE -->|Reads Rules via Redirects| R2[".github/"]
|
|
53
|
+
IDE -->|Reads Rules via Redirects| R3[".cline/ .trae/ etc."]
|
|
54
|
+
|
|
55
|
+
R1 -.->|SSoT Pointer| CoreRules[".agent/rules/"]
|
|
56
|
+
R2 -.->|SSoT Pointer| CoreRules
|
|
57
|
+
R3 -.->|SSoT Pointer| CoreRules
|
|
58
|
+
|
|
59
|
+
CoreRules -->|Governs| Src["Source Code"]
|
|
60
|
+
CoreRules -->|Governs| Scripts["CI/CD & Shell Scripts"]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Design Principles
|
|
64
|
+
|
|
65
|
+
- **Single Source of Truth (SSoT)**: All AI rules, commands, and Git hooks live in one place. No duplicated IDE configurations.
|
|
66
|
+
- **Cross-Platform Portability**: Heavy automation logic is written in POSIX Shell, with thin wrappers for Windows PowerShell/Batch.
|
|
67
|
+
- **Triple Guarantee Quality**: Linting and formatting form an impenetrable wall, enforced at the IDE layer, pre-commit layer, and CI/CD GitHub Actions layer.
|
|
68
|
+
|
|
69
|
+
### Responsibilities
|
|
70
|
+
|
|
71
|
+
- **.agent/rules/**: Owns the definitive behavioral logic for AI agents across all supported languages.
|
|
72
|
+
- **scripts/**: Owns the cross-platform automation and lifecycle logic.
|
|
73
|
+
- **.agent/workflows/**: Owns the interactive AI commands (SpecKit).
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 📖 Section 2 — Usage Guide
|
|
78
|
+
|
|
79
|
+
### Prerequisites
|
|
80
|
+
|
|
81
|
+
- **Runtime**: Node.js (>= 20.x), Python (>= 3.10.x).
|
|
82
|
+
- **Git**: Global git installation required.
|
|
83
|
+
|
|
84
|
+
### Quick Start
|
|
85
|
+
|
|
86
|
+
1. **Initialize & Install**: `unirtm install` (installs all project tools and dependencies).
|
|
87
|
+
2. **Verify**: `make verify` (ensures everything is green).
|
|
88
|
+
|
|
89
|
+
### Configuration Reference
|
|
90
|
+
|
|
91
|
+
| Parameter | Purpose | Location |
|
|
92
|
+
| :------------- | :---------------------------------------------------------------- | :---------------------- |
|
|
93
|
+
| `PROJECT_NAME` | Project identity | `init-project.sh` |
|
|
94
|
+
| `GITHUB_PROXY` | Network optimization (See [Proxy Usage](#-proxy-usage-scenarios)) | `scripts/lib/common.sh` |
|
|
95
|
+
| `VERSION` | Semantic versioning | `package.json` |
|
|
96
|
+
|
|
97
|
+
### File Structure
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
project-root/
|
|
101
|
+
├── .agent/ # 🤖 Canonical AI configuration (The Brain)
|
|
102
|
+
│ ├── rules/ # 📏 Unified AI behavioral rules (80+ sets, SSoT)
|
|
103
|
+
│ └── workflows/ # 🛠️ Unified commands & AI workflows (SpecKit)
|
|
104
|
+
├── .agents/ # 🧩 Shared command sources (Auto-managed symlinks)
|
|
105
|
+
├── .github/ # 🐙 GitHub integration & Copilot settings
|
|
106
|
+
├── .vscode/ # 💻 Optimized VS Code configurations
|
|
107
|
+
└── src/ # 📦 Your actual application source code
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 🛠️ Section 3 — Operations Guide
|
|
113
|
+
|
|
114
|
+
### Pre-deployment Checklist
|
|
115
|
+
|
|
116
|
+
1. Run `make verify` to ensure all quality gates are green.
|
|
117
|
+
2. Run `make audit` to verify security compliance.
|
|
118
|
+
3. Ensure `CHANGELOG.md` is updated.
|
|
119
|
+
|
|
120
|
+
### Performance Considerations
|
|
121
|
+
|
|
122
|
+
- **Linting Speed**: Pre-commit hooks target < 5s by scanning staged files only.
|
|
123
|
+
- **CI Throughput**: GitHub Actions use matrix builds for parallel testing across OS types.
|
|
124
|
+
|
|
125
|
+
### Troubleshooting
|
|
126
|
+
|
|
127
|
+
- **Problem**: `unirtm install` fails on Windows.
|
|
128
|
+
- **Diagnosis**: Check if `ExecutionPolicy` allows script execution.
|
|
129
|
+
- **Solution**: Run `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass`.
|
|
130
|
+
- **Problem**: Gitleaks detects false positives.
|
|
131
|
+
- **Diagnosis**: Check `.gitleaks.toml` allowlist.
|
|
132
|
+
- **Solution**: Add fingerprint to `.gitleaksignore`.
|
|
133
|
+
- **Problem**: Pre-commit hooks fail on macOS after `unirtm install` with Python errors.
|
|
134
|
+
- **Diagnosis**: Check if the venv exists: `ls .venv/bin/python`.
|
|
135
|
+
- **Solution**: Rebuild the venv: `rm -rf .venv && unirtm install`.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 🔒 Section 4 — Security Considerations
|
|
140
|
+
|
|
141
|
+
### Security Model
|
|
142
|
+
|
|
143
|
+
- **Secret Management**: All secrets must be injected via environment variables or handled by HashiCorp Vault. Never commit `.env` files.
|
|
144
|
+
- **Audit Logging**: All critical operations (commits, releases, state changes) are traced via Git and CI logs.
|
|
145
|
+
- **Supply Chain**: All CI actions are pinned to exact versions/SHAs.
|
|
146
|
+
|
|
147
|
+
### Best Practices
|
|
148
|
+
|
|
149
|
+
| Aspect | Requirement | Implementation |
|
|
150
|
+
| :---------- | :--------------------------- | :-------------------------------- |
|
|
151
|
+
| Secrets | No plaintext secrets in repo | `gitleaks` enforced at commit |
|
|
152
|
+
| Integrity | Verify downloads | SHA-256 validation in `common.sh` |
|
|
153
|
+
| Permissions | Non-root execution | Dockerfile best practices |
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## 🧑💻 Section 5 — Development Guide
|
|
158
|
+
|
|
159
|
+
### Code Organization
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
project-root/
|
|
163
|
+
├── .agent/ # AI configuration (Single Source of Truth)
|
|
164
|
+
│ ├── rules/ # 88 behavioral rule files for AI agents
|
|
165
|
+
│ └── workflows/ # SpecKit slash-command definitions
|
|
166
|
+
├── .github/ # GitHub ecosystem (Actions, templates, Dependabot)
|
|
167
|
+
│ └── workflows/ # CI/CD pipelines (lint, verify, release, security)
|
|
168
|
+
├── .devcontainer/ # DevContainer configuration for reproducible environments
|
|
169
|
+
├── docs/ # Project documentation
|
|
170
|
+
│ ├── adr/ # Architecture Decision Records
|
|
171
|
+
│ ├── runbooks/ # Operations and recovery runbooks
|
|
172
|
+
│ └── glossary.md # Bilingual term glossary
|
|
173
|
+
├── scripts/ # POSIX shell automation (setup, install, verify)
|
|
174
|
+
│ └── lib/ # Shared shell library functions
|
|
175
|
+
└── Makefile # Task orchestration (setup, install, lint, verify, audit)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Naming Conventions**: Rule files use `NN-kebab-case.md` (core rules) or `technology.md`
|
|
179
|
+
(language stacks). Workflow files use `namespace.verb.md`. Shell scripts use `kebab-case.sh`.
|
|
180
|
+
|
|
181
|
+
### Extension Points
|
|
182
|
+
|
|
183
|
+
1. **Adding Rules**: Create a new `.md` file in `.agent/rules/` and link it in `00-index.md`.
|
|
184
|
+
2. **Adding Commands**: Add `.md` files to `.agent/workflows/`.
|
|
185
|
+
3. **Adding IDE Support**: Create a redirect folder (e.g., `.myide/`) following the symlink pattern in Rule 03.
|
|
186
|
+
|
|
187
|
+
### Local Development Setup
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
git clone <repo>
|
|
191
|
+
cd <repo>
|
|
192
|
+
git config core.ignorecase false # MANDATORY for Mac/Windows
|
|
193
|
+
unirtm install
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### References
|
|
197
|
+
|
|
198
|
+
- [Full Documentation](docs/index.md)
|
|
199
|
+
- [Project Glossary](docs/glossary.md)
|
|
200
|
+
- [Conventional Commits](https://www.conventionalcommits.org/)
|
|
201
|
+
|
|
202
|
+
### 🚀 Proxy Usage Scenarios
|
|
203
|
+
|
|
204
|
+
The `GITHUB_PROXY` (default: `https://gh-proxy.sn0wdr1am.com/`) is optimized for specific network acceleration scenarios. Misusing it for unsupported protocols (like Git) will result in errors.
|
|
205
|
+
|
|
206
|
+
| Scenario | Supported? | Example / Note |
|
|
207
|
+
| :-------------------- | :--------- | :----------------------------------------------------- |
|
|
208
|
+
| **Release Files** | ✅ Yes | `.../releases/download/v1.0/tool.zip` |
|
|
209
|
+
| **Source Archives** | ✅ Yes | `.../archive/master.zip` or `.tar.gz` |
|
|
210
|
+
| **Direct File Links** | ✅ Yes | `.../blob/master/filename` |
|
|
211
|
+
| **Git Clone** | ❌ **No** | Do **not** use for `git clone` or `insteadOf` configs. |
|
|
212
|
+
| **Project Folders** | ❌ **No** | Browsing/cloning via proxy is not supported. |
|
|
213
|
+
|
|
214
|
+
> [!IMPORTANT]
|
|
215
|
+
> To prevent breaking toolchains (like `mise` or `asdf`), this template explicitly disables Git redirection via this proxy. Use it only for direct HTTP downloads in scripts.
|
|
216
|
+
|
|
217
|
+
## 📄 License
|
|
218
|
+
|
|
219
|
+
This project is licensed under the **MIT License**.
|
|
220
|
+
Copyright (c) 2026-present [SnowdreamTech Inc.](https://github.com/snowdreamtech)
|
|
221
|
+
See the [LICENSE](./LICENSE) file for the full license text.
|
|
222
|
+
|
|
223
|
+
## Star History
|
|
224
|
+
|
|
225
|
+
[](https://www.star-history.com/?repos=snowdreamtech%2Ftemplate&type=date&legend=top-left)
|
package/README_zh-CN.md
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# UniRTM (Universal Runtime Manager)
|
|
2
|
+
|
|
3
|
+
受 [mise](https://github.com/jdx/mise) 启发(采用 MIT 协议)。特别感谢 jdx 和 mise 社区提供的优秀创意。
|
|
4
|
+
|
|
5
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/cd.yml)
|
|
7
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/pages.yml)
|
|
8
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/codeql.yml)
|
|
9
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
10
|
+
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
11
|
+
[](https://github.com/snowdreamtech/template/releases/latest)
|
|
12
|
+
[](https://opensource.org/license/MIT)
|
|
13
|
+
[](https://github.com/snowdreamtech/template/releases/latest)
|
|
14
|
+
[](https://github.com/snowdreamtech/template/blob/main/.github/dependabot.yml)
|
|
15
|
+
[](https://github.com/pre-commit/pre-commit)
|
|
16
|
+
[](https://github.com/snowdreamtech/template)
|
|
17
|
+
[](https://github.com/snowdreamtech/template/issues)
|
|
18
|
+
[](https://github.com/snowdreamtech/template)
|
|
19
|
+
|
|
20
|
+
[English](README.md) | [简体中文](README_zh-CN.md)
|
|
21
|
+
|
|
22
|
+
一个企业级、为多 AI IDE 协作而设计的基石模板。本项目作为 AI Agent 规则、工作流和项目配置的**单一事实来源 (Single Source of Truth)**,支持超过 50 种不同的 AI 辅助 IDE,并提供海量的多语言支持。
|
|
23
|
+
|
|
24
|
+
## 🌟 特性
|
|
25
|
+
|
|
26
|
+
- **多 IDE 兼容性**:开箱即用支持 Cursor、Windsurf、GitHub Copilot、Cline、Roo Code、Trae、Gemini、Claude Code 等 50 多种 AI 编辑器。
|
|
27
|
+
- **统一规则系统**:在 `.agent/rules/` 中维护中心化规则定义。在此修改规则通过安全的软链接/重定向模式自动传播到所有支持的 IDE。
|
|
28
|
+
- **80+ 语言与框架规则**:预配置的高质量规则,涵盖从 Rust、Go、TypeScript、Python 到 Ansible、Kubernetes 和 API 设计等各个领域。
|
|
29
|
+
- **智能工作流 (SpecKit)**:标准化的 `.agent/workflows/`(命令),如 `speckit.plan`、`speckit.analyze` 和 `snowdreamtech.init`,在所有支持的环境中保持一致。
|
|
30
|
+
- **三重保证质量**:通过 Pre-commit 和 GitHub Actions 集成门禁检查,确保 100% 的代码纯净。
|
|
31
|
+
- **跨平台就绪**:在 macOS (Homebrew/MacPorts)、Linux 和 Windows 上无缝运行。
|
|
32
|
+
|
|
33
|
+
## 🏗️ 第 1 节 — 设计与架构
|
|
34
|
+
|
|
35
|
+
### 概览 (Overview)
|
|
36
|
+
|
|
37
|
+
Snowdream Tech 模板是一个基础脚手架,专为解决“多重 AI IDE 协作产生的配置碎片化”问题而设计。它在各种平台和语言中标准化了开发环境、AI Agent 规则以及自动化流水线。
|
|
38
|
+
|
|
39
|
+
**核心能力 (Key Capabilities):**
|
|
40
|
+
|
|
41
|
+
- 提供**统一的规则引擎**,跨 50+ 种 IDE 一致地约束 AI 行为。
|
|
42
|
+
- 通过动态适配的 POSIX Shell 自动化脚本,强制保证**跨平台便携性**。
|
|
43
|
+
- 实施**三重保证质量门禁**(IDE、CLI、CI),严防代码劣化。
|
|
44
|
+
- 支持**大规模多语言技术栈**,并配备模块化的加载逻辑。
|
|
45
|
+
|
|
46
|
+
### 架构 (Architecture)
|
|
47
|
+
|
|
48
|
+
```mermaid
|
|
49
|
+
graph TD
|
|
50
|
+
A["开发者与智能体 (Agents)"] -->|操作| IDE["Cursor / Windsurf / Copilot / 50+ 其它"]
|
|
51
|
+
IDE -->|通过重定向读取规则| R1[".vscode/"]
|
|
52
|
+
IDE -->|通过重定向读取规则| R2[".github/"]
|
|
53
|
+
IDE -->|通过重定向读取规则| R3[".cline/ .trae/ 等等"]
|
|
54
|
+
|
|
55
|
+
R1 -.->|SSoT 指针| CoreRules[".agent/rules/"]
|
|
56
|
+
R2 -.->|SSoT 指针| CoreRules
|
|
57
|
+
R3 -.->|SSoT 指针| CoreRules
|
|
58
|
+
|
|
59
|
+
CoreRules -->|管理与约束| Src["项目应用源码"]
|
|
60
|
+
CoreRules -->|管理与约束| Scripts["CI/CD 与统一自动化脚本"]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 设计原则
|
|
64
|
+
|
|
65
|
+
- **唯一事实来源 (SSoT)**: 所有 AI 行为准则、开发脚手架命令和 Git 生态钩子均集中在一处维护,彻底消灭各 IDE 之间的配置孤岛与冗余。
|
|
66
|
+
- **跨平台多态性 (Cross-Platform)**: 核心自动化流水线基于原生 POSIX Shell 编写,且强制为 Windows (PowerShell / Batch) 提供对等兼容的轻量级包装层。
|
|
67
|
+
- **三重质量护城河 (Triple Guarantee)**: 由 IDE 实时自动修复、Pre-commit 本地强制阻断、以及 CI/CD (GitHub Actions) 远端全量审计,三层联防共同构建 100% 代码纯净度防线。
|
|
68
|
+
|
|
69
|
+
### 职责分工
|
|
70
|
+
|
|
71
|
+
- **.agent/rules/**: 拥有跨所有支持语言的 AI Agent 权威行为逻辑。
|
|
72
|
+
- **scripts/**: 拥有跨平台自动化和生命周期逻辑。
|
|
73
|
+
- **.agent/workflows/**: 拥有交互式 AI 命令 (SpecKit)。
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 📖 第 2 节 — 使用指南
|
|
78
|
+
|
|
79
|
+
### 前置条件
|
|
80
|
+
|
|
81
|
+
- **运行时**: Node.js (>= 20.x), Python (>= 3.10.x)。
|
|
82
|
+
- **Git**: 需要全局安装 git。
|
|
83
|
+
- **Make**: 统一命令执行所必需。
|
|
84
|
+
|
|
85
|
+
### 快速开始
|
|
86
|
+
|
|
87
|
+
1. **初始化与安装**:`unirtm install`(安装开发所需核心工具与项目依赖)。
|
|
88
|
+
2. **验证**:`make verify`(确保环境健康)。
|
|
89
|
+
|
|
90
|
+
### 配置参考
|
|
91
|
+
|
|
92
|
+
| 参数 | 用途 | 位置 |
|
|
93
|
+
| :------------- | :----------------------------------------- | :---------------------- |
|
|
94
|
+
| `PROJECT_NAME` | 项目身份 | `init-project.sh` |
|
|
95
|
+
| `GITHUB_PROXY` | 网络优化 (见 [代理使用场](#-代理使用场景)) | `scripts/lib/common.sh` |
|
|
96
|
+
| `VERSION` | 语义化版本 | `package.json` |
|
|
97
|
+
|
|
98
|
+
### 目录结构
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
project-root/
|
|
102
|
+
├── .agent/ # 🤖 权威 AI 配置 (大脑)
|
|
103
|
+
│ ├── rules/ # 📏 统一 AI 行为规则 (80+ 套件, SSoT)
|
|
104
|
+
│ └── workflows/ # 🛠️ 统一命令与 AI 工作流 (SpecKit)
|
|
105
|
+
├── .agents/ # 🧩 共享命令源 (自动管理的软链接)
|
|
106
|
+
├── .github/ # 🐙 GitHub 集成与 Copilot 设置
|
|
107
|
+
├── .vscode/ # 💻 优化的 VS Code 配置
|
|
108
|
+
└── src/ # 📦 您的实际应用源代码
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 🛠️ 第 3 节 — 运维指南
|
|
114
|
+
|
|
115
|
+
### 部署前检查清单
|
|
116
|
+
|
|
117
|
+
1. 运行 `make verify` 确保所有质量门禁均为绿色。
|
|
118
|
+
2. 运行 `make audit` 验证安全合规性。
|
|
119
|
+
3. 确保 `CHANGELOG.md` 已更新。
|
|
120
|
+
|
|
121
|
+
### 性能考虑
|
|
122
|
+
|
|
123
|
+
- **Lint 速度**: Pre-commit 钩子通过仅扫描暂存文件,目标耗时 < 5s。
|
|
124
|
+
- **CI 吞吐量**: GitHub Actions 使用矩阵构建在不同操作系统上并行测试。
|
|
125
|
+
|
|
126
|
+
### 故障排除
|
|
127
|
+
|
|
128
|
+
- **问题**: `unirtm install` 在 Windows 上失败。
|
|
129
|
+
- **诊断**: 检查 `ExecutionPolicy` 是否允许脚本执行。
|
|
130
|
+
- **解决方案**: 运行 `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass`。
|
|
131
|
+
- **问题**: Gitleaks 检测到误报。
|
|
132
|
+
- **诊断**: 检查 `.gitleaks.toml` 白名单。
|
|
133
|
+
- **解决方案**: 将特征码添加到 `.gitleaksignore`。
|
|
134
|
+
- **问题**: `unirtm install` 后,macOS 上的 Pre-commit 钩子出现 Python 报错。
|
|
135
|
+
- **诊断**: 检查 venv 是否存在:`ls .venv/bin/python`。
|
|
136
|
+
- **解决方案**: 重建 venv:`rm -rf .venv && unirtm install`。
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 🔒 第 4 节 — 安全注意事项
|
|
141
|
+
|
|
142
|
+
### 安全模型
|
|
143
|
+
|
|
144
|
+
- **机密管理**: 所有机密必须通过环境变量注入或由 HashiCorp Vault 处理。严禁提交 `.env` 文件。
|
|
145
|
+
- **审计日志**: 所有关键操作(提交、发布、状态变更)均通过 Git 和 CI 日志记录。
|
|
146
|
+
- **供应链**: 所有 CI Action 均锁定到精确的版本/SHA。
|
|
147
|
+
|
|
148
|
+
### 最佳实践
|
|
149
|
+
|
|
150
|
+
| 维度 | 要求 | 实现 |
|
|
151
|
+
| :----- | :--------------- | :---------------------------- |
|
|
152
|
+
| 机密 | 仓库中无明文机密 | 提交时强制执行 `gitleaks` |
|
|
153
|
+
| 完整性 | 验证下载内容 | `common.sh` 中的 SHA-256 校验 |
|
|
154
|
+
| 权限 | 非 root 执行 | Dockerfile 最佳实践 |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 🧑💻 第 5 节 — 开发者指南
|
|
159
|
+
|
|
160
|
+
### 代码组织 (Code Organization)
|
|
161
|
+
|
|
162
|
+
```text
|
|
163
|
+
project-root/
|
|
164
|
+
├── .agent/ # AI 配置(单一事实来源)
|
|
165
|
+
│ ├── rules/ # 88 个 AI Agent 行为规则文件
|
|
166
|
+
│ └── workflows/ # SpecKit 斜杠命令定义
|
|
167
|
+
├── .github/ # GitHub 生态(Actions、模板、Dependabot)
|
|
168
|
+
│ └── workflows/ # CI/CD 流水线(lint、verify、release、security)
|
|
169
|
+
├── .devcontainer/ # DevContainer 配置,保障可复现的开发环境
|
|
170
|
+
├── docs/ # 项目文档
|
|
171
|
+
│ ├── adr/ # 架构决策记录
|
|
172
|
+
│ ├── runbooks/ # 运维与恢复手册
|
|
173
|
+
│ └── glossary.md # 中英文对照术语表
|
|
174
|
+
├── scripts/ # POSIX Shell 自动化脚本(setup、install、verify)
|
|
175
|
+
│ └── lib/ # 共享 Shell 库函数
|
|
176
|
+
└── Makefile # 任务编排(setup、install、lint、verify、audit)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**命名规范**:核心规则文件使用 `NN-短横线命名.md`,语言栈规则使用 `technology.md`,
|
|
180
|
+
工作流文件使用 `namespace.verb.md`,Shell 脚本使用 `kebab-case.sh`。
|
|
181
|
+
|
|
182
|
+
### 扩展点
|
|
183
|
+
|
|
184
|
+
1. **添加规则**: 在 `.agent/rules/` 中创建新的 `.md` 文件,并在 `00-index.md` 中关联。
|
|
185
|
+
2. **添加命令**: 将 `.md` 文件添加到 `.agent/workflows/`。
|
|
186
|
+
3. **添加 IDE 支持**: 按照 Rule 03 中的软链接模式创建重定向文件夹(例如 `.myide/`)。
|
|
187
|
+
|
|
188
|
+
### 本地开发设置
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
git clone <repo>
|
|
192
|
+
cd <repo>
|
|
193
|
+
git config core.ignorecase false # Mac/Windows 用户必须执行此设置
|
|
194
|
+
unirtm install
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### 参考资料
|
|
198
|
+
|
|
199
|
+
- [完整文档](docs/index.md)
|
|
200
|
+
- [项目术语表](docs/glossary.md)
|
|
201
|
+
- [约定式提交](https://www.conventionalcommits.org/)
|
|
202
|
+
|
|
203
|
+
### 🚀 代理使用场景
|
|
204
|
+
|
|
205
|
+
`GITHUB_PROXY` (默认: `https://gh-proxy.sn0wdr1am.com/`) 针对特定的网络加速场景进行了优化。在不支持的协议(如 Git)上误用它会导致错误。
|
|
206
|
+
|
|
207
|
+
| 场景 | 是否支持 | 示例 / 说明 |
|
|
208
|
+
| :--------------------- | :------------ | :--------------------------------------------- |
|
|
209
|
+
| **Release 文件** | ✅ 支持 | `.../releases/download/v1.0/tool.zip` |
|
|
210
|
+
| **源码归档 (Archive)** | ✅ 支持 | `.../archive/master.zip` 或 `.tar.gz` |
|
|
211
|
+
| **文件直接链接** | ✅ 支持 | `.../blob/master/filename` |
|
|
212
|
+
| **Git Clone** | ❌ **不支持** | **请勿**用于 `git clone` 或 `insteadOf` 配置。 |
|
|
213
|
+
| **项目文件夹** | ❌ **不支持** | 不支持通过代理进行项目文件夹的浏览或克隆。 |
|
|
214
|
+
|
|
215
|
+
> [!IMPORTANT]
|
|
216
|
+
> 为了防止破坏工具链(如 `mise` 或 `asdf`),本模板显式禁用了通过此代理进行的 Git 重定向。请仅在脚本中进行直接 HTTP 下载时使用它。
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 📄 许可证
|
|
221
|
+
|
|
222
|
+
本项目采用 **MIT 许可证** 授权。
|
|
223
|
+
版权所有 (c) 2026-现在 [SnowdreamTech Inc.](https://github.com/snowdreamtech)
|
|
224
|
+
详见 [LICENSE](./LICENSE) 文件。
|
|
225
|
+
|
|
226
|
+
## Star History
|
|
227
|
+
|
|
228
|
+
[](https://www.star-history.com/?repos=snowdreamtech%2Ftemplate&type=date&legend=top-left)
|
package/bin/unirtm
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@snowdreamtech/unirtm-linux-arm-5",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "unirtm binary for Linux armv5",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/snowdreamtech/unirtm",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/snowdreamtech/unirtm"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/snowdreamtech/unirtm/issues"
|
|
13
|
+
},
|
|
14
|
+
"os": ["linux"],
|
|
15
|
+
"cpu": ["arm"],
|
|
16
|
+
"bin": {
|
|
17
|
+
"unirtm": "bin/unirtm"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"bin/",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"README.md",
|
|
23
|
+
"README_zh-CN.md"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
}
|
|
28
|
+
}
|