# AI Workflow Rules - StartupLX

## Approach
[Project-first mindset: Read SOUL.md for vision, then context files for specs. Build incrementally against these specs — do not infer or invent behavior from scratch.]

## Priority Reading Order
1. `soul.md` — Project vision, goals, and automation philosophy
2. `progress-tracker.md` — Current phase, completed work, next steps
3. `MILESTONES.md` — Build plan and success criteria
4. `context/project-overview.md` — Product definition and scope
5. `context/architecture.md` — System structure and boundaries
6. `context/ui-context.md` — Theme and component conventions
7. `context/code-standards.md` — Implementation rules
8. `context/ai-workflow-rules.md` — This file (development workflow)
9. `project-tracker.md` — Task breakdown and deadlines

## Scoping Rules
- Work on one feature unit at a time
- Prefer small, verifiable increments over large speculative changes
- Do not combine unrelated system boundaries in a single implementation step
- ALWAYS update progress-tracker.md after meaningful changes
- ALWAYS verify soul.md alignment before major decisions

## When to Split Work

Split an implementation step if it combines:
- [Concern one] — UI changes and background task changes  
- [Concern two] — Multiple unrelated API routes
- [Concern three] — Behavior not clearly defined in soul.md or context files

If a change cannot be verified end to end quickly, the scope is too broad — split it.

## Handling Missing Requirements

- Do not invent product behavior not defined in soul.md or context files
- If a requirement is ambiguous, resolve it in the relevant context file before implementing
- If a requirement is missing, add it as an open question in progress-tracker.md before continuing

## Milestone-Based Progress Tracking

After completing each milestone:
1. Update MILESTONES.md with completion status
2. Update progress-tracker.md with next-phase readiness
3. Update daily note with accomplishments
4. Log any pivots needed back to soul.md alignment

## Before Moving to the Next Unit

1. The current unit works end to end within its defined scope
2. No invariant defined in `architecture.md` was violated
3. `progress-tracker.md` reflects the completed work
4. `soul.md` vision is being fulfilled
5. `npm run build` passes