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..2c828e5 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,10 @@ 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 |
| 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")
+}