refactor: update setup-projects-meta for simplified wiki pathing

- Changed from ~/projects/projects-wiki/.wiki to ~/projects/.wiki/
- Removed legacy migration logic (no longer needed)
- Updated all script references and documentation
- Simplified Phase 4 detection (single canon path)

This aligns with projects-wiki repo changes where nested .wiki/
was removed and content now lives in root.
This commit is contained in:
2026-05-03 17:55:06 +03:00
parent 7419c946e5
commit 96dd6d1cb6
2 changed files with 16 additions and 34 deletions

View File

@@ -3,7 +3,7 @@
One-time skill that brings up the local `projects-meta-mcp` stdio server on a
new (or freshly broken) machine. Clones the server repo, builds it, writes
`~/.config/projects-mcp/auth.toml` with the user's Gitea token, clones the
shared wiki to `~/projects/projects-wiki/.wiki`, and registers `mcpServers.projects-meta`
shared wiki to `~/projects/.wiki`, and registers `mcpServers.projects-meta`
in `~/.claude.json`.
The runtime policy for *using* the resulting tools lives in
@@ -31,8 +31,7 @@ only place that touches user-level config or installs the server.
| `~/.local/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/projects-wiki/` | shared wiki clone root (Gitea repo `projects-wiki`) |
| `~/projects/projects-wiki/.wiki/` | wiki content root (read by MCP server) |
| `~/projects/.wiki/` | shared wiki clone (Gitea repo `projects-wiki`, content in root) |
| `~/.claude.json` (`mcpServers.projects-meta`) | MCP registration |
## Hard rules
@@ -42,13 +41,9 @@ only place that touches user-level config or installs the server.
not to clone or write secrets.
- **Never echo the Gitea token in chat.** Edit / Write tool calls inevitably
contain it (that's how it lands in `auth.toml`); chat output must not.
- **Never clone over an unrelated `~/projects/projects-wiki/` (or legacy `~/projects/.wiki`).**
If either path exists with a non-matching `origin`, stop and ask — the user
- **Never clone over an unrelated `~/projects/.wiki/`.**
If it exists with a non-matching `origin`, stop and ask — the user
may have an unrelated wiki there.
- **Don't use the legacy `~/projects/.wiki` path.** It's deprecated — the MCP
server's `loadWiki` reads from `~/projects/projects-wiki/.wiki/<type>/...`,
while writes to `~/projects/.wiki/.wiki/...` would be invisible. Phase 4
detects a legacy clone and migrates to the canon path.
- **Always `chmod 600` `auth.toml` on Linux / macOS.** Token leak otherwise.
## Procedure (high-level)
@@ -73,7 +68,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`.
Keep `~/projects/projects-wiki/` — it's a useful clone regardless of MCP state.
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).