Skip to content

Commit 4a2d34c

Browse files
committed
docs(ai): replace version control directives with reference to VERSION_CONTROL.md
1 parent 7e6363f commit 4a2d34c

2 files changed

Lines changed: 102 additions & 12 deletions

File tree

.ai/agents/VERSION_CONTROL.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Version Control with Jujutsu
2+
3+
Guidelines for using Jujutsu (jj) for version control operations in this dotfiles project.
4+
5+
## Core Principles
6+
7+
- Use `jj` for version control operations. Background LLM Agent must not use `git`.
8+
- **Pre-Commit Validation**: Run `make validate` and ensure it passes before any commit
9+
- **User Confirmation**: Always obtain explicit user confirmation before executing any commit commands to VCS (use only `jj`).
10+
- Follow conventional commit message format
11+
- Use atomic commits with `jj commit`
12+
- Sign commits when possible (using GPG or SSH signing)
13+
14+
## Version Control Basics
15+
16+
- **ALWAYS use `jj` (Jujutsu) for version control - NEVER use `git` commands**
17+
- Make atomic commits with `jj commit`
18+
- Follow [Conventional Commits](https://www.conventionalcommits.org/) format:
19+
- `feat:` for new features
20+
- `fix:` for bug fixes
21+
- `refactor:` for code refactoring
22+
- `test:` for adding or updating tests
23+
- `docs:` for documentation changes
24+
- `chore:` for maintenance tasks
25+
26+
## Committing Changes
27+
28+
**Minimize command overhead when committing:**
29+
30+
**ONLY use these two commands when committing:**
31+
1. **Review changes**: Run `jj show` to see current changes
32+
2. **Commit atomically**: Run `jj commit -m "message"` to commit
33+
34+
**Do NOT run:**
35+
- `jj status` (not needed before committing)
36+
- `jj diff` (use `jj show` instead)
37+
- `jj log` (not needed after committing)
38+
- Any other verification commands unless `jj commit` returns an error
39+
40+
**Example workflow:**
41+
```bash
42+
# Review what changed
43+
jj show
44+
45+
# Commit with descriptive message
46+
jj commit -m "fix: initialize database on launch to handle empty state"
47+
48+
# That's it! No need for jj status, jj diff, jj log, or other verification commands
49+
```
50+
51+
**Important:**
52+
- `jj commit` is atomic and will report errors if it fails
53+
- Trust the command - if it succeeds, the commit is complete
54+
- Only investigate further if you see an error message
55+
- `jj status` and `jj diff` are fine for exploration/debugging, but not needed as part of the commit workflow
56+
57+
## Jujutsu Workflow Integration
58+
59+
### Commit Message Format
60+
```
61+
<type>(<scope>): <description>
62+
63+
[optional body]
64+
65+
[optional footer]
66+
```
67+
68+
#### Types
69+
- `feat`: new feature
70+
- `fix`: bug fix
71+
- `docs`: documentation changes
72+
- `style`: formatting changes
73+
- `refactor`: code refactoring
74+
- `test`: adding tests
75+
- `chore`: maintenance tasks
76+
- `ci`: automation tasks
77+
- `ai`: modifications to llm configuration
78+
79+
#### Examples
80+
```
81+
feat(bash): add rust development tools installer
82+
83+
Implement comprehensive installer for modern Rust-based CLI tools including
84+
error handling, progress feedback, and dependency checking.
85+
86+
feat(jj): enhance log aliases with better filtering
87+
88+
- Add mine() revset for personal commits
89+
- Improve default() revset with recent() filter
90+
- Add statistical output to log commands
91+
92+
fix(setup): resolve symlink creation on existing files
93+
94+
Handle case where target symlinks already exist by checking and removing
95+
stale links before creating new ones.
96+
97+
docs: update installation instructions
98+
99+
Add troubleshooting section and prerequisites clarification.
100+
```

AGENTS.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,9 @@ Follow best practices that a principal level programmer would use when implement
1111
- **Scripts**: Implement scripts in separate files (bash, python, etc.) rather than embedding them as inline strings in YAML/TOML/JSON.
1212
- **Dependencies**: Use current versions of dependencies, including GitHub Actions. Update dependencies to latest versions when adding or modifying code.
1313

14-
## Source Control (`jj`)
14+
## Version Control
1515

16-
- Use `jj` exclusively for version control.
17-
- **Initialization**: If the current repo is a git repo but not a jj project, initialize it with `jj git init` before any version control operations. This ensures no git commands will ever be run.
18-
- **Confirmation**: Show changed files and stats (e.g. `jj diff --stat`) and ALWAYS ask the user for confirmation before creating a commit.
19-
- **Commit**: `jj commit -m "type(scope): description"` (Atomic: describes current change and creates new one)
20-
- **Sync**: NEVER sync with remote repository. Allow the user to sync manually outside of the agent.
21-
22-
## Commits
23-
24-
- **Style**: Conventional Commits.
25-
- **Types**: `feat`, `fix`, `docs`, `chore`, `refactor`.
26-
- **Format**: `type(scope): concise imperative description`.
16+
See [`.ai/agents/VERSION_CONTROL.md`](.ai/agents/VERSION_CONTROL.md) for comprehensive version control guidelines using Jujutsu (jj).
2717

2818
## Documentation
2919

0 commit comments

Comments
 (0)