vibe-coding-master 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -2
- package/scripts/verify-package.mjs +0 -1
- package/docs/ARCHITECTURE.md +0 -124
- package/docs/TESTING.md +0 -130
- package/docs/cc-best-practices.md +0 -2465
- package/docs/known-issues.md +0 -156
- package/docs/product-design.md +0 -891
- package/docs/v0.5-custom-workflow-plan.md +0 -788
- package/docs/vcm-cc-best-practices.md +0 -528
package/README.md
CHANGED
|
@@ -655,7 +655,7 @@ For every task, `taskRepoRoot` is `<baseRepoRoot>/.claude/worktrees/<task>`.
|
|
|
655
655
|
The npm package publishes built output, not raw TypeScript entry files. `package.json` includes:
|
|
656
656
|
|
|
657
657
|
- `bin.vcm`: `dist/main.js`
|
|
658
|
-
- `files`: `dist`, `dist-frontend`, `
|
|
658
|
+
- `files`: `dist`, `dist-frontend`, `scripts`, `README.md`
|
|
659
659
|
- `prepack`: `npm run build && npm run verify:package`
|
|
660
660
|
|
|
661
661
|
Use this before publishing:
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibe-coding-master",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Local GUI session cockpit for Claude Code role sessions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
8
8
|
"dist-frontend",
|
|
9
|
-
"docs",
|
|
10
9
|
"scripts",
|
|
11
10
|
"README.md"
|
|
12
11
|
],
|
package/docs/ARCHITECTURE.md
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# Architecture
|
|
2
|
-
|
|
3
|
-
Project-level architecture for VibeCodingMaster (VCM). VCM is a single npm
|
|
4
|
-
package that provides a local GUI cockpit for running and orchestrating multiple
|
|
5
|
-
Claude Code role sessions around one engineering task.
|
|
6
|
-
|
|
7
|
-
This document is architect-owned. It gives the project-wide module overview,
|
|
8
|
-
responsibilities, relationships, dependency direction, and constraints. The
|
|
9
|
-
module-level detailed design lives in [`ARCHITECTURE.md`](../ARCHITECTURE.md) at
|
|
10
|
-
the repository root (the single workspace module recorded in
|
|
11
|
-
`.ai/generated/module-index.json`).
|
|
12
|
-
|
|
13
|
-
## Module / Layer Overview
|
|
14
|
-
|
|
15
|
-
VCM is one workspace module (`vibe-coding-master`) organized into three source
|
|
16
|
-
layers plus supporting tools.
|
|
17
|
-
|
|
18
|
-
| Layer | Path | Responsibility |
|
|
19
|
-
| --- | --- | --- |
|
|
20
|
-
| Backend | `src/backend` | Fastify HTTP + WebSocket server, role/session runtime over `node-pty`, services, external adapters, mobile gateway, and the downstream harness templates. |
|
|
21
|
-
| Frontend | `src/frontend` | React 19 + Vite single-page GUI: task workspace, role tabs, embedded `xterm` terminals, harness/translation panels, and client state stores. |
|
|
22
|
-
| Shared | `src/shared` | Cross-layer TypeScript types, constants (role definitions, ports), and zod-backed validation helpers consumed by both backend and frontend. |
|
|
23
|
-
| Tools / scripts | `.ai/tools`, `scripts` | Generated-context generators, long-running validation wrappers, bash guard, and harness install/verify scripts. |
|
|
24
|
-
|
|
25
|
-
### Backend sub-areas (`src/backend`)
|
|
26
|
-
|
|
27
|
-
- `api/`: Fastify route modules, one per domain (project, task, session, round,
|
|
28
|
-
message, harness, gate-review, translation, gateway, diagnostics, artifacts,
|
|
29
|
-
runtime-state, app-settings, claude-hook). Routes are thin and delegate to
|
|
30
|
-
services.
|
|
31
|
-
- `services/`: business logic. Key services include `task-service`,
|
|
32
|
-
`task-launch-service` (backend-owned one-click task start, shared by the GUI
|
|
33
|
-
endpoint and the gateway), `session-service`, `round-service`,
|
|
34
|
-
`runtime-coordinator-service`, `message-service`, `harness-service`,
|
|
35
|
-
`gate-review-service`, `translation-service`/`translation-worker-service`,
|
|
36
|
-
`job-guard-service`, and `command-dispatcher`.
|
|
37
|
-
- `runtime/`: PTY-backed terminal runtime (`node-pty-runtime`,
|
|
38
|
-
`terminal-runtime`, `session-registry`, `terminal-submit`) that supervises one
|
|
39
|
-
Claude Code process per role.
|
|
40
|
-
- `adapters/`: side-effect boundaries — `claude-adapter`, `git-adapter`,
|
|
41
|
-
`command-runner`, `filesystem`.
|
|
42
|
-
- `gateway/`: mobile gateway service plus channel implementations
|
|
43
|
-
(Weixin iLink, Lark) and command parsing.
|
|
44
|
-
- `templates/`: message/handoff/role-command templates and, under
|
|
45
|
-
`templates/harness/`, the source of truth for the VCM harness that VCM installs
|
|
46
|
-
into downstream repositories.
|
|
47
|
-
- `ws/`: WebSocket bridge (`terminal-ws`) streaming PTY I/O to the frontend.
|
|
48
|
-
- `server.ts`, `main.ts`, `app-version.ts`, `vcm-data-dir.ts`, `errors.ts`:
|
|
49
|
-
composition root, CLI entry, version, data-dir resolution, error types.
|
|
50
|
-
|
|
51
|
-
### Frontend sub-areas (`src/frontend`)
|
|
52
|
-
|
|
53
|
-
- `routes/`: top-level views (`project-dashboard`, `task-workspace`).
|
|
54
|
-
- `components/`: GUI building blocks (app shell, session console/toolbar, role
|
|
55
|
-
session tabs, harness panel/studio, translation panel, message timeline,
|
|
56
|
-
repo connect form, diff modal, error center).
|
|
57
|
-
- `state/`: client stores and helpers (`app-store`, `session-store`,
|
|
58
|
-
`api-client`, polling schedulers, translation feed, UI error handling).
|
|
59
|
-
- `terminal/`: `xterm` view and terminal websocket client.
|
|
60
|
-
|
|
61
|
-
### Shared sub-areas (`src/shared`)
|
|
62
|
-
|
|
63
|
-
- `types/`: domain type contracts shared across layers.
|
|
64
|
-
- `validation/`: pure validators (`artifact-check`, `language-detect`,
|
|
65
|
-
`slug-check`).
|
|
66
|
-
- `constants.ts`: role definitions and default ports.
|
|
67
|
-
|
|
68
|
-
## Module Relationships and Dependency Direction
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
frontend --depends on--> shared <--depends on-- backend
|
|
72
|
-
| ^
|
|
73
|
-
+-------- HTTP /api + WS /ws (api-client) ----------+
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
- `shared` is the leaf layer. It must not import from `backend` or `frontend`.
|
|
77
|
-
- `backend` and `frontend` both depend on `shared`, and must not depend on each
|
|
78
|
-
other at the module level.
|
|
79
|
-
- The only runtime coupling between frontend and backend is the HTTP `/api`
|
|
80
|
-
surface and the `/ws` WebSocket, mediated on the client by
|
|
81
|
-
`src/frontend/state/api-client.ts` and
|
|
82
|
-
`src/frontend/terminal/terminal-client.ts`.
|
|
83
|
-
- Within the backend, the intended direction is
|
|
84
|
-
`api -> services -> (runtime | adapters | gateway | templates)`. Routes should
|
|
85
|
-
not contain business logic; services should reach the outside world only
|
|
86
|
-
through adapters and the runtime.
|
|
87
|
-
|
|
88
|
-
## Project-Wide Constraints
|
|
89
|
-
|
|
90
|
-
- Single npm package, ESM only, TypeScript strict mode. Node `^20 || >=22`.
|
|
91
|
-
- Keep the layer boundary: no `shared -> backend/frontend` imports, no direct
|
|
92
|
-
`frontend <-> backend` imports.
|
|
93
|
-
- Backend and frontend compile under separate tsconfigs
|
|
94
|
-
(`tsconfig.node.json`, `tsconfig.json`); new files must fall inside the correct
|
|
95
|
-
`include` globs, and `npm run typecheck` must pass both.
|
|
96
|
-
- Downstream harness behavior is defined by `src/backend/templates/harness/**`;
|
|
97
|
-
change harness output there, not in generated target-repo files.
|
|
98
|
-
- Long-running and background process rules from the VCM managed block in
|
|
99
|
-
`CLAUDE.md` apply; never detach processes.
|
|
100
|
-
- The npm package ships only built artifacts (`dist`, `dist-frontend`, `docs`,
|
|
101
|
-
`scripts`, `README.md`).
|
|
102
|
-
|
|
103
|
-
## Generated Context Ownership
|
|
104
|
-
|
|
105
|
-
Generated indexes under `.ai/generated/` are machine-maintained and regenerated
|
|
106
|
-
by the tools in `.ai/tools/`:
|
|
107
|
-
|
|
108
|
-
- `.ai/generated/module-index.json` — produced by
|
|
109
|
-
`.ai/tools/generate-module-index`. Maps the workspace to layers, modules,
|
|
110
|
-
manifests, module docs, source files, and test files. Use it to locate code and
|
|
111
|
-
confirm module boundaries.
|
|
112
|
-
- `.ai/generated/public-surface.json` — produced by
|
|
113
|
-
`.ai/tools/generate-public-surface` (after `module-index.json` exists). It is the
|
|
114
|
-
authoritative machine index of module-to-module public APIs, routes, and
|
|
115
|
-
externally consumed surfaces. Treat it as the full public-surface listing;
|
|
116
|
-
module docs explain meaning and design intent rather than duplicating it.
|
|
117
|
-
|
|
118
|
-
Regenerate both after changing module layout, public exports, or HTTP routes.
|
|
119
|
-
|
|
120
|
-
## Module-Level Architecture Docs
|
|
121
|
-
|
|
122
|
-
- Root module: [`ARCHITECTURE.md`](../ARCHITECTURE.md) — detailed design,
|
|
123
|
-
boundaries, behavior, public surface explanation, risks, and update triggers
|
|
124
|
-
for the `vibe-coding-master` workspace module.
|
package/docs/TESTING.md
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
# Testing
|
|
2
|
-
|
|
3
|
-
Reviewer-owned validation strategy for VibeCodingMaster (VCM). This document maps
|
|
4
|
-
the VCM validation levels to project-native commands, where tests live, how to
|
|
5
|
-
select what to run, and the current testing gaps.
|
|
6
|
-
|
|
7
|
-
## Validation Levels and Commands
|
|
8
|
-
|
|
9
|
-
All commands run from the repository root (the task worktree during a VCM task).
|
|
10
|
-
|
|
11
|
-
| Level | Scope | Command(s) |
|
|
12
|
-
| --- | --- | --- |
|
|
13
|
-
| L0 fast checks | Format/lint/typecheck/boundary. Project ships typecheck across both tsconfigs. | `npm run typecheck` |
|
|
14
|
-
| L1 coder unit checks | Changed behavior + direct regressions via Vitest unit tests. | `npm test` (optionally a scoped `npx vitest run <path>`) |
|
|
15
|
-
| L2 module / integration checks | Module/API/runtime wiring. Vitest config reserves `tests/integration/api/**` and `tests/integration/runtime/**`. | `npm test` (runs unit + any integration tests that exist) |
|
|
16
|
-
| L3 smoke E2E checks | Core GUI journeys via Playwright. | `npm run e2e` |
|
|
17
|
-
| L4 full regression / release | Build + package verification before publish. | `npm run build` then `npm run verify:package` |
|
|
18
|
-
|
|
19
|
-
Notes:
|
|
20
|
-
|
|
21
|
-
- `npm run typecheck` runs `tsc` against both `tsconfig.json` (frontend + shared)
|
|
22
|
-
and `tsconfig.node.json` (backend), so it is the boundary/type gate for the
|
|
23
|
-
whole module.
|
|
24
|
-
- `npm test` is `vitest run`. Its `include` globs already cover unit and the
|
|
25
|
-
reserved integration directories, so a single `npm test` is both L1 and L2 once
|
|
26
|
-
integration tests exist.
|
|
27
|
-
- `npm run e2e` is `playwright test` against `tests/e2e`, and its `webServer`
|
|
28
|
-
starts `npm run dev` automatically (reusing an existing server if one is up).
|
|
29
|
-
|
|
30
|
-
## Validation Selection Rules
|
|
31
|
-
|
|
32
|
-
- Docs-only or comment-only change: L0 (`npm run typecheck`) is usually enough; no
|
|
33
|
-
code behavior to retest.
|
|
34
|
-
- `src/shared/**` change: always L0 + L1, because shared types/validators are
|
|
35
|
-
cross-cutting to both backend and frontend.
|
|
36
|
-
- `src/backend/**` change: L0 + the affected `tests/unit/backend/**` files; run
|
|
37
|
-
full `npm test` before handoff. Add L2 when touching runtime, routes, or
|
|
38
|
-
cross-service wiring.
|
|
39
|
-
- `src/frontend/**` change: L0 + the affected `tests/unit/frontend/**` files; add
|
|
40
|
-
L3 (`npm run e2e`) when changing a core user journey (connect repo, create task,
|
|
41
|
-
start/resume a role session, send a message, translation panel).
|
|
42
|
-
- `src/backend/templates/harness/**` change: L0 + `npm test` (harness template
|
|
43
|
-
sync and harness service/route tests guard these), because output ships into
|
|
44
|
-
downstream repos.
|
|
45
|
-
- `.ai/tools/**` or `scripts/harness-tools/**` change: run
|
|
46
|
-
`tests/unit/backend/harness-tools.test.ts` and `vcm-bash-guard.test.ts`.
|
|
47
|
-
- Pre-publish / release: L4 (`npm run build` + `npm run verify:package`).
|
|
48
|
-
|
|
49
|
-
## Long-Running Validation
|
|
50
|
-
|
|
51
|
-
Use the `vcm-long-running-validation` skill (`.ai/tools/run-long-check` +
|
|
52
|
-
`.ai/tools/watch-job`) for any command that may exceed ~2 minutes (notably
|
|
53
|
-
`npm run e2e` and full builds). Never run validation as a detached/background
|
|
54
|
-
process; the job guard denies it. Honor the 60-minute per-job ceiling.
|
|
55
|
-
|
|
56
|
-
## Test Layout
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
tests/
|
|
60
|
-
unit/
|
|
61
|
-
backend/ # services, routes, runtime, adapters, gateway, harness, tools
|
|
62
|
-
frontend/ # api-client, stores, components (message timeline, harness panel, translation panel)
|
|
63
|
-
shared/ # pure validators (artifact-check, language-detect, slug-check)
|
|
64
|
-
integration/ # reserved by vitest config: api/**, runtime/** (not yet present)
|
|
65
|
-
e2e/ # reserved by playwright config (not yet present)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
- Place unit tests next to their layer under `tests/unit/<layer>/` named
|
|
69
|
-
`<subject>.test.ts`.
|
|
70
|
-
- Place integration tests under `tests/integration/api/**` or
|
|
71
|
-
`tests/integration/runtime/**` so the existing Vitest `include` picks them up.
|
|
72
|
-
- Place Playwright specs under `tests/e2e/`.
|
|
73
|
-
|
|
74
|
-
## Integration / E2E Case List
|
|
75
|
-
|
|
76
|
-
These are reserved by configuration but not yet implemented. They are the
|
|
77
|
-
recommended first cases when integration/E2E coverage is added.
|
|
78
|
-
|
|
79
|
-
### Integration (reserved: `tests/integration/api/**`, `tests/integration/runtime/**`)
|
|
80
|
-
|
|
81
|
-
| ID | Scenario | Entry point | Proves | Key assertions | When to run | Limitation |
|
|
82
|
-
| --- | --- | --- | --- | --- | --- | --- |
|
|
83
|
-
| INT-API-001 | Project + task lifecycle over HTTP | Fastify app via `project-routes` / `task-routes` | Routes + services persist task state correctly | Create project, create task, read back task, status transitions | L2, on backend api/service change | Not yet implemented |
|
|
84
|
-
| INT-API-002 | Message bus round trip | `message-routes` / `message-service` | Route-file dispatch and history persistence | Posted message is persisted and retrievable in order | L2, on messaging change | Not yet implemented |
|
|
85
|
-
| INT-RT-001 | Session start/resume lifecycle | `runtime-coordinator-service` + `session-registry` | PTY session can start, persist id, and resume | Session id persisted; resume reuses id; stop cleans registry | L2, on runtime change | Not yet implemented; needs `claude`/pty test doubles |
|
|
86
|
-
|
|
87
|
-
### E2E (reserved: `tests/e2e/`)
|
|
88
|
-
|
|
89
|
-
| ID | Scenario | Entry point | Proves | Key assertions | When to run | Limitation |
|
|
90
|
-
| --- | --- | --- | --- | --- | --- | --- |
|
|
91
|
-
| E2E-001 | Connect repository and create a task | GUI at `http://127.0.0.1:5173` | Core onboarding journey works end to end | Repo connects, branch/status render, task appears in list | L3, before release / on shell or routing change | Not yet implemented; requires a real `claude` binary for live sessions |
|
|
92
|
-
| E2E-002 | Start a role session and observe terminal output | Task workspace role tabs | Embedded terminal streams PTY output over `/ws` | Session starts, xterm receives output, status badge updates | L3, on runtime/terminal change | Not yet implemented; environment-dependent |
|
|
93
|
-
| E2E-003 | Translation panel renders translated transcript | Translation panel | Translator session reads transcript JSONL and renders | Panel shows translated entries without mutating handoffs | L3, on translation change | Not yet implemented |
|
|
94
|
-
| E2E-004 | Auto-orchestration journey (one-click → auto-follow → flow-pause) | GUI task workspace, auto mode | The relocated backend-owned orchestration drives the GUI end to end | One-click starts the roster via `POST /api/tasks/:slug/one-click-start`; the role tab follows `roundState.activeRole`; a stopped round with no next turn raises the `roundState.flowPause` notice | L3, on one-click/round/role-follow change | Not yet implemented; needs a Playwright harness + live `claude`/pty. Until then the three contracts are covered at integration level: task-routes inject + gateway inbound (P1), active-role-follow + app wiring (P2), round-service flowPause matrix + flow-pause-alert (P3) |
|
|
95
|
-
|
|
96
|
-
## Generated-Context Freshness Checks
|
|
97
|
-
|
|
98
|
-
- Regenerate `.ai/generated/module-index.json` with `.ai/tools/generate-module-index`
|
|
99
|
-
after adding/removing/moving modules, source files, or test files.
|
|
100
|
-
- Regenerate `.ai/generated/public-surface.json` with
|
|
101
|
-
`.ai/tools/generate-public-surface` (after module-index exists) after changing
|
|
102
|
-
exported APIs, HTTP routes, or shared types.
|
|
103
|
-
- Treat stale generated indexes as a validation failure during review: if a
|
|
104
|
-
source/route/export change is not reflected in the indexes, regenerate before
|
|
105
|
-
acceptance.
|
|
106
|
-
|
|
107
|
-
## Final-Validation Cleanup
|
|
108
|
-
|
|
109
|
-
- Remove temporary scripts, scratch files, and any test-only fixtures created
|
|
110
|
-
during investigation before final acceptance.
|
|
111
|
-
- Do not leave `.only`/`.skip` in committed Vitest or Playwright specs.
|
|
112
|
-
- Ensure no detached/background validation jobs remain running.
|
|
113
|
-
- Confirm generated indexes are regenerated and committed when source/surface
|
|
114
|
-
changed.
|
|
115
|
-
- Before publish, `npm run build` and `npm run verify:package` must pass.
|
|
116
|
-
|
|
117
|
-
## Known Testing Gaps
|
|
118
|
-
|
|
119
|
-
- No integration tests exist yet; `tests/integration/**` is configured but empty.
|
|
120
|
-
- No E2E tests exist yet; `tests/e2e/**` is configured (Playwright) but empty.
|
|
121
|
-
- E2E and live runtime tests depend on a real `claude` binary and `node-pty`,
|
|
122
|
-
which are environment-sensitive and not currently stubbed for CI.
|
|
123
|
-
- There is no lint command in `package.json`; L0 is currently typecheck-only.
|
|
124
|
-
- Coverage thresholds are not enforced by configuration.
|
|
125
|
-
- `tests/unit/backend/harness-templates-sync.test.ts` shells out to
|
|
126
|
-
`scripts/install-vcm-harness.mjs`, which needs the compiled CLI (`dist/main.js`).
|
|
127
|
-
On a clean checkout with no `dist/`, those 3 cases fail with
|
|
128
|
-
"compiled CLI not found. Run npm run build first." Run `npm run build` before
|
|
129
|
-
`npm test` (or treat these specific failures as build-state, not regressions)
|
|
130
|
-
when validating from a clean tree.
|