feat(skills): project-bootstrap@1.11.0 — .gitignore meta-isolation block
Step 1 now ships agent meta-paths inversions (`!.claude/`, `!.tasks/`, `!.wiki/`, `!.brainstorm/`, `!.archive/`, `!.mcp/`, `!.mcp.json`, `!MEMORY.md`) so own greenfield/upgrade projects re-enable visibility against the global `core.excludesFile` cutter (`~/.config/git/ignore`) that hides obvyaska from forks of upstream open-source. Without it any fresh bootstrap landed an empty first commit on machines with the global configured: setup-wiki/setup-tasks/Step 5 created .wiki/.tasks/CLAUDE.md but git ignored them. Two cases handled in Step 1: - no .gitignore → write template (block included unconditionally) - existing .gitignore → marker-based (`# AI обвеска — слой 2:`) append-if-missing; idempotent on re-run Smoke-tested in %TEMP%\test-bootstrap-meta-iso: all 3 acceptance criteria pass + negative control (strip block → global hides) + idempotency (re-run with marker present skips). Source concept: workshop wiki concepts/meta-out-of-repo.md. Closes board task [meta-isolation-bootstrap-skill-update]. MINOR bump (1.10.1 → 1.11.0) — new feature, backward-compat. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: project-bootstrap
|
||||
version: 1.10.1
|
||||
version: 1.11.0
|
||||
description: >
|
||||
Initializes or upgrades a project in the current folder: git, .gitignore, README.md,
|
||||
.wiki/ using Karpathy's method, .tasks/ for task tracking, CLAUDE.md with skill triggers.
|
||||
@@ -61,8 +61,37 @@ If git is not initialized:
|
||||
git init
|
||||
```
|
||||
|
||||
If `.gitignore` does not exist — create from template `assets/.gitignore.template`.
|
||||
If it exists — leave it untouched.
|
||||
### `.gitignore`
|
||||
|
||||
The template `assets/.gitignore.template` contains two parts:
|
||||
|
||||
1. Standard ignore rules (deps, build, env, IDE, OS, logs).
|
||||
2. **Meta-isolation block** — `!`-inversions for `.claude/`, `.tasks/`, `.wiki/`,
|
||||
`.brainstorm/`, `.archive/`, `.mcp/`, `.mcp.json`, `MEMORY.md`. This block
|
||||
re-enables tracking of agent meta-paths in **own** repos against the
|
||||
global `core.excludesFile` rule (`~/.config/git/ignore`) that hides them
|
||||
from forks of upstream open-source. Without it, the `.tasks/`, `.wiki/`,
|
||||
and `.claude/` directories created by Steps 3-5 would be invisible to git
|
||||
on machines where the global excludesFile is configured, and the first
|
||||
commit would be empty of agent obvyaska. Full design: workshop wiki
|
||||
`concepts/meta-out-of-repo.md` (sections "Слой 2" and "Новые проекты").
|
||||
|
||||
Two cases:
|
||||
|
||||
- **`.gitignore` does not exist** — create from `assets/.gitignore.template`
|
||||
(block included unconditionally).
|
||||
- **`.gitignore` exists** — check for the marker line
|
||||
`# AI обвеска — слой 2:` (substring match, case-sensitive). If absent →
|
||||
append the meta-isolation block (with the marker comment) to the end of
|
||||
the file, prefixed by a blank line if the file does not already end with
|
||||
one. If present → leave the file untouched.
|
||||
|
||||
The block is **scoped to own projects**. The bootstrap skill currently has no
|
||||
fork-of-upstream mode (greenfield-full creates a brand-new Gitea repo;
|
||||
add-remote and upgrade operate on the user's own repos), so the block is
|
||||
applied unconditionally in all current modes. If a fork-bootstrap mode is
|
||||
ever added, the block must be **omitted** there — putting `!.claude/` etc.
|
||||
into a fork's `.gitignore` would diverge from upstream's ignore rules.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user