@mind-fold/open-flow 0.2.15 → 0.2.16

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.
@@ -72,6 +72,56 @@ workflow/
72
72
  \-- scripts/ # Automation tools
73
73
  ```
74
74
 
75
+ ### Understanding structure/ subdirectories
76
+
77
+ **frontend/** - Single-layer frontend knowledge:
78
+ - Component patterns (how to write components in THIS project)
79
+ - State management rules (Redux? Zustand? Context?)
80
+ - Styling conventions (CSS modules? Tailwind? Styled-components?)
81
+ - Hook patterns (custom hooks, data fetching)
82
+
83
+ **backend/** - Single-layer backend knowledge:
84
+ - API design patterns (REST? GraphQL? tRPC?)
85
+ - Database conventions (query patterns, migrations)
86
+ - Error handling standards
87
+ - Logging and monitoring rules
88
+
89
+ **flows/** - Cross-layer integration knowledge:
90
+
91
+ This is the CRITICAL directory that many developers overlook. It answers questions that NEITHER frontend nor backend docs can answer alone:
92
+
93
+ **WHY flows/ EXISTS**:
94
+ When a feature spans multiple layers (frontend + backend + database), there are integration concerns that don't belong in either layer's docs:
95
+ - How does data flow from UI click to database write and back?
96
+ - What's the contract between frontend and backend for this feature?
97
+ - What happens when one layer changes - what must the other layer update?
98
+ - How do we handle cross-layer error propagation?
99
+ - What's the deployment order when both layers change?
100
+
101
+ **WHAT flows/ CONTAINS**:
102
+ 1. **Feature flow documentation**: End-to-end data flow for complex features
103
+ 2. **API contracts**: Shared type definitions, request/response schemas
104
+ 3. **Cross-layer checklists**: "When changing X, also check Y"
105
+ 4. **Integration patterns**: How layers communicate in this project
106
+ 5. **Deployment guides**: Order of operations for multi-layer changes
107
+
108
+ **WHEN TO READ flows/**:
109
+ - Before implementing ANY feature that touches both frontend and backend
110
+ - When debugging issues that might be integration-related
111
+ - Before making API changes
112
+ - When planning new features
113
+
114
+ **EXAMPLE**:
115
+ A "user authentication" flow doc might include:
116
+ - Frontend: What happens when user clicks login
117
+ - API: What endpoint is called, what's the request/response format
118
+ - Backend: How credentials are validated, session created
119
+ - Database: What gets stored, what gets returned
120
+ - Error cases: How each layer handles auth failures
121
+ - Security: Token handling, refresh logic
122
+
123
+ Without flows/ documentation, AI treats frontend and backend as isolated islands. With flows/, AI understands how the layers work TOGETHER.
124
+
75
125
  ---
76
126
 
77
127
  ## COMMAND DEEP DIVE
@@ -158,6 +208,71 @@ This causes "context drift" - AI starts following guidelines but gradually rever
158
208
 
159
209
  ---
160
210
 
211
+ ### /check-cross-layer - Multi-Dimension Verification
212
+
213
+ **WHY IT EXISTS**:
214
+ `/check-frontend` and `/check-backend` verify code within a single layer. But most bugs don't come from lack of technical skill - they come from "didn't think of it":
215
+ - Changed a constant in one place, missed 5 other places using it
216
+ - Modified database schema, forgot to update the API layer
217
+ - Created a new utility function, but similar one already exists
218
+ - Fixed a bug in one component, but 3 other components have the same bug
219
+
220
+ **THE CORE INSIGHT**:
221
+ Real-world changes have multiple "dimensions" that need checking:
222
+ 1. **Cross-layer data flow**: Does data flow correctly from UI -> API -> Service -> Database and back?
223
+ 2. **Code reuse**: Are there duplicate definitions? Should this be a shared constant?
224
+ 3. **Consistency**: Is the same concept displayed the same way in different places?
225
+ 4. **Impact scope**: Did you check ALL files affected by this change?
226
+
227
+ **WHAT IT ACTUALLY DOES**:
228
+ 1. Identifies which dimensions your change involves
229
+ 2. For each dimension, runs targeted checks:
230
+
231
+ **Dimension A - Cross-Layer Data Flow** (when changes touch 3+ layers):
232
+ - Trace read flow: Database -> Service -> API -> Hook -> Component
233
+ - Trace write flow: Component -> Hook -> API -> Service -> Database
234
+ - Check types passed correctly between layers
235
+ - Check errors propagated to UI
236
+ - Check loading states at each layer
237
+
238
+ **Dimension B - Code Reuse** (when modifying constants/config):
239
+ - Search: How many places define this value?
240
+ - If 2+ places -> Should extract to shared constant
241
+ - After modification, all usage sites updated?
242
+
243
+ **Dimension B2 - New Utilities** (when creating helper functions):
244
+ - Search for existing similar utilities first
245
+ - If similar exists, extend instead of duplicate
246
+ - If new, is it in the right location?
247
+
248
+ **Dimension B3 - Batch Modifications** (after fixing multiple files):
249
+ - Did you check ALL files with similar patterns?
250
+ - Any files missed?
251
+ - Should this pattern be abstracted?
252
+
253
+ **Dimension C - Import Paths** (when creating new files):
254
+ - Using correct path aliases?
255
+ - No circular imports?
256
+ - Consistent with project convention?
257
+
258
+ **Dimension D - Same-Layer Consistency** (when modifying display logic):
259
+ - Search for other components using same concept
260
+ - Are displays consistent?
261
+ - Should they share configuration?
262
+
263
+ **WHY THIS MATTERS**:
264
+ - Without check-cross-layer: You fix one bug, but miss 5 related places. You create a utility that already exists. You change a constant but miss half the usages.
265
+ - With check-cross-layer: Systematic verification across all dimensions. No "didn't think of it" bugs.
266
+
267
+ **ANALOGY**: Like a pre-flight checklist for pilots. Not because pilots don't know how to fly, but because complex systems have many dimensions that are easy to overlook.
268
+
269
+ **RELATED DOCUMENTS** (referenced by this command):
270
+ - `workflow/structure/flows/pre-implementation-checklist.md` - Questions BEFORE coding
271
+ - `workflow/structure/flows/code-reuse-thinking-guide.md` - Pattern recognition
272
+ - `workflow/structure/flows/cross-layer-thinking-guide.md` - Data flow analysis
273
+
274
+ ---
275
+
161
276
  ### /finish-work - Holistic Pre-Commit Review
162
277
 
163
278
  **WHY IT EXISTS**:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mind-fold/open-flow",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "AI-assisted development workflow initializer for Cursor, Claude Code and more",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",