diff --git a/.tasks/STATUS.md b/.tasks/STATUS.md index 4ccda78..aff3cca 100644 --- a/.tasks/STATUS.md +++ b/.tasks/STATUS.md @@ -57,39 +57,12 @@ Per-task deep context lives in `.tasks/.md` (created on demand by `us --- -## ⚪ [factory-yaml-mcp-subdir-schema] — Bug в `factory.yaml` v0.1.0: компоненты `interns-mcp` (lines 41-53) и `projects-meta-mcp` (lines 27-39) объявлены как отдельные git-репы: +## 🔴 [factory-yaml-mcp-subdir-schema] — Bug: `interns-mcp` и `projects-meta-mcp` описаны как standalone git-репы, но реально — поддиректории `.common`. Фикс: drop `source`, bump v0.2.0. -```yaml -- name: interns-mcp - source: - type: git - url: "{git_host}/{git_org}/interns-mcp" # ← репа НЕ существует - branch: main - target: "{projects_dir}/.common/lib/interns-mcp" -``` - -Реальная архитектура: `interns-mcp` и `projects-meta-mcp` — **поддиректории единой репы `.common`** (`OpeItcLoc03/common`). Они мигрированы туда per closed task `[migrate-to-common-lib]` (см. `~/projects/projects-meta-mcp/.tasks/STATUS.md` line 127-134). Standalone-репа `projects-meta-mcp` на gitea **архивирована** (sync logs «1 archived skipped»). Standalone-репы `interns-mcp` **никогда не существовало** — она с самого начала жила субдиректорией `.common`. - -Симптом: factory.yaml вводит в заблуждение. Если/когда L1 Go-бинарь будет реализован и попытается клонировать `{git_host}/{git_org}/interns-mcp`, он провалится (404). Сейчас манифест читают только люди (и редко) — но баг ловит и агентов: на 2026-05-07 `setup-interns` агент на свежей машине (stostayer.new) bail-out с предложением «initialize from scratch» вместо clone-`.common`-fallback. И я (meeting-room агент в этой же сессии) тиражировал это во временный wrong workaround `git clone .../interns-mcp.git` — пока юзер не поправил. - -**Связь:** в `claude-skills` параллельно открыта `[setup-interns-clone-fallback]` — фикс L2-скила на правильный clone-`.common` pattern. Эта таска (factory) — фикс L1 manifest на ту же проблему. - -**Status:** ready -**Where I stopped:** Created 2026-05-07 после incident на stostayer.new — где `setup-interns` skill bail-out на missing source, и meeting-room агент дал wrong workaround про clone несуществующей `interns-mcp.git` репы. Юзер указал, что это всё растёт из неверного описания в `factory.yaml`. Параллельный фикс L2-скила: `[setup-interns-clone-fallback]` в `claude-skills`. -**Next action:** 1) Решить schema-вопрос в `factory.yaml`: как описать «component, который — поддиректория другой репы»? Варианты: (a) дроп `source` блока, явный `deps: [dot-common]` + `health_check` на наличие subdir + `setup_skill: setup-interns` (минимально invasive); (b) ввести новый `source.type: subdir-of`, ссылающийся на parent component; (c) `source.type: dir` с относительным path внутри другой checkout-репы. **Recommendation:** (a) — минимум schema-изменений, semantics уже выражены через `deps`. - -2) Применить (a) к двум компонентам: `interns-mcp` и `projects-meta-mcp` — убрать их `source.type: git` блоки, добавить `deps: [dot-common]` (если не было), оставить `target` + `setup_skill` + `health_check`. - -3) Bump `factory.yaml > version: 0.1.0` → `0.2.0` (MINOR — schema/contract change, breaks naive consumers если они уже что-то парсили). - -4) Если есть проза в `.wiki/concepts/factory-bootstrap.md` про эти компоненты — синхронизировать (упомянуть, что MCP-серверы живут субдирами `.common`, ссылка на `[migrate-to-common-lib]`). - -5) Smoke-test: пройтись по manifest'у глазами, проверить consistency. Когда L1 Go-бинарь реализуется (`[factory-l1-design]`), он будет правильно интерпретировать subdir-компоненты через deps-chain (clone .common → verify subdirs). - -6) Commit `fix(factory.yaml): v0.2.0 — interns-mcp + projects-meta-mcp как subdirs of .common, не standalone репы`. - -7) `tasks_close`. -**Branch:** n/a +**Status:** active +**Where I stopped:** Starting implementation +**Next action:** Edit factory.yaml — drop source blocks, bump version +**Branch:** master --- diff --git a/.tasks/factory-yaml-mcp-subdir-schema.md b/.tasks/factory-yaml-mcp-subdir-schema.md new file mode 100644 index 0000000..6a4289e --- /dev/null +++ b/.tasks/factory-yaml-mcp-subdir-schema.md @@ -0,0 +1,23 @@ +# factory-yaml-mcp-subdir-schema + +## Goal +Fix `factory.yaml` v0.1.0 bug: `interns-mcp` and `projects-meta-mcp` declared as standalone git repos, but they're subdirectories of `.common` repo. When L1 Go binary tries `git clone` on these URLs it gets 404. + +## Key files +- `factory.yaml` — the manifest with the bug (lines 27-53) +- `.wiki/concepts/factory-bootstrap.md` — wiki doc referencing these components + +## Decisions log +- 2026-05-07: Chose option (a) — drop `source` block for subdir components, rely on `deps: [dot-common]` for clone semantics. Minimal schema change, semantics already expressed through deps chain. + +## Open questions +- [ ] None remaining — option (a) selected + +## Completed steps +- [x] Task created, plan defined + +## Notes +- Parallel fix in `claude-skills`: `[setup-interns-clone-fallback]` — L2 skill fix +- `projects-meta-mcp` standalone repo on gitea is archived +- `interns-mcp` standalone repo never existed +- Both live as subdirs under `OpeItcLoc03/common` \ No newline at end of file diff --git a/.wiki/concepts/factory-bootstrap.md b/.wiki/concepts/factory-bootstrap.md index eba1d2a..bca118d 100644 --- a/.wiki/concepts/factory-bootstrap.md +++ b/.wiki/concepts/factory-bootstrap.md @@ -23,7 +23,7 @@ source_project: .meeting-room | Tasks / PMO | `.tasks/` (local) + `mcp__projects-meta__tasks_*` (shared) | живой, 14 проектов в кэше | | Shared services | `.common/` (lib/scripts/secrets/prompts/config) | живой | | Tooling registry | `claude-skills/` (~21 скил) | живой | -| Bus services | `.common/lib/projects-meta-mcp/`, `.common/lib/interns-mcp/` | живые | +| Bus services | `.common/lib/projects-meta-mcp/`, `.common/lib/interns-mcp/` (subdirs of .common, not standalone repos — см. `[migrate-to-common-lib]`) | живые | | Communications | `.meeting-room/` | живой | **Что не работало для онбординга нового сотрудника:** @@ -72,7 +72,7 @@ source_project: .meeting-room health_check: "test -f {target}/scripts/claude-switch.ps1" - name: projects-meta-mcp - source: { type: git, url: "{gitea}/projects-meta-mcp" } + # Subdirectory of .common repo — no standalone git source target: "{projects_dir}/.common/lib/projects-meta-mcp" deps: [dot-common] setup_skill: setup-projects-meta diff --git a/factory.yaml b/factory.yaml index 1a4fc22..d7afa1e 100644 --- a/factory.yaml +++ b/factory.yaml @@ -2,7 +2,7 @@ # Variables: {gitea}, {projects_dir}, {factory}, {home} # Substitution happens at runtime from ~/.config/factory/home.toml -version: "0.1.0" +version: "0.2.0" # Git host configuration (overrides {gitea} default) git_host: "https://git.kzntsv.site" @@ -26,10 +26,7 @@ components: - name: projects-meta-mcp display_name: "Projects-meta MCP server" - source: - type: git - url: "{git_host}/{git_org}/projects-meta-mcp" - branch: main + # Subdirectory of .common repo — no standalone git source target: "{projects_dir}/.common/lib/projects-meta-mcp" deps: [dot-common] setup_skill: setup-projects-meta @@ -40,10 +37,7 @@ components: - name: interns-mcp display_name: "Interns MCP server" - source: - type: git - url: "{git_host}/{git_org}/interns-mcp" - branch: main + # Subdirectory of .common repo — no standalone git source target: "{projects_dir}/.common/lib/interns-mcp" deps: [dot-common] setup_skill: setup-interns