@brunosps00/dev-workflow 0.5.0 → 0.6.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 +7 -3
- package/lib/constants.js +2 -0
- package/lib/install-deps.js +39 -1
- package/package.json +1 -1
- package/scaffold/en/commands/dw-brainstorm.md +50 -15
- package/scaffold/en/commands/dw-code-review.md +10 -0
- package/scaffold/en/commands/dw-create-prd.md +10 -1
- package/scaffold/en/commands/dw-generate-pr.md +4 -1
- package/scaffold/en/commands/dw-help.md +3 -0
- package/scaffold/en/commands/dw-quick.md +9 -7
- package/scaffold/en/commands/dw-review-implementation.md +11 -0
- package/scaffold/en/commands/dw-security-check.md +271 -0
- package/scaffold/en/templates/brainstorm-matrix.md +12 -4
- package/scaffold/en/templates/idea-onepager.md +90 -0
- package/scaffold/pt-br/commands/dw-brainstorm.md +54 -19
- package/scaffold/pt-br/commands/dw-code-review.md +10 -0
- package/scaffold/pt-br/commands/dw-create-prd.md +10 -1
- package/scaffold/pt-br/commands/dw-generate-pr.md +4 -1
- package/scaffold/pt-br/commands/dw-help.md +3 -0
- package/scaffold/pt-br/commands/dw-quick.md +9 -7
- package/scaffold/pt-br/commands/dw-review-implementation.md +11 -0
- package/scaffold/pt-br/commands/dw-security-check.md +271 -0
- package/scaffold/pt-br/templates/brainstorm-matrix.md +12 -4
- package/scaffold/pt-br/templates/idea-onepager.md +90 -0
- package/scaffold/skills/security-review/languages/csharp.md +507 -0
- package/scaffold/skills/security-review/languages/rust.md +584 -0
- package/scaffold/skills/security-review/languages/typescript.md +373 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ npx @brunosps00/dev-workflow init
|
|
|
10
10
|
|
|
11
11
|
This will:
|
|
12
12
|
1. Ask you to select a language (English or Portuguese)
|
|
13
|
-
2. Create `.dw/commands/` with
|
|
13
|
+
2. Create `.dw/commands/` with 27 workflow commands
|
|
14
14
|
3. Create `.dw/templates/` with document templates (PRD, TechSpec, Tasks, ADR, etc.)
|
|
15
15
|
4. Create `.dw/rules/` (populated by `/dw-analyze-project`)
|
|
16
16
|
5. Install bundled skills (`dw-verify`, `dw-memory`, `dw-review-rigor`, `ui-ux-pro-max`, `security-review`, etc.) to `.agents/skills/`
|
|
@@ -29,7 +29,7 @@ npx @brunosps00/dev-workflow install-deps
|
|
|
29
29
|
### Planning
|
|
30
30
|
|
|
31
31
|
#### `/dw-brainstorm`
|
|
32
|
-
Facilitates structured ideation before opening a PRD or implementation. Explores multiple directions — conservative, balanced, and bold — with trade-offs for each, then converges on concrete next steps. No code is written or files modified.
|
|
32
|
+
Facilitates structured ideation before opening a PRD or implementation. Explores multiple directions — conservative, balanced, and bold — with trade-offs for each, then converges on concrete next steps. **Product-aware**: when PRDs or rules exist, automatically reads them to produce a Feature Inventory and tags each option as `[IMPROVES: <feature>]`, `[CONSOLIDATES: <A>+<B>]`, or `[NEW]`. With optional `--onepager` flag, generates a durable one-pager at `.dw/spec/ideas/<slug>.md` that `/dw-create-prd` can consume to reduce clarification questions. Inspired by [`addyosmani/agent-skills@idea-refine`](https://skills.sh/addyosmani/agent-skills/idea-refine), adapted to product-level (features) rather than code-level grounding. No code is written or project files modified by the brainstorm itself.
|
|
33
33
|
|
|
34
34
|
#### `/dw-autopilot`
|
|
35
35
|
Full pipeline orchestrator that takes a wish and automatically runs the entire development flow: codebase intelligence, research (conditional), brainstorm, PRD, techspec, tasks, execution, QA, review, and commit. Stops at 3 gates: PRD approval, tasks approval, and PR confirmation. With GSD installed, leverages plan verification and parallel execution.
|
|
@@ -77,6 +77,9 @@ Performs a formal Level 3 code review before PR creation, verifying PRD complian
|
|
|
77
77
|
#### `/dw-refactoring-analysis`
|
|
78
78
|
Audits the codebase for code smells and refactoring opportunities using Martin Fowler's catalog. Detects bloaters, change preventers, dispensables, couplers, conditional complexity, and DRY violations, then maps each to a concrete refactoring technique with before/after code sketches. Includes coupling/cohesion metrics, SOLID analysis, and a prioritized action plan (P0-P3).
|
|
79
79
|
|
|
80
|
+
#### `/dw-security-check`
|
|
81
|
+
Rigid multi-layer security check for **TypeScript, Python, C#, and Rust** projects. Combines OWASP static review (language-aware, via the bundled `security-review` skill), Trivy SCA/secret/IaC scanning (`trivy fs` + `trivy config`), and native lockfile audit (`npm audit` / `pip-audit` / `dotnet list package --vulnerable` / `cargo audit`). Consults Context7 MCP for framework-version-specific best practices (Next.js, Django, ASP.NET Core, Actix/Axum/Rocket, etc.). Hard gates: any CRITICAL or HIGH finding produces REJECTED status, blocking `/dw-code-review`, `/dw-review-implementation`, and `/dw-generate-pr`. No bypass flag. Requires Trivy (install via `install-deps`).
|
|
82
|
+
|
|
80
83
|
### Git & PR
|
|
81
84
|
|
|
82
85
|
#### `/dw-commit`
|
|
@@ -164,7 +167,7 @@ All wrappers point to `.dw/commands/` as the single source of truth.
|
|
|
164
167
|
```
|
|
165
168
|
your-project/
|
|
166
169
|
├── .dw/
|
|
167
|
-
│ ├── commands/ #
|
|
170
|
+
│ ├── commands/ # 27 workflow command files
|
|
168
171
|
│ ├── templates/ # Document templates (PRD, TechSpec, etc.)
|
|
169
172
|
│ ├── rules/ # Project-specific rules (run /dw-analyze-project)
|
|
170
173
|
│ ├── references/ # Reference documentation
|
|
@@ -214,6 +217,7 @@ Installed via `npx @brunosps00/dev-workflow install-deps`:
|
|
|
214
217
|
| **Context7 MCP** | Contextual documentation lookup for AI assistants | [upstash/context7-mcp](https://github.com/upstash/context7-mcp) |
|
|
215
218
|
| **react-doctor** | Health score and diagnostics for React projects | [react.doctor](https://www.react.doctor/) |
|
|
216
219
|
| **GSD (get-shit-done-cc)** | Optional engine: parallel execution, plan verification, codebase intelligence, cross-session persistence | [gsd-build/get-shit-done](https://github.com/gsd-build/get-shit-done) |
|
|
220
|
+
| **Trivy** | Native binary scanner used by `/dw-security-check` for CVE, secret, and IaC scanning. `install-deps` detects presence and prints OS-specific install instructions (brew / curl script / choco / Docker) — does not install automatically. | [aquasecurity.github.io/trivy](https://aquasecurity.github.io/trivy/) |
|
|
217
221
|
|
|
218
222
|
## Options
|
|
219
223
|
|
package/lib/constants.js
CHANGED
|
@@ -25,6 +25,7 @@ const COMMANDS = {
|
|
|
25
25
|
{ name: 'dw-run-plan', description: 'Execute ALL tasks sequentially until the plan is complete' },
|
|
26
26
|
{ name: 'dw-run-qa', description: 'Run visual QA with browser automation, E2E tests, and accessibility' },
|
|
27
27
|
{ name: 'dw-run-task', description: 'Execute a single task with built-in validation and testing' },
|
|
28
|
+
{ name: 'dw-security-check', description: 'Run a rigid multi-layer security check (OWASP static + Trivy SCA/IaC + native audit) for TS, Python, C#, or Rust projects' },
|
|
28
29
|
{ name: 'dw-update', description: 'Update dev-workflow to the latest version published on npm without leaving the agent session' },
|
|
29
30
|
],
|
|
30
31
|
'pt-br': [
|
|
@@ -53,6 +54,7 @@ const COMMANDS = {
|
|
|
53
54
|
{ name: 'dw-run-plan', description: 'Executar TODAS as tasks sequencialmente ate completar o plano' },
|
|
54
55
|
{ name: 'dw-run-qa', description: 'Executar QA visual com automacao de browser, testes E2E e acessibilidade' },
|
|
55
56
|
{ name: 'dw-run-task', description: 'Executar uma task com validacao e testes integrados' },
|
|
57
|
+
{ name: 'dw-security-check', description: 'Check de seguranca rigido multi-camada (OWASP estatico + Trivy SCA/IaC + audit nativo) para projetos TS, Python, C# ou Rust' },
|
|
56
58
|
{ name: 'dw-update', description: 'Atualizar o dev-workflow para a versao mais recente publicada no npm sem sair da sessao do agente' },
|
|
57
59
|
],
|
|
58
60
|
};
|
package/lib/install-deps.js
CHANGED
|
@@ -25,13 +25,47 @@ function run() {
|
|
|
25
25
|
check: null,
|
|
26
26
|
install: 'npx get-shit-done-cc@latest --claude --codex --copilot --opencode --local -y',
|
|
27
27
|
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Trivy (security scanner)',
|
|
30
|
+
check: 'trivy --version',
|
|
31
|
+
install: null,
|
|
32
|
+
instructions: [
|
|
33
|
+
'Trivy is a native binary and cannot be installed via npm. Install it using your OS package manager:',
|
|
34
|
+
' macOS: brew install trivy',
|
|
35
|
+
' Linux: curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin',
|
|
36
|
+
' Windows: choco install trivy (or: scoop install trivy)',
|
|
37
|
+
' Docker: docker pull aquasec/trivy:latest (use via alias or wrapper)',
|
|
38
|
+
'',
|
|
39
|
+
'Once installed, /dw-security-check will use it for CVE, secret, and IaC scanning.',
|
|
40
|
+
],
|
|
41
|
+
},
|
|
28
42
|
];
|
|
29
43
|
|
|
30
44
|
let installed = 0;
|
|
31
45
|
let skipped = 0;
|
|
32
46
|
let failed = 0;
|
|
47
|
+
let missing = 0;
|
|
33
48
|
|
|
34
49
|
for (const dep of deps) {
|
|
50
|
+
// Detect-only dependencies (install === null): check presence, print instructions if missing
|
|
51
|
+
if (dep.install === null) {
|
|
52
|
+
process.stdout.write(` Checking ${dep.name}...`);
|
|
53
|
+
try {
|
|
54
|
+
execSync(dep.check, { stdio: 'pipe', timeout: 10000 });
|
|
55
|
+
console.log(' \x1b[32m✓ already installed\x1b[0m');
|
|
56
|
+
installed++;
|
|
57
|
+
} catch (err) {
|
|
58
|
+
console.log(' \x1b[33m— not found\x1b[0m');
|
|
59
|
+
if (Array.isArray(dep.instructions)) {
|
|
60
|
+
for (const line of dep.instructions) {
|
|
61
|
+
console.log(` ${line}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
missing++;
|
|
65
|
+
}
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
|
|
35
69
|
process.stdout.write(` Installing ${dep.name}...`);
|
|
36
70
|
try {
|
|
37
71
|
execSync(dep.install, { stdio: 'pipe', timeout: 300000 });
|
|
@@ -45,7 +79,11 @@ function run() {
|
|
|
45
79
|
}
|
|
46
80
|
|
|
47
81
|
console.log(`\n ${'='.repeat(40)}`);
|
|
48
|
-
|
|
82
|
+
const parts = [`${installed} installed`];
|
|
83
|
+
if (skipped) parts.push(`${skipped} skipped`);
|
|
84
|
+
if (missing) parts.push(`${missing} require manual install (see instructions above)`);
|
|
85
|
+
if (failed) parts.push(`${failed} failed`);
|
|
86
|
+
console.log(` Done! ${parts.join(', ')}`);
|
|
49
87
|
console.log();
|
|
50
88
|
}
|
|
51
89
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brunosps00/dev-workflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "AI-driven development workflow commands for any project. Scaffolds a complete PRD-to-PR pipeline with multi-platform AI assistant support.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"dev-workflow": "./bin/dev-workflow.js"
|
|
@@ -13,8 +13,10 @@ You are a brainstorming facilitator for the current workspace. This command exis
|
|
|
13
13
|
|
|
14
14
|
## Flags
|
|
15
15
|
|
|
16
|
-
- **(default)**: normal brainstorm with 3-7 options (conservative, balanced, bold) and trade-offs
|
|
16
|
+
- **(default)**: normal brainstorm with 3-7 options (conservative, balanced, bold) and trade-offs. If the product has PRDs or rules, a **Product Inventory** is produced automatically and each option carries a classification tag.
|
|
17
|
+
- **`--onepager`**: at the end of the brainstorm, generate a durable one-pager at `.dw/spec/ideas/<slug>.md` (using `.dw/templates/idea-onepager.md`) with Feature Inventory + Classification & Rationale + MVP Scope + Not Doing + Assumptions. Use when you want a persisted product artifact before moving to `/dw-create-prd`.
|
|
17
18
|
- **`--council`**: after the normal brainstorm, invoke the `dw-council` skill to stress-test the top 2-3 options via 3-5 archetypes (pragmatic-engineer, architect-advisor, security-advocate, product-mind, devils-advocate). Useful when the choice is high-impact and there is genuine dissent between paths.
|
|
19
|
+
- Flags are composable: `--onepager --council` produces the one-pager after the council debate.
|
|
18
20
|
|
|
19
21
|
## Decision Flowchart: Brainstorm vs Direct PRD
|
|
20
22
|
|
|
@@ -46,6 +48,7 @@ When available in the project under `./.agents/skills/`, use these skills to enr
|
|
|
46
48
|
## Template Reference
|
|
47
49
|
|
|
48
50
|
- Brainstorm matrix template: `.dw/templates/brainstorm-matrix.md` (relative to workspace root)
|
|
51
|
+
- Durable one-pager template: `.dw/templates/idea-onepager.md` (used with `--onepager` flag)
|
|
49
52
|
|
|
50
53
|
Use this command when the user wants to:
|
|
51
54
|
- Generate ideas for product, UX, architecture, or automation
|
|
@@ -56,37 +59,57 @@ Use this command when the user wants to:
|
|
|
56
59
|
|
|
57
60
|
## Required Behavior
|
|
58
61
|
|
|
62
|
+
<critical>The brainstorm is a **product-level** phase, not technical. DO NOT dive into architecture, stack, endpoints, schemas. That's the techspec's job. Here we work user journeys, value, features, and boundaries.</critical>
|
|
63
|
+
|
|
59
64
|
1. Start by summarizing the problem in 1 to 3 sentences.
|
|
60
|
-
2.
|
|
61
|
-
3.
|
|
62
|
-
|
|
63
|
-
-
|
|
65
|
+
2. **Reframe as "How Might We"**: turn the raw idea into `How might we [verb] for [user] so that [outcome]?`. This pulls the team out of premature "solution mode".
|
|
66
|
+
3. **Product Inventory (required if the product exists)**:
|
|
67
|
+
- If `.dw/spec/prd-*/` has PRDs OR `.dw/rules/index.md` exists, read these artifacts to map the **current product's feature inventory** (product level, not code level).
|
|
68
|
+
- Sources to consult: `.dw/spec/prd-*/prd.md` (Overview / Main Features / User Stories sections), `.dw/rules/index.md` and `.dw/rules/<module>.md`, `.planning/intel/` if present.
|
|
69
|
+
- Produce a **short Feature Inventory (5-12 bullets)** before diverging: "the product today does X, Y, Z".
|
|
70
|
+
- If the project is greenfield (no PRDs or rules), record: "Feature Inventory: greenfield — no product artifacts yet".
|
|
71
|
+
4. If essential context is missing for the user (problem, persona, expected value), ask short and objective questions before expanding.
|
|
72
|
+
5. Structure the brainstorm into multiple directions, avoiding locking in too early on a single answer.
|
|
73
|
+
6. For each direction (3-7), make explicit:
|
|
74
|
+
- **Required classification tag**: `[IMPROVES: <existing feature>]` | `[CONSOLIDATES: <feat A> + <feat B>]` | `[NEW]`
|
|
75
|
+
- Core idea (in product language — journey, value, boundary)
|
|
64
76
|
- Benefits
|
|
65
77
|
- Risks or limitations
|
|
66
78
|
- Approximate effort level
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
7. Whenever it makes sense, include conservative, balanced, and bold alternatives.
|
|
80
|
+
8. Close with a pragmatic recommendation and clear next steps.
|
|
81
|
+
9. **If the `--onepager` flag is present**: at the end, generate `.dw/spec/ideas/<slug>.md` using `.dw/templates/idea-onepager.md`, filling Feature Inventory, Classification & Rationale, Recommended Direction (product language), MVP Scope (user stories), Not Doing, Key Assumptions, and Open Questions. Report the path to the user.
|
|
70
82
|
|
|
71
83
|
## Preferred Response Format
|
|
72
84
|
|
|
73
|
-
### 1.
|
|
85
|
+
### 1. How Might We
|
|
86
|
+
- Reframed sentence
|
|
87
|
+
|
|
88
|
+
### 2. Product Inventory
|
|
89
|
+
- 5-12 bullets of mapped existing features (or "greenfield")
|
|
90
|
+
|
|
91
|
+
### 3. Framing
|
|
74
92
|
- Objective
|
|
75
93
|
- Constraints
|
|
76
94
|
- Decision criteria
|
|
77
95
|
|
|
78
|
-
###
|
|
79
|
-
-
|
|
96
|
+
### 4. Options (matrix `brainstorm-matrix.md`)
|
|
97
|
+
- 3 to 7 distinct options
|
|
98
|
+
- Each option with `[IMPROVES] / [CONSOLIDATES] / [NEW]` tag
|
|
80
99
|
- Avoid listing superficial variations of the same idea
|
|
81
100
|
|
|
82
|
-
###
|
|
101
|
+
### 5. Convergence
|
|
83
102
|
- Recommend 1 or 2 paths
|
|
84
103
|
- Explain why they win in the current context
|
|
85
104
|
|
|
86
|
-
###
|
|
105
|
+
### 6. One-pager (if `--onepager`)
|
|
106
|
+
- Path of the created file at `.dw/spec/ideas/<slug>.md`
|
|
107
|
+
|
|
108
|
+
### 7. Next Steps
|
|
87
109
|
- Short and actionable list
|
|
88
110
|
- If appropriate, suggest which command to use next:
|
|
89
|
-
- `/dw-create-prd`
|
|
111
|
+
- `/dw-create-prd` (main successor; accepts the one-pager as input, reducing clarification questions)
|
|
112
|
+
- `/dw-quick` (if it's a small IMPROVES that fits in a single task, ≤3 files)
|
|
90
113
|
- `/dw-create-techspec`
|
|
91
114
|
- `/dw-create-tasks`
|
|
92
115
|
- `/dw-bugfix`
|
|
@@ -113,8 +136,20 @@ Depending on the request, this command may produce:
|
|
|
113
136
|
## Closing
|
|
114
137
|
|
|
115
138
|
At the end, always leave the user in one of these situations:
|
|
116
|
-
- With a clear recommendation
|
|
139
|
+
- With a clear recommendation (including an IMPROVES/CONSOLIDATES/NEW classification)
|
|
117
140
|
- With better questions to decide
|
|
118
141
|
- With a next workspace command to follow
|
|
142
|
+
- With the one-pager at `.dw/spec/ideas/<slug>.md` (if `--onepager` was used)
|
|
143
|
+
|
|
144
|
+
## Inspired by
|
|
145
|
+
|
|
146
|
+
The codebase-grounded idea refinement pattern is inspired by [`addyosmani/agent-skills@idea-refine`](https://skills.sh/addyosmani/agent-skills/idea-refine) (Addy Osmani, Google — 1.4K+ installs). Adaptations for dev-workflow:
|
|
147
|
+
|
|
148
|
+
- **Product level, not code level**: while `idea-refine` uses Glob/Grep/Read over `src/*`, here we read **PRDs + rules + intel** to map the **feature inventory** of the product. The brainstorm stays product-focused.
|
|
149
|
+
- **Explicit classification** (IMPROVES / CONSOLIDATES / NEW) as dev-workflow-native discipline — forces the team to decide whether the idea is new, consolidates existing features, or improves one, before opening a PRD.
|
|
150
|
+
- Output at `.dw/spec/ideas/<slug>.md` (sibling of `prd-<slug>/`) instead of `docs/ideas/` — preserves dev-workflow path conventions.
|
|
151
|
+
- Integration with the existing pipeline: `/dw-create-prd` accepts the one-pager as input, reducing clarification questions.
|
|
152
|
+
|
|
153
|
+
Credit: Addy Osmani and the `idea-refine` pattern.
|
|
119
154
|
|
|
120
155
|
</system_instructions>
|
|
@@ -23,6 +23,7 @@ When available in the project under `./.agents/skills/`, use these skills as ana
|
|
|
23
23
|
|
|
24
24
|
- `dw-review-rigor`: **ALWAYS** — applies de-duplication (same pattern in N files = 1 finding), severity ordering (critical → high → medium → low), verify-before-flag, skip-what-linter-catches, and signal-over-volume. The report's "Issues Found" table follows this discipline.
|
|
25
25
|
- `dw-verify`: **ALWAYS** — invoked before emitting an `APPROVED` or `APPROVED WITH CAVEATS` verdict. Without a VERIFICATION REPORT PASS (test + lint + build), the verdict cannot be APPROVED.
|
|
26
|
+
- `/dw-security-check`: **ALWAYS for TS/Python/C#/Rust projects** — invoked as step 6.7 (Security Layer) before emitting a verdict. If the project uses a supported language and `security-check.md` is missing OR has REJECTED status, the verdict is **REJECTED** — no exception.
|
|
26
27
|
- `security-review`: use when auth, authorization, external input, upload, SQL, external integration, secrets, SSRF, XSS, or sensitive surfaces are present
|
|
27
28
|
- `vercel-react-best-practices`: use when the diff touches React/Next.js to review rendering, fetching, bundle, hydration, and performance patterns
|
|
28
29
|
|
|
@@ -214,6 +215,15 @@ If prior reviews exist in `{{PRD_PATH}}/reviews/` or a previous `{{PRD_PATH}}/dw
|
|
|
214
215
|
|
|
215
216
|
<critical>Invoke `dw-verify` and include the VERIFICATION REPORT at the start of the report. Without PASS, the verdict can only be `REJECTED` — never `APPROVED` or `APPROVED WITH CAVEATS`.</critical>
|
|
216
217
|
|
|
218
|
+
### 6.7. Security Layer (Required for TS/Python/C#/Rust projects)
|
|
219
|
+
|
|
220
|
+
<critical>For TypeScript/JavaScript, Python, C#, or Rust projects whose diff touches code, invoke `/dw-security-check` with the same `{{PRD_PATH}}`. Without a `security-check.md` present in the PRD OR with a status other than CLEAN / PASSED WITH OBSERVATIONS, the verdict is **REJECTED** — no exception.</critical>
|
|
221
|
+
|
|
222
|
+
- If `/dw-security-check` returns **REJECTED**: automatic verdict **REJECTED**. Include the security-check's CRITICAL/HIGH findings with appropriate severity in the final report's "Issues Found" section.
|
|
223
|
+
- If it returns **PASSED WITH OBSERVATIONS**: may proceed to APPROVED WITH CAVEATS, listing medium/low observations as caveats.
|
|
224
|
+
- If it returns **CLEAN**: proceeds normally to a verdict based on the remaining criteria.
|
|
225
|
+
- Projects in languages not supported by security-check (Go, Java, PHP, Ruby, etc.) → skip this step with a visible note in the code-review report.
|
|
226
|
+
|
|
217
227
|
### 7. Generate Code Review Report (Required)
|
|
218
228
|
|
|
219
229
|
Save to `{{PRD_PATH}}/dw-code-review.md`:
|
|
@@ -9,7 +9,15 @@
|
|
|
9
9
|
- Do NOT use when requirements are still vague and unexplored (use `/dw-brainstorm` first)
|
|
10
10
|
|
|
11
11
|
## Pipeline Position
|
|
12
|
-
**Predecessor:** `/dw-brainstorm` (optional) | **Successor:** `/dw-create-techspec`
|
|
12
|
+
**Predecessor:** `/dw-brainstorm` (optional; may pass a one-pager as input) | **Successor:** `/dw-create-techspec`
|
|
13
|
+
|
|
14
|
+
## One-pager as Input (optional)
|
|
15
|
+
|
|
16
|
+
If `.dw/spec/ideas/<slug>.md` exists (produced by `/dw-brainstorm --onepager`), **read it before asking questions**. The one-pager already provides: Problem Statement, product Feature Inventory, Classification (IMPROVES/CONSOLIDATES/NEW), Recommended Direction, MVP Scope, Not Doing, Key Assumptions, and Open Questions.
|
|
17
|
+
|
|
18
|
+
With a valid one-pager (all fields filled), **reduce the minimum clarification questions from 7 to 4** — focus only on remaining gaps (e.g., specific acceptance criteria, concrete success metrics, error flows, edge cases). DO NOT repeat questions already answered in the one-pager.
|
|
19
|
+
|
|
20
|
+
In the final PRD, add an "Idea Origin" section citing the one-pager and preserving the classification tag.
|
|
13
21
|
|
|
14
22
|
## Requirement Clarity Guide
|
|
15
23
|
|
|
@@ -71,6 +79,7 @@
|
|
|
71
79
|
- What is NOT in scope
|
|
72
80
|
- **Impacted projects** (consult `.dw/rules/index.md` to identify which systems are affected)
|
|
73
81
|
- <critical>DO NOT GENERATE THE PRD WITHOUT FIRST ASKING AT LEAST 7 CLARIFICATION QUESTIONS</critical>
|
|
82
|
+
- <critical>**EXCEPTION**: If a one-pager at `.dw/spec/ideas/<slug>.md` was passed as input and all its fields are filled, the minimum drops to **4 questions** — focus on gaps (acceptance criteria, metrics, edge cases). DO NOT repeat questions already answered in the one-pager.</critical>
|
|
74
83
|
|
|
75
84
|
### 2. Plan (Required)
|
|
76
85
|
Create a PRD development plan including:
|
|
@@ -14,8 +14,11 @@ You are an assistant specialized in creating well-documented Pull Requests. Your
|
|
|
14
14
|
| Skill | Trigger |
|
|
15
15
|
|-------|---------|
|
|
16
16
|
| `dw-verify` | **ALWAYS** — invoked before `git push`. Without a VERIFICATION REPORT PASS in the current session AFTER the last code edit, the PR **CANNOT** be created. |
|
|
17
|
+
| `/dw-security-check` | **ALWAYS for TS/Python/C#/Rust projects** — `security-check.md` with status ≠ REJECTED is required for supported-language projects. |
|
|
17
18
|
|
|
18
|
-
<critical>Hard gate: if the current session has no VERIFICATION REPORT PASS from `dw-verify` produced AFTER the last edit/commit, STOP and invoke `dw-verify` before proceeding. A PR is a permanent artifact — it demands the highest verification standard.</critical>
|
|
19
|
+
<critical>Hard gate 1 (verify): if the current session has no VERIFICATION REPORT PASS from `dw-verify` produced AFTER the last edit/commit, STOP and invoke `dw-verify` before proceeding. A PR is a permanent artifact — it demands the highest verification standard.</critical>
|
|
20
|
+
|
|
21
|
+
<critical>Hard gate 2 (security): for TS/Python/C#/Rust projects, if `{{PRD_PATH}}/security-check.md` is missing OR has REJECTED status, STOP and invoke `/dw-security-check` before proceeding. HIGH/CRITICAL vulnerabilities CANNOT reach the PR. For other languages (Go, Java, etc.), this gate is skipped with a note.</critical>
|
|
19
22
|
|
|
20
23
|
## Usage
|
|
21
24
|
|
|
@@ -25,6 +25,8 @@ You are a workspace help assistant. When invoked, present the user with a comple
|
|
|
25
25
|
| design, ui, redesign | `/dw-redesign-ui` | Audit + propose + implement visual |
|
|
26
26
|
| decision, adr, architecture | `/dw-adr` | Record an Architecture Decision Record |
|
|
27
27
|
| debate, council, stress-test, opinions | `/dw-brainstorm --council` or `/dw-create-techspec --council` | Invokes `dw-council` for a multi-advisor debate |
|
|
28
|
+
| security, vulnerability, owasp, trivy, cve | `/dw-security-check` | Rigid multi-layer check (OWASP static + Trivy SCA/IaC + native audit) for TS/Python/C#/Rust |
|
|
29
|
+
| refine, refinement, idea, one-pager | `/dw-brainstorm --onepager` | Idea refinement with Product Inventory + classification (IMPROVES/CONSOLIDATES/NEW) + durable one-pager |
|
|
28
30
|
| revert, rollback task | `/dw-revert-task` | Safe revert with dependency checks |
|
|
29
31
|
| hotfix, quick change | `/dw-quick` | One-off task with guarantees, no PRD |
|
|
30
32
|
| resume, where I left off | `/dw-resume` | Restore previous session context |
|
|
@@ -148,6 +150,7 @@ This workspace uses an AI command system that automates the full development cyc
|
|
|
148
150
|
| `/dw-review-implementation` | Compares PRD vs code (FRs, endpoints, tasks) | PRD path | Gap report |
|
|
149
151
|
| `/dw-code-review` | Formal code review (quality, rules, tests) | PRD path | `code-review.md` |
|
|
150
152
|
| `/dw-refactoring-analysis` | Audit code smells and refactoring opportunities (Fowler's catalog) | PRD path | `refactoring-analysis.md` |
|
|
153
|
+
| `/dw-security-check` | Rigid security check (OWASP static + Trivy SCA/IaC + native audit) for TS/Python/C#/Rust | PRD path or code | `security-check.md` |
|
|
151
154
|
|
|
152
155
|
### Versioning
|
|
153
156
|
|
|
@@ -7,6 +7,7 @@ You are a quick task executor. This command exists to implement one-off changes
|
|
|
7
7
|
## When to Use
|
|
8
8
|
- Use for small changes that don't justify the full pipeline (PRD -> TechSpec -> Tasks)
|
|
9
9
|
- Use for hotfixes, config adjustments, dependency updates, one-off refactors
|
|
10
|
+
- Use when invoked after `/dw-brainstorm --onepager` and the one-pager carries `[IMPROVES]` classification with an MVP Scope fitting in ≤3 files (skip-PRD path)
|
|
10
11
|
- Do NOT use for new features with multiple requirements (use `/dw-create-prd`)
|
|
11
12
|
- Do NOT use for complex bugs (use `/dw-bugfix`)
|
|
12
13
|
|
|
@@ -28,13 +29,14 @@ You are a quick task executor. This command exists to implement one-off changes
|
|
|
28
29
|
## Required Behavior
|
|
29
30
|
|
|
30
31
|
1. Read `.dw/rules/` to understand project patterns and conventions
|
|
31
|
-
2.
|
|
32
|
-
3.
|
|
33
|
-
4.
|
|
34
|
-
5.
|
|
35
|
-
6. Run
|
|
36
|
-
7.
|
|
37
|
-
8.
|
|
32
|
+
2. **If a one-pager exists** at `.dw/spec/ideas/<slug>.md` and was passed as input, read it first. If classification is `[IMPROVES]` and MVP Scope fits in ≤3 files, proceed. If `[NEW]` or `[CONSOLIDATES]` with larger scope, warn and redirect to `/dw-create-prd`.
|
|
33
|
+
3. Summarize the change in 1-2 sentences and confirm scope with the user
|
|
34
|
+
4. If the change seems too large (>3 files, >100 lines), warn and suggest `/dw-create-prd`
|
|
35
|
+
5. Implement the change following project conventions
|
|
36
|
+
6. Run relevant existing tests (unit, integration)
|
|
37
|
+
7. Run lint if configured in the project
|
|
38
|
+
8. Invoke `dw-verify` and include the VERIFICATION REPORT in the output before committing. Without PASS, DO NOT commit.
|
|
39
|
+
9. Create atomic semantic commit with the change
|
|
38
40
|
|
|
39
41
|
## GSD Integration
|
|
40
42
|
|
|
@@ -28,6 +28,7 @@ This command is called automatically by `/dw-run-plan` at the end of all tasks,
|
|
|
28
28
|
| Skill | Trigger |
|
|
29
29
|
|-------|---------|
|
|
30
30
|
| `dw-review-rigor` | **ALWAYS** — when listing gaps between PRD/TechSpec and code, apply de-duplication (same gap in N modules = 1 entry), severity ordering, and verify-intent-before-flag |
|
|
31
|
+
| `/dw-security-check` | **ALWAYS for TS/Python/C#/Rust projects whose diff touches code** — findings become a "Security Gaps" category in the interactive corrections cycle. If status is REJECTED, the gaps are blocking. |
|
|
31
32
|
|
|
32
33
|
## Input Variables
|
|
33
34
|
|
|
@@ -42,6 +43,16 @@ Analyze the implementation by comparing:
|
|
|
42
43
|
2. Technical specifications from the TechSpec
|
|
43
44
|
3. Tasks defined in tasks.md
|
|
44
45
|
4. Actually implemented code (via git diff/status)
|
|
46
|
+
5. **Security of the implemented code** (via `/dw-security-check` for TS/Python/C#/Rust projects)
|
|
47
|
+
|
|
48
|
+
## Security Layer (Required for TS/Python/C#/Rust projects)
|
|
49
|
+
|
|
50
|
+
<critical>If the project uses TypeScript, Python, C#, or Rust and the diff touches code (not just docs), INVOKE `/dw-security-check {{PRD_PATH}}` before listing gaps. The status and findings returned feed the "Security Gaps" section of the Level 2 report.</critical>
|
|
51
|
+
|
|
52
|
+
- **REJECTED** status from security-check → CRITICAL/HIGH findings become **blocking** gaps in the interactive corrections cycle (equivalent to a critical missing feature)
|
|
53
|
+
- **PASSED WITH OBSERVATIONS** → MEDIUM/LOW findings become recommendations in the cycle
|
|
54
|
+
- **CLEAN** → "Security Gaps: None" section in the report
|
|
55
|
+
- Project in an unsupported language → note in the report indicating the security layer was skipped
|
|
45
56
|
|
|
46
57
|
## Files to Read (Required)
|
|
47
58
|
|