Source Code Management
Change Inspection
Inspect status, staged diff, and unstaged diff separately. Never change the index unless asked. Default a commit-message request to staged changes when the index is nonempty and state which unstaged changes are excluded. If the index is empty, describe the working-tree changes and say they must be staged before committing.
Commit Message Rules
All commits must have a proper commit message.
A hand-written commit message subject line must conform to the following rules:
- The first line of each commit message is the subject.
- The subject line MUST be less than 87 characters long.
- The subject line MUST NOT terminate with a period (
.). - The subject line MUST start with a change indicator followed by a colon (
:).
Change Indicators
This repository uses change indicators as package and subsystem labels, plus a small set of maintenance labels. Prefer the most specific AuthCrunch package, CLI, provider, store, or runtime surface when the change is clearly anchored in one component. Use a maintenance label when the change is repository plumbing, documentation, tests, release work, or a deliberately cross-cutting fix.
Selection rules:
- Use exactly one indicator. Do not combine indicators or add parenthesized scopes.
- Prefer names that match repository packages, CLI names, or externally visible
AuthCrunch concepts. For example, use
authn,authz,oauth,ldap,kms, orauthdbctlwhen a change is anchored there. - Use
configonly for top-levelauthcrunch.Config,Serverwiring, cross-surface validation, reload plumbing, or shared config exposure. For package-local config parsing, use the package indicator. - Use
authnfor authentication portal behavior and portal API or HTTP handlers. Useuifor embedded portal/profile UI assets, templates, static assets, icons, profile UI bundles, and UI-specific serving behavior. Usecookiefor cookie-specific issuing, reading, deletion, domain, and name config, even when the code lives underpkg/authn/cookie. - Use
authzfor authorization gatekeepers and policies. Useaclwhen the change is really the shared ACL engine, andauthproxywhen it is remote/basic/API-key auth proxy configuration or authenticators. - Use
idpandidsfor shared identity provider or identity store config, interfaces, and dispatch. Useoauth,saml,ldap, orlocalwhen the change is specific to that provider or store implementation. - Use
identityfor identity and user data models, local user database records, roles, passwords, MFA tokens, API keys, WebAuthn/U2F/GPG/SSH keys, lockouts, QR codes, andpkg/user. - Use
registryfor user registration providers, local registry behavior, and domain restriction rules. - Use
kmsfor crypto keys, keystores, token encryption/decryption, and crypto config parsing. Usesystemfor system API protocol messages, request parsing, generated keys, and system API auth messages. - Use
redirects,authchal,credentials,messaging,translate,waf,apiauth,errors,requests,shared,tagging, orutilwhen the primary change is in that package or its testdata. - Use
authdbctlfor the CLI undercmd/authdbctl, including its README, config, commands, output, and command behavior. Usebuildonly when build output or Makefile build behavior changes. - Use
breakfixfor a reported break-fix issue, regression, panic, or shipped behavior that is visibly broken for users. Usefixfor narrower correctness fixes that are not tied to known user breakage. - Use
securityfor vulnerability fixes, hardening, dependency-audit work, or disclosure-policy changes. If a security fix is tightly scoped to one runtime surface, prefer the surface only when the issue is being handled as ordinary correctness rather than as a vulnerability. - Use
tests, notunittest, for Go tests, fixtures, golden data,testdata, and coverage-only changes. If tests accompany a product change, choose the product indicator instead. - Use
skillsfor AI agent skills, skill metadata, or agent-facing repository instructions. Prefer it overdocsoropswhen the primary purpose is helping AI agents work with this repository. - Use
opsfor dependency, Go toolchain, generated license/version metadata, release, or repository maintenance changes. Usegithubfor GitHub Actions, issue templates, CLA workflow/assets, Funding metadata, or other GitHub repository metadata. - Automated patch and minor releases use
ops: released v<VERSION>. Userelease-and-versioningfor the release workflow. Hand-written release workflow changes also useops. - Use
variousonly when a commit intentionally spans unrelated surfaces and no more specific indicator is honest. - Normalize older repository labels when creating new messages: use
featforfeature,fixorbreakfixforbug/bugfix,authdbctlforcmdchanges to the CLI,githubforclabot/workflow metadata, and a specific package indicator instead ofauth,api,hosting,misc, orchore. - Use colon form for new dependency bumps, such as
ops: upgrade golang.org/x/crypto to v0.48.0, even though older history has subjects without a change indicator.
Use one of these package or product-surface indicators:
acl: shared ACL conditions, path matching, rule parsing, and rule evaluationapiauth: API authentication request/response envelope typesauthchal: authentication challenge rule parsing and evaluationauthdbctl: AuthDB management CLI, CLI config, commands, output, and CLI docsauthn: authentication portals, login/logout/recovery/register/profile/admin API handlers, MFA/WebAuthn/TOTP/GPG/SSH/API-key portal operations, sessions, portal config, and portal runtime behaviorauthproxy: auth proxy config, remote authenticators, basic auth proxying, and API-key auth proxyingauthz: authorization gatekeepers, policies, bypasses, token validators, header injection, auth redirects, and authorization runtime behaviorconfig: top-level AuthCrunch config, server wiring, validation, and shared config/reload plumbingcookie: authentication cookie factories, names, domains, reading, issuing, and deletioncredentials: credential config, generic credentials, and credential provider integration pointserrors: typed error catalog and error wrapping helpersidentity: identity/user models, user databases, roles, passwords, MFA tokens, API/GPG/SSH/WebAuthn keys, locations, organizations, lockouts, and QR helpersidp: shared identity provider config, provider interfaces, and provider dispatchids: shared identity store config, store interfaces, and store dispatchkms: crypto key config, keystores, token operators, parsers, and encryptionldap: LDAP identity store config, authentication, DN parsing, and group mappinglocal: local identity store config, file-backed store behavior, and local user authenticationmessaging: email/file messaging providers, send inputs, templates, and delivery behavioroauth: OAuth/OIDC providers, provider drivers, state, PKCE, claims, JWKS, user info, token validation, and provider-specific logoutredirects: trusted redirect URI parsing, matching, and validationregistry: user registration providers, local registry behavior, cache, and domain restrictionsrequests: request helper models shared by authn/authz flowssaml: SAML providers, metadata, certificates, ACS URLs, and SAML authenticationshared: shared in-memory buffer behaviorsso: single sign-on provider config, metadata, requests, and provider behaviorsystem: system API message types, generated keys, encryption, parsers, and basic/API-key system auth messagestagging: public or internal tag helper behaviortranslate: i18n framework, message catalog, template translation, languages, and formattersui: embedded portal/profile UI templates, CSS, JavaScript, images, fonts, icons, static files, and UI servingutil: shared utility helpers, config parsing helpers, validators, sanitizers, redirect helpers, request IDs, logging helpers, and file/addr/data helperswaf: malformed input checks and WAF helpers
Use one of these maintenance indicators:
breakfix: reported regression, panic, or user-visible breakage fixfix: correctness fix without a known production breakagefeat: user-facing capability that does not fit a more specific product surface indicatordocs: documentation-only changestests: test additions, fixture updates, or coverage improvementsrefactor: behavior-preserving code restructuringskills: AI agent skills, skill metadata,AGENTS.md, or agent-facing repository instructionsops: dependency, Go, toolchain, release, version-reference, generated license/version metadata, or repository maintenance changesbuild: Makefile, build output, packaging, or local build behaviorgithub: GitHub Actions, issue templates, CLA workflow, or repository GitHub metadatasecurity: vulnerability, dependency audit, hardening, or disclosure-policy changesvarious: intentionally mixed changes that do not fit one indicator
The commit message body must contain the following sections in this order:
Before this commit:After this commit:Tests:More info:
The body may also contain the following optional sections:
Resolves:Partial Resolution:See also:Links:
The following rules apply to the body of a commit message:
- Separate sections with one blank line.
- Each section title MUST end with a colon (
:). - Lines MUST NOT exceed 87 characters, except in
LinksandMore info. - Use
ResolvesONLY when the PR or commit resolves an issue completely. - Use
Partial Resolutionwhen the PR or commit addresses an issue partially. - Use
See alsofor additional related references. Resolves,Partial Resolution, andSee alsoMUST contain valid links.- Multiple links in those reference sections MUST be separated by comma and
space (
,). TestsMUST describe the command or manual check performed.- If no smoke test was run,
TestsMUST saynot runand include the reason. More infoMUST summarize the implementation details or notable decisions.
The Links section must contain a list of valid links or references, e.g.:
- Text reference
- [HTTP link](http://google.com/)
Use this template for commit messages:
indicator: concise subject under 87 characters
Before this commit: describe the previous behavior, limitation, or state.
After this commit: describe the new behavior, implementation, or state.
Tests: describe the command or manual check performed.
More info: summarize important implementation details or decisions.
For example, a commit message may look like this:
docs: add contributing guidance
Before this commit: the repository had no guidance related to open-source
contributions.
After this commit: contribution guidance is documented in `CONTRIBUTING.md`.
Tests: reviewed the rendered Markdown manually.
More info: added a focused contributor workflow and repository etiquette notes.
Commit Message File Workflow
For every request to create or generate a commit message, write it below
tmp/commits with a YYYYMMDD_HHMM_ prefix and always provide the corresponding
git commit -F ... command. Do not require the user to ask separately for a
message file. A review-only request does not create a file unless asked.
Commit message files in tmp/commits are working artifacts and should not be
committed unless explicitly requested.