@gobing-ai/spur 0.3.78 → 0.3.81
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/.claude-plugin/marketplace.json +1 -1
- package/config/config.example.yaml +29 -18
- package/config/config.global.yaml +10 -11
- package/config/pipeline-budgets.json +34 -2
- package/config/plugin-scripts.json +25 -0
- package/config/rules/boundary/config-loading-ownership.yaml +0 -3
- package/config/rules/boundary/dao-boundary.yaml +4 -17
- package/config/rules/boundary/planning-folder-hardcode.yaml +0 -1
- package/config/rules/boundary/sp-no-vendor-refs.yaml +3 -2
- package/config/rules/boundary/sp-runtime-path.yaml +3 -14
- package/config/rules/quality/coverage-gate.yaml +3 -14
- package/config/rules/quality/tsdoc-exports.yaml +4 -7
- package/config/rules/strict/http-boundaries.yaml +5 -8
- package/config/rules/strict/runtime-boundaries.yaml +1 -5
- package/config/rules/structure/protected-files.yaml +9 -3
- package/config/rules/structure/test-focus-skip.yaml +0 -2
- package/config/rules/structure/test-location.yaml +0 -5
- package/config/rules/surface/check-cli-surface.yaml +3 -2
- package/config/rules/typescript/bun-tooling.yaml +5 -7
- package/config/rules/typescript/guarded-happy-dom-register.yaml +0 -2
- package/config/rules/typescript/happy-dom-teardown.yaml +0 -2
- package/config/rules/typescript/no-biome-suppressions.yaml +0 -2
- package/config/rules/typescript/no-debugger.yaml +0 -2
- package/config/rules/typescript/no-eslint-suppressions.yaml +0 -4
- package/config/rules/typescript/no-leaky-module-mocks.yaml +6 -13
- package/config/rules/typescript/no-module-scope-import-calls.yaml +0 -2
- package/config/rules/typescript/no-syscall-emulation-in-boundary-mock.yaml +0 -3
- package/config/rules/typescript/no-unmocked-module-eval-side-effects.yaml +0 -3
- package/config/rules/typescript/output-boundaries.yaml +0 -3
- package/config/rules/typescript/prefer-accessible-role-for-button-queries.yaml +0 -3
- package/config/rules/ui/ui-import-boundary.yaml +1 -5
- package/config/templates/AGENTS.md +26 -23
- package/config/templates/docs/00_ADR.md +13 -23
- package/config/templates/docs/01_PRD.md +5 -2
- package/config/templates/docs/02_ROADMAP.md +9 -13
- package/config/templates/docs/03_ARCHITECTURE.md +2 -2
- package/config/templates/docs/04_DESIGN.md +12 -31
- package/config/templates/docs/05_FEATURES.md +6 -18
- package/config/templates/docs/99_PROJECT_CONSTITUTION.md +162 -394
- package/config/transition-shims.json +7 -7
- package/config/workflows/basic.yaml +4 -0
- package/config/workflows/docs-pipeline.yaml +13 -14
- package/config/workflows/feature-dev.yaml +20 -65
- package/config/workflows/history-anatomy.yaml +22 -1
- package/config/workflows/idea-pipeline.yaml +53 -97
- package/config/workflows/pr-review.yaml +21 -33
- package/config/workflows/task-pipeline.yaml +87 -330
- package/config/workflows/wayfinder-resolution.yaml +12 -26
- package/config/workflows/wrapup-pipeline.yaml +48 -189
- package/package.json +9 -9
- package/plugins/sp/README.md +22 -8
- package/plugins/sp/agents/expert-spur.md +41 -19
- package/plugins/sp/agents/super-reviewer.md +43 -8
- package/plugins/sp/lib/idea-handoff.generated.d.mts +17 -0
- package/plugins/sp/lib/idea-handoff.generated.mjs +1301 -0
- package/plugins/sp/plugin.json +1 -1
- package/plugins/sp/scripts/feature-dev-precheck.mjs +146 -0
- package/plugins/sp/scripts/feature-dev-precheck.ts +238 -0
- package/plugins/sp/scripts/idea-handoff.mjs +27 -0
- package/plugins/sp/scripts/idea-handoff.ts +44 -0
- package/plugins/sp/scripts/quality-gate.mjs +165 -0
- package/plugins/sp/scripts/quality-gate.ts +217 -0
- package/plugins/sp/scripts/verify-answer-lint.ts +21 -3
- package/plugins/sp/scripts/workflow-step-profile.mjs +319 -0
- package/plugins/sp/scripts/workflow-step-profile.ts +456 -0
- package/plugins/sp/scripts/wrapup-steps.mjs +350 -0
- package/plugins/sp/scripts/wrapup-steps.ts +466 -0
- package/plugins/sp/skills/conflict-finding/SKILL.md +6 -0
- package/plugins/sp/skills/daily-summary/SKILL.md +1 -1
- package/plugins/sp/skills/doc-evolve/SKILL.md +26 -40
- package/plugins/sp/skills/doc-evolve/references/operations.md +17 -30
- package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +1 -1
- package/plugins/sp/skills/spec-decomposition/references/decomposition.md +29 -0
- package/plugins/sp/skills/spur-cli/references/agent.md +56 -14
- package/plugins/sp/skills/spur-cli/references/message.md +30 -3
- package/plugins/sp/skills/spur-cli/references/projects.md +45 -1
- package/plugins/sp/skills/spur-cli/references/self.md +5 -4
- package/plugins/sp/skills/spur-cli/references/serve.md +5 -4
- package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +17 -1
- package/plugins/sp/skills/spur-cli/references/tasks.md +32 -2
- package/plugins/sp/skills/spur-cli/references/team.md +21 -1
- package/plugins/sp/skills/spur-cli/references/workflows/operations.md +6 -3
- package/plugins/sp/skills/spur-cli/references/workflows/workflow-fit-and-tuning.md +57 -18
- package/plugins/sp/skills/spur-composer/SKILL.md +145 -0
- package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +14 -0
- package/plugins/sp/skills/spur-dev/references/cross-cutting.md +3 -3
- package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +12 -0
- package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +46 -4
- package/plugins/sp/skills/spur-dev/references/planning-workflow.md +24 -0
- package/plugins/sp/skills/spur-doctor/SKILL.md +138 -0
- package/plugins/sp/skills/taste-refactoring-api/README.md +43 -0
- package/plugins/sp/skills/taste-refactoring-api/SKILL.md +334 -0
- package/plugins/sp/skills/taste-refactoring-api/checklists/daily-api-review.md +71 -0
- package/plugins/sp/skills/taste-refactoring-api/examples/refactor-example.md +72 -0
- package/plugins/sp/skills/taste-refactoring-api/examples/review-template.md +93 -0
- package/plugins/sp/skills/taste-refactoring-api/references/api-refactoring-playbook.md +253 -0
- package/plugins/sp/skills/taste-refactoring-api/references/protocol-modes.md +79 -0
- package/plugins/sp/skills/taste-refactoring-api/references/research-basis.md +58 -0
- package/plugins/sp/skills/taste-refactoring-architect/README.md +26 -0
- package/plugins/sp/skills/taste-refactoring-architect/SKILL.md +471 -0
- package/plugins/sp/skills/taste-refactoring-architect/checklists/daily-architecture-review.md +48 -0
- package/plugins/sp/skills/taste-refactoring-architect/examples/refactor-example.md +55 -0
- package/plugins/sp/skills/taste-refactoring-architect/examples/review-template.md +51 -0
- package/plugins/sp/skills/taste-refactoring-architect/references/architecture-refactoring-playbook.md +173 -0
- package/plugins/sp/skills/taste-refactoring-architect/references/research-basis.md +28 -0
- package/plugins/sp/skills/taste-refactoring-tests/README.md +28 -0
- package/plugins/sp/skills/taste-refactoring-tests/SKILL.md +482 -0
- package/plugins/sp/skills/taste-refactoring-tests/checklists/daily-test-review.md +39 -0
- package/plugins/sp/skills/taste-refactoring-tests/examples/refactor-example.md +85 -0
- package/plugins/sp/skills/taste-refactoring-tests/examples/review-template.md +59 -0
- package/plugins/sp/skills/taste-refactoring-tests/references/research-basis.md +47 -0
- package/plugins/sp/skills/taste-refactoring-tests/references/test-refactoring-playbook.md +222 -0
- package/plugins/sp/skills/taste-refactoring-ui/README.md +12 -0
- package/plugins/sp/skills/taste-refactoring-ui/SKILL.md +290 -0
- package/plugins/sp/skills/taste-refactoring-ui/checklists/daily-ui-review.md +72 -0
- package/plugins/sp/skills/taste-refactoring-ui/examples/review-template.md +51 -0
- package/plugins/sp/skills/taste-refactoring-ui/references/refactoring-ui-playbook.md +170 -0
- package/plugins/sp/skills/wayfinder/SKILL.md +2 -2
- package/plugins/sp/skills/wayfinder/references/pipeline-resolution.md +30 -0
- package/schemas/spur-config.schema.json +49 -0
- package/spur.js +46936 -44198
- package/web/_astro/{BoardApp.CHQ1lycZ.js → BoardApp.B1U26g3I.js} +97 -95
- package/web/_astro/BoardApp.Csgyg-lS.js +1 -0
- package/web/_astro/{TaskDetail.GKfQJ60c.js → TaskDetail.DwPqpq7v.js} +1 -1
- package/web/_astro/{arc.DWEtA3Tx.js → arc.CweZEjN2.js} +1 -1
- package/web/_astro/{architectureDiagram-3BPJPVTR.DB42oWmP.js → architectureDiagram-3BPJPVTR.D89pbDuv.js} +1 -1
- package/web/_astro/{blockDiagram-GPEHLZMM.rhv-zNQV.js → blockDiagram-GPEHLZMM.BOuTeEpX.js} +1 -1
- package/web/_astro/{c4Diagram-AAUBKEIU.Ci4-4VvY.js → c4Diagram-AAUBKEIU.CASbkWZF.js} +1 -1
- package/web/_astro/channel.Cx6sXxhq.js +1 -0
- package/web/_astro/{chunk-2J33WTMH.Cc9veUgf.js → chunk-2J33WTMH.BKQYtOvY.js} +1 -1
- package/web/_astro/{chunk-4BX2VUAB.Bec9c4eI.js → chunk-4BX2VUAB.9sHLdMtG.js} +1 -1
- package/web/_astro/{chunk-55IACEB6.DoV8S1iB.js → chunk-55IACEB6.wOLXWlPs.js} +1 -1
- package/web/_astro/{chunk-727SXJPM.DwR-Qlyj.js → chunk-727SXJPM.DovFbwg3.js} +1 -1
- package/web/_astro/{chunk-AQP2D5EJ.ND_a81WY.js → chunk-AQP2D5EJ.B1Weod1X.js} +1 -1
- package/web/_astro/{chunk-FMBD7UC4.Wv_jwG48.js → chunk-FMBD7UC4.TEMS04st.js} +1 -1
- package/web/_astro/{chunk-ND2GUHAM.CXKXCMmp.js → chunk-ND2GUHAM.Cp8VT1wQ.js} +1 -1
- package/web/_astro/{chunk-QZHKN3VN.nkaoNYQq.js → chunk-QZHKN3VN.BzATdEcP.js} +1 -1
- package/web/_astro/{classDiagram-4FO5ZUOK.cMQcVlQu.js → classDiagram-4FO5ZUOK.C9BOCfAO.js} +1 -1
- package/web/_astro/{classDiagram-v2-Q7XG4LA2.cMQcVlQu.js → classDiagram-v2-Q7XG4LA2.C9BOCfAO.js} +1 -1
- package/web/_astro/{cose-bilkent-S5V4N54A.OaDJ7Mr2.js → cose-bilkent-S5V4N54A.DUnr4UAw.js} +1 -1
- package/web/_astro/{cynefin-OW5HDTMX.Chi8IphF.js → cynefin-OW5HDTMX.rYq5uM3D.js} +1 -1
- package/web/_astro/{cytoscape.esm.DzSz-X2X.js → cytoscape.esm.BB4DxJjf.js} +1 -1
- package/web/_astro/{dagre-BM42HDAG.CzK2t_Fp.js → dagre-BM42HDAG.CWeNKe3I.js} +1 -1
- package/web/_astro/{diagram-2AECGRRQ.DRvxlVS7.js → diagram-2AECGRRQ.DCkfls10.js} +1 -1
- package/web/_astro/{diagram-5GNKFQAL.CnYvNdwA.js → diagram-5GNKFQAL.D5U4JCka.js} +1 -1
- package/web/_astro/{diagram-KO2AKTUF.CpLpMw5R.js → diagram-KO2AKTUF.BZJgqaqG.js} +1 -1
- package/web/_astro/{diagram-LMA3HP47.JTb78qUA.js → diagram-LMA3HP47.DoMeHvPR.js} +1 -1
- package/web/_astro/{diagram-OG6HWLK6.Bk-1jDIb.js → diagram-OG6HWLK6.B50qwwWX.js} +1 -1
- package/web/_astro/{erDiagram-TEJ5UH35.D8hN9GZq.js → erDiagram-TEJ5UH35.DdGPG6LK.js} +1 -1
- package/web/_astro/{flowDiagram-I6XJVG4X.-6zQr6m5.js → flowDiagram-I6XJVG4X.QP2MJ12u.js} +1 -1
- package/web/_astro/{ganttDiagram-6RSMTGT7.DboLQ9ca.js → ganttDiagram-6RSMTGT7.BI6LgKSy.js} +1 -1
- package/web/_astro/{gitGraphDiagram-PVQCEYII.4tYvJKGR.js → gitGraphDiagram-PVQCEYII.npPZiC2G.js} +1 -1
- package/web/_astro/index.DayyIngm.css +1 -0
- package/web/_astro/{infoDiagram-5YYISTIA.Bd9rXpsB.js → infoDiagram-5YYISTIA.DCJCBVbp.js} +1 -1
- package/web/_astro/{ishikawaDiagram-YF4QCWOH.CvMoaf67.js → ishikawaDiagram-YF4QCWOH.BMLV-3I1.js} +1 -1
- package/web/_astro/{journeyDiagram-JHISSGLW.Ccy1CA7y.js → journeyDiagram-JHISSGLW.LE58crde.js} +1 -1
- package/web/_astro/{kanban-definition-UN3LZRKU.0MaMqHNS.js → kanban-definition-UN3LZRKU.BPbz8rH9.js} +1 -1
- package/web/_astro/{linear.CHXgcIbN.js → linear.DhZaBtYh.js} +1 -1
- package/web/_astro/{mermaid.core.Ca-kcelG.js → mermaid.core.BD5-jXum.js} +6 -6
- package/web/_astro/{mindmap-definition-RKZ34NQL.BUIDlHa0.js → mindmap-definition-RKZ34NQL.MTJyrQ65.js} +1 -1
- package/web/_astro/ordinal.BYWQX77i.js +1 -0
- package/web/_astro/{pieDiagram-4H26LBE5.2dX3CU1s.js → pieDiagram-4H26LBE5.BrDhDvIS.js} +1 -1
- package/web/_astro/{quadrantDiagram-W4KKPZXB.B3LBlRiv.js → quadrantDiagram-W4KKPZXB.71d73_5N.js} +1 -1
- package/web/_astro/{requirementDiagram-4Y6WPE33.X12I2uNx.js → requirementDiagram-4Y6WPE33.Bga6UF-z.js} +1 -1
- package/web/_astro/{sankeyDiagram-5OEKKPKP.BXohIHqx.js → sankeyDiagram-5OEKKPKP.BnHs4K82.js} +1 -1
- package/web/_astro/{sequenceDiagram-3UESZ5HK.C37ZIUzg.js → sequenceDiagram-3UESZ5HK.DsfY2gnj.js} +1 -1
- package/web/_astro/{stateDiagram-AJRCARHV.BRgz317z.js → stateDiagram-AJRCARHV.DvsTSc9a.js} +1 -1
- package/web/_astro/{stateDiagram-v2-BHNVJYJU.7VYSXN9-.js → stateDiagram-v2-BHNVJYJU.DxzzmHUR.js} +1 -1
- package/web/_astro/{timeline-definition-PNZ67QCA.BVNz_HiN.js → timeline-definition-PNZ67QCA.4ZuQmOTt.js} +1 -1
- package/web/_astro/{vennDiagram-CIIHVFJN.CHVDkPX4.js → vennDiagram-CIIHVFJN.Ck5Q86SG.js} +1 -1
- package/web/_astro/{wardleyDiagram-YWT4CUSO.EQQ_qT9v.js → wardleyDiagram-YWT4CUSO.BK7k2hXr.js} +1 -1
- package/web/_astro/{xychartDiagram-2RQKCTM6.DrAT9WoP.js → xychartDiagram-2RQKCTM6.DfCrgauK.js} +1 -1
- package/web/index.html +2 -2
- package/web/_astro/BoardApp.DV9kx0wo.js +0 -1
- package/web/_astro/channel.BAI6xLeV.js +0 -1
- package/web/_astro/index.Dcr_8fiK.css +0 -1
- package/web/_astro/ordinal.DBvzRdQf.js +0 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Research and Industry-Practice Basis
|
|
2
|
+
|
|
3
|
+
This skill is synthesized from established testing practice rather than one source document.
|
|
4
|
+
|
|
5
|
+
## Core traditions reflected
|
|
6
|
+
|
|
7
|
+
### Behavior-oriented unit testing
|
|
8
|
+
Tests should focus on observable behavior and stable contracts rather than mirroring internal implementation structure. This reduces brittleness and makes refactoring safer.
|
|
9
|
+
|
|
10
|
+
### Test pyramid / test portfolio thinking
|
|
11
|
+
Confidence should be distributed across test levels. Unit tests are best for fast local decision logic and invariants; integration, contract, and end-to-end tests should cover concerns that inherently require real boundaries.
|
|
12
|
+
|
|
13
|
+
### Mutation testing
|
|
14
|
+
Mutation testing evaluates whether tests detect injected faults. It is especially useful for exposing weak assertions and green suites that execute code without proving behavior.
|
|
15
|
+
|
|
16
|
+
Representative tools include PIT (JVM), Stryker (JavaScript/.NET and others), mutmut/cosmic-ray (Python), and language-specific equivalents.
|
|
17
|
+
|
|
18
|
+
### Property-based testing
|
|
19
|
+
Property-based testing (e.g. QuickCheck-family approaches) is useful when correctness is expressed more naturally as invariants over broad input spaces than as a few hand-picked examples.
|
|
20
|
+
|
|
21
|
+
### FIRST-style test qualities
|
|
22
|
+
Fast, isolated/independent, repeatable, self-validating, and timely tests remain useful heuristics, but this skill adds a stronger emphasis on fault sensitivity and delivery risk.
|
|
23
|
+
|
|
24
|
+
### Testing Trophy / modern test portfolio practice
|
|
25
|
+
The right test level depends on the behavior. Do not maximize unit-test count at the expense of realistic boundary confidence.
|
|
26
|
+
|
|
27
|
+
### Regression testing from escaped defects
|
|
28
|
+
Production bugs should become durable regression protections whenever a stable, meaningful automated check can be created.
|
|
29
|
+
|
|
30
|
+
## Concepts deliberately rejected as primary quality measures
|
|
31
|
+
- raw test count,
|
|
32
|
+
- 100% line coverage,
|
|
33
|
+
- permanently green CI,
|
|
34
|
+
- high mock verification density,
|
|
35
|
+
- snapshot volume,
|
|
36
|
+
- number of assertions.
|
|
37
|
+
|
|
38
|
+
These metrics can be inputs, but none proves that a suite detects meaningful regressions.
|
|
39
|
+
|
|
40
|
+
## Central quality thesis
|
|
41
|
+
A trustworthy suite must demonstrate **sensitivity to wrong behavior**. The strongest practical evidence is a combination of:
|
|
42
|
+
- well-chosen behavior assertions,
|
|
43
|
+
- negative and boundary tests,
|
|
44
|
+
- bug reproductions,
|
|
45
|
+
- representative fault injection or mutation testing,
|
|
46
|
+
- low flakiness,
|
|
47
|
+
- resilience to behavior-preserving refactors.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Test Refactoring Playbook
|
|
2
|
+
|
|
3
|
+
## 1. What “good” means
|
|
4
|
+
A unit test is valuable when it has four properties:
|
|
5
|
+
|
|
6
|
+
1. **Regression sensitivity** — plausible defects cause it to fail.
|
|
7
|
+
2. **Behavior relevance** — the failure corresponds to behavior that matters.
|
|
8
|
+
3. **Diagnostic clarity** — the failure tells engineers what contract broke.
|
|
9
|
+
4. **Maintenance efficiency** — harmless internal refactors do not constantly break it.
|
|
10
|
+
|
|
11
|
+
A useful mental model is:
|
|
12
|
+
|
|
13
|
+
`Test Value ≈ (Risk Protected × Fault Sensitivity × Diagnostic Value) / (Maintenance Cost + Flakiness + Runtime Cost)`
|
|
14
|
+
|
|
15
|
+
This is a reasoning aid, not a numeric scoring formula.
|
|
16
|
+
|
|
17
|
+
## 2. The Always-Pass illusion
|
|
18
|
+
A suite can stay green while quality degrades when tests:
|
|
19
|
+
- execute code without proving outcomes,
|
|
20
|
+
- assert only happy paths,
|
|
21
|
+
- configure mocks to guarantee the expected answer,
|
|
22
|
+
- duplicate the implementation in expectations,
|
|
23
|
+
- test framework behavior instead of domain behavior,
|
|
24
|
+
- ignore negative effects,
|
|
25
|
+
- swallow exceptions,
|
|
26
|
+
- are skipped or quarantined indefinitely,
|
|
27
|
+
- use snapshots nobody reviews,
|
|
28
|
+
- optimize for coverage rather than defect detection.
|
|
29
|
+
|
|
30
|
+
The antidote is to ask: **what plausible bug would this test catch?**
|
|
31
|
+
|
|
32
|
+
If the answer is unclear, the test is a refactoring candidate.
|
|
33
|
+
|
|
34
|
+
## 3. Start from risks, not files
|
|
35
|
+
Map tests to risks such as:
|
|
36
|
+
- authorization bypass,
|
|
37
|
+
- incorrect financial calculation,
|
|
38
|
+
- invalid state transition,
|
|
39
|
+
- duplicate processing,
|
|
40
|
+
- stale or corrupt persistence,
|
|
41
|
+
- wrong serialization,
|
|
42
|
+
- input validation gaps,
|
|
43
|
+
- rounding/time-zone boundaries,
|
|
44
|
+
- unexpected side effects,
|
|
45
|
+
- historical production defects.
|
|
46
|
+
|
|
47
|
+
Review the highest-risk areas first.
|
|
48
|
+
|
|
49
|
+
## 4. Weak assertion patterns
|
|
50
|
+
|
|
51
|
+
### “Does not throw” only
|
|
52
|
+
Sometimes valid for idempotent/no-op behavior, but usually incomplete. Add the expected resulting state or side effect.
|
|
53
|
+
|
|
54
|
+
### `not null`
|
|
55
|
+
Often proves only allocation. Assert the semantic value.
|
|
56
|
+
|
|
57
|
+
### `isTrue`
|
|
58
|
+
Can hide what actually matters. Prefer domain-specific assertions.
|
|
59
|
+
|
|
60
|
+
### count only
|
|
61
|
+
`count == 1` may still accept the wrong item. Assert identity/content when relevant.
|
|
62
|
+
|
|
63
|
+
### status only
|
|
64
|
+
For protocol-facing units, status without body/error semantics may miss serious regressions.
|
|
65
|
+
|
|
66
|
+
### mock call only
|
|
67
|
+
A collaborator being called is rarely the user-visible outcome. Assert state/result unless the interaction itself is contractual.
|
|
68
|
+
|
|
69
|
+
## 5. Mutation mindset
|
|
70
|
+
Mutation testing asks whether tests detect small deliberate faults.
|
|
71
|
+
|
|
72
|
+
Representative mutants:
|
|
73
|
+
- `>` to `>=`,
|
|
74
|
+
- true to false,
|
|
75
|
+
- remove branch,
|
|
76
|
+
- remove side effect,
|
|
77
|
+
- return null/default,
|
|
78
|
+
- change constant,
|
|
79
|
+
- skip validation,
|
|
80
|
+
- negate authorization result.
|
|
81
|
+
|
|
82
|
+
A surviving mutant in critical logic is strong evidence of missing or weak tests.
|
|
83
|
+
|
|
84
|
+
Do not optimize blindly for a mutation score. Some mutants are equivalent or low-risk. Use survivors to drive judgment.
|
|
85
|
+
|
|
86
|
+
## 6. Refactoring mock-heavy tests
|
|
87
|
+
|
|
88
|
+
### Smell
|
|
89
|
+
A test contains more mock setup and `verify` calls than domain assertions.
|
|
90
|
+
|
|
91
|
+
### Questions
|
|
92
|
+
- Is the unit boundary too large?
|
|
93
|
+
- Are we testing orchestration instead of behavior?
|
|
94
|
+
- Can a fake preserve useful state and enable clearer assertions?
|
|
95
|
+
- Is call order actually contractual?
|
|
96
|
+
|
|
97
|
+
### Preferred move
|
|
98
|
+
Move pure decision logic into a focused unit, test it directly, and leave wiring/protocol coordination to a smaller number of integration/contract tests.
|
|
99
|
+
|
|
100
|
+
## 7. Boundary-value coverage
|
|
101
|
+
For ordered numeric/date/count domains, cover equivalence classes around boundaries:
|
|
102
|
+
- just below,
|
|
103
|
+
- exactly at,
|
|
104
|
+
- just above.
|
|
105
|
+
|
|
106
|
+
For collections:
|
|
107
|
+
- empty,
|
|
108
|
+
- one,
|
|
109
|
+
- many,
|
|
110
|
+
- duplicates where relevant.
|
|
111
|
+
|
|
112
|
+
For nullable/optional values:
|
|
113
|
+
- absent,
|
|
114
|
+
- present valid,
|
|
115
|
+
- present invalid.
|
|
116
|
+
|
|
117
|
+
For time:
|
|
118
|
+
- clock control,
|
|
119
|
+
- timezone transitions,
|
|
120
|
+
- expiry boundary,
|
|
121
|
+
- leap/day rollover only when domain-relevant.
|
|
122
|
+
|
|
123
|
+
## 8. Negative-path testing
|
|
124
|
+
Critical negative tests often provide more confidence than another happy path.
|
|
125
|
+
|
|
126
|
+
Examples:
|
|
127
|
+
- unauthorized actor is rejected and state is unchanged,
|
|
128
|
+
- invalid input does not persist,
|
|
129
|
+
- failed payment does not fulfill order,
|
|
130
|
+
- duplicate message does not duplicate side effects,
|
|
131
|
+
- timeout maps to retriable error rather than success,
|
|
132
|
+
- missing required field returns a meaningful rejection.
|
|
133
|
+
|
|
134
|
+
## 9. Property-based testing
|
|
135
|
+
Use when examples are insufficient and invariants are stable.
|
|
136
|
+
|
|
137
|
+
Candidate properties:
|
|
138
|
+
- serialize then deserialize preserves meaning,
|
|
139
|
+
- normalized output is idempotent,
|
|
140
|
+
- sorting is ordered and permutation-preserving,
|
|
141
|
+
- money allocation preserves total,
|
|
142
|
+
- state transitions never reach illegal states,
|
|
143
|
+
- parser never crashes for arbitrary bytes/strings within a defined domain.
|
|
144
|
+
|
|
145
|
+
Keep generated counterexamples reproducible by recording seeds or framework-provided replay data.
|
|
146
|
+
|
|
147
|
+
## 10. Snapshot/golden tests
|
|
148
|
+
Snapshots can help for stable, reviewable structures but become dangerous when:
|
|
149
|
+
- snapshots are huge,
|
|
150
|
+
- updates are rubber-stamped,
|
|
151
|
+
- irrelevant formatting dominates diffs,
|
|
152
|
+
- assertions are replaced entirely by snapshot acceptance.
|
|
153
|
+
|
|
154
|
+
Prefer targeted semantic assertions for critical fields. Keep snapshots small and intentional.
|
|
155
|
+
|
|
156
|
+
## 11. Test fixtures
|
|
157
|
+
A fixture should reduce noise, not hide causality.
|
|
158
|
+
|
|
159
|
+
Good fixture design:
|
|
160
|
+
- safe defaults,
|
|
161
|
+
- test overrides important values explicitly,
|
|
162
|
+
- minimal global state,
|
|
163
|
+
- readable builders,
|
|
164
|
+
- no hidden network/database work,
|
|
165
|
+
- deterministic identifiers and clocks where useful.
|
|
166
|
+
|
|
167
|
+
Avoid “mystery guests”: fixtures whose invisible defaults determine the outcome.
|
|
168
|
+
|
|
169
|
+
## 12. Flaky tests
|
|
170
|
+
Investigate categories:
|
|
171
|
+
- clock/time dependence,
|
|
172
|
+
- randomness,
|
|
173
|
+
- race/synchronization,
|
|
174
|
+
- leaked shared state,
|
|
175
|
+
- test ordering,
|
|
176
|
+
- environment/locale,
|
|
177
|
+
- external I/O,
|
|
178
|
+
- resource exhaustion,
|
|
179
|
+
- eventual consistency.
|
|
180
|
+
|
|
181
|
+
A retry can hide the symptom while preserving the defect. Track root cause.
|
|
182
|
+
|
|
183
|
+
## 13. When unit tests are the wrong level
|
|
184
|
+
Move confidence upward when behavior depends essentially on:
|
|
185
|
+
- database transaction semantics,
|
|
186
|
+
- serialization framework configuration,
|
|
187
|
+
- network protocol details,
|
|
188
|
+
- schema compatibility,
|
|
189
|
+
- distributed coordination,
|
|
190
|
+
- real dependency behavior.
|
|
191
|
+
|
|
192
|
+
Keep unit tests for decision logic and local invariants; add integration/contract tests for the real boundary.
|
|
193
|
+
|
|
194
|
+
## 14. Bug-driven strengthening
|
|
195
|
+
For every escaped defect:
|
|
196
|
+
1. Write the smallest reproducer.
|
|
197
|
+
2. Prove it fails before the fix.
|
|
198
|
+
3. Fix production code.
|
|
199
|
+
4. Prove it passes.
|
|
200
|
+
5. Check whether the defect reveals a wider missing property.
|
|
201
|
+
6. Add the smallest additional protection needed.
|
|
202
|
+
|
|
203
|
+
## 15. Test deletion safety
|
|
204
|
+
Before deleting a test, answer:
|
|
205
|
+
- What unique behavior does it protect?
|
|
206
|
+
- Is another test stronger and equivalent?
|
|
207
|
+
- Is the behavior obsolete?
|
|
208
|
+
- Does the test encode a bug regression?
|
|
209
|
+
- Is there hidden setup that exercises a real side effect?
|
|
210
|
+
|
|
211
|
+
Delete only when protection is absent, duplicated, or obsolete.
|
|
212
|
+
|
|
213
|
+
## 16. Review economics
|
|
214
|
+
Prioritize test work by:
|
|
215
|
+
- business impact of failure,
|
|
216
|
+
- likelihood of change,
|
|
217
|
+
- code complexity,
|
|
218
|
+
- historical defects,
|
|
219
|
+
- ease of fault detection elsewhere,
|
|
220
|
+
- test maintenance cost.
|
|
221
|
+
|
|
222
|
+
Do not spend a day perfecting trivial tests while critical rules remain weakly protected.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# taste-refactoring-ui
|
|
2
|
+
|
|
3
|
+
A reusable agent skill distilled from the uploaded *Refactoring UI* PDF for day-to-day product UI design and refactoring.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
- `SKILL.md` — primary agent instructions and workflow.
|
|
7
|
+
- `references/refactoring-ui-playbook.md` — chapter-by-chapter operational reference.
|
|
8
|
+
- `checklists/daily-ui-review.md` — short daily design QA checklist.
|
|
9
|
+
- `examples/review-template.md` — reusable critique/output template.
|
|
10
|
+
|
|
11
|
+
## Suggested usage
|
|
12
|
+
Attach or install this directory as an agent skill and invoke `taste-refactoring-ui` whenever designing, reviewing, or refactoring UI. For screenshot critiques, provide the screenshot. For code refactors, provide the relevant component(s) and existing design-system constraints.
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: taste-refactoring-ui
|
|
3
|
+
description: Design, review, and refactor UI hierarchy, layout, typography, spacing, color, and interactions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# taste-refactoring-ui
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Act as a product UI design critic and refactoring partner. Improve interfaces by making the important thing obvious, reducing arbitrary design decisions, and turning visual taste into repeatable systems.
|
|
11
|
+
|
|
12
|
+
Use this skill when the user asks to:
|
|
13
|
+
- design or redesign a screen, flow, component, dashboard, landing page, or application UI;
|
|
14
|
+
- critique a screenshot, mockup, or frontend implementation;
|
|
15
|
+
- make UI feel cleaner, more polished, more premium, more professional, or more coherent;
|
|
16
|
+
- establish or refine spacing, sizing, type, color, radius, or shadow tokens;
|
|
17
|
+
- fix visual hierarchy, density, readability, color contrast, or component inconsistency;
|
|
18
|
+
- perform a final “taste” pass before shipping.
|
|
19
|
+
|
|
20
|
+
This skill is intentionally practical. Prefer concrete changes over abstract design commentary.
|
|
21
|
+
|
|
22
|
+
## Core operating principles
|
|
23
|
+
|
|
24
|
+
1. **Start from the feature, not the shell.** Understand the primary user task and the minimum controls/content needed for that task before deciding navigation, sidebars, page chrome, or decorative structure.
|
|
25
|
+
2. **Delay detail until structure works.** Solve composition, grouping, hierarchy, spacing, and content order before spending time on color, icons, shadows, or fine styling.
|
|
26
|
+
3. **Design the smallest useful thing.** Do not invent future functionality or over-design edge cases before the working feature demands them.
|
|
27
|
+
4. **Choose a personality deliberately.** Typography, color, radius, imagery, and language should express a coherent character instead of being individually “nice.”
|
|
28
|
+
5. **Constrain choices.** Prefer a small design system over one-off values. Reuse scales and tokens so each decision is made once.
|
|
29
|
+
6. **Hierarchy before decoration.** Make primary, secondary, and tertiary content visibly different. When everything asks for attention, nothing wins.
|
|
30
|
+
7. **Use spacing as structure.** Group related things by proximity and separate unrelated things clearly. Avoid ambiguous gaps.
|
|
31
|
+
8. **Typography is interface architecture.** Use a restrained type scale, readable line lengths, appropriate line-height, sensible alignment, and purposeful weight/contrast.
|
|
32
|
+
9. **Color is a system, not a picker.** Define usable shade ramps, semantic roles, and contrast behavior. Never rely on color alone to carry meaning.
|
|
33
|
+
10. **Depth should communicate structure.** Shadows, borders, overlap, and highlights should explain elevation or grouping rather than decorate indiscriminately.
|
|
34
|
+
11. **Images need intentional treatment.** Preserve legibility, use imagery at suitable sizes, and defend layouts against unpredictable user-uploaded content.
|
|
35
|
+
12. **Finish with restraint.** Improve defaults, empty states, backgrounds, accents, and borders only after the fundamentals are solid.
|
|
36
|
+
|
|
37
|
+
## Default workflow
|
|
38
|
+
|
|
39
|
+
### 1. Frame the job
|
|
40
|
+
|
|
41
|
+
Before touching styling, identify:
|
|
42
|
+
- the screen’s primary user goal;
|
|
43
|
+
- the most important action or information;
|
|
44
|
+
- the secondary actions/information;
|
|
45
|
+
- the actual content and states that must exist now;
|
|
46
|
+
- the constraints already present in the product or codebase.
|
|
47
|
+
|
|
48
|
+
If the user provides code or an existing design system, preserve its useful primitives unless they are the source of inconsistency.
|
|
49
|
+
|
|
50
|
+
### 2. Build or audit in passes
|
|
51
|
+
|
|
52
|
+
Always review in this order unless the user asks for a narrower scope:
|
|
53
|
+
|
|
54
|
+
**Pass A — Function and content**
|
|
55
|
+
- Is the feature itself clear?
|
|
56
|
+
- Is anything present that does not help the current task?
|
|
57
|
+
- Are “nice-to-have” controls or future features distracting from the shippable core?
|
|
58
|
+
- Can the interface be understood without decorative styling?
|
|
59
|
+
|
|
60
|
+
**Pass B — Hierarchy**
|
|
61
|
+
- Rank every visible element as primary, secondary, tertiary, or structural.
|
|
62
|
+
- Strengthen the top priority before adding more visual effects.
|
|
63
|
+
- Prefer de-emphasizing competitors over endlessly emphasizing the primary item.
|
|
64
|
+
- Use size, weight, contrast, placement, and spacing together; do not use font size alone.
|
|
65
|
+
|
|
66
|
+
**Pass C — Layout and spacing**
|
|
67
|
+
- Start slightly more spacious than feels necessary, then tighten deliberately.
|
|
68
|
+
- Group related elements with smaller internal gaps and larger external gaps.
|
|
69
|
+
- Avoid filling available width merely because it exists.
|
|
70
|
+
- Let different regions use the width that best serves their content; do not force every region onto the same grid.
|
|
71
|
+
- Use explicit spacing/sizing values from a scale rather than arbitrary percentages or tiny one-off adjustments.
|
|
72
|
+
|
|
73
|
+
**Pass D — Typography**
|
|
74
|
+
- Use a restrictive type scale.
|
|
75
|
+
- Use a neutral, legible UI face for dense interface text unless personality requires otherwise.
|
|
76
|
+
- Keep paragraphs and long-form text to a comfortable line length; do not stretch them across wide containers.
|
|
77
|
+
- Align text to baselines when mixed with icons or adjacent labels instead of visually centering everything.
|
|
78
|
+
- Use more line-height for smaller text and less for larger display text.
|
|
79
|
+
- Do not color every link by default; rely on context and interaction cues where appropriate.
|
|
80
|
+
- Prefer left alignment for most reading-heavy text; center only short, self-contained blocks.
|
|
81
|
+
- Tighten letter spacing for large headlines only when the typeface benefits from it.
|
|
82
|
+
|
|
83
|
+
**Pass E — Color**
|
|
84
|
+
- Think in hue/saturation/lightness relationships rather than isolated hex values.
|
|
85
|
+
- Define a useful family of shades before improvising new ones.
|
|
86
|
+
- Keep saturated colors lively across light/dark variants; do not change only lightness if it makes shades muddy.
|
|
87
|
+
- Tint neutrals slightly when it supports the design personality.
|
|
88
|
+
- Verify accessible contrast, but solve contrast with hierarchy and color construction rather than making every element maximal contrast.
|
|
89
|
+
- Pair color with text, iconography, shape, or position for status and meaning.
|
|
90
|
+
|
|
91
|
+
**Pass F — Depth and surfaces**
|
|
92
|
+
- Assume a consistent light source.
|
|
93
|
+
- Use highlights on top-facing edges and shadows beneath elements only when they help communicate form.
|
|
94
|
+
- Map shadow size/blur to elevation: tight/subtle for low elevation, broader/softer for higher elevation.
|
|
95
|
+
- When useful, combine a small sharp shadow with a larger soft shadow to simulate contact plus ambient shadow.
|
|
96
|
+
- Use overlap to create layering when it clarifies relationships.
|
|
97
|
+
- Do not chase photorealism; depth should remain quiet and functional.
|
|
98
|
+
|
|
99
|
+
**Pass G — Images and media**
|
|
100
|
+
- Prefer strong source imagery over trying to rescue weak imagery with effects.
|
|
101
|
+
- Ensure text over images has stable contrast using overlays, lowered image contrast, controlled colorization, or a subtle text glow/shadow where appropriate.
|
|
102
|
+
- Do not enlarge small icons merely because vectors allow it; use artwork designed for the intended size or place small icons inside a larger supporting shape.
|
|
103
|
+
- Do not shrink detailed screenshots until text becomes illegible; crop, use a smaller-layout capture, or simplify the screenshot.
|
|
104
|
+
- Put user-uploaded images inside predictable frames, crop safely, and avoid depending on unknown image colors for text readability.
|
|
105
|
+
|
|
106
|
+
**Pass H — Finishing touches**
|
|
107
|
+
- Upgrade browser/default-looking controls only when it improves cohesion.
|
|
108
|
+
- Use accent borders sparingly to inject color without overwhelming the surface.
|
|
109
|
+
- Use subtle background decoration to support personality or section separation.
|
|
110
|
+
- Design empty states as real product states, not blank leftovers.
|
|
111
|
+
- Remove unnecessary borders; prefer spacing, background shifts, and shadows when they communicate structure better.
|
|
112
|
+
- Break out of repetitive card grids when a different composition better serves the content.
|
|
113
|
+
|
|
114
|
+
### 3. Systematize the decisions
|
|
115
|
+
|
|
116
|
+
Whenever a UI decision repeats, turn it into a token, component rule, or documented pattern.
|
|
117
|
+
|
|
118
|
+
At minimum, look for systems covering:
|
|
119
|
+
- font sizes;
|
|
120
|
+
- font weights;
|
|
121
|
+
- line heights;
|
|
122
|
+
- text colors;
|
|
123
|
+
- brand and semantic color shades;
|
|
124
|
+
- spacing and padding;
|
|
125
|
+
- widths and heights;
|
|
126
|
+
- border radius;
|
|
127
|
+
- border widths;
|
|
128
|
+
- shadows/elevation;
|
|
129
|
+
- opacity;
|
|
130
|
+
- icon sizes.
|
|
131
|
+
|
|
132
|
+
A useful scale has perceptible jumps. Avoid scales where adjacent large values differ so little that they create fake precision.
|
|
133
|
+
|
|
134
|
+
When choosing among tokens, compare neighboring options instead of micro-tuning. Pick a plausible value, compare one step smaller and one step larger, eliminate obvious misses, and repeat only when necessary.
|
|
135
|
+
|
|
136
|
+
## Practical heuristics
|
|
137
|
+
|
|
138
|
+
### Hierarchy
|
|
139
|
+
- Aim for roughly three text-emphasis levels: strong primary, quieter secondary, very quiet tertiary.
|
|
140
|
+
- Two primary text weights are usually enough: normal/medium for body content and semibold/bold for emphasis.
|
|
141
|
+
- Avoid weights below 400 for small UI text unless the typeface is specifically designed for it.
|
|
142
|
+
- On colored surfaces, do not simply switch secondary text to generic grey or low-opacity white. Choose a lower-contrast color related to the surface so it stays intentional rather than washed out.
|
|
143
|
+
- Labels should not dominate values. Remove obvious labels, combine label + value into natural language, or de-emphasize labels when the value is what users scan for.
|
|
144
|
+
- In specification-heavy interfaces where users scan for the field name, labels may deserve more emphasis than values.
|
|
145
|
+
|
|
146
|
+
### Spacing
|
|
147
|
+
- Prefer a non-linear spacing scale with small, meaningful jumps at the low end and larger jumps at the high end.
|
|
148
|
+
- Internal spacing should be smaller than spacing between groups.
|
|
149
|
+
- If a form label could visually belong to two fields, the vertical rhythm is wrong.
|
|
150
|
+
- Dense interfaces are allowed, but density should be an explicit product decision rather than the default consequence of insufficient spacing.
|
|
151
|
+
|
|
152
|
+
### Sizing and width
|
|
153
|
+
- Avoid percentage-based sizing for elements whose content needs stable visual emphasis.
|
|
154
|
+
- Do not make everything fluid simply because the viewport is fluid.
|
|
155
|
+
- Cap text and content regions where readability benefits from a narrower measure.
|
|
156
|
+
- Let sidebars, cards, forms, and content columns use independent widths when the content justifies it.
|
|
157
|
+
|
|
158
|
+
### Personality
|
|
159
|
+
Use a small set of coordinated decisions:
|
|
160
|
+
- **formal/serious:** restrained color, squarer corners, conservative typography, direct language;
|
|
161
|
+
- **neutral/productive:** neutral sans serif, moderate radius, practical color system, concise language;
|
|
162
|
+
- **friendly/playful:** warmer/brighter color, rounder forms, softer shapes, friendlier copy;
|
|
163
|
+
- **premium/elegant:** disciplined whitespace, restrained palette, refined type pairing, deliberate imagery.
|
|
164
|
+
|
|
165
|
+
Do not mimic a direct competitor so closely that the product loses its own identity.
|
|
166
|
+
|
|
167
|
+
## Refactoring protocol for existing UI
|
|
168
|
+
|
|
169
|
+
When reviewing an existing screen, return findings in priority order rather than by visual location.
|
|
170
|
+
|
|
171
|
+
Use this severity model:
|
|
172
|
+
- **P0 — Task failure:** user cannot understand, complete, or trust the primary task.
|
|
173
|
+
- **P1 — Hierarchy/structure:** the right content exists but attention, grouping, or order is wrong.
|
|
174
|
+
- **P2 — System inconsistency:** arbitrary spacing, typography, color, radius, or shadow values undermine cohesion.
|
|
175
|
+
- **P3 — Polish:** image treatment, micro-alignment, accents, empty states, background details, etc.
|
|
176
|
+
|
|
177
|
+
For every issue, provide:
|
|
178
|
+
1. **Observation** — what is visibly wrong.
|
|
179
|
+
2. **Why it matters** — effect on comprehension, hierarchy, readability, or perceived quality.
|
|
180
|
+
3. **Refactor** — precise change to make.
|
|
181
|
+
4. **System rule** — reusable token/component rule if the issue can recur.
|
|
182
|
+
|
|
183
|
+
Do not merely say “add whitespace,” “improve hierarchy,” or “make it cleaner.” Specify where and how.
|
|
184
|
+
|
|
185
|
+
## Implementation mode
|
|
186
|
+
|
|
187
|
+
When the user asks for code changes:
|
|
188
|
+
- infer the existing design system before inventing a new one;
|
|
189
|
+
- preserve component semantics and accessibility;
|
|
190
|
+
- consolidate repeated magic numbers into tokens/constants/classes;
|
|
191
|
+
- prefer a small coherent token set over exact reproduction of scattered values;
|
|
192
|
+
- keep responsive behavior intentional rather than universally fluid;
|
|
193
|
+
- implement states: default, hover/focus, active/selected, disabled, empty, loading, error, and overflow where relevant;
|
|
194
|
+
- protect media containers from extreme aspect ratios and unknown user content;
|
|
195
|
+
- remove redundant borders and shadows before adding new decoration.
|
|
196
|
+
|
|
197
|
+
When code is provided, explain only the design decisions that materially affect the result. Deliver working edits, not a lecture.
|
|
198
|
+
|
|
199
|
+
## Screenshot / mockup critique mode
|
|
200
|
+
|
|
201
|
+
When an image is provided, inspect in this sequence:
|
|
202
|
+
1. What do the eyes land on first?
|
|
203
|
+
2. Is that the intended primary thing?
|
|
204
|
+
3. Which items compete unnecessarily?
|
|
205
|
+
4. Are related items visually grouped?
|
|
206
|
+
5. Are gaps unambiguous?
|
|
207
|
+
6. Is text readable and appropriately ranked?
|
|
208
|
+
7. Are colors systematic and accessible?
|
|
209
|
+
8. Are borders/shadows doing useful structural work?
|
|
210
|
+
9. Are images helping or harming clarity?
|
|
211
|
+
10. What can be removed?
|
|
212
|
+
|
|
213
|
+
Return the smallest set of high-leverage changes first. If useful, describe a “before → after” layout in concrete terms.
|
|
214
|
+
|
|
215
|
+
## New-screen design mode
|
|
216
|
+
|
|
217
|
+
When designing from scratch:
|
|
218
|
+
1. Define the feature in one sentence.
|
|
219
|
+
2. List the minimum content and controls.
|
|
220
|
+
3. Sketch the content order in plain text.
|
|
221
|
+
4. Establish hierarchy in grayscale.
|
|
222
|
+
5. Apply spacing and sizing tokens.
|
|
223
|
+
6. Apply typography tokens.
|
|
224
|
+
7. Add color system and states.
|
|
225
|
+
8. Add depth/images only where they support the design.
|
|
226
|
+
9. Add finishing touches.
|
|
227
|
+
10. Test edge cases only after the core version is coherent and shippable.
|
|
228
|
+
|
|
229
|
+
## Output contract
|
|
230
|
+
|
|
231
|
+
Unless the user requests another format, answer with:
|
|
232
|
+
|
|
233
|
+
### Diagnosis
|
|
234
|
+
A concise statement of the main design problem and the intended visual direction.
|
|
235
|
+
|
|
236
|
+
### Highest-impact changes
|
|
237
|
+
A prioritized set of concrete refactors, usually 3–8 items.
|
|
238
|
+
|
|
239
|
+
### System decisions
|
|
240
|
+
Tokens/rules that should become reusable.
|
|
241
|
+
|
|
242
|
+
### Implementation notes
|
|
243
|
+
Exact component/layout/styling guidance or code-oriented instructions.
|
|
244
|
+
|
|
245
|
+
### Final quality gate
|
|
246
|
+
A short pass/fail checklist for hierarchy, spacing, typography, color, states, and polish.
|
|
247
|
+
|
|
248
|
+
## Quality gate
|
|
249
|
+
|
|
250
|
+
Before finalizing any UI recommendation, confirm:
|
|
251
|
+
- [ ] The primary task is obvious.
|
|
252
|
+
- [ ] The primary action/information wins the hierarchy.
|
|
253
|
+
- [ ] Secondary and tertiary content are visibly quieter.
|
|
254
|
+
- [ ] Related elements are grouped by spacing.
|
|
255
|
+
- [ ] No major width exists only to “fill the screen.”
|
|
256
|
+
- [ ] Typography uses a deliberate scale and readable line length.
|
|
257
|
+
- [ ] Text weight, size, and contrast work together.
|
|
258
|
+
- [ ] Colors come from a coherent shade/semantic system.
|
|
259
|
+
- [ ] Meaning is never communicated by color alone.
|
|
260
|
+
- [ ] Borders, shadows, and radii are consistent and purposeful.
|
|
261
|
+
- [ ] Images/media preserve legibility and intended scale.
|
|
262
|
+
- [ ] Empty/loading/error/disabled/overflow states are considered.
|
|
263
|
+
- [ ] Repeated choices have been converted into reusable rules or tokens.
|
|
264
|
+
- [ ] Decorative polish has not been used to hide structural problems.
|
|
265
|
+
|
|
266
|
+
## Anti-patterns to reject
|
|
267
|
+
|
|
268
|
+
- Starting with navigation or application chrome before understanding the feature.
|
|
269
|
+
- Designing every feature and edge case before implementation teaches you anything.
|
|
270
|
+
- Solving hierarchy only by making titles huge and support text tiny.
|
|
271
|
+
- Giving every data point a same-weight `label: value` presentation.
|
|
272
|
+
- Using arbitrary pixel values for every component.
|
|
273
|
+
- Using a purely linear spacing scale that encourages meaningless micro-differences.
|
|
274
|
+
- Stretching text and forms to fill the viewport.
|
|
275
|
+
- Making all layout regions obey one rigid grid when their content has different needs.
|
|
276
|
+
- Using generic grey or transparent white text on colored backgrounds.
|
|
277
|
+
- Picking colors one at a time without shade/semantic relationships.
|
|
278
|
+
- Using color as the sole signal for status.
|
|
279
|
+
- Using shadows everywhere because they “look premium.”
|
|
280
|
+
- Scaling icons/screenshots far beyond their intended visual size.
|
|
281
|
+
- Letting unpredictable user images control text contrast.
|
|
282
|
+
- Wrapping every section in a bordered card.
|
|
283
|
+
- Treating empty states as blank space.
|
|
284
|
+
|
|
285
|
+
## Reference files
|
|
286
|
+
|
|
287
|
+
For deeper reasoning and daily use, read:
|
|
288
|
+
- `references/refactoring-ui-playbook.md` — chapter-by-chapter distilled guidance.
|
|
289
|
+
- `checklists/daily-ui-review.md` — fast audit and ship checklist.
|
|
290
|
+
- `examples/review-template.md` — reusable UI critique response structure.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Daily UI Review Checklist
|
|
2
|
+
|
|
3
|
+
Use this in 5–10 minutes before shipping or requesting review.
|
|
4
|
+
|
|
5
|
+
## 1. Task clarity
|
|
6
|
+
- [ ] Can a first-time user tell what this screen is for in a few seconds?
|
|
7
|
+
- [ ] Is the primary action or primary information obvious?
|
|
8
|
+
- [ ] Did we include only functionality we can actually support now?
|
|
9
|
+
|
|
10
|
+
## 2. Hierarchy
|
|
11
|
+
- [ ] Is there one clear visual entry point?
|
|
12
|
+
- [ ] Are secondary and tertiary elements quieter?
|
|
13
|
+
- [ ] Are we using weight/contrast/spacing, not just font size?
|
|
14
|
+
- [ ] Could any label be removed or merged into the value?
|
|
15
|
+
- [ ] If something important is weak, can competitors be de-emphasized instead?
|
|
16
|
+
|
|
17
|
+
## 3. Spacing and layout
|
|
18
|
+
- [ ] Do closer elements belong together?
|
|
19
|
+
- [ ] Are group-to-group gaps visibly larger than internal gaps?
|
|
20
|
+
- [ ] Are any gaps ambiguous?
|
|
21
|
+
- [ ] Are we filling width without a content reason?
|
|
22
|
+
- [ ] Does each region use an appropriate width instead of one forced grid?
|
|
23
|
+
- [ ] Are values drawn from a spacing/sizing scale?
|
|
24
|
+
|
|
25
|
+
## 4. Typography
|
|
26
|
+
- [ ] Are type sizes drawn from a small scale?
|
|
27
|
+
- [ ] Is body/UI text comfortably legible?
|
|
28
|
+
- [ ] Is line length controlled?
|
|
29
|
+
- [ ] Does line-height fit the text size?
|
|
30
|
+
- [ ] Are icons/text aligned optically or by baseline where appropriate?
|
|
31
|
+
- [ ] Are colored links used only when they need emphasis?
|
|
32
|
+
- [ ] Is centered text limited to short blocks?
|
|
33
|
+
|
|
34
|
+
## 5. Color
|
|
35
|
+
- [ ] Do colors belong to defined shade ramps?
|
|
36
|
+
- [ ] Are neutral colors coherent with the product personality?
|
|
37
|
+
- [ ] Is contrast sufficient for reading and controls?
|
|
38
|
+
- [ ] Is secondary text on colored surfaces intentionally color-matched rather than generic grey/opacity?
|
|
39
|
+
- [ ] Is any status communicated by color alone?
|
|
40
|
+
|
|
41
|
+
## 6. Depth and surfaces
|
|
42
|
+
- [ ] Do shadows imply a consistent elevation model?
|
|
43
|
+
- [ ] Are borders necessary?
|
|
44
|
+
- [ ] Could spacing or surface color replace some borders?
|
|
45
|
+
- [ ] Are radii consistent with the personality?
|
|
46
|
+
- [ ] Is overlap used only when it improves the composition?
|
|
47
|
+
|
|
48
|
+
## 7. Images
|
|
49
|
+
- [ ] Are source images high enough quality?
|
|
50
|
+
- [ ] Is text readable over every likely image?
|
|
51
|
+
- [ ] Are icons shown near their intended visual size?
|
|
52
|
+
- [ ] Are screenshots readable without squinting?
|
|
53
|
+
- [ ] Are user uploads safely cropped and constrained?
|
|
54
|
+
|
|
55
|
+
## 8. States
|
|
56
|
+
- [ ] Empty
|
|
57
|
+
- [ ] Loading
|
|
58
|
+
- [ ] Error
|
|
59
|
+
- [ ] Disabled
|
|
60
|
+
- [ ] Hover/focus/active
|
|
61
|
+
- [ ] Overflow / long text / large numbers
|
|
62
|
+
- [ ] Small and large viewport behavior
|
|
63
|
+
|
|
64
|
+
## 9. Polish
|
|
65
|
+
- [ ] Do empty states help the user act?
|
|
66
|
+
- [ ] Are accents/background decorations subordinate to content?
|
|
67
|
+
- [ ] Is the UI over-carded or over-bordered?
|
|
68
|
+
- [ ] Are repeated values converted to tokens/components?
|
|
69
|
+
- [ ] Did we solve structural problems before adding decoration?
|
|
70
|
+
|
|
71
|
+
## Final test
|
|
72
|
+
Hide the brand color and decorative imagery mentally. If the screen still has strong hierarchy, clear grouping, readable typography, and coherent actions, the foundation is good.
|