# AtomicCommitStrategySkill
A disciplined approach to version control and iterative development that enables high-frequency commits while maintaining stability and traceability.
---
## CorePhilosophy
**"Each commit does exactly one thing."**
This principle enables:
- Fast problem isolation via `git bisect`
- Safe, surgical rollbacks
- Clear, reviewable code history
- Rapid iteration without cascading failures
---
## CommitMessageFormatFollow the **ConventionalCommits** specification:
```
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
```
### CommitTypes
| Type | Purpose | ImpactBoundary |
| ---------- | ---------------------------------------- | ---------------------------- |
| `fix` | Bug fixes | NoAPI changes |
| `feat` | New features | Clear, documented boundaries |
| `docs` | Documentation only | Independentof code behavior |
| `refactor` | Code restructuring | No behavior changes |
| `test` | Adding or updating tests | No production code changes |
| `chore` | Build, CI, tooling, dependencies | No production logic changes |
| `perf` | Performance improvements | No functional changes |
| `style` | Codeformatting (whitespace, semicolons) | No logic changes |
### Examples```bash
# Good: Atomic, single-purpose commits
fix: honor state dir override in config resolution
feat: add webhook retry with exponential backoff
docs: update API authentication examples
refactor: extract validation logic into utils module
test: add edge cases for date parsing
chore: bump typescript to 5.4.0
# Bad: Multi-purpose commits
fix: various bug fixes and improvements
feat: add new features and fix some issues
update: changes to multiple files
```
---
## ImplementationRules
### Rule1: OneLogicalChangePerCommitBefore committing, ask:
- Doesthis commit do exactly ONE thing?
- Can I describe it in a single sentence without "and"?
- If I revert this, will only ONE feature/fix be affected?
**Split commits when:**
- Fixing a bug AND adding a feature
- RefactoringAND changing behavior
- Updating deps AND modifying code that uses them
### Rule2: TypeIsolationEach commit type has strict boundaries:
```
fix: MUST NOT change public APIs or add features
feat: MUST have clear scope; document breaking changes
refactor: MUST NOT change external behavior (tests should pass unchanged)
docs: MUST NOT include code changes (except doc comments)
test: MUST NOT modify production code
chore: MUST NOT affect runtime behavior
```
### Rule3: CommitFrequencyCommit early and often:
- After each logical unit of work completes
- Before switching context to a different task
- When tests pass for the current change
### Rule4: MeaningfulHistoryEach commit message should:
- Startwithlowercase (after the type prefix)
- Use imperative mood ("add" not "added")
- Be concise but descriptive (50 chars or less for title)
- Reference issues when applicable: `fix: resolve timeout error (#123)`
---
## QualityGates
### BeforeEachCommit```bash
# 1. Review staged changes
git diff --staged
# 2. Ensure single logical change
# Ask: "Does this do ONE thing?"
# 3. Run relevant tests
npm test -- --related # or equivalent
# 4. Lint/format check
npm run lint
```
### CommitChecklist
- [ ] Single logical change only
- [ ] Correct commit type selected
- [ ] Testspass (or tests added fornew code)
- [ ] No unrelated changes included
- [ ] Message clearly describes the change
---
## ProgressiveReleaseStrategyFor projects with release cycles:
```
feature branch β beta/canary β stable/main
```
### Workflow1. **Development**: High-frequency commits to feature branches
2. **BetaRelease**: Merge to beta branch, tag with`-beta.N`3. **Validation**: Beta users test; fixes continueas atomic commits
4. **StableRelease**: Promote validated beta to stable
```bash
# Beta release
chore: prep 2024.3.15-beta.1 release
# After validation
chore: release 2024.3.15
```
---
## ContinuousHardeningPatternSecurity and stability improvements should be:
- Incremental, not monolithic
- Clearly labeled with`fix: harden` prefix
- Focused on single attack vectors or failure modes
```bash
fix: harden file path traversal checks
fix: harden auth token validation
fix: harden rate limiting for API endpoints
fix: harden input sanitization for user content
```
---
## DocumentationasProductDocumentation commits should be frequent and synchronized:
- Every`feat:` should have a corresponding `docs:` (same PR or follow-up)
- API changes require immediate doc updates
- README, CHANGELOG, and inline comments are first-classcitizensTarget: **10-15% of commits should be documentation**
---
## GitWorkflowCommands
### InteractiveStaging (for splitting commits)
```bash
# Stage specific hunks
git add -p
# Stage specific files
git add path/to/specific/file.ts
# Unstage accidentally added files
git reset HEAD path/to/file.ts
```
### Amending (before push only)
```bash
# Fix last commit message
git commit --amend -m "fix: corrected message"
# Add forgotten file to last commit
git add forgotten-file.ts
git commit --amend --no-edit
```
### BisectforBugHunting```bash
git bisect start
git bisect bad # Current commit is broken
git bisect good <known-good> # Last known working commit
# Git will binary search; mark each as good/bad
git bisect reset # When done
```
---
## Anti-Patterns to Avoid
| Anti-Pattern | Problem | Solution |
| ---------------------- | --------------------------- | ------------------------------------------------------- |
| "WIP" commits | Meaningless history | Squash before merge or use descriptive messages |
| "Fix stuff" | No traceability | Bespecific: `fix: resolve null pointer in user lookup` |
| Mega-commits | Impossible to review/revert | Split into atomic units |
| Mixing types | Violates isolation | Separate into multiple commits |
| Committing broken code | Breaks bisect | Always ensure tests pass |
---
## IntegrationwithAI-AssistedDevelopmentWhenusingAI coding assistants:
1. **ReviewAI-generated changes** before committing
2. **SplitAI output** into atomic commits if it spans multiple concerns
3. **Verify tests pass** for each logical unit
4. **UseAI to draft commit messages** but ensure accuracy
```bash
# Let AI suggest, but you decide the commit boundaries
# AI might generate: "Add validation and fix bug and update docs"
# You split into:
# fix: resolve edge case in date validation
# feat: add email format validation
# docs: update validation API examples
```
---
## MetricsforSuccessTrack these to measure adoption:
| Metric | Target | Purpose |
| --------------------- | ----------------- | -------------------- |
| Avg. files per commit | < 5 | Ensures atomicity |
| Commitswith tests | > 30% of fix/feat | Quality assurance |
| Doc commits ratio | 10-15% | Documentation health |
| Revert frequency | < 2% | Commit quality |
| Bisect success rate | > 90% | History usefulness |
---
## QuickReferenceCard```
COMMIT FORMULA:
<type>(<scope>): <imperative-description>
TYPES:
fix | feat | docs | refactor | test | chore | perf | style
RULES:
β One logical change per commit
β Type boundaries respected
β Tests pass before commit
β Message is clear and specific
BEFORE COMMIT:
1. git diff --staged (review)
2. Is this ONE thing? (verify)
3. npm test (validate)
4. git commit -m "type: description" (commit)
```
---
## References
- [ConventionalCommitsSpecification](https://www.conventionalcommits.org/)
- [GitBisectDocumentation](https://git-scm.com/docs/git-bisect)
- [SemanticVersioning](https://semver.org/)
moltbot(aka.ClawdBot) insipred skill - A disciplined approach to version control and iterative development that enables high-frequency commits while maintaining stability and traceability.
You can choose how your personal data is used. Vendors want your permission to do the following:
TCF vendors
Store and/or access information on a device
Cookies, device or similar online identifiers (e.g. login-based identifiers, randomly assigned identifiers, network based identifiers) together with other information (e.g. browser type and information, language, screen size, supported technologies etc.) can be stored or read on your device to recognise it each time it connects to an app or to a website, for one or several of the purposes presented here.
Advertising presented to you on this service can be based on limited data, such as the website or app you are using, your non-precise location, your device type or which content you are (or have been) interacting with (for example, to limit the number of times an ad is presented to you).
Information about your activity on this service (such as forms you submit, content you look at) can be stored and combined with other information about you (for example, information from your previous activity on this service and other websites or apps) or similar users. This is then used to build or improve a profile about you (that might include possible interests and personal aspects). Your profile can be used (also later) to present advertising that appears more relevant based on your possible interests by this and other entities.
Advertising presented to you on this service can be based on your advertising profiles, which can reflect your activity on this service or other websites or apps (like the forms you submit, content you look at), possible interests and personal aspects.
Information about your activity on this service (for instance, forms you submit, non-advertising content you look at) can be stored and combined with other information about you (such as your previous activity on this service or other websites or apps) or similar users. This is then used to build or improve a profile about you (which might for example include possible interests and personal aspects). Your profile can be used (also later) to present content that appears more relevant based on your possible interests, such as by adapting the order in which content is shown to you, so that it is even easier for you to find content that matches your interests.
Content presented to you on this service can be based on your content personalisation profiles, which can reflect your activity on this or other services (for instance, the forms you submit, content you look at), possible interests and personal aspects. This can for example be used to adapt the order in which content is shown to you, so that it is even easier for you to find (non-advertising) content that matches your interests.
Information regarding which advertising is presented to you and how you interact with it can be used to determine how well an advert has worked for you or other users and whether the goals of the advertising were reached. For instance, whether you saw an ad, whether you clicked on it, whether it led you to buy a product or visit a website, etc. This is very helpful to understand the relevance of advertising campaigns.
Information regarding which content is presented to you and how you interact with it can be used to determine whether the (non-advertising) content e.g. reached its intended audience and matched your interests. For instance, whether you read an article, watch a video, listen to a podcast or look at a product description, how long you spent on this service and the web pages you visit etc. This is very helpful to understand the relevance of (non-advertising) content that is shown to you.
Understand audiences through statistics or combinations of data from different sources
Reports can be generated based on the combination of data sets (like user profiles, statistics, market research, analytics data) regarding your interactions and those of other users with advertising or (non-advertising) content to identify common characteristics (for instance, to determine which target audiences are more receptive to an ad campaign or to certain contents).
Information about your activity on this service, such as your interaction with ads or content, can be very helpful to improve products and services and to build new products and services based on user interactions, the type of audience, etc. This specific purpose does not include the development or improvement of user profiles and identifiers.
Content presented to you on this service can be based on limited data, such as the website or app you are using, your non-precise location, your device type, or which content you are (or have been) interacting with (for example, to limit the number of times a video or an article is presented to you).
Ensure security, prevent and detect fraud, and fix errors
Your data can be used to monitor for and prevent unusual and possibly fraudulent activity (for example, regarding advertising, ad clicks by bots), and ensure systems and processes work properly and securely. It can also be used to correct any problems you, the publisher or the advertiser may encounter in the delivery of content and ads and in your interaction with them.
Certain information (like an IP address or device capabilities) is used to ensure the technical compatibility of the content or advertising, and to facilitate the transmission of the content or ad to your device.
The choices you make regarding the purposes and entities listed in this notice are saved and made available to those entities in the form of digital signals (such as a string of characters). This is necessary in order to enable both this service and those entities to respect such choices.
Information about your activity on this service may be matched and combined with other information relating to you and originating from various sources (for instance your activity on a separate online service, your use of a loyalty card in-store, or your answers to a survey), in support of the purposes explained in this notice.
In support of the purposes explained in this notice, your device might be considered as likely linked to other devices that belong to you or your household (for instance because you are logged in to the same service on both your phone and your computer, or because you may use the same Internet connection on both devices).
Identify devices based on information transmitted automatically
Your device might be distinguished from other devices based on information it automatically sends when accessing the Internet (for instance, the IP address of your Internet connection or the type of browser you are using) in support of the purposes exposed in this notice.
Actively scan device characteristics for identification
With your acceptance, certain characteristics specific to your device might be requested and used to distinguish it from other devices (such as the installed fonts or plugins, the resolution of your screen) in support of the purposes explained in this notice.
The choices you make with this CMP regarding the purposes and entities will affect how personalized advertising is presented to you. We need to store these choices to respect them on future visits, and they are stored differently based on the type of site or app you're using:
For sites, your choices are saved in a cookie named βFCCDCFβ for a maximum duration of 390 days.
For apps, your choices are saved in device storage prefixed by βIABTCF_β. Your choices will be invalidated after 390 days and overwritten once you make new privacy choices on this app.
For accelerated mobile page (AMP) sites, your choices are saved in local storage prefixed by βamp-storeβ. Your choices will be invalidated after 390 days and overwritten once you make new privacy choices on this site.
Vendor preferences
Confirm our vendors
Vendors can use your data to provide services. Declining a vendor can stop them from using the data you shared.
TCF vendors
Exponential Interactive, Inc d/b/a VDX.tv
Cookie duration: 90 (days).
Data collected and processed: IP addresses, Device identifiers, Probabilistic identifiers, Browsing and interaction data, Non-precise location data, Usersβ profiles, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Probabilistic identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Probabilistic identifiers, Browsing and interaction data, Non-precise location data
Data collected and processed: IP addresses, Device characteristics, Probabilistic identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Authentication-derived identifiers, Browsing and interaction data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Authentication-derived identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, User-provided data, Non-precise location data, Precise location data
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Authentication-derived identifiers, Browsing and interaction data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, Usersβ profiles, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, User-provided data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, Usersβ profiles, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device characteristics, Device identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Data collected and processed: IP addresses, Device identifiers, Probabilistic identifiers, Browsing and interaction data, Non-precise location data, Privacy choices
Comments (0)
Be the first to comment
to start the conversation.