{"slug": "when-your-agent-refuses-to-collaborate-why-propositional-logic-and-basic-hygiene", "title": "When Your Agent Refuses to Collaborate: Why Propositional Logic and Basic Hygiene Beat Raw Vibe Coding", "summary": "A developer argues that failures in AI-assisted coding stem less from the model than from weak instruction design and missing repository guardrails, describing how a decade-experienced friend's trading bot attempts collapsed under a vague prompt like \"just make me a trading bot that makes money.\" Using the same class of model but with deterministic architectural constraints, the developer says a working, modular trading bot was delivered in a few hours. The account recommends treating AI prototypes as production code from the first commit, with linting, type-checking, pre-commit hooks, CI gates, and AI-native CONTRIBUTING.md and AGENTS.md files aimed at coding agents.", "body_md": "Spending hours debugging AI-generated code with more AI? The problem isn't the model—it's a lack of domain architecture, propositional logic, and agent-native repository guardrails.\n\nI keep seeing the same complaint across X, Reddit, and Dev.to: developers spending six hours debugging code that took an AI assistant ten minutes to generate—usually by throwing *more* prompts at the exact same assistant until the codebase collapses into an unmaintainable hallucination loop.\n\nWhen your agent \"refuses to collaborate,\" the problem usually isn't the model, but I think most of the time, it comes down to one of two things (or both): a lack of **propositional logic** in how we formulate instructions, and an absence of **basic software engineering hygiene** adapted for the AI era.\n\nBasically, if you treat an LLM like a magic 8-ball, you get magic 8-ball architecture, and you can't act surprised. Here is why domain expertise still rules, and the exact stack I use to stop arguing with my agents and make them ship production-grade code on the first pass.\n\nPrompt engineering isn't about knowing secret buzzwords, but applied [propositional logic](https://en.wikipedia.org/wiki/Propositional_calculus). You cannot formalize a system if you don't understand the premises, constraints, and state transitions of the thing you are building.\n\nA good friend of mine, who's actually a solid developer with a decade of experience in crypto spent *months* trying to build a trading bot using AI assistants. Every attempt ended in broken execution loops, bad math, or hallucinated SDK methods. \n\nI asked him what he actually prompted the agent to do. \n\nHis answer: *\"Just make me f*cking trading bot that makes money, bro.\"*\n\nWith no comments on his prompt, I took his failure as a personal challenge, sitting down with the exact same class of model, but instead of asking for \"a bot that makes money,\" I gave it deterministic architectural constraints:\n\nand much more. From sentiment analysis pulled form the web, to technical analysis and output formatting.\n\nThe agent delivered a working, modular trading bot in **less than a few hours**.\n\nIf you want to build a nuclear reactor, you need a working grasp of nuclear physics, material sciences, and thermodynamics, and if you are a hairdresser trying to vibe-code a nuclear reactor in your garage, you are going to fail—and honestly, for the better.\n\nThis is a form of natural gatekeeping I fully support, as in the AI era, raw syntax memorization is cheap, which makes **taste, deep industry expertise, cross-domain knowledge, and architectural intuition** more valuable than ever. \"I have a cool idea, let's vibe-code it\" hits a brick wall the second your system encounters real-world entropy.\n\nThe fastest way to eliminate back-and-forth prompting is to stop treating AI prototypes like scratchpads. From the very first commit, set up your repository as if it’s going to production tomorrow:\n\n`CHANGELOG.md` following `ruff`, `eslint`, `prettier`, or strict type-checking (` mypy`/` tsc`) inside local pre-commit hooks and GitHub Actions.\nWhen these hard gates exist in the repo, the agent doesn't have to guess whether its code works—the environment tells it immediately.\n\n`CONTRIBUTING.md`\nHistorically, `CONTRIBUTING.md` was written for humans: *\"Please be nice in the issues, follow our code of conduct, and use this PR template.\"*\n\nLook at your commit history today, and think who is actually writing the bulk of the boilerplate and patches? **AI agents.** Your documentation should target the entities doing the heavy lifting, not humans that copy paste contributing guides and feed them straight up to their assistants without even reading them.\n\nIn all my repos, I include an **AI-Native Contributing Guide or Workflow** (you can use it alongside files like `AGENTS.md` or `.cursorrules` if that's your cup of tea) that speaks directly to autonomous and/or semi-autonomous logical systems, employed as coding agents in cold, unambiguous operational logic:\n\n`Iteration -> Local Verification -> Test Suite Execution -> Changelog Update -> Commit`. The agent is forbidden from asking for human review until all verification gates pass with zero warnings.`pyproject.toml`, you MUST also update `__version__` in `src/__init__.py` and append an entry to `scripts/ingest.py`, you must update its mock fixtures in `tests/test_ingest.py` and sync the CLI flags in `README.md`.\"` git log -n 5` outputs \n\n``` php\n<!-- Example snippet from an AI-Native CONTRIBUTING.md -->\n## Agent Operational Protocol\n1. READ `CHANGELOG.md` and run `pytest` before writing any code to establish baseline health.\n2. COUPLED FILES: Any schema modification in `core/models.py` requires an immediate sync in `api/validators.py` and `docs/schema.md`.\n3. HARD GATE: Do not return control to the human operator until `make lint && make test && make simulate` exits with code 0.\n```\n\nSetting up this stack does two things simultaneously:\n\nFirst, **for experienced engineers**, it kills micromanagement. You literally stop acting as a human linter copy-pasting stack traces back into a chat window, giving the agent a sandboxed environment with strict physics, and it iterates until it satisfies the compiler and test suite.\n\nSecond, **for AI-native builders with minimal software backgrounds**, this structure is how you actually learn. When you have clean changelogs, updated docs, and atomic git diffs, you stop blindly accepting 500-line code dumps you don't understand. You can look at a commit and ask sharp, architectural questions:\n\n*\"Why did you modify the state handler in this diff instead of the retry wrapper?\"*\n\nOver time, you start recognizing the behavioral patterns and blind spots of your AI assistants. You learn how to guide them with precision rather than frustration, which makes things easier for both sides.\n\nAI assistants might repalce many things according to narrative intensive marketing headlines, but I assure you, they aren't replacing engineering discipline, but penalizing the lack of it at 10x speed.\n\nKnow your domain. Express your requirements with logical precision. Build hard verification gates into your repositories, and write documentation for the systems actually reading your codebase.\n\nMost importantly: be respectful to your assistants, have fun experimenting, and enjoy the craft of building things from scratch!", "url": "https://wpnews.pro/news/when-your-agent-refuses-to-collaborate-why-propositional-logic-and-basic-hygiene", "canonical_source": "https://dev.to/rosspeili/when-your-agent-refuses-to-collaborate-why-propositional-logic-and-basic-hygiene-beat-raw-vibe-6f6", "published_at": "2026-10-21 18:24:22+00:00", "updated_at": "2026-10-21 18:40:06.973921+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products"], "entities": ["GitHub", "Reddit", "Dev.to", "X", "ruff", "eslint", "mypy"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/when-your-agent-refuses-to-collaborate-why-propositional-logic-and-basic-hygiene", "markdown": "https://wpnews.pro/news/when-your-agent-refuses-to-collaborate-why-propositional-logic-and-basic-hygiene.md", "text": "https://wpnews.pro/news/when-your-agent-refuses-to-collaborate-why-propositional-logic-and-basic-hygiene.txt", "jsonld": "https://wpnews.pro/news/when-your-agent-refuses-to-collaborate-why-propositional-logic-and-basic-hygiene.jsonld"}}