the-frame-ai 0.11.1 → 0.11.3
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/package.json +1 -1
- package/src/update.js +4 -6
- package/templates/commands/frame:perf-fix.md +24 -42
package/package.json
CHANGED
package/src/update.js
CHANGED
|
@@ -53,13 +53,11 @@ export async function update(target, flags = {}) {
|
|
|
53
53
|
|
|
54
54
|
// Ask frontend question early, before file operations
|
|
55
55
|
let frontendDecided = config.frontend === true;
|
|
56
|
-
if (
|
|
56
|
+
if (config.frontend === undefined && !flags.yes) {
|
|
57
57
|
const frontend = await promptFrontend(false);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
writeFileSync(join(target, '.frame', 'config.json'), JSON.stringify(config, null, 2), 'utf-8');
|
|
62
|
-
}
|
|
58
|
+
config.frontend = frontend;
|
|
59
|
+
frontendDecided = frontend;
|
|
60
|
+
writeFileSync(join(target, '.frame', 'config.json'), JSON.stringify(config, null, 2), 'utf-8');
|
|
63
61
|
}
|
|
64
62
|
|
|
65
63
|
let updated = 0;
|
|
@@ -37,64 +37,46 @@ Parse issues based on `$ARGUMENTS`:
|
|
|
37
37
|
|
|
38
38
|
Output: "Found {N} issues to fix: {list of IDs and titles}."
|
|
39
39
|
|
|
40
|
-
### Step 2:
|
|
40
|
+
### Step 2: Group Issues into Waves
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Before applying any fixes, analyze all issues and group them into waves:
|
|
43
43
|
|
|
44
|
-
1
|
|
45
|
-
2
|
|
46
|
-
|
|
44
|
+
- **Wave 1**: issues in different files with no shared dependencies — apply all in this wave
|
|
45
|
+
- **Wave 2**: issues that depend on Wave 1 changes (same module, shared types, etc.)
|
|
46
|
+
- **Wave N**: remaining issues
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Output:
|
|
49
|
+
```
|
|
50
|
+
Wave 1 ({N} issues — independent): PERF-1, PERF-3, PERF-5
|
|
51
|
+
Wave 2 ({N} issues — depend on wave 1): PERF-2, PERF-4
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Step 3: Apply Wave by Wave
|
|
55
|
+
|
|
56
|
+
For each wave:
|
|
49
57
|
|
|
58
|
+
1. Apply all fixes in the wave (read file → apply change for each issue)
|
|
59
|
+
2. Output before each fix:
|
|
50
60
|
```
|
|
51
61
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
52
62
|
[PERF-1] {title}
|
|
53
63
|
File: path/file.ts:42
|
|
54
|
-
|
|
55
|
-
Impact: {impact from report}
|
|
56
|
-
|
|
57
|
-
Proposed fix:
|
|
58
|
-
{description of what will change — 2-3 sentences}
|
|
59
|
-
|
|
60
|
-
--- BEFORE ---
|
|
61
|
-
{relevant code snippet}
|
|
62
|
-
|
|
63
|
-
--- AFTER ---
|
|
64
|
-
{fixed code snippet}
|
|
64
|
+
Applying: {1 sentence}
|
|
65
65
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
66
|
-
Apply this fix? [y/n/skip]
|
|
67
66
|
```
|
|
68
|
-
|
|
69
|
-
Wait for user confirmation before applying.
|
|
70
|
-
|
|
71
|
-
- `y` → apply the fix, mark as done
|
|
72
|
-
- `n` → stop entirely
|
|
73
|
-
- `skip` → skip this issue, move to next
|
|
74
|
-
|
|
75
|
-
### Step 3: Apply Fix
|
|
76
|
-
|
|
77
|
-
After confirmation:
|
|
78
|
-
|
|
79
|
-
1. Apply the code change to the file
|
|
80
|
-
2. Run type check if available:
|
|
67
|
+
3. After all fixes in the wave, run typecheck + tests once:
|
|
81
68
|
```bash
|
|
82
69
|
{quality.commands.typecheck} 2>&1 | tail -10
|
|
83
|
-
```
|
|
84
|
-
3. Run tests if available:
|
|
85
|
-
```bash
|
|
86
70
|
{quality.commands.test} 2>&1 | tail -20
|
|
87
71
|
```
|
|
88
72
|
|
|
89
|
-
If typecheck or tests fail → revert
|
|
90
|
-
|
|
91
|
-
Output: "✓ [PERF-1] fixed. {brief description of what changed}."
|
|
73
|
+
If typecheck or tests fail → revert all fixes from this wave, report what broke, ask user how to proceed. Then continue to next wave.
|
|
92
74
|
|
|
93
|
-
|
|
75
|
+
Output after wave: "✓ Wave {N} complete: {list of fixed IDs}."
|
|
94
76
|
|
|
95
|
-
|
|
77
|
+
### Step 4: Summary
|
|
96
78
|
|
|
97
|
-
After all
|
|
79
|
+
After all waves processed, output summary:
|
|
98
80
|
```
|
|
99
81
|
Performance fixes complete.
|
|
100
82
|
Fixed: {N} | Skipped: {N}
|
|
@@ -122,8 +104,8 @@ Update `.planning/STATE.md`:
|
|
|
122
104
|
|
|
123
105
|
## Rules
|
|
124
106
|
|
|
125
|
-
- **ALWAYS show
|
|
126
|
-
- **
|
|
107
|
+
- **ALWAYS show what's being fixed** before applying (issue ID, file, one-line description)
|
|
108
|
+
- **NEVER ask confirmation** — apply all found issues automatically
|
|
127
109
|
- **ALWAYS run typecheck + tests** after each fix
|
|
128
110
|
- **REVERT on failure** — if tests break, undo the change immediately
|
|
129
111
|
- **NEVER fix test files** — only production code
|