Use agents as repo collaborators
AI agents are most useful when the workflow gives them a narrow job, real project context, and a verification loop. This pack gives frontend teams repeatable prompts and review steps.
Workflow templates
1. Issue implementation brief
Give the agent:
- The exact issue scope and acceptance criteria.
- The repository path, branch rules, and package manager.
- Files or patterns that should be reused.
- Constraints like no raw tokens, strict TypeScript, and required tests.
- A final verification command the agent must run.
2. Component refactor brief
Ask the agent to:
- Identify the public API before editing.
- Preserve behavior unless a change is explicitly requested.
- Replace duplicated styling with existing tokens or recipes.
- Update nearby examples and tests.
- Summarize migration risk for reviewers.
3. Design system cleanup brief
Ask for:
- A token usage audit.
- A list of one-off variants that should become recipes.
- Dead components or props that can be deprecated.
- Documentation gaps that block adoption.
- A prioritized cleanup plan with small PRs.
4. PR review assistant brief
Give the agent the diff and ask it to check:
- Type safety and runtime behavior.
- Accessibility regressions.
- Token and layout rule violations.
- Missing tests, docs, or migration notes.
- Whether the implementation matches the issue scope.
Safety checklist
- Keep agents on feature branches.
- Require real builds or tests before merging.
- Review generated code like code from a new teammate.
- Prefer small, verifiable tasks over broad rewrites.
- Ask agents to report blockers instead of inventing results.