Resolve frontend type-safety guidance by guarantee, not by a fixed route - #175
Merged
Merged
Conversation
frontend-ai-guide and quality-fixer-frontend prescribed `unknown` plus type guards as the single route for external data, while typescript-rules already permits bounded exceptions and a generated client that enforces its contract at runtime. The fixed route both duplicated and contradicted the owning policy. - frontend-ai-guide: state the anti-pattern and its avoidance as a guarantee criterion within this skill's own responsibility, without prescribing a route or depending on another progressively disclosed skill - quality-fixer-frontend: defer external API response types to the preloaded typescript-rules policy and drop the duplicate React-specific entry Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The anti-pattern read "a type the code does not check or a contract does not establish", which literally requires both backings and would flag an assertion that one of them already guarantees. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
frontend-ai-guideandquality-fixer-frontendprescribedunknownplus type guards as the single route for external data, whiletypescript-rulesalready owns that policy and permits bounded exceptions — including a generated client that enforces its contract at runtime. The fixed route both duplicated and contradicted the owning policy, and the backend counterpart (ai-development-guide) had already moved to a guarantee-based criterion, leaving the frontend side behind.Two further problems came from the same place: the anti-pattern entry judged type assertions by how many were used rather than by whether anything backed them, and the fix guidance was stated twice in
quality-fixer-frontend.Changes
skills/frontend-ai-guide/SKILL.md— criteria stated within this skill's own responsibility, with no dependency on another progressively disclosed skillagents/quality-fixer-frontend.md— deferral to the preloaded owning policytypescript-rulesboundary validation policy (the skill is preloaded through this agent's frontmatter).unknownplus validation to untyped external API responses is kept unchanged.Versions — patch bump to 0.25.4 across
package.json,.claude-plugin/marketplace.json, and the four plugin manifests.Verification
pnpm run sync,pnpm run sync:check,pnpm run check:skills-index, andclaude plugin validatefor the marketplace manifest and all four plugins pass.🤖 Generated with Claude Code