@coding-with-hassan/devkit 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -159,7 +159,7 @@ The hook never rewrites silently. lint-staged re-stages the fixes `eslint --fix`
|
|
|
159
159
|
|
|
160
160
|
- one `@import` line in the project's `CLAUDE.md` (`.claude/CLAUDE.md` when it exists) pulling `node_modules/@coding-with-hassan/devkit/claude/standards.md` — Docker via scripts, worktrees, commit/push consent + commit-writer, tickets, the acceptance-case quality gate, lint/format/CI parity, domain docs. In-repo imports load at launch without an approval dialog;
|
|
161
161
|
- `.claude/agents/commit-writer.md` as a **stub** whose body says "read the shipped file and follow it" — the stub never changes, the content ships with the devkit version;
|
|
162
|
-
- one `.claude/skills/<name>/SKILL.md` stub per skill, same pattern: the house skills `implement-ticket` and `merge-upstream` (bodies shipped by the devkit;
|
|
162
|
+
- one `.claude/skills/<name>/SKILL.md` stub per skill, same pattern: the house skills `implement-ticket` and `merge-upstream` (bodies shipped by the devkit; both model-invocable — `merge-upstream` runs only when the user asks to bring `main` in or fix a PR's conflicts, since that ask is the consent for the merge commit) and every skill of the project's `mattpocock-skills` dependency — `init` adds `github:mattpocock/skills#v1.2.3` to `devDependencies`, a GitHub tarball pinned to an upstream release tag that pnpm integrity-locks — except `implement` and `setup-matt-pocock-skills`, which the house skill and `init` replace. The stub copies the skill's frontmatter verbatim (user-invocable-only skills stay user-only) and points at the body under `node_modules`. Stubs are derived on every install and **gitignored** through a managed block, so nothing is committed and a bump changes nothing in git; they are what makes the skills reach every clone and the skill pickers that only scan `.claude/skills` (T3 Code). Renovate bumps the tag (the shared preset automerges it), so an upstream skills release needs no devkit release;
|
|
163
163
|
- two managed hook entries merged idempotently into `.claude/settings.json`, both running `hassan-devkit claude:hook <id>` from the checkout's `node_modules` (recognised by that id, so a reworded command replaces the entry and the inline `jq` hook of devkit ≤ 1.2 is dropped): `pre-bash` (`PreToolUse` on `Bash`) denies `gh pr create` without `--assignee`, `docker compose` run directly, `git worktree add|remove|prune|…` and `git commit` on `ci.baseBranch` — each with the house command to use instead; `post-edit` (`PostToolUse` on `Edit|Write|MultiEdit`) runs `format:file` on the edited file and tells Claude to re-read it when Prettier changed it. The rules live in the package, so a bump adds a guard with nothing to re-commit; every hook fails open (a broken hook never blocks a tool call).
|
|
164
164
|
|
|
165
165
|
Project-specific rules stay in the project's own `CLAUDE.md` below the import. A devkit bump therefore changes what Claude does with nothing to re-commit.
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: merge-upstream
|
|
3
|
-
description: "Bring the canonical remote's main into the current checkout the house way: fetch, stop when up to date, merge (fast-forward only on the base branch), install the merged toolchain BEFORE completing a conflicted merge so the pre-commit fixers run with the presets upstream was formatted with, restore hook-rewritten files, then refresh what the merged files need.
|
|
4
|
-
disable-model-invocation: true
|
|
3
|
+
description: "Bring the canonical remote's main into the current checkout the house way: fetch, stop when up to date, merge (fast-forward only on the base branch), install the merged toolchain BEFORE completing a conflicted merge so the pre-commit fixers run with the presets upstream was formatted with, restore hook-rewritten files, then refresh what the merged files need. Use when the user asks to bring main in, update the branch or fix its PR's conflicts: that ask is the consent for the merge commit."
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# merge-upstream (body shipped by @coding-with-hassan/devkit)
|
|
8
7
|
|
|
9
|
-
Bring the canonical `main` into the checkout you are in.
|
|
10
|
-
|
|
8
|
+
Bring the canonical `main` into the checkout you are in. Run it only when the user asks for
|
|
9
|
+
it in their own words, in the current request: typing `/merge-upstream`, or asking to bring
|
|
10
|
+
`main` in, update the branch or fix its PR's conflicts. That ask is the consent for exactly one
|
|
11
|
+
commit, the merge commit. A branch that is merely behind, or a PR you notice conflicts, is never
|
|
12
|
+
a reason to run it unasked: report it and let the user decide. Never rebase (branches are shared
|
|
11
13
|
through their PRs and the house merges).
|
|
12
14
|
|
|
13
15
|
## 1. Where you are
|
|
@@ -81,4 +83,6 @@ know, reformats with old options) and the hook aborts the commit listing them.
|
|
|
81
83
|
|
|
82
84
|
One short message: the range merged (`<old>..<new>`, count of commits), whether conflicts were
|
|
83
85
|
resolved and in which files, whether `pnpm install` ran, and what the user still has to do
|
|
84
|
-
(restart, regenerate, re-run a build). Do not push
|
|
86
|
+
(restart, regenerate, re-run a build). Do not push unless the same request asked for it ("fix the
|
|
87
|
+
conflicts and push"); then run the project's pre-push checks first (`hassan-devkit ci:check`
|
|
88
|
+
and `hassan-devkit ci:affected`) and push only when they pass.
|
package/claude/standards.md
CHANGED
|
@@ -37,8 +37,10 @@ listing is fine):
|
|
|
37
37
|
deletes the stack and its data; `worktree:prune` removes every worktree whose PR is merged.
|
|
38
38
|
- Starting work anywhere else (an existing branch, the main checkout): sync first with
|
|
39
39
|
`git fetch <remote> && git merge --ff-only <remote>/main`.
|
|
40
|
-
- Bringing the canonical `main` into a branch is the `/merge-upstream` skill
|
|
41
|
-
it
|
|
40
|
+
- Bringing the canonical `main` into a branch is the `/merge-upstream` skill, run when the user
|
|
41
|
+
asks for it (typing it, or asking to bring `main` in or fix a PR's conflicts — that ask is the
|
|
42
|
+
consent for the merge commit, never a branch that is merely behind): fetch, merge, and — when
|
|
43
|
+
the merge conflicts — `pnpm install`
|
|
42
44
|
BEFORE completing it, so the pre-commit fixers run with the presets upstream was formatted
|
|
43
45
|
with; a file the hook still rewrote is restored from `<remote>/main`.
|
|
44
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coding-with-hassan/devkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "CLI for the developer workflow shared across Hassan's client projects: docker compose orchestration, db helpers, and husky hook installation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hassan Khousheish",
|