-
Notifications
You must be signed in to change notification settings - Fork 34
feat: add ai-slop-remover agent for code quality #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Warning Rate limit exceeded@jellydn has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 5 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughAdds a new documentation file describing a structured workflow to detect and remove AI-generated code from diffs. The guide includes categorization of "slop" patterns, before/after code examples, and step-by-step validation procedures using npm and linting tools. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 17
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
examples/ai-slop-remover.claude.md(1 hunks)examples/spec-driven/README.md(1 hunks)examples/spec-driven/clarify.claude.md(1 hunks)examples/spec-driven/constitution.claude.md(1 hunks)examples/spec-driven/implement.claude.md(1 hunks)examples/spec-driven/plan.claude.md(1 hunks)examples/spec-driven/review.claude.md(1 hunks)examples/spec-driven/specify.claude.md(1 hunks)examples/spec-driven/tasks.claude.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.md: Parse YAML frontmatter in markdown files for agent configuration
Use_prefix for template variables (e.g.,_varname) in frontmatter and body templates
System keys in agent frontmatter (_varname,_stdin,env,$1,$2, etc.) are consumed by md and not passed to the command
All non-system frontmatter keys are passed directly as CLI flags to the specified command
Use LiquidJS template syntax for variable substitution in markdown bodies (variables, conditionals, filters)
Use positional mapping ($1,$2) in frontmatter to map body or positional args to specific CLI flags
Implement imports in markdown files using syntax: basic (@./path.md), globs (@./src/**/*.ts), line ranges (@./file.ts:10-50), symbols (@./file.ts#InterfaceName), commands (!`cmd`), and URLs (@https://example.com/file.md)
Files:
examples/spec-driven/constitution.claude.mdexamples/spec-driven/review.claude.mdexamples/spec-driven/specify.claude.mdexamples/spec-driven/tasks.claude.mdexamples/spec-driven/implement.claude.mdexamples/spec-driven/plan.claude.mdexamples/spec-driven/README.mdexamples/ai-slop-remover.claude.mdexamples/spec-driven/clarify.claude.md
🧠 Learnings (2)
📚 Learning: 2025-12-10T00:48:48.898Z
Learnt from: CR
Repo: johnlindquist/mdflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T00:48:48.898Z
Learning: Applies to **/*.i.*.md : Use `.i.` filename marker (e.g., `task.i.claude.md`) to enable interactive mode
Applied to files:
examples/spec-driven/tasks.claude.mdexamples/spec-driven/implement.claude.md
📚 Learning: 2025-12-10T00:48:48.898Z
Learnt from: CR
Repo: johnlindquist/mdflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T00:48:48.898Z
Learning: Applies to **/*.md : Parse YAML frontmatter in markdown files for agent configuration
Applied to files:
examples/spec-driven/README.md
🪛 LanguageTool
examples/spec-driven/specify.claude.md
[style] ~47-~47: Consider a different adjective to strengthen your wording.
Context: ...ion Questions (if needed) Run this for deeper analysis: ``` md clarify.claude.md --_p...
(DEEP_PROFOUND)
examples/ai-slop-remover.claude.md
[grammar] ~22-~22: Ensure spelling is correct
Context: ...f: !git diff {{ _base }}...HEAD ``` ## Slop Detection Look for and remove: ### 1....
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.18.1)
examples/spec-driven/constitution.claude.md
12-12: Spaces inside emphasis markers
(MD037, no-space-in-emphasis)
39-39: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
examples/spec-driven/specify.claude.md
18-18: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
48-48: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
examples/spec-driven/tasks.claude.md
14-14: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
examples/spec-driven/implement.claude.md
8-8: Spaces inside emphasis markers
(MD037, no-space-in-emphasis)
17-17: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
61-61: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
examples/spec-driven/plan.claude.md
15-15: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
34-34: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
43-43: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
67-67: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
74-74: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (6)
examples/spec-driven/review.claude.md (1)
1-92: Well-structured spec review template.The template comprehensively addresses quality gates, issue categorization, and sign-off criteria. File references and integration with the workflow are correct.
examples/ai-slop-remover.claude.md (1)
14-20: Specify language for git command blocks.Add bash language identifier to code blocks containing git commands.
+```bash
Files changed:
!git diff {{ _base }}...HEAD --statActual diff:
!git diff {{ _base }}...HEAD
-+bash<details> <summary>⛔ Skipped due to learnings</summary>Learnt from: CR
Repo: johnlindquist/mdflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T00:48:48.898Z
Learning: Applies to **/.i..md : Use.i.filename marker (e.g.,task.i.claude.md) to enable interactive mode</details> </blockquote></details> <details> <summary>examples/spec-driven/clarify.claude.md (4)</summary><blockquote> `1-5`: **YAML frontmatter is well-structured and follows mdflow conventions.** The frontmatter correctly uses system variables with `_` prefix and proper LiquidJS template syntax for defaults. --- `7-16`: **Template integration with specification is clear.** The file correctly imports and references the specification using mdflow import syntax (`@./specify.claude.md`). The dual reference (lines 11 and 16) is intentional—once for documentation and once for analysis context. --- `18-46`: **Clarifying Questions section provides a well-organized framework.** The five categories (User Impact, Scope & Constraints, Success Criteria, Dependencies & Integration, Timeline & Resources) form a comprehensive structure for facilitating specification refinement. The questions are concrete and actionable. --- `47-59`: **Output section and next steps correctly guide the workflow chain.** The file properly specifies what the clarification output should contain and uses correct template variable substitution (`{{ _project }}`) in the bash command for downstream execution with `md plan.claude.md`. Verify that the referenced downstream file (`examples/spec-driven/plan.claude.md`) exists and accepts the `--_project` parameter with this template. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
| ```typescript | ||
| // Check if user is valid | ||
| if (!user) { | ||
| return null; | ||
| } | ||
|
|
||
| // Loop through items | ||
| items.forEach(item => { | ||
| // Process the item | ||
| process(item); | ||
| }); | ||
| ``` | ||
|
|
||
| Better: | ||
| ```typescript | ||
| if (!user) return null; | ||
|
|
||
| items.forEach(item => process(item)); | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language for TypeScript examples.
All TypeScript code examples should have language identifiers.
Example to remove:
-```typescript
+```typescript
// Check if user is valid
if (!user) {
return null;
}
// Loop through items
items.forEach(item => {
// Process the item
process(item);
});
-```
+```typescript
Better:
-```typescript
+```typescript
if (!user) return null;
items.forEach(item => process(item));
-```
+```typescript🤖 Prompt for AI Agents
examples/ai-slop-remover.claude.md lines 34-52: the TypeScript code fences are
inconsistent and missing proper language identifiers and closing fences; update
every code block to begin with "```typescript" and end with "```" (remove the
stray standalone "typescript" words and any duplicated or mismatched fence
markers) so both the original and "Better" examples are correctly fenced as
TypeScript.
| ```typescript | ||
| const data = response.data as any; // Instead of properly typing | ||
| if ((error as any).statusCode === 404) {} // Instead of type guard | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language for type cast examples.
Add typescript identifier to the code block.
Example to remove:
-```typescript
+```typescript
const data = response.data as any; // Instead of properly typing
if ((error as any).statusCode === 404) {} // Instead of type guard
-```
+```typescript🤖 Prompt for AI Agents
In examples/ai-slop-remover.claude.md around lines 81 to 84, the fenced code
block showing type-cast examples lacks the TypeScript language identifier;
update the opening and closing fences so the block is fenced as ```typescript
(and keep the closing ```), ensuring the code block is labeled for syntax
highlighting and matches the intent of the examples.
| ```typescript | ||
| // If file never logs debug info: | ||
| console.debug("Processing item", item); | ||
|
|
||
| // If file uses throw, not console.error: | ||
| console.error("Failed"); | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language for inconsistent style examples.
Add typescript identifier to the code block.
Example to remove:
-```typescript
+```typescript
// If file never logs debug info:
console.debug("Processing item", item);
// If file uses throw, not console.error:
console.error("Failed");
-```
+```typescript🤖 Prompt for AI Agents
In examples/ai-slop-remover.claude.md around lines 94 to 100 the fenced code
block is missing a language identifier: update the opening and closing fences to
include the TypeScript language tag so the block reads as a TypeScript code
block (i.e., change the triple backtick fences to specify "typescript" on the
opening fence and ensure the block is closed correctly).
| ``` | ||
| Lint: `!npm run lint` | ||
| Test: `!npm test` | ||
| Build: `!npm run build` | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language for code block.
The bash code block should have a language identifier for syntax highlighting.
-```
+```bash
Lint: `!npm run lint`
Test: `!npm test`
Build: `!npm run build`
-```
+```bash🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
39-39: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In examples/spec-driven/constitution.claude.md around lines 39 to 43, the fenced
code block lacks a language identifier; update the opening fence from ``` to
```bash so the block is labeled as bash for syntax highlighting, leaving the
closing ``` unchanged.
examples/spec-driven/plan.claude.md
Outdated
| ``` | ||
| @./plan.claude.md | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language for code block.
The import example should have bash language specified.
**Usage**: Import this plan into `tasks.claude.md`:
-```
+```bash
@./plan.claude.md
-```
+```bash🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
74-74: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In examples/spec-driven/plan.claude.md around lines 74–76, the fenced code block
import lacks a language tag; update the opening fence from ``` to ```bash so the
block reads ```bash followed by the existing line @./plan.claude.md and the
closing ``` remains unchanged, ensuring the block is marked as bash for proper
syntax highlighting.
examples/spec-driven/README.md
Outdated
| ## Key Differences from Spec Kit | ||
|
|
||
| | Aspect | Spec Kit | mdflow Pattern | | ||
| |--------|----------|----------------| | ||
| | Framework | Full CLI framework | Simple markdown files | | ||
| | Dependencies | Python + Specify CLI | mdflow only | | ||
| | Agent selection | Slash commands | Filename inference | | ||
| | File imports | Limited | Full glob + symbol extraction | | ||
| | Piping | Not primary | Built-in (stdout/stdin) | | ||
| | Execution | Specialized workflows | Open-ended, composable | | ||
|
|
||
| ## Tips |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blank lines around comparison table.
Markdown tables should be surrounded by blank lines per MD058.
## Key Differences from Spec Kit
+
| Aspect | Spec Kit | mdflow Pattern |
|--------|----------|----------------|
| Framework | Full CLI framework | Simple markdown files |
| Dependencies | Python + Specify CLI | mdflow only |
| Agent selection | Slash commands | Filename inference |
| File imports | Limited | Full glob + symbol extraction |
| Piping | Not primary | Built-in (stdout/stdin) |
| Execution | Specialized workflows | Open-ended, composable |
+
## TipsCommittable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In examples/spec-driven/README.md around lines 169 to 180 the Markdown table is
not separated by blank lines, which violates MD058; add one blank line
immediately before the table and one blank line immediately after the table
(i.e., ensure an empty line between the preceding "## Key Differences from Spec
Kit" header and the table, and another empty line after the table before the "##
Tips" heading).
| ``` | ||
| What problem are we solving? | ||
| Who has this problem? | ||
| Why is it valuable? | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language for feature overview code block.
Code blocks should have language identifiers.
+text What problem are we solving? Who has this problem? Why is it valuable? -
+```text
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>
18-18: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
In examples/spec-driven/specify.claude.md around lines 18 to 22, the fenced code
block lacks a language identifier and the closing fence was adjusted; update the
block to include a language tag (e.g., text) on the opening fence and ensure the
closing fence is consistent, so replace the current fences with text at the start and at the end to mark the block as plain text.
</details>
<!-- fingerprinting:phantom:triton:mongoose -->
<!-- This is an auto-generated comment by CodeRabbit -->
| ``` | ||
| md clarify.claude.md --_project "{{ _project }}" | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language for clarification command.
Add bash language identifier to command block.
Run this for deeper analysis:
-```
+```bash
md clarify.claude.md --_project "{{ _project }}"
-```
+```bash🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
48-48: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In examples/spec-driven/specify.claude.md around lines 48 to 50, the fenced code
block for the clarify command is missing a language identifier; update the
opening backtick fence to include "bash" so the block starts with ```bash to
enable proper syntax highlighting, leaving the command content unchanged and
keeping the closing ``` as-is.
examples/spec-driven/tasks.claude.md
Outdated
| ## Analyze Current State | ||
| ``` | ||
| !find . -name "*.ts" -type f | wc -l | ||
| !npm test 2>&1 | tail -20 | ||
| !git log --oneline -5 | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language for analysis command block.
Command blocks should have language identifiers.
## Analyze Current State
-```
+```bash
!find . -name "*.ts" -type f | wc -l
!npm test 2>&1 | tail -20
!git log --oneline -5
-```
+```bash🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
14-14: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In examples/spec-driven/tasks.claude.md around lines 13 to 18, the fenced code
block with shell commands lacks a language identifier; update the opening fence
to include a language tag (bash) so it reads ```bash before the commands and
keep the closing ``` unchanged, ensuring the block is properly annotated for
syntax highlighting and tooling that relies on language identifiers.
3675460 to
917118a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (2)
examples/ai-slop-remover.claude.md (2)
14-20: Add language identifier to code block.The code block lacks a language identifier, which affects rendering and accessibility.
Apply this diff:
-``` +```bash Files changed: !git diff {{ _base }}...HEAD --stat Actual diff: !git diff {{ _base }}...HEAD -``` +```
116-118: Add language identifier to git command block.The code block lacks a language identifier, affecting rendering consistency.
Apply this diff:
-``` +```bash !git diff {{ _base }}...HEAD --name-only -``` +```
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
CHANGELOG.md(0 hunks)examples/ai-slop-remover.claude.md(1 hunks)package.json(1 hunks)src/cli-runner.test.ts(0 hunks)src/cli-runner.ts(2 hunks)src/post-run-menu.test.ts(0 hunks)src/post-run-menu.ts(1 hunks)
💤 Files with no reviewable changes (3)
- CHANGELOG.md
- src/cli-runner.test.ts
- src/post-run-menu.test.ts
✅ Files skipped from review due to trivial changes (1)
- package.json
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.md: Parse YAML frontmatter in markdown files for agent configuration
Use_prefix for template variables (e.g.,_varname) in frontmatter and body templates
System keys in agent frontmatter (_varname,_stdin,env,$1,$2, etc.) are consumed by md and not passed to the command
All non-system frontmatter keys are passed directly as CLI flags to the specified command
Use LiquidJS template syntax for variable substitution in markdown bodies (variables, conditionals, filters)
Use positional mapping ($1,$2) in frontmatter to map body or positional args to specific CLI flags
Implement imports in markdown files using syntax: basic (@./path.md), globs (@./src/**/*.ts), line ranges (@./file.ts:10-50), symbols (@./file.ts#InterfaceName), commands (!`cmd`), and URLs (@https://example.com/file.md)
Files:
examples/ai-slop-remover.claude.md
🪛 LanguageTool
examples/ai-slop-remover.claude.md
[grammar] ~22-~22: Ensure spelling is correct
Context: ...f: !git diff {{ _base }}...HEAD ``` ## Slop Detection Look for and remove: ### 1....
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.18.1)
examples/ai-slop-remover.claude.md
14-14: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
116-116: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (8)
src/post-run-menu.ts (1)
352-353: LGTM! TTY check correctly simplified.The visibility logic now depends only on stdin TTY status, which aligns with the rollback to version 2.34.0 and enables menu interaction even when output is piped.
examples/ai-slop-remover.claude.md (6)
1-4: LGTM! Frontmatter follows agent configuration guidelines.The YAML frontmatter correctly uses the
_prefix for template variables and applies LiquidJS syntax for the default value, as specified in the coding guidelines.
34-52: LGTM! TypeScript code blocks are properly formatted.Both the "Example to remove" and "Better" code blocks correctly use the
typescriptlanguage identifier with properly matched fences.
61-73: LGTM! TypeScript code block is correctly formatted.The defensive checks example properly uses the
typescriptlanguage identifier with matched fences.
81-84: LGTM! Type cast example is properly formatted.The code block correctly uses the
typescriptlanguage identifier.
94-100: LGTM! Inconsistent style example is properly formatted.The code block correctly uses the
typescriptlanguage identifier.
125-129: LGTM! Validation code block is properly formatted.The bash code block correctly includes the language identifier and demonstrates the validation workflow.
src/cli-runner.ts (1)
395-395: LGTM! Menu logic simplified correctly.The
shouldShowMenudetermination now relies only on stdin TTY status and thenoMenuflag, aligning with the rollback and enabling menu interaction in piped scenarios.
src/cli-runner.ts
Outdated
| // Only capture when: TTY, not piped, menu not disabled | ||
| const shouldShowMenu = this.isStdinTTY && !parsed.noMenu; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment to reflect actual behavior.
The comment on line 540 states "not piped" but the code no longer checks stdout TTY status. The menu will now show when stdin is a TTY regardless of whether stdout is piped.
Apply this diff:
- // Only capture when: TTY, not piped, menu not disabled
+ // Only capture when: stdin TTY, menu not disabled
const shouldShowMenu = this.isStdinTTY && !parsed.noMenu;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Only capture when: TTY, not piped, menu not disabled | |
| const shouldShowMenu = this.isStdinTTY && !parsed.noMenu; | |
| // Only capture when: stdin TTY, menu not disabled | |
| const shouldShowMenu = this.isStdinTTY && !parsed.noMenu; |
🤖 Prompt for AI Agents
In src/cli-runner.ts around lines 540 to 541, the inline comment incorrectly
says "not piped" even though the code only checks stdin TTY and parsed.noMenu;
update the comment to reflect the actual behavior (menu is shown when stdin is a
TTY and menu is not disabled, regardless of whether stdout is piped) so the
comment matches the current condition.
917118a to
5c2a06c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
examples/ai-slop-remover.claude.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.md: Parse YAML frontmatter in markdown files for agent configuration
Use_prefix for template variables (e.g.,_varname) in frontmatter and body templates
System keys in agent frontmatter (_varname,_stdin,env,$1,$2, etc.) are consumed by md and not passed to the command
All non-system frontmatter keys are passed directly as CLI flags to the specified command
Use LiquidJS template syntax for variable substitution in markdown bodies (variables, conditionals, filters)
Use positional mapping ($1,$2) in frontmatter to map body or positional args to specific CLI flags
Implement imports in markdown files using syntax: basic (@./path.md), globs (@./src/**/*.ts), line ranges (@./file.ts:10-50), symbols (@./file.ts#InterfaceName), commands (!`cmd`), and URLs (@https://example.com/file.md)
Files:
examples/ai-slop-remover.claude.md
🪛 LanguageTool
examples/ai-slop-remover.claude.md
[grammar] ~22-~22: Ensure spelling is correct
Context: ...f: !git diff {{ _base }}...HEAD ``` ## Slop Detection Look for and remove: ### 1....
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.18.1)
examples/ai-slop-remover.claude.md
14-14: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
116-116: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
| ``` | ||
| Files changed: | ||
| !git diff {{ _base }}...HEAD --stat | ||
| Actual diff: | ||
| !git diff {{ _base }}...HEAD | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add language identifier to git diff command block.
The fenced code block is missing a language identifier. Since it contains a shell command with template variable substitution, use bash as the language identifier for consistency with the validation section below (line 125) and to satisfy markdown linting requirements.
-```
+```bash
Files changed:
!git diff {{ _base }}...HEAD --stat
Actual diff:
!git diff {{ _base }}...HEAD
-```
+```🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
14-14: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In examples/ai-slop-remover.claude.md around lines 14 to 20, the fenced code
block containing git diff commands lacks a language identifier; update the
opening fence to include "bash" (i.e., replace the leading ``` with ```bash) so
the block is properly marked as shell code and consistent with the validation
section.
| ``` | ||
| !git diff {{ _base }}...HEAD --name-only | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add language identifier to git diff command block.
The fenced code block is missing a language identifier. Specify bash to enable proper syntax highlighting and align with the validation section (line 125).
-```
+```bash
!git diff {{ _base }}...HEAD --name-only
-```
+```🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
116-116: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In examples/ai-slop-remover.claude.md around lines 116 to 118, the fenced code
block containing the git diff command lacks a language identifier; update the
opening fence to include "bash" (i.e., replace the triple backticks with
```bash) so the block becomes ```bash followed by the command and closing ``` to
enable proper syntax highlighting and match the validation expectation.
5c2a06c to
1c4e554
Compare
What
Add an agent that identifies and guides removal of AI-generated code artifacts from branches. Helps maintain clean, human-written code standards.
Detects and removes:
Why
When working with AI code generation, artifacts often slip in:
This agent provides a checklist and examples of what to look for and remove.
How
Run before creating PR:
```bash
md ai-slop-remover.claude.md --_base main
```
Or with custom base:
```bash
md ai-slop-remover.claude.md --_base develop
```
The agent:
Great companion to spec-driven development workflow.
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.