Skip to content

Commit 9de2ae0

Browse files
committed
fix: Added Rules Compliance Audit to Verify Command
1 parent d06163e commit 9de2ae0

File tree

2 files changed

+78
-13
lines changed

2 files changed

+78
-13
lines changed

.claude/commands/verify.md

Lines changed: 67 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ model: opus
1010
1111
## The Process
1212

13-
Tests → Program execution → Call chain analysis → Coverage → Quality checks → Code review → E2E → Final verification
13+
Tests → Program execution → **Rules compliance audit**Call chain analysis → Coverage → Quality checks → Code review → E2E → Final verification
1414

1515
Active verification with comprehensive code review that immediately fixes issues as discovered, ensuring all tests pass, code quality is high, and system works end-to-end.
1616

@@ -86,7 +86,64 @@ This is a serious issue - the implementation is incomplete.
8686

8787
4. **STOP** - Do not continue verification
8888

89-
### Step 4: Call Chain Analysis
89+
### Step 4: Rules Compliance Audit
90+
91+
**MANDATORY: Verify work complies with ALL project rules before proceeding.**
92+
93+
#### Process
94+
95+
1. **Discover all rules:**
96+
```
97+
Glob(".claude/rules/standard/*.md") → Read each file
98+
Glob(".claude/rules/custom/*.md") → Read each file
99+
```
100+
101+
2. **For each rule file:**
102+
- Read the entire file
103+
- Extract the key requirements and constraints
104+
- Check if each requirement was followed during implementation
105+
- Note any violations
106+
107+
3. **Classify violations:**
108+
- **Fixable Now:** Can be remediated immediately (run missing commands, apply fixes)
109+
- **Structural:** Cannot be fixed retroactively (missed TDD cycle, architectural issues)
110+
111+
4. **Remediate:** Execute fixes for all fixable violations before continuing
112+
113+
#### Output Format
114+
115+
```
116+
## Rules Compliance Audit
117+
118+
### Rules Checked
119+
- `.claude/rules/standard/[filename].md` - [Brief description]
120+
- `.claude/rules/custom/[filename].md` - [Brief description]
121+
- ...
122+
123+
### ✅ Compliant
124+
- [Rule file]: [Requirements that were followed]
125+
126+
### ⚠️ Violations Found (Fixable)
127+
- [Rule file]: [Violation] → [Fix action to execute now]
128+
129+
### ❌ Violations Found (Structural)
130+
- [Rule file]: [Violation] → [What should have been done differently]
131+
132+
### Remediation
133+
[Execute each fix action listed above]
134+
[Show output/evidence of fixes applied]
135+
```
136+
137+
#### Completion Gate
138+
139+
**DO NOT proceed to Step 5 until:**
140+
- All rule files have been read and checked
141+
- All fixable violations have been remediated
142+
- Structural violations have been documented
143+
144+
**If serious structural violations exist:** Consider whether to continue or restart implementation.
145+
146+
### Step 5: Call Chain Analysis
90147

91148
**Perform deep impact analysis for all changes:**
92149

@@ -106,17 +163,17 @@ This is a serious issue - the implementation is incomplete.
106163
- External system impacts
107164
- Global state modifications
108165

109-
### Step 5: Check Coverage
166+
### Step 6: Check Coverage
110167

111168
Verify test coverage meets requirements.
112169

113170
**If insufficient:** Identify uncovered lines → Write tests for critical paths → Verify improvement
114171

115-
### Step 6: Run Quality Checks
172+
### Step 7: Run Quality Checks
116173

117174
Run automated quality tools and fix any issues found.
118175

119-
### Step 7: Code Review Simulation
176+
### Step 8: Code Review Simulation
120177

121178
**Perform self-review using code review checklist:**
122179

@@ -130,7 +187,7 @@ Run automated quality tools and fix any issues found.
130187

131188
**If issues found:** Document and fix immediately
132189

133-
### Step 8: E2E Verification (if applicable)
190+
### Step 9: E2E Verification (if applicable)
134191

135192
Run end-to-end tests as appropriate for the application type.
136193

@@ -159,7 +216,7 @@ curl -X DELETE http://localhost:8000/api/resource/1
159216

160217
**If failures:** Analyze failure → Check API endpoint → Fix implementation → Re-run → Continue until all pass
161218

162-
### Step 9: Final Verification
219+
### Step 10: Final Verification
163220

164221
**Run everything one more time:**
165222
- All tests
@@ -176,11 +233,11 @@ curl -X DELETE http://localhost:8000/api/resource/1
176233
- Code review checklist complete
177234
- No breaking changes in call chains
178235

179-
### Step 10: Update Plan Status
236+
### Step 11: Update Plan Status
180237

181238
**Status Lifecycle:** `PENDING``COMPLETE``VERIFIED`
182239

183-
**When ALL verification passes (no missing features, no bugs):**
240+
**When ALL verification passes (no missing features, no bugs, rules compliant):**
184241

185242
1. **MANDATORY: Update plan status to VERIFIED**
186243
```
@@ -189,7 +246,7 @@ curl -X DELETE http://localhost:8000/api/resource/1
189246
```
190247
2. Inform user: "✅ Verification complete. Plan status updated to VERIFIED."
191248

192-
**When verification FAILS (missing features or serious bugs):**
249+
**When verification FAILS (missing features, serious bugs, or unfixed rule violations):**
193250

194251
1. Add new tasks to the plan for missing features/bugs
195252
2. **Set status back to PENDING:**

.mcp.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,23 @@
22
"mcpServers": {
33
"claude-context": {
44
"command": "npx",
5-
"args": ["-y", "@zilliz/claude-context-mcp@latest"]
5+
"args": [
6+
"-y",
7+
"@zilliz/claude-context-mcp@latest"
8+
]
69
},
710
"tavily": {
811
"command": "npx",
9-
"args": ["-y", "tavily-mcp@latest"]
12+
"args": [
13+
"-y",
14+
"tavily-mcp@latest"
15+
]
1016
},
1117
"Ref": {
1218
"command": "npx",
13-
"args": ["ref-tools-mcp@latest"]
19+
"args": [
20+
"ref-tools-mcp@latest"
21+
]
1422
}
1523
}
1624
}

0 commit comments

Comments
 (0)