Add add-page, add-entity, and prototype-review skills - #27
Open
pglevy wants to merge 2 commits into
Open
Conversation
Three new scaffolding/review skills backed by scripts, addressing the most repetitive and rule-violation-prone parts of the prototyping workflow: - add-page: scaffolds src/pages/<slug>.tsx, registers the route in App.tsx, and links it from home.tsx (scripts/scaffold-page.js) - add-entity: scaffolds src/db/<entity>.ts with interface, seed data, and CRUD functions matching the data-layer convention, wired for connect-to-appian (scripts/scaffold-entity.js) - prototype-review: scans src/pages/ and src/db/ for violations of the four non-negotiable rules plus routing/data-layer conventions, reported by severity (scripts/prototype-review.js) All three scripts are advisory/deterministic (non-blocking, exit 0), matching the style of check-color-palette.js. README and AGENTS.md updated to reference the new skills at the relevant workflow steps.
Each skill gets evals/evals.json (skill-creator format) with realistic natural-language prompts and objective assertions, since these skills wrap deterministic scripts with fully verifiable output. - add-page: basic scaffold + custom --path route derivation - add-entity: field parsing from natural language + irregular plural handling (Person -> people, not persons) - prototype-review: fixture pages under evals/files/ - one with real violations mixed with a MessageBanner icon="info" false-positive trap, one already clean - to check correct triage in both directions Also fixes a real bug the add-entity eval caught: scaffold-entity.js now handles common irregular plurals (person/child/mouse/goose/tooth/ foot/woman/man) so getPersons -> getPeople without needing --file. All 6 evals run manually against the actual scripts/build and pass.
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.
Summary
Three new project skills for the most repetitive and rule-violation-prone parts of the prototyping workflow, each backed by a deterministic script (in the style of
scripts/check-color-palette.js):add-page— scaffoldssrc/pages/<slug>.tsx, registers the route inApp.tsx, and links it fromhome.tsx(scripts/scaffold-page.js). Replaces the manual 4-step process in the README's "Creating New Pages" section.add-entity— scaffoldssrc/db/<entity>.tswith the interface, seed data, and full CRUD functions matching the data-layer convention, already wired throughapi-config.tsfor a futureconnect-to-appianstep (scripts/scaffold-entity.js).prototype-review— scanssrc/pages/andsrc/db/for violations of the four non-negotiable rules (Sailwind imports, UPPERCASE props, Lucide icons not emoji, data insrc/db/) plus routing/data-layer conventions, reported by severity (scripts/prototype-review.js).All three scripts are advisory/deterministic and never block (exit 0), matching the existing
check-color-palette.jspattern.Docs
README.mdandAGENTS.mdupdated to reference the new skills at the relevant workflow steps (Page Development Workflow, Data Layer Convention, Before Declaring Page Complete, Kiro skills table).Evals
Each skill has
evals/evals.json(skill-creator format) with realistic prompts and objective assertions — these are deterministic-script wrappers, so outputs are fully verifiable (file existence, exact route/interface content,pnpm run buildexit code) rather than needing subjective grading.add-page: basic scaffold request + custom--pathroute derivationadd-entity: natural-language field parsing + an irregular-plural regression test (Person→getPeople)prototype-review: fixture pages underevals/files/— one with real violations mixed with aMessageBanner icon="info"false-positive trap, one already cleanRunning the evals surfaced a real bug, which is fixed in this PR:
scaffold-entity.jswas pluralizingPerson→getPersonsinstead ofgetPeople. Added an irregular-plurals map (person, child, mouse, goose, tooth, foot, woman, man) so common cases are handled automatically.All 6 evals pass when run against the actual scripts and
pnpm run build.Testing
pnpm run buildpasses cleanlynode scripts/prototype-review.jsrun against the existing codebase — flags one legitimate finding (a raw<input type="checkbox">inkanban-board.tsxthat could useCheckboxField), no false positivesscaffold-page.jsandscaffold-entity.jsagainst several inputs (multi-word names, custom paths, irregular plurals,--no-audit, re-run/--forceguard) and reverted test artifacts before committing