@brunosps00/dev-workflow 1.1.2 → 1.2.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/README.md +22 -15
- package/bin/dev-workflow.js +1 -1
- package/lib/constants.js +6 -2
- package/lib/doctor.js +3 -1
- package/lib/install-deps.js +3 -3
- package/lib/setup-wsl-browser.js +10 -50
- package/lib/skill-registry.js +41 -0
- package/package.json +1 -1
- package/scaffold/en/agent-instructions.md +5 -2
- package/scaffold/en/commands/dw-analyze-project.md +1 -1
- package/scaffold/en/commands/dw-brainstorm.md +4 -1
- package/scaffold/en/commands/dw-functional-doc.md +3 -3
- package/scaffold/en/commands/dw-harness-audit.md +4 -2
- package/scaffold/en/commands/dw-help.md +12 -7
- package/scaffold/en/commands/dw-opportunities.md +131 -0
- package/scaffold/en/commands/dw-refactor.md +54 -0
- package/scaffold/en/commands/dw-review.md +1 -1
- package/scaffold/en/commands/dw-skill-health.md +11 -3
- package/scaffold/en/references/refactoring-catalog.md +1 -1
- package/scaffold/en/templates/constitution-template.md +1 -1
- package/scaffold/pt-br/agent-instructions.md +5 -2
- package/scaffold/pt-br/commands/dw-analyze-project.md +1 -1
- package/scaffold/pt-br/commands/dw-brainstorm.md +4 -1
- package/scaffold/pt-br/commands/dw-functional-doc.md +3 -3
- package/scaffold/pt-br/commands/dw-harness-audit.md +4 -2
- package/scaffold/pt-br/commands/dw-help.md +14 -7
- package/scaffold/pt-br/commands/dw-opportunities.md +131 -0
- package/scaffold/pt-br/commands/dw-refactor.md +54 -0
- package/scaffold/pt-br/commands/dw-review.md +1 -1
- package/scaffold/pt-br/commands/dw-skill-health.md +11 -3
- package/scaffold/pt-br/references/refactoring-catalog.md +1 -1
- package/scaffold/pt-br/templates/constitution-template.md +1 -1
- package/scaffold/scripts/cdp-relay/Cargo.toml +1 -1
- package/scaffold/scripts/cdp-relay/bin/cdp-relay.exe +0 -0
- package/scaffold/scripts/cdp-relay/src/main.rs +120 -23
- package/scaffold/scripts/functional-doc/run-playwright-flow.mjs +55 -24
- package/scaffold/scripts/lib/capture-screenshots.mjs +56 -17
- package/scaffold/scripts/lib/resolve-browser.mjs +314 -82
- package/scaffold/skill-registry.json +1 -1
- package/scaffold/skills/api-testing-recipes/SKILL.md +12 -0
- package/scaffold/skills/docker-compose-recipes/SKILL.md +12 -0
- package/scaffold/skills/dw-codebase-intel/SKILL.md +13 -1
- package/scaffold/skills/dw-context-budget/SKILL.md +12 -0
- package/scaffold/skills/dw-council/SKILL.md +12 -0
- package/scaffold/skills/dw-debug-protocol/SKILL.md +12 -0
- package/scaffold/skills/dw-execute-phase/SKILL.md +12 -0
- package/scaffold/skills/dw-git-discipline/SKILL.md +12 -0
- package/scaffold/skills/dw-incident-response/SKILL.md +12 -0
- package/scaffold/skills/dw-llm-eval/SKILL.md +12 -0
- package/scaffold/skills/dw-memory/SKILL.md +12 -0
- package/scaffold/skills/dw-review-rigor/SKILL.md +14 -2
- package/scaffold/skills/dw-search-first/SKILL.md +12 -0
- package/scaffold/skills/dw-silent-failure/SKILL.md +12 -0
- package/scaffold/skills/dw-simplification/SKILL.md +18 -6
- package/scaffold/skills/dw-simplification/references/deep-modules.md +1 -1
- package/scaffold/skills/dw-source-grounding/SKILL.md +12 -0
- package/scaffold/skills/dw-testing-discipline/SKILL.md +12 -0
- package/scaffold/skills/dw-testing-discipline/references/playwright-recipes.md +18 -19
- package/scaffold/skills/dw-ui-discipline/SKILL.md +12 -0
- package/scaffold/skills/dw-verify/SKILL.md +10 -0
- package/scaffold/skills/humanizer/SKILL.md +12 -0
- package/scaffold/skills/remotion-best-practices/SKILL.md +12 -0
- package/scaffold/skills/security-review/SKILL.md +12 -0
- package/scaffold/skills/vercel-react-best-practices/SKILL.md +12 -0
- package/scaffold/skills/vercel-react-best-practices/references/perf-discipline.md +1 -1
|
@@ -148,3 +148,15 @@ The oracle ladder fixes both: forces measurement, forces ANCHORED measurement (l
|
|
|
148
148
|
## Bottom line
|
|
149
149
|
|
|
150
150
|
> An AI feature without an eval suite is a feature you can't ship safely. An eval suite without calibration is a number you can't trust. Build the dataset from real failures, climb the ladder from cheap to expensive, calibrate the judge against humans, and re-run before every model swap. The discipline is small; the absence of it is one of the largest sources of "we shipped and don't know if it's worse" experiences in the industry.
|
|
151
|
+
|
|
152
|
+
## Structured Return
|
|
153
|
+
|
|
154
|
+
When invoked directly or by a harness, return or merge this block:
|
|
155
|
+
|
|
156
|
+
- **Status:** `PASS` when eval strategy/results meet the feature gate, `FINDINGS` when eval gaps or regressions remain, `BLOCKED` when dataset/rubric/calibration is missing, `NOT_APPLICABLE` when no LLM/AI behavior is in scope.
|
|
157
|
+
- **Scope:** feature, model path, dataset, oracle rungs, and command mode.
|
|
158
|
+
- **Evidence:** dataset provenance, metrics, judge calibration, run logs, and failure cases.
|
|
159
|
+
- **Artifacts:** eval plan, cases.jsonl, run JSONL, rubric, or QA log path.
|
|
160
|
+
- **Decisions:** oracle rung selection, metric thresholds, and accepted deviations.
|
|
161
|
+
- **Risks:** judge drift, synthetic-only cases, same-model judging, hallucination, or uncovered trajectories.
|
|
162
|
+
- **Next Step:** add dataset case, run eval, calibrate judge, or block release.
|
|
@@ -193,3 +193,15 @@ Ported from Compozy's `cy-workflow-memory` skill (`/tmp/compozy/.agents/skills/c
|
|
|
193
193
|
Credit: Compozy project (https://github.com/compozy/compozy).
|
|
194
194
|
|
|
195
195
|
The Context Budget section adapts the context-loading discipline from [`tech-leads-club/agent-skills/tlc-spec-driven`](https://github.com/tech-leads-club/agent-skills/tree/main/packages/skills-catalog/skills/(development)/tlc-spec-driven) (CC-BY-4.0, Felipe Rodrigues). The target, the anti-co-load rules, and the "monitoring signal" framing come from there; the integration with two-tier memory and the specific file ceilings are dev-workflow-specific.
|
|
196
|
+
|
|
197
|
+
## Structured Return
|
|
198
|
+
|
|
199
|
+
When invoked directly or by a harness, return or merge this block:
|
|
200
|
+
|
|
201
|
+
- **Status:** `PASS` when memory is current and scoped correctly, `FINDINGS` when memory is stale/overloaded, `BLOCKED` when required task/project context is missing, `NOT_APPLICABLE` when no session memory is needed.
|
|
202
|
+
- **Scope:** project memory, task memory, checkpoint, and files considered.
|
|
203
|
+
- **Evidence:** memory entries read/written, stale facts removed, and promotion decision.
|
|
204
|
+
- **Artifacts:** `.dw/STATE.md`, task `MEMORY.md`, checkpoint, or compaction note.
|
|
205
|
+
- **Decisions:** promote, keep local, discard, or compact.
|
|
206
|
+
- **Risks:** stale instructions, duplicated facts, leaked task-local context, or oversized memory.
|
|
207
|
+
- **Next Step:** exact memory write, compaction, or checkpoint action.
|
|
@@ -14,7 +14,7 @@ A set of rules the caller applies while producing a review report. This skill do
|
|
|
14
14
|
|
|
15
15
|
## When Invoked
|
|
16
16
|
|
|
17
|
-
By `/dw-review --code-only`, `/dw-review --coverage-only`, `/dw-brainstorm --refactor`. The caller has already identified a scope (files, a PR, a codebase area). This skill governs how findings are selected, deduplicated, ordered, and phrased.
|
|
17
|
+
By `/dw-review --code-only`, `/dw-review --coverage-only`, `/dw-refactor`, and `/dw-brainstorm --mode=refactor-audit`. The caller has already identified a scope (files, a PR, a codebase area). This skill governs how findings are selected, deduplicated, ordered, and phrased.
|
|
18
18
|
|
|
19
19
|
## Required Inputs
|
|
20
20
|
|
|
@@ -124,7 +124,7 @@ The caller emits:
|
|
|
124
124
|
|
|
125
125
|
- `/dw-review --code-only` — applies all five rules to its Level-3 review output; uses prior reports in `.dw/spec/*/reviews/` to dedupe across rounds.
|
|
126
126
|
- `/dw-review --coverage-only` — applies de-dup + severity-ordering when listing gaps between PRD requirements and code.
|
|
127
|
-
- `/dw-
|
|
127
|
+
- `/dw-refactor` — applies rules 1, 2, 4, 5 when cataloging code smells (rule 3 adapts: a "smell" with a justifying ADR becomes a `low` finding at most).
|
|
128
128
|
|
|
129
129
|
Callers should mention this skill in their "Skills Complementares" section.
|
|
130
130
|
|
|
@@ -137,3 +137,15 @@ Ported from Compozy's `cy-review-round` skill (`/tmp/compozy/.agents/skills/cy-r
|
|
|
137
137
|
- No issue-file frontmatter (Compozy uses it to interoperate with its remediation engine; dev-workflow's remediation is manual or via `/dw-qa --fix`).
|
|
138
138
|
|
|
139
139
|
Credit: Compozy project (https://github.com/compozy/compozy).
|
|
140
|
+
|
|
141
|
+
## Structured Return
|
|
142
|
+
|
|
143
|
+
When invoked directly or by a harness, return or merge this block:
|
|
144
|
+
|
|
145
|
+
- **Status:** `PASS` when no defensible findings remain, `FINDINGS` when review findings exist, `BLOCKED` when diff/context is insufficient, `NOT_APPLICABLE` when no review is in scope.
|
|
146
|
+
- **Scope:** diff range, files reviewed, prior rounds, and review mode.
|
|
147
|
+
- **Evidence:** file/line references, behavior impact, and prior-round disposition.
|
|
148
|
+
- **Artifacts:** review report, inline findings, or consolidation notes.
|
|
149
|
+
- **Decisions:** finding severity/order, duplicate suppression, and false-positive rejection.
|
|
150
|
+
- **Risks:** missing tests, unreviewed generated files, stale base branch, or non-defensible claims.
|
|
151
|
+
- **Next Step:** exact fix, verification, or approval/block marker.
|
|
@@ -29,3 +29,15 @@ Use before writing custom infrastructure, adding an integration, choosing a depe
|
|
|
29
29
|
- Build custom only after search channels were checked or explicitly unavailable.
|
|
30
30
|
|
|
31
31
|
Inspired by ECC's `search-first`; adapted to compose with `dw-source-grounding`, `/dw-plan`, and `/dw-find-skills`.
|
|
32
|
+
|
|
33
|
+
## Structured Return
|
|
34
|
+
|
|
35
|
+
When invoked directly or by a harness, return or merge this block:
|
|
36
|
+
|
|
37
|
+
- **Status:** `PASS` when an `ADOPT`/`WRAP`/`COMPOSE`/`BUILD` decision is justified, `FINDINGS` when search gaps remain, `BLOCKED` when required search channels are unavailable, `NOT_APPLICABLE` when no new capability/dependency is being chosen.
|
|
38
|
+
- **Scope:** capability, constraints, project area, and checked channels.
|
|
39
|
+
- **Evidence:** repo hits, installed skills, `.dw/intel/`, package/docs links, or explicit unavailable-channel note.
|
|
40
|
+
- **Artifacts:** TechSpec/ADR decision entry or dependency/reuse note.
|
|
41
|
+
- **Decisions:** `ADOPT`, `WRAP`, `COMPOSE`, or `BUILD`, with rejected alternatives.
|
|
42
|
+
- **Risks:** license, maintenance, dependency weight, version drift, or local reinvention.
|
|
43
|
+
- **Next Step:** install/adapt/write decision record or ask for missing constraint.
|
|
@@ -31,3 +31,15 @@ Only flag a finding when you can name:
|
|
|
31
31
|
- the minimal fix.
|
|
32
32
|
|
|
33
33
|
Inspired by ECC's `silent-failure-hunter`; adapted as both a skill and a dispatchable `dw-silent-failure-hunter` agent.
|
|
34
|
+
|
|
35
|
+
## Structured Return
|
|
36
|
+
|
|
37
|
+
When invoked directly or by a harness, return or merge this block:
|
|
38
|
+
|
|
39
|
+
- **Status:** `PASS` when no concrete silent-failure risk is found, `FINDINGS` when at least one named risk exists, `BLOCKED` when failure paths cannot be inspected, `NOT_APPLICABLE` when no fallible control flow is in scope.
|
|
40
|
+
- **Scope:** files/functions, failure paths, async boundaries, and IO surfaces inspected.
|
|
41
|
+
- **Evidence:** exact location, trigger, hidden bad outcome, and current handling behavior.
|
|
42
|
+
- **Artifacts:** review finding, bugfix task, regression guard, or log/trace path.
|
|
43
|
+
- **Decisions:** why the issue is concrete enough to flag or why it is an explicit pass.
|
|
44
|
+
- **Risks:** swallowed errors, false success, lost stack/context, untracked async work, or unsafe fallback.
|
|
45
|
+
- **Next Step:** minimal fix or verification proving the pass.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dw-simplification
|
|
3
|
-
description: Use when simplifying code. Chesterton's Fence (WHY first), behavior-preserving refactor, complexity metrics, deep-modules analysis. Triggers from /dw-review and /dw-brainstorm refactor-audit.
|
|
3
|
+
description: Use when simplifying code. Chesterton's Fence (WHY first), behavior-preserving refactor, complexity metrics, deep-modules analysis. Triggers from /dw-review, /dw-refactor, and /dw-brainstorm refactor-audit.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
6
|
- Edit
|
|
@@ -18,7 +18,7 @@ Behavioral discipline for simplifying code without breaking it. The trap of refa
|
|
|
18
18
|
Read this skill when:
|
|
19
19
|
|
|
20
20
|
- `/dw-review --code-only` flagged a complexity issue (deep nesting, long function, duplication).
|
|
21
|
-
- `/dw-brainstorm` dispatched
|
|
21
|
+
- `/dw-refactor` or `/dw-brainstorm` dispatched **refactor-audit** and proposed a simplification target.
|
|
22
22
|
- The user explicitly asks to "clean this up" / "simplify X".
|
|
23
23
|
- During `/dw-run` if the implementation accidentally produced complex code that wants pre-commit cleanup.
|
|
24
24
|
|
|
@@ -117,9 +117,9 @@ For changes that altered cyclomatic complexity, optionally run a complexity anal
|
|
|
117
117
|
|
|
118
118
|
In the formal Level 3 review (post-Level 2 chain from `dw-review-implementation`), code-review flags complexity issues using the patterns above. Each flagged issue references this skill: "consider simplifying via guard clauses; apply Chesterton's Fence — verify why the nested check exists before flattening."
|
|
119
119
|
|
|
120
|
-
## How `/dw-
|
|
120
|
+
## How `/dw-refactor` / refactor-audit uses this
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
`/dw-refactor` and the refactor-audit mode dispatched by `/dw-brainstorm` catalog code smells (Fowler vocabulary) AND run the deep-modules analysis (`references/deep-modules.md`) against the target area. For each smell or shallow-module flag, the proposed refactor cites:
|
|
123
123
|
|
|
124
124
|
1. Which simplification rule applies (early return / extract method / lookup table / etc.).
|
|
125
125
|
2. Whether Chesterton's Fence concerns block the refactor (existing tests inadequate? no recent commits explaining the structure? → flag as YELLOW, don't act).
|
|
@@ -138,10 +138,22 @@ The refactor-audit mode dispatched by `/dw-brainstorm` catalogs code smells (Fow
|
|
|
138
138
|
- `references/chestertons-fence.md` — the protocol in detail; case studies of "obvious-but-wrong" removals.
|
|
139
139
|
- `references/complexity-metrics.md` — when each metric (cyclomatic, cognitive, depth, fanout) actually matters; how to measure cheaply.
|
|
140
140
|
- `references/behavior-preserving.md` — characterization tests, refactor with test gate, rollback patterns, codemod tooling per language.
|
|
141
|
-
- `references/deep-modules.md` — high-leverage modules behind small interfaces; deletion test, locality, leverage, seam, adapter diagnostic; anti-patterns (shallow wrapper, god-module). Invoked by `/dw-brainstorm` refactor-audit mode.
|
|
141
|
+
- `references/deep-modules.md` — high-leverage modules behind small interfaces; deletion test, locality, leverage, seam, adapter diagnostic; anti-patterns (shallow wrapper, god-module). Invoked by `/dw-refactor` and `/dw-brainstorm` refactor-audit mode.
|
|
142
142
|
|
|
143
143
|
## Inspired by
|
|
144
144
|
|
|
145
|
-
Adapted from [`addyosmani/agent-skills/code-simplification`](https://github.com/addyosmani/agent-skills) by Addy Osmani (MIT license). Core principles (Chesterton's Fence, behavior preservation, scope discipline, Rule of 500) preserved. dev-workflow integration: invoked by
|
|
145
|
+
Adapted from [`addyosmani/agent-skills/code-simplification`](https://github.com/addyosmani/agent-skills) by Addy Osmani (MIT license). Core principles (Chesterton's Fence, behavior preservation, scope discipline, Rule of 500) preserved. dev-workflow integration: invoked by `/dw-review`, `/dw-refactor`, and `/dw-brainstorm` refactor-audit mode via Complementary Skills.
|
|
146
146
|
|
|
147
147
|
The deep-modules reference is adapted from [`mattpocock/skills/improve-codebase-architecture`](https://github.com/mattpocock/skills/tree/main/improve-codebase-architecture) by Matt Pocock (MIT license). Core framing (deep modules = high leverage at small interface, deletion test, shallow-wrapper anti-pattern) preserved; paths and integration points rebased on dev-workflow conventions.
|
|
148
|
+
|
|
149
|
+
## Structured Return
|
|
150
|
+
|
|
151
|
+
When invoked directly or by a harness, return or merge this block:
|
|
152
|
+
|
|
153
|
+
- **Status:** `PASS` when simplification is safe and justified, `FINDINGS` when concrete refactor opportunities exist, `BLOCKED` when behavior or ownership is unclear, `NOT_APPLICABLE` when no simplification/refactor scope exists.
|
|
154
|
+
- **Scope:** module, smell, complexity signal, and behavior boundary.
|
|
155
|
+
- **Evidence:** code paths read, metrics, duplication, tests, and Chesterton's Fence rationale.
|
|
156
|
+
- **Artifacts:** refactor recommendation, characterization test plan, codemod plan, or task list.
|
|
157
|
+
- **Decisions:** simplify now, defer, split, preserve, or reject.
|
|
158
|
+
- **Risks:** behavior drift, shallow wrapper churn, missing tests, or broad blast radius.
|
|
159
|
+
- **Next Step:** smallest behavior-preserving refactor or prerequisite guard.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A **deep module** absorbs complexity behind a narrow public surface. Its callers see a small, stable API and get a lot of work done per call. A **shallow module** is the opposite — small interface AND small implementation, so it adds an indirection without absorbing any complexity. Or worse: a god-module, deep implementation BUT huge interface, where the surface itself is the complexity.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`/dw-refactor` and the refactor-audit mode of `/dw-brainstorm` check every candidate module against this framing alongside the Fowler smell taxonomy. A "code smell" can mislead if the construct is actually a deep wrapper doing its job correctly.
|
|
6
6
|
|
|
7
7
|
## The premise
|
|
8
8
|
|
|
@@ -126,3 +126,15 @@ Already does multi-source research; gains the citation discipline. Each finding
|
|
|
126
126
|
## Inspired by
|
|
127
127
|
|
|
128
128
|
Adapted from [`addyosmani/agent-skills/source-driven-development`](https://github.com/addyosmani/agent-skills) by Addy Osmani (MIT license). Core protocol (Detect → Fetch → Implement → Cite) and source authority hierarchy preserved. dev-workflow integration: invoked by `dw-create-techspec`, `dw-deps-audit`, `dw-deep-research` via Complementary Skills, and citation format aligned with our existing report frontmatter conventions (`type: ...`, `schema_version: ...`).
|
|
129
|
+
|
|
130
|
+
## Structured Return
|
|
131
|
+
|
|
132
|
+
When invoked directly or by a harness, return or merge this block:
|
|
133
|
+
|
|
134
|
+
- **Status:** `PASS` when the decision is source-grounded and cited, `FINDINGS` when citations are stale/weak, `BLOCKED` when required sources cannot be fetched, `NOT_APPLICABLE` when no external/source-sensitive decision exists.
|
|
135
|
+
- **Scope:** decision, library/API/version, and source priority tier.
|
|
136
|
+
- **Evidence:** URL, version, retrieval date, source tier, and quoted/paraphrased facts.
|
|
137
|
+
- **Artifacts:** citation block, TechSpec/ADR entry, dependency note, or research report.
|
|
138
|
+
- **Decisions:** accepted source, rejected source, and freshness judgment.
|
|
139
|
+
- **Risks:** stale docs, unofficial authority, version mismatch, or uncited assumptions.
|
|
140
|
+
- **Next Step:** fetch stronger source, cite, defer, or mark unverified.
|
|
@@ -171,3 +171,15 @@ Any of these in a PR is enough to REJECT a verdict:
|
|
|
171
171
|
## Bottom line
|
|
172
172
|
|
|
173
173
|
> A test that cannot fail is decorative. A test that fails for the wrong reason is misleading. Build tests that fail for exactly one reason — the reason the invariant was violated — and trust them when they do. Mocks isolate. Real systems validate. Coverage shines a light. Mutation score grades the suite. Agents will reach for the mock and the snapshot; the guardrails make them put both down. Tests reveal bugs, not just pass.
|
|
174
|
+
|
|
175
|
+
## Structured Return
|
|
176
|
+
|
|
177
|
+
When invoked directly or by a harness, return or merge this block:
|
|
178
|
+
|
|
179
|
+
- **Status:** `PASS` when tests target real behavior at the right layer, `FINDINGS` when test design gaps or anti-patterns remain, `BLOCKED` when the invariant or owning layer is unclear, `NOT_APPLICABLE` when no test work is in scope.
|
|
180
|
+
- **Scope:** invariant, owning layer, suite/file, and workflow (`author`, `review`, `debug`, `flaky`).
|
|
181
|
+
- **Evidence:** production behavior read, existing suite, execution output, anti-patterns, and guardrails checked.
|
|
182
|
+
- **Artifacts:** test file, matrix, flaky quarantine note, mutation/coverage result, or QA log.
|
|
183
|
+
- **Decisions:** placement, mock/real-system boundary, snapshot classification, and negative companion.
|
|
184
|
+
- **Risks:** false confidence, flakiness, mock drift, implementation-detail coupling, or weak assertions.
|
|
185
|
+
- **Next Step:** exact test edit, verification command, or clarification needed.
|
|
@@ -280,38 +280,37 @@ to pick a browser deterministically. Both `.dw/scripts/functional-doc/run-playwr
|
|
|
280
280
|
(video, via `page.screencast`) and `.dw/scripts/lib/capture-screenshots.mjs` (responsive shots)
|
|
281
281
|
use it, so the same rules apply everywhere.
|
|
282
282
|
|
|
283
|
-
Resolution order:
|
|
283
|
+
Resolution order: Playwright Chromium default first → optional CDP fallback from `BROWSER_TEST` env
|
|
284
|
+
or `.dw/config.json` (`browserTest`) only if the primary launch fails.
|
|
284
285
|
|
|
285
|
-
- **Default
|
|
286
|
+
- **Default / primary:** full Chromium in new-headless mode (`channel: "chromium"`) — desktop-faithful
|
|
286
287
|
rendering, never opens WSLg. This is the recommended default on WSL.
|
|
287
|
-
- **`BROWSER_TEST` = CDP URL** (e.g. `http://localhost:9222`):
|
|
288
|
-
|
|
289
|
-
- **`BROWSER_TEST` = Windows exe** (e.g. `/mnt/c/.../msedge.exe`):
|
|
290
|
-
remote-debugging mode (`--remote-allow-origins=*`) and connects over CDP.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
and connects via the Windows host gateway. Falls back to headless Chromium if the relay/rule is absent.
|
|
288
|
+
- **`BROWSER_TEST` = CDP URL** (e.g. `http://localhost:9222`): fallback target using
|
|
289
|
+
`chromium.connectOverCDP` if the primary Chromium launch fails.
|
|
290
|
+
- **`BROWSER_TEST` = Windows exe** (e.g. `/mnt/c/.../msedge.exe`): fallback target. The runner launches it
|
|
291
|
+
with a temp profile in remote-debugging mode (`--remote-allow-origins=*`) and connects over CDP. In NAT
|
|
292
|
+
mode it starts the bundled **`cdp-relay.exe`** on Windows in reverse mode; the relay opens outbound
|
|
293
|
+
connections to a WSL broker, which exposes a local CDP proxy.
|
|
294
294
|
- **`BROWSER_TEST` = channel** (`chrome` | `msedge` | `chromium`): launches that channel locally.
|
|
295
295
|
|
|
296
|
-
NAT mode needs
|
|
297
|
-
binds its debug port to loopback only):
|
|
296
|
+
NAT mode needs this one-time user-level setup only if you want the Windows-browser CDP fallback:
|
|
298
297
|
|
|
299
298
|
```bash
|
|
300
299
|
npx @brunosps00/dev-workflow setup-wsl-browser
|
|
301
300
|
```
|
|
302
301
|
|
|
303
|
-
This installs the `cdp-relay.exe` bundled with dev-workflow
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
throwaway profile and are killed on exit.
|
|
302
|
+
This installs the `cdp-relay.exe` bundled with dev-workflow into `%LOCALAPPDATA%\dev-workflow`.
|
|
303
|
+
No admin prompt, firewall rule, or Rust toolchain is required on the Windows target. After that,
|
|
304
|
+
the *real* Windows browser is available as a fallback from WSL — including `page.screencast` video — under NAT.
|
|
305
|
+
The launched browser and relay use a throwaway profile and are killed on exit.
|
|
307
306
|
|
|
308
307
|
Two env vars, two jobs — keep them distinct:
|
|
309
308
|
- `BROWSER` — opens URLs for a human (used by `/dw-generate-pr`).
|
|
310
|
-
- `BROWSER_TEST` —
|
|
309
|
+
- `BROWSER_TEST` — optional CDP fallback target for QA / functional-doc / redesign capture.
|
|
311
310
|
|
|
312
|
-
To
|
|
313
|
-
the Windows PATH; mirrored works too).
|
|
314
|
-
|
|
311
|
+
To make the real Windows browser available as fallback, set `BROWSER_TEST` to its exe path (NAT works
|
|
312
|
+
as long as `node` is on the Windows PATH; mirrored works too). Leave `BROWSER_TEST` unset for the plain
|
|
313
|
+
Playwright-default path.
|
|
315
314
|
|
|
316
315
|
```bash
|
|
317
316
|
# Probe what would be used (cleans up any launched browser):
|
|
@@ -155,3 +155,15 @@ In all bend cases, document the bend in the PR (one line). "I skipped the state
|
|
|
155
155
|
The shorter route — "agent loads a 161-palette catalog and picks one" — produces dashboards that look like every other dashboard because the agent has no constraint that pulls it away from training-data centers of mass.
|
|
156
156
|
|
|
157
157
|
The grounding pulls the design toward the specific surface, the specific user, the specific moment. Even with the same palette catalog, a "3am on-call dark room troubleshooting" design lands different choices than a "morning manager approving expenses" design. That difference is where surface quality lives.
|
|
158
|
+
|
|
159
|
+
## Structured Return
|
|
160
|
+
|
|
161
|
+
When invoked directly or by a harness, return or merge this block:
|
|
162
|
+
|
|
163
|
+
- **Status:** `PASS` when grounding, state coverage, accessibility, and visual review pass, `FINDINGS` when UI risks remain, `BLOCKED` when design authority or surface job is unclear, `NOT_APPLICABLE` when no UI surface is in scope.
|
|
164
|
+
- **Scope:** screen/component, design authority, user job, state matrix, and device/context.
|
|
165
|
+
- **Evidence:** design source read, four grounding answers, states checked, screenshots, and accessibility checks.
|
|
166
|
+
- **Artifacts:** UI proposal, design notes, state matrix, screenshot path, or QA finding.
|
|
167
|
+
- **Decisions:** palette/type/component choices, state handling, and accepted deviations.
|
|
168
|
+
- **Risks:** training-data defaults, missing states, contrast/focus failures, unreadable hierarchy, or mobile overflow.
|
|
169
|
+
- **Next Step:** exact design/code/QA action or missing input to gather.
|
|
@@ -161,3 +161,13 @@ Verification failure is information, not a dead end. Protocol:
|
|
|
161
161
|
Discover the project gate before claiming success. Prefer documented gates in `.dw/rules/`, then package scripts such as `verify`, `check`, `ci`, or `test`, then Makefile/just/pyproject equivalents. If no verification command exists, state that explicitly in the Verification Report and avoid completion language.
|
|
162
162
|
|
|
163
163
|
Load `references/verification-discovery-and-attribution.md` when you need the full discovery checklist, command integration table, or attribution notes.
|
|
164
|
+
|
|
165
|
+
## Structured Return
|
|
166
|
+
|
|
167
|
+
- **Status:** `PASS` fresh gates prove the claim, `FINDINGS` fail/incomplete, `BLOCKED` no valid gate, `NOT_APPLICABLE` no claim.
|
|
168
|
+
- **Scope:** claim, files, gates, environment.
|
|
169
|
+
- **Evidence:** commands, exit codes, output, timestamps.
|
|
170
|
+
- **Artifacts:** report, logs, screenshots, CI link.
|
|
171
|
+
- **Decisions:** selected gate and skipped-gate reason.
|
|
172
|
+
- **Risks:** stale output, partial runs, unverified generated files.
|
|
173
|
+
- **Next Step:** rerun, fix, add gate, or name blocker.
|
|
@@ -75,3 +75,15 @@ Provide:
|
|
|
75
75
|
2. Brief audit of what still sounds AI-generated
|
|
76
76
|
3. Final rewrite
|
|
77
77
|
4. Short change summary when useful
|
|
78
|
+
|
|
79
|
+
## Structured Return
|
|
80
|
+
|
|
81
|
+
When invoked directly or by a harness, return or merge this block:
|
|
82
|
+
|
|
83
|
+
- **Status:** `PASS` when the final rewrite preserves meaning and voice, `FINDINGS` when prose issues remain, `BLOCKED` when audience/voice/source constraints are missing, `NOT_APPLICABLE` when no prose rewrite is in scope.
|
|
84
|
+
- **Scope:** document, audience, intended voice, and sections edited.
|
|
85
|
+
- **Evidence:** AI-writing tells found, source meaning preserved, and style constraints applied.
|
|
86
|
+
- **Artifacts:** draft rewrite, audit, final rewrite, and change summary.
|
|
87
|
+
- **Decisions:** tone choices, cuts, preserved terminology, and unresolved wording tradeoffs.
|
|
88
|
+
- **Risks:** meaning drift, over-polishing, unsupported claims, or voice mismatch.
|
|
89
|
+
- **Next Step:** accept final rewrite, provide missing voice sample, or revise named section.
|
|
@@ -61,3 +61,15 @@ Read individual rule files for detailed explanations and code examples:
|
|
|
61
61
|
- [rules/parameters.md](rules/parameters.md) - Make a video parametrizable by adding a Zod schema
|
|
62
62
|
- [rules/maps.md](rules/maps.md) - Add a map using Mapbox and animate it
|
|
63
63
|
- [rules/voiceover.md](rules/voiceover.md) - Adding AI-generated voiceover to Remotion compositions using ElevenLabs TTS
|
|
64
|
+
|
|
65
|
+
## Structured Return
|
|
66
|
+
|
|
67
|
+
When invoked directly or by a harness, return or merge this block:
|
|
68
|
+
|
|
69
|
+
- **Status:** `PASS` when relevant Remotion rules are selected and actionable, `FINDINGS` when implementation gaps remain, `BLOCKED` when composition/media requirements are missing, `NOT_APPLICABLE` when no Remotion/video work is in scope.
|
|
70
|
+
- **Scope:** composition, media type, render target, and selected rules.
|
|
71
|
+
- **Evidence:** project files, rule references, asset constraints, and render/test output when available.
|
|
72
|
+
- **Artifacts:** implementation guidance, component/file path, render command, or asset list.
|
|
73
|
+
- **Decisions:** selected rule set, animation/media approach, and rejected alternatives.
|
|
74
|
+
- **Risks:** timing drift, asset decode failure, text overflow, render cost, or accessibility/caption gaps.
|
|
75
|
+
- **Next Step:** exact rule file to read, code edit, or render validation command.
|
|
@@ -329,3 +329,15 @@ If no vulnerabilities found, state: "No high-confidence vulnerabilities identifi
|
|
|
329
329
|
- `terraform.md` - IaC security
|
|
330
330
|
- `ci-cd.md` - Pipeline security
|
|
331
331
|
- `cloud.md` - AWS/GCP/Azure security
|
|
332
|
+
|
|
333
|
+
## Structured Return
|
|
334
|
+
|
|
335
|
+
When invoked directly or by a harness, return or merge this block:
|
|
336
|
+
|
|
337
|
+
- **Status:** `PASS` when no high-confidence security findings remain, `FINDINGS` when exploitable issues exist, `BLOCKED` when threat context or sensitive paths cannot be inspected, `NOT_APPLICABLE` when no security-relevant surface is in scope.
|
|
338
|
+
- **Scope:** assets, trust boundaries, languages/frameworks, data classes, and threat model slice.
|
|
339
|
+
- **Evidence:** file/line references, exploit path, affected data/actor, and reference category.
|
|
340
|
+
- **Artifacts:** security findings, verification notes, remediation plan, or audit report.
|
|
341
|
+
- **Decisions:** severity, confidence, exploitability, and false-positive rejection.
|
|
342
|
+
- **Risks:** authz bypass, injection, secret exposure, SSRF, supply chain, logging, or misconfiguration.
|
|
343
|
+
- **Next Step:** minimal remediation, verification, or explicit accepted risk owner.
|
|
@@ -150,3 +150,15 @@ For the complete guide with all rules expanded: `AGENTS.md`
|
|
|
150
150
|
## References
|
|
151
151
|
|
|
152
152
|
- `references/perf-discipline.md` — workflow discipline (measure → identify → fix → verify → guard) that wraps the per-rule recipes above. Use when tackling performance work; cite the metric and tool before applying any rule. Adapted from [`addyosmani/agent-skills/performance-optimization`](https://github.com/addyosmani/agent-skills/tree/main/performance-optimization) (MIT).
|
|
153
|
+
|
|
154
|
+
## Structured Return
|
|
155
|
+
|
|
156
|
+
When invoked directly or by a harness, return or merge this block:
|
|
157
|
+
|
|
158
|
+
- **Status:** `PASS` when selected rules are evidence-backed and verified, `FINDINGS` when React/Next.js performance issues remain, `BLOCKED` when baseline metrics or app context are missing, `NOT_APPLICABLE` when no React/Next.js performance surface is in scope.
|
|
159
|
+
- **Scope:** route/component, framework mode, metric, and selected rule category.
|
|
160
|
+
- **Evidence:** baseline measurement, trace/profile/build output, rule references, and affected code paths.
|
|
161
|
+
- **Artifacts:** recommendation, code path, perf log, bundle report, or guard test.
|
|
162
|
+
- **Decisions:** rule selected, metric target, and rejected optimizations.
|
|
163
|
+
- **Risks:** premature optimization, hydration mismatch, cache staleness, bundle bloat, or rerender regressions.
|
|
164
|
+
- **Next Step:** measure, apply rule, verify, or add regression guard.
|
|
@@ -119,4 +119,4 @@ Optimize in this order; don't jump to (5) before (1).
|
|
|
119
119
|
|
|
120
120
|
## Integration with dev-workflow
|
|
121
121
|
|
|
122
|
-
Use with
|
|
122
|
+
Use with `/dw-refactor` when flagging perf-related smells: cite the metric, the measurement tool, and the suggested rule from the `rules/` directory. Without those three, a perf "smell" is a guess.
|