Files
workspace-directory-standard/templates/w3-engineering.md
T

37 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# W3 工程型代码项目模板
> 来源:三端统一目录规范(README.md)2.3 节
> 适用:主要交付代码、库、命令行工具、模型或可构建软件;不以长期在线服务运行为主。
## 结构
```text
<code-project>/
├── README.md # 项目卡片和使用说明,必建
├── .workspace.yaml # 类型登记,新建必建
├── src/ # 主代码;按语言可替换为 app/、lib/
├── tests/ # 自动化测试
├── examples/ # 最小可运行示例
├── config/ # 非敏感配置样例
├── data/
│ ├── raw/ # 原始数据,只读原则
│ ├── processed/ # 可重建的中间数据
│ └── output/ # 程序输出
├── research/ # 需求、设计、实验和架构说明
├── report/ # 测试报告、发布说明、成果报告
├── scripts/ # 构建、发布、一次性辅助脚本
├── logs/ # 本地运行日志
└── archive/ # 冻结产物,不存源码版本副本
```
## 仓库根模式 vs 容器模式
- **仓库根模式**:项目本身就是 Git 仓库时,src/tests 直接在根下,**不得再机械增加 code/ 包裹层**
- **容器模式**:单项目目录同时包含大量非代码材料时,把 Git 仓库放在 code/ 中(即 v1 模式)
## 命名与版本
- 仓库名/代码目录:英文小写连字符(kebab-case),语言生态要求下可用下划线
- 发布版本:语义化 Git tag(v1.2.0)
- README 必须给出:安装、运行、测试、输入输出及版本方式