You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(docs): resolve consistency issues across all 6 rule documents
- Add missing `sleep 3 &&` to project-template.md Agent Automation commands
- Add Terminal Delay guidance line to analyze-project.ts generated output
- Rename make_plan.md "Integration with Other Rules" to "Cross-References"
- Add `sleep 3 &&` prefix to all command examples in testing.md, git-commands.md
- Add Quick Reference Card and .gitignore guidance to agents.md
- Remove ghost plans.md references from README, analyze-project, get-setup-guide
- Add exec/execution aliases for make_plan in types/index.ts
- Update test fixtures to match new generated output format
- All 106 tests passing
Copy file name to clipboardExpand all lines: README.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ MCP (Model Context Protocol) server providing AI coding agents with universal, l
4
4
5
5
## What It Does
6
6
7
-
**codeops-mcp** bundles 7 curated rule documents that teach AI agents how to code, test, plan, commit, and behave — across any programming language and project type. It exposes these rules via 5 MCP tools.
7
+
**codeops-mcp** bundles 6 curated rule documents that teach AI agents how to code, test, plan, commit, and behave — across any programming language and project type. It exposes these rules via 5 MCP tools.
8
8
9
9
### Rule Documents
10
10
@@ -14,7 +14,6 @@ MCP (Model Context Protocol) server providing AI coding agents with universal, l
14
14
|**testing**| Test commands, workflows, coverage requirements, debugging strategies |
15
15
|**git-commands**| Git commit protocols (`gitcm`/`gitcmp`), message format, push workflow |
16
16
|**make_plan**| Complete protocol for creating and executing multi-document implementation plans |
Temporary scripts should NOT be committed to version control. If a temporary script proves useful, rename it to use a permanent prefix (`debug-`, `test-`, `verify-`, `run-`).
394
408
409
+
#### Git Tracking Recommendations for Generated Directories
410
+
411
+
| Directory | Recommendation | Rationale |
412
+
|-----------|---------------|-----------|
413
+
|`plans/`| ✅ **Commit** — these are project documentation | Plans are valuable context for future sessions and team members |
414
+
|`scripts/tmp-*`| ❌ **Do NOT commit** — clean up after use | Temporary exploration scripts have no lasting value |
415
+
|`scripts/debug-*`, `scripts/run-*`, etc. | ✅ **Commit if reusable**| Permanent utility scripts are project infrastructure |
416
+
417
+
Consider adding to your project's `.gitignore`:
418
+
```
419
+
scripts/tmp-*
420
+
```
421
+
395
422
---
396
423
397
424
### **Rule 9: Compact Conversation After Task Completion**
@@ -412,40 +439,45 @@ Temporary scripts should NOT be committed to version control. If a temporary scr
412
439
413
440
---
414
441
415
-
### **Rule 11: Mandatory `gitcm`/`gitcmp` for All Git Operations — File-Based Commits ONLY**
442
+
### **Rule 10: VS Code Settings Automation (Optional)**
416
443
417
-
**🚨 NEVER execute raw git staging, committing, or pushing commands. ALWAYS use `gitcm` or `gitcmp`.**
444
+
If the project uses `scripts/agent.sh` for VS Code settings automation:
418
445
419
-
The `gitcm` and `gitcmp` protocols (defined in `git-commands.md`) are the **ONLY** permitted methods for git staging, committing, and pushing. Running loose git commands bypasses the required commit message format, verification steps, and workflow safeguards.
446
+
**Act Mode Requirements:**
420
447
421
-
**🚨 CRITICAL: The `-m` flag is BANNED.** Commit messages MUST be written to `/tmp/git_commit_msg.txt` using `write_to_file` and committed with `git commit -F /tmp/git_commit_msg.txt`. This is because inline `-m` messages fail due to shell escaping, length limits, and multi-line formatting issues. See `git-commands.md` for the full explanation.
448
+
1.**✅ Execute `clear && sleep 3 && scripts/agent.sh start` as THE FIRST COMMAND of any Act Mode task**
449
+
- Switches VS Code to development mode
422
450
423
-
#### PROHIBITED (NEVER DO):
451
+
2.**✅ Execute `clear && sleep 3 && scripts/agent.sh finished` as THE LAST COMMAND of any Act Mode task**
452
+
- Switches VS Code to completion mode (full linting, formatting, cleanup)
-**To stage and commit:** Use the `gitcm` protocol (see `git-commands.md`)
438
-
-**To stage, commit, and push:** Use the `gitcmp` protocol (see `git-commands.md`)
439
-
-**ALWAYS** write the commit message to `/tmp/git_commit_msg.txt` using `write_to_file` first
440
-
-**ALWAYS** commit using `git commit -F /tmp/git_commit_msg.txt`
441
-
-**ALWAYS** clean up with `rm /tmp/git_commit_msg.txt` after committing
468
+
-❌ Do not use in Plan Mode
469
+
-❌ Do not use if `scripts/agent.sh` does not exist in the project
470
+
-❌ Do not use if already in the middle of a task (only at start/end boundaries)
471
+
472
+
---
442
473
443
-
**There are NO exceptions.** Even for "quick" or "small" commits, the agent MUST use `gitcm` or `gitcmp` with the file-based approach. These protocols ensure:
444
-
- Proper commit message format with scope and prefix
445
-
- Commit message written via temp file (no shell escaping issues)
446
-
- Multi-line messages with special characters work reliably
447
-
- Verification steps are followed
448
-
- Consistent workflow across all sessions
474
+
### **Rule 11: Mandatory `gitcm`/`gitcmp` for All Git Operations — File-Based Commits ONLY**
475
+
476
+
**🚨 NEVER execute raw git staging, committing, or pushing commands. ALWAYS use `gitcm` or `gitcmp`.**
477
+
478
+
All git operations MUST use the `gitcm`/`gitcmp` protocol defined in `git-commands.md`. **The `-m` flag is BANNED** — commit messages MUST be written to `/tmp/git_commit_msg.txt` via `write_to_file`, then committed with `git commit -F`. There are **NO exceptions**, even for "quick" or "small" commits.
479
+
480
+
> **📖 See `git-commands.md` for the full protocol**, including step-by-step instructions, commit message format, scope conventions, prohibited commands, and the rationale for file-based commits.
449
481
450
482
---
451
483
@@ -526,38 +558,6 @@ Examples:
526
558
527
559
---
528
560
529
-
### **Rule 10: VS Code Settings Automation (Optional)**
530
-
531
-
If the project uses `scripts/agent.sh` for VS Code settings automation:
532
-
533
-
**Act Mode Requirements:**
534
-
535
-
1.**✅ Execute `clear && sleep 3 && scripts/agent.sh start` as THE FIRST COMMAND of any Act Mode task**
536
-
- Switches VS Code to development mode
537
-
538
-
2.**✅ Execute `clear && sleep 3 && scripts/agent.sh finished` as THE LAST COMMAND of any Act Mode task**
539
-
- Switches VS Code to completion mode (full linting, formatting, cleanup)
540
-
541
-
**Workflow Pattern:**
542
-
543
-
```bash
544
-
# FIRST COMMAND - Start of any Act Mode task
545
-
clear && sleep 3 && scripts/agent.sh start
546
-
547
-
# ... perform all task implementation work ...
548
-
549
-
# LAST COMMAND - End of any Act Mode task
550
-
clear && sleep 3 && scripts/agent.sh finished
551
-
```
552
-
553
-
**When NOT to Apply:**
554
-
555
-
- ❌ Do not use in Plan Mode
556
-
- ❌ Do not use if `scripts/agent.sh` does not exist in the project
557
-
- ❌ Do not use if already in the middle of a task (only at start/end boundaries)
Copy file name to clipboardExpand all lines: docs/code.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,7 @@ These rules are **mandatory** and must be applied **strictly and consistently**
114
114
- Methods and properties must be either:
115
115
-`public`, or
116
116
-`protected` (used instead of `private`)
117
+
-**Override:** If `private` is idiomatic for your language/framework (e.g., Java, C#, Kotlin), this convention can be overridden in `.clinerules/project.md` under "Special Rules".
117
118
118
119
13.**Encapsulation Through Convention**
119
120
-`protected` members are considered internal and must not be accessed outside subclasses.
@@ -391,4 +392,4 @@ These rules are **mandatory** and must be applied **strictly and consistently**
391
392
- See **agents.md** for verification procedures and task completion criteria
392
393
- See **testing.md** for test commands and AI testing workflow
393
394
- See **git-commands.md** for git workflow instructions
394
-
- See **agents.md Rule 8** for debugging rules (NO inline debug scripts — ALWAYS create script files)
395
+
- See **agents.md** — Script-First Execution rule for debugging rules (NO inline debug scripts — ALWAYS create script files)
Copy file name to clipboardExpand all lines: docs/git-commands.md
+48-7Lines changed: 48 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,19 +162,60 @@ git push
162
162
163
163
---
164
164
165
+
## **Conflict Resolution Protocol**
166
+
167
+
When `git pull --rebase` encounters conflicts during `gitcmp`:
168
+
169
+
1.**🛑 STOP** — Do not attempt automatic conflict resolution
170
+
2.**📋 Report** — List the conflicting files and the nature of the conflict
171
+
3.**❓ Ask the user** — Present the situation and ask how to proceed:
172
+
-**Option 1:** "Abort rebase and keep local commit" (`git rebase --abort`)
173
+
-**Option 2:** "I'll resolve manually — show me the conflicts"
174
+
-**Option 3:** "Abort and discard my commit" (rarely wanted)
175
+
4.**⏳ Wait** — Do not proceed until the user responds
176
+
5.**✅ After resolution** — Run the project's verify command before pushing
177
+
178
+
**The agent MUST NOT:**
179
+
- ❌ Automatically resolve merge conflicts
180
+
- ❌ Accept "theirs" or "ours" without user approval
181
+
- ❌ Force-push to bypass conflicts
182
+
- ❌ Delete or reset commits without explicit user instruction
183
+
184
+
---
185
+
186
+
## **Push Failure Recovery**
187
+
188
+
If `git push` fails after a successful commit:
189
+
190
+
| Failure | Cause | Recovery |
191
+
|---------|-------|----------|
192
+
| Authentication error | SSH key or token issue | Report to user — cannot fix programmatically |
193
+
| Remote rejection | Branch protection rules | Report to user — may need PR workflow |
194
+
| Non-fast-forward | Remote has new commits | Run `git pull --rebase`, resolve conflicts if any, then retry push |
195
+
| Network error | Connectivity issue | Wait briefly, retry once. If still failing, report to user |
196
+
197
+
**In all cases:**
198
+
- ✅ The local commit is safe — no work is lost
199
+
- ✅ Report the error clearly to the user
200
+
- ✅ Suggest the most likely fix
201
+
- ❌ Do NOT retry more than once without user approval
202
+
- ❌ Do NOT force-push (`git push --force`) unless explicitly instructed
203
+
204
+
---
205
+
165
206
## **Important Notes**
166
207
167
208
1.**Always perform `gitcmp` or `gitcm` in a new Cline task with context** when possible — this creates a clean task boundary for git operations while maintaining previous context.
168
209
169
210
2.**Always run the project's verify command before committing:**
170
211
```bash
171
-
# Use the verify command from .clinerules/project.md
0 commit comments