From 7d4e31d929dcdb40e1772dde5b3154a3d0d7225f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 07:17:19 +0000 Subject: [PATCH 1/2] feat: integrate PDL governance core schema into PEW - Added DecoratorNode, CompatibilityEdge, StackProfile, AblationResult, FrameworkArtifact, and AnalysisRun to app/prisma/schema.prisma - Generated new Prisma client - Updated README.md to reflect new Governance Core layer - Created NON_OBVIOUS_LESSONS.md to document system insights Co-authored-by: projectedanx <238904666+projectedanx@users.noreply.github.com> --- .gitignore | 4 ++ NON_OBVIOUS_LESSONS.md | 14 +++++++ README.md | 23 ++++++++++- app/next-env.d.ts | 3 +- app/prisma/schema.prisma | 89 +++++++++++++++++++++++++++++++++++++++- 5 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 NON_OBVIOUS_LESSONS.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..98346d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +.next +yarn.lock +app/.next diff --git a/NON_OBVIOUS_LESSONS.md b/NON_OBVIOUS_LESSONS.md new file mode 100644 index 0000000..16c81c7 --- /dev/null +++ b/NON_OBVIOUS_LESSONS.md @@ -0,0 +1,14 @@ +# Non-Obvious Lessons & Governance Truths + +## Semantic Saponification and the Projection Tax +1. **The Principle of "Semantic Saponification"**: Over long inference chains (e.g. 128k+ tokens), LLMs inevitably degrade rigid logic into homogenized, boilerplate "corporate" outputs. Without strict syntactic and semantic bounds (the "Negative Space Scaffolding"), an agent's reasoning slowly turns to soap. +2. **The "Projection Tax"**: Forcing an LLM to generate rigid JSON/AST syntax while simultaneously ideating results in a 10-30% drop in reasoning accuracy. By bifurcating inference—generating high-entropy drafts first, then clamping them through a zero-entropy deterministic guard—we bypass this tax. + +## Topological Failure Mapping +1. **The Betti-1 Loop**: When an agent gets caught in a cycle of writing, failing, reverting, and re-writing, it forms a "Betti-1 Loop" (a 1D topological hole in the latent manifold). These must be logged into a Symbolic Scar Archive to create a "repulsive virtual weight" mathematically repelling future iterations from the exact same failure. +2. **Failure-Informed Prompt Inversion (FIPI)**: We do not log errors; we harvest them to inform continuous invariant boundaries. + +## Architecture and Governance +1. **The Rule of Topological Layer Inversion**: Base deterministic layers (CI/CD, package management, schema definitions, and tests) MUST be compiled and established *first*. An architecture cannot be designed without physical bounds. +2. **Paraconsistent Logic over Homogenization**: When faced with conflicting requirements, classical logic crashes. Using Paraconsistent Annotated Logic (PAL2v), the system holds conflicting truths simultaneously (using a semantic Golden Ratio of ϕ≈1.618 to the dominant frame and 1.000 to the subordinate) to maintain structural tension, avoiding the collapse of complex requirements into trivial compromises. +3. **Stigmergic Concurrency**: Agents coordinate via "Epistemic Pheromones"—machine-readable file locks and AST semantic hypervisors to prevent logic shearing and collision during concurrent operations. diff --git a/README.md b/README.md index 4cd4baa..03aeb3b 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,25 @@ prompt_engineering_workbench/ ├── Uploads/ # Raw source research documents and corpus inputs │ ├── app/ # Next.js 15 application +│ ├── app/ +│ │ ├── api/ # API routes +│ │ ├── compare/ # Framework comparison module +│ │ ├── creative/ # Creative prompting workspace +│ │ ├── cross/ # Cross-framework integration +│ │ ├── cxep-simulator/ # Context-to-Execution Pipeline simulator +│ │ ├── evaluate/ # Ablation harness and promotion tracker +│ │ ├── exercises/ # Guided exercises +│ │ ├── geometric/ # Geometric prompt composition +│ │ ├── governance/ # Governance Dashboard and Decorator Registry +│ │ ├── integration/ # Integration mapping tools +│ │ ├── lens/ # LensGPT Deep Prompting workspace +│ │ ├── library/ # Prompt library +│ │ ├── meta/ # Meta-cognitive workspace +│ │ ├── pals-builder/ # PALS Framework builder +│ │ ├── quality/ # Quality evaluation +│ │ ├── role/ # Role Prompting workspace +│ │ ├── stacks/ # Stack Profile selector +│ │ ├── systemic/ # Systemic Analysis workspace │ ├── app/ # App Router pages and layouts │ │ ├── api/ # API routes │ │ ├── compare/ # Framework comparison module @@ -240,9 +259,11 @@ Contributions that are modular, traceable, systematic, and honest about uncertai |---|---| | Research corpus | ✅ Established — 3 core documents, 50+ source studies | | Framework baseline | ✅ Defined — PALS, CxEP, Systemic, Role, LensGPT | +| Governance Core | ✅ Defined — PDL, SCOS, Dichotomic Scaffolds | +| Governance Core | ✅ Defined — PDL, SCOS, Dichotomic Scaffolds | | Contribution rules | ✅ Formalized | | Application — routing | ✅ 14 module routes implemented | -| Application — data layer | 🔄 Prisma schema + NextAuth in place | +| Application — data layer | ✅ Prisma schema (including Governance Core) + NextAuth in place | | Application — UI | 🔄 In active development | | Deployment | 🔜 Not yet documented | diff --git a/app/next-env.d.ts b/app/next-env.d.ts index 40c3d68..830fb59 100755 --- a/app/next-env.d.ts +++ b/app/next-env.d.ts @@ -1,5 +1,6 @@ /// /// +/// // NOTE: This file should not be edited -// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. +// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/app/prisma/schema.prisma b/app/prisma/schema.prisma index 819d111..f2ac159 100755 --- a/app/prisma/schema.prisma +++ b/app/prisma/schema.prisma @@ -5,7 +5,7 @@ generator client { provider = "prisma-client-js" binaryTargets = ["native", "linux-musl-arm64-openssl-3.0.x"] - output = "/home/ubuntu/prompt_engineering_workbench/app/node_modules/.prisma/client" + output = "../node_modules/.prisma/client" } datasource db { @@ -236,3 +236,90 @@ model ResearchAnalytics { @@map("research_analytics") } + +// Governance Core Models + +model DecoratorNode { + id String @id @default(cuid()) + className String // e.g. Privilege, Security Boundary, etc. + ring Int // e.g. 0, 1, 2, 3 + syntax String + mechanism String + nullBaselineTrigger String + metabolicROI String + orthogonalityConfidence String // "DIRECT", "INFERRED", "SPECULATIVE" + evidenceRefs String[] + activationTier String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@map("decorator_nodes") +} + +model CompatibilityEdge { + id String @id @default(cuid()) + fromId String + toId String + edgeType String // "HARD_MUTEX", "SOFT_MUTEX", "CONDITIONAL_MUTEX", "REQUIRES", "SEQUENCING_CONFLICT" + condition String? + rationale String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@map("compatibility_edges") +} + +model StackProfile { + id String @id @default(cuid()) + name String + persona String + decoratorSet String[] + evaluationCriteria Json + failureTriggers Json + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@map("stack_profiles") +} + +model AblationResult { + id String @id @default(cuid()) + stackId String + ablatedClass String + failureMode String + severity String + recoveryNotes String? + promotionStatus String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@map("ablation_results") +} + +model FrameworkArtifact { + id String @id @default(cuid()) + name String + type String + complexityTier String + sourceDocIds String[] + integrationPoints String[] + uncertaintyNotes String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@map("framework_artifacts") +} + +model AnalysisRun { + id String @id @default(cuid()) + corpusId String + baselineVersion String + extractedArtifacts Json + generatedCatalog Json + runDate DateTime @default(now()) + reviewStatus String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@map("analysis_runs") +} From 8ee78c15c7a05b9f50e30ba8c51d9191daf5d4ad Mon Sep 17 00:00:00 2001 From: Daniel Hart | ALifeInArtifyAI <238904666+projectedanx@users.noreply.github.com> Date: Tue, 7 Jul 2026 20:32:43 +1000 Subject: [PATCH 2/2] Update README.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 03aeb3b..2c828e5 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,6 @@ Contributions that are modular, traceable, systematic, and honest about uncertai | Research corpus | ✅ Established — 3 core documents, 50+ source studies | | Framework baseline | ✅ Defined — PALS, CxEP, Systemic, Role, LensGPT | | Governance Core | ✅ Defined — PDL, SCOS, Dichotomic Scaffolds | -| Governance Core | ✅ Defined — PDL, SCOS, Dichotomic Scaffolds | | Contribution rules | ✅ Formalized | | Application — routing | ✅ 14 module routes implemented | | Application — data layer | ✅ Prisma schema (including Governance Core) + NextAuth in place |