@brunosps00/dev-workflow 0.4.7 → 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.
- package/README.md +29 -6
- package/lib/constants.js +4 -0
- package/package.json +1 -1
- package/scaffold/en/commands/dw-adr.md +117 -0
- package/scaffold/en/commands/dw-autopilot.md +7 -0
- package/scaffold/en/commands/dw-brainstorm.md +6 -0
- package/scaffold/en/commands/dw-bugfix.md +9 -0
- package/scaffold/en/commands/dw-code-review.md +18 -0
- package/scaffold/en/commands/dw-create-tasks.md +12 -0
- package/scaffold/en/commands/dw-create-techspec.md +8 -0
- package/scaffold/en/commands/dw-fix-qa.md +5 -0
- package/scaffold/en/commands/dw-generate-pr.md +8 -0
- package/scaffold/en/commands/dw-help.md +42 -3
- package/scaffold/en/commands/dw-quick.md +8 -1
- package/scaffold/en/commands/dw-refactoring-analysis.md +1 -0
- package/scaffold/en/commands/dw-resume.md +10 -3
- package/scaffold/en/commands/dw-revert-task.md +114 -0
- package/scaffold/en/commands/dw-review-implementation.md +6 -0
- package/scaffold/en/commands/dw-run-plan.md +19 -1
- package/scaffold/en/commands/dw-run-task.md +14 -1
- package/scaffold/en/commands/dw-update.md +39 -0
- package/scaffold/en/templates/adr-template.md +56 -0
- package/scaffold/en/templates/prd-template.md +12 -0
- package/scaffold/en/templates/task-template.md +12 -0
- package/scaffold/en/templates/tasks-template.md +6 -0
- package/scaffold/en/templates/techspec-template.md +12 -0
- package/scaffold/pt-br/commands/dw-adr.md +117 -0
- package/scaffold/pt-br/commands/dw-autopilot.md +7 -0
- package/scaffold/pt-br/commands/dw-brainstorm.md +6 -0
- package/scaffold/pt-br/commands/dw-bugfix.md +9 -0
- package/scaffold/pt-br/commands/dw-code-review.md +18 -0
- package/scaffold/pt-br/commands/dw-create-tasks.md +12 -0
- package/scaffold/pt-br/commands/dw-create-techspec.md +8 -0
- package/scaffold/pt-br/commands/dw-fix-qa.md +5 -0
- package/scaffold/pt-br/commands/dw-generate-pr.md +8 -0
- package/scaffold/pt-br/commands/dw-help.md +42 -3
- package/scaffold/pt-br/commands/dw-quick.md +8 -1
- package/scaffold/pt-br/commands/dw-refactoring-analysis.md +1 -0
- package/scaffold/pt-br/commands/dw-resume.md +10 -3
- package/scaffold/pt-br/commands/dw-revert-task.md +114 -0
- package/scaffold/pt-br/commands/dw-review-implementation.md +6 -0
- package/scaffold/pt-br/commands/dw-run-plan.md +19 -1
- package/scaffold/pt-br/commands/dw-run-task.md +14 -1
- package/scaffold/pt-br/commands/dw-update.md +40 -0
- package/scaffold/pt-br/templates/adr-template.md +56 -0
- package/scaffold/pt-br/templates/prd-template.md +12 -0
- package/scaffold/pt-br/templates/task-template.md +12 -0
- package/scaffold/pt-br/templates/tasks-template.md +6 -0
- package/scaffold/pt-br/templates/techspec-template.md +12 -0
- package/scaffold/skills/dw-council/SKILL.md +189 -0
- package/scaffold/skills/dw-council/agents/architect-advisor.md +44 -0
- package/scaffold/skills/dw-council/agents/devils-advocate.md +45 -0
- package/scaffold/skills/dw-council/agents/pragmatic-engineer.md +47 -0
- package/scaffold/skills/dw-council/agents/product-mind.md +48 -0
- package/scaffold/skills/dw-council/agents/security-advocate.md +48 -0
- package/scaffold/skills/dw-memory/SKILL.md +178 -0
- package/scaffold/skills/dw-review-rigor/SKILL.md +145 -0
- package/scaffold/skills/dw-verify/SKILL.md +196 -0
package/README.md
CHANGED
|
@@ -10,13 +10,15 @@ 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
|
|
14
|
-
3. Create `.dw/templates/` with document templates
|
|
13
|
+
2. Create `.dw/commands/` with 26 workflow commands
|
|
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
|
-
5. Install bundled skills (ui-ux-pro-max
|
|
16
|
+
5. Install bundled skills (`dw-verify`, `dw-memory`, `dw-review-rigor`, `ui-ux-pro-max`, `security-review`, etc.) to `.agents/skills/`
|
|
17
17
|
6. Generate skill wrappers for Claude Code, Codex, Copilot, and OpenCode
|
|
18
18
|
7. Configure MCP servers (Context7 + Playwright)
|
|
19
19
|
|
|
20
|
+
> **Compozy-inspired disciplines.** Since 0.5.0, dev-workflow bundles three primitives — `dw-verify`, `dw-memory`, `dw-review-rigor` — adapted from the [Compozy](https://github.com/compozy/compozy) project and invoked internally by existing commands. See [docs/compozy-integration.md](docs/compozy-integration.md) for what was ported and what was not.
|
|
21
|
+
|
|
20
22
|
Optional dependencies (Playwright browsers, react-doctor, GSD):
|
|
21
23
|
```bash
|
|
22
24
|
npx @brunosps00/dev-workflow install-deps
|
|
@@ -81,7 +83,15 @@ Audits the codebase for code smells and refactoring opportunities using Martin F
|
|
|
81
83
|
Analyzes pending changes, groups them by feature or logical context, and creates atomic semantic commits following the Conventional Commits format. Uses allowed types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `ci`, `build`.
|
|
82
84
|
|
|
83
85
|
#### `/dw-generate-pr`
|
|
84
|
-
Pushes the branch to remote and creates a Pull Request on GitHub with a structured description. Collects information from the PRD and modified files, runs tests, then generates a PR body with summary, changes grouped by module, test plan, and deploy notes.
|
|
86
|
+
Pushes the branch to remote and creates a Pull Request on GitHub with a structured description. Collects information from the PRD and modified files, runs tests, then generates a PR body with summary, changes grouped by module, test plan, and deploy notes. **Hard gate**: requires a fresh `dw-verify` PASS in the current session before the push.
|
|
87
|
+
|
|
88
|
+
#### `/dw-revert-task`
|
|
89
|
+
Safely reverts the commits of a specific task created by `/dw-run-task`, with dependency-aware checks (blocks if subsequent tasks already executed depend on it) and explicit user confirmation. Updates `tasks.md` to re-mark the task as pending.
|
|
90
|
+
|
|
91
|
+
### Architectural Decisions
|
|
92
|
+
|
|
93
|
+
#### `/dw-adr`
|
|
94
|
+
Records an Architecture Decision Record (ADR) for a non-trivial decision during PRD execution. Creates `.dw/spec/<prd>/adrs/adr-NNN.md` with Context / Decision / Alternatives / Consequences, and updates cross-references in the PRD/TechSpec/Task. Inspired by the ADR pattern from [Compozy](https://github.com/compozy/compozy).
|
|
85
95
|
|
|
86
96
|
### Intelligence
|
|
87
97
|
|
|
@@ -154,7 +164,7 @@ All wrappers point to `.dw/commands/` as the single source of truth.
|
|
|
154
164
|
```
|
|
155
165
|
your-project/
|
|
156
166
|
├── .dw/
|
|
157
|
-
│ ├── commands/ #
|
|
167
|
+
│ ├── commands/ # 26 workflow command files
|
|
158
168
|
│ ├── templates/ # Document templates (PRD, TechSpec, etc.)
|
|
159
169
|
│ ├── rules/ # Project-specific rules (run /dw-analyze-project)
|
|
160
170
|
│ ├── references/ # Reference documentation
|
|
@@ -170,7 +180,20 @@ your-project/
|
|
|
170
180
|
|
|
171
181
|
## Bundled Skills
|
|
172
182
|
|
|
173
|
-
Skills installed to `.agents/skills/` for use by all commands
|
|
183
|
+
Skills installed to `.agents/skills/` for use by all commands.
|
|
184
|
+
|
|
185
|
+
### Workflow discipline (invoked internally by dw-* commands)
|
|
186
|
+
|
|
187
|
+
These are not slash commands — they are primitives other commands call to enforce discipline. You never invoke them directly; the commands that need them do so transparently.
|
|
188
|
+
|
|
189
|
+
| Skill | Description | Invoked by | Inspired by |
|
|
190
|
+
|-------|-------------|------------|-------------|
|
|
191
|
+
| **dw-verify** | Enforces fresh verification evidence before any completion, commit, or PR claim — with Iron Law, gate function, and Verification Report template | `dw-run-task`, `dw-run-plan`, `dw-fix-qa`, `dw-bugfix`, `dw-code-review`, `dw-generate-pr`, `dw-quick` | [Compozy](https://github.com/compozy/compozy) `cy-final-verify` |
|
|
192
|
+
| **dw-memory** | Two-tier workflow memory (shared `MEMORY.md` + per-task `<N>_memory.md`) with promotion test and compaction rules, so cross-task context persists cleanly | `dw-run-task`, `dw-run-plan`, `dw-autopilot`, `dw-resume` | [Compozy](https://github.com/compozy/compozy) `cy-workflow-memory` |
|
|
193
|
+
| **dw-review-rigor** | Review discipline: de-duplication, severity ordering, verify-intent-before-flagging, skip-linter-issues, signal-over-volume | `dw-code-review`, `dw-review-implementation`, `dw-refactoring-analysis` | [Compozy](https://github.com/compozy/compozy) `cy-review-round` |
|
|
194
|
+
| **dw-council** | Multi-advisor debate (3-5 archetypes) with steel-manning, concession tracking, and dissent-preserving synthesis. Opt-in only. | `dw-brainstorm --council`, `dw-create-techspec --council` | [Compozy](https://github.com/compozy/compozy) `cy-idea-factory` |
|
|
195
|
+
|
|
196
|
+
### Domain expertise
|
|
174
197
|
|
|
175
198
|
| Skill | Description | Source | License |
|
|
176
199
|
|-------|-------------|--------|---------|
|
package/lib/constants.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const COMMANDS = {
|
|
2
2
|
en: [
|
|
3
|
+
{ name: 'dw-adr', description: 'Record an Architecture Decision Record (ADR) for a non-trivial decision during PRD execution' },
|
|
3
4
|
{ name: 'dw-analyze-project', description: 'Analyze repository stack, patterns, and conventions to generate project rules' },
|
|
4
5
|
{ name: 'dw-autopilot', description: 'Full pipeline orchestrator from a wish to a PR with minimal intervention (research, PRD, tasks, execution, QA, review, commit)' },
|
|
5
6
|
{ name: 'dw-brainstorm', description: 'Explore ideas and directions before starting implementation' },
|
|
@@ -20,12 +21,14 @@ const COMMANDS = {
|
|
|
20
21
|
{ name: 'dw-refactoring-analysis', description: 'Audit codebase for code smells and refactoring opportunities with prioritized report' },
|
|
21
22
|
{ name: 'dw-resume', description: 'Restore session context and suggest the next workflow step' },
|
|
22
23
|
{ name: 'dw-review-implementation', description: 'Review if all PRD requirements were correctly implemented' },
|
|
24
|
+
{ name: 'dw-revert-task', description: 'Safely revert the commits of a specific task with dependency-aware checks' },
|
|
23
25
|
{ name: 'dw-run-plan', description: 'Execute ALL tasks sequentially until the plan is complete' },
|
|
24
26
|
{ name: 'dw-run-qa', description: 'Run visual QA with browser automation, E2E tests, and accessibility' },
|
|
25
27
|
{ name: 'dw-run-task', description: 'Execute a single task with built-in validation and testing' },
|
|
26
28
|
{ name: 'dw-update', description: 'Update dev-workflow to the latest version published on npm without leaving the agent session' },
|
|
27
29
|
],
|
|
28
30
|
'pt-br': [
|
|
31
|
+
{ name: 'dw-adr', description: 'Registrar um Architecture Decision Record (ADR) para uma decisao nao-trivial durante o PRD' },
|
|
29
32
|
{ name: 'dw-analyze-project', description: 'Analisa stack, patterns e convencoes do repositorio para gerar regras do projeto' },
|
|
30
33
|
{ name: 'dw-autopilot', description: 'Orquestrador completo de um desejo ate o PR com minima intervencao (pesquisa, PRD, tasks, execucao, QA, review, commit)' },
|
|
31
34
|
{ name: 'dw-brainstorm', description: 'Explorar ideias e direcoes antes de comecar a implementacao' },
|
|
@@ -46,6 +49,7 @@ const COMMANDS = {
|
|
|
46
49
|
{ name: 'dw-refactoring-analysis', description: 'Auditar codebase para code smells e oportunidades de refatoracao com relatorio priorizado' },
|
|
47
50
|
{ name: 'dw-resume', description: 'Restaurar contexto da sessao e sugerir o proximo passo do workflow' },
|
|
48
51
|
{ name: 'dw-review-implementation', description: 'Revisar se todos os requisitos do PRD foram implementados corretamente' },
|
|
52
|
+
{ name: 'dw-revert-task', description: 'Reverter com seguranca os commits de uma task especifica com checks de dependencia' },
|
|
49
53
|
{ name: 'dw-run-plan', description: 'Executar TODAS as tasks sequencialmente ate completar o plano' },
|
|
50
54
|
{ name: 'dw-run-qa', description: 'Executar QA visual com automacao de browser, testes E2E e acessibilidade' },
|
|
51
55
|
{ name: 'dw-run-task', description: 'Executar uma task com validacao e testes integrados' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brunosps00/dev-workflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
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"
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You are an architectural-decision recorder. Your job is to create an **Architecture Decision Record (ADR)** documenting an important technical decision made during the current PRD phase.
|
|
3
|
+
|
|
4
|
+
## When to Use
|
|
5
|
+
- Use when an architectural or design decision has been made and needs to be recorded for future reference (library choice, communication pattern, performance tradeoff, compliance-imposed constraint, etc.)
|
|
6
|
+
- Use during `/dw-create-techspec` or `/dw-run-task` when the rationale for the decision does not fit in the techspec or the task file
|
|
7
|
+
- Do NOT use for trivial or cheaply-reversible decisions (variable names, import order)
|
|
8
|
+
- Do NOT use to record bugs or incidents (use `/dw-bugfix` or operational notes)
|
|
9
|
+
|
|
10
|
+
## Pipeline Position
|
|
11
|
+
**Predecessor:** any point in the pipeline after `/dw-create-prd` | **Successor:** continue the previous flow (techspec, task, review)
|
|
12
|
+
|
|
13
|
+
The ADR is **additive**: it does not replace any pipeline stage. Any existing command can invoke `/dw-adr` when a non-trivial decision needs a permanent record.
|
|
14
|
+
|
|
15
|
+
## Input Variables
|
|
16
|
+
|
|
17
|
+
| Variable | Description | Example |
|
|
18
|
+
|----------|-------------|---------|
|
|
19
|
+
| `{{PRD_PATH}}` | Path to the active PRD folder | `.dw/spec/prd-my-feature` |
|
|
20
|
+
| `{{TITLE}}` | Short imperative title of the decision | "Use PostgreSQL instead of MongoDB" |
|
|
21
|
+
|
|
22
|
+
If `{{PRD_PATH}}` is not provided, ask the user which PRD is active (read `.dw/spec/` and list). If `{{TITLE}}` is not provided, ask.
|
|
23
|
+
|
|
24
|
+
## File Locations
|
|
25
|
+
|
|
26
|
+
- ADR directory: `{{PRD_PATH}}/adrs/`
|
|
27
|
+
- New file: `{{PRD_PATH}}/adrs/adr-NNN.md` (NNN zero-padded to 3 digits)
|
|
28
|
+
- Template: `.dw/templates/adr-template.md`
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
### 1. Discover the next number
|
|
33
|
+
- List files in `{{PRD_PATH}}/adrs/` (create the directory if missing)
|
|
34
|
+
- Next number is `max(existing) + 1`, or `1` if empty
|
|
35
|
+
|
|
36
|
+
### 2. Gather context (minimum questions)
|
|
37
|
+
|
|
38
|
+
Ask the user **4 focused questions**, one at a time:
|
|
39
|
+
|
|
40
|
+
1. **Context**: what problem or motivating force led to this decision? (1-3 sentences)
|
|
41
|
+
2. **Decision**: what is the decision? (1 actionable sentence, starts with a verb)
|
|
42
|
+
3. **Alternatives considered**: what other options were evaluated and why were they not chosen? (minimum 2)
|
|
43
|
+
4. **Consequences**: what are the positive and negative tradeoffs? (name the negatives explicitly — no rosy painting)
|
|
44
|
+
|
|
45
|
+
### 3. Write the ADR file
|
|
46
|
+
|
|
47
|
+
Use `.dw/templates/adr-template.md` as the base. Required fields:
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
---
|
|
51
|
+
id: NNN
|
|
52
|
+
status: Proposed | Accepted | Deprecated | Superseded
|
|
53
|
+
title: [ADR title]
|
|
54
|
+
date: YYYY-MM-DD
|
|
55
|
+
prd: [PRD slug]
|
|
56
|
+
schema_version: "1.0"
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
# ADR-NNN: [Title]
|
|
60
|
+
|
|
61
|
+
## Status
|
|
62
|
+
[Proposed | Accepted | Deprecated | Superseded by ADR-XXX]
|
|
63
|
+
|
|
64
|
+
## Context
|
|
65
|
+
[Context and motivating forces]
|
|
66
|
+
|
|
67
|
+
## Decision
|
|
68
|
+
[The decision made]
|
|
69
|
+
|
|
70
|
+
## Alternatives Considered
|
|
71
|
+
1. **[Alternative 1]** — [why not chosen]
|
|
72
|
+
2. **[Alternative 2]** — [why not chosen]
|
|
73
|
+
|
|
74
|
+
## Consequences
|
|
75
|
+
### Positive
|
|
76
|
+
- [positive consequence 1]
|
|
77
|
+
|
|
78
|
+
### Negative
|
|
79
|
+
- [negative consequence / accepted tradeoff]
|
|
80
|
+
|
|
81
|
+
## Related
|
|
82
|
+
- PRD: `.dw/spec/prd-[name]/prd.md`
|
|
83
|
+
- TechSpec: `.dw/spec/prd-[name]/techspec.md` (if applicable)
|
|
84
|
+
- Affected tasks: [list, if applicable]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 4. Update cross-references
|
|
88
|
+
|
|
89
|
+
If the ADR is created **during** a PRD execution, add a line to the "Related ADRs" section of related artifacts:
|
|
90
|
+
- `prd.md`, `techspec.md`, or `[N]_task.md`, matching the decision's scope
|
|
91
|
+
|
|
92
|
+
If the "Related ADRs" section does not exist in the file, add it at the end.
|
|
93
|
+
|
|
94
|
+
### 5. Report
|
|
95
|
+
|
|
96
|
+
Present to the user:
|
|
97
|
+
- Path of the created ADR
|
|
98
|
+
- Artifacts updated with cross-reference
|
|
99
|
+
- Initial status (usually `Accepted` for decisions already made, `Proposed` for open ones)
|
|
100
|
+
|
|
101
|
+
## Required Behavior
|
|
102
|
+
|
|
103
|
+
<critical>NEVER overwrite an existing ADR. Each ADR is immutable — if the decision changes, create a new ADR with status `Supersedes ADR-NNN` and mark the old one as `Superseded by ADR-XXX`.</critical>
|
|
104
|
+
|
|
105
|
+
<critical>NEVER paint the tradeoff as "all upside". The Negative Consequences section is required — if there's no cost, the decision does not need an ADR.</critical>
|
|
106
|
+
|
|
107
|
+
## Inspired by
|
|
108
|
+
|
|
109
|
+
This command is inspired by the ADR pattern in `/tmp/compozy/.agents/skills/cy-create-adr/` from the [Compozy](https://github.com/compozy/compozy) project. Adaptations for dev-workflow:
|
|
110
|
+
|
|
111
|
+
- Paths are `.dw/spec/<prd>/adrs/` instead of `.compozy/tasks/<name>/adrs/`
|
|
112
|
+
- 4 minimum questions instead of Compozy's longer interactive flow (aligned with the concise style of other dw-* commands)
|
|
113
|
+
- Explicit integration with `schema_version` of v1.0 templates
|
|
114
|
+
|
|
115
|
+
Credit: Compozy project.
|
|
116
|
+
|
|
117
|
+
</system_instructions>
|
|
@@ -33,6 +33,13 @@ A step that invokes a `/dw-xxx` command is ONLY considered complete when the art
|
|
|
33
33
|
## Pipeline Position
|
|
34
34
|
**Predecessor:** (user's wish) | **Successor:** (PR merge)
|
|
35
35
|
|
|
36
|
+
## Complementary Skills
|
|
37
|
+
|
|
38
|
+
| Skill | Trigger |
|
|
39
|
+
|-------|---------|
|
|
40
|
+
| `dw-memory` | **ALWAYS** — the memory thread runs through every phase (brainstorm -> PRD -> techspec -> tasks -> execution -> QA -> review -> PR). Decisions at one gate feed context into the next. |
|
|
41
|
+
| `dw-verify` | **ALWAYS** — invoked at each gate (PRD, Tasks, PR) before asking user approval; and before the final commit + push. |
|
|
42
|
+
|
|
36
43
|
## Input Variables
|
|
37
44
|
|
|
38
45
|
| Variable | Description | Example |
|
|
@@ -11,6 +11,11 @@ You are a brainstorming facilitator for the current workspace. This command exis
|
|
|
11
11
|
## Pipeline Position
|
|
12
12
|
**Predecessor:** (user idea) | **Successor:** `/dw-create-prd`
|
|
13
13
|
|
|
14
|
+
## Flags
|
|
15
|
+
|
|
16
|
+
- **(default)**: normal brainstorm with 3-7 options (conservative, balanced, bold) and trade-offs
|
|
17
|
+
- **`--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.
|
|
18
|
+
|
|
14
19
|
## Decision Flowchart: Brainstorm vs Direct PRD
|
|
15
20
|
|
|
16
21
|
```dot
|
|
@@ -33,6 +38,7 @@ digraph brainstorm_decision {
|
|
|
33
38
|
|
|
34
39
|
When available in the project under `./.agents/skills/`, use these skills to enrich ideation:
|
|
35
40
|
|
|
41
|
+
- `dw-council` (opt-in via `--council`): multi-advisor stress-test of the most promising options with mandatory steel-manning and concession tracking. **DO NOT invoke by default** — only when the flag is present or when consensus forms too quickly (false-consensus signal).
|
|
36
42
|
- `ui-ux-pro-max`: use when brainstorming involves frontend, UI style direction, design system choices, or visual identity exploration
|
|
37
43
|
- `vercel-react-best-practices`: use when brainstorming React/Next.js architecture or performance trade-offs
|
|
38
44
|
- `security-review`: use when brainstorming touches auth, data handling, or security-sensitive features
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
When available in the project at `./.agents/skills/`, use these skills as contextual support without replacing this command:
|
|
17
17
|
|
|
18
|
+
- `dw-verify`: **ALWAYS** — in Direct mode, invoked before committing the fix. The VERIFICATION REPORT must show the original bug symptom no longer reproduces (not just that tests pass).
|
|
18
19
|
- `vercel-react-best-practices`: use when the bug affects React/Next.js and there is suspicion of render, hydration, fetching, waterfall, bundle, or re-render issues
|
|
19
20
|
- `webapp-testing`: use when the fix requires a reproducible E2E/retest flow in a web app
|
|
20
21
|
- `security-review`: use when the root cause touches auth, authorization, external input, upload, secrets, SQL, XSS, SSRF, or other sensitive surfaces
|
|
@@ -281,6 +282,14 @@
|
|
|
281
282
|
- `adjust` - Tell me what to modify in the plan
|
|
282
283
|
```
|
|
283
284
|
|
|
285
|
+
### 5.5. Final Verification (Direct mode — required before commit)
|
|
286
|
+
|
|
287
|
+
<critical>After applying the approved tasks in Direct mode, invoke `dw-verify` before committing. The VERIFICATION REPORT must show:
|
|
288
|
+
1. The project's verify command (test + lint + build) with exit 0.
|
|
289
|
+
2. Original-symptom reproduction: the scenario that triggered the bug no longer triggers it.
|
|
290
|
+
|
|
291
|
+
Without PASS on both, DO NOT commit. Report what failed and return to step 4 (root-cause analysis).</critical>
|
|
292
|
+
|
|
284
293
|
### 6. Generate Bugfix Document (Analysis Mode)
|
|
285
294
|
|
|
286
295
|
<critical>
|
|
@@ -21,6 +21,8 @@ Typically invoked before creating PR via `/dw-generate-pr`
|
|
|
21
21
|
|
|
22
22
|
When available in the project under `./.agents/skills/`, use these skills as analytical support without replacing this command:
|
|
23
23
|
|
|
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
|
+
- `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.
|
|
24
26
|
- `security-review`: use when auth, authorization, external input, upload, SQL, external integration, secrets, SSRF, XSS, or sensitive surfaces are present
|
|
25
27
|
- `vercel-react-best-practices`: use when the diff touches React/Next.js to review rendering, fetching, bundle, hydration, and performance patterns
|
|
26
28
|
|
|
@@ -196,6 +198,22 @@ Verify:
|
|
|
196
198
|
|
|
197
199
|
<critical>THE REVIEW CANNOT BE APPROVED IF ANY TEST FAILS</critical>
|
|
198
200
|
|
|
201
|
+
### 6.5. Apply `dw-review-rigor` (Required)
|
|
202
|
+
|
|
203
|
+
Before writing the "Issues Found" table, invoke the `dw-review-rigor` skill and apply the five rules:
|
|
204
|
+
|
|
205
|
+
1. **De-duplicate**: if the same pattern appears in N files, emit 1 finding with the list of affected files — never N identical findings.
|
|
206
|
+
2. **Severity ordering**: always present in critical → high → medium → low order (not by file).
|
|
207
|
+
3. **Verify intent before flagging**: check adjacent comments, ADRs in `.dw/spec/*/adrs/`, test coverage, rules in `.dw/rules/`. Do not flag patterns with documented justification.
|
|
208
|
+
4. **Skip what the linter catches**: run the project linter first; anything it already reports is not a finding.
|
|
209
|
+
5. **Signal over volume**: ~8 precise findings beats 30 marginal ones. Keep all critical/high; prune medium/low to the most impactful.
|
|
210
|
+
|
|
211
|
+
If prior reviews exist in `{{PRD_PATH}}/reviews/` or a previous `{{PRD_PATH}}/dw-code-review.md` round, read them and emit **only NEW findings** — do not re-flag items already tracked.
|
|
212
|
+
|
|
213
|
+
### 6.6. Final Verification (Required before verdict)
|
|
214
|
+
|
|
215
|
+
<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
|
+
|
|
199
217
|
### 7. Generate Code Review Report (Required)
|
|
200
218
|
|
|
201
219
|
Save to `{{PRD_PATH}}/dw-code-review.md`:
|
|
@@ -42,10 +42,22 @@
|
|
|
42
42
|
- Organize sequencing
|
|
43
43
|
- Include unit tests as subtasks of each task
|
|
44
44
|
|
|
45
|
+
3.5. **Circular Dependency Check (Pre-flight)**
|
|
46
|
+
- Before writing any file, build the dependency graph (`blockedBy` field or "Depends on" between tasks)
|
|
47
|
+
- Detect cycles: if task A depends on B and B depends (directly or transitively) on A, there's a cycle
|
|
48
|
+
- If a cycle exists: **DO NOT write the files**. Present the cycle to the user and request restructuring (e.g., extract shared responsibility, invert dependency, merge tasks)
|
|
49
|
+
- If no cycle: proceed
|
|
50
|
+
|
|
45
51
|
4. **Generate Individual Task Files**
|
|
46
52
|
- Create a file for each main task
|
|
47
53
|
- Detail subtasks and success criteria
|
|
48
54
|
- Include mandatory unit tests
|
|
55
|
+
- **Codebase-aware enrichment (Optional but recommended)**: for tasks that touch known codebase areas, dispatch a parallel Agent Explore (one per task or one per area) to populate:
|
|
56
|
+
- "Relevant Files": paths and why they're relevant to the task
|
|
57
|
+
- "Dependent Files": paths that may need cascading changes
|
|
58
|
+
- "Applicable Rules": links to `.dw/rules/*.md` that constrain the task
|
|
59
|
+
- "Related ADRs": files in `.dw/spec/<prd>/adrs/` that constrain decisions
|
|
60
|
+
This enrichment is additive: it does not block task generation, it only improves the quality of the context `dw-run-task` receives later.
|
|
49
61
|
|
|
50
62
|
## Task Creation Guidelines
|
|
51
63
|
|
|
@@ -13,10 +13,16 @@
|
|
|
13
13
|
## Pipeline Position
|
|
14
14
|
**Predecessor:** `/dw-create-prd` | **Successor:** `/dw-create-tasks`
|
|
15
15
|
|
|
16
|
+
## Flags
|
|
17
|
+
|
|
18
|
+
- **(default)**: generate a normal techspec from the PRD
|
|
19
|
+
- **`--council`**: before finalizing the techspec, invoke the `dw-council` skill on the primary architectural decision (e.g. monolith vs microservices, SQL vs NoSQL, lib X vs Y). The council output becomes an "Architectural Debate" section in the techspec, and firm decisions become an ADR via `/dw-adr`. Useful when the techspec introduces a high-impact structural choice.
|
|
20
|
+
|
|
16
21
|
## Complementary Skills
|
|
17
22
|
|
|
18
23
|
When available in the project under `./.agents/skills/`, use these skills as support:
|
|
19
24
|
|
|
25
|
+
- `dw-council` (opt-in via `--council`): multi-advisor debate on the primary architectural decision with steel-manning. **DO NOT invoke by default**.
|
|
20
26
|
- `vercel-react-best-practices`: use when defining frontend architecture for React/Next.js projects
|
|
21
27
|
- `ui-ux-pro-max`: use when defining design system decisions, color palettes, typography, and UI style for the TechSpec
|
|
22
28
|
- `security-review`: use when the feature touches auth, authorization, or sensitive data handling
|
|
@@ -96,6 +102,8 @@
|
|
|
96
102
|
- Review project patterns in `{{RULES_PATH}}`
|
|
97
103
|
- Confirm that the PRD exists at `{{PRD_PATH}}` or `spec/prd-[feature-name]/prd.md`
|
|
98
104
|
|
|
105
|
+
<critical>Hard gate: if the PRD has an "Open Questions" / "Questões em Aberto" section with unresolved items, STOP. Present the questions to the user and request resolution before writing the techspec. A techspec built on undefined requirements guarantees rework.</critical>
|
|
106
|
+
|
|
99
107
|
## Workflow
|
|
100
108
|
|
|
101
109
|
### 1. Analyze PRD (Required)
|
|
@@ -17,6 +17,7 @@ You are an AI assistant specialized in post-QA bug fixing with evidence-driven r
|
|
|
17
17
|
|
|
18
18
|
When available in the project under `./.agents/skills/`, use these skills as operational support without replacing this command:
|
|
19
19
|
|
|
20
|
+
- `dw-verify`: **ALWAYS** — invoked before marking any bug as `Fixed` or `Closed` in `QA/bugs.md`. Without a VERIFICATION REPORT PASS (test + lint + build) **and** retest evidence, status stays `Reopened` or `Under review`.
|
|
20
21
|
- `webapp-testing`: support for structuring retests, captures, and scripts when complementary to Playwright MCP
|
|
21
22
|
- `vercel-react-best-practices`: use only if the fix affects React/Next.js frontend and there is risk of rendering, hydration, fetching, or performance regression
|
|
22
23
|
|
|
@@ -88,6 +89,10 @@ For each fixed bug:
|
|
|
88
89
|
7. Record in the QA report which user/profile was used in the retest
|
|
89
90
|
8. If the retest requires persistent auth, request inspection beyond MCP, or more faithful real-browser reproduction, record this in the report
|
|
90
91
|
|
|
92
|
+
### 3.5. Final Verification Before Status Change
|
|
93
|
+
|
|
94
|
+
<critical>Invoke the `dw-verify` skill before changing any bug's status to `Fixed` or `Closed`. The VERIFICATION REPORT (test + lint + build) must be PASS **and** Playwright retest evidence must be saved. Without both, the status does not change.</critical>
|
|
95
|
+
|
|
91
96
|
### 4. Update Artifacts
|
|
92
97
|
|
|
93
98
|
Update `QA/bugs.md` for each bug:
|
|
@@ -9,6 +9,14 @@ You are an assistant specialized in creating well-documented Pull Requests. Your
|
|
|
9
9
|
## Pipeline Position
|
|
10
10
|
**Predecessor:** `/dw-code-review` or `/dw-commit` | **Successor:** (merge)
|
|
11
11
|
|
|
12
|
+
## Complementary Skills
|
|
13
|
+
|
|
14
|
+
| Skill | Trigger |
|
|
15
|
+
|-------|---------|
|
|
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
|
+
|
|
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
|
+
|
|
12
20
|
## Usage
|
|
13
21
|
|
|
14
22
|
```
|
|
@@ -11,7 +11,26 @@ You are a workspace help assistant. When invoked, present the user with a comple
|
|
|
11
11
|
## Behavior
|
|
12
12
|
|
|
13
13
|
- If invoked without arguments (`/dw-help`): show the complete guide below
|
|
14
|
-
- If invoked with an argument (`/dw-help create-prd`): show only
|
|
14
|
+
- If invoked with an argument matching a command (`/dw-help dw-create-prd`): show only that command's detailed section
|
|
15
|
+
- If invoked with a **keyword that is not a command name** (`/dw-help bug`, `/dw-help review`, `/dw-help design`): perform contextual lookup — identify the most relevant command(s) for the keyword and present each with 1-2 lines of justification ("for bugs, use `/dw-bugfix` because..."). Use the mapping table below.
|
|
16
|
+
|
|
17
|
+
### Contextual mapping (keyword → suggested command)
|
|
18
|
+
|
|
19
|
+
| Keyword(s) | Suggested command | Why |
|
|
20
|
+
|------------|-------------------|-----|
|
|
21
|
+
| bug, error, failure, issue | `/dw-bugfix` | Auto-triage bug vs feature + fix |
|
|
22
|
+
| review, quality | `/dw-code-review` | Formal Level-3 review with report |
|
|
23
|
+
| qa, visual test, playwright | `/dw-run-qa` | E2E QA with browser automation |
|
|
24
|
+
| refactor, smell, fowler | `/dw-refactoring-analysis` | Prioritized code-smell audit |
|
|
25
|
+
| design, ui, redesign | `/dw-redesign-ui` | Audit + propose + implement visual |
|
|
26
|
+
| decision, adr, architecture | `/dw-adr` | Record an Architecture Decision Record |
|
|
27
|
+
| debate, council, stress-test, opinions | `/dw-brainstorm --council` or `/dw-create-techspec --council` | Invokes `dw-council` for a multi-advisor debate |
|
|
28
|
+
| revert, rollback task | `/dw-revert-task` | Safe revert with dependency checks |
|
|
29
|
+
| hotfix, quick change | `/dw-quick` | One-off task with guarantees, no PRD |
|
|
30
|
+
| resume, where I left off | `/dw-resume` | Restore previous session context |
|
|
31
|
+
| research | `/dw-deep-research` | Multi-source research with citations |
|
|
32
|
+
| idea, brainstorm | `/dw-brainstorm` | Structured ideation with trade-offs |
|
|
33
|
+
| update dev-workflow | `/dw-update` | Update to latest npm version |
|
|
15
34
|
|
|
16
35
|
---
|
|
17
36
|
|
|
@@ -137,6 +156,13 @@ This workspace uses an AI command system that automates the full development cyc
|
|
|
137
156
|
| `/dw-commit` | Semantic commit (Conventional Commits) | - | Commit |
|
|
138
157
|
| `/dw-commit-all` | Commit across all submodules (inside-out) | - | Commits |
|
|
139
158
|
| `/dw-generate-pr` | Push + create PR + copy body + open URL | Target branch | PR on GitHub |
|
|
159
|
+
| `/dw-revert-task` | Safely revert a specific task's commits (dependency checks + confirmation) | PRD path + task number | Reverted commits + updated `tasks.md` |
|
|
160
|
+
|
|
161
|
+
### Architectural Decisions
|
|
162
|
+
|
|
163
|
+
| Command | What it does | Input | Output |
|
|
164
|
+
|---------|-------------|-------|--------|
|
|
165
|
+
| `/dw-adr` | Record an Architecture Decision Record (ADR) for a non-trivial decision during a PRD | PRD path + title | `.dw/spec/<prd>/adrs/adr-NNN.md` + cross-refs updated |
|
|
140
166
|
|
|
141
167
|
### Maintenance
|
|
142
168
|
|
|
@@ -145,8 +171,21 @@ This workspace uses an AI command system that automates the full development cyc
|
|
|
145
171
|
| `/dw-list-tasks` | Lists tasks and progress for a PRD | PRD path | Status table |
|
|
146
172
|
| `/dw-task-summary` | Shows details of a task without executing | Number + path | Task summary |
|
|
147
173
|
| `/dw-archive-prd` | Moves completed PRD to `.dw/archived/prd/` | PRD path | Archived PRD |
|
|
148
|
-
| `/dw-help` | This command guide | (optional) command | This document |
|
|
149
|
-
| `/dw-update` | Updates dev-workflow to the latest version on npm without leaving the agent | (none) | Updated managed files |
|
|
174
|
+
| `/dw-help` | This command guide (supports keyword lookup: `/dw-help bug`) | (optional) command or keyword | This document or filtered section |
|
|
175
|
+
| `/dw-update` | Updates dev-workflow to the latest version on npm without leaving the agent (supports `--rollback`) | (none) or `--rollback` | Updated or restored managed files |
|
|
176
|
+
|
|
177
|
+
### Bundled Skills (invoked internally — not commands)
|
|
178
|
+
|
|
179
|
+
Skills in `.agents/skills/` that commands above invoke transparently. You don't call them directly.
|
|
180
|
+
|
|
181
|
+
| Skill | Invoked by | Role |
|
|
182
|
+
|-------|------------|------|
|
|
183
|
+
| `dw-verify` | run-task, run-plan, fix-qa, bugfix, code-review, generate-pr, quick | Iron Law: no success claim without a PASS VERIFICATION REPORT |
|
|
184
|
+
| `dw-memory` | run-task, run-plan, autopilot, resume, revert-task | Two-tier workflow memory (shared + task-local) with promotion test |
|
|
185
|
+
| `dw-review-rigor` | code-review, review-implementation, refactoring-analysis | De-duplication, severity ordering, verify-intent-before-flag, signal-over-volume |
|
|
186
|
+
| `dw-council` | brainstorm `--council`, create-techspec `--council` | Multi-advisor debate (3-5 archetypes) with steel-manning, concession tracking, and dissent-preserving synthesis. Opt-in. |
|
|
187
|
+
|
|
188
|
+
Inspired by skills from the [Compozy](https://github.com/compozy/compozy) project (`cy-final-verify`, `cy-workflow-memory`, `cy-review-round`).
|
|
150
189
|
|
|
151
190
|
## Review Architecture (3 Levels)
|
|
152
191
|
|
|
@@ -13,6 +13,12 @@ You are a quick task executor. This command exists to implement one-off changes
|
|
|
13
13
|
## Pipeline Position
|
|
14
14
|
**Predecessor:** (user's ad-hoc need) | **Successor:** `/dw-commit` (automatic)
|
|
15
15
|
|
|
16
|
+
## Complementary Skills
|
|
17
|
+
|
|
18
|
+
| Skill | Trigger |
|
|
19
|
+
|-------|---------|
|
|
20
|
+
| `dw-verify` | **ALWAYS** — invoked before the commit. Even small changes require a VERIFICATION REPORT PASS (minimal test + lint) before the atomic commit. |
|
|
21
|
+
|
|
16
22
|
## Input Variables
|
|
17
23
|
|
|
18
24
|
| Variable | Description | Example |
|
|
@@ -27,7 +33,8 @@ You are a quick task executor. This command exists to implement one-off changes
|
|
|
27
33
|
4. Implement the change following project conventions
|
|
28
34
|
5. Run relevant existing tests (unit, integration)
|
|
29
35
|
6. Run lint if configured in the project
|
|
30
|
-
7.
|
|
36
|
+
7. Invoke `dw-verify` and include the VERIFICATION REPORT in the output before committing. Without PASS, DO NOT commit.
|
|
37
|
+
8. Create atomic semantic commit with the change
|
|
31
38
|
|
|
32
39
|
## GSD Integration
|
|
33
40
|
|
|
@@ -20,6 +20,7 @@ Prerequisite: Run `/dw-analyze-project` first to understand project patterns and
|
|
|
20
20
|
|
|
21
21
|
When available in the project under `./.agents/skills/`, use these skills as analytical support without replacing this command:
|
|
22
22
|
|
|
23
|
+
- `dw-review-rigor`: **ALWAYS** — when cataloging code smells, apply de-duplication (same smell in N files = 1 entry with affected list), severity ordering across P0-P3, signal-over-volume (max ~20 findings; keep criticals, prune marginal ones). A smell with a justifying ADR drops to `low` at most.
|
|
23
24
|
- `security-review`: defer security concerns to this skill — do not duplicate
|
|
24
25
|
- `vercel-react-best-practices`: defer React/Next.js performance patterns to this skill
|
|
25
26
|
|
|
@@ -11,6 +11,12 @@ You are a session continuity assistant. This command exists to restore context f
|
|
|
11
11
|
## Pipeline Position
|
|
12
12
|
**Predecessor:** (session start) | **Successor:** any dw-* command
|
|
13
13
|
|
|
14
|
+
## Complementary Skills
|
|
15
|
+
|
|
16
|
+
| Skill | Trigger |
|
|
17
|
+
|-------|---------|
|
|
18
|
+
| `dw-memory` | **ALWAYS** — for each active PRD identified, read `.dw/spec/<prd>/MEMORY.md` (shared) to reconstitute constraints, decisions, and handoff notes from the prior session. Include in the summary presented to the user. |
|
|
19
|
+
|
|
14
20
|
## Required Behavior
|
|
15
21
|
|
|
16
22
|
<critical>BEFORE any analysis, check for an interrupted autopilot. Look for `autopilot-state.json` in ALL directories inside `.dw/spec/`. If you find one without `"status": "completed"`, autopilot resumption takes PRIORITY over any other suggestion.</critical>
|
|
@@ -29,9 +35,10 @@ You are a session continuity assistant. This command exists to restore context f
|
|
|
29
35
|
1. Read `.dw/spec/` and identify PRDs with pending tasks (`- [ ]` checkboxes in tasks.md)
|
|
30
36
|
2. Read `git log --oneline -10` to identify the last work performed
|
|
31
37
|
3. Identify the active branch and whether there are uncommitted changes
|
|
32
|
-
4.
|
|
33
|
-
5.
|
|
34
|
-
6.
|
|
38
|
+
4. **Invoke `dw-memory`**: for the active PRD, read `.dw/spec/<prd>/MEMORY.md` and the next pending task's memory (`tasks/<N>_memory.md` if present). Extract durable decisions, cross-task constraints, and handoff notes.
|
|
39
|
+
5. Cross-reference: last active PRD, last completed task, next pending task, memory context
|
|
40
|
+
6. Present the summary in the format below (including a "From where we left off" bullet list based on memory)
|
|
41
|
+
7. Suggest the next command to execute
|
|
35
42
|
|
|
36
43
|
## GSD Integration
|
|
37
44
|
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You are a safe task reverter. Your job is to revert the commits of a specific task created by `/dw-run-task`, protecting against destructive revert if subsequent tasks depend on it.
|
|
3
|
+
|
|
4
|
+
<critical>This command is potentially destructive (it alters git history on the active branch). ALWAYS present the plan and ask for user confirmation BEFORE executing any `git revert`.</critical>
|
|
5
|
+
|
|
6
|
+
## When to Use
|
|
7
|
+
- Use to undo a specific task that was implemented and committed but needs to be reverted (requirement change, implementation error not caught by validation, decision reversed)
|
|
8
|
+
- Do NOT use to undo multiple tasks at once (revert one at a time)
|
|
9
|
+
- Do NOT use if the task has already been pushed to remote and merged into main (then a revert PR is required)
|
|
10
|
+
|
|
11
|
+
## Pipeline Position
|
|
12
|
+
**Predecessor:** `/dw-run-task` or `/dw-run-plan` that created the task commits | **Successor:** re-run the task or change the plan
|
|
13
|
+
|
|
14
|
+
## Input Variables
|
|
15
|
+
|
|
16
|
+
| Variable | Description | Example |
|
|
17
|
+
|----------|-------------|---------|
|
|
18
|
+
| `{{PRD_PATH}}` | Active PRD path | `.dw/spec/prd-my-feature` |
|
|
19
|
+
| `{{TASK_NUMBER}}` | Task number to revert | `3` (for task 3.0) |
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### 1. Identify task commits
|
|
24
|
+
|
|
25
|
+
- Read `{{PRD_PATH}}/tasks.md` and `{{PRD_PATH}}/{{TASK_NUMBER}}_task.md`
|
|
26
|
+
- Identify commits related to the task via:
|
|
27
|
+
- `git log --grep="task {{TASK_NUMBER}}"` or
|
|
28
|
+
- `git log --grep="Task {{TASK_NUMBER}}"` or
|
|
29
|
+
- Manual intersection: commits on the branch between the last commit of task {{TASK_NUMBER - 1}} and the marker commit of task {{TASK_NUMBER}} in tasks.md
|
|
30
|
+
- List hashes and messages to the user
|
|
31
|
+
|
|
32
|
+
### 2. Dependency Check (Required)
|
|
33
|
+
|
|
34
|
+
<critical>Before proposing the revert, check whether subsequent tasks depend on this task's artifacts.</critical>
|
|
35
|
+
|
|
36
|
+
- Read `tasks.md` and identify tasks with `{{TASK_NUMBER}}` in their `blockedBy` field or "Depends on" section
|
|
37
|
+
- For each dependent task:
|
|
38
|
+
- Check whether it has been executed (`- [x]` checkbox)
|
|
39
|
+
- If YES: reverting this task would cascade — STOP and present the conflict to the user
|
|
40
|
+
- If NO: OK, the pending task can be re-executed after the revert
|
|
41
|
+
|
|
42
|
+
### 3. Present Plan
|
|
43
|
+
|
|
44
|
+
Show the user:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
REVERT PLAN — Task {{TASK_NUMBER}}
|
|
48
|
+
|
|
49
|
+
Commits to revert (in reverse order):
|
|
50
|
+
- <hash_N> <message>
|
|
51
|
+
- <hash_N-1> <message>
|
|
52
|
+
...
|
|
53
|
+
|
|
54
|
+
Affected dependent tasks:
|
|
55
|
+
- Task X.Y (pending, can be re-executed after revert)
|
|
56
|
+
- [OR: ⚠️ Task X.Y already executed — conflict, STOP]
|
|
57
|
+
|
|
58
|
+
Artifacts to update after revert:
|
|
59
|
+
- {{PRD_PATH}}/tasks.md (re-mark task {{TASK_NUMBER}} as pending)
|
|
60
|
+
- {{PRD_PATH}}/tasks/{{TASK_NUMBER}}_memory.md (add "reverted on YYYY-MM-DD" note)
|
|
61
|
+
|
|
62
|
+
Proceed? [y/N]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Wait for explicit confirmation.
|
|
66
|
+
|
|
67
|
+
### 4. Execute Revert
|
|
68
|
+
|
|
69
|
+
Only after `y`/`yes`:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# For each commit, in reverse order:
|
|
73
|
+
git revert --no-edit <hash>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If conflicts occur during revert: STOP, report conflicts, and wait for the user to resolve manually. DO NOT force.
|
|
77
|
+
|
|
78
|
+
### 5. Update Artifacts
|
|
79
|
+
|
|
80
|
+
After a successful revert:
|
|
81
|
+
- In `tasks.md`: change `- [x]` to `- [ ]` on task {{TASK_NUMBER}}'s line
|
|
82
|
+
- In `tasks/{{TASK_NUMBER}}_memory.md`: append:
|
|
83
|
+
```
|
|
84
|
+
## Revert on YYYY-MM-DD
|
|
85
|
+
- Reason: [fill with the user-provided reason]
|
|
86
|
+
- Reverted commits: [hashes]
|
|
87
|
+
```
|
|
88
|
+
- Invoke `dw-memory` to promote the note to `MEMORY.md` if it's cross-task relevant
|
|
89
|
+
|
|
90
|
+
### 6. Report
|
|
91
|
+
|
|
92
|
+
- List of reverted commits (and the revert commits created)
|
|
93
|
+
- Status of updated artifacts
|
|
94
|
+
- Suggested next step (`/dw-run-task {{TASK_NUMBER}}` to re-run, or `/dw-create-tasks` if scope changed)
|
|
95
|
+
|
|
96
|
+
## Required Behavior
|
|
97
|
+
|
|
98
|
+
<critical>NEVER use `git reset --hard` or `git rebase -i` as an alternative to revert. Revert preserves history and is safe on shared branches.</critical>
|
|
99
|
+
|
|
100
|
+
<critical>NEVER force the revert if dependent tasks have already been executed. In that case, present the conflict and ask for user decision (also revert dependents, or cancel).</critical>
|
|
101
|
+
|
|
102
|
+
<critical>NEVER proceed without explicit `y`/`yes` confirmation from the user.</critical>
|
|
103
|
+
|
|
104
|
+
## Complementary Skills
|
|
105
|
+
|
|
106
|
+
| Skill | Trigger |
|
|
107
|
+
|-------|---------|
|
|
108
|
+
| `dw-memory` | **ALWAYS** — when updating the task memory with the revert note, apply the promotion test to decide whether it goes into shared `MEMORY.md` |
|
|
109
|
+
|
|
110
|
+
## Inspired by
|
|
111
|
+
|
|
112
|
+
Compozy has no analogous command. This is a dev-workflow-native pattern, motivated by a gap identified during analysis: "if a task fails or needs to be reverted after commit, there is no safe mechanism to revert only that task."
|
|
113
|
+
|
|
114
|
+
</system_instructions>
|