@brunosps00/dev-workflow 2.2.0 → 2.4.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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +121 -0
- package/README.md +25 -15
- package/lib/constants.js +39 -36
- package/lib/doctor.js +1 -1
- package/lib/init.js +8 -0
- package/lib/instruction-health.js +38 -0
- package/lib/post-update.js +2 -1
- package/lib/validate.js +3 -1
- package/package.json +1 -1
- package/scaffold/agent-registry.json +17 -1
- package/scaffold/agents/core/dw-finding-refuter.md +55 -0
- package/scaffold/config/routing.json +61 -23
- package/scaffold/en/agent-instructions.md +32 -137
- package/scaffold/en/commands/dw-analyze-project.md +2 -0
- package/scaffold/en/commands/dw-autopilot.md +36 -241
- package/scaffold/en/commands/dw-brainstorm.md +1 -1
- package/scaffold/en/commands/dw-bugfix.md +10 -35
- package/scaffold/en/commands/dw-claude-run.md +47 -45
- package/scaffold/en/commands/dw-codex-run.md +48 -45
- package/scaffold/en/commands/dw-context-budget.md +6 -14
- package/scaffold/en/commands/dw-copilot-run.md +47 -41
- package/scaffold/en/commands/dw-find-skills.md +3 -1
- package/scaffold/en/commands/dw-generate-pr.md +2 -2
- package/scaffold/en/commands/dw-goal.md +25 -5
- package/scaffold/en/commands/dw-help.md +3 -3
- package/scaffold/en/commands/dw-install-aws-skills.md +2 -0
- package/scaffold/en/commands/dw-install-azure-skills.md +2 -0
- package/scaffold/en/commands/dw-plan.md +15 -8
- package/scaffold/en/commands/dw-qa.md +3 -0
- package/scaffold/en/commands/dw-resume.md +5 -11
- package/scaffold/en/commands/dw-review.md +154 -10
- package/scaffold/en/commands/dw-run.md +47 -177
- package/scaffold/en/commands/dw-secure-audit.md +4 -0
- package/scaffold/en/commands/dw-skill-health.md +39 -0
- package/scaffold/en/commands/dw-triage.md +8 -0
- package/scaffold/en/commands/dw-update.md +18 -4
- package/scaffold/en/references/automode.md +71 -0
- package/scaffold/en/references/command-routing.md +54 -0
- package/scaffold/en/references/execution-contract.md +55 -0
- package/scaffold/en/references/invariants.md +88 -0
- package/scaffold/en/references/untrusted-input.md +69 -0
- package/scaffold/en/templates/constitution-template.md +1 -0
- package/scaffold/en/templates/frontend-quality-template.md +43 -0
- package/scaffold/en/templates/task-template.md +20 -40
- package/scaffold/en/templates/tasks-template.md +9 -6
- package/scaffold/en/templates/techspec-template.md +4 -0
- package/scaffold/en/templates/triage-record-template.md +5 -0
- package/scaffold/pt-br/agent-instructions.md +32 -137
- package/scaffold/pt-br/commands/dw-analyze-project.md +3 -1
- package/scaffold/pt-br/commands/dw-autopilot.md +36 -241
- package/scaffold/pt-br/commands/dw-brainstorm.md +1 -1
- package/scaffold/pt-br/commands/dw-bugfix.md +10 -35
- package/scaffold/pt-br/commands/dw-claude-run.md +47 -46
- package/scaffold/pt-br/commands/dw-codex-run.md +48 -45
- package/scaffold/pt-br/commands/dw-context-budget.md +6 -14
- package/scaffold/pt-br/commands/dw-copilot-run.md +47 -43
- package/scaffold/pt-br/commands/dw-find-skills.md +3 -1
- package/scaffold/pt-br/commands/dw-generate-pr.md +2 -2
- package/scaffold/pt-br/commands/dw-goal.md +25 -5
- package/scaffold/pt-br/commands/dw-help.md +3 -3
- package/scaffold/pt-br/commands/dw-install-aws-skills.md +2 -0
- package/scaffold/pt-br/commands/dw-install-azure-skills.md +2 -0
- package/scaffold/pt-br/commands/dw-plan.md +15 -8
- package/scaffold/pt-br/commands/dw-qa.md +3 -0
- package/scaffold/pt-br/commands/dw-resume.md +7 -11
- package/scaffold/pt-br/commands/dw-review.md +154 -10
- package/scaffold/pt-br/commands/dw-run.md +47 -177
- package/scaffold/pt-br/commands/dw-secure-audit.md +5 -1
- package/scaffold/pt-br/commands/dw-skill-health.md +39 -0
- package/scaffold/pt-br/commands/dw-triage.md +8 -0
- package/scaffold/pt-br/commands/dw-update.md +18 -4
- package/scaffold/pt-br/references/automode.md +72 -0
- package/scaffold/pt-br/references/command-routing.md +54 -0
- package/scaffold/pt-br/references/execution-contract.md +55 -0
- package/scaffold/pt-br/references/invariants.md +88 -0
- package/scaffold/pt-br/references/untrusted-input.md +70 -0
- package/scaffold/pt-br/templates/constitution-template.md +1 -0
- package/scaffold/pt-br/templates/frontend-quality-template.md +43 -0
- package/scaffold/pt-br/templates/task-template.md +20 -40
- package/scaffold/pt-br/templates/tasks-template.md +9 -6
- package/scaffold/pt-br/templates/techspec-template.md +4 -0
- package/scaffold/pt-br/templates/triage-record-template.md +5 -0
- package/scaffold/scripts/hooks/git-guardrails.mjs +12 -0
- package/scaffold/scripts/hooks/session-cost.mjs +122 -7
- package/scaffold/scripts/lib/workflow-contract.mjs +101 -0
- package/scaffold/skill-registry.json +35 -23
- package/scaffold/skills/dw-chaos-engineering/SKILL.md +126 -0
- package/scaffold/skills/dw-chaos-engineering/references/vector-catalog.md +43 -0
- package/scaffold/skills/dw-cli-run/SKILL.md +39 -215
- package/scaffold/skills/dw-cli-run/references/dispatch-tuning.md +14 -72
- package/scaffold/skills/dw-codebase-intel/SKILL.md +5 -39
- package/scaffold/skills/dw-codebase-intel/agents/intel-updater.md +1 -1
- package/scaffold/skills/dw-codebase-intel/references/agents-detail.md +7 -0
- package/scaffold/skills/dw-codebase-intel/references/files-in-dw-intel-detail.md +16 -0
- package/scaffold/skills/dw-codebase-intel/references/how-dw-intel-reads-this-detail.md +12 -0
- package/scaffold/skills/dw-codebase-intel/references/how-to-compose-the-typical-flow-detail.md +11 -0
- package/scaffold/skills/dw-council/SKILL.md +2 -17
- package/scaffold/skills/dw-council/references/integration-with-other-dw-commands-detail.md +7 -0
- package/scaffold/skills/dw-council/references/phase-2-tensions-and-rebuttals-detail.md +15 -0
- package/scaffold/skills/dw-debug-protocol/references/six-step-triage.md +1 -0
- package/scaffold/skills/dw-domain-modeling/SKILL.md +1 -1
- package/scaffold/skills/dw-execute-phase/SKILL.md +12 -32
- package/scaffold/skills/dw-execute-phase/agents/executor.md +15 -252
- package/scaffold/skills/dw-execute-phase/agents/plan-checker.md +4 -207
- package/scaffold/skills/dw-execute-phase/references/atomic-commits.md +8 -18
- package/scaffold/skills/dw-execute-phase/references/de-sloppify-pass-optional-cleanup-task-detail.md +12 -0
- package/scaffold/skills/dw-execute-phase/references/deviation-rules-during-execution-detail.md +8 -0
- package/scaffold/skills/dw-execute-phase/references/how-the-two-agents-compose-detail.md +7 -0
- package/scaffold/skills/dw-execute-phase/references/plan-verification.md +9 -155
- package/scaffold/skills/dw-execute-phase/references/wave-coordination.md +6 -97
- package/scaffold/skills/dw-git-discipline/SKILL.md +2 -2
- package/scaffold/skills/dw-grilling/SKILL.md +1 -1
- package/scaffold/skills/dw-incident-response/SKILL.md +1 -64
- package/scaffold/skills/dw-incident-response/references/the-five-phases-detail.md +66 -0
- package/scaffold/skills/dw-llm-eval/SKILL.md +6 -53
- package/scaffold/skills/dw-llm-eval/references/agent-tool-use-evaluation-detail.md +23 -0
- package/scaffold/skills/dw-llm-eval/references/anti-patterns-will-block-in-dw-review-code-only-detail.md +9 -0
- package/scaffold/skills/dw-llm-eval/references/bounded-decisions.md +76 -0
- package/scaffold/skills/dw-llm-eval/references/consistency-run-to-run-stability-detail.md +10 -0
- package/scaffold/skills/dw-llm-eval/references/integration-with-dev-workflow-commands-detail.md +6 -0
- package/scaffold/skills/dw-llm-eval/references/judge-calibration.md +5 -0
- package/scaffold/skills/dw-llm-eval/references/the-oracle-ladder-detail.md +15 -0
- package/scaffold/skills/dw-memory/SKILL.md +4 -50
- package/scaffold/skills/dw-memory/references/context-budget.md +8 -56
- package/scaffold/skills/dw-memory/references/promotion-decision-test-detail.md +30 -0
- package/scaffold/skills/dw-minimalism/SKILL.md +4 -5
- package/scaffold/skills/dw-review-rigor/SKILL.md +31 -88
- package/scaffold/skills/dw-review-rigor/references/composition-audit.md +160 -0
- package/scaffold/skills/dw-review-rigor/references/refutation-pass.md +124 -0
- package/scaffold/skills/dw-review-rigor/references/the-five-rules-detail.md +56 -0
- package/scaffold/skills/dw-simplification/SKILL.md +2 -55
- package/scaffold/skills/dw-simplification/references/pattern-recognition-detail.md +11 -0
- package/scaffold/skills/dw-simplification/references/the-five-rules-detail.md +48 -0
- package/scaffold/skills/dw-source-grounding/SKILL.md +21 -56
- package/scaffold/skills/dw-source-grounding/references/the-protocol-detect-fetch-implement-cite-detail.md +58 -0
- package/scaffold/skills/dw-testing-discipline/SKILL.md +25 -177
- package/scaffold/skills/dw-testing-discipline/references/agent-guardrails.md +9 -167
- package/scaffold/skills/dw-testing-discipline/references/core-rules.md +3 -3
- package/scaffold/skills/dw-testing-discipline/references/mutation-testing.md +19 -0
- package/scaffold/skills/dw-testing-discipline/references/patterns.md +3 -12
- package/scaffold/skills/dw-ui-discipline/SKILL.md +2 -59
- package/scaffold/skills/dw-ui-discipline/references/frontend-engineering.md +46 -0
- package/scaffold/skills/dw-ui-discipline/references/the-four-grounding-questions-detail.md +61 -0
- package/scaffold/skills/dw-verify/SKILL.md +26 -148
- package/scaffold/skills/dw-verify/references/verification-discovery-and-attribution.md +2 -2
- package/scaffold/skills/humanizer/SKILL.md +2 -1
- package/scaffold/skills/security-review/SKILL.md +6 -184
- package/scaffold/skills/security-review/references/do-not-flag-detail.md +49 -0
- package/scaffold/skills/security-review/references/modern-threats.md +5 -0
- package/scaffold/skills/security-review/references/quick-patterns-reference-detail.md +56 -0
- package/scaffold/skills/security-review/references/review-process-detail.md +112 -0
- package/scaffold/skills/vercel-react-best-practices/SKILL.md +1 -90
- package/scaffold/skills/vercel-react-best-practices/references/quick-reference-detail.md +92 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Investigating weak tests with mutations
|
|
2
|
+
|
|
3
|
+
Use when an important behavior has weak evidence, when auditing tests, or when the approved testing strategy includes mutation analysis. Do not install a mutation framework for a copy edit or make every test change run a repository-wide campaign.
|
|
4
|
+
|
|
5
|
+
1. Name the behavior at risk and inspect its production path and tests. Select a bounded module and the existing runner. Confirm a clean baseline test run so unrelated failures are not misreported as detected mutants.
|
|
6
|
+
2. Run the installed mutation tool with an explicit source scope and inspect its execution status. If unavailable, a reversible deliberate defect in an isolated copy can probe one invariant; report it as a targeted experiment, not a complete mutation score. Never leave a deliberate defect in the delivery tree.
|
|
7
|
+
3. For a survivor, examine the changed expression, reachable inputs and expected observable result. Distinguish a missing assertion from equivalent behavior, unreachable code, exclusion, timeout or tooling failure. Report unassessed cases instead of calling them safe.
|
|
8
|
+
4. Add or strengthen a test only for a meaningful missing behavior. Derive expected values from requirements, fixtures or an independent oracle; do not repeat the algorithm under test. Ensure mocks match real module exports and API contracts. Assertions on shape, invocation or snapshots are useful only when that is the actual contract being protected.
|
|
9
|
+
5. Demonstrate that the selected defect is detected and the unmodified implementation passes. Record source scope, cases investigated, remaining limitations, command, tool version and report path. Do not weaken assertions, alter production semantics or exclude survivors just to improve a number.
|
|
10
|
+
|
|
11
|
+
Do not introduce a default mutation-score gate. Preserve existing project-required policy and raise a proposal if it needs revision. A run can succeed while reporting surviving mutants; a tool crash or zero selected files does not establish successful behavioral validation.
|
|
12
|
+
|
|
13
|
+
## Incremental execution
|
|
14
|
+
|
|
15
|
+
[StrykerJS incremental mode](https://stryker-mutator.io/docs/stryker-js/incremental/) reuses a prior report; it is not automatically selection of the current PR diff. Determine the PR base and intended source set separately. Include test changes and affected production scope. An empty selection must be explicitly justified.
|
|
16
|
+
|
|
17
|
+
Stryker's cache does not detect every dependency, configuration, snapshot or environment change. Invalidate reuse when those inputs affect results; use the installed version's supported force/full-scope mechanism. Preserve the unmutated dry run and check runner support for test-change detection. Reuse under `dw-verify` also requires valid input and environment evidence.
|
|
18
|
+
|
|
19
|
+
In CI, publish inspectable reports and distinguish infrastructure failures from investigated survivors. Select schedule and scope according to risk and measured cost. Broad campaigns belong in an agreed audit or scheduled job, not an implicit requirement on unrelated tasks.
|
|
@@ -192,20 +192,11 @@ No merge to main without a real-system path going green. Mocks are speed, real i
|
|
|
192
192
|
|
|
193
193
|
**Anti-pattern:** 100% mocked test suite. "It all passes locally" → first user request fails because the mock didn't match the real API shape.
|
|
194
194
|
|
|
195
|
-
## 11. Mutation
|
|
195
|
+
## 11. Mutation analysis investigates specific behavioral gaps
|
|
196
196
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
Set up mutation testing (Stryker for JS/TS, mutmut for Python, etc.) ONCE per project. Run weekly on critical modules.
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
npx stryker run
|
|
203
|
-
# Output: 87 mutants, 78 killed, 9 survived → mutation score 89.6%
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
A surviving mutant means: this code path runs in tests, but the tests don't actually assert anything that breaks when the code changes. Investigate each.
|
|
197
|
+
Use `mutation-testing.md` when critical behavior or weak assertions justify the cost. Inspect survivors individually: they may expose missing tests, equivalent behavior or analysis limits. Strengthen assertions against the intended contract and verify both the deliberate defect and unmodified behavior. Choose scope and cadence from project risk; do not install a tool in every project or introduce a score target.
|
|
207
198
|
|
|
208
|
-
**Anti-pattern:**
|
|
199
|
+
**Anti-pattern:** increasing coverage or killing mutants while assertions still repeat the implementation or only confirm mock setup.
|
|
209
200
|
|
|
210
201
|
## 12. Page Object Model is a tool, not a religion
|
|
211
202
|
|
|
@@ -23,70 +23,13 @@ If you're tempted to skip this "because it's just a small tweak" — that's the
|
|
|
23
23
|
|
|
24
24
|
## The four grounding questions
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### 1. Where do design decisions come from?
|
|
29
|
-
|
|
30
|
-
Find the project's design source-of-truth in this order:
|
|
31
|
-
1. `.dw/rules/<frontend-module>.md` design system section.
|
|
32
|
-
2. `DESIGN.md`, `BRAND.md`, `STYLE_GUIDE.md` at project root.
|
|
33
|
-
3. Design token config — Tailwind theme, CSS variables in `theme.css`/`globals.css`, MUI/Chakra theme.
|
|
34
|
-
4. Component library config — `components.json` for shadcn, theme exports.
|
|
35
|
-
5. Storybook stories (implicit canonical components).
|
|
36
|
-
|
|
37
|
-
**Stop at the first match** in this list — that source is the authority; defer to it and do not override it with a lower rung or a training-data default. If a needed token is missing (e.g., a danger-secondary color), propose adding it to the authority FIRST, not inline.
|
|
38
|
-
|
|
39
|
-
If **none exists**: read `references/curated-defaults.md` and pick one of the 10 neutral palettes + one of the 10 font pairings shipped there. Mark the choice in the techspec/PR description: "Design source: no project authority found; using curated default `<name>`; recommend establishing `DESIGN.md`."
|
|
40
|
-
|
|
41
|
-
**Anti-patterns at this question:**
|
|
42
|
-
- Inventing color hex values inline (`bg-[#FF6B35]`).
|
|
43
|
-
- "I'll use Tailwind defaults" — that's training-data defaults, not project authority.
|
|
44
|
-
- Copying values from "a site I like" without understanding what it solved.
|
|
45
|
-
|
|
46
|
-
### 2. What does this surface help the user do?
|
|
47
|
-
|
|
48
|
-
Write one sentence: **"This surface helps the user `<verb-phrase>` so that `<outcome>`."**
|
|
49
|
-
|
|
50
|
-
Good examples:
|
|
51
|
-
- "...helps the user filter overdue invoices so they can chase late payers in under 30 seconds."
|
|
52
|
-
- "...helps the on-call engineer diagnose which deploy caused the spike so they can roll back without paging the team."
|
|
53
|
-
- "...helps the manager approve or reject expense reports without leaving Slack."
|
|
54
|
-
|
|
55
|
-
Bad examples:
|
|
56
|
-
- "This surface displays invoice data." (no user, no outcome)
|
|
57
|
-
- "Settings page for managing the account." (vague, no specificity)
|
|
58
|
-
- "Dashboard." (one word)
|
|
59
|
-
|
|
60
|
-
If you can't write the sentence, the requirements are unclear. Stop and clarify before proceeding.
|
|
61
|
-
|
|
62
|
-
### 3. What states does the surface have?
|
|
63
|
-
|
|
64
|
-
Enumerate all states before designing the happy path. Minimum nine, plus domain-specific ones — see `references/state-matrix.md`:
|
|
65
|
-
|
|
66
|
-
`default`, `hover`, `active`, `focus-visible`, `disabled`, `loading`, `empty`, `error`, `success` plus any domain states (read/unread, online/offline, stale/fresh, pending/approved/rejected, draft/saved/dirty, partial/complete, etc.).
|
|
67
|
-
|
|
68
|
-
Missing a state at design time = production bug later. The "we'll add empty state later" trap is real.
|
|
69
|
-
|
|
70
|
-
### 4. Who uses this surface, where, and in what mood?
|
|
71
|
-
|
|
72
|
-
One sentence: **"`<Who>` uses this on `<where>` in `<what light>` while `<what mood>`."**
|
|
73
|
-
|
|
74
|
-
Good examples:
|
|
75
|
-
- "An on-call engineer uses this on a dark-room laptop at 3am while troubleshooting a fire."
|
|
76
|
-
- "A field nurse uses this on a phone in bright outdoor light while juggling clipboards."
|
|
77
|
-
- "A receptionist uses this on a 24″ monitor at a busy front desk while talking to a visitor."
|
|
78
|
-
|
|
79
|
-
Decisions cascade from the answer:
|
|
80
|
-
- 3am dark room → dark mode, high contrast, no flashing animations.
|
|
81
|
-
- Bright outdoor → minimum 7:1 contrast, larger touch targets, no thin fonts.
|
|
82
|
-
- Busy front desk → glanceable info, no nested menus, large numbers.
|
|
83
|
-
|
|
84
|
-
Without this sentence, defaults take over: light mode, default contrasts, animations, regular touch targets. Production users hate it; you can't articulate why.
|
|
26
|
+
For the four grounding questions, read `references/the-four-grounding-questions-detail.md`. Load only when this part of the task applies.
|
|
85
27
|
|
|
86
28
|
## Required reading by context
|
|
87
29
|
|
|
88
30
|
| Doing what | Read |
|
|
89
31
|
|------------|------|
|
|
32
|
+
| Planning/auditing frontend data flow, dependencies or quality tooling | `references/frontend-engineering.md` (may be read directly without visual grounding for nonvisual work) |
|
|
90
33
|
| Any UI work (the full version of the grounding) | `references/hard-gate.md` |
|
|
91
34
|
| Reviewing or proposing a design | `references/visual-slop.md` (14 patterns + specific anti-default values) |
|
|
92
35
|
| Designing state coverage | `references/state-matrix.md` |
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Frontend engineering controls
|
|
2
|
+
|
|
3
|
+
Read when planning frontend architecture, auditing a frontend module, or reviewing changes to its data flow, dependencies or quality tooling. A visual/copy-only edit needs only the relevant UI checks. This reference can be used directly without running visual grounding for an API client or CI configuration change.
|
|
4
|
+
|
|
5
|
+
## Discover before changing
|
|
6
|
+
|
|
7
|
+
Inspect the target workspace's scripts, lockfile, framework, compiler, API source, lint configuration, entry points and CI. Reuse working controls. Record observed configuration separately from proposed policy; an absent tool is not a failed check. Installation of dev-workflow does not authorize replacing consumer tooling.
|
|
8
|
+
|
|
9
|
+
For a project audit, use the installed `frontend-quality-template.md` in `.dw/templates/` to document the baseline in the module's existing rules file. For a feature, include only affected decisions in its TechSpec. Read those decisions during implementation and review. A request to analyze produces findings and proposals; an authorized implementation may add compatible scripts/configuration and validate them.
|
|
10
|
+
|
|
11
|
+
When using this skill standalone without the scaffold template, record the same compact control fields from the adoption section below in the project's existing document; no template installation is required.
|
|
12
|
+
|
|
13
|
+
## Contract and type boundaries
|
|
14
|
+
|
|
15
|
+
- Identify the authoritative API schema and its owner/revision before introducing response fields. If generation is used, record the generator version, command and output paths. Review contract changes, regenerate reproducibly and inspect drift; correct the source or generator rather than editing generated output.
|
|
16
|
+
- When there is no maintained schema, derive a narrow boundary from verified backend code or documented responses and test it; label unresolved assumptions. Do not invent an OpenAPI specification from frontend guesses.
|
|
17
|
+
- Runtime data still needs validation at relevant trust boundaries. Generating a validator is insufficient unless the actual response path calls it and handles failure. [Hey API's Zod integration](https://heyapi.dev/docs/openapi/typescript/plugins/zod) is one option when compatible with the existing client.
|
|
18
|
+
- For TypeScript, inspect effective inherited configuration. Consider [`strict`](https://www.typescriptlang.org/tsconfig/strict.html), [`noUncheckedIndexedAccess`](https://www.typescriptlang.org/tsconfig/noUncheckedIndexedAccess.html) and [`exactOptionalPropertyTypes`](https://www.typescriptlang.org/tsconfig/exactOptionalPropertyTypes.html). Migrate by package or a coherent project boundary; passing filenames to a compiler invocation must not accidentally bypass project settings. Do not hide migration errors behind casts, `any` or non-null assertions.
|
|
19
|
+
|
|
20
|
+
## Architecture and lint feedback
|
|
21
|
+
|
|
22
|
+
Derive allowed imports from the project's architecture, including framework-specific server/client boundaries. Reuse an existing graph checker; [eslint-plugin-boundaries](https://github.com/javierbrea/eslint-plugin-boundaries) is an option for JS/TS. Verify aliases, workspace packages, type imports and legitimate framework entry points. A rejected dependency should identify its source, forbidden destination and the intended placement. Do not impose a universal folder layout.
|
|
23
|
+
|
|
24
|
+
Choose lint rules against concrete failure modes and the installed runner: missing assertion awaits, accidentally focused tests, unsafe type escapes and inaccessible JSX. For React state changes, check whether an Effect actually synchronizes an external system; derived values and event responses often belong in rendering or handlers. Preserve legitimate synchronization. See [React's Effect guidance](https://react.dev/learn/you-might-not-need-an-effect).
|
|
25
|
+
|
|
26
|
+
For a recurring repository-specific defect, prefer an existing rule. A custom detector needs a documented failure mode, an actionable diagnostic and valid/invalid fixtures. Exercise aliases, exclusions and unsupported syntax; an unresolved import is an analysis limitation, not proof of safety. Use an AST or the framework's parser when syntax matters. [ESLint's RuleTester workflow](https://eslint.org/docs/latest/extend/custom-rule-tutorial) supports rule validation. Avoid adding a regex-based import graph when the existing tool already models it.
|
|
27
|
+
|
|
28
|
+
## Code that should disappear
|
|
29
|
+
|
|
30
|
+
Evaluate dead-code findings against runtime reachability and public exports before deletion. Configure framework/plugin entry points, generated sources and workspace aliases. Tests alone can keep otherwise unused production code appearing live: [Knip production mode](https://knip.dev/features/production-mode) provides a separate view of shipped code and does not replace its normal analysis. Validate a newly configured detector with an intentionally unused fixture and a legitimately reachable fixture in an isolated workspace.
|
|
31
|
+
|
|
32
|
+
Use textual duplication reports such as [jscpd](https://github.com/kucherenko/jscpd) as candidates for inspection. Apply different policies to repeated markup/fixtures and business calculations. Search for semantic duplicates too. Consolidate only when copies represent the same rule and should evolve together; a shared abstraction must preserve callers' behavior. Record exclusions with a reason and review trigger, instead of growing blanket ignores to make a report green.
|
|
33
|
+
|
|
34
|
+
## Tests and adoption
|
|
35
|
+
|
|
36
|
+
When critical logic changes or existing tests appear weak, use the testing skill's `references/mutation-testing.md` if available. Mutation testing complements contract and user-flow tests; neither coverage nor a diagnostic score establishes acceptance.
|
|
37
|
+
|
|
38
|
+
For each adopted control record: risk, configuration, exact workspace command, scope, baseline, enforcement status, evidence and owner/review trigger. Use `required`, `advisory`, `deferred` or `not_applicable`; record actual execution separately (`passed`, `failed`, `not_run`). Start noisy new controls as advisory, triage findings, then promote demonstrated checks. Existing required gates remain required. Typechecking, builds and dependency graphs often need the whole affected project even when lint or mutation analysis can target a diff.
|
|
39
|
+
|
|
40
|
+
Local hooks may shorten feedback, but CI must execute required checks independently of editor or agent hooks. Keep failures identifiable; verify that deployment depends on successful required jobs and that repository rules actually require the intended status checks. Do not claim a workflow file alone establishes branch protection. Advisory mutation runs may publish findings without a score threshold; report execution failures explicitly. Never hide a required check behind `continue-on-error`, an empty selection or a silently skipped job.
|
|
41
|
+
|
|
42
|
+
Record command, inputs, environment and analysis scope through `dw-verify` when available. Treat new ignores, disabled rules, changed generation/configuration and lost CI coverage as reviewable changes. Delivery still requires checking product behavior, architecture and accessibility; automated findings reduce review work without replacing that judgment.
|
|
43
|
+
|
|
44
|
+
## Attribution
|
|
45
|
+
|
|
46
|
+
Workflow adaptation prompted by Yuri Mikhin's [Evil Martians article](https://evilmartians.com/chronicles/ten-anti-ai-slop-moves-for-frontend-projects-going-faster-than-humans-can-review), September 1, 2026. Procedures are independently written for dev-workflow and supported by the primary documentation linked above (checked September 9, 2026). No article text, source code or third-party tool is bundled here.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
## The four grounding questions
|
|
2
|
+
|
|
3
|
+
Answer all four before proposing colors, layouts, components, or any visual decision.
|
|
4
|
+
|
|
5
|
+
### 1. Where do design decisions come from?
|
|
6
|
+
|
|
7
|
+
Find the project's design source-of-truth in this order:
|
|
8
|
+
1. `.dw/rules/<frontend-module>.md` design system section.
|
|
9
|
+
2. `DESIGN.md`, `BRAND.md`, `STYLE_GUIDE.md` at project root.
|
|
10
|
+
3. Design token config — Tailwind theme, CSS variables in `theme.css`/`globals.css`, MUI/Chakra theme.
|
|
11
|
+
4. Component library config — `components.json` for shadcn, theme exports.
|
|
12
|
+
5. Storybook stories (implicit canonical components).
|
|
13
|
+
|
|
14
|
+
**Stop at the first match** in this list — that source is the authority; defer to it and do not override it with a lower rung or a training-data default. If a needed token is missing (e.g., a danger-secondary color), propose adding it to the authority FIRST, not inline.
|
|
15
|
+
|
|
16
|
+
If **none exists**: read `curated-defaults.md` and pick one of the 10 neutral palettes + one of the 10 font pairings shipped there. Mark the choice in the techspec/PR description: "Design source: no project authority found; using curated default `<name>`; recommend establishing `DESIGN.md`."
|
|
17
|
+
|
|
18
|
+
**Anti-patterns at this question:**
|
|
19
|
+
- Inventing color hex values inline (`bg-[#FF6B35]`).
|
|
20
|
+
- "I'll use Tailwind defaults" — that's training-data defaults, not project authority.
|
|
21
|
+
- Copying values from "a site I like" without understanding what it solved.
|
|
22
|
+
|
|
23
|
+
### 2. What does this surface help the user do?
|
|
24
|
+
|
|
25
|
+
Write one sentence: **"This surface helps the user `<verb-phrase>` so that `<outcome>`."**
|
|
26
|
+
|
|
27
|
+
Good examples:
|
|
28
|
+
- "...helps the user filter overdue invoices so they can chase late payers in under 30 seconds."
|
|
29
|
+
- "...helps the on-call engineer diagnose which deploy caused the spike so they can roll back without paging the team."
|
|
30
|
+
- "...helps the manager approve or reject expense reports without leaving Slack."
|
|
31
|
+
|
|
32
|
+
Bad examples:
|
|
33
|
+
- "This surface displays invoice data." (no user, no outcome)
|
|
34
|
+
- "Settings page for managing the account." (vague, no specificity)
|
|
35
|
+
- "Dashboard." (one word)
|
|
36
|
+
|
|
37
|
+
If you can't write the sentence, the requirements are unclear. Stop and clarify before proceeding.
|
|
38
|
+
|
|
39
|
+
### 3. What states does the surface have?
|
|
40
|
+
|
|
41
|
+
Enumerate all states before designing the happy path. Minimum nine, plus domain-specific ones — see `state-matrix.md`:
|
|
42
|
+
|
|
43
|
+
`default`, `hover`, `active`, `focus-visible`, `disabled`, `loading`, `empty`, `error`, `success` plus any domain states (read/unread, online/offline, stale/fresh, pending/approved/rejected, draft/saved/dirty, partial/complete, etc.).
|
|
44
|
+
|
|
45
|
+
Missing a state at design time = production bug later. The "we'll add empty state later" trap is real.
|
|
46
|
+
|
|
47
|
+
### 4. Who uses this surface, where, and in what mood?
|
|
48
|
+
|
|
49
|
+
One sentence: **"`<Who>` uses this on `<where>` in `<what light>` while `<what mood>`."**
|
|
50
|
+
|
|
51
|
+
Good examples:
|
|
52
|
+
- "An on-call engineer uses this on a dark-room laptop at 3am while troubleshooting a fire."
|
|
53
|
+
- "A field nurse uses this on a phone in bright outdoor light while juggling clipboards."
|
|
54
|
+
- "A receptionist uses this on a 24″ monitor at a busy front desk while talking to a visitor."
|
|
55
|
+
|
|
56
|
+
Decisions cascade from the answer:
|
|
57
|
+
- 3am dark room → dark mode, high contrast, no flashing animations.
|
|
58
|
+
- Bright outdoor → minimum 7:1 contrast, larger touch targets, no thin fonts.
|
|
59
|
+
- Busy front desk → glanceable info, no nested menus, large numbers.
|
|
60
|
+
|
|
61
|
+
Without this sentence, defaults take over: light mode, default contrasts, animations, regular touch targets. Production users hate it; you can't articulate why.
|
|
@@ -1,173 +1,51 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dw-verify
|
|
3
|
-
description:
|
|
3
|
+
description: Validate completion, commit or PR claims against acceptance criteria and applicable project checks, reusing evidence only while its inputs remain valid.
|
|
4
4
|
allowed-tools:
|
|
5
|
-
- Bash
|
|
6
5
|
- Read
|
|
6
|
+
- Bash
|
|
7
7
|
- Grep
|
|
8
|
+
- Glob
|
|
8
9
|
---
|
|
9
10
|
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
## Overview
|
|
13
|
-
|
|
14
|
-
Claiming work is complete without verification is dishonesty, not efficiency.
|
|
15
|
-
|
|
16
|
-
**Core principle:** Evidence before claims, always.
|
|
17
|
-
|
|
18
|
-
**Violating the letter of this rule is violating the spirit of this rule.**
|
|
19
|
-
|
|
20
|
-
## The Iron Law
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
If the verification command has not been run in the current message, the result cannot be claimed.
|
|
27
|
-
|
|
28
|
-
## The Gate Function
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
BEFORE claiming any status or expressing satisfaction:
|
|
32
|
-
|
|
33
|
-
1. IDENTIFY: What command proves this claim?
|
|
34
|
-
2. RUN: Execute the FULL command (fresh, complete)
|
|
35
|
-
3. READ: Full output, check exit code, count failures
|
|
36
|
-
4. VERIFY: Does output confirm the claim?
|
|
37
|
-
- If NO: State actual status with evidence
|
|
38
|
-
- If YES: State claim WITH evidence
|
|
39
|
-
5. ONLY THEN: Make the claim
|
|
40
|
-
|
|
41
|
-
Skip any step = lying, not verifying
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Scope of Verification
|
|
45
|
-
|
|
46
|
-
Match the verification scope to the claim scope.
|
|
47
|
-
|
|
48
|
-
- **Narrow claim** (e.g., "this test passes"): run the specific test.
|
|
49
|
-
- **Broad claim** (e.g., "task complete", "ready to commit"): run the full verification pipeline — formatting, linting, all tests, and build. If the project defines a single gate command (e.g., `npm test`, `make verify`, `pnpm check`), run that.
|
|
50
|
-
|
|
51
|
-
A narrow verification does not support a broad claim. Running one test alone does not justify "task complete." The verification scope must be equal to or broader than the claim scope.
|
|
52
|
-
|
|
53
|
-
**If in doubt, run the full pipeline.** Over-verification wastes minutes. Under-verification wastes hours.
|
|
54
|
-
|
|
55
|
-
**Passing pipeline ≠ meeting requirements.** A green build proves the code compiles, lints, and passes existing tests. It does not prove the implementation matches the PRD. For "task complete" or "requirements met" claims, also verify deliverables against the task's acceptance criteria and the PRD — line by line, not by assumption.
|
|
56
|
-
|
|
57
|
-
## Common Failures
|
|
58
|
-
|
|
59
|
-
| Claim | Requires | Not Sufficient |
|
|
60
|
-
| --------------------- | -------------------------------- | ------------------------------- |
|
|
61
|
-
| Tests pass | Test command output: 0 failures | Previous run, "should pass" |
|
|
62
|
-
| Linter clean | Linter output: 0 errors | Partial check, extrapolation |
|
|
63
|
-
| Build succeeds | Build command: exit 0 | Linter passing, logs look good |
|
|
64
|
-
| Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
|
|
65
|
-
| Regression test works | Red-green cycle verified | Test passes once |
|
|
66
|
-
| Task complete | Acceptance criteria cross-check | Tests passing |
|
|
67
|
-
| Requirements met | Line-by-line PRD checklist | Tests passing |
|
|
68
|
-
|
|
69
|
-
## Red Flags
|
|
70
|
-
|
|
71
|
-
If you catch yourself using any of these, STOP and run verification:
|
|
72
|
-
|
|
73
|
-
- "should", "probably", "seems to", "I'm confident"
|
|
74
|
-
- Expressing satisfaction before verification
|
|
75
|
-
- About to commit, push, or open a PR without verification
|
|
76
|
-
- Trusting another agent's success report
|
|
77
|
-
- Relying on partial verification
|
|
78
|
-
- "Just this once"
|
|
79
|
-
|
|
80
|
-
## Rationalization Prevention
|
|
81
|
-
|
|
82
|
-
| Excuse | Reality |
|
|
83
|
-
| --------------------------------------- | ---------------------- |
|
|
84
|
-
| "Should work now" | Run the verification |
|
|
85
|
-
| "I'm confident" | Confidence ≠ evidence |
|
|
86
|
-
| "Just this once" | No exceptions |
|
|
87
|
-
| "Linter passed" | Linter ≠ compiler |
|
|
88
|
-
| "Agent said success" | Verify independently |
|
|
89
|
-
| "I'm tired" | Exhaustion ≠ excuse |
|
|
90
|
-
| "Partial check is enough" | Partial proves nothing |
|
|
91
|
-
| "Different words so rule doesn't apply" | Spirit over letter |
|
|
92
|
-
|
|
93
|
-
## When To Apply
|
|
94
|
-
|
|
95
|
-
Apply this skill before:
|
|
96
|
-
|
|
97
|
-
- any success or completion claim
|
|
98
|
-
- any expression of satisfaction with the implementation state
|
|
99
|
-
- any commit or PR creation
|
|
100
|
-
- any handoff that implies correctness
|
|
101
|
-
- moving to the next task based on completion
|
|
102
|
-
|
|
103
|
-
## Pre-Commit and Pre-PR Gate
|
|
104
|
-
|
|
105
|
-
Commits and PRs are permanent artifacts. They require the highest verification standard.
|
|
106
|
-
|
|
107
|
-
**Before `git commit`:**
|
|
108
|
-
1. Run the full verification pipeline. Not a subset. The full pipeline.
|
|
109
|
-
2. Confirm zero errors, zero warnings, zero test failures in the output.
|
|
110
|
-
3. Produce a Verification Report (template below) with verdict PASS.
|
|
111
|
-
4. Only then run `git commit`.
|
|
11
|
+
# Verification grounded in evidence
|
|
112
12
|
|
|
113
|
-
|
|
114
|
-
1. All of the above, plus:
|
|
115
|
-
2. Verify the diff matches the intended changes (`git diff` review).
|
|
116
|
-
3. Confirm no unrelated files are staged.
|
|
13
|
+
A claim must match observed evidence. Inspect output and acceptance criteria; do not infer success from code edits, confidence, a worker's self-score, or a green build alone.
|
|
117
14
|
|
|
118
|
-
|
|
15
|
+
## Select checks
|
|
119
16
|
|
|
120
|
-
|
|
17
|
+
Follow required project gates from applicable instructions, package scripts and CI. Use focused tests while implementing or correcting defects, then complete the project's required delivery checks. Run lint/build only when applicable or required; do not invent absent scripts or demand zero pre-existing warnings when the project does not.
|
|
121
18
|
|
|
122
|
-
|
|
19
|
+
For frontend changes, consult the module's documented quality baseline or TechSpec: distinguish required checks from advisory diagnostics and deferred proposals. Check generation drift, typechecking, architecture and test evidence where applicable. Tool presence, a high score or an empty analysis scope is not a passing result. A local hook does not prove CI enforcement or branch protection.
|
|
123
20
|
|
|
124
|
-
|
|
21
|
+
For behavior changes, verify relevant acceptance criteria and meaningful failure cases. For a small prose/config edit, use an appropriate inspection or validator; lack of a test runner alone does not block that claim. Report limits honestly. New tests should detect a plausible defect, not mirror implementation or language behavior. Explicit TDD requests retain their red/green contract.
|
|
125
22
|
|
|
126
|
-
|
|
127
|
-
VERIFICATION REPORT
|
|
128
|
-
-------------------
|
|
129
|
-
Claim: [What is being claimed — e.g., "tests pass", "build succeeds", "task complete"]
|
|
130
|
-
Command: [Exact command run — e.g., `npm test`, `pnpm verify`]
|
|
131
|
-
Executed: [Timestamp or "just now, after all changes"]
|
|
132
|
-
Exit code: [0 or non-zero]
|
|
133
|
-
Output summary: [Key lines from output — pass count, error count, build result]
|
|
134
|
-
Warnings: [Any warnings, or "none"]
|
|
135
|
-
Errors: [Any errors, or "none"]
|
|
136
|
-
Verdict: PASS or FAIL
|
|
137
|
-
```
|
|
23
|
+
## Evidence validity
|
|
138
24
|
|
|
139
|
-
|
|
25
|
+
For every check record command, exit code, output/log path, time, revision and relevant diff/input fingerprint, environment fingerprint and scope covered. Include relevant untracked/generated files, dependencies/lockfiles, tool configuration, runtime and external fixtures. The fingerprint must represent actual inputs; a timestamp or HEAD alone is insufficient when the worktree is dirty.
|
|
140
26
|
|
|
141
|
-
|
|
27
|
+
Reuse a passing record when command, inputs, environment and claim scope remain equivalent and its output can be inspected. A new message, review stage or bookkeeping-only commit does not by itself invalidate checks. Unknown fingerprints/environment, changed inputs, new findings or broader claims require appropriate fresh checks. If uncertain which inputs matter, rerun the required check instead of inventing validity.
|
|
142
28
|
|
|
143
|
-
|
|
29
|
+
The installed helper `.dw/scripts/lib/workflow-contract.mjs` exports `reusableEvidence(record, current)` for comparing known fingerprints and scopes; callers still gather the actual evidence. Store records in execution-state.json for planned tasks, or the existing verification/QA report for standalone work.
|
|
144
30
|
|
|
145
|
-
|
|
31
|
+
## Failures and delivery
|
|
146
32
|
|
|
147
|
-
|
|
148
|
-
2. **Diagnose the root cause.** Read the error. Trace it to the source. If multiple things failed, address them one at a time, starting with the first failure.
|
|
149
|
-
3. **Fix the root cause.** Apply the minimal change that addresses the actual error. No workarounds, no suppressions, no skipped checks.
|
|
150
|
-
4. **Re-verify from scratch.** Run the full verification command again. Do not assume the fix worked. Do not run only the previously-failing subset.
|
|
151
|
-
5. **Report with evidence.** Use the Verification Report Template. If it passes, the claim may proceed. If it fails again, return to step 1.
|
|
33
|
+
Read failures and diagnose production behavior before changing tests. Correct failures caused by the requested change; rerun affected checks, then any invalidated required delivery gates. Do not weaken assertions, hide blocking findings, or claim a skipped check passed. Unrelated failures are reported with attribution and handled under project policy.
|
|
152
34
|
|
|
153
|
-
|
|
154
|
-
- Claim partial success ("3 of 4 checks pass, close enough")
|
|
155
|
-
- Skip re-verification after a fix
|
|
156
|
-
- Blame the tooling without evidence of a false positive
|
|
157
|
-
- Move on while verification is still failing
|
|
35
|
+
Before commit/PR, inspect the scoped diff and acceptance criteria and confirm all applicable required checks have valid passing evidence. Reuse a verified worker/CI result under the same validity rules; independently inspect the delivery, not blindly trust a summary. Security and constitution gates remain in force. A passing pipeline does not itself authorize commit, merge or publication.
|
|
158
36
|
|
|
159
|
-
##
|
|
37
|
+
## Verification report
|
|
160
38
|
|
|
161
|
-
|
|
39
|
+
Record a compact VERIFICATION REPORT with Claim, Command, Executed, Revision/inputs, Environment, Scope, Exit code, Output summary/log, Warnings, Errors and Verdict (`PASS`, `FAIL`, or `NOT_APPLICABLE`). Say which evidence was reused and why. The user-facing response may summarize these records with links; full logs need not be pasted into every message.
|
|
162
40
|
|
|
163
|
-
|
|
41
|
+
Read `references/verification-discovery-and-attribution.md` when project gate discovery or attribution is needed. Read `references/pre-check-and-status.md` only for diff-hygiene checks or polling format.
|
|
164
42
|
|
|
165
43
|
## Structured Return
|
|
166
44
|
|
|
167
|
-
- **Status:** `PASS`
|
|
168
|
-
- **Scope:** claim, files,
|
|
169
|
-
- **Evidence:** commands, exit codes,
|
|
170
|
-
- **Artifacts:** report,
|
|
171
|
-
- **Decisions:** selected
|
|
172
|
-
- **Risks:**
|
|
173
|
-
- **Next Step:**
|
|
45
|
+
- **Status:** `PASS` valid evidence supports the claim; `FINDINGS` failed/incomplete checks; `BLOCKED` a required check cannot run; `NOT_APPLICABLE` no verification claim.
|
|
46
|
+
- **Scope:** claim, relevant files/inputs, checks and environment.
|
|
47
|
+
- **Evidence:** commands, exit codes, inspectable logs, fingerprints and acceptance criteria.
|
|
48
|
+
- **Artifacts:** verification report, task state, screenshots or CI link.
|
|
49
|
+
- **Decisions:** selected checks, evidence reused and reasons for inapplicable checks.
|
|
50
|
+
- **Risks:** unknown environment, stale inputs, missing checks or uncovered behavior.
|
|
51
|
+
- **Next Step:** fix, required check, or validated handoff.
|
|
@@ -7,7 +7,7 @@ dev-workflow does not hardcode a verification command. Discover it from the proj
|
|
|
7
7
|
3. Check for `Makefile`/`make verify`, `pyproject.toml`/`just verify`, etc.
|
|
8
8
|
4. If none is explicit, run the documented test + lint + build sequence.
|
|
9
9
|
|
|
10
|
-
If no
|
|
10
|
+
If no automated command applies, document the appropriate inspection and its limits. A missing required check blocks its claim; a prose-only task does not require an invented test runner.
|
|
11
11
|
|
|
12
12
|
## Integration With Other dev-workflow Commands
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ This skill is invoked transparently from:
|
|
|
18
18
|
- `/dw-qa --fix` — before marking a bug as resolved in `QA/bugs.md`
|
|
19
19
|
- `/dw-bugfix` — before claiming the bug is fixed (original symptom no longer reproduces)
|
|
20
20
|
- `/dw-review --code-only` — before emitting an APPROVED verdict
|
|
21
|
-
- `/dw-generate-pr` —
|
|
21
|
+
- `/dw-generate-pr` — requires valid passing evidence for the current inputs, environment and scope
|
|
22
22
|
|
|
23
23
|
Callers should mention this skill in their "Skills Complementares" section so the user sees the dependency.
|
|
24
24
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: humanizer
|
|
3
|
-
|
|
3
|
+
metadata:
|
|
4
|
+
version: "2.2.0"
|
|
4
5
|
description: Use when editing AI-generated text. Detects 24 'signs of AI writing' (em-dashes, rule-of-three, AI vocab, vague attributions). Triggers on docs, READMEs, blog posts, captions, marketing copy.
|
|
5
6
|
allowed-tools:
|
|
6
7
|
- Read
|