|
14 | 14 | - Test: `pnpm test` |
15 | 15 | - Typecheck: `pnpm typecheck` |
16 | 16 |
|
| 17 | +## Git workflow |
| 18 | + |
| 19 | +**IMPORTANT**: AI agents should NEVER commit or push changes without explicit user permission. |
| 20 | + |
| 21 | +- **DO NOT** run `git commit` or `git push` automatically |
| 22 | +- **DO NOT** create commits as part of completing a task |
| 23 | +- **ALWAYS** ask the user before committing or pushing |
| 24 | +- **ONLY** commit when the user explicitly requests it (e.g., "commit these changes", "push this to git") |
| 25 | +- After making changes, inform the user what was changed and let them decide when to commit |
| 26 | + |
| 27 | +The user maintains full control over git operations and commit history. |
| 28 | + |
17 | 29 | ## Testing expectations |
18 | 30 |
|
19 | 31 | - Add or update tests for behavior changes and bug fixes. |
|
49 | 61 | - Files use kebab-case (e.g. `parse-args.ts`). |
50 | 62 | - Types/interfaces use PascalCase; functions/variables use camelCase. |
51 | 63 | - Use `index.ts` barrels for public entrypoints. |
52 | | - |
53 | | -## Review guidelines |
54 | | - |
55 | | -When implementing PR feedback or making changes for review: |
56 | | - |
57 | | -- **Run all checks before pushing**: `pnpm build && pnpm test && pnpm typecheck && pnpm lint` |
58 | | -- **Test cross-platform compatibility**: Windows CI often catches issues Linux doesn't |
59 | | -- **Keep commits focused**: One logical change per commit with clear messages |
60 | | -- **Avoid premature extraction**: Only extract shared code when you have 2+ actual uses |
61 | | -- **Document edge cases**: Add comments explaining non-obvious behavior or workarounds |
62 | | -- **Test git operations carefully**: Use `DOCS_CACHE_GIT_COMMAND` env var to override git path in tests |
63 | | -- **Preserve existing test patterns**: Follow the style and structure of existing test files |
64 | | -- **Check for regex gotchas**: Use non-greedy `.*?` instead of greedy `.*` when appropriate |
65 | | -- **Validate input limits**: Add safety checks (like `MAX_BRACE_EXPANSIONS`) for user-controlled expansion |
66 | | -- **Update documentation**: Ensure README reflects new features and limitations |
0 commit comments