Skip to content

docs: add table_provision to membership types references#86

Merged
pyramation merged 1 commit intomainfrom
devin/1776415428-table-provision-docs
Apr 17, 2026
Merged

docs: add table_provision to membership types references#86
pyramation merged 1 commit intomainfrom
devin/1776415428-table-provision-docs

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

Docs-only update to reflect the new table_provision field on entity_type_provision / BlueprintMembershipType (shipped in constructive-db#824 and constructive#988).

Three files touched, all under .agents/skills/:

  • constructive-membership-types/references/blueprint-membership-types.md — adds table_provision to the field table, plus a new "Entity-Table Policies" section with a decision matrix, the 5 default policies, the override object shape, a "When to use which" cheatsheet, and a worked example.
  • constructive-membership-types/references/orm-provisioning.md — camelCase mirror of the above for ORM users (tableProvision, isVisible, skipEntityPolicies), with a TypeScript example and a note that JSONB inner keys stay snake_case.
  • constructive/references/blueprint-definition-format.md — adds table_provision to the top-level membership_types field table and updates the is_visible / skip_entity_policies rows to reflect the new semantics (is_visible is a no-op when table_provision is supplied; skip_entity_policies is now framed as the escape hatch).

Key semantic documented throughout:

skip_entity_policies table_provision Result
false (default) null 5 defaults (gated by is_visible)
false object caller's policies[] only; is_visible is a no-op
true null 0 policies (escape hatch)
true object caller's policies[] only

Review & Testing Checklist for Human

  • Spot-check the decision matrix against the trigger in insert_entity_type_provision.sql — specifically that table_provision non-null always skips defaults, even when its policies[] is empty/absent (docs claim this, and note that callers wanting "custom fields + defaults" must copy the 5 defaults into policies[]).
  • Verify the 5 default policy names/privileges I listed (self_member, parent_member, admin_create, admin_update, admin_delete) match what provision_membership_table emits — I pulled these from memory of PR #823/#824, not by regrepping the source in this session.
  • Preview the markdown in your renderer of choice — the cross-section links use anchors like #entity-table-policies-is_visible-skip_entity_policies-table_provision which may or may not resolve cleanly depending on your MD renderer's slug algorithm (backticks + underscores are a known footgun).

Notes

  • constructive-membership-types/SKILL.md (the top-level skill) was left alone — its CLI example only shows --isVisible / --skipEntityPolicies, and I didn't add --tableProvision since CLI args don't naturally carry nested JSON. The full story lives in the reference files linked from the skill.
  • No CLI / ORM / blueprint behavior is changed by this PR — pure docs.

Link to Devin session: https://app.devin.ai/sessions/6aad642053f844439cbdbb0ce928bc08
Requested by: @pyramation

@devin-ai-integration
Copy link
Copy Markdown

🤖 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

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit e091ca3 into main Apr 17, 2026
2 checks passed
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.

1 participant