work-file-template.yaml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. # ============================================================================
  2. # PROTOTYPE WORK FILE: [Page Number] [Page Name]
  3. # ============================================================================
  4. # Purpose: Complete planning document for section-by-section implementation
  5. # Created: [Date]
  6. # Page Spec: ../[Scenario]/[Page-Number]-[Page-Name]/[Page-Number]-[Page-Name].md
  7. # ============================================================================
  8. metadata:
  9. page_number: "[Page-Number]"
  10. page_name: "[Page Name]"
  11. scenario: "[Scenario-Number]-[Scenario-Name]"
  12. complexity: "simple | medium | complex"
  13. estimated_sections: [Number]
  14. estimated_time: "[X] minutes"
  15. # Device Compatibility
  16. device_compatibility:
  17. type: "mobile-only | mobile-tablet | responsive | desktop-only"
  18. primary_viewport: "[Width]px"
  19. test_viewports:
  20. - width: 375
  21. height: 667
  22. device: "iPhone SE"
  23. - width: 393
  24. height: 852
  25. device: "iPhone 14 Pro"
  26. - width: 428
  27. height: 926
  28. device: "iPhone 14 Pro Max"
  29. breakpoints: [] # For mobile-only, leave empty
  30. touch_optimized: true
  31. hover_interactions: false
  32. dependencies:
  33. - "shared/prototype-api.js"
  34. - "shared/init.js"
  35. # Add component dependencies as needed
  36. # ============================================================================
  37. # DESIGN TOKENS (Tailwind Config)
  38. # ============================================================================
  39. design_tokens:
  40. colors:
  41. primary: "#2563eb"
  42. primary_hover: "#1d4ed8"
  43. success: "#10b981"
  44. error: "#ef4444"
  45. tailwind_config:
  46. theme_extend:
  47. colors:
  48. "[project-name]":
  49. 50: "#eff6ff"
  50. 500: "#2563eb"
  51. 600: "#1d4ed8"
  52. 700: "#1e40af"
  53. fontFamily:
  54. sans: "['Inter', 'system-ui', 'sans-serif']"
  55. components_available:
  56. - "image-crop (components/image-crop.js)"
  57. - "toast (components/toast.js)"
  58. - "modal (components/modal.js)"
  59. - "form-validation (components/form-validation.js)"
  60. # ============================================================================
  61. # PAGE REQUIREMENTS (from specification)
  62. # ============================================================================
  63. page_purpose: |
  64. [Brief description of what this page does and why user is here]
  65. user_context:
  66. - [Context point 1: What user has done before arriving]
  67. - [Context point 2: What data is available]
  68. - [Context point 3: User's current state]
  69. success_criteria:
  70. - [Criterion 1: What must be accomplished]
  71. - [Criterion 2: Required validations]
  72. - [Criterion 3: Data that must be saved]
  73. - [Criterion 4: Where user navigates on success]
  74. # ============================================================================
  75. # DEMO DATA REQUIREMENTS
  76. # ============================================================================
  77. demo_data_needed:
  78. current_user:
  79. firstName: "[Example]"
  80. lastName: "[Example]"
  81. email: "[example@email.com]"
  82. # Add other demo data needs (family, dogs, etc.)
  83. example_submission:
  84. # Example of completed form data
  85. field1: "[value]"
  86. field2: "[value]"
  87. # ============================================================================
  88. # OBJECT ID MAP (all interactive elements)
  89. # ============================================================================
  90. object_ids:
  91. header:
  92. - "[page]-header-back"
  93. - "[page]-header-title"
  94. form_inputs:
  95. - "[page]-input-[field1]"
  96. - "[page]-input-[field2]"
  97. # Add all form fields
  98. actions:
  99. - "[page]-button-submit"
  100. # Add all action buttons
  101. # ============================================================================
  102. # SECTION BREAKDOWN (implementation order)
  103. # ============================================================================
  104. sections:
  105. - id: "section-1"
  106. name: "Page Structure & Header"
  107. scope: "HTML skeleton, header with back button, title, main container"
  108. files_affected: ["[Page-Number]-[Page-Name].html"]
  109. dependencies: []
  110. object_ids:
  111. - "[page]-header-back"
  112. - "[page]-header-title"
  113. tailwind_classes:
  114. - "Layout: min-h-screen, bg-gray-50"
  115. - "Header: bg-white, border-b, px-4, py-3"
  116. - "Button: text-gray-600, hover:text-gray-900"
  117. acceptance_criteria:
  118. - "Header displays with back button and title"
  119. - "Back button navigates to previous page"
  120. - "Mobile viewport (375px) looks correct"
  121. - "Tailwind styles applied correctly"
  122. placeholder_message: "🚧 Building the form... Check back in a few minutes!"
  123. - id: "section-2"
  124. name: "[Section Name]"
  125. scope: "[What this section adds]"
  126. files_affected: ["[Page-Number]-[Page-Name].html"]
  127. dependencies: ["[component files if needed]"]
  128. object_ids:
  129. - "[object-id-1]"
  130. - "[object-id-2]"
  131. tailwind_classes:
  132. - "[List key Tailwind classes to use]"
  133. acceptance_criteria:
  134. - "[Test 1]"
  135. - "[Test 2]"
  136. placeholder_message: "[What's coming next]"
  137. # Add sections 3-6+ as needed
  138. # ============================================================================
  139. # JAVASCRIPT REQUIREMENTS
  140. # ============================================================================
  141. javascript_functions:
  142. initialization:
  143. - "initPage() - Page-specific initialization"
  144. - "[Other init functions]"
  145. form_handling:
  146. - "handleSubmit(event) - Form submission"
  147. - "validateForm() - Validate all fields"
  148. - "[Other form functions]"
  149. ui_interactions:
  150. - "[Interaction function 1]"
  151. - "[Interaction function 2]"
  152. api_calls:
  153. - "DogWeekAPI.[method]([params])"
  154. feedback:
  155. - "showToast(message, type)"
  156. - "setLoadingState(isLoading)"
  157. - "[Other feedback functions]"
  158. # ============================================================================
  159. # NAVIGATION
  160. # ============================================================================
  161. navigation:
  162. previous_page: "[Previous-Page].html"
  163. next_page_success: "[Next-Page].html"
  164. next_page_cancel: "[Cancel-Page].html"
  165. # ============================================================================
  166. # TESTING CHECKLIST (after all sections complete)
  167. # ============================================================================
  168. testing_checklist:
  169. functionality:
  170. - "[ ] All form fields work"
  171. - "[ ] Validation shows errors correctly"
  172. - "[ ] Submit button works"
  173. - "[ ] Loading states display"
  174. - "[ ] Success feedback shows"
  175. - "[ ] Error handling works"
  176. - "[ ] Navigation works (back, next)"
  177. - "[ ] Data persists (reload page test)"
  178. mobile_testing:
  179. - "[ ] Viewport is correct width"
  180. - "[ ] All tap targets min 44x44px"
  181. - "[ ] Text is readable (min 16px)"
  182. - "[ ] No horizontal scroll"
  183. - "[ ] Touch gestures work (if applicable)"
  184. code_quality:
  185. - "[ ] All Object IDs present"
  186. - "[ ] Console logs helpful"
  187. - "[ ] No console errors"
  188. - "[ ] Tailwind classes properly used"
  189. - "[ ] Functions documented"
  190. accessibility:
  191. - "[ ] Keyboard navigation works"
  192. - "[ ] Form labels present"
  193. - "[ ] Error messages clear"
  194. - "[ ] Focus states visible"
  195. # ============================================================================
  196. # MIGRATION NOTES (for production)
  197. # ============================================================================
  198. migration_todos:
  199. - "Replace DogWeekAPI.[method]() with Supabase calls"
  200. - "[Other production migration tasks]"
  201. # ============================================================================
  202. # KNOWN ISSUES / EDGE CASES
  203. # ============================================================================
  204. edge_cases:
  205. - "[Edge case 1 to handle]"
  206. - "[Edge case 2 to handle]"
  207. # ============================================================================
  208. # COMPLETION CRITERIA
  209. # ============================================================================
  210. definition_of_done:
  211. - "All sections implemented and tested"
  212. - "All object IDs present and correct"
  213. - "All acceptance criteria met"
  214. - "Console logs helpful and clear"
  215. - "Mobile viewport works perfectly"
  216. - "Demo data loads automatically"
  217. - "Form validation complete"
  218. - "Success/error feedback working"
  219. - "Navigation works"
  220. - "No console errors"
  221. - "Code is clean"
  222. - "Story files document all sections"