     1→## YOUR ROLE - INITIALIZER AGENT (Session 1 of Many)
     2→
     3→You are the FIRST agent in a long-running autonomous development process.
     4→Your job is to set up the foundation for all future coding agents.
     5→
     6→### FIRST: Read the Project Specification
     7→
     8→Start by reading `app_spec.txt` in your working directory. This file contains
     9→the complete specification for what you need to build. Read it carefully
    10→before proceeding.
    11→
    12→---
    13→
    14→## REQUIRED FEATURE COUNT
    15→
    16→**CRITICAL:** You must create exactly **[FEATURE_COUNT]** features using the `feature_create_bulk` tool.
    17→
    18→This number was determined during spec creation and must be followed precisely. Do not create more or fewer features than specified.
    19→
    20→---
    21→
    22→### CRITICAL FIRST TASK: Create Features
    23→
    24→Based on `app_spec.txt`, create features using the feature_create_bulk tool. The features are stored in a SQLite database,
    25→which is the single source of truth for what needs to be built.
    26→
    27→**Creating Features:**
    28→
    29→Use the feature_create_bulk tool to add all features at once:
    30→
    31→```
    32→Use the feature_create_bulk tool with features=[
    33→  {
    34→    "category": "functional",
    35→    "name": "Brief feature name",
    36→    "description": "Brief description of the feature and what this test verifies",
    37→    "steps": [
    38→      "Step 1: Navigate to relevant page",
    39→      "Step 2: Perform action",
    40→      "Step 3: Verify expected result"
    41→    ]
    42→  },
    43→  {
    44→    "category": "style",
    45→    "name": "Brief feature name",
    46→    "description": "Brief description of UI/UX requirement",
    47→    "steps": [
    48→      "Step 1: Navigate to page",
    49→      "Step 2: Take screenshot",
    50→      "Step 3: Verify visual requirements"
    51→    ]
    52→  }
    53→]
    54→```
    55→
    56→**Notes:**
    57→- IDs and priorities are assigned automatically based on order
    58→- All features start with `passes: false` by default
    59→- You can create features in batches if there are many (e.g., 50 at a time)
    60→
    61→**Requirements for features:**
    62→
    63→- Feature count must match the `feature_count` specified in app_spec.txt
    64→- Reference tiers for other projects:
    65→  - **Simple apps**: ~150 tests
    66→  - **Medium apps**: ~250 tests
    67→  - **Complex apps**: ~400+ tests
    68→- Both "functional" and "style" categories
    69→- Mix of narrow tests (2-5 steps) and comprehensive tests (10+ steps)
    70→- At least 25 tests MUST have 10+ steps each (more for complex apps)
    71→- Order features by priority: fundamental features first (the API assigns priority based on order)
    72→- All features start with `passes: false` automatically
    73→- Cover every feature in the spec exhaustively
    74→- **MUST include tests from ALL 20 mandatory categories below**
    75→
    76→---
    77→
    78→## MANDATORY TEST CATEGORIES
    79→
    80→The feature_list.json **MUST** include tests from ALL of these categories. The minimum counts scale by complexity tier.
    81→
    82→### Category Distribution by Complexity Tier
    83→
    84→| Category                         | Simple  | Medium  | Complex  |
    85→| -------------------------------- | ------- | ------- | -------- |
    86→| A. Security & Access Control     | 5       | 20      | 40       |
    87→| B. Navigation Integrity          | 15      | 25      | 40       |
    88→| C. Real Data Verification        | 20      | 30      | 50       |
    89→| D. Workflow Completeness         | 10      | 20      | 40       |
    90→| E. Error Handling                | 10      | 15      | 25       |
    91→| F. UI-Backend Integration        | 10      | 20      | 35       |
    92→| G. State & Persistence           | 8       | 10      | 15       |
    93→| H. URL & Direct Access           | 5       | 10      | 20       |
    94→| I. Double-Action & Idempotency   | 5       | 8       | 15       |
    95→| J. Data Cleanup & Cascade        | 5       | 10      | 20       |
    96→| K. Default & Reset               | 5       | 8       | 12       |
    97→| L. Search & Filter Edge Cases    | 8       | 12      | 20       |
    98→| M. Form Validation               | 10      | 15      | 25       |
    99→| N. Feedback & Notification       | 8       | 10      | 15       |
   100→| O. Responsive & Layout           | 8       | 10      | 15       |
   101→| P. Accessibility                 | 8       | 10      | 15       |
   102→| Q. Temporal & Timezone           | 5       | 8       | 12       |
   103→| R. Concurrency & Race Conditions | 5       | 8       | 15       |
   104→| S. Export/Import                 | 5       | 6       | 10       |
   105→| T. Performance                   | 5       | 5       | 10       |
   106→| **TOTAL**                        | **150** | **250** | **400+** |
   107→
   108→---
   109→
   110→### A. Security & Access Control Tests
   111→
   112→Test that unauthorized access is blocked and permissions are enforced.
   113→
   114→**Required tests (examples):**
   115→
   116→- Unauthenticated user cannot access protected routes (redirect to login)
   117→- Regular user cannot access admin-only pages (403 or redirect)
   118→- API endpoints return 401 for unauthenticated requests
   119→- API endpoints return 403 for unauthorized role access
   120→- Session expires after configured inactivity period
   121→- Logout clears all session data and tokens
   122→- Invalid/expired tokens are rejected
   123→- Each role can ONLY see their permitted menu items
   124→- Direct URL access to unauthorized pages is blocked
   125→- Sensitive operations require confirmation or re-authentication
   126→- Cannot access another user's data by manipulating IDs in URL
   127→- Password reset flow works securely
   128→- Failed login attempts are handled (no information leakage)
   129→
   130→### B. Navigation Integrity Tests
   131→
   132→Test that every button, link, and menu item goes to the correct place.
   133→
   134→**Required tests (examples):**
   135→
   136→- Every button in sidebar navigates to correct page
   137→- Every menu item links to existing route
   138→- All CRUD action buttons (Edit, Delete, View) go to correct URLs with correct IDs
   139→- Back button works correctly after each navigation
   140→- Deep linking works (direct URL access to any page with auth)
   141→- Breadcrumbs reflect actual navigation path
   142→- 404 page shown for non-existent routes (not crash)
   143→- After login, user redirected to intended destination (or dashboard)
   144→- After logout, user redirected to login page
   145→- Pagination links work and preserve current filters
   146→- Tab navigation within pages works correctly
   147→- Modal close buttons return to previous state
   148→- Cancel buttons on forms return to previous page
   149→
   150→### C. Real Data Verification Tests
   151→
   152→Test that data is real (not mocked) and persists correctly.
   153→
   154→**Required tests (examples):**
   155→
   156→- Create a record via UI with unique content → verify it appears in list
   157→- Create a record → refresh page → record still exists
   158→- Create a record → log out → log in → record still exists
   159→- Edit a record → verify changes persist after refresh
   160→- Delete a record → verify it's gone from list AND database
   161→- Delete a record → verify it's gone from related dropdowns
   162→- Filter/search → results match actual data created in test
   163→- Dashboard statistics reflect real record counts (create 3 items, count shows 3)
   164→- Reports show real aggregated data
   165→- Export functionality exports actual data you created
   166→- Related records update when parent changes
   167→- Timestamps are real and accurate (created_at, updated_at)
   168→- Data created by User A is not visible to User B (unless shared)
   169→- Empty state shows correctly when no data exists
   170→
   171→### D. Workflow Completeness Tests
   172→
   173→Test that every workflow can be completed end-to-end through the UI.
   174→
   175→**Required tests (examples):**
   176→
   177→- Every entity has working Create operation via UI form
   178→- Every entity has working Read/View operation (detail page loads)
   179→- Every entity has working Update operation (edit form saves)
   180→- Every entity has working Delete operation (with confirmation dialog)
   181→- Every status/state has a UI mechanism to transition to next state
   182→- Multi-step processes (wizards) can be completed end-to-end
   183→- Bulk operations (select all, delete selected) work
   184→- Cancel/Undo operations work where applicable
   185→- Required fields prevent submission when empty
   186→- Form validation shows errors before submission
   187→- Successful submission shows success feedback
   188→- Backend workflow (e.g., user→customer conversion) has UI trigger
   189→
   190→### E. Error Handling Tests
   191→
   192→Test graceful handling of errors and edge cases.
   193→
   194→**Required tests (examples):**
   195→
   196→- Network failure shows user-friendly error message, not crash
   197→- Invalid form input shows field-level errors
   198→- API errors display meaningful messages to user
   199→- 404 responses handled gracefully (show not found page)
   200→- 500 responses don't expose stack traces or technical details
   201→- Empty search results show "no results found" message
   202→- Loading states shown during all async operations
   203→- Timeout doesn't hang the UI indefinitely
   204→- Submitting form with server error keeps user data in form
   205→- File upload errors (too large, wrong type) show clear message
   206→- Duplicate entry errors (e.g., email already exists) are clear
   207→
   208→### F. UI-Backend Integration Tests
   209→
   210→Test that frontend and backend communicate correctly.
   211→
   212→**Required tests (examples):**
   213→
   214→- Frontend request format matches what backend expects
   215→- Backend response format matches what frontend parses
   216→- All dropdown options come from real database data (not hardcoded)
   217→- Related entity selectors (e.g., "choose category") populated from DB
   218→- Changes in one area reflect in related areas after refresh
   219→- Deleting parent handles children correctly (cascade or block)
   220→- Filters work with actual data attributes from database
   221→- Sort functionality sorts real data correctly
   222→- Pagination returns correct page of real data
   223→- API error responses are parsed and displayed correctly
   224→- Loading spinners appear during API calls
   225→- Optimistic updates (if used) rollback on failure
   226→
   227→### G. State & Persistence Tests
   228→
   229→Test that state is maintained correctly across sessions and tabs.
   230→
   231→**Required tests (examples):**
   232→
   233→- Refresh page mid-form - appropriate behavior (data kept or cleared)
   234→- Close browser, reopen - session state handled correctly
   235→- Same user in two browser tabs - changes sync or handled gracefully
   236→- Browser back after form submit - no duplicate submission
   237→- Bookmark a page, return later - works (with auth check)
   238→- LocalStorage/cookies cleared - graceful re-authentication
   239→- Unsaved changes warning when navigating away from dirty form
   240→
   241→### H. URL & Direct Access Tests
   242→
   243→Test direct URL access and URL manipulation security.
   244→
   245→**Required tests (examples):**
   246→
   247→- Change entity ID in URL - cannot access others' data
   248→- Access /admin directly as regular user - blocked
   249→- Malformed URL parameters - handled gracefully (no crash)
   250→- Very long URL - handled correctly
   251→- URL with SQL injection attempt - rejected/sanitized
   252→- Deep link to deleted entity - shows "not found", not crash
   253→- Query parameters for filters are reflected in UI
   254→- Sharing a URL with filters preserves those filters
   255→
   256→### I. Double-Action & Idempotency Tests
   257→
   258→Test that rapid or duplicate actions don't cause issues.
   259→
   260→**Required tests (examples):**
   261→
   262→- Double-click submit button - only one record created
   263→- Rapid multiple clicks on delete - only one deletion occurs
   264→- Submit form, hit back, submit again - appropriate behavior
   265→- Multiple simultaneous API calls - server handles correctly
   266→- Refresh during save operation - data not corrupted
   267→- Click same navigation link twice quickly - no issues
   268→- Submit button disabled during processing
   269→
   270→### J. Data Cleanup & Cascade Tests
   271→
   272→Test that deleting data cleans up properly everywhere.
   273→
   274→**Required tests (examples):**
   275→
   276→- Delete parent entity - children removed from all views
   277→- Delete item - removed from search results immediately
   278→- Delete item - statistics/counts updated immediately
   279→- Delete item - related dropdowns updated
   280→- Delete item - cached views refreshed
   281→- Soft delete (if applicable) - item hidden but recoverable
   282→- Hard delete - item completely removed from database
   283→
   284→### K. Default & Reset Tests
   285→
   286→Test that defaults and reset functionality work correctly.
   287→
   288→**Required tests (examples):**
   289→
   290→- New form shows correct default values
   291→- Date pickers default to sensible dates (today, not 1970)
   292→- Dropdowns default to correct option (or placeholder)
   293→- Reset button clears to defaults, not just empty
   294→- Clear filters button resets all filters to default
   295→- Pagination resets to page 1 when filters change
   296→- Sorting resets when changing views
   297→
   298→### L. Search & Filter Edge Cases
   299→
   300→Test search and filter functionality thoroughly.
   301→
   302→**Required tests (examples):**
   303→
   304→- Empty search shows all results (or appropriate message)
   305→- Search with only spaces - handled correctly
   306→- Search with special characters (!@#$%^&\*) - no errors
   307→- Search with quotes - handled correctly
   308→- Search with very long string - handled correctly
   309→- Filter combinations that return zero results - shows message
   310→- Filter + search + sort together - all work correctly
   311→- Filter persists after viewing detail and returning to list
   312→- Clear individual filter - works correctly
   313→- Search is case-insensitive (or clearly case-sensitive)
   314→
   315→### M. Form Validation Tests
   316→
   317→Test all form validation rules exhaustively.
   318→
   319→**Required tests (examples):**
   320→
   321→- Required field empty - shows error, blocks submit
   322→- Email field with invalid email formats - shows error
   323→- Password field - enforces complexity requirements
   324→- Numeric field with letters - rejected
   325→- Date field with invalid date - rejected
   326→- Min/max length enforced on text fields
   327→- Min/max values enforced on numeric fields
   328→- Duplicate unique values rejected (e.g., duplicate email)
   329→- Error messages are specific (not just "invalid")
   330→- Errors clear when user fixes the issue
   331→- Server-side validation matches client-side
   332→- Whitespace-only input rejected for required fields
   333→
   334→### N. Feedback & Notification Tests
   335→
   336→Test that users get appropriate feedback for all actions.
   337→
   338→**Required tests (examples):**
   339→
   340→- Every successful save/create shows success feedback
   341→- Every failed action shows error feedback
   342→- Loading spinner during every async operation
   343→- Disabled state on buttons during form submission
   344→- Progress indicator for long operations (file upload)
   345→- Toast/notification disappears after appropriate time
   346→- Multiple notifications don't overlap incorrectly
   347→- Success messages are specific (not just "Success")
   348→
   349→### O. Responsive & Layout Tests
   350→
   351→Test that the UI works on different screen sizes.
   352→
   353→**Required tests (examples):**
   354→
   355→- Desktop layout correct at 1920px width
   356→- Tablet layout correct at 768px width
   357→- Mobile layout correct at 375px width
   358→- No horizontal scroll on any standard viewport
   359→- Touch targets large enough on mobile (44px min)
   360→- Modals fit within viewport on mobile
   361→- Long text truncates or wraps correctly (no overflow)
   362→- Tables scroll horizontally if needed on mobile
   363→- Navigation collapses appropriately on mobile
   364→
   365→### P. Accessibility Tests
   366→
   367→Test basic accessibility compliance.
   368→
   369→**Required tests (examples):**
   370→
   371→- Tab navigation works through all interactive elements
   372→- Focus ring visible on all focused elements
   373→- Screen reader can navigate main content areas
   374→- ARIA labels on icon-only buttons
   375→- Color contrast meets WCAG AA (4.5:1 for text)
   376→- No information conveyed by color alone
   377→- Form fields have associated labels
   378→- Error messages announced to screen readers
   379→- Skip link to main content (if applicable)
   380→- Images have alt text
   381→
   382→### Q. Temporal & Timezone Tests
   383→
   384→Test date/time handling.
   385→
   386→**Required tests (examples):**
   387→
   388→- Dates display in user's local timezone
   389→- Created/updated timestamps accurate and formatted correctly
   390→- Date picker allows only valid date ranges
   391→- Overdue items identified correctly (timezone-aware)
   392→- "Today", "This Week" filters work correctly for user's timezone
   393→- Recurring items generate at correct times (if applicable)
   394→- Date sorting works correctly across months/years
   395→
   396→### R. Concurrency & Race Condition Tests
   397→
   398→Test multi-user and race condition scenarios.
   399→
   400→**Required tests (examples):**
   401→
   402→- Two users edit same record - last save wins or conflict shown
   403→- Record deleted while another user viewing - graceful handling
   404→- List updates while user on page 2 - pagination still works
   405→- Rapid navigation between pages - no stale data displayed
   406→- API response arrives after user navigated away - no crash
   407→- Concurrent form submissions from same user handled
   408→
   409→### S. Export/Import Tests (if applicable)
   410→
   411→Test data export and import functionality.
   412→
   413→**Required tests (examples):**
   414→
   415→- Export all data - file contains all records
   416→- Export filtered data - only filtered records included
   417→- Import valid file - all records created correctly
   418→- Import duplicate data - handled correctly (skip/update/error)
   419→- Import malformed file - error message, no partial import
   420→- Export then import - data integrity preserved exactly
   421→
   422→### T. Performance Tests
   423→
   424→Test basic performance requirements.
   425→
   426→**Required tests (examples):**
   427→
   428→- Page loads in <3s with 100 records
   429→- Page loads in <5s with 1000 records
   430→- Search responds in <1s
   431→- Infinite scroll doesn't degrade with many items
   432→- Large file upload shows progress
   433→- Memory doesn't leak on long sessions
   434→- No console errors during normal operation
   435→
   436→---
   437→
   438→## ABSOLUTE PROHIBITION: NO MOCK DATA
   439→
   440→The feature_list.json must include tests that **actively verify real data** and **detect mock data patterns**.
   441→
   442→**Include these specific tests:**
   443→
   444→1. Create unique test data (e.g., "TEST_12345_VERIFY_ME")
   445→2. Verify that EXACT data appears in UI
   446→3. Refresh page - data persists
   447→4. Delete data - verify it's gone
   448→5. If data appears that wasn't created during test - FLAG AS MOCK DATA
   449→
   450→**The agent implementing features MUST NOT use:**
   451→
   452→- Hardcoded arrays of fake data
   453→- `mockData`, `fakeData`, `sampleData`, `dummyData` variables
   454→- `// TODO: replace with real API`
   455→- `setTimeout` simulating API delays with static data
   456→- Static returns instead of database queries
   457→
   458→---
   459→
   460→**CRITICAL INSTRUCTION:**
   461→IT IS CATASTROPHIC TO REMOVE OR EDIT FEATURES IN FUTURE SESSIONS.
   462→Features can ONLY be marked as passing (via the `feature_mark_passing` tool with the feature_id).
   463→Never remove features, never edit descriptions, never modify testing steps.
   464→This ensures no functionality is missed.
   465→
   466→### SECOND TASK: Create init.sh
   467→
   468→Create a script called `init.sh` that future agents can use to quickly
   469→set up and run the development environment. The script should:
   470→
   471→1. Install any required dependencies
   472→2. Start any necessary servers or services
   473→3. Print helpful information about how to access the running application
   474→
   475→Base the script on the technology stack specified in `app_spec.txt`.
   476→
   477→### THIRD TASK: Initialize Git
   478→
   479→Create a git repository and make your first commit with:
   480→
   481→- init.sh (environment setup script)
   482→- README.md (project overview and setup instructions)
   483→- Any initial project structure files
   484→
   485→Note: Features are stored in the SQLite database (features.db), not in a JSON file.
   486→
   487→Commit message: "Initial setup: init.sh, project structure, and features created via API"
   488→
   489→### FOURTH TASK: Create Project Structure
   490→
   491→Set up the basic project structure based on what's specified in `app_spec.txt`.
   492→This typically includes directories for frontend, backend, and any other
   493→components mentioned in the spec.
   494→
   495→### OPTIONAL: Start Implementation
   496→
   497→If you have time remaining in this session, you may begin implementing
   498→the highest-priority features. Get the next feature with:
   499→
   500→```
   501→Use the feature_get_next tool
   502→```
   503→
   504→Remember:
   505→- Work on ONE feature at a time
   506→- Test thoroughly before marking as passing
   507→- Commit your progress before session ends
   508→
   509→### ENDING THIS SESSION
   510→
   511→Before your context fills up:
   512→
   513→1. Commit all work with descriptive messages
   514→2. Create `claude-progress.txt` with a summary of what you accomplished
   515→3. Verify features were created using the feature_get_stats tool
   516→4. Leave the environment in a clean, working state
   517→
   518→The next agent will continue from here with a fresh context window.
   519→
   520→---
   521→
   522→**Remember:** You have unlimited time across many sessions. Focus on
   523→quality over speed. Production-ready is the goal.
   524→

<system-reminder>
Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior.
</system-reminder>

## YOUR ROLE - INITIALIZER AGENT (Session 1 of Many)

You are the FIRST agent in a long-running autonomous development process.
Your job is to set up the foundation for all future coding agents.

### FIRST: Read the Project Specification

Start by reading `app_spec.txt` in your working directory. This file contains
the complete specification for what you need to build. Read it carefully
before proceeding.

---

## REQUIRED FEATURE COUNT

**CRITICAL:** You must create exactly **[FEATURE_COUNT]** features using the `feature_create_bulk` tool.

This number was determined during spec creation and must be followed precisely. Do not create more or fewer features than specified.

---

### CRITICAL FIRST TASK: Create Features

Based on `app_spec.txt`, create features using the feature_create_bulk tool. The features are stored in a SQLite database,
which is the single source of truth for what needs to be built.

**Creating Features:**

Use the feature_create_bulk tool to add all features at once:

```
Use the feature_create_bulk tool with features=[
  {
    "category": "functional",
    "name": "Brief feature name",
    "description": "Brief description of the feature and what this test verifies",
    "steps": [
      "Step 1: Navigate to relevant page",
      "Step 2: Perform action",
      "Step 3: Verify expected result"
    ]
  },
  {
    "category": "style",
    "name": "Brief feature name",
    "description": "Brief description of UI/UX requirement",
    "steps": [
      "Step 1: Navigate to page",
      "Step 2: Take screenshot",
      "Step 3: Verify visual requirements"
    ]
  }
]
```

**Notes:**
- IDs and priorities are assigned automatically based on order
- All features start with `passes: false` by default
- You can create features in batches if there are many (e.g., 50 at a time)

**Requirements for features:**

- Feature count must match the `feature_count` specified in app_spec.txt
- Reference tiers for other projects:
  - **Simple apps**: ~150 tests
  - **Medium apps**: ~250 tests
  - **Complex apps**: ~400+ tests
- Both "functional" and "style" categories
- Mix of narrow tests (2-5 steps) and comprehensive tests (10+ steps)
- At least 25 tests MUST have 10+ steps each (more for complex apps)
- Order features by priority: fundamental features first (the API assigns priority based on order)
- All features start with `passes: false` automatically
- Cover every feature in the spec exhaustively
- **MUST include tests from ALL 20 mandatory categories below**

---

## MANDATORY TEST CATEGORIES

The feature_list.json **MUST** include tests from ALL of these categories. The minimum counts scale by complexity tier.

### Category Distribution by Complexity Tier

| Category                         | Simple  | Medium  | Complex  |
| -------------------------------- | ------- | ------- | -------- |
| A. Security & Access Control     | 5       | 20      | 40       |
| B. Navigation Integrity          | 15      | 25      | 40       |
| C. Real Data Verification        | 20      | 30      | 50       |
| D. Workflow Completeness         | 10      | 20      | 40       |
| E. Error Handling                | 10      | 15      | 25       |
| F. UI-Backend Integration        | 10      | 20      | 35       |
| G. State & Persistence           | 8       | 10      | 15       |
| H. URL & Direct Access           | 5       | 10      | 20       |
| I. Double-Action & Idempotency   | 5       | 8       | 15       |
| J. Data Cleanup & Cascade        | 5       | 10      | 20       |
| K. Default & Reset               | 5       | 8       | 12       |
| L. Search & Filter Edge Cases    | 8       | 12      | 20       |
| M. Form Validation               | 10      | 15      | 25       |
| N. Feedback & Notification       | 8       | 10      | 15       |
| O. Responsive & Layout           | 8       | 10      | 15       |
| P. Accessibility                 | 8       | 10      | 15       |
| Q. Temporal & Timezone           | 5       | 8       | 12       |
| R. Concurrency & Race Conditions | 5       | 8       | 15       |
| S. Export/Import                 | 5       | 6       | 10       |
| T. Performance                   | 5       | 5       | 10       |
| **TOTAL**                        | **150** | **250** | **400+** |

---

### A. Security & Access Control Tests

Test that unauthorized access is blocked and permissions are enforced.

**Required tests (examples):**

- Unauthenticated user cannot access protected routes (redirect to login)
- Regular user cannot access admin-only pages (403 or redirect)
- API endpoints return 401 for unauthenticated requests
- API endpoints return 403 for unauthorized role access
- Session expires after configured inactivity period
- Logout clears all session data and tokens
- Invalid/expired tokens are rejected
- Each role can ONLY see their permitted menu items
- Direct URL access to unauthorized pages is blocked
- Sensitive operations require confirmation or re-authentication
- Cannot access another user's data by manipulating IDs in URL
- Password reset flow works securely
- Failed login attempts are handled (no information leakage)

### B. Navigation Integrity Tests

Test that every button, link, and menu item goes to the correct place.

**Required tests (examples):**

- Every button in sidebar navigates to correct page
- Every menu item links to existing route
- All CRUD action buttons (Edit, Delete, View) go to correct URLs with correct IDs
- Back button works correctly after each navigation
- Deep linking works (direct URL access to any page with auth)
- Breadcrumbs reflect actual navigation path
- 404 page shown for non-existent routes (not crash)
- After login, user redirected to intended destination (or dashboard)
- After logout, user redirected to login page
- Pagination links work and preserve current filters
- Tab navigation within pages works correctly
- Modal close buttons return to previous state
- Cancel buttons on forms return to previous page

### C. Real Data Verification Tests

Test that data is real (not mocked) and persists correctly.

**Required tests (examples):**

- Create a record via UI with unique content → verify it appears in list
- Create a record → refresh page → record still exists
- Create a record → log out → log in → record still exists
- Edit a record → verify changes persist after refresh
- Delete a record → verify it's gone from list AND database
- Delete a record → verify it's gone from related dropdowns
- Filter/search → results match actual data created in test
- Dashboard statistics reflect real record counts (create 3 items, count shows 3)
- Reports show real aggregated data
- Export functionality exports actual data you created
- Related records update when parent changes
- Timestamps are real and accurate (created_at, updated_at)
- Data created by User A is not visible to User B (unless shared)
- Empty state shows correctly when no data exists

### D. Workflow Completeness Tests

Test that every workflow can be completed end-to-end through the UI.

**Required tests (examples):**

- Every entity has working Create operation via UI form
- Every entity has working Read/View operation (detail page loads)
- Every entity has working Update operation (edit form saves)
- Every entity has working Delete operation (with confirmation dialog)
- Every status/state has a UI mechanism to transition to next state
- Multi-step processes (wizards) can be completed end-to-end
- Bulk operations (select all, delete selected) work
- Cancel/Undo operations work where applicable
- Required fields prevent submission when empty
- Form validation shows errors before submission
- Successful submission shows success feedback
- Backend workflow (e.g., user→customer conversion) has UI trigger

### E. Error Handling Tests

Test graceful handling of errors and edge cases.

**Required tests (examples):**

- Network failure shows user-friendly error message, not crash
- Invalid form input shows field-level errors
- API errors display meaningful messages to user
- 404 responses handled gracefully (show not found page)
- 500 responses don't expose stack traces or technical details
- Empty search results show "no results found" message
- Loading states shown during all async operations
- Timeout doesn't hang the UI indefinitely
- Submitting form with server error keeps user data in form
- File upload errors (too large, wrong type) show clear message
- Duplicate entry errors (e.g., email already exists) are clear

### F. UI-Backend Integration Tests

Test that frontend and backend communicate correctly.

**Required tests (examples):**

- Frontend request format matches what backend expects
- Backend response format matches what frontend parses
- All dropdown options come from real database data (not hardcoded)
- Related entity selectors (e.g., "choose category") populated from DB
- Changes in one area reflect in related areas after refresh
- Deleting parent handles children correctly (cascade or block)
- Filters work with actual data attributes from database
- Sort functionality sorts real data correctly
- Pagination returns correct page of real data
- API error responses are parsed and displayed correctly
- Loading spinners appear during API calls
- Optimistic updates (if used) rollback on failure

### G. State & Persistence Tests

Test that state is maintained correctly across sessions and tabs.

**Required tests (examples):**

- Refresh page mid-form - appropriate behavior (data kept or cleared)
- Close browser, reopen - session state handled correctly
- Same user in two browser tabs - changes sync or handled gracefully
- Browser back after form submit - no duplicate submission
- Bookmark a page, return later - works (with auth check)
- LocalStorage/cookies cleared - graceful re-authentication
- Unsaved changes warning when navigating away from dirty form

### H. URL & Direct Access Tests

Test direct URL access and URL manipulation security.

**Required tests (examples):**

- Change entity ID in URL - cannot access others' data
- Access /admin directly as regular user - blocked
- Malformed URL parameters - handled gracefully (no crash)
- Very long URL - handled correctly
- URL with SQL injection attempt - rejected/sanitized
- Deep link to deleted entity - shows "not found", not crash
- Query parameters for filters are reflected in UI
- Sharing a URL with filters preserves those filters

### I. Double-Action & Idempotency Tests

Test that rapid or duplicate actions don't cause issues.

**Required tests (examples):**

- Double-click submit button - only one record created
- Rapid multiple clicks on delete - only one deletion occurs
- Submit form, hit back, submit again - appropriate behavior
- Multiple simultaneous API calls - server handles correctly
- Refresh during save operation - data not corrupted
- Click same navigation link twice quickly - no issues
- Submit button disabled during processing

### J. Data Cleanup & Cascade Tests

Test that deleting data cleans up properly everywhere.

**Required tests (examples):**

- Delete parent entity - children removed from all views
- Delete item - removed from search results immediately
- Delete item - statistics/counts updated immediately
- Delete item - related dropdowns updated
- Delete item - cached views refreshed
- Soft delete (if applicable) - item hidden but recoverable
- Hard delete - item completely removed from database

### K. Default & Reset Tests

Test that defaults and reset functionality work correctly.

**Required tests (examples):**

- New form shows correct default values
- Date pickers default to sensible dates (today, not 1970)
- Dropdowns default to correct option (or placeholder)
- Reset button clears to defaults, not just empty
- Clear filters button resets all filters to default
- Pagination resets to page 1 when filters change
- Sorting resets when changing views

### L. Search & Filter Edge Cases

Test search and filter functionality thoroughly.

**Required tests (examples):**

- Empty search shows all results (or appropriate message)
- Search with only spaces - handled correctly
- Search with special characters (!@#$%^&\*) - no errors
- Search with quotes - handled correctly
- Search with very long string - handled correctly
- Filter combinations that return zero results - shows message
- Filter + search + sort together - all work correctly
- Filter persists after viewing detail and returning to list
- Clear individual filter - works correctly
- Search is case-insensitive (or clearly case-sensitive)

### M. Form Validation Tests

Test all form validation rules exhaustively.

**Required tests (examples):**

- Required field empty - shows error, blocks submit
- Email field with invalid email formats - shows error
- Password field - enforces complexity requirements
- Numeric field with letters - rejected
- Date field with invalid date - rejected
- Min/max length enforced on text fields
- Min/max values enforced on numeric fields
- Duplicate unique values rejected (e.g., duplicate email)
- Error messages are specific (not just "invalid")
- Errors clear when user fixes the issue
- Server-side validation matches client-side
- Whitespace-only input rejected for required fields

### N. Feedback & Notification Tests

Test that users get appropriate feedback for all actions.

**Required tests (examples):**

- Every successful save/create shows success feedback
- Every failed action shows error feedback
- Loading spinner during every async operation
- Disabled state on buttons during form submission
- Progress indicator for long operations (file upload)
- Toast/notification disappears after appropriate time
- Multiple notifications don't overlap incorrectly
- Success messages are specific (not just "Success")

### O. Responsive & Layout Tests

Test that the UI works on different screen sizes.

**Required tests (examples):**

- Desktop layout correct at 1920px width
- Tablet layout correct at 768px width
- Mobile layout correct at 375px width
- No horizontal scroll on any standard viewport
- Touch targets large enough on mobile (44px min)
- Modals fit within viewport on mobile
- Long text truncates or wraps correctly (no overflow)
- Tables scroll horizontally if needed on mobile
- Navigation collapses appropriately on mobile

### P. Accessibility Tests

Test basic accessibility compliance.

**Required tests (examples):**

- Tab navigation works through all interactive elements
- Focus ring visible on all focused elements
- Screen reader can navigate main content areas
- ARIA labels on icon-only buttons
- Color contrast meets WCAG AA (4.5:1 for text)
- No information conveyed by color alone
- Form fields have associated labels
- Error messages announced to screen readers
- Skip link to main content (if applicable)
- Images have alt text

### Q. Temporal & Timezone Tests

Test date/time handling.

**Required tests (examples):**

- Dates display in user's local timezone
- Created/updated timestamps accurate and formatted correctly
- Date picker allows only valid date ranges
- Overdue items identified correctly (timezone-aware)
- "Today", "This Week" filters work correctly for user's timezone
- Recurring items generate at correct times (if applicable)
- Date sorting works correctly across months/years

### R. Concurrency & Race Condition Tests

Test multi-user and race condition scenarios.

**Required tests (examples):**

- Two users edit same record - last save wins or conflict shown
- Record deleted while another user viewing - graceful handling
- List updates while user on page 2 - pagination still works
- Rapid navigation between pages - no stale data displayed
- API response arrives after user navigated away - no crash
- Concurrent form submissions from same user handled

### S. Export/Import Tests (if applicable)

Test data export and import functionality.

**Required tests (examples):**

- Export all data - file contains all records
- Export filtered data - only filtered records included
- Import valid file - all records created correctly
- Import duplicate data - handled correctly (skip/update/error)
- Import malformed file - error message, no partial import
- Export then import - data integrity preserved exactly

### T. Performance Tests

Test basic performance requirements.

**Required tests (examples):**

- Page loads in <3s with 100 records
- Page loads in <5s with 1000 records
- Search responds in <1s
- Infinite scroll doesn't degrade with many items
- Large file upload shows progress
- Memory doesn't leak on long sessions
- No console errors during normal operation

---

## ABSOLUTE PROHIBITION: NO MOCK DATA

The feature_list.json must include tests that **actively verify real data** and **detect mock data patterns**.

**Include these specific tests:**

1. Create unique test data (e.g., "TEST_12345_VERIFY_ME")
2. Verify that EXACT data appears in UI
3. Refresh page - data persists
4. Delete data - verify it's gone
5. If data appears that wasn't created during test - FLAG AS MOCK DATA

**The agent implementing features MUST NOT use:**

- Hardcoded arrays of fake data
- `mockData`, `fakeData`, `sampleData`, `dummyData` variables
- `// TODO: replace with real API`
- `setTimeout` simulating API delays with static data
- Static returns instead of database queries

---

**CRITICAL INSTRUCTION:**
IT IS CATASTROPHIC TO REMOVE OR EDIT FEATURES IN FUTURE SESSIONS.
Features can ONLY be marked as passing (via the `feature_mark_passing` tool with the feature_id).
Never remove features, never edit descriptions, never modify testing steps.
This ensures no functionality is missed.

### SECOND TASK: Create init.sh

Create a script called `init.sh` that future agents can use to quickly
set up and run the development environment. The script should:

1. Install any required dependencies
2. Start any necessary servers or services
3. Print helpful information about how to access the running application

Base the script on the technology stack specified in `app_spec.txt`.

### THIRD TASK: Initialize Git

Create a git repository and make your first commit with:

- init.sh (environment setup script)
- README.md (project overview and setup instructions)
- Any initial project structure files

Note: Features are stored in the SQLite database (features.db), not in a JSON file.

Commit message: "Initial setup: init.sh, project structure, and features created via API"

### FOURTH TASK: Create Project Structure

Set up the basic project structure based on what's specified in `app_spec.txt`.
This typically includes directories for frontend, backend, and any other
components mentioned in the spec.

### OPTIONAL: Start Implementation

If you have time remaining in this session, you may begin implementing
the highest-priority features. Get the next feature with:

```
Use the feature_get_next tool
```

Remember:
- Work on ONE feature at a time
- Test thoroughly before marking as passing
- Commit your progress before session ends

### ENDING THIS SESSION

Before your context fills up:

1. Commit all work with descriptive messages
2. Create `claude-progress.txt` with a summary of what you accomplished
3. Verify features were created using the feature_get_stats tool
4. Leave the environment in a clean, working state

The next agent will continue from here with a fresh context window.

---

**Remember:** You have unlimited time across many sessions. Focus on
quality over speed. Production-ready is the goal.


Now let me create the specification files:


Write

<project_specification>
  <project_name>Auto-Claude-Plus</project_name>

  <overview>
    Auto-Claude-Plus is an autonomous multi-agent coding framework that plans, builds, and validates software with minimal human intervention. It combines Auto-Claude's spec pipeline and multi-agent architecture, Ralph Wiggum's iterative persistence loop for difficult tasks, and the frontend-design skill's philosophy for producing distinctive, polished UIs. The system features a three-tier memory system (project, global, infrastructure), a Re-Spec capability for refining project vision mid-stream, and intelligent error recovery that continues work on non-blocking tasks while flagging issues for review.
  </overview>

  <technology_stack>
    <frontend>
      <framework>Electron + React 18 + TypeScript</framework>
      <styling>Tailwind CSS + Custom Design System</styling>
      <state_management>Zustand (lightweight, scalable)</state_management>
      <ui_components>Radix UI primitives (accessible, unstyled)</ui_components>
      <bundler>Vite</bundler>
    </frontend>
    <backend>
      <runtime>Python 3.12+</runtime>
      <agent_sdk>Claude Agent SDK</agent_sdk>
      <database>SQLite (portable, Docker-friendly)</database>
      <orm>SQLAlchemy</orm>
      <api>FastAPI (for internal IPC and potential future REST API)</api>
    </backend>
    <communication>
      <api>IPC between Electron and Python backend</api>
      <realtime>WebSocket for agent terminal streaming</realtime>
    </communication>
    <deployment>
      <containerization>Docker + Docker Compose</containerization>
      <platforms>Windows, macOS, Linux</platforms>
    </deployment>
  </technology_stack>

  <prerequisites>
    <environment_setup>
      - Python 3.12+ with uv package manager
      - Node.js 20+ with npm
      - Git
      - Docker (for containerized deployment)
      - Claude Pro/Max subscription
      - Claude Code CLI: npm install -g @anthropic-ai/claude-code
    </environment_setup>
  </prerequisites>

  <feature_count>165</feature_count>

  <security_and_access_control>
    <user_roles>
      <role name="owner">
        <permissions>
          - Full access to all features
          - Manage global and infrastructure memory
          - Configure deployment targets
          - Access all projects
        </permissions>
        <protected_routes>
          - All routes accessible
        </protected_routes>
      </role>
    </user_roles>
    <authentication>
      <method>Local only (no auth required for single-user internal use)</method>
      <session_timeout>none</session_timeout>
      <password_requirements>N/A</password_requirements>
    </authentication>
    <sensitive_operations>
      - Infrastructure memory contains server access info (stored locally only)
      - Git push operations require confirmation
      - Delete project requires confirmation
    </sensitive_operations>
  </security_and_access_control>

  <core_features>
    <project_management>
      - Create new project with spec interview
      - Open/browse existing projects
      - Adopt existing codebase (import and run through spec interview)
      - Project dashboard with status overview
      - Project settings and configuration
      - Delete project with confirmation
    </project_management>

    <spec_system>
      - Spec interview/creation wizard
      - Re-Spec feature (re-interview with existing context)
      - Automatic milestone detection for large projects
      - Re-Spec offered at milestones (MVP, phase completion)
      - Spec validation and completeness checking
      - Spec history and version tracking
      - Existing work re-evaluation against new spec
    </spec_system>

    <kanban_board>
      - Visual task board with columns (Backlog, In Progress, QA, Done, Blocked)
      - Task cards with status, priority, agent assignment
      - Drag-and-drop task movement
      - Task filtering by status, agent, phase
      - Task details panel with full context
      - Phase grouping and visualization
      - Dependency visualization
    </kanban_board>

    <agent_system>
      - Planner Agent (creates implementation plan)
      - Coder Agent (implements subtasks)
      - QA Reviewer Agent (validates acceptance criteria)
      - QA Fixer Agent (resolves issues)
      - Parallel agent execution (up to 12 terminals)
      - Agent terminals UI with live output streaming
      - Agent status indicators (idle, working, stuck, complete)
      - Subagent spawning for complex subtasks
    </agent_system>

    <iterative_loop>
      - Single-pass validation (default mode)
      - Auto-escalation for failed tasks
      - Auto-escalation for detected complexity
      - Manual retry trigger
      - Ralph Wiggum mode (persistent iteration until completion)
      - Completion promise detection
      - Max iterations safety limit
      - Task flagging for multi-iteration mode
    </iterative_loop>

    <memory_system>
      <project_memory>
        - Session insights (what worked, what failed)
        - Codebase map (what files do what)
        - Patterns discovered (coding conventions)
        - Gotchas (pitfalls to avoid)
        - Build progress history
      </project_memory>
      <global_memory>
        - User preferences (coding style, UI tastes)
        - Cross-project patterns
        - Common solutions ("last time I built auth...")
        - Technology preferences learned over time
      </global_memory>
      <infrastructure_memory>
        - Dev server locations and access methods
        - Docker server configurations
        - Deployment targets (local, cloud)
        - Database server connections
        - API key storage locations
        - Environment-specific configurations
      </infrastructure_memory>
      <memory_management>
        - Memory items tagged by project or global
        - Memory search and retrieval
        - Memory editing and cleanup
        - Memory import/export
      </memory_management>
    </memory_system>

    <frontend_design_integration>
      - Design philosophy applied to all frontend projects
      - MVP mode (functional drafts acceptable)
      - Finished mode (frontend-design criteria required)
      - Opt-out via spec configuration
      - Design thinking framework (purpose, tone, constraints)
      - Typography, color, motion, spatial composition guidelines
      - Anti-pattern detection (generic AI slop)
    </frontend_design_integration>

    <qa_and_testing>
      - Unit test generation for each component
      - E2E test generation at phase completion
      - Test execution against specified infrastructure
      - Test reporting with pass/fail details
      - Coverage tracking
      - QA loop (review -> fix -> re-review)
      - Infrastructure-aware testing (dev servers, Docker)
    </qa_and_testing>

    <git_integration>
      - Git worktree isolation for safe development
      - Auto-commit per subtask completion
      - Auto-push on project/phase completion
      - Branch management (feature branches per spec)
      - Commit message generation
      - Git history visualization
      - Merge conflict detection
    </git_integration>

    <progress_and_visibility>
      - Real-time notifications (task complete, fail, blocked)
      - Estimated time remaining per task/phase
      - Changelog generation from completed tasks
      - Build history and statistics
      - Agent activity timeline
      - Phase progress indicators
      - Overall project completion percentage
    </progress_and_visibility>

    <error_handling>
      - Autonomous error recovery attempts
      - Task flagging for human review
      - Non-blocking continuation (work on other tasks)
      - Error categorization (recoverable, blocking, needs review)
      - Error history and patterns
      - Re-Spec suggestion for persistent issues
    </error_handling>

    <deployment>
      - Docker containerization
      - Docker Compose configuration
      - Multi-machine access support
      - Infrastructure memory integration
      - Deployment pipeline generation
      - Environment configuration management
    </deployment>

    <ui_ux>
      - Polished, distinctive interface (non-generic)
      - Dark/light theme support
      - Responsive layout (desktop-first, but usable on tablet)
      - Keyboard shortcuts for power users
      - Settings/preferences panel
      - Onboarding wizard for first-time setup
    </ui_ux>
  </core_features>

  <database_schema>
    <tables>
      <projects>
        - id, name, description, path, status, created_at, updated_at
        - complexity (simple, medium, complex)
        - current_phase, total_phases
        - spec_version, last_respec_at
      </projects>
      <specs>
        - id, project_id, version, content, created_at
        - is_active, parent_spec_id (for Re-Spec tracking)
      </specs>
      <tasks>
        - id, project_id, spec_id, phase_id, name, description
        - status (backlog, in_progress, qa, done, blocked)
        - priority, estimated_time, actual_time
        - agent_type, iteration_count, flagged_for_review
        - depends_on (JSON array of task IDs)
      </tasks>
      <phases>
        - id, project_id, name, order, status
        - depends_on (JSON array of phase IDs)
        - milestone_type (none, mvp, release)
      </phases>
      <agent_sessions>
        - id, project_id, task_id, agent_type
        - started_at, ended_at, status, output_log
        - iterations, completion_promise
      </agent_sessions>
      <memory_project>
        - id, project_id, type (insight, pattern, gotcha, codebase_map)
        - content, metadata, created_at
      </memory_project>
      <memory_global>
        - id, type (preference, pattern, solution)
        - content, metadata, created_at, usage_count
      </memory_global>
      <memory_infrastructure>
        - id, name, type (server, docker, database, deployment)
        - config (JSON), projects (JSON array of project IDs or null for all)
        - created_at, updated_at
      </memory_infrastructure>
      <notifications>
        - id, project_id, type, message, read, created_at
      </notifications>
      <settings>
        - id, key, value, updated_at
      </settings>
    </tables>
  </database_schema>

  <api_endpoints_summary>
    <projects>
      - GET /api/projects - List all projects
      - POST /api/projects - Create new project
      - GET /api/projects/:id - Get project details
      - PUT /api/projects/:id - Update project
      - DELETE /api/projects/:id - Delete project
      - POST /api/projects/:id/adopt - Adopt existing codebase
    </projects>
    <specs>
      - GET /api/projects/:id/spec - Get current spec
      - POST /api/projects/:id/spec - Create/update spec
      - POST /api/projects/:id/respec - Trigger Re-Spec
      - GET /api/projects/:id/spec/history - Get spec versions
    </specs>
    <tasks>
      - GET /api/projects/:id/tasks - List tasks (with filters)
      - POST /api/projects/:id/tasks - Create task
      - PUT /api/tasks/:id - Update task
      - PUT /api/tasks/:id/status - Update task status
      - POST /api/tasks/:id/retry - Retry task
      - POST /api/tasks/:id/flag - Flag for review
    </tasks>
    <agents>
      - POST /api/agents/start - Start agent session
      - POST /api/agents/:id/stop - Stop agent session
      - GET /api/agents/active - List active agents
      - WS /api/agents/:id/stream - Stream agent output
    </agents>
    <memory>
      - GET /api/memory/project/:id - Get project memory
      - POST /api/memory/project/:id - Add project memory
      - GET /api/memory/global - Get global memory
      - POST /api/memory/global - Add global memory
      - GET /api/memory/infrastructure - Get infrastructure memory
      - POST /api/memory/infrastructure - Add infrastructure config
      - PUT /api/memory/infrastructure/:id - Update infrastructure config
    </memory>
    <notifications>
      - GET /api/notifications - Get notifications
      - PUT /api/notifications/:id/read - Mark as read
      - DELETE /api/notifications/:id - Delete notification
    </notifications>
    <settings>
      - GET /api/settings - Get all settings
      - PUT /api/settings - Update settings
    </settings>
  </api_endpoints_summary>

  <ui_layout>
    <main_structure>
      - Left sidebar: Project list, navigation, quick actions
      - Main content area: Context-dependent (kanban, terminals, settings, etc.)
      - Right panel (collapsible): Task details, agent output, memory viewer
      - Top bar: Project name, phase indicator, notifications, settings
      - Bottom bar: Agent status summary, progress indicator
    </main_structure>
    <key_screens>
      - Dashboard: Project overview, recent activity, quick stats
      - Kanban Board: Visual task management
      - Agent Terminals: Live agent output with multiple terminals
      - Spec Editor: View/edit current spec, trigger Re-Spec
      - Memory Manager: Browse/edit all memory types
      - Infrastructure Config: Manage servers, Docker, deployment targets
      - Settings: App preferences, theme, shortcuts
      - Project Creation Wizard: New project setup flow
      - Re-Spec Interview: Guided re-interview with context
    </key_screens>
  </ui_layout>

  <design_system>
    <philosophy>
      - Distinctive, professional interface (not generic AI slop)
      - Clean but not sterile - subtle personality
      - Information-dense but not overwhelming
      - Emphasize clarity and readability for long coding sessions
    </philosophy>
    <color_palette>
      - Primary: Deep blue (#1a365d) - trust, focus
      - Accent: Vibrant teal (#0d9488) - action, success
      - Warning: Amber (#f59e0b) - attention
      - Error: Rose (#e11d48) - problems
      - Background: Slate gray tones (dark mode default)
      - Text: High contrast for readability
    </color_palette>
    <typography>
      - Headings: Inter or similar geometric sans-serif
      - Body: System font stack for performance
      - Code: JetBrains Mono or Fira Code (monospace with ligatures)
    </typography>
    <motion>
      - Subtle transitions (150-300ms)
      - Meaningful animations (task completion, agent status changes)
      - No gratuitous motion - respect user focus
    </motion>
  </design_system>

  <implementation_steps>
    <step number="1">
      <title>Foundation & Infrastructure</title>
      <tasks>
        - Set up Electron + React + TypeScript project structure
        - Configure Vite bundler and Tailwind CSS
        - Set up Python backend with FastAPI
        - Configure SQLite database with SQLAlchemy
        - Implement IPC bridge between Electron and Python
        - Create Docker configuration
      </tasks>
    </step>
    <step number="2">
      <title>Core Data Layer</title>
      <tasks>
        - Implement database schema and migrations
        - Create Python models for all entities
        - Build CRUD API endpoints for projects, specs, tasks
        - Implement basic memory storage (all three types)
        - Set up WebSocket for real-time updates
      </tasks>
    </step>
    <step number="3">
      <title>Spec System</title>
      <tasks>
        - Build spec interview wizard UI
        - Implement spec creation flow
        - Build Re-Spec interview with existing context
        - Implement spec versioning and history
        - Add milestone detection logic
        - Build spec validation
      </tasks>
    </step>
    <step number="4">
      <title>Agent System</title>
      <tasks>
        - Integrate Claude Agent SDK
        - Implement Planner Agent
        - Implement Coder Agent
        - Implement QA Reviewer Agent
        - Implement QA Fixer Agent
        - Build agent session management
        - Implement parallel agent execution
      </tasks>
    </step>
    <step number="5">
      <title>Iterative Loop Integration</title>
      <tasks>
        - Implement single-pass validation
        - Build auto-escalation detection
        - Implement Ralph Wiggum mode
        - Add completion promise detection
        - Build task flagging system
        - Implement retry logic
      </tasks>
    </step>
    <step number="6">
      <title>Kanban Board & Task Management</title>
      <tasks>
        - Build kanban board UI with drag-and-drop
        - Implement task cards with status
        - Add filtering and sorting
        - Build task details panel
        - Implement phase grouping
        - Add dependency visualization
      </tasks>
    </step>
    <step number="7">
      <title>Agent Terminals UI</title>
      <tasks>
        - Build terminal component with live streaming
        - Implement multi-terminal layout
        - Add agent status indicators
        - Build terminal history/scrollback
        - Implement terminal controls (pause, clear, copy)
      </tasks>
    </step>
    <step number="8">
      <title>Memory System</title>
      <tasks>
        - Build memory manager UI
        - Implement project memory CRUD
        - Implement global memory with cross-project access
        - Build infrastructure memory management
        - Add memory search and tagging
        - Implement memory learning/inference
      </tasks>
    </step>
    <step number="9">
      <title>Git Integration</title>
      <tasks>
        - Implement git worktree management
        - Build auto-commit logic
        - Implement auto-push on completion
        - Add branch management UI
        - Build commit history visualization
      </tasks>
    </step>
    <step number="10">
      <title>QA & Testing System</title>
      <tasks>
        - Implement unit test generation
        - Build E2E test generation
        - Integrate with infrastructure memory for test targets
        - Build test execution and reporting
        - Implement QA loop (review -> fix -> re-review)
      </tasks>
    </step>
    <step number="11">
      <title>Frontend Design Integration</title>
      <tasks>
        - Integrate design philosophy guidelines
        - Build MVP vs Finished mode detection
        - Implement design validation checks
        - Add anti-pattern detection
      </tasks>
    </step>
    <step number="12">
      <title>Progress & Notifications</title>
      <tasks>
        - Build notification system
        - Implement time estimation
        - Build changelog generation
        - Add progress indicators throughout UI
        - Build activity timeline
      </tasks>
    </step>
    <step number="13">
      <title>Error Handling & Recovery</title>
      <tasks>
        - Implement autonomous recovery logic
        - Build task flagging for review
        - Implement non-blocking continuation
        - Add error categorization
        - Build Re-Spec suggestion for persistent issues
      </tasks>
    </step>
    <step number="14">
      <title>Polish & Design System</title>
      <tasks>
        - Apply design system throughout
        - Implement dark/light themes
        - Add keyboard shortcuts
        - Build onboarding wizard
        - Refine animations and transitions
        - Ensure responsive layout
      </tasks>
    </step>
    <step number="15">
      <title>Deployment & Documentation</title>
      <tasks>
        - Finalize Docker configuration
        - Build deployment pipeline support
        - Create user documentation
        - Add in-app help system
        - Final testing and bug fixes
      </tasks>
    </step>
  </implementation_steps>

  <success_criteria>
    <functionality>
      - Can create a new project through spec interview
      - Can adopt existing codebase and run through spec
      - Re-Spec works with full context awareness
      - Agents execute tasks autonomously
      - Iterative loop handles difficult tasks
      - Memory persists and informs across sessions
      - Git operations work correctly (worktree, commit, push)
      - QA loop validates and fixes issues
    </functionality>
    <user_experience>
      - Kanban board is intuitive and responsive
      - Agent terminals provide clear visibility
      - Notifications keep user informed
      - Progress is always visible
      - Error states are clear and actionable
    </user_experience>
    <technical_quality>
      - No mock data - all real persistence
      - Unit tests for core functionality
      - E2E tests for critical workflows
      - Clean error handling throughout
      - Performance acceptable with many tasks
    </technical_quality>
    <design_polish>
      - UI follows design system consistently
      - Dark mode is fully implemented
      - No generic "AI slop" aesthetics
      - Animations are subtle and meaningful
      - Typography is readable for long sessions
    </design_polish>
  </success_criteria>
</project_specification>


File created successfully at: C:/Users/MikeSwanson/AutoBuilder/My-Auto-Builder/prompts/app_spec.txt

<project_specification>
  <project_name>Auto-Claude-Plus</project_name>

  <overview>
    Auto-Claude-Plus is an autonomous multi-agent coding framework that plans, builds, and validates software with minimal human intervention. It combines Auto-Claude's spec pipeline and multi-agent architecture, Ralph Wiggum's iterative persistence loop for difficult tasks, and the frontend-design skill's philosophy for producing distinctive, polished UIs. The system features a three-tier memory system (project, global, infrastructure), a Re-Spec capability for refining project vision mid-stream, and intelligent error recovery that continues work on non-blocking tasks while flagging issues for review.
  </overview>

  <technology_stack>
    <frontend>
      <framework>Electron + React 18 + TypeScript</framework>
      <styling>Tailwind CSS + Custom Design System</styling>
      <state_management>Zustand (lightweight, scalable)</state_management>
      <ui_components>Radix UI primitives (accessible, unstyled)</ui_components>
      <bundler>Vite</bundler>
    </frontend>
    <backend>
      <runtime>Python 3.12+</runtime>
      <agent_sdk>Claude Agent SDK</agent_sdk>
      <database>SQLite (portable, Docker-friendly)</database>
      <orm>SQLAlchemy</orm>
      <api>FastAPI (for internal IPC and potential future REST API)</api>
    </backend>
    <communication>
      <api>IPC between Electron and Python backend</api>
      <realtime>WebSocket for agent terminal streaming</realtime>
    </communication>
    <deployment>
      <containerization>Docker + Docker Compose</containerization>
      <platforms>Windows, macOS, Linux</platforms>
    </deployment>
  </technology_stack>

  <prerequisites>
    <environment_setup>
      - Python 3.12+ with uv package manager
      - Node.js 20+ with npm
      - Git
      - Docker (for containerized deployment)
      - Claude Pro/Max subscription
      - Claude Code CLI: npm install -g @anthropic-ai/claude-code
    </environment_setup>
  </prerequisites>

  <feature_count>165</feature_count>

  <security_and_access_control>
    <user_roles>
      <role name="owner">
        <permissions>
          - Full access to all features
          - Manage global and infrastructure memory
          - Configure deployment targets
          - Access all projects
        </permissions>
        <protected_routes>
          - All routes accessible
        </protected_routes>
      </role>
    </user_roles>
    <authentication>
      <method>Local only (no auth required for single-user internal use)</method>
      <session_timeout>none</session_timeout>
      <password_requirements>N/A</password_requirements>
    </authentication>
    <sensitive_operations>
      - Infrastructure memory contains server access info (stored locally only)
      - Git push operations require confirmation
      - Delete project requires confirmation
    </sensitive_operations>
  </security_and_access_control>

  <core_features>
    <project_management>
      - Create new project with spec interview
      - Open/browse existing projects
      - Adopt existing codebase (import and run through spec interview)
      - Project dashboard with status overview
      - Project settings and configuration
      - Delete project with confirmation
    </project_management>

    <spec_system>
      - Spec interview/creation wizard
      - Re-Spec feature (re-interview with existing context)
      - Automatic milestone detection for large projects
      - Re-Spec offered at milestones (MVP, phase completion)
      - Spec validation and completeness checking
      - Spec history and version tracking
      - Existing work re-evaluation against new spec
    </spec_system>

    <kanban_board>
      - Visual task board with columns (Backlog, In Progress, QA, Done, Blocked)
      - Task cards with status, priority, agent assignment
      - Drag-and-drop task movement
      - Task filtering by status, agent, phase
      - Task details panel with full context
      - Phase grouping and visualization
      - Dependency visualization
    </kanban_board>

    <agent_system>
      - Planner Agent (creates implementation plan)
      - Coder Agent (implements subtasks)
      - QA Reviewer Agent (validates acceptance criteria)
      - QA Fixer Agent (resolves issues)
      - Parallel agent execution (up to 12 terminals)
      - Agent terminals UI with live output streaming
      - Agent status indicators (idle, working, stuck, complete)
      - Subagent spawning for complex subtasks
    </agent_system>

    <iterative_loop>
      - Single-pass validation (default mode)
      - Auto-escalation for failed tasks
      - Auto-escalation for detected complexity
      - Manual retry trigger
      - Ralph Wiggum mode (persistent iteration until completion)
      - Completion promise detection
      - Max iterations safety limit
      - Task flagging for multi-iteration mode
    </iterative_loop>

    <memory_system>
      <project_memory>
        - Session insights (what worked, what failed)
        - Codebase map (what files do what)
        - Patterns discovered (coding conventions)
        - Gotchas (pitfalls to avoid)
        - Build progress history
      </project_memory>
      <global_memory>
        - User preferences (coding style, UI tastes)
        - Cross-project patterns
        - Common solutions ("last time I built auth...")
        - Technology preferences learned over time
      </global_memory>
      <infrastructure_memory>
        - Dev server locations and access methods
        - Docker server configurations
        - Deployment targets (local, cloud)
        - Database server connections
        - API key storage locations
        - Environment-specific configurations
      </infrastructure_memory>
      <memory_management>
        - Memory items tagged by project or global
        - Memory search and retrieval
        - Memory editing and cleanup
        - Memory import/export
      </memory_management>
    </memory_system>

    <frontend_design_integration>
      - Design philosophy applied to all frontend projects
      - MVP mode (functional drafts acceptable)
      - Finished mode (frontend-design criteria required)
      - Opt-out via spec configuration
      - Design thinking framework (purpose, tone, constraints)
      - Typography, color, motion, spatial composition guidelines
      - Anti-pattern detection (generic AI slop)
    </frontend_design_integration>

    <qa_and_testing>
      - Unit test generation for each component
      - E2E test generation at phase completion
      - Test execution against specified infrastructure
      - Test reporting with pass/fail details
      - Coverage tracking
      - QA loop (review -> fix -> re-review)
      - Infrastructure-aware testing (dev servers, Docker)
    </qa_and_testing>

    <git_integration>
      - Git worktree isolation for safe development
      - Auto-commit per subtask completion
      - Auto-push on project/phase completion
      - Branch management (feature branches per spec)
      - Commit message generation
      - Git history visualization
      - Merge conflict detection
    </git_integration>

    <progress_and_visibility>
      - Real-time notifications (task complete, fail, blocked)
      - Estimated time remaining per task/phase
      - Changelog generation from completed tasks
      - Build history and statistics
      - Agent activity timeline
      - Phase progress indicators
      - Overall project completion percentage
    </progress_and_visibility>

    <error_handling>
      - Autonomous error recovery attempts
      - Task flagging for human review
      - Non-blocking continuation (work on other tasks)
      - Error categorization (recoverable, blocking, needs review)
      - Error history and patterns
      - Re-Spec suggestion for persistent issues
    </error_handling>

    <deployment>
      - Docker containerization
      - Docker Compose configuration
      - Multi-machine access support
      - Infrastructure memory integration
      - Deployment pipeline generation
      - Environment configuration management
    </deployment>

    <ui_ux>
      - Polished, distinctive interface (non-generic)
      - Dark/light theme support
      - Responsive layout (desktop-first, but usable on tablet)
      - Keyboard shortcuts for power users
      - Settings/preferences panel
      - Onboarding wizard for first-time setup
    </ui_ux>
  </core_features>

  <database_schema>
    <tables>
      <projects>
        - id, name, description, path, status, created_at, updated_at
        - complexity (simple, medium, complex)
        - current_phase, total_phases
        - spec_version, last_respec_at
      </projects>
      <specs>
        - id, project_id, version, content, created_at
        - is_active, parent_spec_id (for Re-Spec tracking)
      </specs>
      <tasks>
        - id, project_id, spec_id, phase_id, name, description
        - status (backlog, in_progress, qa, done, blocked)
        - priority, estimated_time, actual_time
        - agent_type, iteration_count, flagged_for_review
        - depends_on (JSON array of task IDs)
      </tasks>
      <phases>
        - id, project_id, name, order, status
        - depends_on (JSON array of phase IDs)
        - milestone_type (none, mvp, release)
      </phases>
      <agent_sessions>
        - id, project_id, task_id, agent_type
        - started_at, ended_at, status, output_log
        - iterations, completion_promise
      </agent_sessions>
      <memory_project>
        - id, project_id, type (insight, pattern, gotcha, codebase_map)
        - content, metadata, created_at
      </memory_project>
      <memory_global>
        - id, type (preference, pattern, solution)
        - content, metadata, created_at, usage_count
      </memory_global>
      <memory_infrastructure>
        - id, name, type (server, docker, database, deployment)
        - config (JSON), projects (JSON array of project IDs or null for all)
        - created_at, updated_at
      </memory_infrastructure>
      <notifications>
        - id, project_id, type, message, read, created_at
      </notifications>
      <settings>
        - id, key, value, updated_at
      </settings>
    </tables>
  </database_schema>

  <api_endpoints_summary>
    <projects>
      - GET /api/projects - List all projects
      - POST /api/projects - Create new project
      - GET /api/projects/:id - Get project details
      - PUT /api/projects/:id - Update project
      - DELETE /api/projects/:id - Delete project
      - POST /api/projects/:id/adopt - Adopt existing codebase
    </projects>
    <specs>
      - GET /api/projects/:id/spec - Get current spec
      - POST /api/projects/:id/spec - Create/update spec
      - POST /api/projects/:id/respec - Trigger Re-Spec
      - GET /api/projects/:id/spec/history - Get spec versions
    </specs>
    <tasks>
      - GET /api/projects/:id/tasks - List tasks (with filters)
      - POST /api/projects/:id/tasks - Create task
      - PUT /api/tasks/:id - Update task
      - PUT /api/tasks/:id/status - Update task status
      - POST /api/tasks/:id/retry - Retry task
      - POST /api/tasks/:id/flag - Flag for review
    </tasks>
    <agents>
      - POST /api/agents/start - Start agent session
      - POST /api/agents/:id/stop - Stop agent session
      - GET /api/agents/active - List active agents
      - WS /api/agents/:id/stream - Stream agent output
    </agents>
    <memory>
      - GET /api/memory/project/:id - Get project memory
      - POST /api/memory/project/:id - Add project memory
      - GET /api/memory/global - Get global memory
      - POST /api/memory/global - Add global memory
      - GET /api/memory/infrastructure - Get infrastructure memory
      - POST /api/memory/infrastructure - Add infrastructure config
      - PUT /api/memory/infrastructure/:id - Update infrastructure config
    </memory>
    <notifications>
      - GET /api/notifications - Get notifications
      - PUT /api/notifications/:id/read - Mark as read
      - DELETE /api/notifications/:id - Delete notification
    </notifications>
    <settings>
      - GET /api/settings - Get all settings
      - PUT /api/settings - Update settings
    </settings>
  </api_endpoints_summary>

  <ui_layout>
    <main_structure>
      - Left sidebar: Project list, navigation, quick actions
      - Main content area: Context-dependent (kanban, terminals, settings, etc.)
      - Right panel (collapsible): Task details, agent output, memory viewer
      - Top bar: Project name, phase indicator, notifications, settings
      - Bottom bar: Agent status summary, progress indicator
    </main_structure>
    <key_screens>
      - Dashboard: Project overview, recent activity, quick stats
      - Kanban Board: Visual task management
      - Agent Terminals: Live agent output with multiple terminals
      - Spec Editor: View/edit current spec, trigger Re-Spec
      - Memory Manager: Browse/edit all memory types
      - Infrastructure Config: Manage servers, Docker, deployment targets
      - Settings: App preferences, theme, shortcuts
      - Project Creation Wizard: New project setup flow
      - Re-Spec Interview: Guided re-interview with context
    </key_screens>
  </ui_layout>

  <design_system>
    <philosophy>
      - Distinctive, professional interface (not generic AI slop)
      - Clean but not sterile - subtle personality
      - Information-dense but not overwhelming
      - Emphasize clarity and readability for long coding sessions
    </philosophy>
    <color_palette>
      - Primary: Deep blue (#1a365d) - trust, focus
      - Accent: Vibrant teal (#0d9488) - action, success
      - Warning: Amber (#f59e0b) - attention
      - Error: Rose (#e11d48) - problems
      - Background: Slate gray tones (dark mode default)
      - Text: High contrast for readability
    </color_palette>
    <typography>
      - Headings: Inter or similar geometric sans-serif
      - Body: System font stack for performance
      - Code: JetBrains Mono or Fira Code (monospace with ligatures)
    </typography>
    <motion>
      - Subtle transitions (150-300ms)
      - Meaningful animations (task completion, agent status changes)
      - No gratuitous motion - respect user focus
    </motion>
  </design_system>

  <implementation_steps>
    <step number="1">
      <title>Foundation & Infrastructure</title>
      <tasks>
        - Set up Electron + React + TypeScript project structure
        - Configure Vite bundler and Tailwind CSS
        - Set up Python backend with FastAPI
        - Configure SQLite database with SQLAlchemy
        - Implement IPC bridge between Electron and Python
        - Create Docker configuration
      </tasks>
    </step>
    <step number="2">
      <title>Core Data Layer</title>
      <tasks>
        - Implement database schema and migrations
        - Create Python models for all entities
        - Build CRUD API endpoints for projects, specs, tasks
        - Implement basic memory storage (all three types)
        - Set up WebSocket for real-time updates
      </tasks>
    </step>
    <step number="3">
      <title>Spec System</title>
      <tasks>
        - Build spec interview wizard UI
        - Implement spec creation flow
        - Build Re-Spec interview with existing context
        - Implement spec versioning and history
        - Add milestone detection logic
        - Build spec validation
      </tasks>
    </step>
    <step number="4">
      <title>Agent System</title>
      <tasks>
        - Integrate Claude Agent SDK
        - Implement Planner Agent
        - Implement Coder Agent
        - Implement QA Reviewer Agent
        - Implement QA Fixer Agent
        - Build agent session management
        - Implement parallel agent execution
      </tasks>
    </step>
    <step number="5">
      <title>Iterative Loop Integration</title>
      <tasks>
        - Implement single-pass validation
        - Build auto-escalation detection
        - Implement Ralph Wiggum mode
        - Add completion promise detection
        - Build task flagging system
        - Implement retry logic
      </tasks>
    </step>
    <step number="6">
      <title>Kanban Board & Task Management</title>
      <tasks>
        - Build kanban board UI with drag-and-drop
        - Implement task cards with status
        - Add filtering and sorting
        - Build task details panel
        - Implement phase grouping
        - Add dependency visualization
      </tasks>
    </step>
    <step number="7">
      <title>Agent Terminals UI</title>
      <tasks>
        - Build terminal component with live streaming
        - Implement multi-terminal layout
        - Add agent status indicators
        - Build terminal history/scrollback
        - Implement terminal controls (pause, clear, copy)
      </tasks>
    </step>
    <step number="8">
      <title>Memory System</title>
      <tasks>
        - Build memory manager UI
        - Implement project memory CRUD
        - Implement global memory with cross-project access
        - Build infrastructure memory management
        - Add memory search and tagging
        - Implement memory learning/inference
      </tasks>
    </step>
    <step number="9">
      <title>Git Integration</title>
      <tasks>
        - Implement git worktree management
        - Build auto-commit logic
        - Implement auto-push on completion
        - Add branch management UI
        - Build commit history visualization
      </tasks>
    </step>
    <step number="10">
      <title>QA & Testing System</title>
      <tasks>
        - Implement unit test generation
        - Build E2E test generation
        - Integrate with infrastructure memory for test targets
        - Build test execution and reporting
        - Implement QA loop (review -> fix -> re-review)
      </tasks>
    </step>
    <step number="11">
      <title>Frontend Design Integration</title>
      <tasks>
        - Integrate design philosophy guidelines
        - Build MVP vs Finished mode detection
        - Implement design validation checks
        - Add anti-pattern detection
      </tasks>
    </step>
    <step number="12">
      <title>Progress & Notifications</title>
      <tasks>
        - Build notification system
        - Implement time estimation
        - Build changelog generation
        - Add progress indicators throughout UI
        - Build activity timeline
      </tasks>
    </step>
    <step number="13">
      <title>Error Handling & Recovery</title>
      <tasks>
        - Implement autonomous recovery logic
        - Build task flagging for review
        - Implement non-blocking continuation
        - Add error categorization
        - Build Re-Spec suggestion for persistent issues
      </tasks>
    </step>
    <step number="14">
      <title>Polish & Design System</title>
      <tasks>
        - Apply design system throughout
        - Implement dark/light themes
        - Add keyboard shortcuts
        - Build onboarding wizard
        - Refine animations and transitions
        - Ensure responsive layout
      </tasks>
    </step>
    <step number="15">
      <title>Deployment & Documentation</title>
      <tasks>
        - Finalize Docker configuration
        - Build deployment pipeline support
        - Create user documentation
        - Add in-app help system
        - Final testing and bug fixes
      </tasks>
    </step>
  </implementation_steps>

  <success_criteria>
    <functionality>
      - Can create a new project through spec interview
      - Can adopt existing codebase and run through spec
      - Re-Spec works with full context awareness
      - Agents execute tasks autonomously
      - Iterative loop handles difficult tasks
      - Memory persists and informs across sessions
      - Git operations work correctly (worktree, commit, push)
      - QA loop validates and fixes issues
    </functionality>
    <user_experience>
      - Kanban board is intuitive and responsive
      - Agent terminals provide clear visibility
      - Notifications keep user informed
      - Progress is always visible
      - Error states are clear and actionable
    </user_experience>
    <technical_quality>
      - No mock data - all real persistence
      - Unit tests for core functionality
      - E2E tests for critical workflows
      - Clean error handling throughout
      - Performance acceptable with many tasks
    </technical_quality>
    <design_polish>
      - UI follows design system consistently
      - Dark mode is fully implemented
      - No generic "AI slop" aesthetics
      - Animations are subtle and meaningful
      - Typography is readable for long sessions
    </design_polish>
  </success_criteria>
</project_specification>


Now let me update the initializer_prompt.md with the feature count:


Edit

**CRITICAL:** You must create exactly **[FEATURE_COUNT]** features using the `feature_create_bulk` tool.

**CRITICAL:** You must create exactly **165** features using the `feature_create_bulk` tool.


Error: File has been unexpectedly modified. Read it again before attempting to write it.


**CRITICAL:** You must create exactly **[FEATURE_COUNT]** features using the `feature_create_bulk` tool.

**CRITICAL:** You must create exactly **165** features using the `feature_create_bulk` tool.


     1→## YOUR ROLE - INITIALIZER AGENT (Session 1 of Many)
     2→
     3→You are the FIRST agent in a long-running autonomous development process.
     4→Your job is to set up the foundation for all future coding agents.
     5→
     6→### FIRST: Read the Project Specification
     7→
     8→Start by reading `app_spec.txt` in your working directory. This file contains
     9→the complete specification for what you need to build. Read it carefully
    10→before proceeding.
    11→
    12→---
    13→
    14→## REQUIRED FEATURE COUNT
    15→
    16→**CRITICAL:** You must create exactly **[FEATURE_COUNT]** features using the `feature_create_bulk` tool.
    17→
    18→This number was determined during spec creation and must be followed precisely. Do not create more or fewer features than specified.
    19→
    20→---
    21→
    22→### CRITICAL FIRST TASK: Create Features
    23→
    24→Based on `app_spec.txt`, create features using the feature_create_bulk tool. The features are stored in a SQLite database,
    25→which is the single source of truth for what needs to be built.
    26→
    27→**Creating Features:**
    28→
    29→Use the feature_create_bulk tool to add all features at once:
    30→

<system-reminder>
Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior.
</system-reminder>

## YOUR ROLE - INITIALIZER AGENT (Session 1 of Many)

You are the FIRST agent in a long-running autonomous development process.
Your job is to set up the foundation for all future coding agents.

### FIRST: Read the Project Specification

Start by reading `app_spec.txt` in your working directory. This file contains
the complete specification for what you need to build. Read it carefully
before proceeding.

---

## REQUIRED FEATURE COUNT

**CRITICAL:** You must create exactly **[FEATURE_COUNT]** features using the `feature_create_bulk` tool.

This number was determined during spec creation and must be followed precisely. Do not create more or fewer features than specified.

---

### CRITICAL FIRST TASK: Create Features

Based on `app_spec.txt`, create features using the feature_create_bulk tool. The features are stored in a SQLite database,
which is the single source of truth for what needs to be built.

**Creating Features:**

Use the feature_create_bulk tool to add all features at once:


## REQUIRED FEATURE COUNT

**CRITICAL:** You must create exactly **[FEATURE_COUNT]** features using the `feature_create_bulk` tool.

## REQUIRED FEATURE COUNT

**CRITICAL:** You must create exactly **165** features using the `feature_create_bulk` tool.


Let me try a different approach:


Bash

cat "C:/Users/MikeSwanson/AutoBuilder/My-Auto-Builder/prompts/initializer_prompt.md" | head -20

Read first 20 lines of initializer_prompt.md


## YOUR ROLE - INITIALIZER AGENT (Session 1 of Many)

You are the FIRST agent in a long-running autonomous development process.
Your job is to set up the foundation for all future coding agents.

### FIRST: Read the Project Specification

Start by reading `app_spec.txt` in your working directory. This file contains
the complete specification for what you need to build. Read it carefully
before proceeding.

---

## REQUIRED FEATURE COUNT

**CRITICAL:** You must create exactly **[FEATURE_COUNT]** features using the `feature_create_bulk` tool.

This number was determined during spec creation and must be followed precisely. Do not create more or fewer features than specified.

---


sed -i 's/\[FEATURE_COUNT\]/165/g' "C:/Users/MikeSwanson/AutoBuilder/My-Auto-Builder/prompts/initializer_prompt.md"

Replace [FEATURE_COUNT] with 165 in initializer_prompt.md


grep -n "165" "C:/Users/MikeSwanson/AutoBuilder/My-Auto-Builder/prompts/initializer_prompt.md"

Verify the feature count was updated


16:**CRITICAL:** You must create exactly **165** features using the `feature_create_bulk` tool.


Now let me write the status file to signal completion:


Write

{
  "status": "complete",
  "version": 1,
  "timestamp": "2026-01-11T20:45:00.000Z",
  "files_written": [
    "prompts/app_spec.txt",
    "prompts/initializer_prompt.md"
  ],
  "feature_count": 165
}


File created successfully at: C:/Users/MikeSwanson/AutoBuilder/My-Auto-Builder/prompts/.spec_status.json


---

## Your specification files have been created!

**Files created:**
- `C:\Users\MikeSwanson\AutoBuilder\My-Auto-Builder\prompts\app_spec.txt` - Complete project specification
- `C:\Users\MikeSwanson\AutoBuilder\My-Auto-Builder\prompts\initializer_prompt.md` - Updated with **165 features**

---

### What's in your spec:

**Auto-Claude-Plus** - An autonomous multi-agent coding framework combining:

| Component | What It Does |
|-----------|--------------|
| **Spec System** | Interview wizard, Re-Spec with context, milestone detection |
| **Agent System** | Planner → Coder → QA Reviewer → QA Fixer, parallel execution |
| **Iterative Loop** | Single-pass default, auto-escalation, Ralph Wiggum mode for tough tasks |
| **Memory System** | 3-tier: Project, Global (cross-project), Infrastructure (servers, Docker) |
| **Kanban Board** | Visual task management with drag-drop, filtering, dependencies |
| **Agent Terminals** | Live streaming output, multi-terminal view |
| **Git Integration** | Worktrees, auto-commit, auto-push on completion |
| **Frontend Design** | Polished UI philosophy, MVP vs Finished modes |
| **Error Recovery** | Autonomous recovery, task flagging, non-blocking continuation |

---

### Next Steps

The **Continue to Project** button should now appear. Click it to start the autonomous coding agent!

**If you don't see the button:** Type `/exit` or click **Exit to Project** in the header.

**Important timing expectations:**
- **First session:** The agent generates 165 features in the database. This takes several minutes.
- **Subsequent sessions:** Each coding iteration takes 5-15 minutes depending on complexity.
- **Full app:** Building all 165 features will take many hours across multiple sessions.

**Controls:**
- Press `Ctrl+C` to pause the agent at any time
- Run `start.bat` (Windows) or `./start.sh` (Mac/Linux) to resume where you left off