Friday, September 4, 2026

Stop Micromanaging Codex: Prompt for Outcomes, Not Steps

 

With increasingly capable coding agents such as Codex running GPT-6 Astra, I think we need to change the way we write prompts.

A lot of us still prompt coding agents as if we are programming them:

Open this file.
Check this class.
Then inspect this method.
Compare it with that implementation.
Create a plan.
Don't change anything yet.
Then update these files...

That worked reasonably well when models needed constant direction.

But with modern agentic coding models, it can actually get in the way.

A better approach is:

Tell the agent what outcome you want, define the boundaries, explain what success looks like — and let it work out how to get there.

OpenAI's own model guidance increasingly recommends this outcome-first approach: define the goal, success criteria and constraints rather than unnecessarily prescribing every intermediate step.

From Instructions to Ownership

Instead of treating Codex like a developer who needs a Jira ticket containing 25 implementation steps, treat it more like an experienced engineer taking ownership of a piece of work.

Give it four things:

Goal — What are we actually trying to achieve?

Constraints — What must not change?

Success criteria — How do we know the work is complete?

Decision boundaries — When should the agent stop and involve you?

Then let the agent explore the repository, understand dependencies, choose the implementation approach, run tests and correct problems it finds.

This becomes particularly interesting with GPT-6 Astra. OpenAI says Astra improves software engineering and complex multi-step work, while Codex can now preserve notes and retrieve earlier context during long-running sessions.

That makes long-running engineering tasks much more realistic.

A Practical Example

Imagine I want Codex to optimise a query compiler.

I could give it dozens of instructions telling it exactly where to look and what to change.

Instead, I would write something like this:

Goal:
Refactor the filter compiler so compatible typed EAV predicates are
consolidated into fewer SQL joins without changing query semantics.

Constraints:
- Preserve current FilterOperator coverage.
- Never consolidate across NOT or OR boundaries.
- Preserve table-row correlation.
- Preserve property-type boundaries.
- Do not introduce new operators.
- Avoid unrelated refactoring.

Success criteria:
- Existing tests pass.
- Add semantic fixtures for missing/null/empty/not-equal cases.
- Benchmark before and after.
- Inspect generated SQL and query plans.
- Explain any semantic differences before changing behaviour.

Work autonomously.

Ask me only when a decision materially changes semantics or architecture.
Otherwise make reasonable assumptions and continue.

Notice what is missing.

I haven't told Codex which files to open.

I haven't told it which classes to inspect first.

I haven't told it exactly how to implement the optimisation.

That's intentional.

Those are implementation decisions.

The agent can inspect the codebase and determine the best path itself.

The Human Role Changes

This doesn't mean giving an AI unlimited freedom.

Quite the opposite.

The human becomes responsible for defining the engineering boundaries.

My job is to tell the agent:

  • what absolutely must remain true;

  • which trade-offs are acceptable;

  • which architectural decisions require my involvement;

  • and what evidence I expect before considering the work complete.

The agent's job is to figure out the path between the current state and that destination.

This is a subtle but important shift.

Instead of:

Human → instructions → AI executes

we move toward:

Human → intent + boundaries → AI explores → implements → verifies → human reviews

OpenAI has also been pushing Codex toward longer-running work where developers steer an active task rather than specifying everything upfront.

My New Rule for Codex Prompts

Before writing a long prompt, I now ask myself one question:

Am I describing the destination, or am I trying to drive the car?

If the steps are genuinely important, specify them.

If they're just one possible way to reach the result, leave them out.

Give Codex the goal.

Give it the guardrails.

Give it a clear definition of done.

Then give it enough room to engineer the solution.

With coding agents becoming more capable, prompt engineering is increasingly becoming delegation engineering.

Wednesday, June 7, 2023

Call Power BI API from .net Core API with Delegated Permissions

 If you want to consume Power BI API from .net Core API there are multiple ways of doing it. 

1. Call with Delegated Permission. 

2. Call with Service Principle. 

Certain endpoints cannot be called with Service Principle. Like you want to get the list of reports that caller user has access too. In this case, you'll need to use Delegated Permission. 

In order to achieve this in ASP.NET Core API,  you need to do the following 


1. Register an App in Azure. 

2. Go to API Permissions and select the Delegated Permissions for Power BI Service. 

3. In your API, you need to inject the following. 


3. Pay attention to the method "GetAccessTokenForUserAsync" used to get the delegated access and the ClaimPrincipal is passed in the method. 

4. This will give you the token which you can use to call the Power BI API. 




Thursday, May 4, 2023

Some Useful features - Microsot Devleoper World!!

 Here are some of the new and exciting features in Microsoft Dev World.

Some of them are available in preview. 

EF Core Power Tool - To generate DB Context

 Nice tool with a lots of customization to generate the DB Schema. 

EF Core Power Tools 

There are lot of material available on how to get started and it is very straight forward to start using it. 

Best thing I like about this and why I used it to customize the name of the Class which is being generated. If you have multiple table with the same name but in the different schema, by default the class name are appended with 1,2. 

For example,

If you have two tables, 

Local.Customer
Master.Customer

Then default EF core will generate the class name as Customer & Customer1. Not that intuitive. 

With EF Core Power Tools, You can customize the class name generation. 

Create a new file with the name "efpt.renaming.json" and put it inside the same folder as your "efpt.config.json".





    







You can also customize the columns inside a table. 

* If you are renaming multiple tables from a single schema, add all of them in the same Tables array. 

 I would try to create a small video some time and share the link.

Until next Cheers!


 

 


Tuesday, January 25, 2022

Tips for faster angular Development

  • Use Host Module Replacement
    • ng serve --hmr  
  • Open browser automatically
    • ng serve --hmr -o
  • Have multiple terminal Open in VS Code.

Thursday, January 20, 2022

Angular Error - Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime

Mostly this happens when there is conflict in the npm version installed vs the version which is your project using.

Best way worked for me is to uninstall node-saas and install saas. 

Commands to follow


1. npm uninstall node-sass

2. npm install sass

Thanks!



Wednesday, September 8, 2021

Administer Port Exclusion

 There might be instances when you cannot use a port. You end up getting the error that port is in use. However, no process using that port. 

That could be because those ports might be reseverd. you can check it using the following command

netsh int ip show excludedportrange protocol=tcp

If you see your port there, you can clear those reservation using the following command

net stop winnat