build(dist-hermes): rebuild from source (wiki 1.1.0, projects-meta 1.2.0)

This commit is contained in:
2026-05-25 00:28:54 +03:00
parent 790f1f41b8
commit bcb500bcf5
4 changed files with 41 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
---
name: setup-wiki
version: 1.0.0
description: Creates or migrates a project's `.wiki/` to the canonical Karpathy LLM Wiki layout — `CLAUDE.md` schema, `index.md`, `log.md`, `overview.md`, `raw/README.md`, plus empty `entities/`, `concepts/`, `packages/`, `sources/`. Use when the user says "set up wiki", "init wiki", "настрой вики", "инициализируй вики", "create wiki", "migrate wiki to canon", "wiki сломана", "wiki layout broken", or whenever `using-wiki` detects a missing or non-canonical `.wiki/`. Two modes — greenfield (no wiki) and migrate (existing non-canonical layout). Confirmation gate before writing. Cross-platform.
version: 1.1.0
description: Creates or migrates a project's `.wiki/` to the canonical Karpathy LLM Wiki layout — `CLAUDE.md` schema, `index.md`, `log.md`, `overview.md`, `raw/README.md`, plus empty `entities/`, `concepts/`, `packages/`, `sources/`, `contradictions/`, `open-questions/`. Use when the user says "set up wiki", "init wiki", "настрой вики", "инициализируй вики", "create wiki", "migrate wiki to canon", "wiki сломана", "wiki layout broken", or whenever `using-wiki` detects a missing or non-canonical `.wiki/`. Two modes — greenfield (no wiki) and migrate (existing non-canonical layout). Confirmation gate before writing. Cross-platform.
---
# setup-wiki
@@ -35,7 +35,7 @@ The procedure mutates the project's `.wiki/`. **Pause for explicit confirmation
Inspect `.wiki/`:
- **No `.wiki/`** → mode = `greenfield`.
- **`.wiki/` exists AND has all of:** `CLAUDE.md`, `index.md`, `log.md`, `overview.md`, `raw/README.md`, plus directories `entities/`, `concepts/`, `packages/`, `sources/` → mode = `noop` (already canon; report and exit).
- **`.wiki/` exists AND has all of:** `CLAUDE.md`, `index.md`, `log.md`, `overview.md`, `raw/README.md`, plus directories `entities/`, `concepts/`, `packages/`, `sources/`, `contradictions/`, `open-questions/` → mode = `noop` (already canon; report and exit).
- **`.wiki/` exists but missing some canon files OR has non-canon files** (`SUMMARY.md`, `WORKFLOW.md`, `source/`) → mode = `migrate`.
Report findings to the user as a short summary:
@@ -56,7 +56,7 @@ Show the plan in one block:
Will create .wiki/ with canonical layout:
CLAUDE.md (schema), index.md, log.md, overview.md
raw/README.md
entities/, concepts/, packages/, sources/ (with .gitkeep)
entities/, concepts/, packages/, sources/, contradictions/, open-questions/ (with .gitkeep)
```
**Migrate:**
@@ -65,7 +65,7 @@ Will rename:
source/*.md → concepts/*.md (via git mv when in a git repo, plain mv otherwise)
Will create:
CLAUDE.md, index.md, log.md, overview.md, raw/README.md
entities/, packages/, sources/ (with .gitkeep)
entities/, packages/, sources/, contradictions/, open-questions/ (with .gitkeep)
Will delete:
SUMMARY.md, WORKFLOW.md, raw/.gitkeep, source/ (after moves)
Will not touch existing files in raw/ — they're immutable sources.
@@ -101,6 +101,8 @@ The `using-wiki` skill enforces the workflow and file formats. This file overrid
- `concepts/` — recurring ideas, design decisions, gotchas.
- `packages/` — code packages this project produces or consumes.
- `sources/` — one summary page per ingested external doc; carries `ingested:` and `raw_path:`.
- `contradictions/` — surfaced tensions between sources or pages worth tracking long-term; each page cross-links the affected entities/concepts/sources and carries a status (`open` / `resolved` / `accepted-divergence`).
- `open-questions/` — unresolved questions raised during ingest or query that the wiki cannot answer yet; each page cross-links the pages/sources that touch the question and carries a status (`open` / `answered` / `obsolete`).
- `overview.md` — single project-wide overview.
## Naming
@@ -137,6 +139,14 @@ Catalog of all wiki pages. One line per page, organized by type. Updated on ever
## Sources
<!-- (none yet) -->
## Contradictions
<!-- (none yet) -->
## Open Questions
<!-- (none yet) -->
```
@@ -190,7 +200,7 @@ For large or path-sensitive sources outside the repo, register them here:
\`\`\`
```
**Empty `.gitkeep`** in each of `entities/`, `concepts/`, `packages/`, `sources/` so git tracks the dirs.
**Empty `.gitkeep`** in each of `entities/`, `concepts/`, `packages/`, `sources/`, `contradictions/`, `open-questions/` so git tracks the dirs.
### Phase 4b — Migrate
@@ -198,7 +208,7 @@ If migrate mode: combine creation (for missing canon files) with file moves (for
```bash
# 1. Create missing directories
mkdir -p .wiki/concepts .wiki/entities .wiki/packages .wiki/sources
mkdir -p .wiki/concepts .wiki/entities .wiki/packages .wiki/sources .wiki/contradictions .wiki/open-questions
# 2. Move source/* → concepts/* (use git mv if in a git repo)
if git rev-parse --git-dir >/dev/null 2>&1; then
@@ -215,8 +225,8 @@ rmdir .wiki/source 2>/dev/null
# 3. Create missing canon files (CLAUDE.md, index.md, log.md, overview.md, raw/README.md)
# using the templates from Phase 4a, but skip files that already exist.
# 4. Add .gitkeep to entities/, packages/, sources/
touch .wiki/entities/.gitkeep .wiki/packages/.gitkeep .wiki/sources/.gitkeep
# 4. Add .gitkeep to entities/, packages/, sources/, contradictions/, open-questions/
touch .wiki/entities/.gitkeep .wiki/packages/.gitkeep .wiki/sources/.gitkeep .wiki/contradictions/.gitkeep .wiki/open-questions/.gitkeep
```
For migrated `concepts/*.md` pages, **do not rewrite their content** — just prepend a minimal frontmatter if missing:
@@ -242,7 +252,7 @@ Append a line to `log.md`:
After writes, confirm:
- All canon files exist: `CLAUDE.md`, `index.md`, `log.md`, `overview.md`, `raw/README.md`.
- Four content directories exist (with at least `.gitkeep` or content).
- Six content directories exist (`entities/`, `concepts/`, `packages/`, `sources/`, `contradictions/`, `open-questions/`) — with at least `.gitkeep` or content.
- No leftover non-canon files (`SUMMARY.md`, `WORKFLOW.md`, `source/`).
- For migrate mode: every migrated page has frontmatter with `type: concept`.
@@ -255,7 +265,7 @@ Print final state:
```
✅ Wiki ready at .wiki/.
Mode: greenfield | migrate
Files: 5 canon + 4 dirs + N migrated concept pages
Files: 5 canon + 6 dirs + N migrated concept pages
Backup (if migrate): .wiki/.backup-<ts>/
Next steps for the user: