feat: rule tree refactor, anti-slop blocks, framework content, regist… - #19
Open
joxyle-jhon wants to merge 1 commit into
Open
feat: rule tree refactor, anti-slop blocks, framework content, regist…#19joxyle-jhon wants to merge 1 commit into
joxyle-jhon wants to merge 1 commit into
Conversation
…ry fix - core/types.ts: add RuleBlock, BlockInclusion, ResolvedBlock, ResolvedRuleTree - core/resolver.ts: 4-step pipeline — expand ancestors, deduplicate by canonical key (pack priority), build parent-child tree, topological sort - core/registry.ts: add getAllBlocks() + readBlock(block); fix double-blocks/ path bug that caused all block reads to return empty string - core/generator.ts: wire resolver pipeline; composeBlocks takes ResolvedRuleTree - cli/src/types.ts, resolver.ts, registry.ts, generator.ts: mirror all above changes for the Node.js CLI context Pack configs — migrate string[] blocks to typed RuleBlock[]: - packs/frontend/pack.config.ts: all blocks typed with id/tags/inclusion - packs/backend/pack.config.ts: all blocks typed - packs/fullstack/pack.config.ts: full union of frontend+backend blocks via canonical cross-pack id references (no content duplication); all 11 framework options; all optional blocks from both packs Framework content — replace stub bullet lists with real rule content: - packs/frontend/blocks/frameworks/nextjs.md: folder structure, RSC vs CC, Server Actions, data fetching, caching, Route Handlers - packs/frontend/blocks/frameworks/nuxt.md: useFetch/useAsyncData, Nitro routes, useState vs Pinia, NuxtImg/NuxtLink, middleware - packs/frontend/blocks/frameworks/sveltekit.md: server vs universal load, form actions + use:enhance, Svelte 5 runes, hooks, route protection - packs/frontend/blocks/frameworks/angular.md: standalone components, OnPush, signals, RxJS bridge, lazy routes, @defer, NgOptimizedImage - packs/frontend/blocks/frameworks/vanilla.md: new file — DOM helpers, class component pattern, store, event delegation, Web Components New blocks: - packs/frontend/blocks/anti-slop.md: what slop looks like, mandatory checks, spacing/typography/color/component discipline - packs/frontend/blocks/anti-slop-tooling.md: child of anti-slop — GSAP, Motion.dev, Rive, Lenis, shadcn/ui, Radix UI, Magic UI, Aceternity, Smooth UI, Raylight, Unlumen, Tasteskill.dev, Three.js/R3F; each entry has problem/when-to-reach/when-to-skip/minimal-usage/do-not structure - cli/src/resolver.ts: new file (mirrors core/resolver.ts, Node-compatible) UI fix: - src/components/Generator.tsx: fix optional blocks panel — was reading deprecated pack.optionalBlocks (always undefined); now reads pack.blocks.filter(b => b.inclusion === 'optional') correctly AGY skill structure: - .agent/skills/frontend-rules/SKILL.md: moved to AGY-compliant path with required YAML frontmatter Tests: - cli/tests/cli.test.ts: 10 new regression tests — Jaccard similarity checks (flags if two framework outputs share >75% word tokens) + keyword presence tests per framework
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.
…ry fix
Pack configs — migrate string[] blocks to typed RuleBlock[]:
Framework content — replace stub bullet lists with real rule content:
New blocks:
UI fix:
AGY skill structure:
Tests: