viepilot 2.50.1 → 3.7.3

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 (49) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/README.md +17 -17
  3. package/bin/viepilot.cjs +1 -0
  4. package/bin/vp-tools.cjs +123 -1
  5. package/docs/brainstorm/session-2026-05-22.md +472 -0
  6. package/docs/dev/agents.md +51 -41
  7. package/docs/dev/architecture.md +26 -0
  8. package/docs/skills-reference.md +96 -0
  9. package/lib/adapter-context.cjs +294 -0
  10. package/lib/adapters/antigravity.cjs +8 -2
  11. package/lib/adapters/claude-code.cjs +4 -0
  12. package/lib/audit/browser-runner.cjs +102 -0
  13. package/lib/intake/adapters/browser.cjs +58 -0
  14. package/lib/intake/adapters/excel-m365.cjs +54 -6
  15. package/lib/intake/auto-intake.cjs +194 -0
  16. package/lib/intake/classifier.cjs +22 -4
  17. package/lib/intake/manifest.cjs +81 -0
  18. package/lib/intake/triage-ux.cjs +10 -2
  19. package/lib/intake/validator.cjs +97 -0
  20. package/lib/intake/writeback.cjs +169 -3
  21. package/lib/request/url-enricher.cjs +69 -0
  22. package/lib/viepilot-install.cjs +15 -0
  23. package/package.json +1 -1
  24. package/skills/vp-audit/SKILL.md +99 -3
  25. package/skills/vp-auto/SKILL.md +54 -4
  26. package/skills/vp-brainstorm/SKILL.md +69 -3
  27. package/skills/vp-crystallize/SKILL.md +52 -3
  28. package/skills/vp-debug/SKILL.md +52 -3
  29. package/skills/vp-design/SKILL.md +52 -3
  30. package/skills/vp-docs/SKILL.md +52 -3
  31. package/skills/vp-evolve/SKILL.md +52 -3
  32. package/skills/vp-info/SKILL.md +52 -3
  33. package/skills/vp-intake/SKILL.md +306 -7
  34. package/skills/vp-pause/SKILL.md +52 -3
  35. package/skills/vp-persona/SKILL.md +52 -3
  36. package/skills/vp-proposal/SKILL.md +52 -3
  37. package/skills/vp-request/SKILL.md +72 -3
  38. package/skills/vp-resume/SKILL.md +52 -3
  39. package/skills/vp-rollback/SKILL.md +52 -3
  40. package/skills/vp-skills/SKILL.md +52 -3
  41. package/skills/vp-status/SKILL.md +52 -3
  42. package/skills/vp-task/SKILL.md +52 -3
  43. package/skills/vp-ui-components/SKILL.md +52 -3
  44. package/skills/vp-update/SKILL.md +52 -3
  45. package/workflows/autonomous.md +268 -18
  46. package/workflows/brainstorm.md +222 -7
  47. package/workflows/crystallize.md +124 -6
  48. package/workflows/design.md +62 -1
  49. package/workflows/request.md +54 -8
package/CHANGELOG.md CHANGED
@@ -7,6 +7,220 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ---
11
+
12
+ ## [3.7.3] - 2026-05-23
13
+
14
+ ### Documentation
15
+ - sync README.md badges to v3.7.3: version, skills (21), workflows (14), tests (2210 passing)
16
+ - add vp-design, vp-intake, vp-persona sections to docs/skills-reference.md (21 skills total)
17
+ - update docs/dev/architecture.md orchestration model — ENH-096/097 delegation: tracker-agent, vp-git-agent, read+spawn-only orchestrator
18
+ - remove confusing dual-version paragraph from README.md versioning note
19
+
20
+ ---
21
+
22
+ ## [3.7.2] - 2026-05-23
23
+
24
+ ### Added — ENH-097: vp-auto Full Orchestrator Delegation (Phase 142)
25
+ - **agents/claude-code/vp-git-agent.md** — new agent for phase-level git ops: create-tag, push-branch, push-tags, push-all, git-status; orchestrator spawns instead of running git inline
26
+ - **agents/claude-code/tracker-agent.md** — new ops: `update-handoff` (HANDOFF.json patch), `update-roadmap-phase` (ROADMAP.md phase status update); Write tool added
27
+
28
+ ### Changed — ENH-097
29
+ - **workflows/autonomous.md** — ENH-096 whitelist tightened: orchestrator Bash = read-only git checks only; all state writes and git ops now go through tracker-agent / vp-git-agent / changelog-agent
30
+ - **workflows/autonomous.md** — §4 Update State: full tracker-agent spawn patterns for task-status, handoff, roadmap sync
31
+ - **workflows/autonomous.md** — §5 Phase Complete: git tagging and push delegated to vp-git-agent; TRACKER.md sync to tracker-agent
32
+
33
+ ---
34
+
35
+ ## [3.7.1] - 2026-05-23
36
+
37
+ ### Changed — ENH-096: vp-auto Orchestrator Enforcement (Phase 141)
38
+ - **workflows/autonomous.md** — ⛔ hard stop block: explicit prohibition on inline implementation in orchestrator context; lists forbidden ops (Edit/Write on lib/bin/tests/agents/skills); enforces delegation even for single-task phases
39
+ - **workflows/autonomous.md** — orchestrator-only whitelist: Read (state files), Bash (git/vp-tools), Agent (spawn workers), Edit/Write (.viepilot/ state only)
40
+ - **workflows/autonomous.md** — concrete `Agent(vp-task-executor)` spawn template with exact prompt text and all placeholder fields ({task_path}, {phase_dir}, {cwd}, {projectPrefix})
41
+
42
+ ---
43
+
44
+ ## [3.7.0] - 2026-05-23
45
+
46
+ ### Added — ENH-095: AI-Driven Intake Intelligence — Manifest + Post-task Write-back (Phase 140)
47
+ - **lib/intake/manifest.cjs** — new manifest module: `saveManifest`, `loadManifest`, `isManifestFresh` (TTL-based), `getColumnMap`, `getWriteBackConfig`, `manifestPath`, `slugify`; manifest stored at `.viepilot/intake/{channel_id}-manifest.json`
48
+ - **agents/claude-code/excel-intake-agent.md** — new `Op: analyze_structure` section: AI reads all sheets, determines purpose/header rows/column semantics/write_back config, outputs structured JSON manifest; no hardcoded IDs
49
+ - **agents/claude-code/sheets-intake-agent.md** — matching `Op: analyze_structure` parity section
50
+ - **skills/vp-intake/SKILL.md** — manifest lifecycle workflow (check TTL → `--analyze` op → save manifest → use `getColumnMap`); new `## Intake Source` block embedded in accepted-ticket request files for post-task traceability
51
+ - **lib/intake/writeback.cjs** — new `writebackIntakeResponse(channel, sourceRow, response, projectRoot, sheetName, responseCol)`: writes status back to source row after PASS; `sharing_url` = read-only skip; `workbook_id` = Graph API PATCH; CSV/browser = silent skip
52
+ - **workflows/autonomous.md** — Post-PASS Intake Write-back hook (ENH-095): reads `## Intake Source` block from task.md, loads manifest, calls `writebackIntakeResponse`; non-fatal on failure
53
+
54
+ ---
55
+
56
+ ## [3.6.2] - 2026-05-23
57
+
58
+ ### Fixed
59
+ - **BUG-030** `lib/intake/adapters/excel-m365.cjs` — `parseRowsWithColumnMap` now handles missing `column_map` gracefully: auto-detects columns from header row using Vietnamese/English aliases (`HEADER_ALIASES`), warns to stderr with detected mapping, falls back to empty map instead of crashing with `TypeError`
60
+ - **BUG-030** Export `autoDetectColumnMap` + `HEADER_ALIASES` for testing and external use
61
+ - **ENH-094** `lib/intake/adapters/browser.cjs` — add `sharepoint-xlsx` pattern (`/sharepoint\.com\/:[a-z]:\/r\//`) to `URL_PATTERNS`; SharePoint xlsx sharing URLs now detected correctly instead of falling through as `generic-table`
62
+ - **ENH-094** `skills/vp-intake/SKILL.md` — browser channel dispatch now routes `sharepoint-xlsx` URLs to `excel-intake-agent` (sharing_url mode) instead of `browser-intake-agent`
63
+
64
+ ---
65
+
66
+ ## [3.6.0] - 2026-05-23
67
+
68
+ ### Added
69
+ - **ENH-090** `browser-intake-agent` (agents/claude-code/) — reads publicly shared URLs (Google Sheets, GitHub Issues, Jira, Trello, Notion) for vp-intake via `vercel-labs/agent-browser`
70
+ - **ENH-090** `lib/intake/adapters/browser.cjs` — URL type detector + browser channel dispatcher; supports google-sheets / github-issues / jira / trello / notion / generic
71
+ - **ENH-090** `skills/vp-intake/SKILL.md` — new `browser` channel type with `url` field; fallback chain: agent-browser → WebFetch → manual
72
+ - **ENH-091** `browser-audit-agent` (agents/claude-code/) — visual + functional dev server audit ops: audit_routes, visual_check, accessibility_check
73
+ - **ENH-091** `lib/audit/browser-runner.cjs` — browser audit orchestrator; writes `.viepilot/audit/visual-report-{timestamp}.md`; baseline save/compare
74
+ - **ENH-091** `skills/vp-audit/SKILL.md` — `--visual` / `--browser <url>` flags for runtime browser audit
75
+ - **ENH-092** `agents/claude-code/research-agent.md` upgraded — new ops: `browse_url`, `compare_products`, `extract_pricing` for JS-rendered competitor/doc research
76
+ - **ENH-092** `workflows/brainstorm.md` Step 3 — URL research block: dispatch research-agent with browse_url when reference URL provided
77
+ - **ENH-093** `lib/request/url-enricher.cjs` — URL auto-enricher; routes GitHub/Linear/Jira/Trello/Notion URLs to browser-intake-agent for pre-fill extraction
78
+ - **ENH-093** `workflows/request.md` — URL detection pre-step before Step 1; shows extracted fields with confirm/edit prompt
79
+ - **ENH-093** `skills/vp-request/SKILL.md` — URL auto-enrichment documentation with examples for all 5 tracker sources
80
+
81
+ ---
82
+
83
+ ## [3.5.0] - 2026-05-23
84
+
85
+ ### Added — ENH-088: `--schedule`/`--unschedule` flags + `--auto` headless intake mode (Phase 138)
86
+ ### Added — lib/intake/auto-intake.cjs: `runAutoIntake`, `createSchedule`, `deleteSchedule`, `appendPendingReview`
87
+ ### Added — vp-intake SKILL.md: pending-review queue check at manual run start
88
+ ### Changed — lib/intake/classifier.cjs: returns `{ classified, confidence: 0.0–1.0 }` (was plain string)
89
+
90
+ ---
91
+
92
+ ## [3.4.0] - 2026-05-23
93
+
94
+ ### Added — ENH-087: parallel codebase validation (Step 4.5) before triage in vp-intake (Phase 137)
95
+ ### Added — lib/intake/validator.cjs: `validateTickets`, `extractKeywords`, `validateTicket` (fan-out + duplicate detection)
96
+ ### Changed — triage-ux.cjs: `_validation` badge shown per ticket in AUQ display
97
+
98
+ ---
99
+
100
+ ## [3.3.0] - 2026-05-23
101
+
102
+ ### Added — ENH-089: `excel-intake-agent` + `sheets-intake-agent` native CC agents (Phase 136)
103
+ ### Fixed — BUG-029: Excel M365 write-back stub replaced with Graph API PATCH implementation
104
+ ### Changed — vp-intake SKILL.md: Excel/Sheets dispatch via native agents on CC adapter (Step 4 + Step 6)
105
+
106
+ ---
107
+
108
+ ## [3.2.0] - 2026-05-22
109
+
110
+ ### Added — ENH-086: 6 workflow agents promoted to native Claude Code agents (Phase 135)
111
+ - `agents/claude-code/changelog-agent.md`, `tracker-agent.md`, `research-agent.md`,
112
+ `file-scanner-agent.md`, `test-generator-agent.md`, `doc-sync-agent.md` — all 6 now
113
+ installed to `~/.claude/agents/` and visible in Claude Code's `/agents` dialog
114
+ - `research-agent` uses `claude-sonnet-4-6`; other 5 use `claude-haiku-4-5`
115
+ - 11 new tests: `tests/unit/phase135-enh086-native-agents.test.js`
116
+
117
+ ### Fixed — BUG-028: test-generator-agent + file-scanner-agent wired (Phase 135)
118
+ - `workflows/autonomous.md`: `test-generator-agent` invocation block added before
119
+ git-persistence gate, triggered on last task of phase when `## Acceptance Criteria` present
120
+ - `skills/vp-audit/SKILL.md`: Tier 1 + Tier 2 scan steps invoke `file-scanner-agent`
121
+ (subagent_type) for repo-wide Glob+Grep; non-Claude-Code fallback retained
122
+
123
+ ### Changed
124
+ - `workflows/autonomous.md`: tracker-agent, changelog-agent, doc-sync-agent invocations
125
+ use `subagent_type: "X-agent"` directly (no prompt-injection "Load agents/X.md" preamble)
126
+ - `workflows/request.md`: research-agent feasibility gate uses `subagent_type: "research-agent"`
127
+ - `docs/dev/agents.md`: architecture diagram updated to show all 9 native agents in
128
+ `~/.claude/agents/`; adapter table updated; invocation pattern updated
129
+
130
+ ### Fixed — BUG-027 tracking (Phase 135)
131
+ - TRACKER.md and ROADMAP.md updated to reflect BUG-027 as done (code fix shipped in v3.1.1)
132
+
133
+ ---
134
+
135
+ ## [3.1.1] - 2026-05-22
136
+
137
+ ### Fixed — BUG-027: claudeAgentsDir wired into install plan (Phase 134)
138
+ - `lib/viepilot-install.cjs`: `buildInstallPlan` now reads `adapter.claudeAgentsSrc` +
139
+ `adapter.claudeAgentsDir` and adds copy steps for each `.md` in `agents/claude-code/`
140
+ to `~/.claude/agents/` (native Claude Code agents directory)
141
+ - After install: `~/.claude/agents/vp-task-executor.md`, `vp-phase-planner.md`,
142
+ `vp-quality-gate.md` are present and the fan-out orchestration in `autonomous.md` works
143
+ - 5 new tests: `tests/unit/phase134-bug027-claude-agents-install.test.js`
144
+
145
+ ---
146
+
147
+ ## [3.1.0] - 2026-05-22
148
+
149
+ ### v3.1.0 — vp-auto Orchestration Refactor (FEAT-021 Phase 133)
150
+
151
+ #### Phase 133 — vp-auto Orchestration Refactor ✅
152
+ - `autonomous.md`: orchestration mode selection — `ADAPTER_PARALLEL` flag gates fan-out vs sequential
153
+ - `autonomous.md`: dependency resolution via `vp-phase-planner` agent → `clusters` JSON (can_parallel, sequential_fallback)
154
+ - `autonomous.md`: fan-out dispatch — parallel `Agent(vp-task-executor)` calls per cluster; simultaneous execution
155
+ - `autonomous.md`: model tiering — Haiku workers for routine file edits, Sonnet for planner + quality gate
156
+ - `autonomous.md`: Agent Teams mode for large phases (task count ≥ 8 + `orchestration.teams == true`)
157
+ - `autonomous.md`: sequential fallback for Cursor/Antigravity/Codex/Copilot (`orchestration.parallel == false`)
158
+ - `autonomous.md`: quality gate after each cluster via `Agent(vp-quality-gate)` — PASS/FAIL/PARTIAL routing
159
+ - 13 new tests: `tests/unit/phase133-feat021-vp-auto-orchestration.test.js`
160
+
161
+ ---
162
+
163
+ ## [3.0.0] - 2026-05-22
164
+
165
+ ### v3.0.0 — Per-Adapter Intelligence Refactor (FEAT-021)
166
+
167
+ **Milestone**: v3.0 — Phases 127–132 → v3.0.0, Phase 133 → v3.1.0
168
+ **Breaking changes**: `cursor_skill_adapter` removed from all SKILL.md; new `<adapter id="...">` 5-block standard
169
+
170
+ #### Phase 127 — Adapter Detection + ADAPTER_CONTEXT + Validate ✅
171
+ - `vp-tools detect-adapter`: heuristic adapter detection at session start (env vars + process parent)
172
+ - `lib/adapter-context.cjs`: ADAPTER_CONTEXT schema with tools{}, interactive, subagent, orchestration{} per adapter (5 adapters)
173
+ - `vp-tools validate --adapter <id>`: checks tool availability, warns on limitations
174
+ - ADAPTER_CONTEXT injection at session start in autonomous.md
175
+
176
+ #### Phase 128 — SKILL.md 5-Block Adapter Standard ✅
177
+ - Replace `<cursor_skill_adapter>` with `<adapter id="claude-code|cursor-agent|antigravity|codex|copilot">` in all 21 SKILL.md files
178
+ - Claude Code now has correct tool names: `Bash` (not Shell), `Read` (not ReadFile), `Grep` (not rg), `Edit`/`Write` (not ApplyPatch), `Agent` (not Subagent)
179
+ - Documented in `docs/dev/adapter-blocks.md`
180
+
181
+ #### Phase 129 — Workflow Adapter-Aware Execution Paths ✅
182
+ - All 4 core workflows (autonomous, brainstorm, crystallize, design) read ADAPTER_CONTEXT
183
+ - Unified fallback chains: AUQ → text list → defaults (interactive); Bash/run_terminal_cmd/shell/container.exec (shell)
184
+ - No more per-workflow inline compat tables
185
+
186
+ #### Phase 130 — Claude Code Agent Definitions + Hooks ✅
187
+ - `.claude/agents/vp-task-executor.md`: Haiku model worker (Read/Edit/Write/Bash/Glob/Grep, maxTurns=30)
188
+ - `.claude/agents/vp-phase-planner.md`: Sonnet dependency resolver
189
+ - `.claude/agents/vp-quality-gate.md`: Sonnet test runner + output checker
190
+ - PreToolUse/PostToolUse hooks as workflow gates via `vp-tools hooks install --adapter claude-code`
191
+
192
+ #### Phase 131 — Antigravity Path Fix + Deprecation Notice ✅
193
+ - Antigravity adapter adds `projectSkillsDir: '.agents/skills'` for project-level skill installs alongside global `~/.gemini/antigravity/skills/`
194
+ - `vp-tools install --target antigravity` shows Gemini CLI deprecation notice (Gemini CLI deprecated June 18, 2026; successor: Antigravity CLI)
195
+ - `isAvailable()` now also detects `.agents/` directory in cwd for project-scoped setups
196
+ - Deprecation notice links to both project (`.agents/skills/`) and global (`~/.gemini/antigravity/skills/`) skill paths
197
+ - 8 new tests: `tests/unit/phase131-feat021-antigravity-path-fix.test.js`
198
+
199
+ #### Phase 132 — Tests + CHANGELOG + v3.0.0 Bump ✅
200
+ - 25 new integration + contract tests covering: ADAPTER_CONTEXT completeness, adapter tool mappings, 5-block standard across all SKILL.md, workflow adapter-aware paths, claude-code agent definitions, antigravity Phase 131 additions
201
+ - `tests/unit/phase132-feat021-integration.test.js`: 13 integration tests (adapter detection, ADAPTER_CONTEXT schema, detect-adapter --json, validate --adapter)
202
+ - `tests/unit/phase132-feat021-contracts.test.js`: 12 contract tests (5-block standard, workflow adapter refs, adapter property contracts)
203
+ - Version bump: 2.51.0 → 3.0.0; CHANGELOG [3.0.0] finalized
204
+
205
+ #### Phase 133 — vp-auto Orchestration Refactor (planned → v3.1.0)
206
+ - autonomous.md: task dependency graph + runnable cluster identification
207
+ - Fan-out dispatch: parallel `Agent` tool calls for independent tasks within a cluster
208
+ - Agent Teams mode for large homogeneous phases (task count ≥8 + ADAPTER_CONTEXT.orchestration.teams)
209
+ - Model tiering: Haiku workers for routine file edits, Sonnet for orchestrator + quality gate
210
+ - Adapter fallback: sequential mode when `orchestration.parallel == false` (Cursor/Copilot/Antigravity/Codex)
211
+ - Target: ≥60% token reduction vs. single-agent for typical 7-task phase
212
+
213
+ ## [2.51.0] - 2026-05-22
214
+
215
+ ### Added — ENH-085: Mobile UI Direction Breakdown Quality (Phase 126)
216
+ - `design.md` schema: `screens` breakpoints (mobile/tablet/desktop/wide) + `strategy` field + `## Responsive Components` table; `--sync` maps screens → Tailwind `theme.extend.screens`
217
+ - Brainstorm: **Mobile Design Direction sub-phase** — AUQ 1 (viewport strategy: mobile-first/desktop-first/mobile-only/desktop-only) + AUQ 2 multi-select device scope (phone/tablet/desktop/wide), fires when mobile/responsive/breakpoint/viewport/touch keywords detected
218
+ - Brainstorm: Per-breakpoint `<details>` sections in `pages/*.html` — Phone/Tablet/Desktop layout + navigation strategy (lookup table by page type), CSS block for `.responsive-breakdown`
219
+ - Brainstorm: **Component Responsive Map** table auto-generated in `notes.md` (≥7 rows: Nav/Grid/Table/Modal/Forms/Buttons/Images + Navigation Pattern Detail + Tailwind utility reference); guard against duplicate generation
220
+ - Sub-scan A (crystallize): Extracts `theme.screens` / `theme.extend.screens` from `tailwind.config.js` (fallback to Tailwind defaults); scans JSX/TSX/Vue/Svelte for `sm:/md:/lg:/xl:/2xl:` patterns; infers mobile-first vs. desktop-first strategy; emits RESPONSIVE SUMMARY block
221
+ - Crystallize: **Step 1A-iv** — consumes responsive metadata from 4 sources (notes.md Component Responsive Map, session context, pages/*.html breakpoint sections, Sub-scan A); emits `## Responsive Implementation Notes` in ARCHITECTURE.md with per-page responsive target table and high-priority component list
222
+ - 27 tests in `tests/unit/phase126-enh085-mobile-ui-direction.test.js`
223
+
10
224
  ## [2.50.1] - 2026-05-17
11
225
 
12
226
  ### Fixed
package/README.md CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  **Autonomous Vibe Coding Framework / Bộ khung phát triển tự động có kiểm soát**
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.31.0-blue.svg)](CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/version-3.7.3-blue.svg)](CHANGELOG.md)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
7
- [![Skills](https://img.shields.io/badge/skills-18-purple.svg)](#skills-reference)
8
- [![Workflows](https://img.shields.io/badge/workflows-13-orange.svg)](#workflows)
7
+ [![Skills](https://img.shields.io/badge/skills-21-purple.svg)](#skills-reference)
8
+ [![Workflows](https://img.shields.io/badge/workflows-14-orange.svg)](#workflows)
9
9
  [![Templates](https://img.shields.io/badge/templates-17-cyan.svg)](#templates)
10
- [![Tests](https://img.shields.io/badge/tests-1324%20passing-brightgreen.svg)](tests/)
10
+ [![Tests](https://img.shields.io/badge/tests-2210%20passing-brightgreen.svg)](tests/)
11
11
  [![GitHub](https://img.shields.io/github/stars/0-CODE/viepilot?style=social)](https://github.com/0-CODE/viepilot)
12
12
 
13
- **Versioning:** Shield **2.19.0** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**2.19.0**) is the Node package identifier for this repo; use the framework version for milestone releases and docs.
13
+ **Version**: `3.7.3` tracked in `package.json`, `CHANGELOG.md`, and `.viepilot/TRACKER.md`.
14
14
 
15
15
  ViePilot là bộ skill framework cho phép AI assistant (Claude, GPT, etc.) phát triển dự án một cách **tự động**, **có kiểm soát**, và **có thể khôi phục**. Thiết kế theo các tiêu chuẩn chuyên nghiệp: Semantic Versioning, Conventional Commits, Keep a Changelog.
16
16
 
@@ -28,13 +28,13 @@ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
28
28
 
29
29
  | Chỉ số / Metric | Giá trị / Value |
30
30
  |-----------------|-----------------|
31
- | Total LOC | **~51,713+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
32
- | Skills | **18** |
33
- | Workflows | **12** |
31
+ | Total LOC | **~94,739+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
32
+ | Skills | **21** |
33
+ | Workflows | **14** |
34
34
  | Templates | **17** (Project: 12, Phase: 5) |
35
35
  | CLI Commands | **18** (`vp-tools` 17 subcommands + `viepilot` installer) |
36
- | Tests | **607** (34 suites: unit + integration + AI compat + README metrics + UI direction + ENH contracts + scope policy + FEAT-009/010/011/012/013/015 + ENH-021~037 routing/language/architect/adapter + BUG-009~013 guards + viepilot-info/update/install/adapters) |
37
- | ViePilot phases (local `.viepilot`) | **62** phase cycles — **v2.4.0** FEAT-015 Codex adapter; **v2.3.x** ENH-036~037 installer cleanup; **v2.0.0** FEAT-013 dynamic adapters; **v1.x** M1.29 (FEAT-001~013); xem `CHANGELOG.md` |
36
+ | Tests | **2210** (111 suites: unit + integration + AI compat + README metrics + UI direction + ENH contracts + scope policy + FEAT-009/010/011/012/013/015 + ENH-021~037 routing/language/architect/adapter + BUG-009~013 guards + viepilot-info/update/install/adapters) |
37
+ | ViePilot phases (local `.viepilot`) | **142** phase cycles — **v3.7.x** ENH-095~097 orchestrator delegation; **v3.0.0** M3.0 Per-Adapter Intelligence; **v2.4.0** FEAT-015 Codex; **v2.0.0** FEAT-013 dynamic adapters; xem `CHANGELOG.md` |
38
38
  | Standards | 5 (SemVer, Commits, Changelog, Comments, Contributors) |
39
39
 
40
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).
@@ -43,29 +43,29 @@ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
43
43
 
44
44
  | Thành phần / Component | Số lượng / Count | Mô tả / Description |
45
45
  |------------------------|------------------|---------------------|
46
- | Skill Definitions | **17** | SKILL.md files với trigger, process, success criteria |
47
- | Workflow Files | **12** | Step-by-step execution guides |
46
+ | Skill Definitions | **21** | SKILL.md files với trigger, process, success criteria |
47
+ | Workflow Files | **14** | Step-by-step execution guides |
48
48
  | Project Templates | 12 | AI-GUIDE, ARCHITECTURE, VIEPILOT-META, README, SYSTEM-RULES, etc. |
49
49
  | Phase Templates | 5 | SPEC, PHASE-STATE, TASK, VERIFICATION, SUMMARY |
50
50
  | CLI Tools | 2 | vp-tools.cjs (**17** subcommands) + viepilot.cjs (guided installer) |
51
- | Test Files | 34 | Jest: 33 unit + 1 integration (contracts, installer + Claude paths, info/update, FEAT-009/010/011~015, ENH-021~037, BUG-009~013 guards, adapter tests, scope policy, …) |
51
+ | Test Files | 111 | Jest: 111 test files (contracts, installer + Claude paths, info/update, FEAT-009/010/011~015, ENH-021~037, BUG-009~013 guards, adapter tests, scope policy, …) |
52
52
 
53
53
  ---
54
54
 
55
55
  ## Độ hoàn thiện / Completion Status
56
56
 
57
57
  ```
58
- Tổng thể / Overall: ████████████████████ ~99% ✅ Latest **v2.4.0** FEAT-015 Codex adapter; **v2.3.x** ENH-036~037 installer cleanup; **v2.1.x** BUG-009~013; **v2.0.0** FEAT-013 dynamic adapters
58
+ Tổng thể / Overall: ████████████████████ ~99% ✅ Latest **v3.7.3** ENH-095~097 orchestrator delegation; **v3.0.0** M3.0 Per-Adapter Intelligence; **v2.4.0** FEAT-015 Codex adapter; **v2.0.0** FEAT-013 dynamic adapters
59
59
  ```
60
60
 
61
61
  | Lĩnh vực / Area | Trạng thái | Chi tiết |
62
62
  |-----------------|------------|----------|
63
- | Core Skills (18) | ✅ Hoàn thiện | brainstorm, crystallize, auto, pause, resume, status, info, request, evolve, docs, update, task, debug, rollback, audit, ui-components, proposal, **skills** |
64
- | Workflows (13) | ✅ Hoàn thiện | Full step-by-step guides với success criteria |
63
+ | Core Skills (21) | ✅ Hoàn thiện | brainstorm, crystallize, auto, pause, resume, status, info, request, evolve, docs, update, task, debug, rollback, audit, ui-components, proposal, skills, **design, intake, persona** |
64
+ | Workflows (14) | ✅ Hoàn thiện | Full step-by-step guides với success criteria |
65
65
  | Project Templates (12) | ✅ Hoàn thiện | Placeholders cho customization (+ `VIEPILOT-META` FEAT-009) |
66
66
  | Phase Templates (5) | ✅ Hoàn thiện | Task tracking, verification, summary |
67
67
  | CLI Tools (18) | ✅ Hoàn thiện | vp-tools 17 subcommands + viepilot installer; bundle `info` / `update` |
68
- | Tests (957) | ✅ Hoàn thiện | Unit, integration, AI compat, workflow contracts, installer, scope policy, FEAT-009~015, ENH-021~048, BUG-009~013, adapter tests, AskUserQuestion adapter-aware prompts |
68
+ | Tests (2210) | ✅ Hoàn thiện | Unit, integration, AI compat, workflow contracts, installer, scope policy, FEAT-009~015, ENH-021~048, BUG-009~013, adapter tests, AskUserQuestion adapter-aware prompts |
69
69
  | CI/CD | ✅ Hoàn thiện | GitHub Actions, Node 18/20/22 matrix, coverage >80% |
70
70
  | Documentation | ✅ Hoàn thiện | dev/, user/, api/, videos/, examples/, troubleshooting |
71
71
  | Standards | ✅ Hoàn thiện | SemVer, Conventional Commits, Keep a Changelog |
package/bin/viepilot.cjs CHANGED
@@ -383,6 +383,7 @@ async function installCommand(rawArgs) {
383
383
  const a = adapterMap[target];
384
384
  if (a && !seenAdapters.has(a.id)) {
385
385
  seenAdapters.add(a.id);
386
+ if (a.deprecationNotice) console.log(`\n${a.deprecationNotice}`);
386
387
  console.log(`- ${a.name}: ${a.postInstallHint || 'run /vp-status'}`);
387
388
  }
388
389
  }
package/bin/vp-tools.cjs CHANGED
@@ -1303,6 +1303,126 @@ ${colors.cyan}Examples:${colors.reset}
1303
1303
  console.log('\nEdit .viepilot/intake/channels.json to configure your ticket channels.');
1304
1304
  },
1305
1305
 
1306
+ /**
1307
+ * Detect active adapter from environment heuristics (FEAT-021 Phase 127)
1308
+ * Usage: vp-tools detect-adapter [--json]
1309
+ */
1310
+ 'detect-adapter': (args) => {
1311
+ const { detectAdapter, getAdapterContext } = require('../lib/adapter-context.cjs');
1312
+ const jsonMode = args.includes('--json');
1313
+ const adapterId = detectAdapter();
1314
+ const ctx = getAdapterContext(adapterId);
1315
+
1316
+ if (jsonMode) {
1317
+ const output = {
1318
+ adapter: adapterId,
1319
+ name: ctx.name,
1320
+ interactive_mode: ctx.interactive,
1321
+ subagent: ctx.subagent,
1322
+ orchestration: ctx.orchestration,
1323
+ hooks_count: ctx.hooks.count,
1324
+ mcp: ctx.mcp,
1325
+ capabilities: Object.entries(ctx.tools)
1326
+ .filter(([, v]) => v !== null)
1327
+ .map(([k]) => k),
1328
+ };
1329
+ console.log(JSON.stringify(output, null, 2));
1330
+ return;
1331
+ }
1332
+
1333
+ console.log(`\n${colors.bold}Active Adapter:${colors.reset} ${ctx.name} (${adapterId})`);
1334
+ console.log(`\n${colors.cyan}Interactive:${colors.reset} ${ctx.interactive}`);
1335
+ console.log(`${colors.cyan}Subagent:${colors.reset} ${ctx.subagent}`);
1336
+ console.log(`${colors.cyan}Parallel exec:${colors.reset} ${ctx.orchestration.parallel}`);
1337
+ console.log(`${colors.cyan}Agent Teams:${colors.reset} ${ctx.orchestration.teams}`);
1338
+ console.log(`${colors.cyan}Hooks:${colors.reset} ${ctx.hooks.count} events`);
1339
+ console.log(`${colors.cyan}MCP limit:${colors.reset} ${ctx.mcp.tool_limit !== null ? ctx.mcp.tool_limit + ' tools' : 'none'}`);
1340
+ console.log(`\n${colors.cyan}Tool names:${colors.reset}`);
1341
+ Object.entries(ctx.tools)
1342
+ .filter(([, v]) => v !== null)
1343
+ .forEach(([k, v]) => console.log(` ${k.padEnd(14)} → ${v}`));
1344
+ console.log();
1345
+ },
1346
+
1347
+ /**
1348
+ * Validate adapter capability requirements (FEAT-021 Phase 127)
1349
+ * Usage: vp-tools validate --adapter <id>
1350
+ */
1351
+ validate: (args) => {
1352
+ const { getAdapterContext, listAdapterIds } = require('../lib/adapter-context.cjs');
1353
+ const adapterIdx = args.indexOf('--adapter');
1354
+ const adapterId = adapterIdx !== -1 ? args[adapterIdx + 1] : null;
1355
+
1356
+ if (!adapterId) {
1357
+ console.error(formatError('--adapter <id> is required', `Known adapters: ${listAdapterIds().join(', ')}`));
1358
+ process.exitCode = 1;
1359
+ return;
1360
+ }
1361
+
1362
+ let ctx;
1363
+ try {
1364
+ ctx = getAdapterContext(adapterId);
1365
+ } catch (e) {
1366
+ console.error(formatError(e.message));
1367
+ process.exitCode = 1;
1368
+ return;
1369
+ }
1370
+
1371
+ const warnings = [];
1372
+ const errors = [];
1373
+
1374
+ // Critical tool checks
1375
+ if (!ctx.tools.shell) errors.push('No shell/command execution tool — vp-auto cannot run bash commands');
1376
+ if (!ctx.tools.read && !ctx.tools.write) errors.push('No file read or write tool — skill execution will be severely limited');
1377
+ if (!ctx.tools.edit && !ctx.tools.write) errors.push('No file edit/write tool — cannot implement code changes');
1378
+
1379
+ // AUQ interactive check
1380
+ if (ctx.interactive === 'none') {
1381
+ warnings.push('No interactive prompts (AUQ/AskQuestion) — all prompts will be skipped or use defaults');
1382
+ } else if (ctx.interactive === 'text-plan-only' || ctx.interactive === 'text') {
1383
+ warnings.push(`Interactive mode is "${ctx.interactive}" — AUQ not available; text list fallback will be used`);
1384
+ }
1385
+
1386
+ // Orchestration
1387
+ if (!ctx.orchestration.parallel) {
1388
+ warnings.push('Parallel task execution not supported — vp-auto will run in sequential mode (higher token usage)');
1389
+ }
1390
+
1391
+ // MCP limit
1392
+ if (ctx.mcp.tool_limit !== null) {
1393
+ warnings.push(`MCP tool limit: ${ctx.mcp.tool_limit} tools — verify your MCP server count stays within limit`);
1394
+ }
1395
+
1396
+ // Hooks
1397
+ if (ctx.hooks.count === 0) {
1398
+ warnings.push('No hook events supported — PreToolUse/PostToolUse gates will not fire');
1399
+ }
1400
+
1401
+ // Antigravity deprecation
1402
+ if (ctx.deprecation_notice) {
1403
+ warnings.push(`DEPRECATION: ${ctx.deprecation_notice}`);
1404
+ }
1405
+
1406
+ // Output
1407
+ console.log(`\n${colors.bold}ViePilot Capability Validation${colors.reset}`);
1408
+ console.log(`${colors.cyan}Adapter:${colors.reset} ${ctx.name} (${adapterId})\n`);
1409
+
1410
+ if (errors.length === 0 && warnings.length === 0) {
1411
+ console.log(formatSuccess('All capability checks passed — adapter fully supported'));
1412
+ return;
1413
+ }
1414
+
1415
+ errors.forEach(e => console.log(formatError(`CRITICAL: ${e}`)));
1416
+ warnings.forEach(w => console.log(formatWarning(`WARN: ${w}`)));
1417
+
1418
+ if (errors.length > 0) {
1419
+ console.log(`\n${colors.red}${errors.length} critical gap(s) detected. Some ViePilot features will not work on this adapter.${colors.reset}`);
1420
+ process.exitCode = 1;
1421
+ } else {
1422
+ console.log(`\n${colors.yellow}${warnings.length} warning(s). ViePilot will work with limitations on this adapter.${colors.reset}`);
1423
+ }
1424
+ },
1425
+
1306
1426
  /**
1307
1427
  * Help
1308
1428
  */
@@ -1501,6 +1621,8 @@ ${colors.cyan}Commands:${colors.reset}
1501
1621
  ${colors.bold}scan-skills${colors.reset} Scan installed skills → ~/.viepilot/skill-registry.json
1502
1622
  ${colors.bold}check-update${colors.reset} [--silent] Check for latest ViePilot version on npm (24h cached)
1503
1623
  ${colors.bold}persona${colors.reset} <op> Manage user personas (get|infer|list|set|auto-switch|context)
1624
+ ${colors.bold}detect-adapter${colors.reset} [--json] Detect active adapter (claude-code/cursor/antigravity/codex/copilot)
1625
+ ${colors.bold}validate${colors.reset} --adapter <id> Validate adapter capability requirements; exits 1 on critical gaps
1504
1626
  ${colors.bold}help${colors.reset} [command] Show help (optionally for specific command)
1505
1627
 
1506
1628
  ${colors.cyan}Examples:${colors.reset}
@@ -1517,7 +1639,7 @@ ${colors.gray}Run 'vp-tools help <command>' for detailed help on a specific comm
1517
1639
 
1518
1640
  // Helper function for progress bars
1519
1641
  function createProgressBar(percent, width = 10) {
1520
- const filled = Math.round(percent / (100 / width));
1642
+ const filled = Math.min(Math.round(percent / (100 / width)), width);
1521
1643
  const empty = width - filled;
1522
1644
  return `[${colors.green}${'█'.repeat(filled)}${colors.gray}${'░'.repeat(empty)}${colors.reset}]`;
1523
1645
  }