The Cognitive Mode Pattern: How One Prompt Transformation Sharped All Five ACO Agents
Adding role-specific cognitive modes to each agent in the ACO pipeline — CEO/Founder thinking for PM, paranoid production review for Architect — transformed output quality without changing any underlying code.
The ACO system has five agents: PM, Planner, Architect, Developer, and QA. For months they ran on generic but well-crafted system prompts. They worked. Tasks got broken down, code got written, tests got run. But something was missing — the outputs felt like they came from a capable generalist, not a team of specialists each thinking in their own mode.
Last week’s commit changed that. Every agent prompt was enhanced with what the team calls gstack cognitive modes — role-specific thinking frameworks borrowed from how senior practitioners actually approach their domains.
What a Cognitive Mode Actually Is
A cognitive mode is a thinking constraint. It’s not a personality trait or a tone adjustment. It’s a set of mandatory mental operations that get activated before the agent produces any output.
The PM agent now operates in CEO/Founder mode. Before writing a single story, it must challenge the premise of every request. “Let sellers upload photos” doesn’t get a file picker — it gets asked what a 10-star listing experience actually looks like. The agent is told explicitly: don’t take requests literally.
The Architect agent operates in Paranoid Review mode. It must hunt for N+1 queries, race conditions, and trust boundary violations. Not as optional checks — as mandatory pre-flight before approving any design.
These aren’t soft guidelines. They’re encoded as MUST behaviors with explicit examples of what wrong answers look like.
The Five Modes in Practice
Here’s what each agent now does differently:
PM (CEO/Founder): Challenges premises before accepting them. Finds the 10-star version of every feature. Asks 3-5 clarifying questions before creating a story. The key shift: from requirements taker to product thinker.
Planner (Eng Manager): Before breaking down work, locks the technical spine — architecture diagram, data flow diagram, state machine, edge case map, risk table. Output is machine-readable and execution-ready, with file_path, function_signature, acceptance_criteria, and test_strategy as mandatory fields for every task.
Architect (Paranoid Review): Thinks about what will fail in production. N+1 queries, concurrent write conflicts, API rate limit handling, what happens on partial failure. The Architect doesn’t approve until it has mentally run the system under load.
Developer (Release Engineer): Ships fast through a strict workflow: sync, implement, test, push, PR. No rabbit holes. The cognitive mode here is about discipline and velocity — the opposite of the wandering implementation that never gets merged.
QA (Browse QA Engineer): 60-second smoke tests, screenshots, visual verification. Not unit tests — actual browser-based verification that the UI does what the stories claim.
Why This Matters More Than Better Prompts
You can tune a prompt’s wording indefinitely. Add more context, clarify edge cases, give better examples. That helps. But it mostly helps the agent produce better versions of the same thing.
Cognitive modes change what the agent produces entirely. A PM agent in CEO mode doesn’t just write better user stories — it refuses to write stories for features that shouldn’t exist. An Architect in Paranoid mode doesn’t just review more carefully — it surfaces failure modes that never occurred to the person writing the original request.
The quality jump isn’t linear. It’s categorical.
The Integration Testing Result
The commit included integration tests — five scenarios, one per agent. All five passed. The confidence rating was set at 85%, with a note: prompts are sound, needs real LLM testing. That’s the honest version.
The prompts look right. The examples are specific and contrasting (here’s what a wrong answer looks like, here’s what a right answer looks like). The mandatory behaviors are actually mandatory, not aspirational. Whether this holds up under real GPT-4o or Claude Opus is the next question.
What the cognitive mode pattern does is establish a clear standard: each agent isn’t just a function — it’s a way of thinking. The moment you can articulate how a senior engineer in that role thinks, you can encode it as a mode. The ACO system just got five of those articulations for the price of one commit.
Enjoyed this? Give it some claps
Stay in the loop
New posts drop when there's something worth writing about. No spam — just the occasional deep dive from the workbench.
Or follow on Substack directly
Comments
Written by Aniket Karne
April 17, 2026 at 12:00 AM UTC