Skip to content

Conversation

@jellydn
Copy link

@jellydn jellydn commented Dec 16, 2025

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:

  • Excessive or obvious comments
  • Defensive checks and try/catch blocks that don't match codebase patterns
  • `any` type casts and `@ts-ignore` comments
  • Style inconsistencies (logging, error handling, naming, formatting)

Why

When working with AI code generation, artifacts often slip in:

  • Over-commented code explaining obvious logic
  • Defensive programming that doesn't match the codebase's style
  • Type bypasses that should be properly typed
  • Inconsistent patterns compared to surrounding code

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:

  1. Diffs your branch against main/base
  2. Shows files changed
  3. Describes common AI slop patterns
  4. Guides review and cleanup
  5. Validates with tests

Great companion to spec-driven development workflow.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Added a guide documenting a structured workflow to detect and remove AI-generated code from diffs, including detection categories, practical code examples, and validation steps for developers.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 5c2a06c and 1c4e554.

📒 Files selected for processing (1)
  • examples/ai-slop-remover.claude.md (1 hunks)

Walkthrough

Adds 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

Cohort / File(s) Summary
Documentation
examples/ai-slop-remover.claude.md
New file: Provides comprehensive workflow guide for identifying and removing AI-generated code artifacts (excessive comments, defensive checks, type casts, inconsistent styling) with TypeScript examples and validation procedures.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Review content for clarity and accuracy of the workflow descriptions
  • Verify code examples are syntactically correct

Poem

🐰 Hops through code with careful eyes,
Spotting slop in thin disguise—
AI fluff begone, we cry!
Clean diffs gleam as lint flies by.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: add ai-slop-remover agent for code quality' directly and specifically describes the main change—adding a new agent tool for code quality. It is concise, clear, and accurately reflects the primary purpose of the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 15203d0 and 3675460.

📒 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.md
  • examples/spec-driven/review.claude.md
  • examples/spec-driven/specify.claude.md
  • examples/spec-driven/tasks.claude.md
  • examples/spec-driven/implement.claude.md
  • examples/spec-driven/plan.claude.md
  • examples/spec-driven/README.md
  • examples/ai-slop-remover.claude.md
  • examples/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.md
  • examples/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 --stat

Actual 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 -->

Comment on lines +34 to +52
```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));
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +81 to +84
```typescript
const data = response.data as any; // Instead of properly typing
if ((error as any).statusCode === 404) {} // Instead of type guard
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +94 to +100
```typescript
// If file never logs debug info:
console.debug("Processing item", item);

// If file uses throw, not console.error:
console.error("Failed");
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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).

Comment on lines 39 to 43
```
Lint: `!npm run lint`
Test: `!npm test`
Build: `!npm run build`
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines 74 to 76
```
@./plan.claude.md
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines 169 to 180
## 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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 |

+
 ## Tips

Committable 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).

Comment on lines 18 to 22
```
What problem are we solving?
Who has this problem?
Why is it valuable?
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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 -->

Comment on lines 48 to 50
```
md clarify.claude.md --_project "{{ _project }}"
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines 13 to 18
## Analyze Current State
```
!find . -name "*.ts" -type f | wc -l
!npm test 2>&1 | tail -20
!git log --oneline -5
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

@jellydn jellydn force-pushed the feat/ai-slop-remover branch from 3675460 to 917118a Compare December 16, 2025 10:31
Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3675460 and 917118a.

📒 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 typescript language identifier with properly matched fences.


61-73: LGTM! TypeScript code block is correctly formatted.

The defensive checks example properly uses the typescript language identifier with matched fences.


81-84: LGTM! Type cast example is properly formatted.

The code block correctly uses the typescript language identifier.


94-100: LGTM! Inconsistent style example is properly formatted.

The code block correctly uses the typescript language 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 shouldShowMenu determination now relies only on stdin TTY status and the noMenu flag, aligning with the rollback and enabling menu interaction in piped scenarios.

Comment on lines 540 to 541
// Only capture when: TTY, not piped, menu not disabled
const shouldShowMenu = this.isStdinTTY && !parsed.noMenu;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
// 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.

@jellydn jellydn force-pushed the feat/ai-slop-remover branch from 917118a to 5c2a06c Compare December 16, 2025 10:38
Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 917118a and 5c2a06c.

📒 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)

Comment on lines +14 to +20
```
Files changed:
!git diff {{ _base }}...HEAD --stat
Actual diff:
!git diff {{ _base }}...HEAD
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +116 to +118
```
!git diff {{ _base }}...HEAD --name-only
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

@jellydn jellydn force-pushed the feat/ai-slop-remover branch from 5c2a06c to 1c4e554 Compare December 16, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant