Source Code Management
Developmentsource-code-managementSource Code Management is an Agent Skill for development published in the greenpau/caddy-security repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
caddy-security source code management and commit message rules. Use when creating, reviewing, or updating commit messages, especially when the user asks to create a commit message for a change in this repository.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/greenpau/caddy-security/blob/HEAD/.codex/skills/source-code-management/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/source-code-management, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Source Code Management
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 a mix of product-surface labels and maintenance labels. Prefer the most specific product surface when the change is clearly about one Caddy security directive, parser, provider, or runtime path. Use a maintenance label when the change is repository plumbing, documentation, testing, release work, or a bug fix that cuts across multiple surfaces.
Selection rules:
- Use exactly one indicator. Do not combine indicators or add parenthesized scopes.
- Prefer public Caddyfile and module names over internal abbreviations. For
example, use
authenticateinstead ofauthn, andauthorizeinstead ofauthz. - Use
caddyfilefor parser/adaptation infrastructure that affects several directives, Caddyfile fixture changes, or generic config loading. - Use provider indicators such as
ldap,oauth, orsamlonly when the change is provider-specific. Useidentitywhen the change is shared by identity stores or identity providers. - Use
breakfixfor a reported regression, panic, or shipped behavior that is visibly broken for users. Usefixfor narrower correctness fixes that are not tied to a known user breakage. - Use
tests, notunittest, for Go tests, Caddyfile adapt fixtures, andtestdatachanges whose primary purpose is coverage. - 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 or toolchain version bumps. Usebuildonly when the build behavior itself changes. - The current Makefile release target creates subjects like
released v1.1.62without a change indicator. Treat that as existing automation behavior, not a template for hand-written commit messages. For hand-written release workflow changes, 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
authenticateforauthn,authorizeforauthz,ldapforids/ldap,localforids/local,featforfeature, andtestsforunittest. Replacemiscorchorewith a more specific indicator when possible, orops/variouswhen it is truly general maintenance. - Use colon form for new dependency bumps, such as
ops: go-authcrunch to v1.1.40, even though older history has subjects likeupgrade to github.com/greenpau/go-authcrunch v1.1.39.
Use one of these product-surface indicators:
app: Caddysecurityapp provisioning, lifecycle, config validation, or runtime config resolutionauthenticate:authenticatehandler behavior, authentication portals, cookies, crypto, transforms, or authentication Caddyfile directivesauthorize:authorizehandler behavior, authorization policies, ACLs, bypass rules, crypto, claim extraction, or header injectioncaddyfile: globalsecurityCaddyfile parsing, directive ordering, adapt behavior, parser helpers, or Caddyfile fixtures spanning multiple surfacescredentials: credential directives and credentials configidentity: shared identity store or identity provider behaviorldap: LDAP-specific identity store or provider behaviorlocal: local identity store or local user behaviormessaging: messaging directives and messaging configoauth: OAuth or OpenID Connect provider behaviorregistration: user registration directives and registration policy behaviorsaml: SAML provider behaviorsecrets: secrets manager directives and secret resolution behaviorsso: SSO provider directives and single sign-on provider configui: portal UI directives, labels, icons, metadata, themes, or UI assetscmd:cmd/authcrunchwrapper behavior
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, Caddy, Go, toolchain, release, version-reference, or repository maintenance changesbuild: Makefile, build output, xcaddy, 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
When asked to "create commit message for the change", create a file in
tmp/commits and place the commit message in that file. Commit message files in
tmp/commits are working artifacts and should not be committed unless explicitly
requested. Prefix the file name with YYYYMMDD_HHMM_ prefix.