Skip to content

Conversation

@pyramation
Copy link
Contributor

@pyramation pyramation commented Jan 24, 2026

Summary

Adds agent skills for Constructive PostgreSQL tooling and cloud function development:

constructive-functions — Documents how to build and deploy Knative-style HTTP cloud functions, including the handler pattern, PGPM integration, database access with pg-cache, Docker builds, and Kubernetes deployment.

graphql-codegen — Documents the @constructive-io/graphql-codegen package for generating type-safe GraphQL SDKs (React Query hooks or Prisma-like ORM client) from database schemas.

pgsql-client — Documents PostgreSQL client utilities including ephemeral database creation, DbAdmin operations, PgClient query helpers, and RLS context management.

pgsql-seed — Documents seeding utilities for CSV, JSON, SQL data loading, and pgpm deployment.

pgsql-test-seeding (updated) — Now documents the preferred Direct Load Methods pattern for seeding test data.

Updates Since Last Revision

  • Added new pgsql-client skill covering:

    • createEphemeralDb() for temporary databases (testing, code generation, CI)
    • DbAdmin for database administration (create, drop, templates, extensions)
    • PgClient query helpers with RLS context management
  • Added new pgsql-seed skill covering:

    • CSV loading via COPY protocol (loadCsv, loadCsvMap, exportCsv)
    • JSON insertion (insertJson, insertJsonMap)
    • SQL file execution (loadSql, loadSqlFiles, execSql)
    • pgpm deployment (deployPgpm, loadPgpm)
  • Updated pgsql-test-seeding skill:

    • Now documents two seeding patterns with Direct Load Methods as preferred
    • Added loadPgpm() to seeding methods overview
    • Added pgpm seeding section for zero-config usage

Review & Testing Checklist for Human

  • Verify pgsql-client ephemeral API — The skill documents createEphemeralDb() from pgsql-client. Confirm this function exists and the return value matches (name, config, admin, teardown)
  • Verify pgsql-seed function signatures — Confirm loadCsv, insertJson, loadSql, deployPgpm exist with documented signatures
  • Verify Direct Load Methods on PgTestClient — The skill claims db.loadJson(), db.loadCsv(), db.loadSql(), db.loadPgpm() are available directly on PgTestClient
  • Verify graphql-codegen ORM API — Confirm db.user.findMany(), db.mutation.login() patterns match actual generated code
  • Verify pg-cache import path — The constructive-functions skill uses import { getPgPool, close } from 'pg-cache'

Suggested test: Try using createEphemeralDb() to create a temporary database, deploy a pgpm module with deployPgpm(), and verify the seeding methods work as documented.

Notes

A separate PR was created for the pgsql-client README update in the constructive repo: constructive-io/constructive#656

Link to Devin run: https://app.devin.ai/sessions/5edec0c962d04ee9bd15efc58ca2a050
Requested by: @pyramation

New skill for building and deploying Knative-style HTTP cloud functions:
- Function handler pattern (params, context)
- Using PGPM library in functions
- Direct database access with pg Pool
- Local development and Docker build workflow
- Kubernetes deployment with Knative
@devin-ai-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

- Use makage for builds instead of plain tsc
- Add publishConfig.directory: dist pattern
- Include lerna versioning and publishing workflow
- Reference pnpm-publishing skill for full details
- Add build output structure documentation
@devin-ai-integration devin-ai-integration bot changed the title feat: add constructive-functions skill feat: add constructive-functions and graphql-codegen skills Jan 24, 2026
@pyramation pyramation merged commit eccbf78 into main Jan 24, 2026
@devin-ai-integration devin-ai-integration bot changed the title feat: add constructive-functions and graphql-codegen skills feat: add PostgreSQL client, seed, and cloud function skills Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants