Skip to content

docs(skill): Harden ruleset-builder against FK-cascade and mask-type errors#7

Merged
kw-datamasque merged 3 commits intomainfrom
docs/improve-ruleset-builder-skill
May 6, 2026
Merged

docs(skill): Harden ruleset-builder against FK-cascade and mask-type errors#7
kw-datamasque merged 3 commits intomainfrom
docs/improve-ruleset-builder-skill

Conversation

@kw-datamasque
Copy link
Copy Markdown
Collaborator

@kw-datamasque kw-datamasque commented May 1, 2026

Summary

Hardens ruleset-builder skill against two agent failure modes:

  • FK cascade misunderstanding
    • If we use imitate_unique, imitate_ird, or imitate_uuid we only need to target the PK (FK will cascade).
    • Noted that mask_unique_key and FUI are deprecated.
  • Mask-type hallucination (from_random_words, hash_text, etc.)

Adds references/fk-cascade.md. Reinforces the existing masks as a closed list and adds a list of common hallucinations. Fixes missing --type flag on dm rulesets validate.

Out of scope

  • dm rulesets generate broken (dict vs pydantic model)
  • dm rulesets validate passes when imported library doesn't exist

@kw-datamasque kw-datamasque requested a review from beneboy May 1, 2026 06:28
@kw-datamasque kw-datamasque self-assigned this May 1, 2026
@kw-datamasque kw-datamasque force-pushed the docs/improve-ruleset-builder-skill branch from 8a6cc7f to 5da89d0 Compare May 4, 2026 01:35
@kw-datamasque kw-datamasque removed the request for review from beneboy May 4, 2026 01:36
@kw-datamasque kw-datamasque force-pushed the docs/improve-ruleset-builder-skill branch 7 times, most recently from be0b417 to 57f7d6b Compare May 4, 2026 23:53
@kw-datamasque kw-datamasque requested a review from beneboy May 5, 2026 00:11
@kw-datamasque kw-datamasque marked this pull request as ready for review May 5, 2026 00:15
@kw-datamasque kw-datamasque changed the title Docs/improve ruleset builder skill Docs/fix hallucinated masks and add FK cascading to ruleset builder skill May 5, 2026
@kw-datamasque kw-datamasque force-pushed the docs/improve-ruleset-builder-skill branch 2 times, most recently from 8b3248f to f5a94f3 Compare May 5, 2026 00:50
3. **Clean structure** — `skip_defaults`, no doc blocks, validated

**4-step process. Complete all 4 steps. Report after each step before proceeding.**
The deterministic masks `imitate_unique`, `imitate_uuid`, and `from_unique_imitate` cascade — share one mask config across both sides of every FK; never skip IDs or invent linking parameters.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does this suggest to add the mask on both the PK/FK columns instead of just PK and it cascades?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Restated that the PK is masked, and result cascades to FKs

@kw-datamasque kw-datamasque changed the title Docs/fix hallucinated masks and add FK cascading to ruleset builder skill docs(skill): Harden ruleset-builder against FK-cascade and mask-type errors May 5, 2026
@kw-datamasque kw-datamasque force-pushed the docs/improve-ruleset-builder-skill branch from f5a94f3 to 95b1eee Compare May 5, 2026 04:55
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Will apply following small fixes before merge:

  • Change Step 0-4 to Step 1-5
  • Align tables in SKILL.md

…errors

Targets two observed agent failure modes in the ruleset-builder skill:
- FK cascade misunderstanding (skipping IDs, inventing source_table-style params)
- Mask-type hallucination (from_random_words, hash_text, etc.)

Adds references/fk-cascade.md documenting that the engine auto-replicates
the parent PK rule onto every FK column at runtime when the mask is one
of the cascading masks (imitate_unique, imitate_uuid, imitate_nz_ird).
Reinforces the existing Mask Types Quick Reference as a closed list and
adds a kill-table of common hallucinations. Fixes missing --type flag on
dm rulesets validate.
@kw-datamasque kw-datamasque force-pushed the docs/improve-ruleset-builder-skill branch from 95b1eee to 320a30a Compare May 5, 2026 05:00
@kw-datamasque kw-datamasque requested a review from beneboy May 5, 2026 05:03
@kw-datamasque kw-datamasque merged commit 39ed4f2 into main May 6, 2026
5 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.

2 participants