Skip to content
vp.Ven Petrov
WorkAI demoWritingResourcesResume / CVAboutAt a glance
← Projects & notes
ctxforgeProject story · 4 min read

ctxforge: turn “add search” into a task an agent can build

“Add search” leaves decisions about data, matching and behavior unanswered. I built an editable toolkit that asks an LLM to uncover those requirements and show its assumptions before a coding agent starts.

Ven PetrovPublic toolkitOpen project

“Add search” sounds like a task, but leaves a lot undecided. What can be searched? Should a misspelling still find a result? Does searching start while someone types or after they press a button? An agent that starts coding has to make those choices somewhere, even if nobody has discussed them.

I built ctxforge to bring that discussion before implementation. The idea is to use an LLM's engineering knowledge as an interviewer: ask relevant questions, uncover constraints and turn a loose idea into an agreed task.

The public experimental toolkit installs editable Markdown instructions and project notes through a Node command-line tool. It provides a process for the conversation. It does not enforce the resulting scope or guarantee that the model will follow it.

Ask the questions that change what gets built

The README uses search as a teaching example. Its questions cover the data, number of items, matching, when results should appear, acceptable response time and accessibility.

The answers can lead to quite different work. Searching a small list of names on demand has different requirements from searching a large catalogue while someone types, including misspellings. Calling both “search” would hide the decisions the implementation needs.

For a new project, the entry document starts with its vision, technical foundation and the first thing a user should be able to do. It then selects a task-specific protocol for more detail. For a bug, the questions change: the core document's duplicate-search example asks how to reproduce it and whether it happens consistently or intermittently. It directs the assistant toward investigation.

Both search examples belong to the repository's explanation. They are not reported client incidents or benchmark results.

The intended outcome is an agreed task with expected behavior, constraints and open decisions. A coding agent can then work from those answers instead of silently supplying its own.

Show the assumptions while they can still be corrected

The core instruction is explicit:

Make ALL technical assumptions explicit
Show confidence levels (HIGH/MEDIUM/LOW)
Present inferences BEFORE writing any code
Wait for human approval/correction

This excerpt is from CORE.md. After questioning, the assistant should state what it inferred before it implements anything. A proposal about storage, matching or an error case is then available for the person to correct.

The confidence words help identify an assumption. They are not measured probabilities and do not make it true. The person still has to judge whether the proposal matches what they need.

Load the questions for the current task

  1. 01CORE.mdIdentify the request type
  2. 02One protocolRead its discovery questions
  3. 03AssumptionsShow confidence and unresolved choices
  4. 04project.mdSave decisions for the next session
The CLI installs the documents. Their routing and questioning rules are instructions for the assistant, not enforced runtime controls.

I have challenged unsupported precision in related work too. In a separate narrative-agent discussion, I asked for the evidence behind a 1,500-token budget and four calls per day. The assistant acknowledged they were estimates and revised the document toward configurable starting values. That exchange supports questioning defaults; it is not a result achieved by ctxforge.

Keep the agreed context available for the next session

The toolkit installs six core documents and 16 task protocols. An entry document chooses the relevant protocol, so the assistant need not load every workflow for each request.

Project decisions and learnings live in project.md. Its initial structure records the vision, stack, current focus and next task. The initializer preserves an existing copy. After a task, the instructions ask for a state snapshot describing what changed, what is current and what a later session needs to know.

A later session can use that state to recover the project and current task. Older discussion can leave the active context while relevant decisions remain available. Reload instructions return the assistant to the core protocol, project state and quality directives. These are instructions to the assistant, rather than a runtime memory guarantee.

The explanation needed work too

Programmers I showed the toolkit to did not fully understand its README, even though they were experienced. I asked for simpler examples without bragging. That was a useful check on whether I could explain the purpose independently of the file structure and terminology.

The implemented result is a public, editable framework with CLI checks and protocols that can be inspected and tried. The reason to try it is concrete: make the questions and assumptions visible before handing a task to a coding agent. I have not established a controlled reduction in mistakes, delivery time, hallucinations or token use.

Project sources & checks
Original README feedback

The user says skilled programmers shown the work did not fully understand the README, and asks for clearer examples without bragging.

Public implementation ↗

Version 3.1.2 contains the Node initializer, six core documents and 16 task protocols. CORE.md defines questioning, intent routing, explicit assumptions, project snapshots and reload instructions.

Protocol excerpt ↗

The excerpt below is from CORE.md. Search and duplicate-result examples are repository teaching examples, not reported production incidents or benchmark results.

Related context-design exchange

In a separate narrative-agent research conversation, the user challenges the basis for a 1,500-token budget and four calls per day. The assistant admits those were estimates and revises the document toward configurable starting values.

Evaluation scope

An implemented experimental toolkit and existing CLI checks, without a controlled productivity, token-saving or hallucination-reduction benchmark.

On this page
Ask the questions that change what gets builtShow the assumptions while they can still be correctedKeep the agreed context available for the next sessionThe explanation needed work tooSources & checks
LLMsContext engineeringNode.jsOpen source

Connected to this

All writing
Between Us · Project story

Between Us: keeping control of a generated film

Restaurant-service voice agent · Experiment

Designing a restaurant-service call around the real offer

Ven PetrovSoftware engineer · Barcelona
GitHub ↗LinkedIn ↗Email ↗

Find a project or a note

18 results

Transfutur ERP · ExperienceERP for transport and logisticsAs the sole engineer, I built an ERP from zero for transport and logistics. It supported roughly €5–6 million in annual invoicing across two offices, and I kept it running for about a year.Finance evidence desk · Project storyCan an AI reviewer improve a financial explanation?A finance review needs the right explanation as well as the right numbers. I tested one AI analyst, an added reviewer and self-review on the same public report. The added review produced fewer supported answers.Financial review lab · Project storyWhat contributed to an $86 million rise in operating income?I built a financial-report explorer around a question I could check: how did seven income-statement movements add up to an $86 million increase? The same source now supports comparisons of sales, cash flow and reported versus core results.MNQ time-series research · ExperimentA time-series model that failed on later dataA model gained about $2,351 in the research simulation, then lost about $1,728 in three later windows. I followed the experiment from data acquisition and time intervals to costs, evaluation and the decision to reject it for trading.Crude-oil narrative tracker · Project storyFollowing crude-oil news without losing the market numbersI used a short personal experiment to follow global events alongside crude-oil prices and position values. The prototype calculates the numbers before asking Claude Code for an assessment and keeps a limited recent history.NQ/MNQ backtest engine · Technical noteYesterday’s short was blocking today’s trades in the simulatorWhen input stopped before the scheduled close, the strategy forgot a position but a shared counter kept counting it. Closing the old position before resetting the day restored the trade record and released the block.Small-cap edge research · Project storyWhat would make a small-cap price pattern worth testing?I built a Python and DuckDB prototype to turn trading ideas into named tests, compare their costs and revisit them in later periods. The candidates deteriorated under further checks, and the source exposed a misleading pass flag.Gadgeon Europe applications · ExperienceConnected-device dashboards and mobile apps at Gadgeon EuropeThe dashboards let people monitor energy use and control connected devices through data from several APIs. My work covered customized Ionic and Angular apps, integrations, store releases and maintenance.ctxforge · Project storyctxforge: turn “add search” into a task an agent can build“Add search” leaves decisions about data, matching and behavior unanswered. I built an editable toolkit that asks an LLM to uncover those requirements and show its assumptions before a coding agent starts.Sociedades Inactivas enquiries · Technical noteAn enquiry should survive a failed emailA failed notification should not make someone submit the same enquiry twice. The implemented form keeps the saved request and its reference while email delivery is retried; live activation is still pending.Astro local-services website · Project storyKeeping local service pages and their FAQs consistentA city page should only offer services enabled for that location. I used shared Astro templates with explicit availability rules, and one FAQ selection for both the visible page and its structured data.3D Spaces website migration · Project storyMoving 3D Spaces without moving its mailboxThe website could move to Next.js and Vercel, while email still depended on the old host. I carried over the pages, enquiry flow and analytics, then checked what the cutover had actually preserved.Capture CRM · Project storySave the listing now, connect the person when the details arriveA classified listing may arrive before its phone number or contact name. Capture CRM keeps those records separate, then lets a later capture complete the existing listing and bring contact status back to the browsing page.Product-description comparison bench · ExperimentWhere did the product description get that detail wrong?A product description can go wrong when the image is read or when the copy is written. This local bench exposes both steps, lets me switch models and records request measurements. A matched quality comparison is still unfinished.Between Us · Project storyBetween Us: keeping control of a generated filmA more emotional dialogue take still needed convincing acting and framing. I kept the alternatives, widened shots to reveal gestures and changed the workflow when its studio limited the films I wanted to make.Restaurant-service voice agent · ExperimentDesigning a restaurant-service call around the real offerThe first correction was the offer: a paid service had become a free visit in one draft. I then compared how the Spanish voice-agent prompts handled new speakers, technical limits and booking results.Vapi and Telnyx voice integration · Technical noteThe Vapi agent could speak, but it could not hear me clearlyI could hear the assistant, but it could not understand my distorted audio. Three codec tests changed the connection behavior and brought the greeting back; the caller-audio problem remains unresolved.Warloop: Echoes of Solmara · Project storyWarloop: turning generated character art into a playable prototypeGood-looking character images became tiny figures, a backwards walk and misplaced bosses in the game. I worked through the gap between generated art and playable behavior.
esc to close · Tab to move through results