@brunosps00/dev-workflow 1.0.2 → 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.
Files changed (76) hide show
  1. package/README.md +74 -20
  2. package/bin/dev-workflow.js +53 -10
  3. package/lib/agents.js +410 -0
  4. package/lib/aws-categories.js +80 -0
  5. package/lib/azure-categories.js +168 -0
  6. package/lib/constants.js +16 -0
  7. package/lib/doctor.js +213 -0
  8. package/lib/init.js +96 -8
  9. package/lib/install-aws-skills.js +345 -0
  10. package/lib/install-azure-skills.js +231 -0
  11. package/lib/install-state.js +57 -0
  12. package/lib/list-installed.js +27 -0
  13. package/lib/mcp.js +32 -21
  14. package/lib/migrate-skills.js +26 -2
  15. package/lib/profiles.js +44 -0
  16. package/lib/prompts.js +38 -1
  17. package/lib/skill-registry.js +109 -0
  18. package/lib/subtasks.js +264 -0
  19. package/lib/uninstall.js +21 -12
  20. package/lib/utils.js +42 -1
  21. package/lib/wrappers.js +2 -1
  22. package/package.json +1 -1
  23. package/scaffold/agent-registry.json +272 -0
  24. package/scaffold/agents/core/dw-build-fixer.md +21 -0
  25. package/scaffold/agents/core/dw-code-explorer.md +32 -0
  26. package/scaffold/agents/core/dw-code-reviewer.md +28 -0
  27. package/scaffold/agents/core/dw-planner.md +23 -0
  28. package/scaffold/agents/core/dw-test-author.md +21 -0
  29. package/scaffold/agents/csharp/dw-csharp-reviewer.md +15 -0
  30. package/scaffold/agents/csharp/dw-dotnet-build-fixer.md +15 -0
  31. package/scaffold/agents/frontend/dw-qa-runner.md +21 -0
  32. package/scaffold/agents/python/dw-python-build-fixer.md +15 -0
  33. package/scaffold/agents/python/dw-python-reviewer.md +15 -0
  34. package/scaffold/agents/rust/dw-rust-build-fixer.md +15 -0
  35. package/scaffold/agents/rust/dw-rust-reviewer.md +15 -0
  36. package/scaffold/agents/security/dw-security-reviewer.md +24 -0
  37. package/scaffold/agents/security/dw-silent-failure-hunter.md +22 -0
  38. package/scaffold/agents/typescript/dw-typescript-build-fixer.md +15 -0
  39. package/scaffold/agents/typescript/dw-typescript-reviewer.md +15 -0
  40. package/scaffold/en/agent-instructions.md +46 -1
  41. package/scaffold/en/commands/dw-bugfix.md +9 -0
  42. package/scaffold/en/commands/dw-context-budget.md +28 -0
  43. package/scaffold/en/commands/dw-harness-audit.md +31 -0
  44. package/scaffold/en/commands/dw-help.md +15 -5
  45. package/scaffold/en/commands/dw-install-aws-skills.md +166 -0
  46. package/scaffold/en/commands/dw-install-azure-skills.md +138 -0
  47. package/scaffold/en/commands/dw-intel.md +6 -0
  48. package/scaffold/en/commands/dw-plan.md +11 -0
  49. package/scaffold/en/commands/dw-review.md +12 -0
  50. package/scaffold/en/commands/dw-skill-health.md +29 -0
  51. package/scaffold/en/commands/dw-subtask-complete.md +40 -0
  52. package/scaffold/en/commands/dw-subtask-resume.md +21 -0
  53. package/scaffold/en/commands/dw-subtask-start.md +22 -0
  54. package/scaffold/pt-br/agent-instructions.md +46 -1
  55. package/scaffold/pt-br/commands/dw-bugfix.md +9 -0
  56. package/scaffold/pt-br/commands/dw-context-budget.md +28 -0
  57. package/scaffold/pt-br/commands/dw-harness-audit.md +31 -0
  58. package/scaffold/pt-br/commands/dw-help.md +15 -5
  59. package/scaffold/pt-br/commands/dw-install-aws-skills.md +166 -0
  60. package/scaffold/pt-br/commands/dw-install-azure-skills.md +138 -0
  61. package/scaffold/pt-br/commands/dw-intel.md +6 -0
  62. package/scaffold/pt-br/commands/dw-plan.md +11 -0
  63. package/scaffold/pt-br/commands/dw-review.md +12 -0
  64. package/scaffold/pt-br/commands/dw-skill-health.md +29 -0
  65. package/scaffold/pt-br/commands/dw-subtask-complete.md +40 -0
  66. package/scaffold/pt-br/commands/dw-subtask-resume.md +21 -0
  67. package/scaffold/pt-br/commands/dw-subtask-start.md +22 -0
  68. package/scaffold/skill-registry.json +258 -0
  69. package/scaffold/skills/dw-codebase-intel/SKILL.md +12 -5
  70. package/scaffold/skills/dw-context-budget/SKILL.md +45 -0
  71. package/scaffold/skills/dw-search-first/SKILL.md +31 -0
  72. package/scaffold/skills/dw-silent-failure/SKILL.md +33 -0
  73. package/scaffold/skills/dw-verify/SKILL.md +2 -29
  74. package/scaffold/skills/dw-verify/references/verification-discovery-and-attribution.md +32 -0
  75. package/scaffold/skills/humanizer/SKILL.md +7 -412
  76. package/scaffold/skills/humanizer/references/ai-writing-patterns.md +418 -0
@@ -38,6 +38,17 @@ Quando disponíveis em `./.agents/skills/`, use como suporte:
38
38
  - `dw-testing-discipline`: aplicado no estágio de tasks — toda task que adiciona teste nomeia seu invariant per placement doctrine.
39
39
  - `dw-council` (opt-in via `--council`): stress-test multi-conselheiro sobre a decisão arquitetural principal no estágio TechSpec.
40
40
  - `dw-codebase-intel`: consultado para convenções de API, padrões arquiteturais, naming ao desenhar TechSpec.
41
+ - `dw-search-first`: **OBRIGATÓRIO** antes de adicionar nova dependency, integration, MCP server, helper reutilizavel ou abstracao de framework.
42
+ - `dw-context-budget`: use quando o plano passar de 12 tasks, tocar 30+ arquivos, ou exigir carregar muitos docs/skills.
43
+
44
+ ## Agent Dispatch
45
+
46
+ Quando agentes do projeto estiverem instalados, use:
47
+
48
+ - `dw-code-explorer` antes de TechSpec e Tasks para rastrear fluxos existentes e padroes reutilizaveis.
49
+ - `dw-planner` antes de finalizar Tasks para checar slices, dependencias, riscos e criterios de verificacao.
50
+
51
+ Claude Code e OpenCode podem usar agentes nativos. Codex e Copilot usam `.agents/agents/` mais estas instrucoes como fallback.
41
52
 
42
53
  ## Constitution Gate
43
54
 
@@ -51,6 +51,18 @@ Quando disponíveis em `./.agents/skills/`, são invocadas como apoio analítico
51
51
  - `dw-llm-eval`: **OBRIGATÓRIO quando diff toca código de feature AI/LLM**. Reference dataset + ≥2 oracle rungs + judge calibration (se rung 4 usado) + eval run results DEVEM estar no PR. Faltando → REPROVADO.
52
52
  - `security-review`: use quando diff toca auth, autorização, input externo, upload, SQL, secrets, SSRF, XSS ou superfícies sensíveis.
53
53
  - `vercel-react-best-practices`: use quando diff toca React/Next.js.
54
+ - `dw-silent-failure`: use quando diff toca error handling, fallbacks, retries, async jobs, queues, database writes ou APIs externas.
55
+
56
+ ## Agent Dispatch
57
+
58
+ Quando agentes do projeto estiverem instalados, dispare:
59
+
60
+ - `dw-code-reviewer` para o review geral Level 3.
61
+ - `dw-security-reviewer` quando auth, authorization, secrets, SQL, uploads, input externo, SSRF ou XSS estiverem em escopo.
62
+ - `dw-silent-failure-hunter` quando error handling, fallback behavior, queues ou background jobs forem tocados.
63
+ - Reviewers de linguagem como `dw-typescript-reviewer`, `dw-python-reviewer`, `dw-csharp-reviewer` ou `dw-rust-reviewer` quando o modulo estiver instalado e o diff bater com a linguagem.
64
+
65
+ Consolide todos os findings via `dw-review-rigor`; nunca cole relatorios de agentes sem de-duplication.
54
66
 
55
67
  ## Constitution Gate
56
68
 
@@ -0,0 +1,29 @@
1
+ <system_instructions>
2
+ Voce e o auditor de saude de skills e agentes do dev-workflow.
3
+
4
+ ## Quando Usar
5
+ - Use depois de adicionar skills de catalogos externos.
6
+ - Use quando o contexto estiver pesado ou skills se sobrepuserem.
7
+ - Use antes de promover um aprendizado para skill reutilizavel.
8
+
9
+ ## Processo
10
+ 1. Leia `scaffold/skill-registry.json` ao auditar o repo dev-workflow, ou `.dw/skill-registry.json` + `.agents/skills/` em projetos consumidores.
11
+ 2. Agrupe skills por `kind`: `protocol`, `domain-pack`, `recipe-pack`, `asset-pack`.
12
+ 3. Valide que toda skill tem trigger, output esperado, owner, load policy e limite de contexto.
13
+ 4. Aponte nomes duplicados, `SKILL.md` ausente, frontmatter ausente, `SKILL.md` grande demais, e references/assets lidos sem trigger especifico.
14
+ 5. Recomende manter, compactar entrypoint, mesclar, reclassificar, ou remover da visibilidade core.
15
+
16
+ ## Taxonomia
17
+
18
+ - `protocol`: workflow/gate/checklist acionavel que muda a execucao.
19
+ - `domain-pack`: expertise de dominio usada so quando a tarefa entra naquele dominio.
20
+ - `recipe-pack`: receitas/snippets curados carregados por stack ou modo.
21
+ - `asset-pack`: midia/exemplos/assets carregados so para tasks correspondentes.
22
+
23
+ `SKILL.md` deve ser um roteador/protocolo curto. Regras longas, exemplos, paletas, receitas, services e assets ficam em references/assets/rules/recipes e sao carregados sob demanda.
24
+
25
+ ## Saida
26
+ Retorne um relatorio conciso. Nao delete arquivos.
27
+
28
+ Marcador final: `## SKILL-HEALTH COMPLETE`
29
+ </system_instructions>
@@ -0,0 +1,40 @@
1
+ <system_instructions>
2
+ Voce registra um handoff estruturado de subagente.
3
+
4
+ ## Quando Usar
5
+ - Use dentro da sessao child/subagente quando a subtarefa atribuida estiver completa, bloqueada ou fora de budget.
6
+
7
+ ## Formato Obrigatorio
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
+ ## Processo
30
+ 1. Escreva o handoff em um arquivo markdown local.
31
+ 2. Rode:
32
+
33
+ ```bash
34
+ npx @brunosps00/dev-workflow subtask complete --slug=<slug> --file=<handoff.md>
35
+ ```
36
+
37
+ Retorne apenas evidencia resumida. Nao inclua logs completos nem dumps de transcript.
38
+
39
+ Final marker: `## SUBTASK HANDOFF RECORDED`
40
+ </system_instructions>
@@ -0,0 +1,21 @@
1
+ <system_instructions>
2
+ Voce consome handoffs completos de subagentes para a sessao parent.
3
+
4
+ ## Quando Usar
5
+ - Use depois que uma ou mais sessoes child registraram `.dw/subtasks/pending/*/HANDOFF.md`.
6
+ - Use antes de sintetizar decisoes finais do parent a partir de trabalho delegado.
7
+
8
+ ## Processo
9
+ 1. Rode:
10
+
11
+ ```bash
12
+ npx @brunosps00/dev-workflow subtask consume
13
+ ```
14
+
15
+ 2. Leia o resumo impresso e, somente quando houver aprendizado duravel, promova manualmente para `.dw/STATE.md`, `.dw/rules/`, `.dw/intel/`, resumo de bugfix ou artefato de spec.
16
+ 3. Continue o workstream principal a partir dos return packets resumidos.
17
+
18
+ Nao cole transcripts child no contexto principal. O parent continua sendo o unico sintetizador final.
19
+
20
+ Final marker: `## SUBTASKS RESUMED`
21
+ </system_instructions>
@@ -0,0 +1,22 @@
1
+ <system_instructions>
2
+ Voce cria input packets minimos para subagentes.
3
+
4
+ ## Quando Usar
5
+ - Use quando uma subtarefa read-only, QA, review ou build-fix puder rodar separada do contexto principal.
6
+ - Use quando o output seria volumoso: logs, grep amplo, evidencia de teste, QA em browser, review de seguranca.
7
+
8
+ ## Processo
9
+ 1. Escolha o agente instalado mais especifico em `.agents/agents/README.md` ou `scaffold/agent-registry.json`.
10
+ 2. Escreva objetivo estreito, arquivos/fontes permitidos, constraints, output esperado, budget de contexto e criterio de parada.
11
+ 3. Rode:
12
+
13
+ ```bash
14
+ npx @brunosps00/dev-workflow subtask create --agent=<name> --goal="<goal>"
15
+ ```
16
+
17
+ 4. Preencha qualquer fronteira faltante no `.dw/subtasks/pending/<slug>/TASK.md` antes do dispatch.
18
+
19
+ Nunca cole o transcript bruto do parent no task packet.
20
+
21
+ Final marker: `## SUBTASK PACKET READY`
22
+ </system_instructions>
@@ -0,0 +1,258 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "skills": [
4
+ {
5
+ "name": "api-testing-recipes",
6
+ "kind": "recipe-pack",
7
+ "tier": "specialty",
8
+ "owner": "dw-qa",
9
+ "trigger": "API QA, endpoint testing, HTTP recipe generation",
10
+ "expected_output": "A selected API testing recipe and evidence path for the active stack.",
11
+ "load_policy": "lazy-references",
12
+ "context_limit": 12000,
13
+ "bundled": true
14
+ },
15
+ {
16
+ "name": "docker-compose-recipes",
17
+ "kind": "recipe-pack",
18
+ "tier": "specialty",
19
+ "owner": "dw-new-project,dw-dockerize",
20
+ "trigger": "Docker Compose service selection or local infrastructure setup",
21
+ "expected_output": "A selected service recipe and composition guidance.",
22
+ "load_policy": "lazy-references",
23
+ "context_limit": 12000,
24
+ "bundled": true
25
+ },
26
+ {
27
+ "name": "dw-codebase-intel",
28
+ "kind": "protocol",
29
+ "tier": "core",
30
+ "owner": "dw-intel",
31
+ "trigger": "Codebase indexing or codebase intelligence query",
32
+ "expected_output": ".dw/intel index files or a cited answer from the index.",
33
+ "load_policy": "lazy-references",
34
+ "context_limit": 12000,
35
+ "bundled": true
36
+ },
37
+ {
38
+ "name": "dw-context-budget",
39
+ "kind": "protocol",
40
+ "tier": "core",
41
+ "owner": "dw-context-budget",
42
+ "trigger": "Context overhead, slow sessions, many agents/skills/MCPs",
43
+ "expected_output": "A context budget report with concrete savings.",
44
+ "load_policy": "always-small",
45
+ "context_limit": 6000,
46
+ "bundled": true
47
+ },
48
+ {
49
+ "name": "dw-council",
50
+ "kind": "protocol",
51
+ "tier": "specialty",
52
+ "owner": "dw-brainstorm,dw-plan",
53
+ "trigger": "Council mode or high-impact architectural debate",
54
+ "expected_output": "Advisor positions, tension synthesis, and decision recommendation.",
55
+ "load_policy": "lazy-references",
56
+ "context_limit": 12000,
57
+ "bundled": true
58
+ },
59
+ {
60
+ "name": "dw-debug-protocol",
61
+ "kind": "protocol",
62
+ "tier": "core",
63
+ "owner": "dw-bugfix,dw-qa",
64
+ "trigger": "Bugfix, QA fix loop, or non-reproducible failure",
65
+ "expected_output": "Six-step triage, root cause, guard, and verification path.",
66
+ "load_policy": "lazy-references",
67
+ "context_limit": 12000,
68
+ "bundled": true
69
+ },
70
+ {
71
+ "name": "dw-execute-phase",
72
+ "kind": "protocol",
73
+ "tier": "core",
74
+ "owner": "dw-run,dw-autopilot",
75
+ "trigger": "Task execution, plan-checking, waves, checkpoint recovery",
76
+ "expected_output": "Plan-check verdict, wave execution report, or checkpoint summary.",
77
+ "load_policy": "lazy-references",
78
+ "context_limit": 12000,
79
+ "bundled": true
80
+ },
81
+ {
82
+ "name": "dw-git-discipline",
83
+ "kind": "protocol",
84
+ "tier": "core",
85
+ "owner": "dw-commit,dw-generate-pr",
86
+ "trigger": "Commit creation, branch hygiene, PR generation",
87
+ "expected_output": "Atomic commit plan and git hygiene checks.",
88
+ "load_policy": "lazy-references",
89
+ "context_limit": 12000,
90
+ "bundled": true
91
+ },
92
+ {
93
+ "name": "dw-incident-response",
94
+ "kind": "domain-pack",
95
+ "tier": "domain",
96
+ "owner": "dw-bugfix",
97
+ "trigger": "Production critical bug, outage, incident, SEV workflow",
98
+ "expected_output": "Incident triage, communication, resolution, and postmortem artifacts.",
99
+ "load_policy": "lazy-references",
100
+ "context_limit": 12000,
101
+ "bundled": true
102
+ },
103
+ {
104
+ "name": "dw-llm-eval",
105
+ "kind": "domain-pack",
106
+ "tier": "domain",
107
+ "owner": "dw-plan,dw-review,dw-qa",
108
+ "trigger": "AI, LLM, RAG, classifier, agent, or tool-use feature",
109
+ "expected_output": "Eval strategy, oracle choice, dataset requirements, and result checks.",
110
+ "load_policy": "lazy-references",
111
+ "context_limit": 12000,
112
+ "bundled": true
113
+ },
114
+ {
115
+ "name": "dw-memory",
116
+ "kind": "protocol",
117
+ "tier": "core",
118
+ "owner": "dw-run,dw-autopilot",
119
+ "trigger": "Task execution memory, checkpointing, compaction",
120
+ "expected_output": "Updated workflow memory and task-local memory guidance.",
121
+ "load_policy": "lazy-references",
122
+ "context_limit": 12000,
123
+ "bundled": true
124
+ },
125
+ {
126
+ "name": "dw-review-rigor",
127
+ "kind": "protocol",
128
+ "tier": "core",
129
+ "owner": "dw-review",
130
+ "trigger": "Code review, implementation review, or review consolidation",
131
+ "expected_output": "Deduplicated findings ordered by defensible severity.",
132
+ "load_policy": "always-small",
133
+ "context_limit": 12000,
134
+ "bundled": true
135
+ },
136
+ {
137
+ "name": "dw-search-first",
138
+ "kind": "protocol",
139
+ "tier": "core",
140
+ "owner": "dw-plan,dw-find-skills",
141
+ "trigger": "New dependency, integration, MCP server, helper, or abstraction",
142
+ "expected_output": "Adopt/wrap/compose/build decision with checked search channels.",
143
+ "load_policy": "always-small",
144
+ "context_limit": 6000,
145
+ "bundled": true
146
+ },
147
+ {
148
+ "name": "dw-silent-failure",
149
+ "kind": "protocol",
150
+ "tier": "core",
151
+ "owner": "dw-review,dw-bugfix",
152
+ "trigger": "Swallowed errors, dangerous fallbacks, retries, async detachment",
153
+ "expected_output": "Concrete silent-failure findings or an explicit pass.",
154
+ "load_policy": "always-small",
155
+ "context_limit": 6000,
156
+ "bundled": true
157
+ },
158
+ {
159
+ "name": "dw-simplification",
160
+ "kind": "protocol",
161
+ "tier": "specialty",
162
+ "owner": "dw-review,dw-brainstorm",
163
+ "trigger": "Refactor analysis, code smells, complexity, or behavior-preserving simplification",
164
+ "expected_output": "Simplification target, risk, behavior-preserving checks, and recommendation.",
165
+ "load_policy": "lazy-references",
166
+ "context_limit": 12000,
167
+ "bundled": true
168
+ },
169
+ {
170
+ "name": "dw-source-grounding",
171
+ "kind": "protocol",
172
+ "tier": "core",
173
+ "owner": "dw-plan,dw-brainstorm",
174
+ "trigger": "Library/framework/API decision, technical research, dependency audit",
175
+ "expected_output": "Cited source-grounded decision with version and retrieval date.",
176
+ "load_policy": "lazy-references",
177
+ "context_limit": 12000,
178
+ "bundled": true
179
+ },
180
+ {
181
+ "name": "dw-testing-discipline",
182
+ "kind": "protocol",
183
+ "tier": "core",
184
+ "owner": "dw-run,dw-qa,dw-review",
185
+ "trigger": "Writing, reviewing, or debugging tests",
186
+ "expected_output": "Test placement, invariant, anti-pattern checks, and verification guidance.",
187
+ "load_policy": "lazy-references",
188
+ "context_limit": 12000,
189
+ "bundled": true
190
+ },
191
+ {
192
+ "name": "dw-ui-discipline",
193
+ "kind": "protocol",
194
+ "tier": "specialty",
195
+ "owner": "dw-redesign-ui,dw-plan,dw-qa",
196
+ "trigger": "UI design, redesign, visual QA, accessibility, or frontend polish",
197
+ "expected_output": "Grounding answers, state matrix, accessibility checks, and visual risks.",
198
+ "load_policy": "lazy-references",
199
+ "context_limit": 12000,
200
+ "bundled": true
201
+ },
202
+ {
203
+ "name": "dw-verify",
204
+ "kind": "protocol",
205
+ "tier": "core",
206
+ "owner": "dw-run,dw-review,dw-generate-pr",
207
+ "trigger": "Completion claim, commit, PR generation, or fixed bug status",
208
+ "expected_output": "Fresh verification report with cited command evidence.",
209
+ "load_policy": "always-small",
210
+ "context_limit": 12000,
211
+ "bundled": true
212
+ },
213
+ {
214
+ "name": "humanizer",
215
+ "kind": "domain-pack",
216
+ "tier": "domain",
217
+ "owner": "manual,docs",
218
+ "trigger": "Editing AI-generated prose, README, docs, captions, marketing copy",
219
+ "expected_output": "Rewritten prose with AI-writing tells removed and voice preserved.",
220
+ "load_policy": "lazy-references",
221
+ "context_limit": 6000,
222
+ "bundled": true
223
+ },
224
+ {
225
+ "name": "remotion-best-practices",
226
+ "kind": "asset-pack",
227
+ "tier": "media",
228
+ "owner": "manual,remotion",
229
+ "trigger": "Remotion video composition, captions, rendering, transitions, media assets",
230
+ "expected_output": "Selected Remotion rule references and implementation guidance.",
231
+ "load_policy": "lazy-references",
232
+ "context_limit": 8000,
233
+ "bundled": true
234
+ },
235
+ {
236
+ "name": "security-review",
237
+ "kind": "domain-pack",
238
+ "tier": "domain",
239
+ "owner": "dw-secure-audit,dw-review",
240
+ "trigger": "Security review, sensitive code, OWASP checks, auth/payment/input surfaces",
241
+ "expected_output": "High-confidence security findings or explicit pass.",
242
+ "load_policy": "lazy-references",
243
+ "context_limit": 12000,
244
+ "bundled": true
245
+ },
246
+ {
247
+ "name": "vercel-react-best-practices",
248
+ "kind": "recipe-pack",
249
+ "tier": "specialty",
250
+ "owner": "dw-review,dw-redesign-ui,dw-plan",
251
+ "trigger": "React/Next.js performance, hydration, data fetching, bundle or render issues",
252
+ "expected_output": "Selected performance rule references and metric-driven recommendations.",
253
+ "load_policy": "lazy-references",
254
+ "context_limit": 12000,
255
+ "bundled": true
256
+ }
257
+ ]
258
+ }
@@ -46,6 +46,7 @@ The intel directory is the contract. Every file is machine-parseable and referen
46
46
  | `deps.json` | Dependencies: version, type, used_by, invocation | JSON |
47
47
  | `bugfixes.json` | Historical bugfix index aggregated from `.dw/bugfixes/*/SUMMARY.md` (slug, date, modules touched, related concerns, by_module map). Optional — present only if `.dw/bugfixes/` is non-empty. | JSON |
48
48
  | `arch.md` | Human-readable architecture overview + key components + data flow | Markdown |
49
+ | `codemaps/*.md` | Token-lean architecture maps for architecture/backend/frontend/data/dependencies. Optional but recommended for large repos. | Markdown |
49
50
  | `.last-refresh.json` | Timestamps + content hashes for incremental detection (now includes `bugfixes_indexed` count) | JSON |
50
51
 
51
52
  Schemas are documented in `references/intel-format.md`.
@@ -62,10 +63,11 @@ This skill ships ONE agent — `intel-updater` — which produces machine-readab
62
63
 
63
64
  1. **`/dw-intel --build`** is invoked.
64
65
  2. The command spawns `intel-updater` with `focus: full` (first run) or `focus: partial --files <paths>` (incremental).
65
- 3. The agent reads source files (using Glob/Read/Grep; no Bash file listing for cross-platform safety) and writes the intel files (`stack.json`, `files.json`, `apis.json`, `deps.json`, `arch.md`).
66
- 4. If `.dw/bugfixes/` exists and contains at least one `SUMMARY.md`, the agent additionally scans every SUMMARY frontmatter + Files Touched section and writes `bugfixes.json`. SUMMARY files with invalid frontmatter are logged and skipped.
67
- 5. The agent writes `.last-refresh.json` with timestamps + hashes for incremental change detection on the next run, including a `bugfixes_indexed` count.
68
- 6. `/dw-intel --build` reports completion and invites the user to query via `/dw-intel "<question>"`.
66
+ 3. The agent reads source files using iterative retrieval: broad search, relevance evaluation, refined search, then final read set. Use Glob/Read/Grep; no Bash file listing for cross-platform safety.
67
+ 4. The agent writes the intel files (`stack.json`, `files.json`, `apis.json`, `deps.json`, `arch.md`) plus token-lean codemaps in `.dw/intel/codemaps/` when enough structure exists.
68
+ 5. If `.dw/bugfixes/` exists and contains at least one `SUMMARY.md`, the agent additionally scans every SUMMARY frontmatter + Files Touched section and writes `bugfixes.json`. SUMMARY files with invalid frontmatter are logged and skipped.
69
+ 6. The agent writes `.last-refresh.json` with timestamps + hashes for incremental change detection on the next run, including a `bugfixes_indexed` count.
70
+ 7. `/dw-intel --build` reports completion and invites the user to query via `/dw-intel "<question>"`.
69
71
 
70
72
  For human-readable analysis (architecture overview, module conventions, anti-patterns), run `/dw-analyze-project` after `/dw-intel --build` — it reads `.dw/intel/` as input and produces `.dw/rules/`.
71
73
 
@@ -90,7 +92,7 @@ If no `.dw/intel/` exists at all, `/dw-intel` falls back to `.dw/rules/` (seeded
90
92
  - **Cross-platform**: use Glob/Read/Grep; never Bash `ls`/`find`/`cat` (those break on Windows).
91
93
  - **Forbidden files**: never read `.env*` (except `.env.example`/`.env.template`), `*.key`, `*.pem`, `*.pfx`, `*.p12`, `*.keystore`, `*.jks`, `id_rsa`, `id_ed25519`, or files matching `*credential*`/`*secret*` in name. Skip silently if encountered.
92
94
  - **Excluded directories**: `node_modules/`, `.git/`, `dist/`, `build/`, `.dw/` (planning docs, not project code).
93
- - **Output budget**: `files.json` ≤2K tokens, `apis.json` ≤1.5K, `deps.json` ≤1K, `stack.json` ≤500, `arch.md` ≤1.5K, `bugfixes.json` ≤1K. For large repos, prioritize coverage of key files over exhaustive listing. For `bugfixes.json`, keep one-line symptom/root-cause summaries; do not embed full SUMMARY.md content.
95
+ - **Output budget**: `files.json` ≤2K tokens, `apis.json` ≤1.5K, `deps.json` ≤1K, `stack.json` ≤500, `arch.md` ≤1.5K, each `codemaps/*.md` ≤1K, `bugfixes.json` ≤1K. For large repos, prioritize coverage of key files over exhaustive listing. For `bugfixes.json`, keep one-line symptom/root-cause summaries; do not embed full SUMMARY.md content.
94
96
 
95
97
  ## References
96
98
 
@@ -99,6 +101,11 @@ If no `.dw/intel/` exists at all, `/dw-intel` falls back to `.dw/rules/` (seeded
99
101
  - `references/query-patterns.md` — how `/dw-intel` answers different question shapes (where-is, what-uses, architecture-of, dependency-of).
100
102
  - `references/api-design-discipline.md` — Hyrum's Law, contract-first design, error semantics, boundary validation, versioning. Use when intel feeds techspec authoring (`/dw-plan techspec`) for endpoints — design must respect existing project conventions surfaced in `apis.json`. Adapted from [`addyosmani/agent-skills/api-design`](https://github.com/addyosmani/agent-skills/tree/main/api-design) (MIT).
101
103
 
104
+ ## ECC-Inspired Additions
105
+
106
+ - **Iterative retrieval**: subagents should not load broad file sets blindly. They perform at most three search/evaluate/refine cycles, then read only high-relevance files.
107
+ - **Codemaps**: `.dw/intel/codemaps/*.md` stores short maps optimized for agent context instead of forcing repeated source reads.
108
+
102
109
  ## Inspired by
103
110
 
104
111
  Adapted from [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) (`gsd-intel-updater`) by gsd-build (MIT license). Core schemas (`files.json`, `apis.json`, `deps.json`, `stack.json`, `arch.md`) and incremental update protocol preserved. Path conventions changed from `.planning/intel/` to `.dw/intel/`. CLI tooling (`gsd-sdk query intel.*`) replaced by agent-driven inline operations (no separate runtime). The companion `gsd-codebase-mapper` agent (human-readable analysis docs) was NOT ported — its scope overlaps with the existing `/dw-analyze-project` command which writes to `.dw/rules/`.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: dw-context-budget
3
+ description: Audit context overhead from commands, skills, agents, MCPs, and instruction files before sessions degrade.
4
+ allowed-tools:
5
+ - Read
6
+ - Grep
7
+ - Glob
8
+ - Bash
9
+ ---
10
+
11
+ # dw-context-budget
12
+
13
+ Use when a project has many commands, skills, agents, MCP servers, or long instruction files.
14
+
15
+ ## Audit Targets
16
+
17
+ - `CLAUDE.md` and `AGENTS.md`
18
+ - `.dw/commands/*.md`
19
+ - `.agents/skills/*/SKILL.md`
20
+ - `.agents/agents/*.md`
21
+ - `.claude/agents/*.md`
22
+ - `.opencode/agent/*.md`
23
+ - `.claude/settings.json`
24
+
25
+ ## Heuristics
26
+
27
+ - Prose estimate: `word count * 1.3`
28
+ - JSON/code estimate: `character count / 4`
29
+ - Flag command files over 20KB
30
+ - Flag `SKILL.md` files over 12KB
31
+ - Flag agent files over 8KB
32
+ - Flag more than 10 configured MCP servers
33
+ - Flag duplicate copies loaded by more than one platform when a fallback would be enough
34
+
35
+ ## Report
36
+
37
+ Return:
38
+
39
+ 1. Estimated overhead by category.
40
+ 2. Top 10 largest files.
41
+ 3. Duplicate or overlapping components.
42
+ 4. Top 5 concrete savings.
43
+ 5. What must remain loaded because commands depend on it.
44
+
45
+ Inspired by ECC's `context-budget` and `strategic-compact` patterns; adapted for dev-workflow's `.dw/` scaffold and cross-platform wrappers.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: dw-search-first
3
+ description: Research-before-building protocol for dependencies, integrations, MCP servers, libraries, and reusable skills.
4
+ allowed-tools:
5
+ - Read
6
+ - Grep
7
+ - Glob
8
+ - Bash
9
+ ---
10
+
11
+ # dw-search-first
12
+
13
+ Use before writing custom infrastructure, adding an integration, choosing a dependency, or inventing a reusable helper.
14
+
15
+ ## Protocol
16
+
17
+ 1. Define the capability needed and the project constraints.
18
+ 2. Search the existing repo first.
19
+ 3. Check installed skills and `.dw/intel/` for a local pattern.
20
+ 4. Check package registries or official docs when network/tools are available.
21
+ 5. Compare adopt, wrap, compose, or build custom.
22
+ 6. Record the decision in the TechSpec or ADR when it affects architecture.
23
+
24
+ ## Decision Rules
25
+
26
+ - Adopt if there is a maintained exact match with acceptable license and dependency cost.
27
+ - Wrap if the package is strong but needs a thin local adapter.
28
+ - Compose if two small tools beat one large dependency.
29
+ - Build custom only after search channels were checked or explicitly unavailable.
30
+
31
+ Inspired by ECC's `search-first`; adapted to compose with `dw-source-grounding`, `/dw-plan`, and `/dw-find-skills`.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: dw-silent-failure
3
+ description: Checklist for finding swallowed errors, dangerous fallbacks, and lost failure context during review or bugfixes.
4
+ allowed-tools:
5
+ - Read
6
+ - Grep
7
+ - Glob
8
+ - Bash
9
+ ---
10
+
11
+ # dw-silent-failure
12
+
13
+ Use during `/dw-review`, `/dw-bugfix`, and `/dw-qa --fix` when failures may be hidden instead of surfaced.
14
+
15
+ ## Hunt List
16
+
17
+ - Empty `catch` blocks.
18
+ - Fallbacks such as `catch(() => null)` or `catch(() => [])`.
19
+ - Log-only handling where callers need the failure.
20
+ - Generic rethrows that lose stack or input context.
21
+ - Async work launched without awaiting, tracking, or explicit detachment.
22
+ - Network/database/filesystem calls without timeout or rollback where the project requires it.
23
+
24
+ ## Reporting Standard
25
+
26
+ Only flag a finding when you can name:
27
+
28
+ - the exact location,
29
+ - the trigger,
30
+ - the hidden bad outcome,
31
+ - the minimal fix.
32
+
33
+ Inspired by ECC's `silent-failure-hunter`; adapted as both a skill and a dispatchable `dw-silent-failure-hunter` agent.
@@ -158,33 +158,6 @@ Verification failure is information, not a dead end. Protocol:
158
158
 
159
159
  ## Project-Specific Verification Commands
160
160
 
161
- dev-workflow does not hardcode a verification command. Discover it from the project:
161
+ Discover the project gate before claiming success. Prefer documented gates in `.dw/rules/`, then package scripts such as `verify`, `check`, `ci`, or `test`, then Makefile/just/pyproject equivalents. If no verification command exists, state that explicitly in the Verification Report and avoid completion language.
162
162
 
163
- 1. Check `.dw/rules/` for a documented verify command.
164
- 2. Read `package.json` scripts: prefer `verify`, `check`, `ci`, `test`, in that order.
165
- 3. Check for `Makefile`/`make verify`, `pyproject.toml`/`just verify`, etc.
166
- 4. If none is explicit, run the documented test + lint + build sequence.
167
-
168
- If no verification command exists for the project, state that explicitly in the Verification Report and avoid completion language.
169
-
170
- ## Integration With Other dev-workflow Commands
171
-
172
- This skill is invoked transparently from:
173
-
174
- - `/dw-run` — before committing the task's changes
175
- - `/dw-run` — before Level 2 review and before declaring the plan complete
176
- - `/dw-qa --fix` — before marking a bug as resolved in `QA/bugs.md`
177
- - `/dw-bugfix` — before claiming the bug is fixed (original symptom no longer reproduces)
178
- - `/dw-review --code-only` — before emitting an APPROVED verdict
179
- - `/dw-generate-pr` — blocks PR creation if the session has no passing VERIFICATION REPORT post-last-edit
180
-
181
- Callers should mention this skill in their "Skills Complementares" section so the user sees the dependency.
182
-
183
- ## Inspired by
184
-
185
- Ported from Compozy's `cy-final-verify` skill (`/tmp/compozy/.agents/skills/cy-final-verify/SKILL.md`). Adapted for the dev-workflow context:
186
-
187
- - Project-agnostic verification discovery (Compozy assumes `make verify`; dev-workflow scans `package.json`/Makefile/`.dw/rules/`).
188
- - Integration table maps to dev-workflow command names instead of Compozy phases.
189
-
190
- Credit: Compozy project (https://github.com/compozy/compozy).
163
+ Load `references/verification-discovery-and-attribution.md` when you need the full discovery checklist, command integration table, or attribution notes.
@@ -0,0 +1,32 @@
1
+ ## Project-Specific Verification Commands
2
+
3
+ dev-workflow does not hardcode a verification command. Discover it from the project:
4
+
5
+ 1. Check `.dw/rules/` for a documented verify command.
6
+ 2. Read `package.json` scripts: prefer `verify`, `check`, `ci`, `test`, in that order.
7
+ 3. Check for `Makefile`/`make verify`, `pyproject.toml`/`just verify`, etc.
8
+ 4. If none is explicit, run the documented test + lint + build sequence.
9
+
10
+ If no verification command exists for the project, state that explicitly in the Verification Report and avoid completion language.
11
+
12
+ ## Integration With Other dev-workflow Commands
13
+
14
+ This skill is invoked transparently from:
15
+
16
+ - `/dw-run` — before committing the task's changes
17
+ - `/dw-run` — before Level 2 review and before declaring the plan complete
18
+ - `/dw-qa --fix` — before marking a bug as resolved in `QA/bugs.md`
19
+ - `/dw-bugfix` — before claiming the bug is fixed (original symptom no longer reproduces)
20
+ - `/dw-review --code-only` — before emitting an APPROVED verdict
21
+ - `/dw-generate-pr` — blocks PR creation if the session has no passing VERIFICATION REPORT post-last-edit
22
+
23
+ Callers should mention this skill in their "Skills Complementares" section so the user sees the dependency.
24
+
25
+ ## Inspired by
26
+
27
+ Ported from Compozy's `cy-final-verify` skill (`/tmp/compozy/.agents/skills/cy-final-verify/SKILL.md`). Adapted for the dev-workflow context:
28
+
29
+ - Project-agnostic verification discovery (Compozy assumes `make verify`; dev-workflow scans `package.json`/Makefile/`.dw/rules/`).
30
+ - Integration table maps to dev-workflow command names instead of Compozy phases.
31
+
32
+ Credit: Compozy project (https://github.com/compozy/compozy).