82 lines
21 KiB
JSON
82 lines
21 KiB
JSON
{
|
|
"profiles": ["trivial", "isolated", "logic", "integration", "data", "critical", "release"],
|
|
"requirements": {
|
|
"trivial": {"contract": false, "checks": "the diff; a targeted check when one exists", "requirement_model": false, "risk_note": false, "independent_evidence": false, "retro": "only on an anomaly (two send-backs, or a human correction)"},
|
|
"isolated": {"contract": true, "checks": "at least one that is not vacuous", "requirement_model": false, "risk_note": false, "independent_evidence": false, "retro": "yes"},
|
|
"logic": {"contract": true, "checks": "as isolated, each with covers", "requirement_model": false, "risk_note": false, "independent_evidence": false, "retro": "yes"},
|
|
"integration": {"contract": true, "checks": "as logic, plus invariants", "requirement_model": true, "risk_note": true, "independent_evidence": false, "retro": "yes"},
|
|
"data": {"contract": true, "checks": "as integration", "requirement_model": true, "risk_note": true, "independent_evidence": true, "retro": "yes"},
|
|
"critical": {"contract": true, "checks": "as integration", "requirement_model": true, "risk_note": true, "independent_evidence": true, "retro": "yes"},
|
|
"release": {"contract": true, "checks": "every check (--all)", "requirement_model": true, "risk_note": true, "independent_evidence": true, "retro": "yes"}
|
|
},
|
|
"patterns": [
|
|
{"stage": "code", "glob": "**/*.{py,pyi,pyw,js,mjs,cjs,jsx,ts,tsx,mts,cts,vue,svelte,astro,java,kt,kts,scala,groovy,clj,cljs,go,rs,c,h,cc,cpp,cxx,hpp,hh,hxx,m,mm,cs,fs,vb,swift,dart,rb,php,pl,pm,lua,r,jl,ex,exs,erl,hs,ml,mli,nim,zig,sh,bash,zsh,fish,ps1,bat,cmd,sol,sv,vhd,tcl,awk,asm,sql}", "profile": "isolated", "reason": "source code: never trivial, whatever its name or directory"},
|
|
{"stage": "kind", "kind": "version", "glob": ["**/{version,.version,version.txt,_version.txt}"], "profile": "release", "reason": "version marker: what a release is called"},
|
|
{"stage": "kind", "kind": "doc", "glob": ["**/*.{md,mdx,rst,adoc}", "**/{license,licence,copying,notice,authors,contributors}*", "**/.{gitignore,gitattributes,editorconfig,dockerignore,prettierignore,prettierrc*}", "docs/**", "**/docs/**"], "profile": "trivial", "reason": "documentation or repository metadata; no behaviour (unless the file is code)", "unless_code": true},
|
|
{"stage": "kind", "kind": "packaging", "glob": ["**/chart.{yaml,yml}", "**/{formula,formulae,casks}/*.rb", "**/{debian,snap,flatpak,homebrew,fastlane}/**", "**/*.spec", "**/snapcraft.{yaml,yml}", "**/*.flatpak.{yml,yaml,json}"], "profile": "release", "reason": "packaging or distribution metadata (Helm chart, Homebrew formula, Debian, RPM, snap, flatpak, app-store listing): how a release reaches users"},
|
|
{"stage": "kind", "kind": "asset", "glob": "**/*.{png,jpg,jpeg,gif,svg,ico,webp,avif,bmp,woff,woff2,ttf,otf,eot,mp3,mp4,wav,ogg,webm,pdf}", "profile": "trivial", "reason": "static asset or image; no behaviour", "unless_code": true},
|
|
{"stage": "kind", "kind": "style", "glob": "**/*.{css,scss,sass,less,styl}", "profile": "trivial", "reason": "styling only", "unless_code": true},
|
|
{"stage": "kind", "kind": "content", "glob": ["**/{locales,locale,i18n,translations}/**", "**/*.{po,pot}"], "profile": "trivial", "reason": "translated strings or copy; no behaviour", "unless_code": true},
|
|
{"stage": "kind", "kind": "template", "glob": "**/.env.{example,sample,template,dist}", "profile": "isolated", "reason": "template of settings, no secrets, but it documents the configuration surface"},
|
|
{"stage": "kind", "kind": "fixture", "glob": ["**/{fixtures,testdata,golden,__snapshots__,__mocks__}/**", "**/*.snap"], "profile": "isolated", "reason": "test fixture or snapshot; data for tests, not behaviour"},
|
|
{"stage": "kind", "kind": "test", "glob": ["**/{tests,test,__tests__,e2e}/**", "**/spec/**/*.rb", "**/test_*.*", "**/*_test.*", "**/*_spec.*", "**/*.{test,spec}.*", "**/*{Test,Tests}.{java,kt,swift,cs,php,scala}"], "profile": "isolated", "reason": "test code: not trivial, and a test of data or critical code is at least logic", "elevate": true},
|
|
{"stage": "kind", "kind": "generated", "glob": ["**/{dist,target,__generated__,generated}/**", "**/*.{pb.go,generated.*,min.js,min.css,g.dart}", "**/*_pb2.py", "**/*_pb2_grpc.py", "**/__pycache__/**", "**/*.pyc"], "profile": "isolated", "reason": "generated or built output; the source that produces it carries the risk"},
|
|
{"stage": "kind", "kind": "lockfile", "glob": ["**/*.lock", "**/*.lockb", "**/*-lock.{json,yaml,yml}", "**/*.lock.json", "**/{go.sum,package.resolved,gradle.lockfile,flake.lock}", "**/npm-shrinkwrap.json"], "profile": "integration", "reason": "lockfile: the code you depend on changes without you writing it"},
|
|
{"stage": "kind", "kind": "manifest", "glob": ["**/{package.json,cargo.toml,go.mod,gemfile,pipfile,pyproject.toml,setup.py,setup.cfg,pom.xml,composer.json,package.swift,podfile,cartfile,mix.exs,pubspec.yaml,vcpkg.json,conanfile.txt,deno.json,makefile,gnumakefile,cmakelists.txt,justfile,rakefile,build,build.bazel,workspace,workspace.bazel,module.bazel,meson.build,build.sbt,project.clj,deps.edn,stack.yaml,sconstruct,build.zig,rebar.config,dune-project,gradle.properties,go.work,environment.yml,brewfile,flake.nix,shell.nix,default.nix,nx.json,turbo.json,lerna.json,tox.ini,noxfile.py,tsconfig.json,jsconfig.json,.babelrc,renovate.json,renovate.json5,dependabot.yml,directory.build.props,directory.packages.props,directory.build.targets,.tool-versions,.nvmrc,.python-version,.bazelversion}", "**/requirements*.txt", "**/build.gradle*", "**/settings.gradle*", "**/*.{gemspec,csproj,fsproj}", "**/tsconfig*.json", "**/jsconfig*.json", "**/{webpack,vite,rollup,babel,esbuild,snowpack,parcel,metro,next,nuxt,svelte,astro,tailwind,postcss,gulpfile,gruntfile,jest,vitest,karma,tsup,swc}.config.*", "**/gulpfile.*", "**/gruntfile.*", "**/.babelrc.*", "**/*.{versions.toml,sln,vcxproj,xcodeproj,pbxproj,nuspec,cabal,bzl}", "**/*.mk", "**/*.build.gradle", "**/constraints*.txt", "**/gradle/**", "**/.github/dependabot.y*ml", "**/cmake/**/*.cmake", "**/*.cmake", "**/*.config.*", "**/.{swcrc,parcelrc,browserslistrc}"], "profile": "integration", "reason": "dependency, packaging or build configuration: what is built, and from what, changes"},
|
|
{"stage": "kind", "kind": "vendor", "glob": "**/{vendor,third_party,third-party,node_modules}/**", "profile": "integration", "reason": "vendored code you did not write"},
|
|
{"stage": "kind", "kind": "text", "glob": "**/*.txt", "profile": "trivial", "reason": "plain text only", "unless_code": true},
|
|
{"stage": "name", "token": ["auth", "authn", "authz", "authenticat*", "authoriz*", "oauth", "oidc", "saml", "jwt", "rbac", "acl", "iam", "permission*", "sudoers", "security"], "profile": "critical", "reason": "authentication, authorization or access control"},
|
|
{"stage": "name", "token": ["password*", "passwd", "credential*", "secret", "secrets", "keystore", "keychain", "keyring", "token", "tokens"], "scope": "dir", "profile": "critical", "reason": "secrets and credentials"},
|
|
{"stage": "name", "token": ["password*", "passwd", "credential*", "secret", "secrets", "keystore", "keychain", "keyring"], "scope": "stem", "profile": "critical", "reason": "secrets and credentials"},
|
|
{"stage": "name", "token": ["creds", "cred", "vault", "certificate", "certificates", "cert", "certs", "pki", "x509", "truststore", "keypair", "apikey", "apikeys"], "profile": "critical", "reason": "credentials, certificates or a secrets vault"},
|
|
{"stage": "name", "token": ["key", "keys", "token", "tokens"], "requires": {"token": ["rotate", "rotates", "rotation", "rotating", "issue", "issues", "issuing", "issuer", "issuance", "mint", "minting", "revoke", "revoking", "revocation", "provision*", "unseal"]}, "profile": "critical", "reason": "issues, rotates or revokes keys or tokens: credential lifecycle"},
|
|
{"stage": "name", "token": ["api"], "requires": {"token": ["key", "keys"]}, "profile": "critical", "reason": "api keys"},
|
|
{"stage": "name", "glob": ["**/*.{p12,pfx,jks,keystore,truststore,crt,cer,gpg,kdbx}"], "profile": "critical", "reason": "key, certificate or keystore file"},
|
|
{"stage": "name", "token": ["role", "roles", "guard", "guards", "privilege*", "entitlement*"], "profile": "critical", "reason": "authorization vocabulary: roles, guards, privileges"},
|
|
{"stage": "name", "token": ["policy", "policies"], "requires": {"token": ["access", "user", "users", "role", "roles", "group", "groups", "admin", "tenant", "org", "orgs", "security", "authz", "iam", "rbac", "opa", "middleware", "guard", "permission*"]}, "profile": "critical", "reason": "access policy"},
|
|
{"stage": "name", "glob": ["**/*.{rego,cedar}", "**/app/policies/**", "**/*policy.php"], "profile": "critical", "reason": "access policy language or framework policy class"},
|
|
{"stage": "name", "token": ["require", "requires", "required", "ensure", "ensures", "can", "cannot", "must", "allow", "allows", "deny", "forbid", "forbidden", "restrict", "protect", "protected", "check", "assert", "is", "has"], "requires": {"token": ["role*", "admin", "admins", "owner", "owners", "permission*", "login", "logged", "access", "member", "members", "tenant", "staff", "superuser", "privilege*", "authenticated"]}, "profile": "critical", "reason": "access check: who may do this"},
|
|
{"stage": "name", "token": ["crypto*", "encrypt*", "decrypt*", "cipher*", "sha256", "aes", "tls"], "profile": "critical", "reason": "cryptography"},
|
|
{"stage": "name", "glob": ["**/.env", "**/.env.*", "**/*.pem", "**/*.key", "**/id_rsa*"], "profile": "critical", "reason": "real environment or key file may hold secrets"},
|
|
{"stage": "name", "token": ["payment*", "billing", "checkout", "payout", "payouts", "refund", "refunds", "payroll", "settlement", "settlements"], "profile": "critical", "reason": "payments and billing move money"},
|
|
{"stage": "name", "token": ["mutex", "semaphore", "spinlock", "rwlock", "lock", "locks", "locking"], "profile": "critical", "reason": "concurrency primitive"},
|
|
{"stage": "name", "glob": ["**/{install,uninstall,installer,postinst,preinst}.{sh,bash,ps1,bat,py,rb,go,rs,js}", "**/PKGBUILD", "**/pkgbuild", "**/{postinst,preinst,postrm,prerm}"], "profile": "critical", "reason": "installer changes the user's machine"},
|
|
{"stage": "name", "glob": ["VERSION", "**/{release,releases,publish,deploy}.{sh,bash,ps1,py,rb,go,rs,mk,yml,yaml,toml,json,gradle}", "**/{release,releases}/**", "**/.goreleaser*", "**/release.config.*", "**/.github/workflows/*{release,publish,deploy}*"], "profile": "release", "reason": "release or deployment machinery"},
|
|
{"stage": "name", "glob": ["**/*.{sql,prisma,ddl,cql}", "**/db/schema.rb", "**/db/migrate/**"], "token": ["migrations", "migration", "migrate", "alembic", "flyway", "liquibase"], "profile": "data", "reason": "database migration or schema: stored data changes shape"},
|
|
{"stage": "name", "token": ["db", "database", "storage", "persist*", "backup", "restore"], "scope": "dir", "profile": "data", "reason": "persistence layer"},
|
|
{"stage": "name", "token": ["backup", "restore"], "scope": "stem", "profile": "data", "reason": "persistence layer or backup"},
|
|
{"stage": "name", "glob": ["include/**", "**/*.{proto,graphql,gql,thrift,avsc,wsdl}", "**/openapi*", "**/swagger*", "**/*.schema.json", "**/protos/**", "**/proto/**", "**/*.d.{ts,mts,cts}", "**/*.{idl,capnp,fbs,smithy,raml,xsd}", "**/*{openapi,swagger}*.{json,yaml,yml}", "**/include/**", "**/{public,inc}/**/*.{h,hpp,hh,hxx}", "**/{sdk,sdks}/**/public/**"], "profile": "integration", "reason": "public interface surface"},
|
|
{"stage": "name", "token": ["api", "apis"], "scope": "dir", "profile": "integration", "reason": "public interface surface"},
|
|
{"stage": "name", "glob": ["**/*{feature_flag,feature-flag,featureflag}*", "**/{flags,feature_flags,feature-flags}.*", "**/feature[_-]flags/**"], "profile": "integration", "reason": "runtime switches change behaviour across modules"},
|
|
{"stage": "name", "glob": ["**/*.{tf,tfvars}", "**/dockerfile*", "**/*.dockerfile", "**/docker-compose*.{yml,yaml}", "**/compose*.{yml,yaml}", "**/.github/workflows/**", "**/.gitlab-ci.yml", "**/jenkinsfile", "**/.circleci/**", "**/.travis.yml", "**/azure-pipelines.yml", "**/{terraform,k8s,kubernetes,helm,charts,ansible,infra,infrastructure,deploy}/**", "**/*entrypoint*.{sh,bash,py}", "**/containerfile*", "**/*.containerfile", "**/{docker,containers,container,.devcontainer}/**", "**/{docker-bake,bake}.{hcl,json}", "**/devcontainer.json", "**/skaffold.{yaml,yml}", "**/*cronjob*.{yaml,yml}"], "profile": "integration", "reason": "infrastructure, pipeline, container or scheduled-job definition"},
|
|
{"stage": "name", "glob": ["**/.githooks/**", "**/.husky/**", "**/.git/hooks/**", "**/hooks/{pre-commit,commit-msg,pre-push,post-merge,post-checkout,post-commit,pre-rebase,prepare-commit-msg,pre-receive,post-receive,update,post-rewrite,pre-merge-commit}", "**/{lefthook,.lefthook}.{yml,yaml,json,toml}", "**/.pre-commit-config.yaml"], "profile": "critical", "reason": "git hook: runs automatically on every commit or push"},
|
|
{"stage": "name", "token": ["parse", "parser", "parsers", "parsing", "parsed", "parsable", "parseable", "unparse", "lexer", "lexers", "lexing", "lexical", "tokenizer", "tokenizers", "tokenizing", "tokenization", "tokeniser", "codec", "codecs", "decoder", "decoders", "decode", "decoding", "encoder", "encoders", "encode", "encoding", "serializer", "serializers", "serialization", "deserializer", "deserialization", "grammar", "grammars", "expr", "expression", "expressions", "evaluator", "interpreter", "compiler", "cron", "interval", "intervals", "merge", "merger", "merging", "scheduler", "schedulers", "scheduling", "solver", "solvers", "calculator", "calculators", "matcher", "matchers", "regex", "framing", "framer", "protocol", "protocols", "checksum", "limiter", "backoff"], "profile": "logic", "reason": "parsing, codecs, expressions, scheduling and merging have a broad input space (whole words only)"},
|
|
{"stage": "name", "token": ["money", "currenc*", "rounding", "pricing", "tax"], "profile": "logic", "reason": "money arithmetic must be exact"},
|
|
{"stage": "name", "token": ["metric", "metrics", "physics", "collision", "collisions", "geometry", "geometric", "math", "maths", "calc", "calcs", "calculation*", "interest", "tax", "taxes", "rate", "rates", "dedupe", "dedup", "deduplicat*", "transform", "transforms", "aggregate", "aggregates", "aggregation", "aggregator", "sort", "sorting", "sorter", "rank", "ranking", "search", "diff", "differ", "hash", "hashing", "stats", "statistics", "percentile", "quantile", "matrix", "interpolat*", "score", "scoring", "numeric", "arithmetic", "probability"], "profile": "logic", "reason": "numeric and algorithmic code: subtle mistakes give wrong answers (over-rating is cheap, under-rating is not)"},
|
|
{"stage": "name", "glob": ["**/*state-machine*", "**/*statemachine*", "**/*state_machine*"], "token": ["algo", "algos", "algorithm*", "fsm"], "profile": "logic", "reason": "algorithmic logic"},
|
|
{"stage": "name", "token": ["models", "model", "dao", "daos", "repository", "repositories", "orm", "persistence"], "except": {"glob": "**/*.{tsx,jsx,vue,svelte}", "token": ["view", "views", "viewmodel", "viewmodels", "component", "components", "page", "pages", "ui", "web", "frontend", "client", "mobile", "screen", "screens", "widget", "widgets", "redux", "vuex", "pinia", "ngrx", "mobx", "zustand", "slice", "slices", "reducer", "reducers", "ml", "ai", "nn", "neural", "training", "train", "torch", "pytorch", "tensorflow", "keras", "sklearn", "inference", "notebooks", "notebook", "onnx", "llm", "vision", "nlp"]}, "profile": "data", "reason": "ORM model, entity, data-access object or repository: defines or touches stored data (front-end view models and machine-learning models are excluded)"},
|
|
{"stage": "name", "token": ["entity", "entities"], "except": {"glob": "**/*.{tsx,jsx,vue,svelte}", "token": ["view", "views", "viewmodel", "viewmodels", "component", "components", "page", "pages", "ui", "web", "frontend", "client", "mobile", "screen", "screens", "widget", "widgets", "redux", "vuex", "pinia", "ngrx", "mobx", "zustand", "slice", "slices", "reducer", "reducers", "ml", "ai", "nn", "neural", "training", "train", "torch", "pytorch", "tensorflow", "keras", "sklearn", "inference", "notebooks", "notebook", "onnx", "llm", "vision", "nlp", "game", "games", "gameplay", "engine", "ecs", "physics", "sprite", "sprites", "scene", "scenes", "unity", "unreal", "godot", "bevy", "npc", "npcs", "pygame", "gamedev", "voxel"]}, "profile": "data", "reason": "ORM entity: defines or touches stored data (front-end view models, machine-learning models and game or simulation entities are excluded)"},
|
|
{"stage": "name", "token": ["store", "stores"], "except": {"glob": ["**/*.{tsx,jsx,vue,svelte,ts,js,mjs}"], "token": ["view", "views", "viewmodel", "viewmodels", "component", "components", "page", "pages", "ui", "web", "frontend", "client", "mobile", "screen", "screens", "widget", "widgets", "redux", "vuex", "pinia", "ngrx", "mobx", "zustand", "slice", "slices", "reducer", "reducers"]}, "profile": "data", "reason": "data store directory (front-end state stores are excluded; machine-learning contexts cancel `model`, not `store`)", "scope": "dir"},
|
|
{"stage": "name", "token": ["store", "stores"], "except": {"glob": ["**/*.{tsx,jsx,vue,svelte,ts,js,mjs}"], "token": ["view", "views", "viewmodel", "viewmodels", "component", "components", "page", "pages", "ui", "web", "frontend", "client", "mobile", "screen", "screens", "widget", "widgets", "redux", "vuex", "pinia", "ngrx", "mobx", "zustand", "slice", "slices", "reducer", "reducers"]}, "profile": "data", "reason": "compound store name (user_store, SessionStore, feature_store): stored data", "scope": "stem", "min_stem_tokens": 2},
|
|
{"stage": "name", "token": ["store", "stores"], "except": {"glob": ["**/*.{tsx,jsx,vue,svelte,ts,js,mjs}"], "token": ["view", "views", "viewmodel", "viewmodels", "component", "components", "page", "pages", "ui", "web", "frontend", "client", "mobile", "screen", "screens", "widget", "widgets", "redux", "vuex", "pinia", "ngrx", "mobx", "zustand", "slice", "slices", "reducer", "reducers", "domain", "domains", "retail", "shop", "shops", "catalog", "merchant", "merchants", "franchise", "franchises", "location", "locations"]}, "profile": "data", "reason": "module named Store: stored data, unless it is a business object in a domain model", "scope": "stem"},
|
|
{"stage": "name", "token": ["datastore", "datastores", "warehouse", "warehouses", "lake", "lakes", "datalake", "lakehouse"], "profile": "data", "reason": "data store, warehouse or lake"},
|
|
{"stage": "name", "token": ["sink", "sinks", "loader", "loaders"], "requires": {"token": ["etl", "elt", "pipeline", "pipelines", "load", "loading", "ingest", "ingestion", "dbt"]}, "profile": "data", "reason": "sink or loader in an ETL or pipeline load stage writes stored data"},
|
|
{"stage": "name", "token": ["writer", "writers", "upsert", "upserts", "inserter"], "requires": {"token": ["table", "tables", "rows", "records"]}, "profile": "data", "reason": "writer to tables: stored data"},
|
|
{"stage": "name", "glob": ["**/.{bashrc,bash_profile,bash_login,bash_logout,bash_aliases,zshrc,zshenv,zprofile,zlogin,zlogout,profile,xinitrc,xprofile,xsession,kshrc,cshrc,tcshrc}", "**/{bashrc,zshrc,zshenv,zprofile,profile,bash_profile,xinitrc,xprofile}", "**/profile.d/**", "**/{bashrc.d,zshrc.d,zshenv.d}/**", "**/fish/conf.d/**", "**/fish/config.fish", "**/{rc.local,init.d,rc.d}", "**/{init.d,rc.d}/**", "**/etc/{environment,profile}", "**/*.{service,timer,socket,mount,automount,target}", "**/systemd/**", "**/{crontab,anacrontab}", "**/{crontabs,cron.d,cron.daily,cron.hourly,cron.weekly,cron.monthly}/**", "**/{launchagents,launchdaemons}/**", "**/autostart/**", "**/programs/startup/**"], "profile": "critical", "reason": "runs automatically on a user's machine or in every session"},
|
|
{"stage": "name", "glob": ["**/version", "**/.version", "**/{version,_version,__version__}.*", "**/.release-please*", "**/release-please*", "**/.changeset/**", "**/.bumpversion*", "**/.bump2version*", "**/.versionrc*", "**/.releaserc*", "**/.tbump.toml"], "profile": "release", "reason": "version marker or release tooling state"},
|
|
{"keyword": "migration", "profile": "data", "reason": "diff mentions a data migration"},
|
|
{"keyword": "schema change", "profile": "data", "reason": "diff changes a schema"},
|
|
{"keyword": "alter table", "profile": "data", "reason": "diff alters stored data"},
|
|
{"keyword": "drop table", "profile": "data", "reason": "diff drops stored data"},
|
|
{"keyword": "password", "profile": "critical", "reason": "diff handles credentials"},
|
|
{"keyword": "secret", "profile": "critical", "reason": "diff handles secrets"},
|
|
{"keyword": "encrypt", "profile": "critical", "reason": "diff uses cryptography"},
|
|
{"keyword": "authorize", "profile": "critical", "reason": "diff makes authorization decisions"},
|
|
{"keyword": "authentication", "profile": "critical", "reason": "diff handles authentication"},
|
|
{"keyword": "payment", "profile": "critical", "reason": "diff moves money"},
|
|
{"keyword": "mutex", "profile": "critical", "reason": "diff uses a concurrency primitive"},
|
|
{"keyword": "release candidate", "profile": "release", "reason": "diff prepares a release"}
|
|
],
|
|
"measured": {"blind_agreement": ["73 of 89", "89 of 106"], "note": "A floor computed from paths alone agreed with careful independent labels about five times in six, and under-rated roughly one data-or-critical path in six. That is why the contract's declared profile and the agent's own judgement sit above the floor, and why a unit records the floor beside the declared profile."}
|
|
}
|