From d762b166a4f4d0c37265bb8aa95ec2b58729a6ec Mon Sep 17 00:00:00 2001 From: Roger Barnes Date: Wed, 18 Nov 2026 15:51:45 +1100 Subject: [PATCH 1/4] Enable the sctx-dev contributor plugin and its review check The plugin from structured-context's marketplace brings the doc-review and test-review skills and a Stop hook that blocks while the branch adds docs, code comments or tests no review has seen. Pre-push runs the same check when the plugin is installed and skips it with a note otherwise. .gitattributes marks the generated bundled-definitions.ts so the check leaves it out. --- .claude/settings.json | 10 ++++++++++ .gitattributes | 2 ++ AGENTS.md | 2 ++ lefthook.yml | 5 +++++ 4 files changed, 19 insertions(+) create mode 100644 .claude/settings.json create mode 100644 .gitattributes diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..8f429a0 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,10 @@ +{ + "extraKnownMarketplaces": { + "structured-context": { + "source": { "source": "github", "repo": "mindsocket/structured-context" } + } + }, + "enabledPlugins": { + "sctx-dev@structured-context": true + } +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1596235 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Generated files: collapsed in GitHub diffs and left out of the sctx-dev review check. +packages/map-views/src/node/bundled-definitions.ts linguist-generated diff --git a/AGENTS.md b/AGENTS.md index f162fe0..d7712a7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,6 +12,8 @@ bun run test:package # packs the library and the plugin, installs each in a bun run build # the library, then the navigator ``` +The Stop hook and pre-push block while the branch adds docs, code comments or tests that the `doc-review` or `test-review` skill has not seen. Both come from structured-context's [contributor plugin](https://github.com/mindsocket/structured-context/blob/main/docs/architecture.md#contributor-plugin), which `.claude/settings.json` enables. + ## Principles - **Simple, not sloppy.** Prefer the smallest design that does the job. Don't add structures, grammars, limits or presets until a concrete need forces them. diff --git a/lefthook.yml b/lefthook.yml index 9e3b128..cf566a8 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -19,3 +19,8 @@ pre-push: commands: pushed-tree: run: bash scripts/git-hooks/check-pushed-tree.sh + # The review check comes from the sctx-dev plugin in structured-context's marketplace. + review-check: + run: >- + check="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/marketplaces/structured-context/dev-plugin/scripts/review-check.sh"; + if [ -f "$check" ]; then bash "$check"; else echo "review-check: sctx-dev plugin not installed, skipping"; fi From a12ac08f7137e1c78bee5beed23aa0d96d2d20b2 Mon Sep 17 00:00:00 2001 From: Roger Barnes Date: Wed, 18 Nov 2026 17:40:26 +1100 Subject: [PATCH 2/4] Mark generated schemas, captured fixtures and the lockfile as generated --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 1596235..4d48cc9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,5 @@ # Generated files: collapsed in GitHub diffs and left out of the sctx-dev review check. packages/map-views/src/node/bundled-definitions.ts linguist-generated +schemas/generated/** linguist-generated +packages/map-views/tests/fixtures/*.json linguist-generated +bun.lock linguist-generated From 71a2b1085722078366b4c985d44e576f2dfce1da Mon Sep 17 00:00:00 2001 From: Roger Barnes Date: Wed, 18 Nov 2026 23:06:13 +1100 Subject: [PATCH 3/4] Leave the review check out of AGENTS.md; its messages say what to do --- AGENTS.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index d7712a7..f162fe0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,8 +12,6 @@ bun run test:package # packs the library and the plugin, installs each in a bun run build # the library, then the navigator ``` -The Stop hook and pre-push block while the branch adds docs, code comments or tests that the `doc-review` or `test-review` skill has not seen. Both come from structured-context's [contributor plugin](https://github.com/mindsocket/structured-context/blob/main/docs/architecture.md#contributor-plugin), which `.claude/settings.json` enables. - ## Principles - **Simple, not sloppy.** Prefer the smallest design that does the job. Don't add structures, grammars, limits or presets until a concrete need forces them. From abc23c853886a17896d9f1ca2b882e2db191a5d2 Mon Sep 17 00:00:00 2001 From: Roger Barnes Date: Wed, 18 Nov 2026 23:07:08 +1100 Subject: [PATCH 4/4] Drop a lefthook comment that repeats its command --- lefthook.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index cf566a8..a3d43a9 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -19,7 +19,6 @@ pre-push: commands: pushed-tree: run: bash scripts/git-hooks/check-pushed-tree.sh - # The review check comes from the sctx-dev plugin in structured-context's marketplace. review-check: run: >- check="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/marketplaces/structured-context/dev-plugin/scripts/review-check.sh";