Development

Working on smine itself, from a checkout: every repo command is a make target.

A development checkout has no bin/PAYLOAD marker, so the apply engine and every Sync build the binaries with go build (Install § From source). Every make target is admitted by one gate rule, Bash(make *) (Permission System).

Run

CommandDoes
make serveBuilds and runs the config server on :6001 against ~/.claude/settings.json.
make serve-devSandboxed, detached server for this checkout; returns once listening. Free port (printed), bin/dev/home, no credential. DEV_CLAUDE_HOME=<dir>: another Claude home, ACDSL ledger included.
make serve-dev-stopStops this checkout's last serve-dev (pid in bin/dev/serve-dev.pid), then drops the Go module cache a sandboxed apply left under bin/dev/home/go: Go creates it read-only, and git worktree remove cannot delete it, so a worktree that saved a Smine setting would otherwise refuse to close. The next serve-dev downloads again.

Build, test, audit

CommandDoes
make buildGo tools and Rust binaries to ./bin.
make testTests, race detector on.
make test-acdsl-smokeThe acdsl smoke (cmd/acdsl/smoke_test.go) alone: it projects, stages and strips real tracked files.
make auditFast gate. Serial: build-audit, projection strip, generate. Concurrent: mod verify, vet, cross-build, skills-check, golden-check, workflow-gen-check, fragment-check, acdsl check (verdicts cached per checkout), fixtures, Go tests (no race detector), changed Rust crates. SCOPE=all: both crates; BASE=<ref> overrides the derived branch base.
make audit-fullRelease gate. Same prefix; concurrent gates, race tests, changed Rust crates, model batteries and queries; then the acdsl smoke alone. SCOPE=, BASE= as for audit.
make cross-buildWindows Go build, Linux Go vet: the forms CI proves. In audit.
make audit-linuxCI's Linux audit and test jobs in a container (latest stable Rust, unprivileged user) on a checkout snapshot. Needs Docker; not in audit.
make golden-checkChecks the eval goldens are current. In audit.
make workflow-genRegenerates the skills' workflow stage files from their sources; workflow-gen-check is in audit.
make lintgolangci-lint over the module.

Each concurrent unit prints PASS or FAIL; full output in bin/test-logs/<unit>.log.

Tools

CommandDoes
make acdsl ARGS=…acdsl runner: check, fixtures, project -strip, project -plan <path>.
make rules ARGS=…Rules tool: generate, walk, render-skill <skill dir> …
make generateShort for make rules ARGS="generate": untracked context/context.json from the entry docs, plus context/aspects.json.

Skills

CommandDoes
make skill-render SKILL=xChecks the model; re-saves <leaf>.cue and payloads canonically.
make skills-checkIn audit. Fails on: non-canonical <leaf>.cue; leftover skill.cue; invalid model; orphaned payload; generated or markdown-era file in a skill dir; SKILL.md without <leaf>.cue; pipeline edge the other skill does not mirror; Skill(<leaf>) grant without a reaching edge; atom no pred reads; no smoke block.
make skill-export SKILL=xModel with merged atoms as JSON.
make skill-import DIR=xImports a markdown-only skill dir or vocabulary.json into the model.
make skill-smoke SKILL=x TOKEN=labelRuns the declared smoke on its dummy input; prints the verdict.
make skill-smoke-verdict SKILL=x SESSION=idJudges an interactive smoke's session.
make skill-bundleStandalone bundle to dist/skills; fails on a smine reference.

Skill model

The z3 analysis behind these targets: Skill model § Z3 analysis.

CommandDoes
make model-check SKILL=xOne skill's clause checks plus z3 battery (z3 on the model tier only).
make model-query SKILL=x EXPR='…'Does the model imply EXPR? unsat: holds, with the proving core. Example: EXPR='not asks_user'.
make model-diagram SKILL=x [PHASES=1] [JSON=1]Derived model as mermaid stateDiagram-v2 on stdout.
make model-analyze SKILL=xmodel-check plus every committed query in the skill's queries/.
make model-queries SKILL=xCommitted queries alone.

Docs hosting

docs/ is served at smine.info via Firebase Hosting (project smine-f5938, config firebase.json at the repo root). Every release tag redeploys it: the docs job in .github/workflows/ci.yml runs on v*.*.* tags with the FIREBASE_SERVICE_ACCOUNT_SMINE repository secret. make docs-deploy deploys by hand from a firebase logined machine.

One-time setup:

  1. Create the Firebase project (smine-f5938) in the Firebase console and enable Hosting.
  2. Create the deploy credential: firebase init hosting:github writes the service account and the repository secret itself; or create a service account with the Firebase Hosting Admin role in the Google Cloud console and store its JSON key with gh secret set FIREBASE_SERVICE_ACCOUNT_SMINE < key.json (discard any workflow files hosting:github generates — the docs job in ci.yml is the deploy).
  3. Hosting → Add custom domain → smine.info, then copy the TXT verification record and the A records the console shows into the Ionos DNS panel for the domain (same flow as rollandrecord).

Config server flags

Flags of bin/configserver; defaults are relative to the working directory. The installed server runs with the install record's values, so these matter when you run it by hand.

FlagDefaultPurpose
-repos~/.claude/smine/repos.jsonRepo registry: machine state in the state dir, in no checkout.
-routinesroutinesOne contract subdir per routine; routines/_templates/ holds the packaging templates.
-evalsevalsEval results root, shown on each skill's Tests tab: evals/<skill>/<date>-<hash6>[-<n>]/eval.json or flat evals/<skill>-<date>[-<n>]/. A/B dirs ab-… never render.
-examplesexamplesSkill examples root.
-agentwtbin/agentwtFor worktree status and removal; made absolute at boot.
-contextcontextContext source root of the Context page.
-peek-port4242peek-mcp HTTP port; 0 disables peek entirely.
-peek-control-port42442peek-mcp control dashboard and OTLP receiver port (peek's canonical base); 0 disables the dashboard.
-peek-starttrueSpawns peek-mcp when nothing serves the port. Reuses a listener only if its /healthz identity matches this profile's homes; else disables peek integration with a logged error.
-peek-binpeek-mcpResolved via PATH.
-claude-home~/.claudePassed to the spawned peek-mcp.
-codex-home~/.codexPassed to the spawned peek-mcp.