viepilot 2.12.0 → 2.22.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 (43) hide show
  1. package/CHANGELOG.md +203 -0
  2. package/README.md +11 -9
  3. package/docs/dev/agents.md +131 -0
  4. package/docs/skills-reference.md +12 -0
  5. package/docs/user/features/adapters.md +51 -0
  6. package/docs/user/features/interactive-prompts.md +83 -0
  7. package/lib/adapters/antigravity.cjs +2 -1
  8. package/lib/adapters/claude-code.cjs +2 -1
  9. package/lib/adapters/codex.cjs +2 -1
  10. package/lib/adapters/copilot.cjs +44 -0
  11. package/lib/adapters/cursor.cjs +2 -1
  12. package/lib/adapters/index.cjs +1 -0
  13. package/lib/viepilot-install.cjs +9 -0
  14. package/package.json +1 -1
  15. package/skills/vp-audit/SKILL.md +15 -0
  16. package/skills/vp-auto/SKILL.md +12 -0
  17. package/skills/vp-brainstorm/SKILL.md +34 -0
  18. package/skills/vp-crystallize/SKILL.md +51 -1
  19. package/skills/vp-debug/SKILL.md +12 -0
  20. package/skills/vp-docs/SKILL.md +28 -6
  21. package/skills/vp-evolve/SKILL.md +32 -0
  22. package/skills/vp-info/SKILL.md +12 -0
  23. package/skills/vp-pause/SKILL.md +12 -0
  24. package/skills/vp-proposal/SKILL.md +12 -0
  25. package/skills/vp-request/SKILL.md +36 -0
  26. package/skills/vp-resume/SKILL.md +12 -0
  27. package/skills/vp-rollback/SKILL.md +12 -0
  28. package/skills/vp-status/SKILL.md +12 -0
  29. package/skills/vp-task/SKILL.md +12 -0
  30. package/skills/vp-ui-components/SKILL.md +12 -0
  31. package/skills/vp-update/SKILL.md +12 -0
  32. package/templates/proposal/docx/project-detail.docx +0 -0
  33. package/templates/proposal/pptx/general.pptx +0 -0
  34. package/templates/proposal/pptx/product-pitch.pptx +0 -0
  35. package/templates/proposal/pptx/tech-architecture.pptx +0 -0
  36. package/workflows/audit.md +72 -37
  37. package/workflows/autonomous.md +138 -9
  38. package/workflows/brainstorm.md +61 -0
  39. package/workflows/crystallize.md +219 -8
  40. package/workflows/documentation.md +26 -11
  41. package/workflows/evolve.md +76 -7
  42. package/workflows/request.md +99 -7
  43. package/workflows/rollback.md +39 -7
package/CHANGELOG.md CHANGED
@@ -7,6 +7,209 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.22.0] - 2026-04-18
11
+
12
+ ### Added
13
+ - **ENH-058**: Workflow continuation prompt — AskUserQuestion at vp-evolve and vp-request completion
14
+ - `workflows/evolve.md` Step 5: AUQ asks "Execute now / Create request / Done" — selecting Execute invokes `/vp-auto` immediately
15
+ - `workflows/request.md` Step 7: AUQ asks "Plan phase / Create another / Done" — selecting Plan invokes `/vp-evolve` immediately
16
+ - Text fallback for Cursor / Codex / Copilot / Antigravity adapters (static list preserved)
17
+ - `skills/vp-evolve/SKILL.md` + `skills/vp-request/SKILL.md` AUQ prompt tables updated
18
+
19
+ ## [2.21.0] - 2026-04-18
20
+
21
+ ### Added
22
+ - **FEAT-019: GitHub Copilot Adapter** — install and run vp-* skills inside VS Code Copilot Chat and GitHub Copilot CLI
23
+ - `lib/adapters/copilot.cjs` — adapter definition with `~/.config/gh-copilot/` config home
24
+ - Auto-detect via `~/.config/gh-copilot/` directory or `gh` CLI binary presence
25
+ - Skill invocation: `/vp-status`, `/vp-auto`, etc. (same slash syntax as Claude Code / Cursor)
26
+ - Install command: `viepilot install --target copilot`
27
+ - 4 adapter-table SKILL.md files updated with GitHub Copilot row
28
+ - `docs/user/features/adapters.md` — Copilot section with surface matrix, prerequisites, limitations
29
+
30
+ ## [2.20.0] - 2026-04-18
31
+
32
+ ### Added
33
+ - **ENH-057: ViePilot Agents System** — 6 dedicated sub-agents for repetitive/parallelizable skill tasks:
34
+ - `tracker-agent`: TRACKER.md read/write delegation (phase status, task status, decision log)
35
+ - `research-agent`: WebSearch + WebFetch feasibility studies (auto-triggered in request.md Step 2B)
36
+ - `file-scanner-agent`: Glob + Grep repo-wide scanning (Explore subagent on Claude Code)
37
+ - `changelog-agent`: atomic CHANGELOG + version bump — single authority (resolves ENH-053)
38
+ - `test-generator-agent`: contract test scaffolding + run from acceptance criteria
39
+ - `doc-sync-agent`: bulk multi-file `.md` updates (≥5 files → 1 agent call)
40
+ - `agents/` directory with 6 agent definition files (`agents/*-agent.md`)
41
+ - Research-agent feasibility gate in `workflows/request.md` Step 2B — auto-triggered for Feature/platform requests
42
+ - Bulk-edit task detection in `workflows/autonomous.md` — doc-sync-agent invoked when ≥5 identical file types in task Paths
43
+ - Agent delegation table + invoke-agent patterns in `workflows/autonomous.md`
44
+ - `docs/dev/agents.md` — developer reference for agents layer architecture and invocation
45
+
46
+ ### Fixed
47
+ - **ENH-053**: Version bump authority unified in `changelog-agent` — `autonomous.md` and `evolve.md` both invoke it; no more inline duplication
48
+
49
+ ## [2.19.0] - 2026-04-18
50
+
51
+ ### Added
52
+ - **ENH-056: Skill invocation greeting banner** — all 17 `vp-*` skills now output
53
+ a version banner as the very first output on invocation:
54
+ ```
55
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
56
+ VIEPILOT ► VP-AUTO v0.2.2 (fw 2.19.0)
57
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
58
+ ```
59
+ Addresses Claude Code UI change where skill-load indicators are no longer shown;
60
+ users can now confirm which skill version is running. 119 contract tests added.
61
+
62
+ ## [2.18.0] - 2026-04-18
63
+
64
+ ### Fixed
65
+ - **vp-rollback** (BUG-014): `rollback.md` Step 7 now parses enriched tag format
66
+ `{project}-{branch}-{version}-vp-p{N}-t{M}` introduced by ENH-050. Rollback to
67
+ any Phase 57+ checkpoint correctly restores HANDOFF.json phase/task state.
68
+ All 3 formats (legacy, project-scoped, enriched) handled via `grep -oE vp-p[0-9]+`.
69
+
70
+ ### Changed
71
+ - **vp-crystallize** (ENH-051): Added "Brownfield Execution Path" table clarifying
72
+ which sub-steps (1A–1D) run, skip, or are conditional in brownfield mode.
73
+ Steps 1A/1B CONDITIONAL; Steps 1C/1D SKIP with rationale.
74
+ - **vp-brainstorm** (ENH-052): Step 6 now validates phase assignment before saving.
75
+ Scope-locked sessions with features but no phase assignments are blocked with
76
+ actionable message. Exploratory sessions and brownfield stubs bypass the gate.
77
+ - **Version bump rules** (ENH-053): Consolidated into `.viepilot/SYSTEM-RULES.md`
78
+ as single canonical table with precedence rule (MAJOR > MINOR > PATCH) and
79
+ mixed-phase handling. `evolve.md` and `autonomous.md` reference this table
80
+ instead of defining rules inline.
81
+ - **vp-audit post-phase hook** (ENH-054): Auto-hook integration upgraded from
82
+ conceptual note to concrete `<step name="post_phase_audit">` block in
83
+ `autonomous.md`. Runs 3 fast Tier 1+2 checks after every phase-complete event;
84
+ completely silent when no issues found; y/n prompt when issues detected.
85
+ - **AskUserQuestion enforcement** (ENH-055): All 13 AUQ prompt blocks across 4
86
+ workflows (evolve, request, brainstorm, crystallize) now explicitly mark Claude
87
+ Code adapter as REQUIRED. Plain-text menus remain as fallback for non-Claude-Code
88
+ adapters only. `vp-evolve/SKILL.md` gains new Adapter Compatibility section.
89
+
90
+ ### Files
91
+ - `workflows/rollback.md` — Step 7: 3-format tag parse with `grep -oE`
92
+ - `workflows/crystallize.md` — Brownfield Execution Path table (Step 0-C → Step 1)
93
+ - `workflows/brainstorm.md` — Pre-save phase validation gate in Step 6
94
+ - `.viepilot/SYSTEM-RULES.md` — Canonical Version Bump Rules table
95
+ - `workflows/evolve.md` — Version bump ref → SYSTEM-RULES.md; AUQ REQUIRED
96
+ - `workflows/autonomous.md` — Version bump ref + `post_phase_audit` step (5c)
97
+ - `workflows/audit.md` — Auto-hook: concrete integration spec replaces conceptual note
98
+ - `workflows/request.md`, `brainstorm.md`, `crystallize.md` — AUQ REQUIRED
99
+ - `skills/vp-evolve/SKILL.md` — New Adapter Compatibility section
100
+ - `skills/vp-request`, `vp-brainstorm`, `vp-crystallize` SKILL.md — AUQ REQUIRED
101
+ - `tests/unit/vp-workflow-consistency.test.js` — 35 contract tests
102
+
103
+ ## [2.17.0] - 2026-04-17
104
+
105
+ ### Changed
106
+ - **vp-auto** git tags now include active branch and package version for full
107
+ traceability. New format: `{prefix}-{branch}-{version}-vp-p{n}-t{n}`. (ENH-050)
108
+ - Branch resolved via `git rev-parse --abbrev-ref HEAD` (sanitized: `/` → `-`)
109
+ - Version resolved from `package.json` (fallback: `0.0.0`)
110
+ - Legacy tags (`{prefix}-vp-p{n}-*`) continue to be recognized by audit + rollback
111
+
112
+ ### Files
113
+ - `workflows/autonomous.md` — `TAG_PREFIX` resolution block (BRANCH_SAFE + VERSION);
114
+ task start, task done, and phase complete tag patterns updated to enriched format
115
+ - `workflows/audit.md` — `COMPLETE_TAGS` regex: added third alternative for enriched
116
+ format; `PREV_TAG` grep: extended char class to include `.` for version strings
117
+ - `workflows/rollback.md` — tag grep char class extended to include `.` for version strings
118
+ - `tests/unit/vp-enh050-git-tag-format.test.js` — 16 contract tests
119
+
120
+ ## [2.16.0] - 2026-04-17
121
+
122
+ ### Changed
123
+ - **vp-audit** Tier 4 (Framework Integrity) now runs silently — output is suppressed
124
+ when the check passes (✅) or is skipped (non-framework repo). Tier 4 is only
125
+ surfaced in the audit report when issues (⚠️) are found. (ENH-049)
126
+
127
+ ### Files
128
+ - `workflows/audit.md` — Step 4 skip: removed `echo "→ Tier 4 skipped"` message;
129
+ Step 4f report block wrapped in `TIER4_ISSUES > 0` guard; All Clear banner Tier 4
130
+ line removed; Issues Found banner Tier 4 line rendered only when `TIER4_ISSUES > 0`
131
+ - `skills/vp-audit/SKILL.md` — documented silent-by-default Tier 4 behavior (ENH-049)
132
+ - `tests/unit/vp-enh049-audit-tier4-silent.test.js` — 13 contract tests
133
+
134
+ ## [2.15.0] - 2026-04-13
135
+
136
+ ### Changed (ENH-048 — Phase 78: AskUserQuestion Adapter-Aware Integration)
137
+
138
+ All `vp-*` workflows that ask users questions now include adapter-aware interactive prompts.
139
+ Claude Code (terminal) receives a structured click-to-select UI via `AskUserQuestion` tool.
140
+ All other adapters (Cursor Agent/Skills, Codex CLI, Antigravity native) automatically fall back
141
+ to the existing plain-text numbered lists — no configuration required.
142
+
143
+ **Research findings (adapter compatibility):**
144
+ - Claude Code terminal: ✅ `AskUserQuestion` fully supported (native tool)
145
+ - Cursor Agent/Skills Mode: ❌ `AskQuestion` only available in Plan Mode (community feature request)
146
+ - Codex CLI: ❌ not native (community MCP `ask-user-questions-mcp` exists separately)
147
+ - Antigravity native agent: ❌ uses Artifact model, no raw tool calls
148
+
149
+ **`workflows/crystallize.md`:**
150
+ - Added `Adapter Compatibility` table near top
151
+ - License selection (Step 0): AUQ spec with MIT/Apache-2.0/GPL-3.0/Proprietary options
152
+ - Brownfield overwrite confirmation (Step 0-B): AUQ Yes/No prompt
153
+ - Polyrepo related-repos prompt (Step 0-B): AUQ Yes supply/Skip options
154
+ - UI direction gate (Step 1A): AUQ Return-to-brainstorm / Continue-with-assumptions options
155
+ - Architect mode suggestion (Step 1D): AUQ Yes/No architect mode routing
156
+
157
+ **`workflows/brainstorm.md`:**
158
+ - Added `Adapter Compatibility` table near top
159
+ - Session intent (Step 2): AUQ Continue-recent / Review-specific / New-session options
160
+ - Landing page layout (Step 4): AUQ Layout A/B/C/D with descriptions (4-option fit)
161
+
162
+ **`workflows/request.md`:**
163
+ - Added `Adapter Compatibility` table near top
164
+ - Request type detection (Step 2): AUQ Bug/Feature/Enhancement/Tech-Debt (Brainstorm+List remain text)
165
+ - Bug severity (Step 4A): AUQ Critical/High/Medium/Low options
166
+ - Feature priority (Step 4B): AUQ Must-have/Should-have/Nice-to-have options
167
+
168
+ **`workflows/evolve.md`:**
169
+ - Added `Adapter Compatibility` table near top
170
+ - Intent detection (Step 2): AUQ Add-Feature/New-Milestone/Refactor options
171
+ - Complexity question (Step 3A): AUQ S/M/L/XL options
172
+ - Brainstorm routing (Step 3A): AUQ Yes-brainstorm/No-plan-directly options
173
+
174
+ **`skills/vp-crystallize/SKILL.md`, `skills/vp-brainstorm/SKILL.md`, `skills/vp-request/SKILL.md`:**
175
+ - Added `## Adapter Compatibility` section with 6-row adapter support table
176
+ - Listed prompts using AskUserQuestion per skill
177
+
178
+ ### Added
179
+ - `tests/unit/vp-enh048-askuserquestion.test.js` — 33 contract tests verifying AUQ specs + text fallback preservation across all affected files
180
+
181
+ ## [2.14.0] - 2026-04-13
182
+
183
+ ### Added (ENH-047 — Phase 77: Brownfield Multi-Repo, Submodules & Per-Module Gap Detection)
184
+
185
+ **Gap A — Git Submodule Detection:**
186
+ - `workflows/crystallize.md`: Signal Category 1 now reads `.gitmodules` → parses all `[submodule]` blocks (name, path, url); runs Signal Cat 1+2+4 on each initialized submodule path; records uninitialized paths with `initialized: false` + `primary_language: MISSING`
187
+ - Scan Report `modules[]`: new fields `type` (submodule/workspace/root), `submodule_url`, `initialized`
188
+ - Safety rule: scanner never runs `git submodule update` — local filesystem read-only
189
+
190
+ **Gap B — Polyrepo / Multi-Repo Detection:**
191
+ - `workflows/crystallize.md`: new Polyrepo Detection subsection in Signal Category 1 with 6 signal sources (docker-compose `../` build contexts, `file:../` package.json deps, CI cross-repo clones, README external repo links, Makefile `cd ../` targets)
192
+ - Scan Report: `polyrepo_hints[]` + `related_repos[]` fields (omitted entirely when empty — no empty arrays in clean single-repo reports)
193
+ - Interactive prompt fires when polyrepo signals detected; user can supply related repo URLs with optional role label
194
+ - Gap-fill rule: polyrepo hints without `related_repos` → system-level context fields = ASSUMED tier
195
+
196
+ **Gap C — Per-Module Gap Detection:**
197
+ - `workflows/crystallize.md`: new Per-Module Gap Detection section with MUST-DETECT table (primary_language, framework, module_purpose, entry_point) including source signals and tier-if-absent rules
198
+ - `must_detect_status{}` per module: records `{ value, source, tier }` per MUST-DETECT field; source conventions: `"tsconfig.json"` (file), `"inferred"` (ASSUMED), `"absent"` (MISSING), `"user"` (gap-filled)
199
+ - Root gap tier rollup: worst tier across all modules (MISSING > ASSUMED > DETECTED)
200
+ - Module with `gap_tier: MISSING` blocks artifact generation with targeted per-field user prompt
201
+ - Per-module `open_questions[]` rolled up into root `open_questions[]`
202
+ - Scan summary printout table (module | path | language | framework | gap tier)
203
+ - `skills/vp-crystallize/SKILL.md`: Brownfield Mode section updated with Gaps A+B+C, Scan Report contents list, per-module MUST-DETECT fields
204
+
205
+ ## [2.13.0] - 2026-04-13
206
+
207
+ ### Changed (ENH-046 — Phase 76)
208
+ - **`workflows/documentation.md`**: replaced GitHub-only URL parser with a forge-agnostic extractor supporting GitHub (SSH/HTTPS), GitLab (SSH/HTTPS), Bitbucket, Azure DevOps (`dev.azure.com`), Gitea, and any self-hosted remote
209
+ - Variables renamed: `GITHUB_OWNER`/`GITHUB_REPO` → `GIT_OWNER`/`GIT_REPO`; added `GIT_HOST`
210
+ - **`skills/vp-docs/SKILL.md`**: Step 0 shell block updated to match — same forge-agnostic parser, same variable names
211
+ - **`workflows/crystallize.md`**: Step 0 prompt label generalized from "GitHub username? (optional)" → "Git remote host / username? (optional — e.g. github.com/johndoe, gitlab.com/org)"
212
+
10
213
  ## [2.12.0] - 2026-04-13
11
214
 
12
215
  ### Added (FEAT-018 — Phase 75)
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.5.0-blue.svg)](CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/version-2.22.0-blue.svg)](CHANGELOG.md)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
7
7
  [![Skills](https://img.shields.io/badge/skills-17-purple.svg)](#skills-reference)
8
- [![Workflows](https://img.shields.io/badge/workflows-12-orange.svg)](#workflows)
8
+ [![Workflows](https://img.shields.io/badge/workflows-13-orange.svg)](#workflows)
9
9
  [![Templates](https://img.shields.io/badge/templates-17-cyan.svg)](#templates)
10
- [![Tests](https://img.shields.io/badge/tests-607%20passing-brightgreen.svg)](tests/)
10
+ [![Tests](https://img.shields.io/badge/tests-1140%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.4.0** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**2.4.0**) is the Node package identifier for this repo; use the framework version for milestone releases and docs.
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.
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,7 +28,7 @@ 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 | **~39,668+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
31
+ | Total LOC | **~51,713+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
32
32
  | Skills | **17** |
33
33
  | Workflows | **12** |
34
34
  | Templates | **17** (Project: 12, Phase: 5) |
@@ -61,11 +61,11 @@ Tổng thể / Overall: ██████████████████
61
61
  | Lĩnh vực / Area | Trạng thái | Chi tiết |
62
62
  |-----------------|------------|----------|
63
63
  | Core Skills (17) | ✅ Hoàn thiện | brainstorm, crystallize, auto, pause, resume, status, info, request, evolve, docs, update, task, debug, rollback, audit, ui-components, **proposal** |
64
- | Workflows (12) | ✅ Hoàn thiện | Full step-by-step guides với success criteria |
64
+ | Workflows (13) | ✅ 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 (607) | ✅ Hoàn thiện | Unit, integration, AI compat, workflow contracts, installer, scope policy, FEAT-009~015, ENH-021~037, BUG-009~013, adapter tests, 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 |
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 |
@@ -339,7 +339,7 @@ Full guide: `docs/dev/deployment.md`.
339
339
 
340
340
  ```
341
341
  viepilot/
342
- ├── skills/ # 16 Skill definitions
342
+ ├── skills/ # 17 Skill definitions
343
343
  │ ├── vp-brainstorm/ # Thu thập ý tưởng
344
344
  │ │ └── SKILL.md
345
345
  │ ├── vp-crystallize/ # Tạo artifacts
@@ -357,7 +357,7 @@ viepilot/
357
357
  │ ├── vp-rollback/ # Checkpoint recovery
358
358
  │ └── vp-audit/ # Documentation sync
359
359
 
360
- ├── workflows/ # 12 Workflow definitions
360
+ ├── workflows/ # 13 Workflow definitions
361
361
  │ ├── brainstorm.md # Brainstorm session flow
362
362
  │ ├── crystallize.md # Artifact generation flow
363
363
  │ ├── autonomous.md # Execution loop
@@ -368,6 +368,8 @@ viepilot/
368
368
  │ ├── documentation.md # Docs generation
369
369
  │ ├── debug.md # Debug session workflow
370
370
  │ ├── rollback.md # Rollback workflow
371
+ │ ├── ui-components.md # UI component workflow
372
+ │ ├── proposal.md # Proposal generation
371
373
  │ └── audit.md # Audit workflow
372
374
 
373
375
  ├── templates/ # 17 Templates
@@ -0,0 +1,131 @@
1
+ # ViePilot Agents Layer
2
+
3
+ Developer reference for the agents system introduced in ENH-057 (v2.20.0).
4
+
5
+ ## Why Agents?
6
+
7
+ Before v2.20.0, vp-* skills handled everything inline: research web fetches, TRACKER.md
8
+ updates, CHANGELOG writes, file scans, test generation, and doc updates all ran
9
+ sequentially in the main LLM context. This caused:
10
+
11
+ 1. **Context bloat** — long skill runs exhausted context with intermediate data
12
+ 2. **Sequential bottleneck** — research + write + verify ran one-at-a-time
13
+ 3. **Skill coupling** — each skill re-implemented the same patterns (tracker update, version bump)
14
+ 4. **No parallelism** — vp-auto tasks that could run concurrently didn't
15
+
16
+ The agents layer delegates these operations to dedicated sub-agents — isolated contexts
17
+ that run in parallel or in sequence without polluting the calling skill's conversation.
18
+
19
+ ## Architecture
20
+
21
+ ```
22
+ vp-* skill (orchestrator)
23
+
24
+ ├── tracker-agent ← .viepilot/TRACKER.md read/write
25
+ ├── research-agent ← WebSearch + WebFetch (isolated context)
26
+ ├── file-scanner-agent ← Glob + Grep (repo-wide scanning)
27
+ ├── changelog-agent ← CHANGELOG + version bump (single authority)
28
+ ├── test-generator-agent ← tests/*.test.js generation + run
29
+ └── doc-sync-agent ← skills/*/SKILL.md bulk update
30
+ ```
31
+
32
+ Agent definitions live in `agents/` at the repo root. They are installed to
33
+ `{viepilotDir}/agents/` alongside workflows and templates.
34
+
35
+ ## Agent Catalog
36
+
37
+ ### tracker-agent
38
+ **File**: `agents/tracker-agent.md`
39
+ **Purpose**: Read/write TRACKER.md — phase status, task status, decision log, request table.
40
+ **When to invoke**: vp-auto (task start/complete/phase complete), vp-request (Step 5), vp-evolve (phase creation).
41
+ **Claude Code subagent_type**: `general-purpose`
42
+
43
+ ### research-agent
44
+ **File**: `agents/research-agent.md`
45
+ **Purpose**: WebSearch + WebFetch + summarize for feasibility studies and tech research.
46
+ **When to invoke**: vp-request (Step 2B — auto-triggered for Feature/platform requests), vp-brainstorm (external validation).
47
+ **Claude Code subagent_type**: `general-purpose`
48
+
49
+ ### file-scanner-agent
50
+ **File**: `agents/file-scanner-agent.md`
51
+ **Purpose**: Glob + Grep across repo to find affected files, detect stale refs.
52
+ **When to invoke**: vp-audit (Tier 1–4), vp-evolve (impact analysis), vp-rollback (state restore).
53
+ **Claude Code subagent_type**: `Explore` (specialized for codebase scanning)
54
+
55
+ ### changelog-agent
56
+ **File**: `agents/changelog-agent.md`
57
+ **Purpose**: Atomically append CHANGELOG entry + bump package.json version.
58
+ **When to invoke**: vp-auto post-phase (last task), vp-evolve (milestone ship).
59
+ **Claude Code subagent_type**: `general-purpose`
60
+ **Note**: Single authority for version bumps — resolves ENH-053.
61
+
62
+ ### test-generator-agent
63
+ **File**: `agents/test-generator-agent.md`
64
+ **Purpose**: Generate contract tests from acceptance criteria, run suite, report pass/fail.
65
+ **When to invoke**: Last task of each phase (the `N.last` contract-test task pattern).
66
+ **Claude Code subagent_type**: `general-purpose`
67
+
68
+ ### doc-sync-agent
69
+ **File**: `agents/doc-sync-agent.md`
70
+ **Purpose**: Bulk-apply the same change to ≥5 `.md` files (adapter rows, banners, etc.).
71
+ **When to invoke**: Auto-triggered by autonomous.md when task Paths block has ≥5 identical file types.
72
+ **Claude Code subagent_type**: `general-purpose`
73
+
74
+ ## Invocation Patterns
75
+
76
+ ### Claude Code (terminal)
77
+
78
+ Use the `Agent` tool with the appropriate `subagent_type`:
79
+
80
+ ```js
81
+ Agent({
82
+ subagent_type: "general-purpose", // or "Explore" for file-scanner
83
+ description: "{agent-name}: {operation-summary}",
84
+ prompt: `
85
+ Load agents/{agent-name}.md for the full specification.
86
+ Execute operation: {operation}
87
+ Inputs: {inputs}
88
+ `
89
+ })
90
+ ```
91
+
92
+ ### Cursor / Codex / Antigravity
93
+
94
+ Execute the equivalent operation inline in the same session. The agent `.md` file
95
+ describes the exact steps — follow them as a scoped sub-prompt.
96
+
97
+ ## Adapter Behavior Table
98
+
99
+ | Agent | Claude Code | Cursor | Codex | Antigravity |
100
+ |-------|------------|--------|-------|-------------|
101
+ | tracker-agent | Subagent (general-purpose) | Inline | Inline | Inline |
102
+ | research-agent | Subagent (general-purpose) | Inline if web available | Inline if web available | Inline if web available |
103
+ | file-scanner-agent | Subagent (Explore) | Inline | Inline | Inline |
104
+ | changelog-agent | Subagent (general-purpose) | Inline | Inline | Inline |
105
+ | test-generator-agent | Subagent (general-purpose) | Inline | Inline | Inline |
106
+ | doc-sync-agent | Subagent (general-purpose) | Sequential inline | Sequential inline | Sequential inline |
107
+
108
+ ## Adding a New Agent
109
+
110
+ 1. Create `agents/{name}-agent.md` with all required sections:
111
+ - `## Purpose`
112
+ - `## Inputs`
113
+ - `## Outputs`
114
+ - `## Invocation Pattern` (Claude Code + text fallback)
115
+ - `## Adapter Behavior` (table covering all 4 adapters)
116
+ - `## Notes`
117
+
118
+ 2. Add the agent to the delegation table in `workflows/autonomous.md`
119
+ under `## Agent Delegation`.
120
+
121
+ 3. Wire invocation into the relevant workflow steps.
122
+
123
+ 4. Add to `installSubdirs` in the adapter that should include `agents/`.
124
+
125
+ 5. Write a contract test in `tests/unit/` verifying the file exists and has required sections.
126
+
127
+ ## Naming Conventions
128
+
129
+ - File: `agents/{name}-agent.md` (kebab-case, always ends in `-agent`)
130
+ - Reference: `{name}-agent` (e.g., `tracker-agent`, not `tracker`)
131
+ - Invocation: `Load agents/{name}-agent.md for full spec.`
@@ -45,6 +45,10 @@ Complete reference for all ViePilot skills.
45
45
  - **Product horizon:** session file giữ **`## Product horizon`** (MVP / Post-MVP / Future tags, deferred capabilities, hoặc single-release statement) để `/vp-crystallize` không bỏ sót post-MVP — xem `workflows/brainstorm.md`.
46
46
  - UI Direction (optional): `.viepilot/ui-direction/{session-id}/` — legacy (`index.html`) hoặc multi-page (`pages/*.html` + hub + `## Pages inventory` trong `notes.md`). Chi tiết: [UI Direction](user/features/ui-direction.md).
47
47
 
48
+ ### Adapter-Aware Interactive Prompts (ENH-048)
49
+ - **Claude Code (terminal)**: dùng `AskUserQuestion` tool — click-to-select UI cho session intent + landing page layout
50
+ - **Cursor / Codex / Antigravity / other**: tự động fallback về text list — không cần cấu hình
51
+
48
52
  ---
49
53
 
50
54
  ## /vp-crystallize
@@ -101,6 +105,10 @@ LICENSE
101
105
  README.md
102
106
  ```
103
107
 
108
+ ### Adapter-Aware Interactive Prompts (ENH-048)
109
+ - **Claude Code (terminal)**: dùng `AskUserQuestion` tool cho license selection, brownfield overwrite confirm, polyrepo prompt, UI direction gate, architect suggestion
110
+ - **Cursor / Codex / Antigravity / other**: tự động fallback về text list — không cần cấu hình
111
+
104
112
  ---
105
113
 
106
114
  ## /vp-auto
@@ -313,6 +321,10 @@ CHANGELOG.md (updated)
313
321
  4. Add to backlog
314
322
  5. Offer routing options (fix now, add to phase, etc.)
315
323
 
324
+ ### Adapter-Aware Interactive Prompts (ENH-048)
325
+ - **Claude Code (terminal)**: dùng `AskUserQuestion` tool cho request type detection, bug severity, feature priority
326
+ - **Cursor / Codex / Antigravity / other**: tự động fallback về text list — không cần cấu hình
327
+
316
328
  ---
317
329
 
318
330
  ## /vp-debug
@@ -10,6 +10,7 @@ ViePilot supports multiple AI coding platforms via its adapter system (FEAT-013)
10
10
  | `cursor-agent` / `cursor-ide` | Cursor | `~/.cursor/skills/` | `~/.cursor/viepilot/` | — | `/vp-status` |
11
11
  | `antigravity` | Google Antigravity | `~/.antigravity/skills/` | `~/.antigravity/viepilot/` | — | `/vp-status` |
12
12
  | `codex` | OpenAI Codex CLI | `~/.codex/skills/` | `~/.codex/viepilot/` | — | `$vp-status` |
13
+ | `copilot` | GitHub Copilot | `~/.config/gh-copilot/skills/` | `~/.config/gh-copilot/viepilot/` | — | `/vp-status` |
13
14
 
14
15
  > **Note — Codex invocation syntax:** OpenAI Codex CLI uses `$skill-name` to invoke skills (e.g. `$vp-status`, `$vp-brainstorm`). The `/command` prefix is reserved for Codex built-in controls (`/plan`, `/clear`, `/diff`, etc.). SKILL.md file format is fully compatible — no changes needed to skill content.
15
16
 
@@ -28,6 +29,9 @@ viepilot install --target antigravity
28
29
  # OpenAI Codex CLI
29
30
  viepilot install --target codex
30
31
 
32
+ # GitHub Copilot
33
+ viepilot install --target copilot
34
+
31
35
  # Multiple targets at once
32
36
  viepilot install --target claude-code,antigravity
33
37
  ```
@@ -45,6 +49,53 @@ At install time, `{envToolDir}` is replaced with each adapter's `executionContex
45
49
  - `cursor` → `.cursor/viepilot`
46
50
  - `antigravity` → `.antigravity/viepilot`
47
51
  - `codex` → `.codex/viepilot`
52
+ - `copilot` → `.config/gh-copilot/viepilot`
53
+
54
+ ## GitHub Copilot
55
+
56
+ GitHub Copilot adapter (FEAT-019) enables vp-* skills to run inside VS Code Copilot Chat and the GitHub Copilot CLI.
57
+
58
+ ### Surface support
59
+
60
+ | Surface | Status | Notes |
61
+ |---------|--------|-------|
62
+ | VS Code Copilot Chat | ✅ Supported | Invoke with `/vp-status`, `/vp-auto`, etc. |
63
+ | GitHub Copilot CLI | ✅ Supported | Invoke with `/vp-status` in CLI chat |
64
+ | Copilot Cloud Agents | ⚠️ Preview | GitHub Copilot Extensions (Public Preview); subject to change |
65
+ | JetBrains Copilot | ⚠️ Pending | Copilot Chat for JetBrains — skills not yet validated |
66
+
67
+ ### Prerequisites
68
+
69
+ - **gh CLI** installed (`brew install gh` or [cli.github.com](https://cli.github.com))
70
+ - **GitHub Copilot subscription** (Individual, Business, or Enterprise)
71
+ - **GitHub Copilot extension** for VS Code (marketplace ID: `GitHub.copilot-chat`)
72
+
73
+ ### Installation
74
+
75
+ ```bash
76
+ npx viepilot install --target copilot
77
+ ```
78
+
79
+ Files are installed to:
80
+ - Skills: `~/.config/gh-copilot/skills/`
81
+ - Workflows + lib: `~/.config/gh-copilot/viepilot/`
82
+
83
+ After install, open VS Code, open Copilot Chat (`Ctrl+Shift+I` / `Cmd+Shift+I`), and type `/vp-status`.
84
+
85
+ ### Availability detection
86
+
87
+ The installer detects Copilot by checking (in order):
88
+
89
+ 1. `~/.config/gh-copilot/` directory exists (primary)
90
+ 2. `gh` binary found at `/usr/local/bin/gh`, `/opt/homebrew/bin/gh`, or `~/.local/bin/gh` (secondary)
91
+
92
+ ### Known limitations
93
+
94
+ | Feature | Status |
95
+ |---------|--------|
96
+ | `AskUserQuestion` interactive prompts | ❌ Not available — skills use text-based menus |
97
+ | Hooks (PreToolUse, Stop, etc.) | ❌ Copilot uses `.agent.md` convention, not programmatic hooks |
98
+ | MCP server integration | 🔜 Planned for Phase 2 |
48
99
 
49
100
  ## Adding a new adapter
50
101
 
@@ -0,0 +1,83 @@
1
+ # Interactive Prompts (AskUserQuestion)
2
+
3
+ > **ENH-048** — Introduced in v2.15.0
4
+
5
+ ViePilot skills that ask user questions now use **adapter-aware interactive prompts**.
6
+ In Claude Code (terminal), questions appear as structured click-to-select UI.
7
+ All other adapters fall back to plain-text numbered lists automatically.
8
+
9
+ ---
10
+
11
+ ## How It Works
12
+
13
+ When a vp-* skill needs input (e.g. "What type of request?"), it checks whether
14
+ the `AskUserQuestion` tool is available in the current adapter:
15
+
16
+ | Adapter | Experience |
17
+ |---------|------------|
18
+ | **Claude Code (terminal)** | Click-to-select options with descriptions, optional multi-select, preview panels |
19
+ | **Claude Code (VS Code ext)** | Terminal mode — same as above (VS Code interactive UI pending [#12609](https://github.com/anthropics/claude-code/issues/12609)) |
20
+ | **Cursor — Plan Mode** | `AskQuestion` available in Plan Mode only |
21
+ | **Cursor — Agent/Skills** | Text fallback (AskQuestion not in Agent Mode) |
22
+ | **Codex CLI** | Text fallback (native tool N/A) |
23
+ | **Antigravity native** | Text fallback (Artifact model, no raw tool calls) |
24
+
25
+ No configuration needed. The fallback is automatic.
26
+
27
+ ---
28
+
29
+ ## Affected Skills and Prompts
30
+
31
+ ### /vp-crystallize
32
+ | Prompt | AUQ Options |
33
+ |--------|-------------|
34
+ | License selection | MIT / Apache-2.0 / GPL-3.0 / Proprietary |
35
+ | Brownfield overwrite confirm | Yes, continue / No, abort |
36
+ | Polyrepo related-repos | Yes, I'll list them / Skip for now |
37
+ | UI direction gate | Return to brainstorm / Continue with assumptions |
38
+ | Architect mode suggestion | Yes, architect mode / No, continue now |
39
+
40
+ ### /vp-brainstorm
41
+ | Prompt | AUQ Options |
42
+ |--------|-------------|
43
+ | Session intent | Continue recent / Review specific / New session |
44
+ | Landing page layout | Layout A (Hero) / Layout B (Problem-Solution) / Layout C (Storytelling) / Layout D (SaaS) |
45
+
46
+ ### /vp-request
47
+ | Prompt | AUQ Options |
48
+ |--------|-------------|
49
+ | Request type | Bug / Feature / Enhancement / Tech Debt |
50
+ | Bug severity | Critical / High / Medium / Low |
51
+ | Feature priority | Must-have / Should-have / Nice-to-have |
52
+
53
+ ### /vp-evolve
54
+ | Prompt | AUQ Options |
55
+ |--------|-------------|
56
+ | Evolve intent | Add Feature / New Milestone / Refactor |
57
+ | Complexity | S (Small) / M (Medium) / L (Large) / XL (Extra Large) |
58
+ | Brainstorm routing | Yes, brainstorm first / No, plan directly |
59
+
60
+ ---
61
+
62
+ ## AskUserQuestion Tool Constraints
63
+
64
+ When using Claude Code, the tool has these constraints:
65
+ - **1–4 questions** per call
66
+ - **2–4 options** per question
67
+ - Optional `multiSelect: true` for non-exclusive choices
68
+ - Optional `preview` field for visual comparisons (code/layout mockups)
69
+ - Automatic "Other" option always appended by the UI
70
+
71
+ ---
72
+
73
+ ## Research Notes (Adapter Support)
74
+
75
+ Research conducted 2026-04-13 confirmed:
76
+
77
+ - **Cursor Agent/Skills Mode** does not expose `AskQuestion` — it only works in Plan Mode
78
+ ([community request](https://forum.cursor.com/t/allow-askquestion-tool-calls-in-agent-mode-or-any-mode/152517))
79
+ - **Codex CLI** `ask_user_question` is a community MCP skill, not a native tool
80
+ ([openai/codex#9926](https://github.com/openai/codex/issues/9926))
81
+ - **Antigravity** uses an "Artifacts" model for agent output — no raw tool execution for interactive UI
82
+
83
+ All non-Claude-Code adapters receive identical plain-text prompts as before ENH-048.
@@ -24,7 +24,8 @@ module.exports = {
24
24
  path.join('templates', 'architect'),
25
25
  'bin',
26
26
  'lib',
27
- 'ui-components'
27
+ 'ui-components',
28
+ 'agents'
28
29
  ],
29
30
  isAvailable: (home) => {
30
31
  const h = home || os.homedir();
@@ -32,7 +32,8 @@ module.exports = {
32
32
  path.join('templates', 'architect'),
33
33
  'bin',
34
34
  'lib',
35
- 'ui-components'
35
+ 'ui-components',
36
+ 'agents'
36
37
  ],
37
38
  // Detection: is this platform available on the current machine?
38
39
  isAvailable: (home) => {
@@ -25,7 +25,8 @@ module.exports = {
25
25
  path.join('templates', 'architect'),
26
26
  'bin',
27
27
  'lib',
28
- 'ui-components'
28
+ 'ui-components',
29
+ 'agents'
29
30
  ],
30
31
  isAvailable: (home) => {
31
32
  const h = home || os.homedir();