Skip to content

Prometheus-AGS/prometheus-skill-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

177 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prometheus Skill Pack

A self-improving AI skill execution engine. Production-grade skills across 8 language domains, a 4-layer PMPO orchestration pipeline, a Karpathy knowledge learning loop, a code-generation enrichment engine (forge-rs), a native agent generator, and Cedar-governed self-optimization.

Built for teams deploying AI agents in production where capability improvement must be governed, audited, and reproducible.

Validate Skills


The 4-Layer Pipeline

Every piece of work flows through four layers. Each layer feeds the next.

┌─────────────────────────────────────────────────────────────────┐
│  LAYER 1: ZeeSpec Interrogator                                  │
│  Zachman Framework 5W1H — 60 questions across 6 dimensions     │
│  GO / CAUTION / NO-GO constraint manifest                       │
│  skills/process/zeespec-interrogator/                           │
└─────────────────────────┬───────────────────────────────────────┘
                          │ constraint manifest
                          ▼
┌─────────────────────────────────────────────────────────────────┐
│  LAYER 2: PMPO Orchestration                                    │
│  iterative-evolver (strategic) + kbd-process-orchestrator       │
│  Assess → Analyze → Plan → Execute → Reflect                    │
│  Named cross-session state · surreal-memory · Cedar governance  │
└─────────────────────────┬───────────────────────────────────────┘
                          │ task manifests
                          ▼
┌─────────────────────────────────────────────────────────────────┐
│  LAYER 3: OpenSpec Change Management                            │
│  Per-change proposals · GIVEN/WHEN/THEN acceptance criteria     │
│  Audit trail · Change-scoped documentation                      │
│  tools/liter-llm — per-phase model routing                      │
└─────────────────────────┬───────────────────────────────────────┘
                          │ enriched implementation context
                          ▼
┌─────────────────────────────────────────────────────────────────┐
│  LAYER 4: forge-rs (Code Enrichment Engine)                     │
│  Language detection → skill resolution → constitution check     │
│  pk focus (Karpathy context) → Tera template rendering          │
│  → .forge/enriched/<task>.context.md → AI agent implements      │
│  → forge reflect → pk ingest (Karpathy learning loop)           │
│  tools/forge-rs/ · tools/prometheus-knowledge/                  │
└─────────────────────────────────────────────────────────────────┘

Native Agent Generator

The skill pack includes /create-native-agent — a project scaffold that generates a complete, production-ready Rust agent binary in one command.

/create-native-agent
→ prompts for name, description, provider, port
→ generates a complete Rust workspace + React 19 frontend
→ validates with cargo check + npm install
→ ready to run

What the Generated Agent Provides

my-agent start [--port 8080] [--background]   # Supabase-style management CLI
my-agent stop / status / logs
my-agent mcp add forge http://localhost:8943/mcp
my-agent skills list / reload
my-agent providers list / set-default anthropic
my-agent models set-default claude-haiku-4-5
Feature Details
A2A protocol Agent card at /.well-known/agent.json, task endpoint at /a2a/tasks
AG-UI protocol SSE stream at /agui/events/:run_id with agui.* events (CopilotKit compatible)
A2UI protocol Prometheus combined protocol at /a2ui/session
Chat API OpenAI-compatible at /api/chat
React 19 frontend assistant-ui Thread with AG-UI SSE streaming, provider/model switcher
MCP client Connects to configured MCP servers (forge-rs, surreal-memory, pk, custom)
Skills engine TF-IDF selection from configured skill directories, hot-reloadable
liter-llm routing All model calls go through liter-llm for multi-provider support

Agent Networks

Multiple generated agents can form a network by pointing at each other's A2A endpoints:

research-agent (:8081) ←──── A2A ────→ forge-agent (:8080)
       ↓                                      ↓
  surreal-memory (:23001)              prometheus-knowledge (:8942)

See skills/process/native-agent/references/protocols.md for the full protocol spec.


Repository Structure

prometheus-skill-pack/
├── skills/                      ← All skill manifests + Tera templates
│   ├── process/                 ← Orchestration skills (PMPO pipeline)
│   │   ├── native-agent/            ← Native agent generator (/create-native-agent)
│   │   ├── zeespec-interrogator/    ← Layer 1: constraint interrogation
│   │   ├── iterative-evolver/       ← Layer 2: strategic PMPO loop
│   │   ├── kbd-process-orchestrator/ ← Layer 2: tactical KBD loop
│   │   ├── pmpo-skill-creator/      ← Skill generation via PMPO
│   │   └── liter-llm-bridge/        ← Multi-model routing bridge
│   ├── rust/                    ← Rust language skills + Tera templates
│   ├── react/                   ← React 19 skills + entity-management
│   ├── flutter/                 ← Flutter + Rust FFI skills
│   ├── tauri/                   ← Tauri desktop skills
│   ├── htmx/                    ← HTMX + Alpine.js + Lit skills
│   ├── typescript/              ← TypeScript base patterns
│   ├── go/                      ← Go language skills
│   ├── python/                  ← Python + PyO3 bridge skills
│   ├── architecture/            ← Cross-language CLEAN architecture
│   ├── testing/                 ← BDD testing (Cucumber.js + Playwright)
│   ├── devops/                  ← GitOps CI/CD skills
│   ├── ui-ux/                   ← UI/UX skills
│   ├── documentation/           ← Documentation skills
│   └── imported/                ← Git submodule skills
│       ├── artifact-refiner/        ← PMPO artifact refinement (submodule)
│       └── sycophancy-correction/   ← 8-pattern detection (submodule)
│
├── tools/                       ← Rust workspaces and submodule tools
│   ├── forge-rs/                ← Layer 4: code enrichment engine
│   │   ├── crates/              ← 6-crate Rust workspace
│   │   ├── templates/meta/      ← Meta-templates for generating new templates
│   │   └── constitution-templates/ ← Default language constitutions
│   ├── prometheus-cli/          ← Skill management CLI (4-crate Rust workspace)
│   ├── surreal-memory-server/   ← Knowledge graph + distributed state (submodule)
│   ├── liter-llm/               ← Multi-model routing proxy (submodule)
│   └── prometheus-knowledge/    ← Karpathy learning wiki (submodule)
│
├── shared/references/           ← Cross-skill architecture references
├── agents/                      ← Orchestration agent definitions
├── hooks/hooks.json             ← Lifecycle hooks (5 hook events)
├── policies/                    ← Cedar governance policies
└── .gitmodules                  ← Submodule registry

Skills Reference

Process Skills (skills/process/)

Skill Layer Purpose
native-agent Generator /create-native-agent — scaffolds complete Rust agent workspaces
zeespec-interrogator 1 60-question Zachman 5W1H constraint interrogation, GO/NO-GO manifests
iterative-evolver 2 Strategic PMPO loop: Assess→Analyze→Plan→Execute→Reflect
kbd-process-orchestrator 2 Tactical KBD loop: change management, multi-tool dispatch
pmpo-skill-creator Meta Generates new skills via PMPO
liter-llm-bridge Meta Per-phase model class routing via liter-llm

Language Skills

Rust (skills/rust/)

Skill Templates Purpose
axum-patterns router.rs, app_error.rs, app_state.rs, middleware.rs, handler.rs Axum 0.8 router, extractors, error handling, middleware
error-handling thiserror/anyhow boundary, #[cold] error paths, no unwrap()
async-patterns Arc/RwLock selection, parking_lot, broadcast channels, graceful shutdown
workspace-structure resolver=2, domain-driven crate decomposition, workspace deps
mcp-server JSON-RPC 2.0 dispatch, tool registry, SSE stream, stdio transport
actor-model mpsc-based actor pattern, typed messages, supervision
performance jemalloc, #[cold], MaybeUninit, mem::take, parking_lot

React (skills/react/)

Skill Templates Purpose
react-vite-stack page_component.tsx, feature_hook.ts, store.ts, api_client.ts, entity_hook.ts React 19 + Vite 8 + TanStack + Zustand 5 + shadcn/ui
prometheus-entity-skills Entity graph CRUD, GraphQL, Prisma, realtime sync

Flutter (skills/flutter/)

Skill Templates Purpose
flutter-rust-ffi riverpod_notifier.dart, feature_repository.dart, go_router_config.dart flutter_rust_bridge v2, Riverpod 3.x, GoRouter

HTMX (skills/htmx/)

Skill Templates Purpose
htmx-alpine-lit page.html, lit_component.ts, react_island.tsx, axum_fragment_handler.rs HTMX 2.0.8 + Alpine.js + Lit + HTMX-in-React embedding

Other Languages

Directory Skill Purpose
tauri/ tauri-react-vite Tauri 2 + React 19 + gen_ui_core sharing
typescript/ base-patterns TypeScript 6 strict mode, discriminated unions, Result types, zod
go/ base-patterns Go 1.22 errors, context, slog, module layout
python/ pyo3-bridge PyO3 0.22 Rust-Python bridge, maturin, skill executor generation
architecture/ clean-architecture 4-layer CLEAN model across all languages

forge-rs — Layer 4 Enrichment Engine

forge-rs is the code-generation enrichment engine. It sits between an OpenSpec task and the AI agent that implements it, injecting language-specific knowledge before the agent touches any code.

CLI Reference

forge init                                      # scaffold .forge/ in current project
forge enrich <task-path>                        # enrich an OpenSpec task
forge reflect <iteration-id>                    # process iteration into Karpathy loop
forge drift [--language rust]                   # report stale skill candidates
forge validate <file> --language rust           # check against constitution
forge mcp [--port 8943]                         # start MCP server
forge template new skill <lang> <name>          # scaffold a new skill
forge template new template <skill-path> <name> # add template to existing skill
forge template validate <skill-path>            # check Tera syntax

MCP Server (port 8943)

{ "name": "forge", "url": "http://localhost:8943/mcp", "transport": "sse" }

Tools: forge_enrich, forge_reflect, forge_drift, forge_validate

macOS MCP Services

On macOS, keep the lightweight local MCP services alive as user LaunchAgents for the logged-in account. This gives them the right HOME, PATH, user config, and AI-tool credentials without running system daemons.

# Build/install all local binaries first, including pk-cherry.
bash scripts/check-prerequisites.sh --build-tools

# macOS only: render LaunchAgents into ~/Library/LaunchAgents and start them.
bash scripts/prometheus-services.sh install
bash scripts/prometheus-services.sh load
bash scripts/prometheus-services.sh status

The LaunchAgents manage pk-cherry on 127.0.0.1:8942 and forge mcp on 127.0.0.1:8943. surreal-memory-server remains Docker-managed on 127.0.0.1:23001; the service script only reports whether that port is ready. On Linux, use systemd user services or cron-style scheduled jobs instead of LaunchAgents.


Template System

Template Discovery

forge-rs scans skills/<language>/<skill-name>/templates/*.tera. Each skill's skill.toml declares which templates it contains. Templates are auto-loaded.

Tera Template Variables

Variable Source
{{ "{{" }} task_description {{ "}}" }} From tasks.md in the OpenSpec task folder
{{ "{{" }} task_id {{ "}}" }} Change ID
{{ "{{" }} constitution_summary {{ "}}" }} Active language constitution standards
{{ "{{" }} karpathy_focus {{ "}}" }} Prior knowledge from pk focus <topic>

Meta-Template System

forge template new skill rust my-skill        # scaffold new skill
forge template new template skills/rust/my-skill/ handler.rs  # add template
forge template validate skills/rust/my-skill/ # check Tera syntax

Meta-templates live in tools/forge-rs/templates/meta/:

  • new_skill_toml.tera — generates skill.toml
  • new_skill_md.tera — generates SKILL.md
  • new_tera_template.tera — generates a new .tera file with variable docs
  • new_constitution_toml.tera — generates a language constitution

Architecture Patterns

React: Component → Hook → Store → API

Components compose hooks. Hooks orchestrate stores. Stores own API calls. Components NEVER import stores or call fetch() directly.

Flutter: Widget → Riverpod → Repository → Rust FFI

Widgets watch providers. Notifiers call repositories. Only the Rust FFI repository calls flutter_rust_bridge functions.

HTMX: Server Drives, Alpine Declares, Lit Encapsulates

HTMX returns HTML fragments from the server. Alpine handles local state. Lit encapsulates complex interactive elements. React hosts HTMX islands via HtmxIsland.


Tools

Tool Source Role
tools/forge-rs This repo Layer 4 code enrichment engine
tools/prometheus-knowledge Git submodule Karpathy learning wiki (pk focus/pk ingest)
tools/liter-llm Git submodule Multi-model routing proxy (22 MCP tools)
tools/surreal-memory-server Git submodule Knowledge graph + distributed state
tools/prometheus-cli This repo Skill management CLI + Cedar governance

Getting Started

git clone --recurse-submodules <repo-url>
cd prometheus-skill-pack

# Build all tools
bash scripts/check-prerequisites.sh --build-tools

# macOS service readiness
bash scripts/prometheus-services.sh install
bash scripts/prometheus-services.sh load

# Initialize forge in your project
forge init

# Create your first native agent
/create-native-agent

License

MIT

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors