@brunosps00/dev-workflow 2.2.0 → 2.3.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 (119) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +46 -0
  3. package/README.md +12 -4
  4. package/lib/constants.js +24 -24
  5. package/lib/init.js +8 -0
  6. package/lib/instruction-health.js +38 -0
  7. package/lib/post-update.js +2 -1
  8. package/lib/validate.js +3 -1
  9. package/package.json +1 -1
  10. package/scaffold/config/routing.json +61 -23
  11. package/scaffold/en/agent-instructions.md +31 -137
  12. package/scaffold/en/commands/dw-analyze-project.md +2 -0
  13. package/scaffold/en/commands/dw-autopilot.md +22 -245
  14. package/scaffold/en/commands/dw-bugfix.md +9 -35
  15. package/scaffold/en/commands/dw-claude-run.md +29 -45
  16. package/scaffold/en/commands/dw-codex-run.md +30 -45
  17. package/scaffold/en/commands/dw-context-budget.md +6 -14
  18. package/scaffold/en/commands/dw-copilot-run.md +29 -41
  19. package/scaffold/en/commands/dw-generate-pr.md +2 -2
  20. package/scaffold/en/commands/dw-goal.md +11 -5
  21. package/scaffold/en/commands/dw-help.md +2 -2
  22. package/scaffold/en/commands/dw-plan.md +14 -7
  23. package/scaffold/en/commands/dw-qa.md +2 -0
  24. package/scaffold/en/commands/dw-resume.md +5 -11
  25. package/scaffold/en/commands/dw-review.md +4 -3
  26. package/scaffold/en/commands/dw-run.md +19 -166
  27. package/scaffold/en/commands/dw-skill-health.md +7 -0
  28. package/scaffold/en/commands/dw-update.md +18 -4
  29. package/scaffold/en/references/command-routing.md +53 -0
  30. package/scaffold/en/references/execution-contract.md +55 -0
  31. package/scaffold/en/templates/frontend-quality-template.md +43 -0
  32. package/scaffold/en/templates/task-template.md +20 -40
  33. package/scaffold/en/templates/tasks-template.md +9 -6
  34. package/scaffold/en/templates/techspec-template.md +4 -0
  35. package/scaffold/pt-br/agent-instructions.md +31 -137
  36. package/scaffold/pt-br/commands/dw-analyze-project.md +2 -0
  37. package/scaffold/pt-br/commands/dw-autopilot.md +22 -245
  38. package/scaffold/pt-br/commands/dw-bugfix.md +9 -35
  39. package/scaffold/pt-br/commands/dw-claude-run.md +29 -46
  40. package/scaffold/pt-br/commands/dw-codex-run.md +30 -45
  41. package/scaffold/pt-br/commands/dw-context-budget.md +6 -14
  42. package/scaffold/pt-br/commands/dw-copilot-run.md +29 -43
  43. package/scaffold/pt-br/commands/dw-generate-pr.md +2 -2
  44. package/scaffold/pt-br/commands/dw-goal.md +11 -5
  45. package/scaffold/pt-br/commands/dw-help.md +2 -2
  46. package/scaffold/pt-br/commands/dw-plan.md +14 -7
  47. package/scaffold/pt-br/commands/dw-qa.md +2 -0
  48. package/scaffold/pt-br/commands/dw-resume.md +7 -11
  49. package/scaffold/pt-br/commands/dw-review.md +4 -3
  50. package/scaffold/pt-br/commands/dw-run.md +19 -166
  51. package/scaffold/pt-br/commands/dw-skill-health.md +7 -0
  52. package/scaffold/pt-br/commands/dw-update.md +18 -4
  53. package/scaffold/pt-br/references/command-routing.md +53 -0
  54. package/scaffold/pt-br/references/execution-contract.md +55 -0
  55. package/scaffold/pt-br/templates/frontend-quality-template.md +43 -0
  56. package/scaffold/pt-br/templates/task-template.md +20 -40
  57. package/scaffold/pt-br/templates/tasks-template.md +9 -6
  58. package/scaffold/pt-br/templates/techspec-template.md +4 -0
  59. package/scaffold/scripts/lib/workflow-contract.mjs +101 -0
  60. package/scaffold/skill-registry.json +23 -23
  61. package/scaffold/skills/dw-cli-run/SKILL.md +33 -217
  62. package/scaffold/skills/dw-cli-run/references/dispatch-tuning.md +14 -72
  63. package/scaffold/skills/dw-codebase-intel/SKILL.md +5 -39
  64. package/scaffold/skills/dw-codebase-intel/agents/intel-updater.md +1 -1
  65. package/scaffold/skills/dw-codebase-intel/references/agents-detail.md +7 -0
  66. package/scaffold/skills/dw-codebase-intel/references/files-in-dw-intel-detail.md +16 -0
  67. package/scaffold/skills/dw-codebase-intel/references/how-dw-intel-reads-this-detail.md +12 -0
  68. package/scaffold/skills/dw-codebase-intel/references/how-to-compose-the-typical-flow-detail.md +11 -0
  69. package/scaffold/skills/dw-council/SKILL.md +2 -17
  70. package/scaffold/skills/dw-council/references/integration-with-other-dw-commands-detail.md +7 -0
  71. package/scaffold/skills/dw-council/references/phase-2-tensions-and-rebuttals-detail.md +15 -0
  72. package/scaffold/skills/dw-domain-modeling/SKILL.md +1 -1
  73. package/scaffold/skills/dw-execute-phase/SKILL.md +12 -32
  74. package/scaffold/skills/dw-execute-phase/agents/executor.md +15 -252
  75. package/scaffold/skills/dw-execute-phase/agents/plan-checker.md +4 -207
  76. package/scaffold/skills/dw-execute-phase/references/atomic-commits.md +8 -18
  77. package/scaffold/skills/dw-execute-phase/references/de-sloppify-pass-optional-cleanup-task-detail.md +12 -0
  78. package/scaffold/skills/dw-execute-phase/references/deviation-rules-during-execution-detail.md +8 -0
  79. package/scaffold/skills/dw-execute-phase/references/how-the-two-agents-compose-detail.md +7 -0
  80. package/scaffold/skills/dw-execute-phase/references/plan-verification.md +9 -155
  81. package/scaffold/skills/dw-execute-phase/references/wave-coordination.md +6 -97
  82. package/scaffold/skills/dw-git-discipline/SKILL.md +2 -2
  83. package/scaffold/skills/dw-grilling/SKILL.md +1 -1
  84. package/scaffold/skills/dw-incident-response/SKILL.md +1 -64
  85. package/scaffold/skills/dw-incident-response/references/the-five-phases-detail.md +66 -0
  86. package/scaffold/skills/dw-llm-eval/SKILL.md +5 -53
  87. package/scaffold/skills/dw-llm-eval/references/agent-tool-use-evaluation-detail.md +23 -0
  88. package/scaffold/skills/dw-llm-eval/references/anti-patterns-will-block-in-dw-review-code-only-detail.md +9 -0
  89. package/scaffold/skills/dw-llm-eval/references/consistency-run-to-run-stability-detail.md +10 -0
  90. package/scaffold/skills/dw-llm-eval/references/integration-with-dev-workflow-commands-detail.md +6 -0
  91. package/scaffold/skills/dw-llm-eval/references/the-oracle-ladder-detail.md +15 -0
  92. package/scaffold/skills/dw-memory/SKILL.md +4 -50
  93. package/scaffold/skills/dw-memory/references/context-budget.md +8 -56
  94. package/scaffold/skills/dw-memory/references/promotion-decision-test-detail.md +30 -0
  95. package/scaffold/skills/dw-minimalism/SKILL.md +4 -5
  96. package/scaffold/skills/dw-review-rigor/SKILL.md +1 -54
  97. package/scaffold/skills/dw-review-rigor/references/the-five-rules-detail.md +56 -0
  98. package/scaffold/skills/dw-simplification/SKILL.md +2 -55
  99. package/scaffold/skills/dw-simplification/references/pattern-recognition-detail.md +11 -0
  100. package/scaffold/skills/dw-simplification/references/the-five-rules-detail.md +48 -0
  101. package/scaffold/skills/dw-source-grounding/SKILL.md +1 -56
  102. package/scaffold/skills/dw-source-grounding/references/the-protocol-detect-fetch-implement-cite-detail.md +58 -0
  103. package/scaffold/skills/dw-testing-discipline/SKILL.md +25 -177
  104. package/scaffold/skills/dw-testing-discipline/references/agent-guardrails.md +9 -167
  105. package/scaffold/skills/dw-testing-discipline/references/core-rules.md +3 -3
  106. package/scaffold/skills/dw-testing-discipline/references/mutation-testing.md +19 -0
  107. package/scaffold/skills/dw-testing-discipline/references/patterns.md +3 -12
  108. package/scaffold/skills/dw-ui-discipline/SKILL.md +2 -59
  109. package/scaffold/skills/dw-ui-discipline/references/frontend-engineering.md +46 -0
  110. package/scaffold/skills/dw-ui-discipline/references/the-four-grounding-questions-detail.md +61 -0
  111. package/scaffold/skills/dw-verify/SKILL.md +26 -148
  112. package/scaffold/skills/dw-verify/references/verification-discovery-and-attribution.md +2 -2
  113. package/scaffold/skills/humanizer/SKILL.md +2 -1
  114. package/scaffold/skills/security-review/SKILL.md +3 -183
  115. package/scaffold/skills/security-review/references/do-not-flag-detail.md +49 -0
  116. package/scaffold/skills/security-review/references/quick-patterns-reference-detail.md +56 -0
  117. package/scaffold/skills/security-review/references/review-process-detail.md +84 -0
  118. package/scaffold/skills/vercel-react-best-practices/SKILL.md +1 -90
  119. package/scaffold/skills/vercel-react-best-practices/references/quick-reference-detail.md +92 -0
@@ -0,0 +1,61 @@
1
+ ## The four grounding questions
2
+
3
+ Answer all four before proposing colors, layouts, components, or any visual decision.
4
+
5
+ ### 1. Where do design decisions come from?
6
+
7
+ Find the project's design source-of-truth in this order:
8
+ 1. `.dw/rules/<frontend-module>.md` design system section.
9
+ 2. `DESIGN.md`, `BRAND.md`, `STYLE_GUIDE.md` at project root.
10
+ 3. Design token config — Tailwind theme, CSS variables in `theme.css`/`globals.css`, MUI/Chakra theme.
11
+ 4. Component library config — `components.json` for shadcn, theme exports.
12
+ 5. Storybook stories (implicit canonical components).
13
+
14
+ **Stop at the first match** in this list — that source is the authority; defer to it and do not override it with a lower rung or a training-data default. If a needed token is missing (e.g., a danger-secondary color), propose adding it to the authority FIRST, not inline.
15
+
16
+ If **none exists**: read `curated-defaults.md` and pick one of the 10 neutral palettes + one of the 10 font pairings shipped there. Mark the choice in the techspec/PR description: "Design source: no project authority found; using curated default `<name>`; recommend establishing `DESIGN.md`."
17
+
18
+ **Anti-patterns at this question:**
19
+ - Inventing color hex values inline (`bg-[#FF6B35]`).
20
+ - "I'll use Tailwind defaults" — that's training-data defaults, not project authority.
21
+ - Copying values from "a site I like" without understanding what it solved.
22
+
23
+ ### 2. What does this surface help the user do?
24
+
25
+ Write one sentence: **"This surface helps the user `<verb-phrase>` so that `<outcome>`."**
26
+
27
+ Good examples:
28
+ - "...helps the user filter overdue invoices so they can chase late payers in under 30 seconds."
29
+ - "...helps the on-call engineer diagnose which deploy caused the spike so they can roll back without paging the team."
30
+ - "...helps the manager approve or reject expense reports without leaving Slack."
31
+
32
+ Bad examples:
33
+ - "This surface displays invoice data." (no user, no outcome)
34
+ - "Settings page for managing the account." (vague, no specificity)
35
+ - "Dashboard." (one word)
36
+
37
+ If you can't write the sentence, the requirements are unclear. Stop and clarify before proceeding.
38
+
39
+ ### 3. What states does the surface have?
40
+
41
+ Enumerate all states before designing the happy path. Minimum nine, plus domain-specific ones — see `state-matrix.md`:
42
+
43
+ `default`, `hover`, `active`, `focus-visible`, `disabled`, `loading`, `empty`, `error`, `success` plus any domain states (read/unread, online/offline, stale/fresh, pending/approved/rejected, draft/saved/dirty, partial/complete, etc.).
44
+
45
+ Missing a state at design time = production bug later. The "we'll add empty state later" trap is real.
46
+
47
+ ### 4. Who uses this surface, where, and in what mood?
48
+
49
+ One sentence: **"`<Who>` uses this on `<where>` in `<what light>` while `<what mood>`."**
50
+
51
+ Good examples:
52
+ - "An on-call engineer uses this on a dark-room laptop at 3am while troubleshooting a fire."
53
+ - "A field nurse uses this on a phone in bright outdoor light while juggling clipboards."
54
+ - "A receptionist uses this on a 24″ monitor at a busy front desk while talking to a visitor."
55
+
56
+ Decisions cascade from the answer:
57
+ - 3am dark room → dark mode, high contrast, no flashing animations.
58
+ - Bright outdoor → minimum 7:1 contrast, larger touch targets, no thin fonts.
59
+ - Busy front desk → glanceable info, no nested menus, large numbers.
60
+
61
+ Without this sentence, defaults take over: light mode, default contrasts, animations, regular touch targets. Production users hate it; you can't articulate why.
@@ -1,173 +1,51 @@
1
1
  ---
2
2
  name: dw-verify
3
- description: Demands fresh verification evidence before any success claim or commit. No PASS report, no claim — no exceptions.
3
+ description: Validate completion, commit or PR claims against acceptance criteria and applicable project checks, reusing evidence only while its inputs remain valid.
4
4
  allowed-tools:
5
- - Bash
6
5
  - Read
6
+ - Bash
7
7
  - Grep
8
+ - Glob
8
9
  ---
9
10
 
10
- # dw-verify — Verification Before Completion
11
-
12
- ## Overview
13
-
14
- Claiming work is complete without verification is dishonesty, not efficiency.
15
-
16
- **Core principle:** Evidence before claims, always.
17
-
18
- **Violating the letter of this rule is violating the spirit of this rule.**
19
-
20
- ## The Iron Law
21
-
22
- ```
23
- NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
24
- ```
25
-
26
- If the verification command has not been run in the current message, the result cannot be claimed.
27
-
28
- ## The Gate Function
29
-
30
- ```
31
- BEFORE claiming any status or expressing satisfaction:
32
-
33
- 1. IDENTIFY: What command proves this claim?
34
- 2. RUN: Execute the FULL command (fresh, complete)
35
- 3. READ: Full output, check exit code, count failures
36
- 4. VERIFY: Does output confirm the claim?
37
- - If NO: State actual status with evidence
38
- - If YES: State claim WITH evidence
39
- 5. ONLY THEN: Make the claim
40
-
41
- Skip any step = lying, not verifying
42
- ```
43
-
44
- ## Scope of Verification
45
-
46
- Match the verification scope to the claim scope.
47
-
48
- - **Narrow claim** (e.g., "this test passes"): run the specific test.
49
- - **Broad claim** (e.g., "task complete", "ready to commit"): run the full verification pipeline — formatting, linting, all tests, and build. If the project defines a single gate command (e.g., `npm test`, `make verify`, `pnpm check`), run that.
50
-
51
- A narrow verification does not support a broad claim. Running one test alone does not justify "task complete." The verification scope must be equal to or broader than the claim scope.
52
-
53
- **If in doubt, run the full pipeline.** Over-verification wastes minutes. Under-verification wastes hours.
54
-
55
- **Passing pipeline ≠ meeting requirements.** A green build proves the code compiles, lints, and passes existing tests. It does not prove the implementation matches the PRD. For "task complete" or "requirements met" claims, also verify deliverables against the task's acceptance criteria and the PRD — line by line, not by assumption.
56
-
57
- ## Common Failures
58
-
59
- | Claim | Requires | Not Sufficient |
60
- | --------------------- | -------------------------------- | ------------------------------- |
61
- | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
62
- | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
63
- | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
64
- | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
65
- | Regression test works | Red-green cycle verified | Test passes once |
66
- | Task complete | Acceptance criteria cross-check | Tests passing |
67
- | Requirements met | Line-by-line PRD checklist | Tests passing |
68
-
69
- ## Red Flags
70
-
71
- If you catch yourself using any of these, STOP and run verification:
72
-
73
- - "should", "probably", "seems to", "I'm confident"
74
- - Expressing satisfaction before verification
75
- - About to commit, push, or open a PR without verification
76
- - Trusting another agent's success report
77
- - Relying on partial verification
78
- - "Just this once"
79
-
80
- ## Rationalization Prevention
81
-
82
- | Excuse | Reality |
83
- | --------------------------------------- | ---------------------- |
84
- | "Should work now" | Run the verification |
85
- | "I'm confident" | Confidence ≠ evidence |
86
- | "Just this once" | No exceptions |
87
- | "Linter passed" | Linter ≠ compiler |
88
- | "Agent said success" | Verify independently |
89
- | "I'm tired" | Exhaustion ≠ excuse |
90
- | "Partial check is enough" | Partial proves nothing |
91
- | "Different words so rule doesn't apply" | Spirit over letter |
92
-
93
- ## When To Apply
94
-
95
- Apply this skill before:
96
-
97
- - any success or completion claim
98
- - any expression of satisfaction with the implementation state
99
- - any commit or PR creation
100
- - any handoff that implies correctness
101
- - moving to the next task based on completion
102
-
103
- ## Pre-Commit and Pre-PR Gate
104
-
105
- Commits and PRs are permanent artifacts. They require the highest verification standard.
106
-
107
- **Before `git commit`:**
108
- 1. Run the full verification pipeline. Not a subset. The full pipeline.
109
- 2. Confirm zero errors, zero warnings, zero test failures in the output.
110
- 3. Produce a Verification Report (template below) with verdict PASS.
111
- 4. Only then run `git commit`.
11
+ # Verification grounded in evidence
112
12
 
113
- **Before creating a PR:**
114
- 1. All of the above, plus:
115
- 2. Verify the diff matches the intended changes (`git diff` review).
116
- 3. Confirm no unrelated files are staged.
13
+ A claim must match observed evidence. Inspect output and acceptance criteria; do not infer success from code edits, confidence, a worker's self-score, or a green build alone.
117
14
 
118
- If the full pipeline has not passed in this session after the last code change, the commit or PR must not proceed.
15
+ ## Select checks
119
16
 
120
- ## Verification Report Template
17
+ Follow required project gates from applicable instructions, package scripts and CI. Use focused tests while implementing or correcting defects, then complete the project's required delivery checks. Run lint/build only when applicable or required; do not invent absent scripts or demand zero pre-existing warnings when the project does not.
121
18
 
122
- 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.
19
+ For frontend changes, consult the module's documented quality baseline or TechSpec: distinguish required checks from advisory diagnostics and deferred proposals. Check generation drift, typechecking, architecture and test evidence where applicable. Tool presence, a high score or an empty analysis scope is not a passing result. A local hook does not prove CI enforcement or branch protection.
123
20
 
124
- Every verification must be reported using this structure. Do not deviate.
21
+ For behavior changes, verify relevant acceptance criteria and meaningful failure cases. For a small prose/config edit, use an appropriate inspection or validator; lack of a test runner alone does not block that claim. Report limits honestly. New tests should detect a plausible defect, not mirror implementation or language behavior. Explicit TDD requests retain their red/green contract.
125
22
 
126
- ```
127
- VERIFICATION REPORT
128
- -------------------
129
- Claim: [What is being claimed — e.g., "tests pass", "build succeeds", "task complete"]
130
- Command: [Exact command run — e.g., `npm test`, `pnpm verify`]
131
- Executed: [Timestamp or "just now, after all changes"]
132
- Exit code: [0 or non-zero]
133
- Output summary: [Key lines from output — pass count, error count, build result]
134
- Warnings: [Any warnings, or "none"]
135
- Errors: [Any errors, or "none"]
136
- Verdict: PASS or FAIL
137
- ```
23
+ ## Evidence validity
138
24
 
139
- If the verdict is FAIL, do not use completion language. State what failed and what remains.
25
+ For every check record command, exit code, output/log path, time, revision and relevant diff/input fingerprint, environment fingerprint and scope covered. Include relevant untracked/generated files, dependencies/lockfiles, tool configuration, runtime and external fixtures. The fingerprint must represent actual inputs; a timestamp or HEAD alone is insufficient when the worktree is dirty.
140
26
 
141
- If the verdict is PASS, the claim may proceed — but only the specific claim supported by the evidence.
27
+ Reuse a passing record when command, inputs, environment and claim scope remain equivalent and its output can be inspected. A new message, review stage or bookkeeping-only commit does not by itself invalidate checks. Unknown fingerprints/environment, changed inputs, new findings or broader claims require appropriate fresh checks. If uncertain which inputs matter, rerun the required check instead of inventing validity.
142
28
 
143
- ## When Verification Fails
29
+ The installed helper `.dw/scripts/lib/workflow-contract.mjs` exports `reusableEvidence(record, current)` for comparing known fingerprints and scopes; callers still gather the actual evidence. Store records in execution-state.json for planned tasks, or the existing verification/QA report for standalone work.
144
30
 
145
- Verification failure is information, not a dead end. Protocol:
31
+ ## Failures and delivery
146
32
 
147
- 1. **Read the failure.** Identify the exact error. Quote the relevant output lines.
148
- 2. **Diagnose the root cause.** Read the error. Trace it to the source. If multiple things failed, address them one at a time, starting with the first failure.
149
- 3. **Fix the root cause.** Apply the minimal change that addresses the actual error. No workarounds, no suppressions, no skipped checks.
150
- 4. **Re-verify from scratch.** Run the full verification command again. Do not assume the fix worked. Do not run only the previously-failing subset.
151
- 5. **Report with evidence.** Use the Verification Report Template. If it passes, the claim may proceed. If it fails again, return to step 1.
33
+ Read failures and diagnose production behavior before changing tests. Correct failures caused by the requested change; rerun affected checks, then any invalidated required delivery gates. Do not weaken assertions, hide blocking findings, or claim a skipped check passed. Unrelated failures are reported with attribution and handled under project policy.
152
34
 
153
- **Never:**
154
- - Claim partial success ("3 of 4 checks pass, close enough")
155
- - Skip re-verification after a fix
156
- - Blame the tooling without evidence of a false positive
157
- - Move on while verification is still failing
35
+ Before commit/PR, inspect the scoped diff and acceptance criteria and confirm all applicable required checks have valid passing evidence. Reuse a verified worker/CI result under the same validity rules; independently inspect the delivery, not blindly trust a summary. Security and constitution gates remain in force. A passing pipeline does not itself authorize commit, merge or publication.
158
36
 
159
- ## Project-Specific Verification Commands
37
+ ## Verification report
160
38
 
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.
39
+ Record a compact VERIFICATION REPORT with Claim, Command, Executed, Revision/inputs, Environment, Scope, Exit code, Output summary/log, Warnings, Errors and Verdict (`PASS`, `FAIL`, or `NOT_APPLICABLE`). Say which evidence was reused and why. The user-facing response may summarize these records with links; full logs need not be pasted into every message.
162
40
 
163
- Load `references/verification-discovery-and-attribution.md` for the discovery checklist and attribution notes, or `references/pre-check-and-status.md` for the cheap diff-hygiene grep and the compact polling status line.
41
+ Read `references/verification-discovery-and-attribution.md` when project gate discovery or attribution is needed. Read `references/pre-check-and-status.md` only for diff-hygiene checks or polling format.
164
42
 
165
43
  ## Structured Return
166
44
 
167
- - **Status:** `PASS` 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.
45
+ - **Status:** `PASS` valid evidence supports the claim; `FINDINGS` failed/incomplete checks; `BLOCKED` a required check cannot run; `NOT_APPLICABLE` no verification claim.
46
+ - **Scope:** claim, relevant files/inputs, checks and environment.
47
+ - **Evidence:** commands, exit codes, inspectable logs, fingerprints and acceptance criteria.
48
+ - **Artifacts:** verification report, task state, screenshots or CI link.
49
+ - **Decisions:** selected checks, evidence reused and reasons for inapplicable checks.
50
+ - **Risks:** unknown environment, stale inputs, missing checks or uncovered behavior.
51
+ - **Next Step:** fix, required check, or validated handoff.
@@ -7,7 +7,7 @@ dev-workflow does not hardcode a verification command. Discover it from the proj
7
7
  3. Check for `Makefile`/`make verify`, `pyproject.toml`/`just verify`, etc.
8
8
  4. If none is explicit, run the documented test + lint + build sequence.
9
9
 
10
- If no verification command exists for the project, state that explicitly in the Verification Report and avoid completion language.
10
+ If no automated command applies, document the appropriate inspection and its limits. A missing required check blocks its claim; a prose-only task does not require an invented test runner.
11
11
 
12
12
  ## Integration With Other dev-workflow Commands
13
13
 
@@ -18,7 +18,7 @@ This skill is invoked transparently from:
18
18
  - `/dw-qa --fix` — before marking a bug as resolved in `QA/bugs.md`
19
19
  - `/dw-bugfix` — before claiming the bug is fixed (original symptom no longer reproduces)
20
20
  - `/dw-review --code-only` — before emitting an APPROVED verdict
21
- - `/dw-generate-pr` — blocks PR creation if the session has no passing VERIFICATION REPORT post-last-edit
21
+ - `/dw-generate-pr` — requires valid passing evidence for the current inputs, environment and scope
22
22
 
23
23
  Callers should mention this skill in their "Skills Complementares" section so the user sees the dependency.
24
24
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: humanizer
3
- version: 2.2.0
3
+ metadata:
4
+ version: "2.2.0"
4
5
  description: Use when editing AI-generated text. Detects 24 'signs of AI writing' (em-dashes, rule-of-three, AI vocab, vague attributions). Triggers on docs, READMEs, blog posts, captions, marketing copy.
5
6
  allowed-tools:
6
7
  - Read
@@ -58,138 +58,11 @@ rotated, not argued away (only committed `.gitleaks.toml` allowlist entries for
58
58
 
59
59
  ## Do Not Flag
60
60
 
61
- ### General Rules
62
- - Test files (unless explicitly reviewing test security)
63
- - Dead code, commented code, documentation strings
64
- - Patterns using **constants** or **server-controlled configuration**
65
- - Code paths that require prior authentication to reach (note the auth requirement instead)
66
-
67
- ### Server-Controlled Values (NOT Attacker-Controlled)
68
-
69
- These are configured by operators, not controlled by attackers:
70
-
71
- | Source | Example | Why It's Safe |
72
- |--------|---------|---------------|
73
- | Django settings | `settings.API_URL`, `settings.ALLOWED_HOSTS` | Set via config/env at deployment |
74
- | Environment variables | `os.environ.get('DATABASE_URL')` | Deployment configuration |
75
- | Config files | `config.yaml`, `app.config['KEY']` | Server-side files |
76
- | Framework constants | `django.conf.settings.*` | Not user-modifiable |
77
- | Hardcoded values | `BASE_URL = "https://api.internal"` | Compile-time constants |
78
-
79
- **SSRF Example - NOT a vulnerability:**
80
- ```python
81
- # SAFE: URL comes from Django settings (server-controlled)
82
- response = requests.get(f"{settings.SEER_AUTOFIX_URL}{path}")
83
- ```
84
-
85
- **SSRF Example - IS a vulnerability:**
86
- ```python
87
- # VULNERABLE: URL comes from request (attacker-controlled)
88
- response = requests.get(request.GET.get('url'))
89
- ```
90
-
91
- ### Framework-Mitigated Patterns
92
- Check language guides before flagging. Common false positives:
93
-
94
- | Pattern | Why It's Usually Safe |
95
- |---------|----------------------|
96
- | Django `{{ variable }}` | Auto-escaped by default |
97
- | React `{variable}` | Auto-escaped by default |
98
- | Vue `{{ variable }}` | Auto-escaped by default |
99
- | `User.objects.filter(id=input)` | ORM parameterizes queries |
100
- | `cursor.execute("...%s", (input,))` | Parameterized query |
101
- | `innerHTML = "<b>Loading...</b>"` | Constant string, no user input |
102
-
103
- **Only flag these when:**
104
- - Django: `{{ var|safe }}`, `{% autoescape off %}`, `mark_safe(user_input)`
105
- - React: `dangerouslySetInnerHTML={{__html: userInput}}`
106
- - Vue: `v-html="userInput"`
107
- - ORM: `.raw()`, `.extra()`, `RawSQL()` with string interpolation
61
+ For do not flag, read `references/do-not-flag-detail.md`. Load only when this part of the task applies.
108
62
 
109
63
  ## Review Process
110
64
 
111
- ### 1. Detect Context
112
-
113
- What type of code am I reviewing?
114
-
115
- | Code Type | Load These References |
116
- |-----------|----------------------|
117
- | API endpoints, routes | `authorization.md`, `authentication.md`, `injection.md` |
118
- | Frontend, templates | `xss.md`, `csrf.md` |
119
- | File handling, uploads | `file-security.md` |
120
- | Crypto, secrets, tokens | `cryptography.md`, `data-protection.md` |
121
- | Data serialization | `deserialization.md` |
122
- | External requests | `ssrf.md` |
123
- | Business workflows | `business-logic.md` |
124
- | GraphQL, REST design | `api-security.md` |
125
- | Config, headers, CORS | `misconfiguration.md` |
126
- | CI/CD, dependencies | `supply-chain.md` |
127
- | Error handling | `error-handling.md` |
128
- | Audit, logging | `logging.md` |
129
-
130
- ### 2. Load Language Guide
131
-
132
- Based on file extension or imports:
133
-
134
- | Indicators | Guide |
135
- |------------|-------|
136
- | `.py`, `django`, `flask`, `fastapi` | `languages/python.md` |
137
- | `.js`, `.ts`, `express`, `react`, `vue`, `next` | `languages/javascript.md` |
138
- | `.go`, `go.mod` | `languages/go.md` |
139
- | `.rs`, `Cargo.toml` | `languages/rust.md` |
140
- | `.java`, `spring`, `@Controller` | `languages/java.md` |
141
-
142
- ### 3. Load Infrastructure Guide (if applicable)
143
-
144
- | File Type | Guide |
145
- |-----------|-------|
146
- | `Dockerfile`, `.dockerignore` | `infrastructure/docker.md` |
147
- | K8s manifests, Helm charts | `infrastructure/kubernetes.md` |
148
- | `.tf`, Terraform | `infrastructure/terraform.md` |
149
- | GitHub Actions, `.gitlab-ci.yml` | `infrastructure/ci-cd.md` |
150
- | AWS/GCP/Azure configs, IAM | `infrastructure/cloud.md` |
151
-
152
- ### 4. Research Before Flagging
153
-
154
- **For each potential issue, research the codebase to build confidence:**
155
-
156
- - Where does this value actually come from? Trace the data flow.
157
- - Is it configured at deployment (settings, env vars) or from user input?
158
- - Is there validation, sanitization, or allowlisting elsewhere?
159
- - What framework protections apply?
160
-
161
- Only report issues where you have HIGH confidence after understanding the broader context.
162
-
163
- ### 5. Verify Exploitability
164
-
165
- For each potential finding, confirm:
166
-
167
- **Is the input attacker-controlled?**
168
-
169
- | Attacker-Controlled (Investigate) | Server-Controlled (Usually Safe) |
170
- |-----------------------------------|----------------------------------|
171
- | `request.GET`, `request.POST`, `request.args` | `settings.X`, `app.config['X']` |
172
- | `request.json`, `request.data`, `request.body` | `os.environ.get('X')` |
173
- | `request.headers` (most headers) | Hardcoded constants |
174
- | `request.cookies` (unsigned) | Internal service URLs from config |
175
- | URL path segments: `/users/<id>/` | Database content from admin/system |
176
- | File uploads (content and names) | Signed session data |
177
- | Database content from other users | Framework settings |
178
- | WebSocket messages | |
179
-
180
- **Does the framework mitigate this?**
181
- - Check language guide for auto-escaping, parameterization
182
- - Check for middleware/decorators that sanitize
183
-
184
- **Is there validation upstream?**
185
- - Input validation before this code
186
- - Sanitization libraries (DOMPurify, bleach, etc.)
187
-
188
- ### 6. Report HIGH Confidence Only
189
-
190
- Skip theoretical issues. Report only what you've confirmed is exploitable after research.
191
-
192
- ---
65
+ For review process, read `references/review-process-detail.md`. Load only when this part of the task applies.
193
66
 
194
67
  ## Severity Classification
195
68
 
@@ -204,60 +77,7 @@ Skip theoretical issues. Report only what you've confirmed is exploitable after
204
77
 
205
78
  ## Quick Patterns Reference
206
79
 
207
- ### Always Flag (Critical)
208
- ```
209
- eval(user_input) # Any language
210
- exec(user_input) # Any language
211
- pickle.loads(user_data) # Python
212
- yaml.load(user_data) # Python (not safe_load)
213
- unserialize($user_data) # PHP
214
- deserialize(user_data) # Java ObjectInputStream
215
- shell=True + user_input # Python subprocess
216
- child_process.exec(user) # Node.js
217
- ```
218
-
219
- ### Always Flag (High)
220
- ```
221
- innerHTML = userInput # DOM XSS
222
- dangerouslySetInnerHTML={user} # React XSS
223
- v-html="userInput" # Vue XSS
224
- f"SELECT * FROM x WHERE {user}" # SQL injection
225
- `SELECT * FROM x WHERE ${user}` # SQL injection
226
- os.system(f"cmd {user_input}") # Command injection
227
- ```
228
-
229
- ### Always Flag (Secrets)
230
- ```
231
- password = "hardcoded"
232
- api_key = "sk-..."
233
- AWS_SECRET_ACCESS_KEY = "..."
234
- private_key = "-----BEGIN"
235
- ```
236
-
237
- ### Check Context First (MUST Investigate Before Flagging)
238
- ```
239
- # SSRF - ONLY if URL is from user input, NOT from settings/config
240
- requests.get(request.GET['url']) # FLAG: User-controlled URL
241
- requests.get(settings.API_URL) # SAFE: Server-controlled config
242
- requests.get(f"{settings.BASE}/{x}") # CHECK: Is 'x' user input?
243
-
244
- # Path traversal - ONLY if path is from user input
245
- open(request.GET['file']) # FLAG: User-controlled path
246
- open(settings.LOG_PATH) # SAFE: Server-controlled config
247
- open(f"{BASE_DIR}/{filename}") # CHECK: Is 'filename' user input?
248
-
249
- # Open redirect - ONLY if URL is from user input
250
- redirect(request.GET['next']) # FLAG: User-controlled redirect
251
- redirect(settings.LOGIN_URL) # SAFE: Server-controlled config
252
-
253
- # Weak crypto - ONLY if used for security purposes
254
- hashlib.md5(file_content) # SAFE: File checksums, caching
255
- hashlib.md5(password) # FLAG: Password hashing
256
- random.random() # SAFE: Non-security uses (UI, sampling)
257
- random.random() for token # FLAG: Security tokens need secrets module
258
- ```
259
-
260
- ---
80
+ For quick patterns reference, read `references/quick-patterns-reference-detail.md`. Load only when this part of the task applies.
261
81
 
262
82
  ## Output Format
263
83
 
@@ -0,0 +1,49 @@
1
+ ## Do Not Flag
2
+
3
+ ### General Rules
4
+ - Test files (unless explicitly reviewing test security)
5
+ - Dead code, commented code, documentation strings
6
+ - Patterns using **constants** or **server-controlled configuration**
7
+ - Code paths that require prior authentication to reach (note the auth requirement instead)
8
+
9
+ ### Server-Controlled Values (NOT Attacker-Controlled)
10
+
11
+ These are configured by operators, not controlled by attackers:
12
+
13
+ | Source | Example | Why It's Safe |
14
+ |--------|---------|---------------|
15
+ | Django settings | `settings.API_URL`, `settings.ALLOWED_HOSTS` | Set via config/env at deployment |
16
+ | Environment variables | `os.environ.get('DATABASE_URL')` | Deployment configuration |
17
+ | Config files | `config.yaml`, `app.config['KEY']` | Server-side files |
18
+ | Framework constants | `django.conf.settings.*` | Not user-modifiable |
19
+ | Hardcoded values | `BASE_URL = "https://api.internal"` | Compile-time constants |
20
+
21
+ **SSRF Example - NOT a vulnerability:**
22
+ ```python
23
+ # SAFE: URL comes from Django settings (server-controlled)
24
+ response = requests.get(f"{settings.SEER_AUTOFIX_URL}{path}")
25
+ ```
26
+
27
+ **SSRF Example - IS a vulnerability:**
28
+ ```python
29
+ # VULNERABLE: URL comes from request (attacker-controlled)
30
+ response = requests.get(request.GET.get('url'))
31
+ ```
32
+
33
+ ### Framework-Mitigated Patterns
34
+ Check language guides before flagging. Common false positives:
35
+
36
+ | Pattern | Why It's Usually Safe |
37
+ |---------|----------------------|
38
+ | Django `{{ variable }}` | Auto-escaped by default |
39
+ | React `{variable}` | Auto-escaped by default |
40
+ | Vue `{{ variable }}` | Auto-escaped by default |
41
+ | `User.objects.filter(id=input)` | ORM parameterizes queries |
42
+ | `cursor.execute("...%s", (input,))` | Parameterized query |
43
+ | `innerHTML = "<b>Loading...</b>"` | Constant string, no user input |
44
+
45
+ **Only flag these when:**
46
+ - Django: `{{ var|safe }}`, `{% autoescape off %}`, `mark_safe(user_input)`
47
+ - React: `dangerouslySetInnerHTML={{__html: userInput}}`
48
+ - Vue: `v-html="userInput"`
49
+ - ORM: `.raw()`, `.extra()`, `RawSQL()` with string interpolation
@@ -0,0 +1,56 @@
1
+ ## Quick Patterns Reference
2
+
3
+ ### Always Flag (Critical)
4
+ ```
5
+ eval(user_input) # Any language
6
+ exec(user_input) # Any language
7
+ pickle.loads(user_data) # Python
8
+ yaml.load(user_data) # Python (not safe_load)
9
+ unserialize($user_data) # PHP
10
+ deserialize(user_data) # Java ObjectInputStream
11
+ shell=True + user_input # Python subprocess
12
+ child_process.exec(user) # Node.js
13
+ ```
14
+
15
+ ### Always Flag (High)
16
+ ```
17
+ innerHTML = userInput # DOM XSS
18
+ dangerouslySetInnerHTML={user} # React XSS
19
+ v-html="userInput" # Vue XSS
20
+ f"SELECT * FROM x WHERE {user}" # SQL injection
21
+ `SELECT * FROM x WHERE ${user}` # SQL injection
22
+ os.system(f"cmd {user_input}") # Command injection
23
+ ```
24
+
25
+ ### Always Flag (Secrets)
26
+ ```
27
+ password = "hardcoded"
28
+ api_key = "sk-..."
29
+ AWS_SECRET_ACCESS_KEY = "..."
30
+ private_key = "-----BEGIN"
31
+ ```
32
+
33
+ ### Check Context First (MUST Investigate Before Flagging)
34
+ ```
35
+ # SSRF - ONLY if URL is from user input, NOT from settings/config
36
+ requests.get(request.GET['url']) # FLAG: User-controlled URL
37
+ requests.get(settings.API_URL) # SAFE: Server-controlled config
38
+ requests.get(f"{settings.BASE}/{x}") # CHECK: Is 'x' user input?
39
+
40
+ # Path traversal - ONLY if path is from user input
41
+ open(request.GET['file']) # FLAG: User-controlled path
42
+ open(settings.LOG_PATH) # SAFE: Server-controlled config
43
+ open(f"{BASE_DIR}/{filename}") # CHECK: Is 'filename' user input?
44
+
45
+ # Open redirect - ONLY if URL is from user input
46
+ redirect(request.GET['next']) # FLAG: User-controlled redirect
47
+ redirect(settings.LOGIN_URL) # SAFE: Server-controlled config
48
+
49
+ # Weak crypto - ONLY if used for security purposes
50
+ hashlib.md5(file_content) # SAFE: File checksums, caching
51
+ hashlib.md5(password) # FLAG: Password hashing
52
+ random.random() # SAFE: Non-security uses (UI, sampling)
53
+ random.random() for token # FLAG: Security tokens need secrets module
54
+ ```
55
+
56
+ ---