# <Tool name>

Department: <team> · Replaces: <product or spreadsheet it replaces>
For teams of <N> to <M> people.

> How to use this file: paste this whole document into your AI builder as context.
> Then send the build prompts in the Build plan section one at a time. Do not move
> to the next phase until the acceptance checks for the current phase pass.

## 1. The problem

"<One sentence, in the words of the person who has the problem.>"

<Two or three sentences on what goes wrong today and what success looks like.>

## 2. What the real product does

Research basis: <the product's pages you read, with the month you read them>.

1. <What it does, as facts you verified.>
2. <...>

### What this tool keeps
<The part your team actually uses.>

### What this tool deliberately leaves out
<Everything else, named. This stops the builder inventing features.>

## 3. Scope of v1

- <One team, one currency, one time zone, which channels, phone or desktop.>

## 4. Roles

| Role | Who | Can do |
|---|---|---|
| <Member> | <Everyone> | <...> |
| <Admin> | <...> | <...> |

## 5. Data model

All timestamps are UTC. Money is integer cents. IDs are strings.

**<Entity>**
- id
- <field> (<type>, required/optional, constraints, unique?)

<Repeat for every entity. Include an append-only Event table for history
and a Notification table (outbox) if anything sends email or messages.>

## 6. Rules

- **R1.** <One rule per line, testable, with the exact error message if it refuses.>
- **R2.** A refused action shows its reason on screen, the server returns an error, and nothing changes.
- **R3.** <...>

### Worked examples (with the seed data in section N)

| Input | Expected result |
|---|---|
| <...> | <...> |

## 7. Lifecycle

| Action | Who | From | To | Side effects |
|---|---|---|---|---|
| <Submit> | <Requester> | <draft> | <pending> | <events, notifications> |

## 8. Screens

1. **<Screen>**: <what it shows, what you can do, empty state.>
2. **Admin: People**: <who adds, changes and deactivates people.>
3. **Export**: <exact columns; dates YYYY-MM-DD, timestamps in UTC ISO 8601,
   yes/no for booleans, empty fields for missing values.>

## 9. Notifications

<Who gets what, when, through which channel. Write to the outbox first;
if no email provider is configured, log instead of sending.>

## 10. Scheduled jobs and time

<What runs when, in which time zone, and how to test it with a
development-only way to move "now" forward.>

## 11. Edge cases

- <People leaving, roles changing, duplicates, empty states, limits.>

## 12. Seed data

<Named people with roles and reporting lines, and records that exercise
every rule. Dates relative to today. Say what time "reset to seed data"
sets the development clock to, if any check depends on the time of day.>

## 13. Build plan

Send these prompts one at a time after pasting this file. Each phase ends
with checks you can run by clicking through the app. Start each phase's
checks from a fresh load of the seed (the reset button); checks within a
phase run in order on the same data.

### Phase 1: Foundation

    Using the <Tool name> spec above, build Phase 1 only.

    1. Set up the data model from section 5 with a real database.
    2. Add sign-in with the platform's built-in auth or Google sign-in limited to
       our company email domain. A signed-in email must match an active person;
       anyone else sees "Ask an admin to add you."
    3. Build the admin screens from section 8.
    4. Load the seed data from section 12.
    5. Add a "sign in as" switcher, a "move the clock forward" control and a
       "reset to seed data" button, all visible only in development.

    Do not build <later phases> yet. When you're done, list what you built and
    anything in the spec you had to interpret.

**Acceptance checks**
- [ ] <Person> can <do X> and sees <visible result>.
- [ ] <Person> cannot <do Y>; the button is hidden and a direct API call is refused.

### Phase 2: <Core flow>
<Prompt and checks, as above.>

### Phase 3: <Notifications and integrations>

### Phase 4: <Time, jobs and export>

## 14. Variations

- <Ideas for later, deliberately not in v1.>
