@brunosps00/dev-workflow 0.8.1 → 0.10.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 +30 -27
- package/bin/dev-workflow.js +1 -1
- package/lib/constants.js +6 -8
- package/lib/init.js +6 -0
- package/lib/install-deps.js +0 -5
- package/lib/migrate-gsd.js +164 -0
- package/lib/uninstall.js +2 -2
- package/package.json +1 -1
- package/scaffold/en/commands/dw-analyze-project.md +6 -11
- package/scaffold/en/commands/dw-autopilot.md +10 -17
- package/scaffold/en/commands/dw-brainstorm.md +2 -2
- package/scaffold/en/commands/dw-bugfix.md +1 -0
- package/scaffold/en/commands/dw-code-review.md +7 -5
- package/scaffold/en/commands/dw-commit.md +6 -0
- package/scaffold/en/commands/dw-create-prd.md +5 -4
- package/scaffold/en/commands/dw-create-techspec.md +7 -4
- package/scaffold/en/commands/dw-deep-research.md +6 -0
- package/scaffold/en/commands/dw-deps-audit.md +1 -0
- package/scaffold/en/commands/dw-find-skills.md +4 -4
- package/scaffold/en/commands/dw-fix-qa.md +1 -0
- package/scaffold/en/commands/dw-generate-pr.md +1 -0
- package/scaffold/en/commands/dw-help.md +10 -27
- package/scaffold/en/commands/dw-intel.md +99 -30
- package/scaffold/en/commands/dw-map-codebase.md +125 -0
- package/scaffold/en/commands/dw-new-project.md +1 -1
- package/scaffold/en/commands/dw-redesign-ui.md +5 -9
- package/scaffold/en/commands/dw-refactoring-analysis.md +8 -6
- package/scaffold/en/commands/dw-review-implementation.md +28 -2
- package/scaffold/en/commands/dw-run-plan.md +14 -20
- package/scaffold/en/commands/dw-run-task.md +5 -4
- package/scaffold/en/commands/dw-update.md +3 -1
- package/scaffold/en/templates/idea-onepager.md +2 -2
- package/scaffold/pt-br/commands/dw-analyze-project.md +6 -11
- package/scaffold/pt-br/commands/dw-autopilot.md +10 -17
- package/scaffold/pt-br/commands/dw-brainstorm.md +2 -2
- package/scaffold/pt-br/commands/dw-bugfix.md +1 -0
- package/scaffold/pt-br/commands/dw-code-review.md +7 -5
- package/scaffold/pt-br/commands/dw-commit.md +6 -0
- package/scaffold/pt-br/commands/dw-create-prd.md +5 -4
- package/scaffold/pt-br/commands/dw-create-techspec.md +7 -4
- package/scaffold/pt-br/commands/dw-deep-research.md +6 -0
- package/scaffold/pt-br/commands/dw-deps-audit.md +1 -0
- package/scaffold/pt-br/commands/dw-find-skills.md +4 -4
- package/scaffold/pt-br/commands/dw-fix-qa.md +1 -0
- package/scaffold/pt-br/commands/dw-generate-pr.md +1 -0
- package/scaffold/pt-br/commands/dw-help.md +10 -27
- package/scaffold/pt-br/commands/dw-intel.md +99 -30
- package/scaffold/pt-br/commands/dw-map-codebase.md +125 -0
- package/scaffold/pt-br/commands/dw-new-project.md +1 -1
- package/scaffold/pt-br/commands/dw-redesign-ui.md +5 -9
- package/scaffold/pt-br/commands/dw-refactoring-analysis.md +8 -6
- package/scaffold/pt-br/commands/dw-review-implementation.md +21 -2
- package/scaffold/pt-br/commands/dw-run-plan.md +16 -22
- package/scaffold/pt-br/commands/dw-run-task.md +5 -4
- package/scaffold/pt-br/commands/dw-update.md +3 -1
- package/scaffold/pt-br/templates/idea-onepager.md +2 -2
- package/scaffold/skills/dw-codebase-intel/SKILL.md +102 -0
- package/scaffold/skills/dw-codebase-intel/agents/intel-updater.md +318 -0
- package/scaffold/skills/dw-codebase-intel/references/api-design-discipline.md +138 -0
- package/scaffold/skills/dw-codebase-intel/references/incremental-update.md +79 -0
- package/scaffold/skills/dw-codebase-intel/references/intel-format.md +208 -0
- package/scaffold/skills/dw-codebase-intel/references/query-patterns.md +148 -0
- package/scaffold/skills/dw-debug-protocol/SKILL.md +106 -0
- package/scaffold/skills/dw-debug-protocol/references/error-categorization.md +127 -0
- package/scaffold/skills/dw-debug-protocol/references/non-reproducible-strategy.md +108 -0
- package/scaffold/skills/dw-debug-protocol/references/six-step-triage.md +139 -0
- package/scaffold/skills/dw-debug-protocol/references/stop-the-line.md +52 -0
- package/scaffold/skills/dw-execute-phase/SKILL.md +133 -0
- package/scaffold/skills/dw-execute-phase/agents/executor.md +264 -0
- package/scaffold/skills/dw-execute-phase/agents/plan-checker.md +215 -0
- package/scaffold/skills/dw-execute-phase/references/atomic-commits.md +143 -0
- package/scaffold/skills/dw-execute-phase/references/plan-verification.md +156 -0
- package/scaffold/skills/dw-execute-phase/references/wave-coordination.md +102 -0
- package/scaffold/skills/dw-git-discipline/SKILL.md +120 -0
- package/scaffold/skills/dw-git-discipline/references/atomic-commits-discipline.md +158 -0
- package/scaffold/skills/dw-git-discipline/references/branch-hygiene.md +150 -0
- package/scaffold/skills/dw-git-discipline/references/trunk-based-pattern.md +82 -0
- package/scaffold/skills/dw-memory/SKILL.md +1 -2
- package/scaffold/skills/dw-simplification/SKILL.md +142 -0
- package/scaffold/skills/dw-simplification/references/behavior-preserving.md +148 -0
- package/scaffold/skills/dw-simplification/references/chestertons-fence.md +152 -0
- package/scaffold/skills/dw-simplification/references/complexity-metrics.md +147 -0
- package/scaffold/skills/dw-source-grounding/SKILL.md +128 -0
- package/scaffold/skills/dw-source-grounding/references/citation-protocol.md +108 -0
- package/scaffold/skills/dw-source-grounding/references/freshness-check.md +108 -0
- package/scaffold/skills/dw-source-grounding/references/source-priority.md +146 -0
- package/scaffold/skills/dw-verify/SKILL.md +0 -1
- package/scaffold/skills/vercel-react-best-practices/SKILL.md +4 -0
- package/scaffold/skills/vercel-react-best-practices/references/perf-discipline.md +122 -0
- package/scaffold/skills/webapp-testing/SKILL.md +5 -0
- package/scaffold/skills/webapp-testing/references/security-boundary.md +115 -0
- package/scaffold/skills/webapp-testing/references/three-workflow-patterns.md +144 -0
- package/scaffold/en/commands/dw-quick.md +0 -85
- package/scaffold/en/commands/dw-resume.md +0 -82
- package/scaffold/pt-br/commands/dw-quick.md +0 -85
- package/scaffold/pt-br/commands/dw-resume.md +0 -82
|
@@ -24,18 +24,20 @@ When available in the project under `./.agents/skills/`, use these skills as ana
|
|
|
24
24
|
- `dw-review-rigor`: **ALWAYS** — applies de-duplication (same pattern in N files = 1 finding), severity ordering (critical → high → medium → low), verify-before-flag, skip-what-linter-catches, and signal-over-volume. The report's "Issues Found" table follows this discipline.
|
|
25
25
|
- `dw-verify`: **ALWAYS** — invoked before emitting an `APPROVED` or `APPROVED WITH CAVEATS` verdict. Without a VERIFICATION REPORT PASS (test + lint + build), the verdict cannot be APPROVED.
|
|
26
26
|
- `/dw-security-check`: **ALWAYS for TS/Python/C#/Rust projects** — invoked as step 6.7 (Security Layer) before emitting a verdict. If the project uses a supported language and `security-check.md` is missing OR has REJECTED status, the verdict is **REJECTED** — no exception.
|
|
27
|
+
- `dw-simplification`: use when the diff touches dense or twisty code — applies Chesterton's Fence (understand WHY before flagging removal), behavior-preserving refactor protocol (test gate before/after), and complexity metrics (cyclomatic, cognitive, depth, fan-out) so that "simplify this" findings are concrete, not vibes-based.
|
|
27
28
|
- `security-review`: use when auth, authorization, external input, upload, SQL, external integration, secrets, SSRF, XSS, or sensitive surfaces are present
|
|
28
29
|
- `vercel-react-best-practices`: use when the diff touches React/Next.js to review rendering, fetching, bundle, hydration, and performance patterns
|
|
29
30
|
|
|
30
31
|
## Codebase Intelligence
|
|
31
32
|
|
|
32
|
-
<critical>If `.
|
|
33
|
-
- Internally run: `/
|
|
33
|
+
<critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before reviewing. Do NOT skip this step.</critical>
|
|
34
|
+
- Internally run: `/dw-intel "documented conventions and anti-patterns"`
|
|
34
35
|
- Prioritize findings that violate documented conventions
|
|
35
|
-
- Check if questionable architectural decisions are intentional (documented
|
|
36
|
+
- Check if questionable architectural decisions are intentional (documented in `.dw/rules/`)
|
|
36
37
|
|
|
37
|
-
If `.
|
|
38
|
-
- Use `.dw/rules/` as context
|
|
38
|
+
If `.dw/intel/` does NOT exist:
|
|
39
|
+
- Use `.dw/rules/` as context, falling back to grep
|
|
40
|
+
- Suggest running `/dw-map-codebase` after the review for richer downstream context
|
|
39
41
|
|
|
40
42
|
## Input Variables
|
|
41
43
|
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
## Pipeline Position
|
|
10
10
|
**Predecessor:** `/dw-run-task` or `/dw-bugfix` | **Successor:** `/dw-generate-pr`
|
|
11
11
|
|
|
12
|
+
## Complementary Skills
|
|
13
|
+
|
|
14
|
+
When available in the project under `./.agents/skills/`, use these skills as operational support without replacing this command:
|
|
15
|
+
|
|
16
|
+
- `dw-git-discipline`: **ALWAYS** — enforces atomic commits (one logical intent per commit; refactor separate from feature), Conventional Commits format, lint+tests+build green BEFORE the commit, and bans bypassing pre-commit hooks (`--no-verify`) or amending pushed commits. When mixed changes are detected, splits via `git add -p`.
|
|
17
|
+
|
|
12
18
|
## Input Variables
|
|
13
19
|
|
|
14
20
|
| Variable | Description | Example |
|
|
@@ -42,12 +42,13 @@
|
|
|
42
42
|
|
|
43
43
|
## Codebase Intelligence
|
|
44
44
|
|
|
45
|
-
<critical>If `.
|
|
46
|
-
- Internally run: `/
|
|
45
|
+
<critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before writing requirements. Do NOT skip this step.</critical>
|
|
46
|
+
- Internally run: `/dw-intel "existing features in the [PRD topic] domain"`
|
|
47
47
|
- Use findings to avoid duplicating existing functionality and reference established patterns
|
|
48
48
|
|
|
49
|
-
If `.
|
|
50
|
-
- Use `.dw/rules/` as context
|
|
49
|
+
If `.dw/intel/` does NOT exist:
|
|
50
|
+
- Use `.dw/rules/` as context, falling back to grep
|
|
51
|
+
- Suggest running `/dw-map-codebase` for richer downstream context
|
|
51
52
|
|
|
52
53
|
## Multi-Project Features
|
|
53
54
|
|
|
@@ -23,18 +23,21 @@
|
|
|
23
23
|
When available in the project under `./.agents/skills/`, use these skills as support:
|
|
24
24
|
|
|
25
25
|
- `dw-council` (opt-in via `--council`): multi-advisor debate on the primary architectural decision with steel-manning. **DO NOT invoke by default**.
|
|
26
|
+
- `dw-source-grounding` (**ALWAYS**): every framework/library decision must follow Detect → Fetch → Implement → Cite. The techspec emits inline citations `[source: <url>, version: X.Y, retrieved: YYYY-MM-DD]` next to each architectural decision.
|
|
26
27
|
- `vercel-react-best-practices`: use when defining frontend architecture for React/Next.js projects
|
|
27
28
|
- `ui-ux-pro-max`: use when defining design system decisions, color palettes, typography, and UI style for the TechSpec
|
|
28
29
|
- `security-review`: use when the feature touches auth, authorization, or sensitive data handling
|
|
29
30
|
|
|
30
31
|
## Codebase Intelligence
|
|
31
32
|
|
|
32
|
-
<critical>If `.
|
|
33
|
-
- Internally run: `/
|
|
33
|
+
<critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before writing the techspec. Do NOT skip this step.</critical>
|
|
34
|
+
- Internally run: `/dw-intel "architectural patterns and technical decisions in the project"`
|
|
34
35
|
- Align proposals with existing patterns; flag deviations explicitly
|
|
36
|
+
- When the techspec defines API endpoints, ALSO consult `dw-codebase-intel/references/api-design-discipline.md` (Hyrum's Law, contract-first, error semantics, boundary validation, versioning) — the new endpoint must match conventions surfaced in `apis.json`, not impose external "best practices" that conflict with existing patterns.
|
|
35
37
|
|
|
36
|
-
If `.
|
|
37
|
-
- Use `.dw/rules/` as context
|
|
38
|
+
If `.dw/intel/` does NOT exist:
|
|
39
|
+
- Use `.dw/rules/` as context, falling back to grep
|
|
40
|
+
- Suggest running `/dw-map-codebase` to enrich downstream context
|
|
38
41
|
|
|
39
42
|
## Multi-Project Decision Flowchart
|
|
40
43
|
|
|
@@ -13,6 +13,12 @@ You are an AI assistant specialized in conducting enterprise-grade research with
|
|
|
13
13
|
<critical>Bibliography must be COMPLETE -- every citation, no placeholders, no ranges</critical>
|
|
14
14
|
<critical>Operate independently -- infer assumptions from context, only stop for critical errors</critical>
|
|
15
15
|
|
|
16
|
+
## Complementary Skills
|
|
17
|
+
|
|
18
|
+
| Skill | Trigger |
|
|
19
|
+
|-------|---------|
|
|
20
|
+
| `dw-source-grounding` | **ALWAYS** — applies the Detect → Fetch → Implement → Cite protocol with the strict source-priority hierarchy (official versioned docs > changelogs > web standards > compatibility tables; Stack Overflow / blogs / training data are discovery only). Each finding ends with `[source: <url>, version: X.Y, retrieved: YYYY-MM-DD]`; the bibliography is built from these citations. |
|
|
21
|
+
|
|
16
22
|
## Input Variables
|
|
17
23
|
|
|
18
24
|
| Variable | Description | Example |
|
|
@@ -29,6 +29,7 @@ This command is **distinct** from `/dw-security-check`:
|
|
|
29
29
|
| `dw-verify` | **ALWAYS** — every phase emits a VERIFICATION REPORT (commands run, exit codes, artifacts) before the next phase starts |
|
|
30
30
|
| `dw-review-rigor` | **ALWAYS** — applies de-duplication (same advisory across N packages = 1 finding with affected list), severity ordering, and signal-over-volume on the OUTDATED-MINOR list |
|
|
31
31
|
| `security-review` (`references/supply-chain.md`) | **ALWAYS** when classifying findings — gives OWASP A06 (Vulnerable & Outdated Components) framing for the brainstorm trade-offs |
|
|
32
|
+
| `dw-source-grounding` | **ALWAYS** in the brainstorm phase — each per-package update option (Conservative/Balanced/Bold) cites the official changelog/release notes for the target version: `[source: <url>, version: X.Y, retrieved: YYYY-MM-DD]`. Catches "agent recommends v5 because it sounds modern, but v5 dropped Node 18 support" errors. |
|
|
32
33
|
| `dw-council` | Auto opt-in when ≥3 packages land in tier COMPROMISED — multi-advisor stress-test on remediation order and scope |
|
|
33
34
|
| `webapp-testing` | Optional — when the project is frontend and the scoped test phase needs Playwright-aware test selection |
|
|
34
35
|
|
|
@@ -15,7 +15,7 @@ You are an agent skills discovery helper for this workspace. Your job is to help
|
|
|
15
15
|
|
|
16
16
|
## Pipeline Position
|
|
17
17
|
|
|
18
|
-
**Predecessor:** any exploratory question | **Successor:** none (independent flow). If no skill is found, fall back to `/dw-brainstorm` (idea exploration) or `/dw-
|
|
18
|
+
**Predecessor:** any exploratory question | **Successor:** none (independent flow). If no skill is found, fall back to `/dw-brainstorm` (idea exploration) or `/dw-run-task` (small one-off task) when applicable.
|
|
19
19
|
|
|
20
20
|
## Complementary Skills
|
|
21
21
|
|
|
@@ -81,7 +81,7 @@ Browse skills at: https://skills.sh/
|
|
|
81
81
|
- Acknowledge no match was found, no fabrication
|
|
82
82
|
- Offer to help directly with general capabilities
|
|
83
83
|
- Suggest `/dw-brainstorm` if the user wants to explore options before building it themselves
|
|
84
|
-
- Suggest `/dw-
|
|
84
|
+
- Suggest `/dw-run-task` if the request fits a small one-off change (≤ 3 files, no PRD)
|
|
85
85
|
- Mention `npx skills init <name>` as a path to author the missing skill
|
|
86
86
|
|
|
87
87
|
## Common Skill Categories
|
|
@@ -128,7 +128,7 @@ I searched for skills related to "<query>" and didn't find a strong match
|
|
|
128
128
|
|
|
129
129
|
I can still help directly with general capabilities. Or:
|
|
130
130
|
/dw-brainstorm "<your idea>" — if you want to explore approaches first
|
|
131
|
-
/dw-
|
|
131
|
+
/dw-run-task "<small change>" — if it's a tiny change that fits one task (write quick PRD first)
|
|
132
132
|
npx skills init <name> — if this would be valuable as a reusable skill
|
|
133
133
|
```
|
|
134
134
|
|
|
@@ -150,7 +150,7 @@ I can still help directly with general capabilities. Or:
|
|
|
150
150
|
`dw-find-skills` ports the `find-skills` skill (from the Claude superpowers bundle, `~/.agents/skills/find-skills/SKILL.md`) into a `dw-*` workflow command so every supported platform (Claude Code, Codex, Copilot, OpenCode) gets the same discovery on-ramp. Adaptations for dev-workflow:
|
|
151
151
|
|
|
152
152
|
- Pipeline integration: `/dw-help <keyword>` routes here when the keyword matches `skill`/`find skill`/`install skill`/`extend agent`.
|
|
153
|
-
- Fallback to `/dw-brainstorm` or `/dw-
|
|
153
|
+
- Fallback to `/dw-brainstorm` or `/dw-run-task` when no skill matches — keeps the user inside the workflow instead of dumping them empty-handed.
|
|
154
154
|
- Explicit scope question (`-g` vs local) before installing, instead of always installing globally.
|
|
155
155
|
|
|
156
156
|
Credit: the `find-skills` skill from the Claude superpowers ecosystem and the `npx skills` / [skills.sh](https://skills.sh/) project.
|
|
@@ -18,6 +18,7 @@ You are an AI assistant specialized in post-QA bug fixing with evidence-driven r
|
|
|
18
18
|
|
|
19
19
|
When available in the project under `./.agents/skills/`, use these skills as operational support without replacing this command:
|
|
20
20
|
|
|
21
|
+
- `dw-debug-protocol`: **ALWAYS** — every bug-shaped finding (failing scenario, not missing feature) flows through the six-step triage. The retest evidence is the step-6 verification artifact; the regression test added in step 5 is what allows `Fixed` status to stick.
|
|
21
22
|
- `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 (screenshot in UI mode OR JSONL log line in API mode), status stays `Reopened` or `Under review`.
|
|
22
23
|
- `webapp-testing`: (UI mode) support for structuring retests, captures, and scripts when complementary to Playwright MCP
|
|
23
24
|
- `vercel-react-best-practices`: (UI mode) use only if the fix affects React/Next.js frontend and there is risk of rendering, hydration, fetching, or performance regression
|
|
@@ -14,6 +14,7 @@ You are an assistant specialized in creating well-documented Pull Requests. Your
|
|
|
14
14
|
| Skill | Trigger |
|
|
15
15
|
|-------|---------|
|
|
16
16
|
| `dw-verify` | **ALWAYS** — invoked before `git push`. Without a VERIFICATION REPORT PASS in the current session AFTER the last code edit, the PR **CANNOT** be created. |
|
|
17
|
+
| `dw-git-discipline` | **ALWAYS** — validates branch naming (`<type>/<scope>` kebab-case), atomic-commit history (each commit single-intent, conventional message), branch lifetime (flag if >7 days old), and PR scope (suggest split if diff > ~400 lines). PR description follows summary + test plan structure, not a `git log` dump. |
|
|
17
18
|
| `/dw-security-check` | **ALWAYS for TS/Python/C#/Rust projects** — `security-check.md` with status ≠ REJECTED is required for supported-language projects. |
|
|
18
19
|
|
|
19
20
|
<critical>Hard gate 1 (verify): if the current session has no VERIFICATION REPORT PASS from `dw-verify` produced AFTER the last edit/commit, STOP and invoke `dw-verify` before proceeding. A PR is a permanent artifact — it demands the highest verification standard.</critical>
|
|
@@ -23,7 +23,6 @@ You are a workspace help assistant. When invoked, present the user with a comple
|
|
|
23
23
|
| qa, visual test, playwright | `/dw-run-qa` | E2E QA with browser automation |
|
|
24
24
|
| refactor, smell, fowler | `/dw-refactoring-analysis` | Prioritized code-smell audit |
|
|
25
25
|
| design, ui, redesign | `/dw-redesign-ui` | Audit + propose + implement visual |
|
|
26
|
-
| decision, adr, architecture | `/dw-adr` | Record an Architecture Decision Record |
|
|
27
26
|
| debate, council, stress-test, opinions | `/dw-brainstorm --council` or `/dw-create-techspec --council` | Invokes `dw-council` for a multi-advisor debate |
|
|
28
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 |
|
|
29
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. |
|
|
@@ -32,8 +31,6 @@ You are a workspace help assistant. When invoked, present the user with a comple
|
|
|
32
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. |
|
|
33
32
|
| refine, refinement, idea, one-pager | `/dw-brainstorm --onepager` | Idea refinement with Product Inventory + classification (IMPROVES/CONSOLIDATES/NEW) + durable one-pager |
|
|
34
33
|
| revert, rollback task | `/dw-revert-task` | Safe revert with dependency checks |
|
|
35
|
-
| hotfix, quick change | `/dw-quick` | One-off task with guarantees, no PRD |
|
|
36
|
-
| resume, where I left off | `/dw-resume` | Restore previous session context |
|
|
37
34
|
| research | `/dw-deep-research` | Multi-source research with citations |
|
|
38
35
|
| idea, brainstorm | `/dw-brainstorm` | Structured ideation with trade-offs |
|
|
39
36
|
| update dev-workflow | `/dw-update` | Update to latest npm version |
|
|
@@ -127,9 +124,6 @@ This workspace uses an AI command system that automates the full development cyc
|
|
|
127
124
|
| `/dw-bugfix` | Analyzes and fixes bugs (bug vs feature triage) | Target + description | Fix + commit OR PRD (if feature) |
|
|
128
125
|
| `/dw-fix-qa` | Fixes documented QA bugs and retests with evidence | PRD path | Code + `QA/bugs.md` + `QA/qa-report.md` updated |
|
|
129
126
|
| `/dw-redesign-ui` | Audits, proposes, and implements visual redesign of pages/components | Target page/component | Redesign brief + code |
|
|
130
|
-
| `/dw-quick` | Execute a one-off task with workflow guarantees without PRD | Change description | Code + commit |
|
|
131
|
-
| `/dw-resume` | Restore session context and suggest next step | (none) | Summary + suggestion |
|
|
132
|
-
| `/dw-intel` | Query codebase intelligence about patterns and architecture | Question | Answer with sources |
|
|
133
127
|
| `/dw-autopilot` | Full pipeline orchestrator: from a wish to a PR with minimal intervention | Wish description | PRD + code + commits + PR |
|
|
134
128
|
|
|
135
129
|
### Research
|
|
@@ -165,11 +159,15 @@ This workspace uses an AI command system that automates the full development cyc
|
|
|
165
159
|
| `/dw-generate-pr` | Push + create PR + copy body + open URL | Target branch | PR on GitHub |
|
|
166
160
|
| `/dw-revert-task` | Safely revert a specific task's commits (dependency checks + confirmation) | PRD path + task number | Reverted commits + updated `tasks.md` |
|
|
167
161
|
|
|
168
|
-
###
|
|
162
|
+
### Internal commands (used by other dw-* commands; rarely invoked directly)
|
|
169
163
|
|
|
170
|
-
| Command | What it does |
|
|
171
|
-
|
|
172
|
-
| `/dw-adr` | Record an Architecture Decision Record
|
|
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.
|
|
173
171
|
|
|
174
172
|
### Maintenance
|
|
175
173
|
|
|
@@ -290,16 +288,6 @@ LEVEL 3 - Formal Code Review (/dw-code-review)
|
|
|
290
288
|
/dw-autopilot "description of what you want to build" # Research → PRD → Tasks → Code → QA → PR
|
|
291
289
|
```
|
|
292
290
|
|
|
293
|
-
### Quick Task
|
|
294
|
-
```bash
|
|
295
|
-
/dw-quick "change description" # Implement + validate + commit
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
### Resume Session
|
|
299
|
-
```bash
|
|
300
|
-
/dw-resume # Restore context + suggest next step
|
|
301
|
-
```
|
|
302
|
-
|
|
303
291
|
### Query Codebase
|
|
304
292
|
```bash
|
|
305
293
|
/dw-intel "how does X work in this project?" # Answer with sources
|
|
@@ -331,9 +319,7 @@ your-project/
|
|
|
331
319
|
│ │ ├── dw-autopilot.md
|
|
332
320
|
│ │ ├── dw-deep-research.md
|
|
333
321
|
│ │ ├── dw-intel.md
|
|
334
|
-
│ │ ├── dw-quick.md
|
|
335
322
|
│ │ ├── dw-redesign-ui.md
|
|
336
|
-
│ │ ├── dw-resume.md
|
|
337
323
|
│ │ ├── dw-bugfix.md
|
|
338
324
|
│ │ ├── dw-commit.md
|
|
339
325
|
│ │ ├── dw-functional-doc.md
|
|
@@ -396,11 +382,8 @@ Commands work across multiple AI tools, all pointing to the same source `.dw/com
|
|
|
396
382
|
**Q: Does `/dw-redesign-ui` work with Angular?**
|
|
397
383
|
- Yes. The command is framework-agnostic. For React it uses react-doctor and `vercel-react-best-practices`; for Angular it uses `ng lint` and Angular DevTools. Visual design (`ui-ux-pro-max`) works with any framework.
|
|
398
384
|
|
|
399
|
-
**Q:
|
|
400
|
-
-
|
|
401
|
-
|
|
402
|
-
**Q: Does `/dw-quick` replace `/dw-run-task`?**
|
|
403
|
-
- No. `/dw-quick` is for one-off changes without a PRD. `/dw-run-task` executes tasks from a structured plan with PRD and TechSpec.
|
|
385
|
+
**Q: How do I get codebase intelligence and parallel execution?**
|
|
386
|
+
- Both are native to dev-workflow. Run `/dw-map-codebase` to build the queryable index in `.dw/intel/`, then `/dw-intel "<question>"` to query it. For parallel execution, `/dw-run-plan` invokes the bundled phase-execution agents (executor + plan-checker) directly to dispatch tasks in waves with atomic commits per task. No external dependency needed.
|
|
404
387
|
|
|
405
388
|
**Q: Does `/dw-autopilot` replace all other commands?**
|
|
406
389
|
- No. It orchestrates existing commands in sequence. You can still use each command individually for manual control. Autopilot is for when you want to go from a wish to a PR with minimal intervention.
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
<system_instructions>
|
|
2
|
-
You are a codebase intelligence assistant. This command
|
|
2
|
+
You are a codebase intelligence assistant. This command answers questions about the project using the queryable index in `.dw/intel/` (built by `/dw-map-codebase`) and the human-readable conventions in `.dw/rules/` (built by `/dw-analyze-project`).
|
|
3
3
|
|
|
4
4
|
<critical>This command is read-only. Do NOT modify code or project files.</critical>
|
|
5
|
-
<critical>Always cite information sources (file, line
|
|
5
|
+
<critical>Always cite information sources (file path, line number when applicable).</critical>
|
|
6
|
+
<critical>If the index is stale (>7 days old) or absent, surface that to the user — do NOT silently fall back without flagging.</critical>
|
|
6
7
|
|
|
7
8
|
## When to Use
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
- Use to understand how something works in the project (auth flow, data model, route surface)
|
|
9
11
|
- Use to find patterns, conventions, or architectural decisions
|
|
10
12
|
- Use to verify if something already exists before implementing
|
|
11
|
-
- Do NOT use to implement changes (use `/dw-
|
|
13
|
+
- Do NOT use to implement changes (use `/dw-run-task`)
|
|
12
14
|
|
|
13
15
|
## Pipeline Position
|
|
14
|
-
|
|
16
|
+
|
|
17
|
+
**Predecessor:** `/dw-map-codebase` (builds `.dw/intel/`) and/or `/dw-analyze-project` (builds `.dw/rules/`) | **Successor:** any `dw-*` command that needs to act on the intel
|
|
18
|
+
|
|
19
|
+
## Complementary Skills
|
|
20
|
+
|
|
21
|
+
| Skill | Trigger |
|
|
22
|
+
|-------|---------|
|
|
23
|
+
| `dw-codebase-intel` | **ALWAYS** when `.dw/intel/` exists. Read `references/query-patterns.md` to map the user query to the right file (stack/files/apis/deps/arch). |
|
|
15
24
|
|
|
16
25
|
## Input Variables
|
|
17
26
|
|
|
@@ -19,42 +28,102 @@ You are a codebase intelligence assistant. This command exists to answer questio
|
|
|
19
28
|
|----------|-------------|---------|
|
|
20
29
|
| `{{QUERY}}` | Question about the codebase | "how does authentication work?" |
|
|
21
30
|
|
|
31
|
+
## File Locations
|
|
32
|
+
|
|
33
|
+
- Machine-readable intel (queried first): `.dw/intel/{stack,files,apis,deps}.json` + `.dw/intel/arch.md`
|
|
34
|
+
- Refresh metadata: `.dw/intel/.last-refresh.json`
|
|
35
|
+
- Human-readable rules (queried second): `.dw/rules/{index,<module>,integrations}.md`
|
|
36
|
+
- Direct grep fallback (queried last): the project source files
|
|
37
|
+
|
|
22
38
|
## Required Behavior
|
|
23
39
|
|
|
24
|
-
1.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
40
|
+
### 1. Stale-index check
|
|
41
|
+
|
|
42
|
+
Before answering, read `.dw/intel/.last-refresh.json` if present:
|
|
43
|
+
|
|
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-map-codebase to refresh.`
|
|
45
|
+
- 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-map-codebase.`
|
|
47
|
+
|
|
48
|
+
Don't refuse to answer — return the best info available.
|
|
49
|
+
|
|
50
|
+
### 2. Query shape detection
|
|
51
|
+
|
|
52
|
+
Classify the user's `{{QUERY}}` into one of the shapes documented in `.agents/skills/dw-codebase-intel/references/query-patterns.md`:
|
|
53
|
+
|
|
54
|
+
- **where-is** — primary: `files.json`, secondary: `apis.json`
|
|
55
|
+
- **what-uses** — primary: `deps.json` (libs) or `files.json` (symbols)
|
|
56
|
+
- **architecture-of** — primary: `arch.md`, secondary: `stack.json`
|
|
57
|
+
- **stack** — primary: `stack.json`
|
|
58
|
+
- **dep-info** — primary: `deps.json`
|
|
59
|
+
- **api-list** — primary: `apis.json`
|
|
60
|
+
- **find-export** — primary: `files.json` (search `exports` arrays)
|
|
61
|
+
- **convention** — primary: `arch.md`, secondary: `.dw/rules/`
|
|
62
|
+
|
|
63
|
+
### 3. Search execution
|
|
64
|
+
|
|
65
|
+
Read the primary file and search for matches (case-insensitive). Rank:
|
|
31
66
|
|
|
32
|
-
|
|
67
|
+
1. Exact symbol/path match
|
|
68
|
+
2. Substring match in keys
|
|
69
|
+
3. Substring match in descriptions
|
|
33
70
|
|
|
34
|
-
|
|
71
|
+
If primary yields zero matches, fall back to secondary, then to grep.
|
|
35
72
|
|
|
36
|
-
|
|
37
|
-
- Delegate to `/gsd-intel "{{QUERY}}"` for indexed lookup
|
|
38
|
-
- GSD returns information from: architectural assumptions, decision spaces, behavioral references, UI patterns
|
|
39
|
-
- Enrich with `.dw/rules/` data when relevant
|
|
73
|
+
### 4. Cross-reference
|
|
40
74
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
75
|
+
For richer answers, cross-reference the primary match with related intel:
|
|
76
|
+
|
|
77
|
+
- A file from `files.json` → look up its dependencies in `deps.json`
|
|
78
|
+
- An API from `apis.json` → resolve its handler file via `apis.json[entry].file`, then list that file's exports from `files.json`
|
|
79
|
+
- A dep from `deps.json` → list `used_by` and look up each entry in `files.json` for context
|
|
80
|
+
|
|
81
|
+
### 5. Synthesize and cite
|
|
82
|
+
|
|
83
|
+
Don't dump JSON. Write a 3-8 line answer that:
|
|
84
|
+
|
|
85
|
+
- Addresses the user's question directly
|
|
86
|
+
- Cites file paths in backticks
|
|
87
|
+
- Includes line numbers when known (read the file briefly if needed)
|
|
88
|
+
- Mentions related concepts the user may want to follow up on
|
|
45
89
|
|
|
46
90
|
## Response Format
|
|
47
91
|
|
|
48
|
-
|
|
92
|
+
```markdown
|
|
93
|
+
[⚠ stale warning if applicable]
|
|
94
|
+
|
|
95
|
+
## Answer: [topic]
|
|
96
|
+
|
|
97
|
+
[Structured answer, 3-8 lines, prose. Cite paths inline.]
|
|
98
|
+
|
|
99
|
+
## Sources
|
|
100
|
+
|
|
101
|
+
- `.dw/intel/files.json` — entries for `<file_a>`, `<file_b>`
|
|
102
|
+
- `.dw/intel/apis.json` — `<endpoint>`
|
|
103
|
+
- `.dw/rules/<module>.md` — convention "<name>"
|
|
104
|
+
- `<src/path/file.ts>:<line>` — direct code reference (only if a file was opened)
|
|
105
|
+
|
|
106
|
+
## Related Commands
|
|
107
|
+
|
|
108
|
+
- `/<dw-cmd>` — [why useful as next step]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Heuristics
|
|
112
|
+
|
|
113
|
+
- **Prefer `.dw/intel/` over grep.** It's curated and faster. Grep only when intel is absent or stale.
|
|
114
|
+
- **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-map-codebase` if `.dw/intel/` is missing.
|
|
116
|
+
- **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
|
+
|
|
118
|
+
## Critical Rules
|
|
49
119
|
|
|
50
|
-
|
|
120
|
+
- <critical>Read-only. NEVER edit code or project files from this command.</critical>
|
|
121
|
+
- <critical>Cite paths. Every claim about the codebase must reference a real file.</critical>
|
|
122
|
+
- <critical>Surface stale-index warnings prominently — do not bury them at the bottom.</critical>
|
|
123
|
+
- Do NOT include secrets/tokens/credentials in any answer (they should not be in `.dw/intel/` to begin with, but defense in depth).
|
|
51
124
|
|
|
52
|
-
|
|
53
|
-
- `.planning/intel/[file].md` — [relevant section]
|
|
54
|
-
- `.dw/rules/[file].md` — [referenced convention]
|
|
55
|
-
- `src/[path]:[line]` — [code reference]
|
|
125
|
+
## Inspired by
|
|
56
126
|
|
|
57
|
-
|
|
58
|
-
- [Suggestion of dw- command to act on the information]
|
|
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/`.
|
|
59
128
|
|
|
60
129
|
</system_instructions>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You are a codebase intelligence orchestrator. Your job is to spawn the `dw-intel-updater` agent (from the `dw-codebase-intel` bundled skill) to read the project's source files and write a queryable index to `.dw/intel/`. Other dev-workflow commands (`/dw-intel`, `/dw-create-prd`, `/dw-create-techspec`, `/dw-code-review`, etc.) read this index instead of doing expensive codebase exploration on every invocation.
|
|
3
|
+
|
|
4
|
+
<critical>This command writes to `.dw/intel/` only. Never modifies application code.</critical>
|
|
5
|
+
<critical>Use the `dw-intel-updater` agent — do NOT inline the intel-generation logic in this command. The agent owns the schema contract.</critical>
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- **First scan**: a fresh project with no `.dw/intel/` yet. Run a full scan.
|
|
10
|
+
- **Incremental refresh**: after a feature branch / large PR landed and source files changed. Run with `--files <paths>` to update only the affected entries.
|
|
11
|
+
- **Scheduled refresh**: every 1-4 weeks to keep the index fresh; the staleness heuristic in `/dw-intel` warns when >7 days old.
|
|
12
|
+
- **After dependency changes**: `/dw-deps-audit --execute` updates lockfiles and may touch deps. Re-run `/dw-map-codebase` afterwards to refresh `deps.json`.
|
|
13
|
+
- Do NOT use for greenfield projects with no source yet — `/dw-new-project` already seeded `.dw/rules/index.md` minimally; nothing to map.
|
|
14
|
+
|
|
15
|
+
## Pipeline Position
|
|
16
|
+
|
|
17
|
+
**Predecessor:** any project with source files (run after `/dw-new-project` for greenfield, or as the first command on a brownfield repo) | **Successor:** `/dw-intel "<query>"` for ad-hoc questions, or `/dw-analyze-project` to enrich `.dw/rules/` with conventions/anti-patterns derived from the intel
|
|
18
|
+
|
|
19
|
+
## Complementary Skills
|
|
20
|
+
|
|
21
|
+
| Skill | Trigger |
|
|
22
|
+
|-------|---------|
|
|
23
|
+
| `dw-codebase-intel` | **ALWAYS** — source of the `dw-intel-updater` agent and reference docs (`intel-format.md`, `incremental-update.md`, `query-patterns.md`) |
|
|
24
|
+
|
|
25
|
+
## Input Variables
|
|
26
|
+
|
|
27
|
+
| Variable | Description | Example |
|
|
28
|
+
|----------|-------------|---------|
|
|
29
|
+
| `{{FOCUS}}` | Optional. `full` (default if no `--files`), `partial` (when `--files` is set) | `partial` |
|
|
30
|
+
| `{{FILES}}` | Optional. Space-separated list of paths to refresh (only meaningful with `--files`) | `src/auth/index.ts src/routes/auth.ts` |
|
|
31
|
+
| `{{SINCE}}` | Optional alternative to `--files`. Git ref to derive changed files from | `HEAD~5` or `origin/main` |
|
|
32
|
+
|
|
33
|
+
## Flags
|
|
34
|
+
|
|
35
|
+
| Flag | Behavior |
|
|
36
|
+
|------|----------|
|
|
37
|
+
| (default) | Full scan if `.dw/intel/` is missing OR `.last-refresh.json` is older than 30 days; otherwise prompts whether to refresh fully or skip |
|
|
38
|
+
| `--full` | Force full scan regardless of state |
|
|
39
|
+
| `--files <a> <b> ...` | Partial update only for the listed paths |
|
|
40
|
+
| `--since <gitref>` | Partial update for files changed since `<gitref>` (uses `git diff --name-only <gitref>...HEAD`) |
|
|
41
|
+
|
|
42
|
+
## File Locations
|
|
43
|
+
|
|
44
|
+
- Output index: `.dw/intel/{stack,files,apis,deps}.json` + `.dw/intel/arch.md`
|
|
45
|
+
- Refresh metadata: `.dw/intel/.last-refresh.json`
|
|
46
|
+
- Skill source: `.agents/skills/dw-codebase-intel/{SKILL.md, agents/intel-updater.md, references/*.md}`
|
|
47
|
+
|
|
48
|
+
## Required Behavior
|
|
49
|
+
|
|
50
|
+
### 1. State detection
|
|
51
|
+
|
|
52
|
+
- Check `.dw/intel/.last-refresh.json` if it exists.
|
|
53
|
+
- Compute project state: greenfield (no source files) → abort with hint; brownfield with no `.dw/intel/` → first scan; existing `.dw/intel/` → decide refresh path.
|
|
54
|
+
|
|
55
|
+
### 2. Mode selection
|
|
56
|
+
|
|
57
|
+
| Condition | Mode |
|
|
58
|
+
|-----------|------|
|
|
59
|
+
| No `.dw/intel/` | full |
|
|
60
|
+
| `--full` flag | full |
|
|
61
|
+
| `--files <list>` flag | partial with explicit list |
|
|
62
|
+
| `--since <ref>` flag | partial with `git diff --name-only <ref>...HEAD` derived list |
|
|
63
|
+
| `.last-refresh.json` >30 days old | prompt user: full / partial / skip |
|
|
64
|
+
| Otherwise | partial since last refresh, derived from `git log --name-only --since=<last_refresh_date>` |
|
|
65
|
+
|
|
66
|
+
### 3. Spawn `dw-intel-updater`
|
|
67
|
+
|
|
68
|
+
Construct the spawn prompt for the agent. Required fields:
|
|
69
|
+
|
|
70
|
+
- `focus: full` or `focus: partial --files <space-separated paths>`
|
|
71
|
+
- `project_root: <absolute path>`
|
|
72
|
+
- Optional `required_reading:` block listing the SKILL.md and references (the agent reads these for context)
|
|
73
|
+
|
|
74
|
+
Spawn the agent and wait for completion.
|
|
75
|
+
|
|
76
|
+
### 4. Verify output
|
|
77
|
+
|
|
78
|
+
After the agent returns:
|
|
79
|
+
|
|
80
|
+
- Verify `.dw/intel/{stack,files,apis,deps}.json` exist and parse as valid JSON.
|
|
81
|
+
- Verify `.dw/intel/arch.md` exists.
|
|
82
|
+
- Verify `.dw/intel/.last-refresh.json` was written and the hashes match the freshly written files.
|
|
83
|
+
- If any of the above fails, report the failure with the agent's output and abort with status `MAP-FAILED`.
|
|
84
|
+
|
|
85
|
+
### 5. Report
|
|
86
|
+
|
|
87
|
+
Print a tight summary:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
## Codebase Map Refreshed
|
|
91
|
+
|
|
92
|
+
Mode: full | partial (<N> files)
|
|
93
|
+
Files written:
|
|
94
|
+
- .dw/intel/stack.json (<bytes>) — <N> languages, <N> frameworks
|
|
95
|
+
- .dw/intel/files.json (<bytes>) — <N> entries
|
|
96
|
+
- .dw/intel/apis.json (<bytes>) — <N> endpoints
|
|
97
|
+
- .dw/intel/deps.json (<bytes>) — <N> deps (<production>/<development>)
|
|
98
|
+
- .dw/intel/arch.md (<lines>) — <pattern name>
|
|
99
|
+
- .dw/intel/.last-refresh.json
|
|
100
|
+
|
|
101
|
+
Next steps:
|
|
102
|
+
- Query the index: /dw-intel "<question>"
|
|
103
|
+
- Build human-readable rules: /dw-analyze-project
|
|
104
|
+
- Audit deps: /dw-deps-audit --scan-only
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Critical Rules
|
|
108
|
+
|
|
109
|
+
- <critical>The agent owns the schema. If the schema needs to change, update the agent file under `.agents/skills/dw-codebase-intel/` first; this command just orchestrates.</critical>
|
|
110
|
+
- <critical>NEVER write `.dw/intel/` manually from this command — always via the agent.</critical>
|
|
111
|
+
- <critical>Atomic writes: the agent writes to `.tmp` files and renames. If a partial write happens, the prior index is preserved.</critical>
|
|
112
|
+
- Do NOT include secrets in any output. The agent's forbidden-files list (`.env*`, `*.key`, `*.pem`, `id_rsa`, etc.) is enforced; if anything leaks through, treat as a CRITICAL bug.
|
|
113
|
+
|
|
114
|
+
## Error Handling
|
|
115
|
+
|
|
116
|
+
- Agent fails → print stdout/stderr, mark `.dw/intel/` as last-known-good (the prior index is preserved by atomic write), exit non-zero.
|
|
117
|
+
- No source files in scope → abort: `"No source files detected (TS/JS/Python/C#/Rust). Run /dw-new-project first or check the project root."`
|
|
118
|
+
- `git diff --since` fails (not a git repo, bad ref) → fall back to full scan with a warning.
|
|
119
|
+
- Source file referenced in existing `.dw/intel/` no longer exists → the agent removes its entry on the next partial update.
|
|
120
|
+
|
|
121
|
+
## Inspired by
|
|
122
|
+
|
|
123
|
+
`dw-map-codebase` is dev-workflow-native. The orchestration pattern (spawn agent, wait, verify, report) and the file-scope conventions are adapted from [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) (`/gsd-map-codebase` + `gsd-intel-updater`) by gsd-build (MIT). dev-workflow specifics: writes to `.dw/intel/` (not `.planning/intel/`), uses a single agent (intel-updater) instead of multiple parallel mappers (the human-readable analysis lives separately in `/dw-analyze-project`), and integrates with `--since <gitref>` for git-aware partial updates.
|
|
124
|
+
|
|
125
|
+
</system_instructions>
|
|
@@ -188,7 +188,7 @@ Adapt `dev:db:migrate` per chosen ORM (Prisma: `pnpm prisma migrate dev`; Alembi
|
|
|
188
188
|
|
|
189
189
|
Per stack, append to whatever `create-*` tools already generated:
|
|
190
190
|
- Add `.env` (gitignore must exclude it).
|
|
191
|
-
-
|
|
191
|
+
- The `.dw/` directory is preserved across updates by `/dw-update` (rules, spec, intel are user data).
|
|
192
192
|
- For `.dockerignore`: exclude `.git`, `node_modules`, `.dw`, `.agents`, `tests`, `*.md` (in prod images).
|
|
193
193
|
|
|
194
194
|
#### 3.7 Generate GitHub Actions CI workflow
|
|
@@ -64,17 +64,13 @@ Use diagnostic tools based on the project's framework:
|
|
|
64
64
|
7. **VALIDATE**: capture after-state in BOTH resolutions (mobile and desktop), compare before/after, verify accessibility (WCAG 2.2 via `ui-ux-pro-max`), run react-doctor `--diff` if React. If `webapp-testing` is available, capture screenshots at 375px viewport (mobile) and 1440px viewport (desktop).
|
|
65
65
|
8. **PERSIST CONTRACT**: if the user approved a direction, generate `design-contract.md` in the PRD directory (`.dw/spec/prd-[name]/design-contract.md`) with: approved direction, color palette, typography pairing, layout rules, accessibility rules, and component rules. This contract will be read by `dw-run-task` and `dw-run-plan` to ensure visual consistency.
|
|
66
66
|
|
|
67
|
-
##
|
|
67
|
+
## Codebase Intelligence
|
|
68
68
|
|
|
69
|
-
<critical>
|
|
69
|
+
<critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY in the audit phase to surface existing UI patterns.</critical>
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
If GSD is NOT installed:
|
|
76
|
-
- The design contract works normally (file-based in `.dw/spec/`)
|
|
77
|
-
- Audit uses only `.dw/rules/` for context
|
|
71
|
+
- Audit phase: internally run `/dw-intel "UI components, design patterns, layout conventions"` before proposing redesign directions
|
|
72
|
+
- The design contract (`.dw/spec/prd-[name]/design-contract.md`) is the single source of truth for visual consistency — it's read by `/dw-run-task` and `/dw-run-plan` and persists across sessions naturally (no separate registration needed)
|
|
73
|
+
- If `.dw/intel/` does NOT exist, fall back to `.dw/rules/` and direct grep over `apps/web/src/` (or equivalent frontend root)
|
|
78
74
|
|
|
79
75
|
## Preferred Response Format
|
|
80
76
|
|
|
@@ -21,8 +21,9 @@ Prerequisite: Run `/dw-analyze-project` first to understand project patterns and
|
|
|
21
21
|
When available in the project under `./.agents/skills/`, use these skills as analytical support without replacing this command:
|
|
22
22
|
|
|
23
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.
|
|
24
|
+
- `dw-simplification`: **ALWAYS** — every flagged smell is filtered through Chesterton's Fence (what does the construct DO, why was it added, what breaks if removed). Smells with no clear "why-was-it-there" answer get downgraded to `info` and a research note instead of a refactor proposal. Complexity metrics back the severity (cognitive complexity ≥16 or nesting depth ≥4 = `high` candidate; <10 = `low` at most).
|
|
24
25
|
- `security-review`: defer security concerns to this skill — do not duplicate
|
|
25
|
-
- `vercel-react-best-practices`: defer React/Next.js performance patterns to this skill
|
|
26
|
+
- `vercel-react-best-practices`: defer React/Next.js performance patterns to this skill — when flagging perf-related smells, follow its `references/perf-discipline.md` (measure → identify → fix → verify → guard) and cite the metric + tool, not vibes
|
|
26
27
|
|
|
27
28
|
## Analysis Tools
|
|
28
29
|
|
|
@@ -31,13 +32,14 @@ For Angular projects, use `ng lint` as an analytical complement.
|
|
|
31
32
|
|
|
32
33
|
## Codebase Intelligence
|
|
33
34
|
|
|
34
|
-
<critical>If `.
|
|
35
|
-
- Internally run: `/
|
|
36
|
-
- Contextualize findings with
|
|
35
|
+
<critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before flagging refactoring opportunities. Do NOT skip this step.</critical>
|
|
36
|
+
- Internally run: `/dw-intel "tech debt and known technical decisions"`
|
|
37
|
+
- Contextualize findings with documented decisions in `.dw/rules/`
|
|
37
38
|
- Avoid flagging as a smell something that is an intentional recorded decision
|
|
38
39
|
|
|
39
|
-
If `.
|
|
40
|
-
- Use `.dw/rules/` as context
|
|
40
|
+
If `.dw/intel/` does NOT exist:
|
|
41
|
+
- Use `.dw/rules/` as context, falling back to grep
|
|
42
|
+
- Suggest running `/dw-map-codebase` to enrich downstream context
|
|
41
43
|
|
|
42
44
|
## Input Variables
|
|
43
45
|
|