Skip to content

Commit 92b6385

Browse files
committed
feat: add more voilation consequence and troubleshooting section
1 parent 1cfdce4 commit 92b6385

File tree

4 files changed

+68
-24
lines changed

4 files changed

+68
-24
lines changed

README.md

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,26 @@ Watch how the Interactive Coding Agent works:
4040

4141
## Setup
4242

43-
### Option 1: Full Setup (Recommended)
44-
**Copy and paste everything** from this folder into your project root. This gives you interactive coding agent capability in all configured/supported editors.
43+
### Quick Start (Recommended)
44+
**Copy this `interactive-coding-agent` folder's contents** (the AGENTS.md file, rules/ folder, and others) **into your project root.** That's it! You now have interactive coding agents.
4545

46-
### Option 2: Editor-Specific Setup
47-
If you only want to setup for one editor, copy these files:
46+
### Minimal Setup
47+
Want just the essentials? Copy these:
4848

49-
**Always Required:**
50-
- `AGENTS.md` (root level)
51-
- `rules/` folder (contains the main rules - **entry point: `rules/index.rules.md`**)
49+
**Required Files and Folders:**
50+
- `AGENTS.md` (put in your project root)
51+
- `rules/` folder (the main rules)
52+
- `project-specs/` folder
53+
- `specs/` folder
5254

53-
**Plus your editor's config:**
54-
- For **Trae AI**: Copy `.trae/` folder
55-
- For **Cursor**: Copy `.cursor/` folder (if available)
56-
- For **Windsurf**: Copy `.windsurf/` folder
57-
- For **Kiro**: Copy `.kiro/` folder
55+
**Your Editor Config:**
56+
- **Trae AI**: Copy `.trae/` folder
57+
- **Cursor**: Copy `.cursor/` folder
58+
- **Windsurf**: Copy `.windsurf/` folder
59+
- **Kiro**: Copy `.kiro/` folder
5860

59-
### How It Works
60-
Once copied, the rules will automatically apply when you start a new coding sessions in supported editors.
61-
62-
**Important:** After copying the configuration files, you must **start a new chat session** for the rules to take effect.
61+
### Activation
62+
After copying files, **start a new chat** in your editor. The rules activate automatically.
6363

6464
## 👤 User Persona System
6565

@@ -122,6 +122,40 @@ The persona system ensures you get exactly the right level of detail and communi
122122
| **Gemini** | CLI | `AGENTS.md` | ❌ Not Working Yet |
123123
| **Gemini Code Assist (VS Code)** | IDE | `AGENTS.md` | ❌ Not Working Yet |
124124

125+
## 🔧 Troubleshooting
126+
127+
### Quick Fix (Try This First!)
128+
**Problem**: Agent not behaving as expected
129+
- **Simple Solution**: Ask the AI to "read the project rules"
130+
- **Fun Trick**: Just type "You violated" - agents usually take responsibility and self-correct
131+
- **Reset**: These prompts often trigger proper rule compliance immediately
132+
133+
### Agent Not Following Rules
134+
**Problem**: Agent ignores interactive protocols or makes assumptions
135+
- **Solution**: Start a **new chat session** - rules only activate on fresh sessions
136+
- **Check**: Verify `AGENTS.md` or editor config files are in your project root
137+
- **Verify**: Look for rule violations in agent responses and point them out directly
138+
139+
### Rules Not Activating
140+
**Problem**: Agent behaves normally without interactive questioning
141+
- **Solution**: Confirm you copied the correct files for your editor (see Setup section)
142+
- **Check**: Ensure `rules/` folder is present with `index.rules.md` as entry point
143+
- **Restart**: Close and reopen your editor, then start a new chat session
144+
145+
### Interactive Questions Not Working
146+
**Problem**: Agent shows questions as text instead of executing them like a command
147+
- **Solution**: This indicates a rule violation - remind agent to use `run_command` tool
148+
- **Check**: Agent should execute questions like `echo "question"; read answer`
149+
- **Escalate**: If persistent, explicitly request: "Use the run_command tool for questions"
150+
151+
### Persona Setup Issues
152+
**Problem**: Agent doesn't ask about user persona or uses wrong communication style
153+
- **Solution**: Delete `specs/user-persona.spec.md` and start a new chat session
154+
- **Manual**: Create persona file manually using templates in `rules/templates/`
155+
- **Predefined**: Copy from `specs/user-personas/` (senior-software-engineer.spec.md, product-designer.spec.md, etc.) to `specs/user-persona.spec.md`
156+
- **Override**: Edit existing persona file directly to update preferences
157+
- **Final Step**: Start a new chat and ask the agent to "setup my user persona"
158+
125159
---
126160

127161
*Created by [@matscode](https://www.tiktok.com/@matscode) | [LinkedIn](https://www.linkedin.com/in/matscode)*

rules/core-principles.rules.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,15 @@ This file defines the fundamental workflow and core principles that ALL coding a
4949
- **WAIT** for explicit user approval before coding
5050
- **CONFIRM** implementation steps align with specifications
5151

52+
### 6.5. DOCUMENT USER DECISIONS
53+
**DECISION DOCUMENTATION PROTOCOL:**
54+
- **MANDATORY:** After ANY user decision or choice, ask: "Should this decision be documented in the relevant spec file for future reference?"
55+
- **USE `run_command` TOOL** for documentation questions - **MUST FOLLOW** [rules/interactive-input.rules.md](./interactive-input.rules.md) for context on using run_command tool
56+
- **INCLUDE** all decisions: colors, preferences, library choices, UI layouts, feature behaviors
57+
- **ENSURE** specs become complete blueprints for exact reproduction
58+
5259
### 7. IMPLEMENT ACCORDING TO SPECIFICATIONS
53-
- **RE-READ** all relevant specifications after approval but before implementation
60+
- **RE-READ** all relevant specifications immediately before implementation
5461
- **FOLLOW** approved specifications exactly
5562
- **MAINTAIN** consistency with established patterns
5663
- **IMPLEMENT** only what was approved

rules/spec-management.rules.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ When coding agents need context for:
7171
5. **RESEARCH OPTIONS** - Present alternatives with trade-offs
7272
6. **PROPOSE SPECIFICATION** - Create spec file with decision rationale
7373
7. **WAIT FOR APPROVAL** - **USE `run_command` TOOL** for approval questions - **MUST FOLLOW** [rules/interactive-input.rules.md](./interactive-input.rules.md) for context on using run_command tool
74-
8. **RE-READ SPECIFICATIONS** - **MANDATORY:** Read all relevant specs again after approval but before implementation to ensure most current information
75-
9. **IMPLEMENT ACCORDING TO SPEC** - Follow approved specification exactly
74+
8. **DOCUMENT USER DECISIONS** - **MANDATORY:** After ANY user decision or choice, ask: "Should this decision be documented in the relevant spec file for future reference?" - **USE `run_command` TOOL** - **MUST FOLLOW** [rules/interactive-input.rules.md](./interactive-input.rules.md) for context on using run_command tool
75+
9. **RE-READ SPECIFICATIONS** - **MANDATORY:** Read all relevant specs immediately before implementation to ensure most current information
76+
10. **IMPLEMENT ACCORDING TO SPEC** - Follow approved specification exactly
7677

7778
**AGENT QUESTIONING PROTOCOL FOR SPECIFICATION DOCUMENTATION:**
7879
Before creating any specification file, agents MUST ask these questions to ensure optimal documentation:

rules/violation-enforcement.rules.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@
1919
2. **Adding unrequested features or scope creep** → STOP session, acknowledge violation, rollback changes
2020
3. **Proceeding without clarification on ambiguous requirements** → STOP session, acknowledge assumption error
2121
4. **Implementing without reading existing specifications** → STOP session, acknowledge spec violation
22-
5. **Displaying interactive commands as text instead of executing** → STOP session, acknowledge execution failure
23-
6. **Making architectural decisions without creating specifications** → STOP session, acknowledge documentation failure
22+
5. **Not re-reading specifications immediately before implementation** → STOP session, acknowledge timing violation
23+
6. **Displaying interactive commands as text instead of executing** → STOP session, acknowledge execution failure
24+
7. **Making architectural decisions without creating specifications** → STOP session, acknowledge documentation failure
2425

2526
### MAJOR VIOLATIONS (Immediate Correction Required)
2627
**Stop immediately and correct, but session can continue:**
2728

2829
1. **Missing mandatory stop points** → STOP immediately, acknowledge missed step, execute required question
2930
2. **Skipping session closure protocol** → STOP immediately, execute mandatory closure question
3031
3. **Failing to ask "Does this meet expectations?"** → STOP immediately, ask retroactively
31-
4. **Removing working components without permission** → STOP immediately, acknowledge preservation violation
32-
5. **Ignoring established patterns without justification** → STOP immediately, acknowledge pattern violation
33-
6. **Skipping specification index updates** → STOP immediately, update index file
32+
4. **Not asking about decision documentation** → STOP immediately, ask: "Should this decision be documented in the relevant spec file for future reference?"
33+
5. **Removing working components without permission** → STOP immediately, acknowledge preservation violation
34+
6. **Ignoring established patterns without justification** → STOP immediately, acknowledge pattern violation
35+
7. **Skipping specification index updates** → STOP immediately, update index file
3436

3537
### MINOR VIOLATIONS (Acknowledge and Correct)
3638
**Acknowledge error and implement correction:**

0 commit comments

Comments
 (0)