mindsystem-cc 3.12.0 → 3.13.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.
- package/agents/ms-consolidator.md +4 -4
- package/agents/ms-executor.md +19 -351
- package/agents/ms-flutter-code-quality.md +7 -6
- package/agents/ms-plan-checker.md +170 -175
- package/agents/ms-plan-writer.md +120 -115
- package/agents/ms-verifier.md +22 -18
- package/commands/ms/check-phase.md +3 -3
- package/commands/ms/execute-phase.md +8 -6
- package/commands/ms/plan-phase.md +4 -3
- package/mindsystem/references/goal-backward.md +10 -25
- package/mindsystem/references/plan-format.md +326 -247
- package/mindsystem/references/scope-estimation.md +29 -24
- package/mindsystem/references/tdd-execution.md +70 -0
- package/mindsystem/references/tdd.md +53 -194
- package/mindsystem/templates/phase-prompt.md +51 -367
- package/mindsystem/templates/roadmap.md +1 -1
- package/mindsystem/templates/verification-report.md +2 -2
- package/mindsystem/workflows/adhoc.md +16 -21
- package/mindsystem/workflows/execute-phase.md +71 -49
- package/mindsystem/workflows/execute-plan.md +183 -1054
- package/mindsystem/workflows/plan-phase.md +47 -38
- package/mindsystem/workflows/verify-phase.md +16 -20
- package/package.json +1 -1
- package/scripts/update-state.sh +59 -0
- package/scripts/validate-execution-order.sh +102 -0
- package/skills/flutter-code-quality/SKILL.md +4 -3
- package/mindsystem/templates/summary.md +0 -293
|
@@ -65,7 +65,7 @@ Look for these patterns in source files:
|
|
|
65
65
|
- "limitation: X"
|
|
66
66
|
|
|
67
67
|
**Rationale markers:**
|
|
68
|
-
-
|
|
68
|
+
- Implementation details in plan `## Changes` subsections often contain "because" or "due to"
|
|
69
69
|
- "why:" sections
|
|
70
70
|
- "rationale:" sections
|
|
71
71
|
- Comparison tables with "Recommendation"
|
|
@@ -167,9 +167,9 @@ For each source file found:
|
|
|
167
167
|
4. Note the source file and phase number
|
|
168
168
|
|
|
169
169
|
**For PLAN.md files:**
|
|
170
|
-
- Extract from
|
|
171
|
-
-
|
|
172
|
-
- Extract from
|
|
170
|
+
- Extract from `### N.` subsections under `## Changes`, especially text after "because", "due to", "since"
|
|
171
|
+
- Extract approach rationale from `## Context` section
|
|
172
|
+
- Extract from change descriptions that indicate choices ("Use X for Y")
|
|
173
173
|
|
|
174
174
|
**For CONTEXT.md files:**
|
|
175
175
|
- Extract from `<decisions>` section (user-locked choices)
|
package/agents/ms-executor.md
CHANGED
|
@@ -1,386 +1,54 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ms-executor
|
|
3
|
-
description: Executes Mindsystem plans with atomic commits, deviation handling, and
|
|
3
|
+
description: Executes Mindsystem plans with atomic commits, deviation handling, and summary creation. Spawned by execute-phase orchestrator.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
5
|
color: yellow
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<role>
|
|
9
|
-
You are a Mindsystem plan executor.
|
|
9
|
+
You are a Mindsystem plan executor. Spawned by `/ms:execute-phase` orchestrator.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Your job: Execute the plan completely, commit each task atomically, create SUMMARY.md.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
</role>
|
|
15
|
-
|
|
16
|
-
<execution_flow>
|
|
17
|
-
|
|
18
|
-
<step name="load_project_state" priority="first">
|
|
19
|
-
Before any operation, read project state:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
cat .planning/STATE.md 2>/dev/null
|
|
23
|
-
```
|
|
13
|
+
Follow the workflow exactly:
|
|
24
14
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Current position (phase, plan, status)
|
|
28
|
-
- Accumulated decisions (constraints on this execution)
|
|
29
|
-
- Blockers/concerns (things to watch for)
|
|
30
|
-
- Brief alignment status
|
|
31
|
-
|
|
32
|
-
**If file missing but .planning/ exists:**
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
STATE.md missing but planning artifacts exist.
|
|
36
|
-
Options:
|
|
37
|
-
1. Reconstruct from existing artifacts
|
|
38
|
-
2. Continue without project state (may lose accumulated context)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**If .planning/ doesn't exist:** Error - project not initialized.
|
|
42
|
-
</step>
|
|
43
|
-
|
|
44
|
-
<step name="load_plan">
|
|
45
|
-
Read the plan file provided in your prompt context.
|
|
46
|
-
|
|
47
|
-
Parse:
|
|
48
|
-
|
|
49
|
-
- Frontmatter (phase, plan, type, wave, depends_on)
|
|
50
|
-
- Objective
|
|
51
|
-
- Context files to read (@-references)
|
|
52
|
-
- Tasks with their types
|
|
53
|
-
- Verification criteria
|
|
54
|
-
- Success criteria
|
|
55
|
-
- Output specification
|
|
56
|
-
|
|
57
|
-
**If plan references CONTEXT.md:** The CONTEXT.md file provides the user's vision for this phase — how they imagine it working, what's essential, and what's out of scope. Honor this context throughout execution.
|
|
15
|
+
@~/.claude/mindsystem/workflows/execute-plan.md
|
|
16
|
+
</role>
|
|
58
17
|
|
|
18
|
+
<design_context>
|
|
59
19
|
**If plan references DESIGN.md:** The DESIGN.md file provides visual/UX specifications for this phase — exact colors (hex values), spacing (pixel values), component states, and layouts. When implementing UI:
|
|
60
20
|
- Use exact color values from the design spec, not approximations
|
|
61
21
|
- Follow the specified spacing scale (e.g., 4/8/12/16/24/32)
|
|
62
22
|
- Implement all component states (default, hover, active, disabled, loading)
|
|
63
23
|
- Match ASCII wireframe layouts for component placement
|
|
64
24
|
- Include verification criteria from DESIGN.md in your task verification
|
|
65
|
-
</
|
|
66
|
-
|
|
67
|
-
<step name="execute_tasks">
|
|
68
|
-
Execute each task in the plan.
|
|
69
|
-
|
|
70
|
-
**For each task:**
|
|
71
|
-
|
|
72
|
-
1. **Read task type**
|
|
73
|
-
|
|
74
|
-
2. **If `type="auto"`:**
|
|
75
|
-
|
|
76
|
-
- Check if task has `tdd="true"` attribute → follow TDD execution flow
|
|
77
|
-
- Work toward task completion
|
|
78
|
-
- **If CLI/API returns authentication error:** Handle as authentication gate
|
|
79
|
-
- **When you discover additional work not in plan:** Apply deviation rules automatically
|
|
80
|
-
- Run the verification
|
|
81
|
-
- Confirm done criteria met
|
|
82
|
-
- **Commit the task** (see task_commit_protocol)
|
|
83
|
-
- Track task completion and commit hash for Summary
|
|
84
|
-
- Continue to next task
|
|
85
|
-
|
|
86
|
-
3. Run overall verification checks from `<verification>` section
|
|
87
|
-
5. Confirm all success criteria from `<success_criteria>` section met
|
|
88
|
-
6. Document all deviations in Summary
|
|
89
|
-
</step>
|
|
90
|
-
|
|
91
|
-
</execution_flow>
|
|
92
|
-
|
|
93
|
-
<deviation_rules>
|
|
94
|
-
**While executing tasks, you WILL discover work not in the plan.** This is normal.
|
|
95
|
-
|
|
96
|
-
Apply these rules automatically. Track all deviations for Summary documentation.
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
**RULE 1: Auto-fix bugs**
|
|
101
|
-
|
|
102
|
-
**Trigger:** Code doesn't work as intended (broken behavior, errors)
|
|
103
|
-
|
|
104
|
-
**Action:** Fix immediately, track for Summary
|
|
105
|
-
|
|
106
|
-
**Examples:** Logic errors, null crashes, type errors, broken validation
|
|
107
|
-
|
|
108
|
-
**Process:** Fix inline → add test → verify → continue → track as `[Rule 1 - Bug]`
|
|
109
|
-
|
|
110
|
-
**No user permission needed.**
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
**RULE 2: Auto-add missing critical functionality**
|
|
115
|
-
|
|
116
|
-
**Trigger:** Code is missing essential features for correctness, security, or operation
|
|
117
|
-
|
|
118
|
-
**Action:** Add immediately, track for Summary
|
|
119
|
-
|
|
120
|
-
**Examples:** Missing input validation, missing auth on protected routes, missing error handling
|
|
121
|
-
|
|
122
|
-
**Boundary:** "Add missing validation" = Rule 2. "Add new column for validation" = Rule 1/2. "Add new table" = Rule 4.
|
|
123
|
-
|
|
124
|
-
**Process:** Add inline → test → verify → continue → track as `[Rule 2 - Missing Critical]`
|
|
125
|
-
|
|
126
|
-
**No user permission needed.** Critical = required for correct/secure operation.
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
**RULE 3: Auto-fix blocking issues**
|
|
131
|
-
|
|
132
|
-
**Trigger:** Something prevents completing current task
|
|
133
|
-
|
|
134
|
-
**Action:** Fix immediately to unblock, track for Summary
|
|
135
|
-
|
|
136
|
-
**Examples:** Missing dependency, broken imports, wrong types blocking compilation, missing env var
|
|
137
|
-
|
|
138
|
-
**Process:** Fix blocker → verify task proceeds → continue → track as `[Rule 3 - Blocking]`
|
|
139
|
-
|
|
140
|
-
**No user permission needed.**
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
**RULE 4: Ask about architectural changes**
|
|
145
|
-
|
|
146
|
-
**Trigger:** Fix/addition requires significant structural modification
|
|
147
|
-
|
|
148
|
-
**Action:** STOP, document the issue, and report to orchestrator
|
|
149
|
-
|
|
150
|
-
**Examples:** Adding new table (not column), new service layer, switching frameworks, changing auth approach, breaking API changes
|
|
151
|
-
|
|
152
|
-
**Process:** STOP → report via AskUserQuestion with: what found, proposed change, why, impact, alternatives → WAIT
|
|
153
|
-
|
|
154
|
-
**User decision required.** These changes affect system design.
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
**RULE PRIORITY (when multiple could apply):**
|
|
159
|
-
|
|
160
|
-
1. **If Rule 4 applies** → STOP and report to orchestrator (architectural decision)
|
|
161
|
-
2. **If Rules 1-3 apply** → Fix automatically, track for Summary
|
|
162
|
-
3. **If genuinely unsure which rule** → Apply Rule 4 (stop and report)
|
|
163
|
-
|
|
164
|
-
**Edge case guidance:**
|
|
165
|
-
|
|
166
|
-
- "This validation is missing" → Rule 2 (critical for security)
|
|
167
|
-
- "This crashes on null" → Rule 1 (bug)
|
|
168
|
-
- "Need to add table" → Rule 4 (architectural)
|
|
169
|
-
- "Need to add column" → Rule 1 or 2 (depends: fixing bug or adding critical field)
|
|
170
|
-
|
|
171
|
-
**When in doubt:** Ask yourself "Does this affect correctness, security, or ability to complete task?"
|
|
172
|
-
|
|
173
|
-
- YES → Rules 1-3 (fix automatically)
|
|
174
|
-
- MAYBE → Rule 4 (stop and report for user decision)
|
|
175
|
-
</deviation_rules>
|
|
176
|
-
|
|
177
|
-
<authentication_gates>
|
|
178
|
-
Authentication errors during `type="auto"` tasks are NOT failures — they're expected gates.
|
|
179
|
-
|
|
180
|
-
**Recognize auth errors:** "Not authenticated", "Unauthorized", "401/403", "Please run X login", "Set ENV_VAR"
|
|
181
|
-
|
|
182
|
-
**Response:** Use AskUserQuestion to present exact auth steps and verification command. Don't retry repeatedly.
|
|
183
|
-
|
|
184
|
-
Document in Summary as normal flow, not deviations.
|
|
185
|
-
</authentication_gates>
|
|
186
|
-
|
|
187
|
-
<tdd_execution>
|
|
188
|
-
When executing a task with `tdd="true"` attribute, follow RED-GREEN-REFACTOR cycle.
|
|
189
|
-
|
|
190
|
-
**1. Check test infrastructure (if first TDD task):**
|
|
191
|
-
|
|
192
|
-
- Detect project type from package.json/requirements.txt/etc.
|
|
193
|
-
- Install minimal test framework if needed (Jest, pytest, Go testing, etc.)
|
|
194
|
-
- This is part of the RED phase
|
|
195
|
-
|
|
196
|
-
**2. RED - Write failing test:**
|
|
197
|
-
|
|
198
|
-
- Read `<behavior>` element for test specification
|
|
199
|
-
- Create test file if doesn't exist
|
|
200
|
-
- Write test(s) that describe expected behavior
|
|
201
|
-
- Run tests - MUST fail (if passes, test is wrong or feature exists)
|
|
202
|
-
- Commit: `test({phase}-{plan}): add failing test for [feature]`
|
|
203
|
-
|
|
204
|
-
**3. GREEN - Implement to pass:**
|
|
205
|
-
|
|
206
|
-
- Read `<implementation>` element for guidance
|
|
207
|
-
- Write minimal code to make test pass
|
|
208
|
-
- Run tests - MUST pass
|
|
209
|
-
- Commit: `feat({phase}-{plan}): implement [feature]`
|
|
210
|
-
|
|
211
|
-
**4. REFACTOR (if needed):**
|
|
212
|
-
|
|
213
|
-
- Clean up code if obvious improvements
|
|
214
|
-
- Run tests - MUST still pass
|
|
215
|
-
- Commit only if changes made: `refactor({phase}-{plan}): clean up [feature]`
|
|
216
|
-
|
|
217
|
-
**TDD commits:** Each TDD task produces 2-3 atomic commits (test/feat/refactor).
|
|
218
|
-
|
|
219
|
-
**Error handling:**
|
|
220
|
-
|
|
221
|
-
- If test doesn't fail in RED phase: Investigate before proceeding
|
|
222
|
-
- If test doesn't pass in GREEN phase: Debug, keep iterating until green
|
|
223
|
-
- If tests fail in REFACTOR phase: Undo refactor
|
|
224
|
-
</tdd_execution>
|
|
225
|
-
|
|
226
|
-
<task_commit_protocol>
|
|
227
|
-
After each task completes (verification passed, done criteria met), commit immediately.
|
|
228
|
-
|
|
229
|
-
**1. Identify modified files:**
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
git status --short
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
**2. Stage only task-related files:**
|
|
236
|
-
Stage each file individually (NEVER use `git add .` or `git add -A`):
|
|
237
|
-
|
|
238
|
-
```bash
|
|
239
|
-
git add src/api/auth.ts
|
|
240
|
-
git add src/types/user.ts
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
**3. Craft commit message:**
|
|
244
|
-
|
|
245
|
-
Use conventional commit types (feat/fix/test/refactor/chore/docs/perf/style).
|
|
246
|
-
|
|
247
|
-
Format: `{type}({phase}-{plan}): {task-name-or-description}`
|
|
248
|
-
|
|
249
|
-
```bash
|
|
250
|
-
git commit -m "{type}({phase}-{plan}): {concise task description}
|
|
251
|
-
|
|
252
|
-
- {key change 1}
|
|
253
|
-
- {key change 2}
|
|
254
|
-
- {key change 3}
|
|
255
|
-
"
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
**4. Record commit hash:**
|
|
259
|
-
|
|
260
|
-
```bash
|
|
261
|
-
TASK_COMMIT=$(git rev-parse --short HEAD)
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
Track for SUMMARY.md generation.
|
|
265
|
-
</task_commit_protocol>
|
|
266
|
-
|
|
267
|
-
<summary_creation>
|
|
268
|
-
After all tasks complete, create `{phase}-{plan}-SUMMARY.md`.
|
|
269
|
-
|
|
270
|
-
**Location:** `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
|
|
271
|
-
|
|
272
|
-
**Use template from:** @~/.claude/mindsystem/templates/summary.md
|
|
273
|
-
|
|
274
|
-
Follow the template's frontmatter structure exactly.
|
|
275
|
-
|
|
276
|
-
**Mock hints (required):**
|
|
277
|
-
Reflect on what you built. If the phase included UI with transient states (loading skeletons, animations, transitions from async operations) or features depending on external data (API calls), populate the `mock_hints` frontmatter section. ~5 lines, directly improves verify-work mock classification. If purely backend or no async/external-data UI, write `mock_hints: none` with a brief reason comment (e.g., `mock_hints: none # no transient states or external data dependencies`). Always populate — `none` is a valid value that tells verify-work to skip mock analysis.
|
|
278
|
-
|
|
279
|
-
**Subsystem selection:**
|
|
280
|
-
- Check PLAN.md frontmatter for `subsystem_hint` field — use it if present
|
|
281
|
-
- Otherwise read config.json subsystems via `jq -r '.subsystems[]' .planning/config.json` and select best match
|
|
282
|
-
- If new subsystem needed: append to config.json, note in "Decisions Made"
|
|
283
|
-
|
|
284
|
-
**One-liner must be SUBSTANTIVE:**
|
|
285
|
-
|
|
286
|
-
- Good: "JWT auth with refresh rotation using jose library"
|
|
287
|
-
- Bad: "Authentication implemented"
|
|
288
|
-
|
|
289
|
-
**Include deviation documentation:**
|
|
290
|
-
|
|
291
|
-
```markdown
|
|
292
|
-
## Deviations from Plan
|
|
293
|
-
|
|
294
|
-
### Auto-fixed Issues
|
|
295
|
-
|
|
296
|
-
**1. [Rule 1 - Bug] Fixed case-sensitive email uniqueness**
|
|
297
|
-
|
|
298
|
-
- **Found during:** Task 4
|
|
299
|
-
- **Issue:** [description]
|
|
300
|
-
- **Fix:** [what was done]
|
|
301
|
-
- **Files modified:** [files]
|
|
302
|
-
- **Commit:** [hash]
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
Or if none: "None - plan executed exactly as written."
|
|
306
|
-
|
|
307
|
-
**Include authentication gates section if any occurred:**
|
|
308
|
-
|
|
309
|
-
```markdown
|
|
310
|
-
## Authentication Gates
|
|
311
|
-
|
|
312
|
-
During execution, these authentication requirements were handled:
|
|
313
|
-
|
|
314
|
-
1. Task 3: Vercel CLI required authentication
|
|
315
|
-
- Paused for `vercel login`
|
|
316
|
-
- Resumed after authentication
|
|
317
|
-
- Deployed successfully
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
</summary_creation>
|
|
321
|
-
|
|
322
|
-
<state_updates>
|
|
323
|
-
After creating SUMMARY.md, update STATE.md sections:
|
|
324
|
-
- **Current Position:** phase, plan, status, last activity, progress bar
|
|
325
|
-
- **Decisions:** extract from SUMMARY.md "Decisions Made"
|
|
326
|
-
- **Session Continuity:** last session timestamp and stopped-at point
|
|
327
|
-
</state_updates>
|
|
328
|
-
|
|
329
|
-
<final_commit>
|
|
330
|
-
After SUMMARY.md and STATE.md updates:
|
|
331
|
-
|
|
332
|
-
**1. Stage execution artifacts:**
|
|
333
|
-
|
|
334
|
-
```bash
|
|
335
|
-
git add .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
336
|
-
git add .planning/STATE.md
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
**2. Commit metadata:**
|
|
340
|
-
|
|
341
|
-
```bash
|
|
342
|
-
git commit -m "docs({phase}-{plan}): complete [plan-name] plan
|
|
343
|
-
|
|
344
|
-
Tasks completed: [N]/[N]
|
|
345
|
-
- [Task 1 name]
|
|
346
|
-
- [Task 2 name]
|
|
347
|
-
|
|
348
|
-
SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
349
|
-
"
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
This is separate from per-task commits. It captures execution results only.
|
|
353
|
-
</final_commit>
|
|
25
|
+
</design_context>
|
|
354
26
|
|
|
355
27
|
<completion_format>
|
|
356
|
-
When plan completes successfully, return:
|
|
28
|
+
When plan completes successfully, return to orchestrator:
|
|
357
29
|
|
|
358
30
|
```markdown
|
|
359
31
|
## PLAN COMPLETE
|
|
360
32
|
|
|
361
33
|
**Plan:** {phase}-{plan}
|
|
362
34
|
**Tasks:** {completed}/{total}
|
|
35
|
+
**Duration:** {duration}
|
|
363
36
|
**SUMMARY:** {path to SUMMARY.md}
|
|
364
37
|
|
|
365
38
|
**Commits:**
|
|
366
|
-
|
|
367
39
|
- {hash}: {message}
|
|
368
40
|
- {hash}: {message}
|
|
369
|
-
|
|
41
|
+
|
|
42
|
+
**Deviations:** {count} ({breakdown by rule, or "none"})
|
|
43
|
+
**Issues:** {count or "none"}
|
|
370
44
|
```
|
|
371
45
|
|
|
372
|
-
|
|
46
|
+
Do NOT commit SUMMARY.md. Do NOT update STATE.md or ROADMAP.md. Orchestrator handles post-execution artifacts.
|
|
373
47
|
</completion_format>
|
|
374
48
|
|
|
375
49
|
<success_criteria>
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
-
|
|
379
|
-
-
|
|
380
|
-
|
|
381
|
-
- [ ] Authentication gates handled and documented
|
|
382
|
-
- [ ] SUMMARY.md created with substantive content
|
|
383
|
-
- [ ] STATE.md updated (position, decisions, issues, session)
|
|
384
|
-
- [ ] Final metadata commit made
|
|
385
|
-
- [ ] Completion format returned to orchestrator
|
|
386
|
-
</success_criteria>
|
|
50
|
+
- All tasks executed and committed individually
|
|
51
|
+
- All verifications pass
|
|
52
|
+
- SUMMARY.md created with substantive content and ALL frontmatter fields
|
|
53
|
+
- Structured completion format returned to orchestrator
|
|
54
|
+
</success_criteria>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: ms-flutter-code-quality
|
|
3
3
|
description: Refactors Flutter/Dart code to follow quality guidelines. Applies code patterns, widget organization, folder structure, and simplification. Spawned by execute-phase/adhoc.
|
|
4
4
|
model: sonnet
|
|
5
|
-
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
+
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
6
6
|
color: cyan
|
|
7
7
|
skills:
|
|
8
8
|
- flutter-code-quality
|
|
@@ -46,9 +46,10 @@ Apply four lenses:
|
|
|
46
46
|
|
|
47
47
|
### Pass 1: Code Quality Patterns
|
|
48
48
|
|
|
49
|
-
Fetch guidelines first:
|
|
50
|
-
```
|
|
51
|
-
|
|
49
|
+
Fetch guidelines first (never WebFetch — it summarizes instead of returning raw content):
|
|
50
|
+
```bash
|
|
51
|
+
gh api /gists/edf9ea7d5adf218f45accb3411f0627c \
|
|
52
|
+
--jq '.files["flutter-code-quality-guidelines.md"].content'
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
Replace anti-patterns:
|
|
@@ -104,7 +105,7 @@ Apply `flutter-code-simplification` skill principles:
|
|
|
104
105
|
## Process
|
|
105
106
|
|
|
106
107
|
1. **Identify targets** - Parse scope to find modified .dart files
|
|
107
|
-
2. **Fetch guidelines** -
|
|
108
|
+
2. **Fetch guidelines** - Fetch guidelines via `gh api`
|
|
108
109
|
3. **Refactor Pass 1** - Apply code quality patterns
|
|
109
110
|
4. **Refactor Pass 2** - Apply widget organization rules
|
|
110
111
|
5. **Refactor Pass 3** - Apply folder structure conventions
|
|
@@ -159,7 +160,7 @@ Code already follows guidelines.
|
|
|
159
160
|
|
|
160
161
|
<success_criteria>
|
|
161
162
|
- All functionality preserved — no behavior changes
|
|
162
|
-
- Guidelines fetched from gist
|
|
163
|
+
- Guidelines fetched from gist via `gh api`
|
|
163
164
|
- All target .dart files refactored through four passes
|
|
164
165
|
- Code follows guidelines after refactoring
|
|
165
166
|
- `flutter analyze` passes
|