1c-project-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/1c-project-init — Initialize or enrich 1C project
/1c-project-init — 初始化或完善1C项目
Source workspace: (path where 1c-ai-development-kit is cloned)
YOUR_KIT_ROOT源工作空间: (1c-ai-development-kit的克隆路径)
YOUR_KIT_ROOTMode detection
模式检测
- exists in target → enrich (sync missing/outdated skills & docs)
.claude/skills/ - No → new (full init)
.claude/skills/
- 目标路径中存在→ 完善模式(同步缺失/过时的技能与文档)
.claude/skills/ - 不存在→ 新建模式(完整初始化)
.claude/skills/
Steps
操作步骤
1. Determine target path
1. 确定目标路径
- If argument provided → use it
- Otherwise → current working directory ()
pwd
- 如果提供了参数 → 使用参数指定的路径
- 否则 → 使用当前工作目录()
pwd
2. Run init script
2. 运行初始化脚本
powershell
powershell.exe -NoProfile -File "YOUR_KIT_ROOT\.claude\skills\1c-project-init\scripts\init.ps1" -TargetPath "<target>" -Mode <new|enrich>Script output lists what was copied/updated.
powershell
powershell.exe -NoProfile -File "YOUR_KIT_ROOT\.claude\skills\1c-project-init\scripts\init.ps1" -TargetPath "<target>" -Mode <new|enrich>脚本输出会列出所有已复制/更新的内容。
3. If mode = new — collect project info interactively
3. 如果是新建模式 — 交互式收集项目信息
Ask user (AskUserQuestion):
- Project name (for CLAUDE.md header)
- 1C base name (e.g. ,
Minim_kg)Buh - Platform version: /
8.3.24/8.3.258.3.27 - Web publication name (e.g. ,
minim) — for HTTP API and playwrightbuh - Project type: /
extension/configurationexternal-processor - EDT project name (Latin, e.g. ) — for edt-mcp reference
MyProject_25
Platform → server mapping (all on CT107 / YOUR_EDT_SERVER):
- → server
8.3.24, containerYOUR_EDT_SERVER:1641, web portonec-server-248081 - → server
8.3.25, containerYOUR_EDT_SERVER:1541, web portonec-server-258080 - → server
8.3.27, containerYOUR_EDT_SERVER:1741, web portonec-server-278082
向用户询问(AskUserQuestion):
- 项目名称(用于CLAUDE.md头部)
- 1C base名称(例如、
Minim_kg)Buh - 平台版本: /
8.3.24/8.3.258.3.27 - Web发布名称(例如、
minim)——用于HTTP API和playwrightbuh - 项目类型: /
extension/configurationexternal-processor - EDT项目名称(仅拉丁字母,例如)——用于edt-mcp引用
MyProject_25
平台与服务器映射(全部部署在CT107 / YOUR_EDT_SERVER上):
- → 服务器
8.3.24,容器YOUR_EDT_SERVER:1641,Web端口onec-server-248081 - → 服务器
8.3.25,容器YOUR_EDT_SERVER:1541,Web端口onec-server-258080 - → 服务器
8.3.27,容器YOUR_EDT_SERVER:1741,Web端口onec-server-278082
4. Generate CLAUDE.md
4. 生成CLAUDE.md
Read template:
Fill all placeholders:
YOUR_KIT_ROOT\.claude\skills\1c-project-init\templates\CLAUDE.md.template- — project name
{{PROJECT_NAME}} - — brief description
{{PROJECT_DESCRIPTION}} - — platform version (e.g.
{{V8_VERSION}})8.3.25 - —
{{SERVER}}YOUR_EDT_SERVER - — from platform map
{{PORT}} - —
{{SERVER_SUFFIX}}/24/2527 - — from platform map
{{WEB_PORT}} - — 1C base name
{{BASE_NAME}} - — web publication name
{{PUBLICATION}} - — EDT project name
{{EDT_PROJECT_NAME}}
Write to .
<target>/CLAUDE.md读取模板:
填充所有占位符:
YOUR_KIT_ROOT\.claude\skills\1c-project-init\templates\CLAUDE.md.template- — 项目名称
{{PROJECT_NAME}} - — 项目简介
{{PROJECT_DESCRIPTION}} - — 平台版本(例如
{{V8_VERSION}})8.3.25 - —
{{SERVER}}YOUR_EDT_SERVER - — 来自平台映射表
{{PORT}} - —
{{SERVER_SUFFIX}}/24/2527 - — 来自平台映射表
{{WEB_PORT}} - — 1C base名称
{{BASE_NAME}} - — Web发布名称
{{PUBLICATION}} - — EDT项目名称
{{EDT_PROJECT_NAME}}
写入到。
<target>/CLAUDE.md5. Generate .mcp.json
5. 生成.mcp.json
Read template:
Replace and placeholders.
Write to .
YOUR_KIT_ROOT\.claude\skills\1c-project-init\templates\mcp.json.template{{PROJECT_NAME}}{{PUBLICATION}}<target>/.mcp.json读取模板:
替换和占位符。
写入到。
YOUR_KIT_ROOT\.claude\skills\1c-project-init\templates\mcp.json.template{{PROJECT_NAME}}{{PUBLICATION}}<target>/.mcp.json6. Generate .v8-project.json if not exists
6. 如果不存在.v8-project.json则生成该文件
Use platform map to fill server/port automatically:
json
{
"v8path": "",
"infobase": {
"server": "YOUR_EDT_SERVER:<PORT>",
"ref": "<BASE_NAME>",
"user": "",
"password": ""
},
"publication": "http://YOUR_EDT_SERVER:<WEB_PORT>/<PUBLICATION>"
}使用平台映射表自动填充服务器/端口:
json
{
"v8path": "",
"infobase": {
"server": "YOUR_EDT_SERVER:<PORT>",
"ref": "<BASE_NAME>",
"user": "",
"password": ""
},
"publication": "http://YOUR_EDT_SERVER:<WEB_PORT>/<PUBLICATION>"
}7. Create openspec structure if mode = new
7. 新建模式下创建openspec目录结构
openspec/
project.md ← project context for AI
changes/ ← active proposals
specs/ ← feature specs
archive/ ← doneopenspec/
project.md ← AI使用的项目上下文
changes/ ← 待处理的变更提案
specs/ ← 功能规范
archive/ ← 已归档内容8. Report
8. 结果报告
List what was created/updated. Remind user to configure:
- in
v8path.v8-project.json - MCP port in if using minimkg-enhanced
.mcp.json - Open project with in target directory
claude
列出所有已创建/更新的内容,提醒用户配置:
- 中的
.v8-project.jsonv8path - 如果使用minimkg-enhanced需配置中的MCP端口
.mcp.json - 在目标目录使用命令打开项目
claude
9. Register in EDT (optional)
9. 在EDT中注册(可选)
Ask: "Зарегистрировать проект в EDT на CT107?"
If yes — determine mode:
- Project already has with 1C XML and
src/file → mode=.projectproject - Project has with 1C XML but no
src/→ mode=.projectxml - Only available → mode=
.dtdt
Run:
powershell
powershell.exe -NoProfile -File "YOUR_KIT_ROOT\.claude\skills\1c-project-init\scripts\edt-import.ps1" `
-Mode <mode> -Source "<path-on-CT107>" -ProjectName "<EDT_PROJECT_NAME>" `
-PlatformVersion "<V8_VERSION>" -ServerVersion "<SERVER_SUFFIX>"For dt mode with extensions add .
After import verify with .
-WithExtensionsedt-mcp list_projectsEDT project name rules: Latin only, no Cyrillic, no spaces. Convention: (e.g. ).
<ProjectName>_<ServerSuffix>MyProject_25询问用户: "Зарегистрировать проект в EDT на CT107?"
如果用户同意 — 确定导入模式:
- 项目已存在包含1C XML的目录和
src/文件 → 模式=.projectproject - 项目存在包含1C XML的目录但无
src/文件 → 模式=.projectxml - 仅存在文件 → 模式=
.dtdt
运行命令:
powershell
powershell.exe -NoProfile -File "YOUR_KIT_ROOT\.claude\skills\1c-project-init\scripts\edt-import.ps1" `
-Mode <mode> -Source "<path-on-CT107>" -ProjectName "<EDT_PROJECT_NAME>" `
-PlatformVersion "<V8_VERSION>" -ServerVersion "<SERVER_SUFFIX>"如果是dt模式且存在扩展,添加参数。
导入完成后使用验证结果。
-WithExtensionsedt-mcp list_projectsEDT项目名称规则: 仅使用拉丁字母,不可使用西里尔字母,不可包含空格。命名规范: (例如)。
<ProjectName>_<ServerSuffix>MyProject_25Enrich mode specifics
完善模式注意事项
Compare skill files by content hash — copy only if workspace version is newer or file missing in target.
Always overwrite (platform specs don't change per-project).
Never overwrite: , , , .
.claude/docs/CLAUDE.md.mcp.json.v8-project.jsonopenspec/按内容哈希比较技能文件——仅当工作空间版本更新或者目标路径中缺少该文件时才复制。
始终覆盖(平台规范不会随项目变化)。
永不覆盖以下文件/目录: 、、、。
.claude/docs/CLAUDE.md.mcp.json.v8-project.jsonopenspec/