dw-kit 1.2.0 → 1.2.1
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/session-init.sh +85 -74
- package/.claude/rules/code-style.md +37 -37
- package/.claude/rules/commit-standards.md +37 -37
- package/.claude/settings.json +101 -99
- package/.dw/config/dw.config.yml +82 -82
- package/README.md +9 -1
- package/package.json +84 -84
- package/src/cli.mjs +16 -8
- package/src/commands/upgrade.mjs +297 -262
- package/src/lib/copy.mjs +118 -110
package/.dw/config/dw.config.yml
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
# ============================================================================
|
|
2
|
-
# dw-kit Configuration — v1
|
|
3
|
-
# ============================================================================
|
|
4
|
-
# Copy file này vào project và tùy chỉnh theo nhu cầu.
|
|
5
|
-
# Toolkit đọc file này để điều chỉnh behavior per project.
|
|
6
|
-
# ============================================================================
|
|
7
|
-
|
|
8
|
-
# --- Project Info -----------------------------------------------------------
|
|
9
|
-
project:
|
|
10
|
-
name: "my-project"
|
|
11
|
-
language: "vi" # vi | en
|
|
12
|
-
|
|
13
|
-
# --- Workflow ----------------------------------------------------------------
|
|
14
|
-
workflow:
|
|
15
|
-
default_depth: "standard" # quick | standard | thorough
|
|
16
|
-
# AI assesses per-task và có thể recommend depth khác nhau:
|
|
17
|
-
# quick : ≤2 files, hotfix, familiar module
|
|
18
|
-
# standard : 3-5 files, module mới, unfamiliar code
|
|
19
|
-
# thorough : 6+ files, API contract changes, DB schema, security
|
|
20
|
-
|
|
21
|
-
# --- Team -------------------------------------------------------------------
|
|
22
|
-
team:
|
|
23
|
-
roles:
|
|
24
|
-
- dev # luôn có
|
|
25
|
-
- techlead # architecture review, plan approval
|
|
26
|
-
# - ba # requirements, user stories
|
|
27
|
-
# - qc # test plans, QA sign-off
|
|
28
|
-
# - pm # dashboard, reports
|
|
29
|
-
|
|
30
|
-
# --- Quality Gates ----------------------------------------------------------
|
|
31
|
-
quality:
|
|
32
|
-
test_command: "" # ví dụ: "npm test" | "pytest" | "go test ./..."
|
|
33
|
-
lint_command: "" # ví dụ: "npm run lint" | "ruff check ." | "golangci-lint run"
|
|
34
|
-
block_on_fail: false # true = block commit nếu test/lint fail
|
|
35
|
-
|
|
36
|
-
# --- Tracking ---------------------------------------------------------------
|
|
37
|
-
tracking:
|
|
38
|
-
estimation: false
|
|
39
|
-
log_work: false
|
|
40
|
-
estimation_unit: "hours" # hours | story-points | t-shirt
|
|
41
|
-
|
|
42
|
-
# --- Paths ------------------------------------------------------------------
|
|
43
|
-
paths:
|
|
44
|
-
tasks: ".dw/tasks"
|
|
45
|
-
docs: ".dw/docs"
|
|
46
|
-
|
|
47
|
-
# --- Claude Capabilities (Layer 2) ------------------------------------------
|
|
48
|
-
# Tính năng đặc thù của Claude Code.
|
|
49
|
-
claude:
|
|
50
|
-
# Model per phase — để trống = dùng model mặc định từ Claude Code settings
|
|
51
|
-
models:
|
|
52
|
-
plan: "" # ví dụ: "claude-opus-4-6" cho complex planning
|
|
53
|
-
execute: "" # ví dụ: "claude-sonnet-4-6"
|
|
54
|
-
review: ""
|
|
55
|
-
|
|
56
|
-
# Structured JSON output từ reviewer và estimate skills
|
|
57
|
-
structured_output: true
|
|
58
|
-
|
|
59
|
-
# Isolate execution trong git worktree (cho risky refactors)
|
|
60
|
-
worktree_execution: false
|
|
61
|
-
|
|
62
|
-
# MCP servers — Claude Code sẽ load các servers này
|
|
63
|
-
mcp: []
|
|
64
|
-
# Ví dụ:
|
|
65
|
-
# mcp:
|
|
66
|
-
# - name: "github"
|
|
67
|
-
# command: "npx @modelcontextprotocol/server-github"
|
|
68
|
-
# env:
|
|
69
|
-
# GITHUB_TOKEN: "${GITHUB_TOKEN}"
|
|
70
|
-
# - name: "jira"
|
|
71
|
-
# command: "npx @anthropic/mcp-server-jira"
|
|
72
|
-
# env:
|
|
73
|
-
# JIRA_URL: "${JIRA_URL}"
|
|
74
|
-
# JIRA_TOKEN: "${JIRA_TOKEN}"
|
|
75
|
-
|
|
76
|
-
# --- Toolkit Version (do not edit manually) ---------------------------------
|
|
77
|
-
_toolkit:
|
|
78
|
-
core_version: "1.
|
|
79
|
-
platform_version: "1.
|
|
80
|
-
capability_version: "1.0"
|
|
81
|
-
installed: "2026-03-23"
|
|
82
|
-
last_upgrade: "2026-
|
|
1
|
+
# ============================================================================
|
|
2
|
+
# dw-kit Configuration — v1
|
|
3
|
+
# ============================================================================
|
|
4
|
+
# Copy file này vào project và tùy chỉnh theo nhu cầu.
|
|
5
|
+
# Toolkit đọc file này để điều chỉnh behavior per project.
|
|
6
|
+
# ============================================================================
|
|
7
|
+
|
|
8
|
+
# --- Project Info -----------------------------------------------------------
|
|
9
|
+
project:
|
|
10
|
+
name: "my-project"
|
|
11
|
+
language: "vi" # vi | en
|
|
12
|
+
|
|
13
|
+
# --- Workflow ----------------------------------------------------------------
|
|
14
|
+
workflow:
|
|
15
|
+
default_depth: "standard" # quick | standard | thorough
|
|
16
|
+
# AI assesses per-task và có thể recommend depth khác nhau:
|
|
17
|
+
# quick : ≤2 files, hotfix, familiar module
|
|
18
|
+
# standard : 3-5 files, module mới, unfamiliar code
|
|
19
|
+
# thorough : 6+ files, API contract changes, DB schema, security
|
|
20
|
+
|
|
21
|
+
# --- Team -------------------------------------------------------------------
|
|
22
|
+
team:
|
|
23
|
+
roles:
|
|
24
|
+
- dev # luôn có
|
|
25
|
+
- techlead # architecture review, plan approval
|
|
26
|
+
# - ba # requirements, user stories
|
|
27
|
+
# - qc # test plans, QA sign-off
|
|
28
|
+
# - pm # dashboard, reports
|
|
29
|
+
|
|
30
|
+
# --- Quality Gates ----------------------------------------------------------
|
|
31
|
+
quality:
|
|
32
|
+
test_command: "" # ví dụ: "npm test" | "pytest" | "go test ./..."
|
|
33
|
+
lint_command: "" # ví dụ: "npm run lint" | "ruff check ." | "golangci-lint run"
|
|
34
|
+
block_on_fail: false # true = block commit nếu test/lint fail
|
|
35
|
+
|
|
36
|
+
# --- Tracking ---------------------------------------------------------------
|
|
37
|
+
tracking:
|
|
38
|
+
estimation: false
|
|
39
|
+
log_work: false
|
|
40
|
+
estimation_unit: "hours" # hours | story-points | t-shirt
|
|
41
|
+
|
|
42
|
+
# --- Paths ------------------------------------------------------------------
|
|
43
|
+
paths:
|
|
44
|
+
tasks: ".dw/tasks"
|
|
45
|
+
docs: ".dw/docs"
|
|
46
|
+
|
|
47
|
+
# --- Claude Capabilities (Layer 2) ------------------------------------------
|
|
48
|
+
# Tính năng đặc thù của Claude Code.
|
|
49
|
+
claude:
|
|
50
|
+
# Model per phase — để trống = dùng model mặc định từ Claude Code settings
|
|
51
|
+
models:
|
|
52
|
+
plan: "" # ví dụ: "claude-opus-4-6" cho complex planning
|
|
53
|
+
execute: "" # ví dụ: "claude-sonnet-4-6"
|
|
54
|
+
review: ""
|
|
55
|
+
|
|
56
|
+
# Structured JSON output từ reviewer và estimate skills
|
|
57
|
+
structured_output: true
|
|
58
|
+
|
|
59
|
+
# Isolate execution trong git worktree (cho risky refactors)
|
|
60
|
+
worktree_execution: false
|
|
61
|
+
|
|
62
|
+
# MCP servers — Claude Code sẽ load các servers này
|
|
63
|
+
mcp: []
|
|
64
|
+
# Ví dụ:
|
|
65
|
+
# mcp:
|
|
66
|
+
# - name: "github"
|
|
67
|
+
# command: "npx @modelcontextprotocol/server-github"
|
|
68
|
+
# env:
|
|
69
|
+
# GITHUB_TOKEN: "${GITHUB_TOKEN}"
|
|
70
|
+
# - name: "jira"
|
|
71
|
+
# command: "npx @anthropic/mcp-server-jira"
|
|
72
|
+
# env:
|
|
73
|
+
# JIRA_URL: "${JIRA_URL}"
|
|
74
|
+
# JIRA_TOKEN: "${JIRA_TOKEN}"
|
|
75
|
+
|
|
76
|
+
# --- Toolkit Version (do not edit manually) ---------------------------------
|
|
77
|
+
_toolkit:
|
|
78
|
+
core_version: "1.2"
|
|
79
|
+
platform_version: "1.2"
|
|
80
|
+
capability_version: "1.0"
|
|
81
|
+
installed: "2026-03-23"
|
|
82
|
+
last_upgrade: "2026-04-15"
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> An AI development workflow toolkit for teams using agentic IDEs (Claude Code, Cursor) — from idea to review-ready commits.
|
|
4
4
|
|
|
5
|
-
**v1.2** · `npm install -g dw-kit` · [Docs](docs/README.md) · [Get started](docs/get-started.md) · [Cheatsheet](docs/cheatsheet.md)
|
|
5
|
+
**v1.2** · `npm install -g dw-kit` · [Docs](docs/README.md) · [Get started](docs/get-started.md) · [Cheatsheet](docs/cheatsheet.md) · [Changelog](CHANGELOG.md#v120--2026-04-09)
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -34,6 +34,14 @@ It’s designed for collaboration (Dev / Tech Lead / QA / PM) and keeps work aud
|
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
+
## Release notes
|
|
38
|
+
|
|
39
|
+
- v1.2.0 notes: [`CHANGELOG.md#v120--2026-04-09`](CHANGELOG.md#v120--2026-04-09)
|
|
40
|
+
- Full changelog: `CHANGELOG.md`
|
|
41
|
+
- Latest release notes: [GitHub Releases](https://github.com/dv-workflow/dv-workflow/releases)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
37
45
|
## Install
|
|
38
46
|
|
|
39
47
|
```bash
|
package/package.json
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dw-kit",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "AI development workflow toolkit — structured, quality-assured, team-ready. From requirements to dashboard.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"dw": "bin/dw.mjs"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"bin/",
|
|
11
|
-
"src/cli.mjs",
|
|
12
|
-
"src/commands/",
|
|
13
|
-
"src/lib/",
|
|
14
|
-
".dw/core/",
|
|
15
|
-
".dw/config/",
|
|
16
|
-
".dw/adapters/",
|
|
17
|
-
".claude/agents/",
|
|
18
|
-
".claude/hooks/",
|
|
19
|
-
".claude/rules/",
|
|
20
|
-
".claude/skills/dw-arch-review/",
|
|
21
|
-
".claude/skills/dw-archive/",
|
|
22
|
-
".claude/skills/dw-commit/",
|
|
23
|
-
".claude/skills/dw-config-init/",
|
|
24
|
-
".claude/skills/dw-config-validate/",
|
|
25
|
-
".claude/skills/dw-dashboard/",
|
|
26
|
-
".claude/skills/dw-debug/",
|
|
27
|
-
".claude/skills/dw-docs-update/",
|
|
28
|
-
".claude/skills/dw-estimate/",
|
|
29
|
-
".claude/skills/dw-execute/",
|
|
30
|
-
".claude/skills/dw-flow/",
|
|
31
|
-
".claude/skills/dw-handoff/",
|
|
32
|
-
".claude/skills/dw-kit-report/",
|
|
33
|
-
".claude/skills/dw-log-work/",
|
|
34
|
-
".claude/skills/dw-onboard/",
|
|
35
|
-
".claude/skills/dw-plan/",
|
|
36
|
-
".claude/skills/dw-prompt/",
|
|
37
|
-
".claude/skills/dw-requirements/",
|
|
38
|
-
".claude/skills/dw-research/",
|
|
39
|
-
".claude/skills/dw-retroactive/",
|
|
40
|
-
".claude/skills/dw-review/",
|
|
41
|
-
".claude/skills/dw-rollback/",
|
|
42
|
-
".claude/skills/dw-sprint-review/",
|
|
43
|
-
".claude/skills/dw-task-init/",
|
|
44
|
-
".claude/skills/dw-test-plan/",
|
|
45
|
-
".claude/skills/dw-thinking/",
|
|
46
|
-
".claude/skills/dw-upgrade/",
|
|
47
|
-
".claude/templates/",
|
|
48
|
-
".claude/settings.json",
|
|
49
|
-
"CLAUDE.md"
|
|
50
|
-
],
|
|
51
|
-
"engines": {
|
|
52
|
-
"node": ">=18"
|
|
53
|
-
},
|
|
54
|
-
"scripts": {
|
|
55
|
-
"test": "node src/smoke-test.mjs",
|
|
56
|
-
"link": "npm link",
|
|
57
|
-
"test:e2e-local": "bash scripts/e2e-local-check.sh"
|
|
58
|
-
},
|
|
59
|
-
"keywords": [
|
|
60
|
-
"ai",
|
|
61
|
-
"workflow",
|
|
62
|
-
"claude",
|
|
63
|
-
"cursor",
|
|
64
|
-
"development",
|
|
65
|
-
"toolkit",
|
|
66
|
-
"tdd",
|
|
67
|
-
"code-review",
|
|
68
|
-
"agent"
|
|
69
|
-
],
|
|
70
|
-
"author": "huygdv <huygdv19@gmail.com>",
|
|
71
|
-
"license": "MIT",
|
|
72
|
-
"repository": {
|
|
73
|
-
"type": "git",
|
|
74
|
-
"url": "git+https://github.com/dv-workflow/dv-workflow.git"
|
|
75
|
-
},
|
|
76
|
-
"homepage": "https://github.com/dv-workflow/dv-workflow#readme",
|
|
77
|
-
"dependencies": {
|
|
78
|
-
"ajv": "^8.18.0",
|
|
79
|
-
"chalk": "^5.6.2",
|
|
80
|
-
"commander": "^14.0.3",
|
|
81
|
-
"enquirer": "^2.4.1",
|
|
82
|
-
"js-yaml": "^4.1.1"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dw-kit",
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "AI development workflow toolkit — structured, quality-assured, team-ready. From requirements to dashboard.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"dw": "bin/dw.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"src/cli.mjs",
|
|
12
|
+
"src/commands/",
|
|
13
|
+
"src/lib/",
|
|
14
|
+
".dw/core/",
|
|
15
|
+
".dw/config/",
|
|
16
|
+
".dw/adapters/",
|
|
17
|
+
".claude/agents/",
|
|
18
|
+
".claude/hooks/",
|
|
19
|
+
".claude/rules/",
|
|
20
|
+
".claude/skills/dw-arch-review/",
|
|
21
|
+
".claude/skills/dw-archive/",
|
|
22
|
+
".claude/skills/dw-commit/",
|
|
23
|
+
".claude/skills/dw-config-init/",
|
|
24
|
+
".claude/skills/dw-config-validate/",
|
|
25
|
+
".claude/skills/dw-dashboard/",
|
|
26
|
+
".claude/skills/dw-debug/",
|
|
27
|
+
".claude/skills/dw-docs-update/",
|
|
28
|
+
".claude/skills/dw-estimate/",
|
|
29
|
+
".claude/skills/dw-execute/",
|
|
30
|
+
".claude/skills/dw-flow/",
|
|
31
|
+
".claude/skills/dw-handoff/",
|
|
32
|
+
".claude/skills/dw-kit-report/",
|
|
33
|
+
".claude/skills/dw-log-work/",
|
|
34
|
+
".claude/skills/dw-onboard/",
|
|
35
|
+
".claude/skills/dw-plan/",
|
|
36
|
+
".claude/skills/dw-prompt/",
|
|
37
|
+
".claude/skills/dw-requirements/",
|
|
38
|
+
".claude/skills/dw-research/",
|
|
39
|
+
".claude/skills/dw-retroactive/",
|
|
40
|
+
".claude/skills/dw-review/",
|
|
41
|
+
".claude/skills/dw-rollback/",
|
|
42
|
+
".claude/skills/dw-sprint-review/",
|
|
43
|
+
".claude/skills/dw-task-init/",
|
|
44
|
+
".claude/skills/dw-test-plan/",
|
|
45
|
+
".claude/skills/dw-thinking/",
|
|
46
|
+
".claude/skills/dw-upgrade/",
|
|
47
|
+
".claude/templates/",
|
|
48
|
+
".claude/settings.json",
|
|
49
|
+
"CLAUDE.md"
|
|
50
|
+
],
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=18"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"test": "node src/smoke-test.mjs",
|
|
56
|
+
"link": "npm link",
|
|
57
|
+
"test:e2e-local": "bash scripts/e2e-local-check.sh"
|
|
58
|
+
},
|
|
59
|
+
"keywords": [
|
|
60
|
+
"ai",
|
|
61
|
+
"workflow",
|
|
62
|
+
"claude",
|
|
63
|
+
"cursor",
|
|
64
|
+
"development",
|
|
65
|
+
"toolkit",
|
|
66
|
+
"tdd",
|
|
67
|
+
"code-review",
|
|
68
|
+
"agent"
|
|
69
|
+
],
|
|
70
|
+
"author": "huygdv <huygdv19@gmail.com>",
|
|
71
|
+
"license": "MIT",
|
|
72
|
+
"repository": {
|
|
73
|
+
"type": "git",
|
|
74
|
+
"url": "git+https://github.com/dv-workflow/dv-workflow.git"
|
|
75
|
+
},
|
|
76
|
+
"homepage": "https://github.com/dv-workflow/dv-workflow#readme",
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"ajv": "^8.18.0",
|
|
79
|
+
"chalk": "^5.6.2",
|
|
80
|
+
"commander": "^14.0.3",
|
|
81
|
+
"enquirer": "^2.4.1",
|
|
82
|
+
"js-yaml": "^4.1.1"
|
|
83
|
+
}
|
|
84
|
+
}
|
package/src/cli.mjs
CHANGED
|
@@ -9,11 +9,14 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
9
9
|
const __dirname = dirname(__filename);
|
|
10
10
|
const require = createRequire(import.meta.url);
|
|
11
11
|
const pkg = require(join(__dirname, '..', 'package.json'));
|
|
12
|
+
const RELEASES_URL = 'https://github.com/dv-workflow/dv-workflow/releases';
|
|
12
13
|
|
|
13
14
|
export function run(argv) {
|
|
14
|
-
//
|
|
15
|
-
|
|
15
|
+
// Schedule fresh check in background (non-blocking).
|
|
16
|
+
// Notice is shown via process.on('exit') so it always appears AFTER command output,
|
|
17
|
+
// even when commands call process.exit() internally.
|
|
16
18
|
scheduleUpdateCheck(pkg.version);
|
|
19
|
+
const latestVersion = getUpdateNotice(pkg.version);
|
|
17
20
|
|
|
18
21
|
const program = new Command();
|
|
19
22
|
|
|
@@ -81,12 +84,17 @@ export function run(argv) {
|
|
|
81
84
|
await claudeVnFixCommand(opts);
|
|
82
85
|
});
|
|
83
86
|
|
|
84
|
-
program.parse(argv);
|
|
85
|
-
|
|
86
87
|
if (latestVersion) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
// Register notice to print AFTER the command completes (on clean exit only)
|
|
89
|
+
process.on('exit', (code) => {
|
|
90
|
+
if (code !== 0) return;
|
|
91
|
+
console.log();
|
|
92
|
+
console.log(chalk.yellow(` ↑ Update available`) + ` v${pkg.version} → ` + chalk.green.bold(`v${latestVersion}`));
|
|
93
|
+
console.log(` Run ` + chalk.cyan(`npm install -g dw-kit`) + ` to update`);
|
|
94
|
+
console.log(` Changelog: ` + chalk.cyan(`${RELEASES_URL}/tag/v${latestVersion}`));
|
|
95
|
+
console.log();
|
|
96
|
+
});
|
|
91
97
|
}
|
|
98
|
+
|
|
99
|
+
program.parse(argv);
|
|
92
100
|
}
|