From 621eacc8082c77e969badf2e15b4049b97b78b65 Mon Sep 17 00:00:00 2001 From: vitya Date: Wed, 26 Aug 2026 22:57:39 +0300 Subject: [PATCH] =?UTF-8?q?feat(skill):=20project-create=20v0.1.0=20?= =?UTF-8?q?=E2=80=94=20mappa-=D1=81=D1=82=D0=BE=D1=80=D0=BE=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B5=D0=BA=D1=82=D0=B0=20(=D1=81=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D1=81=D0=B8=D1=82=D1=8C=20=D0=B0=D0=B4=D1=80=D0=B5=D1=81=20?= =?UTF-8?q?=E2=86=92=20pre-flight=20=E2=86=92=20mappa+=D1=80=D0=B5=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=BE=D0=B4=D0=BD=D0=BE=D0=B2=D1=80=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D0=BE=20=E2=86=92=20=D0=BF=D0=B0=D0=BF=D0=BA=D0=B0?= =?UTF-8?q?=20=E2=86=92=20bootstrap)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skills/project-create/SKILL.md | 84 ++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 skills/project-create/SKILL.md diff --git a/skills/project-create/SKILL.md b/skills/project-create/SKILL.md new file mode 100644 index 0000000..a1b1617 --- /dev/null +++ b/skills/project-create/SKILL.md @@ -0,0 +1,84 @@ +--- +name: project-create +author: ours +version: 0.1.0 +description: > + Mappa-side cycle of creating a new project: ask the operator for the hosting + address (platform + user/org) FIRST — never derive it from neighbouring + projects — then pre-flight checks (free in mappa AND in gitea), then create + mappa registration and the gitea repo SIMULTANEOUSLY (repo via .admin: task + + covering letter, priority P0, no paired review for ops), then ask where on + disk the project folder goes and what it's named, create the folder, and + hand over to project-bootstrap (general skill). Triggers (bilingual): + «создай проект», «заведи проект», «новый проект», «создать проект на + гите», "create a project", "start a new project", "set up a project", + «куда разместить проект». NOT repo content/bootstrap (→ project-bootstrap), + NOT renaming/re-hosting an existing project. +--- + +# Project Create (mappa-side) + +The cycle of creating a **new project** from the mappa side. Built live on the +tg-digest case (2026-08-27, brainstorm:129): the operator ran the pattern +through a real creation, the skill records it. Guarantees that the hosting +address is the operator's decision (not the agent's guess), that mappa and +gitea stay in sync (created together, not one before the other), and that the +operator picks the on-disk location. + +## When to use + +Before any `projects_register` / gitea repo creation for a **new** project. + +**Activates:** «создай проект», «заведи проект», «новый проект», «создать проект на гите», "create a project", "start a new project", "set up a project". + +**Not applicable:** +- Repo content / bootstrap (git init, README, AGENTS.md, .wiki, .tasks, remote push) → `project-bootstrap` (general skill; project-create hands over to it). +- Re-hosting / renaming an existing project → read what's there first, no creation. +- A project that already exists in mappa registry or gitea → verify with the operator, don't create a duplicate. + +## Hard rule (the original lesson) + +**The hosting address (platform + user/org) is the operator's decision. ASK, never derive.** Do not copy the owner from a neighbouring project (the live failure: `victor/tg-digest` was assumed by analogy with `victor/yt-digest` — wrong, the operator had to correct it). Options to offer: platform (Gitea git.kzntsv.site / GitHub), and for Gitea — the known users/orgs from the registry (e.g. `victor` personal apps, `OpeItcLoc03` infra/meta, `cancel_music` music modules). The registry `mcp__mappa__projects_list` shows the existing `qualified` names — use it to propose options, but the choice is the operator's. + +## Steps (the pattern) + +1. **Ask the hosting address.** Platform (Gitea/GitHub) + user/org. One question, offer the registry-derived options, wait for the answer. Do NOT register anything yet. +2. **Pre-flight checks** — can we create in BOTH places: + - mappa: the project name is not in the registry (`projects_list` / `projects_resolve`). + - gitea: repo name is free, the user/org exists, we have rights (the .admin owns the tokens — it checks on its side). +3. **Create SIMULTANEOUSLY** (not one before the other): + - `mcp__mappa__projects_register` — mappa registration (id returned). + - repo via `.admin` — `task_create` in `.admin` (**priority P0** — it blocks the project chain) + covering letter via `inbox_send` (a task on the board doesn't ping a live session). The repo task is an **ops task → NO paired review** (mappa-delegation: skip review for ops). Acceptance: repo created private, answer letter with clone URLs + which token is needed for push. +4. **Ask the operator: where on disk** the project folder goes and what it's named — do not guess the path. +5. **Create the folder** on disk. +6. **Hand over to bootstrap** — `project-bootstrap` (general skill) does git init, .gitignore, README, AGENTS.md, remote connect, push. Separate step, after the repo exists. + +## Why the repo goes through `.admin` + +Gitea tokens are secrets — they live only with `.admin` (zone rule: secrets stay out of other agents). Precedent: yt-digest (inbox:2305) and tg-digest (inbox:2463) — `.admin` creates the repo via `POST /user/repos` → transfer to the target owner (the admin endpoint refuses without write:admin), then answers with the clone URLs and the push token (`pass show gitea/admin-token` for OpeItcLoc03, or a user token with repo:write for the target owner). + +## Failure modes + +- The operator hasn't chosen the address → abort, don't create. The address is the operator's call. +- mappa name taken → suggest a rename, don't overwrite. +- gitea name taken / user missing → report, suggest a rename. +- `.admin` repo task failed → report, don't register the project alone (mappa and gitea are created as a pair). +- `task_create` in `.admin` → 422 secret-detected on the token scope string (`write:repository` is flagged) → rephrase ("токен с правами на запись в репозиторий"), don't include raw token strings. +- The operator answers the on-disk path only after the repo is created → that's the normal order, fine. + +## What NOT to do + +- Don't assume the hosting owner from a neighbouring project — ask (the hard rule). +- Don't create mappa registration alone without the repo (they're a pair). +- Don't create the repo alone without the mappa registration. +- Don't create the on-disk folder in a guessed location — ask. +- Don't do the bootstrap inside this skill — that's `project-bootstrap`. +- Don't create a paired review for the `.admin` repo task (ops task). +- Don't skip the covering letter to `.admin` (task + letter, not just task). + +## Reference + +- Mappa registry: `mcp__mappa__projects_list` / `projects_register` / `projects_resolve`. +- Repo creation: `.admin` (task + letter, mappa-delegation canon; ops → no review). +- Bootstrap: `project-bootstrap` (general skill). +- Live case: brainstorm:129 (tg-digest, .workshop) — the whole pattern was built there.