@istmx/skills 1.2.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/README.md +134 -40
  2. package/RELEASE_v2.1.0.md +69 -0
  3. package/bin/cli.js +95 -91
  4. package/context/conversation_transcript.md +768 -0
  5. package/context/progress.md +121 -0
  6. package/istm/SKILL.md +20 -11
  7. package/istm-animate/SKILL.md +46 -33
  8. package/istm-animate/core/motion-principles/SKILL.md +284 -0
  9. package/istm-animate/core/motion-principles/references/designers.md +127 -0
  10. package/istm-animate/core/motion-principles/references/easing-guide.md +231 -0
  11. package/istm-animate/core/motion-principles/references/enter-exit-recipes.md +466 -0
  12. package/istm-animate/frameworks/canvas-generative/SKILL.md +325 -0
  13. package/istm-animate/frameworks/canvas-generative/references/algorithms.md +925 -0
  14. package/istm-animate/frameworks/css-native/SKILL.md +319 -0
  15. package/istm-animate/frameworks/css-native/references/modern-css.md +465 -0
  16. package/istm-animate/frameworks/framer-motion/SKILL.md +187 -0
  17. package/istm-animate/frameworks/framer-motion/references/api.md +312 -0
  18. package/istm-animate/frameworks/gsap/SKILL.md +188 -0
  19. package/istm-animate/frameworks/gsap/references/core.md +218 -0
  20. package/istm-animate/frameworks/gsap/references/plugins.md +371 -0
  21. package/istm-animate/frameworks/gsap/references/scrolltrigger.md +325 -0
  22. package/istm-animate/frameworks/gsap/references/timeline.md +218 -0
  23. package/istm-animate/frameworks/threejs-r3f/SKILL.md +243 -0
  24. package/istm-animate/frameworks/threejs-r3f/references/scene-setup.md +392 -0
  25. package/istm-animate/frameworks/threejs-r3f/references/shaders.md +446 -0
  26. package/istm-animate/mobile/android/compose-graphics/SKILL.md +503 -0
  27. package/istm-animate/mobile/android/compose-graphics/references/agsl-recipes.md +356 -0
  28. package/istm-animate/mobile/android/compose-graphics/references/canvas-generative.md +282 -0
  29. package/istm-animate/mobile/android/compose-graphics/references/m3-expressive-deep.md +303 -0
  30. package/istm-animate/mobile/android/compose-motion/SKILL.md +359 -0
  31. package/istm-animate/mobile/android/compose-motion/references/gestures-compose.md +273 -0
  32. package/istm-animate/mobile/android/compose-motion/references/recomposition-and-anim.md +196 -0
  33. package/istm-animate/mobile/android/compose-motion/references/shared-transitions.md +281 -0
  34. package/istm-animate/mobile/android/compose-multiplatform/SKILL.md +311 -0
  35. package/istm-animate/mobile/android/compose-multiplatform/references/cmp-interop.md +288 -0
  36. package/istm-animate/mobile/android/compose-multiplatform/references/cmp-platform-quirks.md +156 -0
  37. package/istm-animate/mobile/apple/swiftui-graphics/SKILL.md +408 -0
  38. package/istm-animate/mobile/apple/swiftui-graphics/references/canvas-swiftui.md +239 -0
  39. package/istm-animate/mobile/apple/swiftui-graphics/references/liquid-glass-deep.md +252 -0
  40. package/istm-animate/mobile/apple/swiftui-graphics/references/metal-recipes.md +382 -0
  41. package/istm-animate/mobile/apple/swiftui-motion/SKILL.md +379 -0
  42. package/istm-animate/mobile/apple/swiftui-motion/references/gestures-swiftui.md +336 -0
  43. package/istm-animate/mobile/apple/swiftui-motion/references/phase-keyframe-deep.md +231 -0
  44. package/istm-animate/mobile/apple/swiftui-motion/references/springs-cheatsheet.md +129 -0
  45. package/istm-animate/references/animate.md +199 -0
  46. package/istm-animate/references/audit.md +115 -0
  47. package/istm-animate/references/design-engineering.md +674 -0
  48. package/istm-animate/references/improve.md +101 -0
  49. package/istm-animate/references/opportunities.md +132 -0
  50. package/istm-animate/references/plan-template.md +73 -0
  51. package/istm-animate/references/recipes.md +324 -0
  52. package/istm-animate/references/review.md +112 -0
  53. package/istm-animate/references/standards.md +187 -0
  54. package/istm-animate/references/vocabulary.md +173 -0
  55. package/istm-architecture/SKILL.md +70 -14
  56. package/istm-architecture/templates/agents.md +21 -2
  57. package/istm-awwward-designer/SKILL.md +53 -17
  58. package/istm-design/SKILL.md +49 -63
  59. package/istm-design/anti-laziness/architectural-patterns.md +55 -0
  60. package/istm-design/anti-laziness/parameter-tuning.md +44 -0
  61. package/istm-design/anti-laziness/prompt-engineering.md +52 -0
  62. package/istm-design/anti-laziness/reference-prompts.md +79 -0
  63. package/istm-design/archetypes/brandkit/SKILL.md +798 -0
  64. package/istm-design/archetypes/brutalist/SKILL.md +92 -0
  65. package/istm-design/archetypes/minimalist/SKILL.md +85 -0
  66. package/istm-design/archetypes/soft/SKILL.md +98 -0
  67. package/istm-design/core/design-audit/SKILL.md +248 -0
  68. package/istm-design/core/desktop-principles/SKILL.md +363 -0
  69. package/istm-design/core/desktop-principles/references/keyboard-patterns.md +137 -0
  70. package/istm-design/core/desktop-principles/references/multi-window.md +105 -0
  71. package/istm-design/core/mobile-principles/SKILL.md +289 -0
  72. package/istm-design/core/mobile-principles/references/accessibility-mobile.md +175 -0
  73. package/istm-design/core/mobile-principles/references/gestures-deep.md +220 -0
  74. package/istm-design/core/ui-ux-pro-max/SKILL.md +392 -0
  75. package/istm-design/core/ui-ux-pro-max/UPSTREAM.md +23 -0
  76. package/istm-design/core/ui-ux-pro-max/data/app-interface.csv +31 -0
  77. package/istm-design/core/ui-ux-pro-max/data/charts.csv +26 -0
  78. package/istm-design/core/ui-ux-pro-max/data/colors.csv +193 -0
  79. package/istm-design/core/ui-ux-pro-max/data/google-fonts.csv +1924 -0
  80. package/istm-design/core/ui-ux-pro-max/data/icons.csv +106 -0
  81. package/istm-design/core/ui-ux-pro-max/data/landing.csv +35 -0
  82. package/istm-design/core/ui-ux-pro-max/data/motion.csv +17 -0
  83. package/istm-design/core/ui-ux-pro-max/data/products.csv +193 -0
  84. package/istm-design/core/ui-ux-pro-max/data/react-performance.csv +45 -0
  85. package/istm-design/core/ui-ux-pro-max/data/stacks/angular.csv +51 -0
  86. package/istm-design/core/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  87. package/istm-design/core/ui-ux-pro-max/data/stacks/avalonia.csv +57 -0
  88. package/istm-design/core/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  89. package/istm-design/core/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  90. package/istm-design/core/ui-ux-pro-max/data/stacks/javafx.csv +76 -0
  91. package/istm-design/core/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  92. package/istm-design/core/ui-ux-pro-max/data/stacks/laravel.csv +51 -0
  93. package/istm-design/core/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  94. package/istm-design/core/ui-ux-pro-max/data/stacks/nuxt-ui.csv +71 -0
  95. package/istm-design/core/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  96. package/istm-design/core/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  97. package/istm-design/core/ui-ux-pro-max/data/stacks/react.csv +54 -0
  98. package/istm-design/core/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  99. package/istm-design/core/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  100. package/istm-design/core/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  101. package/istm-design/core/ui-ux-pro-max/data/stacks/threejs.csv +54 -0
  102. package/istm-design/core/ui-ux-pro-max/data/stacks/uno.csv +60 -0
  103. package/istm-design/core/ui-ux-pro-max/data/stacks/uwp.csv +56 -0
  104. package/istm-design/core/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  105. package/istm-design/core/ui-ux-pro-max/data/stacks/winui.csv +60 -0
  106. package/istm-design/core/ui-ux-pro-max/data/stacks/wpf.csv +57 -0
  107. package/istm-design/core/ui-ux-pro-max/data/styles.csv +85 -0
  108. package/istm-design/core/ui-ux-pro-max/data/typography.csv +75 -0
  109. package/istm-design/core/ui-ux-pro-max/data/ui-reasoning.csv +162 -0
  110. package/istm-design/core/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  111. package/istm-design/core/ui-ux-pro-max/references/pro-rules.md +109 -0
  112. package/istm-design/core/ui-ux-pro-max/references/quick-reference.md +240 -0
  113. package/istm-design/core/ui-ux-pro-max/scripts/core.py +464 -0
  114. package/istm-design/core/ui-ux-pro-max/scripts/design_system.py +1371 -0
  115. package/istm-design/core/ui-ux-pro-max/scripts/search.py +162 -0
  116. package/istm-design/core/ui-ux-pro-max/scripts/tests/test_core.py +134 -0
  117. package/istm-design/core/ui-ux-pro-max/scripts/validate_data.py +114 -0
  118. package/istm-design/image-to-code/SKILL.md +1228 -0
  119. package/istm-design/imagegen/SKILL.md +987 -0
  120. package/istm-design/presets/airbnb/DESIGN.md +545 -0
  121. package/istm-design/presets/airbnb/README.md +5 -0
  122. package/istm-design/presets/airtable/DESIGN.md +554 -0
  123. package/istm-design/presets/airtable/README.md +5 -0
  124. package/istm-design/presets/apple/DESIGN.md +562 -0
  125. package/istm-design/presets/apple/README.md +5 -0
  126. package/istm-design/presets/binance/DESIGN.md +634 -0
  127. package/istm-design/presets/binance/README.md +5 -0
  128. package/istm-design/presets/bmw/DESIGN.md +544 -0
  129. package/istm-design/presets/bmw/README.md +5 -0
  130. package/istm-design/presets/bmw-m/DESIGN.md +503 -0
  131. package/istm-design/presets/bmw-m/README.md +5 -0
  132. package/istm-design/presets/bugatti/DESIGN.md +454 -0
  133. package/istm-design/presets/bugatti/README.md +5 -0
  134. package/istm-design/presets/cal/DESIGN.md +542 -0
  135. package/istm-design/presets/cal/README.md +5 -0
  136. package/istm-design/presets/catalog.md +127 -0
  137. package/istm-design/presets/claude/DESIGN.md +589 -0
  138. package/istm-design/presets/claude/README.md +5 -0
  139. package/istm-design/presets/clay/DESIGN.md +541 -0
  140. package/istm-design/presets/clay/README.md +5 -0
  141. package/istm-design/presets/clickhouse/DESIGN.md +544 -0
  142. package/istm-design/presets/clickhouse/README.md +5 -0
  143. package/istm-design/presets/cohere/DESIGN.md +451 -0
  144. package/istm-design/presets/cohere/README.md +5 -0
  145. package/istm-design/presets/coinbase/DESIGN.md +570 -0
  146. package/istm-design/presets/coinbase/README.md +5 -0
  147. package/istm-design/presets/composio/DESIGN.md +506 -0
  148. package/istm-design/presets/composio/README.md +5 -0
  149. package/istm-design/presets/cursor/DESIGN.md +537 -0
  150. package/istm-design/presets/cursor/README.md +5 -0
  151. package/istm-design/presets/dell-1996/DESIGN.md +632 -0
  152. package/istm-design/presets/dell-1996/README.md +5 -0
  153. package/istm-design/presets/elevenlabs/DESIGN.md +504 -0
  154. package/istm-design/presets/elevenlabs/README.md +5 -0
  155. package/istm-design/presets/expo/DESIGN.md +526 -0
  156. package/istm-design/presets/expo/README.md +5 -0
  157. package/istm-design/presets/ferrari/DESIGN.md +531 -0
  158. package/istm-design/presets/ferrari/README.md +5 -0
  159. package/istm-design/presets/figma/DESIGN.md +578 -0
  160. package/istm-design/presets/figma/README.md +5 -0
  161. package/istm-design/presets/framer/DESIGN.md +544 -0
  162. package/istm-design/presets/framer/README.md +5 -0
  163. package/istm-design/presets/hashicorp/DESIGN.md +575 -0
  164. package/istm-design/presets/hashicorp/README.md +5 -0
  165. package/istm-design/presets/hp/DESIGN.md +670 -0
  166. package/istm-design/presets/hp/README.md +5 -0
  167. package/istm-design/presets/ibm/DESIGN.md +550 -0
  168. package/istm-design/presets/ibm/README.md +5 -0
  169. package/istm-design/presets/intercom/DESIGN.md +546 -0
  170. package/istm-design/presets/intercom/README.md +5 -0
  171. package/istm-design/presets/kraken/DESIGN.md +125 -0
  172. package/istm-design/presets/kraken/README.md +5 -0
  173. package/istm-design/presets/lamborghini/DESIGN.md +288 -0
  174. package/istm-design/presets/lamborghini/README.md +5 -0
  175. package/istm-design/presets/linear/DESIGN.md +548 -0
  176. package/istm-design/presets/linear/README.md +5 -0
  177. package/istm-design/presets/lovable/DESIGN.md +298 -0
  178. package/istm-design/presets/lovable/README.md +5 -0
  179. package/istm-design/presets/mastercard/DESIGN.md +365 -0
  180. package/istm-design/presets/mastercard/README.md +5 -0
  181. package/istm-design/presets/meta/DESIGN.md +683 -0
  182. package/istm-design/presets/meta/README.md +5 -0
  183. package/istm-design/presets/minimax/DESIGN.md +746 -0
  184. package/istm-design/presets/minimax/README.md +5 -0
  185. package/istm-design/presets/mintlify/DESIGN.md +852 -0
  186. package/istm-design/presets/mintlify/README.md +5 -0
  187. package/istm-design/presets/miro/DESIGN.md +825 -0
  188. package/istm-design/presets/miro/README.md +5 -0
  189. package/istm-design/presets/mistral/DESIGN.md +773 -0
  190. package/istm-design/presets/mistral/README.md +5 -0
  191. package/istm-design/presets/mongodb/DESIGN.md +767 -0
  192. package/istm-design/presets/mongodb/README.md +5 -0
  193. package/istm-design/presets/nike/DESIGN.md +575 -0
  194. package/istm-design/presets/nike/README.md +5 -0
  195. package/istm-design/presets/nintendo-2001/DESIGN.md +649 -0
  196. package/istm-design/presets/nintendo-2001/README.md +5 -0
  197. package/istm-design/presets/notion/DESIGN.md +821 -0
  198. package/istm-design/presets/notion/README.md +5 -0
  199. package/istm-design/presets/nvidia/DESIGN.md +640 -0
  200. package/istm-design/presets/nvidia/README.md +5 -0
  201. package/istm-design/presets/ollama/DESIGN.md +539 -0
  202. package/istm-design/presets/ollama/README.md +5 -0
  203. package/istm-design/presets/opencode/DESIGN.md +521 -0
  204. package/istm-design/presets/opencode/README.md +5 -0
  205. package/istm-design/presets/pinterest/DESIGN.md +597 -0
  206. package/istm-design/presets/pinterest/README.md +5 -0
  207. package/istm-design/presets/playstation/DESIGN.md +661 -0
  208. package/istm-design/presets/playstation/README.md +5 -0
  209. package/istm-design/presets/posthog/DESIGN.md +690 -0
  210. package/istm-design/presets/posthog/README.md +5 -0
  211. package/istm-design/presets/raycast/DESIGN.md +669 -0
  212. package/istm-design/presets/raycast/README.md +5 -0
  213. package/istm-design/presets/renault/DESIGN.md +589 -0
  214. package/istm-design/presets/renault/README.md +5 -0
  215. package/istm-design/presets/replicate/DESIGN.md +616 -0
  216. package/istm-design/presets/replicate/README.md +5 -0
  217. package/istm-design/presets/resend/DESIGN.md +585 -0
  218. package/istm-design/presets/resend/README.md +5 -0
  219. package/istm-design/presets/revolut/DESIGN.md +636 -0
  220. package/istm-design/presets/revolut/README.md +5 -0
  221. package/istm-design/presets/runwayml/DESIGN.md +244 -0
  222. package/istm-design/presets/runwayml/README.md +5 -0
  223. package/istm-design/presets/sanity/DESIGN.md +357 -0
  224. package/istm-design/presets/sanity/README.md +5 -0
  225. package/istm-design/presets/sentry/DESIGN.md +551 -0
  226. package/istm-design/presets/sentry/README.md +5 -0
  227. package/istm-design/presets/shopify/DESIGN.md +516 -0
  228. package/istm-design/presets/shopify/README.md +5 -0
  229. package/istm-design/presets/slack/DESIGN.md +482 -0
  230. package/istm-design/presets/spacex/DESIGN.md +363 -0
  231. package/istm-design/presets/spacex/README.md +5 -0
  232. package/istm-design/presets/spotify/DESIGN.md +246 -0
  233. package/istm-design/presets/spotify/README.md +5 -0
  234. package/istm-design/presets/starbucks/DESIGN.md +580 -0
  235. package/istm-design/presets/starbucks/README.md +5 -0
  236. package/istm-design/presets/stripe/DESIGN.md +487 -0
  237. package/istm-design/presets/stripe/README.md +5 -0
  238. package/istm-design/presets/supabase/DESIGN.md +462 -0
  239. package/istm-design/presets/supabase/README.md +5 -0
  240. package/istm-design/presets/superhuman/DESIGN.md +448 -0
  241. package/istm-design/presets/superhuman/README.md +5 -0
  242. package/istm-design/presets/tesla/DESIGN.md +286 -0
  243. package/istm-design/presets/tesla/README.md +5 -0
  244. package/istm-design/presets/theverge/DESIGN.md +339 -0
  245. package/istm-design/presets/theverge/README.md +5 -0
  246. package/istm-design/presets/together/DESIGN.md +633 -0
  247. package/istm-design/presets/together/README.md +5 -0
  248. package/istm-design/presets/uber/DESIGN.md +636 -0
  249. package/istm-design/presets/uber/README.md +5 -0
  250. package/istm-design/presets/vercel/DESIGN.md +736 -0
  251. package/istm-design/presets/vercel/README.md +5 -0
  252. package/istm-design/presets/vodafone/DESIGN.md +538 -0
  253. package/istm-design/presets/vodafone/README.md +5 -0
  254. package/istm-design/presets/voltagent/DESIGN.md +521 -0
  255. package/istm-design/presets/voltagent/README.md +5 -0
  256. package/istm-design/presets/warp/DESIGN.md +526 -0
  257. package/istm-design/presets/warp/README.md +5 -0
  258. package/istm-design/presets/webflow/DESIGN.md +588 -0
  259. package/istm-design/presets/webflow/README.md +5 -0
  260. package/istm-design/presets/wired/DESIGN.md +497 -0
  261. package/istm-design/presets/wired/README.md +5 -0
  262. package/istm-design/presets/wise/DESIGN.md +544 -0
  263. package/istm-design/presets/wise/README.md +5 -0
  264. package/istm-design/presets/xai/DESIGN.md +465 -0
  265. package/istm-design/presets/xai/README.md +5 -0
  266. package/istm-design/presets/zapier/DESIGN.md +537 -0
  267. package/istm-design/presets/zapier/README.md +5 -0
  268. package/istm-design/references/apple-design.md +282 -0
  269. package/istm-design/references/generation-guide.md +209 -0
  270. package/istm-design/references/pick-ui-library.md +77 -0
  271. package/istm-design/references/picker.md +197 -0
  272. package/istm-design/references/prototype.md +90 -0
  273. package/istm-design/references/schema.md +366 -0
  274. package/istm-design/semantic-design/DESIGN.md +121 -0
  275. package/istm-design/semantic-design/SKILL.md +184 -0
  276. package/istm-system-design/SKILL.md +12 -5
  277. package/istm-workflow/istm-autoplan/SKILL.md +1905 -0
  278. package/istm-workflow/istm-autoplan/SKILL.md.tmpl +923 -0
  279. package/istm-workflow/istm-craft/SKILL.md +12 -6
  280. package/istm-workflow/istm-cso/ACKNOWLEDGEMENTS.md +14 -0
  281. package/istm-workflow/istm-cso/SKILL.md +1313 -0
  282. package/istm-workflow/istm-cso/SKILL.md.tmpl +407 -0
  283. package/istm-workflow/istm-cso/sections/audit-phases.md +253 -0
  284. package/istm-workflow/istm-cso/sections/audit-phases.md.tmpl +251 -0
  285. package/istm-workflow/istm-cso/sections/manifest.json +14 -0
  286. package/istm-workflow/istm-debt/SKILL.md +44 -0
  287. package/istm-workflow/istm-debug/SKILL.md +12 -3
  288. package/istm-workflow/istm-design-review/SKILL.md +2053 -0
  289. package/istm-workflow/istm-design-review/SKILL.md.tmpl +312 -0
  290. package/istm-workflow/istm-develop/SKILL.md +10 -4
  291. package/istm-workflow/istm-eng-review/SKILL.md +1112 -0
  292. package/istm-workflow/istm-eng-review/SKILL.md.tmpl +163 -0
  293. package/istm-workflow/istm-eng-review/sections/manifest.json +14 -0
  294. package/istm-workflow/istm-eng-review/sections/review-sections.md +942 -0
  295. package/istm-workflow/istm-eng-review/sections/review-sections.md.tmpl +225 -0
  296. package/istm-workflow/istm-gain/SKILL.md +50 -0
  297. package/istm-workflow/istm-health/SKILL.md +1104 -0
  298. package/istm-workflow/istm-health/SKILL.md.tmpl +320 -0
  299. package/istm-workflow/istm-qa/BROWSER.md +1468 -0
  300. package/istm-workflow/istm-qa/SKILL.md +1743 -0
  301. package/istm-workflow/istm-qa/SKILL.md.tmpl +354 -0
  302. package/istm-workflow/istm-qa/references/issue-taxonomy.md +85 -0
  303. package/istm-workflow/istm-qa/templates/qa-report-template.md +126 -0
  304. package/istm-workflow/istm-release/SKILL.md +989 -0
  305. package/istm-workflow/istm-release/SKILL.md.tmpl +160 -0
  306. package/istm-workflow/istm-release/sections/manifest.json +14 -0
  307. package/istm-workflow/istm-release/sections/release-body.md +547 -0
  308. package/istm-workflow/istm-release/sections/release-body.md.tmpl +420 -0
  309. package/istm-workflow/istm-review/SKILL.md +57 -0
  310. package/istm-workflow/istm-ship/SKILL.md +1504 -0
  311. package/istm-workflow/istm-ship/SKILL.md.tmpl +582 -0
  312. package/istm-workflow/istm-ship/sections/adversarial.md +218 -0
  313. package/istm-workflow/istm-ship/sections/adversarial.md.tmpl +19 -0
  314. package/istm-workflow/istm-ship/sections/apple-release.md +58 -0
  315. package/istm-workflow/istm-ship/sections/apple-release.md.tmpl +56 -0
  316. package/istm-workflow/istm-ship/sections/changelog.md +45 -0
  317. package/istm-workflow/istm-ship/sections/changelog.md.tmpl +3 -0
  318. package/istm-workflow/istm-ship/sections/greptile.md +51 -0
  319. package/istm-workflow/istm-ship/sections/greptile.md.tmpl +49 -0
  320. package/istm-workflow/istm-ship/sections/manifest.json +62 -0
  321. package/istm-workflow/istm-ship/sections/plan-completion.md +329 -0
  322. package/istm-workflow/istm-ship/sections/plan-completion.md.tmpl +31 -0
  323. package/istm-workflow/istm-ship/sections/pr-body.md +209 -0
  324. package/istm-workflow/istm-ship/sections/pr-body.md.tmpl +207 -0
  325. package/istm-workflow/istm-ship/sections/review-army.md +406 -0
  326. package/istm-workflow/istm-ship/sections/review-army.md.tmpl +56 -0
  327. package/istm-workflow/istm-ship/sections/test-coverage.md +264 -0
  328. package/istm-workflow/istm-ship/sections/test-coverage.md.tmpl +23 -0
  329. package/istm-workflow/istm-ship/sections/tests.md +403 -0
  330. package/istm-workflow/istm-ship/sections/tests.md.tmpl +116 -0
  331. package/package.json +6 -3
  332. package/RELEASE_v1.2.0.md +0 -40
@@ -0,0 +1,582 @@
1
+ ---
2
+ name: ship
3
+ preamble-tier: 4
4
+ version: 1.0.0
5
+ description: |
6
+ Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION,
7
+ update CHANGELOG, commit, push, create PR. Use when asked to "ship", "deploy",
8
+ "push to main", "create a PR", "merge and push", or "get it deployed".
9
+ Proactively invoke this skill (do NOT push/PR directly) when the user says code
10
+ is ready, asks about deploying, wants to push code up, or asks to create a PR. (istm-workflow)
11
+ allowed-tools:
12
+ - Bash
13
+ - Read
14
+ - Write
15
+ - Edit
16
+ - Grep
17
+ - Glob
18
+ - Agent
19
+ - AskUserQuestion
20
+ - WebSearch
21
+ sensitive: true
22
+ triggers:
23
+ - ship it
24
+ - create a pr
25
+ - push to main
26
+ - deploy this
27
+ ---
28
+
29
+ {{PREAMBLE}}
30
+
31
+ {{THIRD_PARTY_ACTIONS}}
32
+
33
+ {{BASE_BRANCH_DETECT}}
34
+
35
+ {{GBRAIN_CONTEXT_LOAD}}
36
+
37
+ # Ship: Fully Automated Ship Workflow
38
+
39
+ You are running the `/ship` workflow. This is a **non-interactive, fully automated** workflow. Do NOT ask for confirmation at any step. The user said `/ship` which means DO IT. Run straight through and output the PR URL at the end.
40
+
41
+ **Only stop for:**
42
+ - On the base branch (abort)
43
+ - Merge conflicts that can't be auto-resolved (stop, show conflicts)
44
+ - In-branch test failures (pre-existing failures are triaged, not auto-blocking)
45
+ - Pre-landing review finds ASK items that need user judgment
46
+ - MINOR or MAJOR version bump needed (ask — see Step 12)
47
+ - Greptile review comments that need user decision (complex fixes, false positives)
48
+ - AI-assessed coverage below minimum threshold (hard gate with user override — see Step 7)
49
+ - Plan items NOT DONE with no user override (see Step 8)
50
+ - Plan verification failures (see Step 8.1)
51
+ - TODOS.md missing and user wants to create one (ask — see Step 14)
52
+ - TODOS.md disorganized and user wants to reorganize (ask — see Step 14)
53
+
54
+ **Never stop for:**
55
+ - Uncommitted changes (always include them)
56
+ - Version bump choice (auto-pick MICRO or PATCH — see Step 12)
57
+ - CHANGELOG content (auto-generate from diff)
58
+ - Commit message approval (auto-commit)
59
+ - Multi-file changesets (auto-split into bisectable commits)
60
+ - TODOS.md completed-item detection (auto-mark)
61
+ - Auto-fixable review findings (dead code, N+1, stale comments — fixed automatically)
62
+ - Test coverage gaps within target threshold (auto-generate and commit, or flag in PR body)
63
+
64
+ **Re-run behavior (idempotency):**
65
+ Re-running `/ship` means "run the whole checklist again." Every verification step
66
+ (tests, coverage audit, plan completion, pre-landing review, adversarial review,
67
+ VERSION/CHANGELOG check, TODOS, document-release) runs on every invocation.
68
+ Only *actions* are idempotent:
69
+ - Step 12: If VERSION already bumped, skip the bump but still read the version
70
+ - Step 17: If already pushed, skip the push command
71
+ - Step 19: If PR exists, update the body instead of creating a new PR
72
+ Never skip a verification step because a prior `/ship` run already performed it.
73
+
74
+ ---
75
+
76
+ {{SECTION_INDEX:ship}}
77
+
78
+ ---
79
+
80
+ ## Step 0.9: Apple target detection
81
+
82
+ Shipping to the App Store is not landing a PR. If the repository contains an
83
+ `.xcodeproj`, `.xcworkspace`, or a Swift package with an app product AND the
84
+ user's ask is store distribution (App Store, TestFlight, "release my app"),
85
+ **STOP and Read `~/.claude/skills/istm-workflow/ship/sections/apple-release.md` FIRST**
86
+ — before the branch gate and any preflight below. Store distribution proceeds
87
+ from whatever branch the user is on (a clean tree on the base branch is the
88
+ solo developer's normal case, not an error) and follows the adapter end to
89
+ end. The branch gate and repository-landing pipeline below apply ONLY to
90
+ repository-landing asks, including on Apple repos.
91
+
92
+ ## Step 1: Pre-flight
93
+
94
+ 1. Check the current branch. If on the base branch or the repo's default branch, **abort**: "You're on the base branch. Ship from a feature branch."
95
+
96
+ 2. Run `git status` (never use `-uall`). Uncommitted changes are always included — no need to ask.
97
+
98
+ 3. Run `git diff <base>...HEAD --stat` and `git log <base>..HEAD --oneline` to understand what's being shipped.
99
+
100
+ 4. Check review readiness:
101
+
102
+ {{REVIEW_DASHBOARD}}
103
+
104
+ If the Eng Review is NOT "CLEAR":
105
+
106
+ Print: "No prior eng review found — ship will run its own pre-landing review in Step 9."
107
+
108
+ Check diff size: `git diff <base>...HEAD --stat | tail -1`. If the diff is >200 lines, add: "Note: This is a large diff. Consider running `/plan-eng-review` or `/autoplan` for architecture-level review before shipping."
109
+
110
+ If CEO Review is missing, mention as informational ("CEO Review not run — recommended for product changes") but do NOT block.
111
+
112
+ For Design Review: run `source <(~/.claude/skills/istm-workflow/bin/istm-workflow-diff-scope <base> 2>/dev/null)`. If `SCOPE_FRONTEND=true` and no design review (plan-design-review or design-review-lite) exists in the dashboard, mention: "Design Review not run — this PR changes frontend code. The lite design check will run automatically in Step 9, but consider running /design-review for a full visual audit post-implementation." Still never block.
113
+
114
+ Continue to Step 2 — do NOT block or ask. Ship runs its own review in Step 9.
115
+
116
+ ---
117
+
118
+ ## Step 2: Distribution Pipeline Check
119
+
120
+ If the diff introduces a new standalone artifact (CLI binary, library package, tool) — not a web
121
+ service with existing deployment — verify that a distribution pipeline exists.
122
+
123
+ 1. Check if the diff adds a new `cmd/` directory, `main.go`, or `bin/` entry point:
124
+ ```bash
125
+ git diff origin/<base> --name-only | grep -E '(cmd/.*/main\.go|bin/|Cargo\.toml|setup\.py|package\.json)' | head -5
126
+ ```
127
+
128
+ 2. If new artifact detected, check for a release workflow:
129
+ ```bash
130
+ ls .github/workflows/ 2>/dev/null | grep -iE 'release|publish|dist'
131
+ grep -qE 'release|publish|deploy' .gitlab-ci.yml 2>/dev/null && echo "GITLAB_CI_RELEASE"
132
+ ```
133
+
134
+ 3. **If no release pipeline exists and a new artifact was added:** Use AskUserQuestion:
135
+ - "This PR adds a new binary/tool but there's no CI/CD pipeline to build and publish it.
136
+ Users won't be able to download the artifact after merge."
137
+ - A) Add a release workflow now (CI/CD release pipeline — GitHub Actions or GitLab CI depending on platform)
138
+ - B) Defer — add to TODOS.md
139
+ - C) Not needed — this is internal/web-only, existing deployment covers it
140
+
141
+ 4. **If release pipeline exists:** Continue silently.
142
+ 5. **If no new artifact detected:** Skip silently.
143
+
144
+ ---
145
+
146
+ ## Step 3: Merge the base branch (BEFORE tests)
147
+
148
+ Fetch and merge the base branch into the feature branch so tests run against the merged state:
149
+
150
+ ```bash
151
+ git fetch origin <base> && git merge origin/<base> --no-edit
152
+ ```
153
+
154
+ **If there are merge conflicts:** Try to auto-resolve if they are simple (VERSION, schema.rb, CHANGELOG ordering). If conflicts are complex or ambiguous, **STOP** and show them.
155
+
156
+ **If already up to date:** Continue silently.
157
+
158
+ ---
159
+
160
+ {{SECTION:tests}}
161
+
162
+ {{SECTION:test-coverage}}
163
+
164
+ {{SECTION:plan-completion}}
165
+
166
+ {{SECTION:review-army}}
167
+
168
+ {{SECTION:greptile}}
169
+
170
+ {{SECTION:adversarial}}
171
+
172
+ ## Step 12: Version bump (auto-decide)
173
+
174
+ The deterministic version-state logic is the tested **`istm-workflow-version-bump`** CLI
175
+ (classify / write / repair). The bump-LEVEL decision and queue-collision handling
176
+ stay agent judgment; the slot pick stays `istm-workflow-next-version`.
177
+
178
+ 1. **Classify state** — pure reader, never writes:
179
+ ```bash
180
+ bun run ~/.claude/skills/istm-workflow/bin/istm-workflow-version-bump classify --base <base>
181
+ ```
182
+ Read the JSON `state` and dispatch:
183
+ - **FRESH** → do the bump (steps 2-4).
184
+ - **ALREADY_BUMPED** → skip the bump, but run the queue-drift check (step 3) with the reported `currentVersion`. If the queue moved (next free version differs), **AskUserQuestion**: rebump to the new version (rewrites CHANGELOG header + PR title) or keep current (CI version-gate will reject until resolved).
185
+ - **DRIFT_STALE_PKG** → run `istm-workflow-version-bump repair` (syncs package.json to VERSION). No re-bump; reuse `currentVersion` for CHANGELOG + PR.
186
+ - **DRIFT_UNEXPECTED** → **STOP**. package.json disagrees with VERSION while VERSION matches base — a manual edit bypassed /ship. Reconcile manually, then re-run.
187
+
188
+ 2. **Decide the bump level** from the diff (agent judgment):
189
+ - **MICRO**: <50 lines, trivial tweaks/config. **PATCH**: 50+ lines, no feature signals.
190
+ - **MINOR**: **ASK** if any feature signal (new route/page, migration, new module), OR 500+ lines. **MAJOR**: **ASK** — milestones or breaking changes only.
191
+ Save as `BUMP_LEVEL`. The level is the user-intended bump; queue-aware placement may advance the slot without changing the level.
192
+
193
+ 3. **Queue-aware pick** (workspace-aware ship):
194
+ ```bash
195
+ QUEUE_JSON=$(bun run ~/.claude/skills/istm-workflow/bin/istm-workflow-next-version --base <base> --bump "$BUMP_LEVEL" --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}')
196
+ NEW_VERSION=$(echo "$QUEUE_JSON" | jq -r '.version // empty')
197
+ ```
198
+ If `offline`/util fails: fall back to local `BUMP_LEVEL` arithmetic and print `⚠ workspace-aware ship offline — using local bump only`. If `claimed` is non-empty, render the queue table so the user sees landing order. If an active sibling workspace holds a version `>= NEW_VERSION`, **AskUserQuestion**: advance past (unrelated work) or abort and sync with the sibling.
199
+
200
+ 4. **Write the bump** (FRESH, or an approved rebump):
201
+ ```bash
202
+ bun run ~/.claude/skills/istm-workflow/bin/istm-workflow-version-bump write --version "$NEW_VERSION"
203
+ ```
204
+ The CLI validates the version pattern (4-digit `MAJOR.MINOR.PATCH.MICRO`; 3-digit for repos whose pinned version source uses plain semver) and writes VERSION, the manifest, and the manifest's npm lockfiles (`package-lock.json` / `npm-shrinkwrap.json`) when they already exist — never created. The manifest is resolved as `--package-json-path` → `.istm-workflow/package-json-path` → `./package.json`, so a repo whose only Node package lives in a subdirectory (`web/`, `app/`) is covered by a one-line pin instead of silently getting a VERSION-only bump. npm rejects 4-component versions, so the manifest and lockfiles carry the npm-valid 3-digit translation (`1.67.0.0` → `1.67.0`); VERSION stays the 4-digit source of truth and classify judges drift against the translated form. On a half-write it exits 3 — re-run, and classify will report DRIFT_STALE_PKG for `repair` to fix.
205
+
206
+ 5. **Record the release decision** (durable cross-session memory). The bump level is a real decision the next session should not re-derive blind:
207
+ ```bash
208
+ ~/.claude/skills/istm-workflow/bin/istm-workflow-decision-log '{"decision":"Ship NEW_VERSION (BUMP_LEVEL)","rationale":"WHY","scope":"repo","source":"skill","confidence":9}' 2>/dev/null || true
209
+ ```
210
+ Substitute `NEW_VERSION`, `BUMP_LEVEL`, and a one-line `WHY` (the signal that set the level: diff scale, a new feature, a breaking change). Best-effort and non-interactive; never blocks the ship. Skip on the ALREADY_BUMPED path (the decision was logged on the run that did the bump).
211
+
212
+ {{SECTION:changelog}}
213
+
214
+ ## Step 14: TODOS.md (auto-update)
215
+
216
+ Cross-reference the project's TODOS.md against the changes being shipped. Mark completed items automatically; prompt only if the file is missing or disorganized.
217
+
218
+ Read `.claude/skills/review/TODOS-format.md` for the canonical format reference.
219
+
220
+ **1. Check if TODOS.md exists** in the repository root.
221
+
222
+ **If TODOS.md does not exist:** Use AskUserQuestion:
223
+ - Message: "istm recommends maintaining a TODOS.md organized by skill/component, then priority (P0 at top through P4, then Completed at bottom). See TODOS-format.md for the full format. Would you like to create one?"
224
+ - Options: A) Create it now, B) Skip for now
225
+ - If A: Create `TODOS.md` with a skeleton (# TODOS heading + ## Completed section). Continue to step 3.
226
+ - If B: Skip the rest of Step 14. Continue to Step 15.
227
+
228
+ **2. Check structure and organization:**
229
+
230
+ Read TODOS.md and verify it follows the recommended structure:
231
+ - Items grouped under `## <Skill/Component>` headings
232
+ - Each item has `**Priority:**` field with P0-P4 value
233
+ - A `## Completed` section at the bottom
234
+
235
+ **If disorganized** (missing priority fields, no component groupings, no Completed section): Use AskUserQuestion:
236
+ - Message: "TODOS.md doesn't follow the recommended structure (skill/component groupings, P0-P4 priority, Completed section). Would you like to reorganize it?"
237
+ - Options: A) Reorganize now (recommended), B) Leave as-is
238
+ - If A: Reorganize in-place following TODOS-format.md. Preserve all content — only restructure, never delete items.
239
+ - If B: Continue to step 3 without restructuring.
240
+
241
+ **3. Detect completed TODOs:**
242
+
243
+ This step is fully automatic — no user interaction.
244
+
245
+ Use the diff and commit history already gathered in earlier steps:
246
+ - `git diff <base>...HEAD` (full diff against the base branch)
247
+ - `git log <base>..HEAD --oneline` (all commits being shipped)
248
+
249
+ For each TODO item, check if the changes in this PR complete it by:
250
+ - Matching commit messages against the TODO title and description
251
+ - Checking if files referenced in the TODO appear in the diff
252
+ - Checking if the TODO's described work matches the functional changes
253
+
254
+ **Be conservative:** Only mark a TODO as completed if there is clear evidence in the diff. If uncertain, leave it alone.
255
+
256
+ **4. Move completed items** to the `## Completed` section at the bottom. Append: `**Completed:** vX.Y.Z (YYYY-MM-DD)`
257
+
258
+ **5. Output summary:**
259
+ - `TODOS.md: N items marked complete (item1, item2, ...). M items remaining.`
260
+ - Or: `TODOS.md: No completed items detected. M items remaining.`
261
+ - Or: `TODOS.md: Created.` / `TODOS.md: Reorganized.`
262
+
263
+ **6. Defensive:** If TODOS.md cannot be written (permission error, disk full), warn the user and continue. Never stop the ship workflow for a TODOS failure.
264
+
265
+ Save this summary — it goes into the PR body in Step 19.
266
+
267
+ ---
268
+
269
+ ## Step 15: Commit (bisectable chunks)
270
+
271
+ ### Step 15.0: WIP Commit Squash (continuous checkpoint mode only)
272
+
273
+ If `CHECKPOINT_MODE` is `"continuous"`, the branch likely contains `WIP:` commits
274
+ from auto-checkpointing. These must be squashed INTO the corresponding logical
275
+ commits before the bisectable-grouping logic in Step 15.1 runs. Non-WIP commits
276
+ on the branch (earlier landed work) must be preserved.
277
+
278
+ **Detection:**
279
+ ```bash
280
+ WIP_COUNT=$(git log <base>..HEAD --oneline --grep="^WIP:" 2>/dev/null | wc -l | tr -d ' ')
281
+ echo "WIP_COMMITS: $WIP_COUNT"
282
+ ```
283
+
284
+ If `WIP_COUNT` is 0: skip this sub-step entirely.
285
+
286
+ If `WIP_COUNT` > 0, collect the WIP context first so it survives the squash:
287
+
288
+ ```bash
289
+ # Export [istm-workflow-context] blocks from all WIP commits on this branch.
290
+ # This file becomes input to the CHANGELOG entry and may inform PR body context.
291
+ mkdir -p "$(git rev-parse --show-toplevel)/.istm-workflow"
292
+ git log <base>..HEAD --grep="^WIP:" --format="%H%n%B%n---END---" > \
293
+ "$(git rev-parse --show-toplevel)/.istm-workflow/wip-context-before-squash.md" 2>/dev/null || true
294
+ ```
295
+
296
+ **Non-destructive squash strategy:**
297
+
298
+ `git reset --soft <merge-base>` WOULD uncommit everything including non-WIP commits.
299
+ DO NOT DO THAT. Instead, use `git rebase` scoped to filter WIP commits only.
300
+
301
+ Option 1 (preferred, if there are non-WIP commits mixed in):
302
+ ```bash
303
+ # Interactive rebase with automated WIP squashing.
304
+ # Mark every WIP commit as 'fixup' (drop its message, fold changes into prior commit).
305
+ git rebase -i $(git merge-base HEAD origin/<base>) \
306
+ --exec 'true' \
307
+ -X ours 2>/dev/null || {
308
+ echo "Rebase conflict. Aborting: git rebase --abort"
309
+ git rebase --abort
310
+ echo "STATUS: BLOCKED — manual WIP squash required"
311
+ exit 1
312
+ }
313
+ ```
314
+
315
+ Option 2 (simpler, if the branch is ALL WIP commits so far — no landed work):
316
+ ```bash
317
+ # Branch contains only WIP commits. Reset-soft is safe here because there's
318
+ # nothing non-WIP to preserve. Verify first.
319
+ NON_WIP=$(git log <base>..HEAD --oneline --invert-grep --grep="^WIP:" 2>/dev/null | wc -l | tr -d ' ')
320
+ if [ "$NON_WIP" -eq 0 ]; then
321
+ git reset --soft $(git merge-base HEAD origin/<base>)
322
+ echo "WIP-only branch, reset-soft to merge base. Step 15.1 will create clean commits."
323
+ fi
324
+ ```
325
+
326
+ Decide at runtime which option applies. If unsure, prefer stopping and asking the
327
+ user via AskUserQuestion rather than destroying non-WIP commits.
328
+
329
+ **Anti-footgun rules:**
330
+ - NEVER blind `git reset --soft` if there are non-WIP commits. Codex flagged this
331
+ as destructive — it would uncommit real landed work and turn the push step into
332
+ a non-fast-forward push for anyone who already pushed.
333
+ - Only proceed to Step 15.1 after WIP commits are successfully squashed/absorbed
334
+ or the branch has been verified to contain only WIP work.
335
+
336
+ ### Step 15.1: Bisectable Commits
337
+
338
+ **Goal:** Create small, logical commits that work well with `git bisect` and help LLMs understand what changed.
339
+
340
+ 1. Analyze the diff and group changes into logical commits. Each commit should represent **one coherent change** — not one file, but one logical unit.
341
+
342
+ 2. **Commit ordering** (earlier commits first):
343
+ - **Infrastructure:** migrations, config changes, route additions
344
+ - **Models & services:** new models, services, concerns (with their tests)
345
+ - **Controllers & views:** controllers, views, JS/React components (with their tests)
346
+ - **VERSION + CHANGELOG + TODOS.md:** always in the final commit
347
+
348
+ 3. **Rules for splitting:**
349
+ - A model and its test file go in the same commit
350
+ - A service and its test file go in the same commit
351
+ - A controller, its views, and its test go in the same commit
352
+ - Migrations are their own commit (or grouped with the model they support)
353
+ - Config/route changes can group with the feature they enable
354
+ - If the total diff is small (< 50 lines across < 4 files), a single commit is fine
355
+
356
+ 4. **Each commit must be independently valid** — no broken imports, no references to code that doesn't exist yet. Order commits so dependencies come first.
357
+
358
+ 5. Compose each commit message:
359
+ - First line: `<type>: <summary>` (type = feat/fix/chore/refactor/docs)
360
+ - Body: brief description of what this commit contains
361
+ - Only the **final commit** (VERSION + CHANGELOG) gets the version tag and co-author trailer:
362
+
363
+ ```bash
364
+ git commit -m "$(cat <<'EOF'
365
+ chore: bump version and changelog (vX.Y.Z.W)
366
+
367
+ {{CO_AUTHOR_TRAILER}}
368
+ EOF
369
+ )"
370
+ ```
371
+
372
+ ---
373
+
374
+ ## Step 16: Verification Gate
375
+
376
+ **IRON LAW: NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.**
377
+
378
+ The evidence ledger is the mechanical arm of this law. Check it FIRST:
379
+
380
+ ```bash
381
+ ~/.claude/skills/istm-workflow/bin/istm-workflow-evidence check --label tests --expect-cmd '<exact tests-lane command from Step 5>' --label vitest --expect-cmd '<exact vitest-lane command from Step 5>' --max-age 24 --allow-paths CHANGELOG.md,VERSION,package.json
382
+ ```
383
+
384
+ Pass each `--expect-cmd` the exact command string the wrapped Step 5 lane ran —
385
+ that binds FRESH to the real suite (a green `echo ok` recorded under the label
386
+ can never satisfy the check). Residual risk, accepted: `package.json` sits on
387
+ the allow-list because Step 12's version bump writes its version field between
388
+ the test run and this gate; a behavior-changing package.json edit in that
389
+ window would not invalidate evidence. The check is advisory either way.
390
+
391
+ - **Every line FRESH (exit 0):** the recorded runs were green and the working-tree
392
+ content is identical to what was tested, modulo the allow-listed release files
393
+ (this mechanizes the "CHANGELOG edits don't count" rule — VERSION/CHANGELOG
394
+ commits between Step 5 and here don't invalidate the run). Cite the evidence
395
+ lines (label, exit, ts, log path) as the verification evidence and continue.
396
+ - **Any STALE/MISSING (exit non-zero):** run live, wrapped, so the fresh run is
397
+ recorded: `~/.claude/skills/istm-workflow/bin/istm-workflow-evidence run --label <lane> -- '<command>'`.
398
+ The check is an advisory guardrail — a failed CHECK never blocks; a failed RUN does.
399
+
400
+ Before pushing, re-verify if code changed during Steps 4-6:
401
+
402
+ 1. **Test verification:** If ANY code changed after Step 5's test run (fixes from review findings, CHANGELOG edits don't count), re-run the test suite. The evidence check above IS this rule, mechanized — trust FRESH, re-run on STALE. Paste fresh output when you re-run. Stale output from Step 5 with changed content is NOT acceptable.
403
+
404
+ 2. **Build verification:** If the project has a build step, run it. Paste output.
405
+
406
+ 3. **Rationalization prevention:**
407
+ - "Should work now" → RUN IT.
408
+ - "I'm confident" → Confidence is not evidence.
409
+ - "I already tested earlier" → Code changed since then. Test again.
410
+ - "It's a trivial change" → Trivial changes break production.
411
+
412
+ **If tests fail here:** STOP. Do not push. Fix the issue and return to Step 5.
413
+
414
+ Claiming work is complete without verification is dishonesty, not efficiency.
415
+
416
+ ---
417
+
418
+ ## Step 17: Push
419
+
420
+ **Credential pre-push guard (#1946) — run before the push:**
421
+
422
+ ```bash
423
+ _REDACT_PREPUSH=$(~/.claude/skills/istm-workflow/bin/istm-workflow-config get redact_prepush_hook 2>/dev/null || echo "false")
424
+ _HOOK_PATH=$(git rev-parse --git-path hooks/pre-push 2>/dev/null || echo "")
425
+ _HOOK_INSTALLED="no"
426
+ [ -n "$_HOOK_PATH" ] && [ -f "$_HOOK_PATH" ] && grep -q "istm-workflow-redact" "$_HOOK_PATH" 2>/dev/null && _HOOK_INSTALLED="yes"
427
+ # Custom hooks dirs (core.hooksPath — e.g. husky's COMMITTED .husky/) must
428
+ # never get a silent install: the chaining installer would rename the team's
429
+ # committed hook and write a machine-local wrapper into the working tree.
430
+ _HOOKS_DIR=$(git rev-parse --git-path hooks 2>/dev/null || echo "")
431
+ _GIT_DIR=$(git rev-parse --absolute-git-dir 2>/dev/null || echo "")
432
+ # Linked worktrees: --absolute-git-dir is .git/worktrees/<name> but hooks
433
+ # resolve to the COMMON .git/hooks, so match against the common dir too or
434
+ # every Conductor worktree false-negatives as a "custom hooks path". The
435
+ # /nonexistent fallback keeps the case pattern from collapsing to "/*"
436
+ # (match-everything) when resolution fails.
437
+ _GIT_COMMON=$(cd "$(git rev-parse --git-common-dir 2>/dev/null || echo /nonexistent)" 2>/dev/null && pwd || echo /nonexistent)
438
+ _HOOKS_IN_GIT_DIR="no"
439
+ case "$_HOOKS_DIR" in
440
+ "$_GIT_DIR"/*|"$_GIT_COMMON"/*|hooks|.git/hooks) _HOOKS_IN_GIT_DIR="yes" ;;
441
+ esac
442
+ _PREPUSH_PROMPTED=$([ -f "${istm_HOME:-$HOME/.istm-workflow}/.redact-prepush-prompted" ] && echo "yes" || echo "no")
443
+ echo "REDACT_PREPUSH: $_REDACT_PREPUSH"
444
+ echo "HOOK_INSTALLED: $_HOOK_INSTALLED"
445
+ echo "HOOKS_IN_GIT_DIR: $_HOOKS_IN_GIT_DIR"
446
+ echo "PREPUSH_PROMPTED: $_PREPUSH_PROMPTED"
447
+ ```
448
+
449
+ Branch on the echoed values:
450
+
451
+ 1. **`REDACT_PREPUSH: true` and `HOOK_INSTALLED: no` and `HOOKS_IN_GIT_DIR: yes`** —
452
+ consent already given; install silently (no question) and continue:
453
+ ```bash
454
+ ~/.claude/skills/istm-workflow/bin/istm-workflow-redact install-prepush-hook
455
+ ```
456
+ If `HOOKS_IN_GIT_DIR: no` (husky or another committed hooks dir), do NOT
457
+ install silently — print one line: "redact pre-push guard not installed:
458
+ this repo uses a custom core.hooksPath; run
459
+ `istm-workflow-redact install-prepush-hook` manually if you want it chained."
460
+ 2. **`REDACT_PREPUSH` not true AND `PREPUSH_PROMPTED: no`** — one-time
461
+ offer (fires once EVER, machine-wide). AskUserQuestion:
462
+
463
+ > istm-workflow can install a per-repo git pre-push hook that blocks pushes
464
+ > containing credentials (API keys, tokens, private keys). It's a
465
+ > guardrail, not enforcement — `istm_REDACT_PREPUSH=skip` bypasses it.
466
+ > Install it for repos you ship from?
467
+
468
+ Options:
469
+ - A) Yes — install the credential guard (recommended)
470
+ - B) No — never ask again
471
+
472
+ If A: run `~/.claude/skills/istm-workflow/bin/istm-workflow-config set redact_prepush_hook true`
473
+ then `~/.claude/skills/istm-workflow/bin/istm-workflow-redact install-prepush-hook`.
474
+ If B: run `~/.claude/skills/istm-workflow/bin/istm-workflow-config set redact_prepush_hook false`.
475
+ ALWAYS (after either answer, but NOT if the question itself failed to
476
+ render — a failed AskUserQuestion must re-offer next time):
477
+ ```bash
478
+ touch "${istm_HOME:-$HOME/.istm-workflow}/.redact-prepush-prompted"
479
+ ```
480
+ 3. **Anything else** (declined earlier, or already installed) — continue
481
+ without comment.
482
+
483
+ **Idempotency check:** Check if the branch is already pushed and up to date.
484
+
485
+ ```bash
486
+ git fetch origin <branch-name> 2>/dev/null
487
+ LOCAL=$(git rev-parse HEAD)
488
+ REMOTE=$(git rev-parse origin/<branch-name> 2>/dev/null || echo "none")
489
+ echo "LOCAL: $LOCAL REMOTE: $REMOTE"
490
+ [ "$LOCAL" = "$REMOTE" ] && echo "ALREADY_PUSHED" || echo "PUSH_NEEDED"
491
+ ```
492
+
493
+ If `ALREADY_PUSHED`, skip the push but continue to Step 18. Otherwise push with upstream tracking:
494
+
495
+ ```bash
496
+ git push -u origin <branch-name>
497
+ ```
498
+
499
+ **You are NOT done.** The code is pushed but documentation sync and PR creation are mandatory final steps. Continue to Step 18.
500
+
501
+ ---
502
+
503
+ **PR/MR title invariant (always applies — do not skip even if you don't open the section below):** Any PR or MR you create OR update in the next step MUST have a title that starts with `v$NEW_VERSION` (the version bumped in Step 12), in the format `v<NEW_VERSION> <type>: <summary>`. Never create or edit a PR/MR title without this prefix. Compute the correct title with the single source of truth helper: `~/.claude/skills/istm-workflow/bin/istm-workflow-pr-title-rewrite.sh "$NEW_VERSION" "<current title>"`. The full create/update procedure (idempotency, redaction scan, self-check) is in the section below.
504
+
505
+ {{SECTION:pr-body}}
506
+
507
+ ## Step 20: Persist ship metrics
508
+
509
+ Log coverage and plan completion data so `/retro` can track trends.
510
+
511
+ Route the append through `istm-workflow-review-log`. It resolves the project slug and
512
+ the canonical branch form itself, creates the directory, validates the JSON, and
513
+ enqueues the row for istm-brain sync. It takes **no path argument** — never build a
514
+ `<branch>-reviews.jsonl` path by hand. A branch with a `/` in it turns a
515
+ hand-built path into a subdirectory write, and the row goes somewhere `/retro`
516
+ will never look.
517
+
518
+ ```bash
519
+ ~/.claude/skills/istm-workflow/bin/istm-workflow-review-log '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"'"$(git rev-parse --abbrev-ref HEAD)"'"}'
520
+ ```
521
+
522
+ Substitute from earlier steps:
523
+ - **COVERAGE_PCT**: coverage percentage from Step 7 diagram (integer, or -1 if undetermined)
524
+ - **PLAN_TOTAL**: total plan items extracted in Step 8 (0 if no plan file)
525
+ - **PLAN_DONE**: count of DONE + CHANGED items from Step 8 (0 if no plan file)
526
+ - **VERIFY_RESULT**: "pass", "fail", or "skipped" from Step 8.1
527
+ - **VERSION**: from the VERSION file
528
+
529
+ The branch name is filled in by the shell — there is no `BRANCH` placeholder to
530
+ substitute.
531
+
532
+ This step is automatic — never skip it, never ask for confirmation.
533
+
534
+ ---
535
+
536
+ ## Step 21: Plan-tune discoverability nudge (first-successful-ship only)
537
+
538
+ Plan-tune cathedral T15. After a successful ship, surface /plan-tune once
539
+ per machine. Single line, non-blocking, marker-gated so it never re-fires.
540
+
541
+ ```bash
542
+ _NUDGE_MARKER="$HOME/.istm-workflow/.plan-tune-nudge-shown"
543
+ _QT=$(~/.claude/skills/istm-workflow/bin/istm-workflow-config get question_tuning 2>/dev/null || echo "false")
544
+ if [ ! -f "$_NUDGE_MARKER" ] && [ "$_QT" = "false" ]; then
545
+ echo ""
546
+ echo "istm-workflow can learn from your AskUserQuestion answers. Run /plan-tune to opt in"
547
+ echo "— it captures which prompts you find valuable vs noisy and (with hooks installed)"
548
+ echo "auto-decides your never-ask preferences."
549
+ touch "$_NUDGE_MARKER"
550
+ fi
551
+ ```
552
+
553
+ If the marker exists, OR question_tuning is already on, the nudge is a
554
+ no-op. The marker guarantees at-most-once per machine. To re-enable:
555
+ `rm ~/.istm-workflow/.plan-tune-nudge-shown` before next ship.
556
+
557
+ ---
558
+
559
+ ## Section self-check (before you finish)
560
+
561
+ You ran a carved skill. For your situation, list every section the Section index
562
+ named as applying, and confirm you issued a Read for each one. If you executed any
563
+ of those steps from memory without reading its section, you skipped the source of
564
+ truth — STOP, Read it now, and redo that step. Deterministic version work goes
565
+ through `istm-workflow-version-bump`; never hand-roll the VERSION/package.json write.
566
+
567
+ ---
568
+
569
+ ## Important Rules
570
+
571
+ - **Never skip tests.** If tests fail, stop.
572
+ - **Never skip the pre-landing review.** If checklist.md is unreadable, stop.
573
+ - **Never force push.** Use regular `git push` only.
574
+ - **Never ask for trivial confirmations** (e.g., "ready to push?", "create PR?"). DO stop for: version bumps (MINOR/MAJOR), pre-landing review findings (ASK items), and Codex structured review [P1] findings (large diffs only).
575
+ - **Always use the 4-digit version format** from the VERSION file.
576
+ - **Date format in CHANGELOG:** `YYYY-MM-DD`
577
+ - **Split commits for bisectability** — each commit = one logical change.
578
+ - **TODOS.md completion detection must be conservative.** Only mark items as completed when the diff clearly shows the work is done.
579
+ - **Use Greptile reply templates from greptile-triage.md.** Every reply includes evidence (inline diff, code references, re-rank suggestion). Never post vague replies.
580
+ - **Never push without fresh verification evidence.** If code changed after Step 5 tests, re-run before pushing.
581
+ - **Step 7 generates coverage tests.** They must pass before committing. Never commit failing tests.
582
+ - **The goal is: user says `/ship`, next thing they see is the review + PR URL + auto-synced docs.**