viepilot 1.0.1 → 1.1.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/CHANGELOG.md CHANGED
@@ -9,8 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Enhanced
11
11
 
12
- - **M1.15 / Phase 18 (FEAT-004) in progress** — npm publish distribution scaffold: package publish metadata, release scripts, secure GitHub Actions `release-npm` workflow, and maintainer publish/rollback guide. Final registry smoke verify is blocked pending npm publish auth.
12
+ - **M1.17 / Phase 21 (ENH-013) completed** — realigned README metrics (`npm run readme:sync` with `cloc`) and moved `.viepilot` to local-only (`.gitignore` + untracked index).
13
+ - **M1.15 / Phase 18 (FEAT-004) completed** — npm distribution flow is now fully closed: publish pipeline passes and package released to npm as `viepilot@1.0.1`.
13
14
  - **M1.15 / Phase 19 (FEAT-005) completed** — installer now supports keyboard selector UX (arrow/space/enter), added `viepilot uninstall` command (`--target`, `--yes`, `--dry-run`), and switched dev installer to copy-first flow to avoid symlink-based skill discovery failures.
15
+ - **M1.16 / Phase 20 (FEAT-006) completed** — added README LOC auto-sync command (`npm run readme:sync`) driven by `cloc` with non-blocking fallback, installer `cloc` dependency checks/guidance, and a donate section in README with PayPal/MOMO links.
14
16
 
15
17
  ### Fixed
16
18
 
@@ -19,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
21
  ### Documentation
20
22
 
21
23
  - `README.md`, `docs/user/quick-start.md` — updated install wizard controls and uninstall command examples.
24
+ - `README.md`, `docs/troubleshooting.md`, `docs/user/quick-start.md` — documented README metric sync flow, `cloc` fallback/install guidance, and maintainer usage.
22
25
  - `docs/troubleshooting.md` — added selector TTY fallback guidance and uninstall/reinstall recovery flow for legacy symlink installs.
23
26
  - `README.md` — Project Scale LOC + M1.11 completion banner; Documentation row includes `api/`
24
27
  - `.viepilot/audit-report.md` — PASS after README metric sync (`/vp-audit`)
package/README.md CHANGED
@@ -16,13 +16,19 @@ ViePilot là bộ skill framework cho phép AI assistant (Claude, GPT, etc.) ph
16
16
 
17
17
  ViePilot is a skill framework that enables AI assistants to develop projects **autonomously**, with **control points**, and **recovery capability**. Built with professional standards: Semantic Versioning, Conventional Commits, Keep a Changelog.
18
18
 
19
+ ### Support ViePilot
20
+
21
+ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
22
+ - PayPal: [https://paypal.me/SATCODING](https://paypal.me/SATCODING)
23
+ - MOMO: [https://me.momo.vn/aMINujUPTbIRtbTli6Fd](https://me.momo.vn/aMINujUPTbIRtbTli6Fd)
24
+
19
25
  ---
20
26
 
21
27
  ## Quy mô dự án / Project Scale
22
28
 
23
29
  | Chỉ số / Metric | Giá trị / Value |
24
30
  |-----------------|-----------------|
25
- | Total LOC | **~24,000+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
31
+ | Total LOC | **~22,384+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
26
32
  | Skills | **14** |
27
33
  | Workflows | **12** |
28
34
  | Templates | **16** (Project: 11, Phase: 5) |
@@ -31,6 +37,8 @@ ViePilot is a skill framework that enables AI assistants to develop projects **a
31
37
  | ViePilot phases (repo) | **15** hoàn thành (xem `.viepilot/TRACKER.md`) |
32
38
  | Standards | 5 (SemVer, Commits, Changelog, Comments, Contributors) |
33
39
 
40
+ > Metric `Total LOC` có thể được refresh tự động bằng `npm run readme:sync` (dùng `cloc`; nếu thiếu `cloc` script sẽ fallback an toàn).
41
+
34
42
  ### Phân bổ / Breakdown
35
43
 
36
44
  | Thành phần / Component | Số lượng / Count | Mô tả / Description |
package/dev-install.sh CHANGED
@@ -31,6 +31,20 @@ echo " Target: $CURSOR_SKILLS_DIR, $VIEPILOT_DIR"
31
31
  echo " Profile: $INSTALL_PROFILE"
32
32
  echo ""
33
33
 
34
+ check_cloc_dependency() {
35
+ if command -v cloc >/dev/null 2>&1; then
36
+ echo -e " ${GREEN}✓${NC} cloc detected"
37
+ return 0
38
+ fi
39
+
40
+ echo -e "${YELLOW} cloc not found.${NC}"
41
+ echo " README LOC auto-sync will fallback safely, but metrics won't refresh automatically."
42
+ echo " Install suggestion:"
43
+ echo " - macOS: brew install cloc"
44
+ echo " - Ubuntu/Debian: sudo apt-get install -y cloc"
45
+ echo " - Windows: choco install cloc"
46
+ }
47
+
34
48
  # Confirm
35
49
  if [ "$AUTO_YES" != "1" ]; then
36
50
  read -p "This will replace existing installation with dev files. Continue? (y/n) " -n 1 -r
@@ -95,6 +109,7 @@ echo -e " ${GREEN}✓${NC} templates"
95
109
  echo -e " ${GREEN}✓${NC} bin"
96
110
  echo -e " ${GREEN}✓${NC} lib"
97
111
  echo -e " ${GREEN}✓${NC} ui-components"
112
+ check_cloc_dependency
98
113
 
99
114
  # Count installed
100
115
  SKILL_COUNT=$(ls -d "$CURSOR_SKILLS_DIR"/vp-*/ 2>/dev/null | wc -l | tr -d ' ')
@@ -41,6 +41,22 @@ npx viepilot install --target cursor-agent --yes
41
41
 
42
42
  ---
43
43
 
44
+ ### README LOC metric is not updating
45
+
46
+ **Cause**: `cloc` is not installed, so `readme:sync` skips update by design.
47
+
48
+ ```bash
49
+ # Install cloc (macOS)
50
+ brew install cloc
51
+
52
+ # Then rerun metric sync
53
+ npm run readme:sync
54
+ ```
55
+
56
+ On Linux/Windows, use your package manager (`apt`, `dnf`, `choco`) to install `cloc`.
57
+
58
+ ---
59
+
44
60
  ### `./install.sh: Permission denied`
45
61
 
46
62
  **Cause**: Script not executable.
@@ -48,6 +48,12 @@ vp-tools help
48
48
  # Hiển thị targets + ViePilot CLI Tools
49
49
  ```
50
50
 
51
+ Optional (maintainers):
52
+ ```bash
53
+ npm run readme:sync
54
+ # refresh README Total LOC metrics via cloc
55
+ ```
56
+
51
57
  ---
52
58
 
53
59
  ## Step 2: Create a New Project
package/install.sh CHANGED
@@ -40,6 +40,50 @@ echo " ViePilot: $VIEPILOT_DIR"
40
40
  echo " Profile: $INSTALL_PROFILE"
41
41
  echo ""
42
42
 
43
+ install_cloc_best_effort() {
44
+ if command -v cloc >/dev/null 2>&1; then
45
+ echo " ✓ cloc detected"
46
+ return 0
47
+ fi
48
+
49
+ echo -e "${YELLOW} cloc not found.${NC}"
50
+ echo " README metric auto-sync can still run with fallback, but LOC refresh will be skipped."
51
+ echo " Suggested install:"
52
+ echo " - macOS: brew install cloc"
53
+ echo " - Ubuntu/Debian: sudo apt-get install -y cloc"
54
+ echo " - Windows: choco install cloc"
55
+
56
+ if [ "$AUTO_YES" = "1" ]; then
57
+ return 0
58
+ fi
59
+
60
+ read -p " Attempt automatic cloc install now (best effort)? (y/n) " -n 1 -r
61
+ echo
62
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
63
+ return 0
64
+ fi
65
+
66
+ if command -v brew >/dev/null 2>&1; then
67
+ brew install cloc || true
68
+ elif command -v apt-get >/dev/null 2>&1; then
69
+ sudo apt-get update && sudo apt-get install -y cloc || true
70
+ elif command -v dnf >/dev/null 2>&1; then
71
+ sudo dnf install -y cloc || true
72
+ elif command -v yum >/dev/null 2>&1; then
73
+ sudo yum install -y cloc || true
74
+ elif command -v pacman >/dev/null 2>&1; then
75
+ sudo pacman -Sy --noconfirm cloc || true
76
+ else
77
+ echo -e "${YELLOW} Could not detect supported package manager. Install cloc manually.${NC}"
78
+ fi
79
+
80
+ if command -v cloc >/dev/null 2>&1; then
81
+ echo " ✓ cloc installed"
82
+ else
83
+ echo -e "${YELLOW} cloc is still unavailable; continuing without blocking installation.${NC}"
84
+ fi
85
+ }
86
+
43
87
  # Confirm installation
44
88
  if [ "$AUTO_YES" != "1" ]; then
45
89
  read -p "Continue with installation? (y/n) " -n 1 -r
@@ -102,6 +146,9 @@ chmod +x "$VIEPILOT_DIR/bin/vp-tools.cjs"
102
146
  chmod +x "$VIEPILOT_DIR/bin/viepilot.cjs"
103
147
  echo " ✓ vp-tools.cjs + viepilot.cjs + lib/cli-shared.cjs"
104
148
 
149
+ echo " Checking optional dependency for README metric sync..."
150
+ install_cloc_best_effort
151
+
105
152
  # Create symlink in PATH (optional)
106
153
  echo ""
107
154
  if [ "$AUTO_YES" != "1" ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viepilot",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "**Autonomous Vibe Coding Framework / Bộ khung phát triển tự động có kiểm soát**",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -14,6 +14,7 @@
14
14
  "test": "jest",
15
15
  "test:coverage": "jest --coverage",
16
16
  "test:watch": "jest --watch",
17
+ "readme:sync": "node scripts/sync-readme-metrics.cjs",
17
18
  "lint:cli": "node --check bin/vp-tools.cjs && node --check bin/viepilot.cjs",
18
19
  "verify:release": "npm run lint:cli && npm test && npm pack --dry-run",
19
20
  "prepublishOnly": "npm run verify:release",
@@ -63,6 +63,7 @@ If required task details are missing, do not implement until task contract is re
63
63
 
64
64
  **Updates on milestone complete:**
65
65
  - `README.md` — version badge, skills/workflows counts, Skills Reference table, Workflows table, Project Structure, Completion Status
66
+ - `README.md` metrics — run `npm run readme:sync` when script exists; if `cloc` missing, continue with logged guidance (non-blocking)
66
67
 
67
68
  **After:** Project built, or paused for user intervention.
68
69
  </objective>
@@ -323,6 +323,11 @@ fi
323
323
  Update README.md — **generic updates (all projects)**:
324
324
  1. Any version number mentions: update to `$ACTUAL_VERSION`
325
325
  2. Any "last updated" or "as of" date references
326
+ 3. If project contains `README` metrics table and `scripts/sync-readme-metrics.cjs`, run:
327
+ ```bash
328
+ npm run readme:sync || true
329
+ ```
330
+ - If `cloc` is unavailable, script must log guidance and continue (non-blocking).
326
331
 
327
332
  **viepilot framework only** (skip if `skills/` directory does not exist):
328
333
  ```bash