@brunosps00/dev-workflow 1.0.4 → 1.0.5
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 +58 -14
- package/bin/dev-workflow.js +29 -3
- package/lib/agents.js +410 -0
- package/lib/constants.js +12 -0
- package/lib/doctor.js +213 -0
- package/lib/init.js +96 -8
- package/lib/install-state.js +57 -0
- package/lib/list-installed.js +27 -0
- package/lib/migrate-skills.js +26 -2
- package/lib/profiles.js +44 -0
- package/lib/skill-registry.js +109 -0
- package/lib/subtasks.js +264 -0
- package/lib/uninstall.js +21 -12
- package/lib/utils.js +42 -1
- package/lib/wrappers.js +2 -1
- package/package.json +1 -1
- package/scaffold/agent-registry.json +272 -0
- package/scaffold/agents/core/dw-build-fixer.md +21 -0
- package/scaffold/agents/core/dw-code-explorer.md +32 -0
- package/scaffold/agents/core/dw-code-reviewer.md +28 -0
- package/scaffold/agents/core/dw-planner.md +23 -0
- package/scaffold/agents/core/dw-test-author.md +21 -0
- package/scaffold/agents/csharp/dw-csharp-reviewer.md +15 -0
- package/scaffold/agents/csharp/dw-dotnet-build-fixer.md +15 -0
- package/scaffold/agents/frontend/dw-qa-runner.md +21 -0
- package/scaffold/agents/python/dw-python-build-fixer.md +15 -0
- package/scaffold/agents/python/dw-python-reviewer.md +15 -0
- package/scaffold/agents/rust/dw-rust-build-fixer.md +15 -0
- package/scaffold/agents/rust/dw-rust-reviewer.md +15 -0
- package/scaffold/agents/security/dw-security-reviewer.md +24 -0
- package/scaffold/agents/security/dw-silent-failure-hunter.md +22 -0
- package/scaffold/agents/typescript/dw-typescript-build-fixer.md +15 -0
- package/scaffold/agents/typescript/dw-typescript-reviewer.md +15 -0
- package/scaffold/en/agent-instructions.md +44 -1
- package/scaffold/en/commands/dw-bugfix.md +9 -0
- package/scaffold/en/commands/dw-context-budget.md +28 -0
- package/scaffold/en/commands/dw-harness-audit.md +31 -0
- package/scaffold/en/commands/dw-help.md +15 -5
- package/scaffold/en/commands/dw-intel.md +6 -0
- package/scaffold/en/commands/dw-plan.md +11 -0
- package/scaffold/en/commands/dw-review.md +12 -0
- package/scaffold/en/commands/dw-skill-health.md +29 -0
- package/scaffold/en/commands/dw-subtask-complete.md +40 -0
- package/scaffold/en/commands/dw-subtask-resume.md +21 -0
- package/scaffold/en/commands/dw-subtask-start.md +22 -0
- package/scaffold/pt-br/agent-instructions.md +44 -1
- package/scaffold/pt-br/commands/dw-bugfix.md +9 -0
- package/scaffold/pt-br/commands/dw-context-budget.md +28 -0
- package/scaffold/pt-br/commands/dw-harness-audit.md +31 -0
- package/scaffold/pt-br/commands/dw-help.md +15 -5
- package/scaffold/pt-br/commands/dw-intel.md +6 -0
- package/scaffold/pt-br/commands/dw-plan.md +11 -0
- package/scaffold/pt-br/commands/dw-review.md +12 -0
- package/scaffold/pt-br/commands/dw-skill-health.md +29 -0
- package/scaffold/pt-br/commands/dw-subtask-complete.md +40 -0
- package/scaffold/pt-br/commands/dw-subtask-resume.md +21 -0
- package/scaffold/pt-br/commands/dw-subtask-start.md +22 -0
- package/scaffold/skill-registry.json +258 -0
- package/scaffold/skills/dw-codebase-intel/SKILL.md +12 -5
- package/scaffold/skills/dw-context-budget/SKILL.md +45 -0
- package/scaffold/skills/dw-search-first/SKILL.md +31 -0
- package/scaffold/skills/dw-silent-failure/SKILL.md +33 -0
- package/scaffold/skills/dw-verify/SKILL.md +2 -29
- package/scaffold/skills/dw-verify/references/verification-discovery-and-attribution.md +32 -0
- package/scaffold/skills/humanizer/SKILL.md +7 -412
- package/scaffold/skills/humanizer/references/ai-writing-patterns.md +418 -0
|
@@ -50,6 +50,9 @@ Before picking a command from the Trigger Map, gauge the change's actual scope.
|
|
|
50
50
|
| "Brainstorm X" / "Explore ideas" / "Research X" / "Code-health audit" / "Find tech debt" | `/dw-brainstorm "X"` (auto-dispatches grill / prototype / council / research / refactor-audit / onepager based on signals) |
|
|
51
51
|
| "Where is X?" / "What uses Y?" / "How is Z structured?" | `/dw-intel "<question>"` |
|
|
52
52
|
| "Rebuild the codebase index" / "Refresh intel" | `/dw-intel --build` |
|
|
53
|
+
| "Context is heavy" / "Audit token usage" / "Why is the agent slow?" | `/dw-context-budget` |
|
|
54
|
+
| "Check dev-workflow install" / "Are agents/wrappers healthy?" | `/dw-harness-audit` |
|
|
55
|
+
| "Audit skills" / "Skills feel duplicated or bloated" | `/dw-skill-health` |
|
|
53
56
|
| "Redesign this UI" / "Audit and ship a new design" | `/dw-redesign-ui "<target>"` |
|
|
54
57
|
| "Audit dependencies" / "Are we behind on packages?" | `/dw-secure-audit --plan` |
|
|
55
58
|
| "Scan for vulnerabilities" / "Security check" | `/dw-secure-audit` |
|
|
@@ -81,10 +84,50 @@ When any of these apply, answer directly and do **not** invoke a `dw-*` command:
|
|
|
81
84
|
|
|
82
85
|
## Zoom-out pattern (for unfamiliar code areas)
|
|
83
86
|
|
|
84
|
-
When you land in an area of the codebase you don't know and orientation costs more than the task itself, **don't dive into files first** — ask
|
|
87
|
+
When you land in an area of the codebase you don't know and orientation costs more than the task itself, **don't dive into files first** — ask `dw-code-explorer` to produce a map. Give it the project's domain glossary (`.dw/rules/index.md`) and tell it: "zoom out one level — show me the relevant modules, their public surfaces, who calls them, and the data flow between them, using domain glossary vocabulary." Get the lay of the land, then dive. This avoids the trap of reading the deepest file first and reconstructing the architecture from leaves upward.
|
|
85
88
|
|
|
86
89
|
Adapted from [`mattpocock/skills/zoom-out`](https://github.com/mattpocock/skills/tree/main/zoom-out) (MIT).
|
|
87
90
|
|
|
91
|
+
## Subagent Dispatch Discipline
|
|
92
|
+
|
|
93
|
+
Project agents are installed in `.claude/agents/`, `.opencode/agent/`, `.agents/agents/`, and `.github/agents/` when supported. Claude Code and OpenCode can use native subagents. Copilot receives custom agents. Codex should treat `.agents/agents/` as delegable profiles when subagents are available, or as a manual prompt pack otherwise.
|
|
94
|
+
|
|
95
|
+
Use a subagent when:
|
|
96
|
+
|
|
97
|
+
- The task will generate verbose output: logs, tests, broad grep, QA evidence, browser traces, or research notes.
|
|
98
|
+
- The task is read-only, parallelizable, and has a clear boundary.
|
|
99
|
+
- The task has a compact return value: findings, map, changed files, verification result, or blockers.
|
|
100
|
+
- You need an independent review: security, silent failure, language-specific correctness, or PR readiness.
|
|
101
|
+
|
|
102
|
+
Do not use a subagent when:
|
|
103
|
+
|
|
104
|
+
- The task needs frequent user dialogue.
|
|
105
|
+
- Planning, implementation, and testing share too much live context.
|
|
106
|
+
- The change is small enough to do inline.
|
|
107
|
+
- The subagent would need the full parent transcript to avoid guessing.
|
|
108
|
+
- The delegated task would itself need to spawn other subagents.
|
|
109
|
+
|
|
110
|
+
Limits:
|
|
111
|
+
|
|
112
|
+
- Run at most 3 subagents concurrently per workstream.
|
|
113
|
+
- Default output should stay near the registry budget, usually 900-1200 words.
|
|
114
|
+
- Subagents summarize logs; they return failing lines, paths, commands, decisions, and risks, not full transcripts.
|
|
115
|
+
- The parent is the only final synthesizer.
|
|
116
|
+
- The parent passes an input packet, not raw conversation history. Use `/dw-subtask-start`, `/dw-subtask-complete`, and `/dw-subtask-resume` for local handoffs.
|
|
117
|
+
|
|
118
|
+
Claude-only: prefer named subagents for isolated research, review, build, and QA work. Use forks only when the subtask genuinely needs the parent context.
|
|
119
|
+
|
|
120
|
+
Agent routing:
|
|
121
|
+
|
|
122
|
+
- Use `dw-code-explorer` before planning or debugging unfamiliar areas.
|
|
123
|
+
- Use `dw-build-fixer` only after an actual build/typecheck/lint failure.
|
|
124
|
+
- Use `dw-code-reviewer`, `dw-security-reviewer`, and `dw-silent-failure-hunter` during `/dw-review`.
|
|
125
|
+
- Use language-specific agents when their module is installed and the diff matches the language.
|
|
126
|
+
|
|
127
|
+
## Skill Loading Discipline
|
|
128
|
+
|
|
129
|
+
Skills are compact protocols first. Read the `SKILL.md` entrypoint, then load files under `references/`, `assets/`, `rules/`, or `scripts/` only when the trigger, task, or output requires that deeper material. If a skill feels duplicated, too broad, or expensive for the current task, run `/dw-skill-health`.
|
|
130
|
+
|
|
88
131
|
## Workflow Reference
|
|
89
132
|
|
|
90
133
|
```
|
|
@@ -44,6 +44,15 @@
|
|
|
44
44
|
- `dw-testing-discipline`: use when the fix requires a reproducible E2E/retest flow in a web app — `references/playwright-recipes.md` for recipes, core rules + 6 agent guardrails for any test the fix adds, flaky-discipline if the bug surfaces intermittently.
|
|
45
45
|
- `dw-incident-response`: use when the bug has severity `critical` AND affects production AND was detected by alert/user-report (i.e., the bug IS an incident, not a backlog item). Triggers the 5-phase workflow (triage → investigation → resolution → communication → postmortem) with structured output in `.dw/incidents/`. Fixes ride on `/dw-bugfix` per the incident's resolution phase.
|
|
46
46
|
- `security-review`: use when the root cause touches auth, authorization, external input, upload, secrets, SQL, XSS, SSRF, or other sensitive surfaces
|
|
47
|
+
- `dw-silent-failure`: use when the symptom may be hidden by swallowed errors, dangerous fallbacks, retries, queue workers, or async detachment
|
|
48
|
+
|
|
49
|
+
## Agent Dispatch
|
|
50
|
+
|
|
51
|
+
When project agents are installed:
|
|
52
|
+
- Start with `dw-code-explorer` to trace reproduction flow and likely owners.
|
|
53
|
+
- Use `dw-build-fixer` or the language build-fixer only after a build/typecheck/test command fails.
|
|
54
|
+
- Use `dw-test-author` for the regression test.
|
|
55
|
+
- Use `dw-silent-failure-hunter` when the bug involves missing errors, incorrect success states, or fallback data.
|
|
47
56
|
|
|
48
57
|
## Input Variables
|
|
49
58
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You are the context budget auditor for dev-workflow.
|
|
3
|
+
|
|
4
|
+
## When to Use
|
|
5
|
+
- Use when sessions feel slow, agents read too much, or the project has many skills/MCPs.
|
|
6
|
+
- Use before adding large skill packs or extra MCP servers.
|
|
7
|
+
- Use during `/dw-analyze-project` follow-up when the harness looks bloated.
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
1. Count approximate tokens for `CLAUDE.md`, `AGENTS.md`, `.dw/commands/*.md`, `.agents/skills/*/SKILL.md`, `.agents/agents/*.md`, `.claude/agents/*.md`, `.opencode/agent/*.md`, `.github/agents/*.agent.md`, `.dw/subtasks/pending/*/HANDOFF.md`, and `.claude/settings.json`.
|
|
11
|
+
2. Estimate prose tokens as `words * 1.3`; estimate JSON/tool schemas as `chars / 4`.
|
|
12
|
+
3. Flag:
|
|
13
|
+
- command files over 20KB,
|
|
14
|
+
- skill `SKILL.md` files over 12KB,
|
|
15
|
+
- agent files over 8KB,
|
|
16
|
+
- missing agent `output_budget_words` in `.dw/agent-registry.json` or scaffold registry,
|
|
17
|
+
- pending handoffs averaging over 1200 words,
|
|
18
|
+
- Copilot agents above 30k chars,
|
|
19
|
+
- more than 10 MCP servers,
|
|
20
|
+
- duplicate agent/skill names across platform folders,
|
|
21
|
+
- Claude/OpenCode agent files with provider-incompatible tool or permission fields.
|
|
22
|
+
4. Recommend the top 5 savings with concrete paths.
|
|
23
|
+
|
|
24
|
+
## Output
|
|
25
|
+
Write a concise report in chat. If `.dw/reports/` exists, also write `.dw/reports/context-budget.md`.
|
|
26
|
+
|
|
27
|
+
Final marker: `## CONTEXT-BUDGET COMPLETE`
|
|
28
|
+
</system_instructions>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You are the dev-workflow harness auditor.
|
|
3
|
+
|
|
4
|
+
## When to Use
|
|
5
|
+
- Use after `dev-workflow init`, `update`, or `repair`.
|
|
6
|
+
- Use when commands, agents, skills, or MCPs appear inconsistent.
|
|
7
|
+
- Use before publishing a project setup.
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
1. Run `npx @brunosps00/dev-workflow doctor` if available, otherwise inspect manually.
|
|
11
|
+
2. Score these categories from 0-10:
|
|
12
|
+
- Commands installed
|
|
13
|
+
- Platform wrappers
|
|
14
|
+
- Agent coverage
|
|
15
|
+
- Agent registry
|
|
16
|
+
- Provider compatibility
|
|
17
|
+
- Handoff discipline
|
|
18
|
+
- Tool permissions
|
|
19
|
+
- Parallel-safety coverage
|
|
20
|
+
- MCP configuration
|
|
21
|
+
- Verification gates
|
|
22
|
+
- Security gates
|
|
23
|
+
- Context discipline
|
|
24
|
+
3. Cite missing paths and broken references.
|
|
25
|
+
4. Recommend the top 3 fixes.
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
Return a scorecard and do not mutate files. Tell the user to run `dev-workflow repair` for managed-file drift.
|
|
29
|
+
|
|
30
|
+
Final marker: `## HARNESS-AUDIT COMPLETE`
|
|
31
|
+
</system_instructions>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<system_instructions>
|
|
2
|
-
You are the dev-workflow guide. Display the primary command surface, the typical flow, and contextual shortcuts. Default mode shows
|
|
2
|
+
You are the dev-workflow guide. Display the primary command surface, the typical flow, and contextual shortcuts. Default mode shows the visible command surface; `--advanced` reveals internal/hidden commands.
|
|
3
3
|
|
|
4
4
|
## When to Use
|
|
5
5
|
- User types `/dw-help` to discover commands.
|
|
@@ -35,13 +35,16 @@ Use `/dw-autopilot "wish"` as the gateway for most feature work. The granular co
|
|
|
35
35
|
| `/dw-commit` | Atomic Conventional Commits for pending work. |
|
|
36
36
|
| `/dw-generate-pr [target]` | Push branch, draft PR body, open browser. |
|
|
37
37
|
|
|
38
|
-
## Tier 3 — Specialty (
|
|
38
|
+
## Tier 3 — Specialty (8)
|
|
39
39
|
|
|
40
40
|
| Command | What |
|
|
41
41
|
|---------|------|
|
|
42
42
|
| `/dw-analyze-project` | Scan the repo, write `.dw/rules/` + offer to generate `.dw/constitution.md`. |
|
|
43
43
|
| `/dw-redesign-ui "target"` | Audit, propose 2-3 design directions, ship. Enforces UI grounding + WCAG. |
|
|
44
44
|
| `/dw-functional-doc` | Map screens + flows into a functional doc validated with Playwright. |
|
|
45
|
+
| `/dw-context-budget` | Audit context overhead from commands, skills, agents, instructions, and MCPs. |
|
|
46
|
+
| `/dw-harness-audit` | Score dev-workflow install health: wrappers, agents, MCPs, gates. |
|
|
47
|
+
| `/dw-skill-health` | Audit skills and agents for bloat, duplication, and missing references. |
|
|
45
48
|
| `/dw-new-project` | Interview-driven bootstrap (stack + infra + docker-compose + CI). |
|
|
46
49
|
| `/dw-dockerize` | Detect stack, propose Dockerfile + docker-compose for dev/prod. |
|
|
47
50
|
|
|
@@ -55,7 +58,7 @@ Use `/dw-autopilot "wish"` as the gateway for most feature work. The granular co
|
|
|
55
58
|
|
|
56
59
|
## Advanced / internal commands
|
|
57
60
|
|
|
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.
|
|
61
|
+
Pass `--advanced` to `/dw-help` to see internal commands (`dw-adr`, `dw-intel`, `dw-secure-audit`, `dw-find-skills`, `dw-update`, `dw-subtask-start`, `dw-subtask-complete`, `dw-subtask-resume`) that are usually invoked by other commands.
|
|
59
62
|
```
|
|
60
63
|
|
|
61
64
|
## Advanced mode — `--advanced` flag
|
|
@@ -67,7 +70,7 @@ When invoked with `--advanced`, ALSO show:
|
|
|
67
70
|
|
|
68
71
|
These are auto-invoked by primary commands but available standalone.
|
|
69
72
|
|
|
70
|
-
## Tier 4 — Hidden (
|
|
73
|
+
## Tier 4 — Hidden (8)
|
|
71
74
|
|
|
72
75
|
| Command | What | Invoked by |
|
|
73
76
|
|---------|------|------------|
|
|
@@ -76,6 +79,9 @@ These are auto-invoked by primary commands but available standalone.
|
|
|
76
79
|
| `/dw-secure-audit` | OWASP + Trivy + lockfile + supply-chain scan. Hard gate. Flags: `--scan-only`, `--plan`, `--execute`. | `/dw-review`, `/dw-generate-pr` |
|
|
77
80
|
| `/dw-find-skills "query"` | Search npx skills ecosystem, vet, install. | manual when extending the bundle |
|
|
78
81
|
| `/dw-update` | Update dev-workflow to latest npm release with rollback snapshot. | manual maintenance |
|
|
82
|
+
| `/dw-subtask-start "goal"` | Create a minimal input packet for a subagent. | parent agent before delegation |
|
|
83
|
+
| `/dw-subtask-complete <slug>` | Record a structured child-session handoff. | subagent / child session |
|
|
84
|
+
| `/dw-subtask-resume` | Consume and archive pending handoffs for parent synthesis. | parent agent after delegation |
|
|
79
85
|
```
|
|
80
86
|
|
|
81
87
|
## Keyword mode — `/dw-help <keyword>`
|
|
@@ -96,6 +102,10 @@ Match the keyword and suggest:
|
|
|
96
102
|
| `refactor`, `smell`, `code health` | `/dw-brainstorm --refactor` |
|
|
97
103
|
| `ui`, `design`, `redesign` | `/dw-redesign-ui` |
|
|
98
104
|
| `intel`, `where is`, `what uses` | `/dw-intel` (or `--build` to (re)create the index) |
|
|
105
|
+
| `context`, `tokens`, `slow agent` | `/dw-context-budget` |
|
|
106
|
+
| `harness`, `install`, `wrappers`, `agents` | `/dw-harness-audit` |
|
|
107
|
+
| `subagent`, `subtask`, `handoff`, `delegate` | `/dw-subtask-start` or `/dw-subtask-resume` |
|
|
108
|
+
| `skills`, `skill health`, `bloat` | `/dw-skill-health` |
|
|
99
109
|
| `analyze`, `rules`, `conventions` | `/dw-analyze-project` |
|
|
100
110
|
| `constitution`, `principles` | `/dw-analyze-project` (Step 8 generates the constitution) |
|
|
101
111
|
| `security`, `vulnerabilities`, `cve`, `deps`, `audit deps` | `/dw-secure-audit` |
|
|
@@ -130,6 +140,6 @@ If no keyword matches, show the default surface and a note: "Keyword `<word>` no
|
|
|
130
140
|
- 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).
|
|
131
141
|
|
|
132
142
|
**Q: What happened to all the other commands?**
|
|
133
|
-
- v1.0.0 consolidated
|
|
143
|
+
- v1.0.0 consolidated the old command surface. 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).
|
|
134
144
|
|
|
135
145
|
</system_instructions>
|
|
@@ -29,6 +29,11 @@ You are the codebase intelligence assistant. Two modes: query the existing index
|
|
|
29
29
|
| Skill | Trigger |
|
|
30
30
|
|-------|---------|
|
|
31
31
|
| `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). |
|
|
32
|
+
| `dw-context-budget` | Use when intel files or codemaps grow too large for efficient loading. |
|
|
33
|
+
|
|
34
|
+
## Agent Dispatch
|
|
35
|
+
|
|
36
|
+
When project agents are installed, use `dw-code-explorer` for broad feature tracing and focused codebase discovery. In build mode, prefer iterative retrieval: broad search, relevance evaluation, refined search, then codemap update.
|
|
32
37
|
|
|
33
38
|
## Input Variables
|
|
34
39
|
|
|
@@ -39,6 +44,7 @@ You are the codebase intelligence assistant. Two modes: query the existing index
|
|
|
39
44
|
## File Locations
|
|
40
45
|
|
|
41
46
|
- Machine-readable intel (queried first): `.dw/intel/{stack,files,apis,deps,bugfixes}.json` + `.dw/intel/arch.md`
|
|
47
|
+
- Token-lean codemaps: `.dw/intel/codemaps/{architecture,backend,frontend,data,dependencies}.md`
|
|
42
48
|
- Refresh metadata: `.dw/intel/.last-refresh.json`
|
|
43
49
|
- Human-readable rules (queried second): `.dw/rules/{index,<module>,integrations,concerns}.md`
|
|
44
50
|
- Bugfix history source: `.dw/bugfixes/*/SUMMARY.md`
|
|
@@ -38,6 +38,17 @@ When available under `./.agents/skills/`, use these as planning support:
|
|
|
38
38
|
- `dw-testing-discipline`: applied during the tasks stage — every test-adding task names its invariant per the placement doctrine.
|
|
39
39
|
- `dw-council` (opt-in via `--council`): multi-advisor stress-test on the major architectural decision during TechSpec stage.
|
|
40
40
|
- `dw-codebase-intel`: consulted for API conventions, architecture patterns, naming when designing the TechSpec.
|
|
41
|
+
- `dw-search-first`: **REQUIRED** before adding a new dependency, integration, MCP server, reusable helper, or framework-level abstraction.
|
|
42
|
+
- `dw-context-budget`: use when the plan exceeds 12 tasks, touches 30+ files, or requires loading many docs/skills.
|
|
43
|
+
|
|
44
|
+
## Agent Dispatch
|
|
45
|
+
|
|
46
|
+
When project agents are installed, use:
|
|
47
|
+
|
|
48
|
+
- `dw-code-explorer` before TechSpec and Tasks to trace existing flows and reusable patterns.
|
|
49
|
+
- `dw-planner` before finalizing Tasks to check slices, dependencies, risks, and verification criteria.
|
|
50
|
+
|
|
51
|
+
Claude Code and OpenCode can use native project agents. Codex and Copilot use `.agents/agents/` plus these instructions as the fallback dispatch contract.
|
|
41
52
|
|
|
42
53
|
## Constitution Gate
|
|
43
54
|
|
|
@@ -51,6 +51,18 @@ When available under `./.agents/skills/`, these are invoked as analytical suppor
|
|
|
51
51
|
- `dw-llm-eval`: **REQUIRED when the diff touches AI/LLM feature code paths**. Reference dataset + ≥2 oracle rungs + judge calibration (if rung 4 used) + eval run results MUST be in the PR. Missing → REJECTED.
|
|
52
52
|
- `security-review`: use when the diff touches auth, authorization, external input, upload, SQL, secrets, SSRF, XSS, or sensitive surfaces.
|
|
53
53
|
- `vercel-react-best-practices`: use when the diff touches React/Next.js.
|
|
54
|
+
- `dw-silent-failure`: use when the diff touches error handling, fallbacks, retries, async jobs, queues, database writes, or external API calls.
|
|
55
|
+
|
|
56
|
+
## Agent Dispatch
|
|
57
|
+
|
|
58
|
+
When project agents are installed, dispatch:
|
|
59
|
+
|
|
60
|
+
- `dw-code-reviewer` for the general Level 3 review.
|
|
61
|
+
- `dw-security-reviewer` when auth, authorization, secrets, SQL, uploads, external input, SSRF, or XSS are in scope.
|
|
62
|
+
- `dw-silent-failure-hunter` when error handling, fallback behavior, queues, or background jobs are touched.
|
|
63
|
+
- Language reviewers such as `dw-typescript-reviewer`, `dw-python-reviewer`, `dw-csharp-reviewer`, or `dw-rust-reviewer` when their module is installed and the diff matches that language.
|
|
64
|
+
|
|
65
|
+
Consolidate all findings through `dw-review-rigor`; never paste multiple agent reports without de-duplication.
|
|
54
66
|
|
|
55
67
|
## Constitution Gate
|
|
56
68
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You are the dev-workflow skill and agent health auditor.
|
|
3
|
+
|
|
4
|
+
## When to Use
|
|
5
|
+
- Use after adding skills from external catalogs.
|
|
6
|
+
- Use when context budget is high or skills overlap.
|
|
7
|
+
- Use before promoting a learned pattern into a reusable skill.
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
1. Read `scaffold/skill-registry.json` when auditing the dev-workflow repo, or `.dw/skill-registry.json` + installed `.agents/skills/` in consumer projects.
|
|
11
|
+
2. Group skills by `kind`: `protocol`, `domain-pack`, `recipe-pack`, `asset-pack`.
|
|
12
|
+
3. Validate every skill has a trigger, expected output, owner, load policy, and context limit.
|
|
13
|
+
4. Flag duplicate names, missing `SKILL.md`, missing frontmatter, oversized `SKILL.md`, and references/assets that are read without a specific trigger.
|
|
14
|
+
5. Recommend keep, compact entrypoint, merge, reclassify, or remove from core visibility.
|
|
15
|
+
|
|
16
|
+
## Taxonomy
|
|
17
|
+
|
|
18
|
+
- `protocol`: actionable workflow/gate/checklist that changes execution.
|
|
19
|
+
- `domain-pack`: domain expertise used only when the task enters that domain.
|
|
20
|
+
- `recipe-pack`: curated recipes/snippets loaded by stack or mode.
|
|
21
|
+
- `asset-pack`: media/examples/assets loaded only for matching tasks.
|
|
22
|
+
|
|
23
|
+
`SKILL.md` should be a short router/protocol. Long rules, examples, palettes, recipes, services, and assets must stay in references/assets/rules/recipes and be loaded lazily.
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
Return a concise health report. Do not delete files.
|
|
27
|
+
|
|
28
|
+
Final marker: `## SKILL-HEALTH COMPLETE`
|
|
29
|
+
</system_instructions>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You record a structured subagent handoff.
|
|
3
|
+
|
|
4
|
+
## When to Use
|
|
5
|
+
- Use inside the child/subagent session when the assigned subtask is complete, blocked, or out of budget.
|
|
6
|
+
|
|
7
|
+
## Required Handoff Shape
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
## Objective
|
|
11
|
+
|
|
12
|
+
## Result
|
|
13
|
+
|
|
14
|
+
## Files Read
|
|
15
|
+
|
|
16
|
+
## Files Changed
|
|
17
|
+
|
|
18
|
+
## Decisions
|
|
19
|
+
|
|
20
|
+
## Risks
|
|
21
|
+
|
|
22
|
+
## Verification
|
|
23
|
+
|
|
24
|
+
## Next Steps
|
|
25
|
+
|
|
26
|
+
## Blocked Or Not Done
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Process
|
|
30
|
+
1. Write the handoff to a local markdown file.
|
|
31
|
+
2. Run:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx @brunosps00/dev-workflow subtask complete --slug=<slug> --file=<handoff.md>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Return summarized evidence only. Do not include full logs or transcript dumps.
|
|
38
|
+
|
|
39
|
+
Final marker: `## SUBTASK HANDOFF RECORDED`
|
|
40
|
+
</system_instructions>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You consume completed subagent handoffs for the parent session.
|
|
3
|
+
|
|
4
|
+
## When to Use
|
|
5
|
+
- Use after one or more child sessions have recorded `.dw/subtasks/pending/*/HANDOFF.md`.
|
|
6
|
+
- Use before synthesizing final parent decisions from delegated work.
|
|
7
|
+
|
|
8
|
+
## Process
|
|
9
|
+
1. Run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @brunosps00/dev-workflow subtask consume
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
2. Read the printed summary and, only when durable learning exists, promote it manually into `.dw/STATE.md`, `.dw/rules/`, `.dw/intel/`, a bugfix summary, or a spec artifact.
|
|
16
|
+
3. Continue the parent workstream from the summarized return packets.
|
|
17
|
+
|
|
18
|
+
Do not paste child transcripts into the parent context. The parent remains the only final synthesizer.
|
|
19
|
+
|
|
20
|
+
Final marker: `## SUBTASKS RESUMED`
|
|
21
|
+
</system_instructions>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You create minimal subagent input packets.
|
|
3
|
+
|
|
4
|
+
## When to Use
|
|
5
|
+
- Use when a read-only, QA, review, or build-fix subtask can run separately from the parent context.
|
|
6
|
+
- Use when output would be verbose: logs, broad grep, test evidence, browser QA, security review.
|
|
7
|
+
|
|
8
|
+
## Process
|
|
9
|
+
1. Pick the most specific installed agent from `.agents/agents/README.md` or `scaffold/agent-registry.json`.
|
|
10
|
+
2. Write a narrow goal, allowed files/sources, constraints, expected output, context budget, and stop condition.
|
|
11
|
+
3. Run:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @brunosps00/dev-workflow subtask create --agent=<name> --goal="<goal>"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
4. Fill any missing boundaries in the generated `.dw/subtasks/pending/<slug>/TASK.md` before dispatching.
|
|
18
|
+
|
|
19
|
+
Never paste the full parent transcript into the task packet.
|
|
20
|
+
|
|
21
|
+
Final marker: `## SUBTASK PACKET READY`
|
|
22
|
+
</system_instructions>
|
|
@@ -50,6 +50,9 @@ Antes de escolher um comando da Trigger Map, dimensione o escopo real da mudanç
|
|
|
50
50
|
| "Brainstorm X" / "Explora ideias" / "Research X" / "Auditoria de saúde do código" / "Tech debt" | `/dw-brainstorm "X"` (auto-dispatch dos modos grill / prototype / council / research / refactor-audit / onepager conforme os sinais) |
|
|
51
51
|
| "Onde está X?" / "O que usa Y?" / "Como Z é estruturado?" | `/dw-intel "<pergunta>"` |
|
|
52
52
|
| "Reconstrói o índice" / "Refresh do intel" | `/dw-intel --build` |
|
|
53
|
+
| "Contexto pesado" / "Audita uso de tokens" / "Por que o agente está lento?" | `/dw-context-budget` |
|
|
54
|
+
| "Checa instalação dev-workflow" / "Agentes/wrappers estão saudáveis?" | `/dw-harness-audit` |
|
|
55
|
+
| "Audita skills" / "Skills parecem duplicadas ou pesadas" | `/dw-skill-health` |
|
|
53
56
|
| "Redesign dessa UI" / "Audita e entrega novo design" | `/dw-redesign-ui "<target>"` |
|
|
54
57
|
| "Audita dependências" / "Estamos atrasados em pacotes?" | `/dw-secure-audit --plan` |
|
|
55
58
|
| "Scan de vulnerabilidades" / "Check de segurança" | `/dw-secure-audit` |
|
|
@@ -81,10 +84,50 @@ Quando qualquer destes se aplica, responda direto e **não** invoque comando `dw
|
|
|
81
84
|
|
|
82
85
|
## Padrão zoom-out (para áreas desconhecidas do código)
|
|
83
86
|
|
|
84
|
-
Quando você cai numa área do codebase que não conhece e a orientação custa mais que a tarefa em si, **não mergulhe nos arquivos primeiro** — peça
|
|
87
|
+
Quando você cai numa área do codebase que não conhece e a orientação custa mais que a tarefa em si, **não mergulhe nos arquivos primeiro** — peça ao `dw-code-explorer` que produza um mapa. Passe o glossário de domínio do projeto (`.dw/rules/index.md`) e diga: "zoom out de um nível — me mostra os módulos relevantes, suas superfícies públicas, quem chama, e o fluxo de dados entre eles, usando o vocabulário do glossário de domínio." Pegue a visão geral, e só então mergulhe. Isso evita a armadilha de ler o arquivo mais profundo primeiro e reconstruir a arquitetura das folhas pra cima.
|
|
85
88
|
|
|
86
89
|
Adaptado de [`mattpocock/skills/zoom-out`](https://github.com/mattpocock/skills/tree/main/zoom-out) (MIT).
|
|
87
90
|
|
|
91
|
+
## Disciplina de Dispatch de Subagentes
|
|
92
|
+
|
|
93
|
+
Agentes de projeto sao instalados em `.claude/agents/`, `.opencode/agent/`, `.agents/agents/` e `.github/agents/` quando suportado. Claude Code e OpenCode podem usar subagentes nativos. Copilot recebe custom agents. Codex deve tratar `.agents/agents/` como perfis delegaveis quando houver suporte a subagentes, ou como prompt pack manual caso contrario.
|
|
94
|
+
|
|
95
|
+
Use subagente quando:
|
|
96
|
+
|
|
97
|
+
- A tarefa gerar output volumoso: logs, testes, grep amplo, evidencia de QA, traces de browser ou notas de pesquisa.
|
|
98
|
+
- A tarefa for read-only, paralelizavel e tiver fronteira clara.
|
|
99
|
+
- A tarefa tiver return value compacto: findings, mapa, arquivos alterados, verificacao ou bloqueios.
|
|
100
|
+
- Voce precisar de review independente: seguranca, silent failure, corretude por linguagem ou prontidao de PR.
|
|
101
|
+
|
|
102
|
+
Nao use subagente quando:
|
|
103
|
+
|
|
104
|
+
- A tarefa exigir dialogo frequente com o usuario.
|
|
105
|
+
- Planejamento, implementacao e teste compartilharem contexto vivo demais.
|
|
106
|
+
- A mudanca for pequena o bastante para fazer inline.
|
|
107
|
+
- O subagente precisar do transcript completo do parent para nao chutar.
|
|
108
|
+
- A tarefa delegada precisaria spawnar outros subagentes.
|
|
109
|
+
|
|
110
|
+
Limites:
|
|
111
|
+
|
|
112
|
+
- Rode no maximo 3 subagentes concorrentes por workstream.
|
|
113
|
+
- Output default deve ficar perto do budget do registry, normalmente 900-1200 palavras.
|
|
114
|
+
- Subagentes resumem logs; retornam linhas falhas, paths, comandos, decisoes e riscos, nao transcripts completos.
|
|
115
|
+
- O parent e o unico sintetizador final.
|
|
116
|
+
- O parent passa um input packet, nao historico bruto da conversa. Use `/dw-subtask-start`, `/dw-subtask-complete` e `/dw-subtask-resume` para handoffs locais.
|
|
117
|
+
|
|
118
|
+
Claude-only: prefira named subagents para pesquisa, review, build e QA isolados. Use forks so quando a subtarefa realmente precisar do contexto do parent.
|
|
119
|
+
|
|
120
|
+
Roteamento de agentes:
|
|
121
|
+
|
|
122
|
+
- Use `dw-code-explorer` antes de planejar ou debugar areas desconhecidas.
|
|
123
|
+
- Use `dw-build-fixer` so depois de uma falha real de build/typecheck/lint.
|
|
124
|
+
- Use `dw-code-reviewer`, `dw-security-reviewer` e `dw-silent-failure-hunter` durante `/dw-review`.
|
|
125
|
+
- Use agentes especificos de linguagem quando o modulo estiver instalado e o diff bater com a linguagem.
|
|
126
|
+
|
|
127
|
+
## Disciplina de Carregamento de Skills
|
|
128
|
+
|
|
129
|
+
Skills são protocolos compactos primeiro. Leia o `SKILL.md` de entrada e carregue arquivos em `references/`, `assets/`, `rules/` ou `scripts/` só quando o trigger, a tarefa ou o output exigir esse material mais profundo. Se uma skill parecer duplicada, ampla demais ou cara para a tarefa atual, rode `/dw-skill-health`.
|
|
130
|
+
|
|
88
131
|
## Referência de Workflow
|
|
89
132
|
|
|
90
133
|
```
|
|
@@ -44,6 +44,15 @@
|
|
|
44
44
|
- `dw-testing-discipline`: use quando a correção requer fluxo E2E/reteste reproduzível em web app — `references/playwright-recipes.md` pra recipes, core rules + 6 agent guardrails pra qualquer teste que o fix adicione, flaky-discipline se o bug aparece de forma intermitente.
|
|
45
45
|
- `dw-incident-response`: use quando o bug tem severidade `critical` E afeta produção E foi detectado por alerta/user-report (ou seja, o bug É um incident, não item de backlog). Dispara o workflow de 5 fases (triage → investigation → resolution → communication → postmortem) com saída estruturada em `.dw/incidents/`. As correções rodam via `/dw-bugfix` durante a fase de resolution.
|
|
46
46
|
- `security-review`: use quando a causa raiz toca auth, autorização, input externo, upload, secrets, SQL, XSS, SSRF ou outras superfícies sensíveis
|
|
47
|
+
- `dw-silent-failure`: use quando o sintoma pode estar escondido por erros engolidos, fallbacks perigosos, retries, queue workers ou async detachment
|
|
48
|
+
|
|
49
|
+
## Agent Dispatch
|
|
50
|
+
|
|
51
|
+
Quando agentes do projeto estiverem instalados:
|
|
52
|
+
- Comece com `dw-code-explorer` para rastrear fluxo de reproducao e owners provaveis.
|
|
53
|
+
- Use `dw-build-fixer` ou o build-fixer de linguagem apenas depois que build/typecheck/test falhar.
|
|
54
|
+
- Use `dw-test-author` para o regression test.
|
|
55
|
+
- Use `dw-silent-failure-hunter` quando o bug envolver erros ausentes, success state incorreto ou fallback data.
|
|
47
56
|
|
|
48
57
|
## Variáveis de Entrada
|
|
49
58
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
Voce e o auditor de orcamento de contexto do dev-workflow.
|
|
3
|
+
|
|
4
|
+
## Quando Usar
|
|
5
|
+
- Use quando sessoes parecerem lentas, agentes lerem arquivos demais, ou o projeto tiver muitas skills/MCPs.
|
|
6
|
+
- Use antes de adicionar pacotes grandes de skills ou novos MCP servers.
|
|
7
|
+
- Use como follow-up de `/dw-analyze-project` quando o harness parecer inchado.
|
|
8
|
+
|
|
9
|
+
## Processo
|
|
10
|
+
1. Estime tokens de `CLAUDE.md`, `AGENTS.md`, `.dw/commands/*.md`, `.agents/skills/*/SKILL.md`, `.agents/agents/*.md`, `.claude/agents/*.md`, `.opencode/agent/*.md`, `.github/agents/*.agent.md`, `.dw/subtasks/pending/*/HANDOFF.md` e `.claude/settings.json`.
|
|
11
|
+
2. Estime prosa como `palavras * 1.3`; JSON/schema como `chars / 4`.
|
|
12
|
+
3. Aponte:
|
|
13
|
+
- commands acima de 20KB,
|
|
14
|
+
- `SKILL.md` acima de 12KB,
|
|
15
|
+
- agentes acima de 8KB,
|
|
16
|
+
- agentes sem `output_budget_words` no `.dw/agent-registry.json` ou registry do scaffold,
|
|
17
|
+
- media de handoffs pendentes acima de 1200 palavras,
|
|
18
|
+
- agentes Copilot acima de 30k chars,
|
|
19
|
+
- mais de 10 MCP servers,
|
|
20
|
+
- nomes duplicados entre pastas de plataforma,
|
|
21
|
+
- agentes Claude/OpenCode com campos de tools ou permissions incompativeis com o provider.
|
|
22
|
+
4. Recomende as 5 maiores economias com caminhos concretos.
|
|
23
|
+
|
|
24
|
+
## Saida
|
|
25
|
+
Responda com um relatorio conciso. Se `.dw/reports/` existir, escreva tambem `.dw/reports/context-budget.md`.
|
|
26
|
+
|
|
27
|
+
Marcador final: `## CONTEXT-BUDGET COMPLETE`
|
|
28
|
+
</system_instructions>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
Voce e o auditor do harness dev-workflow.
|
|
3
|
+
|
|
4
|
+
## Quando Usar
|
|
5
|
+
- Use apos `dev-workflow init`, `update` ou `repair`.
|
|
6
|
+
- Use quando comandos, agentes, skills ou MCPs parecerem inconsistentes.
|
|
7
|
+
- Use antes de publicar um setup de projeto.
|
|
8
|
+
|
|
9
|
+
## Processo
|
|
10
|
+
1. Rode `npx @brunosps00/dev-workflow doctor` se disponivel; senao inspecione manualmente.
|
|
11
|
+
2. Pontue de 0-10:
|
|
12
|
+
- Commands instalados
|
|
13
|
+
- Wrappers de plataforma
|
|
14
|
+
- Cobertura de agentes
|
|
15
|
+
- Registry de agentes
|
|
16
|
+
- Compatibilidade por provider
|
|
17
|
+
- Disciplina de handoff
|
|
18
|
+
- Permissoes de ferramentas
|
|
19
|
+
- Cobertura de parallel-safety
|
|
20
|
+
- MCP configuration
|
|
21
|
+
- Gates de verificacao
|
|
22
|
+
- Gates de seguranca
|
|
23
|
+
- Disciplina de contexto
|
|
24
|
+
3. Cite paths ausentes e referencias quebradas.
|
|
25
|
+
4. Recomende os 3 principais fixes.
|
|
26
|
+
|
|
27
|
+
## Saida
|
|
28
|
+
Retorne um scorecard e nao altere arquivos. Para drift de arquivo gerenciado, indique `dev-workflow repair`.
|
|
29
|
+
|
|
30
|
+
Marcador final: `## HARNESS-AUDIT COMPLETE`
|
|
31
|
+
</system_instructions>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<system_instructions>
|
|
2
|
-
Você é o guia do dev-workflow. Exibe a surface primária de comandos, o fluxo típico e atalhos contextuais. Modo padrão mostra
|
|
2
|
+
Você é o guia do dev-workflow. Exibe a surface primária de comandos, o fluxo típico e atalhos contextuais. Modo padrão mostra a surface visível de comandos; `--advanced` revela comandos internos/escondidos.
|
|
3
3
|
|
|
4
4
|
## Quando Usar
|
|
5
5
|
- Usuário digita `/dw-help` para descobrir comandos.
|
|
@@ -33,13 +33,16 @@ Use `/dw-autopilot "desejo"` como gateway pra maior parte do trabalho. Comandos
|
|
|
33
33
|
| `/dw-commit` | Commits atômicos Conventional pra trabalho pendente. |
|
|
34
34
|
| `/dw-generate-pr [target]` | Push branch, draft do PR body, abre browser. |
|
|
35
35
|
|
|
36
|
-
## Tier 3 — Especialidade (
|
|
36
|
+
## Tier 3 — Especialidade (8)
|
|
37
37
|
|
|
38
38
|
| Comando | O que |
|
|
39
39
|
|---------|-------|
|
|
40
40
|
| `/dw-analyze-project` | Scan do repo, escreve `.dw/rules/` + oferece gerar `.dw/constitution.md`. |
|
|
41
41
|
| `/dw-redesign-ui "target"` | Audit, propõe 2-3 direções, entrega. Enforça UI grounding + WCAG. |
|
|
42
42
|
| `/dw-functional-doc` | Mapeia screens + flows em doc funcional validado com Playwright. |
|
|
43
|
+
| `/dw-context-budget` | Audita contexto de commands, skills, agentes, instrucoes e MCPs. |
|
|
44
|
+
| `/dw-harness-audit` | Pontua saude da instalacao: wrappers, agentes, MCPs e gates. |
|
|
45
|
+
| `/dw-skill-health` | Audita skills e agentes por bloat, duplicacao e referencias quebradas. |
|
|
43
46
|
| `/dw-new-project` | Bootstrap por entrevista (stack + infra + docker-compose + CI). |
|
|
44
47
|
| `/dw-dockerize` | Detecta stack, propõe Dockerfile + docker-compose pra dev/prod. |
|
|
45
48
|
|
|
@@ -53,7 +56,7 @@ Use `/dw-autopilot "desejo"` como gateway pra maior parte do trabalho. Comandos
|
|
|
53
56
|
|
|
54
57
|
## Comandos avançados / internos
|
|
55
58
|
|
|
56
|
-
Passe `--advanced` pra ver internos (`dw-adr`, `dw-intel`, `dw-secure-audit`, `dw-find-skills`, `dw-update`) — usualmente invocados por outros comandos.
|
|
59
|
+
Passe `--advanced` pra ver internos (`dw-adr`, `dw-intel`, `dw-secure-audit`, `dw-find-skills`, `dw-update`, `dw-subtask-start`, `dw-subtask-complete`, `dw-subtask-resume`) — usualmente invocados por outros comandos.
|
|
57
60
|
```
|
|
58
61
|
|
|
59
62
|
## Modo advanced — flag `--advanced`
|
|
@@ -65,7 +68,7 @@ ALSO show:
|
|
|
65
68
|
|
|
66
69
|
Auto-invocados por comandos primários mas disponíveis standalone.
|
|
67
70
|
|
|
68
|
-
## Tier 4 — Hidden (
|
|
71
|
+
## Tier 4 — Hidden (8)
|
|
69
72
|
|
|
70
73
|
| Comando | O que | Invocado por |
|
|
71
74
|
|---------|-------|--------------|
|
|
@@ -74,6 +77,9 @@ Auto-invocados por comandos primários mas disponíveis standalone.
|
|
|
74
77
|
| `/dw-secure-audit` | OWASP + Trivy + lockfile + supply-chain scan. Hard gate. Flags: `--scan-only`, `--plan`, `--execute`. | `/dw-review`, `/dw-generate-pr` |
|
|
75
78
|
| `/dw-find-skills "query"` | Busca npx skills ecosystem, valida, instala. | manual ao estender bundle |
|
|
76
79
|
| `/dw-update` | Atualiza dev-workflow pro último release npm com snapshot rollback. | manutenção manual |
|
|
80
|
+
| `/dw-subtask-start "goal"` | Cria um input packet minimo para subagente. | parent antes de delegar |
|
|
81
|
+
| `/dw-subtask-complete <slug>` | Registra handoff estruturado da sessao child. | subagente / sessao child |
|
|
82
|
+
| `/dw-subtask-resume` | Consome e arquiva handoffs pendentes para sintese do parent. | parent apos delegacao |
|
|
77
83
|
```
|
|
78
84
|
|
|
79
85
|
## Modo keyword — `/dw-help <palavra-chave>`
|
|
@@ -92,6 +98,10 @@ Auto-invocados por comandos primários mas disponíveis standalone.
|
|
|
92
98
|
| `refactor`, `smell`, `code health` | `/dw-brainstorm --refactor` |
|
|
93
99
|
| `ui`, `design`, `redesign` | `/dw-redesign-ui` |
|
|
94
100
|
| `intel`, `onde está`, `o que usa` | `/dw-intel` (ou `--build`) |
|
|
101
|
+
| `contexto`, `tokens`, `agente lento` | `/dw-context-budget` |
|
|
102
|
+
| `harness`, `install`, `wrappers`, `agentes` | `/dw-harness-audit` |
|
|
103
|
+
| `subagent`, `subtask`, `handoff`, `delegate`, `delegar` | `/dw-subtask-start` ou `/dw-subtask-resume` |
|
|
104
|
+
| `skills`, `skill health`, `bloat` | `/dw-skill-health` |
|
|
95
105
|
| `analyze`, `rules`, `convenções` | `/dw-analyze-project` |
|
|
96
106
|
| `constitution`, `princípios` | `/dw-analyze-project` (Step 8) |
|
|
97
107
|
| `security`, `vulnerabilidades`, `cve`, `deps` | `/dw-secure-audit` |
|
|
@@ -122,6 +132,6 @@ Sem match: surface padrão + nota.
|
|
|
122
132
|
- Skill `dw-llm-eval` auto-invocada de `/dw-plan tasks`, `/dw-review`, `/dw-qa --ai`.
|
|
123
133
|
|
|
124
134
|
**P: O que aconteceu com outros comandos?**
|
|
125
|
-
- v1.0.0 consolidou
|
|
135
|
+
- v1.0.0 consolidou a surface antiga de comandos. 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 e refactoring-analysis → `/dw-brainstorm --research/--refactor`. Removidos: revert-task (use `git revert` direto).
|
|
126
136
|
|
|
127
137
|
</system_instructions>
|
|
@@ -29,6 +29,11 @@ Voce e o assistente de inteligencia do codebase. Dois modos: consultar o indice
|
|
|
29
29
|
| Skill | Gatilho |
|
|
30
30
|
|-------|---------|
|
|
31
31
|
| `dw-codebase-intel` | **SEMPRE** quando `.dw/intel/` existir. Leia `references/query-patterns.md` para mapear a query do usuario para o arquivo certo (stack/files/apis/deps/arch). |
|
|
32
|
+
| `dw-context-budget` | Use quando arquivos de intel ou codemaps ficarem grandes demais para carregamento eficiente. |
|
|
33
|
+
|
|
34
|
+
## Agent Dispatch
|
|
35
|
+
|
|
36
|
+
Quando agentes do projeto estiverem instalados, use `dw-code-explorer` para rastreamento amplo de feature e descoberta focada do codebase. Em build mode, prefira iterative retrieval: busca ampla, avaliacao de relevancia, busca refinada e depois update de codemap.
|
|
32
37
|
|
|
33
38
|
## Variaveis de Entrada
|
|
34
39
|
|
|
@@ -39,6 +44,7 @@ Voce e o assistente de inteligencia do codebase. Dois modos: consultar o indice
|
|
|
39
44
|
## Localizacao dos Arquivos
|
|
40
45
|
|
|
41
46
|
- Intel machine-readable (consulta primeira): `.dw/intel/{stack,files,apis,deps,bugfixes}.json` + `.dw/intel/arch.md`
|
|
47
|
+
- Codemaps token-lean: `.dw/intel/codemaps/{architecture,backend,frontend,data,dependencies}.md`
|
|
42
48
|
- Metadados de refresh: `.dw/intel/.last-refresh.json`
|
|
43
49
|
- Rules human-readable (consulta segunda): `.dw/rules/{index,<modulo>,integrations,concerns}.md`
|
|
44
50
|
- Fonte do historico de bugfixes: `.dw/bugfixes/*/SUMMARY.md`
|