$npx -y skills add Arman-Kudaibergenov/1c-ai-development-kit --skill 1c-project-initЭтот скилл MUST быть вызван когда пользователь говорит "инициализируем проект", "init project", просит настроить 1С-проект. SHOULD также вызывать для добавления MCP-серверов и skills к существующему проекту. Do NOT использовать для создания объектов конфигурации — используй meta-
| 1 | # /1c-project-init — Initialize or enrich 1C project |
| 2 | |
| 3 | Source workspace: `C:\Users\YOUR_USERNAME\workspace\ai\1c-AI-workspace` |
| 4 | |
| 5 | ## Mode detection |
| 6 | |
| 7 | - `.claude/skills/` exists in target → **enrich** (sync missing/outdated skills & docs) |
| 8 | - No `.claude/skills/` → **new** (full init) |
| 9 | |
| 10 | ## CRITICAL: Use skills, not manual 1C commands |
| 11 | |
| 12 | **NEVER run 1cv8 DESIGNER manually** when a skill exists for the operation. |
| 13 | |
| 14 | | Task | WRONG | RIGHT | |
| 15 | |------|-------|-------| |
| 16 | | Dump XML | `ssh ... docker exec ... 1cv8 DESIGNER /DumpConfigToFiles` | `/db-dump-xml` skill | |
| 17 | | Load XML | `docker exec ... 1cv8 DESIGNER /LoadConfigFromFiles` | `/db-load-xml` skill | |
| 18 | | Build CF | manual 1cv8 | `/db-dump-cf`, `/cf-init` skills | |
| 19 | |
| 20 | The `/db-dump-xml` skill reads `.v8-project.json` automatically and connects to the remote server directly — **no need to run DESIGNER inside the container**. License PROF on the local machine is sufficient for all DESIGNER operations including DumpConfigToFiles and extension dumps. |
| 21 | |
| 22 | ## Steps |
| 23 | |
| 24 | ### 1. Determine target path |
| 25 | - If argument provided → use it |
| 26 | - Otherwise → current working directory (`pwd`) |
| 27 | |
| 28 | ### 2. Run init script |
| 29 | |
| 30 | ```powershell |
| 31 | powershell.exe -NoProfile -File "C:\Users\YOUR_USERNAME\workspace\ai\1c-AI-workspace\.claude\skills\1c-project-init\scripts\init.ps1" -TargetPath "<target>" -Mode <new|enrich> |
| 32 | ``` |
| 33 | |
| 34 | Script output lists what was copied/updated. |
| 35 | |
| 36 | ### 3. If mode = new — collect project info interactively |
| 37 | |
| 38 | **Ask ALL questions upfront in a single AskUserQuestion call (multiple questions at once).** |
| 39 | |
| 40 | Question order matters — project type and extension names come FIRST: |
| 41 | |
| 42 | 1. **Project type** (options): `configuration` / `extension` / `configuration + extension` / `external-processor / other` |
| 43 | 2. **Extension name(s)** — ask only if type includes extension. If multiple, comma-separated (e.g. `МоёРасширение, ДругоеРасширение`) |
| 44 | 3. **1C base name** (e.g. `Forte`, `Buh`) |
| 45 | 4. **Platform version**: `8.3.24` / `8.3.25` / `8.3.27` |
| 46 | 5. **Web publication name** (e.g. `forte`, `buh`) — for HTTP API and playwright |
| 47 | 6. **Admin login and password** — for `.v8-project.json` |
| 48 | |
| 49 | Note: questions 1+2 can be asked together in first call; 3-6 in second call if user answered that extensions are involved. Or ask all in one call if possible. |
| 50 | |
| 51 | Platform → server mapping (all on CT107 / YOUR_EDT_SERVER): |
| 52 | - `8.3.24` → server `YOUR_EDT_SERVER:1641`, container `onec-server-24`, web port `8081` |
| 53 | - `8.3.25` → server `YOUR_EDT_SERVER:1541`, container `onec-server-25`, web port `8080` |
| 54 | - `8.3.27` → server `YOUR_EDT_SERVER:1741`, container `onec-server-27`, web port `8082` |
| 55 | |
| 56 | ### 4. Generate CLAUDE.md |
| 57 | |
| 58 | Read template: `C:\Users\YOUR_USERNAME\workspace\ai\1c-AI-workspace\.claude\skills\1c-project-init\templates\CLAUDE.md.template` |
| 59 | Fill all placeholders: |
| 60 | - `{{PROJECT_NAME}}` — project name |
| 61 | - `{{PROJECT_DESCRIPTION}}` — brief description (include project type + extensions if applicable) |
| 62 | - `{{V8_VERSION}}` — platform version (e.g. `8.3.25`) |
| 63 | - `{{SERVER}}` — `YOUR_EDT_SERVER` |
| 64 | - `{{PORT}}` — from platform map |
| 65 | - `{{SERVER_SUFFIX}}` — `24` / `25` / `27` |
| 66 | - `{{WEB_PORT}}` — from platform map |
| 67 | - `{{BASE_NAME}}` — 1C base name |
| 68 | - `{{PUBLICATION}}` — web publication name |
| 69 | - `{{EXTENSION_LINE}}` — `- Extensions: <names>` if extensions present, else omit line |
| 70 | - `{{DEV_ZONE}}` — `src/` / `ext/<ExtName>/` / `src/ + ext/<ExtName>/` |
| 71 | - `{{DEV_ZONE_NOTE}}` — `All modifications go into the extension, not the base configuration.` if extension-only or mixed; empty if configuration-only |
| 72 | - `{{STRUCTURE_LINES}}` — include `src/` line if has config, `ext/` line if has extensions: |
| 73 | - config: `src/ — configuration source` |
| 74 | - extension: `ext/<ExtName>/ — extension source (primary development zone)` |
| 75 | - both: `src/ — base configuration source (read-only reference)\next/<ExtName>/ — extension source (PRIMARY development zone)` |
| 76 | |
| 77 | Write to `<target>/CLAUDE.md`. |
| 78 | |
| 79 | ### 5. Generate .mcp.json |
| 80 | |
| 81 | Read template: `C:\Users\YOUR_USERNAME\workspace\ai\1c-AI-workspace\.claude\skills\1c-project-init\templates\mcp.json.template` |
| 82 | Fill all placeholders: |
| 83 | - `{{PROJECT_NAME}}` — project directory name (for bsl-lsp container) |
| 84 | - `{{PUBLICATION}}` — web publication name (for ai-debug URL) |
| 85 | - `{{WEB_PORT}}` — from platform map (8081/8080/8082) |
| 86 | - `{{ADMIN_USER}}` — admin login |
| 87 | - `{{ADMIN_PWD}}` — admin password |
| 88 | - `{{CODEMETADATA_URL}}` — codemetadata MCP URL. Format: `http://YOUR_MCP_SERVER:<PORT>/mcp`. Port from registry: next free in 7530+ range. If codemetadata not yet deployed, use placeholder `http://YOUR_MCP_SERVER:{{C |