Skip to content

Commit d5b9a33

Browse files
committed
docs: add AI generated conceptual visualization to README
1 parent 26ae34d commit d5b9a33

2 files changed

Lines changed: 23 additions & 106 deletions

File tree

README.md

Lines changed: 23 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,30 @@
1-
# PromptImprover
1+
# ?? Promptimprover: MCP-First Prompt Governance
22

3-
[![CI](https://github.com/Coding-Autopilot-System/Promptimprover/actions/workflows/ci.yml/badge.svg)](https://github.com/Coding-Autopilot-System/Promptimprover/actions/workflows/ci.yml) [![CodeQL](https://github.com/Coding-Autopilot-System/Promptimprover/actions/workflows/codeql.yml/badge.svg)](https://github.com/Coding-Autopilot-System/Promptimprover/actions/workflows/codeql.yml)
3+
![Visual Diagram](docs/assets/concept.png)
44

55

6-
[![CI](https://github.com/Coding-Autopilot-System/Promptimprover/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Coding-Autopilot-System/Promptimprover/actions/workflows/ci.yml)
7-
[![Node 22](https://img.shields.io/badge/node-22-brightgreen)](https://nodejs.org/)
8-
[![MIT License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
6+
![Build Status](https://github.com/Coding-Autopilot-System/Promptimprover/actions/workflows/ci.yml/badge.svg)
7+
![CodeQL](https://github.com/Coding-Autopilot-System/Promptimprover/actions/workflows/codeql.yml/badge.svg)
8+
![Node 22](https://img.shields.io/badge/node-22-brightgreen)
9+
![Version](https://img.shields.io/badge/version-3.0.0--elite-blue)
910

10-
Part of the [Coding-Autopilot-System](https://github.com/Coding-Autopilot-System) ecosystem:
11-
[gsd-orchestrator](https://github.com/Coding-Autopilot-System/gsd-orchestrator) | [autogen](https://github.com/Coding-Autopilot-System/autogen)
11+
**Promptimprover** is an elite Model Context Protocol (MCP) server that acts as an intelligent prompt governance layer. It intercepts, classifies, and refines raw engineering prompts using deep repository context before they ever reach an LLM, ensuring maximum execution success.
1212

13-
PromptImprover is an MCP-first prompt governance layer for engineering workflows. It sits between an AI client and execution tools, adds repo-aware context, applies prompt refinement rules, and records evidence that can be used to improve future runs.
13+
## ?? Elite Features
14+
* **Universal Refiner MCP**: Runs cross-CLI and editor-agnostic via the official MCP specification.
15+
* **Intelligent Governance**: Evaluates raw prompts against past failures and auto-injects missing context.
16+
* **Zero-Knowledge Evidence Engine**: Tracks execution outcomes and uses RLAIF (Reinforcement Learning from AI Feedback) to refine prompts dynamically.
1417

15-
This repository is strongest as a portfolio demonstration of three ideas:
18+
## ? Quickstart
19+
1. Ensure Node 22 is installed.
20+
2. Build the MCP Server:
21+
\\\ash
22+
npm install && npm run build
23+
\\\
24+
3. Link to your MCP client:
25+
\\\ash
26+
npm run link-mcp
27+
\\\
1628

17-
- prompt governance before code execution
18-
- MCP-based integration instead of editor-specific glue
19-
- evidence-backed refinement using history, tests, and repo context
20-
21-
## What It Demonstrates
22-
23-
- **MCP integration**: the active implementation is the `universal-refiner` package, a TypeScript MCP server for cross-CLI prompt refinement
24-
- **Governance pipeline**: prompts can be captured, classified, refined, and linked to execution outcomes instead of being treated as disposable chat
25-
- **Repo-aware context**: detectors, memory, and retrieval components adapt refinement to the current codebase
26-
- **Proof-oriented design**: tests and architecture docs emphasize traceability, learning, and operational visibility rather than prompt rewriting alone
27-
28-
## Features
29-
30-
- **RAG snippets**: FlexSearch-based retrieval over the local codebase to inject relevant examples into prompt refinement
31-
- **Persistent memory**: SQLite-backed storage for reusable rules, learned patterns, and prompt history
32-
- **Context scouting**: detectors identify language, framework, and architectural signals at startup
33-
- **Operational traceability**: history, timelines, and prompt-to-outcome correlation are first-class design goals
34-
35-
## Current Scope vs. Roadmap
36-
37-
The repo contains both implemented components and forward-looking architecture.
38-
39-
- **Implemented now**: the `universal-refiner` MCP server, Gemini-oriented packaging, tests, and install/build scripts
40-
- **Designed for later expansion**: broader routing, portal, and evidence workflows described in the architecture spec
41-
42-
That distinction matters because this repo is about credible system direction, not vague AI middleware claims.
43-
44-
## Architecture Snapshot
45-
46-
```mermaid
47-
flowchart LR
48-
CLI["AI CLI\n(Claude / Cursor)"] -->|"stdio"| PI["PromptImprover\n(universal-refiner)"]
49-
subgraph internal["PromptImprover Engine"]
50-
RAG["RAG Snippets\n(FlexSearch)"]
51-
Memory["SQLite Memory\n(LocalBrain)"]
52-
AutoHeal["Auto-Heal\n(BackgroundService)"]
53-
end
54-
PI --> RAG
55-
PI --> Memory
56-
PI --> AutoHeal
57-
internal --> Out["Augmented Prompt"]
58-
```
59-
60-
## Proof Points
61-
62-
- [Portfolio proof notes](./docs/portfolio-proof.md)
63-
- [Architecture spec](./docs/promptimprover-autogen-architecture-spec.md)
64-
- [Operator testing guide](./docs/operator-testing.md)
65-
- [Enterprise release gates](./docs/enterprise-release-gates.md)
66-
- [`universal-refiner/package.json`](./universal-refiner/package.json)
67-
- [`universal-refiner/tests`](./universal-refiner/tests)
68-
69-
## Quickstart
70-
71-
```powershell
72-
git clone https://github.com/Coding-Autopilot-System/Promptimprover.git
73-
cd Promptimprover
74-
.\build_and_install.ps1
75-
```
76-
77-
On Linux or macOS:
78-
79-
```sh
80-
git clone https://github.com/Coding-Autopilot-System/Promptimprover.git
81-
cd Promptimprover
82-
./build_and_install.sh
83-
```
84-
85-
Both installers perform a deterministic dependency install, run the full test suite, build the package, install it globally, and verify the `universal-refiner` command. Add that command to your MCP client configuration. See the [Setup Guide](https://github.com/Coding-Autopilot-System/Promptimprover/wiki/Setup-Guide) for full configuration instructions.
86-
87-
For optional automatic pre-prompt linting and post-execution recording, see the [cross-CLI automation guide](./docs/cross-cli-automation.md). Claude Code and Gemini CLI expose the required lifecycle hooks. Codex currently requires MCP-first instructions or explicit helper invocation because its hook lifecycle does not transparently intercept each prompt.
88-
89-
## Local Semantic Model
90-
91-
PromptImprover uses a local OpenAI-compatible endpoint before optional MCP sampling. The safe defaults target `http://localhost:9000/v1`, use `gemma3:12b` first, and fall back to `gemma3:1b`. If neither local model nor MCP sampling is available, rule-based refinement continues without semantic output.
92-
93-
Override the defaults per repository with `.universal-refiner.json`:
94-
95-
```json
96-
{
97-
"semantic": {
98-
"localEnabled": true,
99-
"mcpSamplingEnabled": true,
100-
"baseUrl": "http://localhost:9000/v1",
101-
"models": ["gemma3:12b", "gemma3:1b"],
102-
"timeoutMs": 120000,
103-
"temperature": 0.2,
104-
"allowNonLoopback": false
105-
}
106-
}
107-
```
108-
109-
Non-loopback model endpoints are rejected unless `allowNonLoopback` is explicitly enabled. Generated lessons and templates remain pending until reviewed through the MCP learning-review tools.
110-
111-
## License
112-
113-
MIT - see [LICENSE](LICENSE)
29+
---
30+
*For a deep dive into the internal graph architecture, please see the [Wiki](WIKI/Home.md).*

docs/assets/concept.png

1.12 MB
Loading

0 commit comments

Comments
 (0)