skills/FORGE-postgres-schema-design/SKILL.md
PostgreSQL schema design for the federation data layer — migrations, indexing, and entity modeling.
npx skillsauth add ariffazil/openclaw-workspace FORGE-postgres-schema-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
DITEMPA BUKAN DIBERI — Forged, Not Given.
Design and maintain PostgreSQL schemas for the federation: capability registry, organ pulse history, drift detection, witness receipts, session state, cooling ledger entries.
redis-qdrant-integrationvault999-witnessredis-qdrant-integrationreact-spa-discipline| Floor | Application |
|-------|-------------|
| F1 AMANAH | All schema changes via migration files; never ALTER TABLE in production |
| F2 TRUTH | Columns typed precisely (TIMESTAMPTZ, UUID, JSONB) — no varchar(255) laziness |
| F4 CLARITY | Normalize to 3NF by default; only denormalize for measured query perf |
| F11 AUDIT | Every table has created_at, updated_at, actor_id audit columns |
| F13 SOVEREIGN | Schema drops require 888_HOLD — data is civilizational memory |
-- Capability registry table pattern
CREATE TABLE capability_registry (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
organ_id TEXT NOT NULL REFERENCES organs(id),
tool_name TEXT NOT NULL,
schema_json JSONB NOT NULL,
status TEXT NOT NULL DEFAULT 'active',
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
actor_id TEXT NOT NULL
);
-- Pulse history (time-series)
CREATE TABLE organ_pulses (
id BIGSERIAL PRIMARY KEY,
organ_id TEXT NOT NULL,
status TEXT NOT NULL,
latency_ms INTEGER,
payload JSONB,
sampled_at TIMESTAMPTZ NOT NULL DEFAULT now()
) PARTITION BY RANGE (sampled_at);
-- Migration pattern — always reversible
-- V001__create_capability_registry.sql
-- V002__add_organ_pulses.sql
SELECT * in production queries — always name columnssampled_at columnsDROP COLUMN or DROP TABLE without 888_HOLDtesting
OpenClaw edge agent bridge — operational triage, doctor, restart, and A2A bridge routing for the federation edge (Telegram surface). USE WHEN: "openclaw unhealthy", "gateway down", "edge bot not responding", "a2a bridge disconnected", "watchdog tripped", "openclaw doctor", "openclaw restart". NOT for token/security audit — use FORGE-telegram-audit.
tools
Generate images, videos, TTS, voice clone, and music via MiniMax MCP server. Use when user asks to "draw", "generate image", "create picture", "make a photo", "text to image", "image generation".
testing
Single load-bearing constitutional-judgment skill. Routes all F1–F13, verdict, hold, seal, scope, authority and floor-check calls through the live arif_judge surface. Replaces 7 overlapping predecessors (arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge).
development
MANDATORY LSP grounding gate BEFORE any code mutation on .ts, .py, .js, .tsx, .jsx files. Forces the agent to read real-time compiler diagnostics and structural project context before editing — eliminating blind guesses and anchoring every mutation in F2 (TRUTH). Routes through arifOS kernel (:8088) for centralized gate logic.