All rules

Rules

Agentic Workflow

Outcome-first workflow routing and validation for Spring Design Library agents

This is the primary workflow rule. Long-form guidance lives in docs/ai/.

  1. Classify the outcome before implementation: component, gallery page, AppFlow screen, static page, token/foundation, icon, or docs/rules.
  2. If outcome, target user, source design, missing states, or validation expectation is unclear, ask before building.
  3. Read in order: docs/ai/project-context.md, docs/ai/operational-manifesto.md, docs/ai/workflow-contracts.md, nearby examples, then docs/ai/review-checklist.md.
  4. Keep boundaries: components in packages/spring-ds-react/src/components/, gallery in apps/design-library/src/gallery/, routes in apps/design-library/src/app/library/, AppFlow registry in personalLoanFlow.ts.
  5. Route shells stay thin and re-export gallery implementations.
  6. Pages import reusable UI from @spring/ds-react; new reusable components must export from packages/spring-ds-react/src/index.ts.
  7. Token changes require approval, npm run tokens:sync, dev-server restart for local preview, and .next clearing before production build validation.
  8. Code Connect placement: package-side for new reusable components and all inputs; gallery-side only for existing navigations, overlays, and SpringSearchBar.
  9. Do not revert unrelated user changes.
  10. On resume, restate outcome, phase, approval status, loop count, changed files, and next action before continuing.