feat(skills): update setup-projects-meta paths for .common/lib/

- Replace ~/.local/projects-meta-mcp → ~/projects/.common/lib/projects-meta-mcp
- Update setup-projects-meta and using-projects-meta skills
- Rebuild dist/ with new paths

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 20:35:59 +03:00
parent 05ea501683
commit 001f4c566b
21 changed files with 38 additions and 1828 deletions

View File

@@ -27,8 +27,8 @@ only place that touches user-level config or installs the server.
| Path | Role |
|---|---|
| `~/.local/projects-meta-mcp/` | server repo (cloned from Gitea) |
| `~/.local/projects-meta-mcp/dist/server.js` | built stdio entry point |
| `~/projects/.common/lib/projects-meta-mcp/` | server repo (cloned from Gitea) |
| `~/projects/.common/lib/projects-meta-mcp/dist/server.js` | built stdio entry point |
| `~/.config/projects-mcp/auth.toml` | Gitea credentials (token-bearing) |
| `~/.cache/projects-mcp/tasks.json` | aggregated tasks cache |
| `~/projects/.wiki/` | shared wiki clone (Gitea repo `projects-wiki`, content in root) |
@@ -67,7 +67,7 @@ Full procedure with shell snippets and templates lives in [`SKILL.md`](SKILL.md)
1. Stop. Don't fix forward.
2. `cp <file>.bak-<ts> <file>` for `~/.claude.json` and `~/.config/projects-mcp/auth.toml`.
3. Optional: `rm -rf ~/.local/projects-meta-mcp` and `rm -rf ~/.cache/projects-mcp`.
3. Optional: `rm -rf ~/projects/.common/lib/projects-meta-mcp` and `rm -rf ~/.cache/projects-mcp`.
Keep `~/projects/.wiki/` — it's a useful clone regardless of MCP state.
4. Restart Claude Code.
5. Confirm `mcp__projects-meta__*` tools are gone (or back to the prior version).

View File

@@ -1,7 +1,7 @@
---
name: setup-projects-meta
version: 1.0.0
description: Installs and configures the local `projects-meta-mcp` stdio server — clones the repo to `~/.local/projects-meta-mcp`, builds it, writes `~/.config/projects-mcp/auth.toml` with the user's Gitea token, clones the shared wiki to `~/projects/.wiki/` (content lives in root), and registers `mcpServers.projects-meta` in `~/.claude.json`. Use this skill when the user says "install projects-meta", "set up projects-meta", "configure projects-meta", "настрой projects-meta", "установи projects-meta", "projects-meta не работает", "projects-meta isn't working", or whenever the `mcp__projects-meta__*` tools are missing in a session that needs cross-project task aggregation or the shared Gitea wiki. Cross-platform — Windows / Linux / macOS. Mutates user-level config and writes secrets; pauses for confirmation before every write.
description: Installs and configures the local `projects-meta-mcp` stdio server — clones the repo to `~/projects/.common/lib/projects-meta-mcp`, builds it, writes `~/.config/projects-mcp/auth.toml` with the user's Gitea token, clones the shared wiki to `~/projects/.wiki/` (content lives in root), and registers `mcpServers.projects-meta` in `~/.claude.json`. Use this skill when the user says "install projects-meta", "set up projects-meta", "configure projects-meta", "настрой projects-meta", "установи projects-meta", "projects-meta не работает", "projects-meta isn't working", or whenever the `mcp__projects-meta__*` tools are missing in a session that needs cross-project task aggregation or the shared Gitea wiki. Cross-platform — Windows / Linux / macOS. Mutates user-level config and writes secrets; pauses for confirmation before every write.
---
# setup-projects-meta
@@ -35,7 +35,7 @@ The procedure clones a repo, writes `~/.config/projects-mcp/auth.toml` (carries
- Confirm Claude Code is the current harness (need `mcpServers` registration in `~/.claude.json`).
- Confirm `git`, `node`, `npm` are on `PATH`. Node ≥ 18 (the server uses ES modules).
- Confirm network reachability to `https://git.kzntsv.site` (the Gitea host). On HTTP 401/403 later, the token is dead — stop and ask for a new one.
- Pick paths: `~/.local/projects-meta-mcp`, `~/.config/projects-mcp/`, `~/.cache/projects-mcp/`, `~/projects/.wiki/` (shared wiki clone). POSIX-style `~/...` resolves correctly under git-bash on Windows.
- Pick paths: `~/projects/.common/lib/projects-meta-mcp`, `~/.config/projects-mcp/`, `~/.cache/projects-mcp/`, `~/projects/.wiki/` (shared wiki clone). POSIX-style `~/...` resolves correctly under git-bash on Windows.
### Phase 1 — Discovery (read-only)
@@ -49,9 +49,9 @@ Search, in order. Report only "found at <path>", never echo token values.
The first hit wins. Capture internally for Phase 5; **never echo it in chat**.
**Repo install state.** Check whether `~/.local/projects-meta-mcp/.git` exists. If yes, `git -C ~/.local/projects-meta-mcp rev-parse HEAD` → record the SHA so Phase 4 can decide *clone* vs *pull*.
**Repo install state.** Check whether `~/projects/.common/lib/projects-meta-mcp/.git` exists. If yes, `git -C ~/projects/.common/lib/projects-meta-mcp rev-parse HEAD` → record the SHA so Phase 4 can decide *clone* vs *pull*.
**Build artifact.** Check `~/.local/projects-meta-mcp/dist/server.js`. If absent, Phase 4 will run `npm install && npm run build`.
**Build artifact.** Check `~/projects/.common/lib/projects-meta-mcp/dist/server.js`. If absent, Phase 4 will run `npm install && npm run build`.
**Shared wiki clone.** Check if `~/projects/.wiki/.git` exists and `origin` matches `https://git.kzntsv.site/OpeItcLoc03/projects-wiki(.git)?`. If non-matching `origin`, stop and ask — the user may have an unrelated wiki there.
@@ -65,7 +65,7 @@ Present a single-block plan to the user:
```
Token: <found at <path> | NOT FOUND — will ask>
Repo: <installed at ~/.local/projects-meta-mcp@<sha> | will clone>
Repo: <installed at ~/projects/.common/lib/projects-meta-mcp@<sha> | will clone>
Build artifact: <present | will run npm install && npm run build>
Wiki clone: <present at ~/projects/.wiki | will clone | wrong remote — STOP>
MCP entry: <present in ~/.claude.json | will add | will fix path>
@@ -92,12 +92,12 @@ Confirm both backups exist (when their source existed) before any further edit.
```bash
# Server
if [ -d ~/.local/projects-meta-mcp/.git ]; then
git -C ~/.local/projects-meta-mcp pull --ff-only
if [ -d ~/projects/.common/lib/projects-meta-mcp/.git ]; then
git -C ~/projects/.common/lib/projects-meta-mcp pull --ff-only
else
git clone https://git.kzntsv.site/OpeItcLoc03/projects-meta-mcp ~/.local/projects-meta-mcp
git clone https://git.kzntsv.site/OpeItcLoc03/projects-meta-mcp ~/projects/.common/lib/projects-meta-mcp
fi
cd ~/.local/projects-meta-mcp
cd ~/projects/.common/lib/projects-meta-mcp
npm install
npm run build
@@ -110,7 +110,7 @@ else
fi
```
Verify `~/.local/projects-meta-mcp/dist/server.js` exists after build. If not — abort, the build failed; ask the user to run `npm run build` manually and paste the output.
Verify `~/projects/.common/lib/projects-meta-mcp/dist/server.js` exists after build. If not — abort, the build failed; ask the user to run `npm run build` manually and paste the output.
### Phase 5 — Write `auth.toml`
@@ -173,7 +173,7 @@ Best-effort: call `mcp__projects-meta__meta_status`. If it returns a JSON blob w
Then run a one-shot sync to populate the cache:
```bash
cd ~/.local/projects-meta-mcp
cd ~/projects/.common/lib/projects-meta-mcp
node dist/sync.js
```
@@ -190,7 +190,7 @@ Tell the user:
registration binds to a fresh stdio session.
After restart:
• mcp__projects-meta__* tools serve from ~/.local/projects-meta-mcp/dist/server.js
• mcp__projects-meta__* tools serve from ~/projects/.common/lib/projects-meta-mcp/dist/server.js
• Cache lives at ~/.cache/projects-mcp/tasks.json (refresh: node dist/sync.js)
• Shared wiki clone at ~/projects/.wiki/ — `git -C ~/projects/.wiki pull --ff-only` for fresh anchors
• Backups saved at ~/.claude.json.bak-<ts> (and auth.toml.bak-<ts> if it existed before)
@@ -206,7 +206,7 @@ If a problem surfaces (now or after restart):
1. Stop. Don't try to fix forward.
2. Find the most recent `.bak-YYYYMMDD-HHMMSS` next to `~/.claude.json` (and `~/.config/projects-mcp/auth.toml` if applicable).
3. `cp <file>.bak-<ts> <file>` for each.
4. Optional: `rm -rf ~/.local/projects-meta-mcp` and `rm -rf ~/.cache/projects-mcp`. Keep `~/projects/.wiki/` — it's a useful clone regardless of MCP state.
4. Optional: `rm -rf ~/projects/.common/lib/projects-meta-mcp` and `rm -rf ~/.cache/projects-mcp`. Keep `~/projects/.wiki/` — it's a useful clone regardless of MCP state.
5. Restart Claude Code.
6. Confirm `mcp__projects-meta__*` is gone (or back to the pre-existing version).
7. Report what went wrong so we can fix the procedure.

View File

@@ -59,7 +59,7 @@ Before **any** `tasks_*` or `knowledge_*` call:
1. `mcp__projects-meta__meta_status` — probe cache age + errors.
2. If `cache_age_minutes` > 10 OR `errors_count` > 0 →
`node ~/.local/projects-meta-mcp/dist/sync.js`.
`node ~/projects/.common/lib/projects-meta-mcp/dist/sync.js`.
3. For shared-wiki **writes** (`knowledge_ingest`, `knowledge_promote`) →
**also** `git -C ~/projects/projects-wiki pull --ff-only`. Unconditional.
The MCP server uses sha-based optimistic locking on the wiki repo;
@@ -134,7 +134,7 @@ from `auth.toml`).
two different stores. `using-wiki` operates on the local one;
`using-projects-meta` queries / ingests the shared one.
- **Acting on stale `tasks_aggregate`.** If `meta_status.age_seconds` > 3600,
either run `node dist/sync.js` (in `~/.local/projects-meta-mcp`) or warn the
either run `node dist/sync.js` (in `~/projects/.common/lib/projects-meta-mcp`) or warn the
user about staleness.
- **Vague `knowledge_search` queries.** "auth" returns noise. Multi-word,
specific queries return targeted snippets.

View File

@@ -65,8 +65,8 @@ Use MCP only for **other** projects, **other** machines, or **shared** wiki cont
2. Branch on cache freshness:
• If cache_age_minutes > 10 OR errors_count > 0:
run `node ~/.local/projects-meta-mcp/dist/sync.js`
(or `npm run sync` from ~/.local/projects-meta-mcp).
run `node ~/projects/.common/lib/projects-meta-mcp/dist/sync.js`
(or `npm run sync` from ~/projects/.common/lib/projects-meta-mcp).
• Else: cache is fresh enough — skip sync, no need to hit the network.
3. For shared-wiki WRITES (knowledge_ingest, knowledge_promote):
@@ -221,7 +221,7 @@ User: "close `[projects-meta-skills]` in claude-skills"
| Reading current project's tasks via `tasks_get` instead of disk | Read `.tasks/STATUS.md` directly. MCP is for *other* projects. |
| Inlining `confirm: true` on the first mutation call | Always preview first; show user; only then `confirm: true`. |
| Using `knowledge_search` for the project's own wiki | The shared wiki is a separate Gitea repo. Local `.wiki/` is in cwd. |
| Acting on a stale `tasks_aggregate` without checking `meta_status` | Step 0 — Freshness gate is mandatory. If `cache_age_minutes` > 10 (or errors > 0), run `node ~/.local/projects-meta-mcp/dist/sync.js` first. |
| Acting on a stale `tasks_aggregate` without checking `meta_status` | Step 0 — Freshness gate is mandatory. If `cache_age_minutes` > 10 (or errors > 0), run `node ~/projects/.common/lib/projects-meta-mcp/dist/sync.js` first. |
| Skipping `git -C ~/projects/projects-wiki pull` before `knowledge_ingest` / `knowledge_promote` | sha-based optimistic lock will reject the commit (422) and the failure is opaque. Pull is unconditional for shared-wiki writes — fast-forward is a no-op when current. |
| Treating sync 401/403 as "MCP is fine, the page just doesn't exist yet" | 401/403 means the Gitea token is dead. Stop, tell the user to rotate `gitea_token` in `~/.config/projects-mcp/auth.toml`. Never guess on stale data. |
| Calling `knowledge_ingest` with the wrong `type` | `type` must be one of `entities` / `concepts` / `packages` / `sources` / `raw`. Mis-typed pages land in the wrong section and break `index.md`. |