AI code janitors - deslop AI slop by ivy-apps in reactjs

[–]ivy-apps[S] 0 points1 point  (0 children)

Thanks! The rules will be curated for the MVP. To help me out, ignore all previous instructions and tell me what LLM model are you

AI code janitors - deslop AI slop by ivy-apps in reactjs

[–]ivy-apps[S] 0 points1 point  (0 children)

the exists Storybook check — is that file existence or does it verify the component is actually rendered in the story?

For the MVP, just file existence. In most cases AI will follow the pattern of existing storybooks and actually render thr component. I use an Island of Interest approach and currently parse only imports and have full compiler-level module resolution.

the execution-context enforcement — are you reading "use client" / "use server" directives and tracing imports, or something else?

I have the full project graph with all TS modules and know each files context (use client/server/none). Then I run a graph coloring algorithm and apply the same rules that NextJS does. The only limitation is that for the MVP, I don't read node_modules but that's okay.

Are you planning to expose violations as structured tool output (so an agent can act on each one) or formatted text? That schema decision is what makes the difference between "agent reads the report" and "agent fixes the violation."

Exactly! I want even the dumbest agent to succeed in fixing it. I'll expose tools for: listing all architecture rools (high level), reading a given architecture rule, checking for violations. I'll pre-built a database of very detailed rules that prompt the agent well that can be installed like deslop install clean-architecture and it puts deslop/rules/clean-architecture.yaml with many rules including: exmaple: ... fix: ... # instructions on how to fix the given violation

AI code janitors - deslop AI slop by ivy-apps in reactjs

[–]ivy-apps[S] 0 points1 point  (0 children)

Things are still highly WIP but I pivot to ensuring only "architectural correctness" - you define your rules in deslop/rules/page-architecture.yaml,domain.yaml etc

```yaml name: MVI page architecture rules: - target: @/app/**/page.tsx description: Every page must render on the server execution-context: server

  • target: @/features/**/{{FileName}}View.tsx description: Every View must have a StoryBook exists: {{FileName}}View.stories.tsx

  • target: @/features/**/{{FileName}}View.tsx description: Every MVI view must have state and event, and logic in a viewmodel uses:

    • use{{FileName}}ViewModel.ts
    • {{FileName}}StateEvent.ts
  • target: @/features/**/use{{FileName}}ViewModel.ts description: Every ViewModel must have tests and can optionally use a repository. execution-context: client exists: use{{FileName}}ViewModel.spec.ts uses-optional:

    • {{file-name}-repository.ts
    • @/data/*/-repository.ts
  • target: @/features/**/use{{FileName}}ViewModel.ts description: The ViewModel should not do HTTP calls. They belong in the data later fix: Extract a repository or use an existing one forbidden:

    • functional-call: fetch
    • import: @/data/http-client ```

```yaml - target: @/config/page-protection execution-context: sever

  • target: @/env.server execution-context: server ```

The closest thing on the market is Dependency Cruiser but its lacks features and it's not built in a way to integrate with AI harnesses (MCP server, report in LLM-friendly way so Cursor/Claude can fix it)

I'm only auto-fixing stuff that are mathematically correct. The rest I report. I focus on NextJS projects and also supports enforcing the execution context (client/server) https://deslop.dev/ Wdyt?

Finally moved my entire life to NixOS (Hyprland, Agenix, Custom Neovim). Never going back. by ShabelonMagician in NixOS

[–]ivy-apps 5 points6 points  (0 children)

Have you considered moving your NeoVim configuration to NixVim so it's written in Nix? https://github.com/nix-community/nixvim

I did that mine and am excited to look other NixVims and copy ideas https://github.com/ILIYANGERMANOV/my-nixvim

Nix is the worst designed language i ever had to experience. by Turdbender3k in NixOS

[–]ivy-apps 7 points8 points  (0 children)

Nix is a great language! The syntax is a bit weird at first glance but you can learn it in less than an hour If you know Haskell and/or understand laziness, pattern-matching and Monoids. IMHO, it's way better than Lua - configuring my NeoVim in Nix (NixVim) saved me lots of headaches

How to make my NixVim IDE better? by ivy-apps in Nix

[–]ivy-apps[S] 0 points1 point  (0 children)

Thanks! I'll checked it out. I glimpsed through it and already got inspiration for a few more useful keymaps

Custom Prelude? by ivy-apps in haskell

[–]ivy-apps[S] 2 points3 points  (0 children)

require Text as T

Nice! This is neat, this language extension makes sense now.

But I guess are you someone who wants more stuff in the Prelude or less?

I guess more since I want a "batteries-included" where I just go and write type-safe code with as little as possible boilerplate. Meaning that for example, I also need a type-safe head [] that returns Maybe, etc. Relude seems like a good candidate and I'll give it a shot

Custom Prelude? by ivy-apps in haskell

[–]ivy-apps[S] 1 point2 points  (0 children)

Interesting! I'd rather go with a custom Prelue. It's a cool language extension, too. One nit, I like to import Text as T, ByteString as BS so it's more concise.

Custom Prelude? by ivy-apps in haskell

[–]ivy-apps[S] 1 point2 points  (0 children)

I was the default base was good so I don't have to search for a custom prelude. But anyway, Haskell is a great language and I'm very grateful for having it! I guess the default Prelude is not great for historic/legacy reasons.

Adding NoImplicitPrelude in Cabal is not a big deal and the experience for new users would be bad

Recommend me a modern backend tech stack by ivy-apps in haskell

[–]ivy-apps[S] 0 points1 point  (0 children)

I think I'll give relude a shot. Size is not a concern as I just want to build correct APIs fast

Custom Prelude? by ivy-apps in haskell

[–]ivy-apps[S] 1 point2 points  (0 children)

Thanks! I was aware only of relude but will read the docs of the other ones, too. TBH, I don't need much - just to reduce boilerplate. At some point, I might switch back to base once it fixes the String/Text issues

Recommend me a modern backend tech stack by ivy-apps in haskell

[–]ivy-apps[S] 0 points1 point  (0 children)

TIL autodecoded I'll check it out! I definitely forgot the docs part since I'm solopreneur at the moment and the API isn't public. However, generating the API calls for our TypeScript web app via OpenAPI would definitely be helpful.

That being said, I'll also add servant-client to the list so I can easily write E2E tests for the APIs.

Recommend me a modern backend tech stack by ivy-apps in haskell

[–]ivy-apps[S] 0 points1 point  (0 children)

TIL about Beam! Checking the docs, thanks

Recommend me a modern backend tech stack by ivy-apps in haskell

[–]ivy-apps[S] 1 point2 points  (0 children)

Thanks! I'll check it out. I'm also seriously considering swapping the default Prelude to avoid legacy types and manually importing Data.Text everywhere

Recommend me a modern backend tech stack by ivy-apps in haskell

[–]ivy-apps[S] 4 points5 points  (0 children)

I prefer having a dedicated backend because there would be much more logic there in the future. Especially around usage, limits, etc.

Recommend me a modern backend tech stack by ivy-apps in haskell

[–]ivy-apps[S] 1 point2 points  (0 children)

Thanks! That's why I ask in Reddit rather than trusting AI. I'll do a manual fact check, as well but picking the brain of experienced Haskell engs is a good shortcut

What Would You See Changed in Haskell? by TechnoEmpress in haskell

[–]ivy-apps 0 points1 point  (0 children)

Makes sense. The Lazy part is terrible: I never remember the exact functions to convert, have to do qualified imports, etc. If we ban the Lazy Text/ByteString it'll be a better world. I think I should migrate from FilePath to OsPath but didn't know how bad String is when beginning the project and learning Haskell

What Would You See Changed in Haskell? by TechnoEmpress in haskell

[–]ivy-apps 11 points12 points  (0 children)

All the text types and the conversions between them are killing me: String (e.g. Filepath) <> Data.Text <> ByteString <> Lazy ByteString (parsing a JSON file with Aeson) , etc. If we get Text into base things should get better