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_HOLDdevelopment
Federation-wide gold (XAUUSD) trading capability. Python stack, OANDA broker, backtesting, macro signals, RSI strategy. Every organ has a role.
development
Capital claim state management — tracks claim lifecycle across WEALTH organ.
development
Archived constitutional warga placeholder retained only for audit provenance. Do not use for active work; use the live arifOS governance and constitutional skills instead.
testing
Warga (citizen) agent skills for AAA federation members. See subdirectories for specialized warga skills.