chore: scaffold PYRE MVP monorepo (structure + docs)
pnpm + TypeScript workspace per design doc §13:
- apps/{web,api,worker} skeletons (Next.js 16, Fastify 5, BullMQ)
- packages/{core,solana,prometheus,db,config} (core has real types/DTOs;
solana/prometheus are stubs)
- programs/pyre-core placeholder (future Anchor, v1.0)
- docs/: PYRE_MVP_DESIGN (canonical), ARCHITECTURE, SECURITY, TOKEN_CLASSIFICATION
- CLAUDE.md, README, .env.example (no private-key var by design)
Skeleton + docs only — no Solana/business logic yet. All workspaces typecheck clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
36
packages/prometheus/README.md
Normal file
36
packages/prometheus/README.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# @pyre/prometheus
|
||||
|
||||
AI generation logic for the Prometheus meta mixer.
|
||||
|
||||
## Purpose
|
||||
|
||||
Generates Spawn **identity** (name, ticker, lore, image prompt, metadata) from
|
||||
cleanup receipts. Per §13 its responsibilities are:
|
||||
|
||||
- Prompt templates.
|
||||
- Meta mixer.
|
||||
- Output parser.
|
||||
- Safety checks.
|
||||
- Image-prompt generator.
|
||||
|
||||
See §9 (meta mixer) and §10 (Pump.fun creator workflow). Prometheus never
|
||||
controls funds; it only produces creative identity for **manual, human-reviewed**
|
||||
launch in the MVP.
|
||||
|
||||
## Design rules
|
||||
|
||||
- Meta influence is probabilistic, not deterministic.
|
||||
- Produce inspired mutations, not direct clones — reject exact copyrighted or
|
||||
existing meme identities.
|
||||
|
||||
## Status
|
||||
|
||||
**Stubs only.** Every exported function throws `Error("not implemented")`.
|
||||
|
||||
## TODO
|
||||
|
||||
- Implement `buildPrompt`, `runMetaMixer`, `parseOutput`, `runSafetyChecks`,
|
||||
`generateImagePrompt`.
|
||||
- The AI client (Anthropic / OpenAI / image-gen provider) is configured via
|
||||
`@pyre/config` and injected here. This package adds **no** SDK dependencies of
|
||||
its own.
|
||||
20
packages/prometheus/package.json
Normal file
20
packages/prometheus/package.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "@pyre/prometheus",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"lint": "echo \"lint: ok (placeholder)\"",
|
||||
"test": "echo \"test: ok (placeholder)\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@pyre/core": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.7.2"
|
||||
}
|
||||
}
|
||||
72
packages/prometheus/src/index.ts
Normal file
72
packages/prometheus/src/index.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* @pyre/prometheus — AI generation logic (STUBS ONLY).
|
||||
*
|
||||
* Responsibilities (§13): prompt templates, the meta mixer, output parser,
|
||||
* safety checks, and the image-prompt generator. See §9 (Prometheus AI Meta
|
||||
* Mixer) and §10 (Pump.fun Creator Workflow) of `docs/PYRE_MVP_DESIGN.md`.
|
||||
*
|
||||
* Design notes:
|
||||
* - Prometheus generates Spawn *identity* only — it never controls funds.
|
||||
* - Meta influence is probabilistic, not deterministic.
|
||||
* - Do not allow users to force exact copyrighted/existing meme identities;
|
||||
* produce inspired mutations, not direct clones.
|
||||
*
|
||||
* TODO: the AI client (Anthropic / OpenAI / image-gen provider) is configured
|
||||
* via `@pyre/config` and injected here — this package adds NO SDK dependencies
|
||||
* of its own. Wire the client through function parameters or a small interface.
|
||||
*
|
||||
* Nothing here is implemented yet — every function throws "not implemented".
|
||||
*/
|
||||
import type { PrometheusInput, PrometheusOutput } from "@pyre/core";
|
||||
|
||||
const NOT_IMPLEMENTED = "not implemented";
|
||||
|
||||
/**
|
||||
* Build the text-generation prompt from mixer input.
|
||||
*
|
||||
* TODO: apply prompt templates and the probabilistic meta-influence weighting
|
||||
* (burned archetypes / Essence themes / chaos mutation / operator seed).
|
||||
*/
|
||||
export function buildPrompt(_input: PrometheusInput): string {
|
||||
throw new Error(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the meta mixer end-to-end: build prompt, call the AI client, parse, and
|
||||
* run safety checks, producing a Spawn package.
|
||||
*
|
||||
* TODO: orchestrate buildPrompt -> AI client -> parseOutput -> runSafetyChecks.
|
||||
* The AI client is injected (configured via @pyre/config).
|
||||
*/
|
||||
export function runMetaMixer(_input: PrometheusInput): Promise<PrometheusOutput> {
|
||||
throw new Error(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a raw model response into a structured `PrometheusOutput`.
|
||||
*
|
||||
* TODO: validate/normalize the model JSON into the output schema.
|
||||
*/
|
||||
export function parseOutput(_raw: string): PrometheusOutput {
|
||||
throw new Error(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run safety/compliance checks over generated output.
|
||||
*
|
||||
* TODO: moderation + copyright/clone guards; return risk flags. Must reject
|
||||
* attempts to clone exact copyrighted or existing meme identities.
|
||||
*/
|
||||
export function runSafetyChecks(_output: PrometheusOutput): Promise<string[]> {
|
||||
throw new Error(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an image prompt for the Spawn artwork.
|
||||
*
|
||||
* TODO: derive an image prompt from the Spawn identity, honoring the same
|
||||
* anti-clone safety rules.
|
||||
*/
|
||||
export function generateImagePrompt(_output: PrometheusOutput): string {
|
||||
throw new Error(NOT_IMPLEMENTED);
|
||||
}
|
||||
8
packages/prometheus/tsconfig.json
Normal file
8
packages/prometheus/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in New Issue
Block a user