@brunosps00/dev-workflow 1.1.3 → 1.2.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.
- 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 +2 -2
- package/lib/skill-registry.js +47 -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/functional-doc/run-playwright-flow.mjs +55 -24
- package/scaffold/scripts/lib/capture-screenshots.mjs +56 -17
- package/scaffold/scripts/lib/resolve-browser.mjs +43 -40
- package/scaffold/skill-registry.json +1 -12
- 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-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 +15 -16
- 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
- package/scaffold/skills/dw-context-budget/SKILL.md +0 -45
|
@@ -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,21 +280,20 @@ 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
|
-
The relay opens outbound connections to a WSL broker, which exposes a local CDP proxy. Falls back
|
|
294
|
-
to headless Chromium if the relay 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.
|
|
295
294
|
- **`BROWSER_TEST` = channel** (`chrome` | `msedge` | `chromium`): launches that channel locally.
|
|
296
295
|
|
|
297
|
-
NAT mode needs
|
|
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
|
|
@@ -302,16 +301,16 @@ npx @brunosps00/dev-workflow setup-wsl-browser
|
|
|
302
301
|
|
|
303
302
|
This installs the `cdp-relay.exe` bundled with dev-workflow into `%LOCALAPPDATA%\dev-workflow`.
|
|
304
303
|
No admin prompt, firewall rule, or Rust toolchain is required on the Windows target. After that,
|
|
305
|
-
the *real* Windows browser is
|
|
304
|
+
the *real* Windows browser is available as a fallback from WSL — including `page.screencast` video — under NAT.
|
|
306
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.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: dw-context-budget
|
|
3
|
-
description: Audit context overhead from commands, skills, agents, MCPs, and instruction files before sessions degrade.
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- Read
|
|
6
|
-
- Grep
|
|
7
|
-
- Glob
|
|
8
|
-
- Bash
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# dw-context-budget
|
|
12
|
-
|
|
13
|
-
Use when a project has many commands, skills, agents, MCP servers, or long instruction files.
|
|
14
|
-
|
|
15
|
-
## Audit Targets
|
|
16
|
-
|
|
17
|
-
- `CLAUDE.md` and `AGENTS.md`
|
|
18
|
-
- `.dw/commands/*.md`
|
|
19
|
-
- `.agents/skills/*/SKILL.md`
|
|
20
|
-
- `.agents/agents/*.md`
|
|
21
|
-
- `.claude/agents/*.md`
|
|
22
|
-
- `.opencode/agent/*.md`
|
|
23
|
-
- `.claude/settings.json`
|
|
24
|
-
|
|
25
|
-
## Heuristics
|
|
26
|
-
|
|
27
|
-
- Prose estimate: `word count * 1.3`
|
|
28
|
-
- JSON/code estimate: `character count / 4`
|
|
29
|
-
- Flag command files over 20KB
|
|
30
|
-
- Flag `SKILL.md` files over 12KB
|
|
31
|
-
- Flag agent files over 8KB
|
|
32
|
-
- Flag more than 10 configured MCP servers
|
|
33
|
-
- Flag duplicate copies loaded by more than one platform when a fallback would be enough
|
|
34
|
-
|
|
35
|
-
## Report
|
|
36
|
-
|
|
37
|
-
Return:
|
|
38
|
-
|
|
39
|
-
1. Estimated overhead by category.
|
|
40
|
-
2. Top 10 largest files.
|
|
41
|
-
3. Duplicate or overlapping components.
|
|
42
|
-
4. Top 5 concrete savings.
|
|
43
|
-
5. What must remain loaded because commands depend on it.
|
|
44
|
-
|
|
45
|
-
Inspired by ECC's `context-budget` and `strategic-compact` patterns; adapted for dev-workflow's `.dw/` scaffold and cross-platform wrappers.
|