@brunosps00/dev-workflow 0.4.5 → 0.5.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.
Files changed (58) hide show
  1. package/README.md +29 -6
  2. package/lib/constants.js +6 -0
  3. package/package.json +1 -1
  4. package/scaffold/en/commands/dw-adr.md +117 -0
  5. package/scaffold/en/commands/dw-autopilot.md +76 -2
  6. package/scaffold/en/commands/dw-brainstorm.md +6 -0
  7. package/scaffold/en/commands/dw-bugfix.md +9 -0
  8. package/scaffold/en/commands/dw-code-review.md +18 -0
  9. package/scaffold/en/commands/dw-create-tasks.md +12 -0
  10. package/scaffold/en/commands/dw-create-techspec.md +8 -0
  11. package/scaffold/en/commands/dw-fix-qa.md +5 -0
  12. package/scaffold/en/commands/dw-generate-pr.md +8 -0
  13. package/scaffold/en/commands/dw-help.md +42 -2
  14. package/scaffold/en/commands/dw-quick.md +8 -1
  15. package/scaffold/en/commands/dw-refactoring-analysis.md +1 -0
  16. package/scaffold/en/commands/dw-resume.md +10 -3
  17. package/scaffold/en/commands/dw-revert-task.md +114 -0
  18. package/scaffold/en/commands/dw-review-implementation.md +6 -0
  19. package/scaffold/en/commands/dw-run-plan.md +19 -1
  20. package/scaffold/en/commands/dw-run-task.md +14 -1
  21. package/scaffold/en/commands/dw-update.md +143 -0
  22. package/scaffold/en/templates/adr-template.md +56 -0
  23. package/scaffold/en/templates/prd-template.md +12 -0
  24. package/scaffold/en/templates/task-template.md +12 -0
  25. package/scaffold/en/templates/tasks-template.md +6 -0
  26. package/scaffold/en/templates/techspec-template.md +12 -0
  27. package/scaffold/pt-br/commands/dw-adr.md +117 -0
  28. package/scaffold/pt-br/commands/dw-autopilot.md +76 -2
  29. package/scaffold/pt-br/commands/dw-brainstorm.md +6 -0
  30. package/scaffold/pt-br/commands/dw-bugfix.md +9 -0
  31. package/scaffold/pt-br/commands/dw-code-review.md +18 -0
  32. package/scaffold/pt-br/commands/dw-create-tasks.md +12 -0
  33. package/scaffold/pt-br/commands/dw-create-techspec.md +8 -0
  34. package/scaffold/pt-br/commands/dw-fix-qa.md +5 -0
  35. package/scaffold/pt-br/commands/dw-generate-pr.md +8 -0
  36. package/scaffold/pt-br/commands/dw-help.md +42 -2
  37. package/scaffold/pt-br/commands/dw-quick.md +8 -1
  38. package/scaffold/pt-br/commands/dw-refactoring-analysis.md +1 -0
  39. package/scaffold/pt-br/commands/dw-resume.md +10 -3
  40. package/scaffold/pt-br/commands/dw-revert-task.md +114 -0
  41. package/scaffold/pt-br/commands/dw-review-implementation.md +6 -0
  42. package/scaffold/pt-br/commands/dw-run-plan.md +19 -1
  43. package/scaffold/pt-br/commands/dw-run-task.md +14 -1
  44. package/scaffold/pt-br/commands/dw-update.md +144 -0
  45. package/scaffold/pt-br/templates/adr-template.md +56 -0
  46. package/scaffold/pt-br/templates/prd-template.md +12 -0
  47. package/scaffold/pt-br/templates/task-template.md +12 -0
  48. package/scaffold/pt-br/templates/tasks-template.md +6 -0
  49. package/scaffold/pt-br/templates/techspec-template.md +12 -0
  50. package/scaffold/skills/dw-council/SKILL.md +189 -0
  51. package/scaffold/skills/dw-council/agents/architect-advisor.md +44 -0
  52. package/scaffold/skills/dw-council/agents/devils-advocate.md +45 -0
  53. package/scaffold/skills/dw-council/agents/pragmatic-engineer.md +47 -0
  54. package/scaffold/skills/dw-council/agents/product-mind.md +48 -0
  55. package/scaffold/skills/dw-council/agents/security-advocate.md +48 -0
  56. package/scaffold/skills/dw-memory/SKILL.md +178 -0
  57. package/scaffold/skills/dw-review-rigor/SKILL.md +145 -0
  58. package/scaffold/skills/dw-verify/SKILL.md +196 -0
@@ -0,0 +1,48 @@
1
+ ---
2
+ id: security-advocate
3
+ title: The Security Advocate
4
+ description: Threat-modeling advisor focused on attack surface, blast radius, compliance, data protection, and concrete mitigations.
5
+ ---
6
+
7
+ You are **The Security Advocate**, one archetype in a Council of Advisors. You assume adversaries are competent and motivated, and you reason from threat models, blast radius, compliance obligations, and defense in depth.
8
+
9
+ Your priorities, in order:
10
+
11
+ 1. Threat modeling (who attacks this, how, what they gain)
12
+ 2. Attack surface changes
13
+ 3. Blast radius and containment
14
+ 4. Compliance and data protection obligations
15
+ 5. Defense in depth
16
+
17
+ You ask:
18
+ - Who attacks this, and how?
19
+ - What do they gain on success?
20
+ - How is compromise contained?
21
+ - Which obligations remain non-optional even under schedule pressure?
22
+
23
+ Do not:
24
+
25
+ - Dismiss realistic risks because mitigation is inconvenient
26
+ - Accept "we'll add security later" without explicit risk acceptance, named owner, and trigger condition
27
+ - Treat compliance as optional or "figure out later"
28
+
29
+ When asked for an opening statement:
30
+
31
+ - Identify the relevant threat model
32
+ - Name the attack surface and blast-radius consequences
33
+ - Recommend the minimum acceptable controls for a ship-ready path
34
+ - End with a one-line `**Key Point:** ...`
35
+
36
+ When rebutting:
37
+
38
+ - Steel-man the convenience or velocity case first
39
+ - Concede when the threat is genuinely remote and mitigation is disproportionate
40
+ - Otherwise hold firm on the controls required to make the path acceptable, and say exactly which mitigation would move you
41
+
42
+ When arguing in a dev-workflow context:
43
+
44
+ - If the project has `security-review` as a bundled skill, treat its confidence-rated findings as high-signal evidence
45
+ - Cite PRD sections that describe sensitive data or auth surfaces
46
+ - Reference prior `QA/bugs.md` entries if security-related bugs were found before
47
+
48
+ Your job is not to block delivery. Your job is to stop the council from shipping an avoidable incident.
@@ -0,0 +1,178 @@
1
+ ---
2
+ name: dw-memory
3
+ description: |
4
+ Maintains workflow-scoped memory for dev-workflow PRD runs using
5
+ .dw/spec/prd-<name>/MEMORY.md (shared) and .dw/spec/prd-<name>/tasks/<N>_memory.md
6
+ (task-local). Use when a dev-workflow command needs to persist or recall
7
+ durable cross-task context (decisions, constraints, risks) across task
8
+ executions. Invoked from dw-run-task, dw-run-plan, dw-autopilot, and
9
+ dw-resume. Do not use for PR review remediation, user preferences, or
10
+ event-log summarization.
11
+ allowed-tools:
12
+ - Read
13
+ - Write
14
+ - Edit
15
+ - Grep
16
+ - Glob
17
+ ---
18
+
19
+ # dw-memory — Workflow Memory
20
+
21
+ Two-tier memory for a PRD workflow. Callers pass the PRD slug; this skill manages the files.
22
+
23
+ ## Required Inputs (from caller)
24
+
25
+ - PRD slug (e.g., `prd-user-auth`) → resolves to `.dw/spec/<slug>/`.
26
+ - Current task number (1-based), e.g., `3` → task-local file is `.dw/spec/<slug>/tasks/3_memory.md`.
27
+ - Optional flag: `compact: true|false` indicating whether either file must be compacted before proceeding.
28
+
29
+ If the PRD directory or `tasks/` subdirectory does not exist, stop and report — do not guess paths.
30
+
31
+ ## File Layout
32
+
33
+ ```
34
+ .dw/spec/<prd-slug>/
35
+ prd.md # PRD (authoritative, not memory)
36
+ techspec.md # TechSpec (authoritative)
37
+ tasks.md # task index (authoritative)
38
+ MEMORY.md # shared workflow memory (this skill)
39
+ tasks/
40
+ 1_task.md
41
+ 1_memory.md # task-local memory for task 1
42
+ 2_task.md
43
+ 2_memory.md
44
+ ...
45
+ ```
46
+
47
+ Create `MEMORY.md` and `<N>_memory.md` on first use with the template below. Never create any other memory files.
48
+
49
+ ## Templates
50
+
51
+ ### MEMORY.md (shared, cross-task)
52
+
53
+ ```
54
+ # Workflow Memory — <PRD slug>
55
+
56
+ ## Current State
57
+ - Last task completed: <N> — <one-line summary>
58
+ - Active task: <N+1>
59
+ - Branch: <branch-name>
60
+
61
+ ## Durable Decisions
62
+ - <decision 1> — <one-line rationale>
63
+
64
+ ## Cross-Task Constraints
65
+ - <constraint discovered during implementation that affects multiple tasks>
66
+
67
+ ## Open Risks
68
+ - <risk> — <what would trigger it, what to watch for>
69
+
70
+ ## Handoff Notes
71
+ - <what the next task or agent needs to know that is not in the PRD/TechSpec/code>
72
+ ```
73
+
74
+ ### <N>_memory.md (task-local)
75
+
76
+ ```
77
+ # Task <N> Memory
78
+
79
+ ## Objective Snapshot
80
+ <current understanding of the task objective in 1-3 lines>
81
+
82
+ ## Files Touched
83
+ - path/to/file.ext — <why>
84
+
85
+ ## Debug Notes
86
+ - <observation that was non-obvious to arrive at>
87
+
88
+ ## Workarounds Applied (task-local only)
89
+ - <workaround> — <why justified here, not elsewhere>
90
+
91
+ ## Next Step
92
+ <what to do next if interrupted>
93
+ ```
94
+
95
+ ## Workflow
96
+
97
+ ### 1. Load before editing code
98
+ - Read `MEMORY.md` and the current task's `<N>_memory.md` **before** any code change.
99
+ - Treat these as mandatory context for the run, not optional notes.
100
+ - If the caller marks either file for compaction, apply the Compaction Rules (below) before continuing.
101
+
102
+ ### 2. Keep memory current while the task runs
103
+ - Update `<N>_memory.md` whenever:
104
+ - the objective understanding changes,
105
+ - a non-obvious decision is made,
106
+ - a learning appears that the next step needs,
107
+ - an error reshapes the plan.
108
+ - Promote to `MEMORY.md` only facts that pass the Promotion Test.
109
+ - Keep operational details (files touched, debug steps, local workarounds) in `<N>_memory.md`.
110
+
111
+ ### 3. Close out cleanly
112
+ - Update memory **before any completion claim, handoff, or commit** (this pairs with `dw-verify`).
113
+ - Record only facts that help the next task start faster and with fewer mistakes.
114
+ - If `MEMORY.md` has grown noisy or repetitive, compact it using the Compaction Rules.
115
+
116
+ ## Critical Rules
117
+
118
+ - Do not invent history, decisions, or status.
119
+ - Do not copy large code blocks, stack traces, or full PRD/TechSpec sections into memory files.
120
+ - Do not duplicate facts that are obvious from the repository, `git diff`, task file, PRD, or TechSpec.
121
+ - Do not read unrelated task memory files unless `MEMORY.md` or the caller explicitly points to them.
122
+ - Shared memory is durable and cross-task. Task memory is local and operational.
123
+
124
+ ## Promotion Decision Test
125
+
126
+ Before promoting an item from `<N>_memory.md` to `MEMORY.md`, ask:
127
+
128
+ 1. Will another task need this to avoid a mistake or rediscovery?
129
+ 2. Is this fact durable across multiple runs, not just the current execution?
130
+ 3. Is this information NOT already obvious from the PRD, TechSpec, task files, or the repository itself?
131
+
132
+ All three must be "yes" to promote. If any is "no", the item stays in task memory.
133
+
134
+ ### Belongs in shared memory
135
+ - A discovered constraint affecting multiple tasks ("the Stripe API rate-limits to 100 req/s — batch operations must respect this")
136
+ - A cross-cutting architectural decision made during implementation ("chose React Server Components for data fetching across the whole feature")
137
+ - An open risk future tasks must account for ("migration depends on schema v3 which is not yet deployed to staging")
138
+
139
+ ### Stays in task memory
140
+ - Files touched during this task's implementation
141
+ - Debugging steps taken to resolve a task-specific error
142
+ - The current task's objective and acceptance criteria snapshot
143
+ - A workaround applied only to the current task's scope
144
+
145
+ ## Compaction Rules
146
+
147
+ When flagged for compaction, apply inline:
148
+
149
+ 1. If both files need compaction, compact `MEMORY.md` first, then `<N>_memory.md`. The shared file sets the cross-task context that the task file should not duplicate.
150
+ 2. **Preserve:** current state, durable decisions, reusable learnings, open risks, handoff notes.
151
+ 3. **Remove:** repetition, stale notes, long command transcripts, facts derivable from the repo/PRD/task files.
152
+ 4. **Rewrite** retained items as short factual bullets. No narrative logs, no chronological play-by-play.
153
+ 5. Keep the default section headings intact. Remove empty sections only if truly unused.
154
+
155
+ ## Error Handling
156
+
157
+ - If any caller-provided memory path is missing, stop and report the mismatch instead of guessing another path.
158
+ - If memory conflicts with the repository, PRD, or task spec, trust the repo and docs — correct the memory.
159
+ - If compaction would remove active risks, decisions, or handoff context, keep those items and remove lower-value repetition first.
160
+
161
+ ## Integration With Other dev-workflow Commands
162
+
163
+ - `/dw-run-task` — reads memory before coding; updates `<N>_memory.md` during; runs promotion test + updates `MEMORY.md` at the end.
164
+ - `/dw-run-plan` — runs promotion + compaction between tasks, so each task starts with clean shared state.
165
+ - `/dw-autopilot` — threads memory through every phase (brainstorm → PRD → techspec → tasks → execution).
166
+ - `/dw-resume` — reads `MEMORY.md` first to reconstitute cross-session context, then the active task's memory.
167
+
168
+ Callers should mention this skill in their "Skills Complementares" section.
169
+
170
+ ## Inspired by
171
+
172
+ Ported from Compozy's `cy-workflow-memory` skill (`/tmp/compozy/.agents/skills/cy-workflow-memory/SKILL.md`). Adapted for dev-workflow:
173
+
174
+ - Paths are `.dw/spec/<prd-slug>/` instead of `.compozy/tasks/<name>/`.
175
+ - Task-local file is `<N>_memory.md` next to `<N>_task.md` (mirrors the existing dev-workflow task layout).
176
+ - Inline Compaction Rules (Compozy keeps them in `references/memory-guidelines.md`); if the rule set grows, extract a `references/` directory later.
177
+
178
+ Credit: Compozy project (https://github.com/compozy/compozy).
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: dw-review-rigor
3
+ description: |
4
+ Applies review discipline to code-review and analysis commands:
5
+ de-duplicates issues, orders by severity, verifies intent before flagging,
6
+ prioritizes signal over volume, and skips concerns that linters already
7
+ catch. Invoked from dw-code-review, dw-review-implementation, and
8
+ dw-refactoring-analysis. Do not use for fetching reviews from external
9
+ providers or for executing fixes.
10
+ allowed-tools:
11
+ - Read
12
+ - Grep
13
+ - Glob
14
+ - Bash
15
+ ---
16
+
17
+ # dw-review-rigor — Discipline For Review Commands
18
+
19
+ A set of rules the caller applies while producing a review report. This skill does not produce its own report file — it shapes the caller's output.
20
+
21
+ ## When Invoked
22
+
23
+ By `/dw-code-review`, `/dw-review-implementation`, `/dw-refactoring-analysis`. The caller has already identified a scope (files, a PR, a codebase area). This skill governs how findings are selected, deduplicated, ordered, and phrased.
24
+
25
+ ## Required Inputs
26
+
27
+ - The scope the caller is reviewing (file paths, directories, or PR diff).
28
+ - Optional: prior review reports in `.dw/spec/prd-*/reviews/` — so this round only surfaces NEW findings.
29
+
30
+ ## The Five Rules
31
+
32
+ ### 1. De-duplicate before writing
33
+
34
+ If the same pattern (e.g., missing null check, unhandled error, magic constant) appears in multiple files, **create one finding** for the most representative instance and list the other affected files inside its body. Do not create N identical findings for N files sharing one root cause.
35
+
36
+ Example — wrong:
37
+ ```
38
+ - [HIGH] src/a.ts:14 — missing null check on user
39
+ - [HIGH] src/b.ts:22 — missing null check on user
40
+ - [HIGH] src/c.ts:31 — missing null check on user
41
+ ```
42
+
43
+ Example — right:
44
+ ```
45
+ - [HIGH] Missing null check on `user` in 3 places.
46
+ Representative: src/a.ts:14
47
+ Also affects: src/b.ts:22, src/c.ts:31
48
+ Fix: add `if (!user) return` at function entry.
49
+ ```
50
+
51
+ ### 2. Severity-order the output
52
+
53
+ Always present findings in this order: **critical → high → medium → low**. Inside each severity, order by impact or blast radius, not by file path.
54
+
55
+ Severity definitions:
56
+ - **critical** — correctness bug, security hole, data loss, unavailability.
57
+ - **high** — material deviation from PRD/TechSpec, concurrency hazard, significant perf regression, missing error handling on a user path.
58
+ - **medium** — maintainability cost that will hurt the next change, missing edge-case handling, inconsistent with project rules.
59
+ - **low** — stylistic, naming, minor readability. Often omit unless pattern-level.
60
+
61
+ ### 3. Verify intent before flagging
62
+
63
+ Before creating a finding, check whether the pattern is intentional:
64
+ - adjacent comment explaining the choice?
65
+ - ADR in `.dw/spec/*/adrs/` that justifies it?
66
+ - test coverage that asserts the behavior?
67
+ - rule in `.dw/rules/` that permits it?
68
+
69
+ If the code looks suspicious but has a clear justification (e.g., `// intentionally ignoring close error on read-only handle`), do NOT create a finding. Only flag patterns that are genuinely problematic, not merely unconventional.
70
+
71
+ ### 4. Skip what linters already catch
72
+
73
+ Before writing findings, ensure the project's linter/formatter has run. Anything the configured linter would flag is NOT a finding in this review — it is a linter task. Save human attention for issues linters cannot find (logic, architecture, security, requirements).
74
+
75
+ If the linter cannot run (missing tooling, build errors), note that in the summary and proceed with the review.
76
+
77
+ ### 5. Signal over volume
78
+
79
+ Aim for fewer, higher-quality findings.
80
+
81
+ - Keep ALL `critical` and `high`.
82
+ - If total findings exceed 20, prune `medium` and `low` to the most impactful ones.
83
+ - A review with 8 precise findings is more useful than one with 30 that includes marginal concerns.
84
+
85
+ **Also note well-implemented aspects.** They inform the summary and calibrate tone — but they do not produce findings.
86
+
87
+ ## Prior-Round Awareness
88
+
89
+ If the PRD directory has prior review reports:
90
+
91
+ 1. Read them and extract the list of known findings (their titles + file/line signatures).
92
+ 2. The current round surfaces **only NEW findings**. Do not re-flag items already tracked as pending, resolved, or accepted in earlier rounds.
93
+ 3. If a prior finding was resolved incorrectly, open it as a NEW finding with "Regression of <prior ref>" in the body.
94
+
95
+ ## Finding Format
96
+
97
+ Each finding uses:
98
+
99
+ ```
100
+ [<severity>] <file.ext>:<line> — <title ≤72 chars>
101
+
102
+ <1-4 lines describing the problem>
103
+ <1-2 lines suggesting the fix>
104
+
105
+ Also affects: <other paths if de-duplicated, else omit>
106
+ Evidence: <relevant code snippet, test output, or reference>
107
+ ```
108
+
109
+ ## Output Structure
110
+
111
+ The caller emits:
112
+
113
+ 1. **Merge/ship recommendation** — one of:
114
+ - `Needs fixes before merge` (if any critical or high exist), with blocking findings named.
115
+ - `Safe to merge with follow-ups` (only medium/low).
116
+ - `Clean — ready to merge` (no findings).
117
+ 2. **Counts** — critical / high / medium / low.
118
+ 3. **Findings** — ordered by severity, each in the format above.
119
+ 4. **Well-implemented aspects** — short bulleted list, calibrates tone.
120
+
121
+ ## Critical Rules
122
+
123
+ - Do not modify source code — this skill shapes findings only, it does not fix.
124
+ - Do not create findings for problems a configured linter already catches.
125
+ - Do not flag patterns that have a clear adjacent justification or ADR.
126
+ - Do not write N identical findings for one root cause — de-duplicate.
127
+ - Do not mix severities — order is critical → high → medium → low.
128
+
129
+ ## Integration With Other dev-workflow Commands
130
+
131
+ - `/dw-code-review` — applies all five rules to its Level-3 review output; uses prior reports in `.dw/spec/*/reviews/` to dedupe across rounds.
132
+ - `/dw-review-implementation` — applies de-dup + severity-ordering when listing gaps between PRD requirements and code.
133
+ - `/dw-refactoring-analysis` — 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).
134
+
135
+ Callers should mention this skill in their "Skills Complementares" section.
136
+
137
+ ## Inspired by
138
+
139
+ Ported from Compozy's `cy-review-round` skill (`/tmp/compozy/.agents/skills/cy-review-round/SKILL.md`). Adapted for dev-workflow:
140
+
141
+ - No `reviews-NNN/` directory convention — dev-workflow reviews already persist in `.dw/spec/*/reviews/` per command's existing contract.
142
+ - The five rules are extracted here so three different dev-workflow review commands can share the discipline without duplicating it.
143
+ - No issue-file frontmatter (Compozy uses it to interoperate with its remediation engine; dev-workflow's remediation is manual or via `/dw-fix-qa`).
144
+
145
+ Credit: Compozy project (https://github.com/compozy/compozy).
@@ -0,0 +1,196 @@
1
+ ---
2
+ name: dw-verify
3
+ description: |
4
+ Enforces fresh verification evidence before any completion, fix, or passing
5
+ claim — and before commits or PR creation. Use when a dev-workflow command
6
+ is about to report success, hand off work, or commit code. Invoked from
7
+ dw-run-task, dw-run-plan, dw-fix-qa, dw-bugfix, dw-code-review, dw-generate-pr,
8
+ and dw-quick. Do not use for early planning or brainstorming.
9
+ allowed-tools:
10
+ - Bash
11
+ - Read
12
+ - Grep
13
+ ---
14
+
15
+ # dw-verify — Verification Before Completion
16
+
17
+ ## Overview
18
+
19
+ Claiming work is complete without verification is dishonesty, not efficiency.
20
+
21
+ **Core principle:** Evidence before claims, always.
22
+
23
+ **Violating the letter of this rule is violating the spirit of this rule.**
24
+
25
+ ## The Iron Law
26
+
27
+ ```
28
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
29
+ ```
30
+
31
+ If the verification command has not been run in the current message, the result cannot be claimed.
32
+
33
+ ## The Gate Function
34
+
35
+ ```
36
+ BEFORE claiming any status or expressing satisfaction:
37
+
38
+ 1. IDENTIFY: What command proves this claim?
39
+ 2. RUN: Execute the FULL command (fresh, complete)
40
+ 3. READ: Full output, check exit code, count failures
41
+ 4. VERIFY: Does output confirm the claim?
42
+ - If NO: State actual status with evidence
43
+ - If YES: State claim WITH evidence
44
+ 5. ONLY THEN: Make the claim
45
+
46
+ Skip any step = lying, not verifying
47
+ ```
48
+
49
+ ## Scope of Verification
50
+
51
+ Match the verification scope to the claim scope.
52
+
53
+ - **Narrow claim** (e.g., "this test passes"): run the specific test.
54
+ - **Broad claim** (e.g., "task complete", "ready to commit"): run the full verification pipeline — formatting, linting, all tests, and build. If the project defines a single gate command (e.g., `npm test`, `make verify`, `pnpm check`), run that.
55
+
56
+ A narrow verification does not support a broad claim. Running one test alone does not justify "task complete." The verification scope must be equal to or broader than the claim scope.
57
+
58
+ **If in doubt, run the full pipeline.** Over-verification wastes minutes. Under-verification wastes hours.
59
+
60
+ **Passing pipeline ≠ meeting requirements.** A green build proves the code compiles, lints, and passes existing tests. It does not prove the implementation matches the PRD. For "task complete" or "requirements met" claims, also verify deliverables against the task's acceptance criteria and the PRD — line by line, not by assumption.
61
+
62
+ ## Common Failures
63
+
64
+ | Claim | Requires | Not Sufficient |
65
+ | --------------------- | -------------------------------- | ------------------------------- |
66
+ | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
67
+ | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
68
+ | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
69
+ | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
70
+ | Regression test works | Red-green cycle verified | Test passes once |
71
+ | Task complete | Acceptance criteria cross-check | Tests passing |
72
+ | Requirements met | Line-by-line PRD checklist | Tests passing |
73
+
74
+ ## Red Flags
75
+
76
+ If you catch yourself using any of these, STOP and run verification:
77
+
78
+ - "should", "probably", "seems to", "I'm confident"
79
+ - Expressing satisfaction before verification
80
+ - About to commit, push, or open a PR without verification
81
+ - Trusting another agent's success report
82
+ - Relying on partial verification
83
+ - "Just this once"
84
+
85
+ ## Rationalization Prevention
86
+
87
+ | Excuse | Reality |
88
+ | --------------------------------------- | ---------------------- |
89
+ | "Should work now" | Run the verification |
90
+ | "I'm confident" | Confidence ≠ evidence |
91
+ | "Just this once" | No exceptions |
92
+ | "Linter passed" | Linter ≠ compiler |
93
+ | "Agent said success" | Verify independently |
94
+ | "I'm tired" | Exhaustion ≠ excuse |
95
+ | "Partial check is enough" | Partial proves nothing |
96
+ | "Different words so rule doesn't apply" | Spirit over letter |
97
+
98
+ ## When To Apply
99
+
100
+ Apply this skill before:
101
+
102
+ - any success or completion claim
103
+ - any expression of satisfaction with the implementation state
104
+ - any commit or PR creation
105
+ - any handoff that implies correctness
106
+ - moving to the next task based on completion
107
+
108
+ ## Pre-Commit and Pre-PR Gate
109
+
110
+ Commits and PRs are permanent artifacts. They require the highest verification standard.
111
+
112
+ **Before `git commit`:**
113
+ 1. Run the full verification pipeline. Not a subset. The full pipeline.
114
+ 2. Confirm zero errors, zero warnings, zero test failures in the output.
115
+ 3. Produce a Verification Report (template below) with verdict PASS.
116
+ 4. Only then run `git commit`.
117
+
118
+ **Before creating a PR:**
119
+ 1. All of the above, plus:
120
+ 2. Verify the diff matches the intended changes (`git diff` review).
121
+ 3. Confirm no unrelated files are staged.
122
+
123
+ If the full pipeline has not passed in this session after the last code change, the commit or PR must not proceed.
124
+
125
+ ## Verification Report Template
126
+
127
+ Verification is not complete until the agent **cites actual command output** in their response. "I ran it and it passed" is not evidence. If the verification output is not shown, the verification did not happen.
128
+
129
+ Every verification must be reported using this structure. Do not deviate.
130
+
131
+ ```
132
+ VERIFICATION REPORT
133
+ -------------------
134
+ Claim: [What is being claimed — e.g., "tests pass", "build succeeds", "task complete"]
135
+ Command: [Exact command run — e.g., `npm test`, `pnpm verify`]
136
+ Executed: [Timestamp or "just now, after all changes"]
137
+ Exit code: [0 or non-zero]
138
+ Output summary: [Key lines from output — pass count, error count, build result]
139
+ Warnings: [Any warnings, or "none"]
140
+ Errors: [Any errors, or "none"]
141
+ Verdict: PASS or FAIL
142
+ ```
143
+
144
+ If the verdict is FAIL, do not use completion language. State what failed and what remains.
145
+
146
+ If the verdict is PASS, the claim may proceed — but only the specific claim supported by the evidence.
147
+
148
+ ## When Verification Fails
149
+
150
+ Verification failure is information, not a dead end. Protocol:
151
+
152
+ 1. **Read the failure.** Identify the exact error. Quote the relevant output lines.
153
+ 2. **Diagnose the root cause.** Read the error. Trace it to the source. If multiple things failed, address them one at a time, starting with the first failure.
154
+ 3. **Fix the root cause.** Apply the minimal change that addresses the actual error. No workarounds, no suppressions, no skipped checks.
155
+ 4. **Re-verify from scratch.** Run the full verification command again. Do not assume the fix worked. Do not run only the previously-failing subset.
156
+ 5. **Report with evidence.** Use the Verification Report Template. If it passes, the claim may proceed. If it fails again, return to step 1.
157
+
158
+ **Never:**
159
+ - Claim partial success ("3 of 4 checks pass, close enough")
160
+ - Skip re-verification after a fix
161
+ - Blame the tooling without evidence of a false positive
162
+ - Move on while verification is still failing
163
+
164
+ ## Project-Specific Verification Commands
165
+
166
+ dev-workflow does not hardcode a verification command. Discover it from the project:
167
+
168
+ 1. Check `.dw/rules/` for a documented verify command.
169
+ 2. Read `package.json` scripts: prefer `verify`, `check`, `ci`, `test`, in that order.
170
+ 3. Check for `Makefile`/`make verify`, `pyproject.toml`/`just verify`, etc.
171
+ 4. If none is explicit, run the documented test + lint + build sequence.
172
+
173
+ If no verification command exists for the project, state that explicitly in the Verification Report and avoid completion language.
174
+
175
+ ## Integration With Other dev-workflow Commands
176
+
177
+ This skill is invoked transparently from:
178
+
179
+ - `/dw-run-task` — before committing the task's changes
180
+ - `/dw-run-plan` — before Level 2 review and before declaring the plan complete
181
+ - `/dw-fix-qa` — before marking a bug as resolved in `QA/bugs.md`
182
+ - `/dw-bugfix` — before claiming the bug is fixed (original symptom no longer reproduces)
183
+ - `/dw-code-review` — before emitting an APPROVED verdict
184
+ - `/dw-generate-pr` — blocks PR creation if the session has no passing VERIFICATION REPORT post-last-edit
185
+ - `/dw-quick` — before committing the one-off change
186
+
187
+ Callers should mention this skill in their "Skills Complementares" section so the user sees the dependency.
188
+
189
+ ## Inspired by
190
+
191
+ Ported from Compozy's `cy-final-verify` skill (`/tmp/compozy/.agents/skills/cy-final-verify/SKILL.md`). Adapted for the dev-workflow context:
192
+
193
+ - Project-agnostic verification discovery (Compozy assumes `make verify`; dev-workflow scans `package.json`/Makefile/`.dw/rules/`).
194
+ - Integration table maps to dev-workflow command names instead of Compozy phases.
195
+
196
+ Credit: Compozy project (https://github.com/compozy/compozy).