Skip to content

Add add-page, add-entity, and prototype-review skills - #27

Open
pglevy wants to merge 2 commits into
mainfrom
skills/scaffolding-and-review
Open

Add add-page, add-entity, and prototype-review skills#27
pglevy wants to merge 2 commits into
mainfrom
skills/scaffolding-and-review

Conversation

@pglevy

@pglevy pglevy commented Jul 22, 2026

Copy link
Copy Markdown
Owner

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 — scaffolds src/pages/<slug>.tsx, registers the route in App.tsx, and links it from home.tsx (scripts/scaffold-page.js). Replaces the manual 4-step process in the README's "Creating New Pages" section.
  • add-entity — scaffolds src/db/<entity>.ts with the interface, seed data, and full CRUD functions matching the data-layer convention, already wired through api-config.ts for a future connect-to-appian step (scripts/scaffold-entity.js).
  • prototype-review — scans src/pages/ and src/db/ for violations of the four non-negotiable rules (Sailwind imports, UPPERCASE props, Lucide icons not emoji, data in src/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.js pattern.

Docs

README.md and AGENTS.md updated 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 build exit code) rather than needing subjective grading.

  • add-page: basic scaffold request + custom --path route derivation
  • add-entity: natural-language field parsing + an irregular-plural regression test (PersongetPeople)
  • prototype-review: fixture pages under evals/files/ — one with real violations mixed with a MessageBanner icon="info" false-positive trap, one already clean

Running the evals surfaced a real bug, which is fixed in this PR: scaffold-entity.js was pluralizing PersongetPersons instead of getPeople. 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 build passes cleanly
  • node scripts/prototype-review.js run against the existing codebase — flags one legitimate finding (a raw <input type="checkbox"> in kanban-board.tsx that could use CheckboxField), no false positives
  • Manually ran scaffold-page.js and scaffold-entity.js against several inputs (multi-word names, custom paths, irregular plurals, --no-audit, re-run/--force guard) and reverted test artifacts before committing

pglevy added 2 commits July 22, 2026 17:11
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.
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.

1 participant