@brunosps00/dev-workflow 0.15.0 → 1.0.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 +97 -119
- package/lib/constants.js +16 -36
- package/lib/migrate-skills.js +11 -4
- package/lib/removed-commands.js +30 -0
- package/package.json +1 -1
- package/scaffold/en/agent-instructions.md +27 -16
- package/scaffold/en/commands/dw-adr.md +2 -2
- package/scaffold/en/commands/dw-analyze-project.md +7 -7
- package/scaffold/en/commands/dw-autopilot.md +20 -20
- package/scaffold/en/commands/dw-brainstorm.md +160 -9
- package/scaffold/en/commands/dw-bugfix.md +5 -5
- package/scaffold/en/commands/dw-commit.md +1 -1
- package/scaffold/en/commands/dw-dockerize.md +9 -9
- package/scaffold/en/commands/dw-find-skills.md +4 -4
- package/scaffold/en/commands/dw-functional-doc.md +1 -1
- package/scaffold/en/commands/dw-generate-pr.md +4 -4
- package/scaffold/en/commands/dw-help.md +95 -351
- package/scaffold/en/commands/dw-intel.md +76 -12
- package/scaffold/en/commands/dw-new-project.md +9 -9
- package/scaffold/en/commands/dw-plan.md +175 -0
- package/scaffold/en/commands/dw-qa.md +166 -0
- package/scaffold/en/commands/dw-redesign-ui.md +6 -6
- package/scaffold/en/commands/dw-review.md +198 -0
- package/scaffold/en/commands/dw-run.md +176 -0
- package/scaffold/en/commands/dw-secure-audit.md +222 -0
- package/scaffold/en/commands/dw-update.md +1 -1
- package/scaffold/en/references/playwright-patterns.md +1 -1
- package/scaffold/en/references/refactoring-catalog.md +1 -1
- package/scaffold/en/templates/brainstorm-matrix.md +1 -1
- package/scaffold/en/templates/idea-onepager.md +3 -3
- package/scaffold/en/templates/project-onepager.md +5 -5
- package/scaffold/pt-br/agent-instructions.md +27 -16
- package/scaffold/pt-br/commands/dw-adr.md +2 -2
- package/scaffold/pt-br/commands/dw-analyze-project.md +7 -7
- package/scaffold/pt-br/commands/dw-autopilot.md +20 -20
- package/scaffold/pt-br/commands/dw-brainstorm.md +160 -9
- package/scaffold/pt-br/commands/dw-bugfix.md +8 -8
- package/scaffold/pt-br/commands/dw-commit.md +1 -1
- package/scaffold/pt-br/commands/dw-dockerize.md +9 -9
- package/scaffold/pt-br/commands/dw-find-skills.md +4 -4
- package/scaffold/pt-br/commands/dw-functional-doc.md +1 -1
- package/scaffold/pt-br/commands/dw-generate-pr.md +4 -4
- package/scaffold/pt-br/commands/dw-help.md +97 -300
- package/scaffold/pt-br/commands/dw-intel.md +77 -13
- package/scaffold/pt-br/commands/dw-new-project.md +9 -9
- package/scaffold/pt-br/commands/dw-plan.md +175 -0
- package/scaffold/pt-br/commands/dw-qa.md +166 -0
- package/scaffold/pt-br/commands/dw-redesign-ui.md +6 -6
- package/scaffold/pt-br/commands/dw-review.md +198 -0
- package/scaffold/pt-br/commands/dw-run.md +176 -0
- package/scaffold/pt-br/commands/dw-secure-audit.md +222 -0
- package/scaffold/pt-br/commands/dw-update.md +1 -1
- package/scaffold/pt-br/references/playwright-patterns.md +1 -1
- package/scaffold/pt-br/references/refactoring-catalog.md +1 -1
- package/scaffold/pt-br/templates/brainstorm-matrix.md +1 -1
- package/scaffold/pt-br/templates/idea-onepager.md +3 -3
- package/scaffold/pt-br/templates/project-onepager.md +5 -5
- package/scaffold/pt-br/templates/tasks-template.md +1 -1
- package/scaffold/skills/api-testing-recipes/SKILL.md +6 -6
- package/scaffold/skills/api-testing-recipes/references/auth-patterns.md +1 -1
- package/scaffold/skills/api-testing-recipes/references/matrix-conventions.md +1 -1
- package/scaffold/skills/api-testing-recipes/references/openapi-driven.md +3 -3
- package/scaffold/skills/docker-compose-recipes/SKILL.md +1 -1
- package/scaffold/skills/dw-codebase-intel/SKILL.md +9 -9
- package/scaffold/skills/dw-codebase-intel/agents/intel-updater.md +4 -4
- package/scaffold/skills/dw-codebase-intel/references/api-design-discipline.md +1 -1
- package/scaffold/skills/dw-codebase-intel/references/incremental-update.md +5 -5
- package/scaffold/skills/dw-codebase-intel/references/intel-format.md +1 -1
- package/scaffold/skills/dw-codebase-intel/references/query-patterns.md +3 -3
- package/scaffold/skills/dw-council/SKILL.md +2 -2
- package/scaffold/skills/dw-debug-protocol/SKILL.md +5 -3
- package/scaffold/skills/dw-execute-phase/SKILL.md +16 -16
- package/scaffold/skills/dw-execute-phase/agents/executor.md +5 -5
- package/scaffold/skills/dw-execute-phase/agents/plan-checker.md +4 -4
- package/scaffold/skills/dw-execute-phase/references/atomic-commits.md +1 -1
- package/scaffold/skills/dw-execute-phase/references/plan-verification.md +2 -2
- package/scaffold/skills/dw-execute-phase/references/wave-coordination.md +1 -1
- package/scaffold/skills/dw-git-discipline/SKILL.md +5 -2
- package/scaffold/skills/dw-incident-response/SKILL.md +5 -1
- package/scaffold/skills/dw-llm-eval/SKILL.md +10 -8
- package/scaffold/skills/dw-memory/SKILL.md +2 -2
- package/scaffold/skills/dw-review-rigor/SKILL.md +5 -5
- package/scaffold/skills/dw-simplification/SKILL.md +4 -4
- package/scaffold/skills/dw-source-grounding/SKILL.md +1 -1
- package/scaffold/skills/dw-testing-discipline/SKILL.md +8 -6
- package/scaffold/skills/dw-testing-discipline/references/agent-guardrails.md +3 -3
- package/scaffold/skills/dw-testing-discipline/references/anti-patterns.md +2 -2
- package/scaffold/skills/dw-testing-discipline/references/core-rules.md +1 -1
- package/scaffold/skills/dw-testing-discipline/references/flaky-discipline.md +3 -3
- package/scaffold/skills/dw-testing-discipline/references/patterns.md +1 -1
- package/scaffold/skills/dw-testing-discipline/references/playwright-recipes.md +1 -1
- package/scaffold/skills/dw-ui-discipline/SKILL.md +8 -6
- package/scaffold/skills/dw-ui-discipline/references/accessibility-floor.md +2 -2
- package/scaffold/skills/dw-ui-discipline/references/hard-gate.md +1 -1
- package/scaffold/skills/dw-ui-discipline/references/state-matrix.md +1 -1
- package/scaffold/skills/dw-ui-discipline/references/visual-slop.md +2 -2
- package/scaffold/skills/dw-verify/SKILL.md +4 -4
- package/scaffold/skills/humanizer/SKILL.md +1 -7
- package/scaffold/skills/remotion-best-practices/SKILL.md +3 -1
- package/scaffold/skills/security-review/SKILL.md +1 -1
- package/scaffold/skills/security-review/languages/csharp.md +1 -1
- package/scaffold/skills/security-review/languages/rust.md +1 -1
- package/scaffold/skills/security-review/languages/typescript.md +1 -1
- package/scaffold/skills/vercel-react-best-practices/SKILL.md +3 -1
- package/scaffold/templates-overrides-readme.md +3 -3
- package/scaffold/en/commands/dw-code-review.md +0 -386
- package/scaffold/en/commands/dw-create-prd.md +0 -148
- package/scaffold/en/commands/dw-create-tasks.md +0 -201
- package/scaffold/en/commands/dw-create-techspec.md +0 -210
- package/scaffold/en/commands/dw-deep-research.md +0 -418
- package/scaffold/en/commands/dw-deps-audit.md +0 -327
- package/scaffold/en/commands/dw-fix-qa.md +0 -152
- package/scaffold/en/commands/dw-map-codebase.md +0 -125
- package/scaffold/en/commands/dw-refactoring-analysis.md +0 -340
- package/scaffold/en/commands/dw-revert-task.md +0 -114
- package/scaffold/en/commands/dw-review-implementation.md +0 -349
- package/scaffold/en/commands/dw-run-plan.md +0 -300
- package/scaffold/en/commands/dw-run-qa.md +0 -497
- package/scaffold/en/commands/dw-run-task.md +0 -209
- package/scaffold/en/commands/dw-security-check.md +0 -271
- package/scaffold/pt-br/commands/dw-code-review.md +0 -366
- package/scaffold/pt-br/commands/dw-create-prd.md +0 -148
- package/scaffold/pt-br/commands/dw-create-tasks.md +0 -201
- package/scaffold/pt-br/commands/dw-create-techspec.md +0 -208
- package/scaffold/pt-br/commands/dw-deep-research.md +0 -172
- package/scaffold/pt-br/commands/dw-deps-audit.md +0 -327
- package/scaffold/pt-br/commands/dw-fix-qa.md +0 -152
- package/scaffold/pt-br/commands/dw-map-codebase.md +0 -125
- package/scaffold/pt-br/commands/dw-refactoring-analysis.md +0 -340
- package/scaffold/pt-br/commands/dw-revert-task.md +0 -114
- package/scaffold/pt-br/commands/dw-review-implementation.md +0 -337
- package/scaffold/pt-br/commands/dw-run-plan.md +0 -296
- package/scaffold/pt-br/commands/dw-run-qa.md +0 -495
- package/scaffold/pt-br/commands/dw-run-task.md +0 -208
- package/scaffold/pt-br/commands/dw-security-check.md +0 -271
|
@@ -1,391 +1,135 @@
|
|
|
1
1
|
<system_instructions>
|
|
2
|
-
You are
|
|
2
|
+
You are the dev-workflow guide. Display the primary command surface, the typical flow, and contextual shortcuts. Default mode shows 15 visible commands; `--advanced` reveals 5 internal/hidden commands.
|
|
3
3
|
|
|
4
4
|
## When to Use
|
|
5
|
-
-
|
|
6
|
-
-
|
|
5
|
+
- User types `/dw-help` to discover commands.
|
|
6
|
+
- User types `/dw-help <keyword>` to find a contextual shortcut.
|
|
7
|
+
- User types `/dw-help --advanced` to see internal/hidden commands.
|
|
7
8
|
|
|
8
|
-
##
|
|
9
|
-
**Predecessor:** (any command or user question) | **Successor:** (any command)
|
|
9
|
+
## Default mode — primary surface
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Display the following (or its pt-br equivalent when invoked from pt-br):
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
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.
|
|
13
|
+
```markdown
|
|
14
|
+
# dev-workflow — Primary Commands
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
Use `/dw-autopilot "wish"` as the gateway for most feature work. The granular commands below give you control when you want it.
|
|
18
17
|
|
|
19
|
-
|
|
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
|
-
| debate, council, stress-test, opinions | `/dw-brainstorm --council` or `/dw-create-techspec --council` | Invokes `dw-council` for a multi-advisor debate |
|
|
27
|
-
| security, vulnerability, owasp, trivy, cve | `/dw-security-check` | Rigid multi-layer check (OWASP static + Trivy SCA/IaC + native audit) for TS/Python/C#/Rust |
|
|
28
|
-
| supply chain, outdated, compromised, malicious package, deps update, package upgrade, npm audit, pip-audit | `/dw-deps-audit` | Detect + classify + per-package update plan with scoped QA. Goes beyond `/dw-security-check` by adding remediation. |
|
|
29
|
-
| skill, find skill, install skill, ecosystem, capability, extend agent | `/dw-find-skills` | Discover skills from skills.sh / `npx skills` and install them globally or locally |
|
|
30
|
-
| new project, scaffold, bootstrap, start, kickoff, init project, fullstack, monorepo | `/dw-new-project` | Stack interview + create-* tools + docker-compose for dev. Runs after `npx dev-workflow init`. |
|
|
31
|
-
| dockerize, docker, dockerfile, compose, container, prod image, multi-stage | `/dw-dockerize` | Reads existing project, brainstorms base image, generates Dockerfile + docker-compose for dev/prod/both, or audits existing artifacts. |
|
|
32
|
-
| refine, refinement, idea, one-pager | `/dw-brainstorm --onepager` | Idea refinement with Product Inventory + classification (IMPROVES/CONSOLIDATES/NEW) + durable one-pager |
|
|
33
|
-
| revert, rollback task | `/dw-revert-task` | Safe revert with dependency checks |
|
|
34
|
-
| research | `/dw-deep-research` | Multi-source research with citations |
|
|
35
|
-
| idea, brainstorm | `/dw-brainstorm` | Structured ideation with trade-offs |
|
|
36
|
-
| update dev-workflow | `/dw-update` | Update to latest npm version |
|
|
18
|
+
## Tier 1 — Gateway (3)
|
|
37
19
|
|
|
38
|
-
|
|
20
|
+
| Command | When |
|
|
21
|
+
|---------|------|
|
|
22
|
+
| `/dw-autopilot "wish"` | Default entry point. PRD → TechSpec → Tasks → Run → QA → Review → Commit → PR. Three approval gates. |
|
|
23
|
+
| `/dw-bugfix "description"` | A bug or error report. Surgical fix or PRD route. |
|
|
24
|
+
| `/dw-help [keyword]` | This screen. Pass a keyword for shortcuts. `--advanced` reveals internal commands. |
|
|
39
25
|
|
|
40
|
-
|
|
26
|
+
## Tier 2 — Pipeline granular (7)
|
|
41
27
|
|
|
42
|
-
|
|
28
|
+
| Command | What |
|
|
29
|
+
|---------|------|
|
|
30
|
+
| `/dw-brainstorm "idea"` | Refine an idea before PRD. Flags: `--onepager`, `--council`, `--research`, `--refactor`. |
|
|
31
|
+
| `/dw-plan "feature"` | PRD → TechSpec → Tasks sequentially with checkpoints. Stages: `prd`, `techspec`, `tasks`. |
|
|
32
|
+
| `/dw-run [task-id]` | Execute all pending tasks or a single one. Flag `--resume`. |
|
|
33
|
+
| `/dw-review` | Level 2 (PRD coverage) + Level 3 (code quality). Flags: `--coverage-only`, `--code-only`. |
|
|
34
|
+
| `/dw-qa` | Mode-aware QA (UI / API auto-detect). Flags: `--fix`, `--api`, `--ai`. |
|
|
35
|
+
| `/dw-commit` | Atomic Conventional Commits for pending work. |
|
|
36
|
+
| `/dw-generate-pr [target]` | Push branch, draft PR body, open browser. |
|
|
43
37
|
|
|
44
|
-
|
|
38
|
+
## Tier 3 — Specialty (5)
|
|
45
39
|
|
|
46
|
-
|
|
40
|
+
| Command | What |
|
|
41
|
+
|---------|------|
|
|
42
|
+
| `/dw-analyze-project` | Scan the repo, write `.dw/rules/` + offer to generate `.dw/constitution.md`. |
|
|
43
|
+
| `/dw-redesign-ui "target"` | Audit, propose 2-3 design directions, ship. Enforces UI grounding + WCAG. |
|
|
44
|
+
| `/dw-functional-doc` | Map screens + flows into a functional doc validated with Playwright. |
|
|
45
|
+
| `/dw-new-project` | Interview-driven bootstrap (stack + infra + docker-compose + CI). |
|
|
46
|
+
| `/dw-dockerize` | Detect stack, propose Dockerfile + docker-compose for dev/prod. |
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
┌──────────────┐ ┌─────────────────┐ ┌───────────────┐
|
|
50
|
-
│ /dw-create-prd │────>│/dw-create-techspec │────>│ /dw-create-tasks │
|
|
51
|
-
│ (WHAT) │ │ (HOW) │ │ (WHEN) │
|
|
52
|
-
└──────────────┘ └─────────────────┘ └───────┬───────┘
|
|
53
|
-
│
|
|
54
|
-
┌─────────────┴─────────────┐
|
|
55
|
-
▼ ▼
|
|
56
|
-
┌────────────────┐ ┌─────────────────┐
|
|
57
|
-
│ /dw-run-task │ │ /dw-run-plan │
|
|
58
|
-
│ (one at a time)│ │ (all auto) │
|
|
59
|
-
└───────┬────────┘ └────────┬────────┘
|
|
60
|
-
│ │
|
|
61
|
-
┌───────┴───────┐ │
|
|
62
|
-
▼ │ │
|
|
63
|
-
┌──────────────────┐ │ │
|
|
64
|
-
│/dw-functional-doc│ │ │
|
|
65
|
-
│ (map screens & │ │ │
|
|
66
|
-
│ flows) │ │ │
|
|
67
|
-
└───────┬──────────┘ │ │
|
|
68
|
-
└───────┬─────────┘ │
|
|
69
|
-
│ │
|
|
70
|
-
└─────────┬─────────────────┘
|
|
71
|
-
│
|
|
72
|
-
▼
|
|
73
|
-
┌─────────────────┐
|
|
74
|
-
│ Validation Lv 1 │ (automatic, embedded)
|
|
75
|
-
│ criteria+tests │
|
|
76
|
-
└────────┬────────┘
|
|
77
|
-
│
|
|
78
|
-
┌──────────────┼──────────────┐
|
|
79
|
-
▼ ▼ ▼
|
|
80
|
-
┌──────────────┐ ┌──────────────┐ ┌─────────────────────┐
|
|
81
|
-
│ /dw-run-qa │ │/review-impl. │ │ /dw-code-review │
|
|
82
|
-
│ (visual QA) │ │(PRD compliance│ │ (formal code review)│
|
|
83
|
-
└──────────────┘ │ Level 2) │ │ (Level 3) │
|
|
84
|
-
└──────────────┘ └─────────────────────┘
|
|
85
|
-
│
|
|
86
|
-
┌───────────────┴───────────────┐
|
|
87
|
-
▼ ▼
|
|
88
|
-
┌──────────────┐ ┌────────────────┐
|
|
89
|
-
│ /dw-commit │ │ /dw-commit-all │
|
|
90
|
-
│ (one project)│ │ (submodules) │
|
|
91
|
-
└──────┬───────┘ └───────┬────────┘
|
|
92
|
-
│ │
|
|
93
|
-
└────────────┬────────────────────┘
|
|
94
|
-
▼
|
|
95
|
-
┌──────────────────┐
|
|
96
|
-
│ /dw-generate-pr │
|
|
97
|
-
│ (push + PR + URL)│
|
|
98
|
-
└──────────────────┘
|
|
99
|
-
│
|
|
100
|
-
▼
|
|
101
|
-
┌──────────────────┐
|
|
102
|
-
│ /dw-archive-prd │
|
|
103
|
-
│ (post-merge) │
|
|
104
|
-
└──────────────────┘
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
## Command Table
|
|
108
|
-
|
|
109
|
-
### Planning
|
|
110
|
-
|
|
111
|
-
| Command | What it does | Input | Output |
|
|
112
|
-
|---------|-------------|-------|--------|
|
|
113
|
-
| `/dw-brainstorm` | Facilitates structured ideation before PRD or implementation | Problem, idea, or context | Options + trade-offs + recommendation |
|
|
114
|
-
| `/dw-create-prd` | Creates PRD with min. 7 clarification questions | Feature description | `.dw/spec/prd-[name]/prd.md` |
|
|
115
|
-
| `/dw-create-techspec` | Creates technical specification from the PRD | PRD path | `.dw/spec/prd-[name]/techspec.md` |
|
|
116
|
-
| `/dw-create-tasks` | Breaks PRD+TechSpec into tasks (max 2 FRs/task) | PRD path | `.dw/spec/prd-[name]/tasks.md` + `*_task.md` |
|
|
117
|
-
|
|
118
|
-
### Execution
|
|
119
|
-
|
|
120
|
-
| Command | What it does | Input | Output |
|
|
121
|
-
|---------|-------------|-------|--------|
|
|
122
|
-
| `/dw-run-task` | Implements ONE task + Level 1 validation + commit | PRD path | Code + commit |
|
|
123
|
-
| `/dw-run-plan` | Executes ALL tasks + final Level 2 review | PRD path | Code + commits + report |
|
|
124
|
-
| `/dw-bugfix` | Analyzes and fixes bugs (bug vs feature triage) | Target + description | Fix + commit OR PRD (if feature) |
|
|
125
|
-
| `/dw-fix-qa` | Fixes documented QA bugs and retests with evidence | PRD path | Code + `QA/bugs.md` + `QA/qa-report.md` updated |
|
|
126
|
-
| `/dw-redesign-ui` | Audits, proposes, and implements visual redesign of pages/components | Target page/component | Redesign brief + code |
|
|
127
|
-
| `/dw-autopilot` | Full pipeline orchestrator: from a wish to a PR with minimal intervention | Wish description | PRD + code + commits + PR |
|
|
128
|
-
|
|
129
|
-
### Research
|
|
130
|
-
|
|
131
|
-
| Command | What it does | Input | Output |
|
|
132
|
-
|---------|-------------|-------|--------|
|
|
133
|
-
| `/dw-analyze-project` | Analyzes project structure and generates documentation | Project path | Architecture overview |
|
|
134
|
-
| `/dw-deep-research` | Multi-source research with citation tracking and verification | Topic or question | Research report with bibliography |
|
|
135
|
-
| `/dw-functional-doc` | Maps screens, flows, and modules into a functional dossier with E2E coverage | Target URL/route + project | `.dw/flows/<project>/<slug>/` with docs, scripts, evidence |
|
|
136
|
-
|
|
137
|
-
### Quality (3 Levels)
|
|
138
|
-
|
|
139
|
-
| Level | Command | When | Generates Report? |
|
|
140
|
-
|-------|---------|------|-------------------|
|
|
141
|
-
| **1** | *(embedded in /dw-run-task)* | After each task | No (terminal output) |
|
|
142
|
-
| **2** | `/dw-review-implementation` | After all tasks / manual | Yes (formatted output) |
|
|
143
|
-
| **3** | `/dw-code-review` | Before PR / manual | Yes (`code-review.md`) |
|
|
144
|
-
|
|
145
|
-
| Command | What it does | Input | Output |
|
|
146
|
-
|---------|-------------|-------|--------|
|
|
147
|
-
| `/dw-run-qa` | Visual QA with Playwright MCP + accessibility | PRD path | `QA/qa-report.md` + `QA/screenshots/` + `QA/logs/` |
|
|
148
|
-
| `/dw-review-implementation` | Compares PRD vs code (FRs, endpoints, tasks) | PRD path | Gap report |
|
|
149
|
-
| `/dw-code-review` | Formal code review (quality, rules, tests) | PRD path | `code-review.md` |
|
|
150
|
-
| `/dw-refactoring-analysis` | Audit code smells and refactoring opportunities (Fowler's catalog) | PRD path | `refactoring-analysis.md` |
|
|
151
|
-
| `/dw-security-check` | Rigid security check (OWASP static + Trivy SCA/IaC + native audit) for TS/Python/C#/Rust | PRD path or code | `security-check.md` |
|
|
152
|
-
|
|
153
|
-
### Versioning
|
|
154
|
-
|
|
155
|
-
| Command | What it does | Input | Output |
|
|
156
|
-
|---------|-------------|-------|--------|
|
|
157
|
-
| `/dw-commit` | Semantic commit (Conventional Commits) | - | Commit |
|
|
158
|
-
| `/dw-commit-all` | Commit across all submodules (inside-out) | - | Commits |
|
|
159
|
-
| `/dw-generate-pr` | Push + create PR + copy body + open URL | Target branch | PR on GitHub |
|
|
160
|
-
| `/dw-revert-task` | Safely revert a specific task's commits (dependency checks + confirmation) | PRD path + task number | Reverted commits + updated `tasks.md` |
|
|
161
|
-
|
|
162
|
-
### Internal commands (used by other dw-* commands; rarely invoked directly)
|
|
163
|
-
|
|
164
|
-
| Command | What it does | Typically invoked by |
|
|
165
|
-
|---------|-------------|----------------------|
|
|
166
|
-
| `/dw-adr` | Record an Architecture Decision Record during PRD execution | `/dw-create-techspec`, `/dw-run-task` when a non-trivial decision arises |
|
|
167
|
-
| `/dw-intel` | Query the codebase index built in `.dw/intel/` | `/dw-create-prd`, `/dw-create-techspec`, `/dw-code-review`, etc. |
|
|
168
|
-
| `/dw-map-codebase` | Build/refresh the queryable codebase index in `.dw/intel/` | `/dw-analyze-project` (auto-runs after rules generation) |
|
|
169
|
-
|
|
170
|
-
These are exposed as slash commands for occasional manual use (e.g., quickly recording an ADR mid-session, ad-hoc codebase queries) but most users never invoke them directly — they're called by the higher-level commands above.
|
|
171
|
-
|
|
172
|
-
### Maintenance
|
|
173
|
-
|
|
174
|
-
| Command | What it does | Input | Output |
|
|
175
|
-
|---------|-------------|-------|--------|
|
|
176
|
-
| `/dw-list-tasks` | Lists tasks and progress for a PRD | PRD path | Status table |
|
|
177
|
-
| `/dw-task-summary` | Shows details of a task without executing | Number + path | Task summary |
|
|
178
|
-
| `/dw-archive-prd` | Moves completed PRD to `.dw/archived/prd/` | PRD path | Archived PRD |
|
|
179
|
-
| `/dw-help` | This command guide (supports keyword lookup: `/dw-help bug`) | (optional) command or keyword | This document or filtered section |
|
|
180
|
-
| `/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 |
|
|
48
|
+
## Workflow at a glance
|
|
181
49
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
Skills in `.agents/skills/` that commands above invoke transparently. You don't call them directly.
|
|
185
|
-
|
|
186
|
-
| Skill | Invoked by | Role |
|
|
187
|
-
|-------|------------|------|
|
|
188
|
-
| `dw-verify` | run-task, run-plan, fix-qa, bugfix, code-review, generate-pr, quick | core rule: no success claim without a PASS VERIFICATION REPORT |
|
|
189
|
-
| `dw-memory` | run-task, run-plan, autopilot, resume, revert-task | Two-tier workflow memory (shared + task-local) with promotion test |
|
|
190
|
-
| `dw-review-rigor` | code-review, review-implementation, refactoring-analysis | De-duplication, severity ordering, verify-intent-before-flag, signal-over-volume |
|
|
191
|
-
| `dw-council` | brainstorm `--council`, create-techspec `--council` | Multi-advisor debate (3-5 archetypes) with steel-manning, concession tracking, and dissent-preserving synthesis. Opt-in. |
|
|
192
|
-
|
|
193
|
-
Inspired by skills from the [Compozy](https://github.com/compozy/compozy) project (`cy-final-verify`, `cy-workflow-memory`, `cy-review-round`).
|
|
194
|
-
|
|
195
|
-
## Review Architecture (3 Levels)
|
|
50
|
+
`/dw-autopilot "wish"` runs the full pipeline (PRD → ... → PR) with 3 gates. Step-by-step:
|
|
196
51
|
|
|
197
52
|
```
|
|
198
|
-
|
|
199
|
-
├── Embedded in /dw-run-task
|
|
200
|
-
├── Verifies task acceptance criteria
|
|
201
|
-
├── Runs tests (pnpm test / npm test)
|
|
202
|
-
├── Checks basic patterns (types, imports)
|
|
203
|
-
├── No report file
|
|
204
|
-
└── If fails: PAUSES execution
|
|
205
|
-
|
|
206
|
-
LEVEL 2 - PRD Compliance (/dw-review-implementation)
|
|
207
|
-
├── Compares ALL FRs from PRD vs actual code
|
|
208
|
-
├── Verifies ALL endpoints from TechSpec
|
|
209
|
-
├── Checks real status of each task (ignores checkboxes)
|
|
210
|
-
├── Identifies gaps, partial implementations, extra code
|
|
211
|
-
├── Called automatically at end of /dw-run-plan
|
|
212
|
-
└── Available manually
|
|
213
|
-
|
|
214
|
-
LEVEL 3 - Formal Code Review (/dw-code-review)
|
|
215
|
-
├── Everything from Level 2 +
|
|
216
|
-
├── Quality analysis (SOLID, DRY, complexity, security)
|
|
217
|
-
├── Conformance with project rules (.dw/rules/)
|
|
218
|
-
├── Tests with coverage
|
|
219
|
-
├── Generates code-review.md in PRD directory
|
|
220
|
-
└── Status: APPROVED / WITH CAVEATS / REJECTED
|
|
53
|
+
/dw-brainstorm → /dw-plan → /dw-run → /dw-qa → /dw-review → /dw-commit → /dw-generate-pr
|
|
221
54
|
```
|
|
222
55
|
|
|
223
|
-
##
|
|
224
|
-
|
|
225
|
-
### New Feature (Full)
|
|
226
|
-
```bash
|
|
227
|
-
/dw-brainstorm "initial idea" # 0. Explore options and trade-offs
|
|
228
|
-
/dw-create-prd # 1. Describe the feature
|
|
229
|
-
/dw-create-techspec .dw/spec/prd-name # 2. Generate tech spec
|
|
230
|
-
/dw-create-tasks .dw/spec/prd-name # 3. Break into tasks
|
|
231
|
-
/dw-run-plan .dw/spec/prd-name # 4. Execute all (includes Level 1+2)
|
|
232
|
-
/dw-refactoring-analysis .dw/spec/prd-name # 5. Audit code smells (optional)
|
|
233
|
-
/dw-code-review .dw/spec/prd-name # 6. Formal code review (Level 3)
|
|
234
|
-
/dw-generate-pr main # 7. Create PR
|
|
235
|
-
/dw-archive-prd .dw/spec/prd-name # 8. After merge
|
|
236
|
-
```
|
|
56
|
+
## Advanced / internal commands
|
|
237
57
|
|
|
238
|
-
|
|
239
|
-
```bash
|
|
240
|
-
/dw-brainstorm "initial idea" # 0. Explore options and trade-offs
|
|
241
|
-
/dw-create-prd # 1. PRD
|
|
242
|
-
/dw-create-techspec .dw/spec/prd-name # 2. TechSpec
|
|
243
|
-
/dw-create-tasks .dw/spec/prd-name # 3. Tasks
|
|
244
|
-
/dw-run-task .dw/spec/prd-name # 4. Task 1 (with Level 1)
|
|
245
|
-
/dw-run-task .dw/spec/prd-name # 5. Task 2 (with Level 1)
|
|
246
|
-
# ... repeat for each task
|
|
247
|
-
/dw-review-implementation .dw/spec/prd-name # 6. PRD review (Level 2)
|
|
248
|
-
/dw-code-review .dw/spec/prd-name # 7. Code review (Level 3)
|
|
249
|
-
/dw-generate-pr main # 8. PR
|
|
58
|
+
Pass `--advanced` to `/dw-help` to see internal commands (`dw-adr`, `dw-intel`, `dw-secure-audit`, `dw-find-skills`, `dw-update`) that are usually invoked by other commands.
|
|
250
59
|
```
|
|
251
60
|
|
|
252
|
-
|
|
253
|
-
```bash
|
|
254
|
-
/dw-bugfix "bug description" # Analyze and fix
|
|
255
|
-
/dw-commit # Commit the fix
|
|
256
|
-
/dw-generate-pr main # PR
|
|
257
|
-
```
|
|
61
|
+
## Advanced mode — `--advanced` flag
|
|
258
62
|
|
|
259
|
-
|
|
260
|
-
```bash
|
|
261
|
-
/dw-bugfix "description" --analysis # Generate analysis document
|
|
262
|
-
/dw-create-techspec .dw/spec/dw-bugfix-name # TechSpec for the fix
|
|
263
|
-
/dw-create-tasks .dw/spec/dw-bugfix-name # Tasks for the fix
|
|
264
|
-
/dw-run-plan .dw/spec/dw-bugfix-name # Execute all
|
|
265
|
-
/dw-generate-pr main # PR
|
|
266
|
-
```
|
|
63
|
+
When invoked with `--advanced`, ALSO show:
|
|
267
64
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
/dw-run-qa .dw/spec/prd-name # QA with Playwright MCP
|
|
271
|
-
# If bugs found:
|
|
272
|
-
/dw-bugfix "description" # Fix each bug
|
|
273
|
-
/dw-fix-qa .dw/spec/prd-name # Fix + retest full cycle
|
|
274
|
-
```
|
|
65
|
+
```markdown
|
|
66
|
+
# dev-workflow — Advanced / Internal Commands
|
|
275
67
|
|
|
276
|
-
|
|
277
|
-
```bash
|
|
278
|
-
/dw-analyze-project # 0. Understand project patterns
|
|
279
|
-
/dw-redesign-ui "target page or component" # 1. Audit + propose + implement
|
|
280
|
-
/dw-run-qa .dw/spec/prd-name # 2. Visual QA (optional)
|
|
281
|
-
/dw-code-review .dw/spec/prd-name # 3. Code review
|
|
282
|
-
/dw-commit # 4. Commit
|
|
283
|
-
/dw-generate-pr main # 5. PR
|
|
284
|
-
```
|
|
68
|
+
These are auto-invoked by primary commands but available standalone.
|
|
285
69
|
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
/dw-autopilot "description of what you want to build" # Research → PRD → Tasks → Code → QA → PR
|
|
289
|
-
```
|
|
70
|
+
## Tier 4 — Hidden (5)
|
|
290
71
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
72
|
+
| Command | What | Invoked by |
|
|
73
|
+
|---------|------|------------|
|
|
74
|
+
| `/dw-adr "decision"` | Record an Architecture Decision Record at `.dw/spec/<prd>/adrs/`. | `/dw-plan techspec --council`, deviations from constitution |
|
|
75
|
+
| `/dw-intel "question"` | Query codebase intelligence; `--build` (re)indexes `.dw/intel/`. | `/dw-plan`, `/dw-review`, `/dw-bugfix` |
|
|
76
|
+
| `/dw-secure-audit` | OWASP + Trivy + lockfile + supply-chain scan. Hard gate. Flags: `--scan-only`, `--plan`, `--execute`. | `/dw-review`, `/dw-generate-pr` |
|
|
77
|
+
| `/dw-find-skills "query"` | Search npx skills ecosystem, vet, install. | manual when extending the bundle |
|
|
78
|
+
| `/dw-update` | Update dev-workflow to latest npm release with rollback snapshot. | manual maintenance |
|
|
294
79
|
```
|
|
295
80
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
│ │ ├── dw-functional-doc.md
|
|
326
|
-
│ │ └── dw-generate-pr.md
|
|
327
|
-
│ ├── templates/ # Document templates
|
|
328
|
-
│ │ ├── prd-template.md
|
|
329
|
-
│ │ ├── techspec-template.md
|
|
330
|
-
│ │ ├── tasks-template.md
|
|
331
|
-
│ │ ├── task-template.md
|
|
332
|
-
│ │ ├── bugfix-template.md
|
|
333
|
-
│ │ └── functional-doc/ # Functional dossier templates
|
|
334
|
-
│ ├── scripts/ # Utility scripts
|
|
335
|
-
│ │ └── functional-doc/ # Dossier generation & Playwright runner
|
|
336
|
-
│ ├── references/ # Reference materials and external docs
|
|
337
|
-
│ ├── rules/ # Project-specific rules
|
|
338
|
-
│ │ └── *.md
|
|
339
|
-
│ ├── tasks/ # Active PRDs and tasks
|
|
340
|
-
│ │ └── prd-[name]/
|
|
341
|
-
│ │ ├── prd.md
|
|
342
|
-
│ │ ├── techspec.md
|
|
343
|
-
│ │ ├── tasks.md
|
|
344
|
-
│ │ └── *_task.md
|
|
345
|
-
│ └── archived/prd/ # Completed PRDs
|
|
346
|
-
├── .claude/skills/ # Claude Code skills
|
|
347
|
-
├── .agents/skills/ # Codex/Copilot skills
|
|
348
|
-
├── .opencode/commands/ # OpenCode commands
|
|
349
|
-
└── .github/copilot-instructions.md # Copilot instructions
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
## Tool Integration
|
|
353
|
-
|
|
354
|
-
Commands work across multiple AI tools, all pointing to the same source `.dw/commands/`:
|
|
355
|
-
|
|
356
|
-
| Tool | Location | Format |
|
|
357
|
-
|------|----------|--------|
|
|
358
|
-
| **Claude Code** | `.claude/skills/*/SKILL.md` | Skill referencing `.dw/commands/` |
|
|
359
|
-
| **Codex CLI** | `.agents/skills/*/SKILL.md` | Skill referencing `.dw/commands/` |
|
|
360
|
-
| **OpenCode** | `.opencode/commands/*.md` | Command referencing `.dw/commands/` |
|
|
361
|
-
| **GitHub Copilot** | `.github/copilot-instructions.md` | Instructions listing the commands |
|
|
81
|
+
## Keyword mode — `/dw-help <keyword>`
|
|
82
|
+
|
|
83
|
+
Match the keyword and suggest:
|
|
84
|
+
|
|
85
|
+
| Keyword | Suggest |
|
|
86
|
+
|---------|---------|
|
|
87
|
+
| `prd`, `spec`, `plan`, `architecture`, `techspec`, `tasks` | `/dw-plan` (with appropriate stage flag) |
|
|
88
|
+
| `bug`, `error`, `broken`, `fix` | `/dw-bugfix` |
|
|
89
|
+
| `run`, `execute`, `implement` | `/dw-run` |
|
|
90
|
+
| `review`, `quality`, `audit code` | `/dw-review` |
|
|
91
|
+
| `qa`, `test plan`, `e2e` | `/dw-qa` |
|
|
92
|
+
| `commit`, `git` | `/dw-commit` |
|
|
93
|
+
| `pr`, `pull request`, `merge` | `/dw-generate-pr` |
|
|
94
|
+
| `idea`, `brainstorm`, `explore` | `/dw-brainstorm` |
|
|
95
|
+
| `research`, `compare`, `state of the art` | `/dw-brainstorm --research` |
|
|
96
|
+
| `refactor`, `smell`, `code health` | `/dw-brainstorm --refactor` |
|
|
97
|
+
| `ui`, `design`, `redesign` | `/dw-redesign-ui` |
|
|
98
|
+
| `intel`, `where is`, `what uses` | `/dw-intel` (or `--build` to (re)create the index) |
|
|
99
|
+
| `analyze`, `rules`, `conventions` | `/dw-analyze-project` |
|
|
100
|
+
| `constitution`, `principles` | `/dw-analyze-project` (Step 8 generates the constitution) |
|
|
101
|
+
| `security`, `vulnerabilities`, `cve`, `deps`, `audit deps` | `/dw-secure-audit` |
|
|
102
|
+
| `adr`, `decision` | `/dw-adr` (also auto-invoked from `/dw-plan --council`) |
|
|
103
|
+
| `docker`, `compose`, `container` | `/dw-dockerize` |
|
|
104
|
+
| `new project`, `bootstrap`, `scaffold` | `/dw-new-project` |
|
|
105
|
+
| `functional doc`, `screen map`, `e2e doc` | `/dw-functional-doc` |
|
|
106
|
+
| `incident`, `outage`, `postmortem`, `sev-1`, `sev-2` | (Skill `dw-incident-response` auto-invoked from `/dw-bugfix` for prod-critical) |
|
|
107
|
+
| `eval`, `llm`, `ai feature`, `rag` | (Skill `dw-llm-eval` invoked from `/dw-plan tasks`, `/dw-review`, `/dw-qa --ai`) |
|
|
108
|
+
|
|
109
|
+
If no keyword matches, show the default surface and a note: "Keyword `<word>` not recognized — see commands above."
|
|
362
110
|
|
|
363
111
|
## FAQ
|
|
364
112
|
|
|
365
|
-
**Q:
|
|
366
|
-
- `/dw-
|
|
367
|
-
- `/dw-run-plan` executes ALL automatically with a final review
|
|
368
|
-
|
|
369
|
-
**Q: Do I need to run `/dw-review-implementation` manually?**
|
|
370
|
-
- Not if using `/dw-run-plan` (already included). Yes if using `/dw-run-task` incrementally.
|
|
113
|
+
**Q: I'm not sure where to start with a new feature.**
|
|
114
|
+
- Use `/dw-autopilot "what you want"`. It runs PRD → TechSpec → Tasks → Run → Review → PR with three approval gates.
|
|
371
115
|
|
|
372
|
-
**Q:
|
|
373
|
-
- `/dw-review-
|
|
374
|
-
- `/dw-code-review` (Level 3): Additionally analyzes code quality and generates a formal report
|
|
116
|
+
**Q: Do I have to use `/dw-autopilot`?**
|
|
117
|
+
- No. The granular pipeline (`/dw-brainstorm` → `/dw-plan` → `/dw-run` → `/dw-qa` → `/dw-review` → `/dw-commit` → `/dw-generate-pr`) gives you control at each step.
|
|
375
118
|
|
|
376
|
-
**Q:
|
|
377
|
-
-
|
|
119
|
+
**Q: I just want to fix a bug.**
|
|
120
|
+
- `/dw-bugfix "<bug description>"`. It triages (bug vs feature vs scope), asks 3 questions, then fixes or routes to a PRD if scope is large.
|
|
378
121
|
|
|
379
|
-
**Q:
|
|
380
|
-
-
|
|
122
|
+
**Q: How do I check if my project follows good patterns?**
|
|
123
|
+
- `/dw-analyze-project` writes `.dw/rules/`. Then any command reads those rules for compliance.
|
|
381
124
|
|
|
382
|
-
**Q:
|
|
383
|
-
-
|
|
125
|
+
**Q: How do I get more flow recommendations during ideation?**
|
|
126
|
+
- `/dw-brainstorm "idea" --council` adds a multi-advisor stress-test debate.
|
|
127
|
+
- `/dw-brainstorm "topic" --research` runs a deep multi-source citation pipeline.
|
|
384
128
|
|
|
385
|
-
**Q:
|
|
386
|
-
-
|
|
129
|
+
**Q: Where do AI features get evaluated?**
|
|
130
|
+
- The `dw-llm-eval` skill is auto-invoked from `/dw-plan tasks` (eval-plan subtask), `/dw-review` (AI feature gate), and `/dw-qa --ai` (run reference dataset).
|
|
387
131
|
|
|
388
|
-
**Q:
|
|
389
|
-
-
|
|
132
|
+
**Q: What happened to all the other commands?**
|
|
133
|
+
- v1.0.0 consolidated from 30 to 20. Mergers: create-prd/techspec/tasks → `/dw-plan`; run-task/run-plan → `/dw-run`; code-review/review-implementation → `/dw-review`; run-qa/fix-qa → `/dw-qa`; security-check/deps-audit → `/dw-secure-audit`; map-codebase → `/dw-intel --build`; deep-research and refactoring-analysis → `/dw-brainstorm --research/--refactor`. Removed: revert-task (use `git revert` directly).
|
|
390
134
|
|
|
391
135
|
</system_instructions>
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
<system_instructions>
|
|
2
|
-
You are
|
|
2
|
+
You are the codebase intelligence assistant. Two modes: query the existing index, or (re)build the index from source.
|
|
3
3
|
|
|
4
|
-
<critical>
|
|
5
|
-
<critical>
|
|
4
|
+
<critical>Query mode is read-only. Do NOT modify code or project files.</critical>
|
|
5
|
+
<critical>Build mode writes to `.dw/intel/` only — never to source.</critical>
|
|
6
|
+
<critical>Always cite information sources (file path, line number when applicable) in query mode.</critical>
|
|
6
7
|
<critical>If the index is stale (>7 days old) or absent, surface that to the user — do NOT silently fall back without flagging.</critical>
|
|
7
8
|
|
|
9
|
+
## Modes
|
|
10
|
+
|
|
11
|
+
| Invocation | Behavior |
|
|
12
|
+
|------------|----------|
|
|
13
|
+
| `/dw-intel "<question>"` | **Default — query mode.** Answers using `.dw/intel/` (machine-readable) + `.dw/rules/` (human-readable) + grep fallback. |
|
|
14
|
+
| `/dw-intel --build` | **Build mode.** Recursively scans the project and produces `.dw/intel/{stack,files,apis,deps}.json` + `.dw/intel/arch.md`. Use after major refactors, large file moves, or when intel is >7 days stale. |
|
|
15
|
+
| `/dw-intel --build --incremental` | Incremental build: only re-reads files changed since `.last-refresh.json`. Faster but may miss large structural changes. |
|
|
16
|
+
|
|
8
17
|
## When to Use
|
|
9
18
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- Do NOT use to implement changes (use `/dw-run-task`)
|
|
19
|
+
- **Query mode**: understand how something works in the project (auth flow, data model, route surface). Find patterns, conventions, or architectural decisions. Verify if something already exists before implementing.
|
|
20
|
+
- **Build mode**: after major refactors, large dependency updates, or when `.dw/intel/` is empty or stale.
|
|
21
|
+
- Do NOT use to implement changes (use `/dw-run`).
|
|
14
22
|
|
|
15
23
|
## Pipeline Position
|
|
16
24
|
|
|
17
|
-
**Predecessor
|
|
25
|
+
**Predecessor (build mode):** any major project change | **Successor:** any `dw-*` command that needs intel
|
|
18
26
|
|
|
19
27
|
## Complementary Skills
|
|
20
28
|
|
|
@@ -41,9 +49,9 @@ You are a codebase intelligence assistant. This command answers questions about
|
|
|
41
49
|
|
|
42
50
|
Before answering, read `.dw/intel/.last-refresh.json` if present:
|
|
43
51
|
|
|
44
|
-
- If `updated_at` is more than 7 days old → prefix the answer with: `⚠ Index last refreshed YYYY-MM-DD (X days ago). Consider running /dw-
|
|
52
|
+
- If `updated_at` is more than 7 days old → prefix the answer with: `⚠ Index last refreshed YYYY-MM-DD (X days ago). Consider running /dw-intel --build to refresh.`
|
|
45
53
|
- If `.dw/intel/` exists but `.last-refresh.json` is absent → prefix with: `⚠ No refresh metadata; index may be stale.`
|
|
46
|
-
- If `.dw/intel/` does not exist at all → tell the user: `No .dw/intel/ found. Falling back to .dw/rules/ + grep. For richer answers, run /dw-
|
|
54
|
+
- If `.dw/intel/` does not exist at all → tell the user: `No .dw/intel/ found. Falling back to .dw/rules/ + grep. For richer answers, run /dw-intel --build.`
|
|
47
55
|
|
|
48
56
|
Don't refuse to answer — return the best info available.
|
|
49
57
|
|
|
@@ -112,7 +120,7 @@ Don't dump JSON. Write a 3-8 line answer that:
|
|
|
112
120
|
|
|
113
121
|
- **Prefer `.dw/intel/` over grep.** It's curated and faster. Grep only when intel is absent or stale.
|
|
114
122
|
- **Cite paths, not contents.** The user can `Read` paths if they need the source.
|
|
115
|
-
- **Don't fabricate.** If `.dw/intel/` doesn't have the answer and grep returns nothing, say so. Suggest `/dw-
|
|
123
|
+
- **Don't fabricate.** If `.dw/intel/` doesn't have the answer and grep returns nothing, say so. Suggest `/dw-intel --build` if `.dw/intel/` is missing.
|
|
116
124
|
- **Combine intel + rules.** A query about "how do we name service files?" should pull from `arch.md` (intel) AND `.dw/rules/<module>.md` (project conventions). The two complement.
|
|
117
125
|
|
|
118
126
|
## Critical Rules
|
|
@@ -122,8 +130,64 @@ Don't dump JSON. Write a 3-8 line answer that:
|
|
|
122
130
|
- <critical>Surface stale-index warnings prominently — do not bury them at the bottom.</critical>
|
|
123
131
|
- Do NOT include secrets/tokens/credentials in any answer (they should not be in `.dw/intel/` to begin with, but defense in depth).
|
|
124
132
|
|
|
133
|
+
## Build mode (`--build`)
|
|
134
|
+
|
|
135
|
+
When invoked with `--build`, the command produces or refreshes the queryable intel index. This was previously `/dw-intel --build`, now folded in.
|
|
136
|
+
|
|
137
|
+
### Behavior
|
|
138
|
+
|
|
139
|
+
1. **Detect project structure.** Recursive scan for entry points: package.json, requirements.txt, pyproject.toml, Cargo.toml, *.csproj, etc.
|
|
140
|
+
2. **Detect monorepo orchestrators.** pnpm/nx/turborepo workspaces, lerna config, git submodules.
|
|
141
|
+
3. **Stack identification.** For each detected module, identify language, framework, package manager, build tool. Output to `.dw/intel/stack.json`.
|
|
142
|
+
4. **File inventory.** For source files (skip `node_modules/`, `.git/`, `dist/`, `build/`, `.dw/`): catalog with path, exports, primary purpose. Output to `.dw/intel/files.json`. Budget ≤2K tokens (prioritize coverage of key files over exhaustive listing for large repos).
|
|
143
|
+
5. **API extraction.** Routes, RPC handlers, GraphQL resolvers, public CLI surface. Output to `.dw/intel/apis.json`. Budget ≤1.5K tokens.
|
|
144
|
+
6. **Dependency map.** Internal cross-module imports + external packages with `used_by` arrays. Output to `.dw/intel/deps.json`. Budget ≤1K tokens.
|
|
145
|
+
7. **Architecture summary.** Prose document describing the project's shape, key patterns, request flows, deployment topology. Output to `.dw/intel/arch.md`. Budget ≤1.5K tokens.
|
|
146
|
+
8. **Refresh metadata.** Write `.dw/intel/.last-refresh.json` with `updated_at`, `version`, `mode` (full or incremental), files-scanned count.
|
|
147
|
+
|
|
148
|
+
### Complementary skill for build mode
|
|
149
|
+
|
|
150
|
+
| Skill | Trigger |
|
|
151
|
+
|-------|---------|
|
|
152
|
+
| `dw-codebase-intel` | **ALWAYS in build mode** — provides the `.dw/intel/` schema, the incremental-update protocol (which files to re-read, how to merge with existing entries), and the budget rules per file. |
|
|
153
|
+
|
|
154
|
+
### Forbidden in build mode
|
|
155
|
+
|
|
156
|
+
- Never read `.env*` (except `.env.example` / `.env.template`), `*.key`, `*.pem`, `*.pfx`, `*.p12`, `*.keystore`, `*.jks`, `id_rsa`, `id_ed25519`, or files matching `*credential*`/`*secret*` in name. Skip silently if encountered.
|
|
157
|
+
- Never include secrets/tokens/credentials in any intel file.
|
|
158
|
+
- Never use Bash `ls`/`find`/`cat` (cross-platform sensitivity); use Glob/Read/Grep.
|
|
159
|
+
|
|
160
|
+
### Incremental mode (`--build --incremental`)
|
|
161
|
+
|
|
162
|
+
Reads `.dw/intel/.last-refresh.json` to find the last build timestamp. Only re-reads files modified since. Faster but may miss:
|
|
163
|
+
- New directories not previously catalogued.
|
|
164
|
+
- Removed files (they remain in `files.json` until full build).
|
|
165
|
+
|
|
166
|
+
Use full `--build` quarterly or after structural changes; incremental for routine refresh.
|
|
167
|
+
|
|
168
|
+
### Output structure
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
.dw/intel/
|
|
172
|
+
├── stack.json # Detected stack per module
|
|
173
|
+
├── files.json # Source file inventory with exports + purposes
|
|
174
|
+
├── apis.json # Public API surface
|
|
175
|
+
├── deps.json # Dependency graph (internal + external)
|
|
176
|
+
├── arch.md # Architecture summary (prose)
|
|
177
|
+
└── .last-refresh.json # Metadata: updated_at, version, mode
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Why this skill exists
|
|
181
|
+
|
|
182
|
+
Previously two commands: `/dw-intel` (query) and `/dw-intel --build` (build). The split was historical — one wrote, one read, but both shared the schema and the same `.dw/intel/` directory. Consolidating reduces:
|
|
183
|
+
- Confusion ("which one do I run?").
|
|
184
|
+
- Maintenance burden of two separate command files.
|
|
185
|
+
- Path-walking docs duplicated across two files.
|
|
186
|
+
|
|
187
|
+
Same operations, single mental entry point.
|
|
188
|
+
|
|
125
189
|
## Inspired by
|
|
126
190
|
|
|
127
|
-
The query-patterns mapping (where-is / what-uses / architecture-of / etc.) and the JSON intel schema are adapted from the [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) project (MIT license). Path conventions changed from `.planning/intel/` to `.dw/intel/`.
|
|
191
|
+
The query-patterns mapping (where-is / what-uses / architecture-of / etc.) and the JSON intel schema are adapted from the [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) project (MIT license). Path conventions changed from `.planning/intel/` to `.dw/intel/`. Build-mode behavior previously lived in `/dw-intel --build` (same upstream).
|
|
128
192
|
|
|
129
193
|
</system_instructions>
|