dw-kit 1.2.0 → 1.3.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/.claude/hooks/post-write.sh +64 -58
- package/.claude/hooks/pre-commit-gate.sh +96 -90
- package/.claude/hooks/privacy-block.sh +99 -94
- package/.claude/hooks/progress-ping.sh +53 -47
- package/.claude/hooks/safety-guard.sh +60 -54
- package/.claude/hooks/scout-block.sh +88 -82
- package/.claude/hooks/session-init.sh +91 -74
- package/.claude/hooks/stop-check.sh +88 -36
- package/.claude/hooks/telemetry-log.sh +34 -0
- package/.claude/rules/code-style.md +37 -37
- package/.claude/rules/commit-standards.md +37 -37
- package/.claude/rules/dw.md +136 -0
- package/.claude/settings.json +120 -99
- package/.claude/skills/dw-arch-review/SKILL.md +119 -119
- package/.claude/skills/dw-archive/SKILL.md +81 -81
- package/.claude/skills/dw-commit/SKILL.md +81 -81
- package/.claude/skills/dw-config-init/SKILL.md +91 -91
- package/.claude/skills/dw-config-validate/SKILL.md +75 -75
- package/.claude/skills/dw-dashboard/SKILL.md +209 -209
- package/.claude/skills/dw-debug/SKILL.md +97 -97
- package/.claude/skills/dw-decision/SKILL.md +116 -0
- package/.claude/skills/dw-docs-update/SKILL.md +125 -125
- package/.claude/skills/dw-estimate/SKILL.md +90 -90
- package/.claude/skills/dw-execute/SKILL.md +98 -98
- package/.claude/skills/dw-flow/SKILL.md +274 -274
- package/.claude/skills/dw-handoff/SKILL.md +81 -81
- package/.claude/skills/dw-kit-report/SKILL.md +152 -152
- package/.claude/skills/dw-log-work/SKILL.md +69 -69
- package/.claude/skills/dw-onboard/SKILL.md +201 -201
- package/.claude/skills/dw-plan/SKILL.md +125 -125
- package/.claude/skills/dw-prompt/SKILL.md +62 -62
- package/.claude/skills/dw-requirements/SKILL.md +98 -98
- package/.claude/skills/dw-research/SKILL.md +114 -114
- package/.claude/skills/dw-retroactive/SKILL.md +311 -311
- package/.claude/skills/dw-review/SKILL.md +66 -66
- package/.claude/skills/dw-rollback/SKILL.md +90 -90
- package/.claude/skills/dw-sprint-review/SKILL.md +99 -99
- package/.claude/skills/dw-task-init/SKILL.md +59 -59
- package/.claude/skills/dw-test-plan/SKILL.md +113 -113
- package/.claude/skills/dw-thinking/SKILL.md +70 -70
- package/.claude/skills/dw-upgrade/SKILL.md +72 -72
- package/.dw/config/dw.config.yml +82 -82
- package/.dw/core/PILLARS.md +122 -0
- package/.dw/core/templates/v2/spec.md +68 -0
- package/.dw/core/templates/v2/tracking.md +62 -0
- package/.dw/core/v14-evaluation-protocol.md +118 -0
- package/CLAUDE.md +42 -39
- package/MIGRATION-v1.3.md +201 -0
- package/README.md +43 -6
- package/package.json +86 -84
- package/src/cli.mjs +45 -9
- package/src/commands/dashboard.mjs +116 -0
- package/src/commands/doctor.mjs +165 -149
- package/src/commands/init.mjs +339 -332
- package/src/commands/metrics.mjs +165 -0
- package/src/commands/upgrade.mjs +297 -262
- package/src/lib/active-index.mjs +87 -0
- package/src/lib/copy.mjs +118 -110
- package/src/lib/cut-analysis.mjs +161 -0
- package/src/lib/telemetry.mjs +80 -0
- package/.claude/rules/dw-core.md +0 -100
- package/.claude/rules/dw-skills.md +0 -53
- package/.claude/rules/workflow-rules.md +0 -77
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# dw-kit v2.0 — 5 Pillar Architecture
|
|
2
|
+
|
|
3
|
+
dw-kit v2.0 positions itself as a **Context-First SDLC Governance Layer** — not a prescriptive workflow engine. AI drives execution; dw-kit provides guardrails, context, and decision trail.
|
|
4
|
+
|
|
5
|
+
**Framing inversion:** `prescriptive workflow → descriptive governance`. Moat is organizational memory compounding over time — something IDE tools (Cursor, Copilot) structurally cannot own because they are session-scoped.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Pillar 1: GUARDS — Block unsafe actions
|
|
10
|
+
|
|
11
|
+
**Role:** Non-negotiable safety boundaries. Enforced by hooks, zero discretion.
|
|
12
|
+
|
|
13
|
+
**Components:**
|
|
14
|
+
- `.claude/hooks/privacy-block.sh` — Prevent reading `.env*`, `credentials*`, `*.pem`, key files
|
|
15
|
+
- `.claude/hooks/pre-commit-gate.sh` — Quality checks + sensitive data scan before commits
|
|
16
|
+
|
|
17
|
+
**Obsolescence test:** AI gets smarter → safety becomes MORE important (velocity × risk). These hooks never obsolete.
|
|
18
|
+
|
|
19
|
+
**Team impact:** Prevents accidents at individual dev level, reduces incident count team-wide.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Pillar 2: SURFACES — Make state visible
|
|
24
|
+
|
|
25
|
+
**Role:** Shared team context. Human and AI both read.
|
|
26
|
+
|
|
27
|
+
**Components:**
|
|
28
|
+
- `.dw/tasks/ACTIVE.md` — Auto-generated index of active tasks (TechLead cat to see team state)
|
|
29
|
+
- `.dw/context/project-map.md` — Module structure and boundaries
|
|
30
|
+
- `.dw/context/modules/*.md` — Per-module documentation
|
|
31
|
+
- `CLAUDE.md` + `.claude/rules/dw.md` — Auto-injected conventions
|
|
32
|
+
|
|
33
|
+
**Obsolescence test:** AI gets smarter → teams coordinate more ambitiously → surfaces become MORE load-bearing.
|
|
34
|
+
|
|
35
|
+
**Team impact:** New dev onboards from surfaces alone. TechLead audits without asking devs "what are you doing?"
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Pillar 3: RECORDS — Capture decisions
|
|
40
|
+
|
|
41
|
+
**Role:** Organizational memory. The WHY behind architectural choices.
|
|
42
|
+
|
|
43
|
+
**Components:**
|
|
44
|
+
- `.dw/decisions/{NNNN}-{title}.md` — ADRs with structured YAML header
|
|
45
|
+
- `/dw:decision` skill — Interactive ADR wizard
|
|
46
|
+
- Status tracking: `Proposed | Accepted | Deprecated | Superseded by ADR-{NNNN}`
|
|
47
|
+
|
|
48
|
+
**Obsolescence test:** AI gets smarter → needs WHY context to avoid technically-correct but strategically-wrong decisions. ADRs become MORE valuable.
|
|
49
|
+
|
|
50
|
+
**Team impact:** Replaces scattered Slack threads. 6-month-old devs find decision trail. New hires understand architecture fast.
|
|
51
|
+
|
|
52
|
+
**Unique moat:** IDE tools (Cursor, Copilot) structurally can't own this — they're session-scoped, ADRs are cross-session artifacts.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Pillar 4: BRIDGES — Connect across sessions
|
|
57
|
+
|
|
58
|
+
**Role:** Continuity over time. Handle the "long chat → no handoff → team lost context" problem.
|
|
59
|
+
|
|
60
|
+
**Components:**
|
|
61
|
+
- `.dw/tasks/{task}/tracking.md` — Mutable progress log with friction journal
|
|
62
|
+
- Stop hook auto-handoff — Appends session summary to tracking.md on uncommitted changes
|
|
63
|
+
- (v2.0+) Living docs detection — Flag when code diverges from docs
|
|
64
|
+
|
|
65
|
+
**Obsolescence test:** AI sessions remain ephemeral regardless of capability. Bridges always needed.
|
|
66
|
+
|
|
67
|
+
**Team impact:** Pick-up-where-left-off works across devs and across sessions. TechLead sees real velocity from actual logs, not status meeting summaries.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Pillar 5: TUNES — Behavioral knobs
|
|
72
|
+
|
|
73
|
+
**Role:** Team/solo customization. Governs how Pillars 1-4 behave.
|
|
74
|
+
|
|
75
|
+
**Components:**
|
|
76
|
+
- `.dw/config/dw.config.yml` — Master config (depth, roles, flags)
|
|
77
|
+
- `.dw/config/dw.config.local.yml` — Machine-specific override (gitignored)
|
|
78
|
+
- Presets: `solo` · `team` · `enterprise`
|
|
79
|
+
- Depth routing: `quick` · `standard` · `thorough`
|
|
80
|
+
- Role system: `dev` · `techlead` · `ba` · `qc` · `pm`
|
|
81
|
+
|
|
82
|
+
**Obsolescence test:** Team size and preferences always vary. Config always needed.
|
|
83
|
+
|
|
84
|
+
**Team impact:** Same dw-kit serves vibe coder (preset solo) and enterprise team (preset enterprise) with same core.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Pillar Cross-References
|
|
89
|
+
|
|
90
|
+
| Question | Answer location |
|
|
91
|
+
|----------|----------------|
|
|
92
|
+
| "Is this safe to do?" | Pillar 1 (Guards) — hooks block |
|
|
93
|
+
| "What's everyone working on?" | Pillar 2 (Surfaces) — ACTIVE.md |
|
|
94
|
+
| "Why did we choose X?" | Pillar 3 (Records) — ADRs |
|
|
95
|
+
| "Where were we yesterday?" | Pillar 4 (Bridges) — tracking.md |
|
|
96
|
+
| "How does our team work?" | Pillar 5 (Tunes) — config + presets |
|
|
97
|
+
|
|
98
|
+
## Design Principles
|
|
99
|
+
|
|
100
|
+
1. **Descriptive, not prescriptive** — AI chooses approach; dw-kit supplies context + safety
|
|
101
|
+
2. **Obsolescence-aware** — Every feature passes "more valuable if AI smarter?" test
|
|
102
|
+
3. **Dual audience** — Solo + team from same core, different defaults
|
|
103
|
+
4. **Data-driven evolution** — Telemetry guides cut decisions, not gut-feel
|
|
104
|
+
5. **Escape hatches** — `--no-dw`, `legacy_features: true`, `DW_NO_TELEMETRY=1`
|
|
105
|
+
|
|
106
|
+
## Future: Pillar 6 — JANITORS (deferred to post-v2.0)
|
|
107
|
+
|
|
108
|
+
**Status:** Draft, deferred — see `.dw/decisions/0003-pillar-6-janitors.md`
|
|
109
|
+
|
|
110
|
+
**Role:** Reactive cleanup of AI-generated waste. Current 5 pillars are *preventive* (govern what goes in); Janitors governs *what stays*.
|
|
111
|
+
|
|
112
|
+
**Rationale:** When 99% of code is AI-generated, prevention alone cannot scale. Inspired by urban waste management — cities use multi-tier systems (sort → collect → recycle → regulate), not just "don't litter."
|
|
113
|
+
|
|
114
|
+
**Revisit:** After v2.0 GA (post 2026-08-15), based on real-world friction data.
|
|
115
|
+
|
|
116
|
+
## Versioning
|
|
117
|
+
|
|
118
|
+
- **v1.3** — Foundation (new format, scaffolding, telemetry)
|
|
119
|
+
- **v1.4** — Data-driven cuts based on telemetry evidence
|
|
120
|
+
- **v2.0** — Unified release with full 5-pillar integration
|
|
121
|
+
- **v2.1+** — Advanced features (auto-handoff LLM, cross-repo, dashboard UI)
|
|
122
|
+
- **v2.2+** — Janitors pillar (if validated by v2.0 friction data)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
task_id: {task-name}
|
|
3
|
+
created: {YYYY-MM-DD}
|
|
4
|
+
status: Draft | Approved | In Progress | Done
|
|
5
|
+
owner: {name}
|
|
6
|
+
depth: quick | standard | thorough
|
|
7
|
+
related_adr: {ADR-XXXX | none}
|
|
8
|
+
target_ship: {YYYY-MM-DD | none}
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Spec: {Task Title}
|
|
12
|
+
|
|
13
|
+
## Intent
|
|
14
|
+
|
|
15
|
+
{1-2 paragraphs — what and why. No background padding.}
|
|
16
|
+
|
|
17
|
+
## Why Now
|
|
18
|
+
|
|
19
|
+
{Forcing function. Deadline, incident, dependency, opportunity.}
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
### In Scope
|
|
24
|
+
|
|
25
|
+
**ST-1: {Subtask name}**
|
|
26
|
+
- {Concrete action}
|
|
27
|
+
- Acceptance: {verifiable criterion}
|
|
28
|
+
- Effort: {hours or days}
|
|
29
|
+
|
|
30
|
+
**ST-2: ...**
|
|
31
|
+
|
|
32
|
+
### Out of Scope (Won't Contain)
|
|
33
|
+
|
|
34
|
+
- {Explicit exclusions — prevents scope creep}
|
|
35
|
+
|
|
36
|
+
## Timeline (if ship target)
|
|
37
|
+
|
|
38
|
+
| Phase | Duration | Target Date |
|
|
39
|
+
|-------|----------|-------------|
|
|
40
|
+
| ... | ... | ... |
|
|
41
|
+
|
|
42
|
+
## Risks & Mitigations
|
|
43
|
+
|
|
44
|
+
| Risk | Severity | Mitigation |
|
|
45
|
+
|------|----------|-----------|
|
|
46
|
+
| ... | H/M/L | ... |
|
|
47
|
+
|
|
48
|
+
## Success Criteria
|
|
49
|
+
|
|
50
|
+
Measurable outcomes (not vibes):
|
|
51
|
+
|
|
52
|
+
- [ ] {Numeric threshold, e.g., "latency <100ms p95"}
|
|
53
|
+
- [ ] {Binary gate, e.g., "passes smoke test"}
|
|
54
|
+
|
|
55
|
+
## Dependencies
|
|
56
|
+
|
|
57
|
+
- {Upstream blockers}
|
|
58
|
+
- {External systems}
|
|
59
|
+
|
|
60
|
+
## Known Unknowns (admitted gaps)
|
|
61
|
+
|
|
62
|
+
- {Question 1 — to resolve during execution}
|
|
63
|
+
|
|
64
|
+
## Acceptance (Task Complete When)
|
|
65
|
+
|
|
66
|
+
- [ ] {High-level criteria, e.g., "shipped to prod"}
|
|
67
|
+
- [ ] {Documentation updated}
|
|
68
|
+
- [ ] {Migration note added if breaking}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
task_id: {task-name}
|
|
3
|
+
started: {YYYY-MM-DD}
|
|
4
|
+
last_updated: {YYYY-MM-DD}
|
|
5
|
+
status: Not Started | In Progress | Blocked | Done
|
|
6
|
+
current_phase: {phase name}
|
|
7
|
+
blockers: {none | description}
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Tracking: {Task Title}
|
|
11
|
+
|
|
12
|
+
## Status Snapshot
|
|
13
|
+
|
|
14
|
+
**Phase:** {current}
|
|
15
|
+
**Next milestone:** {date or deliverable}
|
|
16
|
+
|
|
17
|
+
## Subtask Progress
|
|
18
|
+
|
|
19
|
+
| # | Subtask | Status | Date | Notes |
|
|
20
|
+
|---|---------|--------|------|-------|
|
|
21
|
+
| ST-1 | ... | ⬜ Pending | — | |
|
|
22
|
+
|
|
23
|
+
Status legend: ⬜ Pending · 🟡 In Progress · ✅ Done · 🔴 Blocked · ⏸ Paused
|
|
24
|
+
|
|
25
|
+
## Changelog
|
|
26
|
+
|
|
27
|
+
### {YYYY-MM-DD} — {Session/commit title}
|
|
28
|
+
|
|
29
|
+
**Actions taken:**
|
|
30
|
+
- ...
|
|
31
|
+
|
|
32
|
+
**Decisions made:**
|
|
33
|
+
- ...
|
|
34
|
+
|
|
35
|
+
**Pain points logged:**
|
|
36
|
+
- ...
|
|
37
|
+
|
|
38
|
+
## Handoff Notes
|
|
39
|
+
|
|
40
|
+
**For next session (or next agent):**
|
|
41
|
+
|
|
42
|
+
- **Read first:** {files}
|
|
43
|
+
- **Current state:** {phase, subtask}
|
|
44
|
+
- **Don't do:** {anti-patterns}
|
|
45
|
+
- **Watch out:** {risks, gotchas}
|
|
46
|
+
|
|
47
|
+
## Friction Journal
|
|
48
|
+
|
|
49
|
+
Every time current system causes friction while working, append here:
|
|
50
|
+
|
|
51
|
+
| Date | Friction | Component | Proposed fix |
|
|
52
|
+
|------|----------|-----------|-------------|
|
|
53
|
+
| ... | ... | ... | ... |
|
|
54
|
+
|
|
55
|
+
## Agent Debate Log (optional, for thorough depth)
|
|
56
|
+
|
|
57
|
+
### {Date} — {Context}
|
|
58
|
+
|
|
59
|
+
**Red-bot findings:** ...
|
|
60
|
+
**Blue-bot suggestions:** ...
|
|
61
|
+
**Incorporated:** ...
|
|
62
|
+
**Deferred:** ...
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# v1.4 Evaluation Protocol
|
|
2
|
+
|
|
3
|
+
> How to decide what to cut in v1.4, based on telemetry evidence from v1.3 in production.
|
|
4
|
+
> Anchored to [ADR-0001](../decisions/0001-v2-pragmatic-lean.md) Cut Criteria Matrix.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Prove dw-kit can **cut itself** when data says so — validates the "not a framework cage" principle and grows organizational memory via ADRs.
|
|
11
|
+
|
|
12
|
+
## Timeline
|
|
13
|
+
|
|
14
|
+
| Phase | Dates | Activity |
|
|
15
|
+
|-------|-------|----------|
|
|
16
|
+
| Prep | Week 0 | v1.3.0 published + installed on all teams |
|
|
17
|
+
| Collect | Week 1–4 | Normal use; telemetry accumulates locally per dev |
|
|
18
|
+
| Aggregate | End of Week 4 | Each dev exports `.dw/metrics/events.jsonl`, TechLead merges |
|
|
19
|
+
| Analyze | Week 5 (day 1–2) | Run `dw metrics cut-analysis` on merged data |
|
|
20
|
+
| Survey | Week 5 (day 2–3) | Team survey on flagged items (qualitative check) |
|
|
21
|
+
| Decide | Week 5 (day 4) | ADR per confirmed cut |
|
|
22
|
+
| Execute | Week 5 (day 5) | Remove files + settings + write MIGRATION-v1.4.md |
|
|
23
|
+
| Ship | Week 6 | v1.4.0 release |
|
|
24
|
+
|
|
25
|
+
## Evaluation Steps
|
|
26
|
+
|
|
27
|
+
### 1. Collect (end of week 4)
|
|
28
|
+
|
|
29
|
+
Each dev runs:
|
|
30
|
+
```bash
|
|
31
|
+
cp .dw/metrics/events.jsonl ~/dw-metrics-<dev-name>.jsonl
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
TechLead merges into a single evaluation workspace:
|
|
35
|
+
```bash
|
|
36
|
+
mkdir -p ~/dw-v14-eval/.dw/metrics
|
|
37
|
+
cat ~/dw-metrics-*.jsonl > ~/dw-v14-eval/.dw/metrics/events.jsonl
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 2. Analyze
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
cd ~/dw-v14-eval
|
|
44
|
+
dw metrics cut-analysis --since 2026-05-12
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Output flags skills/hooks qualifying per [ADR-0001 Cut Criteria](../decisions/0001-v2-pragmatic-lean.md):
|
|
48
|
+
|
|
49
|
+
- **Skill**: `uses/week/dev < 5` AND `devs ≥ 5` AND `coverage_days ≥ 21`
|
|
50
|
+
- **Hook**: `avg_latency > 500ms` OR `fires/session > 10`
|
|
51
|
+
|
|
52
|
+
**Caveat**: session-hash proxy undercounts real headcount. If flagged count is borderline → lean keep.
|
|
53
|
+
|
|
54
|
+
### 3. Survey (qualitative gate)
|
|
55
|
+
|
|
56
|
+
For each flagged item, ask the team:
|
|
57
|
+
|
|
58
|
+
1. Did you use `/dw:{name}` in the last 4 weeks?
|
|
59
|
+
2. If removed, would you miss it? (1=no / 5=yes)
|
|
60
|
+
3. Any use case that telemetry wouldn't capture?
|
|
61
|
+
|
|
62
|
+
**Cut only if**: telemetry flags AND <30% of devs answer ≥4 on question 2.
|
|
63
|
+
|
|
64
|
+
### 4. Decide (per cut)
|
|
65
|
+
|
|
66
|
+
For each confirmed cut:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
/dw:decision "Remove {hook-or-skill-name}"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
ADR must include:
|
|
73
|
+
- Evidence: uses/week/dev, fires/session, latency (paste from `cut-analysis`)
|
|
74
|
+
- Survey result
|
|
75
|
+
- Rollback plan (git revert SHA + how to reinstate)
|
|
76
|
+
- Supersedes line if any prior ADR protected this item
|
|
77
|
+
|
|
78
|
+
### 5. Execute
|
|
79
|
+
|
|
80
|
+
For each cut:
|
|
81
|
+
- Delete `.claude/hooks/{name}.sh` or `.claude/skills/dw-{name}/`
|
|
82
|
+
- Remove entry from `.claude/settings.json` hooks block
|
|
83
|
+
- Remove from `package.json#files` if listed
|
|
84
|
+
- Add row to `MIGRATION-v1.4.md` with "What changed / Why / Rollback"
|
|
85
|
+
|
|
86
|
+
### 6. Ship
|
|
87
|
+
|
|
88
|
+
- Version bump: `1.3.x → 1.4.0`
|
|
89
|
+
- Split commits: one per cut + one for MIGRATION doc
|
|
90
|
+
- `npm publish`
|
|
91
|
+
- Announce to teams with link to MIGRATION-v1.4.md and relevant ADRs
|
|
92
|
+
|
|
93
|
+
## Protected Items (never cut in v1.4)
|
|
94
|
+
|
|
95
|
+
**Critical-path skills** (workflow load-bearing):
|
|
96
|
+
`dw:flow`, `dw:task-init`, `dw:commit`, `dw:handoff`, `dw:execute`, `dw:plan`, `dw:research`, `dw:thinking`, `dw:review`, `dw:debug`, `dw:decision`
|
|
97
|
+
|
|
98
|
+
**Per-project skills** (low cadence is expected):
|
|
99
|
+
`dw:onboard`, `dw:retroactive`, `dw:config-init`, `dw:upgrade`, `dw:rollback`
|
|
100
|
+
|
|
101
|
+
If any flagged by matrix → override is "keep" with a 1-line note in the analysis report.
|
|
102
|
+
|
|
103
|
+
## Failure Modes
|
|
104
|
+
|
|
105
|
+
| Failure | Mitigation |
|
|
106
|
+
|---------|------------|
|
|
107
|
+
| <21 days coverage | Postpone v1.4, extend collection window |
|
|
108
|
+
| <5 unique sessions | Insufficient data; wait or onboard more devs to v1.3 |
|
|
109
|
+
| Data merge error | Each jsonl is self-contained; re-merge from backups |
|
|
110
|
+
| Team disagrees with data | Qualitative survey overrides; document in ADR |
|
|
111
|
+
| Post-cut regret | Execute rollback plan from ADR; issue v1.4.1 patch |
|
|
112
|
+
|
|
113
|
+
## Success Signals
|
|
114
|
+
|
|
115
|
+
- ≥2 ADRs written (shows data-driven cuts happened, not just "feels right")
|
|
116
|
+
- Auto-loaded rules bytes ↓ ≥30% from v1.3 baseline ([baseline.md](../tasks/dw-kit-v2-lean-optimization/baseline.md))
|
|
117
|
+
- Team NPS for dw-kit ≥ v1.3 level (cuts didn't hurt workflow)
|
|
118
|
+
- Zero rollback in first 2 weeks post-v1.4
|
package/CLAUDE.md
CHANGED
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
# dw-kit (repo)
|
|
2
|
-
|
|
3
|
-
Workflow toolkit codebase.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.dw/
|
|
28
|
-
core/ WORKFLOW
|
|
29
|
-
|
|
30
|
-
tasks/ Active
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
1
|
+
# dw-kit (repo)
|
|
2
|
+
|
|
3
|
+
Workflow toolkit codebase. Rules live in `.claude/rules/` (auto-loaded).
|
|
4
|
+
|
|
5
|
+
**v2.0 direction:** Context-First SDLC Governance Layer (5 pillars — see `.dw/core/PILLARS.md`)
|
|
6
|
+
**Current:** v1.4.0-dev · v1.3.0 ready to ship · ADR-0001 active
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Tech Stack
|
|
11
|
+
|
|
12
|
+
- Runtime: Node.js ≥18, ESM (`.mjs`)
|
|
13
|
+
- CLI: `commander` · UI: `enquirer`, `chalk` · Config: `js-yaml`, `ajv`
|
|
14
|
+
- Tests: `node src/smoke-test.mjs`
|
|
15
|
+
|
|
16
|
+
## Repo Structure
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
bin/ CLI entrypoint
|
|
20
|
+
src/
|
|
21
|
+
commands/ CLI subcommands (init, upgrade, dashboard, metrics, ...)
|
|
22
|
+
lib/ Shared utilities (config, telemetry, active-index, ...)
|
|
23
|
+
.claude/
|
|
24
|
+
hooks/ Bash hooks (Guards pillar)
|
|
25
|
+
rules/ dw.md (consolidated) + code-style + commit-standards
|
|
26
|
+
skills/ Slash commands with dw:* namespace
|
|
27
|
+
.dw/
|
|
28
|
+
core/ WORKFLOW · THINKING · QUALITY · ROLES · PILLARS · templates/
|
|
29
|
+
decisions/ ADRs (Records pillar)
|
|
30
|
+
tasks/ Active + archive/ (Bridges pillar — via tracking.md)
|
|
31
|
+
metrics/ Local telemetry (events.jsonl)
|
|
32
|
+
config/ dw.config.yml
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Dev Notes
|
|
36
|
+
|
|
37
|
+
- All source ESM — no CommonJS
|
|
38
|
+
- `TOOLKIT_ROOT` resolved from `import.meta.url` in each command
|
|
39
|
+
- Hooks python3-free (node only — Windows compat)
|
|
40
|
+
- `dw-kit-evolve` + `dw-kit-audit` are maintainer-only — excluded from npm package
|
|
41
|
+
- Published package files declared explicitly in `package.json#files`
|
|
42
|
+
- Telemetry local-only, `DW_NO_TELEMETRY=1` to disable
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Migration Guide — dw-kit v1.2.x → v1.3
|
|
2
|
+
|
|
3
|
+
**Target version:** 1.3.0
|
|
4
|
+
**Ship date:** 2026-05-12 (target)
|
|
5
|
+
**Status:** In Progress
|
|
6
|
+
|
|
7
|
+
This guide documents all user-visible changes in v1.3. v1.3 is **fully backward compatible** with v1.2.x — existing projects continue to work. New features are opt-in.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## At a Glance
|
|
12
|
+
|
|
13
|
+
| Area | Change | Impact |
|
|
14
|
+
|------|--------|--------|
|
|
15
|
+
| Task docs | New 2-file format (`spec.md` + `tracking.md`) available; 3-file legacy still works | Opt-in |
|
|
16
|
+
| Decisions layer | New `.dw/decisions/` directory for ADRs | New feature |
|
|
17
|
+
| ACTIVE index | `.dw/tasks/ACTIVE.md` auto-generated | New feature |
|
|
18
|
+
| Telemetry | Local-only metrics in `.dw/metrics/events.jsonl` | Opt-out via `DW_NO_TELEMETRY=1` |
|
|
19
|
+
| Solo preset | `dw init --preset solo` available | New option |
|
|
20
|
+
| Skill naming | `/dw-*` may be renamed to `/dw:*` (pending harness verification) | **Potentially breaking** |
|
|
21
|
+
| Archive | 8 Done tasks moved to `.dw/tasks/archive/` in dw-kit repo itself | No user impact |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## New Features (Opt-In)
|
|
26
|
+
|
|
27
|
+
### 1. Task Docs v2 Format
|
|
28
|
+
|
|
29
|
+
**Before (v1.x):** 3 files per task
|
|
30
|
+
```
|
|
31
|
+
.dw/tasks/{name}/
|
|
32
|
+
├── {name}-context.md
|
|
33
|
+
├── {name}-plan.md
|
|
34
|
+
└── {name}-progress.md
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Now (v1.3):** Simpler 2-file default
|
|
38
|
+
```
|
|
39
|
+
.dw/tasks/{name}/
|
|
40
|
+
├── spec.md # Intent + plan merged
|
|
41
|
+
└── tracking.md # Progress + handoff
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Templates at `.dw/core/templates/v2/spec.md` and `.dw/core/templates/v2/tracking.md`.
|
|
45
|
+
|
|
46
|
+
**Migration:** Existing 3-file tasks continue to work. For new tasks, copy from new templates.
|
|
47
|
+
|
|
48
|
+
### 2. Decisions Layer (ADRs)
|
|
49
|
+
|
|
50
|
+
New `.dw/decisions/` directory for Architecture Decision Records.
|
|
51
|
+
|
|
52
|
+
- Template: `.dw/decisions/_template.md`
|
|
53
|
+
- Format: YAML frontmatter + TL;DR + Context + Options + Decision + Consequences
|
|
54
|
+
- Example: `.dw/decisions/0001-v2-pragmatic-lean.md` (dw-kit's own v2 direction)
|
|
55
|
+
|
|
56
|
+
**Why:** Capture *why* decisions were made, not just *what*. Complements code and git history.
|
|
57
|
+
|
|
58
|
+
### 3. ACTIVE.md Auto-Index
|
|
59
|
+
|
|
60
|
+
`.dw/tasks/ACTIVE.md` auto-generated with 1 line per active task. Format:
|
|
61
|
+
```
|
|
62
|
+
- `{task-name}` · {status} · {last-updated} · {blockers}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Excludes `.dw/tasks/archive/`. TechLead can `cat .dw/tasks/ACTIVE.md` to see team state at a glance.
|
|
66
|
+
|
|
67
|
+
**New CLI:** `dw active` to regenerate.
|
|
68
|
+
|
|
69
|
+
### 4. Local Telemetry
|
|
70
|
+
|
|
71
|
+
**Privacy-first design:**
|
|
72
|
+
- **Local-only by default.** Zero network calls.
|
|
73
|
+
- Schema: append-only JSONL at `.dw/metrics/events.jsonl`
|
|
74
|
+
- Events logged: skill invocations, hook fires, task lifecycle
|
|
75
|
+
- Inspect: `dw metrics show`
|
|
76
|
+
- Opt-out: `DW_NO_TELEMETRY=1` environment variable
|
|
77
|
+
|
|
78
|
+
**What's collected:** timestamps, event type, skill/hook name, session hash, depth, latency. **Not collected:** file contents, prompts, personal data.
|
|
79
|
+
|
|
80
|
+
**Internal team policy (for 2 internal teams only):** Mandatory for v1.4 cut decisions. Can still set `DW_NO_TELEMETRY=1` on specific machine.
|
|
81
|
+
|
|
82
|
+
### 5. Solo Preset
|
|
83
|
+
|
|
84
|
+
**New:** `dw init --preset solo` — optimized for solo developers / vibe coders.
|
|
85
|
+
|
|
86
|
+
**Enabled by default:** `privacy-block`, `pre-commit-gate` hooks only (safety-critical).
|
|
87
|
+
**Disabled:** Task docs, session-init, scout-block, post-write, progress-ping, telemetry.
|
|
88
|
+
|
|
89
|
+
Target: working setup in <30 seconds, zero friction.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Potentially Breaking (Pending Verification)
|
|
94
|
+
|
|
95
|
+
### Skill Naming: `/dw-{name}` → `/dw:{name}`
|
|
96
|
+
|
|
97
|
+
**Status:** Pending Claude Code harness verification.
|
|
98
|
+
|
|
99
|
+
**Rationale:** Colon creates clear namespace separator, matches industry conventions (`git:log`, `npm:run`).
|
|
100
|
+
|
|
101
|
+
**Change:** SKILL.md frontmatter `name:` field. Directory names unchanged (`:` illegal on Windows filesystems).
|
|
102
|
+
|
|
103
|
+
**Before:** `name: dw-thinking` → invoke `/dw-thinking`
|
|
104
|
+
**After:** `name: dw:thinking` → invoke `/dw:thinking`
|
|
105
|
+
|
|
106
|
+
**Mapping table (if applied):**
|
|
107
|
+
|
|
108
|
+
| v1.x | v1.3+ |
|
|
109
|
+
|------|-------|
|
|
110
|
+
| `/dw-flow` | `/dw:flow` |
|
|
111
|
+
| `/dw-task-init` | `/dw:task-init` |
|
|
112
|
+
| `/dw-research` | `/dw:research` |
|
|
113
|
+
| `/dw-plan` | `/dw:plan` |
|
|
114
|
+
| `/dw-execute` | `/dw:execute` |
|
|
115
|
+
| `/dw-commit` | `/dw:commit` |
|
|
116
|
+
| `/dw-handoff` | `/dw:handoff` |
|
|
117
|
+
| `/dw-debug` | `/dw:debug` |
|
|
118
|
+
| `/dw-review` | `/dw:review` |
|
|
119
|
+
| `/dw-thinking` | `/dw:thinking` |
|
|
120
|
+
| `/dw-prompt` | `/dw:prompt` |
|
|
121
|
+
| `/dw-docs-update` | `/dw:docs-update` |
|
|
122
|
+
| `/dw-requirements` | `/dw:requirements` |
|
|
123
|
+
| `/dw-test-plan` | `/dw:test-plan` |
|
|
124
|
+
| `/dw-arch-review` | `/dw:arch-review` |
|
|
125
|
+
| `/dw-dashboard` | `/dw:dashboard` |
|
|
126
|
+
| `/dw-sprint-review` | `/dw:sprint-review` |
|
|
127
|
+
| `/dw-estimate` | `/dw:estimate` |
|
|
128
|
+
| `/dw-log-work` | `/dw:log-work` |
|
|
129
|
+
| `/dw-onboard` | `/dw:onboard` |
|
|
130
|
+
| `/dw-retroactive` | `/dw:retroactive` |
|
|
131
|
+
| `/dw-config-init` | `/dw:config-init` |
|
|
132
|
+
| `/dw-config-validate` | `/dw:config-validate` |
|
|
133
|
+
| `/dw-upgrade` | `/dw:upgrade` |
|
|
134
|
+
| `/dw-rollback` | `/dw:rollback` |
|
|
135
|
+
| `/dw-archive` | `/dw:archive` |
|
|
136
|
+
| `/dw-kit-report` | `/dw:kit-report` |
|
|
137
|
+
| `/dw-kit-evolve` | `/dw:kit-evolve` |
|
|
138
|
+
| `/dw-kit-audit` | `/dw:kit-audit` |
|
|
139
|
+
|
|
140
|
+
See `ADR-0002` for full rationale.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Deprecations (No Removal in v1.3)
|
|
145
|
+
|
|
146
|
+
These are marked for removal in v1.4+ based on telemetry evidence:
|
|
147
|
+
|
|
148
|
+
| Feature | Replacement | Removal Target |
|
|
149
|
+
|---------|-------------|----------------|
|
|
150
|
+
| `scout-block.sh` hook | Permission allowlist in settings.json | v1.4 |
|
|
151
|
+
| `post-write.sh` hook | None (low-value reminder) | v1.4 |
|
|
152
|
+
| `progress-ping.sh` hook | `tracking.md` manual + Stop hook | v1.4 |
|
|
153
|
+
| `session-init.sh` hook inject context | `.dw/tasks/ACTIVE.md` auto-loaded | v1.4 |
|
|
154
|
+
| Split rules files (5 files) | Consolidated 1-2 files | v1.4 |
|
|
155
|
+
| 3-file task docs mandatory | 2-file default (legacy still works) | v2.0 |
|
|
156
|
+
| Prescriptive `/dw-research`, `/dw-plan`, `/dw-execute` | Context injector pattern | v2.0 |
|
|
157
|
+
|
|
158
|
+
**Escape hatch:** Set `legacy_features: true` in `.dw/config/dw.config.yml` to keep v1.x behavior through v2.0.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Upgrade Steps
|
|
163
|
+
|
|
164
|
+
### Automated
|
|
165
|
+
```bash
|
|
166
|
+
npx dw-kit upgrade
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
This will:
|
|
170
|
+
1. Merge new templates into `.dw/core/templates/v2/`
|
|
171
|
+
2. Create `.dw/decisions/` if missing
|
|
172
|
+
3. Generate initial `.dw/tasks/ACTIVE.md`
|
|
173
|
+
4. Add telemetry module (local-only)
|
|
174
|
+
5. NOT touch existing task docs or skills
|
|
175
|
+
|
|
176
|
+
### Manual Checks After Upgrade
|
|
177
|
+
|
|
178
|
+
- [ ] Verify `.dw/tasks/ACTIVE.md` generated correctly
|
|
179
|
+
- [ ] Read new `ADR-0001` to understand v2.0 direction
|
|
180
|
+
- [ ] Optional: set `DW_NO_TELEMETRY=1` if you want to opt out
|
|
181
|
+
- [ ] Optional: try `dw init --preset solo` for new projects
|
|
182
|
+
|
|
183
|
+
### Rollback
|
|
184
|
+
```bash
|
|
185
|
+
npm install -g dw-kit@1.2.1
|
|
186
|
+
```
|
|
187
|
+
Your existing `.dw/` data remains compatible with v1.2.1.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Known Issues
|
|
192
|
+
|
|
193
|
+
- Skill naming (`/dw:*`) pending Claude Code harness verification. If harness rejects `:` in skill `name:` field, rename will be reverted in v1.3.1.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Feedback
|
|
198
|
+
|
|
199
|
+
- Internal teams: Slack channel `#dw-kit`
|
|
200
|
+
- Open source: https://github.com/dv-workflow/dv-workflow/issues
|
|
201
|
+
- Use `/dw-kit-report` (or `/dw:kit-report` after rename) to file structured feedback.
|