@mind-fold/open-flow 0.2.11 → 0.2.13
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.
- package/dist/templates/commands/break-loop.txt +1 -1
- package/dist/templates/commands/check-cross-layer.txt +3 -3
- package/dist/templates/commands/create-command.txt +5 -5
- package/dist/templates/commands/extract-llm-docs.txt +18 -18
- package/dist/templates/commands/extract-to-rules.txt +38 -38
- package/dist/templates/commands/finish-work.txt +5 -5
- package/dist/templates/commands/generate-backend-structure.txt +27 -27
- package/dist/templates/commands/generate-frontend-structure.txt +15 -15
- package/dist/templates/commands/integrate-skill.txt +30 -30
- package/dist/templates/commands/onboard-developer.txt +257 -416
- package/dist/templates/commands/record-agent-flow.txt +4 -4
- package/dist/templates/commands/sync-from-runtime.txt +2 -2
- package/dist/templates/markdown/agent-progress-index.md.txt +9 -9
- package/dist/templates/markdown/backend-doc.md.txt +12 -12
- package/dist/templates/markdown/flow.md.txt +99 -99
- package/dist/templates/markdown/frontend-doc.md.txt +11 -11
- package/dist/templates/markdown/structure/backend/database-guidelines.md.txt +6 -6
- package/dist/templates/markdown/structure/backend/directory-structure.md.txt +28 -28
- package/dist/templates/markdown/structure/backend/index.md.txt +10 -10
- package/dist/templates/markdown/structure/backend/logging-guidelines.md.txt +4 -4
- package/dist/templates/markdown/structure/backend/quality-guidelines.md.txt +12 -12
- package/dist/templates/markdown/structure/backend/type-safety.md.txt +6 -6
- package/dist/templates/markdown/structure/flows/code-reuse-thinking-guide.md.txt +17 -17
- package/dist/templates/markdown/structure/flows/cross-layer-thinking-guide.md.txt +96 -96
- package/dist/templates/markdown/structure/flows/index.md.txt +31 -31
- package/dist/templates/markdown/structure/flows/pre-implementation-checklist.md.txt +19 -19
- package/dist/templates/markdown/structure/flows/spec-flow-template.md.txt +20 -20
- package/dist/templates/markdown/structure/frontend/component-guidelines.md.txt +12 -12
- package/dist/templates/markdown/structure/frontend/directory-structure.md.txt +61 -61
- package/dist/templates/markdown/structure/frontend/hook-guidelines.md.txt +5 -5
- package/dist/templates/markdown/structure/frontend/index.md.txt +13 -13
- package/dist/templates/markdown/structure/frontend/quality-guidelines.md.txt +21 -21
- package/dist/templates/markdown/structure/frontend/state-management.md.txt +12 -12
- package/dist/templates/markdown/structure/frontend/type-safety.md.txt +11 -11
- package/dist/templates/scripts/add-session.sh.txt +5 -5
- package/dist/templates/scripts/extract-md-headings.sh.txt +3 -3
- package/dist/templates/scripts/get-context.sh.txt +1 -1
- package/dist/templates/scripts/init-developer.sh.txt +1 -1
- package/dist/templates/scripts/update-index.sh.txt +2 -2
- package/package.json +1 -1
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
Never redefine types that exist in your API layer.
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
//
|
|
21
|
+
// [OK] GOOD: Import from API package
|
|
22
22
|
import type { User, CreateUserInput } from '@/api/types';
|
|
23
23
|
|
|
24
24
|
function UserForm({ onSubmit }: { onSubmit: (data: CreateUserInput) => void }) {
|
|
25
25
|
// ...
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
//
|
|
28
|
+
// [X] BAD: Redefining types
|
|
29
29
|
interface User {
|
|
30
30
|
id: string;
|
|
31
31
|
name: string;
|
|
@@ -49,24 +49,24 @@ Let TypeScript infer types when it can.
|
|
|
49
49
|
### State
|
|
50
50
|
|
|
51
51
|
```typescript
|
|
52
|
-
//
|
|
52
|
+
// [OK] GOOD: Inferred type
|
|
53
53
|
const [count, setCount] = useState(0); // number
|
|
54
54
|
const [name, setName] = useState(''); // string
|
|
55
55
|
const [user, setUser] = useState<User | null>(null); // explicit when needed
|
|
56
56
|
|
|
57
|
-
//
|
|
57
|
+
// [X] BAD: Redundant type annotation
|
|
58
58
|
const [count, setCount] = useState<number>(0);
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
### Functions
|
|
62
62
|
|
|
63
63
|
```typescript
|
|
64
|
-
//
|
|
64
|
+
// [OK] GOOD: Inferred return type
|
|
65
65
|
function formatDate(date: Date) {
|
|
66
66
|
return date.toISOString(); // returns string
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
//
|
|
69
|
+
// [OK] GOOD: Explicit when complex
|
|
70
70
|
function getUser(id: string): Promise<User | null> {
|
|
71
71
|
return api.users.get(id);
|
|
72
72
|
}
|
|
@@ -75,7 +75,7 @@ function getUser(id: string): Promise<User | null> {
|
|
|
75
75
|
### Props
|
|
76
76
|
|
|
77
77
|
```typescript
|
|
78
|
-
//
|
|
78
|
+
// [OK] GOOD: Props interface
|
|
79
79
|
interface ButtonProps {
|
|
80
80
|
children: React.ReactNode;
|
|
81
81
|
onClick: () => void;
|
|
@@ -94,7 +94,7 @@ function Button({ children, onClick, disabled }: ButtonProps) {
|
|
|
94
94
|
### Null Checks
|
|
95
95
|
|
|
96
96
|
```typescript
|
|
97
|
-
//
|
|
97
|
+
// [OK] GOOD: Explicit null check
|
|
98
98
|
function UserProfile({ userId }: { userId: string }) {
|
|
99
99
|
const { data: user } = useUser(userId);
|
|
100
100
|
|
|
@@ -110,17 +110,17 @@ function UserProfile({ userId }: { userId: string }) {
|
|
|
110
110
|
### Optional Chaining
|
|
111
111
|
|
|
112
112
|
```typescript
|
|
113
|
-
//
|
|
113
|
+
// [OK] GOOD: Optional chaining for nested access
|
|
114
114
|
const userName = user?.profile?.name ?? 'Anonymous';
|
|
115
115
|
|
|
116
|
-
//
|
|
116
|
+
// [X] BAD: Non-null assertion
|
|
117
117
|
const userName = user!.profile!.name;
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
### Default Values
|
|
121
121
|
|
|
122
122
|
```typescript
|
|
123
|
-
//
|
|
123
|
+
// [OK] GOOD: Default values with nullish coalescing
|
|
124
124
|
const displayName = user.nickname ?? user.name ?? 'Unknown';
|
|
125
125
|
const items = response.data ?? [];
|
|
126
126
|
```
|
|
@@ -117,11 +117,11 @@ $commit_table
|
|
|
117
117
|
|
|
118
118
|
### Testing
|
|
119
119
|
|
|
120
|
-
-
|
|
120
|
+
- [OK] (Add test results)
|
|
121
121
|
|
|
122
122
|
### Status
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
[OK] **Completed**
|
|
125
125
|
|
|
126
126
|
### Next Steps
|
|
127
127
|
|
|
@@ -201,13 +201,13 @@ add_session() {
|
|
|
201
201
|
|
|
202
202
|
if [[ $((current_lines + content_lines)) -gt $MAX_LINES ]]; then
|
|
203
203
|
target_num=$((current_num + 1))
|
|
204
|
-
echo "
|
|
204
|
+
echo "[!] Exceeds $MAX_LINES lines, creating progress-$target_num.md" >&2
|
|
205
205
|
target_file=$(create_new_progress_file "$target_num")
|
|
206
206
|
echo "Created: $target_file" >&2
|
|
207
207
|
fi
|
|
208
208
|
|
|
209
209
|
echo "$session_content" >> "$target_file"
|
|
210
|
-
echo "
|
|
210
|
+
echo "[OK] Appended session to $(basename "$target_file")" >&2
|
|
211
211
|
|
|
212
212
|
echo "" >&2
|
|
213
213
|
echo "Updating index.md..." >&2
|
|
@@ -220,7 +220,7 @@ add_session() {
|
|
|
220
220
|
|
|
221
221
|
echo "" >&2
|
|
222
222
|
echo "========================================" >&2
|
|
223
|
-
echo "
|
|
223
|
+
echo "[OK] Session $new_session added successfully!" >&2
|
|
224
224
|
echo "========================================" >&2
|
|
225
225
|
echo "" >&2
|
|
226
226
|
echo "Files updated:" >&2
|
|
@@ -46,7 +46,7 @@ SHOW_RANGE=false
|
|
|
46
46
|
|
|
47
47
|
# Show help
|
|
48
48
|
show_help() {
|
|
49
|
-
echo "
|
|
49
|
+
echo "# Markdown Heading Line Number Extraction Tool"
|
|
50
50
|
echo ""
|
|
51
51
|
echo "Purpose: Auto-extract headings and line numbers from markdown files"
|
|
52
52
|
echo ""
|
|
@@ -195,7 +195,7 @@ fi
|
|
|
195
195
|
# Output based on format
|
|
196
196
|
case $FORMAT in
|
|
197
197
|
table)
|
|
198
|
-
echo -e "${GREEN}
|
|
198
|
+
echo -e "${GREEN}# Heading List${NC}"
|
|
199
199
|
echo -e "${CYAN}File: $MD_FILE${NC}"
|
|
200
200
|
echo ""
|
|
201
201
|
printf "%-8s %-12s %-12s %s\n" "Level" "Line" "Range" "Title"
|
|
@@ -212,7 +212,7 @@ case $FORMAT in
|
|
|
212
212
|
;;
|
|
213
213
|
|
|
214
214
|
list)
|
|
215
|
-
echo -e "${GREEN}
|
|
215
|
+
echo -e "${GREEN}# Heading List${NC}"
|
|
216
216
|
echo -e "${CYAN}File: $MD_FILE${NC}"
|
|
217
217
|
echo ""
|
|
218
218
|
echo "$HEADINGS" | while IFS='|' read -r level line end_line title; do
|
|
@@ -209,7 +209,7 @@ output_text() {
|
|
|
209
209
|
echo "Active file: $relative"
|
|
210
210
|
echo "Line count: $lines / 2000"
|
|
211
211
|
if [[ "$lines" -gt 1800 ]]; then
|
|
212
|
-
echo "
|
|
212
|
+
echo "[!] WARNING: Approaching 2000 line limit!"
|
|
213
213
|
fi
|
|
214
214
|
else
|
|
215
215
|
echo "No progress file found"
|
|
@@ -108,7 +108,7 @@ Initial setup
|
|
|
108
108
|
---
|
|
109
109
|
EOF
|
|
110
110
|
|
|
111
|
-
echo "
|
|
111
|
+
echo "[OK] Developer identity initialized: $DEVELOPER_NAME"
|
|
112
112
|
echo " Progress directory: $PROGRESS_DIR"
|
|
113
113
|
echo " Features directory: $FEATURES_DIR"
|
|
114
114
|
|
|
@@ -203,10 +203,10 @@ add_session() {
|
|
|
203
203
|
|
|
204
204
|
mv "$tmp_file" "$INDEX_FILE"
|
|
205
205
|
|
|
206
|
-
echo "
|
|
206
|
+
echo "[OK] Updated index.md successfully!"
|
|
207
207
|
echo ""
|
|
208
208
|
echo "Changes:"
|
|
209
|
-
echo " - Total Sessions: $current_session
|
|
209
|
+
echo " - Total Sessions: $current_session -> $new_session"
|
|
210
210
|
echo " - Last Active: $TODAY"
|
|
211
211
|
echo " - New session row added to history"
|
|
212
212
|
}
|