Skip to content

Development

Stuart Jackson edited this page Nov 23, 2026 · 8 revisions

Development

How the repo is laid out, how to set up a clone, how the banned-strings check keeps private text out of a public repo, and how to add a plugin.

Repo layout

Path What it is
.claude-plugin/marketplace.json The marketplace file; see Plugin-Format#marketplace-file
plugins/<name>/ One folder per plugin, with .claude-plugin/plugin.json, skills/, and a README
scripts/check-banned-strings.sh The banned-strings check; holds no strings
scripts/validate.ts (+ .test.ts) Our own validator for the rules claude plugin validate misses; see Development#quality
scripts/rules.ts (+ .dfy, .dfy.gen), models/, lemmascript.json, LemmaScript-files.txt The proved rules, the Dafny model, the links, and LemmaScript's config; see Proofs
package.json, lefthook.yml, eslint.config.mjs, prettier.config.mjs, tsconfig.json, types/ The quality toolchain and git hooks, the same setup as augur-skills
.github/workflows/validate.yml CI: pnpm quality and claude plugin validate . --strict on every push and PR
.claude/ Claude Code setup for people working on this repo (rules, CLAUDE.md). Public, so it MUST hold nothing private
README.md, LICENSE The user guide and the MIT license. Both count for every plugin in Anthropic's [[directory checks

Setup

  1. Clone the repo and its wiki. Install Node 24 and pnpm.
  2. Run pnpm install in the repo, once per clone. It installs the tools and the lefthook git hooks (lefthook.yml).
  3. Create the banned-strings list (see below). Until it exists, every commit is blocked.
Hook Runs
pre-commit The banned-strings check on staged files
pre-push The banned-strings check on every commit being pushed, then pnpm quality

Banned-strings check

The repo and wiki are public. Client names, site ids, project ids, credentials, and internal hostnames MUST NOT be committed. The banned-strings check blocks a commit or push that contains any string on a list.

Why the list is outside the repo. A list committed to a public repo would publish the very strings it guards. The list lives in the project folder at .simpleapps/banned-strings.txt (next to repo/ and wiki/), which is never committed. The script that reads it is public and holds no strings.

How it works:

  • pre-commit scans the staged files; pre-push scans every commit being pushed, so a string added and then removed in a later commit is still caught.
  • Matches are case-insensitive fixed strings. Blank lines and lines starting with # are ignored.
  • It fails closed: a missing list, an empty list, or a git error blocks the commit or push.
  • BANNED_STRINGS_FILE points the script at a different list.

Limits, by design:

  • The check is local only: CI cannot run it, because the list is never committed. A clone without the hooks, or a commit made with --no-verify, is not caught. --no-verify MUST NOT be used here.
  • Each committer MUST have their own copy of the list before their first commit.
  • The wiki is not checked. The hooks live in the code repo, and wiki pushes go straight to GitHub. Wiki pages MUST be written with the same care.
  • Once a string is pushed it is public, and removing it means rewriting history. The check exists to stop the first push.

Quality

The augur-build code skill runs these three scripts for /code quality and before /repo submit and /repo publish: pnpm quality, pnpm proofs (Proofs) and pnpm plugin:validate (claude plugin validate . --strict, Development#validation).

pnpm quality runs, in order, stopping at the first failure: Prettier (format:check), ESLint (lint, with @simpleapps-com/augur-config), tsc (typecheck), Knip (knip, unused files and dependencies), the script tests at 100% line, branch, and function coverage (test), and scripts/validate.ts (validate). The pre-push hook and CI both run it. Markdown is not formatted: it is hand-written.

scripts/validate.ts checks what claude plugin validate does not:

  • marketplace.json sets no version; every entry's source is an existing ./plugins/<name>; every plugin folder is listed
  • plugin.json: name matches the folder, version is CalVer, no privacyPolicyUrl; no top-level bin/
  • SKILL.md: only the six keys claude.ai accepts, name rules, description at most 1,024 characters, the 5K-token budget (Skill-Authoring)
  • .mcp.json: http on augur-mcp.com, keyed by its title, with a description, no headers, headersHelper, or oauth (Plugin-Format#connectors)
  • hooks/hooks.json and .claude/CLAUDE.md (under 200 lines)
  • shared blocks in SKILL.md files (<!-- shared:<name> --> … <!-- /shared:<name> -->) are closed, and every copy of a name is identical: the git safeguard the repo and wiki skills both carry cannot drift

A new rule in the wiki SHOULD get a check here, with a test.

@simpleapps-com/augur-* packages MUST be on their latest release (CalVer, pnpm add -D @simpleapps-com/augur-config@latest), never pinned to match another repo. pnpm exec augur-doctor . checks it under Package Versions; most of its other checks are for Next.js sites and do not apply here.

Mods have their own tests and type check, run by hand (Mods#develop-and-test).

Validation

CI also runs claude plugin validate . --strict, so any warning fails the build. Run the same locally before pushing.

  • claude plugin validate plugins/<name> validates one plugin and prints Anthropic's directory checks. Add --profile directory to make those fail.
  • Unknown fields warn and are ignored at load, so a warning about a field is a real mistake, not noise.

Adding a plugin

  1. Create plugins/<name>/.claude-plugin/plugin.json with the fields in Plugin-Format#plugin-entry-vs-pluginjson, including version (CalVer) and author.
  2. Add skills/ if the plugin has any, following Skill-Authoring. Stay within what every surface loads: no top-level bin/, no reliance on hooks or local MCP.
  3. If it has a connector, add .mcp.json per the connector rules and give the README a Privacy section with the policy link. MUST NOT set privacyPolicyUrl: claude.ai's sync rejects it.
  4. Write the plugin's README: what it does, who it is for, the one-step install line (/plugin install <name> --marketplace simpleapps-com/augur-plugins), how to sign in, and the connector URL for a Team or Enterprise Owner to add.
  5. Add a square PNG icon at .claude-plugin/icon.png when a 512 px source exists (only a directory listing reads it).
  6. Add an entry to marketplace.json with name, source: ./plugins/<name>, and category. No version.
  7. Add the plugin to the README's Plugins table and to Home#plugins.
  8. Run pnpm quality, claude plugin validate . --strict, and claude plugin validate plugins/<name>, then walk the plugin checklist.

Clone this wiki locally