Skip to content

Commit f251176

Browse files
committed
Extend private overlay support with .ai notes
Fixes #401
1 parent 50ee6a9 commit f251176

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ gulpconfig.json
1111
.env.local
1212
.env.*.local
1313
AGENTS.local.md
14+
.ai/
1415
.claude/napkin.md
1516
.claude/local/
1617
.private/

.zipignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ phpstan.neon.dist
7979
# Anima specifics
8080
src
8181
plans
82+
.ai
8283
.claude
84+
.private
85+
.env
86+
.env.*.local
8387
.env.local
8488
.env.local.example
8589
CLAUDE.md

AGENTS.local.example.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Use the private local copy for:
88
- local site IDs
99
- personal workflow notes
1010
- private QA shortcuts
11+
- shared private instructions that should apply to both Claude and Codex
1112
- anything that should not ship in the public repo
1213

14+
Keep larger private plans, research notes, and issue writeups in `.ai/`.
15+
Keep tool-specific distilled working memory in `.claude/napkin.md`.
1316
Keep `AGENTS.md` limited to public, repo-safe instructions.

AGENTS.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ GitHub: `git@github.com:pixelgrade/anima.git`
88

99
## Private Local Files
1010

11-
- Keep machine-specific notes in `AGENTS.local.md` or `.claude/napkin.md`.
11+
- Keep `AGENTS.md` as the canonical shared instruction file for both Codex and Claude.
12+
- Keep `CLAUDE.md` as a thin shim to `@AGENTS.md` so the shared instructions stay in one place.
13+
- Keep shared private agent instructions in `AGENTS.local.md`.
14+
- Keep vendor-neutral private research notes, plans, and issue writeups in `.ai/`.
15+
- Keep tool-specific distilled working memory in `.claude/napkin.md`.
1216
- Keep local env values in `.env.local`.
1317
- Do not commit those private overlays; commit only the `*.example` files.
1418
- Use `bin/bootstrap-private` to hydrate the private overlays after cloning the public repo.
@@ -28,6 +32,7 @@ bin/bootstrap-private
2832

2933
What gets pulled from the private repo when present:
3034
- `AGENTS.local.md`
35+
- `.ai/`
3136
- `.claude/napkin.md`
3237
- `.env.local`
3338

@@ -41,7 +46,7 @@ bin/bootstrap-private --source-dir /path/to/anima-private
4146

4247
- **Node 22+ required** (`.nvmrc` = 22, `package.json` engines `>=22.0.0`). Enforced by `node-tasks/lock_node_version.js` on `npm install`.
4348
- **`npm run build` creates the ZIP** — it runs webpack, gulp styles, AND `gulp zip` in sequence. The build deletes `../build/` before creating it, so a failed build mid-way can leave the theme without a build folder.
44-
- **AGENTS.md and CLAUDE.md are excluded from the ZIP** via `.zipignore` — keep it that way.
49+
- **AGENTS.md, CLAUDE.md, `AGENTS.local.md`, `.ai/`, and `.private/` are excluded from the ZIP** via `.zipignore` — keep it that way.
4550
- **`style.css` is compiled output** — never edit it directly. Source is in `src/scss/`.
4651
- **Text domain `__theme_txtd`** is a placeholder replaced with `anima` during the build process. Use `__theme_txtd` in source PHP/JS/CSS files.
4752

@@ -299,7 +304,7 @@ EOF
299304

300305
### 6. Publish to WUpdates
301306

302-
- Keep raw WUpdates host, port, and key material out of git. Store those only in local/private files such as `AGENTS.local.md` or `.claude/napkin.md`. This repo assumes a local `wupdates` SSH alias is already configured on the release machine.
307+
- Keep raw WUpdates host, port, and key material out of git. Store those only in local/private files such as `AGENTS.local.md`, `.ai/`, or `.claude/napkin.md`. This repo assumes a local `wupdates` SSH alias is already configured on the release machine.
303308
- Product type: `wup_theme`
304309
- Product slug: `anima`
305310
- Release artifact: `../Anima-X-Y-Z.zip`

bin/bootstrap-private

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ repo_url="${PRIVATE_REPO_URL:-}"
1212

1313
targets=(
1414
"AGENTS.local.md"
15+
".ai"
1516
".claude/napkin.md"
1617
".env.local"
1718
)
@@ -22,6 +23,7 @@ Bootstrap private local overlays for anima.
2223
2324
The script syncs the following files when they exist in the private source:
2425
- AGENTS.local.md
26+
- .ai/
2527
- .claude/napkin.md
2628
- .env.local
2729
@@ -161,7 +163,11 @@ sync_target() {
161163
ln -s "$src" "$dst"
162164
echo "linked ${rel}"
163165
else
164-
cp "$src" "$dst"
166+
if [[ -d "$src" && ! -L "$src" ]]; then
167+
cp -R "$src" "$dst"
168+
else
169+
cp "$src" "$dst"
170+
fi
165171
echo "copied ${rel}"
166172
fi
167173
}

0 commit comments

Comments
 (0)