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
Welcome to another thrilling episode of “Who Hurt This Repo?” 🎭 This week’s special: hard-coded nukes, recursive spelunking into node_modules, and a passionate affair with any that would make TypeScript cry in strict mode. If the goal was “it works on my machine,” congratulations, you’ve achieved avant-garde chaos. 💥
return!p.includes('/.ruler/')&&!p.startsWith('.ruler/');// Always write full repository-relative paths (prefix with leading /)returnp.startsWith('/') ? p : `/${p}`;
console.log(`[ruler] Created ${instructionsPath}`);console.log(`[ruler] ${DEFAULT_RULES_FILENAME} already exists, skipping`);console.log(`[ruler] Created ${tomlPath}`);console.log(`[ruler] ruler.toml already exists, skipping`);
Suggestions
Replace all direct console.* with logInfo/logWarn/logError/logVerboseInfo for consistent prefixes and dry-run handling.
Add a --json mode that emits structured logs; helpful for CI and tooling.
If You Can’t Find Enough Issues
Good news: tests are numerous and thoughtful. Bad news: they won’t save you from the above footguns. Keep them, expand coverage for “dangerous cleanup,” secrets handling, and traversal exclusions.
Suggestions
Add tests explicitly asserting:
Revert never deletes generic config.toml without a .bak or Ruler marker.
Directory traversal skips node_modules et al.
Secrets are not persisted in any path when propagation runs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
This Codebase Smells!
Welcome to another thrilling episode of “Who Hurt This Repo?” 🎭 This week’s special: hard-coded nukes, recursive spelunking into node_modules, and a passionate affair with
anythat would make TypeScript cry instrictmode. If the goal was “it works on my machine,” congratulations, you’ve achieved avant-garde chaos. 💥Table of Contents
Overzealous Revert Deletes Real Files
⛈️ Revert tries to “clean up”
config.toml, risking deletion of legitimate project files.config.toml. That’s not “cleanup,” that’s a landmine for real projects. 💣config.tomlexplicitly, so your “revert” can yoink unrelated configs if backups aren’t present. 🤦Files
src/core/revert-engine.tssrc/paths/mcp.tssrc/core/apply-engine.tsCode
Suggestions
.bakexists or if file contains Ruler provenance markers.--force-extra-cleanupto opt-in to risky generic deletions and print a giant “ARE YOU SURE” warning.Recursive Scans Dive Into node_modules
🕳️ Directory crawlers only skip dot-folders; they lovingly traverse node_modules and your entire monorepo like a golden retriever on espresso.
.gitby boundary rules and skips directories starting with., but notnode_modules,dist,.next, etc. RIP performance. 🪦Files
src/core/FileSystemUtils.tsCode
.gitrepos:Suggestions
node_modules,dist,build,coverage,.next,.turbo,.yarn,out,vendor.--ignoreflag and a config key to extend the skip set.statheuristic.Global Config in Home Directories Is a Footgun
🏠 Writing and reading global config from
~/.config/rulerwithout robust guards invites confusion, permission errors, and shared-environment chaos.Files
src/core/FileSystemUtils.tssrc/core/ConfigLoader.tssrc/cli/handlers.tsCode
init --globalwrites into XDG config:Suggestions
--no-global-fallbackand default it on in CI; log only when verbose.~/.config/rulerand validate provenance before reading.Type Safety: “any”-pocalypse
🔫 TypeScript is here… but you brought
anyand silenced ESLint. Bold strategy, Cotton.eslint-disableonno-explicit-anyand liberal casting betrays type safety and future maintainability. 🤮any, bleeding dynamic blobs everywhere.Files
src/types/iarna-toml.d.tssrc/agents/MistralVibeAgent.tssrc/agents/CodexCliAgent.tsCode
anysignatures:anyto stringify:Suggestions
@iarna/tomld.ts with the official@types/iarna__toml(already in devDeps!) and remove theanyblanket.eslint-disable @typescript-eslint/no-explicit-any; enforceunknown+ proper narrowing.Secrets Smuggled Into Config Files
🔐 Headers with Bearer tokens get extracted and written as
api_keyinto TOML. That’s a “no” from security.Files
src/mcp/propagateOpenHandsMcp.tsCode
api_keyto config:Suggestions
--no-secretshard default; require--allow-secretsto be set for testing-only workflows.Gitignore Mutation: Path Games and Collateral Damage
🧩 Ruler rewrites
.gitignorepaths, normalizing by project basename and injecting leading slashes—can desync user-managed patterns and create weird path anchoring behaviors.Files
src/core/GitignoreUtils.tsCode
.ruler:Suggestions
Logging: Centralized… Except When It Isn’t
🗣️ You have nice centralized logging helpers, and then you bypass them with raw
console.login CLI handlers. Pick a lane.Files
src/constants.tssrc/cli/handlers.tsCode
Suggestions
logInfo/logWarn/logError/logVerboseInfofor consistent prefixes and dry-run handling.--jsonmode that emits structured logs; helpful for CI and tooling.If You Can’t Find Enough Issues
Good news: tests are numerous and thoughtful. Bad news: they won’t save you from the above footguns. Keep them, expand coverage for “dangerous cleanup,” secrets handling, and traversal exclusions.
Suggestions
config.tomlwithout a.bakor Ruler marker.node_moduleset al.All reactions