| --- |
| title: ACE–CPT Context Agent |
| emoji: 🧠 |
| colorFrom: blue |
| colorTo: green |
| sdk: gradio |
| sdk_version: "4.44.0" |
| app_file: app.py |
| pinned: false |
| --- |
| |
| # 🧠 ACE–CPT Context Agent (Hugging Face Space) |
|
|
| This Space implements an **ACE-style (Agentic Context Engineering)** workflow, extended with **CPT (Conventional / Paradigmatic Testing)** methodology. |
| It runs entirely inside a **Gradio** interface that models the full loop: |
|
|
| > **Generator → Reflector → Curator → CEM (Claim–Evidence Matrix)** |
|
|
| The agent can generate reasoning traces, extract reusable deltas, merge them into a living playbook, and record evidence links — all within one session. |
|
|
| --- |
|
|
| ## ⚙️ Features |
|
|
| - 🧩 **Seed Playbook** — structured YAML of atomic heuristics and checklists |
| - 🔁 **Incremental Deltas** — localized updates instead of full rewrites |
| - 🪞 **Reflector Module** — evidence-bound YAML deltas |
| - 🗂 **Curator** — deterministic merge & diff logging |
| - 🧾 **Claim–Evidence Matrix (CEM)** — editable Pandas DataFrame |
| - 🧘 **Stillness-First workflow** — for CPT contextual awareness |
|
|
| The app starts with a stubbed Generator (no API keys required). |
| You can later connect any open-weight model from `transformers`. |
|
|
| --- |
|
|
| ## 🚀 Run Locally |
|
|
| ```bash |
| pip install -r requirements.txt |
| python app.py |
| Then open the printed Gradio URL in your browser. |
| |
| 📦 File Structure |
| app.py → main Gradio interface |
| playbook.yaml → seed context / memory |
| cem.csv → Claim–Evidence Matrix |
| requirements.txt → dependencies |
| README.md → this file |
| |
| |
| All files live in the main directory of your Space (no subfolders needed). |
| |
| 🧭 How It Works |
| Phase Description |
| Generator Runs the current task using the Playbook and records a reasoning trace. |
| Reflector Extracts small, auditable lessons (Δ-items) as YAML deltas. |
| Curator Merges deltas deterministically, prunes duplicates, and logs changes. |
| CEM Links claims to their supporting or counter-evidence for CPT analysis. |
| |
| This prototype is fully self-contained; it does not call external APIs or models unless you add them. |
| |
| 🪶 License & Attribution |
| |
| © 2025 Daniel Fenge — released under CC BY-NC 4.0 |
| |
| This implementation is an independent prototype inspired by: |
| |
| Zhang et al. (2025), Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models, |
| Stanford University & SambaNova Systems. arXiv:2510.04618 |
| |
| All ACE–CPT integrations, CPT questions (2.11–2.17), and Stillness-First workflow are original extensions. |
| |
| 💡 Notes |
| |
| This Space is designed for research and educational use. |
| |
| Feel free to fork and adapt under the same CC BY-NC terms. |
| |
| To ensure persistence, keep playbook.yaml and cem.csv in your repo. |
| |
| |