devflow-kit 3.11.0 → 3.12.1

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.
Files changed (206) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/agents/architect.md +91 -0
  3. package/dist/agents/code.md +21 -25
  4. package/dist/agents/debug.md +22 -50
  5. package/dist/agents/design.md +9 -43
  6. package/dist/agents/fix.md +15 -29
  7. package/dist/agents/git.md +19 -22
  8. package/dist/agents/harden.md +14 -19
  9. package/dist/agents/knowledge.md +11 -19
  10. package/dist/agents/refactor.md +9 -14
  11. package/dist/agents/research.md +11 -34
  12. package/dist/agents/review.md +22 -52
  13. package/dist/agents/skim.md +7 -17
  14. package/dist/agents/triage.md +7 -14
  15. package/dist/cli/commands/uninstall.js +1 -1
  16. package/dist/commands/bug-analysis.md +32 -63
  17. package/dist/commands/code-review.md +39 -88
  18. package/dist/commands/debug.md +32 -82
  19. package/dist/commands/dynamic-build.md +157 -211
  20. package/dist/commands/dynamic-plan.md +71 -93
  21. package/dist/commands/dynamic-profile.md +7 -155
  22. package/dist/commands/dynamic-tickets.md +65 -186
  23. package/dist/commands/explore.md +27 -70
  24. package/dist/commands/implement.md +101 -189
  25. package/dist/commands/plan.md +61 -108
  26. package/dist/commands/release.md +26 -92
  27. package/dist/commands/research.md +37 -106
  28. package/dist/commands/resolve.md +65 -129
  29. package/dist/commands/self-review.md +36 -100
  30. package/dist/compliance-off/agents/git.md +15 -18
  31. package/dist/compliance-off/agents/triage.md +7 -14
  32. package/dist/compliance-off/commands/bug-analysis.md +32 -63
  33. package/dist/compliance-off/commands/code-review.md +35 -83
  34. package/dist/compliance-off/commands/dynamic-build.md +151 -205
  35. package/dist/compliance-off/commands/dynamic-tickets.md +65 -186
  36. package/dist/compliance-off/commands/implement.md +97 -183
  37. package/dist/compliance-off/commands/plan.md +61 -108
  38. package/dist/compliance-off/commands/release.md +26 -91
  39. package/dist/compliance-off/commands/resolve.md +55 -129
  40. package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
  41. package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
  42. package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
  43. package/dist/core/plugins.js +3 -3
  44. package/dist/curation-compliance-off/agents/triage.md +7 -13
  45. package/dist/curation-compliance-off/commands/bug-analysis.md +22 -42
  46. package/dist/curation-compliance-off/commands/code-review.md +26 -63
  47. package/dist/curation-compliance-off/commands/dynamic-build.md +144 -194
  48. package/dist/curation-compliance-off/commands/dynamic-tickets.md +54 -173
  49. package/dist/curation-compliance-off/commands/implement.md +89 -164
  50. package/dist/curation-compliance-off/commands/plan.md +52 -87
  51. package/dist/curation-compliance-off/commands/release.md +18 -79
  52. package/dist/curation-compliance-off/commands/resolve.md +46 -109
  53. package/dist/curation-off/agents/architect.md +85 -0
  54. package/dist/curation-off/agents/code.md +20 -23
  55. package/dist/curation-off/agents/debug.md +20 -48
  56. package/dist/curation-off/agents/design.md +8 -41
  57. package/dist/curation-off/agents/fix.md +14 -27
  58. package/dist/curation-off/agents/harden.md +13 -18
  59. package/dist/curation-off/agents/knowledge.md +9 -17
  60. package/dist/curation-off/agents/refactor.md +8 -12
  61. package/dist/curation-off/agents/research.md +9 -32
  62. package/dist/curation-off/agents/review.md +11 -40
  63. package/dist/curation-off/agents/skim.md +7 -17
  64. package/dist/curation-off/agents/triage.md +7 -13
  65. package/dist/curation-off/commands/bug-analysis.md +22 -42
  66. package/dist/curation-off/commands/code-review.md +30 -68
  67. package/dist/curation-off/commands/debug.md +24 -63
  68. package/dist/curation-off/commands/dynamic-build.md +150 -200
  69. package/dist/curation-off/commands/dynamic-plan.md +60 -80
  70. package/dist/curation-off/commands/dynamic-tickets.md +54 -173
  71. package/dist/curation-off/commands/explore.md +18 -50
  72. package/dist/curation-off/commands/implement.md +93 -170
  73. package/dist/curation-off/commands/plan.md +52 -87
  74. package/dist/curation-off/commands/release.md +18 -80
  75. package/dist/curation-off/commands/research.md +26 -84
  76. package/dist/curation-off/commands/resolve.md +56 -109
  77. package/dist/curation-off/commands/self-review.md +27 -79
  78. package/dist/hud/components/version-badge.js +1 -1
  79. package/dist/skills/git/references/pr/update-pr-evidence.md +2 -1
  80. package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
  81. package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
  82. package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
  83. package/dist/targets/claude-code/curation-install.js +2 -2
  84. package/dist/variant-axes.json +5 -1
  85. package/package.json +1 -1
  86. package/src/assets/agents/_partials/_code.mds +3 -5
  87. package/src/assets/agents/_partials/_design.mds +86 -0
  88. package/src/assets/agents/architect.mds +45 -0
  89. package/src/assets/agents/code.mds +18 -20
  90. package/src/assets/agents/curate.md +26 -35
  91. package/src/assets/agents/debug.mds +22 -50
  92. package/src/assets/agents/design.mds +11 -114
  93. package/src/assets/agents/evaluate.md +6 -16
  94. package/src/assets/agents/explore.md +1 -2
  95. package/src/assets/agents/fix.mds +12 -24
  96. package/src/assets/agents/git.mds +20 -23
  97. package/src/assets/agents/harden.mds +14 -19
  98. package/src/assets/agents/knowledge.mds +10 -38
  99. package/src/assets/agents/polish.md +13 -39
  100. package/src/assets/agents/refactor.mds +6 -9
  101. package/src/assets/agents/research.mds +11 -34
  102. package/src/assets/agents/review.mds +12 -84
  103. package/src/assets/agents/skim.mds +7 -17
  104. package/src/assets/agents/synthesize.md +3 -21
  105. package/src/assets/agents/test.md +31 -32
  106. package/src/assets/agents/tracker.md +116 -229
  107. package/src/assets/agents/triage.mds +7 -26
  108. package/src/assets/agents/validate.md +1 -3
  109. package/src/assets/commands/_partials/_compliance.mds +2 -2
  110. package/src/assets/commands/_partials/_decisions.mds +17 -24
  111. package/src/assets/commands/_partials/_docs_root.mds +31 -10
  112. package/src/assets/commands/_partials/_engine.mds +36 -56
  113. package/src/assets/commands/_partials/_evidence_policy.mds +1 -1
  114. package/src/assets/commands/_partials/_factory.mds +10 -104
  115. package/src/assets/commands/_partials/_knowledge.mds +48 -52
  116. package/src/assets/commands/_partials/_plan_contract.mds +2 -2
  117. package/src/assets/commands/_partials/_preamble.mds +21 -21
  118. package/src/assets/commands/_partials/_publication.mds +3 -3
  119. package/src/assets/commands/_partials/_roster.mds +12 -13
  120. package/src/assets/commands/_partials/_settings.mds +6 -3
  121. package/src/assets/commands/_partials/_ticket_template.mds +3 -7
  122. package/src/assets/commands/_partials/_tracker.mds +10 -5
  123. package/src/assets/commands/_partials/_wave.mds +23 -32
  124. package/src/assets/commands/bug-analysis.mds +3 -7
  125. package/src/assets/commands/code-review.mds +12 -33
  126. package/src/assets/commands/debug.mds +5 -47
  127. package/src/assets/commands/dynamic-build.mds +48 -70
  128. package/src/assets/commands/dynamic-plan.mds +23 -42
  129. package/src/assets/commands/dynamic-profile.mds +7 -57
  130. package/src/assets/commands/dynamic-tickets.mds +9 -29
  131. package/src/assets/commands/explore.mds +5 -44
  132. package/src/assets/commands/implement.mds +77 -119
  133. package/src/assets/commands/plan.mds +27 -57
  134. package/src/assets/commands/release.mds +4 -62
  135. package/src/assets/commands/research.mds +9 -55
  136. package/src/assets/commands/resolve.mds +40 -87
  137. package/src/assets/commands/self-review.mds +5 -45
  138. package/src/assets/mds/git/_ops_pr.mds +1 -0
  139. package/src/assets/mds/git/_ops_steps.mds +4 -4
  140. package/src/assets/mds/git/_pr.mds +1 -1
  141. package/src/assets/rules/engineering.md +1 -1
  142. package/src/assets/rules/quality.md +2 -2
  143. package/src/assets/scripts/ci-wait.cjs +154 -19
  144. package/src/assets/scripts/hooks/assets/orchestrator-charter.md +3 -3
  145. package/src/assets/scripts/hooks/preamble +2 -3
  146. package/src/assets/scripts/pr-evidence.cjs +1 -0
  147. package/src/assets/scripts/resolve-evidence-policy.cjs +14 -13
  148. package/src/assets/scripts/resolve-root.cjs +190 -0
  149. package/src/assets/scripts/resolve-settings.cjs +14 -9
  150. package/src/assets/scripts/verify-evidence.cjs +551 -25
  151. package/src/assets/skills/accessibility/SKILL.md +28 -95
  152. package/src/assets/skills/agent-references/SKILL.md +2 -4
  153. package/src/assets/skills/agent-references/references/commands/implement-evidence-asks.md +1 -1
  154. package/src/assets/skills/agent-references/references/commands/implement-levels.md +4 -7
  155. package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +1 -1
  156. package/src/assets/skills/agent-references/references/commands/plan-levels.md +2 -2
  157. package/src/assets/skills/apply-decisions/SKILL.md +5 -6
  158. package/src/assets/skills/apply-feature-knowledge/SKILL.md +3 -13
  159. package/src/assets/skills/architecture/SKILL.md +29 -105
  160. package/src/assets/skills/boundary-validation/SKILL.md +27 -78
  161. package/src/assets/skills/complexity/SKILL.md +8 -104
  162. package/src/assets/skills/compliance/SKILL.md +9 -67
  163. package/src/assets/skills/consistency/SKILL.md +7 -107
  164. package/src/assets/skills/database/SKILL.md +7 -72
  165. package/src/assets/skills/dependencies/SKILL.md +9 -109
  166. package/src/assets/skills/dependencies/references/detection.md +10 -0
  167. package/src/assets/skills/dependency-research/SKILL.md +9 -63
  168. package/src/assets/skills/design-review/SKILL.md +14 -37
  169. package/src/assets/skills/docs-framework/SKILL.md +4 -47
  170. package/src/assets/skills/documentation/SKILL.md +7 -71
  171. package/src/assets/skills/documentation/references/patterns.md +1 -1
  172. package/src/assets/skills/documentation/references/violations.md +1 -1
  173. package/src/assets/skills/feature-knowledge/SKILL.md +19 -222
  174. package/src/assets/skills/feature-knowledge/references/new-kb.md +128 -0
  175. package/src/assets/skills/gap-analysis/SKILL.md +1 -31
  176. package/src/assets/skills/git/SKILL.md +2 -22
  177. package/src/assets/skills/go/SKILL.md +24 -113
  178. package/src/assets/skills/java/SKILL.md +12 -98
  179. package/src/assets/skills/patterns/SKILL.md +8 -93
  180. package/src/assets/skills/performance/SKILL.md +29 -88
  181. package/src/assets/skills/python/SKILL.md +22 -120
  182. package/src/assets/skills/qa/SKILL.md +16 -54
  183. package/src/assets/skills/qa/references/browser-testing.md +0 -24
  184. package/src/assets/skills/qa/references/sources.md +2 -2
  185. package/src/assets/skills/quality-gates/SKILL.md +13 -100
  186. package/src/assets/skills/react/SKILL.md +33 -95
  187. package/src/assets/skills/regression/SKILL.md +8 -73
  188. package/src/assets/skills/reliability/SKILL.md +11 -120
  189. package/src/assets/skills/research-codebase/SKILL.md +7 -49
  190. package/src/assets/skills/research-competitor/SKILL.md +4 -39
  191. package/src/assets/skills/research-external/SKILL.md +5 -43
  192. package/src/assets/skills/research-market/SKILL.md +5 -43
  193. package/src/assets/skills/research-technology/SKILL.md +8 -68
  194. package/src/assets/skills/review-methodology/SKILL.md +10 -56
  195. package/src/assets/skills/rust/SKILL.md +19 -109
  196. package/src/assets/skills/security/SKILL.md +39 -66
  197. package/src/assets/skills/software-design/SKILL.md +20 -105
  198. package/src/assets/skills/software-design/references/patterns.md +84 -2
  199. package/src/assets/skills/software-design/references/violations.md +1 -1
  200. package/src/assets/skills/test-driven-development/SKILL.md +32 -107
  201. package/src/assets/skills/test-driven-development/references/rationalization-prevention.md +33 -1
  202. package/src/assets/skills/testing/SKILL.md +35 -53
  203. package/src/assets/skills/typescript/SKILL.md +23 -102
  204. package/src/assets/skills/ui-design/SKILL.md +26 -74
  205. package/src/assets/skills/worktree-support/SKILL.md +4 -10
  206. package/dist/curation-off/commands/dynamic-profile.md +0 -214
@@ -21,136 +21,38 @@ activation:
21
21
  > Type-hint every function signature. Name every exception. Use dataclasses over raw
22
22
  > dicts. Python's flexibility is a strength only when boundaries are explicit.
23
23
 
24
- ## When This Skill Activates
25
-
26
- Working with Python codebases, designing typed APIs, modeling data with dataclasses
27
- or Pydantic, implementing async code, structuring Python packages.
28
-
29
- ---
30
-
31
24
  ## Type Safety
32
25
 
33
- ### Type Hint Everything [4][17][18]
34
-
35
- ```python
36
- # BAD: def process(data, config): ...
37
- def process(data: list[dict[str, Any]], config: AppConfig) -> ProcessResult: ...
38
- ```
39
-
40
- Dropbox's 4M-line mypy migration eliminated entire bug classes [18]. Use
41
- `from __future__ import annotations` for forward references [22].
42
-
43
- ### Protocols for Structural Typing [5][1]
44
-
45
- ```python
46
- from typing import Protocol
47
-
48
- class Repository(Protocol):
49
- def find_by_id(self, id: str) -> User | None: ...
50
- def save(self, entity: User) -> User: ...
51
- ```
52
-
53
- PEP 544 formalizes duck typing as "static duck typing" — no `implements`
54
- required [5]. Any class with matching methods satisfies the Protocol [1].
55
-
56
- ### Strict Optional Handling [4][23]
57
-
58
- PEP 604 `X | Y` syntax replaces verbose `Optional[X]` [23]:
59
-
60
- ```python
61
- def get_name(user: User | None) -> str:
62
- return "Anonymous" if user is None else user.name
63
- ```
64
-
65
- ---
66
-
67
- ## Error Handling [2][8][9]
68
-
69
- ```python
70
- class AppError(Exception): ...
26
+ - Annotate every parameter and the return: `def process(data: list[dict[str, Any]], config: AppConfig) -> ProcessResult`, not `def process(data, config)`.
27
+ - Use `from __future__ import annotations` for forward references, not string annotations (`x: "MyClass"`).
28
+ - Use `Protocol` for structural typing, over ABC: any class with matching methods satisfies it, with no `implements`.
29
+ - Write optionals as `User | None` (PEP 604), not `Optional[User]`, and handle `None` explicitly.
71
30
 
72
- class NotFoundError(AppError):
73
- def __init__(self, entity: str, id: str) -> None:
74
- super().__init__(f"{entity} {id} not found")
75
- self.entity, self.id = entity, id
31
+ ## Error Handling
76
32
 
77
- @contextmanager
78
- def database_transaction(conn: Connection):
79
- try:
80
- yield conn; conn.commit()
81
- except Exception:
82
- conn.rollback(); raise
83
- ```
33
+ - Define custom exception types: a base `AppError(Exception)` and subclasses (`NotFoundError`) that carry structured fields (`entity`, `id`).
34
+ - Catch named exceptions, `except (ValueError, KeyError):`. Never a bare `except:`: it catches `SystemExit`.
35
+ - Use context managers for resource cleanup and the unit of work: commit on success, roll back and re-raise on error.
84
36
 
85
- Google Style Guide prohibits bare `except:` — catches `SystemExit` [8].
86
- Cosmic Python wraps the unit-of-work in a context manager [9].
37
+ ## Data Modeling
87
38
 
88
- ---
89
-
90
- ## Data Modeling [6][12][14]
91
-
92
- ```python
93
- # Internal value objects — frozen enforces immutability [6][14]
94
- @dataclass(frozen=True)
95
- class User:
96
- name: str
97
- email: str
98
- created_at: datetime = field(default_factory=lambda: datetime.now(timezone.utc))
39
+ - Use `@dataclass(frozen=True)` for internal value objects, with `field(default_factory=...)` for computed defaults.
40
+ - Use Pydantic models at API boundaries: they validate on instantiation (`EmailStr`, `Field(ge=0, le=150)`).
41
+ - Use `@dataclass` for domain objects and Pydantic for API models — not interchangeably, and not raw dicts.
99
42
 
100
- # API boundary models — Pydantic validates on instantiation [12]
101
- class CreateUserRequest(BaseModel):
102
- name: str
103
- email: EmailStr
104
- age: int = Field(ge=0, le=150)
105
- ```
43
+ ## Pythonic Patterns
106
44
 
107
- PEP 557 gives `__init__`, `__repr__`, `__eq__` for free [6]. Use `@dataclass` for
108
- domain objects and Pydantic for API models — not interchangeably [9][12].
109
-
110
- ---
111
-
112
- ## Pythonic Patterns [2][3]
113
-
114
- ```python
115
- names = [u.name for u in users if u.active] # comprehension over loop [2]
116
- for i, item in enumerate(items): ... # enumerate, not range(len) [2]
117
- try: # EAFP over LBYL [3]
118
- value = mapping[key]
119
- except KeyError:
120
- value = default
121
- ```
122
-
123
- ---
124
-
125
- ## Anti-Patterns [2][8][14][4]
126
-
127
- | Pattern | Violation | Fix |
128
- |---------|-----------|-----|
129
- | Bare except | `except:` | `except (ValueError, KeyError):` [8] |
130
- | Mutable default | `def fn(items=[])` | `def fn(items: list \| None = None)` [2] |
131
- | No type hints | `def process(data)` | Annotate params + return [4] |
132
- | Forward ref string | `x: "MyClass"` | `from __future__ import annotations` [22] |
133
- | God class | 50-method class | Compose smaller focused classes [9] |
134
-
135
- ---
45
+ - Comprehensions over loops: `[u.name for u in users if u.active]`.
46
+ - `enumerate(items)`, not `range(len(items))`.
47
+ - EAFP over LBYL: `try: value = mapping[key]` with `except KeyError`.
48
+ - No mutable default arguments: `def fn(items: list | None = None)`, not `def fn(items=[])`.
49
+ - Compose smaller focused classes, not a 50-method god class.
50
+ - Tests use pytest fixtures, no repeated setup.
136
51
 
137
52
  ## Extended References
138
53
 
139
- - `references/sources.md` — Full bibliography (25 sources)
140
- - `references/patterns.md` — Extended patterns: DI, decorators, fixtures [2][9][10][13]
54
+ - `references/sources.md` — Full bibliography
55
+ - `references/patterns.md` — Extended patterns: DI, decorators, fixtures
141
56
  - `references/violations.md` — Violation examples with citations
142
57
  - `references/detection.md` — Grep patterns for Python issues
143
- - `references/async.md` — Async patterns: gather, TaskGroup, generators [1][16]
144
-
145
- ---
146
-
147
- ## Checklist
148
-
149
- - [ ] All functions annotated (params + return) [4]
150
- - [ ] Custom exception types, no bare `except:` [8]
151
- - [ ] Dataclasses or Pydantic for structured data [6][12]
152
- - [ ] No mutable default arguments [2]
153
- - [ ] Context managers for resource cleanup [10]
154
- - [ ] `from __future__ import annotations` for forward refs [22]
155
- - [ ] Protocols over ABC for structural typing [5]
156
- - [ ] Tests use pytest fixtures, no repeated setup [13]
58
+ - `references/async.md` — Async patterns: gather, TaskGroup, generators
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: qa
3
- description: This skill should be used when designing or running scenario-based acceptance tests.
3
+ description: Use when designing or running scenario-based acceptance tests.
4
4
  user-invocable: false
5
5
  allowed-tools: Read, Grep, Glob, Bash
6
6
  ---
7
7
 
8
8
  # QA Patterns
9
9
 
10
- Scenario-based acceptance testing methodology. Ensures implementations satisfy user-observable requirements beyond what unit tests cover.
10
+ Scenario-based acceptance testing: checks that an implementation satisfies user-observable requirements beyond what unit tests cover.
11
11
 
12
12
  ## Iron Law
13
13
 
@@ -17,11 +17,7 @@ Scenario-based acceptance testing methodology. Ensures implementations satisfy u
17
17
  > gets at least one scenario. Every scenario produces observable evidence. If you can't
18
18
  > demonstrate it works from the outside, it doesn't work. [3][8]
19
19
 
20
- ---
21
-
22
- ## Scenario Types [1][2][6]
23
-
24
- Five categories ensure comprehensive coverage:
20
+ ## Scenario Types
25
21
 
26
22
  | Type | Purpose | Example |
27
23
  |------|---------|---------|
@@ -31,9 +27,9 @@ Five categories ensure comprehensive coverage:
31
27
  | **Integration** | Components work together correctly | "Add item → appears in search results" |
32
28
  | **Regression** | Existing behavior preserved after changes | "Old items still load after schema migration" |
33
29
 
34
- **Minimum coverage**: At least one scenario per acceptance criterion. At least one boundary and one negative scenario per feature. [1][6]
30
+ **Minimum coverage**: At least one scenario per acceptance criterion. At least one boundary and one negative scenario per feature.
35
31
 
36
- ## Scenario Design from Acceptance Criteria [4][8][9]
32
+ ## Scenario Design from Acceptance Criteria
37
33
 
38
34
  Extract testable claims using Given/When/Then:
39
35
 
@@ -47,49 +43,28 @@ S4 (negative): Given no auth, When upload 5MB file, Then 401
47
43
  S5 (negative): Given auth user, When upload empty file, Then 400
48
44
  ```
49
45
 
50
- **Extracting criteria** [4]: If no explicit acceptance criteria, derive from the request:
46
+ **Extracting criteria**: If no explicit acceptance criteria, derive from the request:
51
47
  1. What new behavior was requested? → happy path scenarios
52
- 2. What inputs does it accept? → boundary scenarios [7][10]
48
+ 2. What inputs does it accept? → boundary scenarios
53
49
  3. What should it reject? → negative scenarios
54
50
  4. What existing behavior must survive? → regression scenarios
55
51
 
56
- ## Equivalence Partitioning & Boundary Analysis [1][6][7]
57
-
58
- Reduce infinite inputs to representative cases:
59
-
60
- - **Valid partition**: One representative value from each valid class
61
- - **Invalid partition**: One representative from each invalid class
62
- - **Boundary values**: On, just below, just above each boundary [10]
63
-
64
- ```
65
- Input: age (integer, 0-120 allowed)
66
- ├── Valid: 25 (mid-range), 0 (minimum), 120 (maximum)
67
- ├── Invalid: -1 (below min), 121 (above max), "abc" (wrong type)
68
- └── Boundary: 0, 1, 119, 120
69
- ```
52
+ **Partitions and boundaries**: Take one representative value from each valid and each invalid input class, plus the values on, just below and just above each boundary.
70
53
 
71
- ## Exploratory Testing Heuristics [2][3][11]
54
+ ## Exploratory Testing Heuristics
72
55
 
73
56
  When acceptance criteria are vague, use structured exploration:
74
57
 
75
- - **CRUD tour** [11]: Create, Read, Update, Delete — does each operation work end-to-end?
76
- - **Configuration tour** [11]: Change every configurable value — does the system adapt?
77
- - **Error tour** [3]: Force every error path — are messages helpful, is state clean?
78
- - **Boundary tour** [3][11]: Push every input to its limits
58
+ - **CRUD tour**: Create, Read, Update, Delete — does each operation work end-to-end?
59
+ - **Configuration tour**: Change every configurable value — does the system adapt?
60
+ - **Error tour**: Force every error path — are messages helpful, is state clean?
61
+ - **Boundary tour**: Push every input to its limits
79
62
 
80
- ## Evidence Collection
63
+ ## Evidence
81
64
 
82
- Every scenario must produce verifiable evidence:
65
+ Every scenario produces verifiable evidence: the exit code and output of each command, plus the file state (`ls -la`, `diff`) for file changes, the HTTP status for an API endpoint, or the log lines for a background process.
83
66
 
84
- | Evidence Type | How to Capture | When to Use |
85
- |--------------|----------------|-------------|
86
- | Exit codes | `echo $?` after command | CLI tools, scripts |
87
- | Stdout/stderr | Redirect to capture | All command execution |
88
- | File state | `ls -la`, `diff`, `cat` | File creation/modification |
89
- | HTTP status | Response code from curl/fetch | API endpoints |
90
- | Log output | Grep logs after action | Background processes |
91
-
92
- ## Browser-Based Scenarios [8][12]
67
+ ## Browser-Based Scenarios
93
68
 
94
69
  When implementation includes web-facing changes (.tsx, .jsx, .html, routes, pages):
95
70
 
@@ -101,19 +76,8 @@ When implementation includes web-facing changes (.tsx, .jsx, .html, routes, page
101
76
  | Console clean | Navigate → read console | No errors/warnings logged |
102
77
  | Navigation works | Click links → verify URL change | Correct page loaded |
103
78
 
104
- **Dev server lifecycle**: Check for running server first. If none, auto-start from package.json scripts, poll for readiness, kill after testing. Never kill pre-existing servers.
105
- **Testability assessment**: Before designing scenarios, assess what local infrastructure is available (DB, Redis, external APIs). Mark scenarios requiring unavailable infrastructure as SKIPPED.
106
79
  **Graceful degradation**: If browser tools or dev server unavailable, fall back to curl/API testing. Always report what was skipped and why alongside what was tested.
107
80
 
108
- ## Severity Classification
109
-
110
- | Level | Meaning | Action |
111
- |-------|---------|--------|
112
- | **BLOCKING** | Acceptance criterion violated — feature does not work as requested | Report FAIL — Fix agent must fix |
113
- | **WARNING** | Edge case concern — feature works but edge behavior is unexpected | Report PASS with warnings — note for improvement |
114
-
115
- ---
116
-
117
81
  ## Extended References
118
82
 
119
83
  For additional scenario templates and anti-patterns:
@@ -122,8 +86,6 @@ For additional scenario templates and anti-patterns:
122
86
  - `references/violations.md` — QA anti-patterns to avoid
123
87
  - `references/scenario-templates.md` — Templates for common feature types
124
88
 
125
- ---
126
-
127
89
  ## Success Criteria
128
90
 
129
91
  - [ ] Every acceptance criterion has at least one scenario
@@ -71,27 +71,3 @@ Requires: Chrome MCP tools available + dev server running.
71
71
  g. Record evidence from each step
72
72
 
73
73
  3. After all browser scenarios: close the tab created in step 1
74
-
75
- ---
76
-
77
- ## Bash Execution Constraints
78
-
79
- When executing scenarios via Bash, these constraints are mandatory:
80
-
81
- **NEVER execute:**
82
- - Destructive filesystem commands: `rm -rf`, `rmdir`, `truncate`, `shred`
83
- - Privilege escalation: `sudo`, `su`, `chown`, `chmod` on system directories
84
- - Code injection vectors: `eval`, `exec`, shell substitution on untrusted input
85
- - Package management: `npm install -g`, `pip install`, `brew install`, `apt-get`
86
- - Network exfiltration: outbound curl/wget to external hosts not under test
87
-
88
- **ONLY run:**
89
- - Test runners: `npm test`, `pytest`, `go test`, `cargo test`, `jest`, `mocha`
90
- - Build commands: `npm run build`, `go build`, `cargo build`
91
- - Read-only file inspection: `cat`, `ls`, `diff`, `head`, `tail`, `grep`
92
- - Readiness checks: `curl` to `localhost` only, `lsof`, `pg_isready`, `redis-cli ping`
93
- - Process management for servers WE started: `kill $DEV_SERVER_PID`
94
-
95
- **Filesystem writes restricted to:**
96
- - Temporary files created via `mktemp` in `/tmp/devflow-tester-*`
97
- - Project test directories (e.g., `__tests__/fixtures/`, `test/data/`)
@@ -25,6 +25,6 @@ Canonical references for scenario-based acceptance testing methodology.
25
25
  |---------|----------------|-------------------|
26
26
  | Scenario Types | [1] Myers, [2] Kaner, [6] Copeland | [5] Crispin Q2/Q3 quadrants |
27
27
  | Scenario Design from Criteria | [4] Adzic, [8] Freeman, [9] Smart | [5] Crispin acceptance testing |
28
- | Equivalence Partitioning | [1] Myers, [6] Copeland, [7] Beizer | [10] Ammann ISP |
28
+ | Partitions and boundaries | [1] Myers, [6] Copeland, [7] Beizer | [10] Ammann ISP |
29
29
  | Exploratory Heuristics | [2] Kaner, [3] Hendrickson, [11] Whittaker | [5] Crispin session-based |
30
- | Evidence Collection | [8] Freeman (observable behavior), [12] Google | [4] Adzic (living docs) |
30
+ | Evidence | [8] Freeman (observable behavior), [12] Google | [4] Adzic (living docs) |
@@ -1,24 +1,20 @@
1
1
  ---
2
2
  name: quality-gates
3
- description: This skill should be used when evaluating implementation quality before submission.
3
+ description: Use when evaluating implementation quality before submission.
4
4
  user-invocable: false
5
5
  allowed-tools: Read, Grep, Glob, Edit, Write, Bash
6
6
  ---
7
7
 
8
8
  # Self-Review Framework
9
9
 
10
- Systematic self-review for the Harden agent. Evaluate implementation against 9 pillars. **Fix issues, don't just report them.**
11
-
12
- Based on [Google Engineering Practices](https://google.github.io/eng-practices/review/reviewer/looking-for.html).
10
+ Self-review for the Harden agent: evaluate the implementation against 9 pillars, and fix the issues you find.
13
11
 
14
12
  ## Iron Law
15
13
 
16
- > **FIX BEFORE RETURNING**
14
+ > **Fix before returning**
17
15
  >
18
- > Self-review is not a report generator. It's a quality gate. If you find a P0 or P1 issue,
19
- > you fix it. You only return when all critical issues are resolved. Pride in craftsmanship.
20
-
21
- ---
16
+ > Self-review is a quality gate, not a report. If you find a P0 or P1 issue, fix it.
17
+ > Return only when every critical issue is resolved, or a P0 issue is BLOCKED.
22
18
 
23
19
  ## The 9 Pillars
24
20
 
@@ -48,102 +44,19 @@ Errors handled explicitly? No swallowed exceptions, helpful messages, resources
48
44
  ### P1 - Tests
49
45
  New code tested? Covers happy path, errors, edges. Tests behavior, not implementation.
50
46
 
51
- ### P2 - Naming and Consistency
52
- Owned by the Polish agent, which applies the project's naming and style standards. Report both as SKIP; do not judge or fix them here.
53
-
54
47
  ### P2 - Documentation
55
48
  Will others understand? Complex logic commented, public APIs documented, no outdated comments.
56
49
 
57
- ---
58
-
59
- ## Quick Examples
60
-
61
- ### Design Red Flag
62
- ```typescript
63
- // BAD: Direct DB in controller (violates layers)
64
- class UserController {
65
- async getUser(req, res) {
66
- const user = await db.query('SELECT * FROM users WHERE id = ?', [req.params.id]);
67
- }
68
- }
69
- ```
70
-
71
- ### Security Red Flag
72
- ```typescript
73
- // BAD: SQL injection
74
- const query = `SELECT * FROM users WHERE email = '${email}'`;
75
-
76
- // BAD: Missing auth
77
- app.delete('/api/users/:id', async (req, res) => {
78
- await deleteUser(req.params.id); // No auth check!
79
- });
80
- ```
81
-
82
- ---
83
-
84
- ## Self-Review Process
85
-
86
- ### Step 1: Gather Changes
87
- ```bash
88
- git diff --name-only HEAD~1
89
- git diff HEAD~1
90
- ```
91
-
92
- ### Step 2: Evaluate P0 Pillars
93
- Check Design, Functionality, Security. If issues found and fixable, fix immediately. If unfixable, STOP and report blocker.
94
-
95
- ### Step 3: Evaluate P1 Pillars
96
- Check Complexity, Error Handling, Tests. Fix issues found.
97
-
98
- ### Step 4: Evaluate P2 Pillars
99
- Check Documentation and fix it if straightforward. Naming and Consistency are the Polish agent's: SKIP.
100
-
101
- ### Step 5: Generate Report
102
- Document status of each pillar, fixes applied, and overall readiness.
50
+ ## Process
103
51
 
104
- ---
105
-
106
- ## Output Format
107
-
108
- ```markdown
109
- ## Self-Review Report
110
-
111
- ### P0 Pillars
112
- - Design: PASS/FIXED
113
- - Functionality: PASS/FIXED
114
- - Security: PASS/FIXED
115
-
116
- ### P1 Pillars
117
- - Complexity: PASS/FIXED
118
- - Error Handling: PASS/FIXED
119
- - Tests: PASS/FIXED
120
-
121
- ### P2 Pillars
122
- - Naming: SKIP (Polish agent)
123
- - Consistency: SKIP (Polish agent)
124
- - Documentation: PASS/FIXED
125
-
126
- ### Summary
127
- Issues Found: {n}, Fixed: {n}
128
- Status: PASS / FIXED / BLOCKED
129
- ```
52
+ Evaluate P0, then P1, then P2, and fix each issue when you find it. If a P0 issue cannot be fixed, stop and report the blocker.
130
53
 
131
- ---
54
+ Report each pillar as PASS, FIXED or BLOCKED, Naming and Consistency as SKIP, and the overall Status: PASS / FIXED / BLOCKED.
132
55
 
133
56
  ## Extended References
134
57
 
135
- For detailed checklists, examples, and red flags for each pillar:
136
- - See `references/patterns.md` (9-pillar evaluation patterns and issue classification)
137
- - See `references/violations.md` (pillar-organized anti-patterns and P0/P1 red flags)
138
-
139
- For complete report templates and examples:
140
- - See `references/report-template.md`
141
-
142
- ---
143
-
144
- ## Integration
145
-
146
- Used by:
147
- - **Harden agent**: Dedicated self-review in fresh context after the Code agent completes
148
-
149
- The self-review ensures implementations meet quality standards before external review, catching issues early.
58
+ Read one only when a pillar judgment needs more detail:
59
+ - `references/patterns.md`: 9-pillar evaluation patterns and issue classification
60
+ - `references/violations.md`: pillar-organized anti-patterns and P0/P1 red flags
61
+ - `references/stub-detection.md`: stub and wiring-gap patterns
62
+ - `references/report-template.md`: complete report templates and examples
@@ -15,7 +15,7 @@ activation:
15
15
 
16
16
  # React Patterns
17
17
 
18
- Reference for React-specific patterns with citations. Sources in `references/sources.md`.
18
+ Sources in `references/sources.md`.
19
19
 
20
20
  ## Iron Law
21
21
 
@@ -26,118 +26,56 @@ Reference for React-specific patterns with citations. Sources in `references/sou
26
26
  > or composition. Props are for configuration, not data plumbing.
27
27
  > "Before You memo(), try solving it with composition." — Dan Abramov [4]
28
28
 
29
- ## When This Skill Activates
29
+ ## Component Structure
30
30
 
31
- - Working with React codebases (.tsx, .jsx) — components, hooks, contexts, performance
31
+ - Order a functional component: hooks → derived state → handlers → return.
32
+ - Share structure through compound components and `children` (`Card` with `Card.Header`), not props.
33
+ - Use context for shared state across distant components, at the level that needs it. Its hook throws outside the provider: `if (!ctx) throw new Error('useAuth must be used within AuthProvider')`.
34
+ - Use stable unique IDs as list keys, not the index.
35
+ - Put error boundaries around risky components, and handle loading and error states.
36
+ - Accessibility: `aria-*`, `role`, labels on form inputs.
32
37
 
33
- ---
34
-
35
- ## Component Structure [1][2]
36
-
37
- **Functional component order**: hooks → derived state → handlers → return. [1]
38
-
39
- **Compound components** share structure through children, not props: [2][4]
40
-
41
- ```tsx
42
- function Card({ children }: { children: React.ReactNode }) {
43
- return <div className="card">{children}</div>;
44
- }
45
- Card.Header = ({ children }: { children: React.ReactNode }) =>
46
- <div className="card-header">{children}</div>;
47
- ```
48
-
49
- **Context** for shared state across distant components — eliminates prop drilling: [1][2]
38
+ ## Hooks
50
39
 
51
- ```tsx
52
- const AuthContext = createContext<AuthContextValue | null>(null);
53
- export function useAuth() {
54
- const ctx = useContext(AuthContext);
55
- if (!ctx) throw new Error('useAuth must be used within AuthProvider');
56
- return ctx;
57
- }
58
- ```
59
-
60
- ---
61
-
62
- ## Hooks [3][16][24]
63
-
64
- Hooks must be called at the **top level** — never inside conditions, loops, or nested functions. [16][24]
65
- Effects synchronize with external systems; they are not lifecycle methods. [3]
66
- Every effect that subscribes must return a cleanup function. Deps must be complete — never omit to suppress warnings. [3]
40
+ Hooks must be called at the top level — never inside conditions, loops, or nested functions.
41
+ Effects synchronize with external systems; they are not lifecycle methods.
42
+ Every effect that subscribes must return a cleanup function. Deps must be complete — never omit to suppress warnings.
67
43
 
68
44
  See `references/hooks.md` for rules of hooks, custom hooks, useReducer, and effect anti-patterns.
69
45
 
70
- ---
46
+ ## Performance
71
47
 
72
- ## Performance [3][4][5][17]
48
+ The React Compiler handles many memoizations automatically. For manual optimization, follow this priority:
73
49
 
74
- The React Compiler (2024) handles many memoizations automatically [17]. For manual
75
- optimization, follow this priority: [4]
50
+ 1. Composition first — "before you memo(), try passing children down"
51
+ 2. Extract primitives for `useEffect` deps — avoid object/array literals
52
+ 3. `useMemo` for expensive computations; `useCallback` for stable handlers to memoized children
53
+ 4. `React.memo` only when parent has stable, memoized callbacks
54
+ 5. Virtualize long lists (react-window); lazy-load heavy components
76
55
 
77
- 1. **Composition first** — "before you memo(), try passing children down" [4]
78
- 2. **Extract primitives** for `useEffect` deps — avoid object/array literals [3]
79
- 3. **`useMemo`** for expensive computations; **`useCallback`** for stable handlers [3]
80
- 4. **`React.memo`** only when parent has stable, memoized callbacks [4]
81
- 5. **Virtualize** long lists (react-window) [5]; **lazy-load** heavy components [5]
56
+ - Compute derived state during render with `useMemo`, not with `useState` + `useEffect`.
57
+ - Parallelize independent fetches: `await Promise.all([fetchUser(id), fetchOrders(id)])`.
58
+ - Use a `Set` or `Map` from `useMemo` for O(1) lookups, not `Array.find`/`includes` in render loops.
59
+ - Use direct named imports (tree-shakable), not barrel imports.
60
+ - Give images explicit dimensions, lazy loading, and aspect-ratio.
82
61
 
83
- ```tsx
84
- const [user, orders] = await Promise.all([fetchUser(id), fetchOrders(id)]); // parallel [1]
85
- const filtered = useMemo(() => users.filter(u => u.name.includes(q)), [users, q]); // derived [13]
86
- const selectedSet = useMemo(() => new Set(selected), [selected]); // O(1) lookup [5]
87
- ```
62
+ ## State Architecture
88
63
 
89
- ---
90
-
91
- ## State Architecture [1][14]
92
-
93
- | Pattern | When to Use | Source |
94
- |---------|-------------|--------|
95
- | `useState` | Simple, independent values | [1] |
96
- | `useReducer` | Complex state with multiple transitions | [14] |
97
- | Context | Shared state across distant components | [1][2] |
98
- | Server Components | Server-only data; zero bundle impact | [6][7] |
64
+ | Pattern | When to Use |
65
+ |---------|-------------|
66
+ | `useState` | Simple, independent values |
67
+ | `useReducer` | Complex state with multiple transitions |
68
+ | Context | Shared state across distant components |
69
+ | Server Components | Server-only data; zero bundle impact |
99
70
 
100
71
  Server Components render on the server and stream to the client — no `useEffect`
101
- or API route required for data fetching. [6][7]
102
-
103
- ---
104
-
105
- ## Key Anti-Patterns [3][13]
106
-
107
- | Anti-Pattern | Correct Approach | Source |
108
- |-------------|-----------------|--------|
109
- | Derived state in `useState` + `useEffect` | Compute with `useMemo` during render | [13] |
110
- | Object/array literal in `useEffect` deps | Extract to primitives | [3] |
111
- | Missing cleanup in `useEffect` | Always return cleanup function | [3] |
112
- | Prop drilling (3+ levels) | Context or composition | [2][4] |
113
- | Barrel imports | Direct named imports (tree-shakable) | [5] |
114
- | `Array.find`/`includes` in render loops | `Map`/`Set` via `useMemo` | [5] |
115
- | Index as list key | Use stable unique IDs | [1] |
116
-
117
- ---
72
+ or API route required for data fetching.
118
73
 
119
74
  ## Extended References
120
75
 
121
- - `references/sources.md` — Full bibliography (24 sources)
76
+ - `references/sources.md` — Full bibliography
122
77
  - `references/patterns.md` — Extended correct patterns with citations
123
78
  - `references/violations.md` — Extended violation examples with citations
124
79
  - `references/hooks.md` — Hook rules, custom hooks, useEffect deep-dive, utilities
125
80
  - `references/forms.md` — Controlled/uncontrolled, validation, Server Actions
126
81
  - `references/error-handling.md` — Error boundaries, Suspense, async error states
127
-
128
- ---
129
-
130
- ## Checklist
131
-
132
- - [ ] Hooks at top level — no conditions or loops [16][24]
133
- - [ ] All `useEffect` deps included; cleanup returned [3]
134
- - [ ] `useCallback` for handlers to memoized children; `useMemo` for expensive values [4]
135
- - [ ] Context at appropriate level — no prop drilling [2]
136
- - [ ] Error boundaries around risky components [1]
137
- - [ ] Unique stable keys on list items — not index [1]
138
- - [ ] Loading and error states handled [13]
139
- - [ ] Accessibility: `aria-*`, `role`, labels on form inputs [21][22]
140
- - [ ] Independent fetches parallelized with `Promise.all` [1]
141
- - [ ] Direct imports — no barrel imports; lazy-load heavy components [5]
142
- - [ ] `Set`/`Map` for O(1) lookups instead of `Array.includes`/`find` [5]
143
- - [ ] Images have explicit dimensions, lazy loading, and aspect-ratio [23]