r/ContextEngineering • • 17h ago

I built PromptPump: a local CLI that turns a one-line request into a structured, repo-aware prompt (Ollama, no API keys)

Thumbnail
gallery
5 Upvotes

Hey everyone, I've been working on PromptPump, an open-source CLI that takes a short request and compiles it into a structured, context-rich prompt you can paste into any AI assistant. It runs 100% locally on Ollama, so there are no API keys and your prompts and code never leave your machine.

The problem: A request like "add a pause menu" or "a fox in a snowy forest" leaves a lot unspecified. A good prompt needs structure (role, objective, constraints, output format) and context (what your project actually looks like). Writing that by hand every time is slow, so most of us skip it.

What it does

promptpump run "add source citations to each RAG answer" --stack fastapi
  • Three modes: code, image, and content (stories, scripts, articles). Each has its own schema. Code covers role, measurable objective, success criteria, scope, and output format. Image covers subject, style, composition, and lighting. Content covers audience, structure, voice, and boundaries.
  • Repo-aware code prompts: for ongoing projects it scans your workspace and injects the file tree, key files, and a symbol outline (Python via ast; JS/TS and Go via regex), packed into a token budget by BM25 relevance to your request. It tells the model to reuse existing functions instead of reinventing helpers.
  • Grounding and validation: the context section is overwritten with deterministic scan facts, and the output is checked for unsupported file or function references. Missing sections trigger a repair attempt, and unknowns are listed under "Assumptions (verify before coding)."
  • Stack profiles: 60+ built-in rule sets (FastAPI, Django, React, PyTorch, Docker, and more) that you can combine with --stack.
  • Safe by default: respects .gitignore, never reads .env, keys, or credentials, doesn't follow symlinks, and makes no network calls except to your Ollama server.
  • Transparent: --dry-run shows exactly what the model would receive, and --stats shows the token budget and the input reduction versus pasting the whole repo.
  • Built-in telemetry: promptpump telemetry measures TTFT, tokens/sec, and peak GPU memory on your hardware.

Does it actually help? Honest answer: early signal, not proof. I ran a small pilot with three synthetic Python tasks, one generation each, all on qwen2.5-coder:7b, scored by pytest:

Raw requestFull repo dumpPromptPump
Tasks passed0/32/3

That's far too small to claim a general quality win, so I'm treating it as a hypothesis. The benchmark harness, fixtures, and raw results are in the repo if you want to poke holes in it or add tasks.

Hardware note: it runs fine on modest machines. On my 6 GB RTX 3050 laptop, the 7B model decodes at about 18 tokens/s, while a 14B model spills to CPU and drops to about 3 tokens/s.

Install

pipx install promptpump
promptpump doctor

Python 3.10+ and Ollama required. MIT licensed.

GitHub: https://github.com/RiteshNipane/PromptPump

I'd love feedback on the prompt schemas, what stack profiles or benchmark tasks to add, and whether the repo-context approach holds up on your projects. Happy to answer questions.


r/ContextEngineering • • 1h ago

Release: The Agentic Collaboration Framework (ACF) and Intelligent Context Management (ICM), on an OpenCode v2 fork (MIT)

2 Upvotes

Context compaction is an event that injures an agent's understanding. Each compaction loses detail, and the agent has to recover from it. Repeat it and the loss compounds.

Intelligent Context Management (ICM) replaces compaction. The working agent assesses what it needs for the work ahead and why, then keeps material verbatim, distills tool output, compresses finished work, releases what no longer serves, or leaves its context as it is. Edits change what the model sees, not the saved history. ICM selects content itself only for model input limit overflow protection.

ICM is part of the Agentic Collaboration Framework (ACF), a multi-agent framework for long-horizon work that spans many sessions, where a problem has to be modeled before it can be solved. You work with one primary agent, the Principal. It delegates to Partners, Associates and Assistants, and checks and integrates their work against its working-model, its evolving model of the problem. ACF's instructions are protocols that agents enact as processes, not a rule for each case.

Both run on acf-opencode, our fork of OpenCode v2. Upstream OpenCode v2.2.5 had no place to keep a context plugin's decisions with the session; the fork adds an API that keeps them and applies them whenever the session's history is loaded for the model. It also adds a session Interlink tool, so Principals in different sessions can message and task each other.

The ICM README describes the system, includes an exploratory replay study with its limits, and says what hasn't been measured: https://github.com/DefendTheDisabled/intelligent-context-management

ACF: https://github.com/DefendTheDisabled/agentic-collaboration-frameworkContext compaction is an event that injures an agent's understanding. Each compaction loses detail, and the agent has to recover from it. Repeat it and the loss compounds.

Intelligent Context Management (ICM) replaces compaction. The working agent assesses what it needs for the work ahead and why, then keeps material verbatim, distills tool output, compresses finished work, releases what no longer serves, or leaves its context as it is. Edits change what the model sees, not the saved history. ICM selects content itself only for model input limit overflow protection.

ICM is part of the Agentic Collaboration Framework (ACF), a multi-agent framework for long-horizon work that spans many sessions, where a problem has to be modeled before it can be solved. You work with one primary agent, the Principal. It delegates to Partners, Associates and Assistants, and checks and integrates their work against its working-model, its evolving model of the problem. ACF's instructions are protocols that agents enact as processes, not a rule for each case.

Both run on acf-opencode, our fork of OpenCode v2. Upstream OpenCode v2.2.5 had no place to keep a context plugin's decisions with the session; the fork adds an API that keeps them and applies them whenever the session's history is loaded for the model. It also adds a session Interlink tool, so Principals in different sessions can message and task each other.

The ICM README describes the system, includes an exploratory replay study with its limits, and says what hasn't been measured: https://github.com/DefendTheDisabled/intelligent-context-management

ACF: https://github.com/DefendTheDisabled/agentic-collaboration-framework


r/ContextEngineering • • 10h ago

Workflow folks: how do you prove a run actually finished the job, not just finished green?

1 Upvotes

I used to trust the green check way too much. A scheduled workflow of mine would finish clean, no errors anywhere, and I would move on. Then one morning I opened the destination out of boredom and found a chunk of the items just were not there. The run had not failed, exactly. It had done most of the job and quietly skipped the rest, and the success status told me nothing about that.

That one cost me a stupid amount of time, because I had to work backwards through days of "successful" runs trying to figure out which ones actually landed and which ones only looked like they did.

I got tired of that, and honestly tired of re-briefing every new run on what the last one did, so I built something to fix that side of it for myself. Not selling anything here. I am just trying to find out whether the checking part is a real problem for other people too, or whether everyone else already solved this and I was just sloppy.

So what do you check beyond the green execution? Do you read back from the destination and compare, count what went in against what came out, run some kind of reconciliation pass later? Or do you mostly trust the status and only dig in when a human complains?

And the partial thing specifically. Has a run ever reported success while only part of the work landed, like most items made it and a few silently did not? What did that cost you when you found it, and how long had it been happening?

One more I keep wondering about. Have you ever broken a run on purpose just to prove your check actually fires? A check that has never failed feels a lot like a hope to me, but maybe I am overthinking it.

What if something handled all of this for you, in the cloud over MCP, so every agent and tool got the same context: decisions, failed attempts, conversations, skills, procedures, tasks. You never touch a file again. Would you guys pay for something that fixes this? Have you ever thought about paying for a tool to manage all of this for you, or has the thought never crossed your mind?


r/ContextEngineering • • 14h ago

Long-Term memory structure

Post image
2 Upvotes

Posted originally in r/EverMindAI