Skip to content

Commit be2c3bf

Browse files
authored
Merge branch 'master' into fix/8239-smi-table
2 parents c78a833 + 11ae753 commit be2c3bf

45 files changed

Lines changed: 1518 additions & 360 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/skills/layer5-blog-writer/SKILL.md‎

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ You create complete, publication-ready blog posts for [layer5.io/blog](https://l
1111
1. A fully-formed `index.mdx` at the correct path in the Layer5 repo
1212
2. A branded hero image (raster, 1200x630) in the same directory
1313
3. A linted post and a green local build
14-
4. A signed-off commit on a dedicated branch in an isolated worktree
15-
5. A pull request merged after CI passes (regular fast-forward, no review wait)
14+
4. A signed-off commit on a dedicated branch in a leased treehouse worktree
15+
5. A pull request landed through no-mistakes (at most three runs)
1616
6. A brief handoff note covering what was created and the merged PR URL
1717

1818
## Layer5 Brand Voice
@@ -84,23 +84,19 @@ Before writing:
8484

8585
### Step 4 - Set up the git worktree
8686

87-
All file writes for this blog post happen inside an isolated git worktree, never in the main checkout. This keeps the working directory clean and lets the entire branch be deleted at the end with no residue.
87+
All file writes for this blog post happen inside a leased treehouse worktree, never in the main clone. Other agent sessions and the no-mistakes pipeline share the main clone. Never create a worktree with `git worktree add` or a second clone.
8888

8989
```bash
90-
REPO_ROOT=$(git -C "$(pwd)" rev-parse --show-toplevel)
9190
SLUG="kebab-case-descriptive-slug" # matches the folder name under src/collections/blog/YYYY/
9291
BRANCH="blog/${SLUG}"
93-
WORKTREE_DIR="${REPO_ROOT}/.claude/worktrees/blog-${SLUG}"
9492

95-
git -C "$REPO_ROOT" fetch origin master
96-
git -C "$REPO_ROOT" worktree add -b "$BRANCH" "$WORKTREE_DIR" origin/master
93+
# Prints the worktree path; capture it
94+
WORKTREE_DIR=$(treehouse get --lease -b "$BRANCH")
9795

9896
cd "$WORKTREE_DIR"
9997
```
10098

101-
`<repo>/.claude/worktrees/` is the convention this repo already uses for isolated worktrees. Treat `$WORKTREE_DIR` as the working root for every later step. Every path below (e.g. `src/collections/blog/...`) is relative to `$WORKTREE_DIR`.
102-
103-
If the worktree path already exists from a prior run, `git worktree add` will fail. Pick a different slug, or run `git worktree remove "$WORKTREE_DIR"` first. Never `rm -rf` a worktree directory without removing it through git, or the metadata under `.git/worktrees/` will go stale.
99+
Treat `$WORKTREE_DIR` as the working root for every later step. Every path below (e.g. `src/collections/blog/...`) is relative to `$WORKTREE_DIR`. `treehouse status` lists the pool.
104100

105101
### Step 5 - Write the blog post
106102

@@ -270,9 +266,9 @@ lost by scoping locally - it just happens on the runner instead of on your lapto
270266
- [ ] Technical posts: consider `resource: true`
271267
- [ ] The post reads as the author's own work. Naming an AI product is fine when it is the subject matter; claiming AI authorship is not
272268

273-
### Step 8 - Commit, push, auto-merge, and remove the worktree
269+
### Step 8 - Commit, land through no-mistakes, and return the worktree
274270

275-
Land the post on `master` without leaving a PR open for review. The repo's standard merge strategy is regular fast-forward; the workflow below produces a single signed-off commit on top of `origin/master` and merges it via `gh pr merge --merge --delete-branch`.
271+
Land the post through the no-mistakes pipeline, which reviews, tests, pushes, and opens the pull request. Use at most three runs per pull request; after the third, merge the pull request as it stands and open an issue for anything still flagged.
276272

277273
**Authorship rule (non-negotiable):** the commit message, PR title, PR body, and any other text introduced by this skill must contain no reference to AI assistants, AI authoring tools, "Co-Authored-By" trailers, or automation by name. The signoff is the user's configured `user.name <user.email>`, appended only by `git commit -s`. Do not add `--author`, do not add trailers, do not add "generated with" lines.
278274

@@ -289,33 +285,23 @@ git add "$POST_DIR"
289285
git status --short # confirm nothing unexpected is staged
290286
git commit -s -m "blog: ${TITLE}"
291287

292-
# Push and open the PR
293-
git push -u origin "$BRANCH"
294-
PR_URL=$(gh pr create \
295-
--base master \
296-
--head "$BRANCH" \
297-
--title "blog: ${TITLE}" \
298-
--body "Adds the \`${SLUG}\` blog post under \`src/collections/blog/\`.")
299-
300-
# Wait for CI before merging. checks.yml runs `npm run build` and eslint; a
301-
# broken MDX post that lands on master breaks the production deploy.
302-
gh pr checks "$PR_URL" --watch
303-
304-
# Merge only once checks are green (regular fast-forward, no review wait)
305-
gh pr merge --merge --delete-branch "$PR_URL"
306-
307-
# Tear down the worktree once the merge is confirmed
308-
cd "$REPO_ROOT"
309-
git worktree remove "$WORKTREE_DIR"
310-
git -C "$REPO_ROOT" pull --ff-only origin master
288+
# Validate, push, and open the PR (a clone without a `no-mistakes` remote needs `no-mistakes init` once)
289+
no-mistakes axi run --intent "Publish the ${SLUG} blog post"
290+
no-mistakes axi status # current step and findings; answer a review gate with `no-mistakes axi respond`
291+
```
292+
293+
Once the pull request has merged, release the worktree:
294+
295+
```bash
296+
treehouse return "$WORKTREE_DIR"
311297
```
312298

313299
Failure handling:
314300

315-
- **Never merge without green checks.** `gh pr merge` fires immediately by default; if it is called before CI finishes, a post that fails the build can land on `master` and surface only in the deploy workflow. `gh pr checks --watch` is what makes the local build in Step 7b a double check rather than the only check.
316-
- If `gh pr checks` reports a failure, fix it in the worktree, commit with `-s`, push, and let the checks rerun. Do not merge past a red check.
317-
- If the merge cannot complete (branch protection blocks `--merge`, conflicts on `master`), report the PR URL and the specific blocker; do not remove the worktree until the user decides how to proceed.
318-
- If `git worktree remove` fails because the worktree has untracked files, investigate before forcing - there may be unsaved work. A leftover `hero-image.svg` from `--keep-svg` is the usual culprit; delete it rather than committing it.
301+
- **Never merge without green checks.** checks.yml runs `npm run build` and eslint; a broken MDX post that lands on `master` breaks the production deploy. The local build in Step 7b is a double check, not the only check.
302+
- If the pipeline or CI reports a failure, fix it in the worktree, commit with `-s`, and rerun, counting against the three-run limit.
303+
- If the merge cannot complete (branch protection, conflicts on `master`), report the PR URL and the specific blocker; do not return the worktree until the user decides how to proceed.
304+
- If `treehouse return` complains about untracked files, investigate before forcing - there may be unsaved work. A leftover `hero-image.svg` from `--keep-svg` is the usual culprit; delete it rather than committing it.
319305

320306
End the run with a one-paragraph handoff: the merged PR URL, the post path on `master`, and any follow-ups (e.g. broken cross-links, a Kanvas design ID still to be confirmed).
321307

‎.github/workflows/build-and-deploy-site.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ jobs:
4242
clean: true
4343
clean-exclude: |
4444
pr-preview
45+
hugo-preview
4546
.well-known
4647
force: false

0 commit comments

Comments
 (0)