Skip to content

fix(dsql): reframe JSON/JSONB/array storage as a choice, not "MUST use JSONB"#200

Open
amaksimo wants to merge 2 commits into
awslabs:mainfrom
amaksimo:fix/dsql-jsonb-reframe-drift
Open

fix(dsql): reframe JSON/JSONB/array storage as a choice, not "MUST use JSONB"#200
amaksimo wants to merge 2 commits into
awslabs:mainfrom
amaksimo:fix/dsql-jsonb-reframe-drift

Conversation

@amaksimo

@amaksimo amaksimo commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What

The native JSON/JSONB rollout left this skill prescribing a single answer for array/document storage. Two drift directions existed across the nine steering files:

  • Over-correction: "MUST serialize arrays as JSONB" / "prefer JSONB over JSON" stated as the only answer.
  • Stale pre-JSON framing: "store as TEXT" / "SET → TEXT (comma-separated)" as the only mapping.

The reviewed wording already in awslabs/mcp reframes this as a choice. This PR brings the databases-on-aws DSQL skill in line.

The reframe

  • Serializing is the MUST — DSQL has no array column type.
  • The format is a choice — ASK the user:
    • PREFER JSONB when querying inside the value (@>, ?, jsonb_array_elements_text, indexed paths); values normalized at write.
    • MAY use TEXT when the column is opaque to the database (app parses the whole value, never queries inside).
    • JSON when writes dominate, byte-exact input matters (audit, replay, duplicate keys), or only ->/->> is needed.
    • Keep existing JSON columns as JSON when migrating; upgrade to JSONB only if JSONB-only operators/indexed paths are needed.

Files

SKILL.md, references/development-guide.md, references/onboarding.md, references/troubleshooting.md, references/examples/{patterns,schema}.md, references/mysql-migrations/{type-mapping,full-example,ddl-type-alternatives}.md. Bumps databases-on-aws to 1.3.3.

Validation

  • quick_validate.py passes.
  • Grep confirms zero residual single-answer framing; choice/ASK framing present across all nine files.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

…e JSONB"

The native JSON/JSONB rollout left this skill prescribing a single answer.
Two drift directions existed: some files said "MUST serialize arrays as
JSONB" / "prefer JSONB over JSON" (over-correction), others still said
"store as TEXT" / "SET -> TEXT" (stale pre-JSON framing).

Bring all nine steering files in line with the already-reviewed wording in
awslabs/mcp: serializing is the MUST (DSQL has no array column type); the
format is a choice — PREFER JSONB for queryable values, MAY use TEXT when
opaque, JSON when writes dominate or byte-exact preservation matters; keep
existing JSON columns as JSON when migrating. ASK the user.

Files: SKILL.md, references/development-guide.md, references/onboarding.md,
references/troubleshooting.md, references/examples/{patterns,schema}.md,
references/mysql-migrations/{type-mapping,full-example,ddl-type-alternatives}.md.
Bump databases-on-aws to 1.3.3.
@amaksimo amaksimo force-pushed the fix/dsql-jsonb-reframe-drift branch from 1d0562d to 099bba1 Compare June 18, 2026 21:28

@anwesham-lab anwesham-lab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All previously cycled and reviewed including in the MCP standalone skill vending.

@amaksimo amaksimo enabled auto-merge June 18, 2026 22:55
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.

3 participants