Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

refactor(skills): replace correct-pattern samples with source references in boundary-validator#72

Merged
roottool merged 3 commits intomainfrom
refactor/trim-boundary-validator-references
Mar 5, 2026
Merged

refactor(skills): replace correct-pattern samples with source references in boundary-validator#72
roottool merged 3 commits intomainfrom
refactor/trim-boundary-validator-references

Conversation

@roottool
Copy link
Copy Markdown
Owner

@roottool roottool commented Mar 5, 2026

Description

Replace manually-maintained correct-pattern code blocks in skills/boundary-validator/references/ with pointers to the source of truth.

Problem

The reference files duplicated implementation code that was maintained separately from src/. This caused drift — seen most recently in PR #70, where Set<unknown> vs Set<string>, array vs ReadonlySet, and stale versioning policy were all caused by the same root issue: two copies of the same truth.

Adding a PR checklist or SKILL.md guidance would not reliably prevent this, as implementation PRs tend to focus on code rather than reference docs.

Change

Removed "correct pattern" code blocks from:

  • references/design-rules.md
  • references/security-rules.md
  • references/validation-patterns.md
  • references/api-contract.md

Replaced with: See correct implementation: src/parse.ts / See source: src/types/

Kept

  • Violation patterns (antipatterns to detect) — unique to the skill, no equivalent elsewhere
  • Review checklists
  • Grep commands
  • Type narrowing pattern and .ok prohibition (behavioral contract, not implementation detail)

Type of Change

  • Bugfix (non-breaking change fixing an issue)
  • Security fix (non-breaking change addressing a security issue)
  • Documentation (changes to documentation only)
  • Refactoring (non-breaking change improving code structure)
  • Tests (adding or updating tests)
  • Tooling / CI (changes to build tools, CI configuration)

Boundary Checklist

  • This is a non-implementation change (Documentation, Tooling, or CI only)
  • No interpretation — Keys treated as opaque strings, no structural inference
  • No silent behavior — No merging, overwriting, or implicit resolution
  • Boundary respected — No validation, coercion, or business logic

📘 AGENTS.md

Security & API Stability

  • No security impact (forbidden keys, prototype safety unaffected)
  • No changes to public API (parse, ParseResult, ParseIssue, IssueCode)
  • No breaking changes; or justified with version bump rationale
  • Compatible with current v0.x versioning policy

Testing

  • bun run check:type:source passes
  • bun run test passes
  • bun run build passes

Signature

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

…ces in boundary-validator

Remove manually-maintained correct-pattern code blocks from references/
and replace with pointers to src/parse.ts and src/types/.

Violation patterns, checklists, and grep commands are kept as they are
unique to the skill and do not exist elsewhere.

This eliminates the drift risk between reference docs and implementation
without adding maintenance burden to contributors.
@roottool roottool self-assigned this Mar 5, 2026
roottool added 2 commits March 6, 2026 02:14
Relative hyperlinks caused 404 without branch/SHA context.
Code spans (backticks) are sufficient for both AI agents and humans.
@roottool roottool merged commit 36d960f into main Mar 5, 2026
@roottool roottool deleted the refactor/trim-boundary-validator-references branch March 5, 2026 17:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant