Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- name: Lint (ESLint)
run: pnpm lint

- name: Format check (Prettier)
run: pnpm format:check

- name: Typecheck
run: pnpm typecheck

Expand Down
Binary file added docs/.DS_Store
Binary file not shown.
86 changes: 86 additions & 0 deletions docs/agent-workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Agent Workflows

This directory contains canonical, agent-neutral workflow instructions for repetitive review and output tasks used in this repository.

## How instruction files are used

This repository uses multiple layers of agent-facing documentation.

- `frontend/AGENTS.md` is the always-on instruction file for frontend conventions, component/CSS standards, and agent expectations. The root [README.md](../../README.md) covers full-stack setup and architecture.
- Agent-specific markdown files such as `CLAUDE.md` are adapters for tools that support their own project instruction file. These should contain only the guidance that is specific to that agent or needed by that agent's workflow.
- `docs/agent-workflows/` is the shared library of reusable, task-specific workflows. These documents are for on-demand tasks such as branch reviews, CSS reviews, test-suite reviews, PR text generation, and implementation planning.

Use `frontend/AGENTS.md` for durable frontend standards, use agent-specific files only when a specific tool requires them, and use the workflow docs in this directory for repeatable task instructions that should not run automatically on every request.

Do not create agent-specific markdown files unless there is a real agent integration that reads them. This repo uses `frontend/AGENTS.md` and `frontend/CLAUDE.md`; additional files such as `gemini.md` or `codex.md` are not needed unless a specific tool requires them.

## Purpose

- Keep task-specific prompts out of `frontend/AGENTS.md`, `CLAUDE.md`, and other always-on agent files
- Maintain one reviewed source of truth for recurring workflows
- Allow different agent systems to reference the same workflow docs without duplicating prompt content

## Usage

- Use these documents for task-specific workflows that should run on command, not automatically on every task
- Keep frontend standing rules in `frontend/AGENTS.md`
- Keep agent-specific adapter files (`CLAUDE.md`, Cursor rules, Codex skills, etc.) lightweight and point them to these workflow docs when appropriate

## How to invoke these workflows

These workflow docs are agent-neutral. Most AI tools will not run them automatically just because the files exist, so you should invoke them explicitly in your prompt.

### General pattern

Tell the agent which workflow file to use and what task to perform.

Example:

```md
Use `docs/agent-workflows/pull-request-description-generator.md` and generate PR-ready text for this branch against `main`.
```

### Copy/paste prompt examples

```
Use docs/agent-workflows/pre-merge-full-review.md and run a complete pre-merge review of this branch.

Use docs/agent-workflows/branch-change-impact-audit.md and audit what changed on this branch against main.

Use docs/agent-workflows/code-quality-review.md and perform a strict code quality review of this branch against main.

Use docs/agent-workflows/css-and-component-standards-review.md and review all styling and component changes in this branch.

Use docs/agent-workflows/test-suite-quality-review.md and review the existing test suite for simplicity and overengineering.

Use docs/agent-workflows/feature-flag-gating-review.md and verify that this feature flag fully controls the new behavior and supports rollback.

Use docs/agent-workflows/manual-qa-checklist-generator.md and generate a concise manual QA checklist for the current diff.

Use docs/agent-workflows/pull-request-description-generator.md and generate PR-ready text for the current branch against main.

Use docs/agent-workflows/feature-implementation-planning.md and create an implementation plan for this feature before writing code.

Use docs/agent-workflows/figma-design-to-code.md and implement this Figma design.
```

## Workflows

| File | What it does | What it does NOT do |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| `pre-merge-full-review.md` | Orchestrates review phases with user checkpoints and a mandatory PR-description decision | Performs review logic itself — delegates to sub-workflows |
| `branch-change-impact-audit.md` | Surveys what changed, behavior impact, regression risks, integration consistency | Assesses code quality, CSS, or test quality |
| `code-quality-review.md` | Reviews implementation correctness, performance, backend API usage, new route security, conventions, architecture, and React patterns | Summarizes what changed; deep CSS review |
| `css-and-component-standards-review.md` | CSS quality, module.css compliance, Tailwind-vs-module.css placement, design token usage, Storybook story coverage | Business logic, JS correctness |
| `test-suite-quality-review.md` | Reviews test simplicity, readability, and appropriate scope | Checks coverage gaps in new code; runs tests |
| `feature-flag-gating-review.md` | Verifies flag fully controls behavior and supports clean rollback | General code quality outside flag gating |
| `manual-qa-checklist-generator.md` | Generates a manual QA checklist scoped to the branch diff | Automates testing; reviews code |
| `pull-request-description-generator.md` | Generates PR-ready text — summary, change-overview table, grouped file-by-file changes, dependency declaration, env var callouts, migration notes, linked tickets | Reviews or recommends anything |
| `feature-implementation-planning.md` | Creates an implementation plan covering scope, schema changes, complete file manifest, implementation order, integration points, and verification steps | Writes code; reviews existing code |
| `figma-design-to-code.md` | Guides Figma design extraction, token mapping, and component implementation | Reviews existing code independently |

## Maintenance

- Update these files when the team changes the workflow requirements or output formats
- Treat these files as the canonical version rather than maintaining separate copies in multiple agent-specific files
- When adding a new workflow, add it to this README and the workflow section in `frontend/AGENTS.md`
95 changes: 95 additions & 0 deletions docs/agent-workflows/branch-change-impact-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Branch Change Impact Audit

## Purpose

Surveys the current branch against `main` to answer: **what changed, which behavior is affected, and are there regression or integration risks?** Produces a factual map of the change set before any quality review begins. When feature flag changes are detected, offers to run `feature-flag-gating-review.md` before continuing.

**Does not:** assess code quality, correctness of implementation, CSS standards, or test quality. Does not propose redesigns or broad fixes — it identifies and describes, it does not prescribe. Code quality is covered by `code-quality-review.md`.

---

## Goal

Produce a factual branch audit based on the final diff and the affected code paths, without making code changes unless explicitly requested.

## Scope

- Compare the current branch against `main` (or the user-specified target branch)
- Review the changed files and any direct consumers or directly affected call sites
- Focus on confirmed behavior and code paths visible from the current branch state
- Do not include changes that were added and later removed

## Audit priorities

### 1. Behavior changes

Identify:

- what behavior changed relative to the target branch
- which paths now behave differently
- which paths remain unchanged

### 2. Regression risk

Check for:

- behavior that no longer matches the target branch where parity was expected
- mixed old/new flows that prevent a clean fallback
- changes that partially switch a feature without fully gating it

### 3. Feature-flag involvement

If the diff touches anything related to feature flags or env-gated behavior (`featureFlag`, `featureGate`, `NEXT_PUBLIC_*` toggles, `flags`, or similar):

- Note which files and call sites are involved
- Ask the user: "Feature flag changes detected. Would you like me to run the feature flag gating review before continuing the audit?"
- If the user says yes, read and run `docs/agent-workflows/feature-flag-gating-review.md` and include its output as a subsection before continuing
- If the user says no, note it and continue the audit without the flag review

If no flag involvement is detected, state that explicitly and continue.

### 4. Integration consistency

Check for:

- mismatched assumptions between components, providers, routes, and config
- changed call sites that no longer match the selected mode or expected flow
- branch changes that require additional coordination outside the touched file

## Constraints

- Do not speculate beyond what can be confirmed from the current diff and adjacent code
- Do not propose broad refactors
- Do not recommend unrelated cleanup
- Keep recommendations minimal and limited to what is necessary to restore the intended behavior

## Required output format

### Branch summary

State briefly:

- what the branch changes overall
- what the intended gated or rollback behavior appears to be from the code and user request

### Confirmed findings

For each confirmed issue, include:

- file
- affected behavior
- why it prevents parity, rollback, or clean gating
- minimal correction needed

### Non-issues

List any changed areas reviewed that do not require correction so the audit is explicit about what is already acceptable.

### Final recommendation

State one of:

- No blocking issues found
- Minor corrections needed
- Rollback or gating is incomplete
- Branch needs structural rework before merge
Loading
Loading