dw-kit 1.2.1 → 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.
Files changed (58) hide show
  1. package/.claude/hooks/post-write.sh +64 -58
  2. package/.claude/hooks/pre-commit-gate.sh +96 -90
  3. package/.claude/hooks/privacy-block.sh +99 -94
  4. package/.claude/hooks/progress-ping.sh +53 -47
  5. package/.claude/hooks/safety-guard.sh +60 -54
  6. package/.claude/hooks/scout-block.sh +88 -82
  7. package/.claude/hooks/session-init.sh +6 -0
  8. package/.claude/hooks/stop-check.sh +88 -36
  9. package/.claude/hooks/telemetry-log.sh +34 -0
  10. package/.claude/rules/dw.md +136 -0
  11. package/.claude/settings.json +20 -1
  12. package/.claude/skills/dw-arch-review/SKILL.md +119 -119
  13. package/.claude/skills/dw-archive/SKILL.md +81 -81
  14. package/.claude/skills/dw-commit/SKILL.md +81 -81
  15. package/.claude/skills/dw-config-init/SKILL.md +91 -91
  16. package/.claude/skills/dw-config-validate/SKILL.md +75 -75
  17. package/.claude/skills/dw-dashboard/SKILL.md +209 -209
  18. package/.claude/skills/dw-debug/SKILL.md +97 -97
  19. package/.claude/skills/dw-decision/SKILL.md +116 -0
  20. package/.claude/skills/dw-docs-update/SKILL.md +125 -125
  21. package/.claude/skills/dw-estimate/SKILL.md +90 -90
  22. package/.claude/skills/dw-execute/SKILL.md +98 -98
  23. package/.claude/skills/dw-flow/SKILL.md +274 -274
  24. package/.claude/skills/dw-handoff/SKILL.md +81 -81
  25. package/.claude/skills/dw-kit-report/SKILL.md +152 -152
  26. package/.claude/skills/dw-log-work/SKILL.md +69 -69
  27. package/.claude/skills/dw-onboard/SKILL.md +201 -201
  28. package/.claude/skills/dw-plan/SKILL.md +125 -125
  29. package/.claude/skills/dw-prompt/SKILL.md +62 -62
  30. package/.claude/skills/dw-requirements/SKILL.md +98 -98
  31. package/.claude/skills/dw-research/SKILL.md +114 -114
  32. package/.claude/skills/dw-retroactive/SKILL.md +311 -311
  33. package/.claude/skills/dw-review/SKILL.md +66 -66
  34. package/.claude/skills/dw-rollback/SKILL.md +90 -90
  35. package/.claude/skills/dw-sprint-review/SKILL.md +99 -99
  36. package/.claude/skills/dw-task-init/SKILL.md +59 -59
  37. package/.claude/skills/dw-test-plan/SKILL.md +113 -113
  38. package/.claude/skills/dw-thinking/SKILL.md +70 -70
  39. package/.claude/skills/dw-upgrade/SKILL.md +72 -72
  40. package/.dw/core/PILLARS.md +122 -0
  41. package/.dw/core/templates/v2/spec.md +68 -0
  42. package/.dw/core/templates/v2/tracking.md +62 -0
  43. package/.dw/core/v14-evaluation-protocol.md +118 -0
  44. package/CLAUDE.md +42 -39
  45. package/MIGRATION-v1.3.md +201 -0
  46. package/README.md +35 -6
  47. package/package.json +4 -2
  48. package/src/cli.mjs +29 -1
  49. package/src/commands/dashboard.mjs +116 -0
  50. package/src/commands/doctor.mjs +165 -149
  51. package/src/commands/init.mjs +339 -332
  52. package/src/commands/metrics.mjs +165 -0
  53. package/src/lib/active-index.mjs +87 -0
  54. package/src/lib/cut-analysis.mjs +161 -0
  55. package/src/lib/telemetry.mjs +80 -0
  56. package/.claude/rules/dw-core.md +0 -100
  57. package/.claude/rules/dw-skills.md +0 -53
  58. package/.claude/rules/workflow-rules.md +0 -77
@@ -1,113 +1,113 @@
1
- ---
2
- name: dw-test-plan
3
- description: "QC skill: Tạo test plan cho feature/task. Bao gồm test cases, edge cases, regression checklist. Dùng sau khi plan được approve."
4
- argument-hint: "[task-name | feature-name]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Glob
9
- - Grep
10
- ---
11
-
12
- # Tạo Test Plan
13
-
14
- Feature/Task: **$ARGUMENTS**
15
-
16
- ## Đọc Config
17
-
18
- Đọc `.dw/config/dw.config.yml` → `paths.tasks`, `workflow.default_depth`.
19
- Skill này dành cho depth: `standard` hoặc `thorough` (QC role).
20
-
21
- ## Đọc Tài Liệu Liên Quan
22
-
23
- 1. Đọc requirements: `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-requirements.md` (nếu có)
24
- 2. Đọc plan: `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-plan.md`
25
- 3. Đọc context: `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-context.md`
26
-
27
- ## Tạo Test Plan
28
-
29
- Ghi ra `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-test-plan.md`:
30
-
31
- ```markdown
32
- # Test Plan: [Feature/Task Name]
33
-
34
- ## Ngày: [date] | QC: [name] | Status: Draft
35
-
36
- ## Scope
37
- **In scope**: [Những gì sẽ được test]
38
- **Out of scope**: [Những gì KHÔNG test]
39
- **Test environment**: [dev / staging]
40
-
41
- ## Test Strategy
42
- - [ ] Unit testing (dev responsibility)
43
- - [ ] Integration testing
44
- - [ ] Manual functional testing (QC)
45
- - [ ] Regression testing
46
- - [ ] Performance testing (nếu cần)
47
- - [ ] Security testing (nếu cần)
48
-
49
- ---
50
-
51
- ## Test Cases
52
-
53
- ### TC-001: [Happy Path - Tên mô tả]
54
- - **Preconditions**: [Điều kiện trước]
55
- - **Steps**:
56
- 1. [Bước 1]
57
- 2. [Bước 2]
58
- - **Expected Result**: [Kết quả mong đợi]
59
- - **Priority**: P1 Critical / P2 High / P3 Medium / P4 Low
60
- - **Status**: Not Run / Pass / Fail / Blocked
61
-
62
- ### TC-002: [Edge Case]
63
- ...
64
-
65
- ### TC-00N: [Negative Test]
66
- ...
67
-
68
- ---
69
-
70
- ## Regression Checklist
71
-
72
- Các tính năng hiện có có thể bị ảnh hưởng bởi thay đổi này:
73
- - [ ] [Feature A] — Test: [quick test steps]
74
- - [ ] [Feature B]
75
-
76
- ---
77
-
78
- ## Performance Criteria (nếu applicable)
79
- | Metric | Target | Actual |
80
- |--------|--------|--------|
81
- | Page load | < 2s | |
82
- | API response | < 500ms | |
83
-
84
- ---
85
-
86
- ## Bug Report Template
87
-
88
- ```markdown
89
- **Bug**: [Tiêu đề ngắn gọn]
90
- **Severity**: Critical / High / Medium / Low
91
- **Steps to Reproduce**:
92
- 1.
93
- **Expected**:
94
- **Actual**:
95
- **Environment**: [OS, Browser, Version]
96
- **Screenshot**: [đính kèm]
97
- ```
98
-
99
- ---
100
-
101
- ## Sign-off Criteria
102
- - [ ] Tất cả P1 test cases PASS
103
- - [ ] Không có open Critical/High bugs
104
- - [ ] Regression checklist clear
105
- - [ ] Performance criteria met
106
- ```
107
-
108
- ## Thông Báo
109
-
110
- Sau khi tạo:
111
- - "Test plan sẵn sàng: [path]"
112
- - Gợi ý cho dev: "Review test cases để đảm bảo unit tests cover các scenarios này"
113
- - Gợi ý cho TL: "Review có cần thêm test cases nào không"
1
+ ---
2
+ name: dw:test-plan
3
+ description: "QC skill: Tạo test plan cho feature/task. Bao gồm test cases, edge cases, regression checklist. Dùng sau khi plan được approve."
4
+ argument-hint: "[task-name | feature-name]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Glob
9
+ - Grep
10
+ ---
11
+
12
+ # Tạo Test Plan
13
+
14
+ Feature/Task: **$ARGUMENTS**
15
+
16
+ ## Đọc Config
17
+
18
+ Đọc `.dw/config/dw.config.yml` → `paths.tasks`, `workflow.default_depth`.
19
+ Skill này dành cho depth: `standard` hoặc `thorough` (QC role).
20
+
21
+ ## Đọc Tài Liệu Liên Quan
22
+
23
+ 1. Đọc requirements: `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-requirements.md` (nếu có)
24
+ 2. Đọc plan: `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-plan.md`
25
+ 3. Đọc context: `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-context.md`
26
+
27
+ ## Tạo Test Plan
28
+
29
+ Ghi ra `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-test-plan.md`:
30
+
31
+ ```markdown
32
+ # Test Plan: [Feature/Task Name]
33
+
34
+ ## Ngày: [date] | QC: [name] | Status: Draft
35
+
36
+ ## Scope
37
+ **In scope**: [Những gì sẽ được test]
38
+ **Out of scope**: [Những gì KHÔNG test]
39
+ **Test environment**: [dev / staging]
40
+
41
+ ## Test Strategy
42
+ - [ ] Unit testing (dev responsibility)
43
+ - [ ] Integration testing
44
+ - [ ] Manual functional testing (QC)
45
+ - [ ] Regression testing
46
+ - [ ] Performance testing (nếu cần)
47
+ - [ ] Security testing (nếu cần)
48
+
49
+ ---
50
+
51
+ ## Test Cases
52
+
53
+ ### TC-001: [Happy Path - Tên mô tả]
54
+ - **Preconditions**: [Điều kiện trước]
55
+ - **Steps**:
56
+ 1. [Bước 1]
57
+ 2. [Bước 2]
58
+ - **Expected Result**: [Kết quả mong đợi]
59
+ - **Priority**: P1 Critical / P2 High / P3 Medium / P4 Low
60
+ - **Status**: Not Run / Pass / Fail / Blocked
61
+
62
+ ### TC-002: [Edge Case]
63
+ ...
64
+
65
+ ### TC-00N: [Negative Test]
66
+ ...
67
+
68
+ ---
69
+
70
+ ## Regression Checklist
71
+
72
+ Các tính năng hiện có có thể bị ảnh hưởng bởi thay đổi này:
73
+ - [ ] [Feature A] — Test: [quick test steps]
74
+ - [ ] [Feature B]
75
+
76
+ ---
77
+
78
+ ## Performance Criteria (nếu applicable)
79
+ | Metric | Target | Actual |
80
+ |--------|--------|--------|
81
+ | Page load | < 2s | |
82
+ | API response | < 500ms | |
83
+
84
+ ---
85
+
86
+ ## Bug Report Template
87
+
88
+ ```markdown
89
+ **Bug**: [Tiêu đề ngắn gọn]
90
+ **Severity**: Critical / High / Medium / Low
91
+ **Steps to Reproduce**:
92
+ 1.
93
+ **Expected**:
94
+ **Actual**:
95
+ **Environment**: [OS, Browser, Version]
96
+ **Screenshot**: [đính kèm]
97
+ ```
98
+
99
+ ---
100
+
101
+ ## Sign-off Criteria
102
+ - [ ] Tất cả P1 test cases PASS
103
+ - [ ] Không có open Critical/High bugs
104
+ - [ ] Regression checklist clear
105
+ - [ ] Performance criteria met
106
+ ```
107
+
108
+ ## Thông Báo
109
+
110
+ Sau khi tạo:
111
+ - "Test plan sẵn sàng: [path]"
112
+ - Gợi ý cho dev: "Review test cases để đảm bảo unit tests cover các scenarios này"
113
+ - Gợi ý cho TL: "Review có cần thêm test cases nào không"
@@ -1,70 +1,70 @@
1
- ---
2
- name: dw-thinking
3
- description: "Áp dụng framework tư duy phản biện, hệ thống và đa góc nhìn vào vấn đề. Auto-load khi planning hoặc khi cần phân tích sâu. Dùng proactively."
4
- argument-hint: "[vấn đề cần phân tích]"
5
- user-invocable: true
6
- ---
7
-
8
- # Framework Tư Duy — Áp Dụng Vào Task
9
-
10
- Vấn đề: **$ARGUMENTS**
11
-
12
- ## Nạp Framework
13
-
14
- @THINKING.md
15
-
16
- ---
17
-
18
- ## Áp Dụng Vào Task Hiện Tại
19
-
20
- Sau khi đọc framework trên, áp dụng vào vấn đề `$ARGUMENTS`:
21
-
22
- ### 1. Tư Duy Phản Biện
23
-
24
- **Giả định đang dùng:**
25
- - [ ] [Giả định 1] — Cách kiểm chứng: ...
26
- - [ ] [Giả định 2]
27
-
28
- **Rủi ro chính (top 3):**
29
- 1. [Rủi ro] — Xác suất: Cao/TB/Thấp — Tác động: ...
30
- 2. ...
31
- 3. ...
32
-
33
- **Phương án thay thế đã loại:**
34
- - [Phương án A] — Loại vì: ...
35
-
36
- **Edge cases cần xử lý:**
37
- - [ ] [Edge case 1]
38
-
39
- ### 2. Tư Duy Hệ Thống
40
-
41
- **Dependencies:**
42
- - Upstream: [ai/module gì phụ thuộc vào]
43
- - Downstream: [bị ảnh hưởng bởi thay đổi này]
44
-
45
- **Tác động cascade:**
46
- - Nếu thay đổi X → Y bị ảnh hưởng → Z cần cập nhật
47
-
48
- **Failure modes:**
49
- - [Nếu phần A fail → hệ thống phản ứng thế nào]
50
-
51
- ### 3. Đa Góc Nhìn
52
-
53
- | Góc nhìn | Câu hỏi | Đánh giá |
54
- |----------|---------|----------|
55
- | User | [Ảnh hưởng UX?] | [OK / Concern] |
56
- | Developer | [Maintainable?] | |
57
- | Security | [Expose gì?] | |
58
- | Ops | [Deploy issues?] | |
59
- | Business | [Giá trị delivered?] | |
60
-
61
- ### 4. Kết Luận
62
-
63
- **Quyết định:**
64
- [Approach được chọn và lý do]
65
-
66
- **Trade-offs chấp nhận:**
67
- [Điểm yếu nào của approach này được chấp nhận]
68
-
69
- **Điểm cần monitor:**
70
- [Theo dõi gì sau khi implement]
1
+ ---
2
+ name: dw:thinking
3
+ description: "Áp dụng framework tư duy phản biện, hệ thống và đa góc nhìn vào vấn đề. Auto-load khi planning hoặc khi cần phân tích sâu. Dùng proactively."
4
+ argument-hint: "[vấn đề cần phân tích]"
5
+ user-invocable: true
6
+ ---
7
+
8
+ # Framework Tư Duy — Áp Dụng Vào Task
9
+
10
+ Vấn đề: **$ARGUMENTS**
11
+
12
+ ## Nạp Framework
13
+
14
+ @THINKING.md
15
+
16
+ ---
17
+
18
+ ## Áp Dụng Vào Task Hiện Tại
19
+
20
+ Sau khi đọc framework trên, áp dụng vào vấn đề `$ARGUMENTS`:
21
+
22
+ ### 1. Tư Duy Phản Biện
23
+
24
+ **Giả định đang dùng:**
25
+ - [ ] [Giả định 1] — Cách kiểm chứng: ...
26
+ - [ ] [Giả định 2]
27
+
28
+ **Rủi ro chính (top 3):**
29
+ 1. [Rủi ro] — Xác suất: Cao/TB/Thấp — Tác động: ...
30
+ 2. ...
31
+ 3. ...
32
+
33
+ **Phương án thay thế đã loại:**
34
+ - [Phương án A] — Loại vì: ...
35
+
36
+ **Edge cases cần xử lý:**
37
+ - [ ] [Edge case 1]
38
+
39
+ ### 2. Tư Duy Hệ Thống
40
+
41
+ **Dependencies:**
42
+ - Upstream: [ai/module gì phụ thuộc vào]
43
+ - Downstream: [bị ảnh hưởng bởi thay đổi này]
44
+
45
+ **Tác động cascade:**
46
+ - Nếu thay đổi X → Y bị ảnh hưởng → Z cần cập nhật
47
+
48
+ **Failure modes:**
49
+ - [Nếu phần A fail → hệ thống phản ứng thế nào]
50
+
51
+ ### 3. Đa Góc Nhìn
52
+
53
+ | Góc nhìn | Câu hỏi | Đánh giá |
54
+ |----------|---------|----------|
55
+ | User | [Ảnh hưởng UX?] | [OK / Concern] |
56
+ | Developer | [Maintainable?] | |
57
+ | Security | [Expose gì?] | |
58
+ | Ops | [Deploy issues?] | |
59
+ | Business | [Giá trị delivered?] | |
60
+
61
+ ### 4. Kết Luận
62
+
63
+ **Quyết định:**
64
+ [Approach được chọn và lý do]
65
+
66
+ **Trade-offs chấp nhận:**
67
+ [Điểm yếu nào của approach này được chấp nhận]
68
+
69
+ **Điểm cần monitor:**
70
+ [Theo dõi gì sau khi implement]
@@ -1,72 +1,72 @@
1
- ---
2
- name: dw-upgrade
3
- description: "Upgrade dv-workflow-kit lên version mới. So sánh toolkit files, báo cáo thay đổi, cho phép selective update mà không overwrite customizations."
4
- argument-hint: ""
5
- ---
6
-
7
- # Upgrade dv-workflow-kit
8
-
9
- ## Điều Kiện tiên quyết
10
-
11
- Toolkit được cài theo luồng chuẩn v1 trong project hiện tại (thường là `npm install -g dw-kit` + `dw init`).
12
- Các tùy chỉnh của team được đặt tại:
13
- - overrides: `.dw/adapters/claude-cli/overrides/`
14
- - extensions (skills mới): `.dw/adapters/claude-cli/extensions/`
15
-
16
- ## Bước 1: Preview upgrade (khuyến nghị)
17
-
18
- ```bash
19
- dw upgrade --check
20
- dw upgrade --dry-run
21
- ```
22
-
23
- ## Bước 2: Backup config (tùy chọn nhưng nên làm)
24
-
25
- ```bash
26
- cp .dw/config/dw.config.yml .dw/config/dw.config.yml.backup-$(date +%Y%m%d)
27
- ```
28
-
29
- ## Bước 3: Chạy upgrade
30
-
31
- ```bash
32
- dw upgrade
33
- ```
34
-
35
- `dw upgrade` sẽ update toolkit files theo version mới và **tôn trọng overrides** của team (không ghi đè override).
36
-
37
- ## Bước 4: Validate & health check
38
-
39
- ```bash
40
- dw validate
41
- dw doctor
42
- ```
43
-
44
- ## Bước 5: Báo cáo kết quả
45
-
46
- ```
47
- === Upgrade Report ===
48
-
49
- Từ: [old version/commit]
50
- Đến: [new version/commit]
51
-
52
- Files mới (đã copy):
53
- + .claude/skills/dw-[new-skill]/SKILL.md
54
- + .claude/templates/en/task-context.md
55
-
56
- Files đã thay đổi trong toolkit (KHÔNG tự động update vì bạn có thể đã customize):
57
- ~ .claude/skills/dw-task-init/SKILL.md — xem diff: git diff .claude/skills/dw-task-init/SKILL.md
58
- ~ .claude/agents/planner.md
59
-
60
- Files của bạn (giữ nguyên):
61
- = .dw/config/dw.config.yml (backup tại .backup-[date])
62
-
63
- Lưu ý:
64
- - Review các files "đã thay đổi" và merge thủ công nếu cần
65
- - Xem CHANGELOG của release (nếu cần) để biết breaking changes
66
- - Chạy /dw-config-validate sau khi upgrade để kiểm tra config
67
- ```
68
-
69
- ## Cleanup backup (tùy chọn)
70
-
71
- Hỏi user: "Bạn có muốn xóa file backup config không? (y/n)"
72
- Nếu y: `rm .dw/config/dw.config.yml.backup-*`
1
+ ---
2
+ name: dw:upgrade
3
+ description: "Upgrade dv-workflow-kit lên version mới. So sánh toolkit files, báo cáo thay đổi, cho phép selective update mà không overwrite customizations."
4
+ argument-hint: ""
5
+ ---
6
+
7
+ # Upgrade dv-workflow-kit
8
+
9
+ ## Điều Kiện tiên quyết
10
+
11
+ Toolkit được cài theo luồng chuẩn v1 trong project hiện tại (thường là `npm install -g dw-kit` + `dw init`).
12
+ Các tùy chỉnh của team được đặt tại:
13
+ - overrides: `.dw/adapters/claude-cli/overrides/`
14
+ - extensions (skills mới): `.dw/adapters/claude-cli/extensions/`
15
+
16
+ ## Bước 1: Preview upgrade (khuyến nghị)
17
+
18
+ ```bash
19
+ dw upgrade --check
20
+ dw upgrade --dry-run
21
+ ```
22
+
23
+ ## Bước 2: Backup config (tùy chọn nhưng nên làm)
24
+
25
+ ```bash
26
+ cp .dw/config/dw.config.yml .dw/config/dw.config.yml.backup-$(date +%Y%m%d)
27
+ ```
28
+
29
+ ## Bước 3: Chạy upgrade
30
+
31
+ ```bash
32
+ dw upgrade
33
+ ```
34
+
35
+ `dw upgrade` sẽ update toolkit files theo version mới và **tôn trọng overrides** của team (không ghi đè override).
36
+
37
+ ## Bước 4: Validate & health check
38
+
39
+ ```bash
40
+ dw validate
41
+ dw doctor
42
+ ```
43
+
44
+ ## Bước 5: Báo cáo kết quả
45
+
46
+ ```
47
+ === Upgrade Report ===
48
+
49
+ Từ: [old version/commit]
50
+ Đến: [new version/commit]
51
+
52
+ Files mới (đã copy):
53
+ + .claude/skills/dw-[new-skill]/SKILL.md
54
+ + .claude/templates/en/task-context.md
55
+
56
+ Files đã thay đổi trong toolkit (KHÔNG tự động update vì bạn có thể đã customize):
57
+ ~ .claude/skills/dw-task-init/SKILL.md — xem diff: git diff .claude/skills/dw-task-init/SKILL.md
58
+ ~ .claude/agents/planner.md
59
+
60
+ Files của bạn (giữ nguyên):
61
+ = .dw/config/dw.config.yml (backup tại .backup-[date])
62
+
63
+ Lưu ý:
64
+ - Review các files "đã thay đổi" và merge thủ công nếu cần
65
+ - Xem CHANGELOG của release (nếu cần) để biết breaking changes
66
+ - Chạy /dw:config-validate sau khi upgrade để kiểm tra config
67
+ ```
68
+
69
+ ## Cleanup backup (tùy chọn)
70
+
71
+ Hỏi user: "Bạn có muốn xóa file backup config không? (y/n)"
72
+ Nếu y: `rm .dw/config/dw.config.yml.backup-*`
@@ -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)