@istmx/skills 1.0.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 (210) hide show
  1. package/README.md +49 -0
  2. package/bin/cli.js +251 -0
  3. package/istm/SKILL.md +65 -0
  4. package/istm-animate/SKILL.md +87 -0
  5. package/istm-animate/animations/animation_utils.md +280 -0
  6. package/istm-animate/animations/animations.md +220 -0
  7. package/istm-animate/animations/core_motion.md +250 -0
  8. package/istm-animate/animations/examples/README.md +29 -0
  9. package/istm-animate/animations/examples/nuxt/app/app.vue +3 -0
  10. package/istm-animate/animations/examples/nuxt/app/composables/useGSAP.ts +91 -0
  11. package/istm-animate/animations/examples/nuxt/app/pages/index.vue +55 -0
  12. package/istm-animate/animations/examples/nuxt/nuxt.config.ts +4 -0
  13. package/istm-animate/animations/examples/nuxt/package.json +18 -0
  14. package/istm-animate/animations/examples/react/App.jsx +46 -0
  15. package/istm-animate/animations/examples/react/index.html +12 -0
  16. package/istm-animate/animations/examples/react/main.jsx +9 -0
  17. package/istm-animate/animations/examples/react/package.json +21 -0
  18. package/istm-animate/animations/examples/react/vite.config.js +7 -0
  19. package/istm-animate/animations/examples/vanilla/index.html +33 -0
  20. package/istm-animate/animations/examples/vanilla/main.js +36 -0
  21. package/istm-animate/animations/examples/vue/app.vue +47 -0
  22. package/istm-animate/animations/examples/vue/index.html +15 -0
  23. package/istm-animate/animations/examples/vue/main.js +9 -0
  24. package/istm-animate/animations/examples/vue/package.json +19 -0
  25. package/istm-animate/animations/examples/vue/vite.config.js +7 -0
  26. package/istm-animate/animations/framework_motion.md +262 -0
  27. package/istm-animate/animations/motion.csv +17 -0
  28. package/istm-animate/animations/motion.md +11 -0
  29. package/istm-animate/animations/motion_catalog.json +226 -0
  30. package/istm-animate/animations/motion_performance.md +75 -0
  31. package/istm-animate/animations/motion_plugins.md +429 -0
  32. package/istm-animate/animations/react_animations.md +132 -0
  33. package/istm-animate/animations/scroll_trigger_effects.md +291 -0
  34. package/istm-animate/animations/timeline_sequencing.md +103 -0
  35. package/istm-architecture/SKILL.md +109 -0
  36. package/istm-architecture/frameworks/angular.csv +51 -0
  37. package/istm-architecture/frameworks/astro.csv +54 -0
  38. package/istm-architecture/frameworks/avalonia.csv +57 -0
  39. package/istm-architecture/frameworks/flutter.csv +53 -0
  40. package/istm-architecture/frameworks/javafx.csv +76 -0
  41. package/istm-architecture/frameworks/jetpack-compose.csv +53 -0
  42. package/istm-architecture/frameworks/laravel.csv +51 -0
  43. package/istm-architecture/frameworks/nextjs.csv +53 -0
  44. package/istm-architecture/frameworks/nuxtjs.csv +59 -0
  45. package/istm-architecture/frameworks/react-native.csv +52 -0
  46. package/istm-architecture/frameworks/react.csv +54 -0
  47. package/istm-architecture/frameworks/svelte.csv +54 -0
  48. package/istm-architecture/frameworks/swiftui.csv +51 -0
  49. package/istm-architecture/frameworks/uwp.csv +56 -0
  50. package/istm-architecture/frameworks/vue.csv +50 -0
  51. package/istm-architecture/frameworks/winui.csv +60 -0
  52. package/istm-architecture/frameworks/wpf.csv +57 -0
  53. package/istm-architecture/templates/agents.md +229 -0
  54. package/istm-architecture/templates/architecture.md +111 -0
  55. package/istm-architecture/templates/design.md +138 -0
  56. package/istm-architecture/templates/project-overview.md +215 -0
  57. package/istm-awwward-designer/SKILL.md +43 -0
  58. package/istm-awwward-designer/libraries/threejs.csv +54 -0
  59. package/istm-awwward-designer/references/accessibility.md +774 -0
  60. package/istm-awwward-designer/references/anim-anti-patterns.md +576 -0
  61. package/istm-awwward-designer/references/animation-map.md +166 -0
  62. package/istm-awwward-designer/references/animation-standards.md +86 -0
  63. package/istm-awwward-designer/references/anti-patterns.md +191 -0
  64. package/istm-awwward-designer/references/color-systems.md +604 -0
  65. package/istm-awwward-designer/references/css-performance.md +477 -0
  66. package/istm-awwward-designer/references/descender-safety.md +490 -0
  67. package/istm-awwward-designer/references/design-audit.md +93 -0
  68. package/istm-awwward-designer/references/font-loading.md +378 -0
  69. package/istm-awwward-designer/references/image-optimization.md +440 -0
  70. package/istm-awwward-designer/references/invention-gate.md +356 -0
  71. package/istm-awwward-designer/references/micro-interactions.md +825 -0
  72. package/istm-awwward-designer/references/page-transitions.md +365 -0
  73. package/istm-awwward-designer/references/performance-standards.md +79 -0
  74. package/istm-awwward-designer/references/quality-gate.md +103 -0
  75. package/istm-awwward-designer/references/responsive-design.md +778 -0
  76. package/istm-awwward-designer/references/scoring-guide.md +201 -0
  77. package/istm-awwward-designer/references/scroll-patterns.md +668 -0
  78. package/istm-awwward-designer/references/stitch-brief.md +124 -0
  79. package/istm-awwward-designer/references/tech-stack.md +204 -0
  80. package/istm-awwward-designer/references/technical-audit.md +133 -0
  81. package/istm-awwward-designer/references/technique-families.md +293 -0
  82. package/istm-awwward-designer/references/testing.md +535 -0
  83. package/istm-awwward-designer/references/text-animation.md +585 -0
  84. package/istm-awwward-designer/references/typography.md +504 -0
  85. package/istm-awwward-designer/references/usability-audit.md +108 -0
  86. package/istm-awwward-designer/references/visual-standards.md +97 -0
  87. package/istm-design/SKILL.md +98 -0
  88. package/istm-design/colors/color_theory.md +293 -0
  89. package/istm-design/colors/colors.csv +193 -0
  90. package/istm-design/colors/colors_catalog.json +4034 -0
  91. package/istm-design/colors/palette.json +21 -0
  92. package/istm-design/styles/design_system.md +288 -0
  93. package/istm-design/styles/html-tailwind.csv +56 -0
  94. package/istm-design/styles/nuxt-ui.csv +71 -0
  95. package/istm-design/styles/product_design.md +55 -0
  96. package/istm-design/styles/shadcn.csv +61 -0
  97. package/istm-design/styles/style.md +12 -0
  98. package/istm-design/styles/styles.csv +85 -0
  99. package/istm-design/styles/styles_catalog.json +2018 -0
  100. package/istm-design/styles/ui-reasoning.csv +162 -0
  101. package/istm-design/styles/uno.csv +60 -0
  102. package/istm-design/typography/font_and_font.md +10 -0
  103. package/istm-design/typography/google-fonts.csv +1924 -0
  104. package/istm-design/typography/sans_serif_fonts.md +112 -0
  105. package/istm-design/typography/typography.csv +75 -0
  106. package/istm-design/typography/typography_catalog.json +964 -0
  107. package/istm-design/ux/app-interface.csv +31 -0
  108. package/istm-design/ux/charts.csv +26 -0
  109. package/istm-design/ux/icons.csv +106 -0
  110. package/istm-design/ux/landing.csv +35 -0
  111. package/istm-design/ux/products.csv +193 -0
  112. package/istm-design/ux/react-performance.csv +45 -0
  113. package/istm-design/ux/responsive_rules.md +62 -0
  114. package/istm-design/ux/storytelling.md +47 -0
  115. package/istm-design/ux/ux-guidelines.csv +100 -0
  116. package/istm-design/ux/ux_guidelines.json +1190 -0
  117. package/istm-system-design/SKILL.md +88 -0
  118. package/istm-system-design/principles/01-architecture-patterns.md +24 -0
  119. package/istm-system-design/principles/02-database-selection.md +32 -0
  120. package/istm-system-design/principles/03-api-design.md +25 -0
  121. package/istm-system-design/principles/04-authentication-security.md +23 -0
  122. package/istm-system-design/principles/05-caching-performance.md +21 -0
  123. package/istm-system-design/principles/06-asynchronous-processing.md +17 -0
  124. package/istm-system-design/principles/07-infrastructure-deployment.md +22 -0
  125. package/istm-system-design/principles/08-low-level-design.md +35 -0
  126. package/istm-system-design/principles/09-state-management.md +14 -0
  127. package/istm-system-design/principles/10-error-handling-and-logging.md +26 -0
  128. package/istm-system-design/principles/11-testing-strategy.md +18 -0
  129. package/istm-system-design/principles/12-seo-and-web-vitals.md +18 -0
  130. package/istm-system-design/stacks/SETUP.md +82 -0
  131. package/istm-system-design/stacks/STACK.md +67 -0
  132. package/istm-system-design/stacks/WORKFLOW.md +84 -0
  133. package/istm-system-design/templates/api-route.ts.template +32 -0
  134. package/istm-system-design/templates/migrations.md.template +30 -0
  135. package/istm-system-design/templates/schema.drizzle.ts.template +17 -0
  136. package/istm-system-design/templates/schema.prisma.template +28 -0
  137. package/istm-system-design/templates/trpc-router.ts.template +22 -0
  138. package/istm-system-design/templates/zod-validators.ts.template +14 -0
  139. package/istm-workflow/istm-audit/SKILL.md +108 -0
  140. package/istm-workflow/istm-audit/agent-prompt.md +393 -0
  141. package/istm-workflow/istm-audit/agents/openai.yaml +7 -0
  142. package/istm-workflow/istm-audit/modes/area.md +19 -0
  143. package/istm-workflow/istm-audit/modes/gapfill.md +12 -0
  144. package/istm-workflow/istm-audit/modes/greenfield.md +24 -0
  145. package/istm-workflow/istm-audit/modes/tool-skills.md +39 -0
  146. package/istm-workflow/istm-audit/modes/whole-repo.md +5 -0
  147. package/istm-workflow/istm-audit/patterns/clean-architecture.md +15 -0
  148. package/istm-workflow/istm-audit/patterns/domain-driven.md +16 -0
  149. package/istm-workflow/istm-audit/patterns/functional.md +16 -0
  150. package/istm-workflow/istm-audit/patterns/solid-oop.md +17 -0
  151. package/istm-workflow/istm-check/SKILL.md +52 -0
  152. package/istm-workflow/istm-check/agents/openai.yaml +7 -0
  153. package/istm-workflow/istm-check/modes/review.md +156 -0
  154. package/istm-workflow/istm-check/modes/verify.md +197 -0
  155. package/istm-workflow/istm-check/review-agent-prompt.md +57 -0
  156. package/istm-workflow/istm-check/review-guide.md +133 -0
  157. package/istm-workflow/istm-craft/SKILL.md +37 -0
  158. package/istm-workflow/istm-craft/agent-modes/architecture.md +73 -0
  159. package/istm-workflow/istm-craft/agent-modes/cross-cutting.md +65 -0
  160. package/istm-workflow/istm-craft/agent-modes/enhancement.md +45 -0
  161. package/istm-workflow/istm-craft/agent-modes/feature.md +85 -0
  162. package/istm-workflow/istm-craft/agent-prompt.md +249 -0
  163. package/istm-workflow/istm-craft/agents/openai.yaml +7 -0
  164. package/istm-workflow/istm-craft/internal/after-subagent.md +90 -0
  165. package/istm-workflow/istm-craft/internal/design-conversation.md +140 -0
  166. package/istm-workflow/istm-craft/internal/tool-discovery.md +58 -0
  167. package/istm-workflow/istm-craft/spec-template.md +278 -0
  168. package/istm-workflow/istm-debug/SKILL.md +102 -0
  169. package/istm-workflow/istm-debug/agents/openai.yaml +7 -0
  170. package/istm-workflow/istm-develop/SKILL.md +144 -0
  171. package/istm-workflow/istm-develop/agents/openai.yaml +7 -0
  172. package/istm-workflow/istm-develop/checklist.md +95 -0
  173. package/istm-workflow/istm-develop/flow/build.md +133 -0
  174. package/istm-workflow/istm-develop/flow/git.md +34 -0
  175. package/istm-workflow/istm-develop/logical-guide.md +99 -0
  176. package/istm-workflow/istm-develop/ui/existing.md +23 -0
  177. package/istm-workflow/istm-develop/ui/generate.md +131 -0
  178. package/istm-workflow/istm-develop/ui/image.md +41 -0
  179. package/istm-workflow/istm-develop/ui/implementation.md +281 -0
  180. package/istm-workflow/istm-develop/ui/mcp.md +11 -0
  181. package/istm-workflow/istm-develop/ui-guide.md +164 -0
  182. package/istm-workflow/istm-document/SKILL.md +123 -0
  183. package/istm-workflow/istm-document/agent-prompt.md +57 -0
  184. package/istm-workflow/istm-document/agents/openai.yaml +7 -0
  185. package/istm-workflow/istm-document/templates/changelog.md +54 -0
  186. package/istm-workflow/istm-document/templates/postmortem.md +58 -0
  187. package/istm-workflow/istm-document/templates/pr.md +43 -0
  188. package/istm-workflow/istm-document/templates/release-note.md +41 -0
  189. package/istm-workflow/istm-scope/SKILL.md +100 -0
  190. package/istm-workflow/istm-scope/agents/openai.yaml +7 -0
  191. package/istm-workflow/istm-scope/approaches/facade.md +33 -0
  192. package/istm-workflow/istm-scope/approaches/journey.md +31 -0
  193. package/istm-workflow/istm-scope/approaches/skateboard.md +33 -0
  194. package/istm-workflow/istm-scope/approaches/tracer-bullet.md +34 -0
  195. package/istm-workflow/istm-scope/modes/add.md +14 -0
  196. package/istm-workflow/istm-scope/modes/plan-brownfield.md +11 -0
  197. package/istm-workflow/istm-scope/modes/plan-greenfield.md +20 -0
  198. package/istm-workflow/istm-scope/modes/plan-monorepo.md +8 -0
  199. package/istm-workflow/istm-scope/modes/plan.md +120 -0
  200. package/istm-workflow/istm-scope/modes/replan.md +13 -0
  201. package/istm-workflow/istm-scope/scope-template.md +148 -0
  202. package/istm-workflow/istm-sync/SKILL.md +166 -0
  203. package/istm-workflow/istm-sync/agent-prompt.md +211 -0
  204. package/istm-workflow/istm-sync/agents/openai.yaml +7 -0
  205. package/istm-workflow/istm-test/SKILL.md +233 -0
  206. package/istm-workflow/istm-test/agent-prompt.md +62 -0
  207. package/istm-workflow/istm-test/agents/openai.yaml +7 -0
  208. package/istm-workflow/istm-test/modes/setup.md +97 -0
  209. package/istm-workflow/istm-test/writing-guide.md +196 -0
  210. package/package.json +35 -0
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: develop
3
+ allowed-tools: Bash, Read, Grep, Glob, Write, Edit, Agent, AskUserQuestion
4
+ description: "Run /develop to build a feature, UI or backend, from an approved design, a page, component, API, service, or data slice. If something load bearing is undecided and no spec records it, it stops and routes you to /architect; otherwise it reads the spec plus .istm-context/agents.md, builds, and advances the scope."
5
+ ---
6
+
7
+ ## Output style (plain words, no dashes, no hyphens)
8
+
9
+ <!-- OUTPUT-STYLE:START -->
10
+ Write everything this skill produces, files and messages alike, in plain simple language. Keep technical terms that carry real meaning; explain each in plain words. Never use a dash or a hyphen as punctuation: no em dash, no en dash, and no hyphenated compounds. Write `read only`, not `read-only`. Say it in simple words, or reword the sentence. Code, file paths, command flags, and values other skills match on keep their hyphens. Use short sentences, commas, or parentheses. Clear beats clever.
11
+ <!-- OUTPUT-STYLE:END -->
12
+
13
+ ## What this skill does
14
+
15
+ The builder: turns a spec plus project conventions into working code. Tracks: **UI** (components, pages, layouts; `ui-guide.md`), **Logical** (APIs, services, data layers, business logic, integrations; `logical-guide.md`), or both (e.g. "auth" = sign in pages plus session logic → run both). Step 0 gates on the spec so load bearing choices (an auth approach, a payment provider) are decided in `/architect`, not silently invented partway through the build.
16
+
17
+ ## Asks vs acts
18
+
19
+ Gates, then acts: no upfront question rounds like `/architect`. Read the decision, build, ask only what the design left open (the visual direction when no reference was given; a business rule the spec didn't settle). Infer from the spec, `.istm-context/agents.md`, and codebase; ask only what can't be inferred; recommend local implementation choices.
20
+
21
+ ## Artifact ownership
22
+
23
+ - Writes app code (plus CSS/tokens for UI).
24
+ - Scope (`.istm-context/scope/`): only the Step 4 touches (feature status → `in-progress`, milestone sub boxes, `Build it` box, code pointer). Marks a feature `done` only at the `Vibe` workflow tier (build plus its own self check; the engineer opted out of separate verification), and even then never while an `Assumed` spec is unratified; at `Lean`/`Medium`/`Full` it leaves the feature `in-progress` for `/check verify` and `/test` to close, and never ticks `Verify it` or `Test it`. Never creates files in `.istm-context/scope/` (scopes only; analysis/research is `/architect`'s, in the spec's `rationale.md`).
25
+ - Never writes spec content or deliberates a decision (flags the need, defers to `/architect`); never restructures root `.istm-context/agents.md` (that's `/audit`); new area conventions go via `/sync` afterwards. **One narrow exception:** on `Build now, record it as an assumed spec` (Step 0), `/develop` may *create* a spec, but only in `Status: Assumed`, and only the assumption record fields (owed decision, assumption built on, authorized by, code area, requirements seeds). It never writes rationale and never advances an `Assumed` spec past that state; `/architect` owns clearing it. This is the only spec `/develop` creates.
26
+ - One spec touch on an existing spec: the `**Status**:` line (umbrella decision → the `index.md`'s, never a child's), plus filling the feature's spec pointer line. Build start: `Proposed` → `In Progress`; build lands (feature → `done`): `In Progress` → `Accepted` (a spec is not `Accepted` until its feature ships). Never edit spec content, only that line, surgically: read it again right before writing; unexpected state (already `Accepted`, `Superseded`) → flag, don't clobber. **Never move a spec out of `Assumed`** (that is ratification, `/architect`'s job): an `Assumed` spec stays `Assumed` through the build even while the feature is `in-progress`, so it can never reach `Accepted` until `/architect` ratifies it. This is what blocks `done`.
27
+
28
+ - Shared scope: read it again right before ticking, edit only the specific checkbox, status, or pointer line (never rewrite the file); feature not as expected (already `done`, reworked) → flag, don't overwrite. The freshness check guards against rebuilding what a teammate shipped.
29
+
30
+ ---
31
+
32
+ ## Portability (any OS, any agent)
33
+
34
+ Any Agent Skills client, macOS/Linux/Windows. Detection snippets are POSIX reference; use your agent's own cross platform file tools. Builds inline on the main thread (Step 3); the only subagents are a read only `scout` that explores code (Step 2.5) and a read only `researcher` for a doc check (Step 2.6, degrading to building from knowledge without web capability), both on the cheapest model. Bundled guides (`ui-guide.md`, `logical-guide.md`, `checklist.md`) and the build flow after the gate (`flow/build.md`) are paths relative to this skill's folder; the main thread reads them. No interactive question picker → ask the prompts as plain text with the same options.
35
+
36
+ ## Execution
37
+
38
+ ### Before you build: the project must already exist (except the scaffold task)
39
+
40
+ Exception: if this IS the scaffold sub task of the Stack and architecture foundation feature (prompt says `scaffold`, or the step initializes the project from the stack spec), creating the project IS the job. Read the ARCHITECTURE spec's `## Proposed stack`; run the framework's own init (`create-next-app`, `cargo new`, etc. per that stack); install base dependencies (framework, core runtime, only what the first slice needs); lay out directories; confirm a dev server or build runs. Scaffold steps derive from the stack decision (a decision spec has no build plan). Install just in time: NOT every library the spec names (email, monitoring, and so on); each later feature installs its own when built; only cross cutting tooling (lint, format, type strictness) comes early, via `/audit` + the tooling task. Then proceed.
41
+
42
+ Otherwise `/develop` builds into an existing project. No skeleton (no `package.json`/`pyproject.toml`/`go.mod`/manifest, no source tree) and not the scaffold task → stop:
43
+
44
+ > No project found to build into. Run the scaffold step first (the Stack and architecture feature's scaffold sub task, per your architecture spec), then run `/develop` again.
45
+
46
+ A project exists (even a bare scaffold) → proceed.
47
+
48
+ ### Before you build: freshness & collaboration (don't build on stale state or over a teammate)
49
+
50
+ Before mutating anything (skip silently if solo, offline, or not using git): `git fetch` quietly; base = `main`, else `master`; behind count (`git rev-list --count HEAD..origin/<base>`); uncommitted work (`git status --short`).
51
+
52
+ - Behind (count > 0) → stop and warn: "You're N commits behind `origin/$BASE`. A teammate may have already changed or shipped this. Pull first, then run again."
53
+ - Uncommitted work in the area you'll touch → warn: "You have uncommitted changes here. Commit or stash first so this build doesn't tangle with them." Let them proceed if they insist.
54
+ - Feature `in-progress` in the scope AND its code area (pointer line's path) has recent commits by another author (`git log --format='%an' -- <area>`) → warn: "*<feature>* looks like it's partway through the build by someone else. Coordinate before continuing it." Confirm before proceeding.
55
+
56
+ Warnings, not hard blocks, but surface them.
57
+
58
+ **Git integration:** if the nearest `.istm-context/agents.md` `## Git` says `integration: on`, read `flow/git.md` and follow it (branch before building, commit as milestones land); absent or `off` → do no active git.
59
+
60
+ ### Step 0: The spec gate (always first)
61
+
62
+ Is a decision owed and unrecorded? Do NOT judge this by introspection ("do I feel like I'm inventing something?"), the build model rationalizes a real decision as "just wiring" and waves it through. Use a positive **input coverage** test, which is mechanical and harder to talk yourself out of:
63
+
64
+ > **Enumerate every value this build must produce, compute, or display (from the acceptance criteria and the spec's design). For each, does the spec name where it comes from (an input, a DB column, a derivation from a named value, a prior decision)? Any required value with no named source is an owed decision.**
65
+
66
+ If any source is unnamed, stop and route to the gate (`/architect`, or record an `Assumed` spec; `/develop` implements decisions, it doesn't make them). A decision is also owed when you'd have to invent:
67
+
68
+ - **A provider, library, integration, data model, or cross cutting pattern** (e.g. auth provider, DB/ORM, caching strategy).
69
+ - **A whole UI page or screen**: its design system (`.istm-context/design.md` there? if not, which direction?), sections/composition, component inventory, asset strategy (no screenshot, no repo images → e.g. an online source). Owed unless a `.istm-context/design.md` AND a page level spec pin these down.
70
+ - **A feature's behavior** (search, a wizard: "what exactly should it do?" is open; `/architect` asks those questions). Owed unless a spec defines it.
71
+
72
+ **What "local implementation detail" actually means (the narrow exception):** ONLY a choice among options the spec's named sources already permit, a loop style, a variable name, which helper to call. The moment a choice **determines a value's source, or a behavior an acceptance criterion constrains**, it is load bearing by definition, however small it looks. Deriving "the user's today from the timezone on their last read row" is not a local detail: it picks the source of a value an AC constrains, so it is owed. NOT owed for genuine pure implementation: a small bug fix, a component matching an existing `.istm-context/design.md`, wiring pieces whose sources the spec already names, a copy tweak, anything an existing spec/`.istm-context/design.md`/`.istm-context/agents.md` fully governs.
73
+
74
+ Don't hardcode to page names or to any one example (timezone is an illustration of the pattern, not a rule); apply the input coverage test to whatever was asked. False negatives are the failure mode, building a real decision without noticing: when a required value's source is unnamed, or you are unsure, treat as owed and ask (panel below).
75
+
76
+ Read only what this feature needs, never the whole `.istm-context/` tree: its one scope file and its one governing spec (single file, or umbrella `index.md` plus the one child speccing this sub task). No other features' rows, scope files, workspaces, or unrelated specs.
77
+
78
+ **Check, in order:**
79
+ 1. **Locate this feature's scope file (only that one).** Monorepo → `.istm-context/scope/<workspace>/` for the task's package. Pick the file (`scope.md`, or the matching `<epic>.md` in a split) from the At a glance table alone; read just this feature's section. `needs a decision` with no spec pointer yet → decision owed and missing. Malformed → flag and ask, don't guess.
80
+ 2. **Open the governing spec via the feature's `spec` pointer**, reading only its build spec sections as defined in the build flow (`flow/build.md`), Step 2 item 1. Found → it's the spec; proceed. No pointer and no linked spec → targeted look in `.istm-context/specs/<workspace>/` for one matching this feature's scope, never a blanket read.
81
+ 3. The **nearest** `.istm-context/agents.md` (workspace/area) may already capture the decision, synced from an earlier feature (e.g. "the auth provider is already chosen") → proceed without a new spec.
82
+
83
+ Decision owed and unrecorded → don't guess, don't silently stop. Ask (single select; `AskUserQuestion` on Claude Code):
84
+
85
+ - **question**: "This looks like it needs an architecture decision first: `<name the specific load-bearing choice, e.g. 'which auth provider + session model'>`. How do you want to handle it?"
86
+ - **header**: "spec first?"
87
+ - **options**:
88
+ 1. `Architect it first`: "Recommended. Capture the decision in a spec before building, so the build has a spec." → **end here** with the handoff below. Do not build.
89
+ 2. `No, not needed`: "I've judged there's no real decision here; build directly." → proceed to the build flow (`flow/build.md`).
90
+ 3. `Build now, record it as an assumed spec`: "Build it, but write the assumption down first so the decision lives in the repo, not just this chat. The feature can't be marked `done` until `/architect` ratifies it." → write an `Assumed` spec (below), then proceed to the build flow (`flow/build.md`), leaving the feature `in-progress` with an `assumed decision (spec NNNN)` note in the scope (`.istm-context/scope/`).
91
+
92
+ The tool appends "Other" as a free text option automatically.
93
+
94
+ On `Build now, record it as an assumed spec`, write a minimal `Assumed` spec **before** building (this is the one narrow spec write `/develop` owns; see Artifact ownership). Resolve `$SPEC_DIR` the way `/architect` does (single repo → `.istm-context/specs/`; monorepo workspace → `.istm-context/specs/<workspace>/`), take the next free `NNNN`, and write `$SPEC_DIR/NNNN-<slug>.md`:
95
+
96
+ ```markdown
97
+ # NNNN · <feature>
98
+
99
+ **Status**: Assumed
100
+ **Date**: <today>
101
+ **Authorized by**: <engineer>, during /develop
102
+
103
+ ## Owed decision
104
+ <the specific load bearing choice that was not made>
105
+
106
+ ## Assumption built on
107
+ <the concrete assumption this build will use>
108
+
109
+ ## Code area
110
+ <the paths this build will touch>
111
+
112
+ ## Requirements
113
+ <acceptance criteria seeds carried from the scope Done when, if any>
114
+
115
+ ## Ratify
116
+ This decision was recorded by /develop, not deliberated. Run `/architect <feature>`
117
+ to deliberate and ratify it. The feature cannot be marked `done` until then.
118
+ ```
119
+
120
+ Point the feature's scope `spec` line at this file. The assumption is now durable: it survives `/clear`, teammates read it, and a later `/develop` builds against it instead of guessing again. You still cannot mark the feature `done` (see the done gate in `flow/build.md`, Step 4).
121
+
122
+ On `Architect it first`, end with:
123
+
124
+ > Run this next, then come back to `/develop`:
125
+ > ```
126
+ > /architect <feature>: <the specific decision to settle>
127
+ > ```
128
+ > Once the spec exists, run `/develop <task>` again and I'll build to it.
129
+
130
+ No decision owed (pure implementation) → skip the question, proceed.
131
+
132
+ ### Build flow (Steps 1-4)
133
+
134
+ Once the gate clears (no decision owed, or the engineer chose `No, not needed` / `Build now, record it as an assumed spec`), read `flow/build.md` and follow its Steps 1-4: classify the track, load the decision and conventions, explore, optional doc check, build, then update the scope and report. Do not read `flow/build.md` when the gate ends the run (`Architect it first`, no build).
135
+
136
+ ---
137
+
138
+ ## Reference files
139
+
140
+ - Build flow after the gate (Steps 1-4): `flow/build.md`
141
+ - UI build track: `ui-guide.md`
142
+ - Logical build track: `logical-guide.md`
143
+ - Accessibility checklist (UI track, Phase 5): `checklist.md`
144
+ - Project design system (UI track): `./.istm-context/design.md`
@@ -0,0 +1,7 @@
1
+ # OpenAI Codex adapter. This file supplies the interface metadata Codex shows in
2
+ # its agent picker. The skill's actual instructions live in ../SKILL.md, which the
3
+ # Agent Skills client installs alongside this file and loads when the skill runs.
4
+ interface:
5
+ display_name: "Develop"
6
+ short_description: "Build features from approved specs"
7
+ default_prompt: "Run the develop skill: read its SKILL.md, check the spec gate, then implement the next approved feature from its build spec."
@@ -0,0 +1,95 @@
1
+ # UI Accessibility and Token Checklist
2
+
3
+ Loaded by /develop (UI track) during Phase 5. Work through each section. Items marked **required** must pass before the skill is complete. Best effort items should be completed where scope allows.
4
+
5
+ ---
6
+
7
+ ## Keyboard navigation (required)
8
+
9
+ - [ ] All interactive elements reachable via `Tab` in logical document order
10
+ - [ ] `Enter` activates buttons and links
11
+ - [ ] `Space` activates buttons, checkboxes, and radio buttons
12
+ - [ ] `Escape` closes modals, drawers, dropdowns, and tooltips
13
+ - [ ] Arrow keys navigate within composite widgets (tabs, listboxes, menus, radio groups)
14
+ - [ ] No keyboard trap except inside modal/dialog, where a trap is required
15
+ - [ ] After an action removes the focused element, focus moves to a logical next target (not lost to `<body>`)
16
+
17
+ ## Focus visibility (required)
18
+
19
+ - [ ] Every focusable element has a visible focus indicator in all states
20
+ - [ ] `outline: none` or `outline: 0` is never present without a custom focus style replacing it
21
+ - [ ] Focus ring is visually distinct: minimum 2px width, minimum 3:1 contrast against adjacent colour
22
+
23
+ ## Semantic HTML (required)
24
+
25
+ - [ ] Headings (`h1` to `h6`) reflect document hierarchy, not chosen for visual size
26
+ - [ ] `<button>` for all actions; `<a>` for all navigation, never `<div onClick>` or `<span onClick>`
27
+ - [ ] Lists use `<ul>` / `<ol>` / `<li>`, not styled divs
28
+ - [ ] Tables use `<table>`, `<thead>`, `<th scope>`, `<td>`, `<caption>`, not grid divs
29
+ - [ ] Forms group related fields with `<fieldset>` and `<legend>`
30
+ - [ ] `<main>`, `<nav>`, `<header>`, `<footer>`, `<aside>` used for landmark regions
31
+
32
+ ## Labels and accessible names (required)
33
+
34
+ - [ ] Every `<input>`, `<select>`, `<textarea>` has a `<label>` associated via `for`/`id` or wrapping
35
+ - [ ] Placeholder text is not the only label, placeholder disappears on input
36
+ - [ ] Icon only buttons have `aria-label` describing the action (e.g. `aria-label="Close"`)
37
+ - [ ] Images that are not decorative have `alt` text describing content (not filename, not "image of")
38
+ - [ ] Decorative images have `alt=""` and no `aria-label`
39
+ - [ ] Linked images: `alt` describes the destination, not the image appearance
40
+
41
+ ## ARIA (use only when HTML semantics are insufficient)
42
+
43
+ - [ ] `role` attribute only on genuinely custom widgets (custom dropdown, custom slider, custom tabs)
44
+ - [ ] `aria-expanded` on toggle triggers (accordion headers, dropdown triggers, disclosure buttons)
45
+ - [ ] `aria-controls` links a trigger to the element it controls (where supported)
46
+ - [ ] `aria-haspopup` on triggers that open a menu or listbox
47
+ - [ ] `aria-live="polite"` on regions that update dynamically without user action
48
+ - [ ] `aria-atomic="true"` on live regions that should be read as a whole unit
49
+ - [ ] `aria-hidden="true"` on decorative icons and elements that duplicate visible text
50
+ - [ ] `aria-disabled="true"` on custom elements that behave as disabled but can't use `disabled` attribute
51
+ - [ ] `aria-required="true"` on required form fields (in addition to visual indicator)
52
+ - [ ] `aria-invalid="true"` on fields that have failed validation, with `aria-describedby` pointing to the error message
53
+
54
+ ## Colour contrast (required)
55
+
56
+ - [ ] Normal text (< 18pt / < 14pt bold): contrast ratio ≥ 4.5:1 against background
57
+ - [ ] Large text (≥ 18pt / ≥ 14pt bold): contrast ratio ≥ 3:1 against background
58
+ - [ ] UI component boundaries (input borders, button outlines, focus rings): ≥ 3:1 against adjacent colours
59
+ - [ ] Placeholder text: technically exempt but aim for ≥ 4.5:1 for usability
60
+ - [ ] Information is never conveyed by colour alone, always paired with text, icon, or pattern
61
+
62
+ ## Modal and dialog (required when applicable)
63
+
64
+ - [ ] Modal has `role="dialog"` and `aria-modal="true"`
65
+ - [ ] `aria-labelledby` points to the modal's visible title element
66
+ - [ ] `aria-describedby` points to descriptive content if present
67
+ - [ ] Focus moves into the modal when it opens, to the first focusable element or the dialog element itself
68
+ - [ ] Focus is trapped inside while open: `Tab` and `Shift+Tab` cycle within the modal
69
+ - [ ] `Escape` closes the modal
70
+ - [ ] Focus returns to the trigger element that opened the modal on close
71
+
72
+ ## Token discipline (required)
73
+
74
+ - [ ] No hex colour literals (`#fff`, `#1a2b3c`) in new files
75
+ - [ ] No rgb / hsl colour functions with raw values
76
+ - [ ] No raw pixel values for spacing, padding, margin, or gap (exception: `1px`, `0`)
77
+ - [ ] No raw pixel values for font sizes or line heights
78
+ - [ ] No raw pixel or rem values for `border-radius` or `box-shadow`
79
+ - [ ] All values reference the design system (Tailwind classes, CSS custom properties, design tokens)
80
+ - [ ] Missing tokens are documented as `// TODO: missing token: <what's needed>` not invented inline
81
+
82
+ ## Responsive (best effort verification)
83
+
84
+ - [ ] No horizontal scroll at 375px viewport width
85
+ - [ ] Touch targets ≥ 44×44px at mobile viewport
86
+ - [ ] Body copy ≥ 16px (1rem) at mobile viewport
87
+ - [ ] Images do not overflow their container
88
+ - [ ] Table or data heavy content has a mobile strategy (horizontal scroll with overflow, card layout, etc.)
89
+
90
+ ## Loading and error states (required)
91
+
92
+ - [ ] Loading state is implemented, no blank space while data loads
93
+ - [ ] Error state is implemented, message is visible and actionable
94
+ - [ ] Empty state is implemented, message explains why and what to do
95
+ - [ ] States are visually distinct from each other and from the populated state
@@ -0,0 +1,133 @@
1
+ # Develop: build flow (Steps 1-4, after the Step 0 spec gate passes)
2
+
3
+ Read this once the Step 0 gate in `SKILL.md` clears (a decision is not owed, or the engineer chose to build anyway). Tracks are additive: a feature can be UI, Logical, or both (and may also carry a tooling sub task); classify in Step 1 and run each part.
4
+
5
+ Guide paths below (`ui-guide.md`, `logical-guide.md`, `checklist.md`) are relative to the develop skill folder (the parent of this `flow/` directory).
6
+
7
+ ### Step 1: Classify the track
8
+
9
+ | Signals | Track |
10
+ |---|---|
11
+ | "page", "component", "screen", "layout", "ui"; a screenshot is attached; visual work against `.istm-context/design.md` | **UI** → `ui-guide.md` |
12
+ | "api", "endpoint", "service", "functionality", "logic", "data", "job", "webhook", "integration" | **Logical** → `logical-guide.md` |
13
+ | Both present (e.g. "auth": pages + session logic) | **Both**: run each track for its part |
14
+
15
+ If genuinely ambiguous, ask once: "Is this the UI, the logic behind it, or both?"
16
+
17
+ ### Step 2: Load the decision and conventions (both tracks)
18
+
19
+ Read:
20
+ 1. **The governing spec** (feature's `spec` pointer, or Step 0), build spec sections only: `## Requirements` (user stories + IDed acceptance criteria `AC-1…`; the contract, and the source of the Step 4 verify steps), `## Decision`, the design/spec section (`## Feature design` / `## Proposed stack` / spec table), `## Build plan` (ordered tasks tagged "satisfies AC-N"; the data model migration sized to the feature), `## Consequences` (constraints). Skip `## Context`, `## Options considered`, `## Rationale` (decision history, not build input) unless a constraint needs the reasoning. Umbrella `index.md` → read the index (decision + child list; `## Structure` maps every child; the index holds any cross child contract), then only the child spec(s) this sub task touches (usually one; a second only if it truly spans two, never all), build spec sections only; a child is self sufficient, its inline rationale is optional depth. Never read the spec's `rationale.md` for a build (it is decision history, not build input). **Check the `Status`** (single file, or umbrella `index.md`; children carry none): `Proposed` → normal for a feature spec `/architect` designed and linked (it means agreed, not yet built; `Accepted` is reserved for shipped), so build it and advance to `In Progress` (Step 3) with no warning. Pause to confirm only for a clearly unconfirmed draft (no scope link) or an unratified standalone decision spec. `Superseded` → use the superseding spec; `Assumed` → expected on a resumed build via the Step 0 escape hatch (a decision recorded but not deliberated): build against the recorded assumption and carry the ratify reminder into Step 4 (the feature stays blocked from `done`).
21
+ 2. **The nearest `.istm-context/agents.md`** to the target code area (Claude Code loads it automatically; read explicitly to be sure). It carries decisions synced from earlier features: don't ask again what's settled.
22
+ 3. **`.istm-context/design.md`** (UI track only): the visual source of truth.
23
+ 4. **The build approach**, precedence: the feature's scope row `Approach` override if declared, else the project default in root `.istm-context/agents.md`, else the scope file's header (a feature with its own approach, e.g. a Facade prototype in a Skateboard project, builds by ITS approach). Strategies: vertical end to end slice, thinnest usable whole, UI shell first prototype wired later, full user journey per phase. Governs *how you assemble* the slice in Step 3, not *what* it contains (the spec fixes that). None recorded → default to a coherent end to end slice, every layer the feature spans (data → logic → interface → UI). Reason from the strategy's principle, not a fixed per approach recipe.
24
+ 5. **Tool skills**: the spec's `## Decision` **Implementation skills** field names them (e.g. an ORM, an auth library); `.istm-context/agents.md`'s `## Agent skills` section lists what's installed, one bullet per skill with its location. Open the `SKILL.md` (the path from that bullet or the spec field is real and readable) of each one materially governing the code you're about to write and follow its conventions. On demand only: just the skills this sub task touches, not all. On Claude Code a skill may activate on its own; read it explicitly anyway. Unreadable → build from the spec plus knowledge, note it.
25
+
26
+ **Monorepo: work inside the target workspace.** Workspaces config or `apps/*`/`packages/*` manifests → identify the feature's workspace (code pointer, or task path) and operate there: its nested `.istm-context/agents.md` and `.istm-context/design.md`, its `package.json`/stack, write into its tree, run its commands (`dev`/`build`/`test`, e.g. `pnpm --filter <workspace> …` or `turbo run … --filter`). The checks before you start apply to that workspace; its scope is `.istm-context/scope/<workspace>/`.
27
+
28
+ **Precedence on conflict:** the spec wins for the feature it governs; `.istm-context/agents.md` is the general convention (`.istm-context/agents.md` says Jest, this spec says "Vitest for this" → Vitest for this feature). Flag the conflict ("spec <NNNN> diverges from `.istm-context/agents.md` on X, `/sync` should reconcile") rather than silently picking. spec silent on a point → `.istm-context/agents.md` governs.
29
+
30
+ **Spec completeness check (before any code, not partway).** Two passes:
31
+
32
+ 1. **Sections present:** logical → data model, API surface, security model, key invariants; UI → screens and their states. Missing or placeholder → ask (panel below).
33
+ 2. **Input coverage (catches the silent decision):** enumerate every value each code path must produce or display for the ACs; for each, confirm the spec names its source (input, DB column, derivation, prior decision, the spec's **Value sourcing** table). A required value with **no named source** is a load bearing gap, the case the builder is tempted to fill as "local wiring": it decides the source of an AC constrained value, so treat it as a missing load bearing section and ask; never invent the source. (Timezone sourcing is one illustration; apply it to every produced value.)
34
+
35
+ A gap → ask. Options depend on whether it is **load bearing** (data model, API surface, security model, provider, feature behavior, or an unnamed source for a required value) or a **local detail** the spec already governs (pagination size, sort order, label):
36
+
37
+ - **question**: "The spec for this is missing `<section>`. How do you want to proceed?"
38
+ - **header**: "spec gap"
39
+ - **Load bearing** → `Update the spec first` (recommended: paste ready `/architect <feature>: fill in <section>`) · `Tell me the answer now` (persist it before building, below). `Use your best judgment` is NOT offered here (inventing one of these is `/architect`'s call, and it must be persisted, not left in chat).
40
+ - **Local detail** → the above two, plus `Use your best judgment` (proceed on a stated assumption, surfaced in the report). Local only, never the load bearing list.
41
+
42
+ **Persist a load bearing answer before building** (`Tell me the answer now`), so a known decision never stays only in chat: deliberated spec (`Proposed`/`In Progress`/`Accepted`) → `/develop` can't write its content, route to `/architect <feature>: fill in <section>` and resume. Already `Assumed` → append to its `## Assumption built on` (the one write `/develop` owns), then build. No spec (you passed Step 0 as "no real decision") → a decision is owed after all: back to the Step 0 panel (`Architect it first`, or `Build now, record it as an assumed spec` folding this answer in).
43
+
44
+ ### Step 2.5: Explore before building (isolate the reading, the top monorepo win)
45
+
46
+ Locating files to touch and patterns/interfaces to match and reuse means reading code, the top context cost in a large or monorepo repo (inline, every opened file stays in the main context all session). Isolate it in a read only subagent that returns a compact map (~1 to 2k tokens).
47
+
48
+ - **Skip it** when the change is tiny and you know the file, or on a fresh session where context is light: inline reading is fast and cache cheap, and a subagent only adds spawn latency. It pays only when context is the scarce thing.
49
+ - **Run it** when the reading would bloat the main context: a large or monorepo repo, many files, an unfamiliar area.
50
+
51
+ Spawn a read only exploration subagent (Claude Code: the `scout` subagent type, which is read only and pins its model to a fast, low cost tier; else Cursor `Explore`, Antigravity `research`, Codex `spawn_agent`; else a plain subagent, or inline if your agent has none). Where the type does not pin it, set its model explicitly to a fast, low cost tier and do not let it inherit this session's model. Tools `Read`/`Grep`/`Glob` only, no `Edit`/`Write`. Brief: target workspace, exact sub task, the spec's key interfaces; return only a compact map, files to create/edit (paths), patterns/conventions to match (`file:line`), symbols/types/helpers to reuse, and gotchas, no file contents or dumps.
52
+
53
+ Build from the map (Step 3): the reading is offloaded, the deciding and writing stay on the main thread.
54
+
55
+ **Large repos & monorepos:** hold the Step 0 read scope, one sub task per run, build inline.
56
+
57
+ ### Step 2.6: Doc check (only when needed): offload current usage lookups to a web subagent
58
+
59
+ Only when you genuinely need the current usage/API of a tool the spec already decided (fast moving or newly released, e.g. an auth library's ORM adapter wiring) and you're unsure your knowledge is current. Most builds don't need it: on a stable stack, build from knowledge and let the typecheck/build/lint loop catch a stale API cheaply. Never to choose or reconsider a tool (`/architect`'s job): look up *how to use* the decided tool, not *whether*; if docs reveal it can't work, that's the "spec is wrong" path (Step 3), not a silent swap. Not a second fetch of the spec's reference links (human facing, verified at design time).
60
+
61
+ **How (capability first):** spawn a read only web subagent (on Claude Code, the `researcher` subagent type, which pins a fast, low cost model and carries the web tools; else the web/browse tool on Cursor/Codex/Antigravity or your agent's equivalent), with its model set explicitly to a fast, low cost tier where the type does not pin it (do not inherit the session model), briefed with the exact tools and versions from the spec and the one thing you need. Return only a compact usage summary (current call/config/setup steps, version notes, gotchas), never raw pages or site lists, so only the answer lands on the main thread; build from it. No web capability → skip: build from knowledge, lean on the build/typecheck loop to surface a stale API mistake, note the assumption.
62
+
63
+ ### Step 3: Resume check, then build
64
+
65
+ **Task source.** Governing spec → its `## Build plan` is the atomic checklist (tasks tagged with their AC; the data model migration sized to the feature, one or sliced per slice): build from it and tick progress there, the resume trail. The scope carries only the milestone rollup under the feature's `Build it: /develop <feature>` box (2 to 5 sub items), updated per Step 4; `Verify it` and `Test it` belong to `/check verify` and `/test`. No spec → the scope checkboxes are the tasks.
66
+
67
+ **Build the coherent slice the approach calls for; don't silently skip surface.** Assemble as a senior build engineer per the Step 2 approach, and let the approach visibly shape the slice, not the same build relabeled: a Tracer Bullet slice is a thin thread wired end to end through every layer; a Skateboard slice is the smallest genuinely usable piece; a Facade slice is the UI shell on placeholder data, wired later; a Journey slice completes one user path fully (all its states) before another. Reason from the principle, not a recipe; none recorded → the Step 2 end to end default. Cross check the task list against `## Requirements` (`AC-1…`) and the spec's API/UI surface before building: required but uncovered (the classic missed verify email page) → flag it and add the task. Every `AC-N` is satisfied by a task you build, or explicitly deferred with the engineer's agreement.
68
+
69
+ **Resume first; never rebuild what's done.** Use the Step 0 scope file only (the workspace's, in a monorepo). Status **`existing`** (shipped) or **`dropped`** (dropped from scope) → not active: don't build it automatically; say it's marked `<status>` and confirm reviving/modifying (a new task, possibly needing a spec). Else find the first unchecked `[ ]` in the spec's `## Build plan` (or the scope checkboxes, no spec); `[x]` tasks are already built, don't redo them. Say where you pick up: "This feature is 4/10 done, resuming at *data integration*." Set the feature's status to `in-progress` (At a glance table and heading); a governing spec's `**Status**:` line advances `Proposed` → `In Progress` surgically per Artifact ownership (read it again first; not `Proposed` → flag, don't clobber). An **`Assumed`** spec is the exception: leave its status `Assumed` (do not advance it to `In Progress`), because the decision is not deliberated yet; only `/architect` ratification clears `Assumed`. No scope → just build the requested task.
70
+
71
+ **Gather remaining inline answers** (the Step 2 spec gap answer, UI asset and design direction questions, an ambiguous business rule) before any build handoff; they need the engineer.
72
+
73
+ **With the Step 2.5 map in hand, the build is a write step done inline on the main thread** (only the file locating read was offloaded, in Step 2.5). Do not spawn a subagent to write code, even for a very large or multi file build; sequence it sensibly.
74
+
75
+ Tracks:
76
+
77
+ - **UI** → follow `ui-guide.md` inline (component or screen → stack/styling/dark mode detection → asset resolution → tokens → font → the five phases → accessibility); the main thread keeps design/asset questions responsive.
78
+ - **Logical: normal build** → inline per `logical-guide.md` (ground in the spec → data layer → core logic → interface → integration → correctness pass).
79
+ - **Logical: very large single build** → still inline. Work through it in ordered chunks per `logical-guide.md`, ticking `## Build plan` tasks as each lands and its typecheck passes; use `/compact` partway through the build if the single feature runs long (the scope and spec hold the state, so nothing is lost).
80
+ - **Logical: big rollout of an already decided pattern** (e.g. "swap inline inputs across 17 files") → still inline, sequenced to stay safe:
81
+ 1. **Primitive first**: build the shared thing (helper/module/schema) and confirm it typechecks before touching call sites.
82
+ 2. **Apply site by site**: work through the files in turn, applying `<primitive>` per the pattern the spec fixes, preserving exact behavior; tick each as it lands.
83
+ 3. **Gate once at the end**: package wide typecheck/lint and `/check verify` after all sites are migrated, not after each. Remove the superseded code only on this green sweep (ALL sites migrated AND typecheck/lint passing): sites not migrated still reference it, deleting early breaks the build.
84
+ 4. **Partial progress; don't migrate only halfway**: if you stop before every site is done, keep the old code, leave the feature `in-progress`, report migrated versus pending sites explicitly (which files landed, which remain), and say running `/develop` again resumes the pending sites (it detects and skips migrated ones; idempotent and resumable). The old code comes out on the run where the last site lands green.
85
+ - **Both** → track order follows the build approach, not a fixed rule. Default (and for an end to end / tracer bullet slice): logical interface first so the UI binds to something real, then UI. Facade (UI shell first): UI on placeholder data first, wire the logical layer after.
86
+
87
+ **Spec wrong partway through the build → update the spec before patching; never silently diverge.** The spec proves wrong or incomplete partway through the build (e.g. the decided data model can't hold, or an acceptance criterion contradicts the API surface): if building correctly means deviating from the spec, STOP before coding the deviation, route to `/architect` to update or supersede the spec (paste ready `/architect <feature>: <what the spec got wrong>`), resume once the spec reflects reality.
88
+
89
+ **A data layer build isn't done until its migration is applied and verified**: generate the migration, run it against the target DB, confirm the schema is live (tables/columns/relationships exist; query the DB or its introspection, not just the migration file) before ticking. Generated but unapplied = not done. (`logical-guide.md`, Phase 2.)
90
+
91
+ **Remove superseded code; old and new must not coexist.** A build that replaces an existing pattern or implementation (a refactor, or an approach swapping rollout) includes the deletion, not as optional cleanup: remove dead functions, unreachable branches, orphaned files, unused imports; verify nothing still references them (search for callers/imports; typecheck/build/lint clean with the old code gone). Old and new side by side = not done. Timing: single site → delete the moment the new code is in and typecheck is green; multi site rollout → per rollout points 3 and 4 above. (Elaborated in `logical-guide.md`.)
92
+
93
+ **Follow the spec's verify protocol.** If the spec specifies how to verify (common with no test runner, e.g. "`pnpm -F <pkg> typecheck` must pass after every sub task", or "diff API responses before/after"), run exactly that after each sub task/batch; a sub task isn't done until it passes. Don't assume a test suite exists.
94
+
95
+ ### Step 4: Update the scope and report
96
+
97
+ - **Only mark what actually landed.** Confirm first: files written, code present and typechecking; data layer task → migration applied and schema confirmed live, not merely generated. Interrupted or half done sub task → leave the task unchecked, keep the feature `in-progress`, report exactly what's incomplete and why. Never mark a task `done` on an unverified or incomplete build.
98
+ - **Tick atomic tasks in the spec, milestones in the scope** (only what you verified built, only in the Step 0 scope file): each completed `## Build plan` task in the spec; a milestone sub box when its spec tasks are done; the `Build it` box when all milestones are done; fill the pointer line (`code in <path>`). No spec feature → tick its scope checkbox(es) directly. **Closing gate: report what you ticked in each file** (scope boxes + spec tasks/status), or say no scope row matched; never finish silently.
99
+ - **Who closes `done` depends on the effective workflow tier** (feature's own tier tag if set, else the scope header `**Workflow:**` default; no scope → infer as below):
100
+ - **Lean / Medium / Full** → do NOT set `done`; leave `in-progress` and point to `/check verify <feature>` next. `Lean` closes when `/check verify` passes; `Medium`/`Full` at `/test`.
101
+ - **Vibe** → no verify/test step; once the build landed and your self check passed (typecheck/build green; UI rendered and eyeballed if you could; migration applied and schema live), set `done` yourself. The one tier where `/develop` closes a feature (the engineer opted out of separate verification).
102
+ - **Every tier**: an `Assumed` governing spec blocks `done`, structurally, since `/develop` only moves a spec `In Progress` → `Accepted`, never `Assumed` → `Accepted`. Leave it `in-progress` with its `assumed decision (spec NNNN)` note until `/architect` ratifies.
103
+ - **Mirror `done` onto the governing spec.** Only when the feature reaches `done` (all sub tasks checked, the tier's required stages passed, at `Vibe` just build + self check), advance the `**Status**:` line `In Progress` → `Accepted`, surgically per Artifact ownership (read it again first; not `In Progress`, e.g. `Accepted`/`Superseded`/`Assumed` → flag, don't clobber). At `Lean`/`Medium`/`Full` the closing skill (`/check verify` or `/test`) mirrors this instead.
104
+ - **Emit verify steps, then ASK where they go (every run, never save automatically).** Derive concrete steps from the ACs, specific and each tied to its `AC-N` (e.g. "visit `/signup` → sign up → expect redirect to `/auth/verify-email` → AC-1"). **Also one step per row of the spec's Value sourcing table**, so the behavioral layer (the real correctness guarantee; the gate is only design time) exercises each value's source, especially the edge that breaks if it is wrong (vary the input, timezone, locale, currency, or tenant and check the output). This catches a mis sourced value (e.g. a day computed in the wrong timezone) even if the gate missed it. Present this panel; write `verify.md` only on "Save" (`AskUserQuestion` on Claude Code):
105
+ - **question**: "Save these verify steps to the feature's `verify.md`, or just show them in this summary?"
106
+ - **header**: "Save verify steps?"
107
+ - **options**:
108
+ 1. `Save to verify.md`: "Recommended for data, auth, or higher risk features: a durable checklist `/check verify` can run and `/test` can later lock." → write/append the steps to `verify.md` (below).
109
+ 2. `Just show in summary`: "Keep them inline in this report only; don't write a file." → include them in the report and stop.
110
+
111
+ The tool appends "Other" as a free text option automatically. On **Save**, write/append `verify.md` beside the spec. Single file spec → promote it to a directory, `.istm-context/specs/NNNN-feature.md` → `.istm-context/specs/NNNN-feature/{index.md, rationale.md, verify.md}` (split the decision record sections Context/Options considered/Rationale/References into `rationale.md`, keep the build spec in `index.md`, never double the name), and repoint the scope feature's `spec` link to the new `…/index.md` path. Directory spec → drop `verify.md` in. Existing `verify.md` → append, don't clobber. Format (so `/check verify` can consume it and `/test` can lock the durable steps):
112
+
113
+ ```markdown
114
+ # Verify: <feature> · spec NNNN · updated <date>
115
+ _Steps derived from spec NNNN acceptance criteria. `/check verify` runs these; `/test` locks the durable ones._
116
+ ## UI / manual
117
+ - [ ] <action> → <expected> → AC-N
118
+ ## Commands
119
+ - [ ] `<command>` → <expected> → AC-N
120
+ ## Acceptance-criteria coverage
121
+ - AC-1 … covered by step … · AC-2 … · …
122
+ ```
123
+ - Relay the track's report (the `## /develop complete` block from `ui-guide.md` and/or `logical-guide.md`).
124
+ - **Recommend the next steps, scaled to the effective tier** (feature tier tag, else project `**Workflow:**` default, else infer from risk: auth/payments/PII/migrations/money → heavier; a copy tweak, styling, a self contained component → `Vibe`/`Lean`). Surface the tier as an overridable statement, not a gate. **If the spec is `Assumed`, lead with ratification** before verify/test (it can find the assumption wrong and force a rebuild, wasting verify/test work): `/architect <feature>: ratify the assumed <decision>`, and note the feature can't be `done` until ratified. Then:
125
+ - **Vibe** → nothing after the build; it's `done` (unless `Assumed` blocks it). "Built and self checked, no separate verify or tests. Say if it's higher risk and I'll suggest `/check verify` and tests."
126
+ - **Lean** → just `/check verify` (closes `done` on PASS); add `/test` only if there's runtime logic worth locking; no `/check review`.
127
+ - **Medium** → `/check verify`, then `/test` (closes `done`); `/check review` optional.
128
+ - **Full** → `/check verify`, `/test`, a fresh model `/check review`, then `/document`.
129
+ - Any tier: `/sync` at merge to promote new conventions into `.istm-context/agents.md`.
130
+
131
+ Always advise `/clear` before the next feature (state lives in files; long sessions cost more even when cached). Suggest `/compact` mid build if this feature runs long.
132
+
133
+ `/develop` builds; it does not run `/check verify`, `/test`, `/sync`, or `/architect` for you, it points; you decide.
@@ -0,0 +1,34 @@
1
+ # Develop: git handling (read only when git integration is on)
2
+
3
+ Read this only when the nearest `.istm-context/agents.md` `## Git` block says `integration: on`. Absent or `off` → do no active git; the engineer manages branches and commits, and the read only freshness checks still apply. Git is the one hard dependency; skip silently if there is no repo.
4
+
5
+ Read the setting: `integration`, `branch prefix` (default `feat/`), `commit` (`per-milestone` default, `end-of-build`, or `manual`). Local ops (branch, commit) are offers with a recommendation; **push and PR always confirm** (outward) and PR is `/document`'s job, not this skill's.
6
+
7
+ **Ensure a repo exists first.** If integration is on and the project is not yet a git repo (`git rev-parse` fails), run `git init` before any branch or commit, and stage what is already there for the first commit. `/audit` normally does this the moment integration is turned on; this is the backup for a project that reached a build without it.
8
+
9
+ ## Branch (before building, in the freshness & collaboration check)
10
+
11
+ - On the default branch (`main`/`master`) → **offer to branch** (recommended): `<prefix><feature-slug>` from the scope feature name (kebab case; e.g. `feat/accounts-sign-in`). Never build on the default branch.
12
+ - On a feature branch already → reuse it; do not create another.
13
+ - Resuming a half built feature (Step 3) → check out that feature's branch first if it exists and you are not on it.
14
+ - Use the change type for the prefix when it is not a feature (`fix/`, `refine/`), else the setting's default.
15
+
16
+ ## Commit (as milestones land, per the `commit` setting)
17
+
18
+ - `per-milestone` (default) → when a milestone lands and its typecheck is green, **offer to commit** just that milestone's files.
19
+ - `end-of-build` → one commit when the build lands.
20
+ - `manual` → never commit; the engineer does.
21
+
22
+ Message: a **one line Conventional Commit subject**, no prose body, plus the `Co-Authored-By` trailer (required). Type from the work (`feat`, `fix`, `refactor`, `test`, `chore`), optional scope from the feature, summary in the imperative:
23
+
24
+ ```
25
+ feat(auth): add session persistence
26
+
27
+ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
28
+ ```
29
+
30
+ The why lives in the spec and the PR, never in the commit body (single source). Commit only what actually landed and typechecks; never commit a half done milestone. Never `git push` here (that is `/document` at PR time, confirmed).
31
+
32
+ ## Report
33
+
34
+ Add one line to the `/develop` summary: the branch you are on, and what you committed (`feat(auth): … · 3 commits`) or that commits are `manual`. If integration is off or absent, say nothing about git.
@@ -0,0 +1,99 @@
1
+ # /develop: logical track guide
2
+
3
+ The backend/logic build track for `/develop`. The main agent reads this after the spec gate (Step 0 in `SKILL.md`) classifies a task as logical: APIs, services, data layers, business logic, integrations, background jobs, anything that is not rendered UI.
4
+
5
+ You are a **senior backend engineer** on this project. You implement the decision that `/architect` already made; you do not litigate it again. The spec is your spec, the `.istm-context/agents.md` beside the source is your conventions, and the existing code is your style guide.
6
+
7
+ ## Ground rules
8
+
9
+ - **Build to the spec.** Data model, API surface, key invariants, security model, and configuration come from the spec's `## Feature design` section. If the spec says `subscription: trialing → active → past_due`, you implement exactly that state machine, not your own.
10
+ - **Match the codebase.** Read the nearest `.istm-context/agents.md` and 2 to 3 neighbouring files before writing. Use the project's existing ORM, error handling pattern, validation library, and file layout. Never introduce a new pattern when one already exists, that is a decision, and decisions belong in a spec.
11
+ - **Infer / ask / recommend** (same discipline as `/architect`):
12
+ - **INFER** from the spec, `.istm-context/agents.md`, and codebase: stack, conventions, the decided approach. Never ask again what's already recorded (that's the whole point of the spec → `.istm-context/agents.md` chain).
13
+ - **ASK** only genuinely ambiguous business rules the spec left open ("should an expired invite be reusable or regenerated?"). Keep it to what blocks correct implementation.
14
+ - **RECOMMEND** local implementation choices (a helper's shape, where a file lives), decide and proceed; don't pester.
15
+
16
+ ## Phases
17
+
18
+ ### Phase 1: Ground in the decision
19
+
20
+ - Read the governing spec in full, especially `## Feature design` (data model, API surface, invariants, security model, configuration) and `## Consequences`.
21
+ - Ground in the **exploration map** from `SKILL.md` Step 2.5 (the files to touch, patterns to match, symbols to reuse) rather than reading the whole area again inline. Read the nearest `.istm-context/agents.md`, and, only if no map was produced (a small, localized task), the few files the feature must integrate with (entry points, existing models, the router/service layer).
22
+ - Ground in the spec's **`## Requirements`** too, the acceptance criteria `AC-1…` are the contract this build must satisfy end to end, and the `## Build plan` tasks each name the `AC-N` they serve. You'll derive the verify steps again from these criteria at the end of the run.
23
+ - **Ground in the project's build approach** (`SKILL.md` Step 2), it sets how this logical slice fits the whole: built end to end alongside its UI in a tracer bullet slice, or wired behind a UI shell already standing in a Facade. It changes *when* the logic joins the slice, not *how* you build it correctly. If no approach is recorded, build it as part of the coherent end to end slice.
24
+ - List the integration points and the order you'll build in, within this track, typically data → logic → interface → integration → cleanup. Surface any spec gap now, before writing code.
25
+ - If this task **replaces** existing code (a refactor/migration, not a greenfield addition), note upfront *what* it supersedes (the old functions/files/patterns) so you know exactly what Phase 6 must delete once the replacement is in.
26
+ - **If grounding reveals the spec is wrong or incomplete** (the decided data model can't hold, an acceptance criterion contradicts the API surface, the chosen approach won't work in practice) **stop and route to `/architect`** to update or supersede the spec *before* coding the deviation (paste ready `/architect <feature>: <what the spec got wrong>`). Never silently diverge from the spec; the spec and the code must stay in lockstep (`SKILL.md` Step 3).
27
+
28
+ ### Phase 2: Data layer
29
+
30
+ - Implement the schema/migrations to match the spec's data model sketch: field types, nullability, FK relationships, unique constraints.
31
+ - **A data layer change isn't done until the migration is applied and verified.** Generating a migration is not the same as running it. **Generate the migration *and* run it** against the target database, then **confirm the schema is live**, the tables/columns/relationships actually exist. **Prefer a connected database MCP** to query the real schema (the most reliable proof it is there); else the project's own introspection or a describe query. **Never just eyeball the migration file.** A generated but unapplied migration is a task still not done: **do not tick a data layer task until the schema is confirmed present.** (This is the not applied schema bug the per slice migration rule exists to prevent, and `/check verify` checks it again at Step 4b with the same DB MCP.)
32
+ - Enforce invariants at the database where possible (constraints, not just app checks).
33
+ - Follow the project's migration discipline: in a live system, add column nullable → backfill → add constraint; never add a `NOT NULL` column without a default.
34
+ - Use the project's existing ORM/query layer and naming conventions.
35
+
36
+ ### Phase 3: Core logic and services
37
+
38
+ - Implement the business logic and state transitions from the spec. Model the state machine explicitly; reject invalid transitions.
39
+ - **Idempotency** for any mutation involving money, messaging, or external side effects, generate and honour idempotency keys so a retry is safe.
40
+ - Validate inputs at the boundary using the project's validation approach. Fail closed.
41
+ - Handle errors using the project's established pattern (the result/exception/error shape convention already in the codebase), do not invent a new one.
42
+
43
+ ### Phase 4: Interface surface (API / actions)
44
+
45
+ - Implement each endpoint/action exactly as the spec's API surface table specifies: method, path, inputs, outputs, auth requirement, key errors.
46
+ - **Enforce authorization**, not just authentication, check that the caller may act on *this* resource (ownership / role / org scope per the spec's security model).
47
+ - **Paginate every list endpoint**, even in MVP. Unpaginated lists become incidents.
48
+ - Return consistent error shapes the client can rely on. Use correct status codes.
49
+ - **Rate limit public endpoints.**
50
+
51
+ ### Phase 5: Integration and configuration
52
+
53
+ - Wire external providers exactly as the spec decided (the provider was a RECOMMEND decision `/architect` already made, use it).
54
+ - Read secrets/keys from environment variables or a secrets manager, **never hardcode credentials** or commit them. Name each new env var; note it for the engineer.
55
+ - For inbound webhooks: **verify the signature**, make handlers **idempotent** (an events table so a replayed webhook can't double apply), and reconcile state webhook driven with a periodic backstop if the spec calls for it.
56
+ - Add **structured logging** at the boundaries and **audit logs** for any mutation touching money, access control, or compliance scope.
57
+
58
+ ### Phase 6: Remove superseded code (after a refactor or replacement)
59
+
60
+ Applies whenever this build **replaced** an existing pattern or implementation, a refactor, or a rollout that swaps one approach for another (new query builder for hand rolled queries, new service for an old one, a renamed/relocated module). The old and new implementations **must not coexist**; leaving the dead code behind is the classic miss ("after refactoring it did not remove unused code"). Removing it is part of this build, not a later chore.
61
+
62
+ - **Delete the superseded code**: the functions/classes now replaced, branches that became unreachable, files orphaned by the change, and any imports/exports left dangling.
63
+ - **Prove nothing still references it**: search the codebase for every removed symbol (its name, its import path), no lingering callers, forwarding exports, or `index` barrels pointing at it. If something still needs it, the migration isn't finished, migrate that caller too rather than keeping the old code alive.
64
+ - **Verify clean with the old code gone**: run the project's typecheck/build/lint (and any dead code or unused import lint the project has). It must pass *after* the deletion, an unused import or unresolved reference error here is the signal you missed a spot. Don't silence it by adding the old code again.
65
+ - If the spec called for a **transitional** period where both must run (a feature flagged migration, a backfill window), that's the one exception, follow the spec, and leave a note of exactly what remains to be removed and when, so it isn't forgotten.
66
+
67
+ ### Phase 7: Correctness and safety pass
68
+
69
+ Not a final checklist, built into every phase, enforced here:
70
+
71
+ - **Security**: every endpoint authorizes the actor; no sensitive data leaks in responses or logs; no secrets in code.
72
+ - **Failure modes**: what happens on third party timeout, DB slowness, concurrent writes? Retries are bounded and idempotent.
73
+ - **Invariants hold** under concurrency, the spec's key invariants can't be violated by two simultaneous requests.
74
+ - **Config complete**: every new env var is documented; the feature fails loudly (not silently) if a required secret is missing.
75
+
76
+ ## Report
77
+
78
+ ```
79
+ ## /develop complete (logical)
80
+
81
+ **Feature**: <name>
82
+ **Spec**: <path (the decision implemented)>
83
+ **Built**: <files: data layer, services, endpoints>
84
+ **Removed (superseded)**: <old files/functions deleted after refactor/replacement, verified unreferenced> | none
85
+ **Data model**: <tables/entities created or changed>
86
+ **API surface**: <endpoints/actions added>
87
+ **Integrations**: <provider(s) wired> | none
88
+ **New config**: `ENV_VAR` (purpose) | none
89
+ **Invariants enforced**: <where: DB constraint or app check>
90
+ **Migration applied**: <ran + schema confirmed live: tables/relationships present> | n/a (no data-layer change)
91
+ **Open questions left for you**: <ambiguous business rules the spec didn't settle> | none
92
+ **Verify steps (from acceptance criteria)**: emit these, then offer to save to `verify.md` (`SKILL.md` Step 4):
93
+ - `<command / action>` → `<expected>` → AC-N
94
+ **What /test should verify**:
95
+ - Happy path: <main flow end to end>
96
+ - Failure case: <timeout / concurrent write / invalid transition>
97
+ - Auth/permission: <who is denied and what they receive>
98
+ - Idempotency: <retry of a mutating call is safe>
99
+ ```
@@ -0,0 +1,23 @@
1
+ # UI Source: existing
2
+
3
+ ## Design.md path: existing design system
4
+
5
+ Case 3: the project already has a design system. Two complementary sources: `.istm-context/design.md` holds the art direction (character, the build mandate, composition and component rules) and the CSS / tailwind config holds the token VALUES (the single source of truth). Read both. Never invent a value; take colors, fonts, spacing, radius, shadows, and motion from the CSS tokens, and any unspecified value from the nearest specified token.
6
+
7
+ **Build the new page WITHIN the system, at the bar.** A new page in an existing system is still a full professional product surface (the guide's bar, and `ui/implementation.md` Phase 0), never a bare form: as complete and considered as the pages already shipped, and visually consistent with them. Design first (compose the whole surface in the system's language), then integrate.
8
+
9
+ **Naming note:** `colors.primary` and `colors.accent` are synonyms for the brand accent. Older systems use `primary`; derived systems use `accent`. Treat them identically.
10
+
11
+ ### DS1: Read the direction and the tokens
12
+
13
+ Read `.istm-context/design.md` in full: character, the build mandate, composition patterns, and every rule in `## Component & usage rules` (do's and don'ts). Then read the real token values from the CSS token file (`globals.css` / tailwind config) it points to: colors (light + dark), typography, spacing, radius, shadows, motion. The CSS is the source of truth for values; `.istm-context/design.md` is the source of truth for direction. (If an older `.istm-context/design.md` still carries inline token values, treat the CSS as authoritative where they disagree, and note it in the report.)
14
+
15
+ ### DS2: Confirm token coverage
16
+
17
+ Run stack, styling, and dark mode detection. If the page needs a token the CSS does not have yet, add it in the system's language (derive from the nearest existing token, follow the `.istm-context/design.md` rules), never a one off hardcoded value. Never silently overwrite an existing token; a genuine conflict → list it in the report, let the engineer decide.
18
+
19
+ ### DS3: Implement
20
+
21
+ Run the implementation phases (`ui/implementation.md`): Phase 0 composes the full surface in the existing system, Phases 1 to 5 integrate it, Phase 6 audits the build against the bar. `.istm-context/design.md` governs direction, the CSS tokens govern values.
22
+
23
+ ---