viepilot 2.50.1 → 3.7.2
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 +204 -0
- package/README.md +1 -1
- package/bin/viepilot.cjs +1 -0
- package/bin/vp-tools.cjs +123 -1
- package/docs/brainstorm/session-2026-05-22.md +472 -0
- package/docs/dev/agents.md +51 -41
- package/lib/adapter-context.cjs +294 -0
- package/lib/adapters/antigravity.cjs +8 -2
- package/lib/adapters/claude-code.cjs +4 -0
- package/lib/audit/browser-runner.cjs +102 -0
- package/lib/intake/adapters/browser.cjs +58 -0
- package/lib/intake/adapters/excel-m365.cjs +54 -6
- package/lib/intake/auto-intake.cjs +194 -0
- package/lib/intake/classifier.cjs +22 -4
- package/lib/intake/manifest.cjs +81 -0
- package/lib/intake/triage-ux.cjs +10 -2
- package/lib/intake/validator.cjs +97 -0
- package/lib/intake/writeback.cjs +169 -3
- package/lib/request/url-enricher.cjs +69 -0
- package/lib/viepilot-install.cjs +15 -0
- package/package.json +1 -1
- package/skills/vp-audit/SKILL.md +99 -3
- package/skills/vp-auto/SKILL.md +54 -4
- package/skills/vp-brainstorm/SKILL.md +69 -3
- package/skills/vp-crystallize/SKILL.md +52 -3
- package/skills/vp-debug/SKILL.md +52 -3
- package/skills/vp-design/SKILL.md +52 -3
- package/skills/vp-docs/SKILL.md +52 -3
- package/skills/vp-evolve/SKILL.md +52 -3
- package/skills/vp-info/SKILL.md +52 -3
- package/skills/vp-intake/SKILL.md +306 -7
- package/skills/vp-pause/SKILL.md +52 -3
- package/skills/vp-persona/SKILL.md +52 -3
- package/skills/vp-proposal/SKILL.md +52 -3
- package/skills/vp-request/SKILL.md +72 -3
- package/skills/vp-resume/SKILL.md +52 -3
- package/skills/vp-rollback/SKILL.md +52 -3
- package/skills/vp-skills/SKILL.md +52 -3
- package/skills/vp-status/SKILL.md +52 -3
- package/skills/vp-task/SKILL.md +52 -3
- package/skills/vp-ui-components/SKILL.md +52 -3
- package/skills/vp-update/SKILL.md +52 -3
- package/workflows/autonomous.md +268 -18
- package/workflows/brainstorm.md +222 -7
- package/workflows/crystallize.md +124 -6
- package/workflows/design.md +62 -1
- package/workflows/request.md +54 -8
|
@@ -53,14 +53,63 @@ Silent if command unavailable or errors.
|
|
|
53
53
|
</persona_context>
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
<
|
|
56
|
+
<adapter id="claude-code">
|
|
57
57
|
## A. Skill Invocation
|
|
58
58
|
- Skill được gọi khi user mention `vp-update`, `/vp-update`, "upgrade viepilot", "cập nhật viepilot npm"
|
|
59
59
|
- Treat all user text after the skill mention as `{{VP_ARGS}}`
|
|
60
60
|
|
|
61
61
|
## B. Tool Usage
|
|
62
|
-
Use
|
|
63
|
-
|
|
62
|
+
Use Claude Code tools: `Bash` (shell), `Read` (file), `Edit` + `Write` (file write/patch),
|
|
63
|
+
`Grep` (search), `Glob` (file patterns), `LS`, `WebSearch`, `WebFetch`,
|
|
64
|
+
`Agent` (spawn subagent — multi-level nesting supported)
|
|
65
|
+
Interactive: `AskUserQuestion` (deferred — preload via ToolSearch before first call)
|
|
66
|
+
</adapter>
|
|
67
|
+
|
|
68
|
+
<adapter id="cursor-agent">
|
|
69
|
+
## A. Skill Invocation
|
|
70
|
+
Same trigger keywords as claude-code adapter.
|
|
71
|
+
|
|
72
|
+
## C. Tool Usage
|
|
73
|
+
Use Cursor tools: `run_terminal_cmd` (shell), `read_file` (read), `edit_file` (write/edit),
|
|
74
|
+
`grep_search` (search), `web_search`, `codebase_search`, `list_dir`, `file_search`
|
|
75
|
+
Interactive: text list fallback (AskQuestion available in Plan Mode only; Agent Mode = text)
|
|
76
|
+
Subagent: `/multitask` (user command, single-level only — not a callable tool)
|
|
77
|
+
MCP limit: 40 tools
|
|
78
|
+
</adapter>
|
|
79
|
+
|
|
80
|
+
<adapter id="antigravity">
|
|
81
|
+
## A. Skill Invocation
|
|
82
|
+
Same trigger keywords as claude-code adapter.
|
|
83
|
+
Skill discovery: LLM-driven (automatic, no slash command needed).
|
|
84
|
+
|
|
85
|
+
## C. Tool Usage
|
|
86
|
+
Use Antigravity tools: `shell` (cmd), `file_read`, `file_write`, MCP plugins
|
|
87
|
+
Interactive: text fallback (TUI-based; no formal AskUserQuestion)
|
|
88
|
+
Skill path: `.agents/skills/<skill>/SKILL.md` (project) or `~/.gemini/antigravity/skills/` (global)
|
|
89
|
+
Note: Gemini CLI deprecated June 18, 2026 — use Antigravity CLI.
|
|
90
|
+
</adapter>
|
|
91
|
+
|
|
92
|
+
<adapter id="codex">
|
|
93
|
+
## A. Skill Invocation
|
|
94
|
+
Same trigger keywords as claude-code adapter.
|
|
95
|
+
|
|
96
|
+
## C. Tool Usage
|
|
97
|
+
Use Codex tools: `container.exec` (sandboxed shell), `apply_patch` (file write), `web_search`
|
|
98
|
+
Interactive: text fallback (TUI Tab/Enter injection)
|
|
99
|
+
Config: `~/.codex/config.toml`
|
|
100
|
+
</adapter>
|
|
101
|
+
|
|
102
|
+
<adapter id="copilot">
|
|
103
|
+
## A. Skill Invocation
|
|
104
|
+
Same trigger keywords as claude-code adapter.
|
|
105
|
+
Discovery: User-driven (`@agent-name` in GitHub Copilot Chat).
|
|
106
|
+
|
|
107
|
+
## C. Tool Usage
|
|
108
|
+
Use Copilot tools: `runCommands` (shell), `read`/`readfile` (read), `edit`/`editFiles` (write),
|
|
109
|
+
`code_search`, `find_references`
|
|
110
|
+
Interactive: `askQuestions` (main agent only — NOT available in subagents; VS Code issue #293745)
|
|
111
|
+
Skill path: `.github/agents/<name>.agent.md`
|
|
112
|
+
</adapter>
|
|
64
113
|
<scope_policy>
|
|
65
114
|
## ViePilot Namespace Guard (BUG-004)
|
|
66
115
|
- Default mode: only use and reference `vp-*` skills in ViePilot workflows.
|
package/workflows/autonomous.md
CHANGED
|
@@ -37,6 +37,27 @@ Agent({
|
|
|
37
37
|
|
|
38
38
|
See `agents/` directory for full agent specifications.
|
|
39
39
|
|
|
40
|
+
## v3 Orchestration Agents (Phase 130 — FEAT-021)
|
|
41
|
+
|
|
42
|
+
On Claude Code adapter (when `ADAPTER_CONTEXT.orchestration.parallel == true`), three dedicated
|
|
43
|
+
subagent definitions in `agents/claude-code/` handle orchestrated execution:
|
|
44
|
+
|
|
45
|
+
| Agent | File | Model | Role |
|
|
46
|
+
|-------|------|-------|------|
|
|
47
|
+
| vp-task-executor | `agents/claude-code/vp-task-executor.md` | claude-haiku-4-5 | Implements a single task contract; fresh context window per task |
|
|
48
|
+
| vp-phase-planner | `agents/claude-code/vp-phase-planner.md` | claude-sonnet-4-6 | Reads phase, builds dependency graph, identifies parallel clusters |
|
|
49
|
+
| vp-quality-gate | `agents/claude-code/vp-quality-gate.md` | claude-sonnet-4-6 | Runs verification commands; reports PASS/FAIL/PARTIAL |
|
|
50
|
+
|
|
51
|
+
**Fan-out pattern** (implemented in Phase 133):
|
|
52
|
+
```
|
|
53
|
+
vp-phase-planner → clusters → Agent(vp-task-executor) × N (parallel) → Agent(vp-quality-gate)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**PreToolUse/PostToolUse hooks** (Claude Code only, registered via `vp-tools hooks install --adapter claude-code`):
|
|
57
|
+
- `PreToolUse` on `Write`/`Edit` in task scope: validates path is repo-relative (BUG-009 gate)
|
|
58
|
+
- `PostToolUse` on `Bash`: captures command output for quality-gate evidence log
|
|
59
|
+
- Hook config lives in `~/.claude/settings.json` → `hooks` array
|
|
60
|
+
|
|
40
61
|
<process>
|
|
41
62
|
|
|
42
63
|
> **AUQ preload — Claude Code adapter (ENH-059):** At session start, before any interactive prompt, call `ToolSearch` with `query: "select:AskUserQuestion"` to load the deferred schema. Required on Claude Code (terminal). Skip only if `ToolSearch` returns an error → use text fallback for that session.
|
|
@@ -95,6 +116,39 @@ Build `SKILL_CONTEXT_MAP` in session memory:
|
|
|
95
116
|
|
|
96
117
|
**If `## Skills` section absent or empty**: silent no-op — `SKILL_CONTEXT_MAP = { required: [], optional: [] }`.
|
|
97
118
|
|
|
119
|
+
### ADAPTER_CONTEXT Injection (FEAT-021 Phase 127)
|
|
120
|
+
|
|
121
|
+
Detect the active adapter and inject its capability map into session context. Skills use
|
|
122
|
+
ADAPTER_CONTEXT to select correct tool names and fallback chains — no inline compat tables.
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
ADAPTER_CONTEXT_JSON=$(node "$HOME/.claude/viepilot/bin/vp-tools.cjs" detect-adapter --json 2>/dev/null \
|
|
126
|
+
|| node "$(pwd)/bin/vp-tools.cjs" detect-adapter --json 2>/dev/null \
|
|
127
|
+
|| echo '{"adapter":"claude-code","interactive_mode":"AUQ","orchestration":{"parallel":true,"teams":true},"capabilities":["shell","read","write","edit","search","agent","interactive"]}')
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Parse into session variables:
|
|
131
|
+
- `ADAPTER_ID` — e.g. `"claude-code"`
|
|
132
|
+
- `ADAPTER_INTERACTIVE` — `"AUQ"` | `"text"` | `"none"`
|
|
133
|
+
- `ADAPTER_PARALLEL` — `true` | `false` (orchestration.parallel)
|
|
134
|
+
- `ADAPTER_TOOLS` — tools{} map (use `ctx.tools.shell` → correct tool name)
|
|
135
|
+
|
|
136
|
+
**Shell tool resolution** (use `ADAPTER_TOOLS.shell` for all bash/cmd execution in tasks):
|
|
137
|
+
| Adapter | Shell tool |
|
|
138
|
+
|---|---|
|
|
139
|
+
| claude-code | `Bash` |
|
|
140
|
+
| cursor-agent | `run_terminal_cmd` |
|
|
141
|
+
| antigravity | `shell` |
|
|
142
|
+
| codex | `container.exec` |
|
|
143
|
+
| copilot | `runCommands` |
|
|
144
|
+
|
|
145
|
+
**Interactive fallback chain** (based on `ADAPTER_INTERACTIVE`):
|
|
146
|
+
1. `"AUQ"` → call `AskUserQuestion` (preload via ToolSearch first)
|
|
147
|
+
2. `"text"` → show numbered list in plain text
|
|
148
|
+
3. `"none"` → proceed with defaults (log decision)
|
|
149
|
+
|
|
150
|
+
Silent on error — do not fail the phase. Fallback: assume `claude-code` defaults.
|
|
151
|
+
|
|
98
152
|
### Tag Prefix Resolution (ENH-050)
|
|
99
153
|
Resolve the enriched git tag prefix once at session start. All task/phase tags use `${TAG_PREFIX}`.
|
|
100
154
|
|
|
@@ -170,9 +224,137 @@ cat .viepilot/phases/{phase}/PHASE-STATE.md
|
|
|
170
224
|
|
|
171
225
|
Check if phase already has completed tasks → resume from next task.
|
|
172
226
|
|
|
227
|
+
### 3b. Orchestration Mode Selection (Phase 133 — FEAT-021)
|
|
228
|
+
|
|
229
|
+
> ⛔ **ORCHESTRATOR STOP — Implementation Delegation Rule (ENH-096)**
|
|
230
|
+
>
|
|
231
|
+
> On Claude Code adapter, the main orchestrator agent MUST NOT:
|
|
232
|
+
> - Call `Edit`, `Write`, or `MultiEdit` on implementation files (`lib/`, `bin/`, `tests/`, `agents/`, `skills/`, `workflows/` shipping content)
|
|
233
|
+
> - Run `Bash` commands that write source code (e.g. `cat >`, `tee`, compiler/bundler invocations for production output)
|
|
234
|
+
> - Implement features, fix bugs, or write tests inline in this context
|
|
235
|
+
>
|
|
236
|
+
> **Inline implementation is a framework violation.** It fills the orchestrator's context with
|
|
237
|
+
> implementation tokens (file diffs, test output, compile logs), degrading orchestration quality
|
|
238
|
+
> across subsequent tasks.
|
|
239
|
+
>
|
|
240
|
+
> The orchestrator is permitted ONLY to:
|
|
241
|
+
> - `Read` — read PHASE-STATE.md, TRACKER.md, HANDOFF.json, task files, ROADMAP.md (read-only)
|
|
242
|
+
> - `Bash` — read-only git checks ONLY: `git status --porcelain` (BUG-013: `??` lines = untracked, not dirty), `git rev-list --count @{u}..HEAD`, `node bin/vp-tools.cjs git-persistence --strict`
|
|
243
|
+
> - `Agent` — spawn vp-task-executor, vp-quality-gate, vp-phase-planner, tracker-agent, vp-git-agent, changelog-agent
|
|
244
|
+
>
|
|
245
|
+
> The orchestrator MUST NOT call Edit, Write, or Bash for ANY writes — including state files.
|
|
246
|
+
> All writes and git operations go through subagents (ENH-097).
|
|
247
|
+
>
|
|
248
|
+
> All implementation (file edits, test runs for implementation, commits) MUST go through
|
|
249
|
+
> `vp-task-executor`. This applies even when there is only one task in the phase.
|
|
250
|
+
|
|
251
|
+
Before entering the task loop, check `ADAPTER_PARALLEL` (set in ADAPTER_CONTEXT Injection step):
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
IF ADAPTER_PARALLEL == true AND ADAPTER_ID == "claude-code":
|
|
255
|
+
→ ORCHESTRATOR MODE: fan-out dispatch via Agent tool (section 3b-orch)
|
|
256
|
+
ELSE:
|
|
257
|
+
→ SEQUENTIAL MODE: single-agent serial execution (section 3b-seq)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**Agent Teams mode** (when `ADAPTER_CONTEXT.orchestration.teams == true` AND pending task count ≥ 8):
|
|
261
|
+
- Set `TEAMS_MODE = true`
|
|
262
|
+
- Activate shared TodoWrite task list for teammate coordination
|
|
263
|
+
- Each Agent worker reads from the shared list rather than receiving an explicit task prompt
|
|
264
|
+
|
|
265
|
+
#### 3b-orch: Orchestrator Fan-out (Claude Code only)
|
|
266
|
+
|
|
267
|
+
When `ADAPTER_PARALLEL == true`:
|
|
268
|
+
|
|
269
|
+
**Step 1 — Dependency resolution** (via `vp-phase-planner` agent):
|
|
270
|
+
```
|
|
271
|
+
Agent(
|
|
272
|
+
subagent_type: "vp-phase-planner",
|
|
273
|
+
prompt: "Analyze phase {N} tasks in .viepilot/phases/{dir}/PHASE-STATE.md.
|
|
274
|
+
Return JSON: { clusters: [ { tasks: [id,...], can_parallel: bool,
|
|
275
|
+
sequential_fallback: [id,...] } ] }
|
|
276
|
+
Only include incomplete tasks."
|
|
277
|
+
)
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Parse `clusters` JSON from agent output. Each cluster is a set of independent tasks that can run in parallel.
|
|
281
|
+
|
|
282
|
+
**Step 2 — Fan-out dispatch** (parallel `Agent` calls per cluster):
|
|
283
|
+
```
|
|
284
|
+
FOR each cluster in clusters:
|
|
285
|
+
IF cluster.can_parallel == true AND cluster.tasks.length > 1:
|
|
286
|
+
→ Dispatch tasks in parallel:
|
|
287
|
+
FOR EACH task_id in cluster.tasks (simultaneously):
|
|
288
|
+
Agent(
|
|
289
|
+
subagent_type: "vp-task-executor",
|
|
290
|
+
prompt: "Execute task {task_id} in phase {N}.
|
|
291
|
+
Task file: .viepilot/phases/{dir}/tasks/{task_id}.md
|
|
292
|
+
PHASE-STATE: .viepilot/phases/{dir}/PHASE-STATE.md
|
|
293
|
+
Repo root: {cwd}
|
|
294
|
+
Return: TASK_RESULT: PASS|FAIL|PARTIAL + summary"
|
|
295
|
+
)
|
|
296
|
+
Collect all TASK_RESULT outputs before advancing.
|
|
297
|
+
ELSE:
|
|
298
|
+
→ Execute tasks in sequence (cluster.sequential_fallback order)
|
|
299
|
+
Agent(vp-task-executor, single task)
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**Spawn Template (copy-paste verbatim — do not paraphrase):**
|
|
303
|
+
```
|
|
304
|
+
Agent({
|
|
305
|
+
subagent_type: "vp-task-executor",
|
|
306
|
+
description: "Execute task {task_id} — phase {N}",
|
|
307
|
+
prompt: `Execute ViePilot task {task_id} for phase {N}.
|
|
308
|
+
|
|
309
|
+
Task file: {task_path}
|
|
310
|
+
Phase state: {phase_dir}/PHASE-STATE.md
|
|
311
|
+
Repo root: {cwd}
|
|
312
|
+
|
|
313
|
+
Read the task file completely, implement all acceptance criteria, run verification
|
|
314
|
+
commands, commit with message format: {projectPrefix}-vp-p{N}-t{task_id}: <summary>,
|
|
315
|
+
then report:
|
|
316
|
+
TASK_RESULT: PASS|FAIL|PARTIAL
|
|
317
|
+
Committed: <sha> — <message>
|
|
318
|
+
Criteria: ✅/❌ per item`
|
|
319
|
+
})
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Replace `{task_id}`, `{N}`, `{task_path}`, `{phase_dir}`, `{cwd}`, `{projectPrefix}` with actual values.
|
|
323
|
+
The orchestrator MUST NOT call Edit/Write/Bash for implementation — the subagent handles all of that.
|
|
324
|
+
|
|
325
|
+
**Model tiering** (`ADAPTER_CONTEXT.orchestration.model_override`):
|
|
326
|
+
- Worker agent (vp-task-executor): `claude-haiku-4-5` — routine file edits, low token cost
|
|
327
|
+
- Planner/gate agent (vp-phase-planner, vp-quality-gate): `claude-sonnet-4-6` — reasoning, dependency analysis
|
|
328
|
+
- Orchestrator (main agent): retains current model — coordination only, no implementation
|
|
329
|
+
|
|
330
|
+
**Step 3 — Quality gate** (after each cluster completes):
|
|
331
|
+
```
|
|
332
|
+
Agent(
|
|
333
|
+
subagent_type: "vp-quality-gate",
|
|
334
|
+
prompt: "Run verification for phase {N} cluster {C}.
|
|
335
|
+
Tasks completed: {task_ids}
|
|
336
|
+
Check: acceptance criteria, tests, lint.
|
|
337
|
+
Return: QUALITY_GATE: PASS|FAIL|PARTIAL + findings"
|
|
338
|
+
)
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
On `QUALITY_GATE: FAIL` or `PARTIAL` → route to control point (retry cluster / skip / stop).
|
|
342
|
+
On `QUALITY_GATE: PASS` → update PHASE-STATE.md (all cluster tasks → done), update TRACKER.md, continue.
|
|
343
|
+
|
|
344
|
+
**Teams mode** (when `TEAMS_MODE == true`):
|
|
345
|
+
- Write all pending task IDs to shared `TodoWrite` list at phase start
|
|
346
|
+
- Each `Agent(vp-task-executor)` reads next available task from shared list
|
|
347
|
+
- Prevents duplicate execution when dispatching ≥ 8 tasks concurrently
|
|
348
|
+
|
|
349
|
+
#### 3b-seq: Sequential Mode (non-Claude Code adapters)
|
|
350
|
+
|
|
351
|
+
When `ADAPTER_PARALLEL == false` (Cursor / Antigravity / Codex / Copilot):
|
|
352
|
+
|
|
353
|
+
Execute tasks one at a time in the main agent context. No fan-out, no subagent dispatch.
|
|
354
|
+
|
|
173
355
|
### 3b. Execute Tasks Loop
|
|
174
356
|
|
|
175
|
-
For each task in phase:
|
|
357
|
+
For each task in phase (sequential mode) or per cluster (orchestrator mode):
|
|
176
358
|
|
|
177
359
|
#### Load Task Context
|
|
178
360
|
```yaml
|
|
@@ -449,9 +631,9 @@ IF (Paths block contains ≥5 files of the same type, e.g., skills/*/SKILL.md)
|
|
|
449
631
|
OR (task description matches: "update all N files", "add row to all skills", "sync across N files")
|
|
450
632
|
→ Invoke doc-sync-agent instead of N sequential edits:
|
|
451
633
|
|
|
452
|
-
Agent({ subagent_type: "
|
|
634
|
+
Agent({ subagent_type: "doc-sync-agent",
|
|
453
635
|
description: "doc-sync-agent: {change_mode} across {file_pattern}",
|
|
454
|
-
prompt: "
|
|
636
|
+
prompt: "file_pattern: {glob}. change_mode: {change_mode}. anchor: {anchor}. content: {content}."
|
|
455
637
|
})
|
|
456
638
|
Non-Claude Code: apply changes sequentially inline.
|
|
457
639
|
|
|
@@ -507,6 +689,21 @@ quality_gate:
|
|
|
507
689
|
- no_lint_errors: true
|
|
508
690
|
```
|
|
509
691
|
|
|
692
|
+
#### Test Generation — test-generator-agent (ENH-057, BUG-028 fix)
|
|
693
|
+
|
|
694
|
+
**Trigger**: current task is the last task in the phase AND task.md contains `## Acceptance Criteria`
|
|
695
|
+
|
|
696
|
+
**Claude Code — invoke test-generator-agent:**
|
|
697
|
+
```
|
|
698
|
+
Agent({ subagent_type: "test-generator-agent",
|
|
699
|
+
description: "test-generator-agent: generate + run contract tests for phase {phase}",
|
|
700
|
+
prompt: "task_file: {task_md_path}. test_output_path: tests/unit/phase{phase}-{task}-contract.test.js. phase_number: {phase}. task_number: {task}."
|
|
701
|
+
})
|
|
702
|
+
```
|
|
703
|
+
Non-Claude Code: generate test file inline from acceptance criteria, then run `npm test`.
|
|
704
|
+
|
|
705
|
+
If test-generator-agent reports FAIL: **do NOT** mark task complete — fix failing criteria first.
|
|
706
|
+
|
|
510
707
|
#### Git Persistence Gate (BUG-003)
|
|
511
708
|
Before marking a task PASS, require durable git persistence:
|
|
512
709
|
|
|
@@ -540,6 +737,30 @@ If any check fails:
|
|
|
540
737
|
- Update TRACKER.md immediately
|
|
541
738
|
- Update HANDOFF.json immediately
|
|
542
739
|
- Update CHANGELOG.md if feature/fix
|
|
740
|
+
|
|
741
|
+
**Post-PASS: Intake Write-back (ENH-095)**
|
|
742
|
+
|
|
743
|
+
After the above state updates, check the task `.md` for an `## Intake Source` block:
|
|
744
|
+
```
|
|
745
|
+
## Intake Source
|
|
746
|
+
- channel_id: trip-tracking-bug
|
|
747
|
+
- sheet_name: BUG
|
|
748
|
+
- source_row: 1
|
|
749
|
+
- manifest_path: .viepilot/intake/trip-tracking-bug-manifest.json
|
|
750
|
+
- channel_type: excel_m365
|
|
751
|
+
- workbook_id: {workbook_id or null}
|
|
752
|
+
- sharing_url: {sharing_url or null}
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
If the block is present:
|
|
756
|
+
1. Parse the fields from the block
|
|
757
|
+
2. Load manifest from `manifest_path` via `lib/intake/manifest.cjs → loadManifest()`
|
|
758
|
+
3. Call `getWriteBackConfig(manifest, sheet_name)` → get `response_col`
|
|
759
|
+
4. Build `response = { status: 'Fixed ✓', phaseTask: 'vp-p{N}-t{M}', version: currentVersion, date: YYYY-MM-DD }`
|
|
760
|
+
5. Call `lib/intake/writeback.cjs → writebackIntakeResponse(channel, source_row, response, projectRoot, sheet_name, response_col)`
|
|
761
|
+
6. Log: `[vp-auto] Intake write-back: row {source_row} → col {response_col}: "{text}" — {success|failed}`
|
|
762
|
+
7. **Write-back failure is non-fatal** — log to stderr and continue to next task regardless
|
|
763
|
+
|
|
543
764
|
- Move to next task
|
|
544
765
|
|
|
545
766
|
**PARTIAL (some checks fail):**
|
|
@@ -564,14 +785,28 @@ update:
|
|
|
564
785
|
- CHANGELOG.md: if feature/fix completed ← via changelog-agent at end of phase (ENH-057)
|
|
565
786
|
```
|
|
566
787
|
|
|
567
|
-
**
|
|
788
|
+
**State updates — spawn subagents (Claude Code, ENH-097):**
|
|
789
|
+
|
|
568
790
|
```
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
791
|
+
# Task status (PHASE-STATE.md + TRACKER.md current state):
|
|
792
|
+
Agent({ subagent_type: "tracker-agent",
|
|
793
|
+
description: "Update task {N}.{task_id} → {status}",
|
|
794
|
+
prompt: "operation: update-task-status. phase: {N}. task: {task_id}. status: {status}."
|
|
795
|
+
})
|
|
796
|
+
|
|
797
|
+
# HANDOFF.json update:
|
|
798
|
+
Agent({ subagent_type: "tracker-agent",
|
|
799
|
+
description: "Update HANDOFF.json — phase {N} task {task_id}",
|
|
800
|
+
prompt: "operation: update-handoff. phase: {N}. phase_name: {phase_name}. task: {task_id}. task_name: {task_name}. status: {status}. version: {version}. tasks_total: {T}. tasks_completed: {C}. notes: [\"{note}\"]."
|
|
801
|
+
})
|
|
802
|
+
|
|
803
|
+
# ROADMAP.md phase status sync (after phase complete):
|
|
804
|
+
Agent({ subagent_type: "tracker-agent",
|
|
805
|
+
description: "Update ROADMAP.md — phase {N} done",
|
|
806
|
+
prompt: "operation: update-roadmap-phase. phase_number: {N}. status: ✅ done. completed_date: {today}."
|
|
572
807
|
})
|
|
573
808
|
```
|
|
574
|
-
Non-Claude Code: update TRACKER.md inline as before.
|
|
809
|
+
Non-Claude Code: update TRACKER.md, HANDOFF.json, ROADMAP.md inline as before.
|
|
575
810
|
|
|
576
811
|
Rule:
|
|
577
812
|
- Never defer state updates to end-of-phase only.
|
|
@@ -633,15 +868,21 @@ Before phase-level verification, run a UI stub check:
|
|
|
633
868
|
| smarttrack-*/pom.xml (8 files) | 1.1 | ← WRONG: glob pattern
|
|
634
869
|
| smarttrack-*/src/** (7 files) | 1.1 | ← WRONG: summarized
|
|
635
870
|
```
|
|
636
|
-
4. Create
|
|
871
|
+
4. Create phase-complete git tag — spawn vp-git-agent:
|
|
872
|
+
```
|
|
873
|
+
Agent({ subagent_type: "vp-git-agent",
|
|
874
|
+
description: "Tag phase {N} complete",
|
|
875
|
+
prompt: "operation: create-tag. tag_name: {TAG_PREFIX}-vp-p{N}-complete."
|
|
876
|
+
})
|
|
877
|
+
```
|
|
637
878
|
5. Check version bump needed — apply `.viepilot/SYSTEM-RULES.md → Version Bump Rules`:
|
|
638
879
|
- Features added → MINOR; Fixes only → PATCH; Mixed → MINOR; Breaking → MAJOR
|
|
639
880
|
|
|
640
881
|
**Version bump — invoke changelog-agent (ENH-057, ENH-053 fix):**
|
|
641
882
|
```
|
|
642
|
-
Agent({ subagent_type: "
|
|
643
|
-
description: "
|
|
644
|
-
prompt: "
|
|
883
|
+
Agent({ subagent_type: "changelog-agent",
|
|
884
|
+
description: "Bump to {version} + CHANGELOG [{version}]",
|
|
885
|
+
prompt: "version: {version}. date: {today}. entries: {phase_summary_bullets}."
|
|
645
886
|
})
|
|
646
887
|
```
|
|
647
888
|
Non-Claude Code: update CHANGELOG.md + package.json inline as before.
|
|
@@ -649,13 +890,22 @@ Before phase-level verification, run a UI stub check:
|
|
|
649
890
|
> changelog-agent is the **single authority** for version bumps. Both autonomous.md and
|
|
650
891
|
> evolve.md invoke it — never do inline version bumps (resolves ENH-053).
|
|
651
892
|
|
|
652
|
-
6. Update TRACKER.md
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
893
|
+
6. Update TRACKER.md current state — spawn tracker-agent:
|
|
894
|
+
```
|
|
895
|
+
Agent({ subagent_type: "tracker-agent",
|
|
896
|
+
description: "Update TRACKER.md — phase {N} complete",
|
|
897
|
+
prompt: "operation: update-current-state. data: Last completed phase {N} — {phase_name}. version: {version}."
|
|
898
|
+
})
|
|
899
|
+
```
|
|
900
|
+
7. Push branch + tags — spawn vp-git-agent:
|
|
901
|
+
```
|
|
902
|
+
Agent({ subagent_type: "vp-git-agent",
|
|
903
|
+
description: "Push phase {N} complete",
|
|
904
|
+
prompt: "operation: push-all."
|
|
905
|
+
})
|
|
658
906
|
```
|
|
907
|
+
Then verify persistence (orchestrator may call this read-only check directly):
|
|
908
|
+
`node bin/vp-tools.cjs git-persistence --strict`
|
|
659
909
|
|
|
660
910
|
### 5a. Sync ROADMAP.md (after every phase complete)
|
|
661
911
|
|